Imported Upstream version 7.32.0 upstream/7.32.0
authorPatrick McCarty <patrick.mccarty@linux.intel.com>
Wed, 4 Sep 2013 17:45:07 +0000 (10:45 -0700)
committerPatrick McCarty <patrick.mccarty@linux.intel.com>
Wed, 4 Sep 2013 17:45:07 +0000 (10:45 -0700)
1384 files changed:
CHANGES
CMake/CheckTypeSize.c.in [deleted file]
CMake/CheckTypeSize.cmake [deleted file]
CMake/CurlTests.c
CMake/FindOpenSSL.cmake
CMake/FindZLIB.cmake
CMakeLists.txt
COPYING
MacOSX-Framework
Makefile
Makefile.am
Makefile.in
RELEASE-NOTES
acinclude.m4
aclocal.m4
buildconf
compile
config.guess
config.sub
configure
configure.ac
configure.ac.orig [deleted file]
curl-config.in
curl-style.el [deleted file]
depcomp
docs/BINDINGS
docs/BUGS
docs/CONTRIBUTE
docs/FAQ
docs/FEATURES
docs/HISTORY
docs/HTTP-COOKIES [new file with mode: 0644]
docs/INSTALL
docs/INSTALL.devcpp
docs/INTERNALS
docs/KNOWN_BUGS
docs/LIBCURL-STRUCTS [new file with mode: 0644]
docs/LICENSE-MIXING
docs/MAIL-ETIQUETTE [new file with mode: 0644]
docs/MANUAL
docs/Makefile.am
docs/Makefile.in
docs/SSLCERTS
docs/THANKS
docs/TODO
docs/TheArtOfHttpScripting
docs/VERSIONS
docs/curl-config.1
docs/curl-config.html
docs/curl-config.pdf
docs/curl.1
docs/curl.html
docs/curl.pdf
docs/examples/10-at-a-time.c
docs/examples/Makefile.am
docs/examples/Makefile.example
docs/examples/Makefile.in
docs/examples/Makefile.inc
docs/examples/Makefile.m32
docs/examples/Makefile.netware [new file with mode: 0644]
docs/examples/README
docs/examples/anyauthput.c
docs/examples/asiohiper.cpp [new file with mode: 0644]
docs/examples/cacertinmem.c
docs/examples/certinfo.c
docs/examples/chkspeed.c
docs/examples/cookie_interface.c
docs/examples/curlgtk.c
docs/examples/curlx.c
docs/examples/debug.c
docs/examples/evhiperfifo.c
docs/examples/externalsocket.c [new file with mode: 0644]
docs/examples/fileupload.c
docs/examples/fopen.c
docs/examples/ftp-wildcard.c
docs/examples/ftpget.c
docs/examples/ftpgetinfo.c
docs/examples/ftpgetresp.c
docs/examples/ftpsget.c [new file with mode: 0644]
docs/examples/ftpupload.c
docs/examples/ftpuploadresume.c
docs/examples/getinfo.c
docs/examples/getinmemory.c
docs/examples/ghiper.c
docs/examples/hiperfifo.c
docs/examples/href_extractor.c [new file with mode: 0644]
docs/examples/htmltidy.c
docs/examples/htmltitle.cpp [moved from docs/examples/htmltitle.cc with 88% similarity]
docs/examples/http-post.c
docs/examples/httpcustomheader.c
docs/examples/httpput.c
docs/examples/https.c
docs/examples/imap.c [new file with mode: 0644]
docs/examples/makefile.dj
docs/examples/multi-app.c
docs/examples/multi-debugcallback.c
docs/examples/multi-double.c
docs/examples/multi-post.c
docs/examples/multi-single.c
docs/examples/multi-uv.c [new file with mode: 0644]
docs/examples/multithread.c
docs/examples/opensslthreadlock.c
docs/examples/persistant.c
docs/examples/pop3s.c [new file with mode: 0644]
docs/examples/pop3slist.c [new file with mode: 0644]
docs/examples/post-callback.c
docs/examples/postit2.c
docs/examples/progressfunc.c [new file with mode: 0644]
docs/examples/resolve.c [new file with mode: 0644]
docs/examples/rtsp.c [new file with mode: 0644]
docs/examples/sampleconv.c
docs/examples/sendrecv.c
docs/examples/sepheaders.c
docs/examples/sftpget.c [new file with mode: 0644]
docs/examples/simple.c
docs/examples/simplepost.c
docs/examples/simplesmtp.c [new file with mode: 0644]
docs/examples/simplessl.c
docs/examples/smooth-gtk-thread.c
docs/examples/smtp-multi.c
docs/examples/smtp-tls.c [new file with mode: 0644]
docs/examples/synctime.c
docs/examples/threaded-ssl.c
docs/examples/url2file.c [new file with mode: 0644]
docs/examples/usercertinmem.c [new file with mode: 0644]
docs/examples/version-check.pl
docs/examples/xmlstream.c [new file with mode: 0644]
docs/index.html
docs/libcurl/Makefile.am
docs/libcurl/Makefile.in
docs/libcurl/curl_easy_cleanup.3
docs/libcurl/curl_easy_cleanup.html
docs/libcurl/curl_easy_cleanup.pdf
docs/libcurl/curl_easy_duphandle.3
docs/libcurl/curl_easy_duphandle.html
docs/libcurl/curl_easy_duphandle.pdf
docs/libcurl/curl_easy_escape.3
docs/libcurl/curl_easy_escape.html
docs/libcurl/curl_easy_escape.pdf
docs/libcurl/curl_easy_getinfo.3
docs/libcurl/curl_easy_getinfo.html
docs/libcurl/curl_easy_getinfo.pdf
docs/libcurl/curl_easy_init.3
docs/libcurl/curl_easy_init.html
docs/libcurl/curl_easy_init.pdf
docs/libcurl/curl_easy_pause.3
docs/libcurl/curl_easy_pause.html
docs/libcurl/curl_easy_pause.pdf
docs/libcurl/curl_easy_perform.3
docs/libcurl/curl_easy_perform.html
docs/libcurl/curl_easy_perform.pdf
docs/libcurl/curl_easy_recv.3
docs/libcurl/curl_easy_recv.html
docs/libcurl/curl_easy_recv.pdf
docs/libcurl/curl_easy_reset.3
docs/libcurl/curl_easy_reset.html
docs/libcurl/curl_easy_reset.pdf
docs/libcurl/curl_easy_send.3
docs/libcurl/curl_easy_send.html
docs/libcurl/curl_easy_send.pdf
docs/libcurl/curl_easy_setopt.3
docs/libcurl/curl_easy_setopt.html
docs/libcurl/curl_easy_setopt.pdf
docs/libcurl/curl_easy_strerror.3
docs/libcurl/curl_easy_strerror.html
docs/libcurl/curl_easy_strerror.pdf
docs/libcurl/curl_easy_unescape.html
docs/libcurl/curl_easy_unescape.pdf
docs/libcurl/curl_escape.3
docs/libcurl/curl_escape.html
docs/libcurl/curl_escape.pdf
docs/libcurl/curl_formadd.3
docs/libcurl/curl_formadd.html
docs/libcurl/curl_formadd.pdf
docs/libcurl/curl_formfree.3
docs/libcurl/curl_formfree.html
docs/libcurl/curl_formfree.pdf
docs/libcurl/curl_formget.3
docs/libcurl/curl_formget.html
docs/libcurl/curl_formget.pdf
docs/libcurl/curl_free.3
docs/libcurl/curl_free.html
docs/libcurl/curl_free.pdf
docs/libcurl/curl_getdate.3
docs/libcurl/curl_getdate.html
docs/libcurl/curl_getdate.pdf
docs/libcurl/curl_getenv.3
docs/libcurl/curl_getenv.html
docs/libcurl/curl_getenv.pdf
docs/libcurl/curl_global_cleanup.3
docs/libcurl/curl_global_cleanup.html
docs/libcurl/curl_global_cleanup.pdf
docs/libcurl/curl_global_init.3
docs/libcurl/curl_global_init.html
docs/libcurl/curl_global_init.pdf
docs/libcurl/curl_global_init_mem.3
docs/libcurl/curl_global_init_mem.html
docs/libcurl/curl_global_init_mem.pdf
docs/libcurl/curl_mprintf.3
docs/libcurl/curl_mprintf.html
docs/libcurl/curl_mprintf.pdf
docs/libcurl/curl_multi_add_handle.3
docs/libcurl/curl_multi_add_handle.html
docs/libcurl/curl_multi_add_handle.pdf
docs/libcurl/curl_multi_assign.3
docs/libcurl/curl_multi_assign.html
docs/libcurl/curl_multi_assign.pdf
docs/libcurl/curl_multi_cleanup.3
docs/libcurl/curl_multi_cleanup.html
docs/libcurl/curl_multi_cleanup.pdf
docs/libcurl/curl_multi_fdset.3
docs/libcurl/curl_multi_fdset.html
docs/libcurl/curl_multi_fdset.pdf
docs/libcurl/curl_multi_info_read.3
docs/libcurl/curl_multi_info_read.html
docs/libcurl/curl_multi_info_read.pdf
docs/libcurl/curl_multi_init.3
docs/libcurl/curl_multi_init.html
docs/libcurl/curl_multi_init.pdf
docs/libcurl/curl_multi_perform.3
docs/libcurl/curl_multi_perform.html
docs/libcurl/curl_multi_perform.pdf
docs/libcurl/curl_multi_remove_handle.3
docs/libcurl/curl_multi_remove_handle.html
docs/libcurl/curl_multi_remove_handle.pdf
docs/libcurl/curl_multi_setopt.3
docs/libcurl/curl_multi_setopt.html
docs/libcurl/curl_multi_setopt.pdf
docs/libcurl/curl_multi_socket.3
docs/libcurl/curl_multi_socket.html
docs/libcurl/curl_multi_socket.pdf
docs/libcurl/curl_multi_socket_action.3
docs/libcurl/curl_multi_socket_action.html
docs/libcurl/curl_multi_socket_action.pdf
docs/libcurl/curl_multi_strerror.3
docs/libcurl/curl_multi_strerror.html
docs/libcurl/curl_multi_strerror.pdf
docs/libcurl/curl_multi_timeout.3
docs/libcurl/curl_multi_timeout.html
docs/libcurl/curl_multi_timeout.pdf
docs/libcurl/curl_multi_wait.3 [new file with mode: 0644]
docs/libcurl/curl_multi_wait.html [new file with mode: 0644]
docs/libcurl/curl_multi_wait.pdf [new file with mode: 0644]
docs/libcurl/curl_share_cleanup.3
docs/libcurl/curl_share_cleanup.html
docs/libcurl/curl_share_cleanup.pdf
docs/libcurl/curl_share_init.3
docs/libcurl/curl_share_init.html
docs/libcurl/curl_share_init.pdf
docs/libcurl/curl_share_setopt.3
docs/libcurl/curl_share_setopt.html
docs/libcurl/curl_share_setopt.pdf
docs/libcurl/curl_share_strerror.3
docs/libcurl/curl_share_strerror.html
docs/libcurl/curl_share_strerror.pdf
docs/libcurl/curl_slist_append.3
docs/libcurl/curl_slist_append.html
docs/libcurl/curl_slist_append.pdf
docs/libcurl/curl_slist_free_all.3
docs/libcurl/curl_slist_free_all.html
docs/libcurl/curl_slist_free_all.pdf
docs/libcurl/curl_strequal.3
docs/libcurl/curl_strequal.html
docs/libcurl/curl_strequal.pdf
docs/libcurl/curl_unescape.3
docs/libcurl/curl_unescape.html
docs/libcurl/curl_unescape.pdf
docs/libcurl/curl_version.3
docs/libcurl/curl_version.html
docs/libcurl/curl_version.pdf
docs/libcurl/curl_version_info.3
docs/libcurl/curl_version_info.html
docs/libcurl/curl_version_info.pdf
docs/libcurl/index.html
docs/libcurl/libcurl-easy.3
docs/libcurl/libcurl-easy.html
docs/libcurl/libcurl-easy.pdf
docs/libcurl/libcurl-errors.3
docs/libcurl/libcurl-errors.html
docs/libcurl/libcurl-errors.pdf
docs/libcurl/libcurl-multi.3
docs/libcurl/libcurl-multi.html
docs/libcurl/libcurl-multi.pdf
docs/libcurl/libcurl-share.3
docs/libcurl/libcurl-share.html
docs/libcurl/libcurl-share.pdf
docs/libcurl/libcurl-tutorial.3
docs/libcurl/libcurl-tutorial.html
docs/libcurl/libcurl-tutorial.pdf
docs/libcurl/libcurl.3
docs/libcurl/libcurl.html
docs/libcurl/libcurl.m4
docs/libcurl/libcurl.pdf
docs/libcurl/symbols-in-versions
docs/libcurl/symbols.pl [new file with mode: 0755]
docs/mk-ca-bundle.html [new file with mode: 0644]
docs/mk-ca-bundle.pdf [new file with mode: 0644]
include/Makefile.in
include/README
include/curl/Makefile.am
include/curl/Makefile.in
include/curl/curl.h
include/curl/curlbuild.h
include/curl/curlbuild.h.in
include/curl/curlrules.h
include/curl/curlver.h
include/curl/easy.h
include/curl/mprintf.h
include/curl/multi.h
include/curl/typecheck-gcc.h
include/curl/types.h [deleted file]
install-sh
lib/CMakeLists.txt
lib/Makefile.Watcom
lib/Makefile.am
lib/Makefile.am.orig [deleted file]
lib/Makefile.b32
lib/Makefile.in
lib/Makefile.inc
lib/Makefile.m32
lib/Makefile.netware
lib/Makefile.vc10
lib/Makefile.vc6
lib/Makefile.vc8
lib/Makefile.vc9
lib/Makefile.vxworks
lib/README.encoding
lib/README.hostip
lib/README.pipelining
lib/amigaos.c
lib/amigaos.h
lib/arpa_telnet.h
lib/asyn-ares.c [new file with mode: 0644]
lib/asyn-thread.c [moved from lib/hostthre.c with 63% similarity]
lib/asyn.h [new file with mode: 0644]
lib/axtls.c [new file with mode: 0644]
lib/axtls.h [new file with mode: 0644]
lib/base64.c
lib/bundles.c [new file with mode: 0644]
lib/bundles.h [new file with mode: 0644]
lib/checksrc.pl [new file with mode: 0755]
lib/config-amigaos.h
lib/config-dos.h
lib/config-mac.h
lib/config-os400.h
lib/config-riscos.h
lib/config-symbian.h
lib/config-tpf.h
lib/config-vms.h [deleted file]
lib/config-vxworks.h
lib/config-win32.h
lib/config-win32ce.h
lib/conncache.c [new file with mode: 0644]
lib/conncache.h [new file with mode: 0644]
lib/connect.c
lib/connect.h
lib/content_encoding.c
lib/content_encoding.h
lib/cookie.c
lib/cookie.h
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/curl_base64.h
lib/curl_config.h.cmake
lib/curl_config.h.in
lib/curl_darwinssl.c [new file with mode: 0644]
lib/curl_darwinssl.h [new file with mode: 0644]
lib/curl_fnmatch.c
lib/curl_gethostname.c
lib/curl_gethostname.h
lib/curl_gssapi.c [new file with mode: 0644]
lib/curl_gssapi.h [new file with mode: 0644]
lib/curl_ldap.h
lib/curl_md4.h
lib/curl_md5.h
lib/curl_memory.h
lib/curl_memrchr.c
lib/curl_memrchr.h
lib/curl_multibyte.c [new file with mode: 0644]
lib/curl_multibyte.h [new file with mode: 0644]
lib/curl_ntlm.c [new file with mode: 0644]
lib/curl_ntlm.h [new file with mode: 0644]
lib/curl_ntlm_core.c [new file with mode: 0644]
lib/curl_ntlm_core.h [new file with mode: 0644]
lib/curl_ntlm_msgs.c [new file with mode: 0644]
lib/curl_ntlm_msgs.h [moved from lib/http_ntlm.h with 73% similarity]
lib/curl_ntlm_wb.c [new file with mode: 0644]
lib/curl_ntlm_wb.h [new file with mode: 0644]
lib/curl_rand.c [deleted file]
lib/curl_rtmp.c
lib/curl_sasl.c [new file with mode: 0644]
lib/curl_sasl.h [new file with mode: 0644]
lib/curl_schannel.c [new file with mode: 0644]
lib/curl_schannel.h [new file with mode: 0644]
lib/curl_setup.h [moved from lib/setup.h with 77% similarity]
lib/curl_setup_once.h [moved from lib/setup_once.h with 87% similarity]
lib/curl_sspi.c
lib/curl_sspi.h
lib/curl_threads.c
lib/curl_threads.h
lib/curlx.h
lib/cyassl.c [new file with mode: 0644]
lib/cyassl.h [new file with mode: 0644]
lib/dict.c
lib/dotdot.c [new file with mode: 0644]
lib/dotdot.h [moved from src/xattr.h with 85% similarity]
lib/easy.c
lib/easyif.h
lib/escape.c
lib/escape.h
lib/file.c
lib/file.h
lib/fileinfo.c
lib/formdata.c
lib/ftp.c
lib/ftp.h
lib/ftplistparser.c
lib/ftplistparser.h
lib/getenv.c
lib/getinfo.c
lib/gopher.c
lib/gskit.c [new file with mode: 0644]
lib/gskit.h [new file with mode: 0644]
lib/gtls.c
lib/gtls.h
lib/hash.c
lib/hash.h
lib/hmac.c
lib/hostares.c [deleted file]
lib/hostasyn.c
lib/hostcheck.c [new file with mode: 0644]
lib/hostcheck.h [new file with mode: 0644]
lib/hostip.c
lib/hostip.h
lib/hostip4.c
lib/hostip6.c
lib/hostsyn.c
lib/http.c
lib/http.h
lib/http_chunks.c
lib/http_chunks.h
lib/http_digest.c
lib/http_digest.h
lib/http_negotiate.c
lib/http_negotiate.h
lib/http_negotiate_sspi.c [new file with mode: 0644]
lib/http_ntlm.c [deleted file]
lib/http_proxy.c [new file with mode: 0644]
lib/http_proxy.h [new file with mode: 0644]
lib/idn_win32.c [new file with mode: 0644]
lib/if2ip.c
lib/if2ip.h
lib/imap.c
lib/imap.h
lib/inet_ntop.c
lib/inet_ntop.h
lib/inet_pton.c
lib/inet_pton.h
lib/krb4.c
lib/krb4.h
lib/krb5.c
lib/ldap.c
lib/libcurl.imp [deleted file]
lib/libcurl.plist
lib/libcurl.vcproj [deleted file]
lib/libcurl.vers.in
lib/llist.c
lib/llist.h
lib/makefile.amiga
lib/makefile.dj
lib/md4.c
lib/md5.c
lib/memdebug.c
lib/memdebug.h
lib/mk-ca-bundle.pl
lib/mk-ca-bundle.vbs
lib/mprintf.c
lib/msvcproj.head [deleted file]
lib/multi.c
lib/multihandle.h [new file with mode: 0644]
lib/multiif.h
lib/netrc.c
lib/netrc.h
lib/non-ascii.c [new file with mode: 0644]
lib/non-ascii.h [new file with mode: 0644]
lib/nonblock.c
lib/nonblock.h
lib/nss.c
lib/nssg.h
lib/nwlib.c
lib/nwos.c
lib/objnames-test08.sh [new file with mode: 0755]
lib/objnames-test10.sh [new file with mode: 0755]
lib/objnames.inc [new file with mode: 0644]
lib/openldap.c
lib/parsedate.c
lib/parsedate.h
lib/pingpong.c
lib/pingpong.h
lib/pipeline.c [new file with mode: 0644]
lib/pipeline.h [new file with mode: 0644]
lib/polarssl.c
lib/polarssl.h
lib/polarssl_threadlock.c [new file with mode: 0644]
lib/polarssl_threadlock.h [new file with mode: 0644]
lib/pop3.c
lib/pop3.h
lib/progress.c
lib/progress.h
lib/qssl.c
lib/qssl.h
lib/rawstr.c
lib/rawstr.h
lib/rtsp.c
lib/rtsp.h
lib/security.c
lib/select.c
lib/select.h
lib/sendf.c
lib/sendf.h
lib/setup-os400.h
lib/setup-vms.h [new file with mode: 0644]
lib/share.c
lib/share.h
lib/slist.c
lib/slist.h
lib/smtp.c
lib/smtp.h
lib/sockaddr.h
lib/socks.c
lib/socks.h
lib/socks_gssapi.c
lib/socks_sspi.c
lib/speedcheck.c
lib/speedcheck.h
lib/splay.c
lib/splay.h
lib/ssh.c
lib/ssh.h
lib/sslgen.c
lib/sslgen.h
lib/ssluse.c
lib/ssluse.h
lib/strdup.c
lib/strdup.h
lib/strequal.c
lib/strequal.h
lib/strerror.c
lib/strerror.h
lib/strtok.c
lib/strtok.h
lib/strtoofft.c
lib/strtoofft.h
lib/telnet.c
lib/telnet.h
lib/tftp.c
lib/tftp.h
lib/timeval.c
lib/timeval.h
lib/transfer.c
lib/transfer.h
lib/url.c
lib/url.h
lib/urldata.h
lib/vc6libcurl.dsp [deleted file]
lib/version.c
lib/warnless.c
lib/warnless.h
lib/wildcard.c
lib/wildcard.h
lib/x509asn1.c [new file with mode: 0644]
lib/x509asn1.h [new file with mode: 0644]
libcurl.pc.in
ltmain.sh [changed mode: 0755->0644]
m4/curl-compilers.m4
m4/curl-confopts.m4
m4/curl-functions.m4
m4/curl-openssl.m4 [new file with mode: 0644]
m4/curl-override.m4
m4/curl-reentrant.m4
m4/curl-system.m4 [deleted file]
m4/libtool.m4
m4/ltoptions.m4
m4/ltversion.m4
m4/lt~obsolete.m4
m4/xc-am-iface.m4 [new file with mode: 0644]
m4/xc-cc-check.m4 [new file with mode: 0644]
m4/xc-lt-iface.m4 [new file with mode: 0644]
m4/xc-translit.m4 [new file with mode: 0644]
m4/xc-val-flgs.m4 [new file with mode: 0644]
m4/zz40-xc-ovr.m4 [new file with mode: 0644]
m4/zz50-xc-ovr.m4 [new file with mode: 0644]
m4/zz60-xc-ovr.m4 [new file with mode: 0644]
maketgz
mkinstalldirs [changed mode: 0644->0755]
packages/AIX/Makefile.in
packages/AIX/RPM/Makefile.in
packages/AIX/RPM/curl.spec.in
packages/Android/Android.mk [moved from Android.mk with 90% similarity]
packages/DOS/common.dj
packages/EPM/Makefile.in
packages/EPM/curl.list.in
packages/Linux/Makefile.in
packages/Linux/RPM/Makefile.in
packages/Linux/RPM/curl-ssl.spec.in
packages/Makefile.am
packages/Makefile.in
packages/NetWare/get_exp.awk [new file with mode: 0644]
packages/NetWare/get_ver.awk
packages/OS400/README.OS400
packages/OS400/ccsidcurl.c
packages/OS400/ccsidcurl.h
packages/OS400/curl.inc.in
packages/OS400/initscript.sh
packages/OS400/make-lib.sh
packages/OS400/makefile.sh
packages/OS400/os400sys.c
packages/OS400/os400sys.h
packages/Solaris/Makefile.in
packages/Symbian/bwins/libcurlu.def
packages/Symbian/eabi/libcurlu.def
packages/Symbian/group/curl.mmp
packages/Symbian/group/libcurl.mmp
packages/Win32/Makefile.in
packages/Win32/cygwin/Makefile.in
packages/vms/Makefile.am
packages/vms/Makefile.in
packages/vms/backup_gnv_curl_src.com [new file with mode: 0644]
packages/vms/build_curl-config_script.com [new file with mode: 0644]
packages/vms/build_gnv_curl.com [new file with mode: 0644]
packages/vms/build_gnv_curl_pcsi_desc.com [new file with mode: 0644]
packages/vms/build_gnv_curl_pcsi_text.com [new file with mode: 0644]
packages/vms/build_gnv_curl_release_notes.com [new file with mode: 0644]
packages/vms/build_libcurl_pc.com [new file with mode: 0644]
packages/vms/build_vms.com
packages/vms/clean_gnv_curl.com [new file with mode: 0644]
packages/vms/compare_curl_source.com [new file with mode: 0644]
packages/vms/config_h.com [new file with mode: 0644]
packages/vms/curl_crtl_init.c [new file with mode: 0644]
packages/vms/curl_gnv_build_steps.txt [new file with mode: 0644]
packages/vms/curl_release_note_start.txt [new file with mode: 0644]
packages/vms/curl_startup.com [new file with mode: 0644]
packages/vms/curlmsg.h
packages/vms/curlmsg_vms.h
packages/vms/generate_config_vms_h_curl.com [new file with mode: 0644]
packages/vms/generate_vax_transfer.com [new file with mode: 0644]
packages/vms/gnv_conftest.c_first [new file with mode: 0644]
packages/vms/gnv_curl_configure.sh [new file with mode: 0644]
packages/vms/gnv_libcurl_symbols.opt [new file with mode: 0644]
packages/vms/gnv_link_curl.com [new file with mode: 0644]
packages/vms/hpssl_alpha.opt [deleted file]
packages/vms/hpssl_ia64.opt [deleted file]
packages/vms/hpssl_vax.opt [deleted file]
packages/vms/ldap.opt [deleted file]
packages/vms/macro32_exactcase.patch [new file with mode: 0644]
packages/vms/make_gnv_curl_install.sh [new file with mode: 0644]
packages/vms/make_pcsi_curl_kit_name.com [new file with mode: 0644]
packages/vms/openssl_alpha.opt [deleted file]
packages/vms/openssl_ia64.opt [deleted file]
packages/vms/openssl_ssl_alpha.opt [deleted file]
packages/vms/openssl_ssl_ia64.opt [deleted file]
packages/vms/openssl_ssl_vax.opt [deleted file]
packages/vms/openssl_vax.opt [deleted file]
packages/vms/pcsi_gnv_curl_file_list.txt [new file with mode: 0644]
packages/vms/pcsi_product_gnv_curl.com [new file with mode: 0644]
packages/vms/readme
packages/vms/report_openssl_version.c [new file with mode: 0644]
packages/vms/setup_gnv_curl_build.com [new file with mode: 0644]
packages/vms/stage_curl_install.com [new file with mode: 0644]
packages/vms/vms_eco_level.h [new file with mode: 0644]
sample.emacs [deleted file]
src/CMakeLists.txt
src/Makefile.Watcom
src/Makefile.am
src/Makefile.b32
src/Makefile.in
src/Makefile.inc
src/Makefile.m32
src/Makefile.netware
src/Makefile.vc10
src/Makefile.vc6
src/Makefile.vc8
src/Makefile.vc9
src/config-amigaos.h [deleted file]
src/config-mac.h [deleted file]
src/config-riscos.h [deleted file]
src/config-win32.h [deleted file]
src/curl.rc
src/curl_config.h.in [deleted file]
src/hugehelp.c [deleted file]
src/macos/MACINSTALL.TXT
src/main.c [deleted file]
src/makefile.amiga
src/makefile.dj
src/mkhelp.pl
src/setup.h [deleted file]
src/tool_binmode.c [new file with mode: 0644]
src/tool_binmode.h [new file with mode: 0644]
src/tool_bname.c [new file with mode: 0644]
src/tool_bname.h [new file with mode: 0644]
src/tool_cb_dbg.c [new file with mode: 0644]
src/tool_cb_dbg.h [new file with mode: 0644]
src/tool_cb_hdr.c [new file with mode: 0644]
src/tool_cb_hdr.h [new file with mode: 0644]
src/tool_cb_prg.c [new file with mode: 0644]
src/tool_cb_prg.h [new file with mode: 0644]
src/tool_cb_rea.c [new file with mode: 0644]
src/tool_cb_rea.h [new file with mode: 0644]
src/tool_cb_see.c [new file with mode: 0644]
src/tool_cb_see.h [new file with mode: 0644]
src/tool_cb_wrt.c [new file with mode: 0644]
src/tool_cb_wrt.h [new file with mode: 0644]
src/tool_cfgable.c [new file with mode: 0644]
src/tool_cfgable.h [new file with mode: 0644]
src/tool_convert.c [new file with mode: 0644]
src/tool_convert.h [new file with mode: 0644]
src/tool_dirhie.c [new file with mode: 0644]
src/tool_dirhie.h [new file with mode: 0644]
src/tool_doswin.c [new file with mode: 0644]
src/tool_doswin.h [new file with mode: 0644]
src/tool_easysrc.c [new file with mode: 0644]
src/tool_easysrc.h [new file with mode: 0644]
src/tool_formparse.c [new file with mode: 0644]
src/tool_formparse.h [new file with mode: 0644]
src/tool_getparam.c [new file with mode: 0644]
src/tool_getparam.h [new file with mode: 0644]
src/tool_getpass.c [moved from src/getpass.c with 72% similarity]
src/tool_getpass.h [moved from src/getpass.h with 81% similarity]
src/tool_help.c [new file with mode: 0644]
src/tool_help.h [moved from lib/curl_rand.h with 82% similarity]
src/tool_helpers.c [new file with mode: 0644]
src/tool_helpers.h [new file with mode: 0644]
src/tool_homedir.c [moved from src/homedir.c with 71% similarity]
src/tool_homedir.h [moved from src/homedir.h with 83% similarity]
src/tool_hugehelp.c [new file with mode: 0644]
src/tool_hugehelp.h [moved from src/hugehelp.h with 82% similarity]
src/tool_libinfo.c [new file with mode: 0644]
src/tool_libinfo.h [new file with mode: 0644]
src/tool_main.c [new file with mode: 0644]
src/tool_main.h [new file with mode: 0644]
src/tool_metalink.c [new file with mode: 0644]
src/tool_metalink.h [new file with mode: 0644]
src/tool_mfiles.c [new file with mode: 0644]
src/tool_mfiles.h [new file with mode: 0644]
src/tool_msgs.c [new file with mode: 0644]
src/tool_msgs.h [new file with mode: 0644]
src/tool_operate.c [new file with mode: 0644]
src/tool_operate.h [new file with mode: 0644]
src/tool_operhlp.c [new file with mode: 0644]
src/tool_operhlp.h [new file with mode: 0644]
src/tool_panykey.c [new file with mode: 0644]
src/tool_panykey.h [new file with mode: 0644]
src/tool_paramhlp.c [new file with mode: 0644]
src/tool_paramhlp.h [new file with mode: 0644]
src/tool_parsecfg.c [new file with mode: 0644]
src/tool_parsecfg.h [new file with mode: 0644]
src/tool_sdecls.h [new file with mode: 0644]
src/tool_setopt.c [new file with mode: 0644]
src/tool_setopt.h [new file with mode: 0644]
src/tool_setup.h [new file with mode: 0644]
src/tool_sleep.c [new file with mode: 0644]
src/tool_sleep.h [moved from src/writeout.h with 81% similarity]
src/tool_urlglob.c [moved from src/urlglob.c with 61% similarity]
src/tool_urlglob.h [moved from src/urlglob.h with 75% similarity]
src/tool_util.c [moved from src/curlutil.c with 81% similarity]
src/tool_util.h [moved from src/curlutil.h with 65% similarity]
src/tool_version.h [new file with mode: 0644]
src/tool_vms.c [moved from src/os-specific.c with 95% similarity]
src/tool_vms.h [moved from src/os-specific.h with 76% similarity]
src/tool_writeenv.c [moved from src/writeenv.c with 86% similarity]
src/tool_writeenv.h [new file with mode: 0644]
src/tool_writeout.c [moved from src/writeout.c with 80% similarity]
src/tool_writeout.h [new file with mode: 0644]
src/tool_xattr.c [moved from src/xattr.c with 74% similarity]
src/tool_xattr.h [moved from src/writeenv.h with 80% similarity]
src/vc6curlsrc.dsp [deleted file]
src/version.h
tests/FILEFORMAT
tests/Makefile.am
tests/Makefile.in
tests/README
tests/certs/Makefile.am [new file with mode: 0644]
tests/certs/Makefile.in [new file with mode: 0644]
tests/certs/scripts/Makefile.am [new file with mode: 0644]
tests/certs/scripts/Makefile.in [new file with mode: 0644]
tests/certs/srp-verifier-conf [new file with mode: 0644]
tests/certs/srp-verifier-db [new file with mode: 0644]
tests/data/DISABLED
tests/data/Makefile.am
tests/data/Makefile.in
tests/data/test1008
tests/data/test1011
tests/data/test1012
tests/data/test1015
tests/data/test1021
tests/data/test1059
tests/data/test106
tests/data/test1060
tests/data/test1061
tests/data/test1078
tests/data/test1097
tests/data/test1105
tests/data/test1120
tests/data/test1121 [new file with mode: 0644]
tests/data/test1122 [new file with mode: 0644]
tests/data/test1123 [new file with mode: 0644]
tests/data/test1124 [new file with mode: 0644]
tests/data/test1125 [new file with mode: 0644]
tests/data/test1126 [new file with mode: 0644]
tests/data/test1127 [new file with mode: 0644]
tests/data/test1128 [new file with mode: 0644]
tests/data/test1129 [new file with mode: 0644]
tests/data/test1130 [new file with mode: 0644]
tests/data/test1131 [new file with mode: 0644]
tests/data/test1132 [new file with mode: 0644]
tests/data/test1133 [new file with mode: 0644]
tests/data/test116
tests/data/test1204 [new file with mode: 0644]
tests/data/test1205 [new file with mode: 0644]
tests/data/test1206 [new file with mode: 0644]
tests/data/test1207 [new file with mode: 0644]
tests/data/test1208 [new file with mode: 0644]
tests/data/test1209 [new file with mode: 0644]
tests/data/test1210 [new file with mode: 0644]
tests/data/test1211 [new file with mode: 0644]
tests/data/test1212 [new file with mode: 0644]
tests/data/test1213 [new file with mode: 0644]
tests/data/test1214 [new file with mode: 0644]
tests/data/test1215 [new file with mode: 0644]
tests/data/test1216 [new file with mode: 0644]
tests/data/test1217 [new file with mode: 0644]
tests/data/test1218 [new file with mode: 0644]
tests/data/test1219 [new file with mode: 0644]
tests/data/test1220 [new file with mode: 0644]
tests/data/test1221 [new file with mode: 0644]
tests/data/test1222 [new file with mode: 0644]
tests/data/test1223 [new file with mode: 0644]
tests/data/test1224 [new file with mode: 0644]
tests/data/test1225 [new file with mode: 0644]
tests/data/test1226 [new file with mode: 0644]
tests/data/test1227 [new file with mode: 0644]
tests/data/test1228 [new file with mode: 0644]
tests/data/test1229 [new file with mode: 0644]
tests/data/test1230 [new file with mode: 0644]
tests/data/test1231 [new file with mode: 0644]
tests/data/test1232 [new file with mode: 0644]
tests/data/test1233 [new file with mode: 0644]
tests/data/test13
tests/data/test130
tests/data/test1300 [new file with mode: 0644]
tests/data/test1301 [new file with mode: 0644]
tests/data/test1302 [new file with mode: 0644]
tests/data/test1303 [new file with mode: 0644]
tests/data/test1304 [new file with mode: 0644]
tests/data/test1305 [new file with mode: 0644]
tests/data/test1306 [new file with mode: 0644]
tests/data/test1307 [new file with mode: 0644]
tests/data/test1308 [new file with mode: 0644]
tests/data/test1309 [new file with mode: 0644]
tests/data/test131
tests/data/test1310 [new file with mode: 0644]
tests/data/test1311 [new file with mode: 0644]
tests/data/test1312 [new file with mode: 0644]
tests/data/test1313 [new file with mode: 0644]
tests/data/test1314 [new file with mode: 0644]
tests/data/test1315 [new file with mode: 0644]
tests/data/test1316 [new file with mode: 0644]
tests/data/test1317 [new file with mode: 0644]
tests/data/test1318 [new file with mode: 0644]
tests/data/test1319 [new file with mode: 0644]
tests/data/test132
tests/data/test1320 [new file with mode: 0644]
tests/data/test1321 [new file with mode: 0644]
tests/data/test1322 [new file with mode: 0644]
tests/data/test1323 [new file with mode: 0644]
tests/data/test1324 [new file with mode: 0644]
tests/data/test1325 [new file with mode: 0644]
tests/data/test1326 [new file with mode: 0644]
tests/data/test1327 [new file with mode: 0644]
tests/data/test1328 [new file with mode: 0644]
tests/data/test1329 [new file with mode: 0644]
tests/data/test133
tests/data/test1330 [new file with mode: 0644]
tests/data/test1331 [new file with mode: 0644]
tests/data/test1332 [new file with mode: 0644]
tests/data/test1333 [new file with mode: 0644]
tests/data/test1334 [new file with mode: 0644]
tests/data/test1335 [new file with mode: 0644]
tests/data/test1336 [new file with mode: 0644]
tests/data/test1337 [new file with mode: 0644]
tests/data/test1338 [new file with mode: 0644]
tests/data/test1339 [new file with mode: 0644]
tests/data/test134
tests/data/test1340 [new file with mode: 0644]
tests/data/test1341 [new file with mode: 0644]
tests/data/test1342 [new file with mode: 0644]
tests/data/test1343 [new file with mode: 0644]
tests/data/test1344 [new file with mode: 0644]
tests/data/test1345 [new file with mode: 0644]
tests/data/test1346 [new file with mode: 0644]
tests/data/test1347 [new file with mode: 0644]
tests/data/test1348 [new file with mode: 0644]
tests/data/test1349 [new file with mode: 0644]
tests/data/test1350 [new file with mode: 0644]
tests/data/test1351 [new file with mode: 0644]
tests/data/test1352 [new file with mode: 0644]
tests/data/test1353 [new file with mode: 0644]
tests/data/test1354 [new file with mode: 0644]
tests/data/test1355 [new file with mode: 0644]
tests/data/test1356 [new file with mode: 0644]
tests/data/test1357 [new file with mode: 0644]
tests/data/test1358 [new file with mode: 0644]
tests/data/test1359 [new file with mode: 0644]
tests/data/test1360 [new file with mode: 0644]
tests/data/test1361 [new file with mode: 0644]
tests/data/test1362 [new file with mode: 0644]
tests/data/test1363 [new file with mode: 0644]
tests/data/test1364 [new file with mode: 0644]
tests/data/test1365 [new file with mode: 0644]
tests/data/test1366 [new file with mode: 0644]
tests/data/test1367 [new file with mode: 0644]
tests/data/test1368 [new file with mode: 0644]
tests/data/test1369 [new file with mode: 0644]
tests/data/test1370 [new file with mode: 0644]
tests/data/test1371 [new file with mode: 0644]
tests/data/test1372 [new file with mode: 0644]
tests/data/test1373 [new file with mode: 0644]
tests/data/test1374 [new file with mode: 0644]
tests/data/test1375 [new file with mode: 0644]
tests/data/test1376 [new file with mode: 0644]
tests/data/test1377 [new file with mode: 0644]
tests/data/test1378 [new file with mode: 0644]
tests/data/test1379 [new file with mode: 0644]
tests/data/test1380 [new file with mode: 0644]
tests/data/test1381 [new file with mode: 0644]
tests/data/test1382 [new file with mode: 0644]
tests/data/test1383 [new file with mode: 0644]
tests/data/test1384 [new file with mode: 0644]
tests/data/test1385 [new file with mode: 0644]
tests/data/test1386 [new file with mode: 0644]
tests/data/test1387 [new file with mode: 0644]
tests/data/test1388 [new file with mode: 0644]
tests/data/test1389 [new file with mode: 0644]
tests/data/test1390 [new file with mode: 0644]
tests/data/test1391 [new file with mode: 0644]
tests/data/test1392 [new file with mode: 0644]
tests/data/test1393 [new file with mode: 0644]
tests/data/test1394 [new file with mode: 0644]
tests/data/test1395 [new file with mode: 0644]
tests/data/test1396 [new file with mode: 0644]
tests/data/test1400 [new file with mode: 0644]
tests/data/test1401 [new file with mode: 0644]
tests/data/test1402 [new file with mode: 0644]
tests/data/test1403 [new file with mode: 0644]
tests/data/test1404 [new file with mode: 0644]
tests/data/test1405 [new file with mode: 0644]
tests/data/test1406 [new file with mode: 0644]
tests/data/test1407 [new file with mode: 0644]
tests/data/test1408 [new file with mode: 0644]
tests/data/test1409 [new file with mode: 0644]
tests/data/test1410 [new file with mode: 0644]
tests/data/test1412 [new file with mode: 0644]
tests/data/test1413 [new file with mode: 0644]
tests/data/test1414 [new file with mode: 0644]
tests/data/test147
tests/data/test148
tests/data/test149
tests/data/test1500 [new file with mode: 0644]
tests/data/test1501 [new file with mode: 0644]
tests/data/test1502 [new file with mode: 0644]
tests/data/test1503 [new file with mode: 0644]
tests/data/test1504 [new file with mode: 0644]
tests/data/test1505 [new file with mode: 0644]
tests/data/test1506 [new file with mode: 0644]
tests/data/test1507 [new file with mode: 0644]
tests/data/test1508 [new file with mode: 0644]
tests/data/test1509 [new file with mode: 0644]
tests/data/test151
tests/data/test1510 [new file with mode: 0644]
tests/data/test1511 [new file with mode: 0644]
tests/data/test1512 [new file with mode: 0644]
tests/data/test152
tests/data/test155
tests/data/test156
tests/data/test157
tests/data/test158
tests/data/test159
tests/data/test160
tests/data/test161
tests/data/test163
tests/data/test164
tests/data/test166
tests/data/test171
tests/data/test172
tests/data/test174
tests/data/test175
tests/data/test176
tests/data/test178
tests/data/test18
tests/data/test180
tests/data/test181
tests/data/test182
tests/data/test186
tests/data/test189
tests/data/test190
tests/data/test1900 [new file with mode: 0644]
tests/data/test1901 [new file with mode: 0644]
tests/data/test1902 [new file with mode: 0644]
tests/data/test1903 [new file with mode: 0644]
tests/data/test191
tests/data/test192
tests/data/test194
tests/data/test195
tests/data/test196
tests/data/test197
tests/data/test198
tests/data/test199
tests/data/test2005 [new file with mode: 0644]
tests/data/test2006 [new file with mode: 0644]
tests/data/test2007 [new file with mode: 0644]
tests/data/test2008 [new file with mode: 0644]
tests/data/test2009 [new file with mode: 0644]
tests/data/test201
tests/data/test2010 [new file with mode: 0644]
tests/data/test2011 [new file with mode: 0644]
tests/data/test2012 [new file with mode: 0644]
tests/data/test2013 [new file with mode: 0644]
tests/data/test2014 [new file with mode: 0644]
tests/data/test2015 [new file with mode: 0644]
tests/data/test2016 [new file with mode: 0644]
tests/data/test2017 [new file with mode: 0644]
tests/data/test2018 [new file with mode: 0644]
tests/data/test2019 [new file with mode: 0644]
tests/data/test202
tests/data/test2020 [new file with mode: 0644]
tests/data/test2021 [new file with mode: 0644]
tests/data/test2022 [new file with mode: 0644]
tests/data/test2023 [new file with mode: 0644]
tests/data/test2024 [new file with mode: 0644]
tests/data/test2025 [new file with mode: 0644]
tests/data/test2026 [new file with mode: 0644]
tests/data/test2027 [new file with mode: 0644]
tests/data/test2028 [new file with mode: 0644]
tests/data/test2029 [new file with mode: 0644]
tests/data/test203
tests/data/test2030 [new file with mode: 0644]
tests/data/test2031 [new file with mode: 0644]
tests/data/test2032 [new file with mode: 0644]
tests/data/test2033 [new file with mode: 0644]
tests/data/test204
tests/data/test205
tests/data/test206
tests/data/test207
tests/data/test209
tests/data/test210
tests/data/test211
tests/data/test212
tests/data/test213
tests/data/test214
tests/data/test215
tests/data/test216
tests/data/test217
tests/data/test218
tests/data/test22
tests/data/test231
tests/data/test235
tests/data/test236
tests/data/test237
tests/data/test238
tests/data/test24
tests/data/test247
tests/data/test248
tests/data/test249
tests/data/test250
tests/data/test251
tests/data/test257
tests/data/test265
tests/data/test273
tests/data/test275
tests/data/test277
tests/data/test287
tests/data/test288
tests/data/test302
tests/data/test31
tests/data/test320 [new file with mode: 0644]
tests/data/test321 [new file with mode: 0644]
tests/data/test322 [new file with mode: 0644]
tests/data/test323 [new file with mode: 0644]
tests/data/test324 [new file with mode: 0644]
tests/data/test39
tests/data/test4
tests/data/test40
tests/data/test42
tests/data/test46
tests/data/test48
tests/data/test5
tests/data/test503
tests/data/test504
tests/data/test505
tests/data/test506
tests/data/test509 [new file with mode: 0644]
tests/data/test510
tests/data/test511
tests/data/test512
tests/data/test513
tests/data/test514
tests/data/test515
tests/data/test516
tests/data/test517
tests/data/test518
tests/data/test519
tests/data/test520
tests/data/test523
tests/data/test53
tests/data/test530
tests/data/test536
tests/data/test537
tests/data/test538
tests/data/test539
tests/data/test540
tests/data/test541
tests/data/test543
tests/data/test544
tests/data/test545
tests/data/test547
tests/data/test548
tests/data/test549
tests/data/test550
tests/data/test551
tests/data/test552
tests/data/test554
tests/data/test555
tests/data/test558
tests/data/test559 [deleted file]
tests/data/test561
tests/data/test564
tests/data/test565
tests/data/test568
tests/data/test569
tests/data/test571
tests/data/test572
tests/data/test573
tests/data/test577 [deleted file]
tests/data/test580 [new file with mode: 0644]
tests/data/test581 [new file with mode: 0644]
tests/data/test582 [new file with mode: 0644]
tests/data/test583 [new file with mode: 0644]
tests/data/test584 [new file with mode: 0644]
tests/data/test585 [new file with mode: 0644]
tests/data/test586 [new file with mode: 0644]
tests/data/test587 [new file with mode: 0644]
tests/data/test588 [new file with mode: 0644]
tests/data/test590 [new file with mode: 0644]
tests/data/test591 [new file with mode: 0644]
tests/data/test592 [new file with mode: 0644]
tests/data/test593 [new file with mode: 0644]
tests/data/test594 [new file with mode: 0644]
tests/data/test595 [new file with mode: 0644]
tests/data/test596 [new file with mode: 0644]
tests/data/test597 [new file with mode: 0644]
tests/data/test598 [new file with mode: 0644]
tests/data/test599 [new file with mode: 0644]
tests/data/test61
tests/data/test62
tests/data/test638 [new file with mode: 0644]
tests/data/test639 [new file with mode: 0644]
tests/data/test708 [new file with mode: 0644]
tests/data/test709 [new file with mode: 0644]
tests/data/test710 [new file with mode: 0644]
tests/data/test711 [new file with mode: 0644]
tests/data/test712 [new file with mode: 0644]
tests/data/test73
tests/data/test8
tests/data/test80
tests/data/test800
tests/data/test801
tests/data/test802
tests/data/test803
tests/data/test804
tests/data/test805
tests/data/test806
tests/data/test807
tests/data/test808 [new file with mode: 0644]
tests/data/test809 [new file with mode: 0644]
tests/data/test83
tests/data/test850 [new file with mode: 0644]
tests/data/test851 [new file with mode: 0644]
tests/data/test852 [new file with mode: 0644]
tests/data/test853 [new file with mode: 0644]
tests/data/test854 [new file with mode: 0644]
tests/data/test855 [new file with mode: 0644]
tests/data/test856 [new file with mode: 0644]
tests/data/test857 [new file with mode: 0644]
tests/data/test900 [new file with mode: 0644]
tests/data/test901 [new file with mode: 0644]
tests/data/test902 [new file with mode: 0644]
tests/data/test903 [new file with mode: 0644]
tests/data/test904 [new file with mode: 0644]
tests/data/test905 [new file with mode: 0644]
tests/data/test906 [new file with mode: 0644]
tests/data/test907 [new file with mode: 0644]
tests/data/test908 [new file with mode: 0644]
tests/data/test909 [new file with mode: 0644]
tests/data/test910 [new file with mode: 0644]
tests/data/test911 [new file with mode: 0644]
tests/data/test92
tests/data/test94
tests/data/test95
tests/data/test96 [new file with mode: 0644]
tests/directories.pm
tests/ftp.pm
tests/ftpserver.pl
tests/getpart.pm
tests/http_pipe.py [new file with mode: 0755]
tests/httpserver.pl
tests/libtest/Makefile.am
tests/libtest/Makefile.in
tests/libtest/Makefile.inc
tests/libtest/chkhostname.c
tests/libtest/first.c
tests/libtest/lib1500.c [new file with mode: 0644]
tests/libtest/lib1501.c [new file with mode: 0644]
tests/libtest/lib1502.c [new file with mode: 0644]
tests/libtest/lib1506.c [new file with mode: 0644]
tests/libtest/lib1507.c [new file with mode: 0644]
tests/libtest/lib1508.c [new file with mode: 0644]
tests/libtest/lib1509.c [new file with mode: 0644]
tests/libtest/lib1510.c [new file with mode: 0644]
tests/libtest/lib1511.c [new file with mode: 0644]
tests/libtest/lib1512.c [new file with mode: 0644]
tests/libtest/lib1900.c [new file with mode: 0644]
tests/libtest/lib500.c
tests/libtest/lib501.c
tests/libtest/lib502.c
tests/libtest/lib503.c
tests/libtest/lib504.c
tests/libtest/lib505.c
tests/libtest/lib506.c
tests/libtest/lib507.c
tests/libtest/lib508.c
tests/libtest/lib509.c [new file with mode: 0644]
tests/libtest/lib510.c
tests/libtest/lib511.c
tests/libtest/lib512.c
tests/libtest/lib513.c
tests/libtest/lib514.c
tests/libtest/lib515.c
tests/libtest/lib516.c
tests/libtest/lib517.c
tests/libtest/lib518.c
tests/libtest/lib519.c
tests/libtest/lib520.c
tests/libtest/lib521.c
tests/libtest/lib523.c
tests/libtest/lib524.c
tests/libtest/lib525.c
tests/libtest/lib526.c
tests/libtest/lib530.c
tests/libtest/lib533.c
tests/libtest/lib536.c
tests/libtest/lib537.c
tests/libtest/lib539.c
tests/libtest/lib540.c
tests/libtest/lib541.c
tests/libtest/lib542.c
tests/libtest/lib543.c
tests/libtest/lib544.c
tests/libtest/lib547.c
tests/libtest/lib549.c
tests/libtest/lib552.c
tests/libtest/lib553.c
tests/libtest/lib554.c
tests/libtest/lib555.c
tests/libtest/lib556.c
tests/libtest/lib557.c
tests/libtest/lib558.c
tests/libtest/lib560.c
tests/libtest/lib562.c
tests/libtest/lib564.c
tests/libtest/lib566.c
tests/libtest/lib567.c
tests/libtest/lib568.c
tests/libtest/lib569.c
tests/libtest/lib570.c
tests/libtest/lib571.c
tests/libtest/lib572.c
tests/libtest/lib573.c
tests/libtest/lib574.c
tests/libtest/lib575.c
tests/libtest/lib576.c
tests/libtest/lib578.c
tests/libtest/lib579.c
tests/libtest/lib582.c [new file with mode: 0644]
tests/libtest/lib583.c [new file with mode: 0644]
tests/libtest/lib586.c [new file with mode: 0644]
tests/libtest/lib590.c [new file with mode: 0644]
tests/libtest/lib591.c [new file with mode: 0644]
tests/libtest/lib597.c [new file with mode: 0644]
tests/libtest/lib598.c [new file with mode: 0644]
tests/libtest/lib599.c [new file with mode: 0644]
tests/libtest/libauthretry.c [new file with mode: 0644]
tests/libtest/libntlmconnect.c [new file with mode: 0644]
tests/libtest/notexists.pl [new file with mode: 0755]
tests/libtest/sethostname.c
tests/libtest/sethostname.h
tests/libtest/test.h
tests/libtest/test1013.pl
tests/libtest/test1022.pl
tests/libtest/testtrace.c [new file with mode: 0644]
tests/libtest/testtrace.h [new file with mode: 0644]
tests/libtest/testutil.c
tests/libtest/testutil.h
tests/mem-include-scan.pl [new file with mode: 0644]
tests/memanalyze.pl
tests/rtspserver.pl
tests/runtests.html
tests/runtests.pdf
tests/runtests.pl
tests/runtests.pl.orig [deleted file]
tests/secureserver.pl
tests/server/Makefile.am
tests/server/Makefile.in
tests/server/Makefile.inc
tests/server/base64.pl [new file with mode: 0644]
tests/server/fake_ntlm.c [new file with mode: 0644]
tests/server/getpart.c
tests/server/getpart.h
tests/server/resolve.c
tests/server/rtspd.c
tests/server/server_setup.h [new file with mode: 0644]
tests/server/server_sockaddr.h
tests/server/sockfilt.c
tests/server/sws.c
tests/server/testpart.c
tests/server/tftp.h
tests/server/tftpd.c
tests/server/util.c
tests/server/util.h
tests/serverhelp.pm
tests/sshhelp.pm
tests/sshserver.pl
tests/stunnel.pem
tests/symbol-scan.pl
tests/testcurl.1
tests/testcurl.html
tests/testcurl.pdf
tests/testcurl.pl
tests/tftpserver.pl
tests/unit/Makefile.am [new file with mode: 0644]
tests/unit/Makefile.in [new file with mode: 0644]
tests/unit/Makefile.inc [new file with mode: 0644]
tests/unit/README [new file with mode: 0644]
tests/unit/curlcheck.h [new file with mode: 0644]
tests/unit/unit1300.c [new file with mode: 0644]
tests/unit/unit1301.c [new file with mode: 0644]
tests/unit/unit1302.c [new file with mode: 0644]
tests/unit/unit1303.c [new file with mode: 0644]
tests/unit/unit1304.c [new file with mode: 0644]
tests/unit/unit1305.c [new file with mode: 0644]
tests/unit/unit1307.c [moved from tests/libtest/lib577.c with 92% similarity]
tests/unit/unit1308.c [new file with mode: 0644]
tests/unit/unit1309.c [new file with mode: 0644]
tests/unit/unit1330.c [new file with mode: 0644]
tests/unit/unit1394.c [new file with mode: 0644]
tests/unit/unit1395.c [new file with mode: 0644]
tests/unit/unit1396.c [new file with mode: 0644]
tests/valgrind.pm
tests/valgrind.supp [new file with mode: 0644]
vs/t/README [new file with mode: 0644]
vs/t/lib/vc6_libcurl_dsp.foot [moved from lib/msvcproj.foot with 81% similarity]
vs/t/lib/vc6_libcurl_dsp.head [new file with mode: 0644]
vs/t/lib/vc8_libcurl_prj.foot [new file with mode: 0644]
vs/t/lib/vc8_libcurl_prj.head [new file with mode: 0644]
vs/vc6/lib/vc6libcurl.dsp [new file with mode: 0644]
vs/vc6/lib/vc6libcurl.dsw [moved from lib/vc6libcurl.dsw with 100% similarity]
vs/vc6/src/vc6curltool.dsp [new file with mode: 0644]
vs/vc6/src/vc6curltool.dsw [moved from src/vc6curlsrc.dsw with 83% similarity]
vs/vc6/vc6curl.dsw [moved from vc6curl.dsw with 87% similarity]
vs/vc8/lib/vc8libcurl.vcproj [new file with mode: 0644]
winbuild/BUILD.WINDOWS.txt [new file with mode: 0644]
winbuild/Makefile.msvc.names [new file with mode: 0644]
winbuild/Makefile.vc [new file with mode: 0644]
winbuild/MakefileBuild.vc [new file with mode: 0644]
winbuild/gen_resp_file.bat [new file with mode: 0755]

diff --git a/CHANGES b/CHANGES
index 1b8e3ec..44c9792 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
                                   Changelog
 
-Daniel Stenberg (15 Dec 2010)
-- RELEASE-NOTES: synced with a865bd9fbaaa43e5c
+Version 7.32.0 (11 Aug 2013)
 
-- IsPipeliningPossible: only for HTTP
-  
-  The function that checks if pipelining is possible now requires the HTTP
-  bit to be set so that it doesn't mistakenly tries to do it for other
-  protocols.
-  
-  Bug: http://curl.haxx.se/mail/lib-2010-12/0152.html
-  Reported by: Dmitri Shubin
-
-- multi_runsingle: don't timeout completed handles
-  
-  The generic timeout code must not check easy handles that are already
-  completed. Going to completed (again) within there risked decreasing the
-  number of alive handles again and thus it could go negative.
-  
-  This regression bug was added in 7.21.2 in commit ca10e28f06f1
-
-- symbols-in-versions: CURLOPT_KEYPASSWD fixed
-  
-  It was added in 7.17.0 and is not deprecated
+Daniel Stenberg (11 Aug 2013)
+- THANKS: added contributors from the 7.32.0 release notes
 
-- RELEASE-NOTES: synced with c28443c551825
-
-Dan Fandrich (8 Dec 2010)
-- Mention that using other libraries can affect app licensing
-
-Yang Tse (7 Dec 2010)
-- easy: fix compiler warning: end-of-loop code not reached
-
-Daniel Stenberg (6 Dec 2010)
-- disconnect: pass on the dead_connection argument
-  
-  Cleanup fix after Kamil's commit 5c7c9a768d0093
+- [Fabian Keil brought this change]
 
-Yang Tse (6 Dec 2010)
-- sws: fix compier warning: external definition with no prior declaration
+  test1228: add 'HTTP proxy' to the keywords
 
-Daniel Stenberg (6 Dec 2010)
-- [Heinrich Ko brought this change]
+- [Fabian Keil brought this change]
 
-  ossl_connect_common: detect connection re-use
-  
-  ossl_connect_common() now checks whether or not 'struct
-  connectdata->state' is equal 'ssl_connection_complete' and if so, will
-  return CURLE_OK with 'done' set to 'TRUE'. This check prevents
-  ossl_connect_common() from creating a new ssl connection on an existing
-  ssl session which causes openssl to fail when it tries to parse an
-  encrypted TLS packet since the cipher data was effectively thrown away
-  when the new ssl connection was created.
-  
-  Bug: http://curl.haxx.se/mail/lib-2010-11/0169.html
+  tests: add keywords for a couple of FILE tests
 
-Kamil Dudka (6 Dec 2010)
-- url: provide dead_connection flag in Curl_handler::disconnect
-  
-  It helps to prevent a hangup with some FTP servers in case idle session
-  timeout has exceeded.  But it may be useful also for other protocols
-  that send any quit message on disconnect.  Currently used by FTP, POP3,
-  IMAP and SMTP.
+- [Fabian Keil brought this change]
 
-Yang Tse (6 Dec 2010)
-- ssh: fix a download resume point calculation
+  tests: add 'FAILURE' keywords to tests 1409 and 1410
 
-Daniel Stenberg (5 Dec 2010)
-- Curl_wait_for_resolv: correct timeout
-  
-  When looping in this function and checking for the timeout being
-  expired, it was not updating the reference time when calculating the
-  timediff since previous round which made it think each subsequent loop
-  to have taken longer than it actually did.
-  
-  I also modified the function to use the generic Curl_timeleft() function
-  instead of the custom logic.
-  
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3112579
+- [Fabian Keil brought this change]
 
-- Curl_send/recv_plain: return errno on failure
-  
-  When send() and recv() fail, we now store the errno value to allow the
-  app to access it.
-  
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3128121
-  Reported by: Yuri
+  tests: add keywords for a couple of HTTP tests
 
-Guenter Knauf (5 Dec 2010)
-- Updated OpenSSL version.
+- [Fabian Keil brought this change]
 
-Yang Tse (4 Dec 2010)
-- fix compiler warning: conversion may lose significant bits
+  tests: add keywords for a couple of FTP tests
 
-- fix compiler warning: assignment within conditional expression
+- [Fabian Keil brought this change]
 
-- fix getinfo CURLINFO_LOCAL* for reused connections (take 2) follow-up
-  
-  - Show address string from proper buffer in case of connection failure.
-  
-  - Try next address when inet_ntop() fails.
+  test1511: consistently terminate headers with CRLF
 
-Daniel Stenberg (3 Dec 2010)
-- version-check: added brief documentation
+- DISABLED: shut of test 1512 for now
   
-  and the traditional source header
-
-Yang Tse (3 Dec 2010)
-- build: provide SIZEOF_SIZE_T DOS definition
-
-- build: lib/config.dos renamed to lib/config-dos.h
-
-- build: provide SIZEOF_SIZE_T VMS definition
-
-- build: move config-vms.h from subdir 'packages/vms' into 'lib'
+  It shows intermittent failures and I haven't been able to track them
+  down yet. Disable this test for now.
 
-- build: provide SIZEOF_SIZE_T definition for non-configure builds
+- curl_multi_add_handle.3: ... that timer callback is for event-based
 
-- build: provide SIZEOF_SIZE_T netware definition
+- comments: remove old and wrong multi/easy interface statements
 
-- configure: undo using autobuilds to temporarily verify strict aliasing warnings.
+- curl_multi_add_handle.3: mention the CURLMOPT_TIMERFUNCTION use
 
-- fix compiler warning: rounding, sign extension, or loss of accuracy may result
+- [John E. Malmberg brought this change]
 
-- fix compiler warning: statement is not reachable
+  KNOWN_BUGS: 22 and 57 have been fixed and committed
 
-- fix compiler warning: conversion may lose significant bits
+- RELEASE-NOTES: synced with d20def20462e7
 
-- connect: fix compiler warning: unused variable
-
-- fix getinfo CURLINFO_LOCAL* for reused connections (take 2)
-
-- fix getinfo CURLINFO_LOCAL* for reused connections follow-up
+- global dns cache: fix memory leak
   
-  Reinstate IPV6 build variable that got removed.
+  The take down of the global dns cache didn't take CURLOPT_RESOLVE names
+  into account.
 
-- fix getinfo CURLINFO_LOCAL* for reused connections
+- global dns cache: didn't work [regression]
   
-  Failed to commit this file changes along with the others.
+  CURLOPT_DNS_USE_GLOBAL_CACHE broke in commit c43127414d89ccb (been
+  broken since the libcurl 7.29.0 release). While this option has been
+  documented as deprecated for almost a decade and nobody even reported
+  this bug, it should remain functional.
+  
+  Added test case 1512 to verify
 
-- fix getinfo CURLINFO_LOCAL* for reused connections
+Yang Tse (8 Aug 2013)
+- [John Malmberg brought this change]
 
-- atoi: remove atoi usage
+  packages/vms: update VMS build files
+  
+  VMS modified files either missing from a previous commit and changes
+  to remove references to CVS repositories.
 
-- multi: fix compiler warning: conversion may lose significant bits follow-up
+Daniel Stenberg (8 Aug 2013)
+- FTP: renamed several local functions
+  
+  The previous naming scheme ftp_state_post_XXXX() wasn't really helpful
+  as it wasn't always immediately after 'xxxx' and it wasn't easy to
+  understand what it does based on such a name.
+  
+  This new one is instead ftp_state_yyyy() where yyyy describes what it
+  does or sends.
 
-- ftp: fix 'bool' data type implementation dependant usage
+- mk-ca-bundle.1: don't install on make install
+  
+  Since the mk-ca-bundle tool itself isn't installed with make install,
+  there's no point in installing its documentation.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-08/0057.html
+  Reported-by: Guenter Knauf
 
-- multi: fix compiler warning: conversion may lose significant bits
+Yang Tse (7 Aug 2013)
+- packages/vms/Makefile.am: add latest file additions to EXTRA_DIST
 
-- multi: fix compiler warning: enumerated type mixed with another type
+- [John Malmberg brought this change]
 
-- hostip: edit comment
+  Building_vms_pcsi_kit
+  
+  These are the files needed to build VMS distribution packages known as
+  PCSI kits.
+  
+  Also minor update to the existing files, mainly to the documentation and
+  file clean up code.
 
-- xattr: fix compiler warning: enumerated type mixed with another type
+Daniel Stenberg (6 Aug 2013)
+- LIBCURL-STRUCTS: new document
+  
+  This is the first version of this new document, detailing the seven
+  perhaps most important internal structs in libcurl source code:
+  
+    1.1 SessionHandle
+    1.2 connectdata
+    1.3 Curl_multi
+    1.4 Curl_handler
+    1.5 conncache
+    1.6 Curl_share
+    1.7 CookieInfo
 
-- s/isspace/ISSPACE
+- CONTRIBUTE: minor language polish
 
-- symbol-scan: use configure script knowledge about how to run the C preprocessor
+- FTP: when EPSV gets a 229 but fails to connect, retry with PASV
+  
+  This is a regression as this logic used to work. It isn't clear when it
+  broke, but I'm assuming in 7.28.0 when we went all-multi internally.
+  
+  This likely never worked with the multi interface. As the failed
+  connection is detected once the multi state has reached DO_MORE, the
+  Curl_do_more() function was now expanded somewhat so that the
+  ftp_do_more() function can request to go "back" to the previous state
+  when it makes another attempt - using PASV.
+  
+  Added test case 1233 to verify this fix. It has the little issue that it
+  assumes no service is listening/accepting connections on port 1...
+  
+  Reported-by: byte_bucket in the #curl IRC channel
 
-- ignore file generated by configure
+Nick Zitzmann (5 Aug 2013)
+- md5: remove use of CommonCrypto-to-OpenSSL macros for the benefit of Leopard
+  
+  For some reason, OS X 10.5's GCC suddenly stopped working correctly with
+  macros that change MD5_Init etc. in the code to CC_MD5_Init etc., so I
+  worked around this by removing use of the macros and inserting static
+  functions that just call CommonCrypto's implementations of the functions
+  instead.
 
-- curl_multi_info_read: fix compiler warning: conversion may lose significant bits
+Guenter Knauf (5 Aug 2013)
+- Simplify check for trusted certificates.
+  
+  This changes the previous check for untrusted certs to a check for
+  certs explicitely marked as trusted.
+  The change is backward-compatible (tested with certdata.txt v1.80).
 
-- inet_pton: fix compiler warning
+Daniel Stenberg (5 Aug 2013)
+- configure: warn on bad env variable use, don't error
   
-  warning C4146: unary minus operator applied to unsigned type, result still unsigned
+  Use XC_CHECK_BUILD_FLAGS instead XC_CHECK_USER_FLAGS.
 
-- Curl_getaddrinfo_ex: sanitize function results follow-up.
+- Revert "configure: don't error out on variable confusions, just warn"
+  
+  This reverts commit 6b27703b5f525eccdc0a8409f51de8595c75132a.
 
-- Curl_getaddrinfo_ex: sanitize function results.
+- formadd: wrong pointer for file name when CURLFORM_BUFFERPTR used
   
-  Ensure that spurious results from system's getaddrinfo() ares not propagated
-  by Curl_getaddrinfo_ex() into the library.
+  The internal function that's used to detect known file extensions for
+  the default Content-Type got the the wrong pointer passed in when
+  CURLFORM_BUFFER + CURLFORM_BUFFERPTR were used. This had the effect that
+  strlen() would be used which could lead to an out-of-bounds read (and
+  thus segfault). In most cases it would only lead to it not finding or
+  using the correct default content-type.
   
-  Also ensure that the ai_addrlen member of Curl_getaddrinfo_ex()'s output linked
-  list of Curl_addrinfo structures has appropriate family-specific address size.
-
-Kamil Dudka (22 Nov 2010)
-- openldap: use remote port in URL passed to ldap_init_fd()
+  It also showed that test 554 and test 587 were testing for the
+  previous/wrong behavior and now they're updated as well.
   
-  ... not the proxy port.  It makes no difference unless a proxy is used.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1262
+  Reported-by: Konstantin Isakov
 
-Yang Tse (20 Nov 2010)
-- gtls: define and use gtls_EAGAIN, gtls_EINTR and gtls_EIO.
+Guenter Knauf (4 Aug 2013)
+- Skip more untrusted certificates.
   
-  Winsock builds clobber some errno.h defines in setup_once.
-
-Dan Fandrich (19 Nov 2010)
-- Added a couple examples that were missing from the tar ball
-
-- Check for errors while preprocessing curl.h in test 1119
+  Christian Heimes brought to our attention that the certdata.txt
+  format has recently changed [1], causing ca-bundle.crt created
+  with mk-ca-bundle.[pl|vbs] to include untrusted certs.
   
-  This showed a problem when running the test out-of-tree, so
-  an include path is now being added to pick up the generated
-  curlbuild.h file.
+  [1] http://lists.debian.org/debian-release/2012/11/msg00411.html
 
-- Use the 3-argument open for compatibility with older perls
+Daniel Stenberg (4 Aug 2013)
+- configure: don't error out on variable confusions, just warn
 
-- [Matthias Bolte brought this change]
+- configure: rephrase the notice in _XC_CHECK_VAR_*
+  
+  Instead of claiming it is an error, we call it a "note" to reduce the
+  severity level. But the following text now says the [variable] "*should*
+  only be used to specify"... instead of previously having said "may".
 
-  Detect socket errors in GnuTLS on Windows
+- multi: remove data->state.current_conn struct field
   
-  On Windows, translate WSAGetLastError() to errno values as GNU
-  TLS does it internally, too. This is necessary because send() and
-  recv() on Windows don't set errno when they fail but GNU TLS
-  expects a proper errno value.
+  Not needed
+
+- multi: remove the one_easy struct field
   
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3110991
+  Since the merge of SessionHandle with Curl_one_easy, this indirection
+  isn't used anymore.
 
-Yang Tse (19 Nov 2010)
-- test servers: fix strict aliasing compiler warnings
+- multi: rename all Curl_one_easy to SessionHandle
 
-- configure: use autobuilds to temporarily verify strict aliasing warnings.
+- multi: remove the multi_pos struct field
   
-  Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
-  rules and warnings. Given that cross-compiled targets autobuilds do not run the
+  Since Curl_one_easy is really a SessionHandle now, this indirection
+  doesn't exist anymore.
 
-Julien Chaffraix (17 Nov 2010)
-- configure: Prevent link errors with --librtmp.
+- multi: remove easy_handle struct field
   
-  If --librtmp was specified but pkg-config could not find the librtmp
-  file, we would have undefined symbols when linking curl.
-  
-  We prevent this error by disabling this case as suggested on the mailing
-  list.
-
-Daniel Stenberg (15 Nov 2010)
-- RELEASE-NOTES: synced with cbf4961bf3e4
+  It isn't needed anymore
 
-- gnutls->handshake: improved timeout handling
+- multi: remove 'Curl_one_easy' struct, phase 1
   
-  When no timeout is set, we call the socket_ready function with a timeout
-  value of 0 during handshake, which makes it loop too much/fast in this
-  function. It also made this function return CURLE_OPERATION_TIMEDOUT
-  wrongly on a slow handshake.
+  The motivation for having a separate struct that keep track of an easy
+  handle when using the multi handle was removed when we switched to
+  always using the multi interface internally. Now they were just two
+  separate struct that was always allocated for each easy handle.
   
-  However, the particular bug report that highlighted this problem is not
-  solved by this fix, as this fix only makes the more proper error get
-  reported instead.
+  This first step just moves the Curl_one_easy struct members into the
+  SessionHandle struct and hides this somehow (== keeps the source code
+  changes to a minimum) by defining Curl_one_easy to SessionHandle
   
-  Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594150
-  Reported by: Johannes Ernst
-
-Julien Chaffraix (13 Nov 2010)
-- urldata: Capitalize enum protect_level values.
+  The biggest changes in this commit are:
+  
+   1 - the linked list of easy handles had to be changed somewhat due
+       to the new struct layout. This made the main linked list pointer
+       get renamed to 'easyp' and there's also a new pointer to the last
+       node, called easylp. It is no longer circular but ends with ->next
+       pointing to NULL. New nodes are still added last.
   
-  This makes it easier to spot the enum values from the variables.
-  Removed some unneeded DEBUGASSERT added in the previous commit.
+   2 - easy->state is now called easy->mstate to avoid name collision
 
-- security: tighten enum protection_level usage.
+Steve Holme (2 Aug 2013)
+- Revert "DOCS: Added IMAP URL example for listing new messages"
   
-  While changing Curl_sec_read_msg to accept an enum protection_level
-  instead of an int, I went ahead and fixed the usage of the associated
-  fields.
+  This reverts commit 82ab5f1b0c7c3f as this was the wrong place to
+  document the complexity of IMAP URLs and Custom Requests.
+
+- DOCS: Added IMAP URL example for listing new messages
   
-  Some code was assuming that prot_clear == 0. Fixed those to use the
-  proper value. Added assertions prior to any code that would set the
-  protection level.
+  In addition to listing the folder contents, in the URL examples, added
+  an example to list the new messages waiting in the user's inbox.
 
-Yang Tse (13 Nov 2010)
-- configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body
+Yang Tse (1 Aug 2013)
+- packages/vms/Makefile.am: add latest file additions to EXTRA_DIST
 
-Daniel Stenberg (12 Nov 2010)
-- curl.1: "a file", not an
+- [John Malmberg brought this change]
 
-- version-check.pl: display version number for symbols
+  Add in the files needed to build libcurl shared images on VMS.
   
-  This script is the start of a helper tool that scans a source code and
-  outputs the most recent libcurl version it finds symbols for. Meaning
-  that if there's no conditions in the code, that's the earliest libcurl
-  version the scanned code requires.
+  Update the packages/vms/readme file to be current.
   
-  It is not added to the Makefile.am yet as it is still a bit crude, but
-  I'm committing it to keep it and allow us to work on it.
-
-- [Adam Light brought this change]
-
-  Makefile.vc6: fixed the xattr.c compile
-
-Julien Chaffraix (12 Nov 2010)
-- krb5: Use GSS_ERROR to check for error.
+  Also some files for the GNV based build were either missing or needed an
+  update.
   
-  This is the advised way of checking for errors in the GSS-API RFC.
-  Also added some '\n' to the error message so that they are not mixed
-  with other outputs.
-
-- security: Pass the right parameter to init.
+  curl_crtl_init.c is a special file that is run before main() to
+  set up the proper C runtime behavior.
   
-  init is expecting app_data. Passing it the struct connecdata would make
-  us crash later.
-
-Daniel Stenberg (11 Nov 2010)
-- HTTP Auth: Add CURLAUTH_ONLY
+  generate_vax_transfer.com generates the VAX transfer vector modules from
+  the gnv_libcurl_symbols.opt file.
   
-  This is a meta symbol. OR this value together with a single specific
-  auth value to force libcurl to probe for un-restricted auth and if not,
-  only that single auth algorithm is acceptable.
+  gnv_conftest.c_first is a helper file needed for configure scripts to
+  come up with the expected answers on VMS.
   
-  For example you can use CURLAUTH_DIGEST|CURLAUTH_ONLY to make libcurl
-  first probe for what method to use, but yet only consider Digest to be
-  acceptable.
+  gnv_libcurl_symbols.opt is the public symbols for the libcurl shared
+  image.
   
-  Using _only_ CURLAUTH_DIGEST without the CURLAUTH_ONLY field, will make
-  libcurl explicitly use Digest right away and not do any probing.
-
-- ip_version: moved to connection struct
+  gnv_link_curl.com builds the shared libcurl image and rebuilds other
+  programs to use it.
   
-  The IP version choice was previously only in the UserDefined struct
-  within the SessionHandle, but since we sometimes alter that option
-  during a request we need to have it on a per-connection basis.
+  macro32_exactcase.patch is a hack to make a local copy of the VMS Macro32
+  assembler case sensitive, which is needed to build the VAX transfer modules.
   
-  I also moved more "init conn" code into the allocate_conn() function
-  which is designed for that purpose more or less.
+  report_openssl_version.c is a tool for help verify that the libcurl
+  shared image is being built for a minium version of openssl.
 
-Yang Tse (11 Nov 2010)
-- buildconf: MAC OS X requires libtool version 1.5.26 or newer
+- curl: second follow-up for commit 5af2bfb9
   
-  MAC OS X requires libtool version 1.5.26 or newer, otherwise
-  configure will mishandle *.dSYM directories when it runs.
-
-- configure: remove temporary autobuilds exercising of xattr function tests
+  Display progress-bar unconditionally on first call
 
-- configure: use autobuilds to temporarily exercise xattr function tests
-
-- xattr: portability fix
-
-- curl-functions: provide xattr function tests that also check number of arguments
-
-Daniel Stenberg (10 Nov 2010)
-- test1120: verify FTP response 421
+- curl: follow-up for commit 5af2bfb9
   
-  curl mustn't try to use the control connection after the 421 is received
-
-- ftpserver.pl: spellfix comment
+  Use tvnow() and tvdiff() to avoid introducing new linkage issues
 
-- [Rutger Hofman brought this change]
+Daniel Stenberg (31 Jul 2013)
+- curl: --progress-bar max update frequency now at 5Hz
 
-  TFTP: resend the correct data
+- curl: make --progress-bar update the line less frequently
   
-  I found a bug in tftp_tx() in tftp.c. If a data resend is done after
-  reception of an ACK/OACK, the call to sendto is wrong.
-
-- [Stefan Tomanek brought this change]
-
-  write extended attributes by using fsetxattr
+  Also, use memset() instead of a lame loop.
   
-  Instead of reopening the downloaded file, fsetxattr uses the (already
-  open) file descriptor to attach extended attributes. This makes the
-  procedure more robust against errors caused by moved or deleted files.
-
-Dan Fandrich (9 Nov 2010)
-- Check for getinfo errors before setting attributes
-
-Kamil Dudka (9 Nov 2010)
-- ftp: treat server's response 421 as CURLE_OPERATION_TIMEDOUT
+  The previous logic that tried to avoid too many updates were very
+  ineffective for really fast transfers, as then it could easily end up
+  doing hundreds of updates per second that would make a significant
+  impact in transfer performance!
   
-  Bug: https://bugzilla.redhat.com/650255
-  Reported by: Simon H.
+  Bug: http://curl.haxx.se/mail/archive-2013-07/0031.html
+  Reported-by: Marc Doughty
 
-Daniel Stenberg (9 Nov 2010)
-- symbols-in-version: add CURL_SOCKET_BAD
+Nick Zitzmann (30 Jul 2013)
+- darwinssl: added LFs to some strings passed into infof()
   
-  I also documented the filtering logic in the symbol-scan.pl function to
-  clarify why not all CURL_* symbols are included.
+  (This doesn't need to appear in the release notes.) I noticed a few places
+  where infof() was called, and there should've been an LF at the end of the
+  string, but there wasn't.
 
-Yang Tse (9 Nov 2010)
-- serial number bump
-
-Kamil Dudka (8 Nov 2010)
-- ftp: close connection as soon as ABOR has been sent
+- darwinssl: fix build error in crypto authentication under Snow Leopard
   
-  ... and do not send ABOR unless really necessary.
+  It turns out Snow Leopard not only has SecItemCopyMatching() defined in
+  a header not included by the omnibus header, but it won't work for our
+  purposes, because searching for SecIdentityRef objects wasn't added
+  to that API until Lion. So we now use the old SecKeychainSearch API
+  instead if the user is building under, or running under, Snow Leopard.
   
-  Bug: https://bugzilla.redhat.com/649347
-  Reported by: Simon H.
+  Bug: http://sourceforge.net/p/curl/bugs/1255/
+  Reported by: Edward Rudd
 
-Daniel Stenberg (8 Nov 2010)
-- RELEASE-NOTES: synced with fc6c4c10f9faab08
+- md5 & metalink: use better build macros on Apple operating systems
+  
+  Previously we used __MAC_10_X and __IPHONE_X to mark digest-generating
+  code that was specific to OS X and iOS. Now we use
+  __MAC_OS_X_VERSION_MAX_ALLOWED and __IPHONE_OS_VERSION_MAX_ALLOWED
+  instead of those macros.
   
-  I also recounted and updated the command line and libcurl options.
+  Bug: http://sourceforge.net/p/curl/bugs/1255/
+  Reported by: Edward Rudd
 
-- help: indent the --xattr option like the others
+Yang Tse (29 Jul 2013)
+- tool_operhlp.c: fix add_file_name_to_url() OOM handling
 
-- curl.1: --resolve documented
+- tool_operate.c: fix brace placement for vi/emacs delimiter matching
 
-- CURLOPT_RESOLVE: documented
+- tool_operate.c: move <fabdef.h> header inclusion location
 
-- CURLOPT_USE_SSL: move from FTP options to connection options
+Daniel Stenberg (29 Jul 2013)
+- RELEASE-NOTES: synced with b5478a0e033e7
 
-- xattr-check: correct the comment as well
+- curl_easy_pause: on unpause, trigger mulit-socket handling
+  
+  When the multi-socket API is used, we need the handle to be checked
+  again when it gets unpaused.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-07/0239.html
+  Reported-by: Justin Karneges
 
-- xattr: use const char * for const strings
+- [John E. Malmberg brought this change]
 
-- setxattr: fix the checks
+  curl_formadd: fix file upload on VMS
   
-  My copy and paste job was a little too much copy and I missed to adjust
-  it properly to sys/xattr.h all over and this is a fix to cure that.
+  For the standard VMS text file formats, VMS needs to read the file to
+  get the actual file size.
+  
+  For the standard VMS binary file formats, VMS needs a special format of
+  fopen() call so that it stops reading at the logical end of file instead
+  of at the end of the blocks allocated to the file.
+  
+  I structured the patch this way as I was not sure about changing the
+  structures or parameters to the routines, but would prefer to only call
+  the stat() function once and pass the information to where the fopen()
+  call is made.
+  
+  Bug: https://sourceforge.net/p/curl/bugs/758/
 
-- CURLOPT_RESOLVE: added
+- formadd: CURLFORM_FILECONTENT wrongly rejected some option combos
   
-  CURLOPT_RESOLVE is a new option that sends along a curl_slist with
-  name:port:address sets that will populate the DNS cache with entries so
-  that request can be "fooled" to use another host than what otherwise
-  would've been used. Previously we've encouraged the use of Host: for
-  that when dealing with HTTP, but this new feature has the added bonus
-  that it allows the name from the URL to be used for TLS SNI and server
-  certificate name checks as well.
+  The code for CURLFORM_FILECONTENT had its check for duplicate options
+  wrong so that it would reject CURLFORM_PTRNAME if used in combination
+  with it (but not CURLFORM_COPYNAME)! The flags field used for this
+  purpose cannot be interpreted that broadly.
   
-  This is a first change. Surely more will follow to make it decent.
+  Bug: http://curl.haxx.se/mail/lib-2013-07/0258.html
+  Reported-by: Byrial Jensen
 
-Yang Tse (8 Nov 2010)
-- fix compiler warning
+Yang Tse (25 Jul 2013)
+- packages/vms/Makefile.am: add latest file additions to EXTRA_DIST
 
-Dan Fandrich (7 Nov 2010)
-- Added os-specific.c and xattr.c to the Symbian build files
+- [John E. Malmberg brought this change]
 
-Yang Tse (7 Nov 2010)
-- xattr: fix VisualStudio builds
+  VMS: intial set of files to allow building using GNV toolkit.
 
-- fix snapshot generation
+- string formatting: fix too many arguments for format
 
-Daniel Stenberg (5 Nov 2010)
-- --libcurl: simplify output
-  
-  Removed the code that was needed for libcurl before 7.19.0 which now is
-  more than two years old.
-  
-  Simplified the top comment and corrected the URL.
+- string formatting: fix zero-length printf format string
 
-- [Alfred Gebert brought this change]
+- easy.c: curl_easy_getinfo() fix va_start/va_end matching
 
-  LDAP: detect non-binary attributes properly
-  
-  If the query result has a binary attribute, the binary attribute is
-  base64 encoded. But all following non binary attributes are also base64
-  encoded which is wrong.
-  
-  This is a test (LDAP server is public).
-  
-  curl
-  ldap://x500.bund.de:389/o=Bund,c=DE?userCertificate,certificateSerialNumber?sub
-  ?cn=*Woehleke*
+- imap.c: imap_sendf() fix va_start/va_end matching
 
-- xattr: add configure check and #ifdefs
-  
-  setxattr is a glibc call to set extended attributes, so configure now
-  checks for it and the code is adapted to only build when the
-  functionality is present.
+- string formatting: fix 15+ printf-style format strings
 
-- [Stefan Tomanek brought this change]
+Patrick Monnerat (24 Jul 2013)
+- OS400: sync ILE/RPG binding with current curl.h
 
-  save metadata to extended file attributes
-  
-  It is often convinient to track back the source of a once downloaded
-  file; this patch makes curl store the source URL and other metadata
-  alongside the retrieved file by using the extended attributes (if
-  supported by the file system and enabled by --xattr).
+Yang Tse (24 Jul 2013)
+- string formatting: fix 25+ printf-style format strings
 
-- test: remove test 580
+Daniel Stenberg (23 Jul 2013)
+- Makefile.am: use LDFLAGS as well when linking libcurl
   
-  Test 580 is removed again for two reasons:
+  Linking on Solaris 10 x86 with Sun Studio 12 failed when we upgraded
+  automake for the release builds.
   
-  1) Some compilers aren't satisfied by just a data variable called 'test'
-  when first.o wants a function called 'test'. The Solaris compiler says
-  "ld: warning: symbol `test' has differing types:" while the AIX compiler
-  downright rejects it.
-  
-  2) Test case 1119 that was added after this test is way more complete
-  and cover everything test 580 does and more without introducing the same
-  problems.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1217
+  Reported-by: Dagobert Michelsen
 
-- Revert: use Host: name for SNI and cert name checks
-  
-  This reverts commit b0fd03f5b8d4520dd232a9d13567d16bd0ad8951,
-  4b2fbe1e97891f, afecd1aa13b4f, 68cde058f66b3
+- [Fabian Keil brought this change]
 
-- TODO-RELEASE: "TLS SNI use Host:" is done
+  url.c: Fix dot file path cleanup when using an HTTP proxy
   
-  262 - Manual setting of TLS Server Name Indication - use Host:
+  Previously the path was cleaned, but the URL wasn't properly updated.
 
-- RELEASE-NOTES: synced with 7b823badbcab9d330
+- [Fabian Keil brought this change]
 
-- curl.1: added a few missing exit codes
+  tests: test1232 verifies dotdot removal from path with proxy
 
-- certcheck: use the custom Host: name for checks
-  
-  If you use a custom Host: name in a request to a SSL server, libcurl
-  will now use that given name when it verifies the server certificate to
-  be correct rather than using the host name used in the actual URL.
+- [Fabian Keil brought this change]
 
-- SNI: simplify the custom host name use
-  
-  The redirect check is already done at the position where the customhost
-  field is assigned so there's no point in doing that a second time.
+  dotdot.c: Fix a RFC section number in a comment for Curl_dedotdotify()
+
+- [John E. Malmberg brought this change]
 
-- host: get the custom Host: name more genericly
+  build_vms.com: fix debug and float options
   
-  When given a custom host name in a Host: header, we can use it for
-  several different purposes other than just cookies, so we rename it and
-  use it for SSL SNI etc.
+  In the reorganization of the build_vms.com the debug and float options
+  were not fixed up correctly.
 
-- [Hongli Lai (Phusion) brought this change]
+- [John E. Malmberg brought this change]
 
-  SNI: set name to custom Host header
+  curl: fix upload of a zip file in OpenVMS
   
-  OpenSSL SNI host name should be set to the custom Host header, if the
-  user provided one.
-
-- fopen.c: re-indented, fixed previous mistake
+  Two fixes:
   
-  I've made the code intended using curl-style now to look more like other
-  examples.
+  1. Force output file format to be stream-lf so that partial downloads
+  can be continued.
   
-  My previous "fix" was a bit too invasive but is now fixed again.
-
-- multi use: call multi_perform even on select() timeouts
-
-- example: add smtp-multi.c
+  This should have minor impact as if the file does not exist, it was
+  created with stream-lf format.  The only time this was an issue is if
+  there was already an existing file with a different format.
   
-  An example application source code sending SMTP mail with the multi
-  interface. It is based on the code Alona Rossen provided, which in turn
-  is based on existing example/test code, and I converted it even more
-  into a decent example with a fair multi API use, put the info required
-  to edit at the top and I added some comments.
-
-- CURLOPT_NOSIGNAL: add blurb about SIGPIPE
+  2. Fix file uploads are now fixed.
+  
+     a. VMS binary files such as ZIP archives are now uploaded
+        correctly.
+  
+     b. VMS text files are read once to get the correct size
+        and then converted to line-feed terminated records as
+        they are read into curl.
+  
+  The default VMS text formats do not contain either line-feed or
+  carriage-return terminated records.  Those delimiters are added by the
+  operating system file read calls if the application requests them.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=496
 
-Dan Fandrich (3 Nov 2010)
-- Allow building test 580 out of tree
+Yang Tse (22 Jul 2013)
+- libtest: fix data type of some *_setopt() 'long' arguments
 
-Daniel Stenberg (3 Nov 2010)
-- dist: add symbol-scan.pl to the tarball
+- curl: fix symbolic names for CURL_NETRC_* enum in --libcurl output
 
-- test1119: verify symbols-in-versions
+- curl: fix symbolic names for CURLUSESSL_* enum in --libcurl output
 
-- runtests: allow tests written as perl scripts
+- tool_operate.c: fix passing curl_easy_setopt long arg on some x64 ABIs
   
-  If a command is set type="perl", it can now specify a perl program that will
-  be run instead of an ordinary curl or built tool.
+  We no longer pass our 'bool' data type variables nor constants as
+  an argument to my_setopt(), instead we use proper 1L or 0L values.
   
-  A perl test automatically disables memory and valgrind debugging.
+  This also fixes macro used to pass string argument for CURLOPT_SSLCERT,
+  CURLOPT_SSLKEY and CURLOPT_EGDSOCKET using my_setopt_str() instead of
+  my_setopt().
+  
+  This also casts enum or int argument data types to long when passed to
+  my_setopt_enum().
 
-- symbol-scan: verifies symbols-in-versions
+Daniel Stenberg (21 Jul 2013)
+- curl_multi_wait: fix revents
   
-  This new script scans for all enums and #defines used by the curl/curl.h
-  and curl/multi.h headers. Then it reads all symbols mentioned in
-  symbols-in-vesions and make sure that there's no entries missing in
-  there. It then proceeds to verify that the entries that
-  symbols-in-vesions mentions but aren't found in the sources are truly
-  documented as removed.
+  Commit 6d30f8ebed34e7276 didn't work properly. First, it used the wrong
+  array index, but this fix also:
   
-  This script is used in the new test case 1119
-
-- symbols-in-versions: added 119 missing symbols
+  1 - only does the copying if indeed there was any activity
   
-  I've developed a script I call symbol-scan.pl that scans the curl.h and
-  multi.h header files and compare the symbols it finds in there with the
-  symbols symbols-in-versions documents and outputs a report on the
-  differences.  Using this I've dug through the history to fill up
-  symbols-in-versions with all the symbols my script found mismatches for.
+  2 - makes sure to properly translate between internal and external
+  bitfields, which are not guaranteed to match
   
-  I will commit symbol-scan.pl separatly and think of a way to put it to
-  use in the build/tests so that we from now on will get this in-sync
-  check automatically.
+  Reported-by: Evgeny Turnaev
 
-Dan Fandrich (2 Nov 2010)
-- Added mk580.pl to the tar ball
+- RELEASE-NOTES: synced with d529f3882b9bca
 
-Daniel Stenberg (2 Nov 2010)
-- symbols-in-versions: added missing symbols
-
-- ignore: lib580.c is generated by mk580.pl
-
-- test: added test 580 - verifies symbols-in-versions
+- curl_easy_perform: gradually increase the delay time
   
-  The new perl script mk580.pl generates a C table in a fresh source file
-  named lib580.c and if that compiles fine we know that the file
-  docs/libcurl/symbols-in-versions at least doesn't include any symbols
-  that are misspelled.
+  Instead of going 50,100,150 etc millisecond delay time when nothing has
+  been found to do or wait for, we now start lower and double each loop as
+  in 4,8,16,32 etc.
   
-  An additional feature would be to somehow scan curl/curl.h and compare
-  with symbols-in-versions to see if there are symbols missing.
-
-- spellfix: CURLOPT_TFTP_BLKSIZE it is
+  This lowers the minimum wait without sacrifizing the longer wait too
+  much with unnecessary CPU cycles burnt.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-07/0103.html
+  Reported-by: Andreas Malzahn
 
-Kamil Dudka (29 Oct 2010)
-- ftp: prevent server from hanging on closed data connection
+- ftp_do_more: consider DO_MORE complete when server connects back
   
-  Some FTP servers (e.g. Pure-ftpd) end up hanging if we close the data
-  connection before transferring all the requested data.  If we send ABOR
-  in that case, it prevents the server from hanging.
+  In the case of an active connection when ftp_do_more() detects that the
+  server has connected back, it must make sure to mark it as complete so
+  that the multi_runsingle() function will detect this and move on to the
+  next state.
   
-  Bug: https://bugzilla.redhat.com/643656
-  Reported by: Pasi Karkkainen, Patrick Monnerat
+  Bug: http://curl.haxx.se/mail/lib-2013-07/0115.html
+  Reported-by: Clemens Gruber
 
-Dan Fandrich (28 Oct 2010)
-- Removed a leftover mention of FTP in an error message
+Yang Tse (19 Jul 2013)
+- Makefile.b32: Borland makefile adjustments. Tested with BCC 5.5.1
 
-- Removed the native Makefile.riscos files
-  
-  These haven't worked in at least 8 years due to missing source
-  files, and most active RiscOS developers these days apparently
-  cross-compile anyway.
-  
-  Signed-off-by: James Bursa <james@zamez.org>
+- WIN32 MemoryTracking: require UNICODE for wide strdup code support
 
-- Lightened the stack in wc_statemach to permit deeper recursion
+Daniel Stenberg (18 Jul 2013)
+- CURLOPT_XFERINFOFUNCTION: introducing a new progress callback
   
-  Also, added a few hints to help compilers to perform tail call
-  recursion optimization.
-
-Daniel Stenberg (20 Oct 2010)
-- SSH: use libssh2_session_handshake()
+  CURLOPT_XFERINFOFUNCTION is now the preferred progress callback function
+  and CURLOPT_PROGRESSFUNCTION is considered deprecated.
   
-  In libssh2 1.2.8, libssh2_session_handshake() replaces
-  libssh2_session_startup() to fix the previous portability problem with
-  the socket type that was too small for win64 and thus easily could cause
-  crashes and more.
-
-- SSH: avoid using the libssh2_ prefix
+  This new callback uses pure 'curl_off_t' arguments to pass on full
+  resolution sizes. It otherwise retains the same characteristics: the
+  same call rate, the same meanings for the arguments and the return code
+  is used the same way.
   
-  It is a bad idea to use the public prefix used by another library and
-  now we realize that libssh2 introduces a symbol in the upcoming version
-  1.2.8 that conflicts with our static function named libssh2_free.
+  The progressfunc.c example is updated to show how to use the new
+  callback for newer libcurls while supporting the older one if built with
+  an older libcurl or even built with a newer libcurl while running with
+  an older.
 
-- formdata: provide error message
+Yang Tse (18 Jul 2013)
+- Reinstate "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage".
   
-  When failing to build form post due to an error, the code now does a
-  proper failf(). Previously libcurl would report an error like "failed
-  creating formpost data" when a file wasn't possible to open which was
-  not easy for users to figure out.
+  This reverts commit 7ed25cc, reinstating commit 8ec2cb5.
   
-  I also lower cased a function name to be named more curl-style and
-  removed some unnecessary code.
-
-- URL-parsing: consider ? a divider
+  As of 18-jul-2013 we still do have code in libcurl that makes use of these
+  memory functions. Commit 8ec2cb5 comment still applies and is yet valid.
+  
+  These memory functions are solely used in Windows builds, so all related
+  code is protected with '#ifdef WIN32' preprocessor conditional compilation
+  directives.
   
-  The URL parser got a little stricter as it now considers a ? to be a
-  host name divider so that the slightly sloppier URLs work too. The
-  problem that made me do this change was the reported problem with an URL
-  like: www.example.com?email=name@example.com This form of URL is not
-  really a legal URL (due to the missing slash after the host name) but is
-  widely accepted by all major browsers and libcurl also already accepted
-  it, it was just the '@' letter that triggered the problem now.
+  Specifically, wcsdup() _wcsdup() are used when building a Windows target with
+  UNICODE and USE_WINDOWS_SSPI preprocessor symbols defined. This is the case
+  when building a Windows UNICODE target with Windows native SSL/TLS support
+  enabled.
   
-  The side-effect of this change is that now libcurl no longer accepts the
-  ?  letter as part of user-name or password when given in the URL, which
-  it used to accept (and is tested in test 191). That letter is however
-  mentioned in RFC3986 to be required to be percent encoded since it is
-  used as a divider.
+  Realizing that wcsdup() _wcsdup() are used is a bit tricky given that usage
+  of these is hidden behind _tcsdup() which is MS way of dealing with code
+  that must tolerate UNICODE and non-UNICODE compilation. Additionally, MS
+  header files and those compatible from other compilers use this preprocessor
+  conditional compilation directive in order to select at compilation time
+  whether 'wide' or 'ansi' MS API functions are used.
   
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3090268
+  Without this code, Windows build targets with Windows native SSL/TLS support
+  enabled and MemoryTracking support enabled misbehave in tracking memory usage,
+  regardless of being a UNICODE enabled build or not.
 
-- curl_easy_setopt.3: spellfix
+- xc-am-iface.m4: comments refinement
 
-- curl_easy_setopt.3: CURLOPT_USE_SSL is not just for FTP
+- configure: fix 'subdir-objects' distclean related issue
   
-  It is for FTP, SMTP, POP3, IMAP at least.
+  See XC_AMEND_DISTCLEAN comments for details.
 
-- krb4.h: removed unused prototypes
+Daniel Stenberg (18 Jul 2013)
+- [Evgeny Turnaev brought this change]
 
-- krb4: make a few functions static
-
-- TODO-RELEASE: cleanup for 7.21.3 works
-  
-  "SFTP resume with 4GB file does not work" is now removed as I'm sure
-  this is really a libssh2 bug and not a libcurl bug.
+  curl_multi_wait: set revents for extra fds
   
-  7.21.2 is released already
+  Pass back the revents that happened for the user-provided file
+  descriptors.
 
-- RELEASE-NOTES: sync with 09a2d93a0f17ca
+- [Ben Greear brought this change]
 
-- http_chunks: remove debug output
+  asyn-ares: Don't blank ares servers if none configured.
+  
+  Best to just let c-ares use it's defaults if none are configured
+  in (lib)curl.
   
-  Accidentally left in there during my previous debugging of this
+  Signed-off-by: Ben Greear <greearb@candelatech.com>
+
+- [Sergei Nikulov brought this change]
 
-- Curl_setopt: disallow CURLOPT_USE_SSL without SSL support
+  cmake: Fix for MSVC2010 project generation
   
-  In order to avoid for example the pingpong protocols to issue STARTTLS
-  (or equivalent) even though there's no SSL support built-in.
+  Fixed issue with static build for MSVC2010.
   
-  Reported by: Sune Ahlgren
-  Bug: http://curl.haxx.se/mail/archive-2010-10/0045.html
-
-- options: check for features for some options
+  After some investigation I've discovered known issue
+  http://public.kitware.com/Bug/view.php?id=11240 When .rc file is linked
+  to static lib it fails with following linker error
   
-  Some options, such as the automatic decompression and some SSL related
-  ones now will bail out if the underlying libcurl doesn't have support
-  for the particular feature needed.
-
-Dan Fandrich (14 Oct 2010)
-- Fixed the IPv6 host address in test1203
+  LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
+  file.obj : fatal error LNK1112: module machine type 'x64' conflicts with
+  target machine type 'X86'
   
-  Reported by: Christian Weisgerber
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3087479
-
-Daniel Stenberg (14 Oct 2010)
-- curl_easy_setopt.3: clarify CURLOPT_CRLF
+  Fix add target property /MACHINE: for MSVC generation.
   
-  The option takes a parameter that should be 1 or 0 to enable or disable
-  the feature.
+  Also removed old workarounds - it caused errors during msvc build.
   
-  URL: http://curl.haxx.se/bug/view.cgi?id=3086428
+  Bug: http://curl.haxx.se/mail/lib-2013-07/0046.html
 
-Guenter Knauf (14 Oct 2010)
-- Some more small Watcom makefile fixes.
+- mk-ca-bundle.1: point out certdata.txt format docs
 
-- Added --noconfigure switch to testcurl.pl.
+Yang Tse (16 Jul 2013)
+- slist.c: Curl_slist_append_nodup() OOM handling fix
 
-- Modified Watcom makefiles to work on Linux too.
+Daniel Stenberg (16 Jul 2013)
+- test1414: FTP PORT download without SIZE support
 
-- Added MingW32 rtmp target; changed Watcom targets.
-  
-  Modified Watcom targets to avoid backslashs so that they can
-  work on Linux too.
+Yang Tse (16 Jul 2013)
+- tests/Makefile.am: add configurehelp.pm to DISTCLEANFILES
 
-Daniel Stenberg (13 Oct 2010)
-- gitignore: ignore Makefile.vc10.dist made by maketgz
+Patrick Monnerat (15 Jul 2013)
+- curl_slist_append(): fix error detection
 
-- curlver.h: start over at 7.21.3
+- slist.c: fix indentation
 
-- RELEASE-NOTES: start over towards 7.21.3
+- OS400: new SSL backend GSKit
 
-- THANKS: added contributors from 7.21.2
+- OS400: add slist and certinfo EBCDIC support
 
-Version 7.21.2 (12 Oct 2010)
+- config-os400.h: enable system strdup(), strcmpi(), etc.
 
-Daniel Stenberg (12 Oct 2010)
-- RELEASE-NOTES: synced with ecd624b8e774a85
+- x509asn1.c,x509asn1.h: new module to support ASN.1/X509 parsing & info extract
+  Use from qssl backend
 
-- [Julien Chaffraix brought this change]
+- ssluse.c,sslgen.c,sslgen.h: move certinfo support to generic SSL
 
-  CMake: Build fix.
-  
-  Do not match the trailing '\n' in the regular expression as this would
-  make us dump a ) parenthesis on a new line.
-  
-  This fixes the following error:
-  
-  would get transformed into:
+- Merge branch 'master' of github.com:bagder/curl
   
-  )
+  Merge for resync
+
+- slist.c, slist.h, cookie.c: new internal procedure Curl_slist_append_nodup()
+
+Yang Tse (15 Jul 2013)
+- sslgen.c: fix Curl_rand() compiler warning
   
-  Bug: http://curl.haxx.se/mail/lib-2010-10/0065.html
-  Reported by: Dimitre Dimitrov
+  Use simple seeding method upon RANDOM_FILE seeding method failure.
+
+- sslgen.c: fix unreleased Curl_rand() infinite recursion
+
+Daniel Stenberg (14 Jul 2013)
+- [Dave Reisner brought this change]
 
-- header_callback: strip off file path separated with backslashes
+  src/tool: allow timeouts to accept decimal values
   
-  If the filename contains a backslash, only use filename portion. The
-  idea is that even systems that don't handle backslashes as path
-  separators probably want that path removed for convenience.
+  Implement wrappers around strtod to convert the user argument to a
+  double with sane error checking. Use this to allow --max-time and
+  --connect-timeout to accept decimal values instead of strictly integers.
   
-  This flaw is considered a security problem, see the curl security
-  vulnerability http://curl.haxx.se/docs/adv_20101013.html
+  The manpage is updated to make mention of this feature and,
+  additionally, forewarn that the actual timeout of the operation can
+  vary in its precision (particularly as the value increases in its
+  decimal precision).
 
-Dan Fandrich (12 Oct 2010)
-- Get the curl source files for Amiga from Makefile.inc
-  
-  This is similar to how it's done in the lib directory.
-  The Amiga build appears to have been broken for a year because
-  of a missing homedir.c
+- [Dave Reisner brought this change]
 
-- Added section on server-supplied names to security considerations
+  curl.1: fix long line, found by checksrc.pl
 
-Guenter Knauf (12 Oct 2010)
-- Fixed Watcom makefile.
+- [Dave Reisner brought this change]
 
-- Added build bits for librtmp / libssh2 to Watcom makefiles.
+  src/tool_paramhlp: try harder to catch negatives
+  
+  strto* functions happily chomp off leading whitespace, so simply
+  checking for str[0] can lead to false negatives. Do the full parse and
+  check the out value instead.
 
-- Added build bits for librtmp to NetWare makefiles.
+- [John E. Malmberg brought this change]
 
-Daniel Stenberg (12 Oct 2010)
-- SFTP: more ignoring negative file sizes
+  build_vms.com: detect and use zlib shared image
   
-  As the change in 5f0ae7a0626cbe709 added a precaution against negative
-  file sizes that for some reason managed to get returned, this change now
-  introduces the same check at the second place in the code where the file
-  size from the libssh2 stat call is used.
+  Update the build_vms.com to detect and use zlib shared image installed
+  by the ZLIB kit produced by Jean-Francois Pieronne, and the also the
+  future ZLIB 1.2.8 kit in addition to the older ZLIB kits.
   
-  This check might not be suitable for a 32 bit curl_off_t, but libssh2.h
-  assumes long long to work and to be 64 bit so I believe such a small
-  curl_off_t will be very unlikely to occur in the wild.
-
-- SMTP: debug output for no known auth mechanisms supported
+  Also fix the indentation to match one of the common standards used for
+  VMS DCL command files and removed the hard tab characters.
   
-  ... and some minor source code whitespace edits
+  Tested on OpenVMS 8.4 Alpha and IA64, and OpenVMS 7.3 VAX.
 
-- test: urlglob error messages have no extra newline anymore
+Yang Tse (14 Jul 2013)
+- url.c: fix parse_url_login() OOM handling
 
-Guenter Knauf (11 Oct 2010)
-- Added build bits for librtmp to MingW32 makefiles.
+- http_digest.c: SIGSEGV and OOM handling fixes
 
-Daniel Stenberg (8 Oct 2010)
-- RELEASE-NOTES: synced with 61f4cdb73ae4
+- url.c: fix parse_login_details() OOM handling
 
-- globbing: fix crash on unballanced open brace
-  
-  Having an open brace without a closing brace caused a segfault.
-  
-  Having a closing brace too many caused a silent error to occur, which
-  caused curl to bail out and return an error code but no error message
-  was shown. It does now!
-  
-  All error message outputs no longer wrongly get _two_ newlines written
-  after the error message.
+- [John E. Malmberg brought this change]
+
+  setup-vms.h: sk_pop symbol tweak
   
-  Reported by: Vlad Ureche
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3083942
+  Newer versions of curl are referencing a sk_pop symbol while the HP
+  OpenSSL library has the symbol in uppercase only.
 
-- [Dan Locks brought this change]
+- getinfo.c: fix enumerated type mixed with another type
 
-  libcurl.m4: AC_PATH_PROG fixes
-  
-  The invocation of autoconf's AC_PATH_PROG( ) is not quite right for
-  finding curl-config. This fix corrects the negative case (where
-  curl-config is not found).
+- test 1511: fix enumerated type mixed with another type
 
-- FAQ: added "How do I submit my patch?"
+- url.c: fix SIGSEGV
 
-- examples: use example.com in example URLs
+- dotdot.c: fix global declaration shadowing
 
-- TODO-RELEASE: libidn problem not repeatable
-  
-  "261 - configure and libidn" is removed from the list since Julien
-  Chaffraix tried to repeat it but failed and the reporter did not return
-  to provide further details.
-  
-  Reported by: Lyndon Hill
-  Bug: http://curl.haxx.se/mail/lib-2010-07/0029.html
+- easy.c: fix global declaration shadowing
 
-- libcurl.m4: mention argument is PREFIX
+Kamil Dudka (9 Jul 2013)
+- Revert "curl.1: document the --time-cond option in the man page"
   
-  The macro provides a --with-libcurl option that expects a PREFIX to be
-  specified and not actually a "directory" in which libcurl will be found.
-  This now spells that out more clearly.
+  This reverts commit 3a0e931fc715a80004958794a96b12cf90503f99 because
+  the documentation of --time-cond was duplicated by mistake.
   
-  Reported by: Dan Locks
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3079891
+  Reported by: Dave Reisner
 
-Guenter Knauf (3 Oct 2010)
-- Some NetWare makefile tweaks.
-  
-  Renamed SDK_* to NDK_*; made NDK_* defines overwriteable from
-  environment; removed now obsolete YACC macro;
-  moved some curl_config.h defines to IPv6 section since they
-  are only needed when IPv6 is enabled - this makes libcurl compile
-  with older NDKs too which were not IPv6-aware.
+- curl.1: document the --sasl-ir option in the man page
 
-Daniel Stenberg (2 Oct 2010)
-- TODO-RELEASE: 416 error fixed
-  
-  "3076808 Requests fail silently following a 416 error" done
+- curl.1: document the --post303 option in the man page
 
-Julien Chaffraix (2 Oct 2010)
-- krb5-gssapi: Removed a memory leak in krb5_auth.
-  
-  We forgot to release the buffer passed to gss_init_sec_context.
-  
-  The previous logic was difficult to read as we were reusing the same
-  variable (gssbuf) for both input buffer and output buffer. Splitted the
-  logic in 2 variables to better underline who needs to be released.
-  Also made the code break at 80 lines.
+- curl.1: document the --time-cond option in the man page
 
-- krb5-gssapi: Made the function always return a value.
-  
-  kr5_auth missed a final 'return' statement. This is not an error in
-  gcc but can lead to potential bugs.
+Yang Tse (9 Jul 2013)
+- configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)
 
-- krb5-gssapi: Delete the GSS-API context.
-  
-  This fixes a memory leak related to the GSS-API code.
-  
-  Added a krb5_init and krb5_end functions. Also removed a work-around
-  the lack of proper initialization of the GSS-API context.
+- xc-am-iface.m4: provide XC_AUTOMAKE macro
 
-Daniel Stenberg (2 Oct 2010)
-- HTTP: remove special case for 416
-  
-  It was pointed out that the special case libcurl did for 416 was
-  incorrect and wrong. 416 is not really different to other errors so the
-  response body must be handled like for other errors/http responses.
+Guenter Knauf (8 Jul 2013)
+- Added winssl-zlib target to VC builds.
+
+- Synced Makefile.vc6 with recent changes.
   
-  Reported by: Chris Smowton
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3076808
+  Issue posted to the list by malinowsky AT FTW DOT at.
 
-- [Dan Fandrich brought this change]
+- Added libmetalink URL; added Android versions.
 
-  sws: Added writedelay HTTP server command
+Dan Fandrich (3 Jul 2013)
+- examples: Moved usercertinmem.c to COMPLICATED_EXAMPLES
   
-  This delays between write operations, hopefully making it easier
-  to spot problems where libcurl doesn't flush the socket properly
-  before waiting for the next response.
+  This prevents it from being built during a "make check" since it
+  depends on OpenSSL.
 
-- TODO-RELEASE: no bug in ftp_nextconnect
-  
-  The issue named "266 - Bug in ftp_nextconnect?" was deemed to not be a
-  bug and instead resulted in clarified docs.
+Nick Zitzmann (2 Jul 2013)
+- Merge branch 'master' of https://github.com/bagder/curl
 
-- curl_easy_setopt.3: CURLOPT_DIRLISTONLY implies dir list
+- darwinssl: SSLv2 connections are aborted if unsupported by the OS
   
-  Make it explicit that setting CURLOPT_DIRLISTONLY to 1 will make libcurl
-  to list the directory.
+  I just noticed that OS X no longer supports SSLv2. Other TLS engines return
+  an error if the requested protocol isn't supported by the underlying
+  engine, so we do that now for SSLv2 if the framework returns an error
+  when trying to turn on SSLv2 support. (Note: As always, SSLv2 support is
+  only enabled in curl when starting the app with the -2 argument; it's off
+  by default. SSLv2 is really old and insecure.)
 
-- RELEASE-NOTES: synced up to 588402585bae
+Marc Hoersken (1 Jul 2013)
+- lib506.c: Fixed possible use of uninitialized variables
 
-- TODO-RELEASE: move new features to next release
+Kamil Dudka (30 Jun 2013)
+- url: restore the functionality of 'curl -u :'
+  
+  This commit fixes a regression introduced in
+  fddb7b44a79d78e05043e1c97e069308b6b85f79.
+  
+  Reported by: Markus Moeller
+  Bug: http://curl.haxx.se/mail/archive-2013-06/0052.html
 
-- README.ares: we know require c-ares 1.6.0
+Daniel Stenberg (25 Jun 2013)
+- digest: append the timer to the random for the nonce
 
-- SFTP: avoid downloading negative sizes!
+- digest: improve nonce generation
   
-  It is still not clarified exactly why this happens, but libssh2
-  sometimes report a negative file size for the remote SFTP file and that
-  deeply confuses libcurl (or crashes it) so this precaution is added to
-  avoid badness.
-  
-  Reported by: Ernest Beinrohr
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3076430
+  Use the new improved Curl_rand() to generate better random nonce for
+  Digest auth.
 
-- TODO-RELEASE: drop curl_easy_setoptv
+- curl.1: fix typo in --xattr description
   
-  I haven't read any really convincing arguments for adding it
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1252
+  Reported-by: Jean-Noël Rouvignac
 
-- [Dirk Manske brought this change]
+- RELEASE-NOTES: synced with 365c5ba39591
+  
+  The 10 first bug fixes for the pending release...
 
-  multi & hiper examples: updates and cleanups
+- formpost: better random boundaries
   
-  all multi and hiper examples:
+  When doing multi-part formposts, libcurl used a pseudo-random value that
+  was seeded with time(). This turns out to be bad for users who formpost
+  data that is provided with users who then can guess how the boundary
+  string will look like and then they can forge a different formpost part
+  and trick the receiver.
   
-  * don't loop curl_multi_perform calls, that was <7.20.0 style, currently
-    the exported multi functions will not return CURLM_CALL_MULTI_PERFORM
+  My advice to such implementors is (still even after this change) to not
+  rely on the boundary strings being cryptographically strong. Fix your
+  code and logic to not depend on them that much!
   
-  all hiper examples:
-  * renamed check_run_count to check_multi_info
-  * don't  compare current running handle count with previous value, this
-    was the wrong way to check for finished requests, simply call
-    curl_multi_info_read
-  * it's also safe to call curl_multi_remove_handle inside the
-    curl_multi_info_read loop.
+  I moved the Curl_rand() function into the sslgen.c source file now to be
+  able to take advantage of the SSL library's random function if it
+  provides one. If not, try to use the RANDOM_FILE for seeding and as a
+  last resort keep the old logic, just modified to also add microseconds
+  which makes it harder to properly guess the exact seed.
   
-  ghiper.c:
-  * replaced curl_multi_socket (that function is marked as obsolete) calls
-    with curl_multi_socket_action calls (as in hiperfifo.c and
-    evhiperfifo.c)
+  The formboundary() function in formdata.c is now using 64 bit entropy
+  for the boundary and therefore the string of dashes was reduced by 4
+  letters and there are 16 hex digits following it. The total length is
+  thus still the same.
   
-  ghiper.c and evhiperfifo.c:
-  * be smart as hiperfifo.c, don't do uncessary curl_multi_* calls in
-    new_conn and main
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1251
+  Reported-by: "Floris"
 
-- TODO-RELEASE: one fixed, one postponed, one added
+- printf: make sure %x are treated unsigned
   
-  As we're already in feature freeze, I pushed the feature onwards.
+  When using %x, the number must be treated as unsigned as otherwise it
+  would get sign-extended on for example 64bit machines and do wrong
+  output. This problem showed when doing printf("%08x", 0xffeeddcc) on a
+  64bit host.
 
-Dan Fandrich (29 Sep 2010)
-- Renamed test1204 to test1117 to move it into the normal range
+- tests: add test1395 to the tarball
 
-Patrick Monnerat (29 Sep 2010)
-- Add gopher protocol definition to ILE/RPG binding.
-  OS400 compile script in test dir updated for chkhostname.
-
-Julien Chaffraix (28 Sep 2010)
-- krb5-gssapi: Remove several memory leaks.
-  
-  Remove a leak seen on Kerberos/MIT (gss_OID is copied internally and
-  we were leaking it). Now we just pass NULL as advised in RFC2744.
+- SIGPIPE: don't use 'data' in sigpipe restore
   
-  |tmp| was never set back to buf->data.
+  Follow-up fix from 7d80ed64e43515.
   
-  Cleaned up Curl_sec_end to take into account failure in Curl_sec_login
-  (where conn->mech would be NULL but not conn->app_data or
-  conn->in_buffer->data).
+  The SessionHandle may not be around to use when we restore the sigpipe
+  sighandler so we store the no_signal boolean in the local struct to know
+  if/how to restore.
 
-- security.c: Remove Curl_sec_fflush_fd.
+- TODO: 1.8 Modified buffer size approach
   
-  The current implementation would make us send wrong data on a closed
-  socket. We don't buffer our data so the method can be safely removed.
+  Thoughts around buffer sizes and what might be possible to do...
 
-- security.c: We should always register the socket handler.
+- c-ares: improve error message on failed resolve
   
-  Following a change in the way socket handler are registered, the custom
-  recv and send method were conditionaly registered.
-  We need to register them everytime to handle the ftp security
-  extensions.
+  When the c-ares based resolver backend failed to resolve a name, it
+  tried to show the name that failed from existing structs. This caused
+  the wrong output and shown hostname when for example --interface
+  [hostname] was used and that name resolving failed.
   
-  Re-added the clear text handling in sec_recv.
-
-- security.c: Fix Curl_sec_login after rewrite.
+  Now we use the hostname used in the actual resolve attempt in the error
+  message as well.
   
-  Curl_sec_login was returning the opposite result that the code in ftp.c
-  was expecting. Simplified the return code (using a CURLcode) so to see
-  more clearly what is going on.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1191
+  Reported-by: Kim Vandry
 
-- security.c: Readd the '\n' to the infof() calls.
+- ossl_recv: check for an OpenSSL error, don't assume
+  
+  When we recently started to treat a zero return code from SSL_read() as
+  an error we also got false positives - which primarily looks to be
+  because the OpenSSL documentation is wrong and a zero return code is not
+  at all an error case in many situations.
   
-  They are not automatically added and make the output of the verbose
-  mode a lot more readable.
+  Now ossl_recv() will check with ERR_get_error() to see if there is a
+  stored error and only then consider it to be a true error if SSL_read()
+  returned zero.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1249
+  Reported-by: Nach M. S.
+  Patch-by: Nach M. S.
 
-- security.c: Fix typo (PSBZ -> PBSZ)
+Nick Zitzmann (22 Jun 2013)
+- Merge branch 'master' of https://github.com/bagder/curl
 
-- security.c: Fix ftp_send_command.
+- darwinssl: fix crash that started happening in Lion
   
-  My use of va_args was completely wrong. Fixed the usage so that
-  we send the right commands!
+  Something (a recent security update maybe?) changed in Lion, and now it
+  has changed SSLCopyPeerTrust such that it may return noErr but also give
+  us a null trust, which caught us off guard and caused an eventual crash.
 
-Daniel Stenberg (28 Sep 2010)
-- curl_easy_escape: don't escape "unreserved" characters
+Daniel Stenberg (22 Jun 2013)
+- SIGPIPE: ignored while inside the library
   
-  According to RFC3986 section 2.3 the letters -, ., _ and ~ should not be
-  percent-encoded.
+  ... and restore the ordinary handling again when it returns. This is
+  done for curl_easy_perform() and curl_easy_cleanup() only for now - and
+  only when built to use OpenSSL as backend as this is the known culprit
+  for the spurious SIGPIPEs people have received.
   
-  Reported by: Miguel Diaz
-  Bug: http://curl.haxx.se/mail/lib-2010-09/0227.html
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1180
+  Reported by: Lluís Batlle i Rossell
 
-- multi: don't expire timeouts at disonnect or done
-  
-  The functions Curl_disconnect() and Curl_done() are both used within the
-  scope of a single request so they cannot be allowed to use
-  Curl_expire(... 0) to kill all timeouts as there are some timeouts that
-  are set before a request that are supposed to remain until the request
-  is done.
-  
-  The timeouts are now instead cleared at curl_easy_cleanup() and when the
-  multi state machine changes a handle to the complete state.
+- KNOWN_BUGS: #83 unable to load non-default openssl engines
 
-Dan Fandrich (27 Sep 2010)
-- Changed the TPF make file to get source files from Makefile.inc
+- test1396: invoke the correct test tool!
   
-  Patch was fixed and validated by David McCreedy.
+  This erroneously run unit test 1310 instead of 1396!
 
-- Added test case 1204 to test HTTP range failure
+Kamil Dudka (22 Jun 2013)
+- test1230: avoid using hard-wired port number
   
-  This is an attempt to reproduce bug #3076808
+  ... to prevent failure when a non-default -b option is given
 
-Daniel Stenberg (27 Sep 2010)
-- [Dirk Manske brought this change]
+- curl-config.in: replace tabs by spaces
 
-  multi_runsingle: set timeout error messages
+Nick Zitzmann (22 Jun 2013)
+- darwinssl: reform OS-specific #defines
   
-  With the latest changes to fix the timeout handling with multi interface
-  we lost the timeout error messages. This patch brings them back.
+  This doesn't need to be in the release notes. I cleaned up a lot of the #if
+  lines in the code to use MAC_OS_X_VERSION_MIN_REQUIRED and
+  MAC_OS_X_VERSION_MAX_ALLOWED instead of checking for whether things like
+  __MAC_10_6 or whatever were defined, because for some SDKs Apple has released
+  they were defined out of place.
 
-- TODO-RELEASE: updated list of issues to work on
+Daniel Stenberg (22 Jun 2013)
+- [Alessandro Ghedini brought this change]
 
-- parsedate: allow time specified without seconds
-  
-  The date format in RFC822 allows that the seconds part of HH:MM:SS is
-  left out, but this function didn't allow it. This change also includes a
-  modified test case that makes sure that this now works.
-  
-  Reported by: Matt Ford
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3076529
+  docs: fix typo in curl_easy_getinfo manpage
 
-- TFTP: re-indented the source code
+- dotdot: introducing dot file path cleanup
   
-  Just made sure that the good old curl indentation style is used all over
-  this file.
-
-- [Tim Newsome brought this change]
-
-  TFTP: Work around tftpd-hpa upload bug
+  RFC3986 details how a path part passed in as part of a URI should be
+  "cleaned" from dot sequences before getting used. The described
+  algorithm is now implemented in lib/dotdot.c with the accompanied test
+  case in test 1395.
   
-  tftpd-hpa has a bug where it will send an incorrect ack when the block
-  counter wraps and tftp options have been sent. Work around that by
-  accepting an ack for 65535 when we're expecting one for 0.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1200
+  Reported-by: Alex Vinnik
 
-- Revert "security.c: buffer_read various fixes."
-  
-  This reverts commit fbb38de415b7bb7d743e53a7b4b887ffb12b3e5b.
+- bump: start working towards what most likely will become 7.32.0
 
-- security.c: removed superfluous parentheses
-  
-  And also removed the FIXME where memory was zeroed just before freed,
-  and some other minor whitespace changes.
+- THANKS: added 24 new contributors from the 7.31.0 release
 
-- [Julien Chaffraix brought this change]
+Version 7.31.0 (22 Jun 2013)
 
-  security.c: Update the #include statements after the rewrite.
+Daniel Stenberg (22 Jun 2013)
+- RELEASE-NOTES: synced with 0de7249bb39a2 - 7.31.0
 
-- [Julien Chaffraix brought this change]
+- unit1396: unit tests to verify curl_easy_(un)escape
 
-  security.c: sec_write tweaks
+- Curl_urldecode: no peeking beyond end of input buffer
   
-  - |fd| is now a curl_socket_t and |len| a size_t to avoid conversions.
-  - Added 2 FIXMEs about the 2 unsigned -> signed conversions.
-  - Included 2 minor changes to Curl_sec_end.
-
-- [Julien Chaffraix brought this change]
-
-  security.c: _sec_send tweaks
+  Security problem: CVE-2013-2174
   
-  - Renamed the method to sec_send now that we
-    renamed sec_send to do_sec_send.
-  - Some more variable renaming.
-
-- [Julien Chaffraix brought this change]
-
-  security.c: sec_read tweaks
+  If a program would give a string like "%FF" to curl_easy_unescape() but
+  ask for it to decode only the first byte, it would still parse and
+  decode the full hex sequence. The function then not only read beyond the
+  allowed buffer but it would also deduct the *unsigned* counter variable
+  for how many more bytes there's left to read in the buffer by two,
+  making the counter wrap. Continuing this, the function would go on
+  reading beyond the buffer and soon writing beyond the allocated target
+  buffer...
   
-  - Renamed the function to sec_recv.
-  - Renamed the parameters and variable to match the rest of the code.
+  Bug: http://curl.haxx.se/docs/adv_20130622.html
+  Reported-by: Timo Sirainen
 
-- [Julien Chaffraix brought this change]
+Guenter Knauf (20 Jun 2013)
+- Use opened body.out file and write content to it.
 
-  security.c: Curl_sec_fflush_fd tweaks
+Daniel Stenberg (20 Jun 2013)
+- multi_socket: react on socket close immediately
   
-  - Use an early return as it makes the code more readable.
-  - Added a FIXME about a conversion.
-
-- [Julien Chaffraix brought this change]
-
-  security.c: sec_send tweaks
+  As a remedy to the problem when a socket gets closed and a new one is
+  opened with the same file descriptor number and as a result
+  multi.c:singlesocket() doesn't detect the difference, the new function
+  Curl_multi_closed() gets told when a socket is closed so that it can be
+  removed from the socket hash. When the old one has been removed, a new
+  socket should be detected fine by the singlesocket() on next invoke.
   
-  - Renamed it to do_sec_send as it is the function doing the actual
-    transfer.
-  - Do not return any values as no one was checking it and it never
-    reported a failure (added a FIXME about checking for errors).
-  - Renamed the variables to make their use more specific.
-  - Removed some casts (int -> curl_socket_t, ...)
-  - Avoid doing the htnl <-> nthl twice by caching the 2 results.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1248
+  Reported-by: Erik Johansson
+
+- RELEASE-NOTES: synced with e305f5ec715f
 
-- [Julien Chaffraix brought this change]
+- TODO: mention the DANE patch from March
 
-  security.c: Curl_sec_read_msg tweaks
+- CURLOPT_COOKIELIST: take cookie share lock
   
-  - Renamed the variables name to better match their intend.
-  - Unified the |decoded_len| checks.
-  - Added some FIXMEs to flag some improvement that did not go in this
-    change.
+  When performing COOKIELIST operations the cookie lock needs to be taken
+  for the cases where the cookies are shared among multiple handles!
+  
+  Verified by Benjamin Gilbert's updated test 506
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1215
+  Reported-by: Benjamin Gilbert
 
-- [Julien Chaffraix brought this change]
+- [Benjamin Gilbert brought this change]
 
-  security.c: Curl_sec_set_protection_level tweaking
+  test506: verify that CURLOPT_COOKIELIST takes share lock
   
-  - Removed sec_prot_internal as it is now inlined in the function (this removed
-    a redundant check).
-  - Changed the prototype to return an error code.
-  - Updated the method to use the new ftp_send_command function.
-  - Added a level_to_char helper method to avoid relying on the compiler's
-    bound checks. This default to the maximum security we have in case of a
-    wrong input.
+  It doesn't right now: http://curl.haxx.se/bug/view.cgi?id=1215
 
-- [Julien Chaffraix brought this change]
+- TODO: HTTP2/SPDY support
 
-  security.c: factored the logic from Curl_sec_login into a dedicated method that better reflect its intent.
+- curl_easy_setopt.3: clarify CURLOPT_PROGRESSFUNCTION frequency
   
-  Introduced a helper method ftp_send_command that synchronously send
-  an FTP query.
+  Make it clearer that the CURLOPT_PROGRESSFUNCTION callback will be
+  called more frequently than once per second when things are happening.
 
-- [Julien Chaffraix brought this change]
-
-  security.c: Remove out_buffer as it was never written into.
+- RELEASE-NOTES: synced with 9c3e098259b82
+  
+  Mention 7 recent bug fixes and their associated contributors
 
-- [Julien Chaffraix brought this change]
+- curl_multi_wait.3: clarify the numfds counter
 
-  security.c: buffer_read various fixes.
+- curl_easy_perform: avoid busy-looping
   
-  Tighten the type of the |data| parameter to avoid a cast. Also made
-  it const as we should not modify it.
+  When curl_multi_wait() finds no file descriptor to wait for, it returns
+  instantly and this must be handled gracefully within curl_easy_perform()
+  or cause a busy-loop. Starting now, repeated fast returns without any
+  file descriptors is detected and a gradually increasing sleep will be
+  used (up to a max of 1000 milliseconds) before continuing the loop.
   
-  Added a DEBUGASSERT on the size to be written while changing it.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1238
+  Reported-by: Miguel Angel
 
-- [Julien Chaffraix brought this change]
+- [YAMADA Yasuharu brought this change]
 
-  security.c: Made block_write return a CURLcode.
+  cookies: follow-up fix for path checking
   
-  While doing so, renamed it to socket_write to better match its
-  function.
+  The initial fix to only compare full path names were done in commit
+  04f52e9b4db0 but found out to be incomplete. This takes should make the
+  change more complete and there's now two additional tests to verify
+  (test 31 and 62).
 
-- [Julien Chaffraix brought this change]
+- [Sergei Nikulov brought this change]
 
-  security.c: Made block_read and sec_get_data return CURLcode.
+  lib1900: use tutil_tvnow instead of gettimeofday
   
-  To do so, made block_read call Curl_read_plain instead of read.
-  
-  While changing them renamed block_read to socket_read and sec_get_data
-  to read_data to better match their function.
-  
-  Also fixed a potential memory leak in block_read.
+  Makes it build on windows
 
-- [Julien Chaffraix brought this change]
+- [Eric Hu brought this change]
 
-  Security.c: Fix headers guard to match the rest of the code.
+  axtls: now done non-blocking
 
-- [Julien Chaffraix brought this change]
+- [Eric Hu brought this change]
 
-  configure: Fix the LDAPS disable message
-  
-  ... for example when LDAP is not compiled.
-  
-  Fixed the logic to match the rest of the options' message that is we
-  update the default message only if the option is not disabled after the
-  different checks.
-  
-  Reported by: Guenter Knauf
+  test2033: requires NTLM support
 
-- RELEASE-NOTES: sync with 8665d4e5 and c-ares >= 1.6.0 note
+- KNOWN_BUGS: #82 failed build with Borland compiler
 
-- parse_remote_port: ignore colons without port number
+- Curl_output_digest: support auth-int for empty entity body
   
-  Obviously, browsers ignore a colon without a following port number. Both
-  Firefox and Chrome just removes the colon for such URLs. This change
-  does not remove the colon for URLs sent over a HTTP proxy, so we should
-  consider doing that change as well.
+  By always returning the md5 for an empty body when auth-int is asked
+  for, libcurl now at least sometimes does the right thing.
   
-  Reported by: github user 'kreshano'
-
-- RELEASE-NOTES: in sync with 19f45eaa799
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1235
+  Patched-by: Nach M. S.
 
-- duphandle: use ares_dup()
+- multi_socket: reduce timeout inaccuracy margin
   
-  curl_easy_duphandle() was not properly duping the ares channel. The
-  ares_dup() function was introduced in c-ares 1.6.0 so by starting to use
-  this function we also raise the bar and require c-ares >= 1.6.0
-  (released Dec 9, 2008) for such builds.
+  Allow less room for "triggered too early" mistakes by applications /
+  timers on non-windows platforms. Starting now, we assume that a timeout
+  call is never made earlier than 3 milliseconds before the actual
+  timeout. This greatly improves timeout accuracy on Linux.
   
-  Reported by: Ning Dong
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0318.html
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1228
+  Reported-by: Hang Su
 
-- [Hendrik Visage brought this change]
-
-  MacOSX-Framework: updates for Snowleopard
-  
-  1) PPC64 appears to be an 10.5 only supported architecture, so I
-  forced 10.5 for 64bit if there is a need for PPC64, else 64bit only
-  does x86_64
+- cert_stuff: avoid double free in the PKCS12 code
   
-  2) proper "make clean" after every ./configure. fixes a bug where
-  subsequent runs the 32bit do not get compiled
+  In the pkcs12 code, we get a list of x509 records returned from
+  PKCS12_parse but when iterating over the list and passing each to
+  SSL_CTX_add_extra_chain_cert() we didn't also properly remove them from
+  the "stack", which made them get freed twice (both in sk_X509_pop_free()
+  and then later in SSL_CTX_free).
   
-  3) Added a version numbering curl-$VERSION} rather than the "stock standard" A
-
-- RELEASE-NOTES: synced with 5fcc4332d62fe
+  This isn't really documented anywhere...
   
-  Removed the duplicate entry of Kamil in the credits.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1236
+  Reported-by: Nikaiw
 
-- configure: don't enable RTMP if the lib detect fails
-  
-  librtmp is often statically linked and using sub dependencies like
-  OpenSSL, so we need to make sure we can actually link with it properly
-  before enabling it. Otherwise we easily end up trying to link with a
-  RTMP lib that fails.
+- cert_stuff: remove code duplication in the pkcs12 logic
 
-- TODO: added 8.4 non-gcrypt under GnuTLS
-  
-  We must not assume gcrypt just because of GnuTLS
+- [Aleksey Tulinov brought this change]
 
-- configure: check for gcrypt if using GnuTLS
-  
-  1 - libcurl assumes that there are gcrypt functions available when
-  GnuTLS is.
+  axtls: honor disabled VERIFYHOST
   
-  2 - GnuTLS can be built to use libnettle instead as crypto library,
-  which breaks assumption (1)
-  
-  This change makes configure make sure that if GnuTLS is requested and
-  detected, it also makes sure that gcrypt is present or it errors
-  out. This is mostly a way to make the user more aware of this flaw, the
-  correct fix would be to detect which crypto layer that is in use and
-  adapt our code to use that instead of blindly assuming gcrypt.
-  
-  Reported by: Michal Gorny
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3071038
+  When VERIFYHOST == 0, libcurl should let invalid certificates to pass.
 
-- RELEASE-NOTES: sync from d2a7fd2fe65b to HEAD
+- [Peter Gal brought this change]
 
-- FTP: fix bad check of Curl_timeleft() return code
+  curl_easy_setopt.3: HTTP header with no content
   
-  When it returns 0 it means no timeout. Only a negative value means that
-  we're out of time.
+  Update the documentation on how to specify a HTTP header with no
+  content.
 
-- LDAP: moved variable declaration to avoid compiler warn
+- RELEASE-NOTES: synced with 87cf677eca55
   
-  If built without HTTP or proxy support it would cause a compiler warning
-  due to the unused variable. I moved the declaration of it into the only
-  scope it is used.
+  Added 11 bugs and 7 contributors
 
-Tor Arntsen (18 Sep 2010)
-- LDAP: Use FALSE instead of bool_false when setting bits.close
+- lib1500: remove bad check
   
-  bool_false is the internal name used in the setup_once.h definition
-  we fall back to for non-C99 non-stdbool systems, it's not the actual
-  name to use in assignments (we use bool_false, bool_true there to
-  avoid global namespace problems, see comment in setup_once.h).
-  The correct C99 value to use is 'false', but let's use FALSE as
-  used elsewhere when assigning to bits.close. FALSE is set equal
-  to 'false' in setup_once.h when possible.
+  After curl_multi_wait() returns, this test checked that we got exactly
+  one file descriptor told to read from, but we cannot be sure that is
+  true. curl_multi_wait() will sometimes return earlier without any file
+  descriptor to handle, just just because it is a suitable time to call
+  *perform().
   
-  This fixes a build problem on C99 targets.
+  This problem showed up with commit 29bf0598.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-06/0029.html
+  Reported-by: Fabian Keil
 
-- LDAP: Add missing declaration for 'result'
+- tests/Makefile: typo in the perlcheck target
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1239
+  Reported-by: Christian Weisgerber
 
-Daniel Stenberg (18 Sep 2010)
-- [Mauro Iorio brought this change]
+- test1230: verify CONNECT to a numerical ipv6-address
 
-  LDAP: Support for tunnelling queries through HTTP proxy
+- sws: support extracting test number from CONNECT ipv6-address!
   
-  As of curl-7.21.1 tunnelling ldap queries through HTTP Proxies is not
-  supported. Actually if --proxytunnel command-line option (or equivalent
-  CURLOPT_HTTPPROXYTUNNEL) is used for ldap queries like
-  ldap://ldap.my.server.com/... You are unable to successfully execute the
-  query. In facts ldap_*_bind is executed directly against the ldap server
-  and proxy is totally ignored. This is true for both openLDAP and
-  Microsoft LDAP API.
-  
-  Step to reproduce the error:
-  Just launch "curl --proxytunnel --proxy 192.168.1.1:8080
-  ldap://ldap.my.server.com/dc=... "
-  
-  This fix adds an invocation to Curl_proxyCONNECT against the provided
-  proxy address and on successful "CONNECT" it tunnels ldap query to the
-  final ldap server through the HTTP proxy. As far as I know Microsoft
-  LDAP APIs don't permit tunnelling in any way so the patch provided is
-  for OpenLDAP only.  The patch has been developed against OpenLDAP 2.4.23
-  and has been tested with Microsoft ISA Server 2006 and works properly
-  with basic, digest and NTLM authentication.
+  If an ipv6-address is provided to CONNECT, the last hexadecimal group in
+  the address will be used as the test number! For example the address
+  "[1234::ff]" would be treated as test case 255.
 
-- timeout: use the correct start value as offset
+- curl_multi_wait: only use internal timer if not -1
   
-  Rodric provide an awesome recipe that proved libcurl didn't timeout at
-  the requested time - it instead often timed out at [connect time] +
-  [timeout time] instead of the documented and intended [timeout time]
-  only. This bug was due to the code using the wrong base offset when
-  comparing against "now". I could also take the oppurtinity to simplify
-  the code by properly using of the generic help function for this:
-  Curl_timeleft.
+  commit 29bf0598aad5 introduced a problem when the "internal" timeout is
+  prefered to the given if shorter, as it didn't consider the case where
+  -1 was returned. Now the internal timeout is only considered if not -1.
   
-  Reported by: Rodric Glaser
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
+  Reported-by: Tor Arntsen
+  Bug: http://curl.haxx.se/mail/lib-2013-06/0015.html
 
-- Curl_timeleft: avoid returning "no timeout" by mistake
+Dan Fandrich (3 Jun 2013)
+- libcurl-tutorial.3: added a section on IPv6
   
-  As this function uses return code 0 to mean that there is no timeout, it
-  needs to check that it doesn't return a time left value that is exactly
-  zero. It could lead to libcurl doing an extra 1000 ms select() call and
-  thus not timing out as accurately as it should.
+  Also added a (correctly-escaped) backslash to the autoexec.bat
+  example file and a new Windows character device name with
+  a colon as examples of other characters that are special
+  and potentially dangerous (this reverts and reworks commit
+  7d8d2a54).
+
+Daniel Stenberg (3 Jun 2013)
+- curl_multi_wait: reduce timeout if the multi handle wants to
   
-  I fell over this bug when working on the bug 3061535 but this fix does
-  not correct that problem alone, although this is a problem that needs to
-  be fixed.
+  If the multi handle's pending timeout is less than what is passed into
+  this function, it will now opt to use the shorter time anyway since it
+  is a very good hint that the handle wants to process something in a
+  shorter time than what otherwise would happen.
   
-  Reported by: Rodric Glaser
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3061535
-
-- whitespace: unified source
+  curl_multi_wait.3 was updated accordingly to clarify
   
-  if ( => if(
-  while ( => while(
+  This is the reason for bug #1224
   
-  and some other changes in the similar spirit, trying to make the
-  whole file use the same style
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1224
+  Reported-by: Andrii Moiseiev
 
-- remote-header-name: don't output filename when NULL
+- multi_runsingle: switch an if() condition for readability
+  
+  ... because there's an identical check right next to it so using the
+  operators in the check in the same order increases readability.
 
-- [James Bursa brought this change]
+Marc Hoersken (2 Jun 2013)
+- curl_schannel.c: Removed variable unused since 35874298e4
 
-  TheArtOfHttpScripting: use long options
+- curl_setup.h: Fixed redefinition warning using mingw-w64
 
-- [James Bursa brought this change]
+Daniel Stenberg (30 May 2013)
+- multi_runsingle: add braces to clarify the code
 
-  getinmemory: make the example easier to follow
-  
-  1. Remove the comment warning that it's "not been verified to work". It
-     works with no problems in my testing.
-  
-  2. Remove 2 unnecessary includes.
-  
-  3. Remove the myrealloc(). Initialize chunk.memory with malloc() instead
-     of NULL. The comments for these two parts contradicted each other.
+- libcurl-tutorial.3: remove incorrect backslash
   
-  4. Handle out of memory from realloc() instead of continuing.
+  A single backslash in the content is not legal nroff syntax.
   
-  5. Print a brief status message at the end.
+  Reported and fixed by: Eric S. Raymond
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1234
 
-- multi: don't do extra expire calls for the connection
+- curl_formadd.3: fixed wrong "end-marker" syntax
   
-  The timeout is set for the connect phase already at the start of the
-  request so we should not add a new one, and we MUST not set expire to 0
-  as that will remove any other potentially existing timeouts.
+  Reported and fixed by: Eric S. Raymond
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1233
 
-- [Peter Pentchev brought this change]
+- curl.1: clarify that --silent still outputs data
 
-  Fix a bashism: test a = b is more portable than ==.
-
-- glob_word: remove a check that is always false
-
-- inflate_stream: remove redundant check that is always true
-
-- digest: make it clear the condition is always true
-
-- ssluse: removed redundant check that is always true
-
-Dan Fandrich (11 Sep 2010)
-- Link curl and the test apps with -lrt explicitly when necessary
+- Digest auth: escape user names with \ or " in them
+  
+  When sending the HTTP Authorization: header for digest, the user name
+  needs to be escaped if it contains a double-quote or backslash.
   
-  When curl calls a function from that library then it needs to
-  explicitly link to the library instead of piggybacking on
-  libcurl's own dependency.  Without this, GNU ld with the
-  --no-add-needed flag fails when linking (which Fedora now does
-  by default).
+  Test 1229 was added to verify
   
-  Reported by: Quanah Gibson-Mount
-  Bug: http://curl.haxx.se/mail/lib-2010-09/0085.html
+  Reported and fixed by: Nach M. S
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1230
 
-- Mention the Debian Popularity Contest
+- [Mike Giancola brought this change]
 
-Tor Arntsen (9 Sep 2010)
-- test565: Don't hardcode IP:PORT
+  ossl_recv: SSL_read() returning 0 is an error too
   
-  Use %HOSTIP:%HTTPPORT instead of 127.0.0.1:8990 so that
-  verification works if the baseport change option is used
-  when executing runtests.pl.
+  SSL_read can return 0 for "not successful", according to the open SSL
+  documentation: http://www.openssl.org/docs/ssl/SSL_read.html
 
-Daniel Stenberg (9 Sep 2010)
-- curl.1: updated protocols and polished language
+- [Mike Giancola brought this change]
 
-- FAQ: CURL_STATICLIB for visual studio users
+  ossl_send: SSL_write() returning 0 is an error too
   
-  Clarified as it isn't used with a -D option for them.
+  We found that in specific cases if the connection is abruptly closed,
+  the underlying socket is listed in a close_wait state. We continue to
+  call the curl_multi_perform, curl_mutli_fdset etc. None of these APIs
+  report the socket closed / connection finished.  Since we have cases
+  where the multi connection is only used once, this can pose a problem
+  for us. I've read that if another connection was to come in, curl would
+  see the socket as bad and attempt to close it at that time -
+  unfortunately, this does not work for us.
   
-  Reported by: Artfunkel
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3060381
+  I found that in specific situations, if SSL_write returns 0, curl did
+  not recognize the socket as closed (or errored out) and did not report
+  it to the application. I believe we need to change the code slightly, to
+  check if ssl_write returns 0. If so, treat it as an error - the same as
+  a negative return code.
+  
+  For OpenSSL - the ssl_write documentation is here:
+  http://www.openssl.org/docs/ssl/SSL_write.html
 
-- FAQ: updated and added host with custom IP question
+- KNOWN_BUGS: curl -OJC- fails to resume
   
-  Added "3.19 How do I get HTTP from a host using a specific IP address?"
-  and updated some stuff about certs etc.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1169
 
-- chunky parser: only rewind if needed
+- Curl_cookie_add: handle IPv6 hosts
   
-  The code reading chunked encoding attempts to rewind the code if it had
-  read more data than the chunky parser consumes. The rewinding can fail
-  and it will then cause an error. This change now makes the rewinding
-  only happen if pipelining is in use - as that's the only time it really
-  needs to be done.
+  1 - don't skip host names with a colon in them in an attempt to bail out
+  on HTTP headers in the cookie file parser. It was only a shortcut anyway
+  and trying to parse a file with HTTP headers will still be handled, only
+  slightly slower.
   
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0297.html
-  Reported by: Ron Parker
-
-Kamil Dudka (6 Sep 2010)
-- rtsp: avoid SIGSEGV on malformed header
-
-- rtsp: avoid SIGSEGV on malformed header
-
-Daniel Stenberg (6 Sep 2010)
-- warning: fix conversion to 'int' from 'size_t'
-
-- portabilty: use proper variable type to hold sockets
+  2 - don't skip domain names based on number of dots. The original
+  netscape cookie spec had this oddity mentioned and while our code
+  decreased the check to only check for two, the existing cookie spec has
+  no such dot counting required.
   
-  Curl_getconnectinfo() is changed to return a proper curl_socket_t for
-  the last socket so that it'll work more portably (and cause less
-  compiler warnings).
-
-Guenter Knauf (3 Sep 2010)
-- Trial to fix another compiler warning with braces.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1221
+  Reported-by: Stefan Neis
 
-Dan Fandrich (2 Sep 2010)
-- Use checkprefix() to compare protocol-specific strings
+- curl_easy_setopt.3: expand the PROGRESSFUNCTION section
   
-  Otherwise, there could be problems running in certain locales.
+  Explain the callback and its arguments better and with more descriptive
+  text.
 
-Guenter Knauf (2 Sep 2010)
-- Moved S_ISREG define to setup as suggested by Dan.
+- tests: add test1394 file to the tarball
 
-- Use own typedef as workaround for broken sspi.h header (f.e. Watcom).
+- tarball: include the xmlstream example
 
-- Added some hacks in order to build with VC from git.
+- [David Strauss brought this change]
+
+  xmlstream: XML stream parsing example source code
   
-  Adam Light posted this patch to the list which enables builds from
-  git with VC versions other than vc6; also he added a vc10 target.
+  Add an XML stream parsing example using Expat. Add missing ignore for
+  the binary from an unrelated example.
 
-- Added S_ISREG define for Win32.
+- [YAMADA Yasuharu brought this change]
 
-Daniel Stenberg (1 Sep 2010)
-- multi: fixes for timing out handles
+  cookies: only consider full path matches
   
-  Add a timeout check for handles in the state machine so that they will
-  timeout in all states disregarding what actions that may or may not
-  happen.
+  I found a bug which cURL sends cookies to the path not to aim at.
+  For example:
+  - cURL sends a request to http://example.fake/hoge/
+  - server returns cookie which with path=/hoge;
+    the point is there is NOT the '/' end of path string.
+  - cURL sends a request to http://example.fake/hogege/ with the cookie.
   
-  Fixed a bug in socket_action introduced recently when looping over timed
-  out handles: it wouldn't assign the 'data' variable and thus it wouldn't
-  properly take care of handles.
+  The reason for this old "feature" is because that behavior is what is
+  described in the original netscape cookie spec:
+  http://curl.haxx.se/rfc/cookie_spec.html
   
-  In the update_timer function, the code now checks if the timeout has
-  been removed and then it tells the application. Previously it would
-  always let the remaining timeout(s) just linger to expire later on.
+  The current cookie spec (RFC6265) clarifies the situation:
+  http://tools.ietf.org/html/rfc6265#section-5.2.4
 
-- threaded resolver: no more expire 0 calls
-  
-  Curl_expire() set to 0 expires ALL timeouts so it should only be called
-  if we truly and really want to remove all timeouts for the handle.
+- [Eric Hu brought this change]
 
-- resolve_server: simplify code
-  
-  Make use of the helper function Curl_timeleft() instead of duplicating
-  code.
+  axtls: prevent memleaks on SSL handshake failures
 
-- multi: make sure the next timeout is used when one expires
+- Revert "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage"
   
-  Each easy handle has a list of timeouts, so as soon as the main timeout
-  for a handle expires, we must make sure to get the next entry from the
-  list and re-add the handle to the splay tree.
+  This reverts commit 8ec2cb5544b86306b702484ea785b6b9596562ab.
   
-  This was attempted previously but was done poorly in my commit
-  232ad6549a68450.
-
-Dan Fandrich (30 Aug 2010)
-- Added proxy keyword to allow skipping test in proxyless configs
-
-Daniel Stenberg (29 Aug 2010)
-- multi: set timeouts when transfer begins
+  We don't have any code anywhere in libcurl (or the curl tool) that use
+  wcsdup so there's no such memory use to track. It seems to cause mild
+  problems with the Borland compiler though that we may avoid by reverting
+  this change again.
   
-  When a new transfer is about to start we now set the proper timeouts to
-  expire for the multi interface if they are set for the handle. This is a
-  follow-up bugfix to make sure that easy handles timeout properly when
-  the times expire and the multi interface is used. This also improves
-  curl_multi_timeout().
-
-- CURLOPT_DIRLISTONLY: don't use with CURLOPT_WILDCARDMATCH
+  Bug: http://curl.haxx.se/mail/lib-2013-05/0070.html
 
-- FAQ: update list of supported protocols
-
-- [Fabian Keil brought this change]
+- RELEASE-NOTES: synced with ae26ee3489588f0
 
-  In the m4 detection line, factor out the 2>dev/null
+Guenter Knauf (11 May 2013)
+- Updated zlib version in build files.
 
-- [Fabian Keil brought this change]
+Daniel Stenberg (9 May 2013)
+- [Renaud Guillard brought this change]
 
-  If m4 doesn't support --version, try if gm4 does.
+  OS X framework: fix invalid symbolic link
 
-- [Fabian Keil brought this change]
+Kamil Dudka (9 May 2013)
+- [Daniel Stenberg brought this change]
 
-  If the m4 version isn't recognized at all, just say so
+  nss: give PR_INTERVAL_NO_WAIT instead of -1 to PR_Recv/PR_Send
   
-  'm4 version  found. You need a GNU m4 installed!' is a bit confusing.
+  Reported by: David Strauss
+  Bug: http://curl.haxx.se/mail/lib-2013-05/0088.html
 
-- HISTORY: mention the gopher story
+Daniel Stenberg (8 May 2013)
+- libtest: gitignore more binary files
 
-Dan Fandrich (25 Aug 2010)
-- Tweaked some test data files
+- servercert: allow empty subject
   
-  Fixed some issues that caused xmllint failures, added features
-  and keywords, fixed some quotes and removed some <strip> sections
-  that unnecessarily limited test checking.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1220
+  Patch by: John Gardiner Myers
 
-- Added new source files to Symbian and TPF makefiles
+- [Steve Holme brought this change]
 
-Daniel Stenberg (25 Aug 2010)
-- RELEASE-NOTES: sync from b980c9a02 to HEAD
+  tests: Added new SMTP tests to verify commit 99b40451836d
 
-- Makefile: add gopher.c file to build
-  
-  As the VC and RISCOS makefiles don't use the .inc file
+- runtests.pl: support nonewline="yes" in client/stdin sections
 
-- runtests: fix uninitialized variable warning
+- build: fixed unit1394 for debug and metlink builds
 
-- gopher tests: revert parts of gopher in the pingpong server
-  
-  Introduced in the initial gopher commits, there was added logic to do
-  GOPHER test serving in the pingpong server but as it resembles HTTP much
-  more than FTP or SMTP, the gopher testing has been moved over to instead
-  use the sws (HTTP) server. This change simply removes unused code.
+Kamil Dudka (6 May 2013)
+- unit1394.c: plug the curl tool unit test in
 
-- gopher tests: use sws and adjusted to more standard style
+- [Jared Jennings brought this change]
 
-- sws: added basic gopher support
+  unit1394.c: basis of a unit test for parse_cert_parameter()
 
-- gopher: enable the header callback/verbosity
+- src/Makefile.am: build static lib for unit tests if enabled
 
-- gopher: fix test case line endings
-  
-  Patches over email very easily lose CRLF line endings in files otherwise
-  LF-only so I had to put them back where needed.
+- tool_getparam: ensure string termination in parse_cert_parameter()
+
+- tool_getparam: fix memleak in handling the -E option
 
-- gopher: fix memory leak and busyloop
+- tool_getparam: describe what parse_cert_parameter() does
   
-  The fix for the busyloop really only is a temporary work-around.  It
-  causes a BLOCKING behavior which is a NO-NO. This function should rather
-  be split up in a do and a doing piece where the pieces that aren't
-  possible to send now will be sent in the doing function repeatedly until
-  the entire request is sent.
+  ... and de-duplicate the code initializing *passphrase
 
-- [Cameron Kaiser brought this change]
+- curl.1: document escape sequences recognized by -E
 
-  Gopher using Curl_write; test suite (4 tests)
+- [Jared Jennings brought this change]
 
-- [Cameron Kaiser brought this change]
+  curl -E: allow to escape ':' in cert nickname
 
-  Remove url.c test
+Marc Hoersken (5 May 2013)
+- curl_schannel.c: Fixed invalid memory access during SSL shutdown
 
-- [Cameron Kaiser brought this change]
+Steve Holme (4 May 2013)
+- smtp: Fix trailing whitespace warning
 
-  Forgot gopher.h in Makefile.inc
+- smtp: Fix compilation warning
+  
+  comparison between signed and unsigned integer expressions
 
-- [Cameron Kaiser brought this change]
+- RELEASE-NOTES: synced with 92ef5f19c801
 
-  Gopher protocol support (initial release)
+- smtp: Updated RFC-2821 references to RFC-5321
 
-- http: handle trailer headers in all chunked responses
-  
-  HTTP allows that a server sends trailing headers after all the chunks
-  have been sent WITHOUT signalling their presence in the first response
-  headers. The "Trailer:" header is only a SHOULD there and as we need to
-  handle the situation even without that header I made libcurl ignore
-  Trailer: completely.
+- smtp: Fixed sending of double CRLF caused by first in EOB
   
-  Test case 1116 was added to verify this and to make sure we handle more
-  than one trailer header properly.
+  If the mail sent during the transfer contains a terminating <CRLF> then
+  we should not send the first <CRLF> of the EOB as specified in RFC-5321.
   
-  Reported by: Patrick McManus
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
+  Additionally don't send the <CRLF> if there is "no mail data" as the
+  DATA command already includes it.
 
-- TODO: we now support RTMP
-
-- TODO: done "NTLM with other crypto functions"
+- tests: Corrected MAIL SIZE for CRLF line endings
   
-  Since NTLM was made to work with the NSS API as well, the primary SSL
-  alternatives will be built with NTLM support in libcurl.
+  ... which was missed in commit: f5c3d9538452
 
-- TODO: fixed "Make curl_multi_info_read faster"
+- tests: Corrected infilesize for CRLF line endings
   
-  It is really fast now
+  ... which was missed in commit: f5c3d9538452
+
+- tests: Corrected test1406 to be RFC2821 compliant
 
-Dan Fandrich (24 Aug 2010)
-- Fixed a NULL pointer dereference in form posting
+- tests: Corrected test1320 to be RFC2821 compliant
+
+- tests: Corrected typo in test909
   
-  It was introduced in commit eeb2cb05 along with the -F type=
-  change. Also fixed a typo in the name of the magic filename=
-  parameter. Tweaked tests 39 and 173 to better test this path.
+  Introduced in commit: 514817669e9e
 
-Daniel Stenberg (24 Aug 2010)
-- [Ben Greear brought this change]
+- tests: Corrected test909 to be RFC2821 compliant
 
-  multi:  Fix compile warning on 64-bit systems
+- tests: Updated test references to 909 from 1411
+  
+  ...and removed references to libcurl and test1406.
+
+- tests: Renamed test1411 to test909 as this is a main SMTP test
 
-Dan Fandrich (23 Aug 2010)
-- Mention PolarSSL in tutorial & add some URLs to INSTALL
+Daniel Stenberg (1 May 2013)
+- [Lars Johannesen brought this change]
 
-Daniel Stenberg (23 Aug 2010)
-- RESUME_FROM: clarify what ftp uploads do
+  bindlocal: move brace out of #ifdef
   
-  The numerical value passed to CURLOPT_RESUME_FROM for FTP uploads is
-  interpreted and used as position where to resume the _reading_ of the
-  local file and it will "blindly" append that data on the remote
-  file. This was certainly not clear in the docs previously.
+  The code within #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID wrongly had two
+  closing braces when it should only have one, so builds without that
+  define would fail.
   
-  Reported by: catalin
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3048174
+  Bug: http://curl.haxx.se/mail/lib-2013-05/0000.html
 
-- [Dirk Manske brought this change]
-
-  Curl_is_connected: use correct errno
+Steve Holme (30 Apr 2013)
+- smtp: Tidy up to move the eob counter to the per-request structure
   
-  The correctly extracted errno contents were mistakenly overwritten by a newer
-  value that wasn't the correct error value.
+  Move the eob counter from the smtp_conn structure to the SMTP structure
+  as it is associated with a SMTP payload on a per-request basis.
+
+- TODO: Updated following the addition of CURLOPT_SASL_IR
+
+- smtp: Fixed unknown percentage complete in progress bar
   
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0242.html
+  The curl command line utility would display the the completed progress
+  bar with a percentage of zero as the progress routines didn't know the
+  size of the transfer.
 
-- cmdline: make -F type= accept ;charset=
+Daniel Stenberg (29 Apr 2013)
+- ftpserver: silence warnings
   
-  The -F option allows some custom parameters within the given string, and
-  those strings are separated with semicolons. You can for example specify
-  "name=daniel;type=text/plain" to set content-type for the
-  field. However, the use of semicolons like that made it not work fine if
-  you specified one within the content-type, like for:
-  "name=daniel;type=text/plain;charset=UTF-8"
-  ... as the second one would be seen as a separator and "charset" is no
-  parameter curl knows anything about so it was just silently discarded.
+  Fix regressions in commit b56e3d43e5d. Make @data local and filter off
+  non-numerical digits from $testno in STATUS_imap.
+
+Steve Holme (29 Apr 2013)
+- ftpserver.pl: Corrected the imap LOGIN response
   
-  The new logic now checks if the semicolon and following keyword looks
-  like a parameter it knows about and if it isn't it is assumed to be
-  meant to be used within the content-type string itself.
+  ...to be more realistic and consistent with the other imap responses.
+
+- tests: Added imap STATUS command test
+
+- tests: Corrected the SMTP tests to be RFC2821 compliant
   
-  I modified test case 186 to verify that this works as intended.
+  The emails that are sent to the server during these tests were
+  incorrectly formatted as they contained one or more LF terminated lines
+  rather than being CRLF terminated as per Section 2.3.7 of RFC-2821.
   
-  Reported by: Larry Stone
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3048988
+  This wasn't a problem for the test suite as the <stdin> data matched the
+  <upload> data but anyone using these tests as reference would be sending
+  incorrect data to a server.
 
-Guenter Knauf (20 Aug 2010)
-- Added mk-ca-bundle.vbs script.
+- email: Tidy up of *_perform_authenticate()
   
-  The script works exactly same as the Perl one except for one thing:
-  when the text descriptions generated with openssl are included then
-  the md5 fingerprints are missing; seems openssl has either a bug or
-  a feature which prints the md5 fingerprint output to stdout instead
-  of writing them to specified file; this script could here do the same
-  as what the Perl scripr does (redirect stdout into file) but this
-  makes the script take up double the time because it needs to launch
-  cmd.exe 140 times (fo each openssl call). So I think for now we just
-  ommit the md5 fingerprints, and see if openssl will be fixed.
+  Removed the hard returns from imap and pop3 by using the same style for
+  sending the authentication string as smtp. Moved the "Other mechanisms
+  not supported" check in smtp to match that of imap and pop3 to provide
+  consistency between the three email protocols.
 
-- Trial to fix win32 autobuilds.
+- smtp: Updated limit check to be more readable like the check in pop3
+
+- pop3: Added 255 octet limit check when sending initial response
   
-  It seems that its time to look at some better ideas for the win32
-  non-configure builds; probably a prebuild target which copies
-  config-win32.h to curl_config.h and appends also then feature
-  defines like USE_ARES.
+  Added 255 octet limit check as per Section 4. Paragraph 8 of RFC-5034.
 
-Dan Fandrich (19 Aug 2010)
-- Use the S_ISREG macro to determine what is a regular file
+- DOCS: Corrected line length of recent Secure Transport changes
 
-Kamil Dudka (19 Aug 2010)
-- AC_INIT: avoid a warning with autoconf 2.66
+Nick Zitzmann (27 Apr 2013)
+- darwinssl: add TLS crypto authentication
   
-  It was complaining about the '=>' operator, introduced in e3fc0d5.
+  Users using the Secure Transport (darwinssl) back-end can now use a
+  certificate and private key to authenticate with a site using TLS. Because
+  Apple's security system is based around the keychain and does not have any
+  non-public function to create a SecIdentityRef data structure from data
+  loaded outside of the Keychain, the certificate and private key have to be
+  loaded into the Keychain first (using the certtool command line tool or
+  the Security framework's C API) before we can find it and use it.
 
-Dan Fandrich (18 Aug 2010)
-- Fixed a memory leak during OOM in the multi timeout code
+Steve Holme (27 Apr 2013)
+- Corrected version numbers after bump
 
-- Removed a C99ism & made an array const
+Daniel Stenberg (27 Apr 2013)
+- bump version
+  
+  Since we're adding new stuff, the next release will bump the minor
+  version and we're looking forward to 7.31.0
 
-Daniel Stenberg (19 Aug 2010)
-- [Julien Chaffraix brought this change]
+Steve Holme (27 Apr 2013)
+- RELEASE-NOTES: synced with f4e6e201b146
 
-  test: added test 579 to verify progress callback for chunked post
+- DOCS: Updated following the addition of CURLOPT_SASL_IR
   
-  The 66 bytes checked are those 38 bytes with the chunked encoding
-  headers added: 8+8+10+35+5 = 66
+  Documented the the option in curl_easy_setopt() and added it to
+  symbols-in-versions.
+
+- tests: Corrected command line arguments in test907 and test908
+
+- tests: Added SMTP AUTH with initial response tests
+
+- tests: Updated SMTP tests to decouple client initial response
   
-  The three-letter words become 8 bytes on the wire because they are sent
-  like: "3\r\none\r\n"
+  Updated test903 and test904 following the addition of CURLOPT_SASL_IR
+  as the default behaviour of SMTP AUTH responses is now to not include
+  the initial response. New tests with --sasl-ir support to follow.
+
+- imap: Added support for overriding the SASL initial response
   
-  ... and there's the trailing 5 bytes write after the four lines since
-  the final chunk is sent (which is "0\r\n\r\n").
+  In addition to checking for the SASL-IR capability the user can override
+  the sending of the client's initial response in the AUTHENTICATION
+  command with the use of CURLOPT_SASL_IR should the server erroneously
+  not report SASL-IR when it does support it.
 
-- multi: avoid sending multiple complete messages
+- smtp: Added support for disabling the SASL initial response
   
-  I fell over this bug report that mentioned that libcurl could wrongly
-  send more than one complete messages at the end of a transfer. Reading
-  the code confirmed this, so I've added a new multi state to make it not
-  happen. The mentioned bug report was made by Brad Jorsch but is (oddly
-  enough) filed in Debian's bug tracker for the "wmweather+" tool.
+  Updated the default behaviour of sending the client's initial response in the AUTH
+  command to not send it and added support for CURLOPT_SASL_IR to allow the user to
+  specify including the response.
   
-  Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593390
+  Related Bug: http://curl.haxx.se/mail/lib-2012-03/0114.html
+  Reported-by: Gokhan Sengun
 
-- FAQ: update the list of supported protocols
-
-- FAQ: added blurb about ECCN
+- pop3: Added support for enabling the SASL initial response
   
-  "1.13 curl's ECCN number" is a new section mostly made up from
-  Alessandro Vesely's very informative ML post on the subject:
-  http://curl.haxx.se/mail/lib-2008-03/0251.html
-
-Guenter Knauf (18 Aug 2010)
-- It is sufficient to pipe stderr to NUL to get rid of the nasty messages.
+  Allowed the user to specify whether to send the client's intial response
+  in the AUTH command via CURLOPT_SASL_IR.
 
-- Added SSPI build to Watcom makefile.
+- sasl-ir: Added --sasl-ir option to curl command line tool
 
-Daniel Stenberg (16 Aug 2010)
-- [Julien Chaffraix brought this change]
+- sasl-ir: Added CURLOPT_SASL_IR to enable/disable the SASL initial response
 
-  progress: callback for POSTs less than MAX_INITIAL_POST_SIZE
+Daniel Stenberg (26 Apr 2013)
+- curl_easy_init: use less mallocs
   
-  Add a call to Curl_pgrsSetUploadSize in this case valided by a test
-  case.
+  By introducing an internal alternative to curl_multi_init() that accepts
+  parameters to set the hash sizes, easy handles will now use tiny socket
+  and connection hash tables since it will only ever add a single easy
+  handle to that multi handle.
   
-  Reported by: Никита Дорохин.
-  Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
+  This decreased the number mallocs in test 40 (which is a rather simple
+  and typical easy interface use case) from 1142 to 138. The maximum
+  amount of memory allocated used went down from 118969 to 78805.
 
-Dan Fandrich (16 Aug 2010)
-- Make the LD_PRELOAD path absolute in the tests that use it
+Steve Holme (26 Apr 2013)
+- ftpserver.pl: Fixed imap logout confirmation data
   
-  In some situations, libtool will change directories and perform
-  a link step before executing the libtest test app. Since
-  LD_PRELOAD is in effect for this entire process, the path to the
-  binary must be absolute so it will be valid no matter in which
-  directory the app is running.
+  An IMAP server should response with the BYE continuation response before
+  confirming the LOGOUT command was successful.
 
-Daniel Stenberg (16 Aug 2010)
-- negotiation: Wrong proxy authorization
+Daniel Stenberg (26 Apr 2013)
+- ftp_state_pasv_resp: connect through proxy also when set by env
   
-  There's an error in http_negotiation.c where a mistake is using only
-  userpwd even for proxy requests. Ludek provided a patch, but I decided
-  to write the fix slightly different using his patch as inspiration.
+  When connecting back to an FTP server after having sent PASV/EPSV,
+  libcurl sometimes didn't use the proxy properly even though the proxy
+  was used for the initial connect.
   
-  Reported by: Ludek Finstrle
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3046066
-
-Dan Fandrich (16 Aug 2010)
-- Clear stdout and stderr files on each test run
+  The function wrongly checked for the CURLOPT_PROXY variable to be set,
+  which made it act wrongly if the proxy information was set with an
+  environment variable.
   
-  This allows a test to be run several times in the same test
-  session even when the -k option is given.
-
-Guenter Knauf (15 Aug 2010)
-- Syncroniszed vclean target; fixed some comments.
-
-Daniel Stenberg (15 Aug 2010)
-- THANKS: added contributors from 7.21.1
-
-- multi: two fixes done
-
-- multi: use timeouts properly for MAX_RECV/SEND_SPEED
+  Added test case 711 to verify (based on 707 which uses --socks5). Also
+  added test712 to verify another variation of setting the proxy: with
+  --proxy socks5://
   
-  When detecting that the send or recv speed, the multi interface changes
-  state to TOOFAST and previously there was no timeout set that would
-  force a recheck but it would rely on the application to somehow call
-  libcurl anyway. This now sets a timeout for a suitable future time to
-  check again if the average transfer speed is then below the threshold
-  again.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1218
+  Reported-by: Zekun Ni
 
-- multi: support timeouts
-  
-  Curl_expire() is now expanded to hold a list of timeouts for each easy
-  handle. Only the closest in time will be the one used as the primary
-  timeout for the handle and will be used for the splay tree (which sorts
-  and lists all handles within the multi handle).
-  
-  When the main timeout has triggered/expired, the next timeout in time
-  that is kept in the list will be moved to the main timeout position and
-  used as the key to splay with. This way, all timeouts that are set with
-  Curl_expire() internally will end up as a proper timeout. Previously any
-  Curl_expire() that set a _later_ timeout than what was already set was
-  just silently ignored and thus missed.
-  
-  Setting Curl_expire() with timeout 0 (zero) will cancel all previously
-  added timeouts.
-  
-  Corrects known bug #62.
+Kamil Dudka (26 Apr 2013)
+- [Zdenek Pavlas brought this change]
 
-- Curl_llist_insert_next: allow insertion first in the list
+  url: initialize speed-check data for file:// protocol
   
-  When we specify the "insert after" entry as NULL, this function now
-  inserts the new entry first in the list.
-
-- multi: make curl_multi_info_read perform O(1)
+  ... in order to prevent an artificial timeout event based on stale
+  speed-check data from a previous network transfer.  This commit fixes
+  a regression caused by 9dd85bced56f6951107f69e581c872c1e7e3e58e.
   
-  Instead of looping over all attached easy handles, this now keeps a list
-  of messages in the multi handle. It allows curl_multi_info_read() to
-  perform O(1) no matter how many easy handles that are handled. This is
-  of importance since this function may be polled very frequently by apps
-  using the multi interface.
+  Bug: https://bugzilla.redhat.com/906031
 
-Kamil Dudka (15 Aug 2010)
-- curl -T: ignore file size of special files
-  
-  original bug report at https://bugzilla.redhat.com/622520
+Daniel Stenberg (25 Apr 2013)
+- test709: clarify the test in the name
 
-Dan Fandrich (13 Aug 2010)
-- Reset environment variables before starting servers
+- sshserver: disable StrictHostKeyChecking
   
-  Otherwise, variables from tests could affect the servers
-  themselves.
-
-Kamil Dudka (12 Aug 2010)
-- typecheck-gcc: work around gcc upstream bug #32061
+  I couldn't figure out why the host key logic isn't working, but having
+  it set to yes prevents my SSH-based test cases to run. I also don't see
+  a strong need to use strict host key checking on this test server.
   
-  original bug report at https://bugzilla.redhat.com/617757
+  So I disabled it.
 
-Daniel Stenberg (11 Aug 2010)
-- release cycle loop: start over toward 7.21.2
+- runtests: log more commands in verbose mode
+  
+  ... to aid tracking down failures
 
-Version 7.21.1 (11 Aug 2010)
+Steve Holme (25 Apr 2013)
+- TODO: Corrected copy/paste typo
 
-Daniel Stenberg (11 Aug 2010)
-- RELEASE-NOTES: mention the runtests fix as well
+- TODO: Added new ideas for future SMTP, POP3 and IMAP features
 
-- runtests: clear old setenv remainders before test
-  
-  Due to the layout of the singletest function there are situations where
-  it returns before it clears the environment variables that were
-  especially set for the single specific test case. That could lead to
-  subsequent tests getting executed with environment variables sticking
-  around from a previous test which could lead to badness.
-  
-  This change makes sure to clear all custom variables that may be laying
-  around from a previous round, before running a test case.
-  
-  Reported by: Kamil Dudka
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0141.html
+- TODO: Updated following the addition of ;auth=<MECH> support
 
-Guenter Knauf (11 Aug 2010)
-- Added OpenSSL builds to Watcom makefiles.
+- DOCS: Minor rewording / clarification of host name protocol detection
 
-Yang Tse (11 Aug 2010)
-- configure: werror related adjustments
+- RELEASE-NOTES: synced with a8c92cb60890
 
-Daniel Stenberg (11 Aug 2010)
-- FAQ: s/libcurl.so.3/libcurl.so.X
+- DOCS: Added reference to IETF draft for SMTP URL Interface
+  
+  ...when mentioning login options. Additional minor clarification of
+  "Windows builds" to be "Windows builds with SSPI"as a way of enabling
+  NTLM as Windows builds may be built with OpenSSL to enable NTLM or
+  without NTLM support altogether.
 
-Dan Fandrich (10 Aug 2010)
-- KNOWN_BUG #59 is fixed. Clarify support of IPv6 zone IDs.
+Linus Nielsen Feltzing (23 Apr 2013)
+- HISTORY: Fix spelling error.
 
-- Fixed typo in Android configure command
+Steve Holme (23 Apr 2013)
+- DOCS: Reworked the scheme calculation explanation under CURLOPT_URL
 
-Daniel Stenberg (11 Aug 2010)
-- HISTORY: added stuff from recent years
+- url: Added smtp and pop3 hostnames to the protocol detection list
 
-- warning: silence the compiler
+Daniel Stenberg (23 Apr 2013)
+- HISTORY: correct some years/dates
   
-  warning: conversion to 'long int' from 'time_t' may alter its value
+  Thanks to archive.org's wayback machine I updated this document with
+  some facts from the early httpget/urlget web page:
   
-  ... on win64 when time_t is 64bit and long is 32bit.
+  http://web.archive.org/web/19980216125115/http://www.inf.ufrgs.br/~sagula/urlget.html
 
-- RELEASE-NOTES: synced, 3 additional bugfixes
+- [Alessandro Ghedini brought this change]
 
-- multi_socket_action: clarify how to kickstart it
+  tests: add test1511 to check timecond clean-up
   
-  The callbacks are called when curl_multi_socket_action() is called, not
-  when handles are added. This is now mentioned in the "TYPICAL USAGE"
-  section.
+  Verifies the timecond fix in commit c49ed0b6c0f
 
-- callbacks: acknowledge progress callback error returns
-  
-  When the progress callback is called during the TCP connection, an error
-  return would accidentally not abort the operation as intended but would
-  instead be counted as a failure to connect to that particular IP and
-  libcurl would just continue to try the next. I made singleipconnect()
-  and trynextip() return CURLcode properly.
-  
-  Added bonus: it corrected the error code for bad --interface usages,
-  like tested in test 1084 and test 1085.
-  
-  Reported by: Adam Light
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0105.html
+- [Alessandro Ghedini brought this change]
 
-Guenter Knauf (10 Aug 2010)
-- More Watcom makefile fixes ...
+  getinfo.c: reset timecond when clearing session-info variables
   
-  Final fix (hopefully!) for dll wlink loader;
-  prefer faster internal rm if available.
+  Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705783
+  Reported-by: Ludovico Cavedon <cavedon@debian.org>
 
-- Fixed my wrong edit.
+Steve Holme (22 Apr 2013)
+- DOCS: Added information about login options to CURLOPT_USERPWD
 
-- More Watcom makefile fixes.
-  
-  Added the -br switch to dynamic builds which fixes the issue I saw
-  with curl's --version output. Added debug info and symfile for debug
-  builds to linker opts. Added DLL loader for wlink back, but this time
-  dependend on wlink version.
-  Patch posted to the list by malak.jiri AT gmail.com.
+- DOCS: Added information about login options in the URL
 
-- Changed test for -u switch in order to enable other wmake switches.
+- url: Fixed missing length check in parse_proxy()
   
-  The var %MAKEFLAGS is only set in 3 cases: if set as environment
-  var or as macro definition from commandline, and either with the
-  -u or -ms switch. Since all these cases are unlikely for the average
-  user it should be safe to only test if %MAKEFLAGS is defined; this
-  has the benefit that now all other switches can be used again in
-  addition to the -u which was formerly not possible.
+  Commit 11332577b3cb removed the length check that was performed by the
+  old scanf() code.
 
-Daniel Stenberg (10 Aug 2010)
-- llist: hide Curl_llist_init
+- url: Fixed crash when no username or password supplied for proxy
   
-  Curl_llist_init is never used outside of llist.c and thus it should be
-  static. I also removed the protos for Curl_llist_insert_prev and
-  Curl_llist_remove_next which are functions we removed from llist.c ages
-  ago.
-
-Guenter Knauf (10 Aug 2010)
-- Added msys Perl since git for Win32 comes with own Perl which identifies as msys.
+  Fixed an issue in parse_proxy(), introduced in commit 11332577b3cb,
+  where an empty username or password (For example: http://:@example.com)
+  would cause a crash.
 
-- Updated lib dependency versions.
+- url: Removed unused text length constants
 
-- Make testcurl.pl Watcom-aware.
+- url: Updated proxy URL parsing to use parse_login_details()
 
-Daniel Stenberg (10 Aug 2010)
-- parse_remote_port: fix ;type= URL suffix over HTTP proxy
+- url: Tidy up of setstropt_userpwd() parameters
   
-  Test 563 is enabled now and verifies that the combo FTP type=A URL,
-  CURLOPT_PORT set and proxy work fine. As a bonus I managed to remove the
-  somewhat odd FTP check in parse_remote_port() and instead converted it
-  to a better and more generic 'slash_removed' struct field. Checking the
-  ->protocol field isn't right since when an FTP:// URL is sent over a
-  HTTP proxy, the protocol is HTTP but the URL was handled by the FTP code
-  and thus slash_removed is set TRUE for this case.
-
-- indent: white space fixes only
-
-Yang Tse (9 Aug 2010)
-- build: fix previous push
+  Updated the naming convention of the login parameters to match those of
+  other functions.
 
-- build: don't build libhostname unless shared libcurl is built
-
-- build: libhostname and chkhostname linkage adjustments followup
-
-Daniel Stenberg (8 Aug 2010)
-- typo: remove duplicate semicolon
+- url: Tidy up of code and comments following recent changes
+  
+  Tidy up of variable names and comments in setstropt_userpwd() and
+  parse_login_details().
 
-- multi: avoid a malloc() when a transfer is complete
+- url: Simplified setstropt_userpwd() following recent changes
   
-  The struct used for storing the message for a completed transfer is now
-  no longer allocated separatly but is kept within the main struct kept
-  for each easy handle so that we avoid one malloc (and the subsequent
-  free).
+  There is no need to perform separate clearing of data if a NULL option
+  pointer is passed in. Instead this operation can be performed by simply
+  not calling parse_login_details() and letting the rest of the code do
+  the work.
 
-Yang Tse (8 Aug 2010)
-- build: libhostname linkage adjustments followup
+- url: Correction to scope of if statements when setting data
 
-Guenter Knauf (7 Aug 2010)
-- Fix to overwrite libcurl name.
+- url: Fixed memory leak in setstropt_userpwd()
+  
+  setstropt_userpwd() was calling setstropt() in commit fddb7b44a79d to
+  set each of the login details which would duplicate the strings and
+  subsequently cause a memory leak.
 
-Yang Tse (7 Aug 2010)
-- build: chkhostname build adjustments followup
+- RELEASE-NOTES: synced with d535c4a2e1f7
 
-U-D5B1PQ1J\Administrador (7 Aug 2010)
-- build: allow NTLM tests to run on more build configurations
+- url: Added overriding of URL login options from CURLOPT_USERPWD
 
-Daniel Stenberg (7 Aug 2010)
-- curl_easy_setopt.3: rename stream to userdata
+- tool_paramhlp: Fixed options being included in username
   
-  In some places where the name 'stream' has been used for naming a
-  function argument that is in fact settable with a setopt() option we now
-  call that argument 'userdata' to make it more obvious that it is in fact
-  possible to set by the application.
+  Fix to prevent the options from being displayed when curl requests the
+  user's password if the following command line is specified:
   
-  Suggested by: Jeff Pohlmeyer
+  --user username;options
 
-Guenter Knauf (7 Aug 2010)
-- Block created curlbuild.h for NetWare to avoid usage from other platforms.
-
-Daniel Stenberg (7 Aug 2010)
-- RELEASE-NOTES: synced with recent changes
-
-Yang Tse (6 Aug 2010)
-- build: ensure that libhostname doesn't get installed
-
-Daniel Stenberg (6 Aug 2010)
-- multi_socket: set timeout for 100-continue
+- url: Added support for parsing login options from the CURLOPT_USERPWD
   
-  When libcurl internally decided to wait for a 100-continue header, there
-  was no call to the timeout function so there was no timeout callback
-  called when the multi_socket API was used and thus applications became
-  either completely wrong or at least ineffecient depending on how they
-  handled the situation. We now set a timeout to get triggered.
+  In addition to parsing the optional login options from the URL, added
+  support for parsing them from CURLOPT_USERPWD, to allow the following
+  supported command line:
   
-  Reported by: Ben Darnell
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3039744
+  --user username:password;options
 
-Guenter Knauf (6 Aug 2010)
-- Some more Watcom makefile massage ...
+- url: Added bounds checking to parse_login_details()
   
-  For now removed the .autodepend directive until I've figured out
-  which of my changes broke it again.
-
-Yang Tse (5 Aug 2010)
-- build: fix libssh2_scp_send64() availability
+  Added bounds checking when searching for the separator characters within
+  the login string as this string may not be NULL terminated (For example
+  it is the login part of a URL). We do this in preference to allocating a
+  new string to copy the login details into which could then be passed to
+  parse_login_details() for performance reasons.
 
-- build: remove unneeded cast to (void *)
+- url: Added size_t cast to pointer based length calculations
 
-- build: remove unused file
+- url: Corrected minor typo in comment
 
-Daniel Stenberg (4 Aug 2010)
-- SCP: send large files properly with new enough libssh2
+Daniel Stenberg (18 Apr 2013)
+- CURL_CHECK_CA_BUNDLE: don't check for paths when cross-compiling
   
-  libssh2 1.2.6 and later handle >32bit file sizes properly even on 32bit
-  architectures and we make sure to use that ability.
+  When cross-compiling we can't scan and detect existing files or paths.
   
-  Reported by: Mikael Johansson
-  Bug: http://curl.haxx.se/mail/lib-2010-08/0052.html
+  Bug: http://curl.haxx.se/mail/lib-2013-04/0294.html
 
-Yang Tse (3 Aug 2010)
-- build: add missing new files to non-configure target build files
+- [Ishan SinghLevett brought this change]
 
-- md4: replace bcopy usage with memcpy
-
-Daniel Stenberg (3 Aug 2010)
-- RELEASE-NOTES: synced with recent changes
-
-- TODO-RELEASE: clear, file not really used ATM
-
-- typecheck-gcc: add checks for recently added options
-  
-  I added all OBJECTPOINT curl_easy_setopt() options from 178 to 202. Left
-  to add: the five FUNCTIONPOINT (callbacks) options added since:
+  usercertinmem.c: add example showing user cert in memory
   
-  SSH_KEYFUNCTION
-  INTERLEAVEFUNCTION
-  CHUNK_BGN_FUNCTION
-  CHUNK_END_FUNCTION
-  FNMATCH_FUNCTION
+  Relies on CURLOPT_SSL_CTX_FUNCTION, which is OpenSSL specific
 
-- .gitignore: ignore all built examples
+Steve Holme (18 Apr 2013)
+- url: Fix chksrc longer than 79 columns warning
 
-- example: fix code to build warning-free
+- url: Fix incorrect variable type for result code
 
-- Curl_connected_proxy: skip the bits.tcpconnect check
+- url: Fix compiler warning
   
-  Simply because the TCP might be connected already we cannot skip the
-  proxy connect procedure. We need to be careful to not overload more
-  meaning to the bits.tcpconnect field like this.
-  
-  With this fix, SOCKS proxies work again when the multi interface is
-  used. I believe this regression was added with commit 4b351d018e,
-  released as 7.20.1.
-  
-  Left todo: add a test case that verifies this functionality that
-  prevents us from breaking it again in the future!
-  
-  Reported by: Robin Cornelius
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3033966
+  signed and unsigned type in conditional expression
 
-- sethostname: provide local prototype for gethostname
+- url: Moved parsing of login details out of parse_url_login()
   
-  This is only to avoid warnings on some systems.
+  Separated the parsing of login details from the processing of them in
+  parse_url_login() ready for use by setstropt_userpwd().
 
-- build: add typecast to avoid warning
+- url: Re-factored set_userpass() and parse_url_userpass()
   
-  There is an implicit conversion from "unsigned long" to "long";
-  rounding, sign extension, or loss of accuracy may result.
-
-Guenter Knauf (2 Aug 2010)
-- Rename CURL_SOURCES macro; revert previous rename of curl_SOURCES macro.
+  Re-factored these functions to reflect their new behaviour following the
+  addition of login options.
 
-- Removed ugly dependency lists since wmake knows the .autodepend directive.
+- url: Reworked URL parsing to allow overriding by CURLOPT_USERPWD
 
-- Use suffix search path for sources in lib folder.
-
-- Changed src/Makefile.Watcom to use CURL_SOURCES from src/Makefile.inc.
-
-- Renamed curl_SOURCES to CURL_ALLFILES to overcome wmake's case-insensitivity.
-
-- Removed wlink from DLL loader list because it doesnt work with Watcom < 1.8.
-
-- Moved the LDAP API defines from Makefile.Watcom to config-win32.h.
+Daniel Stenberg (18 Apr 2013)
+- maketgz: make bzip2 creation work with Parallel BZIP2 too
   
-  These defines are only needed for older Watcom versions (< 1280).
+  Apparently the previous usage didn't work with that implementation,
+  while this updated version works with at least both Parallel BZIP2
+  v1.1.8 and regular bzip "Version 1.0.6, 6-Sept-2010".
 
-Daniel Stenberg (2 Aug 2010)
-- retry: consider retrying even if -f is used
-  
-  The --retry logic does retry HTTP when some specific response codes are
-  returned, but because the -f option sets the CURLOPT_FAILONERROR to
-  libcurl, the return codes are different for such situations and then the
-  curl tool failed to consider it for retrying.
-  
-  Reported by: Mike Power
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3037362
+Linus Nielsen Feltzing (18 Apr 2013)
+- Add tests/http_pipe.py to the tarball build
 
-- multi: fix FTPS connecting the data connection with OpenSSL
+Steve Holme (16 Apr 2013)
+- smtp: Re-factored all perform based functions
   
-  Commit 496002ea1cd76af7f (released in 7.20.1) broke FTPS when using the
-  multi interface and OpenSSL was used. The condition for the non-blocking
-  connect was incorrect.
-  
-  Reported by: Georg Lippitsch
-  Bug: http://curl.haxx.se/mail/lib-2010-07/0270.html
+  Standardised the naming of all perform based functions to be in the form
+  smtp_perform_something().
 
-Guenter Knauf (1 Aug 2010)
-- Fixed curlbuild.h rule.
+- smtp: Added description comments to all perform based functions
 
-- Added rule to create curlbuild.h if not present (for builds from git).
+- smtp: Moved smtp_quit() to be with the other perform functions
 
-- Added dependend libs for curl static linking.
+- smtp: Moved smtp_rcpt_to() to be with the other perform functions
 
-- Fixed curl.exe static linking.
+- smtp: Moved smtp_mail() to be with the other perform functions
 
-Daniel Stenberg (30 Jul 2010)
-- warning: silence a win64 compiler warning
-  
-  conversion from 'size_t' to 'curl_socklen_t', possible loss of data
-  
-  Reported by: Adam Light
+Daniel Stenberg (16 Apr 2013)
+- [Wouter Van Rooy brought this change]
 
-- KNOWN_BUG: The SOCKET type in Win64 is 64 bits
+  curl-config: don't output static libs when they are disabled
   
-  The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t
-  on that platform), and long is only 32 bits. It makes it impossible for
-  curl_easy_getinfo() to return a socket properly with the
-  CURLINFO_LASTSOCKET option as for all other operating systems.
-
-- smtp_connect: always provide host name buffer
+  Curl-config outputs static libraries even when they are disabled in
+  configure.
   
-  Previously the host name buffer was only used if gethostname() exists,
-  but since we converted that into a curl private function that function
-  always exists and will be used so the buffer needs to exist for all
-  cases/systems.
-
-- sethostname: avoid including unistd.h to duck for warnings
-
-- sethostname: ISO C does not allow extra `;' outside of a function
+  This causes problems with the build of pycurl.
 
-- [Kamil Dudka brought this change]
+- [Dave Reisner brought this change]
 
-  NTLM tests: boost coverage by forcing the hostname
+  docs/libcurl: fix formatting in manpage
   
-  A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
-  test-cases to override the system implementation of gethostname().  It
-  makes it possible to test the NTLM authentication for exact match, and
-  this way test the implementation of MD4 and DES.
-  
-  If LD_PRELOAD doesn't work, a debug build willl also workk as debug
-  builds are now made to prefer a specific environment variable and will
-  then return that content as host name instead of the actual one.
-  
-  Kamil wrote the bulk of this, Daniel Stenberg polished it.
-
-Guenter Knauf (29 Jul 2010)
-- Added a comment with an alternate idea to avoid the backslash line contination character.
-
-- Changed comparison to match size_t var type.
+  Commit c3ea3eb6 introduced some minor cosmetic errors in
+  curl_mutli_socket_action(3).
 
-- Removed unused vars to avoid compiler warnings.
+- [Paul Howarth brought this change]
 
-- Make Watcom makefiles use Makefile.inc to reduce future maintainance.
+  Add extra libs for lib1900 and lib2033 test programs
   
-  lib/Makefile.Watcom works fine already, for src/Makefile.Watcom we
-  need first to tweak src/Makefile.inc a bit - therefore the handtweaked
-  list still exists for now.
+  These are needed in cases where clock_gettime is used, from librt.
 
-- Watcom makefiles overhaul.
+Dan Fandrich (15 Apr 2013)
+- FAQ: mention that the network connection can be monitored
   
-  - make both libcurl and curl makefiles use register calling convention
-    (previously libcurl had stack calling convention).
-  - added include paths to the Watcom headers so its no longer required
-    to set the environment vars for this.
-  - added -wcd=201 to supress compiler warning about unreachable code.
-  - use macros for all tools, and removed dependency on GNU tools like rm.
-  - make ipv6 and debug builds controlable via env vars and so make them
-    optional instead of default.
-  - commented WINLDAPAPI and WINBERAPI since they broke with OW 1.8, and
-    it seems they're not needed (anymore?).
-  - added rule for hugehelp.c.cvs so that it will be created when not
-    already exist - this is required for building from a release tarball
-    since there we have no hugehelp.c.cvs, thus compilation broke.
-  - removed C_ARG creation from lib/Makefile.Watcom and use CFLAGS
-    directly as done too in src/Makefile.Watcom - this has the benefit
-    that we will see all active cflags and defines during compile.
-  - added LINK-ARG to src/Makefile.Watcom in order to better control
-    linker input.
-  - a couple of other minor makefile tweaks here and there ...
-  - added largefile support for Watcom builds to config-win32.h. Not yet
-    tested if it really works, but should since Win32 supports it.
-  - added loaddll stuff to speed up builds if supported.
-
-- some cosmetic changes.
+  Also note the prohibition on sharing handles across threads.
 
-Dan Fandrich (26 Jul 2010)
-- Added md4.c to the Watcom makefile
+Steve Holme (15 Apr 2013)
+- pop3: Added missing comment for pop3_state_apop_resp()
 
-- Added PolarSSL to the docs
-
-Daniel Stenberg (25 Jul 2010)
-- curl-config: --built-shared returns shared info
-  
-  The curl-config now features a --built-shared command line option that
-  will output 'yes' or 'no' depending if the build process was asked to
-  build shared library/libraries or not.
+- smtp: Updated the coding style of smtp_state_servergreet_resp()
   
-  It is primarily made to offer more details to the test suite to know
-  what kind of stunts it can expect to work.
+  Updated the coding style, in this function, to be consistant with other
+  response functions rather then performing a hard return on failure.
 
-- add_buffer_send: fix compiler warning
+- pop3: Updated the coding style of pop3_state_servergreet_resp()
   
-  Win64's 32 bit long but 64 bit size_t caused a warning that we avoid
-  with a typecast. A small whitespace indent fix was also applied.
+  Updated the coding style, in this function, to be consistent with other
+  response functions rather then performing a hard return on failure.
+
+- pop3: Re-factored all perform based functions
   
-  Reported by: Adam Light
+  Standardised the naming of all perform based functions to be in the form
+  pop3_perform_something() following the changes made to IMAP.
 
-Guenter Knauf (22 Jul 2010)
-- Updated library versions.
+- pop3: Added description comments to all perform based functions
 
-- Fixed script version which was still based on CVS Revision tag.
+- pop3: Moved pop3_quit() to be with the other perform functions
 
-Dan Fandrich (21 Jul 2010)
-- FAQ: Why doesn't cURL error out when the cable is unplugged?
+- pop3: Moved pop3_command() to be with the other perform functions
   
-  This one was long overdue to be mentioned in the FAQ. Also, mention the
-  new ftp wildcard downloading feature.
-
-Daniel Stenberg (21 Jul 2010)
-- [Ben Greear brought this change]
+  Started to apply the same tidy up to the POP3 code as applied to the
+  IMAP code in the 7.30.0 release.
 
-  ssh: Fix compile error on 64-bit systems.
-  
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+- RELEASE-NOTES: Removed erroneous spaces
 
-- [Ben Greear brought this change]
+- RELEASE-NOTES: synced with 8723cade21fb
 
-  build: Enable configure --enable-werror
+- smtp: Added support for ;auth=<mech> in the URL
   
-    This passes -Werror to gcc when building curl and libcurl,
-    allowing easy dection of compile warnings.
-  
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  Added support for specifying the preferred authentication mechanism in
+  the URL as per Internet-Draft 'draft-earhart-url-smtp-00'.
 
-- [Ben Greear brought this change]
-
-  pingpong: Fix indentation (whitespace change only)
+- pop3: Reworked authentication type constants
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  ... to use left-shifted values, like those defined in curl.h, rather
+  than 16-bit hexadecimal values.
 
-- [Jan Van Boghout brought this change]
+- pop3: Small consistency tidy up
 
-  CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
-  
-  ... since FTP is using it as well, and potentially other protocols!
+- pop3: Added support for ;auth=<mech> in the URL
   
-  Also, an #endif CURL_DISABLE_HTTP was incorrectly marked, as it seems to
-  end the proxy block instead.
+  Added support for specifying the preferred authentication type and SASL
+  mechanism in the URL as per RFC-2384.
 
-- [Jan Van Boghout brought this change]
-
-  pingpong: response_time is milliseconds
+- imap: Added support for ;auth=<mech> in the URL
   
-  Fixed the comment/document for the response_time struct member.
-
-- [Jan Van Boghout brought this change]
+  Added support for specifying the preferred authentication mechanism in
+  the URL as per RFC-5092.
 
-  ftp: response timeout bug in "quote" sending
+- sasl: Reworked SASL mechanism constants
   
-  The FTP implementation was missing a timestamp reset point, making the
-  waiting for responses after sending a post-transfer "QUOTE" command not
-  working as supposedly. This bug was introduced in 7.20.0
+  ... to use left-shifted values, like those defined in curl.h, rather
+  than 16-bit hexadecimal values.
 
-- [Jeff Pohlmeyer brought this change]
-
-  remote-header-name: chop filename at next semicolon
-  
-  The --remote-header-name option for the command-line tool assumes that
-  everything beyond the filename= field is part of the filename, but that
-  might not always be the case, for example:
+- sasl: Added predefined preferred mechanism values
   
-  Content-Disposition: attachment; filename=file.txt; modification-date=...
-  
-  This fix chops the filename off at the next semicolon, if there is one.
+  In preparation for the upcoming changes to IMAP, POP3 and SMTP added
+  preferred mechanism values.
 
-- --retry: access violation with URL part sets continued
+- url: Added support for parsing login options from the URL
   
-  When getting multiple URLs, curl didn't properly reset the byte counter
-  after a successful transfer so if the subsequent transfer failed it
-  would wrongly use the previous byte counter and behave badly (segfault)
-  because of that. The code assumes that the byte counter and the 'stream'
-  pointer is well in synch.
+  As well as parsing the username and password from the URL, added support
+  for parsing the optional options part from the login details, to allow
+  the following supported URL format:
   
-  Reported by: Jon Sargeant
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3028241
-
-- releasnote: synch up with commit f3b77e5611d
-
-- [Constantine Sapuntzakis brought this change]
-
-  examples: add curl_multi_timeout
+  schema://username:password;options@example.com/path?q=foobar
   
-  Make the multi-interface using examples use curl_multi_timeout to
-  properly educate users how to do things.
+  This will only be used by IMAP, POP3 and SMTP at present but any
+  protocol that may be given login options in the URL will be able to
+  add support for them.
 
-- configure: document the STATICLIB variable
+- smtp: Fix compiler warning
+  
+  warning: unused variable 'smtp' introduced in commit 73cbd21b5ee6.
 
-- [Constantine Sapuntzakis brought this change]
+- smtp: Moved parsing of url path into separate function
 
-  multi: fix condition that remove timers before trigger
+Daniel Stenberg (12 Apr 2013)
+- FTP: handle a 230 welcome response
   
-  curl_multi perform has two phases: run through every easy handle calling
-  multi_runsingle and remove expired timers (timer removal).
+  ...instead of the 220 we otherwise expect.
   
-  If a small timer (e.g. 1-10ms) is set during multi_runsingle, then it's
-  possible that the timer has passed by when the timer removal runs. The
-  timer which was just added is then removed. This will potentially cause
-  the timer list to be empty and cause the next call to curl_multi_timeout
-  to return -1. Ideally, curl_multi_timeout should return 0 in this case.
+  Made the ftpserver.pl support sending a custom "welcome" and then
+  created test 1219 to verify this fix with such a 230 welcome.
   
-  One way to fix this is to move the struct timeval now = Curl_tvnow(); to
-  the top of curl_multi_perform. The change does that.
-
-- [Constantine Sapuntzakis brought this change]
+  Bug: http://curl.haxx.se/mail/lib-2013-02/0102.html
+  Reported by: Anders Havn
 
-  threaded resolver: fix timeout issue
+- configure: try pthread_create without -lpthread
   
-  Reset old timer first so we can set a new one further in the future.
+  For libc variants without a spearate pthread lib (like bionic), try
+  using pthreads without the pthreads lib first and only if that fails try
+  the -lpthread linker flag.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1216
+  Reported by: Duncan
 
-- configure: allow environments variable to override internals
+- FTP: access files in root dir correctly
   
-  configure checks for grep, egrep, sed and ar and set the variables GREP,
-  EGREP, SED and AR accordingly. We now let already set variables override
-  the internal choices to let users make decisions when they know the
-  right choice already. This is a regression as our configure script used
-  to allow this back before commit 0b57c475 (up to 7.18.2).
+  Accessing a file with an absolute path in the root dir but with no
+  directory specified was not handled correctly. This fix comes with four
+  new test cases that verify it.
   
-  Reported by: "kdekker"
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3028318
+  Bug: http://curl.haxx.se/mail/lib-2013-04/0142.html
+  Reported by: Sam Deane
 
-Dan Fandrich (9 Jul 2010)
-- Improved the Android build instructions
+Steve Holme (12 Apr 2013)
+- pop3: Reworked the function description for Curl_pop3_write()
 
-Daniel Stenberg (7 Jul 2010)
-- [Tor Arntsen brought this change]
+- pop3: Added function description to pop3_parse_custom_request()
 
-  upload: Avoid infinite loop when checking for auth bits
-  
-  The test would loop forever if authtype bit 0 wasn't set.
+- pop3: Moved utility functions to end of pop3.c
 
-- upload: warn users trying to upload from stdin with anyauth
+Nick Zitzmann (12 Apr 2013)
+- darwinssl: add TLS session resumption
   
-  Since uploading from stdin is very likely to not work with anyauth and
-  its multi-phase probing for what authentication to actually use, alert
-  the user about it. Multi-phase negotiate almost certainly will involve
-  sending data and thus libcurl will need to rewind the stream to send
-  again, and it cannot do that with stdin.
+  This ought to speed up additional TLS handshakes, at least in theory.
 
-- http: don't enable chunked during authentication negotiations
-  
-  As mentioned in bug report #2956968, the HTTP code wouldn't send the
-  first empty chunk during the auth negotiation phase of the HTTP request
-  sending, so the server would wait for data to come and libcurl would
-  wait for data to arrive... I've made the code not enable chunked
-  encoding until the auth negotiation is done and thus this scenario
-  doesn't occur anymore.
-  
-  Reported by: Sidney San Martín
-  Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
+Steve Holme (12 Apr 2013)
+- imap: Added function description to imap_parse_custom_request()
 
-- --libcurl: list the tricky options instead of using [REMARK]
+- imap: Moved utility functions to end of imap.c (Part 3/3)
   
-  I think the [REMARK] and commented function calls cluttered the code a
-  bit too much and made the generated code ugly to read. Now we instead
-  track the remarks one specially and just lists them at the end of the
-  generated code more as additional information.
+  Moved imap_is_bchar() be with the other utility based functions.
 
-- curl: avoid setting libcurl options to its default
+- imap: Moved utility functions to end of imap.c (Part 2/3)
   
-  it makes the --libcurl output easier to follow.
+  Moved imap_parse_url_path() and imap_parse_custom_request() to the end of the
+  file allowing all utility functions to be grouped together.
 
-- --libcurl: hide setopt() calls setting default options
+- imap: Moved utility functions to end of imap.c (Part 1/3)
   
-  And additionally, don't show function or object pointers actual value
-  since they make no sense to anyone. Show 'functionpointer' and
-  'objectpointer' instead.
+  Moved imap_atom() and imap_sendf() to the end of the file allowing all
+  utility functions to be grouped together.
 
-- --libcurl: use *_LARGE options with typecasted constants
-  
-  In the generated code --libcurl makes, all calls to curl_easy_setopt()
-  that use *_LARGE options now have the value typecasted to curl_off_t, so
-  that it works correctly for 32bit systems with 64bit curl_off_t type.
+- imap: Corrected function description for imap_connect()
 
-- multi: CURLINFO_LASTSOCKET doesn't work after remove_handle
+Kamil Dudka (12 Apr 2013)
+- tests: prevent test206, test1060, and test1061 from failing
   
-  When curl_multi_remove_handle() is called and an easy handle is returned
-  to the connection cache held in the multi handle, then we cannot allow
-  CURLINFO_LASTSOCKET to extract it since that will more or less encourage
-  that the user uses the socket while it can get used by libcurl again.
+  ... in case runtests.pl is invoked with non-default -b option
   
-  Without this fix, we'd get a segfault in Curl_getconnectinfo() trying to
-  dereference the NULL pointer in 'data->state.connc'.
-  
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3023840
-
-- [Pierre Joye brought this change]
+  Fixes a regression caused by 1e29d275c643ef6aab7948f0f55a7a9397e56b42.
 
-  build: add enable IPV6 option for the VC makefiles
+Daniel Stenberg (12 Apr 2013)
+- [David Strauss brought this change]
 
-- FAQ: the threaded resolver works universally now
-
-Kamil Dudka (30 Jun 2010)
-- http_ntlm: add support for NSS
-  
-  When configured with '--without-ssl --with-nss', NTLM authentication
-  now uses NSS crypto library for MD5 and DES.  For MD4 we have a local
-  implementation in that case.  More details are available at
-  https://bugzilla.redhat.com/603783
+  libcurl-share.3: update what it does and does not share.
   
-  In order to get it working, curl_global_init() must be called with
-  CURL_GLOBAL_SSL or CURL_GLOBAL_ALL.  That's necessary because NSS needs
-  to be initialized globally and we do so only when the NSS library is
-  actually required by protocol.  The mentioned call of curl_global_init()
-  is responsible for creating of the initialization mutex.
-  
-  There was also slightly changed the NSS initialization scenario, in
-  particular, loading of the NSS PEM module.  It used to be loaded always
-  right after the NSS library was initialized.  Now the library is
-  initialized as soon as any SSL or NTLM is required, while the PEM module
-  is prevented from being loaded until the SSL is actually required.
+  Update sharing interface documentation to provide exhaustive list of
+  what it does and does not share.
 
-Daniel Stenberg (29 Jun 2010)
-- glob: backslash escaping bug
-  
-  curl didn't properly handle escaping characters in a URL with the use of
-  backslash. It did an attempt, but that failed as reported in bug
-  3022551. The described example was using the URL
-  "http://example.com?{AB,C\,D}".
-  
-  I've now removed the special-handling of letters following the backslash
-  and I also removed the bad extra check that triggered this particular
-  bug.
-  
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3022551
-  Reported by: Jon Sargeant
+- THANKS: remove duplicated names
 
-- release-notes: sync up with recent commits
+- bump: start working towards next release
 
-- CONTRIBUTE: the git commit message line length is 72 columns
+- THANKS: added people from the 7.30.0 RELEASE-NOTES
 
-- [Pavel Raiskup brought this change]
+Version 7.30.0 (12 Apr 2013)
 
-  ftp wildcard: FTP LIST parser FIX
+Daniel Stenberg (12 Apr 2013)
+- RELEASE-NOTES: cleaned up for 7.30 (synced with 5c5e1a1cd20)
   
-  There was a problem when a UNIX-like server returned information
-  about directory size (total NNNNNN) at the first line of
-  response.
+  Most notable the security advisory:
+  http://curl.haxx.se/docs/adv_20130412.html
 
-- [Pavel Raiskup brought this change]
+- test1218: another cookie tailmatch test
+  
+  ... and make 1216 also verify it with a file input
+  
+  These tests verify commit 3604fde3d3c9b0d, the fix for the "cookie
+  domain tailmatch" vulnerability. See
+  http://curl.haxx.se/docs/adv_20130412.html
 
-  examples: new FTP wildcard showcase
+- [YAMADA Yasuharu brought this change]
 
-- multi_socket: re-use of same socket without notifying app
+  cookie: fix tailmatching to prevent cross-domain leakage
   
-  When a hostname resolves to multiple IP addresses and the first one
-  tried doesn't work, the socket for the second attempt may get dropped on
-  the floor, causing the request to eventually time out. The issue is that
-  when using kqueue (as on mac and bsd platforms) instead of select, the
-  kernel removes the first fd from kqueue when it is closed (in trynextip,
-  connect.c:503). Trynextip() then goes on to open a new socket, which
-  gets assigned the same number as the one it just closed. Later in
-  multi.c, socket_cb is not called because the fd is already in
-  multi->sockhash, so the new socket is never added to kqueue.
+  Cookies set for 'example.com' could accidentaly also be sent by libcurl
+  to the 'bexample.com' (ie with a prefix to the first domain name).
   
-  The correct fix is to ensure that socket_cb is called to remove the fd
-  when trynextip() closes the socket, and again to re-add it after
-  singleipsocket(). I'm not sure how to cleanly do that, but the attached
-  patch works around the problem in an admittedly kludgy way by delaying
-  the close to ensure that the newly-opened socket gets a different fd.
+  This is a security vulnerabilty, CVE-2013-1944.
   
-  Daniel's added comment: I didn't spot a way to easily do a nicer fix so
-  I've proceeded with Ben's patch.
-  
-  Bug: http://curl.haxx.se/bug/view.cgi?id=3017819
-  Patch by: Ben Darnell
+  Bug: http://curl.haxx.se/docs/adv_20130412.html
 
-Kamil Dudka (24 Jun 2010)
-- [Pavel Raiskup brought this change]
+Guenter Knauf (11 Apr 2013)
+- Enabled MinGW sync resolver builds.
 
-  ftp-wildcard: avoid tight loop when used without any pattern
-  
-  It was broken for URLs like "ftp://example.com/".
+Yang Tse (10 Apr 2013)
+- if2ip.c: fix compiler warning
 
-Daniel Stenberg (21 Jun 2010)
-- maketgz: produce CHANGES automatically with the 1000 most recent commits
+Guenter Knauf (10 Apr 2013)
+- Fixed lost OpenSSL output with "-t" - followup.
   
-  It passes the git log output through 'log2changes.pl' to produce
-  the lot.
+  The previously applied patch didnt work on Windows; we cant rely
+  on shell commands like 'echo' since they act diffently on each
+  platform and each shell.
+  In order to keep this script platform-independent the code must
+  only use pure Perl.
 
-- ignore: CHANGES.dist gets generated by maketgz
-
-- CHANGES: move all contents from CHANGES to CHANGES.0
+Daniel Stenberg (9 Apr 2013)
+- test1217: verify parsing 257 responses with "rubbish" before path
   
-  CHANGES is no longer used for manually edited content. It is to
-  be generated automatically by maketgz when we make release
-  tarballs.
+  Test 1217 verifies commit e0fb2d86c9f78, and without that change this
+  test fails.
+
+- [Bill Middlecamp brought this change]
 
-- log2changes: correct command line, fix tag usage, change Version output
+  FTP: handle "rubbish" in front of directory name in 257 responses
   
-  --decorate=full is needed with my git 1.7.1 to get the necessary
-  output so that the previous edit would work to extract the
-  Version stuff.
+  When doing PWD, there's a 257 response which apparently some servers
+  prefix with a comment before the path instead of after it as is
+  otherwise the norm.
   
-  ... but I had to edit how the refs/tags was extracted since it
-  had a little flaw that made it miss the 7.20.1 output.
+  Failing to parse this, several otherwise legitimate use cases break.
   
-  Finally, I changed so that Version is outputted even more similar
-  to how CHANGES does it.
+  Bug: http://curl.haxx.se/mail/lib-2013-04/0113.html
 
-Dan Fandrich (21 Jun 2010)
-- Make the output of log2changes.pl even more closely match CHANGES
-  
-  Add the ASCII art header, and list version commits by decoding
-  the ref tag names, when available (using the git log --decorate
-  option).
+Guenter Knauf (9 Apr 2013)
+- Fixed ares-enabled builds with static makefiles.
 
-Daniel Stenberg (19 Jun 2010)
-- log2changes: first version of the git log to CHANGES conversion script
-  
-  $ git log --pretty=fuller --no-color --date=short | ./log2changes.pl
+- Fixed lost OpenSSL output with "-t".
   
-  Of course, limiting the log output with a range like with
-  "[tag]..HEAD" appended can be very useful too.
+  The OpenSSL pipe wrote to the final CA bundle file, but the encoded PEM
+  output wrote to a temporary file.  Consequently, the OpenSSL output was
+  lost when the temp file was renamed to the final file at script finish
+  (overwriting the final file written earlier by openssl).
+  Patch posted to the list by Richard Michael (rmichael edgeofthenet org).
 
-- sendrecv: treat all negative values from send/recv as errors
+Daniel Stenberg (9 Apr 2013)
+- test1216: test tailmatching cookie domains
   
-  For example the libssh2 based functions return other negative
-  values than -1 to signal errors and it is important that we catch
-  them properly. Right before this, various failures from libssh2
-  were treated as negative download amounts which caused havoc.
+  This test is an attempt to repeat the problem YAMADA Yasuharu reported
+  at http://curl.haxx.se/mail/lib-2013-04/0108.html
 
-- multi: prevent NULL pointer dereference
+- RELEASe-NOTES: synced with 29fdb2700f797
   
-  My additional call to Curl_pgrsUpdate() would sometimes get
-  called even though there's no connection (left) so a NULL pointer
-  would get passed, causing a segfault.
+  added "tcpkeepalive on Mac OS X"
 
-- smtp: fixed a few uses of size_t that seemed to believe it was signed
+Nick Zitzmann (8 Apr 2013)
+- darwinssl: disable insecure ciphers by default
   
-  Reported-by: Steven M. Schweda
+  I noticed that aria2's SecureTransport code disables insecure ciphers such
+  as NULL, anonymous, IDEA, and weak-key ciphers used by SSLv3 and later.
+  That's a good idea, and now we do the same thing in order to prevent curl
+  from accessing a "secure" site that only negotiates insecure ciphersuites.
 
-Dan Fandrich (17 Jun 2010)
-- Fixed an OOM memory leak in the FTP wildcard code
+Daniel Stenberg (8 Apr 2013)
+- [Robert Wruck brought this change]
 
-Kamil Dudka (17 Jun 2010)
-- test575: do not fail with threaded DNS resolver
-
-Daniel Stenberg (17 Jun 2010)
-- [Krister Johansen brought this change]
-
-  multi: unmark handle as used when no longer head of pipeline
+  tcpkeepalive: Support CURLOPT_TCP_KEEPIDLE on OSX
+  
+  MacOS X doesn't have TCP_KEEPIDLE/TCP_KEEPINTVL but only a single
+  TCP_KEEPALIVE (see
+  http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man4/tcp.4.html).
+  Here is a patch for CURLOPT_TCP_KEEPIDLE on OSX platforms.
 
-- multi: call the progress function only once and allow abort
+- configure: remove CURL_CHECK_FUNC_RECVFROM
   
-  1) no need to call the progress function twice when in the
-  CURLM_STATE_TOOFAST state.
+  1 - We don't use the results from the test and we never did. recvfrom()
+  is only used by the TFTP code and it has not caused any problems.
   
-  2) Make sure that the progress callback's return code is
-  acknowledged when used
+  2 - the CURL_CHECK_FUNC_RECVFROM function is extremely slow
 
-- multi: call the progress callback in all states
-  
-  As long as no error is reported, the progress function can get
-  called. This may be a little TOO often so we should keep an eye
-  on this and possibly make this conditional somehow.
+Steve Holme (8 Apr 2013)
+- RELEASE-NOTES: Corrected duplicate NTLM memory leaks
 
-- configure: spell --disable-threaded-resolver correctly
+- RELEASE-NOTES: Removed trailing full stop
+
+Daniel Stenberg (8 Apr 2013)
+- [Fabian Keil brought this change]
+
+  proxy: make ConnectionExists() check credential of proxyconnections too
   
-  Previously we only accepted the option when named
-  --disable-threaded-resover, which wasn't quite intended.
+  Previously it only compared credentials if the requested needle
+  connection wasn't using a proxy. This caused NTLM authentication
+  failures when using proxies as the authentication code wasn't send on
+  the connection where the challenge arrived.
   
-  Reported by: Helwing Lutz
+  Added test 1215 to verify: NTLM server authentication through a proxy
+  (This is a modified copy of test 67)
 
-- release: start on 7.21.1, bump contributor count
+- RELEASE-NOTES: sync with 704a5dfca9
 
-- version: start working on the 7.21.1-dev version
+- TODO-RELEASE: cleaned up, not really maintained lately
 
-- THANKS: added contributors from the 7.21.0 release
+Marc Hoersken (7 Apr 2013)
+- if2ip.c: Fixed another warning: unused parameter 'remote_scope'
 
-Version 7.21.0 (16 Jun 2010)
+Daniel Stenberg (7 Apr 2013)
+- [Marc Hoersken brought this change]
 
-Daniel Stenberg (16 Jun 2010)
-- release: 7.21.0
+  cookie.c: Made cookie sort function more deterministic
+  
+  Since qsort implementations vary with regards to handling the order
+  of similiar elements, this change makes the internal sort function
+  more deterministic by comparing path length first, then domain length
+  and finally the cookie name. Spotted with testcase 62 on Windows.
 
-Yang Tse (10 Jun 2010)
-- remove unused 'tmpdata' and 'backup' ftp_parselist_data struct members
+Marc Hoersken (7 Apr 2013)
+- curl_schannel.c: Follow up on memory leak fix ae4558d
 
-- replace isprint() with ISPRINT()
+- Revert "getpart.pm: Strip carriage returns to fix Windows support"
+  
+  This reverts commit e51b23c925a2721cf7c29b2b376d3d8903cfb067.
+  As discussed on the mailinglist, this was not the correct approach.
 
-- ensure that Curl_wildcard_dtor() leaves WildcardData struct zero initialized
+- http_negotiate.c: Fixed passing argument from incompatible pointer type
 
-Patrick Monnerat (9 Jun 2010)
-- ILE/RPG binding updated to current curl.h definitions.
+- ftp.c: Added missing brackets around ABOR command logic
 
-Yang Tse (9 Jun 2010)
-- code simplification
+- sockfilt.c: Fixed detection of client-side connection close
+  
+  WINSOCK only:
+  Since FD_CLOSE is only signaled once, it may trigger at the same
+  time as FD_READ. Data actually being available makes it impossible
+  to detect that the connection was closed by checking that recv returns
+  zero. Another recv attempt could block the connection if it was
+  not closed. This workaround abuses exceptfds in conjunction with
+  readfds to signal that the connection has actually closed.
 
-- add Curl_ prefix to conform with cURL naming standards
+- curl_schannel.c: Fixed memory leak if connection was not successful
 
-- Merge branch 'master' of git@github.com:bagder/curl
+- if2ip.c: Fixed warning: unused parameter 'remote_scope'
 
-- fix compiler warning using curl_socket_t to store socket descriptor
+- runtests.pl: Fixed --verbose parameter passed to http_pipe.py
 
-Daniel Stenberg (8 Jun 2010)
-- inet_pton: warnings: use size_t to store pointer deltas
+- sockfilt.c: Reduce CPU load while running under a Windows PIPE
 
-Yang Tse (8 Jun 2010)
-- avoid redundant work when reusing same connection
+- tftpd.c: Apply sread timeout to the whole data transfer session
 
-- fix function result checking
+- getpart.pm: Strip carriage returns to fix Windows support
 
-Daniel Stenberg (8 Jun 2010)
-- transfer: warning: implicit conversion
+Daniel Stenberg (6 Apr 2013)
+- ftp tests: libcurl returns CURLE_FTP_ACCEPT_FAILED better now
   
-  There is an implicit conversion from "unsigned long" to "long";
-  rounding, sign extension, or loss of accuracy may result.
-  
-  Fixed by an added typecast.
-
-- TFTP: fix compiler warning
+  Since commit 57aeabcc1a20f, it handles errors on the control connection
+  while waiting for the data connection better.
   
-  Curl_fillreadbuffer()'s second argument takes an int, so
-  typecasting to another is a bad idea.
+  Test 591 and 592 are updated accordingly.
 
-- TFTP: fix warning for sendto() usage on non-POSIX systems
+- FTP: wait on both connections during active STOR state
   
-  Older unixes want an 'int' instead of 'size_t' as the 3rd
-  argumment so before this change it would cause warnings such as:
+  When doing PORT and upload (STOR), this function needs to extract the
+  file descriptor for both connections so that it will respond immediately
+  when the server eventually connects back.
   
-  There is an implicit conversion from "unsigned long" to "int";
-  rounding, sign extension, or loss of accuracy may result.
-
-Dan Fandrich (7 Jun 2010)
-- Include Makefile.inc to get the list of source files for Amiga
+  This flaw caused active connections to become unnecessary slow but they
+  would still often work due to the normal polling on a timeout. The bug
+  also would not occur if the server connected back very fast, like when
+  testing on local networks.
   
-  Signed-off-by: Diego Casorran <dcasorran@gmail.com>
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1183
+  Reported by: Daniel Theron
 
-Yang Tse (7 Jun 2010)
-- Curl_updateconninfo() error handling fix
+Marc Hoersken (6 Apr 2013)
+- tftpd.c: Follow up cleanup and restore of previous sockopt
 
-Daniel Stenberg (5 Jun 2010)
-- [Constantine Sapuntzakis brought this change]
+Daniel Stenberg (6 Apr 2013)
+- [Kim Vandry brought this change]
 
-  OpenSSL: fix spurious SSL connection aborts
+  connect: treat an interface bindlocal() problem as a non-fatal error
   
-  Was seeing spurious SSL connection aborts using libcurl and
-  OpenSSL. I tracked it down to uncleared error state on the
-  OpenSSL error stack - patch attached deals with that.
+  I am using curl_easy_setopt(CURLOPT_INTERFACE, "if!something") to force
+  transfers to use a particular interface but the transfer fails with
+  CURLE_INTERFACE_FAILED, "Failed binding local connection end" if the
+  interface I specify has no IPv6 address. The cause is as follows:
   
-  Rough idea of problem:
+  The remote hostname resolves successfully and has an IPv6 address and an
+  IPv4 address.
   
-  Code that uses libcurl calls some library that uses OpenSSL but
-  don't clear the OpenSSL error stack after an error.
+  cURL attempts to connect to the IPv6 address first.
   
-  ssluse.c calls SSL_read which eventually gets an EWOULDBLOCK from
-  the OS. Returns -1 to indicate an error
+  bindlocal (in lib/connect.c) fails because Curl_if2ip cannot find an
+  IPv6 address on the interface.
   
-  ssluse.c calls SSL_get_error. First thing, SSL_get_error calls
-  ERR_get_error to check the OpenSSL error stack, finds an old
-  error and returns SSL_ERROR_SSL instead of SSL_ERROR_WANT_READ or
-  SSL_ERROR_WANT_WRITE.
+  This is a fatal error in singleipconnect()
   
-  ssluse.c returns an error and aborts the connection
+  This change will make cURL try the next IP address in the list.
   
-  Solution:
+  Also included are two changes related to IPv6 address scope:
   
-  Clear the openssl error stack before calling SSL_* operation if
-  we're going to call SSL_get_error afterwards.
+  - Filter the choice of address in Curl_if2ip to only consider addresses
+  with the same scope ID as the connection address (mismatched scope for
+  local and remote address does not result in a working connection).
   
-  Notes:
+  - bindlocal was ignoring the scope ID of addresses returned by
+  Curl_if2ip . Now it uses them.
   
-  This is much more likely to happen with multi because it's easier
-  to intersperse other calls to the OpenSSL library in the same
-  thread.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1189
 
-Yang Tse (5 Jun 2010)
-- replace socklen_t with curl_socklen_t
+Marc Hoersken (6 Apr 2013)
+- tftpd.c: Fixed sread timeout on Windows by setting it manually
 
-Daniel Stenberg (5 Jun 2010)
-- [Frank Meier brought this change]
+- ftp.pm: Added tskill to support Windows XP Home
 
-  getinfo: added *_PRIMARY_PORT, *_LOCAL_IP and *_LOCAL_PORT
+- runtests.pl: Modularization of MinGW/Msys compatibility functions
 
-- RELEASE-NOTES: add contributors not mentioned
-
-Yang Tse (4 Jun 2010)
-- Enable OpenLDAP support for cygwin builds.
-  
-  Enable OpenLDAP support for cygwin builds. This support was disabled back
-  in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
-  cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
-  allow building an OpenLDAP enabled libcurl supporting back to Windows 95.
-  
-  Remove non-functional CURL_LDAP_HYBRID code and references.
+- ftp.pm: Made Perl testsuite able to handle Windows processes
 
-Kamil Dudka (2 Jun 2010)
-- ftplistparser.c: oops, fix typo in the last commit
+- util.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8
 
-- ftplistparser.c: avoid some invalid dereferences
+- ftp.pm: Made Perl testsuite able to kill Windows processes
 
-- lib: eliminate some dead code
+- util.c: Follow up cleanup on eeefcdf
 
-Daniel Stenberg (2 Jun 2010)
-- SSH: corrected the inability to respect the timeout
-  
-  Jason McDonald posted bug report #3006786 when he found that the
-  SFTP code didn't timeout properly in several places in the code
-  even if a timeout was set properly.
+Daniel Stenberg (6 Apr 2013)
+- cpp: use #ifdef __MINGW32__ to avoid compiler complaints
   
-  Based on his suggested patch, I wrote a different implementation
-  that I think addressed the issue better and also uses the connect
-  timeout for the initial part of the SSH/SFTP done during the
-  "protocol connect" phase.
-  
-  (http://curl.haxx.se/bug/view.cgi?id=3006786)
-
-Yang Tse (2 Jun 2010)
-- mention last changes
+  ... instead of just #if
 
-- add missing new files to non-configure target build files
-
-- include libcurl standard internal headers
-
-Daniel Stenberg (2 Jun 2010)
-- TODO: add multi interface improvement remove ldap select
-
-Yang Tse (2 Jun 2010)
-- make setup.h first included file
+Marc Hoersken (6 Apr 2013)
+- util.c: Made write_pidfile write the correct PID on MinGW/Msys
+  
+  This workaround fixes an issue on MinGW/Msys regarding the Perl
+  testsuite scripts not being able to signal or control the server
+  processes. The MinGW Perl runtime only sees the Msys processes and
+  their corresponding PIDs, but sockfilt (and other servers) wrote the
+  Windows PID into their PID-files. Since this PID is useless to the
+  testsuite, the write_pidfile function was changed to search for the
+  Msys PID and write that into the PID-file.
 
-- fix spnego memory leak
+Daniel Stenberg (5 Apr 2013)
+- RELEASE-NOTES: synced with 5e722b2d09087
+  
+  3 more bug fixes, 6 more contributors
 
-- openldap header inclusions fix
+Marc Hoersken (5 Apr 2013)
+- sockfilt.c: Fixed handling of multiple fds being signaled
 
-Daniel Stenberg (1 Jun 2010)
-- multi_socket: handles timer inaccuracy better for timeouts
+Kamil Dudka (5 Apr 2013)
+- curl_global_init.3: improve description of CURL_GLOBAL_ALL
   
-  Igor Novoseltsev reported a problem with the multi socket API and
-  using timeouts and timers. It boiled down to a problem with
-  libcurl's use of GetTickCount() interally to figure out the
-  current time, while Igor's own application code used another
-  function call.
+  Reported by: Tomas Mlcoch
+
+- examples/multi-single.c: fix the order of destructions
   
-  It made his app call the socket API timeout function a bit
-  _before_ libcurl would consider the timeout to trigger, and that
-  could easily lead to timeouts or stalls in the app. It seems
-  GetTickCount() in general often has no better resolution than
-  16ms and switching to the alternative function
-  QueryPerformanceCounter has its share of problems:
-  http://www.virtualdub.org/blog/pivot/entry.php?id=106
+  ... so that it adheres to the API documentation.
   
-  We address this problem by simply having libcurl treat timers
-  that already has occured or will occur within 40ms subject for
-  treatment. I'm confident that there are other implementations and
-  operating systems with similarly in accurate timer functions so
-  it makes sense to have applied generically and I don't believe we
-  sacrifice much by adding a 40ms inaccuracy on these timeouts.
+  Reported by: Tomas Mlcoch
 
-Yang Tse (1 Jun 2010)
-- fix ldaps option issue
-
-- fix ldap related compilation issues
+Daniel Stenberg (5 Apr 2013)
+- Curl_open: restore default MAXCONNECTS to 5
+  
+  At some point recently we lost the default value for the easy handle's
+  connection cache, and this change puts it back to 5 - which is the
+  former default value and it is documented in the curl_easy_setopt.3 man
+  page.
 
-- fix compiler warning: enumerated type mixed with another type
+Marc Hoersken (4 Apr 2013)
+- sockfilt.c: Added wrapper functions to fix Windows console issues
+  
+  The new read and write wrapper functions support reading from stdin
+  and writing to stdout/stderr on Windows by using the appropriate
+  Windows API functions and data types.
 
-- fix compiler warning: enumerated type mixed with another type
+Yang Tse (4 Apr 2013)
+- lib1509.c: fix compiler warnings
 
-Patrick Monnerat (31 May 2010)
-- smtp_authenticate: avoid compiler warnings
+- easy.c: fix compiler warning
 
-Yang Tse (31 May 2010)
-- fix compiler warning: enumerated type mixed with another type
+Daniel Stenberg (4 Apr 2013)
+- --engine: spellfix the help message
+  
+  Reported by: Fredrik Thulin
 
-- fix compiler warning: enumerated type mixed with another type
+Yang Tse (4 Apr 2013)
+- http_negotiate.c: follow-up for commit 3dcc1a9c
 
-- fix compiler warning: enumerated type mixed with another type
+Linus Nielsen Feltzing (4 Apr 2013)
+- easy: Fix the broken CURLOPT_MAXCONNECTS option
+  
+  Copy the CURLOPT_MAXCONNECTS option to CURLMOPT_MAXCONNECTS in
+  curl_easy_perform().
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1212
+  Reported-by: Steven Gu
 
-- fix compiler warning: external declaration in primary source file
+Guenter Knauf (4 Apr 2013)
+- Updated copyright date.
 
-- fix compiler warning: variable was set but never used
+- Another small output fix for --help and --version.
 
-- fix compiler warning: enumerated type mixed with another type
+Yang Tse (4 Apr 2013)
+- http_negotiate.c: fix several SPNEGO memory handling issues
 
-- fix compiler warning: external declaration in primary source file
+Guenter Knauf (4 Apr 2013)
+- Added a cont to specify base64 line wrap.
 
-- update year in copyright notice
+- Fixed version output.
 
-Kamil Dudka (29 May 2010)
-- strtoofft: rename CURL_LLONG_MIN -> CURL_OFF_T_MIN
-  
-  ... and CURL_LLONG_MAX -> CURL_OFF_T_MAX
+- Added support for --help and --version options.
 
-- CURL_LLONG_MAX: avoid constant overflow
+- Added option to specify length of base64 output.
   
-  ... when (CURL_SIZEOF_CURL_OFF_T == 4)
-
-Daniel Stenberg (28 May 2010)
-- [Howard Chu brought this change]
+  Based on a patch posted to the list by Richard Michael.
 
-  LDAPS: list availability depending on SSL's presence
+Daniel Stenberg (3 Apr 2013)
+- curl_easy_setopt.3: CURLOPT_HTTPGET disables CURLOPT_UPLOAD
 
-- [Howard Chu brought this change]
+- [Yasuharu Yamada brought this change]
 
-  LDAP: make it build without SSL if no such support is available
+  Curl_cookie_add: only increase numcookies for new cookies
   
-  of course it also goes for the case where SSL is explicitly
-  disabled
+  Count up numcookies in Curl_cookie_add() only when cookie is new one
 
-- TODO: removed fixed items
+- SO_SNDBUF: don't set SNDBUF for win32 versions vista or later
   
-  These two items are now actually implemented:
+  The Microsoft knowledge-base article
+  http://support.microsoft.com/kb/823764 describes how to use SNDBUF to
+  overcome a performance shortcoming in winsock, but it doesn't apply to
+  Windows Vista and later versions. If the described SNDBUF magic is
+  applied when running on those more recent Windows versions, it seems to
+  instead have the reversed effect in many cases and thus make libcurl
+  perform less good on those systems.
   
-  11.1 Content-Disposition
-  11.5 ftp wildcard download
-
-Kamil Dudka (28 May 2010)
-- lib: eliminate 'statement not reached' warnings
+  This fix thus adds a run-time version-check that does the SNDBUF magic
+  conditionally depending if it is deemed necessary or not.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1188
+  Reported by: Andrew Kurushin
+  Tested by: Christian Hägele
 
-Daniel Stenberg (28 May 2010)
-- test1115: verify that unexpected 1xx responses work fine
+Nick Zitzmann (1 Apr 2013)
+- darwinssl: additional descriptive messages of SSL handshake errors
+  
+  (This doesn't need to appear in the release notes.)
 
-Kamil Dudka (28 May 2010)
-- lib577: avoid redefinition of ERROR
+Guenter Knauf (1 Apr 2013)
+- Added dns and connect time to output.
 
-- test313: a new test for CRL support
+Daniel Stenberg (1 Apr 2013)
+- RELEASE-NOTES: synced with 0614b902136
 
-- tests/certs: re-generated because of lost pass-phrase
+- code-policed
 
-- tests/certs/scripts: generate also CRL
+- tcpkeepalive: support TCP_KEEPIDLE/TCP_KEEPINTVL on win32
   
-  ... and make it possible to do so without any user interaction
-
-Daniel Stenberg (27 May 2010)
-- [Howard Chu brought this change]
-
-  openldap: fix compiler warnings
-
-- indent: some whitespace edits
+  Patch by: Robert Wruck
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1209
 
-Kamil Dudka (27 May 2010)
-- wildcard.c: add missing include of "setup.h"
+- BINDINGS: BBHTTP is a cocoa binding, Julia has a binding
 
-- [Tor Arntsen brought this change]
+- ftp_sendquote: use PPSENDF, not FTPSENDF
+  
+  The last remaining code piece that still used FTPSENDF now uses PPSENDF.
+  In the problematic case, a PREQUOTE series was done on a re-used
+  connection when Curl_pp_init() hadn't been called so it had messed up
+  pointers. The init call is done properly from Curl_pp_sendf() so this
+  change fixes this particular crash.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-03/0319.html
+  Reported by: Sam Deane
 
-  lib573: do not compare double for exact match
+Steve Holme (27 Mar 2013)
+- RELEASE-NOTES: Corrected typo
 
-- [Pavel Raiskup brought this change]
+Daniel Stenberg (27 Mar 2013)
+- [Clemens Gruber brought this change]
 
-  wildcard.c: add missing include of "curl_memory.h"
+  multi-uv.c: remove unused variable
 
-- [Tor Arntsen brought this change]
+- RELEASE-NOTES: add two references
 
-  setup_once: use enum type for 'bool' on non-C99 platforms
+- test1509: verify proxy header response headers count
   
-  An enum will catch non-bool assignments to bool on platforms with
-  a strict compiler, e.g MIPSPro.
+  Modified sws to support and use custom CONNECT responses instead of the
+  previously naive hard-coded version. Made the HTTP test server able to
+  extract test case number from the host name in a CONNECT request by
+  finding the number after the last dot. It makes 'machine.moo.123' use
+  test case 123.
   
-  Signed-off-by: Kamil Dudka <kdudka@redhat.com>
-
-- url.c: avoid implied cast to bool
-
-- [Tor Arntsen brought this change]
-
-  curl_fnmatch: remove use of register keyword
+  Adapted a larger amount of tests to the new <connect> style.
   
-  Using the 'register' keyword rarely improves anything with modern
-  compilers and architectures.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1204
+  Reported by: Martin Jansen
 
-Daniel Stenberg (26 May 2010)
-- [Julien Chaffraix brought this change]
+- [Clemens Gruber brought this change]
 
-  RTMP: Fix compiler warnings
+  Added libuv example multi-uv.c
 
-- [Julien Chaffraix brought this change]
+Yang Tse (25 Mar 2013)
+- NTLM: fix several NTLM code paths memory leaks
 
-  OOM fixes in http_negociate.c and lib/splay.c
+- WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup() usage
   
-  Fix 2 OOM errors: a missing NULL-check in lib/http_negociate.c
-  and a potential NULL dereferencing in lib/splay.c
-
-- [Howard Chu brought this change]
-
-  LDAP: properly implemented as a curl_handler
+  As of 25-mar-2013 wcsdup() _wcsdup() and _tcsdup() are only used in
+  WIN32 specific code, so tracking of these has not been extended for
+  other build targets. Without this fix, memory tracking system on
+  WIN32 builds, when using these functions, would provide misleading
+  results.
   
-  makes the LDAP code much cleaner, nicer and in general being a
-  better libcurl citizen. If a new enough OpenLDAP version is
-  detect, the new and shiny lib/openldap.c code is then used
-  instead of the old cruft
+  In order to properly extend this support for all targets curl.h
+  would have to define curl_wcsdup_callback prototype and consequently
+  wchar_t should be visible before that in curl.h.  IOW curl_wchar_t
+  defined in curlbuild.h and this pulling whatever system header is
+  required to get wchar_t definition.
   
-  Code by Howard, minor cleanups by Daniel.
-
-- [Tor Arntsen brought this change]
+  Additionally a new curl_global_init_mem() function that also receives
+  user defined wcsdup() callback would be required.
 
-  curl_fnmatch: Use int not bool when function returns int
+- curl_ntlm_msgs.c: revert commit 463082bea4
   
-  bool in curl internals is unsigned char and should not be used
-  to receive return value from functions returning int - this fails
-  when using IBM VisualAge and Tru64 compilers.
+  reverts unreleased invalid memory leak fix
 
-- TFTP: send legal timeout value
+Daniel Stenberg (23 Mar 2013)
+- RELEASE-NOTES: synced with bc6037ed3ec02
   
-  Eric Mertens posted bug #3003705: when we made TFTP use the
-  correct timeout option when sent to the server (fixed May 18th
-  2010) it became obvious that libcurl used invalid timeout values
-  (300 by default while the RFC allows nothing above 255). While of
-  course it is obvious that as TFTP has worked thus far without
-  being able to set timeout at all, just removing the setting
-  wouldn't make any difference in behavior. I decided to still keep
-  it (but fix the problem) as it now actually allows for easier
-  (future) customization of the timeout.
-  
-  (http://curl.haxx.se/bug/view.cgi?id=3003705)
+  More changes, bugfixes and contributors!
 
-- TFTP: don't ack if wrong block num is received
-  
-  If an unexpected block number was received, break out of the
-  switch loop.
+- [Martin Jansen brought this change]
 
-- TFTP: block id wrap bug fix
+  Curl_proxyCONNECT: count received headers
   
-  In a normal expression, doing [unsigned short] + 1 will not wrap
-  at 16 bits so the comparisons and outputs were done wrong. I
-  added a macro do make sure it gets done right.
+  Proxy servers tend to add their own headers at the beginning of
+  responses. The size of these headers was not taken into account by
+  CURLINFO_HEADER_SIZE before this change.
   
-  Douglas Kilpatrick filed bug report #3004787 about it:
-  http://curl.haxx.se/bug/view.cgi?id=3004787
-
-- [Ben Greear brought this change]
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1204
 
-  Fix build warnings.
+Steve Holme (21 Mar 2013)
+- sasl: Corrected a few violations of the curl coding standards
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
-
-- [Ben Greear brought this change]
+  Corrected some incorrectly positioned pointer variable declarations to
+  be "char *" rather than "char* ".
 
-  setopt: Fix setting of set.is_fwrite_set
+- multi.c: Corrected a couple of violations of the curl coding standards
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  Corrected some incorrectly positioned pointer variable declarations to
+  be "type *" rather than "type* ".
 
-- [Tanguy Fautre brought this change]
-
-  build: allow curl to build with Microsoft VC10
+- imap-tests: Added CRLF to reply data to be compliant with RFC-822
   
-  By undefing a bunch of E* defines that VC10 has started to define
-  but that we redefine internally to their WSA* alternatives when
-  building for Windows.
-
-Kamil Dudka (20 May 2010)
-- [Tor Arntsen brought this change]
+  Updated the reply data in tests: 800, 801, 802, 804 and 1321 to possess
+  the CRLF as per RFC-822.
 
-  Test 573: Use correct type for CURLINFO_CONNECT_TIME
+- multi.c: Fix compilation warning
   
-  curl_easy_getinfo() called with a pointer to long instead of double
-  would sigbus on RISC processors (e.g. MIPS) due to wrong alignment
-  of pointer address.
-
-- [Tor Arntsen brought this change]
+  warning: an enumerated type is mixed with another type
 
-  lib: Fix AIX build failure
+- multi.c: fix compilation error
+  
+  warning: conversion from enumeration type to different enumeration type
 
-Dan Fandrich (19 May 2010)
-- Fixed some memory leaks in the POP3 torture tests
+- lib1900.c: fix compilation warning
+  
+  warning: declaration of 'time' shadows a global declaration
 
-- Fixed a memory leak in the SMTP torture tests
+Yang Tse (20 Mar 2013)
+- [John E. Malmberg brought this change]
 
-Daniel Stenberg (18 May 2010)
-- TFTP: send timeout option correctly
+  build_vms.com: use existing curlbuild.h and parsing fix
   
-  Eric Mertens posted bug report #3003005 pointing out that the
-  libcurl TFTP code was not sending the timeout option properly to
-  the server, and suggested a fix.
+  This patch removes building curlbuild.h from the build_vms.com procedure
+  and uses the one in the daily or release tarball instead.
   
-  (http://curl.haxx.se/bug/view.cgi?id=3003005)
-
-Kamil Dudka (16 May 2010)
-- [Tor Arntsen brought this change]
-
-  lib: Change some CRLF line endings to LF
+  packages/vms/build_curlbuild_h.com is obsolete with this change.
   
-  An update had added a couple of lines with DOS line endings,
-  and some compilers will choke on that (e.g. the Tru64 compiler).
-
-- ftp wildcard: a new option CURLOPT_FNMATCH_DATA
-
-Daniel Stenberg (15 May 2010)
-- [Howard Chu brought this change]
-
-  RMTP: the version code is now rtmp aware
-
-- [Howard Chu brought this change]
-
-  RTMP: fix wrong #ifdef
+  Accessing the library module name "tool_main" needs different handling
+  when the optional extended parsing is enabled.
+  
+  Tested on IA64/VMS 8.4 and VAX/VMS 7.3
 
-- [Pavel Raiskup brought this change]
+Nick Zitzmann (19 Mar 2013)
+- darwinssl: disable ECC ciphers under Mountain Lion by default
+  
+  I found out that ECC doesn't work as of OS X 10.8.3, so those ciphers are
+  turned off until the next point release of OS X.
 
-  ftp wildcard: fix int32_t and size/group mixups
+Steve Holme (18 Mar 2013)
+- FEATURES: Small tidy up for constancy and grammar
 
-Dan Fandrich (14 May 2010)
-- Fixed test 577 to work when --enable-hidden-symbols is configured
+Daniel Stenberg (18 Mar 2013)
+- [Oliver Schindler brought this change]
 
-Daniel Stenberg (14 May 2010)
-- OpenSSL: multi interface handshake could hang
-  
-  John-Mark Bell filed bug #3000052 that identified a problem (with
-  an associated patch) with the OpenSSL handshake state machine
-  when the multi interface is used:
+  Curl_proxyCONNECT: clear 'rewindaftersend' on success
   
-  Performing an https request using a curl multi handle and using
-  select or epoll to wait for events results in a hang. It appears
-  that the cause is the fix for bug #2958179, which makes
-  ossl_connect_common unconditionally return from the step 2 loop
-  when fetching from a multi handle.
+  After having done a POST over a CONNECT request, the 'rewindaftersend'
+  boolean could be holding the previous value which could lead to badness.
   
-  When ossl_connect_step2 has completed, it updates
-  connssl->connecting_state to ssl_connect_3. ossl_connect_common
-  will then return to the caller, as a multi handle is in
-  use. Eventually, the client code will call curl_multi_fdset to
-  obtain an updated fdset to select or epoll on. For https
-  requests, curl_multi_fdset will cause https_getsock to be called.
-  https_getsock will only return a socket handle if the
-  connecting_state is ssl_connect_2_reading or
-  ssl_connect_2_writing.  Therefore, the client will never obtain a
-  valid fdset, and thus not drive the multi handle, resulting in a
-  hang.
+  This should be tested for in a new test case!
   
-  (http://curl.haxx.se/bug/view.cgi?id=3000052)
-
-- changelog: add link to bug report
+  Bug: https://groups.google.com/d/msg/msysgit/B31LNftR4BI/KhRTz0iuGmUJ
 
-Dan Fandrich (14 May 2010)
-- Added directories.pm to the source tar ball
-
-Daniel Stenberg (14 May 2010)
-- follow redirect: ignore response-body on redirect even if compressed
+Steve Holme (18 Mar 2013)
+- TODO: Reordered the protocol and security sections
   
-  Sebastian V reported bug #3000056 identifying a problem with
-  redirect following. It showed that when curl followed redirects
-  it didn't properly ignore the response body of the 30X response
-  if that response was using compressed Content-Encoding!
+  Moved SMTP, POP3, IMAP and New Protocol sections to be listed after the
+  other protocols (FTP, HTTP and TELNET) and SASL to be after SSL and
+  GnuTLS as these are all security related.
   
-  (http://curl.haxx.se/bug/view.cgi?id=3000056)
-
-- version: we're now going for 7.21.0
+  Additionally fixed numbering of the SSL and GnuTLS sections as they
+  weren't consecutive.
 
-- [Hoi-Ho Chan brought this change]
+Yang Tse (18 Mar 2013)
+- tests: specify 'text' mode for some output files in verify section
 
-  Remove support for BSD version of PolarSSL
+Steve Holme (17 Mar 2013)
+- imap: Fixed incorrect initial response generation for SASL AUTHENTICATE
   
-  "The BSD version of PolarSSL was made for migratory purposes only and is not
-  maintained. The GPL version of PolarSSL is actually the only actively
-  developed version, so I would be very reluctant to use the BSD version." /
-  Paul Bakker, PolarSSL hacker.
-  
-  Signed-off-by: Hoi-Ho Chan <hoiho.chan@gmail.com>
-
-Dan Fandrich (12 May 2010)
-- Added Polar SSL and RTMP files to the non-autoconf build files
+  Fixed incorrect initial response generation for the NTLM and LOGIN SASL
+  authentication mechanisms when the SASL-IR was detected.
   
-  I didn't bother with a few that have little hope of running the required
-  dependent libraries.
+  Introduced in commit: 6da7dc026c14.
 
-- Added the new ftp source files to the non-autoconf build files
+- FEATURES: Expanded the supported enhanced IMAP command list
 
-- Copy the license file so it's seen by the Android build system
+- TODO: Corrected typo in TOC
 
-Daniel Stenberg (13 May 2010)
-- updated with symbols added in recent commits for 7.21.0
+- TODO: Added IMAP section and removed unused Other protocols section
 
-- changelogs: mention RTMP and the FTP wildcard support
+- TODO: Added graceful base64 decoding failure to SMTP and POP3
 
-- ftp wildcards: mention they're added in 7.21.0
+- TODO: Corrected typo on section 10.2 heading
 
-- style: minor whitespace change
+Yang Tse (16 Mar 2013)
+- tests: 96, 558, 1330: strip build subdirectory dependent leading path
 
-- syntax: cleanups
+Steve Holme (15 Mar 2013)
+- TODO: Added section 10.2 Initial response to POP3 to do list
 
-- [Pavel Raiskup brought this change]
+- imap-tests: Corrected copy/paste error in test808 reply data
 
-  FTP: WILDCARDMATCH/CHUNKING/FNMATCH added
+Yang Tse (15 Mar 2013)
+- unit1330.c: fix date
 
-- [Howard Chu brought this change]
-
-  RTMP: initial support added, powered by librtmp
+- tests: add #96 #558 and #1330
   
-  librtmp is found at http://rtmpdump.mplayerhq.hu/
+  These verfy that the 'memory tracking' subsystem is actually doing its
+  job when using curl tool (#96), a test in libtest (#558) and also a unit
+  test (#1330), in order to prevent regressions in this functionallity.
 
-- [Howard Chu brought this change]
+Steve Holme (15 Mar 2013)
+- imap-tests: Added test808 for custom EXAMINE command
 
-  sendrecv: make them two pairs of send/recv to properly deal with FTPS
+Daniel Stenberg (15 Mar 2013)
+- HTTP proxy: insert slash in URL if missing
+  
+  curl has been accepting URLs using slightly wrong syntax for a long
+  time, such as when completely missing as slash "http://example.org" or
+  missing a slash when a query part is given
+  "http://example.org?q=foobar".
+  
+  curl would translate these into a legitimate HTTP request to servers,
+  although as was shown in bug #1206 it was not adjusted properly in the
+  cases where a HTTP proxy was used.
+  
+  Test 1213 and 1214 were added to the test suite to verify this fix.
   
-  FTP(S) use two connections that can be set to different recv and
-  send functions independently, so by introducing recv+send pairs
-  in the same manner we already have sockets/connections we can
-  work with FTPS fine.
+  The test HTTP server was adjusted to allow us to specify test number in
+  the host name only without using any slashes in a given URL.
   
-  This commit fixes the FTPS regression introduced in change d64bd82.
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1206
+  Reported by: ScottJi
 
-Kamil Dudka (11 May 2010)
-- changelog: fixed CRL support in libcurl-NSS
+Steve Holme (14 Mar 2013)
+- ftpserver.pl: Added EXAMINE_imap() for IMAP EXAMINE commands
+  
+  Used hard coded data from RFC-3501 section 6.3.2.
 
-- nss: make it possible to read ASCII and DER CRL
+Yang Tse (14 Mar 2013)
+- curl_memory.h: introduce CURLX_NO_MEMORY_CALLBACKS usage possibility
+  
+  This commit alone does not fix anything nor modifies existing
+  interfaces or behaviors, although it is a prerequisite for other
+  fixes.
 
-- nss: add CRL to cache instead of read-only NSS db
+- Makefile.vc6: add missing files
 
-Daniel Stenberg (10 May 2010)
-- git: how to write a fine commit message
+Linus Nielsen Feltzing (14 Mar 2013)
+- pipelining: Remove dead code.
 
-- findtool: file name as a full path requires a slash
+- Multiple pipelines and limiting the number of connections.
   
-  Kalle Vahlman's patch applied a while ago broke how the findtool
-  function searches for tools, as it would always check if "$file"
-  was present first, which thus made the bad assumption that a file
-  in the current directory would be a match.
+  Introducing a number of options to the multi interface that
+  allows for multiple pipelines to the same host, in order to
+  optimize the balance between the penalty for opening new
+  connections and the potential pipelining latency.
   
-  I noticed when it found 'libtool' in the current directory but
-  libtoolize is not there, which confused the script.
-
-Hacki (8 May 2010)
-- moved vars into conditional since seems that winsock implementation doesnt use them.
-
-Daniel Stenberg (7 May 2010)
-- multi interface: missed storing connection time
+  Two new options for limiting the number of connections:
   
-  Dirk Manske reported a regression. When connecting with the multi
-  interface, there were situations where libcurl wouldn't store
-  connect time correctly as it used to (and is documented to) do.
+  CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections
+  to the same host. When adding a handle that exceeds this limit,
+  that handle will be put in a pending state until another handle is
+  finished, so we can reuse the connection.
   
-  Using his fine sample program we could repeat it, and I wrote up
-  test case 573 using that code. The problem does not easily show
-  itself using the local test suite though.
+  CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total.
+  When adding a handle that exceeds this limit,
+  that handle will be put in a pending state until another handle is
+  finished. The free connection will then be reused, if possible, or
+  closed if the pending handle can't reuse it.
   
-  The fix, also as suggested by Dirk, is a bit on the ugly side as
-  it adds yet another call to Curl_verboseconnect() and setting the
-  TIMER_CONNECT time.  That situation is subject for some closer
-  inspection in the future.
-
-- verboseconnect: so the verbose checking within the function
+  Several new options for pipelining:
   
-  As the function is used more than once and libcurl can be built
-  without it, do the conditional check within the verboseconnect()
-  function itself.
-
-- changelogs: split the I/O handling
-
-- [Howard Chu brought this change]
-
-  sendrecv: split the I/O handling into private handler
+  CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a
+  pipeline is "full" when a connection is to be reused, a new connection
+  will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it.
+  If not, the handle will be put in a pending state until a connection is
+  ready (either free or a pipe got shorter).
   
-  Howard Chu brought the bulk work of this patch that properly
-  moves out the sending and recving of data to the parts of the
-  code that are properly responsible for the various ways of doing
-  so.
+  CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not
+  be reused if it is currently processing a transfer with a content
+  length that is larger than this.
   
-  Daniel Stenberg assisted with polishing a few bits and fixed some
-  minor flaws in the original patch.
+  CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not
+  be reused if it is currently processing a chunk larger than this.
   
-  Another upside of this patch is that we now abuse CURLcodes less
-  with the "magic" -1 return codes and instead use CURLE_AGAIN more
-  consistently.
-
-- changelog: PolarSSL
-
-- [Hoi-Ho Chan brought this change]
-
-  PolarSSL: initial support added
+  CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow
+  pipelining.
   
-  This is Hoi-Ho Chan's patch with some minor fixes by me. There
-  are some potential issues in this, but none worse than we can
-  sort out on the list and over time.
-
-- TODO: we've done PRET already, consider HOST for the future
+  CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow
+  pipelining.
   
-  ... and GnuTLS connects are non-blocking, TFTP is better
-  integrated as a "real" protocol and RTSP is supported.
+  See the curl_multi_setopt() man page for details.
 
-- TODO: GnuTLS connects are now non-blocking
+Yang Tse (13 Mar 2013)
+- tool_main.c: remove redundant vms_show storage-class specifier
   
-  Since commit c288860 by Jerome Vouillon
-
-- INTERNALS: tftp is decent now, ldap is not
+  vms_show 'extern' storage-class specifier removed from tool_main.c due to...
   
-  It's not quite fair to list TFTP is a "crappy" member of the
-  libcurl family so I removed its mentioning.
-
-- changelog: mention Ben Greear's telnet work
+  - Advice from Tor Arntsen: http://curl.haxx.se/mail/lib-2013-03/0164.html
+  
+  - HP OpenVMS docs stating that 'Extern is the default storage class for
+    variables declared outside a function.'
+    http://h71000.www7.hp.com/commercial/c/docs/dec_c_help_5.html
+    (Storage_Classes section)
 
-- [Ben Greear brought this change]
+- test509: libcurl initialization with memory callbacks and actual usage
 
-  telnet: Allow programatic use of telnet.
+Steve Holme (13 Mar 2013)
+- pop3: Removed unnecessary transfer cancellation
   
-  The main change is to allow input from user-specified methods,
-  when they are specified with CURLOPT_READFUNCTION.
-  All calls to fflush(stdout) in telnet.c were removed, which makes
-  using 'curl telnet://foo.com' painful since prompts and other data
-  are not always returned to the user promptly.  Use
-  'curl --no-buffer telnet://foo.com' instead.  In general,
-  the user should have their CURLOPT_WRITEFUNCTION do a fflush
-  for interactive use.
-  
-  Also fix assumption that reading from stdin never returns < 0.
-  Old code could crash in that case.
-  
-  Call progress functions in telnet main loop.
-  
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  Following commit e450f66a02d8 and the changes in the multi interface
+  being used internally, from 7.29.0, the transfer cancellation in
+  pop3_dophase_done() is no longer required.
 
-- test: enable valgrind for 604, seems to work
+Yang Tse (13 Mar 2013)
+- Makefile.am: add VMS files not being included in tarball
 
-Kamil Dudka (28 Apr 2010)
-- [Paul Howarth brought this change]
+- [Tom Grace brought this change]
 
-  add 1s post-command delay to tests 513 and 514
+  build_vms.com: VMS build fixes
   
-  addressing http://curl.haxx.se/mail/lib-2009-12/0031.html
+  Added missing slash in cc_full_list.
+  Removed unwanted extra quotes inside symbol tool_main
+  for non-VAX architectures that triggered link failure.
+  Replaced curl_sys_inc with sys_inc.
 
-Daniel Stenberg (26 Apr 2010)
-- [Kalle Vahlman brought this change]
+- [Tom Grace brought this change]
 
-  Allow tools to be defined with full path in buildconf
+  tool_main.c: fix VMS global variable storage-class specifier
+  
+  An extern submits a psect and a global reference to the linker to point
+  to it. Using "extern int vms_show = 0" also creates a globaldef.
   
-  This is required in Scratchbox where
-  LIBTOOL=/targets/links/arch_tools/bin/libtool
-  is set in the environment.
+  The use of the extern by itself does declare a psect but does not declare
+  a globalsymbol. It does declare a globalref. But the linker needs one and
+  only one globaldef or there is an error.
 
-- progress callback: can be called more than once per sec
+Patrick Monnerat (12 Mar 2013)
+- OS400: synchronize RPG binding
 
-- SSH: init and cleanup libssh2 in global_init/cleanup
+Steve Holme (12 Mar 2013)
+- pop3: Fixed continuous wait when using --ftp-list
   
-  The necessary libssh2 functions require libssh2 1.2.5 or later.
+  Don't initiate a transfer when using --ftp-list.
 
-- new configure option --enable-threaded-resolver
+Kamil Dudka (12 Mar 2013)
+- [Zdenek Pavlas brought this change]
 
-- configure: check for libssh2_init and libssh2_exit
-
-Kamil Dudka (24 Apr 2010)
-- nss: fix SSL handshake timeout underflow
+  curl_global_init: accept the CURL_GLOBAL_ACK_EINTR flag
+  
+  The flag can be used in pycurl-based applications where using the multi
+  interface would not be acceptable because of the performance lost caused
+  by implementing the select() loop in python.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1168
+  Downstream Bug: https://bugzilla.redhat.com/919127
 
-Guenter Knauf (24 Apr 2010)
-- encourage users to take latest lib dependencies.
+- easy: do not ignore poll() failures other than EINTR
 
-Daniel Stenberg (24 Apr 2010)
-- socks5: please static code analyzer
+Yang Tse (12 Mar 2013)
+- curl.h: stricter CURL_EXTERN linkage decorations logic
   
-  Make sure we don't call memcpy() if the argument is NULL even
-  though we also passed a zero length then, as the clang analyzer
-  whined and we want to limit warnings (even false positives) when
-  they're this easy to fix.
+  No API change involved.
   
-  The change of (char) to (unsigned char) will fix long user names
-  and passwords on systems that have the char type signed by
-  default.
+  Info: http://curl.haxx.se/mail/lib-2013-02/0234.html
 
-- gzip: Value stored to 'data' is never read
+Daniel Stenberg (11 Mar 2013)
+- THANKS: Latin-1'ified Jiri's name
 
-- RELEASE-NOTES: update top numbers
+Steve Holme (11 Mar 2013)
+- test806: Added CRLF to reply data to be compliant with RFC-822
 
-- changelog: added the --proto and -proto-redir options
+Daniel Stenberg (11 Mar 2013)
+- test805: added crlf newlines to make data size match
+  
+  since mails sent are supposed to have CRLF line endings I added them and
+  now the data size after (\Seen) matches again properly
 
-- [Alex Bligh brought this change]
+- test: fix newline for the data check of 807
 
-  curl: added --proto and --proto-redir
-  
-  --proto tells curl to use the listed protocols for its initial
-  retrieval
-  
-  --proto-redir tells curl to use the listed protocols after a
-  redirect
+Yang Tse (11 Mar 2013)
+- test801 to test807: fix protocol section line endings
 
-Kamil Dudka (24 Apr 2010)
-- test536: do not fail with threaded DNS resolver
+Steve Holme (10 Mar 2013)
+- Makefile.am: Corrected a couple of spurious tab characters
   
-  Also tweaked comments in certain examples using curl_multi_fdset().
+  Corrected a couple of tab characters between test702 and test703, and
+  between test900 and test901 which should be spaces.
 
-Daniel Stenberg (21 Apr 2010)
-- curl: -O crash on windows
-  
-  The -O option caused curl to crash on windows and DOS due to the
-  tool writing out of boundary memory.
+- [Jiri Hruska brought this change]
 
-Yang Tse (20 Apr 2010)
-- hmac.c related compilation adjustment
+  imap: Added test807 for custom request functionality (STORE)
 
-- hmac.c related compilation adjustment
+- [Jiri Hruska brought this change]
 
-monnerat (20 Apr 2010)
-- Add compilation directives for hmac in Watcom,riscos and vc6 platform-specific makefiles.
+  imap: Added test806 for IMAP (folder) LIST command
 
-Yang Tse (20 Apr 2010)
-- [Ruslan Gazizov brought this change]
+- [Jiri Hruska brought this change]
 
-  replaced wsock32.lib usage with ws2_32.lib in MSVC makefiles
+  imap: Added test805 for APPEND functionality
 
-monnerat (19 Apr 2010)
-- Merge branch 'master' of github.com:bagder/curl
+- [Jiri Hruska brought this change]
 
-- Remove null-effect leftover code.
+  imap: Added test804 for skipping SELECT if in the same mailbox
 
-Daniel Stenberg (19 Apr 2010)
-- changelog: -J/--remote-header-name strips CRLF
+- [Jiri Hruska brought this change]
 
-- parse_filename: strip trailing CRs and LFs
+  imap: Added test802 and test803 for UIDVALIDITY verification
   
-  The feature that uses the file name given in a
-  Content-disposition: header didn't properly skip trailing
-  carriage returns and linefeed characters from the end of the file
-  name when it was given without quotes.
-
-- Curl_HMAC_MD5: fix the array init to not warn with picky compilers
-
-monnerat (19 Apr 2010)
-- Fix GnuTLS compilation problem in md5.c
+  Added one test for a request with matching UIDVALIDITY and one which is
+  a mismatched request that will fail.
 
-- Fix compilation problem: declare Curl_HMAC_MD5 as extern in include file.
+- [Jiri Hruska brought this change]
 
-- Merge branch 'master' of github.com:bagder/curl
+  imap: Added test801 for UID and SECTION URL parameters
 
-- Implement SMTP authentication
+- [Jiri Hruska brought this change]
 
-Daniel Stenberg (17 Apr 2010)
-- parseconfig: Value stored to 'line' is never read
+  imap-tests: Accept quoted parameters in ftpserver.pl
   
-  Make the function call with (void) as we don't care about the
-  return code.
-
-- parsedate: Value stored to 'found' is never read
+  Any IMAP parameter can come in escaped and in double quotes. Added a
+  simple function to unquote the command parameters and applied it to
+  the IMAP command handlers.
 
-- check_gzip_header: Value stored to 'data' is never read
+- [Jiri Hruska brought this change]
 
-- dprintf_formatf: Value stored to 'left' is never read
+  tests: Fix ftpserver.pl indentation
+  
+  The whole of FETCH_imap() had one extra space of indentation, whilst
+  APPEND_imap() used indentation of 2 instead of 4 in places.
 
-- curl_version: remove superfluous assignments
+- Makefile.am: Corrected end of line filler character
+  
+  The majority of lines, that specify a test file for inclusion, end with
+  a tab character before the slash whilst some end with a space. Corrected
+  those that end with a space to end with a tab character as well.
 
-- FTP PORT: Value stored to 'rc' is never read
+- email-tests: Updated the test data that corresponds to the test number
+  
+  Finished segregating the email protocol tests, into their own protocol
+  based ranges, in preparation of adding more e-mail related tests to the
+  test suite.
 
-- Curl_setup_transfer: no longer returns anything
+- email-tests: Renamed the IMAP test to be 800
   
-  This function could only return CURLE_OK and by changing it to
-  a void instead, we can simplify code all over.
+  Continued segregating the email protocol tests, into their own protocol
+  based ranges, in preparation of adding more e-mail related tests to the
+  test suite.
 
-- PASV response: Value stored to 'rc' is never read
+- email-tests: Renamed the SMTP tests to be in the range 900-906
+  
+  Continued segregating the email protocol tests, into their own protocol
+  based ranges, in preparation of adding more e-mail related tests to the
+  test suite.
 
-- Curl_perform: Value stored to 'res2' is never read
+- email-tests: Renamed the POP3 tests to be in the range 850-857
+  
+  Started segregating the email protocol tests, into their own protocol
+  based ranges, in preparation of adding more e-mail related tests to the
+  test suite.
 
-- sftp range: remove unnecessary check for NULL pointer
+Daniel Stenberg (10 Mar 2013)
+- hiperfifo: updated to use current libevent API
+  
+  Patch by: Myk Taylor
 
-- ftp_range: remove unnecessary check for NULL pointer
+Steve Holme (10 Mar 2013)
+- imap: Reworked some function descriptions
 
-- file_range: remove unnecessary check for NULL pointer
+- imap: Added some missing comments to imap_sendf()
 
-- SOCKS4: Value stored to 'rc' is never read
+- email: Removed hard returns from init functions
 
-- FTP PASV: Value stored to 'rc' is never read
+Daniel Stenberg (9 Mar 2013)
+- curl_multi_wait: avoid second loop if nothing to do
+  
+  ... hopefully this will also make clang-analyzer stop warning on
+  potentional NULL dereferences (which were false positives anyway).
 
-- ftp_range: Value stored to 'totalsize' is never read
+- multi_runsingle: avoid NULL dereference
+  
+  When Curl_do() returns failure, the connection pointer could be NULL so
+  the code path following needs to that that into account.
   
-  Simplified the code by removing a local variable completely.
+  Bug: http://curl.haxx.se/mail/lib-2013-03/0062.html
+  Reported by: Eric Hu
 
-- SOCKS5: when name resolves fail return immediately
+Steve Holme (9 Mar 2013)
+- imap: Re-factored all perform based functions
   
-  This makes the code flow more obvious and reacts on the return
-  code properly, even if the code acted the same way before.
+  Standardised the naming of all perform based functions to be in the form
+  imap_perform_something().
 
-- POP3: when USER command fails, don't even try PASS
+Daniel Stenberg (9 Mar 2013)
+- [Cédric Deltheil brought this change]
 
-- tftp_rx: Value stored to 'sbytes' is never read
+  examples/getinmemory.c: abort the transfer if not enough memory
+  
+  No more use exit(3) but instead tell libcurl that no byte has been
+  written to let it return a `CURLE_WRITE_ERROR`. In addition, check
+  curl easy handle return code.
 
-- file_range: Value stored to 'totalsize' is never read
+- RELEASE-NOTES: synced with ca3c0ed3a9c
+  
+  8 more bugfixes, one change and a bunch of contributors
 
-- changelog: GnuTLS: SSL handshake phase is non-blocking
+Yang Tse (9 Mar 2013)
+- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
 
-- [Jerome Vouillon brought this change]
+Steve Holme (9 Mar 2013)
+- imap: Added description comments to all perform based functions
 
-  GnuTLS: make the connection phase non-blocking
+- imap: Removed the need for separate custom request functions
   
-  When multi interface is used, the SSL handshake is no longer
-  blocking when GnuTLS is used.
+  Moved the custom request processing into the LIST command as the logic
+  is the same.
 
-- krb5_auth: fix my previous change to compile
+- imap: Corrected typo in comment
 
-unknown (16 Apr 2010)
-- OS400 version V5R2M0 not supported anymore by IBM: default target release changed to V5R3M0.
+Yang Tse (9 Mar 2013)
+- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
 
-Daniel Stenberg (16 Apr 2010)
-- changelog: GnuTLS fix, no reverse loopkups and fixed GSS detection
+Steve Holme (9 Mar 2013)
+- imap: Moved imap_logout() to be grouped with the other perform functions
 
-- SSL_RECV: EOF is not an error here
+- email: Updated the function descriptions for the logout / quit functions
   
-  The recent overhaul of the SSL recv function made this treat a
-  zero returned from gnutls_record_recv() as an error, and this
-  caused our HTTPS test cases to fail. We leave it to upper layer
-  code to detect if an EOF is a problem or not.
+  Updated the function description comments following commit 4838d196fdbf.
 
-- [Paul Howarth brought this change]
-
-  configure: GSSAPI detection on ancient Linux distros
+- email: Simplified the logout / quit functions
   
-  On some ancient distributions such as RHEL-3, <gssapi/gssapi_krb5.h> needs
-  to be processed after <gssapi/gssapi.h>, but does not include it itself.
-  This patch checks for <gssapi/gssapi.h> first and then includes it
-  in the test for <gssapi/gssapi_krb5.h>, resolving the problem.
+  Moved the blocking state machine to the disconnect functions so that the
+  logout / quit functions are only responsible for sending the actual
+  command needed to logout or quit.
   
-  Without the patch, <gssapi/gssapi_krb5.h> is "present but cannot be
-  compiled".
+  Additionally removed the hard return on failure.
 
-- resolvers: no more using AI_CANONNAME
+- email: Tidied up the *_regular_transfer() functions
   
-  No resolver anymore needs to use AI_CANONNAME and do reverse
-  lookups.  We should work hard to avoid having code that relies on
-  it.
+  Added comments and simplified convoluted dophase_done comparison.
 
-- KRB5: use given host name instead of reverse lookup'ed name
-  
-  This code would previously use dns_entry->addr->ai_canonname
-  instead of the given host name, which caused us grief and
-  problems since not all our resolver options do the reverse lookup
-  and I would also guess that it caused problems with KRB5/GSS with
-  virtual name-based hosts. Now the host name from the URL is used.
+- email: Simplified nesting of if statements in *_doing() functions
 
-Dan Fandrich (15 Apr 2010)
-- Remove redundant conditional
+Daniel Stenberg (8 Mar 2013)
+- RELEASE-NOTES: mention that krb4 is up for consideration
 
-- Eliminated an unlikely race condition in some tests.
+Steve Holme (8 Mar 2013)
+- imap: Fixed handling of untagged responses for the STORE custom command
   
-  Based on a patch from the FreeBSD ports by Peter Pentchev.
-
-Daniel Stenberg (15 Apr 2010)
-- changelog: prevent needless reverse name lookups
+  Added an exception, for the STORE command, to the untagged response
+  processor in imap_endofresp() as servers will back respones containing
+  the FETCH keyword instead.
 
-- Curl_ipv4_resolve_r: only set AI_CANONNAME when needed
+Yang Tse (8 Mar 2013)
+- curlbuild.h.dist: enhance non-configure GCC ABI detection logic
   
-  As reported in bug report #2987196, the code for ipv6 already did
-  the setting of this bit correctly so we copied that logic into
-  the Curl_ipv4_resolve_r() function as well. KRB code is the only
-  code we know that might need the cannonical name so only resolve
-  it for such requests!
-
-- IGNORE: files generated by maketgz
-
-- bumped to start the journey towards 7.20.2
+  GCC specific adjustments:
+  
+  - check __ILP32__ before 32 and 64bit processor architectures in
+    order to detect ILP32 programming model on 64 bit processors
+    which, of course, also support LP64 programming model, when using
+    gcc 4.7 or newer.
+  
+  - keep 32bit processor architecture checks in order to support gcc
+    versions older than 4.7 which don't define __ILP32__
+  
+  - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
+    architecture checks for older versions which don't define __LP64__
 
-- added contributors from the 7.20.1 RELEASE-NOTES
+- curlbuild.h.dist: fix GCC build on ARM systems without configure script
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1205
+  Reported by: technion
 
-- ignore files generated by 'maketgz'
+- [Gisle Vanem brought this change]
 
-Version 7.20.1 (14 Apr 2010)
+  polarssl.c: fix header filename typo
 
-Daniel Stenberg (14 Apr 2010)
-- 7.20.1: 14 April 2010
+- configure: use XC_LIBTOOL for portability across libtool versions
 
-Guenter Knauf (13 Apr 2010)
-- Use correct directory for c-ares git pull
-  Signed-off-by: Tor Arntsen <tor@spacetec.no>
+- xc-lt-iface.m4: provide XC_LIBTOOL macro
 
-Yang Tse (13 Apr 2010)
-- fix compiler warning: variable might be clobbered by longjmp or vfork
+Steve Holme (7 Mar 2013)
+- imap: Fixed SELECT not being performed for custom requests
 
-Guenter Knauf (13 Apr 2010)
-- added last git commit output for c-ares too.
+- email: Minor code tidy up following recent changes
+  
+  Removed unwanted braces and added variable initialisation.
 
-- changed the git update block to take care of c-ares repo if detected.
+- DOCS: Corrected the IMAP URL grammar of the UIDVALIDITY parameter
 
-- updated timestamp of the script.
+- FEATURES: Provided a little clarity in some IMAP features
 
-- removed obsolete var in gitpull() function
-  no need to create a var - lets just return the status var itself.
+- email: Optimised block_statemach() functions
+  
+  Optimised the result test in each of the block_statemach() functions.
 
-- added a cast to silent compiler warning with 64bit systems.
+- DOCS: Added the list command to the IMAP URL section
+  
+  Added examples of the list command and clarified existing example URLs
+  following recent changes.
 
-- fixed a path typo in src/Makefile.netware.
+- FEATURES: Updated for recent imap additions
+  
+  Updated the imap features list, corrected a typo in the smtp features
+  and clarified a pop3 feature.
 
-Daniel Stenberg (12 Apr 2010)
-- Added text for How To Make a Patch with git
+Daniel Stenberg (7 Mar 2013)
+- version bump: the next release will be 7.30.0
 
-- update the section on timeouts
+- checksrc: ban unsafe functions
   
-  The section that describes how to work with timeouts was
-  misleading and could easily trick users to use the wrong API.
-
-- update URL and cut out wrong info on ipv6
+  The list of unsafe functions currently consists of sprintf, vsprintf,
+  strcat, strncat and gets.
   
-  c-ares has had its own URL for a while and we should point
-  people to that. It also works with IPv6 since a long time.
+  Subsequently, some existing code needed updating to avoid warnings on
+  this.
 
-- refer to CURLMOPT_TIMERFUNCTION for multi_socket users
+Steve Holme (7 Mar 2013)
+- RELEASE-NOTES: Added missing imap fixes and additions
   
-  curl_multi_timeout(3) is simply the wrong function to use
-  if you're using the multi_socket API and this document now
-  states this pretty clearly to help guiding users.
+  With all the recent imap changes it wasn't clear what new features and
+  fixes should be included in the release notes.
+
+Nick Zitzmann (6 Mar 2013)
+- RELEASE-NOTES: brought this up-to-date with the latest changes
 
-- s/CVS/git
+Steve Holme (6 Mar 2013)
+- [Jiri Hruska brought this change]
 
-- modified to use the git file, not cvs
+  imap: Fixed test801 and test1321 to specify a message UID
   
-  I've done this blindly, and the last piece that works with ares
-  should possibly be done differently now that c-ares isn't a
-  subtree within the curl tree anymore...
+  Just a folder list would be retrieved if UID was not specified now.
 
-- mention missing test servers for <server>
+- [Jiri Hruska brought this change]
 
-- FTP quote commands prefixed with '*' now can fail without aborting
+  imap: Fixed ftpserver.pl to allow verification even through LIST command
   
-  Prefixing the FTP quote commands with an asterisk really only
-  worked for the postquote actions. This is now fixed and test case
-  227 has been extended to verify.
+  Commit 198012ee inadvertently broke LIST_imap().
 
-Kamil Dudka (7 Apr 2010)
-- qssl: reflect recent code changes in SSL interface
+- imap: Tidied up the APPEND and final APPEND response functions
   
-  Reported by Guenter Knauf.
+  Removed unnecessary state changes on failure and setting of result codes
+  on success.
 
-- nss: handle client certificate related errors
+- imap: Tidied up the final FETCH response function
+  
+  Removed unnecessary state change on failure and setting of result code on
+  success.
 
-- [Ben Greear brought this change]
+- imap: Tidied up the LIST response function
+  
+  Reworked comments as they referenced custom commands, removed
+  unnecessary state change on failure and setting of result code on
+  success.
 
-  ssl: Fix build when SSL isn't enabled
+- imap: Removed the custom request response function
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  Removed imap_state_custom_resp() as imap_state_list_resp() provides the
+  same functionality.
 
-- refactorize interface of Curl_ssl_recv/Curl_ssl_send
+- [Jiri Hruska brought this change]
 
-- simplify code of Curl_resolv_timeout()
+  imap: Updated ftpserver.pl to be more compliant, added new commands
+  
+  Enriched IMAP capabilities of ftpserver.pl in order to be able to
+  add tests for the new IMAP features.
+  
+  * Added support for APPEND - Saves uploaded data to log/upload.$testno
+  * Added support for LIST - Returns the contents of <reply/> section in
+    the current test, like e.g FETCH.
+  * Added support for STORE - Returns hardcoded updated flags
+  * Changed handling of SELECT - Returns much more information in the
+    usual set of untagged responses; uses hardcoded data from an example
+    in the IMAP RFC
+  * Changed handling of FETCH - Fixed response format
 
-- eliminate a race condition in Curl_resolv_timeout()
+- imap: Added check for empty UID in FETCH command
+  
+  As the UID has to be specified by the user for the FETCH command to work
+  correctly, added a check to imap_fetch(), although strictly speaking it
+  is protected by the call from imap_perform().
 
-Daniel Stenberg (2 Apr 2010)
-- [Ben Greear brought this change]
+Kamil Dudka (6 Mar 2013)
+- nss: fix misplaced code enabling non-blocking socket mode
+  
+  The option needs to be set on the SSL socket.  Setting it on the model
+  takes no effect.  Note that the non-blocking mode is still not enabled
+  for the handshake because the code is not yet ready for that.
+
+Daniel Stenberg (6 Mar 2013)
+- imap: fix compiler warning
+  
+  imap.c:694:21: error: unused variable 'imapc' [-Werror=unused-variable]
 
-  fixed compiler warnings
+Steve Holme (5 Mar 2013)
+- imap: Added support for list command
 
-- updated contributor count
+- imap: Added list perform and response handler functions
 
-- add contributors from the 7.20.0 release notes
+- imap: Introduced IMAP_LIST state
 
-- fix SFTP download hang
+- imap: Small tidy up of imap_select() to match imap_append()
   
-  Matt Wixson found and fixed a bug in the SCP/SFTP area where the
-  code treated a 0 return code from libssh2 to be the same as
-  EAGAIN while in reality it isn't. The problem caused a hang in
-  SFTP transfers from a MessageWay server.
+  Updated the style of imap_select() before adding the LIST command.
 
-Dan Fandrich (31 Mar 2010)
-- Fixed misleading test message
+- imap: Moved mailbox check from the imap_do() function
+  
+  In preparation for the addition of the LIST command, moved the mailbox
+  check from imap_do() to imap_select() and imap_append().
 
-Daniel Stenberg (31 Mar 2010)
-- update the generic copyright year range
+- curl_setup.h: Added S_IRDIR() macro for compilers that don't support it
+  
+  Commit 26eaa8383001 introduces the use of S_ISDIR() yet some compilers,
+  such as MSVC don't support it, so we must define a substitute using
+  file flags and mask.
 
-- removed README.cmake due to the improved situation
+Daniel Stenberg (4 Mar 2013)
+- AddFormData: prevent only directories from being posted
+  
+  Commit f4cc54cb4746ae5a6d (shipped as part of the 7.29.0 release) was a
+  bug fix that introduced a regression in that while trying to avoid
+  allowing directory names, it also forbade "special" files like character
+  devices and more. like "/dev/null" as was used by Oliver who reported
+  this regression.
+  
+  Reported by: Oliver Gondža
+  Bug: http://curl.haxx.se/mail/archive-2013-02/0040.html
 
-Guenter Knauf (31 Mar 2010)
-- fix compiler warning with a cast.
+Nick Zitzmann (3 Mar 2013)
+- darwinssl: fix infinite loop if server disconnected abruptly
+  
+  If the server hung up the connection without sending a closure alert,
+  then we'd keep probing the socket for data even though it's dead. Now
+  we're ready for this situation.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-03/0014.html
+  Reported by: Aki Koskinen
 
-- make folks use latest available dependent libraries.
+Steve Holme (3 Mar 2013)
+- imap: Added comments to imap_append()
 
-Dan Fandrich (30 Mar 2010)
-- Call curl_global_cleanup() in test 560 to avoid a memory leak
+- [Jiri Hruska brought this change]
 
-- Allow test 538 to run even when proxy support is disabled
+  imap: Added required mailbox check for FETCH and APPEND commands
 
-Daniel Stenberg (29 Mar 2010)
-- use (s)size_t for string lengths to fix compiler warns
+- pingpong.c: Fix enumerated type mixed with another type
 
-- use size_t to hold string length
+- smtp: Updated the coding style for state changes after a send operation
   
-  using int is not fine on 64bit systems
-
-- [Ben Greear brought this change]
+  Some state changes would be performed after a failure test that
+  performed a hard return, whilst others would be performed within a test
+  for success. Updated the code, for consistency, so all instances are
+  performed within a success test.
 
-  Fix compile warnings in ssh.c
-  
-  strlen() returns size_t, but ssh libraries are wanting 'unsigned int'.  Add
-  explicit casts and use _ex versions of the ssh library calls.
+- pop3: Updated the coding style for state changes after a send operation
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  Some state changes would be performed after a failure test that
+  performed a hard return, whilst others would be performed within a test
+  for success. Updated the code, for consistency, so all instances are
+  performed within a success test.
 
-- [Ben Greear brought this change]
+- imap: Fixed typo in variable assignment
 
-  fix smtp compile warning
-  
-  Use ssize_t instead of int for the Curl_smtp_escape_eob nread
-  argument.
-  
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+- [Jiri Hruska brought this change]
 
-- Ben's POP3 change
+  imap: Fixed custom request handling in imap_done()
+  
+  Fixed imap_done() so that neither the FINAL states are not entered when
+  a custom command has been performed.
 
-- [Ben Greear brought this change]
+- [Jiri Hruska brought this change]
 
-  pop3: Get message listing if no mailbox in URL
+  imap: Enabled custom requests in imap_select_resp()
   
-  If you pass a URL to pop3 that does not contain a message ID as
-  part of the URL, it will currently ask for 'INBOX' which just
-  causes the pop3 server to return an error.
+  Changed imap_select_resp() to invoke imap_custom() instead of
+  imap_fetch() after the mailbox has been selected if a custom
+  command has been set.
+
+- [Jiri Hruska brought this change]
+
+  imap: Enabled custom requests in imap_perform()
   
-  The change makes libcurl treat en empty message ID as a request
-  for LIST (list of pop3 message IDs).  User's code could then
-  parse this and download individual messages as desired.
+  Modified imap_perform() to start with the custom command instead of
+  SELECT when a custom command is to be performed and no mailbox has
+  been given.
 
-- [Ben Greear brought this change]
+- [Jiri Hruska brought this change]
 
-  Allow running ./tests/testcurl.pl from within git repo.
+  imap: Added custom request perform and response handler functions
   
-  My first instinct was to run the test script within the checked out
-  repository.  This small change to the script allows that to work as
-  expected.
+  Added imap_custom(), which initiates the custom command processing,
+  and an associated response handler imap_state_custom_resp(), which
+  handles any responses by sending them to the client as body data.
   
-  Signed-off-by: Ben Greear <greearb@candelatech.com>
+  All untagged responses with the same name as the first word of the
+  custom request string are accepted, with the exception of SELECT and
+  EXAMINE which have responses that cannot be easily identified. An
+  extra check has been provided for them so that any untagged responses
+  are accepted for them.
 
-- minor language fix
+- pop3: Fixed unnecessary parent structure reference
+  
+  Updated pop3 code following recent imap changes.
 
-- [Ben Greear brought this change]
+- [Jiri Hruska brought this change]
 
-  allow user+password in the URL for all protocols
+  imap: Added custom request parsing
   
-  Ben Greear brought a patch that from now on allows all protocols
-  to specify name and user within the URL, in the same manner HTTP
-  and FTP have been allowed to in the past - although far from all
-  of the libcurl supported protocols actually have that feature in
-  their URL definition spec.
+  Added imap_parse_custom_request() for parsing the CURLOPT_CUSTOMREQUEST
+  parameter which URL decodes the value and separates the request from
+  any parameters - This makes it easier to filter untagged responses
+  by the request command.
 
-- ignore pid files and stunnel.conf
-  
-  all used while running tests
+- [Jiri Hruska brought this change]
 
-- make sure git pull is actually done!
+  imap: Introduced custom request parameters
+  
+  Added custom request parameters to the per-request structure.
 
-- changelogged: smoother rate limiting
+- [Jiri Hruska brought this change]
 
-- [Ben Greear brought this change]
+  imap: Introduced IMAP_CUSTOM state
 
-  Make rate-limitation logic smoother
+- imap: Minor code tidy up
   
-  This gives a smoother rate limitation performance by using
-  sub-second pauses and also taking the buffer sizes into
-  account.
+  Minor tidy up of code layout and comments following recent changes.
 
-- remove all .cvsignore files
-
-- PROT_CLOSEACTION should not include TFTP
+- imap: Simplified the imap_state_append_resp() function
   
-  TFTP is not a protocol that uses close actions so it should
-  not be set in that bitmask!
+  Introduced the result code variable to simplify the state changes and
+  remove the hard returns.
 
-- [Tor Arntsen brought this change]
+- imap: Changed successful response logic in imap_state_append_resp()
+  
+  For consistency changed the logic of the imap_state_append_resp()
+  function to test for an unsucessful continuation response rather than a
+  succesful one.
 
-  Avoid double newline for the 'last commits' log in testcurl.pl
+- imap: Standardised imapcode condition tests
   
-  The backtick command which extracts 'git log' lines come with a
-  newline, so chomp the newline before calling logit(), as the logit
-  function adds a newline by itself.
+  For consistency changed two if(constant != imapcode) tests to be
+  if(imapcode != constant).
 
-- [Tor Arntsen brought this change]
+- imap: Moved imap_append() to be with the other perform functions
 
-  Change to version-independent git option for 'git log --oneline'
+- [Jiri Hruska brought this change]
+
+  imap: Enabled APPEND support in imap_perform()
   
-  'git log --oneline' is a relatively recent Git function. It is
-  documented to be the same as 'git log --pretty=oneline --abbrev-commit',
-  so use that instead. It works all the way back to Git 1.5.0.
+  Added logic in imap_perform() to perform an APPEND rather than SELECT
+  and FETCH if an upload has been specified.
 
-- show 5 commits even if no git pull was made
+- [Jiri Hruska brought this change]
 
-- don't touch ares/aclocal.m4 and show recent git commits
+  imap: Implemented APPEND final processing
   
-  since c-ares no longer embedded, we must not touch such files
-  anymore
+  The APPEND operation needs to be performed in several steps:
+    1) We send "<tag> APPEND <mailbox> <flags> {<size>}\r\n"
+    2) Server responds with continuation respose "+ ...\r\n"
+    3) We start the transfer and send <size> bytes of data
+    4) Only now we end the request command line by sending "\r\n"
+    5) Server responds with "<tag> OK ...\r\n"
   
-  we show the 5 last git commits if git was proven in use, to help
-  us see exactly what's being tested
+  This commit performs steps 4 and 5, in the DONE phase, as more
+  processing is required after the transfer.
+
+- [Jiri Hruska brought this change]
 
-- use CURL_SIZEOF_LONG instead of SIZEOF_LONG
+  imap: Added APPEND perform and response handler functions
   
-  That's the symbol we have or generate in include/curl/curlbuild.h
+  Added imap_append() function to initiate upload and imap_append_resp()
+  to handle the continuation response and start the transfer.
 
-- s/CVS/DEV in the version string from the git repo
+- [Jiri Hruska brought this change]
 
-Bill Hoffman (24 Mar 2010)
-- Merge branch 'master' of github.com:bagder/curl
+  imap: Introduced IMAP_APPEND and IMAP_APPEND_FINAL states
 
-- Add .gitattributes files to turn off CRLF translation for some files
+- [Jiri Hruska brought this change]
 
-Daniel Stenberg (24 Mar 2010)
-- provide a version number as today's date
+  imap: Updated setting of transfer variables in imap_state_fetch_resp()
   
-  It should at least help visualize which autobuilds that are
-  using this script.
-
-- testcurl now uses git instead of CVS
+  Add number of bytes retrieved from the PP cache to req.bytecount and set
+  req.maxdownload only when starting a proper download.
 
-Bill Hoffman (24 Mar 2010)
-- Merge branch 'master' of github.com:bagder/curl
+- [Jiri Hruska brought this change]
 
-- Enable LDAP by default since it is now disabled when ldap.h is not found,
+  imap: Improved FETCH response parsing
+  
+  Added safer parsing of the untagged FETCH response line and the size of
+  continuation data.
 
-- CMake fixes for Linux.
+- imap: Fixed accidentally lossing the result code
   
-  Make sure <sys/socket.h> is included if around when testing/using
-  socklen_t.  Also, disable LDAP if LDAP_H is not found on the system.
+  Accidentally lost the result code in imap_state_capability() and
+  imap_state_login() with commit b06a78622609.
 
-Daniel Stenberg (24 Mar 2010)
-- [Bob Richmond brought this change]
+- imap: Another minor comment addition / tidy up
 
-  fix: timeout after last data chunk was handled
+- imap: Updated the coding style for state changes after a send operation
   
-  Bob Richmond: There's an annoying situation where libcurl will
-  read new HTTP response data from a socket, then check if it's a
-  timeout if one is set. If the last packet received constitutes
-  the end of the response body, libcurl still treats it as a
-  timeout condition and reports a message like:
-  
-  "Operation timed out after 3000 milliseconds with 876 out of 876
-  bytes received"
+  Some state changes would be performed after a failure test that
+  performed a hard return, whilst others would be performed within a test
+  for success. Updated the code, for consistency, so all instances are
+  performed within a success test.
+
+- pop3 / smtp: Small comment tidy up
   
-  It should only a timeout if the timer lapsed and we DIDN'T
-  receive the end of the response body yet.
+  Small tidy up to keep some comments consistant across each of the email
+  protocols.
 
-- avoid compiler warning without USE_ALARM_TIMEOUT
+- [Jiri Hruska brought this change]
 
-Bill Hoffman (24 Mar 2010)
-- Fix curl CMake build.
+  imap: FETCH response handler cleanup before further changes
   
-  This commit fixes the cmake build of curl, and cleans up the
-  cmake code a little.  It removes some commented out code and
-  some trailing whitespace.  To get curl to build the binary
-  tree include/curl directory needed to be added to the include
-  path. Also, SIZEOF_SHORT needed to be added.  A check for the
-  lack of defines of SIZEOF_* for warnless.c was added.
+  Removed superfluous NULL assignment after Curl_safefree() and rewrote
+  some comments and logging messages.
 
-Daniel Stenberg (24 Mar 2010)
-- [Chris Conroy brought this change]
+- pop3: Small tidy up of function arguments
 
-  remove debug printfs
+- imap: Small tidy up of function arguments
 
-- RTSP GET_PARAMETER fix
+- smtp: Corrected debug message for POP3_AUTH_FINAL constant
   
-  Christopher Conroy fixed a problem with RTSP and GET_PARAMETER
-  reported to us by Massimo Callegari. There's a new test case 572
-  that verifies this now.
-
-- remove trace of CVS
+  Following commit ad3177da24b8 corrected the debug message in state()
+  from AUTH to AUTH_FINAL.
 
-- [Chris Conroy brought this change]
+- pop3: Corrected debug message for POP3_AUTH_FINAL constant
+  
+  Following commit afad1ce753a1 corrected the debug message in state()
+  from AUTH to AUTH_FINAL.
 
-  Fix RTSP GET_PARAMETER empty and non-empty operation.
+- imap: Corrected debug message for IMAP_AUTHENTICATE_FINAL constant
   
-  Test coverage included. Thanks to Massimo Callegari for the bug report
+  Following commit 13006f3de9ec corrected the debug message in state()
+  from AUTHENTICATE to AUTHENTICATE_FINAL.
 
-- s/CVS/DEV/ in the version string for repo versions
+- [Jiri Hruska brought this change]
 
-- scrapped all left-over TODOs
-  
-  In order to get back on track, I've removed all the plans for
-  stuff I had in the queue. I will instead focus on fixing bugs and
-  relying on that people who truly want things added will come back
-  on the mailing list and nag and provide patches.
+  imap: Fixed error code returned for invalid FETCH response
   
-  7.20.1 should be possible to release in April 2010
+  If the FETCH command does not result in an untagged response the the
+  UID is probably invalid. As such do not return CURLE_OK.
 
-- restore executable bits on some files
+- [Jiri Hruska brought this change]
 
-- remove the CVSish $Id$ lines
+  imap: Added processing of the final FETCH responses
+  
+  Not processing the final FETCH responses was not optimal, not only
+  because the response code would be ignored but it would also leave data
+  unread on the socket which would prohibit connection reuse.
 
-- The 'ares' subtree has been removed from the source repository
+- [Jiri Hruska brought this change]
 
-- s/CVS/git
+  imap: Introduced FETCH_FINAL state for processing final fetch responses
+  
+  A typical FETCH response can be broken down into four parts:
+  
+    1) "* <uid> FETCH (<what> {<size>}\r\n", using continuation syntax
+    2) <size> bytes of the actual message
+    3) ")\r\n", finishing the untagged response
+    4) "<tag> OK ...", finishing the command
+  
+  Part 1 is read in imap_fetch_resp(), part 2 is consumed in the PERFORM
+  phase by the transfer subsystem, parts 3 and 4 are currently ignored.
 
-- update to current state
+- imap: fix autobuild warning
+  
+  Removed whitespace from imap_perform()
 
-- remove the ares subtree
+- imap: fix compiler warning
   
-  c-ares is now hosted entirely separate from the curl project
-  see http://c-ares.haxx.se/ for all details concerning c-ares,
-  its source repository and more.
+  error: declaration of 'imap' shadows a previous local
 
-- mark connection as connected
+- smtp: Re-factored the final SMTP_AUTH constant
   
-  Kenny To filed the bug report #2963679 with patch to fix a
-  problem he experienced with doing multi interface HTTP POST over
-  a proxy using PROXYTUNNEL. He found a case where it would connect
-  fine but bits.tcpconnect was not set correct so libcurl didn't
-  work properly.
+  Changed the final SMTP_AUTH constant to SMTP_AUTH_FINAL for consistency
+  with the response function.
+
+- pop3: Re-factored the final POP3_AUTH constant
   
-  (http://curl.haxx.se/bug/view.cgi?id=2963679)
+  Changed the final POP3_AUTH constant to POP3_AUTH_FINAL for consistency
+  with the response function.
 
-- enabled valgrind
+- imap: Re-factored final IMAP_AUTHENTICATE constant
   
-  I ran it now successfully and it helped to pinpoint a libssh2
-  memory leak!
+  Changed the final IMAP_AUTHENTICATE constant to IMAP_AUTHENTICATE_FINAL
+  for consistency with the response function.
 
-Dan Fandrich (23 Mar 2010)
-- Updated Symbian notes
+- imap: Updated the coding style of imap_state_servergreet_resp()
+  
+  Updated the coding style, in this function, to be consistant with other
+  response functions rather then performing a hard return on failure.
 
-Daniel Stenberg (23 Mar 2010)
-- chunked-encoding with Content-Length: header problem
+- imap: Reversed the logic of the (un)successful tagged SELECT response
   
-  Akos Pasztory filed debian bug report #572276
-  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572276
-  mentioning a problem with a resource that returns chunked-encoded
-  _and_ with a Content-Length and libcurl failed to properly ignore
-  the latter information.
+  Reversed the logic of the unsuccessful vs successful tagged SELECT
+  response in imap_state_select_resp() to be more logical to read.
 
-- delayed easy handle kill caused double Curl_close() call
+- imap: Reversed the logic of the (un)successful tagged CAPABILITY response
   
-  Hauke Duden provided an example program that made the multi
-  interface crash.  His example simply used the multi interface and
-  did first one FTP transfer and after completion it used a second
-  easy handle and did another FTP transfer on the same FTP server.
+  Reversed the logic of the unsuccessful vs successful tagged CAPABILITY
+  response in imap_state_capability_resp() to be more logical to read.
+
+- imap: Corrected char* references with char *
   
-  This triggered a bug in the "delayed easy handle kill" system
-  that curl uses: when an FTP connection is left alive it must keep
-  an easy handle around internally - only for the purpose of having
-  an easy handle when it later disconnects it. The code assumed
-  that when the easy handle was removed and an internal reference
-  was made, that version could be killed later on when a new easy
-  handle came using the same connection. This was wrong as Hauke's
-  example showed that the removed handle wasn't killed for real
-  until later. This caused a double close attempt => segfault.
+  Corrected char* references made in commit: 709b3506cd9b.
 
-- ignore more files generated when tests run in the source tree
+- [Jiri Hruska brought this change]
 
-- Thomas Lopatic fixed the alarm()-based DNS timeout
+  imap: Added processing of more than one response when sent in same packet
+  
+  Added a loop to imap_statemach_act() in which Curl_pp_readresp() is
+  called until the cache is drained. Without this multiple responses
+  received in a single packet could result in a hang or delay.
 
-- [Thomas Lopatic brought this change]
+- [Jiri Hruska brought this change]
 
-  fix the alarm()-based DNS timeout
+  imap: Added skipping of SELECT command if already in the same mailbox
   
-  Looking at the code of Curl_resolv_timeout() in hostip.c, I think
-  that in case of a timeout, the signal handler for SIGALRM never
-  gets removed. I think that in my case it gets executed at some
-  point later on when execution has long left Curl_resolv_timeout()
-  or even the cURL library.
+  Added storage and checking of the last mailbox userd to prevent
+  unnecessary switching.
+
+- [Jiri Hruska brought this change]
+
+  imap: Introduced the mailbox variable
   
-  The code that is jumped to with siglongjmp() simply sets the
-  error message to "name lookup timed out" and then returns with
-  CURLRESOLV_ERROR. I guess that instead of simply returning
-  without cleaning up, the code should have a goto that jumps to
-  the spot right after the call to Curl_resolv().
+  Added the mailbox variable to the per-connection structure in
+  preparation for checking for an already selected mailbox.
 
-- [Daniel Johnson brought this change]
+- email: Slight reordering of connection based variables
+  
+  Reordered the state and ssl_done variables in order to provide more
+  consistency between the email protocols as well as for for an upcoming
+  change.
 
-  Fix warnings for clang
+- imap: Tidied up comments for connection based variables
 
-- Merge branch 'master' of github.com:bagder/curl
+- DOCS: Added the IMAP UIDVALIDITY property to the CURLOPT_URL section
 
-Kamil Dudka (22 Mar 2010)
-- [douglas steinwand brought this change]
+- [Jiri Hruska brought this change]
 
-  Fix insufficient initialization in Curl_clone_ssl_config()
+  imap: Added verification of UIDVALIDITY mailbox attribute
   
-  which could have caused a double free when reusing curl handle.
+  Added support for checking the UIDVALIDITY, and aborting the request, if
+  it has been specified in the URL and the server response is different.
 
-Daniel Stenberg (22 Mar 2010)
-- we never used this file anyway
+- [Jiri Hruska brought this change]
 
-- s/CVS/git
+  imap: Added support for parsing the UIDVALIDITY property
+  
+  Added support for parsing the UIDVALIDITY property from the SELECT
+  response and storing it in the per-connection structure.
 
-- various changes of CVS to git
+- [Jiri Hruska brought this change]
 
-- remove references to CVS in the code and use DEV instead
+  imap: Introduced the mailbox_uidvalidity variable
+  
+  Added the mailbox_uidvalidity variable to the per-connection structure
+  in preparation for checking the UIDVALIDITY mailbox attribute.
 
-- Ben Greear's two fixes explained
+- imap: Corrected comment in imap_endofresp()
 
-- [Ben Greear brought this change]
+- imap: Corrected whitespace
 
-  Fix tftp return codes and tsize upload handling
-  
-  Error codes were not properly returned to the main curl code (and on to apps
-  using libcurl).
-  
-  tftp was crapping out when tsize == 0 on upload, but I see no reason to fail
-  to upload just because the remote file is zero-length.  Ignore tsize option on
-  upload.
+- [Jiri Hruska brought this change]
 
-- more files to ignore
+  imap: Added filtering of CAPABILITY and FETCH untagged responses
+  
+  Only responses that contain "CAPABILITY" and "FETCH", respectively,
+  will be sent to their response handler.
 
-- provide an initial set of .gitignore files
+- [Jiri Hruska brought this change]
 
-Kamil Dudka (19 Mar 2010)
-- - Improved Curl_read() to not ignore the error returned from Curl_ssl_recv().
+  imap: Added a helper function for upcoming untagged response filtering
+  
+  RFC 3501 states that "the client MUST be prepared to accept any response
+  at all times" yet we assume anything received with "* " at the beginning
+  is the untagged response we want.
+  
+  Introduced a helper function that checks whether the input looks like a
+  response to specified command, so that we may filter the ones we are
+  interested in according to the current state.
 
-Daniel Stenberg (18 Mar 2010)
-- fix warning about conversions between curl_off_t and long
+- [Jiri Hruska brought this change]
 
-Yang Tse (18 Mar 2010)
-- another shot at the ftp_init() icc 9.1 optimizer issue
+  imap: Moved CAPABILITY response handling to imap_state_capability_resp()
+  
+  Introduced similar handling to the FETCH responses, where even the
+  untagged data responses are handled by the response handler of the
+  individual state.
 
-- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
+Linus Nielsen Feltzing (26 Feb 2013)
+- Remove unused variable in smtp_state_data_resp()
 
-- update outdated serial number
+Steve Holme (25 Feb 2013)
+- email: Small tidy up following recent changes
 
-Dan Fandrich (16 Mar 2010)
-- Factored out some code into a few independent functions
+- smtp: Removed bytecountp from the per-request structure
+  
+  Removed this pointer to a downloaded bytes counter because it was set in
+  smtp_init() to point to the same variable the transfer functions keep
+  the count in (k->bytecount), effectively making the code in transfer.c
+  "*k->bytecountp = k->bytecount" a no-op.
 
-Daniel Stenberg (15 Mar 2010)
-- - Constantine Sapuntzakis brought a patch:
+- pop3: Removed bytecountp from the per-request structure
   
-    The problem mentioned on Dec 10 2009
-    (http://curl.haxx.se/bug/view.cgi?id=2905220) was only partially fixed.
-    Partially because an easy handle can be associated with many connections in
-    the cache (e.g. if there is a redirect during the lifetime of the easy
-    handle).  The previous patch only cleaned up the first one. The new fix now
-    removes the easy handle from all connections, not just the first one.
+  Removed this pointer to a downloaded bytes counter because it was set in
+  pop3_init() to point to the same variable the transfer functions keep
+  the count in (k->bytecount), effectively making the code in transfer.c
+  "*k->bytecountp = k->bytecount" a no-op.
+
+- [Jiri Hruska brought this change]
 
-Yang Tse (11 Mar 2010)
-- fix compiler warning
+  imap: Removed bytecountp from the per-request structure
+  
+  Removed this pointer to a downloaded bytes counter because it was set in
+  imap_init() to point to the same variable the transfer functions keep
+  the count in (k->bytecount), effectively making the code in transfer.c
+  "*k->bytecountp = k->bytecount" a no-op.
 
-Dan Fandrich (11 Mar 2010)
-- SSL should now be working out-of-the-box on Symbian S60.
+- [Jiri Hruska brought this change]
 
-- Enable Symbian zlib support by default.
+  imap: Adjusted SELECT and FETCH function order
+  
+  Moved imap_select() and imap_fetch() to be grouped with the other
+  perform functions.
 
-- Allow compilation even when OpenSSL has been configured without MD4 support.
+- [Jiri Hruska brought this change]
 
-- A few Symbian build changes
+  imap: Adjusted SELECT and FETCH state order in imap_statemach_act()
+  
+  Exchanged the position of these states in the switch statements to
+  match the state enum, execution and function order.
 
-Yang Tse (9 Mar 2010)
-- watt32 compilation fix
+- imap: Minor tidy up of comments in imap_parse_url_path()
+  
+  Tidy up of comments before next round of imap changes.
 
-Daniel Stenberg (6 Mar 2010)
-- - Ben Greear brought a patch that fixed the rate limiting logic for TFTP when
-    the easy interface was used.
+- imap: Fixed incorrect comparison for STARTTLS in imap_endofresp()
+  
+  Corrected the comparison type in addition to commit 1dac29fa83a9.
 
-- indent fix by Ben Greear, I removed some braces for single-line conditional
-  expressions
+- DOCS: Corrected IMAP URL examples according to RFC5092
+  
+  URL examples that included the UID weren't technically correct although
+  would pass the curl parser.
 
-Yang Tse (6 Mar 2010)
-- Added another VS10 version string
+Nick Zitzmann (24 Feb 2013)
+- darwinssl: fix undefined $ssllib warning in runtests.pl
+  
+  I also added --with-darwinssl to the list of SSL options in configure.
 
-- fix line break
+Steve Holme (24 Feb 2013)
+- imap: Added check for new internal imap response code
 
-- removed usage of 's6_addr', fixing compilation issue triggered with no
-  longer using 'in6_addr' but only our 'ares_in6_addr' struct
+- imap: Changed the order of the response types in imap_endofresp()
+  
+  From a maintenance point of view the code reads better to view tagged
+  responses, then untagged followed by continuation responses.
+  
+  Additionally, this matches the order of responses in POP3.
 
-Daniel Stenberg (5 Mar 2010)
-- Daniel Johnson provided fixes for building with the clang compiler
+- [Jiri Hruska brought this change]
 
-Yang Tse (5 Mar 2010)
-- Added IPv6 name servers support
+  imap: Added stricter parsing of continuation responses
+  
+  Enhanced the parsing to only allow continuation responses in some
+  states.
 
-Gisle Vanem (5 Mar 2010)
-- Ops!. Readded ares_nowarn.h.
+- imap: Simplified memcmp() in tagged response parsing
 
-- Added ares_nowarn.c.
+- [Jiri Hruska brought this change]
 
-Yang Tse (5 Mar 2010)
-- Constantine Sapuntzakis detected and fixed a double free in builds done
-  with threaded resolver enabled (Windows default configuration) that would
-  get triggered when a curl handle is closed while doing DNS resolution.
+  imap: Reworked the logic of untagged command responses
 
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for VMS configuration file
+- imap: Corrected spacing of trailing brace
 
-Daniel Stenberg (4 Mar 2010)
-- Julien Chaffraix clarified CURLOPT_HEADERFUNCTION and made
-  CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION more consistent
+- [Jiri Hruska brought this change]
 
-- - [Daniel Johnson] I've been trying to build libcurl with clang on Darwin and
-    ran into some issues with the GSSAPI tests in configure.ac. The tests first
-    try to determine the include dirs and libs and set CPPFLAGS and LIBS
-    accordingly. It then checks for the headers and finally sets LIBS a second
-    time, causing the libs to be included twice. The first setting of LIBS seems
-    redundant and should be left out, since the first part is otherwise just
-    about finding headers.
+  imap: Added stricter parsing of tagged command responses
   
-    My second issue is that 'krb5-config --libs gssapi' on Darwin is less than
-    useless and returns junk that, while it happens to work with gcc, causes
-    clang to choke. For example, --libs returns $CFLAGS along with the libs,
-    which is really retarded. Simply setting 'LIBS="$LIBS -lgssapi_krb5
-    -lresolv"' on Darwin is sufficient.
+  Enhanced the parsing of tagged responses which must start with "OK",
+  "NO" or "BAD"
 
-- - Based on patch provided by Jacob Moshenko, the transfer logic now properly
-    makes sure that when using sub-second timeouts, there's no final bad 1000ms
-    wait. Previously, a sub-second timeout would often make the elapsed time end
-    up the time rounded up to the nearest second (e.g. 1s for 200ms timeout)
+- [Jiri Hruska brought this change]
 
-- update the generic copyright year range to include 2010
+  imap: Simplified command response test in imap_endofresp()
 
-- - Andrei Benea filed bug report #2956698 and pointed out that the
-    CURLOPT_CERTINFO feature leaked memory due to a missing OpenSSL function
-    call. He provided the patch to fix it too.
-  
-    http://curl.haxx.se/bug/view.cgi?id=2956698
+- [Jiri Hruska brought this change]
+
+  imap: Corrected comment in imap_endofresp()
 
-- - Markus Duft pointed out in bug #2961796 that even though Interix has a
-    poll() function it doesn't quite work the way we want it so we must disable
-    it, and he also provided a patch for it.
+- DOCS: Corrected layout of POP3 and IMAP URL examples
   
-    http://curl.haxx.se/bug/view.cgi?id=2961796
+  Corrected layout issues with the POP3 and IMAP URL examples introduced
+  in commit cb3ae6894fb2.
 
-- - Made the pingpong timeout code properly deal with the response timeout AND
-    the global timeout if set. Also, as was reported in the bug report #2956437
-    by Ryan Chan, the time stamp to use as basis for the per command timeout was
-    not set properly in the DONE phase for FTP (and not for SMTP) so I fixed
-    that just now. This was a regression compared to 7.19.7 due to the
-    conversion of FTP code over to the generic pingpong concepts.
+- DOCS: Updated CURLOPT_URL section following recent POP3 and IMAP changes
   
-    http://curl.haxx.se/bug/view.cgi?id=2956437
+  Updated the POP3 sub-section to refer to message ID rather than mailbox.
+  
+  Added an IMAP sub-section with example URLs depicting the specification
+  of mailbox, uid and section.
 
-- remove assignment never used
+- pop3: Refactored the mailbox variable as it didn't reflect it's purpose
+  
+  Updated the mailbox variable to correctly reflect it's purpose. The
+  name mailbox was a leftover from when IMAP and POP3 support was
+  initially added to curl.
 
-- - Ben Greear provided an update for TFTP that fixes upload.
+- FEATURES: Updated following recent IMAP changes
 
-- SSL, not SSH, SSL
+- [Jiri Hruska brought this change]
 
-- - Wesley Miaw reported bug #2958179 which identified a case of looping during
-    OpenSSL based SSL handshaking even though the multi interface was used and
-    there was no good reason for it.
+  imap: Added the ability to FETCH a specific UID and SECTION
   
-    http://curl.haxx.se/bug/view.cgi?id=2958179
-
-Yang Tse (28 Feb 2010)
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
+  Updated the FETCH command to send the UID and SECTION parsed from the
+  URL. By default the BODY specifier doesn't include a section, BODY[] is
+  now sent whereas BODY[TEXT] was previously sent. In my opinion
+  retrieving just the message text is rarely useful when dealing with
+  emails, as the headers are required for example, so that functionality
+  is not retained. In can however be simulated by adding SECTION=TEXT to
+  the URL.
+  
+  Also updated test801 and test1321 due to the BODY change.
 
-- Added ares_nowarn.* to VC6 project file
+- email: Additional tidy up of comments following recent changes
 
-Daniel Stenberg (26 Feb 2010)
-- spellchecked by Stéphane Fillod
+- smtp: Removed some FTP heritage leftovers
+  
+  Removed user and passwd from the SMTP struct as these cannot be set on
+  a per-request basis and are leftover from legacy FTP code.
+  
+  Changed some comments still using FTP terminology.
 
-- - Pat Ray in bug #2958474 pointed out an off-by-one case when receiving a
-    chunked-encoding trailer.
+- smtp: Moved the per-request variables to the per-request data structure
   
-    http://curl.haxx.se/bug/view.cgi?id=2958474
+  Moved the rcpt variable from the per-connection struct smtp_conn to the
+  new per-request struct and fixed references accordingly.
 
-Dan Fandrich (26 Feb 2010)
-- Fixed a couple of out of memory leaks and a segfault in the IMAP code.
+- pop3: Introduced a custom SMTP structure for per-request data
+  
+  Created a new SMTP structure and changed the type of the smtp proto
+  variable in connectdata from FTP* to SMTP*.
 
-Yang Tse (26 Feb 2010)
-- fix sizeof short
+unknown (23 Feb 2013)
+- [Steve Holme brought this change]
 
-- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
+  imap: Minor correction of comments for max line length
 
-- Added SIZEOF_INT definition
+Daniel Stenberg (23 Feb 2013)
+- strcasestr: remove check for this unused function
 
-- fix compiler warning
+- pop3: fix compiler warning
+  
+  error: declaration of 'pop3' shadows a previous local
 
-- fix compiler warning
+Steve Holme (23 Feb 2013)
+- [Jiri Hruska brought this change]
 
-- fix compiler warning
+  imap: Added URL parsing of new variables
+  
+  Updated the imap_parse_url_path() function to parse uidvalidity, uid and
+  section parameters based on RFC-5092.
 
-Dan Fandrich (25 Feb 2010)
-- Fixed a couple of out of memory leaks and a segfault in the SMTP code.
+- [Jiri Hruska brought this change]
 
-Yang Tse (25 Feb 2010)
-- fix file name
+  imap: Introduced imap_is_bchar() function
+  
+  Added imap_is_bchar() for testing if a given character is a valid bchar
+  or not.
 
-- Fixed bug report #2958074 indicating
-  (http://curl.haxx.se/bug/view.cgi?id=2958074) that curl on Windows with
-  option --trace-time did not use local time when timestamping trace lines.
-  This could also happen on other systems depending on time souurce.
+- [Jiri Hruska brought this change]
 
-- enable 802 and 803
+  imap: Introduced new per-request veriables
+  
+  Added uidvalidity, uid and section variables to the per-request IMAP
+  structure in preparation for upcoming URL parsing.
 
-- fix compiler warning
+- pingpong: Renamed curl_ftptransfer to curl_pp_transfer
 
-- fix compiler warning
+- pop3: Removed some FTP heritage leftovers
+  
+  Removed user and passwd from the POP3 struct as these cannot be set on
+  a per-request basis and are leftover from legacy FTP code.
+  
+  Changed some comments still using FTP terminology.
 
-- fix compiler warning
+- pop3: Moved the per-request variables to the per-request data structure
+  
+  Moved the mailbox and custom request variables from the per-connection
+  struct pop3_conn to the new per-request struct and fixed references
+  accordingly.
 
-- fix socket data type
+- pop3: Introduced a custom POP3 structure for per-request data
+  
+  Created a new POP3 structure and changed the type of the pop3 proto
+  variable in connectdata from FTP* to POP*.
 
-- fix socket data type and logging format in debug tracking socket functions
+- [Jiri Hruska brought this change]
 
-- convert Curl_ultous() and Curl_ultouc() functions to curlx_ultous() and
-  curlx_ultouc(), exposing them through curlx.h to allow proper code reuse
-  later in our test harness.
+  imap: Fixed escaping of mailbox names
+  
+  Used imap_atom() to escape mailbox names in imap_select().
 
-- updated sources
+- pingpong: Moved curl_ftptransfer definition to pingpong.h
+  
+  Moved the ftp transfer structure into pingpong.h so other protocols that
+  require it don't have to include ftp.h.
 
-Patrick Monnerat (22 Feb 2010)
-- _ Adjusted RFC821 HELO fallback and enabled test804
+- urldata.h: Fixed comment for opt_no_body variable
+  
+  Corrected comment for opt_no_body variable to CURLOPT_NOBODY.
 
-- - Proper handling of STARTTLS on SMTP, taking CURLUSESSL_TRY into account.
-  - SMTP falls back to RFC821 HELO when EHLO fails (and SSL is not required).
-  - Use of true local host name (i.e.: via gethostname()) when available, as default argument to SMTP HELO/EHLO.
-  - Test case 804 for HELO fallback.
+- email: Minor tidy up following IMAP changes
 
-Yang Tse (22 Feb 2010)
-- add header inclusion
+- [Jiri Hruska brought this change]
 
-- fix compiler warning
+  imap: Removed more FTP leftovers
+  
+  Changed some variables and comments still using FTP terminology.
 
-- fix compiler warning
+- [Jiri Hruska brought this change]
 
-Daniel Stenberg (21 Feb 2010)
-- clarify more details on section "2.1 More non-blocking"
+  imap: Removed some FTP heritage leftovers
+  
+  Removed user and passwd from the IMAP struct as these cannot be set on
+  a per-request basis and are leftover from legacy FTP code.
 
-- TFTP transfers are not blocking since 7.20.0
+- [Jiri Hruska brought this change]
 
-- - Fixed the SMTP compliance by making sure RCPT TO addresses are specified
-    properly in angle brackets. Recipients provided with CURLOPT_MAIL_RCPT now
-    get angle bracket wrapping automatically by libcurl unless the recipient
-    starts with an angle bracket as then the app is assumed to deal with that
-    properly on its own.
+  imap: Introduced a custom IMAP structure for per-request data
+  
+  Created a new IMAP structure and changed the type of the imap proto
+  variable in connectdata from FTP* to the new IMAP*.
+  
+  Moved the mailbox variable from the per-connection struct imap_conn to
+  the new per-request struct and fixed references accordingly.
 
-- - I made the SMTP code expect a 250 response back from the server after the
-    full DATA has been sent, and I modified the test SMTP server to also send
-    that response. As usual, the DONE operation that is made after a completed
-    transfer is still not doable in a non-blocking way so this waiting for 250
-    is unfortunately made blockingly.
+- pop3: Updated do phrase clean-up comment
+  
+  Following commit 65644b833532 for the IMAP module updated the clean-up
+  comment in POP3.
 
-- corected a comment and wrapped a few longish lines
+- imap: Fixed memory leak when performing multiple selects
+  
+  Moved the clean-up of the mailbox variable from imap_disconnect() to
+  imap_done() as this variable is allocated in the do phase, yet would
+  have only been freed only once if multiple selects where preformed
+  on a single connection.
 
-Yang Tse (20 Feb 2010)
-- fix compiler warning
+Daniel Stenberg (22 Feb 2013)
+- [Alexander Klauer brought this change]
 
-- fix compiler warning
+  Documentation: Typo in docs/CONTRIBUTE
+  
+  Fixes a typo get → git in docs/CONTRIBUTE.
 
-- fix compiler warning
+- [Alexander Klauer brought this change]
 
-- fix compiler warning
+  repository: ignore patch files generated by git
+  
+  Ignores the patch files generated by the 'git format-patch' command.
 
-- fix compiler warning
+- [Alexander Klauer brought this change]
 
-Daniel Stenberg (17 Feb 2010)
-- ares_reinit()
+  libcurl documentation: clarifications and typos
   
-  - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
-    like the res_init() resolver function offers
+  * Elaborates on default values of some curl_easy_setopt() options.
+  * Reminds the user to cast variadic arguments to curl_easy_setopt() to
+    'void *' where curl internally interprets them as such.
+  * Clarifies the working of the CURLOPT_SEEKFUNCTION option for
+    curl_easy_setopt().
+  * Fixes typo 'forth' → 'fourth'.
+  * Elaborates on CURL_SOCKET_TIMEOUT.
+  * Adds some missing periods.
+  * Notes that the return value of curl_version() must not be passed to
+    free().
 
-- use curl standard indentation and line lengths
+- [Alexander Klauer brought this change]
 
-Yang Tse (16 Feb 2010)
-- replaced tabs with spaces
-
-- fix Content-Length validation
+  lib/url.c: Generic read/write data pointers
+  
+  Always interprets the pointer passed with the CURLOPT_WRITEDATA or
+  CURLOPT_READDATA options of curl_easy_setopt() as a void pointer in
+  order to avoid problems in environments where FILE and void pointers
+  have non-trivial conversion.
 
-Daniel Stenberg (15 Feb 2010)
-- use (void) in front of fwrite() calls that ignore the return code
+- [Alexander Klauer brought this change]
 
-Yang Tse (15 Feb 2010)
-- fix compiler warning: conversion from "long" to "size_t" may lose sign
+  libcurl documentation: updates HTML index
+  
+  * Adds several links to documentation of library functions which were
+    missing.
+  * Marks documentation of deprecated library functions "(deprecated)".
+  * Removes spurious .html suffixes.
 
-- fix compiler warning: conversion from "long" to "size_t" may lose sign
+- ossl_seed: avoid recursive seeding!
 
-Daniel Stenberg (15 Feb 2010)
-- -w speed_download and speed_upload are measured in bytes per second
+Steve Holme (22 Feb 2013)
+- [Jiri Hruska brought this change]
 
-- 75. NTLM authentication involving unicode user name or password.
-    http://curl.haxx.se/mail/lib-2009-10/0024.html
-    http://curl.haxx.se/bug/view.cgi?id=2944325
+  Fixed checking the socket if there is data waiting in the cache
+  
+  Use Curl_pp_moredata() in Curl_pp_multi_statemach() to check if there is
+  more data to be received, rather than the socket state, as a task could
+  hang waiting for more data from the socket itself.
 
-Yang Tse (14 Feb 2010)
-- removed trailing whitespace
+- imap.c: Fixed an incorrect variable reference
+  
+  Fixed an incorrect variable reference which was introduced in commit
+  a1701eea289f as a result of a copy and paste from SMTP/POP3.
 
-- fix compiler warning
+- [Jiri Hruska brought this change]
 
-- Overhauled test suite getpart() function. Fixing potential out of bounds
-  stack and memory overwrites triggered with huge test case definitions.
+  pingpong: Introduce Curl_pp_moredata()
+  
+  A simple function to test whether the PP is not sending and there are
+  still more data in its receiver cache. This will be later utilized to:
+  
+  1) Change Curl_pp_multi_statemach() and Curl_pp_easy_statemach() to
+     not test socket state and just call user's statemach_act() function
+     when there are more data to process, because otherwise the task would
+     just hang, waiting for more data from the socket.
+  
+  2) Allow PP users to read multiple responses by looping as long as there
+     are more data available and current phase is not finished.
+     (Currently needed for correct processing of IMAP SELECT responses.)
 
-Daniel Stenberg (13 Feb 2010)
-- - Martin Hager reported and fixed a problem with a missing quote in libcurl.m4
+Nick Zitzmann (19 Feb 2013)
+- FEATURES: why yes, we do support metalink
   
-    (http://curl.haxx.se/bug/view.cgi?id=2951319)
+  I just noticed Metalink support wasn't listed as a feature of the tool.
 
-Gunter Knauf (13 Feb 2010)
-- used allways #ifdef / #ifndef;
-  moved gethostbyname_thread() to #else case to avoid 'not used' compiler warning.
+- metalink: fix improbable crash parsing metalink filename
+  
+  The this_url pointer wasn't being initialized, so if strdup() would return
+  null when copying the filename in a metalink file, then hilarity would
+  ensue during the cleanup phase. This change was brought to you by clang,
+  which noticed this and raised a warning.
 
-- replaced tabs by spaces, removed trailing tabs/spaces.
+Yang Tse (19 Feb 2013)
+- smtp.c: fix enumerated type mixed with another type
 
-Daniel Stenberg (13 Feb 2010)
-- - Tom Donovan fixed the CURL_FORMAT_* defines when building with cmake.
+- polarssl threadlock cleanup
 
-- - Jack Zhang reported a problem with SMTP: we wrongly used multiple addresses
-    in the same RCPT TO line, when they should be sent in separate single
-    commands. I updated test case 802 to verify this.
+Nick Zitzmann (18 Feb 2013)
+- docs: schannel and darwinssl documentation improvements
   
-  - I also fixed a bad use of my_setopt_str() of CURLOPT_MAIL_RCPT in the curl
-    tool which made it try to output it as string for the --libcurl feature
-    which could lead to crashes.
-
-- CURLOPT_MAIL_RCPT is *not* a string so we must not try to printf() it
+  Schannel and darwinssl use the certificates built into the
+  OS to do vert verification instead of bundles. darwinssl
+  is thread-safe. Corrected typos in the NSS docs.
 
-- free --mail-from strings properly
-
-Patrick Monnerat (11 Feb 2010)
-- _ Make it compilable again on OS400.
-  _ Upgrade OS400 EBCDIC wrappers for new options.
-  _ Upgrade ILE/RPG bindings to current state.
+Daniel Stenberg (18 Feb 2013)
+- resolver_error: remove wrong error message output
+  
+  The attempt to use gai_strerror() or alternative function didn't work as
+  the 'sock_error' field didn't contain the proper error code. But since
+  this hasn't been reported and thus isn't really a big deal I decided to
+  just scrap the whole attempt to output the detailed resolver error and
+  instead remain with just stating that the resolving of the name failed.
 
-Yang Tse (11 Feb 2010)
-- mention last changes
+- [Kim Vandry brought this change]
 
-- Steven M. Schweda updated VMS readme file
+  Curl_resolver_is_resolved: show proper host name on failed resolve
 
-- Steven M. Schweda removed batch_compile.com and defines.com
+- Curl_resolver_is_resolved: fix compiler warning
+  
+  conversion to 'int' from 'long int' may alter its value
 
-- Steven M. Schweda fixed:
+- compiler warning fix
   
-  VMS builder bad behavior when used in a batch job.
+  follow-up to commit ed7174c6f66, rename 'wait' to 'block'
+
+- compiler warning fix: declaration of 'wait' shadows a global declaration
   
-  Various ".LIS" and ".MAP" files created without being requested
-  by a "LIST" command-line option, and in the wrong place, too.
+  It seems older gcc installations (at least) will cause warnings if we
+  name a variable 'wait'. Now changed to 'block' instead.
   
-  Some minor typographical changes.
+  Reported by: Jiří Hruška
+  Bug: http://curl.haxx.se/mail/lib-2013-02/0247.html
 
-Dan Fandrich (10 Feb 2010)
-- Mention the minimum size of CURL_MAX_WRITE_SIZE
-
-Yang Tse (10 Feb 2010)
-- - remove extra "\r\n" from doc404_RTSP
+Nick Zitzmann (17 Feb 2013)
+- MacOSX-Framework: Make script work in Xcode 4.0 and later
   
-  - avoid memory alignment issue when setting RTSP packet length
+  Apple made a number of changes to Xcode 4. The SDKs were moved, the entire
+  Developer folder was moved, and PowerPC support was removed. The script
+  will now adapt to those changes and should be future-proofed against
+  additional changes in case Apple moves the Developer folder ever again.
+  Also, the minimum OS X version compiler option was removed, so that the
+  framework can be built against the latest SDK but still run in older cats.
 
-Dan Fandrich (9 Feb 2010)
-- Removed some erroneous "compressed" key words
+Daniel Stenberg (17 Feb 2013)
+- docs: refer to CURLOPT_ACCEPT_ENCODING instead of the old name
 
-Daniel Stenberg (9 Feb 2010)
-- start working on 7.20.1
+Steve Holme (16 Feb 2013)
+- email: Tidied up result code variables
+  
+  Tidied up result variables to be consistent in name, declaration order
+  and default values.
 
-Version 7.20.0 (9 Feb 2010)
+Nick Zitzmann (16 Feb 2013)
+- ntlm_core: fix compiler warning when building with clang
+  
+  Fixed a 64-to-32 compiler warning raised when building with
+  clang and the --with-darwinssl option.
 
-Daniel Stenberg (9 Feb 2010)
-- spell and 7.20.0
+Daniel Stenberg (16 Feb 2013)
+- Guile-curl: a new libcurl binding
 
-- - When downloading compressed content over HTTP and the app as asked libcurl
-    to automatically uncompress it with the CURLOPT_ENCODING option, libcurl
-    could wrongly provide the callback with more data than what the maximum
-    documented amount. An application could thus get tricked into badness if the
-    maximum limit was trusted to be enforced by libcurl itself (as it is
-    documented).
+- polarsslthreadlock: #include the proper memory and debug includes
   
-    This is further detailed and explained in the libcurl security advisory
-    20100209 at
+  Pointed out by Steve Holme
+
+Steve Holme (16 Feb 2013)
+- email: Removed unnecessary forward declaration
   
-      http://curl.haxx.se/docs/adv_20100209.html
+  Due to the reordering of functions in commit 586f5d361474 the forward
+  declaration to state_upgrade_tls() are no longer required.
 
-- set VERSIONINFO accordingly for the 7.20.0 release
+- pop3.c: Added reference to RFC-5034
 
-Yang Tse (6 Feb 2010)
-- warning fix
+Daniel Stenberg (15 Feb 2013)
+- [Willem Sparreboom brought this change]
 
-- OOM handling fix
+  PolarSSL: Change to cURL coding style
+  
+  Repaired all curl/lib/checksrc.pl warnings in the previous four patches
 
-- OOM handling fix
+- [Willem Sparreboom brought this change]
 
-- fix compiler warning
+  PolarSSL: WIN32 threading support for entropy
+  
+  Added WIN32 threading support for PolarSSL entropy if
+  --enable-threaded-resolver config flag is set and process.h can be found.
 
-- fix compiler warning
+- [Willem Sparreboom brought this change]
 
-- fix compiler warning
+  PolarSSL: pthread support for entropy
+  
+  Added pthread support for polarssl entropy if --enable-threaded-resolver
+  config flag is set and pthread.h can be found.
 
-- Addes OOM handling for curl_easy_setopt() calls in test
+- [Willem Sparreboom brought this change]
 
-- - avoid OpenSSL 0.9.8 ENGINE_by_id memory leak
+  PolarSSL: changes to entropy/ctr_drbg/HAVEGE_RANDOM
   
-  - cleanup parenthesis usage in return statements
-
-- - attempt to workaround icc 9.1 optimizer issue
+  Add non-threaded entropy and ctr_drbg and removed HAVEGE_RANDOM define
 
-- fix printf-style format strings
+- [Willem Sparreboom brought this change]
 
-- Validate server port argument
+  PolarSSL: added human readable error strings
+  
+  Print out human readable error strings for PolarSSL related errors
 
-- Fix variable initialization
+Steve Holme (15 Feb 2013)
+- pop3: Removed unnecessary state changes on failure
 
-- Modified test case 557 to additionally verify libcurl's internal curl_m*printf()
-  functions formatting functionality when handling signed and unsigned shorts.
+- imap: Removed unnecessary state change on failure
 
-- Added size check for 'short' data type
+Daniel Stenberg (15 Feb 2013)
+- metalink_cleanup: yet another follow-up fix
 
-- Fix compiler warning: unused variable
+- metalink_cleanup: define it without argument
+  
+  Since the function takes no argument, the macro shouldn't take one as
+  some compilers will error out on that.
 
-- added an additional second to allow test to pass on heavily loaded servers
+- rename "easy" statemachines: call them block instead
+  
+  ... since they're not used by the easy interface really, I wanted to
+  remove the association. Also, I unified the pingpong statemachine driver
+  into a single function with a 'wait' argument: Curl_pp_statemach.
 
-Dan Fandrich (3 Feb 2010)
-- Changed the Watcom makefiles to make them easier to keep in sync with
-  Makefile.inc since that can't be included directly.
+Yang Tse (15 Feb 2013)
+- [Gisle Vanem brought this change]
 
-Daniel Stenberg (3 Feb 2010)
-- more symbols added in 7.20.0
+  curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
 
-Yang Tse (3 Feb 2010)
-- Fix OOM handling
+- [Gisle Vanem brought this change]
 
-- Fix progressmode Configurable struct member data type. Changed to
-  'int' which fits better with existing CURL_PROGRESS_* definitions.
+  config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
 
-- Fix portability issue related with unaligned memory access
+- [Gisle Vanem brought this change]
 
-- Fix compiler warnings: conversion from 'const int ' to 'unsigned char ', possible loss of data
+  config-dos.h: define strerror() to strerror_s_() for High-C
 
-- cookies with same path length might get sorted in different order when
-  using different qsort implementations. In order to make this test give
-  same results on different systems, paths now have different lengths.
+- [Gisle Vanem brought this change]
 
-- added an additional second to allow test to pass on heavily loaded servers
+  config-dos.h: define HAVE_TERMIOS_H only for djgpp
 
-- Fix compiler warning: conditional expression is constant
+Steve Holme (14 Feb 2013)
+- smtp.c: Fixed a trailing whitespace
+  
+  Remove tailing whitespace introduced in commit 7ed689d24a4e.
 
-- Fix compiler warning: local variable may be used without having been initialized.
+- pop3: Fixed blocking SSL connect when connecting via POP3S
+  
+  A call to Curl_ssl_connect() was accidentally left in when the SSL/TLS
+  connection layer was reworked in 7.29. Not only would this cause the
+  connection to block but had the additional overhead of calling the
+  non-blocking connect a little bit later.
 
-- Fix compiler warnings: conversion from 'const int ' to 'unsigned char ', possible loss of data
+- smtp: Refactored the smtp_state_auth_resp() function
+  
+  Renamed smtp_state_auth_resp() function to match the implementations in
+  IMAP and POP3.
 
-- Fix compiler warnings:
+Daniel Stenberg (14 Feb 2013)
+- remove ifdefs
   
-  (1) conversion from 'const int ' to 'unsigned char ', possible loss of data
-  (2) conditional expression is constant
+  Clarify the code by reducing ifdefs
 
-- mention a couple of changes back from November
+- strlcat: remove function
+  
+  This function was only used twice, both in places where performance
+  isn't crucial (socks + if2ip). Removing the use of this function removes
+  the need to have our private version for systems without it == reduced
+  amount of code.
+  
+  Also, in the SOCKS case it is clearly better to fail gracefully rather
+  than to truncate the results.
+  
+  This work was triggered by a bug report on the strcal prototype in
+  strequal.h.
+  
+  strlcat was added in commit db70cd28 in February 2001!
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1192
+  Reported by: Jeremy Huddleston
 
-- mention run time statistics options
+- Curl_FormBoundary: made static
+  
+  As Curl_FormBoundary() is no longer used outside of this file (since
+  commit ad7291c1a9d), it is now renamed to formboundary() and is made
+  static.
 
-- - Symbol CURL_FORMAT_OFF_T now obsoleted, will be removed in a future release,
-    symbol will not be available when building with CURL_NO_OLDIES defined. Use
-    of CURL_FORMAT_CURL_OFF_T is preferred since 7.19.0
+- ossl_seed: fix the last resort PRNG seeding
+  
+  Instead of just abusing the pseudo-randomizer from Curl_FormBoundary(),
+  this now uses Curl_ossl_random() to get entropy.
 
-- avoid possibility of using obsoleted stuff
+Steve Holme (13 Feb 2013)
+- email: Tidy up before additional IMAP work
+  
+  Replaced two explicit comparisons of CURLE_OK with boolean alternatives.
+  
+  General tidy up of comments.
 
-- remove setup.h inclusion which is already done from test.h inclusion
+- smtp: Removed duplicate pingpong structure initialisation
+  
+  The smtp_connect() function was setting the member variables of the
+  pingpong structure twice, once before calling Curl_pp_init() and once
+  after!
 
-Kamil Dudka (2 Feb 2010)
-- mention SOCKS related problems in the curl(1) man page
+Yang Tse (13 Feb 2013)
+- move msvc IDE related files to 'vs' directory tree
+  
+  Use 'vs' directory tree given that 'vc' intended one clashes
+  with an already existing build target in file Makefile.dist.
 
-Yang Tse (2 Feb 2010)
-- Fix compiler warning: variable was set but never used
+Daniel Stenberg (13 Feb 2013)
+- install-sh: updated to support multiple source files as arguments
+  
+  Version 7.29.0 uses Makefiles generated with a newer version of the
+  autotools than the previous 7.28.1. These Makefiles try to install
+  e.g. header files by calling install-sh with multiple source files as
+  arguments. The bundled install-sh is to old and does not support this.
+  
+  The problem only occurs, if install-sh is actually being used, ie. the
+  platform install executable is to old or not usable. Example: Solaris
+  10.
+  
+  The files install-sh and mkinstalldirs are now updated with the automake
+  1.11.3 versions. A better fix might be to completely remove them from
+  git and force the files to be added/created during buildconf.
   
-  Simplify preprocessor symbol checking
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1195
+  Reported by: Rainer Jung
 
-Daniel Stenberg (2 Feb 2010)
-- Julien Chaffraix pointed out a comment mistake, and I re-indented the code
-  slightly while editing
+Yang Tse (13 Feb 2013)
+- move msvc IDE related files to 'vc' directory tree
 
-Yang Tse (2 Feb 2010)
-- include headers
+- msvc IDE 'vc' directory tree preparation
 
-- Conroy added a check to the coded message size since the docs stipulate
-  that each call will contain a full protocol packet.
+Steve Holme (12 Feb 2013)
+- imap: Corrected a whitespace issue from previous commit
+  
+  Fixed a small whitespace issue that crept in there in commit
+  508cdf4da4d7.
+
+- email: Another post optimisation of endofresp() tidy up
 
-- Conroy's fix to make the code match with the RTP documentation regarding
-  writing out the whole header. The docs say it writes the whole header,
-  but the code (before this patch) did not write out the leading $.
+- sasl: Fixed null pointer reference when decoding empty digest challenge
+  
+  Fixed a null pointer reference when an empty challenge is passed to the
+  Curl_sasl_create_digest_md5_message() function.
+  
+  Bug: http://sourceforge.net/p/curl/bugs/1193/
+  Reported by: Saran Neti
 
-Daniel Stenberg (1 Feb 2010)
-- We introduce a loop in lib/multi.c around all calls to multi_runsingle() and
-  simply check for CURLM_CALL_MULTI_PERFORM internally. This has the added
-  benefit that this goes in line with my long-term wishes to get rid of the
-  CURLM_CALL_MULTI_PERFORM all together from the public API.
+- email: Post optimisation of endofresp() tidy up
+  
+  Removed unnecessary end of line check and return.
 
-Yang Tse (1 Feb 2010)
-- update rtsp server header field from SWS to RTSPD
+Nick Zitzmann (12 Feb 2013)
+- darwinssl: Fix send glitchiness with data > 32 or so KB
+  
+  An ambiguity in the SSLWrite() documentation lead to a bad inference in the
+  code where we assumed SSLWrite() returned the amount of bytes written to
+  the socket, when that is not actually true; it returns the amount of data
+  that is buffered for writing to the socket if it returns errSSLWouldBlock.
+  Now darwinssl_send() returns CURLE_AGAIN if data is buffered but not written.
+  
+  Reference URL: http://curl.haxx.se/mail/lib-2013-02/0145.html
 
-- Test suite support for RTSP
+Steve Holme (12 Feb 2013)
+- pingpong.h: Fixed line length over 78 characters from b56c9eb48e3c
 
-- Make Curl_pop3_write() additionally truncate trailing POP3_EOB from received
-  string buffer, otherwise Curl_client_write() call with zero size would write
-  to the end of string buffer including matched POP3_EOB.
+- pingpong: Optimised the endofresp() function
+  
+  Reworked the pp->endofresp() function so that the conndata, line and
+  line length are passed down to it just as with Curl_client_write()
+  rather than each implementation of the function having to query
+  these values.
+  
+  Additionally changed the int return type to bool as this is more
+  representative of the function's usage.
 
-- WIN32 fix, _beginthreadex() may return either 0 or -1L upon failure
+- email: Post STARTLS capability code tidy up (Part Three)
+  
+  Corrected the order of the upgrade_tls() functions and moved the handler
+  upgrade and getsock() functions out from the middle of the state related
+  functions.
 
-- fix errno usage for WIN32 builds
+- email: Post STARTLS capability code tidy up (Part Two)
+  
+  Corrected the order of the pop3_state_capa() / imap_state_capability()
+  and the pop3_state_capa_resp() / imap_state_capability_resp() functions
+  to match the execution order.
 
-- fix printf-style format strings
+Daniel Stenberg (11 Feb 2013)
+- [ulion brought this change]
 
-- Chris Conroy fixed test #568 issues with carriage returns
+  SOCKS: fix socks proxy when noproxy matched
+  
+  Test 1212 added to verify
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1190
 
-- RTSP followup fix. Both the pipelined and non-pipelined case need to
-  check for (excess > 0 && !k->ignorebody).
+Steve Holme (11 Feb 2013)
+- ntlm: Updated comments for the addition of SASL support to IMAP in v7.29
 
-Daniel Stenberg (28 Jan 2010)
-- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
-    check for broken connections like ares_process() did. Based on that, I
-    merged the two functions into a single generic one with two front-ends.
+- RELEASE-NOTES: Updated following the recent imap/pop3/smtp changes
 
-Yang Tse (28 Jan 2010)
-- fix printf-style format strings
+Linus Nielsen Feltzing (10 Feb 2013)
+- Fix NULL pointer reference when closing an unused multi handle.
 
-- Use 'size_t' for GETNAMEINFO_TYPE_ARG2 definition for VMS.
+Steve Holme (10 Feb 2013)
+- email: Post STARTLS capability code tidy up (Part One)
   
-  http://curl.haxx.se/mail/lib-2009-12/0293.html
+  Corrected the order of the CAPA / CAPABILITY state machine constants to
+  match the execution order.
+
+- imap: Fixed memory leak following commit f6010d9a0359
 
-- portability fix
+- smtp: Added support for the STARTTLS capability (Part Two)
+  
+  Added honoring of the tls_supported flag when starting a TLS upgrade
+  rather than unconditionally attempting it. If the use_ssl flag is set
+  to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
+  connection will continue to authenticate. If this flag is set to
+  CURLUSESSL_ALL then the connection will complete with a failure as it
+  did previously.
 
-- fix printf-style format strings
+- pop3: Added support for the STLS capability (Part Three)
+  
+  Added honoring of the tls_supported flag when starting a TLS upgrade
+  rather than unconditionally attempting it. If the use_ssl flag is set
+  to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
+  connection will continue to authenticate. If this flag is set to
+  CURLUSESSL_ALL then the connection will complete with a failure as it
+  did previously.
 
-- Known bug #64 fixed by Constantine Sapuntzakis and Joshua Kwan in 7.20.0
+- imap: Added support for the STARTTLS capability (Part Three)
+  
+  Added honoring of the tls_supported flag when starting a TLS upgrade
+  rather than unconditionally attempting it. If the use_ssl flag is set
+  to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
+  connection will continue to authenticate. If this flag is set to
+  CURLUSESSL_ALL then the connection will complete with a failure as it
+  did previously.
 
-- Chris Conroy provided first RTSP tests
+Daniel Stenberg (10 Feb 2013)
+- [Alessandro Ghedini brought this change]
 
-- RTSP tests disabled until test harness RTSP support is updated
+  htmltitle: fix suggested build command
 
-- Chris Conroy's RTSP followup fixes
+Steve Holme (10 Feb 2013)
+- pop3: Added support for the STLS capability (Part Two)
+  
+  Added sending of initial CAPA command before STLS is sent. This allows
+  for the detection of the capability before trying to upgrade the
+  connection.
 
-- mention asynchronous DNS lookups enhancements
+- imap: Added support for the STARTTLS capability (Part Two)
+  
+  Added sending of initial CAPABILITY command before STARTTLS is sent.
+  This allows for the detection of the capability before trying to
+  upgrade the connection.
 
-- Restore normal operation:
+- smtp: Added support for the STLS capability (Part One)
   
-    c-ares is only enabled when specifically requested.
+  Introduced detection of the STARTTLS capability, in order to add support
+  for TLS upgrades without unconditionally sending the STARTTLS command.
+
+- pop3: Added support for the STLS capability (Part One)
   
-    Consequently, c-ares default setting is disabled.
+  Introduced detection of the STLS capability, in order to add support
+  for TLS upgrades without unconditionally sending the STLS command.
 
-- fix c-ares assumed check being skipped
+- imap: Added support for the STARTTLS capability (Part One)
+  
+  Introduced detection of the STARTTLS capability, in order to add support
+  for TLS upgrades without unconditionally sending the STARTTLS command.
 
-- fix compiler warning
+- RELEASE-NOTES: synced with 92f7606f29b704
 
-- fix LDFLAGS preservation in CURL_CHECK_LIB_ARES
+- smtp: Fixed an issue when processing EHLO failure responses (Part 3)
+  
+  Follow up fix to commit 62bd21746443 to cater for servers that don't
+  respond with a 250 in their EHLO responses. Additionally updated the
+  SMTP tests to respond with a 250 response code as per RFC5321.
 
-Daniel Stenberg (26 Jan 2010)
-- no need to take precautiono for how things were before 7.16.0 since that
-  is now a very long time ago
+- pop3: Fixed SASL authentication capability detection
+  
+  Fixed the SASL capability detection to include the space character
+  before the authentication mechanism list. Otherwise a capability such
+  as SASLSOMETHING would be interpreted as enabling SASL and potentially
+  trying to identify SOMETHING as a mechanism.
 
-- - Mike Crowe made libcurl return CURLE_COULDNT_RESOLVE_PROXY when it is the
-    proxy that cannot be resolved when using c-ares. This matches the behaviour
-    when not using c-ares.
+- pop3: Fixed incorrect return value from pop3_endofresp()
+  
+  Corrected an incorrect return value when -ERR is received from the
+  server - introduced in commit b5bb61ee697b (June 2012).
 
-Dan Fandrich (26 Jan 2010)
-- Added curl_threads.c to a few more non-configure build files
+- smtp: Fixed an issue when processing EHLO failure responses (Part 2)
+  
+  Follow up fix to commit 23d17190ee32 as EHLO capabilities can exist
+  within a positive response line.
 
-Yang Tse (26 Jan 2010)
-- minor fixes for --enable-ares configure option
+- smtp: Fixed an issue with missing capabilities after the AUTH line
+  
+  Follow up to commit 40f9bb787f05 to fix missing capabilities after an
+  AUTH line.
 
-Daniel Stenberg (26 Jan 2010)
-- Andre Guibert de Bruet improved the libssh2 error code translation
+Nick Zitzmann (8 Feb 2013)
+- darwinssl: Make certificate errors less techy
+  
+  Previously if a problem was found with one of the server's certificates,
+  we'd log an OSStatus for the end user to look up. Now we explain what
+  was wrong with the site's certificate chain. Also un-did part of the
+  previous commit where the code wouldn't catch errSSLServerAuthCompleted
+  if built under Leopard.
 
-Yang Tse (26 Jan 2010)
-- resolver selection for non-configure Windows builds, default is threaded DNS
+Guenter Knauf (9 Feb 2013)
+- Updated dependency libs.
 
-- add curl_threads.c to non-configure target build files
+Steve Holme (9 Feb 2013)
+- imap: Corrected some comments
 
-- onstantine Sapuntzakis threaded resolver enhancements
+- smtp: Fixed an issue when processing EHLO failure responses
+  
+  Fixed a small issue where smtp_endofresp() would look for capabilities
+  in the description part of a failure response. In theory a server
+  shouldn't respond with SIZE or AUTH in an EHLO command's failure
+  response but if it did then capabilities would be unnecessarily set
+  before eventually failing.
 
-- Constantine Sapuntzakis threaded resolver enhancements
+- pop3: Reworked pop3_endofresp() to simplify it little
+  
+  Reworked pop3_endofresp() to simplify it and provide consistency between
+  imap and smtp.
 
-- Constantine Sapuntzakis provided initial thread abstraction layer
+- imap: Renamed state variables in imap_authenticate()
+  
+  Renamed the authstate1 and authstate2 variables in imap_authenticate()
+  as the old name was a left over from when there was only one state
+  variable which was named due to a clash with the state() function.
+  
+  Additionally this provides consistency with the smtp module.
 
-- make Curl_handler_*_proxy definition static
+- smtp: Reworked smtp_endofresp() to allow for extra capability detection
 
-Dan Fandrich (25 Jan 2010)
-- Updated minimum library sizes
+- smtp: Renamed smtp_state_auth_passwd_resp() function
+  
+  Renamed the login password response function to better describe it's
+  purpose as well as for consistency with the imap and pop3 modules.
 
-Yang Tse (25 Jan 2010)
-- fix compiler warning
+Daniel Stenberg (8 Feb 2013)
+- [Gisle Vanem brought this change]
 
-Daniel Stenberg (24 Jan 2010)
-- Julien Chaffraix corrected bad #elif lines to silence warnings
+  ntlm: fix memory leak
+  
+  Running tests\libtest\libntlmconnect.exe reveals a 1 byte (!) leak in
+  ./lib/curl_ntlm_msgs.c:
+  
+  perl ..\memanalyze.pl c:memdebug.curl
+  Leak detected: memory still allocated: 1 bytes
+  At 9771e8, there's 1 bytes.
+  allocated by curl_ntlm_msgs.c:399
+  
+  Snippet from curl_ntlm_msgs.c:
+     /* setup ntlm identity's domain and length */
+     dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1));
+  
+  (my domlen == 0).
+  
+  'dup_domain.tbyte_ptr' looks to be freed in Curl_ntlm_sspi_cleanup() via
+  'ntlm->identity.Domain'. But I see no freeing of 'dup_domain.tchar_ptr'.
 
-Yang Tse (24 Jan 2010)
-- HAVE_GETADDRINFO_THREADSAFE definition for non-configure win32 builds
+- DONE: consider callback-aborted transfers premature
+  
+  This bug report properly identified that when doing SMTP and aborting
+  the transfer with a callback, it must be considered aborted prematurely
+  by the code to avoid QUIT etc to be attempted as that would cause a
+  hang.
+  
+  The new test case 1507 verifies this behavior.
+  
+  Reported by: Patricia Muscalu
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1184
 
-Bjorn Stenberg (23 Jan 2010)
-- Mention -J change
+- FAQ: refreshed some phrases
 
-- Added -J/--remote-header-name.
+Nick Zitzmann (7 Feb 2013)
+- darwinssl: Fix build under Leopard
+  
+  It turns out that Leopard (OS X 10.5) doesn't have constants for the ECDH
+  ciphers in its headers, so the cases for them have been taken out of the
+  build when building under Leopard. Also added a standard function for
+  getting a string description of a SecCertificateRef.
 
-Daniel Stenberg (23 Jan 2010)
-- "remove progress meter from libcurl" at next API break
+Steve Holme (7 Feb 2013)
+- RELEASE-NOTES: Added new imap features
 
-Yang Tse (23 Jan 2010)
-- add inclusion of curl_memory.h
+- imap: Added support for SASL-IR extension (Part 2)
+  
+  Modified imap_authenticate() to add support for sending the initial
+  response with the AUTHENTICATE command, as per RFC4959.
 
-- adjust preprocessor symbol definition check relative to resolver specialty
+- smtp: Updated SMTP_AUTH_PASSWD state constant
+  
+  Changed the SMTP_AUTH_PASSWD state constant to SMTP_AUTH_LOGIN_PASSWD to
+  better describe the state as the second part of an AUTH LOGIN command,
+  as well as for consistency with the imap and pop3 modules.
 
-- PKTSIZE might have been already defined in arpa/tftp.h
+- imap: Added support for SASL-IR extension (Part 1)
+  
+  Introduced detection of the SASL-IR capability, in order to add support
+  for sending the initial response with the AUTHENTICATE command, as per
+  RFC4959.
 
-Dan Fandrich (23 Jan 2010)
-- Include "curl_memory.h" to get the strdup replacement when necessary
+Daniel Stenberg (7 Feb 2013)
+- Revert "vc: remove explicit MSVC6 IDE project file and documentation"
+  
+  This reverts commit 0e66d5878edc3d7ffc445116d194b58bbc7504b9.
 
-Daniel Stenberg (22 Jan 2010)
-- wrap long lines and do some indent policing
+Steve Holme (7 Feb 2013)
+- imap: Changed response tag generation to be completely unique
+  
+  Updated the automatic response tag generation to follow the examples
+  given in RC3501, which list a 4 character string such as A001, A002,
+  etc.
+  
+  As a unique identifier should be generated for each command the string
+  generation is based on the connection id and the incrementing command
+  id.
 
-Yang Tse (22 Jan 2010)
-- Definitions of resolver specialty compile-time defines CURLRES_* moved
-  from hostip.h to setup.h in order to allow proper inclusion in any file.
+Dan Fandrich (6 Feb 2013)
+- Tweak the Android.mk file for its new location
   
-  This represents no functional change at all in which resolver is used,
-  everything still works as usual, internally and externally there is no
-  difference in behavior.
+  This is untested, but ought to be enough to still allow it
+  to work automatically when the entire curl source tree is
+  dropped into a full Android source tree.
 
-- adjust rtsp protocol support in curl-config and libcurl.pc when http is disabled
+Daniel Stenberg (6 Feb 2013)
+- vc: remove explicit MSVC6 IDE project file and documentation
+  
+  VC6 is _very_ old and we provide working makefiles even for that
+  compiler. Users who build with the IDE never use that method and project
+  file anyway and it was just lingering in the root dir.
 
-- deal with the possibility that CURL_DISABLE_RTSP may already be defined
+Steve Holme (6 Feb 2013)
+- imap: Small variable rename in preparation for upcoming change
+  
+  Renamed a couple of variables and updated some comments in
+  preparation for upcoming command id / response tag change.
 
-- fix compiler warning: statement is unreachable
+Daniel Stenberg (6 Feb 2013)
+- msvc: move Makefile.msvc.names into winbuild/
+  
+  In an attempt to clear up misc files from the root dir
 
-- fix compilation when http is disabled
+- build: move Android.mk to packages/Android/
 
-- disabling of rtsp when http isn't enabled required here for non-configure systems
+- emacs files: remove from git and dist
+  
+  We don't need them and I doubt many people used them. We also don't have
+  any configs for other editors and we wouldn't want that.
 
-Daniel Stenberg (22 Jan 2010)
-- wrap long lines, remove (very old) attribution from code
+Steve Holme (6 Feb 2013)
+- email: Moved starttls code in separate functions
+  
+  To help maintain the readability of the code in imap.c, pop3.c and
+  smtp.c moved the starttls code into state_starttls() functions.
 
-- cleanups by Julien Chaffraix
+- [Nick Zitzmann brought this change]
 
-- alphabetically sort the list of supported protocols
+  FEATURES: More NTLM and SSL changes, added two others, fixed typo
+  
+  Added IDN and HTTP data compression as they were left out of the
+  document until now.
+  
+  Added notes for qssl, schannel and Secure Transport supporting SSLv2,
+  Secure Transport supports NTLM, and axTLS does not support SSLv3.
+  
+  There was also a typo; "AUTH TSL" should be "AUTH TLS".
 
-- In spite claiming to tbe disabled by default, RTSP is enabled and it now
-  also says so. I also made the list of protocols get sorted.
+Kamil Dudka (6 Feb 2013)
+- curl-config.in: do not randomly mix tabs and spaces
 
-- expanded to provide info about the newer protocols too
+Daniel Stenberg (6 Feb 2013)
+- 7.29.1: onwards!
 
-- s/RTPFUNCTION/INTERLEAVEFUNCTION/
-  s/RTPDATA/INTERLEAVEDATA/
+- THANKS: 12 contributors from 7.29.0
 
-- keep lines shorter than 80 columns, and reduce/remove the use of the word
-  'note' in most description as it is mostly useless.
+Version 7.29.0 (6 Feb 2013)
 
-Yang Tse (22 Jan 2010)
-- Julien Chaffraix adjusted "<name> section" line length
+Daniel Stenberg (6 Feb 2013)
+- vms: config-vms.h is removed, no use trying to distribute it
 
-- Constantine Sapuntzakis refactoring of async callbacks, allowing
-  removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and
-  Curl_addrinfo4_callback()
+- RELEASE-NOTES: mention the SASL buffer overflow
 
-Dan Fandrich (21 Jan 2010)
-- Added rtsp.c to the non-configure target build files
+- [Eldar Zaitov brought this change]
 
-Yang Tse (21 Jan 2010)
-- fix compiler warning
+  Curl_sasl_create_digest_md5_message: fix buffer overflow
+  
+  When negotiating SASL DIGEST-MD5 authentication, the function
+  Curl_sasl_create_digest_md5_message() uses the data provided from the
+  server without doing the proper length checks and that data is then
+  appended to a local fixed-size buffer on the stack.
+  
+  This vulnerability can be exploited by someone who is in control of a
+  server that a libcurl based program is accessing with POP3, SMTP or
+  IMAP. For applications that accept user provided URLs, it is also
+  thinkable that a malicious user would feed an application with a URL to
+  a server hosting code targetting this flaw.
+  
+  Bug: http://curl.haxx.se/docs/adv_20130206.html
 
-- make tftp_translate_code() static, it is only used from within tftp.c
+Steve Holme (6 Feb 2013)
+- FEATURES: Removed erroneous whitespace
+  
+  Removed whitespace introduced in commit 5f8f20f5e65b that caused
+  formatting issues when generating the website docs.
 
-- fix warning triggered when debugging on cygwin
+Yang Tse (6 Feb 2013)
+- setup-vms.h: post VMS patch cleanup - III
+  
+  - rename post-config-vms.h to setup-vms.h
+  - move its inclusion into proper location in curl_setup.h
 
-- allow exporting of exe_ext() sub
+- vms_show: post VMS patch cleanup - II
+  
+  - remove multiple declarations of vms_show and add comments
 
-- improve displaylogcontent() sub fixing a warning
+- tool_main.c: post VMS patch cleanup - I
+  
+  - remove header inclusion already done in curl_setup_once.h
 
-Daniel Stenberg (21 Jan 2010)
-- remove typedef we ended up not using
+Steve Holme (6 Feb 2013)
+- FEATURES: Added SSPI to list of NTLM libraries
 
-- Chris Conroy brought support for RTSP transfers, and with it comes 8(!) new
-  libcurl options for controlling what to get and how to receive posssibly
-  interleaved RTP data. Initial commit.
+- FEATURES: Added Secure Transport and qssl to list of SSL libraries
 
-- Julien Chaffraix fixed line lengths
+- FEATURES: Added email feature set
+  
+  Added SMTP, SMTPS, POP3, POP3S, IMAP and IMAPS features.
 
-- Julien Chaffraix removed an old obsolete typedef
+- imap.h: Corrected incorrect comment clarification
+  
+  Corrected comment clarification made in commit 167717b8069a.
 
-- Yun Fu pointed out a flaw in the loop that checks handles, and I indented
-  the code more curl-style
+- COPYING: Updated copyright year to include 2013
 
-- "5.3 Sort outgoing cookies" removed, we now sort them
+Daniel Stenberg (5 Feb 2013)
+- RELEASE-NOTES: synced with 25f351424b3538
+  
+  8 more bug fixes mentioned
 
-Yang Tse (20 Jan 2010)
-- SIGTERM is the signal to trap here, SIGKILL can't be caught.
+- [John E. Malmberg brought this change]
 
-- Use killsockfilters() to kill sockfilter processes, this ensures that when
-  killing a sockfilter process the actual PID from the pid file is used and
-  not the one returned by open2() which might be different.
+  VMS: fix and generate the VMS build config
+  
+  config_h.com is a new file that generates a config.h file based on the
+  curl_config.h.in file and a quick scan of the configure script.  This is
+  actually a generic procedure that is shared with other VMS packages.
+  
+  The existing pre-built config-vms.h had over 100 entries that were not
+  correct and in some cases conflicted with the build options available in
+  the build_vms.com.
+  
+  generate_config_vms_h_curl.com is a helper procedure to the
+  config_h.com.  It covers the cases that the generic config_h.com is not
+  able to figure out, and accepts input from the build_vms.com procedure.
+  
+  build_curlbuild_h.com is a new file to generate the curlbuild.h file
+  that Curl is now using when it is using a curl_config.h file.
+  
+  post-config-vms.h is a new file that is needed to provide VMS specific
+  definitions, and most of them need to be set before the system header
+  files are included.
+  
+  The VMS build procedure is fixed:
+  
+     1. Fixed to link in the correct HP ssl library.
+     2. Fixed to detect if HP Kerberos is installed.
+     3. Fixed to detect if HP LDAP is installed.
+     4. Fixed to detect if gnv$libzshr is installed.
+     5. Simplified the input parameter parsing to not use a loop.
+     6. Warn that 64 bit pointer option support is not complete
+        in comments.
+     7. Default to IEEE floating if platform supports it so
+        resulting libcurl will be compatible with other
+        open source projects on VMS.
+     8. Default to LARGEFILE if platform supports it.
+     9. Default to enable SSL, LDAP, Kerberos, libz
+        if the libraries are present.
+     10. Build with exact case global symbols for libcurl.
+     11. Generate linker option file needed.
+     12. Compiler list option only commonly needed items.
+     13. fulllist option for those who really want it.
+     14. Create debug symbol file on Alpha, IA64.
 
-- Allow killsockfilters() to take a 5th optional parameter that when provided
-  indicates that only one of the two possible sockfilter processes should be
-  killed.  Valid values for this parameter are 'main' and 'data'.
+- Curl_proxyCONNECT: return once CONNECT is sent
+  
+  By doing this unconditionally, we infer a simpler and more defined
+  behavior. This also has the upside that test 1021 no longer fails for me
+  even if I run with valgrind.
+  
+  Also fixed some wrong comments.
 
-- Use delete() to unset environment variables instead of assigning undef which
-  generates warning 'Use of uninitialized value in scalar assignment' with perl
-  versions older than 5.10
+Steve Holme (5 Feb 2013)
+- email: Reworked comments in the endofresp() functions
+  
+  Tidied up the comments in the endofresp() functions to be more
+  meaningful prior to release.
 
-- Adjust valgrind logs file name detection.
+Marc Hoersken (5 Feb 2013)
+- schannel: Removed extended error connection setup flag
   
-  Adjust environment vars setting and restoring from test definition.
+  According KB975858 this flag may cause problems on Windows 7 and
+  Windows Server 2008 R2 systems. Extended error information is not
+  currently used by libcurl and therefore not a requirement.
   
-  Avoid using strftime in torture sub.
+  The flag may improve the SSL-connection shutdown in case of an
+  error. This means it might be a good improvement in the future.
+  
+  Fixes bug/issue #1187 - thanks for the report
 
-Daniel Stenberg (20 Jan 2010)
-- modified test case 8 to also make sure that we deal with cookies using
-  identical names but different paths properly
+Daniel Stenberg (5 Feb 2013)
+- [Tor Arntsen brought this change]
 
-- - As was pointed out on the http-state mailing list, the order of cookies in a
-    HTTP Cookie: header _needs_ to be sorted on the path length in the cases
-    where two cookies using the same name are set more than once using
-    (overlapping) paths. Realizing this, identically named cookies must be
-    sorted correctly. But detecting only identically named cookies and take care
-    of them individually is harder than just to blindly and unconditionally sort
-    all cookies based on their path lengths. All major browsers also already do
-    this, so this makes our behavior one step closer to them in the cookie area.
+  singleipconnect: Update *sockp for all CURLE_OK
   
-    Test case 8 was the only one that broke due to this change and I updated it
-    accordingly.
+  The 56b7c87c7 change left a case where a good sockfd was not copied to
+  *sockp before returning with CURLE_OK
 
-- oops, I forgot to cvs add this before my previous commit (Dan Fandrich
-  pointed it out to me)
+- curl_easy_perform: Value stored to 'mcode' is never read
+  
+  pointed out by clang-analyzer
 
-- - David McCreedy brought a fix and a new test case (129) to make libcurl work
-    again when downloading files over FTP using ASCII and it turns out that the
-    final size of the file is not the same as the initial size the server
-    reported. This is very common since servers don't take the newline
-    conversions into account.
+- singleipconnect: remove dead assignment
+  
+  pointed out by clang-analyzer
 
-- "260 - IMAP, POP3 and SMTP support" done!
+Linus Nielsen Feltzing (5 Feb 2013)
+- CURLMOPT_MAXCONNECTS: restore functionality
+  
+  When a connection is no longer used, it is kept in the cache. If the
+  cache is full, the oldest idle connection is closed. If no connection is
+  idle, the current one is closed instead.
 
-- avoid "Use of uninitialized value $l in concatenation"
+Steve Holme (5 Feb 2013)
+- RELEASE-NOTES: Updated following recent changes to the email protocols
+  
+  Added recent additions and fixes following the changes to imap, pop3
+  and smtp. Additionally added another contributor that helped to test
+  the imap sasl changes.
 
-Yang Tse (19 Jan 2010)
-- Fail harder when curl coredumps trying to verify http and ftp servers.
+- email: Provided extra comments following recent pop3/imap fixes
   
-  Add some debug messages to see what's going on with valgrind logs.
+  Provided additional clarification about the logic of the authenticate()
+  functions following commit 6b6bdc83bd36 and b4270a9af1d0.
 
-- prevent %runcert hash growth when clearing items
+Daniel Stenberg (5 Feb 2013)
+- [Andrei Kurushin brought this change]
 
-- update copyright year notice
+  winbuild: include version info for .dll .exe
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1186
 
-- Constantine Sapuntzakis enhancements to make memory tracking log file writing
-  of messages atomic, on systems where an fwrite of a memory buffer is atomic.
+- FAQ: clarify 5.13 How do I stop an ongoing transfer
+  
+  Rich Gray provided good feedback and we now clarify that you can in fact
+  stop a multi transfer at any point you like by removing the easy handle.
 
-Dan Fandrich (18 Jan 2010)
-- Added PEM certificate keyword
+- [Matt Arsenault brought this change]
 
-Yang Tse (18 Jan 2010)
-- fix warnings
+  cmake: Fix mingw build
 
-- Stop ssl running server when cert file currently used by server is
-  different than the one specified in test definition for same server
+- [Sergei Nikulov brought this change]
 
-- fix warnings
+  cmake: updated OpenSSL build
 
-- - Remove QD restarting of https servers. Proper fixing required.
-    This will make tests 310 311 and 312 fail while fixing.
+Steve Holme (4 Feb 2013)
+- pop3.c: Updated variable names to use shorter / more readable variant
   
-  - Remove some debug messages
+  Tidied up code from commit 6b6bdc83bdUpdated where a few instances of
+  the pop3c struct variable used the longer conndata struct rather than
+  matching what other code in pop3_authenticate() used.
 
-- make verifyhttp use different file names depending on server characteristics
+Guenter Knauf (4 Feb 2013)
+- updated copyright years.
 
-- add serverfactors() sub which returns server characterization factors
+- configure: update the copyright years for the output.
 
-- fix warnings
-
-- fix warnings
+Steve Holme (3 Feb 2013)
+- imap: Fixed no known authentication mechanism when fallback is required
+  
+  Fixed an issue where (lib)curl is compiled without support for a
+  supported challenge-response based SASL authentication mechanism, such
+  as CRAM-MD5 or NTLM, the server doesn't support the LOGIN or PLAIN
+  mechanisms and (lib)curl doesn't fallback to Clear Text authentication.
+  
+  Note: In order to fallback to Clear Text authentication properly this
+  fix adds support for the LOGINDISABLED server capability.
+  imap: Fixed no known authentication mechanism when fallback is required
+  
+  Fixed an issue where (lib)curl is compiled without support for a
+  supported challenge-response based SASL authentication mechanism, such
+  as CRAM-MD5 or NTLM, the server doesn't support the LOGIN or PLAIN
+  mechanisms and (lib)curl doesn't fallback to Clear Text authentication.
+  
+  Note: In order to fallback to Clear Text authentication properly this
+  fix adds support for the LOGINDISABLED server capability.
+  
+  Related bug: http://curl.haxx.se/mail/lib-2013-02/0004.html
+  Reported by: Stanislav Ivochkin
 
-- fix warnings
+- pop3: Fixed no known authentication mechanism when fallback is required
+  
+  Fixed an issue where (lib)curl is compiled without support for a
+  supported challenge-response based SASL authentication mechanism, such
+  as CRAM-MD5 or NTLM, the server doesn't support the LOGIN or PLAIN
+  mechanisms and (lib)curl doesn't fallback to APOP or Clear Text
+  authentication.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-02/0004.html
+  Reported by: Stanislav Ivochkin
 
-- add some debug messages
+Daniel Stenberg (1 Feb 2013)
+- singleipconnect: simplify and clean up
+  
+  Remove timeout argument that's never used.
+  
+  Make the actual connection get detected on a single spot to reduce code
+  duplication.
+  
+  Store the IPv6 state already when the connection is attempted.
 
-- use servername_id() from serverhelp.pm
+- Curl_perfom: removed
+  
+  Curl_perfom is no longer used anywhere since the always-multi commit
+  c43127414d89ccb9, and some related functions were used only from within
+  Curl_perfom.
 
-- refactored stopping of test harness servers
+Guenter Knauf (30 Jan 2013)
+- Updated date.
 
-- Store now this file in CVS with unix line endings.
+Yang Tse (30 Jan 2013)
+- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
   
-  maketgz already converts this file to DOS style with an awk filter.
+  - Fix a pair of single quotes to double quotes.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0355.html
+  Reported by: Tor Arntsen
 
-- Declaration of $sshdlog is done in sshhelp.pm
+- zz40-xc-ovr.m4: fix 'wc' detection - follow-up
+  
+  - Take into account that 'wc' may return leading spaces and/or tabs.
+  
+  - Set initial IFS to space, tab and newline.
 
-- Start using the centralized pidfile and logfile name generation
-  subroutines for ssh and socks test suite servers.
+- zz40-xc-ovr.m4: fix 'wc' detection
+  
+  - Take into account that 'wc' may return leading spaces.
+  
+  - Set internationalization behavior variables.
+  
+  Tor Arntsen analyzed and reported the issue.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
 
-Dan Fandrich (15 Jan 2010)
-- Added the new protocol source files to the non-autoconf build files
+- zz40-xc-ovr.m4: check another three basic utilities
 
-Yang Tse (14 Jan 2010)
-- Squeeze slack time when killing more than one server from
-  the <killserver> section of test harness definition files.
+Guenter Knauf (29 Jan 2013)
+- Fixed debug.c to work again unchanged.
+  
+  Added CURLOPT_FOLLOWLOCATION since example.com is now redirected.
 
-Kamil Dudka (14 Jan 2010)
-- - Suppressed side effect of OpenSSL configure checks, which prevented NSS from
-    being properly detected under certain circumstances. It had been caused by
-    strange behavior of pkg-config when handling PKG_CONFIG_LIBDIR. pkg-config
-    distinguishes among empty and non-existent environment variable in that case.
+Daniel Stenberg (29 Jan 2013)
+- [Nick Zitzmann brought this change]
 
-Yang Tse (13 Jan 2010)
-- Give the test a bit mote time to run so it passes on slow machines
+  darwinssl: Fix bug where packets were sometimes transmitted twice
+  
+  There was a bug where, if SSLWrite() returned errSSLWouldBlock but did
+  succeed in transmitting at least something, then we'd incorrectly
+  resend the packet. Now we never take errSSLWouldBlock as a sign that
+  nothing was transferred to/from the server.
+  
+  Bug: http://curl.haxx.se/mail/lib-2013-01/0295.html
+  Reported by: Bruno de Carvalho
+
+- [Nick Zitzmann brought this change]
+
+  FAQ: "Darwinssl" is AKA "Secure Transport" and supports NTLM
+
+- RELEASE-NOTES: only list Nick once
+  
+  Even though he's a fine dude, once is enough for this time!
+
+Yang Tse (28 Jan 2013)
+- zz40-xc-ovr.m4: 1.0 interface stabilization
+  
+  - Stabilization results in 4 public interface m4 macros:
+    XC_CONFIGURE_PREAMBLE
+    XC_CONFIGURE_PREAMBLE_VER_MAJOR
+    XC_CONFIGURE_PREAMBLE_VER_MINOR
+    XC_CHECK_PATH_SEPARATOR
+  - Avoid one level of internal indirection
+  - Update comments
+  - Drop XC_OVR_ZZ40 macro
+
+Kamil Dudka (28 Jan 2013)
+- docs: fix typos in man pages
+  
+  Reported by: Jiri Jaburek
+  Bug: https://bugzilla.redhat.com/896544
+
+- docs: update the comments about loading CA certs with NSS
+  
+  Bug: https://bugzilla.redhat.com/696783
+
+Guenter Knauf (28 Jan 2013)
+- Updated dependency libs.
+
+- Fixed simple.c to work again unchanged.
+  
+  Added CURLOPT_FOLLOWLOCATION since example.com is now redirected.
+
+Steve Holme (27 Jan 2013)
+- smtp.c: Fixed unnecessary state change if starttls fails
+  
+  The state machine should only be changed to SMTP_STARTTLS when the
+  STARTTLS command has been successfully sent to the server.
+
+- pop3.c: Fixed unnecessary state change if starttls fails
+  
+  The state machine should only be changed to POP3_STARTTLS when the
+  STLS command has been successfully sent to the server.
+
+- imap.c: Fixed unnecessary state change if starttls fails
+  
+  The state machine should only be changed to IMAP_STARTTLS when the
+  STARTTLS command has been successfully sent to the server.
+
+- email: Updated comment regarding ssldone usage
+  
+  Updated the ssldone comment as multi mode is always used internally now.
+
+Yang Tse (26 Jan 2013)
+- zz40-xc-ovr.m4: emit witness message in configure BODY
+  
+  This avoids witness message in output when running configure --help,
+  while sending the message to config.log for other configure runs.
+
+Steve Holme (25 Jan 2013)
+- smtp.c: Added comments to smtp_endofresp()
+  
+  Minor code tidy up to add comments similar to those used in the pop3
+  and imap end of resp functions, in order to assist anyone reading the
+  code and highlight the similarities between each of these protocols.
+
+Yang Tse (25 Jan 2013)
+- zz40-xc-ovr.m4: truly do version conditional overriding
+  
+  - version conditional overriding
+  - catch unexpanded XC macros
+  - fix double words in comments
+
+- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
+  
+  Tor Arntsen analyzed and reported the issue.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
+
+- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
 
-Kamil Dudka (13 Jan 2010)
-- remove trailing spaces from configure.ac
+- zz40-xc-ovr.m4: avoid double single-quote usage
+
+- zz40-xc-ovr.m4: parentheses balancing of 'case' statements
+  
+  m4 quadrigraph shell comment technique allows proper autoconf
+  parentheses balancing in shell 'case' statements. The presence
+  of unbalanced parentheses may otherwise trigger expansion bugs.
+
+Steve Holme (24 Jan 2013)
+- smtp.c: Corrected RFC references
+  
+  The most recent version of the SMTP RFC is RFC5321 and not RFC2821 as
+  previously documented.
+  
+  Added RFC1870 and re-ordered list numerically.
+
+- smtp.c: Fixed failure detection during TLS upgrade
+  
+  smtp_state_upgrade_tls() would attempt to incorrectly complete the
+  upgrade to smtps and start the EHLO command if
+  Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
+  was set to TRUE. This would only happen when a non-blocking API hadn't
+  been provided by the SSL implementation and curlssl_connect() was
+  called underneath.
+
+- pop3.c: Fixed failure detection during TLS upgrade
+  
+  pop3_state_upgrade_tls() would attempt to incorrectly complete the
+  upgrade to pop3s and start the CAPA command if
+  Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
+  was set to TRUE. This would only happen when a non-blocking API hadn't
+  been provided by the SSL implementation and curlssl_connect() was
+  called underneath.
+
+- imap.c: Fixed failure detection during TLS upgrade
+  
+  imap_state_upgrade_tls() would attempt to incorrectly complete the
+  upgrade to imaps and start the CAPABILITY command if
+  Curl_ssl_connect_nonblocking() returned a failure code and if ssldone
+  was set to TRUE. This would only happen when a non-blocking API hadn't
+  been provided by the SSL implementation and curlssl_connect() was
+  called underneath.
+
+Yang Tse (24 Jan 2013)
+- zz40-xc-ovr.m4: internals overhauling
+  
+  - Update comments
+  - Execute commands in subshells
+  - Faster path separator check
+  - Fix missing 'test' command
+  - Rename private macros
+  - Minimize AC_REQUIRE usage
+
+Steve Holme (23 Jan 2013)
+- email: Removed unnecessary return statements
+  
+  Small tidy up to remove unnecessary return statements prior to the next
+  fix.
+
+Yang Tse (23 Jan 2013)
+- zz40-xc-ovr.m4: redirect errors and warnings to stderr
+
+- zz40-xc-ovr.m4: AC_REQUIRE also XC_CONFIGURE_PREAMBLE success message
+
+- zz60-xc-ovr.m4: tighten XC_OVR_ZZ60 macro placement requirements
+
+- configure: use XC_CONFIGURE_PREAMBLE early checks
+  
+  Some basic checks we make were placed early enough in generated
+  configure script when using autoconf 2.5X versions. Newer autoconf
+  versions expand these checks much further into the configure script,
+  rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement
+  of early intended checks across all our autoconf supported versions.
+
+- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
+
+Daniel Stenberg (23 Jan 2013)
+- FAQ: update the SSL lib list and wording in question 2.2
+
+Steve Holme (22 Jan 2013)
+- curl_sasl.c: Corrected references to RFC
+  
+  The most recent version of the RFC is RFC4422 and not RFC2222 as
+  previously documented.
+
+- email: Corrected references to SASL RFC
+  
+  The most recent version of the SASL RFC is RFC4422 and not RFC2222 as
+  previously documented.
+
+Daniel Stenberg (22 Jan 2013)
+- [Ulion brought this change]
+
+  formpost: support quotes, commas and semicolon in file names
+  
+  - document the double-quote and backslash need be escaped if quoting.
+  - libcurl formdata escape double-quote in filename by backslash.
+  - curl formparse can parse filename both contains '"' and ',' or ';'.
+  - curl now can uploading file with ',' or ';' in filename.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1171
+
+- memanalyze.pl: handle fopen() of file names with quotes
+
+Yang Tse (21 Jan 2013)
+- xc-cc-check.m4: re-evaluate exporting and AC_SUBST'ing vars
+  
+  Notes:
+  
+  When running a configure script that has nested packages (for example
+  libcurl's configure with --enable-ares and c-ares sources embedded in
+  curl tree) and AC_CONFIG_SUBDIRS([nested-subdir]) machinery is used to
+  automatically run the nested configure script from within the parent
+  configure script, it happens that the nested _shell_ script will
+  inherit shell variables exported from the parent _shell_ script.
+  
+  If for example parent configure script sets and exports LDFLAGS and LIBS
+  variables with proper values in order to link either a parent library or
+  program with a library which will be configured and built by a nested
+  package; It will happen that when the nested configure script runs, the
+  nested library does not exist yet and _any_ link-test done in the nested
+  configure will fail, such as those that autoconf macros perform in order
+  to detect existing compiler and its characteristics, the result is that
+  the nested configure script will fail with errors such as:
+  
+  configure: error: C compiler cannot create executables
+  
+  For now, we no longer export variables previously exported here.
+  
+  On the other hand, AC_SUBST'ing them is appropriate and even with nested
+  packages each package's config.status gets its own package values.
+  
+  So we reinstate AC_SUBST'ing previously AC_SUBST'ed variables.
+
+Daniel Stenberg (21 Jan 2013)
+- FAQ: 3.22 curl -X gives me HTTP problems
+
+Yang Tse (21 Jan 2013)
+- xc-cc-check.m4: avoid recursive package automake'ing breakage
+
+- xc-cc-check.m4: mark earlier variables that are to be exported
+
+- configure: autotools compatibility fixes - step I
+  
+  Fix proper macro expansion order across autotools versions for
+  C compiler and preprocessor program checks.
+
+Steve Holme (20 Jan 2013)
+- pop3.c: Fixed conditional compilation of the apop response function
+  
+  Extended the fix from commit 8b15c84ea91e to additionally exclude
+  pop3_state_apop_resp() if the CURL_DISABLE_CRYPTO_AUTH flag is
+  defined.
+
+Yang Tse (20 Jan 2013)
+- Makefile.inc: fix $(top_srcdir) not allowed in _SOURCES variables
+
+Daniel Stenberg (19 Jan 2013)
+- formadd: reject trying to read a directory where a file is expected
+  
+  Bug: http://curl.haxx.se/mail/archive-2013-01/0017.html
+  Reported by: Ulrich Doehner
+
+- curl_easy_send.3: document return codes
+  
+  Reported by: Craig Davison
+  Bug: http://curl.haxx.se/mail/lib-2013-01/0234.html
+
+- curl_easy_recv.3: document return codes
+  
+  Reported by: Craig Davison
+  Bug: http://curl.haxx.se/mail/lib-2013-01/0234.html
 
-Yang Tse (12 Jan 2010)
-- Added test case #1112 which does an FTPS download with strict timeout
-  and slow data transfer in a similar way as test case #1086 does for FTP.
+Steve Holme (19 Jan 2013)
+- email: General code tidy up
+  
+  Corrected some function argument definitions to maximize the 80
+  character line length limit and be in keeping with the curl
+  coding style.
+
+- pop3.c: Fixed a problem with pop3s connections not connecting properly
+  
+  Fixed an issue where Curl_ssl_connect_nonblocking() wouldn't complete
+  correctly and the ssldone flag wouldn't be set to true for pop3s based
+  connections.
+  
+  Bug introduced in commit: 4ffb8a6398ed.
+
+Daniel Stenberg (18 Jan 2013)
+- RELEASE-NOTES: add references to several bugfixes+changes
+
+Steve Holme (18 Jan 2013)
+- RELEASE-NOTES: Added missing imap fix
+  
+  Added missing imap fix as per commit 709b3506cd9b.
+
+Yang Tse (18 Jan 2013)
+- runtests.pl: make VPATH builds find valgrind.supp
+
+Daniel Stenberg (18 Jan 2013)
+- RELEASE-NOTES: synced with c43127414d89
+
+- always-multi: always use non-blocking internals
+  
+  Remove internal separated behavior of the easy vs multi intercace.
+  curl_easy_perform() is now using the multi interface itself.
+  
+  Several minor multi interface quirks and bugs have been fixed in the
+  process.
+  
+  Much help with debugging this has been provided by: Yang Tse
+
+Yang Tse (17 Jan 2013)
+- url.c: fix HTTP CONNECT tunnel establishment upon delayed response
+  
+  Fixes initial proxy response being processed by the tunneled protocol
+  handler instead of the HTTP wrapper handler. This issue would trigger
+  upon delayed CONNECT response from the proxy.
+  
+  Additionally fixes a multi interface code-path in which connections
+  would not time out properly.
+  
+  This does not fix known bug #39.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0191.html
+
+Daniel Stenberg (16 Jan 2013)
+- [Yves Arrouye brought this change]
+
+  --libcurl: fix for non-zero default options
+  
+  If the default value for an option taking a long as its value is non
+  zero, and it is set by zero by a command line option, then that command
+  line option is not reflected in --libcurl's output. This is because line
+  520-521 of tool_setopt.c look like:
+  
+  if(!lval)
+      skip = TRUE;
+  
+  An example of a command-line option doing so is the -k option that sets
+  CURLOPT_SLL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST to 0L, when the
+  defaults are non-zero.
+
+- FTP: reject illegal port numbers in EPSV 229 responses
+
+Yang Tse (15 Jan 2013)
+- commit bc682cbd follow-up
+
+- build: use per-target '_CPPFLAGS' for those currently using default
+  
+  Automake documents that doing this will make it choose a different name
+  for intermediate object files even when sharing source files across
+  targets of same Makefile.am.
+  
+  Up to automake 1.13.1 target's intermediate object files were placed
+  in the build subdirectory of the target. We depended on this, probably
+  undocumented behavior, to achieve same behavior as if a per-target flag
+  had been specified when building targets that actually belong to
+  different Makefile.am files.
+  
+  It seems automake 1.13.2 is going to break behavior mentioned above.
+  
+  So, lets use a documented behavior in order to achieve same purpose,
+  across automake versions, no matter where automake wishes to place
+  intermediate object files.
+  
+  Our build targets that already were using a per-target '_CFLAGS' or
+  '_CPPFLAGS' need no 'fixing', these were already 'fixed'. The only
+  Makefile.am or Makefile.in files in libcurl's source tree touched by
+  this 'fix' are tests/libtest/Makefile.inc and tests/unit/Makefile.inc.
+
+- tests/libtest/Makefile.inc: sort build targets
+
+- tests/Makefile.am: remove wildcard usage in EXTRA_DIST
+
+Kamil Dudka (15 Jan 2013)
+- nss: fix error messages for CURLE_SSL_{CACERT,CRL}_BADFILE
+  
+  Do not use the error messages from NSS for errors not occurring in NSS.
+
+Steve Holme (14 Jan 2013)
+- TODO: Updated following IMAP SASL additions
+
+Yang Tse (14 Jan 2013)
+- configure: fix automake 1.13 compatibility
+  
+  Tested with:
+  
+  buildconf: autoconf version 2.69
+  buildconf: autom4te version 2.69
+  buildconf: autoheader version 2.69
+  buildconf: automake version 1.13.1
+  buildconf: aclocal version 1.13.1
+  buildconf: libtool version 2.4
+  buildconf: GNU m4 version 1.4.16
+
+Daniel Stenberg (13 Jan 2013)
+- BUGS: update bug tracker URL
+  
+  ... and refresh number of lines of code
+
+- Curl_resolver_getsock: fix the function description comment
+  
+  It referred to it by the wrong name and said it returned the wrong value.
+  
+  Reported by: Gisle Vanem
+
+Kamil Dudka (11 Jan 2013)
+- nss: clear session cache if a client cert from file is used
+  
+  This commit fixes a regression introduced in 052a08ff.
+  
+  NSS caches certs/keys returned by the SSL_GetClientAuthDataHook callback
+  and if we connect second time to the same server, the cached cert/key
+  pair is used.  If we use multiple client certificates for different
+  paths on the same server, we need to clear the session cache to force
+  NSS to call the hook again.  The commit 052a08ff prevented the session
+  cache from being cleared if a client certificate from file was used.
+  
+  The condition is now fixed to cover both cases: consssl->client_nickname
+  is not NULL if a client certificate from the NSS database is used and
+  connssl->obj_clicert is not NULL if a client certificate from file is
+  used.
+  
+  Review by: Kai Engert
+
+Yang Tse (11 Jan 2013)
+- sockfilt.c: log file descriptor number on read/write error
+
+- [Gisle Vanem brought this change]
+
+  packages/DOS/common.dj: remove COFF debug info generation
+  
+  gcc on DOS hasn't really supported COFF-debug (-gcoff) on djgpp for a
+  long time.
+  
+  "Sounds like the COFF debug info generation has bit-rotted in GCC.
+   Nothing new here, no other platform uses COFF AFAIK."
+  
+  So lets drop it too.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0130.html
+
+- curl: ignore SIGPIPE - compilation fix - follow-up
+
+- test servers: handle W32/W64 SIGBREAK with exit_signal_handler
+
+- test servers: fix errno, ERRNO and SOCKERRNO usage for W32/W64
+
+- sockfilt.c: fix some W64 compiler warnings
+
+Daniel Stenberg (9 Jan 2013)
+- [Nick Zitzmann brought this change]
+
+  docs: the --with-darwinssl option is available on Apple OSes
+
+Yang Tse (9 Jan 2013)
+- curl: ignore SIGPIPE - compilation fix
+
+- build: fix circular header inclusion with other packages
+  
+  This commit renames lib/setup.h to lib/curl_setup.h and
+  renames lib/setup_once.h to lib/curl_setup_once.h.
+  
+  Removes the need and usage of a header inclusion guard foreign
+  to libcurl. [1]
+  
+  Removes the need and presence of an alarming notice we carried
+  in old setup_once.h [2]
+  
+  ----------------------------------------
+  
+  1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard
+      up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H,
+      this single inclusion guard is enough to ensure that inclusion of
+      lib/setup_once.h done from lib/setup.h is only done once.
+  
+      Additionally lib/setup.h has always used __SETUP_ONCE_H macro to
+      protect inclusion of setup_once.h even after commit ec691ca3, this
+      was to avoid a circular header inclusion triggered when building a
+      c-ares enabled version with c-ares sources available which also has
+      a setup_once.h header. Commit ec691ca3 exposes the real nature of
+      __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard
+      foreign to libcurl belonging to c-ares's setup_once.h
+  
+      The renaming this commit does, fixes the circular header inclusion,
+      and as such removes the need and usage of a header inclusion guard
+      foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl.
+  
+  2 - Due to the circular interdependency of old lib/setup_once.h and the
+      c-ares setup_once.h header, old file lib/setup_once.h has carried
+      back from 2006 up to now days an alarming and prominent notice about
+      the need of keeping libcurl's and c-ares's setup_once.h in sync.
+  
+      Given that this commit fixes the circular interdependency, the need
+      and presence of mentioned notice is removed.
+  
+      All mentioned interdependencies come back from now old days when
+      the c-ares project lived inside a curl subdirectory. This commit
+      removes last traces of such fact.
+
+Daniel Stenberg (8 Jan 2013)
+- curl: ignore SIGPIPE
+  
+  This is a work-around for bug #1180 which is really libcurl's inability
+  to ignore SIGPIPE in a few cases. With this work-around at least curl
+  won't suffer from it!
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1180
+  Reported by: Lluís Batlle i Rossell
+
+Yang Tse (8 Jan 2013)
+- sockfilt.c: fix some compiler warnings
+
+Daniel Stenberg (8 Jan 2013)
+- Revert "configure: update req to 2.59"
+  
+  This reverts commit 7a6d8b1b1a8fcc184c36d6b6e741e32250b4bacb.
+  
+  URL: http://curl.haxx.se/mail/lib-2013-01/0103.html
+
+Steve Holme (8 Jan 2013)
+- pop3: Added support for non-blocking SSL upgrade
+  
+  Added support for asynchronous SSL upgrade when using the
+  multi-interface.
+
+Daniel Stenberg (8 Jan 2013)
+- configure: update req to 2.59
+  
+  I ran the 2.59 version of autoupdate that updates obsoleted configure.ac
+  constructs to the 2.59 standard. With a little hands-on fiddling I
+  prevented it from ruining the quoting in AS_HELP_STRING() uses.
+  
+  I subsequently also bumped the required autoconf version to 2.59
+  (released in December 2003) as I don't have an older autoconf version
+  around to test with and I can't be bothered to install one either...
   
-  This also exercises <killserver> section for the FTPS server.
+  Inspired by: Björn Stenberg
+  Related blog post: http://cazfi.livejournal.com/195108.html
 
-- Make runtests.pl actually support any (valid) server specification
-  for the <killserver> section of test harness definition files.
+Steve Holme (7 Jan 2013)
+- imap.c: Small tidy up to add missing comment
 
-- Fix tftp and sftp supported protocols in servername_str()
+- imap: Added support for sasl digest-md5 authentication
 
-- Make sockfilter kill messages look alike server ones
+- imap: Added support for sasl cram-md5 authentication
+
+Marc Hoersken (7 Jan 2013)
+- tests/server/sockfilt.c: Fixed integer comparison warning
+
+- tests/server/sockfilt.c: Include required Win32 headers
+
+Steve Holme (7 Jan 2013)
+- imap: Added support for sasl ntlm authentication
+
+- imap: Added support for sasl login authentication
+
+- pop3.c: Fixed default authentication detection
+  
+  Fixed an issue where a server may positively respond to the CAPA command
+  but not list clear text as a valid authentication type.
+
+- curl_sasl.c: Small code tidy up following imap changes
+
+- smtp.c: Small code tidy up following imap changes
+
+- pop3.c: Small code tidy up following imap changes
+
+- imap: Added support for sasl plain text authentication
+
+Marc Hoersken (6 Jan 2013)
+- tests/server/sockfilt.c: Fixed support for listening sockets
+  
+  This commit fixes support for sockets that are ready to accept
+  a new connection and have previously been put into listening mode.
+  
+  It also includes changes which are the result of investigation
+  regarding Windows STDIN. These changes are the preparation for further
+  improvements regarding support for reading data from STDIN on Windows.
+  
+  Open issue: WaitForMultipleObjectsEx does not support PIPE handles
+  which are returned by GetStdHandle while running without a GUI.
+
+- tests/server/sockfilt.c: Set Windows Console to binary mode
+
+- tests/server/sockfilt.c: Improved log error messages
+  
+  Include error code and parameters in error messages.
+
+Steve Holme (6 Jan 2013)
+- imap: Introduced the continue response in imap_endofresp()
+
+- imap: Added support for SASL based authentication mechanism detection
+  
+  Added support for detecting the supported SASL authentication mechanisms
+  via the CAPABILITY command.
+
+Yang Tse (6 Jan 2013)
+- Revert changes relative to lib/*.[ch] recent renaming
+  
+  This reverts renaming and usage of lib/*.h header files done
+  28-12-2012, reverting 2 commits:
+  
+    f871de0... build: make use of 76 lib/*.h renamed files
+    ffd8e12... build: rename 76 lib/*.h files
+  
+  This also reverts removal of redundant include guard (redundant thanks
+  to changes in above commits) done 2-12-2013, reverting 1 commit:
+  
+    c087374... curl_setup.h: remove redundant include guard
+  
+  This also reverts renaming and usage of lib/*.c source files done
+  3-12-2013, reverting 3 commits:
+  
+    13606bb... build: make use of 93 lib/*.c renamed files
+    5b6e792... build: rename 93 lib/*.c files
+    7d83dff... build: commit 13606bbfde follow-up 1
+  
+  Start of related discussion thread:
+  
+    http://curl.haxx.se/mail/lib-2013-01/0012.html
+  
+  Asking for confirmation on pushing this revertion commit:
+  
+    http://curl.haxx.se/mail/lib-2013-01/0048.html
+  
+  Confirmation summary:
+  
+    http://curl.haxx.se/mail/lib-2013-01/0079.html
+  
+  NOTICE: The list of 2 files that have been modified by other
+  intermixed commits, while renamed, and also by at least one
+  of the 6 commits this one reverts follows below. These 2 files
+  will exhibit a hole in history unless git's '--follow' option
+  is used when viewing logs.
+  
+    lib/curl_imap.h
+    lib/curl_smtp.h
+
+Daniel Stenberg (6 Jan 2013)
+- mk-ca-bundle.1: convert syntax to what's used elsewhere
+  
+  ... mostly to make sure roffit works better on it, but also to make our
+  man pages use a more unified style.
+
+- mk-ca-bundle.1: mention new -f, fix outputfile output
+  
+  also edited a few sentences to become more verbose
+
+- mk-ca-bundle: add -f, support passing to stdout and more
+  
+  1. When the downloaded data file from Mozilla is current, but the output
+  bundle does not exist: continue processing to create the bundle.  The
+  goal is to have the output file - not just download the latest input.
+  
+  2. added -f option to force re-processing the file.  Useful for
+  debugging/testing the process.
+  
+  3. added support for output to '-' (stdout), allowing the output to be
+  piped.
+  
+  4. All progress and error messages go to STDERR rather than STDOUT (3)
+  
+  5. The script opened and closed the output file many times
+  unnecessarily.  It now opens it once, does the output and closes it.
+  
+  6. Backup of the input files happens after successful processing, not
+  before.
+  
+  7. The output is written to a temporary file, and renamed to the
+  requested name after backup - this greatly reduces the window where the
+  file can be seen partially written.
+  
+  8. all die calls have a \n at the end to suppress perl's traceback - the
+  traceback isn't useful to end users.
+  
+  Patch: http://curl.haxx.se/mail/lib-2013-01/0045.html
+
+Yang Tse (5 Jan 2013)
+- imap test server: fix typo in name of SELECT_imap() sub definition
+  
+  IMAP test server breaking typo introduced with commit b708a522a1
+
+Steve Holme (4 Jan 2013)
+- imap test server: Added support for the CAPABILITY command
+  
+  Added support for the CAPABILITY command in preparation of upcoming
+  changes.
+
+Daniel Stenberg (3 Jan 2013)
+- writeout: -w now supports remote_ip/port and local_ip/port
+  
+  Added mention to the curl.1 man page.
+  
+  Test case 1223 verifies remote_ip/port.
+
+Yang Tse (3 Jan 2013)
+- test 1222: 8 chars object name generation  &&  test 1221: adjustments
+
+Daniel Stenberg (3 Jan 2013)
+- INTERNALS: remove "footnote" never used
+
+Yang Tse (3 Jan 2013)
+- build: commit 13606bbfde follow-up 1
+
+Daniel Stenberg (3 Jan 2013)
+- FAQ: Can I write a server with libcurl?
+
+Yang Tse (3 Jan 2013)
+- build: rename 93 lib/*.c files
+  
+  93 lib/*.c source files renamed to use our standard naming scheme.
+  
+  This commit only does the file renaming.
+  
+  ----------------------------------------
+  
+    renamed:    lib/amigaos.c -> lib/curl_amigaos.c
+    renamed:    lib/asyn-ares.c -> lib/curl_asyn_ares.c
+    renamed:    lib/asyn-thread.c -> lib/curl_asyn_thread.c
+    renamed:    lib/axtls.c -> lib/curl_axtls.c
+    renamed:    lib/base64.c -> lib/curl_base64.c
+    renamed:    lib/bundles.c -> lib/curl_bundles.c
+    renamed:    lib/conncache.c -> lib/curl_conncache.c
+    renamed:    lib/connect.c -> lib/curl_connect.c
+    renamed:    lib/content_encoding.c -> lib/curl_content_encoding.c
+    renamed:    lib/cookie.c -> lib/curl_cookie.c
+    renamed:    lib/cyassl.c -> lib/curl_cyassl.c
+    renamed:    lib/dict.c -> lib/curl_dict.c
+    renamed:    lib/easy.c -> lib/curl_easy.c
+    renamed:    lib/escape.c -> lib/curl_escape.c
+    renamed:    lib/file.c -> lib/curl_file.c
+    renamed:    lib/fileinfo.c -> lib/curl_fileinfo.c
+    renamed:    lib/formdata.c -> lib/curl_formdata.c
+    renamed:    lib/ftp.c -> lib/curl_ftp.c
+    renamed:    lib/ftplistparser.c -> lib/curl_ftplistparser.c
+    renamed:    lib/getenv.c -> lib/curl_getenv.c
+    renamed:    lib/getinfo.c -> lib/curl_getinfo.c
+    renamed:    lib/gopher.c -> lib/curl_gopher.c
+    renamed:    lib/gtls.c -> lib/curl_gtls.c
+    renamed:    lib/hash.c -> lib/curl_hash.c
+    renamed:    lib/hmac.c -> lib/curl_hmac.c
+    renamed:    lib/hostasyn.c -> lib/curl_hostasyn.c
+    renamed:    lib/hostcheck.c -> lib/curl_hostcheck.c
+    renamed:    lib/hostip.c -> lib/curl_hostip.c
+    renamed:    lib/hostip4.c -> lib/curl_hostip4.c
+    renamed:    lib/hostip6.c -> lib/curl_hostip6.c
+    renamed:    lib/hostsyn.c -> lib/curl_hostsyn.c
+    renamed:    lib/http.c -> lib/curl_http.c
+    renamed:    lib/http_chunks.c -> lib/curl_http_chunks.c
+    renamed:    lib/http_digest.c -> lib/curl_http_digest.c
+    renamed:    lib/http_negotiate.c -> lib/curl_http_negotiate.c
+    renamed:    lib/http_negotiate_sspi.c -> lib/curl_http_negotiate_sspi.c
+    renamed:    lib/http_proxy.c -> lib/curl_http_proxy.c
+    renamed:    lib/idn_win32.c -> lib/curl_idn_win32.c
+    renamed:    lib/if2ip.c -> lib/curl_if2ip.c
+    renamed:    lib/imap.c -> lib/curl_imap.c
+    renamed:    lib/inet_ntop.c -> lib/curl_inet_ntop.c
+    renamed:    lib/inet_pton.c -> lib/curl_inet_pton.c
+    renamed:    lib/krb4.c -> lib/curl_krb4.c
+    renamed:    lib/krb5.c -> lib/curl_krb5.c
+    renamed:    lib/ldap.c -> lib/curl_ldap.c
+    renamed:    lib/llist.c -> lib/curl_llist.c
+    renamed:    lib/md4.c -> lib/curl_md4.c
+    renamed:    lib/md5.c -> lib/curl_md5.c
+    renamed:    lib/memdebug.c -> lib/curl_memdebug.c
+    renamed:    lib/mprintf.c -> lib/curl_mprintf.c
+    renamed:    lib/multi.c -> lib/curl_multi.c
+    renamed:    lib/netrc.c -> lib/curl_netrc.c
+    renamed:    lib/non-ascii.c -> lib/curl_non_ascii.c
+    renamed:    lib/curl_non-ascii.h -> lib/curl_non_ascii.h
+    renamed:    lib/nonblock.c -> lib/curl_nonblock.c
+    renamed:    lib/nss.c -> lib/curl_nss.c
+    renamed:    lib/nwlib.c -> lib/curl_nwlib.c
+    renamed:    lib/nwos.c -> lib/curl_nwos.c
+    renamed:    lib/openldap.c -> lib/curl_openldap.c
+    renamed:    lib/parsedate.c -> lib/curl_parsedate.c
+    renamed:    lib/pingpong.c -> lib/curl_pingpong.c
+    renamed:    lib/polarssl.c -> lib/curl_polarssl.c
+    renamed:    lib/pop3.c -> lib/curl_pop3.c
+    renamed:    lib/progress.c -> lib/curl_progress.c
+    renamed:    lib/qssl.c -> lib/curl_qssl.c
+    renamed:    lib/rawstr.c -> lib/curl_rawstr.c
+    renamed:    lib/rtsp.c -> lib/curl_rtsp.c
+    renamed:    lib/security.c -> lib/curl_security.c
+    renamed:    lib/select.c -> lib/curl_select.c
+    renamed:    lib/sendf.c -> lib/curl_sendf.c
+    renamed:    lib/share.c -> lib/curl_share.c
+    renamed:    lib/slist.c -> lib/curl_slist.c
+    renamed:    lib/smtp.c -> lib/curl_smtp.c
+    renamed:    lib/socks.c -> lib/curl_socks.c
+    renamed:    lib/socks_gssapi.c -> lib/curl_socks_gssapi.c
+    renamed:    lib/socks_sspi.c -> lib/curl_socks_sspi.c
+    renamed:    lib/speedcheck.c -> lib/curl_speedcheck.c
+    renamed:    lib/splay.c -> lib/curl_splay.c
+    renamed:    lib/ssh.c -> lib/curl_ssh.c
+    renamed:    lib/sslgen.c -> lib/curl_sslgen.c
+    renamed:    lib/ssluse.c -> lib/curl_ssluse.c
+    renamed:    lib/strdup.c -> lib/curl_strdup.c
+    renamed:    lib/strequal.c -> lib/curl_strequal.c
+    renamed:    lib/strerror.c -> lib/curl_strerror.c
+    renamed:    lib/strtok.c -> lib/curl_strtok.c
+    renamed:    lib/strtoofft.c -> lib/curl_strtoofft.c
+    renamed:    lib/telnet.c -> lib/curl_telnet.c
+    renamed:    lib/tftp.c -> lib/curl_tftp.c
+    renamed:    lib/timeval.c -> lib/curl_timeval.c
+    renamed:    lib/transfer.c -> lib/curl_transfer.c
+    renamed:    lib/url.c -> lib/curl_url.c
+    renamed:    lib/version.c -> lib/curl_version.c
+    renamed:    lib/warnless.c -> lib/curl_warnless.c
+    renamed:    lib/wildcard.c -> lib/curl_wildcard.c
+  
+  ----------------------------------------
+
+- build: make use of 93 lib/*.c renamed files
+  
+  93 *.c source files renamed to use our standard naming scheme.
+  
+  This change affects 77 files in libcurl's source tree.
+
+Daniel Stenberg (3 Jan 2013)
+- INSTALL: unify the SSL library texts
+  
+  Make them smaller and more similar for each separate SSL library
+  supported by the configure build
+
+Yang Tse (2 Jan 2013)
+- curl_setup.h: remove redundant include guard
+
+- build and tests: curl_10char_object_name() shell function
+  
+  lib/objnames.inc provides definition of curl_10char_object_name() shell
+  function. The intended purpose of this function is to transliterate a
+  (*.c) source file name that may be longer than 10 characters, or not,
+  into a string with at most 10 characters which may be used as an OS/400
+  object name.
+  
+  Test case 1221 does unit testng of this function and also verifies
+  that it is possible to generate distinct short object names for all
+  curl and libcurl *.c source file names.
+  
+  lib/objnames-test.sh is the shell script used for test case 1221.
+  
+  tests/runtests.pl modified to accept shell script test cases.
+  
+  More details inside lib/objnames.inc and lib/objnames-test.sh
+
+- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+  
+  automake 1.13 errors if AM_CONFIG_HEADER is used in configure script.
+  automake 1.13 no longer autoupdates AM_CONFIG_HEADER to
+  AC_CONFIG_HEADERS, thing which automake has been doing since automake
+  version 1.7
+  
+  Given that our first automake supported version is automake 1.7,
+  simply replacing AM_CONFIG_HEADER usage with AC_CONFIG_HEADERS seems
+  enough to yet support same automake versions.
+  
+  Dave Reisner reported issue with 1.13 and provided patch.
+  
+  http://curl.haxx.se/mail/lib-2012-12/0246.html
+
+- curl-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
+  
+  Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
+  an autoconf version that does not provide it, instead of what we were
+  doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
+  all autoconf versions.
+
+Steve Holme (30 Dec 2012)
+- imap.c: Minor follow up tidy up
+
+- imap: Code tidy up prior to adding support for the CAPABILITY command
+  
+  * Changing the order of the state machine to represent the order in
+    which commands are sent to the server.
+  
+  * Reworking the imap_endofresp() function as the FETCH response doesn't
+    include the command id and shouldn't be part of the length comparison
+    that takes into account the id string.
+
+- pop3_doing: Applied debug info message when function fails
+  
+  Applied the same debug message as used in smtp_doing() and imap_doing()
+  when pop3_multi_statemach() fails.
+
+- imap_doing: don't call imap_dophase_done() if already failed
+  
+  Applied the POP3 fix from commit 2897ce7dc2e1 so imap_dophase_done()
+  isn't called if imap_multi_statemach() fails.
+
+- smtp_doing: don't call smtp_dophase_done() if already failed
+  
+  Applied the POP3 fix from commit 2897ce7dc2e1 so smtp_dophase_done()
+  isn't called if smtp_multi_statemach() fails.
+
+Yang Tse (29 Dec 2012)
+- examples/certinfo.c: fix compiler warning
+
+Steve Holme (29 Dec 2012)
+- pop3.c: Removed unnecessary POP3_STOP state changes
+  
+  Removed unnecessary state changes in pop3_state_starttls_resp()
+  following previous fix in IMAP module.
+
+- smtp.c: Added extra comments around SMTP_STOP state change
+  
+  Provided extra comments in the SMTP module following previous IMAP fix.
+
+- imap.c: Fixed bad state error when logging in with invalid credentials
+  
+  Fixed a problem with the state machine when attempting to log in with
+  invalid credentials. The server would report login failure but libcurl
+  would not read the response due to inappropriate IMAP_STOP states being
+  set after the login was sent.
+
+Yang Tse (29 Dec 2012)
+- imap.c: remove trailing whitespace
+
+Steve Holme (28 Dec 2012)
+- imap.c: Code tidy up - Part 2
+
+- imap.c: Code tidy up - Part 1
+  
+  Applied some of the comment and layout changes that had already been
+  applied to the pop3 and smtp code over the last 6 to 9 months.
+  
+  This is in preparation of adding SASL based authentication.
+
+- pop3.c: Minor code tidy up
+  
+  Minor tidy up of comments and layout prior to next part of imap work.
+
+- smtp: Minor code tidy up
+  
+  Minor tidy up of comments and layout prior to next part of imap work.
+
+- curl_imap.h: Tidy up of comments to be more readable
+
+- imap.c: Code tidy up renaming imapsendf() to imap_sendf()
+  
+  Renamed imapsendf() to imap_sendf() to be more in keeping with the
+  other imap functions as well as Curl_pp_sendf() that it replaces.
+
+Yang Tse (28 Dec 2012)
+- build: rename 76 lib/*.h files
+  
+  76 private header files renamed to use our standard naming scheme.
+  
+  This commit only does the file renaming.
+  
+  ----------------------------------------
+  
+    renamed:    amigaos.h -> curl_amigaos.h
+    renamed:    arpa_telnet.h -> curl_arpa_telnet.h
+    renamed:    asyn.h -> curl_asyn.h
+    renamed:    axtls.h -> curl_axtls.h
+    renamed:    bundles.h -> curl_bundles.h
+    renamed:    conncache.h -> curl_conncache.h
+    renamed:    connect.h -> curl_connect.h
+    renamed:    content_encoding.h -> curl_content_encoding.h
+    renamed:    cookie.h -> curl_cookie.h
+    renamed:    cyassl.h -> curl_cyassl.h
+    renamed:    dict.h -> curl_dict.h
+    renamed:    easyif.h -> curl_easyif.h
+    renamed:    escape.h -> curl_escape.h
+    renamed:    file.h -> curl_file.h
+    renamed:    fileinfo.h -> curl_fileinfo.h
+    renamed:    formdata.h -> curl_formdata.h
+    renamed:    ftp.h -> curl_ftp.h
+    renamed:    ftplistparser.h -> curl_ftplistparser.h
+    renamed:    getinfo.h -> curl_getinfo.h
+    renamed:    gopher.h -> curl_gopher.h
+    renamed:    gtls.h -> curl_gtls.h
+    renamed:    hash.h -> curl_hash.h
+    renamed:    hostcheck.h -> curl_hostcheck.h
+    renamed:    hostip.h -> curl_hostip.h
+    renamed:    http.h -> curl_http.h
+    renamed:    http_chunks.h -> curl_http_chunks.h
+    renamed:    http_digest.h -> curl_http_digest.h
+    renamed:    http_negotiate.h -> curl_http_negotiate.h
+    renamed:    http_proxy.h -> curl_http_proxy.h
+    renamed:    if2ip.h -> curl_if2ip.h
+    renamed:    imap.h -> curl_imap.h
+    renamed:    inet_ntop.h -> curl_inet_ntop.h
+    renamed:    inet_pton.h -> curl_inet_pton.h
+    renamed:    krb4.h -> curl_krb4.h
+    renamed:    llist.h -> curl_llist.h
+    renamed:    memdebug.h -> curl_memdebug.h
+    renamed:    multiif.h -> curl_multiif.h
+    renamed:    netrc.h -> curl_netrc.h
+    renamed:    non-ascii.h -> curl_non-ascii.h
+    renamed:    nonblock.h -> curl_nonblock.h
+    renamed:    nssg.h -> curl_nssg.h
+    renamed:    parsedate.h -> curl_parsedate.h
+    renamed:    pingpong.h -> curl_pingpong.h
+    renamed:    polarssl.h -> curl_polarssl.h
+    renamed:    pop3.h -> curl_pop3.h
+    renamed:    progress.h -> curl_progress.h
+    renamed:    qssl.h -> curl_qssl.h
+    renamed:    rawstr.h -> curl_rawstr.h
+    renamed:    rtsp.h -> curl_rtsp.h
+    renamed:    select.h -> curl_select.h
+    renamed:    sendf.h -> curl_sendf.h
+    renamed:    setup.h -> curl_setup.h
+    renamed:    setup_once.h -> curl_setup_once.h
+    renamed:    share.h -> curl_share.h
+    renamed:    slist.h -> curl_slist.h
+    renamed:    smtp.h -> curl_smtp.h
+    renamed:    sockaddr.h -> curl_sockaddr.h
+    renamed:    socks.h -> curl_socks.h
+    renamed:    speedcheck.h -> curl_speedcheck.h
+    renamed:    splay.h -> curl_splay.h
+    renamed:    ssh.h -> curl_ssh.h
+    renamed:    sslgen.h -> curl_sslgen.h
+    renamed:    ssluse.h -> curl_ssluse.h
+    renamed:    strdup.h -> curl_strdup.h
+    renamed:    strequal.h -> curl_strequal.h
+    renamed:    strerror.h -> curl_strerror.h
+    renamed:    strtok.h -> curl_strtok.h
+    renamed:    strtoofft.h -> curl_strtoofft.h
+    renamed:    telnet.h -> curl_telnet.h
+    renamed:    tftp.h -> curl_tftp.h
+    renamed:    timeval.h -> curl_timeval.h
+    renamed:    transfer.h -> curl_transfer.h
+    renamed:    url.h -> curl_url.h
+    renamed:    urldata.h -> curl_urldata.h
+    renamed:    warnless.h -> curl_warnless.h
+    renamed:    wildcard.h -> curl_wildcard.h
+  
+  ----------------------------------------
+
+- build: make use of 76 lib/*.h renamed files
+  
+  76 private header files renamed to use our standard naming scheme.
+  
+  This change affects 322 files in libcurl's source tree.
+
+- lib/*.h: use our standard naming scheme for header inclusion guards
+
+Steve Holme (28 Dec 2012)
+- imsp.c: Fixed usernames and passwords that contain escape characters
+  
+  Fixed a problem with sending usernames and passwords that contain
+  backslash, quotation mark and space characters.
+
+Daniel Stenberg (27 Dec 2012)
+- curl.1: extend the -X, --request description
+
+- RELEASE-NOTES: synced with e3ed2b82e6
+
+- [Nick Zitzmann brought this change]
+
+  darwinssl: Fixed inability to disable peer verification
+  
+  ... on Snow Leopard and Lion
+  
+  Snow Leopard introduced the SSLSetSessionOption() function, but it
+  doesn't disable peer verification as expected on Snow Leopard or
+  Lion (it works as expected in Mountain Lion). So we now use sysctl()
+  to detect whether or not the user is using Snow Leopard or Lion,
+  and if that's the case, then we now use the deprecated
+  SSLSetEnableCertVerify() function instead to disable peer verification.
+
+Yang Tse (26 Dec 2012)
+- curl tool: rename hugehelp files to tool_hugehelp
+
+- curl tool: renaming hugehelp files to tool_hugehelp
+
+- sockfilt.c: commit b44da5a82a follow-up 2
+
+- sockfilt.c: commit b44da5a82a follow-up
+
+- sockfilt.c: fix some compiler warnings
+
+- curl_multi_remove_handle: commit 0aabfd9963 follow-up
+
+Daniel Stenberg (25 Dec 2012)
+- lib556: enable VERBOSE to ease debugging on failures
+
+Marc Hoersken (25 Dec 2012)
+- socklift.c: Quick fix to re-add missing code
+
+- socklift.c: Added select_ws function to support Windows
+  
+  WinSock select() does not support standard file descriptors,
+  it can only check SOCKETs. The following function is an attempt
+  to create a select() function with support for other handles.
+
+Yang Tse (25 Dec 2012)
+- Enable tests 1503, 1504 and 1505
+
+- curl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE
+
+- Curl_hash_clean: OOM handling fix
+
+- test 1504 and 1505: same as 1502 but with different cleanup sequences
+
+Daniel Stenberg (24 Dec 2012)
+- Curl_conncache_foreach: allow callback to break loop
+  
+  ... and have it take a proper 'struct connectdata *' as first argument
+
+- pop3_doing: don't call pop3_dophase_done() if already failed
+  
+  ... it also clobbered the 'result' return value so that it wouldn't
+  return the error back to the parent function properly, which broke test
+  809 when run with 'multi-always'.
+
+Yang Tse (23 Dec 2012)
+- test 1503: same as 1502 but with a different cleanup sequence
+
+- test 1502: OOM handling fixes
+
+- curl_multi_wait: OOM handling fix
+
+- [Daniel Stenberg brought this change]
+
+  curl_multi_wait: avoid an unnecessary memory allocation
+
+- runtests.pl: prepend $srcdir to HTTPTLS server config files path
+
+- multi.c: OOM handling fix
+
+- lib543.c: OOM handling fixes
+
+- configure: add internal sanity check (warn only) on vars for makefiles
+
+Daniel Stenberg (21 Dec 2012)
+- SCP: relative path didn't work
+  
+  When prefixing a path with /~/ it is supposed to be used relative to the
+  user's home directory but it didn't work. Now we cut off the entire
+  three byte sequenct "/~/" which seems to be how OpenSSH does it.
+  
+  Bug: http://curl.haxx.se/bug/view.cgi?id=1173
+  Reported by: Balaji Parasuram
+
+Yang Tse (21 Dec 2012)
+- configure: LIBMETALINK_CFLAGS actually is LIBMETALINK_CPPFLAGS
+
+- configure: add minimal sanity check on user provided CFLAGS and CPPFLAGS
+
+- bundles connection caching: some out of memory handling fixes
+
+- libntlmconnect.c: fix compiler warnings and OOM handling
+
+- configure.ac: clear local test intended variables before use
+
+- VC6 IDE: link with advapi32.lib when using WIN32 crypto API (md5.c)
+
+- curl-functions.m4: improve gethostname arg 2 data type check
+
+- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
+  
+  Also reverts commit f254c59dc7
+
+- configure: check if compiler halts on function prototype mismatch
+
+- warnless.c: fix compiler warnings
+
+- curl-functions.m4: add gethostname arg 2 data type check and definition
+
+Daniel Stenberg (14 Dec 2012)
+- [Nick Zitzmann brought this change]
+
+  darwinssl: Fix implicit conversion compiler warnings
+  
+  The Clang compiler found a few implicit conversion problems that have
+  now been fixed.
+
+Yang Tse (14 Dec 2012)
+- setup_once.h: HP-UX <sys/socket.h> issue workaround
+  
+  Issue: When building a 32bit target with large file support HP-UX
+  <sys/socket.h> header file may simultaneously provide two different
+  sets of declarations for sendfile and sendpath functions, one with
+  static and another with external linkage. Given that we do not use
+  mentioned functions we really don't care which linkage is the
+  appropriate one, but on the other hand, the double declaration emmits
+  warnings when using the HP-UX compiler and errors when using modern
+  gcc versions resulting in fatal compilation errors.
+  
+  Mentioned issue is now fixed as long as we don't use sendfile nor
+  sendpath functions.
+
+- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
+  
+  Inclusion of top two most included header files now done in setup_once.h
+
+- setup_once.h: HP-UX specific TRUE and FALSE definitions
+  
+  Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
+
+Daniel Stenberg (12 Dec 2012)
+- gopher: #include cleanup
+  
+  Remove all system file includes from this file as they're not needed
+  
+  Reported by: Dan Fandrich
+
+Yang Tse (11 Dec 2012)
+- examples/simplessl.c: fix compiler warning
+
+- examples/externalsocket.c: fix SunPro compilation issue
+
+- examples/simplessl.c: fix compiler warning
+
+- build: add bundles and conncache files to other build systems
+
+- conncache: fix enumerated type mixed with another type
+
+- examples/anyauthput.c: fix Tru64 compilation issue
+
+Daniel Stenberg (8 Dec 2012)
+- [Colin Watson brought this change]
+
+  configure: fix cross pkg-config detection
+  
+  When cross-compiling, CURL_CHECK_PKGCONFIG was checking for the cross
+  pkg-config using ${host}-pkg-config.
+  
+  The gold standard for doing this correctly is pkg-config's own macro,
+  PKG_PROG_PKG_CONFIG.  However, on the assumption that you have a good
+  reason not to use that directly (reduced dependencies for maintainer
+  builds?), the behaviour of cURL's version should at least match.
+  PKG_PROG_PKG_CONFIG uses AC_PATH_TOOL, which ultimately ends up trying
+  ${host_alias}-pkg-config; this is not quite the same as what cURL does,
+  and may differ because ${host} has been run through config.sub.  For
+  instance, when cross-building to the armhf architecture on Ubuntu,
+  ${host_alias} is arm-linux-gnueabihf while ${host} is
+  arm-unknown-linux-gnueabihf.  This may also have been the cause of the
+  problem reported at http://curl.haxx.se/mail/lib-2012-04/0224.html.
+  
+  AC_PATH_TOOL is significantly simpler than cURL's current code, and
+  dates back to well before the current minimum of Autoconf 2.57, so let's
+  use it instead.
+
+- [Linus Nielsen Feltzing brought this change]
+
+  Introducing a new persistent connection caching system using "bundles".
+  
+  A bundle is a list of all persistent connections to the same host.
+  The connection cache consists of a hash of bundles, with the
+  hostname as the key.
+  The benefits may not be obvious, but they are two:
+  
+  1) Faster search for connections to reuse, since the hash
+     lookup only finds connections to the host in question.
+  2) It lays out the groundworks for an upcoming patch,
+     which will introduce multiple HTTP pipelines.
+  
+  This patch also removes the awkward list of "closure handles",
+  which were needed to send QUIT commands to the FTP server
+  when closing a connection.
+  Now we allocate a separate closure handle and use that
+  one to close all connections.
+  
+  This has been tested in a live system for a few weeks, and of
+  course passes the test suite.
+
+- [Fabian Keil brought this change]
+
+  runtests and friends: Do not add undefined values to @INC
+  
+  On FreeBSD this fixes the warning:
+  Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36.
+
+Steve Holme (5 Dec 2012)
+- Merge pull request #52 from isn-/master
+  
+  small compilation fix
diff --git a/CMake/CheckTypeSize.c.in b/CMake/CheckTypeSize.c.in
deleted file mode 100644 (file)
index 8ff07bf..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
-#ifdef CHECK_TYPE_SIZE_TYPE
-
-@CHECK_TYPE_SIZE_PREINCLUDE@
-#ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
-
-#ifdef _WIN32
-#  include <winsock2.h>
-#  include <ws2tcpip.h>
-#endif
-
-
-#ifdef HAVE_STDINT_H
-#  include <stdint.h>
-#endif /* HAVE_STDINT_H */
-
-#ifdef HAVE_STDDEF_H
-#  include <stddef.h>
-#endif /* HAVE_STDDEF_H */
-
-@CHECK_TYPE_SIZE_PREMAIN@
-
-#ifdef __CLASSIC_C__
-int main(){
-  int ac;
-  char*av[];
-#else
-int main(int ac, char*av[]){
-#endif
-  if(ac > 1000){return *av[0];}
-  return sizeof(CHECK_TYPE_SIZE_TYPE);
-}
-
-#else  /* CHECK_TYPE_SIZE_TYPE */
-
-#  error "CHECK_TYPE_SIZE_TYPE has to specify the type"
-
-#endif /* CHECK_TYPE_SIZE_TYPE */
diff --git a/CMake/CheckTypeSize.cmake b/CMake/CheckTypeSize.cmake
deleted file mode 100644 (file)
index 2c2ceab..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# - Check sizeof a type
-#  CHECK_TYPE_SIZE(TYPE VARIABLE)
-# Check if the type exists and determine size of type.  if the type
-# exists, the size will be stored to the variable.
-#
-#  VARIABLE - variable to store size if the type exists.
-#  HAVE_${VARIABLE} - does the variable exists or not
-
-macro(CHECK_TYPE_SIZE TYPE VARIABLE)
-  set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
-  if(NOT DEFINED ${VARIABLE})
-    if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
-      set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
-      set(MACRO_CHECK_TYPE_SIZE_FLAGS
-        "${CMAKE_REQUIRED_FLAGS}")
-      foreach(def HAVE_SYS_TYPES_H 
-         HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
-        if("${def}")
-          set(MACRO_CHECK_TYPE_SIZE_FLAGS
-            "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
-        endif("${def}")
-      endforeach(def)
-      set(CHECK_TYPE_SIZE_PREMAIN)
-      foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
-        set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
-      endforeach(def)
-      configure_file(
-        "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
-        "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
-        IMMEDIATE @ONLY)
-      file(READ
-        "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
-        CHECK_TYPE_SIZE_FILE_CONTENT)
-      message(STATUS "Check size of ${TYPE}")
-      if(CMAKE_REQUIRED_LIBRARIES)
-        set(CHECK_TYPE_SIZE_ADD_LIBRARIES
-          "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-      endif(CMAKE_REQUIRED_LIBRARIES)
-      try_run(${VARIABLE} HAVE_${VARIABLE}
-        ${CMAKE_BINARY_DIR}
-        "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
-        CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
-        "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
-        OUTPUT_VARIABLE OUTPUT)
-      if(HAVE_${VARIABLE})
-        message(STATUS "Check size of ${TYPE} - done")
-        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-          "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
-      else(HAVE_${VARIABLE})
-        message(STATUS "Check size of ${TYPE} - failed")
-        file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-          "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
-      endif(HAVE_${VARIABLE})
-    endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
-  endif(NOT DEFINED ${VARIABLE})
-  set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
-endmacro(CHECK_TYPE_SIZE)
index 0943458..199871a 100644 (file)
@@ -1,3 +1,24 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 #ifdef TIME_WITH_SYS_TIME
 /* Time with sys/time test */
 
index 63a9d60..279428b 100644 (file)
@@ -2,17 +2,19 @@
 # Adds OPENSSL_INCLUDE_DIRS and libeay32
 include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
 
-# Bill Hoffman told that libeay32 is necessary for him:
-find_library(SSL_LIBEAY NAMES libeay32)
+# starting 2.8 it is better to use standard modules
+if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
+  # Bill Hoffman told that libeay32 is necessary for him:
+  find_library(SSL_LIBEAY NAMES libeay32)
 
-if(OPENSSL_FOUND)
-  if(SSL_LIBEAY)
-    list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
-  else()
-    set(OPENSSL_FOUND FALSE)
+  if(OPENSSL_FOUND)
+    if(SSL_LIBEAY)
+      list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
+    else()
+      set(OPENSSL_FOUND FALSE)
+    endif()
   endif()
-endif()
-
+endif() # if (CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
 
 if(OPENSSL_FOUND)
   set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
index 87f1d4f..b2cfe18 100644 (file)
@@ -1,8 +1,10 @@
 # Locate zlib
 include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
 
-find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
-
-if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
-  set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
+# starting 2.8 it is better to use standard modules
+if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
+  find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
+  if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
+    set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
+  endif()
 endif()
index 244085b..a7ecace 100644 (file)
@@ -23,7 +23,6 @@ include(Utilities)
 
 project( CURL C )
 
-
 file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
 string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
   LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
@@ -58,10 +57,6 @@ set(OS "\"${CMAKE_SYSTEM_NAME}\"")
 include_directories(${PROJECT_BINARY_DIR}/include/curl)
 include_directories( ${CURL_SOURCE_DIR}/include )
 
-if(WIN32)
-  set(NATIVE_WINDOWS ON)
-endif()
-
 option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
 option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
 option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
@@ -114,22 +109,11 @@ mark_as_advanced(CURL_DISABLE_HTTP)
 
 option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
 mark_as_advanced(CURL_DISABLE_LDAPS)
-if(WIN32)
-  set(CURL_DEFAULT_DISABLE_LDAP OFF)
-  # some windows compilers do not have wldap32
-  if( NOT HAVE_WLDAP32)
-    set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
-    message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
-    option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
-  else()
-    option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
-  endif()
-  mark_as_advanced(CURL_LDAP_WIN)
-endif()
 
 if(HTTP_ONLY)
   set(CURL_DISABLE_FTP ON)
   set(CURL_DISABLE_LDAP ON)
+  set(CURL_DISABLE_LDAPS ON)
   set(CURL_DISABLE_TELNET ON)
   set(CURL_DISABLE_DICT ON)
   set(CURL_DISABLE_FILE ON)
@@ -148,20 +132,6 @@ mark_as_advanced(DISABLED_THREADSAFE)
 option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
 mark_as_advanced(ENABLE_IPV6)
 
-if(WIN32)
-  list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib)  # bufferoverflowu.lib
-  if(CURL_DISABLE_LDAP)
-    # Remove wldap32.lib from space-separated list
-    string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
-    list(REMOVE_ITEM _LIST "wldap32.lib")
-    to_list_spaces(_LIST CMAKE_C_STANDARD_LIBRARIES)
-  else()
-    # Append wldap32.lib
-    list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
-  endif()
-  set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}"   CACHE STRING "" FORCE)
-endif()
-
 
 # We need ansi c-flags, especially on HP
 set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
@@ -183,13 +153,7 @@ include (CheckIncludeFile)
 include (CheckIncludeFiles)
 include (CheckLibraryExists)
 include (CheckSymbolExists)
-# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
-# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
-if(CMAKE_CROSSCOMPILING)
-  include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
-else(CMAKE_CROSSCOMPILING)
-  include (CheckTypeSize)
-endif(CMAKE_CROSSCOMPILING)
+include (CheckTypeSize)
 
 # On windows preload settings
 if(WIN32)
@@ -197,12 +161,12 @@ if(WIN32)
 endif(WIN32)
 
 # This macro checks if the symbol exists in the library and if it
-# does, it appends library to the list.
+# does, it prepends library to the list.
 macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
-  check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
+  check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
     ${VARIABLE})
   if(${VARIABLE})
-    set(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
+    set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
   endif(${VARIABLE})
 endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
 
@@ -226,29 +190,24 @@ check_library_exists_concat("ws2_32" getch        HAVE_LIBWS2_32)
 check_library_exists_concat("winmm"  getch        HAVE_LIBWINMM)
 check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
 
+if(WIN32)
+  set(CURL_DEFAULT_DISABLE_LDAP OFF)
+  # some windows compilers do not have wldap32
+  if(NOT HAVE_WLDAP32)
+    set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
+    message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
+    option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
+  else()
+    option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
+  endif()
+  mark_as_advanced(CURL_LDAP_WIN)
+endif()
+
+
 # IF(NOT CURL_SPECIAL_LIBZ)
 #  CHECK_LIBRARY_EXISTS_CONCAT("z"      inflateEnd   HAVE_LIBZ)
 # ENDIF(NOT CURL_SPECIAL_LIBZ)
 
-option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
-mark_as_advanced(CMAKE_USE_OPENSSL)
-if(CMAKE_USE_OPENSSL)
-  if(WIN32)
-    find_package(OpenSSL)
-    if(OPENSSL_FOUND)
-      set(USE_SSLEAY TRUE)
-      set(USE_OPENSSL TRUE)
-      list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
-    else()
-      set(CMAKE_USE_OPENSSL FALSE)
-      message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
-    endif()
-  else(WIN32)
-    check_library_exists_concat("crypto" CRYPTO_lock  HAVE_LIBCRYPTO)
-    check_library_exists_concat("ssl"    SSL_connect  HAVE_LIBSSL)
-  endif(WIN32)
-endif(CMAKE_USE_OPENSSL)
-
 # Check for idn
 check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
 
@@ -274,9 +233,30 @@ if(CURL_ZLIB)  # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
     set(HAVE_ZLIB_H ON)
     set(HAVE_ZLIB ON)
     set(HAVE_LIBZ ON)
+    list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
   endif()
 endif()
 
+option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
+mark_as_advanced(CMAKE_USE_OPENSSL)
+if(CMAKE_USE_OPENSSL)
+
+  set(USE_SSLEAY OFF)
+  set(USE_OPENSSL OFF)
+  set(HAVE_LIBCRYPTO OFF)
+  set(HAVE_LIBSSL OFF)
+
+  find_package(OpenSSL)
+  if(OPENSSL_FOUND)
+    list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
+    list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+    set(USE_SSLEAY ON)
+    set(USE_OPENSSL ON)
+    set(HAVE_LIBCRYPTO ON)
+    set(HAVE_LIBSSL ON)
+  endif(OPENSSL_FOUND)
+endif(CMAKE_USE_OPENSSL)
+
 # If we have features.h, then do the _BSD_SOURCE magic
 check_include_file("features.h"       HAVE_FEATURES_H)
 
@@ -340,14 +320,17 @@ check_include_file_concat("net/if.h"         HAVE_NET_IF_H)
 check_include_file_concat("netdb.h"          HAVE_NETDB_H)
 check_include_file_concat("netinet/in.h"     HAVE_NETINET_IN_H)
 check_include_file_concat("netinet/tcp.h"    HAVE_NETINET_TCP_H)
-check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
-check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
-check_include_file_concat("openssl/err.h"    HAVE_OPENSSL_ERR_H)
-check_include_file_concat("openssl/pem.h"    HAVE_OPENSSL_PEM_H)
-check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
-check_include_file_concat("openssl/rsa.h"    HAVE_OPENSSL_RSA_H)
-check_include_file_concat("openssl/ssl.h"    HAVE_OPENSSL_SSL_H)
-check_include_file_concat("openssl/x509.h"   HAVE_OPENSSL_X509_H)
+if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
+  check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
+  check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
+  check_include_file_concat("openssl/err.h"    HAVE_OPENSSL_ERR_H)
+  check_include_file_concat("openssl/pem.h"    HAVE_OPENSSL_PEM_H)
+  check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
+  check_include_file_concat("openssl/rsa.h"    HAVE_OPENSSL_RSA_H)
+  check_include_file_concat("openssl/ssl.h"    HAVE_OPENSSL_SSL_H)
+  check_include_file_concat("openssl/x509.h"   HAVE_OPENSSL_X509_H)
+  check_include_file_concat("openssl/rand.h"   HAVE_OPENSSL_RAND_H)
+endif(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
 check_include_file_concat("pem.h"            HAVE_PEM_H)
 check_include_file_concat("poll.h"           HAVE_POLL_H)
 check_include_file_concat("pwd.h"            HAVE_PWD_H)
@@ -383,15 +366,18 @@ check_include_file_concat("sockio.h"        HAVE_SOCKIO_H)
 check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
 check_include_file_concat("idna.h"          HAVE_IDNA_H)
 
-if(CMAKE_USE_OPENSSL)
-  check_include_file_concat("openssl/rand.h"   HAVE_OPENSSL_RAND_H)
-endif(CMAKE_USE_OPENSSL)
-
-if(NOT HAVE_LDAP_H) 
+if(NOT HAVE_LDAP_H)
   message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
   set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
 endif()
 
+# No ldap, no ldaps.
+if(CURL_DISABLE_LDAP)
+  if(NOT CURL_DISABLE_LDAPS)
+    message(STATUS "LDAP needs to be enabled to support LDAPS")
+    set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE)
+  endif()
+endif()
 
 check_type_size(size_t  SIZEOF_SIZE_T)
 check_type_size(ssize_t  SIZEOF_SSIZE_T)
@@ -431,7 +417,7 @@ if(SIZEOF_LONG EQUAL 8)
   set(CURL_FORMAT_CURL_OFF_TU "lu")
   set(CURL_FORMAT_OFF_T "%ld")
   set(CURL_SUFFIX_CURL_OFF_T L)
-  set(CURL_SUFFIX_CURL_OFF_TU LU)
+  set(CURL_SUFFIX_CURL_OFF_TU UL)
 endif(SIZEOF_LONG EQUAL 8)
 
 if(SIZEOF_LONG_LONG EQUAL 8)
@@ -441,7 +427,7 @@ if(SIZEOF_LONG_LONG EQUAL 8)
   set(CURL_FORMAT_CURL_OFF_TU "llu")
   set(CURL_FORMAT_OFF_T "%lld")
   set(CURL_SUFFIX_CURL_OFF_T LL)
-  set(CURL_SUFFIX_CURL_OFF_TU LLU)
+  set(CURL_SUFFIX_CURL_OFF_TU ULL)
 endif(SIZEOF_LONG_LONG EQUAL 8)
 
 if(NOT CURL_TYPEOF_CURL_OFF_T)
@@ -781,9 +767,15 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
 
 if(HAVE_SOCKLEN_T)
   set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
+  if(WIN32)
+    set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
+  elseif(HAVE_SYS_SOCKET_H)
+    set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
+  endif()
   check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
+  set(CMAKE_EXTRA_INCLUDE_FILES)
   if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
-    message(FATAL_ERROR 
+    message(FATAL_ERROR
      "Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
   endif()
 else()
@@ -809,9 +801,6 @@ endif(MSVC)
 function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
   if(CURL_ZLIB AND ZLIB_FOUND)
     include_directories(${ZLIB_INCLUDE_DIR})
-  endif()
-  if(CURL_ZLIB AND ZLIB_FOUND)
-    target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
     #ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
   endif()
 
@@ -819,9 +808,10 @@ function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
     include_directories(${OPENSSL_INCLUDE_DIR})
   endif()
   if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
-    target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
     #ADD_DEFINITIONS( -DUSE_SSLEAY )
   endif()
+
+  target_link_libraries(${TARGET_NAME} ${CURL_LIBS})
 endfunction()
 
 # Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
@@ -852,3 +842,23 @@ endif()
 if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
   set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
 endif()
+
+# Installation.
+# First, install generated curlbuild.h
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h"
+    DESTINATION include/curl )
+# Next, install other headers excluding curlbuild.h
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
+    DESTINATION include
+    FILES_MATCHING PATTERN "*.h"
+    PATTERN "curlbuild.h" EXCLUDE)
+
+
+# Workaround for MSVS10 to avoid the Dialog Hell
+# FIXME: This could be removed with future version of CMake.
+if(MSVC_VERSION EQUAL 1600)
+  set(CURL_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CURL.sln")
+  if(EXISTS "${CURL_SLN_FILENAME}")
+    file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n")
+  endif()
+endif()
diff --git a/COPYING b/COPYING
index 163b299..85d122e 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 COPYRIGHT AND PERMISSION NOTICE
 
-Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>.
+Copyright (c) 1996 - 2013, Daniel Stenberg, <daniel@haxx.se>.
 
 All rights reserved.
 
index 0c97acd..9863b78 100755 (executable)
 # 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
 #If you need to have PPC64 support then change below to 1
 PPC64_NEEDED=0
+# Apple does not support building for PPC anymore in Xcode 4 and later.
+# If you're using Xcode 3 or earlier and need PPC support, then change
+# the setting below to 1
+PPC_NEEDED=0
 
 # For me the default is to develop for the platform I am on, and if you
 #desire compatibility with older versions then change USE_OLD to 1 :)
@@ -24,9 +28,16 @@ FRAMEWORK_VERSION=Versions/Release-$VERSION
 # and setup the right paths to this version, leaving the system version
 # "intact", so you can "fix" it later with the links to Versions/A/...
 
-
-OLD_SDK=`ls  /Developer/SDKs|head -1`
-NEW_SDK=`ls -r /Developer/SDKs|head -1`
+DEVELOPER_PATH=`xcode-select --print-path`
+# Around Xcode 4.3, SDKs were moved from the Developer folder into the
+# MacOSX.platform folder
+if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
+ SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
+else
+ SDK_PATH="$DEVELOPER_PATH/SDKs";
+fi
+OLD_SDK=`ls  $SDK_PATH|head -1`
+NEW_SDK=`ls -r $SDK_PATH|head -1`
 
 if test "0"$USE_OLD -gt 0
 then
@@ -37,21 +48,24 @@ fi
 
 MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
 
-SDK32_DIR='/Developer/SDKs/'$SDK32
+SDK32_DIR=$SDK_PATH/$SDK32
 MINVER32='-mmacosx-version-min='$MACVER
-ARCHES32='-arch i386 -arch ppc'
-
+if test $PPC_NEEDED -gt 0; then
+ ARCHES32='-arch i386 -arch ppc'
+else
+ ARCHES32='-arch i386'
+fi
 
 if test $PPC64_NEEDED -gt 0
 then
   SDK64=10.5
   ARCHES64='-arch x86_64 -arch ppc64'
-  SDK64=`ls  /Developer/SDKs|grep 10.5|head -1`
+  SDK64=`ls  $SDK_PATH|grep 10.5|head -1`
 else
  ARCHES64='-arch x86_64'
  #We "know" that 10.4 and earlier do not support 64bit
- OLD_SDK64=`ls  /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
- NEW_SDK64=`ls -r /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
+ OLD_SDK64=`ls  $SDK_PATH|egrep -v "10.[0-4]"|head -1`
+ NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4]"|head -1`
  if test $USE_OLD -gt 0
   then
    SDK64=$OLD_SDK64
@@ -60,7 +74,7 @@ else
   fi
 fi
 
-SDK64_DIR='/Developer/SDKs/'$SDK64
+SDK64_DIR=$SDK_PATH/$SDK64
 MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
 
 MINVER64='-mmacosx-version-min='$MACVER64
@@ -68,13 +82,13 @@ MINVER64='-mmacosx-version-min='$MACVER64
 if test ! -z $SDK32; then
   echo "----Configuring libcurl for 32 bit universal framework..."
   make clean
-  ./configure --disable-dependency-tracking --disable-static --with-gssapi \
-    CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32 $MINVER32" \
-    LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
+  ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
+    CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
+    LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
     CC=$CC
 
   echo "----Building 32 bit libcurl..."
-  make
+  make -j `sysctl -n hw.logicalcpu_max`
 
   echo "----Creating 32 bit framework..."
   rm -r libcurl.framework
@@ -89,21 +103,21 @@ if test ! -z $SDK32; then
   ln -fs ${FRAMEWORK_VERSION}/Resources Resources
   ln -fs ${FRAMEWORK_VERSION}/Headers Headers
   cd Versions
-  ln -fs ${FRAMEWORK_VERSION} Current
+  ln -fs $(basename "${FRAMEWORK_VERSION}") Current
 
-  echo TEsting for SDK64
+  echo Testing for SDK64
   if test -d $SDK64_DIR; then
   echo entering...
     popd
     make clean
     echo "----Configuring libcurl for 64 bit universal framework..."
-    ./configure --disable-dependency-tracking --disable-static --with-gssapi \
-      CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64 $MINVER64" \
-      LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
+    ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
+      CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
+      LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
       CC=$CC
 
     echo "----Building 64 bit libcurl..."
-    make
+    make -j `sysctl -n hw.logicalcpu_max`
 
     echo "----Appending 64 bit framework to 32 bit framework..."
     cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
index 29f13af..3efb8eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,27 +32,27 @@ ssl:
 
 borland:
        cd lib
-       make -f Makefile.b32
+       $(MAKE) -f Makefile.b32
        cd ..\src
-       make -f Makefile.b32
+       $(MAKE) -f Makefile.b32
 
 borland-ssl:
        cd lib
-       make -f Makefile.b32 WITH_SSL=1
+       $(MAKE) -f Makefile.b32 WITH_SSL=1
        cd ..\src
-       make -f Makefile.b32 WITH_SSL=1
+       $(MAKE) -f Makefile.b32 WITH_SSL=1
 
 borland-ssl-zlib:
        cd lib
-       make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
+       $(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
        cd ..\src
-       make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
+       $(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
 
 borland-clean:
        cd lib
-       make -f Makefile.b32 clean
+       $(MAKE) -f Makefile.b32 clean
        cd ..\src
-       make -f Makefile.b32 clean
+       $(MAKE) -f Makefile.b32 clean
 
 watcom: .SYMBOLIC
        cd lib && $(MAKE) -u -f Makefile.Watcom
@@ -70,29 +70,22 @@ mingw32:
        $(MAKE) -C lib -f Makefile.m32
        $(MAKE) -C src -f Makefile.m32
 
-mingw32-zlib:
-       $(MAKE) -C lib -f Makefile.m32 ZLIB=1
-       $(MAKE) -C src -f Makefile.m32 ZLIB=1
-
-mingw32-ssl-zlib:
-       $(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
-       $(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
-
-mingw32-ssh2-ssl-zlib:
-       $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
-       $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
-
-mingw32-ssh2-ssl-sspi-zlib:
-       $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-       $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-
-mingw32-rtmp-ssh2-ssl-sspi-zlib:
-       $(MAKE) -C lib -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-       $(MAKE) -C src -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
-
 mingw32-clean:
        $(MAKE) -C lib -f Makefile.m32 clean
        $(MAKE) -C src -f Makefile.m32 clean
+       $(MAKE) -C docs/examples -f Makefile.m32 clean
+
+mingw32-vclean mingw32-distclean:
+       $(MAKE) -C lib -f Makefile.m32 vclean
+       $(MAKE) -C src -f Makefile.m32 vclean
+       $(MAKE) -C docs/examples -f Makefile.m32 vclean
+
+mingw32-examples%:
+       $(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
+
+mingw32%:
+       $(MAKE) -C lib -f Makefile.m32 CFG=$@
+       $(MAKE) -C src -f Makefile.m32 CFG=$@
 
 vc-clean: $(VC)
        cd lib
@@ -155,12 +148,24 @@ vc-ssl-zlib: $(VC)
        cd ..\src
        nmake /f Makefile.$(VC) cfg=release-ssl-zlib
 
+vc-winssl-zlib: $(VC)
+       cd lib
+       nmake /f Makefile.$(VC) cfg=release-winssl-zlib
+       cd ..\src
+       nmake /f Makefile.$(VC) cfg=release-winssl-zlib
+
 vc-x64-ssl-zlib: $(VC)
        cd lib
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
        cd ..\src
        nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
 
+vc-x64-winssl-zlib: $(VC)
+       cd lib
+       nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib
+       cd ..\src
+       nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib
+
 vc-ssl-dll: $(VC)
        cd lib
        nmake /f Makefile.$(VC) cfg=release-ssl-dll
@@ -229,34 +234,27 @@ netware:
        $(MAKE) -C lib -f Makefile.netware
        $(MAKE) -C src -f Makefile.netware
 
-netware-ares:
-       $(MAKE) -C lib -f Makefile.netware WITH_ARES=1
-       $(MAKE) -C src -f Makefile.netware WITH_ARES=1
-
-netware-ssl:
-       $(MAKE) -C lib -f Makefile.netware WITH_SSL=1
-       $(MAKE) -C src -f Makefile.netware WITH_SSL=1
-
-netware-ssl-zlib:
-       $(MAKE) -C lib -f Makefile.netware WITH_SSL=1 WITH_ZLIB=1
-       $(MAKE) -C src -f Makefile.netware WITH_SSL=1 WITH_ZLIB=1
-
-netware-ssh2-ssl-zlib:
-       $(MAKE) -C lib -f Makefile.netware WITH_SSH2=1 WITH_SSL=1 WITH_ZLIB=1
-       $(MAKE) -C src -f Makefile.netware WITH_SSH2=1 WITH_SSL=1 WITH_ZLIB=1
-
-netware-zlib:
-       $(MAKE) -C lib -f Makefile.netware WITH_ZLIB=1
-       $(MAKE) -C src -f Makefile.netware WITH_ZLIB=1
-
 netware-clean:
        $(MAKE) -C lib -f Makefile.netware clean
        $(MAKE) -C src -f Makefile.netware clean
+       $(MAKE) -C docs/examples -f Makefile.netware clean
+
+netware-vclean netware-distclean:
+       $(MAKE) -C lib -f Makefile.netware vclean
+       $(MAKE) -C src -f Makefile.netware vclean
+       $(MAKE) -C docs/examples -f Makefile.netware vclean
 
 netware-install:
        $(MAKE) -C lib -f Makefile.netware install
        $(MAKE) -C src -f Makefile.netware install
 
+netware-examples-%:
+       $(MAKE) -C docs/examples -f Makefile.netware CFG=$@
+
+netware-%:
+       $(MAKE) -C lib -f Makefile.netware CFG=$@
+       $(MAKE) -C src -f Makefile.netware CFG=$@
+
 unix: all
 
 unix-ssl: ssl
index 15836e9..608bd11 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -24,24 +24,59 @@ AUTOMAKE_OPTIONS = foreign
 
 ACLOCAL_AMFLAGS = -I m4
 
-CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
-CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake           \
-CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake     \
-CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
+CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in             \
+CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake  \
+CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake         \
+CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake              \
 CMake/Utilities.cmake include/curl/curlbuild.h.cmake
 
+VC6LIBDSP = vs/vc6/lib/vc6libcurl.dsp
+VC6LIBDSPHEAD = vs/t/lib/vc6_libcurl_dsp.head
+VC6LIBDSPFOOT = vs/t/lib/vc6_libcurl_dsp.foot
+
+VC8LIBPRJ = vs/vc8/lib/vc8libcurl.vcproj
+VC8LIBPRJHEAD = vs/t/lib/vc8_libcurl_prj.head
+VC8LIBPRJFOOT = vs/t/lib/vc8_libcurl_prj.foot
+
+VC_DIST = \
+ vs/t/README \
+ $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
+ $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
+ vs/vc6/vc6curl.dsw \
+ vs/vc6/lib/vc6libcurl.dsw \
+ vs/vc6/src/vc6curltool.dsw \
+ vs/vc6/src/vc6curltool.dsp
+
+VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
+ Makefile.am lib/Makefile.inc
+
+VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
+ Makefile.am lib/Makefile.inc
+
+WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat  \
+ winbuild/MakefileBuild.vc winbuild/Makefile.vc                                \
+ winbuild/Makefile.msvc.names
+
 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in      \
- curl-style.el sample.emacs RELEASE-NOTES buildconf    \
- libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
+ RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework        \
+ $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
+
+CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
 
 bin_SCRIPTS = curl-config
 
-SUBDIRS = lib src
-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
+SUBDIRS = lib src include
+DIST_SUBDIRS = $(SUBDIRS) tests packages docs
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libcurl.pc
 
+# List of libcurl source files required to generate VC IDE dsp and prj files
+include lib/Makefile.inc
+
+WIN32SOURCES = $(CSOURCES)
+WIN32HEADERS = $(HHEADERS) config-win32.h
+
 dist-hook:
        rm -rf $(top_builddir)/tests/log
        find $(distdir) -name "*.dist" -exec rm {} \;
@@ -77,14 +112,21 @@ test-full:
 test-torture:
        @(cd tests; $(MAKE) all torture-test)
 
+test-am:
+       @(cd tests; $(MAKE) all am-test)
+
 endif
 
 examples:
        @(cd docs/examples; $(MAKE) check)
 
+# This is a hook to have 'make clean' also clean up the docs and the tests
+# dir. The extra check for the Makefiles being present is necessary because
+# 'make distcheck' will make clean first in these directories _before_ it runs
+# this hook.
 clean-local:
-       @(cd tests; $(MAKE) clean)
-       @(cd docs; $(MAKE) clean)
+       @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
+       @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
 
 #
 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
@@ -151,3 +193,90 @@ ca-bundle: lib/mk-ca-bundle.pl
 ca-firefox: lib/firefox-db2pem.sh
        @echo "generate a fresh ca-bundle.crt"
        ./lib/firefox-db2pem.sh lib/ca-bundle.crt
+
+checksrc:
+       cd lib && $(MAKE) checksrc
+       cd src && $(MAKE) checksrc
+
+.PHONY: vc6-ide
+
+vc6-ide:
+       $(MAKE) $(VC6LIBDSP)
+
+$(VC6LIBDSP): $(VC6LIBDSP_DEPS)
+       @(echo "generating '$(VC6LIBDSP)'"; \
+       \
+       for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
+         test -d "$$dir" || mkdir "$$dir" || exit 1; \
+       done; \
+       \
+       dir='..\..\..\lib\'; \
+       body='$(VC6LIBDSP)'.body; \
+       win32_srcs='$(WIN32SOURCES)'; \
+       win32_hdrs='$(WIN32HEADERS)'; \
+       sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
+       sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
+       \
+       echo "# Begin Group \"Source Files\""  > $$body; \
+       echo ""                               >> $$body; \
+       echo "# PROP Default_Filter \"\""     >> $$body; \
+       for file in $$sorted_srcs; do \
+         echo "# Begin Source File"          >> $$body; \
+         echo ""                             >> $$body; \
+         echo "SOURCE="$$dir$$file           >> $$body; \
+         echo "# End Source File"            >> $$body; \
+       done; \
+       echo "# End Group"                    >> $$body; \
+       echo "# Begin Group \"Header Files\"" >> $$body; \
+       echo ""                               >> $$body; \
+       echo "# PROP Default_Filter \"\""     >> $$body; \
+       for file in $$sorted_hdrs; do \
+         echo "# Begin Source File"          >> $$body; \
+         echo ""                             >> $$body; \
+         echo "SOURCE="$$dir$$file           >> $$body; \
+         echo "# End Source File"            >> $$body; \
+       done; \
+       echo "# End Group"                    >> $$body; \
+       \
+       awk '{ printf("%s\r\n", $$0); }' \
+         $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
+         > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
+       \
+       rm -f $$body)
+
+.PHONY: vc8-ide
+
+vc8-ide:
+       $(MAKE) $(VC8LIBPRJ)
+
+$(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
+       @(echo "generating '$(VC8LIBPRJ)'"; \
+       \
+       for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
+         test -d "$$dir" || mkdir "$$dir" || exit 1; \
+       done; \
+       \
+       dir='..\..\..\lib\'; \
+       body='$(VC8LIBPRJ)'.body; \
+       win32_srcs='$(WIN32SOURCES)'; \
+       win32_hdrs='$(WIN32HEADERS)'; \
+       sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
+       sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
+       \
+       echo "%tab%%tab%<Filter Name=\"Source Files\">"  > $$body; \
+       for file in $$sorted_srcs; do \
+         echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
+       done; \
+       echo "%tab%%tab%</Filter>"                      >> $$body; \
+       echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
+       for file in $$sorted_hdrs; do \
+         echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
+       done; \
+       echo "%tab%%tab%</Filter>"                      >> $$body; \
+       \
+       awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
+         $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
+         > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \
+       \
+       rm -f $$body)
+
index 661fe8d..0818741 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
 #
 ###########################################################################
 
+# ./lib/Makefile.inc
+# Using the backslash as line continuation character might be problematic
+# with some make flavours, as Watcom's wmake showed us already. If we
+# ever want to change this in a portable manner then we should consider
+# this idea (posted to the libcurl list by Adam Kellas):
+# CSRC1 = file1.c file2.c file3.c
+# CSRC2 = file4.c file5.c file6.c
+# CSOURCES = $(CSRC1) $(CSRC2)
+
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -59,85 +110,185 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/curl-config.in \
-       $(srcdir)/libcurl.pc.in $(top_srcdir)/configure COPYING \
-       compile config.guess config.sub depcomp install-sh ltmain.sh \
-       missing mkinstalldirs
+DIST_COMMON = $(srcdir)/lib/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) mkinstalldirs $(srcdir)/curl-config.in \
+       $(srcdir)/libcurl.pc.in COPYING README compile config.guess \
+       config.sub depcomp install-sh missing ltmain.sh
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES = curl-config libcurl.pc
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(bin_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
+SCRIPTS = $(bin_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -154,7 +305,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -167,15 +319,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -185,6 +339,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -192,16 +349,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -214,7 +367,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -227,34 +379,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -266,6 +418,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -285,7 +438,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -295,44 +447,118 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I m4
-CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
-CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake           \
-CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake     \
-CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
+CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in             \
+CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake  \
+CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake         \
+CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake              \
 CMake/Utilities.cmake include/curl/curlbuild.h.cmake
 
+VC6LIBDSP = vs/vc6/lib/vc6libcurl.dsp
+VC6LIBDSPHEAD = vs/t/lib/vc6_libcurl_dsp.head
+VC6LIBDSPFOOT = vs/t/lib/vc6_libcurl_dsp.foot
+VC8LIBPRJ = vs/vc8/lib/vc8libcurl.vcproj
+VC8LIBPRJHEAD = vs/t/lib/vc8_libcurl_prj.head
+VC8LIBPRJFOOT = vs/t/lib/vc8_libcurl_prj.foot
+VC_DIST = \
+ vs/t/README \
+ $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
+ $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
+ vs/vc6/vc6curl.dsw \
+ vs/vc6/lib/vc6libcurl.dsw \
+ vs/vc6/src/vc6curltool.dsw \
+ vs/vc6/src/vc6curltool.dsp
+
+VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
+ Makefile.am lib/Makefile.inc
+
+VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
+ Makefile.am lib/Makefile.inc
+
+WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat  \
+ winbuild/MakefileBuild.vc winbuild/Makefile.vc                                \
+ winbuild/Makefile.msvc.names
+
 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in      \
curl-style.el sample.emacs RELEASE-NOTES buildconf    \
- libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework        \
+ $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
 
+CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
 bin_SCRIPTS = curl-config
-SUBDIRS = lib src
-DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
+SUBDIRS = lib src include
+DIST_SUBDIRS = $(SUBDIRS) tests packages docs
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libcurl.pc
+CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c    \
+  cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c      \
+  ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c       \
+  netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c     \
+  curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c          \
+  memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c   \
+  content_encoding.c share.c http_digest.c md4.c md5.c \
+  http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c                \
+  hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c     \
+  select.c gtls.c sslgen.c tftp.c splay.c strdup.c socks.c ssh.c nss.c \
+  qssl.c rawstr.c curl_addrinfo.c socks_gssapi.c socks_sspi.c          \
+  curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c   \
+  pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c                \
+  polarssl_threadlock.c curl_rtmp.c openldap.c curl_gethostname.c      \
+  gopher.c axtls.c idn_win32.c http_negotiate_sspi.c cyassl.c          \
+  http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c     \
+  curl_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_ntlm_msgs.c         \
+  curl_sasl.c curl_schannel.c curl_multibyte.c curl_darwinssl.c                \
+  hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c      \
+  gskit.c
+
+HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h      \
+  progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h     \
+  if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h        \
+  getinfo.h strequal.h krb4.h memdebug.h http_chunks.h \
+  curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h                \
+  connect.h llist.h hash.h content_encoding.h share.h curl_md4.h       \
+  curl_md5.h http_digest.h http_negotiate.h inet_pton.h amigaos.h      \
+  strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h curl_setup.h        \
+  transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h   \
+  tftp.h sockaddr.h splay.h strdup.h socks.h ssh.h nssg.h curl_base64.h        \
+  rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h              \
+  curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
+  warnless.h curl_hmac.h polarssl.h polarssl_threadlock.h curl_rtmp.h  \
+  curl_gethostname.h gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h        \
+  asyn.h curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h     \
+  curl_ntlm_msgs.h curl_sasl.h curl_schannel.h curl_multibyte.h                \
+  curl_darwinssl.h hostcheck.h bundles.h conncache.h curl_setup_once.h \
+  multihandle.h setup-vms.h pipeline.h dotdot.h x509asn1.h gskit.h
+
+
+# List of libcurl source files required to generate VC IDE dsp and prj files
+WIN32SOURCES = $(CSOURCES)
+WIN32HEADERS = $(HHEADERS) config-win32.h
 all: all-recursive
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
        @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/lib/Makefile.inc $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
-             cd $(srcdir) && $(AUTOMAKE) --foreign  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -343,37 +569,55 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/lib/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 curl-config: $(top_builddir)/config.status $(srcdir)/curl-config.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 libcurl.pc: $(top_builddir)/config.status $(srcdir)/libcurl.pc.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_SCRIPTS)'; for p in $$list; do \
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-           $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -382,43 +626,49 @@ clean-libtool:
        -rm -rf .libs _libs
 
 distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
+       -rm -f libtool config.lt
 install-pkgconfigDATA: $(pkgconfig_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
-       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
        done
 
 uninstall-pkgconfigDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgconfig_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
-       done
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -426,66 +676,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -497,84 +701,113 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+       -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       $(mkdir_p) $(distdir)/. $(distdir)/CMake $(distdir)/CMake/Platforms $(distdir)/include/curl $(distdir)/m4 $(distdir)/packages/AIX/RPM $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -582,36 +815,45 @@ distdir: $(DISTFILES)
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
-       -find "$(distdir)" -type d ! -perm -755 \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
                -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       $(am__post_remove_distdir)
+
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+       $(am__post_remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+       $(am__post_remove_distdir)
 
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-shar: distdir
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+dist dist-all:
+       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+       $(am__post_remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -619,24 +861,31 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
+       chmod -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -657,14 +906,24 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__post_remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
@@ -686,7 +945,7 @@ all-am: Makefile $(SCRIPTS) $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
        for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -698,16 +957,23 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -726,6 +992,8 @@ dvi: dvi-recursive
 
 dvi-am:
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -733,13 +1001,30 @@ info-am:
 install-data-am: install-pkgconfigDATA
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
 
 install-exec-am: install-binSCRIPTS
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -758,29 +1043,29 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-binSCRIPTS uninstall-info-am \
-       uninstall-pkgconfigDATA
+uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-       check-am clean clean-generic clean-libtool clean-local \
-       clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \
-       dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distcleancheck distdir \
-       distuninstallcheck dvi dvi-am html html-am info info-am \
-       install install-am install-binSCRIPTS install-data \
-       install-data-am install-data-hook install-exec install-exec-am \
-       install-info install-info-am install-man install-pkgconfigDATA \
-       install-strip installcheck installcheck-am installdirs \
-       installdirs-am maintainer-clean maintainer-clean-generic \
-       maintainer-clean-recursive mostlyclean mostlyclean-generic \
-       mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
-       tags tags-recursive uninstall uninstall-am \
-       uninstall-binSCRIPTS uninstall-hook uninstall-info-am \
+.MAKE: $(am__recursive_targets) install-am install-data-am \
+       install-strip uninstall-am
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+       am--refresh check check-am clean clean-cscope clean-generic \
+       clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
+       dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
+       dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+       distclean-generic distclean-libtool distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am install-binSCRIPTS \
+       install-data install-data-am install-data-hook install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+       uninstall-am uninstall-binSCRIPTS uninstall-hook \
        uninstall-pkgconfigDATA
 
 
@@ -816,12 +1101,19 @@ check: test examples
 @CROSSCOMPILING_FALSE@test-torture:
 @CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all torture-test)
 
+@CROSSCOMPILING_FALSE@test-am:
+@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all am-test)
+
 examples:
        @(cd docs/examples; $(MAKE) check)
 
+# This is a hook to have 'make clean' also clean up the docs and the tests
+# dir. The extra check for the Makefiles being present is necessary because
+# 'make distcheck' will make clean first in these directories _before_ it runs
+# this hook.
 clean-local:
-       @(cd tests; $(MAKE) clean)
-       @(cd docs; $(MAKE) clean)
+       @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
+       @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
 
 #
 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
@@ -888,6 +1180,93 @@ ca-bundle: lib/mk-ca-bundle.pl
 ca-firefox: lib/firefox-db2pem.sh
        @echo "generate a fresh ca-bundle.crt"
        ./lib/firefox-db2pem.sh lib/ca-bundle.crt
+
+checksrc:
+       cd lib && $(MAKE) checksrc
+       cd src && $(MAKE) checksrc
+
+.PHONY: vc6-ide
+
+vc6-ide:
+       $(MAKE) $(VC6LIBDSP)
+
+$(VC6LIBDSP): $(VC6LIBDSP_DEPS)
+       @(echo "generating '$(VC6LIBDSP)'"; \
+       \
+       for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
+         test -d "$$dir" || mkdir "$$dir" || exit 1; \
+       done; \
+       \
+       dir='..\..\..\lib\'; \
+       body='$(VC6LIBDSP)'.body; \
+       win32_srcs='$(WIN32SOURCES)'; \
+       win32_hdrs='$(WIN32HEADERS)'; \
+       sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
+       sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
+       \
+       echo "# Begin Group \"Source Files\""  > $$body; \
+       echo ""                               >> $$body; \
+       echo "# PROP Default_Filter \"\""     >> $$body; \
+       for file in $$sorted_srcs; do \
+         echo "# Begin Source File"          >> $$body; \
+         echo ""                             >> $$body; \
+         echo "SOURCE="$$dir$$file           >> $$body; \
+         echo "# End Source File"            >> $$body; \
+       done; \
+       echo "# End Group"                    >> $$body; \
+       echo "# Begin Group \"Header Files\"" >> $$body; \
+       echo ""                               >> $$body; \
+       echo "# PROP Default_Filter \"\""     >> $$body; \
+       for file in $$sorted_hdrs; do \
+         echo "# Begin Source File"          >> $$body; \
+         echo ""                             >> $$body; \
+         echo "SOURCE="$$dir$$file           >> $$body; \
+         echo "# End Source File"            >> $$body; \
+       done; \
+       echo "# End Group"                    >> $$body; \
+       \
+       awk '{ printf("%s\r\n", $$0); }' \
+         $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
+         > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
+       \
+       rm -f $$body)
+
+.PHONY: vc8-ide
+
+vc8-ide:
+       $(MAKE) $(VC8LIBPRJ)
+
+$(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
+       @(echo "generating '$(VC8LIBPRJ)'"; \
+       \
+       for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
+         test -d "$$dir" || mkdir "$$dir" || exit 1; \
+       done; \
+       \
+       dir='..\..\..\lib\'; \
+       body='$(VC8LIBPRJ)'.body; \
+       win32_srcs='$(WIN32SOURCES)'; \
+       win32_hdrs='$(WIN32HEADERS)'; \
+       sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
+       sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
+       \
+       echo "%tab%%tab%<Filter Name=\"Source Files\">"  > $$body; \
+       for file in $$sorted_srcs; do \
+         echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
+       done; \
+       echo "%tab%%tab%</Filter>"                      >> $$body; \
+       echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
+       for file in $$sorted_hdrs; do \
+         echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
+       done; \
+       echo "%tab%%tab%</Filter>"                      >> $$body; \
+       \
+       awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
+         $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
+         > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \
+       \
+       rm -f $$body)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 70ac0dc..c796d8d 100644 (file)
@@ -1,51 +1,69 @@
-Curl and libcurl 7.21.3
+Curl and libcurl 7.32.0
 
- Public curl releases:         119
- Command line options:         143
- curl_easy_setopt() options:   185
+ Public curl releases:         134
+ Command line options:         152
+ curl_easy_setopt() options:   199
  Public functions in libcurl:  58
- Known libcurl bindings:       39
- Contributors:                 827
+ Known libcurl bindings:       42
+ Contributors:                 1049
+
+***
+  krb4 support is up for removal. If you care about it at all, speak up
+  on the curl-library list asap!
+***
 
 This release includes the following changes:
 
- o Added --noconfigure switch to testcurl.pl
- o Added --xattr option
- o Added CURLOPT_RESOLVE and --resolve
- o Added CURLAUTH_ONLY
- o Added version-check.pl to the examples dir
+ o curl: allow timeouts to accept decimal values
+ o OS400: add slist and certinfo EBCDIC support
+ o OS400: new SSL backend GSKit
+ o CURLOPT_XFERINFOFUNCTION: introducing a new progress callback
+ o LIBCURL-STRUCTS: new document
 
 This release includes the following bugfixes:
 
- o check for libcurl features for some command line options
- o Curl_setopt: disallow CURLOPT_USE_SSL without SSL support
- o http_chunks: remove debug output
- o URL-parsing: consider ? a divider
- o SSH: avoid using the libssh2_ prefix
- o SSH: use libssh2_session_handshake() to work on win64
- o ftp: prevent server from hanging on closed data connection when stopping
-   a transfer before the end of the full transfer (ranges)
- o LDAP: detect non-binary attributes properly
- o ftp: treat server's response 421 as CURLE_OPERATION_TIMEDOUT
- o gnutls->handshake: improved timeout handling
- o security: Pass the right parameter to init
- o krb5: Use GSS_ERROR to check for error
- o TFTP: resend the correct data
- o configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected
- o GnuTLS: now detects socket errors on Windows
- o symbols-in-versions: updated en masse
- o added a couple examples that were missing from the tar ball
- o Curl_send/recv_plain: return errno on failure
- o Curl_wait_for_resolv (for c-ares): correct timeout
- o ossl_connect_common: detect connection re-use
- o configure: Prevent link errors with --librtmp
- o openldap: use remote port in URL passed to ldap_init_fd()
- o url: provide dead_connection flag in Curl_handler::disconnect
- o lots of compiler warning fixes
- o ssh: fix a download resume point calculation
- o fix getinfo CURLINFO_LOCAL* for reused connections
- o multi: the returned running handles conuter could turn negative
- o multi: only ever consider pipelining for connections doing HTTP(S)
+ o dotdot: introducing dot file path cleanup [1]
+ o docs: fix typo in curl_easy_getinfo manpage
+ o test1230: avoid using hard-wired port number
+ o test1396: invoke the correct test tool
+ o SIGPIPE: ignored while inside the library [2]
+ o darwinssl: fix crash that started happening in Lion
+ o OpenSSL: check for read errors, don't assume [3]
+ o c-ares: improve error message on failed resolve [4]
+ o printf: make sure %x are treated unsigned
+ o formpost: better random boundaries [5]
+ o url: restore the functionality of 'curl -u :' [6]
+ o curl.1: fix typo in --xattr description [7]
+ o digest: improve nonce generation
+ o configure: automake 1.14 compatibility tweak
+ o curl.1: document the --post303 option in the man page
+ o curl.1: document the --sasl-ir option in the man page
+ o setup-vms.h: sk_pop symbol tweak
+ o tool_paramhlp: try harder to catch negatives
+ o cmake: Fix for MSVC2010 project generation [8]
+ o asyn-ares: Don't blank ares servers if none configured
+ o curl_multi_wait: set revents for extra fds
+ o Reinstate "WIN32 MemoryTracking: track wcsdup() _wcsdup() and _tcsdup()
+ o ftp_do_more: consider DO_MORE complete when server connects back [9]
+ o curl_easy_perform: gradually increase the delay time [10]
+ o curl: fix symbolic names for CURLUSESSL_* enum in --libcurl output
+ o curl: fix upload of a zip file in OpenVMS [11]
+ o build: fix linking on Solaris 10 [12]
+ o curl_formadd: CURLFORM_FILECONTENT wrongly rejected some option combos [13]
+ o curl_formadd: fix file upload on VMS [14]
+ o curl_easy_pause: on unpause, trigger mulit-socket handling [15]
+ o md5 & metalink: use better build macros on Apple operating systems [16]
+ o darwinssl: fix build error in crypto authentication under Snow Leopard [16]
+ o curl: make --progress-bar update the line less frequently [17]
+ o configure: don't error out on variable confusions (CFLAGS, LDFLAGS etc)
+ o mk-ca-bundle: skip more untrusted certificates
+ o formadd: wrong pointer for file name when CURLFORM_BUFFERPTR used [18]
+ o FTP: when EPSV gets a 229 but fails to connect, retry with PASV
+ o mk-ca-bundle.1: don't install on make install [19]
+ o VMS: lots of updates and fixes of the build procedure
+ o global dns cache: didn't work (regression)
+ o global dns cache: fix memory leak
+ o 
 
 This release includes the following known bugs:
 
@@ -54,8 +72,34 @@ This release includes the following known bugs:
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
- Dan Fandrich, Guenter Knauf, Pat Ray, Hongli Lai, Kamil Dudka,
- Stefan Tomanek, Alfred Gebert, Yang Tse, Julien Chaffraix, Adam Light,
- Rutger Hofman, Matthias Bolte, Heinrich Ko, Dmitri Shubin
+ Alex Vinnik, Alessandro Ghedini, Nick Zitzmann, Kamil Dudka,
+ Lluis Batlle i Rossell, Nach M. S., Kim Vandry, Ben Greear, Dan Fandrich,
+ Dave Reisner, Evgeny Turnaev, Guenter Knauf, John E. Malmberg, Marc Hoersken,
+ Patrick Monnerat, Sergei Nikulov, Yang Tse, Andreas Malzahn, Clemens Gruber,
+ Jean-Noel Rouvignac, Markus Moeller, Fabian Keil, Dagobert Michelsen,
+ Byrial Jensen, Justin Karneges, Edward Rudd, Marc Doughty, Konstantin Isakov,
 
         Thanks! (and sorry if I forgot to mention someone)
+
+References to bug reports and discussions on issues:
+
+ [1] = http://curl.haxx.se/bug/view.cgi?id=1200
+ [2] = http://curl.haxx.se/bug/view.cgi?id=1180
+ [3] = http://curl.haxx.se/bug/view.cgi?id=1249
+ [4] = http://curl.haxx.se/bug/view.cgi?id=1191
+ [5] = http://curl.haxx.se/bug/view.cgi?id=1251
+ [6] = http://curl.haxx.se/mail/archive-2013-06/0052.html
+ [7] = http://curl.haxx.se/bug/view.cgi?id=1252
+ [8] = http://curl.haxx.se/mail/lib-2013-07/0046.html
+ [9] = http://curl.haxx.se/mail/lib-2013-07/0115.html
+ [10] = http://curl.haxx.se/mail/lib-2013-07/0103.html
+ [11] = http://curl.haxx.se/bug/view.cgi?id=496
+ [12] = http://curl.haxx.se/bug/view.cgi?id=1217
+ [13] = http://curl.haxx.se/mail/lib-2013-07/0258.html
+ [14] = http://curl.haxx.se/bug/view.cgi?id=758
+ [15] = http://curl.haxx.se/mail/lib-2013-07/0239.html
+ [16] = http://curl.haxx.se/bug/view.cgi?id=1255
+ [17] = http://curl.haxx.se/mail/archive-2013-07/0031.html
+ [18] = http://curl.haxx.se/bug/view.cgi?id=1262
+ [19] = http://curl.haxx.se/mail/lib-2013-08/0057.html
index 9f79052..5a3906a 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -51,7 +51,7 @@ CURL_DEF_TOKEN $1
   ],[
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[[ ]][[ ]]*//' 2>/dev/null | \
       "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then
       tmp_exp=""
@@ -130,7 +130,7 @@ int main (void)
     ]])
   ],[
     tst_lib_xnet_required="yes"
-    LIBS="$LIBS -lxnet"
+    LIBS="-lxnet $LIBS"
   ])
   AC_MSG_RESULT([$tst_lib_xnet_required])
 ])
@@ -150,6 +150,7 @@ AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [
 #endif])
   AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl
   AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl
+  AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl
   AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)])
   AC_EGREP_CPP([yes_this_is_aix],[
 #ifdef _AIX
@@ -228,12 +229,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [
       ])
     fi
   ])
-  case "$ac_cv_native_windows" in
-    yes)
-      AC_DEFINE_UNQUOTED(NATIVE_WINDOWS, 1,
-        [Define to 1 if you are building a native Windows target.])
-      ;;
-  esac
+  AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$ac_cv_native_windows" = xyes)
 ])
 
 
@@ -1601,200 +1597,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
   fi
 ])
 
-
-dnl CURL_CHECK_FUNC_RECVFROM
-dnl -------------------------------------------------
-dnl Test if the socket recvfrom() function is available,
-dnl and check its return type and the types of its
-dnl arguments. If the function succeeds HAVE_RECVFROM
-dnl will be defined, defining the types of the arguments
-dnl in RECVFROM_TYPE_ARG1, RECVFROM_TYPE_ARG2, and so on
-dnl to RECVFROM_TYPE_ARG6, defining also the type of the
-dnl function return value in RECVFROM_TYPE_RETV.
-dnl Notice that the types returned for pointer arguments
-dnl will actually be the type pointed by the pointer.
-
-AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
-  AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
-  AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
-  AC_CHECK_HEADERS(sys/types.h sys/socket.h)
-  #
-  AC_MSG_CHECKING([for recvfrom])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-    ]],[[
-      recvfrom(0, 0, 0, 0, 0, 0);
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    curl_cv_recvfrom="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    curl_cv_recvfrom="no"
-  ])
-  #
-  if test "$curl_cv_recvfrom" = "yes"; then
-    AC_CACHE_CHECK([types of args and return type for recvfrom],
-      [curl_cv_func_recvfrom_args], [
-      curl_cv_func_recvfrom_args="unknown"
-      for recvfrom_retv in 'int' 'ssize_t'; do
-        for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
-          for recvfrom_arg2 in 'char *' 'void *'; do
-            for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
-              for recvfrom_arg4 in 'int' 'unsigned int'; do
-                for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
-                  for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
-                    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
-                      AC_COMPILE_IFELSE([
-                        AC_LANG_PROGRAM([[
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define RECVFROMCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVFROMCALLCONV
-#endif
-                          extern $recvfrom_retv RECVFROMCALLCONV
-                          recvfrom($recvfrom_arg1, $recvfrom_arg2,
-                                   $recvfrom_arg3, $recvfrom_arg4,
-                                   $recvfrom_arg5, $recvfrom_arg6);
-                        ]],[[
-                          $recvfrom_arg1 s=0;
-                          $recvfrom_arg2 buf=0;
-                          $recvfrom_arg3 len=0;
-                          $recvfrom_arg4 flags=0;
-                          $recvfrom_arg5 addr=0;
-                          $recvfrom_arg6 addrlen=0;
-                          $recvfrom_retv res=0;
-                          res = recvfrom(s, buf, len, flags, addr, addrlen);
-                        ]])
-                      ],[
-                        curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
-                      ])
-                    fi
-                  done
-                done
-              done
-            done
-          done
-        done
-      done
-    ]) # AC-CACHE-CHECK
-    # Nearly last minute change for this release starts here
-    AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
-      [Define to 1 if you have the recvfrom function.])
-    ac_cv_func_recvfrom="yes"
-    # Nearly last minute change for this release ends here
-    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
-      AC_MSG_WARN([Cannot find proper types to use for recvfrom args])
-    else
-      recvfrom_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
-      IFS=$recvfrom_prev_IFS
-      shift
-      #
-      recvfrom_ptrt_arg2=$[2]
-      recvfrom_ptrt_arg5=$[5]
-      recvfrom_ptrt_arg6=$[6]
-      #
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
-        [Define to the type of arg 1 for recvfrom.])
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG3, $[3],
-        [Define to the type of arg 3 for recvfrom.])
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG4, $[4],
-        [Define to the type of arg 4 for recvfrom.])
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_RETV, $[7],
-        [Define to the function return type for recvfrom.])
-      #
-      prev_sh_opts=$-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set -f
-          ;;
-      esac
-      #
-      recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
-      recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
-      recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
-      #
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2,
-        [Define to the type pointed by arg 2 for recvfrom.])
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5,
-        [Define to the type pointed by arg 5 for recvfrom.])
-      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
-        [Define to the type pointed by arg 6 for recvfrom.])
-      #
-      if test "$recvfrom_type_arg2" = "void"; then
-        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2_IS_VOID, 1,
-          [Define to 1 if the type pointed by arg 2 for recvfrom is void.])
-      fi
-      if test "$recvfrom_type_arg5" = "void"; then
-        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5_IS_VOID, 1,
-          [Define to 1 if the type pointed by arg 5 for recvfrom is void.])
-      fi
-      if test "$recvfrom_type_arg6" = "void"; then
-        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6_IS_VOID, 1,
-          [Define to 1 if the type pointed by arg 6 for recvfrom is void.])
-      fi
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set +f
-          ;;
-      esac
-      #
-      AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
-        [Define to 1 if you have the recvfrom function.])
-      ac_cv_func_recvfrom="yes"
-    fi
-  else
-    AC_MSG_WARN([Unable to link function recvfrom])
-  fi
-])
-
-
 dnl CURL_CHECK_MSG_NOSIGNAL
 dnl -------------------------------------------------
 dnl Check for MSG_NOSIGNAL
@@ -2145,7 +1947,6 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
         else
           LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
         fi
-        CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
         AC_MSG_RESULT([$curl_cv_gclk_LIBS])
         ac_cv_func_clock_gettime="yes"
         ;;
@@ -2302,6 +2103,8 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
   AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
   AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
   #
+  AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl
+  #
   AC_MSG_CHECKING([for curl_socklen_t data type])
   curl_typeof_curl_socklen_t="unknown"
   for arg1 in int SOCKET; do
@@ -2410,6 +2213,45 @@ AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
 ])
 
 
+dnl CURL_CONFIGURE_PULL_SYS_POLL
+dnl -------------------------------------------------
+dnl Find out if system header file sys/poll.h must be included by the
+dnl external interface, making appropriate definitions for template file
+dnl include/curl/curlbuild.h.in to properly configure and use the library.
+dnl
+dnl The need for the sys/poll.h inclusion arises mainly to properly
+dnl interface AIX systems which define macros 'events' and 'revents'.
+
+AC_DEFUN([CURL_CONFIGURE_PULL_SYS_POLL], [
+  AC_REQUIRE([CURL_INCLUDES_POLL])dnl
+  #
+  tst_poll_events_macro_defined="unknown"
+  #
+  AC_COMPILE_IFELSE([
+    AC_LANG_PROGRAM([[
+      $curl_includes_poll
+    ]],[[
+#if defined(events) || defined(revents)
+      return 0;
+#else
+      force compilation error
+#endif
+    ]])
+  ],[
+    tst_poll_events_macro_defined="yes"
+  ],[
+    tst_poll_events_macro_defined="no"
+  ])
+  #
+  if test "$tst_poll_events_macro_defined" = "yes"; then
+    if test "x$ac_cv_header_sys_poll_h" = "xyes"; then
+      CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_POLL_H])
+    fi
+  fi
+  #
+])
+
+
 dnl CURL_CHECK_FUNC_SELECT
 dnl -------------------------------------------------
 dnl Test if the socket select() function is available,
@@ -2777,8 +2619,10 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
     fi
     capath="$want_capath"
     ca="no"
-  else
-    dnl neither of --with-ca-* given
+  elif test "x$cross_compiling" != "xyes"; then
+    dnl NOT cross-compiling and...
+    dnl neither of the --with-ca-* options are provided
+
     dnl first try autodetecting a CA bundle , then a CA path
     dnl both autodetections can be skipped by --without-ca-*
     ca="no"
@@ -2814,10 +2658,11 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
         fi
       done
     fi
+  else
+    dnl no option given and cross-compiling
+    AC_MSG_WARN([skipped the ca-cert path detection when cross-compiling])
   fi
 
-
-
   if test "x$ca" != "xno"; then
     CURL_CA_BUNDLE='"'$ca'"'
     AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle])
@@ -2843,7 +2688,7 @@ AC_DEFUN([DO_CURL_OFF_T_CHECK], [
     tmp_includes=""
     tmp_source=""
     tmp_fmt=""
-    case AS_TR_SH([$1]) in
+    case XC_SH_TR_SH([$1]) in
       int64_t)
         tmp_includes="$curl_includes_inttypes"
         tmp_source="char f@<:@@:>@ = PRId64;"
@@ -2901,7 +2746,7 @@ AC_DEFUN([DO_CURL_OFF_T_SUFFIX_CHECK], [
   curl_suffix_curl_off_t="unknown"
   curl_suffix_curl_off_tu="unknown"
   #
-  case AS_TR_SH([$1]) in
+  case XC_SH_TR_SH([$1]) in
     long_long | __longlong | __longlong_t)
       tst_suffixes="LL::"
       ;;
@@ -3073,7 +2918,7 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
     curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
   else
     x_pull_headers="no"
-    case AS_TR_SH([$curl_typeof_curl_off_t]) in
+    case XC_SH_TR_SH([$curl_typeof_curl_off_t]) in
       long_long | __longlong | __longlong_t)
         curl_format_curl_off_t="lld"
         curl_format_curl_off_tu="llu"
@@ -3181,7 +3026,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
       ;;
     win32_small_files)
       AC_MSG_RESULT([yes (large file disabled)])
-      AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
+      AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
         [Define to 1 if you are building a Windows target without large file support.])
       ;;
     *)
@@ -3207,8 +3052,8 @@ AC_DEFUN([CURL_EXPORT_PCDIR], [
 
 dnl CURL_CHECK_PKGCONFIG ($module, [$pcdir])
 dnl ------------------------
-dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
-dnl variable to hold the path to it, or 'no' if not found/present.
+dnl search for the pkg-config tool. Set the PKGCONFIG variable to hold the
+dnl path to it, or 'no' if not found/present.
 dnl
 dnl If pkg-config is present, check that it has info about the $module or
 dnl return "no" anyway!
@@ -3220,15 +3065,7 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-      dnl see if there's a pkg-specific for this host setup
-      AC_PATH_PROG( PKGCONFIG, ${host}-pkg-config, no,
-                    $PATH:/usr/bin:/usr/local/bin)
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
-    fi
+    AC_PATH_TOOL( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
 
     if test x$PKGCONFIG != xno; then
       AC_MSG_CHECKING([for $1 options with pkg-config])
index e05a191..7f275db 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.13'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.13.3], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.13.3])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -59,7 +85,7 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -85,24 +111,24 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -116,17 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -136,7 +159,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -149,11 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -161,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -180,6 +206,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -191,34 +227,49 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -251,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -261,69 +312,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -332,7 +399,7 @@ done
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
+# is enabled.  FIXME.  This creates each '.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -340,29 +407,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
-
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
@@ -378,16 +430,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -403,48 +459,81 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+                 [_AM_DEPENDENCIES([CC])],
+                 [m4_define([AC_PROG_CC],
+                            m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                 [_AM_DEPENDENCIES([CXX])],
+                 [m4_define([AC_PROG_CXX],
+                            m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES([OBJC])],
+                 [m4_define([AC_PROG_OBJC],
+                            m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+                 [_AM_DEPENDENCIES([OBJCXX])],
+                 [m4_define([AC_PROG_OBJCXX],
+                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -455,18 +544,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -477,17 +567,22 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -504,42 +599,47 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
-
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -547,7 +647,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -557,24 +657,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -582,17 +682,46 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -600,112 +729,54 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
-
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -715,45 +786,60 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+       # -L didn't work.
+       set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+       && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+       # broken ls alias from the environment.  This has actually
+       # happened.  Such a system could not be considered "sane".
+       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -763,9 +849,85 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -773,40 +935,55 @@ AC_MSG_RESULT(yes)])
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -816,75 +993,114 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
@@ -892,12 +1108,20 @@ AC_SUBST([am__untar])
 m4_include([m4/curl-compilers.m4])
 m4_include([m4/curl-confopts.m4])
 m4_include([m4/curl-functions.m4])
+m4_include([m4/curl-openssl.m4])
 m4_include([m4/curl-override.m4])
 m4_include([m4/curl-reentrant.m4])
-m4_include([m4/curl-system.m4])
 m4_include([m4/libtool.m4])
 m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
 m4_include([m4/ltversion.m4])
 m4_include([m4/lt~obsolete.m4])
+m4_include([m4/xc-am-iface.m4])
+m4_include([m4/xc-cc-check.m4])
+m4_include([m4/xc-lt-iface.m4])
+m4_include([m4/xc-translit.m4])
+m4_include([m4/xc-val-flgs.m4])
+m4_include([m4/zz40-xc-ovr.m4])
+m4_include([m4/zz50-xc-ovr.m4])
+m4_include([m4/zz60-xc-ovr.m4])
 m4_include([acinclude.m4])
index f77ed76..a7eb51a 100755 (executable)
--- a/buildconf
+++ b/buildconf
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, 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
 #
 ###########################################################################
 
+#--------------------------------------------------------------------------
+# die prints argument string to stdout and exits this shell script.
+#
 die(){
-       echo "$@"
-       exit
+  echo "buildconf: $@"
+  exit 1
 }
 
 #--------------------------------------------------------------------------
@@ -33,11 +36,8 @@ die(){
 findtool(){
   file="$1"
 
-  if { echo $file | grep "/" >/dev/null 2>&1; } then
-    # we only check for the explicit file name if the file is given
-    # including a slash. Use ./ for current dir. Previously this would
-    # otherwise always cause findtool to search the local dir first, which
-    # is wrong.
+  if { echo "$file" | grep "/" >/dev/null 2>&1; } then
+    # when file is given with a path check it first
     if test -f "$file"; then
       echo "$file"
       return
@@ -80,16 +80,19 @@ removethis(){
 # Ensure that buildconf runs from the subdirectory where configure.ac lives
 #
 if test ! -f configure.ac ||
-  test ! -f src/main.c ||
+  test ! -f src/tool_main.c ||
   test ! -f lib/urldata.h ||
-  test ! -f include/curl/curl.h; then
+  test ! -f include/curl/curl.h ||
+  test ! -f m4/curl-functions.m4; then
   echo "Can not run buildconf from outside of curl's source subdirectory!"
   echo "Change to the subdirectory where buildconf is found, and try again."
   exit 1
 fi
 
 #--------------------------------------------------------------------------
-# autoconf 2.57 or newer
+# autoconf 2.57 or newer. Unpatched version 2.67 does not generate proper
+# configure script. Unpatched version 2.68 is simply unusable, we should
+# disallow 2.68 usage.
 #
 need_autoconf="2.57"
 ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -n 1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
@@ -108,7 +111,15 @@ if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
   exit 1
 fi
 
-echo "buildconf: autoconf version $ac_version (ok)"
+if test "$1" = "2" -a "$2" -eq "67"; then
+  echo "buildconf: autoconf version $ac_version (BAD)"
+  echo "            Unpatched version generates broken configure script."
+elif test "$1" = "2" -a "$2" -eq "68"; then
+  echo "buildconf: autoconf version $ac_version (BAD)"
+  echo "            Unpatched version generates unusable configure script."
+else
+  echo "buildconf: autoconf version $ac_version (ok)"
+fi
 
 am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
 if test -z "$am4te_version"; then
@@ -178,27 +189,24 @@ else
 fi
 
 #--------------------------------------------------------------------------
-# libtool check
+# GNU libtool preliminary check
 #
-LIBTOOL_WANTED_MAJOR=1
-LIBTOOL_WANTED_MINOR=4
-LIBTOOL_WANTED_PATCH=2
-LIBTOOL_WANTED_VERSION=1.4.2
-
-# this approach that tries 'glibtool' first is some kind of work-around for
-# some BSD-systems I believe that use to provide the GNU libtool named
-# glibtool, with 'libtool' being something completely different.
+want_lt_major=1
+want_lt_minor=4
+want_lt_patch=2
+want_lt_version=1.4.2
+
+# This approach that tries 'glibtool' first is intended for systems that
+# have GNU libtool named as 'glibtool' and libtool not being GNU's.
+
 libtool=`findtool glibtool 2>/dev/null`
 if test ! -x "$libtool"; then
   libtool=`findtool ${LIBTOOL:-libtool}`
 fi
-
-if test -z "$LIBTOOLIZE"; then
-  # set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found
-  # $libtool is already the full path
-  libtoolize="${libtool}ize"
-else
-  libtoolize=`findtool $LIBTOOLIZE`
+if test -z "$libtool"; then
+  echo "buildconf: libtool not found."
+  echo "            You need GNU libtool $want_lt_version or newer installed."
+  exit 1
 fi
 
 lt_pver=`$libtool --version 2>/dev/null|head -n 1`
@@ -206,42 +214,55 @@ lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
 lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
 if test -z "$lt_version"; then
   echo "buildconf: libtool not found."
-  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+  echo "            You need GNU libtool $want_lt_version or newer installed."
   exit 1
 fi
 old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
 lt_major=$1
 lt_minor=$2
 lt_patch=$3
-lt_status="good"
 
-if test "$lt_major" = "$LIBTOOL_WANTED_MAJOR"; then
-   if test "$lt_minor" -lt "$LIBTOOL_WANTED_MINOR"; then
-      lt_status="bad"
-   elif test -n "$LIBTOOL_WANTED_PATCH"; then
-       if test "$lt_minor" -gt "$LIBTOOL_WANTED_MINOR"; then
-         lt_status="good"
-       elif test -n "$lt_patch"; then
-          if test "$lt_patch" -lt "$LIBTOOL_WANTED_PATCH"; then
-             lt_status="bad"
-          fi
-       else
-          lt_status="bad"
-       fi
-   fi
+if test -z "$lt_major"; then
+  lt_status="bad"
+elif test "$lt_major" -gt "$want_lt_major"; then
+  lt_status="good"
+elif test "$lt_major" -lt "$want_lt_major"; then
+  lt_status="bad"
+elif test -z "$lt_minor"; then
+  lt_status="bad"
+elif test "$lt_minor" -gt "$want_lt_minor"; then
+  lt_status="good"
+elif test "$lt_minor" -lt "$want_lt_minor"; then
+  lt_status="bad"
+elif test -z "$lt_patch"; then
+  lt_status="bad"
+elif test "$lt_patch" -gt "$want_lt_patch"; then
+  lt_status="good"
+elif test "$lt_patch" -lt "$want_lt_patch"; then
+  lt_status="bad"
+else
+  lt_status="good"
 fi
-if test $lt_status != "good"; then
+if test "$lt_status" != "good"; then
   echo "buildconf: libtool version $lt_version found."
-  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+  echo "            You need GNU libtool $want_lt_version or newer installed."
   exit 1
 fi
 
 echo "buildconf: libtool version $lt_version (ok)"
 
-if test -f "$libtoolize"; then
-  echo "buildconf: libtoolize found"
+#--------------------------------------------------------------------------
+# GNU libtoolize check
+#
+if test -z "$LIBTOOLIZE"; then
+  # use (g)libtoolize from same location as (g)libtool
+  libtoolize="${libtool}ize"
 else
-  echo "buildconf: libtoolize not found. Weird libtool installation!"
+  libtoolize=`findtool $LIBTOOLIZE`
+fi
+if test ! -f "$libtoolize"; then
+  echo "buildconf: libtoolize not found."
+  echo "            You need GNU libtoolize $want_lt_version or newer installed."
   exit 1
 fi
 
@@ -266,6 +287,10 @@ fi
 # perl check
 #
 PERL=`findtool ${PERL:-perl}`
+if test -z "$PERL"; then
+  echo "buildconf: perl not found"
+  exit 1
+fi
 
 #--------------------------------------------------------------------------
 # Remove files generated on previous buildconf/configure run.
@@ -301,6 +326,7 @@ for fname in .deps \
     libcurl.pc \
     libtool \
     libtool.m4 \
+    libtool.m4.tmp \
     ltmain.sh \
     ltoptions.m4 \
     ltsugar.m4 \
@@ -317,32 +343,49 @@ done
 #
 
 echo "buildconf: running libtoolize"
-$libtoolize --copy --automake --force || die "The libtoolize command failed"
+${libtoolize} --copy --automake --force || die "libtoolize command failed"
+
+# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
+# subdirectory and this local copy is patched to fix some warnings that
+# are triggered when running aclocal and using autoconf 2.62 or later.
+
+if test "$lt_major" = "1" && test "$lt_minor" = "5"; then
+  if test -z "$lt_patch" || test "$lt_patch" -lt "26"; then
+    echo "buildconf: copying libtool.m4 to local m4 subdir"
+    ac_dir=`${ACLOCAL:-aclocal} --print-ac-dir`
+    if test -f $ac_dir/libtool.m4; then
+      cp -f $ac_dir/libtool.m4 m4/libtool.m4
+    else
+      echo "buildconf: $ac_dir/libtool.m4 not found"
+    fi
+    if test -f m4/libtool.m4; then
+      echo "buildconf: renaming some variables in local m4/libtool.m4"
+      $PERL -i.tmp -pe \
+        's/lt_prog_compiler_pic_works/lt_cv_prog_compiler_pic_works/g; \
+         s/lt_prog_compiler_static_works/lt_cv_prog_compiler_static_works/g;' \
+        m4/libtool.m4
+      rm -f m4/libtool.m4.tmp
+    fi
+  fi
+fi
 
-if test ! -f m4/curl-functions.m4; then
-  echo "buildconf: cURL m4 macros not found"
-  exit 1
+if test -f m4/libtool.m4; then
+  echo "buildconf: converting all mv to mv -f in local m4/libtool.m4"
+  $PERL -i.tmp -pe 's/\bmv +([^-\s])/mv -f $1/g' m4/libtool.m4
+  rm -f m4/libtool.m4.tmp
 fi
 
 echo "buildconf: running aclocal"
-${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"
+${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "aclocal command failed"
 
-if test -n "$PERL"; then
-  echo "buildconf: running aclocal hack to convert all mv to mv -f"
-  $PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
-else
-  echo "buildconf: perl not found"
-  exit 1
-fi
+echo "buildconf: converting all mv to mv -f in local aclocal.m4"
+$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
 
 echo "buildconf: running autoheader"
-${AUTOHEADER:-autoheader} || die "The autoheader command failed"
-
-echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in"
-cp lib/curl_config.h.in src/curl_config.h.in
+${AUTOHEADER:-autoheader} || die "autoheader command failed"
 
 echo "buildconf: running autoconf"
-${AUTOCONF:-autoconf}     || die "The autoconf command failed"
+${AUTOCONF:-autoconf} || die "autoconf command failed"
 
 if test -d ares; then
   cd ares
@@ -352,14 +395,15 @@ if test -d ares; then
 fi
 
 echo "buildconf: running automake"
-${AUTOMAKE:-automake} -a -c  || die "The automake command failed"
+${AUTOMAKE:-automake} --add-missing --copy || die "automake command failed"
 
 #--------------------------------------------------------------------------
+# GNU libtool complementary check
+#
 # Depending on the libtool and automake versions being used, config.guess
 # might not be installed in the subdirectory until automake has finished.
 # So we can not attempt to use it until this very last buildconf stage.
 #
-
 if test ! -f ./config.guess; then
   echo "buildconf: config.guess not found"
 else
@@ -403,7 +447,7 @@ else
     if test "$lt_status" != "good"; then
       need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
       echo "buildconf: libtool version $lt_version found."
-      echo "            $buildhost requires libtool $need_lt_version or newer installed."
+      echo "            $buildhost requires GNU libtool $need_lt_version or newer installed."
       rm -f configure
       exit 1
     fi
@@ -411,8 +455,7 @@ else
 fi
 
 #--------------------------------------------------------------------------
-# Finished succesfully.
+# Finished successfully.
 #
-
 echo "buildconf: OK"
 exit 0
diff --git a/compile b/compile
index 1b1d232..531136b 100755 (executable)
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2005-05-14.22
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,7 @@ scriptversion=2005-05-14.22
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -29,21 +28,224 @@ scriptversion=2005-05-14.22
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: compile [--help] [--version] PROGRAM [ARGS]
 
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
 arguments, and rename the output as expected.
 
 If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
@@ -53,11 +255,13 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
 esac
 
 ofile=
 cfile=
-eat=
 
 for arg
 do
@@ -66,8 +270,8 @@ do
   else
     case $1 in
       -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
+       # configure might choose to run compile as 'compile cc -o foo foo.c'.
+       # So we strip '-o arg' only if arg is an object.
        eat=1
        case $2 in
          *.o | *.obj)
@@ -94,22 +298,22 @@ do
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
+  # If no '-o' option was seen then we might have been invoked from a
   # pattern rule where we don't need one.  That is ok -- this is a
   # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
+  # '.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
 
 # Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
 while true; do
   if mkdir "$lockdir" >/dev/null 2>&1; then
     break
@@ -124,9 +328,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
 ret=$?
 
 if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
 elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
 fi
 
 rmdir "$lockdir"
@@ -138,5 +342,6 @@ exit $ret
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index c2246a4..120cc0d 100755 (executable)
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2013-05-16'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2009-12-30'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
@@ -181,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
                ;;
        esac
        # The OS release
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
        exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+       exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -224,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
        exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -395,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -481,8 +501,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
        then
            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +515,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -552,7 +572,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -595,52 +615,52 @@ EOF
            9000/[678][0-9][0-9])
                if [ -x /usr/bin/getconf ]; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                   case "${sc_cpu_version}" in
+                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     532)                      # CPU_PA_RISC2_0
+                       case "${sc_kernel_bits}" in
+                         32) HP_ARCH="hppa2.0n" ;;
+                         64) HP_ARCH="hppa2.0w" ;;
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
 EOF
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +751,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -770,14 +790,14 @@ EOF
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -789,30 +809,35 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
     *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case ${UNAME_PROCESSOR} in
            amd64)
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
            *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
        esac
        exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
+    i*:MSYS*:*)
+       echo ${UNAME_MACHINE}-pc-msys
+       exit ;;
     i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
        exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
     *:Interix*:*)
-       case ${UNAME_MACHINE} in
+       case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
@@ -849,15 +874,22 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    aarch64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -867,52 +899,56 @@ EOF
          EV6)   UNAME_MACHINE=alphaev6 ;;
          EV67)  UNAME_MACHINE=alphaev67 ;;
          EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+       esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+           fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    hexagon:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -931,51 +967,57 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
+    or1k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+       echo powerpc64-unknown-linux-${LIBC}
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+       echo powerpc-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1026,11 @@ EOF
        echo i386-sequent-sysv4
        exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1062,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1048,13 +1090,13 @@ EOF
        exit ;;
     pc:*:*:*)
        # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
        # prints for the "djgpp" host, or else GDB configury will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
-        exit ;;
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1089,8 +1131,8 @@ EOF
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
        OS_REL='.3'
        test -r /etc/.relid \
@@ -1133,10 +1175,10 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
@@ -1162,11 +1204,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1179,6 +1221,9 @@ EOF
     BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
        echo i586-pc-haiku
        exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1205,19 +1250,21 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               case $UNAME_PROCESSOR in
+                   i386) UNAME_PROCESSOR=x86_64 ;;
+                   powerpc) UNAME_PROCESSOR=powerpc64 ;;
+               esac
+           fi
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1231,7 +1278,10 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1276,13 +1326,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       echo mips-sei-seiux${UNAME_RELEASE}
        exit ;;
     *:DragonFly:*:*)
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1300,11 +1350,11 @@ EOF
     i*86:AROS:*:*)
        echo ${UNAME_MACHINE}-pc-aros
        exit ;;
+    x86_64:VMkernel:*:*)
+       echo ${UNAME_MACHINE}-unknown-esx
+       exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
@@ -1322,11 +1372,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+       "4"
 #else
-         ""
+       ""
 #endif
-         ); exit (0);
+       ); exit (0);
 #endif
 #endif
 
index c2d1257..8b612ab 100755 (executable)
@@ -1,38 +1,31 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2013-04-24'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,13 +115,18 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -153,12 +149,12 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray | -microblaze)
+       -apple | -axis | -knuth | -cray | -microblaze*)
                os=
                basic_machine=$1
                ;;
-        -bluegene*)
-               os=-cnk
+       -bluegene*)
+               os=-cnk
                ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
@@ -174,10 +170,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -222,6 +218,12 @@ case $os in
        -isc*)
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -lynx*178)
+               os=-lynxos178
+               ;;
+       -lynx*5)
+               os=-lynxos5
+               ;;
        -lynx*)
                os=-lynxos
                ;;
@@ -246,20 +248,27 @@ case $basic_machine in
        # Some are omitted here because they have special meanings below.
        1750a | 580 \
        | a29k \
+       | aarch64 | aarch64_be \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | arc | arceb \
+       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+       | avr | avr32 \
+       | be32 | be64 \
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
+       | epiphany \
        | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep | metag \
+       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -277,34 +286,45 @@ case $basic_machine in
        | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
-       | nios | nios2 \
+       | nds32 | nds32le | nds32be \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | or32 \
+       | open8 \
+       | or1k | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
-       | rx \
+       | rl78 | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
-       | v850 | v850e \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-               # Motorola 68HC11/12.
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -314,6 +334,21 @@ case $basic_machine in
                basic_machine=mt-unknown
                ;;
 
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+       xgate)
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
@@ -328,25 +363,30 @@ case $basic_machine in
        # Recognize the basic CPU types with company name.
        580-* \
        | a29k-* \
+       | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | be32-* | be64-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | microblaze-* | microblazeel-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -364,30 +404,34 @@ case $basic_machine in
        | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
-       | nios-* | nios2-* \
+       | nds32-* | nds32le-* | nds32be-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | romp-* | rs6000-* | rx-* \
+       | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tile-* | tilegx-* \
+       | tile*-* \
        | tron-* \
        | ubicom32-* \
-       | v850-* | v850e-* | vax-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
        | z8k-* | z80-*)
@@ -412,7 +456,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -482,11 +526,20 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
-        cegcc)
+       cegcc)
                basic_machine=arm-unknown
                os=-cegcc
                ;;
@@ -518,7 +571,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -676,7 +729,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -734,9 +786,13 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-        microblaze)
+       microblaze*)
                basic_machine=microblaze-xilinx
                ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -773,10 +829,18 @@ case $basic_machine in
        ms1-*)
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
+       msys)
+               basic_machine=i386-pc
+               os=-msys
+               ;;
        mvs)
                basic_machine=i370-ibm
                os=-mvs
                ;;
+       nacl)
+               basic_machine=le32-unknown
+               os=-nacl
+               ;;
        ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
@@ -841,6 +905,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -923,9 +993,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -950,7 +1021,11 @@ case $basic_machine in
                basic_machine=i586-unknown
                os=-pw32
                ;;
-       rdos)
+       rdos | rdos64)
+               basic_machine=x86_64-pc
+               os=-rdos
+               ;;
+       rdos32)
                basic_machine=i386-pc
                os=-rdos
                ;;
@@ -1019,6 +1094,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1075,25 +1153,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-        # This must be matched before tile*.
-        tilegx*)
-               basic_machine=tilegx-unknown
-               os=-linux-gnu
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1163,6 +1224,9 @@ case $basic_machine in
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
@@ -1260,11 +1324,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # First match some system type aliases
+       # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
-        -auroraux)
-               os=-auroraux
+       -auroraux)
+               os=-auroraux
                ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1288,20 +1352,21 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1348,7 +1413,7 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
        -wince*)
@@ -1397,7 +1462,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1433,17 +1498,14 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
        -dicos*)
                os=-dicos
                ;;
-        -nacl*)
-               ;;
+       -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1466,10 +1528,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1481,8 +1543,20 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       hexagon-*)
+               os=-elf
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1502,14 +1576,11 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1518,6 +1589,9 @@ case $basic_machine in
        mips*-*)
                os=-elf
                ;;
+       or1k-*)
+               os=-elf
+               ;;
        or32-*)
                os=-coff
                ;;
@@ -1536,7 +1610,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
index a730b0a..618bea8 100755 (executable)
--- a/configure
+++ b/configure
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for curl -.
+# Generated by GNU Autoconf 2.69 for curl -.
 #
 # Report bugs to <a suitable curl mailing list: http://curl.haxx.se/mail/>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
+# Copyright (c) 1998 - 2013 Daniel Stenberg, <daniel@haxx.se>
 # This configure script may be copied, distributed and modified under the
 # terms of the curl license; see COPYING for more details
+
+## -------------------------------- ##
+##  XC_CONFIGURE_PREAMBLE ver: 1.0  ##
+## -------------------------------- ##
+
+xc_configure_preamble_ver_major='1'
+xc_configure_preamble_ver_minor='0'
+
+#
+# Set IFS to space, tab and newline.
+#
+
+xc_space=' '
+xc_tab='       '
+xc_newline='
+'
+IFS="$xc_space$xc_tab$xc_newline"
+
+#
+# Set internationalization behavior variables.
+#
+
+LANG='C'
+LC_ALL='C'
+LANGUAGE='C'
+export LANG
+export LC_ALL
+export LANGUAGE
+
+#
+# Some useful variables.
+#
+
+xc_msg_warn='configure: WARNING:'
+xc_msg_abrt='Can not continue.'
+xc_msg_err='configure: error:'
+
+#
+# Verify that 'echo' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    # Try built-in echo, and fail.
+    echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'test' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'PATH' variable is set, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'expr' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
+case "x$xc_tst_str" in # ((
+  x7)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'sed' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | sed -e 's:unknown:success:' 2>/dev/null`
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'grep' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" 2>/dev/null \
+  | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'tr' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | tr -d "0123456789$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in # ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'wc' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown unknown unknown unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in # ((
+  x4)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Verify that 'cat' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`cat <<_EOT 2>/dev/null \
+  | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
+unknown
+unknown
+unknown
+_EOT`
+case "x$xc_tst_str" in # ((
+  x3)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+
+#
+# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
+#
+
+# Directory count in 'PATH' when using a colon separator.
+xc_tst_dirs_col='x'
+xc_tst_prev_IFS=$IFS; IFS=':'
+for xc_tst_dir in $PATH; do
+  IFS=$xc_tst_prev_IFS
+  xc_tst_dirs_col="x$xc_tst_dirs_col"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
+
+# Directory count in 'PATH' when using a semicolon separator.
+xc_tst_dirs_sem='x'
+xc_tst_prev_IFS=$IFS; IFS=';'
+for xc_tst_dir in $PATH; do
+  IFS=$xc_tst_prev_IFS
+  xc_tst_dirs_sem="x$xc_tst_dirs_sem"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
+
+if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
+  # When both counting methods give the same result we do not want to
+  # chose one over the other, and consider auto-detection not possible.
+  if test -z "$PATH_SEPARATOR"; then
+    # Stop dead until user provides 'PATH_SEPARATOR' definition.
+    echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2
+    exit 1
+  fi
+else
+  # Separator with the greater directory count is the auto-detected one.
+  if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then
+    xc_tst_auto_separator=';'
+  else
+    xc_tst_auto_separator=':'
+  fi
+  if test -z "$PATH_SEPARATOR"; then
+    # Simply use the auto-detected one when not already set.
+    PATH_SEPARATOR=$xc_tst_auto_separator
+  elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
+    echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
+  fi
+fi
+xc_PATH_SEPARATOR=$PATH_SEPARATOR
+
+xc_configure_preamble_result='yes'
+
+
 ## -------------------- ##
 ## M4sh Initialization. ##
 ## -------------------- ##
@@ -78,44 +318,6 @@ else
 fi
 
 
-  if test -z "$curl_cv_PATH_SEPARATOR"; then
-    if test -z "$PATH"; then
-      as_fn_error $? "PATH not set. Cannot continue without PATH being set."
-    fi
-        tst_dirs_col=0
-    tst_save_IFS=$IFS; IFS=':'
-    for tst_dir in $PATH; do
-      IFS=$tst_save_IFS
-      test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
-    done
-    IFS=$tst_save_IFS
-        tst_dirs_sem=0
-    tst_save_IFS=$IFS; IFS=';'
-    for tst_dir in $PATH; do
-      IFS=$tst_save_IFS
-      test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
-    done
-    IFS=$tst_save_IFS
-    if test $tst_dirs_sem -eq $tst_dirs_col; then
-                  if test -z "$PATH_SEPARATOR"; then
-                as_fn_error $? "PATH_SEPARATOR not set. Cannot continue without it."
-      fi
-    else
-            if test $tst_dirs_sem -gt $tst_dirs_col; then
-        tst_auto_separator=';'
-      else
-        tst_auto_separator=':'
-      fi
-      if test -z "$PATH_SEPARATOR"; then
-                PATH_SEPARATOR="$tst_auto_separator"
-      fi
-    fi
-    curl_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
-  fi
-
-
-
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -125,6 +327,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -169,6 +372,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -202,12 +430,21 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
+test \$(( 1 + 1 )) = 2 || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
   if (eval "$as_required") 2>/dev/null; then :
   as_have_required=yes
 else
@@ -247,14 +484,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -357,6 +605,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -478,6 +734,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -512,16 +772,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -533,28 +793,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -562,155 +802,8 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 # Sed expression to map a string onto a valid variable name.
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-
-
-# Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-$*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-          test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-         # Cool, printf works
-         :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-         export CONFIG_SHELL
-         SHELL="$CONFIG_SHELL"
-         export SHELL
-         ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        else
-         # maybe with a smaller string...
-         prev=:
-
-         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-           then
-             break
-           fi
-           prev="$cmd"
-         done
-
-         if test "$prev" != 'sed 50q "$0"'; then
-           echo_test_string=`eval $prev`
-           export echo_test_string
-           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-         else
-           # Oops.  We lost completely, so just stick with echo.
-           ECHO=echo
-         fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
@@ -778,20 +871,25 @@ ac_includes_default="\
 #endif"
 
 enable_option_checking=no
-ac_subst_vars='LTLIBOBJS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
 SUPPORT_PROTOCOLS
 SUPPORT_FEATURES
+ENABLE_STATIC
 ENABLE_SHARED
 CROSSCOMPILING_FALSE
 CROSSCOMPILING_TRUE
+BLANK_AT_MAKETIME
+CURL_NETWORK_AND_TIME_LIBS
 CURL_NETWORK_LIBS
-TEST_SERVER_LIBS
-CURL_LIBS
 LIBCURL_LIBS
 SONAME_BUMP_FALSE
 SONAME_BUMP_TRUE
-USE_WINDOWS_SSPI
+CFLAG_CURL_SYMBOL_HIDING
+DOING_CURL_SYMBOL_HIDING_FALSE
+DOING_CURL_SYMBOL_HIDING_TRUE
 BUILD_LIBHOSTNAME_FALSE
 BUILD_LIBHOSTNAME_TRUE
 USE_EMBEDDED_ARES_FALSE
@@ -805,22 +903,37 @@ NROFF
 PERL
 IPV6_ENABLED
 IDN_ENABLED
+CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE
+CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE
+CURL_LT_SHLIB_VERSIONED_FLAVOUR
 USE_LIBRTMP
 USE_LIBSSH2
+LIBMETALINK_CPPFLAGS
+LIBMETALINK_LDFLAGS
+LIBMETALINK_LIBS
 CURL_CA_BUNDLE
 SSL_ENABLED
+USE_AXTLS
+HAVE_NSS_INITCONTEXT
 USE_NSS
-HAVE_PK11_CREATEGENERICOBJECT
+USE_CYASSL
 USE_POLARSSL
+HAVE_GNUTLS_SRP
+USE_GNUTLS_NETTLE
 USE_GNUTLS
+HAVE_SSLEAY_SRP
 RANDOM_FILE
-HAVE_LIBZ_FALSE
-HAVE_LIBZ_TRUE
-HAVE_LIBZ
 USE_SSLEAY
 PKGCONFIG
+USE_DARWINSSL
+USE_WINDOWS_SSPI
+USE_SCHANNEL
 KRB4_ENABLED
 USE_OPENLDAP
+ZLIB_LIBS
+HAVE_LIBZ_FALSE
+HAVE_LIBZ_TRUE
+HAVE_LIBZ
 CURL_DISABLE_GOPHER
 CURL_DISABLE_SMTP
 CURL_DISABLE_IMAP
@@ -836,22 +949,32 @@ CURL_DISABLE_FILE
 CURL_DISABLE_FTP
 CURL_DISABLE_RTSP
 CURL_DISABLE_HTTP
+DOING_NATIVE_WINDOWS_FALSE
+DOING_NATIVE_WINDOWS_TRUE
+BUILD_UNITTESTS_FALSE
+BUILD_UNITTESTS_TRUE
 CURLDEBUG_FALSE
 CURLDEBUG_TRUE
-NO_UNDEFINED_FALSE
-NO_UNDEFINED_TRUE
+USE_EXPLICIT_LIB_DEPS_FALSE
+USE_EXPLICIT_LIB_DEPS_TRUE
 REQUIRE_LIB_DEPS
-STATICLIB_FALSE
-STATICLIB_TRUE
-MIMPURE_FALSE
-MIMPURE_TRUE
+CPPFLAG_CURL_STATICLIB
+USE_CPPFLAG_CURL_STATICLIB_FALSE
+USE_CPPFLAG_CURL_STATICLIB_TRUE
+CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE
+CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE
+CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE
+CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE
+CURL_LT_SHLIB_USE_VERSION_INFO_FALSE
+CURL_LT_SHLIB_USE_VERSION_INFO_TRUE
 OTOOL64
 OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
-lt_ECHO
+MANIFEST_TOOL
 RANLIB
+ac_ct_AR
 LN_S
 NM
 ac_ct_DUMPBIN
@@ -862,23 +985,6 @@ LIBTOOL
 OBJDUMP
 DLLTOOL
 AS
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
 host_os
 host_vendor
 host_cpu
@@ -891,6 +997,21 @@ PKGADD_VENDOR
 PKGADD_NAME
 PKGADD_PKG
 VERSIONNUM
+CURLVERSION
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
 am__untar
 am__tar
 AMTAR
@@ -898,6 +1019,7 @@ am__leading_dot
 SET_MAKE
 AWK
 mkdir_p
+MKDIR_P
 INSTALL_STRIP_PROGRAM
 STRIP
 install_sh
@@ -909,6 +1031,15 @@ ACLOCAL
 VERSION
 PACKAGE
 CYGPATH_W
+am__isrc
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -959,7 +1090,6 @@ PACKAGE_VERSION
 PACKAGE_TARNAME
 PACKAGE_NAME
 SHELL
-PATH
 PATH_SEPARATOR'
 ac_subst_files=''
 ac_user_opts='
@@ -970,14 +1100,18 @@ enable_optimize
 enable_warnings
 enable_werror
 enable_curldebug
+enable_symbol_hiding
+enable_hidden_symbols
 enable_ares
 enable_dependency_tracking
+enable_silent_rules
 enable_largefile
 enable_shared
 enable_static
 with_pic
 enable_fast_install
 with_gnu_ld
+with_sysroot
 enable_libtool_lock
 enable_http
 enable_ftp
@@ -994,7 +1128,9 @@ enable_imap
 enable_smtp
 enable_gopher
 enable_manual
+enable_libcurl_option
 enable_libgcc
+with_zlib
 with_ldap_lib
 with_lber_lib
 enable_ipv6
@@ -1005,25 +1141,31 @@ with_spnego
 with_gssapi_includes
 with_gssapi_libs
 with_gssapi
+with_winssl
+with_darwinssl
 with_ssl
-with_zlib
 with_egd_socket
 with_random
 with_gnutls
 with_polarssl
+with_cyassl
 with_nss
+with_axtls
 with_ca_bundle
 with_ca_path
+with_libmetalink
 with_libssh2
 with_librtmp
+enable_versioned_symbols
+with_winidn
 with_libidn
-enable_nonblocking
 enable_threaded_resolver
 enable_verbose
 enable_sspi
 enable_crypto_auth
+enable_ntlm_wb
+enable_tls_srp
 enable_cookies
-enable_hidden_symbols
 enable_soname_bump
 '
       ac_precious_vars='build_alias
@@ -1439,7 +1581,7 @@ Try \`$0 --help' for more information"
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1490,8 +1632,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1655,8 +1795,9 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --enable-debug          Enable debug build options
   --disable-debug         Disable debug build options
   --enable-optimize       Enable compiler optimizations
@@ -1667,10 +1808,19 @@ Optional Features:
   --disable-werror        Disable compiler warnings as errors
   --enable-curldebug      Enable curl debug memory tracking
   --disable-curldebug     Disable curl debug memory tracking
+  --enable-symbol-hiding  Enable hiding of library internal symbols
+  --disable-symbol-hiding Disable hiding of library internal symbols
+  --enable-hidden-symbols To be deprecated, use --enable-symbol-hiding
+  --disable-hidden-symbols
+                          To be deprecated, use --disable-symbol-hiding
   --enable-ares[=PATH]    Enable c-ares for DNS lookups
   --disable-ares          Disable c-ares for DNS lookups
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
   --disable-largefile     omit support for large files
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
@@ -1707,11 +1857,16 @@ Optional Features:
   --disable-gopher        Disable Gopher support
   --enable-manual         Enable built-in manual
   --disable-manual        Disable built-in manual
+  --enable-libcurl-option Enable --libcurl C code generation support
+  --disable-libcurl-option
+                          Disable --libcurl C code generation support
   --enable-libgcc         use libgcc when linking
   --enable-ipv6           Enable ipv6 (with ipv4) support
   --disable-ipv6          Disable ipv6 support
-  --enable-nonblocking    Enable non-blocking communications
-  --disable-nonblocking   Disable non-blocking communications
+  --enable-versioned-symbols
+                          Enable versioned symbols in shared library
+  --disable-versioned-symbols
+                          Disable versioned symbols in shared library
   --enable-threaded-resolver
                           Enable threaded resolver
   --disable-threaded-resolver
@@ -1722,20 +1877,28 @@ Optional Features:
   --disable-sspi          Disable SSPI
   --enable-crypto-auth    Enable cryptographic authentication
   --disable-crypto-auth   Disable cryptographic authentication
+  --enable-ntlm-wb[=FILE] Enable NTLM delegation to winbind's ntlm_auth
+                          helper, where FILE is ntlm_auth's absolute filename
+                          (default: /usr/bin/ntlm_auth)
+  --disable-ntlm-wb       Disable NTLM delegation to winbind's ntlm_auth
+                          helper
+  --enable-tls-srp        Enable TLS-SRP authentication
+  --disable-tls-srp       Disable TLS-SRP authentication
   --enable-cookies        Enable cookies support
   --disable-cookies       Disable cookies support
-  --enable-hidden-symbols Hide internal symbols in library
-  --disable-hidden-symbols
-                          Leave all symbols with default visibility in library
   --enable-soname-bump    Enable enforced SONAME bump
   --disable-soname-bump   Disable enforced SONAME bump
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+  --with-zlib=PATH        search for zlib in PATH
+  --without-zlib          disable use of zlib
   --with-ldap-lib=libname Specify name of ldap lib file
   --with-lber-lib=libname Specify name of lber lib file
   --with-krb4-includes=DIR
@@ -1747,39 +1910,53 @@ Optional Packages:
                           Specify location of GSSAPI header
   --with-gssapi-libs=DIR  Specify location of GSSAPI libs
   --with-gssapi=DIR       Where to look for GSSAPI
+  --with-winssl           enable Windows native SSL/TLS
+  --without-winssl        disable Windows native SSL/TLS
+  --with-darwinssl        enable iOS/Mac OS X native SSL/TLS
+  --without-darwinssl     disable iOS/Mac OS X native SSL/TLS
   --with-ssl=PATH         Where to look for OpenSSL, PATH points to the SSL
                           installation (default: /usr/local/ssl); when
                           possible, set the PKG_CONFIG_PATH environment
                           variable instead of using this option
   --without-ssl           disable OpenSSL
-  --with-zlib=PATH        search for zlib in PATH
-  --without-zlib          disable use of zlib
   --with-egd-socket=FILE  Entropy Gathering Daemon socket pathname
   --with-random=FILE      read randomness from FILE (default=/dev/urandom)
   --with-gnutls=PATH      where to look for GnuTLS, PATH points to the
-                          installation root (default: /usr/local/)
+                          installation root
   --without-gnutls        disable GnuTLS detection
   --with-polarssl=PATH    where to look for PolarSSL, PATH points to the
-                          installation root (default: /usr/local/)
+                          installation root
   --without-polarssl      disable PolarSSL detection
+  --with-cyassl=PATH      where to look for CyaSSL, PATH points to the
+                          installation root (default: system lib default)
+  --without-cyassl        disable CyaSSL detection
   --with-nss=PATH         where to look for NSS, PATH points to the
-                          installation root (default: /usr/local/)
+                          installation root
   --without-nss           disable NSS detection
+  --with-axtls=PATH       Where to look for axTLS, PATH points to the axTLS
+                          installation prefix (default: /usr/local). Ignored
+                          if another SSL engine is selected.
+  --without-axtls         disable axTLS
   --with-ca-bundle=FILE   File name to use as CA bundle
   --without-ca-bundle     Don't use a default CA bundle
   --with-ca-path=DIRECTORY
                           Directory to use as CA path
   --without-ca-path       Don't use a default CA path
+  --with-libmetalink=PATH where to look for libmetalink, PATH points to the
+                          installation root
+  --without-libmetalink   disable libmetalink detection
   --with-libssh2=PATH     Where to look for libssh2, PATH points to the
-                          LIBSSH2 installation (default: /usr/local/lib); when
-                          possible, set the PKG_CONFIG_PATH environment
-                          variable instead of using this option
+                          LIBSSH2 installation; when possible, set the
+                          PKG_CONFIG_PATH environment variable instead of
+                          using this option
   --without-libssh2       disable LIBSSH2
   --with-librtmp=PATH     Where to look for librtmp, PATH points to the
-                          LIBRTMP installation (default: /usr/local/lib); when
-                          possible, set the PKG_CONFIG_PATH environment
-                          variable instead of using this option
+                          LIBRTMP installation; when possible, set the
+                          PKG_CONFIG_PATH environment variable instead of
+                          using this option
   --without-librtmp       disable LIBRTMP
+  --with-winidn=PATH      enable Windows native IDN
+  --without-winidn        disable Windows native IDN
   --with-libidn=PATH      Enable libidn usage
   --without-libidn        Disable libidn usage
 
@@ -1860,13 +2037,13 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 curl configure -
-generated by GNU Autoconf 2.67
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
+Copyright (c) 1998 - 2013 Daniel Stenberg, <daniel@haxx.se>
 This configure script may be copied, distributed and modified under the
 terms of the curl license; see COPYING for more details
 _ACEOF
@@ -1910,11 +2087,48 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
 
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
 # -------------------------------------------------------
 # Tests whether HEADER exists and can be compiled using the include files in
@@ -1924,7 +2138,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1942,7 +2156,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1983,7 +2197,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -2004,7 +2218,8 @@ $4
 int main (void)
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
  ;
  return 0;
@@ -2019,7 +2234,8 @@ $4
 int main (void)
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
  ;
  return 0;
@@ -2044,7 +2260,8 @@ $4
 int main (void)
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
  ;
  return 0;
@@ -2059,7 +2276,8 @@ $4
 int main (void)
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
  ;
  return 0;
@@ -2092,7 +2310,8 @@ $4
 int main (void)
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
  ;
  return 0;
@@ -2155,48 +2374,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 rm -f conftest.val
 
   fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
 
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2224,7 +2406,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2238,7 +2420,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2251,7 +2433,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2290,7 +2472,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2302,10 +2484,10 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -2372,7 +2554,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -2381,7 +2563,7 @@ eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -2394,7 +2576,7 @@ ac_fn_c_check_type ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -2433,7 +2615,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
 cat >config.log <<_ACEOF
@@ -2441,7 +2623,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by curl $as_me -, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2699,7 +2881,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2791,13 +2973,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
 # using curl-override.m4
 
 
 
 
 
-ac_config_headers="$ac_config_headers lib/curl_config.h src/curl_config.h include/curl/curlbuild.h"
+ac_config_headers="$ac_config_headers lib/curl_config.h include/curl/curlbuild.h"
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
@@ -2810,9 +2996,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
 $as_echo "$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
+   if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
   MAINTAINER_MODE_FALSE='#'
 else
@@ -2960,6 +3144,38 @@ $as_echo "yes" >&6; }
   esac
 
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hiding of library internal symbols" >&5
+$as_echo_n "checking whether to enable hiding of library internal symbols... " >&6; }
+  OPT_SYMBOL_HIDING="default"
+  # Check whether --enable-symbol-hiding was given.
+if test "${enable_symbol_hiding+set}" = set; then :
+  enableval=$enable_symbol_hiding; OPT_SYMBOL_HIDING=$enableval
+fi
+
+  # Check whether --enable-hidden-symbols was given.
+if test "${enable_hidden_symbols+set}" = set; then :
+  enableval=$enable_hidden_symbols; OPT_SYMBOL_HIDING=$enableval
+fi
+
+  case "$OPT_SYMBOL_HIDING" in
+    no)
+                              want_symbol_hiding="no"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      ;;
+    default)
+                  want_symbol_hiding="yes"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      ;;
+    *)
+                        want_symbol_hiding="yes"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      ;;
+  esac
+
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable c-ares for DNS lookups" >&5
 $as_echo_n "checking whether to enable c-ares for DNS lookups... " >&6; }
   OPT_ARES="default"
@@ -2986,7 +3202,35 @@ fi
 $as_echo "$want_ares" >&6; }
 
 
+#
+# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
+#
+
+if test -z "$xc_configure_preamble_result"; then
+  as_fn_error $? "xc_configure_preamble_result not set (internal problem)" "$LINENO" 5
+fi
+
+#
+# Check that 'PATH_SEPARATOR' has already been set.
+#
 
+if test -z "$xc_PATH_SEPARATOR"; then
+  as_fn_error $? "xc_PATH_SEPARATOR not set (internal problem)" "$LINENO" 5
+fi
+if test -z "$PATH_SEPARATOR"; then
+  as_fn_error $? "PATH_SEPARATOR not set (internal or config.site problem)" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for path separator" >&5
+$as_echo_n "checking for path separator... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_SEPARATOR" >&5
+$as_echo "$PATH_SEPARATOR" >&6; }
+if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initial path separator" >&5
+$as_echo_n "checking for initial path separator... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_PATH_SEPARATOR" >&5
+$as_echo "$xc_PATH_SEPARATOR" >&6; }
+  as_fn_error $? "path separator mismatch (internal or config.site problem)" "$LINENO" 5
+fi
 
 
 #
@@ -3006,7 +3250,7 @@ if test -z "$SED"; then
 set dummy sed; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $SED in
@@ -3021,7 +3265,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3055,7 +3299,7 @@ if test -z "$GREP"; then
 set dummy grep; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GREP in
@@ -3070,7 +3314,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3111,7 +3355,7 @@ $as_echo "$EGREP" >&6; }
 set dummy egrep; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $EGREP in
@@ -3126,7 +3370,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3162,7 +3406,7 @@ if test -z "$AR"; then
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_AR+set}" = set; then :
+if ${ac_cv_path_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $AR in
@@ -3177,7 +3421,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3206,7 +3450,7 @@ if test -z "$ac_cv_path_AR"; then
 set dummy ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_AR+set}" = set; then :
+if ${ac_cv_path_ac_pt_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_AR in
@@ -3221,7 +3465,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3269,8 +3513,181 @@ if test -f ${srcdir}/include/curl/curlbuild.h; then
   rm -f ${srcdir}/include/curl/curlbuild.h
 fi
 
-VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
-am__api_version="1.9"
+CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
+
+  xc_prog_cc_prev_IFS=$IFS
+  xc_prog_cc_prev_LIBS=$LIBS
+  xc_prog_cc_prev_CFLAGS=$CFLAGS
+  xc_prog_cc_prev_LDFLAGS=$LDFLAGS
+  xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS
+
+
+
+  xc_bad_var_libs=no
+  for xc_word in $LIBS; do
+    case "$xc_word" in
+      -l* | --library=*)
+        :
+        ;;
+      *)
+        xc_bad_var_libs=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_libs = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5
+$as_echo "$as_me: using LIBS: $LIBS" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5
+$as_echo "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;}
+  fi
+
+
+  xc_bad_var_ldflags=no
+  for xc_word in $LDFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -U*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -I*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_ldflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_ldflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5
+$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;}
+    xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
+    for xc_word in $LDFLAGS; do
+      case "$xc_word" in
+        -D*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -U*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -I*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+
+  xc_bad_var_cppflags=no
+  for xc_word in $CPPFLAGS; do
+    case "$xc_word" in
+      -rpath*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cppflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cppflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5
+$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;}
+    xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
+    for xc_word in $CPPFLAGS; do
+      case "$xc_word" in
+        -rpath*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -L* | --library-path=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+
+  xc_bad_var_cflags=no
+  for xc_word in $CFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_cflags=yes
+        ;;
+      -U*)
+        xc_bad_var_cflags=yes
+        ;;
+      -I*)
+        xc_bad_var_cflags=yes
+        ;;
+      -rpath*)
+        xc_bad_var_cflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5
+$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;}
+    xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
+    for xc_word in $CFLAGS; do
+      case "$xc_word" in
+        -D*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -U*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -I*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -rpath*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -L* | --library-path=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+  if test $xc_bad_var_libs = yes ||
+     test $xc_bad_var_cflags = yes ||
+     test $xc_bad_var_ldflags = yes ||
+     test $xc_bad_var_cppflags = yes; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5
+$as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;}
+  fi
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -3317,7 +3734,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3337,7 +3754,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -3393,112 +3810,114 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-   as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
-    mkdir_p='$(install_sh) -d'
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
   fi
+else
+  CC="$ac_cv_prog_CC"
 fi
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3506,8 +3925,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3517,122 +3936,87 @@ IFS=$as_save_IFS
 
 fi
 fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
 fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
 fi
-rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
 fi
-
-
-# Define the identity of the package.
- PACKAGE=curl
- VERSION=$VERSION
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
+if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3640,8 +4024,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3651,28 +4035,32 @@ IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
+    test -n "$CC" && break
+  done
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3680,8 +4068,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3691,17 +4079,21 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -3709,509 +4101,17 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    STRIP=$ac_ct_STRIP
+    CC=$ac_ct_CC
   fi
-else
-  STRIP="$ac_cv_prog_STRIP"
 fi
 
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking curl version" >&5
-$as_echo_n "checking curl version... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION" >&5
-$as_echo "$VERSION" >&6; }
-
-VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
-
-
-PKGADD_PKG="HAXXcurl"
-PKGADD_NAME="cURL - a client that groks URLs"
-PKGADD_VENDOR="curl.haxx.se"
-
-
-
-
-    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,polarssl} )"
-    curl_ssh_msg="no      (--with-libssh2)"
-   curl_zlib_msg="no      (--with-zlib)"
-   curl_krb4_msg="no      (--with-krb4*)"
-    curl_gss_msg="no      (--with-gssapi)"
- curl_spnego_msg="no      (--with-spnego)"
-    curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
-   curl_ipv6_msg="no      (--enable-ipv6)"
-    curl_idn_msg="no      (--with-libidn)"
- curl_manual_msg="no      (--enable-manual)"
-curl_verbose_msg="enabled (--disable-verbose)"
-   curl_sspi_msg="no      (--enable-sspi)"
-   curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
-  curl_ldaps_msg="no      (--enable-ldaps)"
-   curl_rtsp_msg="no      (--enable-rtsp)"
-   curl_rtmp_msg="no      (--with-librtmp)"
-
-ALL_LIBS=$LIBS
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define OS "${host}"
-_ACEOF
-
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-
-  ac_save_CFLAGS="$CFLAGS"
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4325,7 +4225,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -4368,7 +4268,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4426,7 +4326,7 @@ $as_echo "$ac_try_echo"; } >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -4437,7 +4337,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4477,7 +4377,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -4487,7 +4387,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4523,7 +4423,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4598,7 +4498,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4607,8 +4507,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4692,152 +4591,133 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+int main (void)
+{
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+        test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
 fi
+rm -f core conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-  CFLAGS="$ac_save_CFLAGS"
-  CPPFLAGS="$ac_save_CPPFLAGS"
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
 
+fi
 
-curl_includes_inttypes="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-/* includes end */"
-  case $host_os in
-    irix*)
-      ac_cv_header_stdint_h="no"
-      ;;
-  esac
-  for ac_header in sys/types.h stdint.h inttypes.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_inttypes
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
 fi
 
-done
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -4851,7 +4731,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4967,7 +4847,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4977,9 +4857,809 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+  IFS=$xc_prog_cc_prev_IFS
+  LIBS=$xc_prog_cc_prev_LIBS
+  CFLAGS=$xc_prog_cc_prev_CFLAGS
+  LDFLAGS=$xc_prog_cc_prev_LDFLAGS
+  CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
+
+
+
+
+
+am__api_version='1.13'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+       # -L didn't work.
+       set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+       && test "$*" != "X conftest.file $srcdir/configure"; then
+
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+       # broken ls alias from the environment.  This has actually
+       # happened.  Such a system could not be considered "sane".
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+## --------------------------------------- ##
+##  Start of automake initialization code  ##
+## --------------------------------------- ##
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='curl'
+ VERSION='-'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+## ------------------------------------- ##
+##  End of automake initialization code  ##
+## ------------------------------------- ##
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking curl version" >&5
+$as_echo_n "checking curl version... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLVERSION" >&5
+$as_echo "$CURLVERSION" >&6; }
+
+
+
+VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
+
+
+PKGADD_PKG="HAXXcurl"
+PKGADD_NAME="cURL - a client that groks URLs"
+PKGADD_VENDOR="curl.haxx.se"
+
+
+
+
+    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )"
+    curl_ssh_msg="no      (--with-libssh2)"
+   curl_zlib_msg="no      (--with-zlib)"
+   curl_krb4_msg="no      (--with-krb4*)"
+    curl_gss_msg="no      (--with-gssapi)"
+ curl_spnego_msg="no      (--with-spnego)"
+curl_tls_srp_msg="no      (--enable-tls-srp)"
+    curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
+   curl_ipv6_msg="no      (--enable-ipv6)"
+    curl_idn_msg="no      (--with-{libidn,winidn})"
+ curl_manual_msg="no      (--enable-manual)"
+curl_libcurl_msg="enabled (--disable-libcurl-option)"
+curl_verbose_msg="enabled (--disable-verbose)"
+   curl_sspi_msg="no      (--enable-sspi)"
+   curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
+  curl_ldaps_msg="no      (--enable-ldaps)"
+   curl_rtsp_msg="no      (--enable-rtsp)"
+   curl_rtmp_msg="no      (--with-librtmp)"
+  curl_mtlnk_msg="no      (--with-libmetalink)"
+
+    init_ssl_msg=${curl_ssl_msg}
+
+INITIAL_LDFLAGS=$LDFLAGS
+INITIAL_LIBS=$LIBS
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define OS "${host}"
+_ACEOF
+
+
+
+
+
+curl_includes_inttypes="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+/* includes end */"
+  case $host_os in
+    irix*)
+      ac_cv_header_stdint_h="no"
+      ;;
+  esac
+  for ac_header in sys/types.h stdint.h inttypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_inttypes
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4993,7 +5673,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -5042,7 +5722,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -5059,7 +5739,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -5109,7 +5789,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5248,7 +5928,7 @@ done
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
 $as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
@@ -5258,7 +5938,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long=0
    fi
@@ -5281,7 +5961,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
 $as_echo_n "checking size of void*... " >&6; }
-if test "${ac_cv_sizeof_voidp+set}" = set; then :
+if ${ac_cv_sizeof_voidp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
@@ -5291,7 +5971,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (void*)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_voidp=0
    fi
@@ -5354,7 +6034,7 @@ $as_echo_n "checking for 64-bit curl_off_t data type... " >&6; }
     tmp_includes=""
     tmp_source=""
     tmp_fmt=""
-    case `$as_echo "$t8" | $as_tr_sh` in
+    case `echo "$t8" | sed 's/[^a-zA-Z0-9_]/_/g'` in
       int64_t)
         tmp_includes="$curl_includes_inttypes"
         tmp_source="char f[] = PRId64;"
@@ -5421,7 +6101,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
       tmp_exp=""
@@ -5468,7 +6148,7 @@ $as_echo_n "checking for 32-bit curl_off_t data type... " >&6; }
     tmp_includes=""
     tmp_source=""
     tmp_fmt=""
-    case `$as_echo "$t4" | $as_tr_sh` in
+    case `echo "$t4" | sed 's/[^a-zA-Z0-9_]/_/g'` in
       int64_t)
         tmp_includes="$curl_includes_inttypes"
         tmp_source="char f[] = PRId64;"
@@ -5535,7 +6215,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
       tmp_exp=""
@@ -5582,7 +6262,7 @@ $as_echo_n "checking for 16-bit curl_off_t data type... " >&6; }
     tmp_includes=""
     tmp_source=""
     tmp_fmt=""
-    case `$as_echo "$t2" | $as_tr_sh` in
+    case `echo "$t2" | sed 's/[^a-zA-Z0-9_]/_/g'` in
       int64_t)
         tmp_includes="$curl_includes_inttypes"
         tmp_source="char f[] = PRId64;"
@@ -5649,7 +6329,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "$tmp_fmt"; then
       tmp_exp=""
@@ -5702,7 +6382,7 @@ $as_echo_n "checking formatting string directive for curl_off_t... " >&6; }
     curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
   else
     x_pull_headers="no"
-    case `$as_echo "$curl_typeof_curl_off_t" | $as_tr_sh` in
+    case `echo "$curl_typeof_curl_off_t" | sed 's/[^a-zA-Z0-9_]/_/g'` in
       long_long | __longlong | __longlong_t)
         curl_format_curl_off_t="lld"
         curl_format_curl_off_tu="llu"
@@ -5747,7 +6427,7 @@ $as_echo_n "checking constant suffix string for curl_off_t... " >&6; }
   curl_suffix_curl_off_t="unknown"
   curl_suffix_curl_off_tu="unknown"
   #
-  case `$as_echo "$curl_typeof_curl_off_t" | $as_tr_sh` in
+  case `echo "$curl_typeof_curl_off_t" | sed 's/[^a-zA-Z0-9_]/_/g'` in
     long_long | __longlong | __longlong_t)
       tst_suffixes="LL::"
       ;;
@@ -5896,7 +6576,7 @@ _EOF
 
 
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5
 $as_echo_n "checking if OS is AIX (to define _ALL_SOURCE)... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6910,7 +7590,7 @@ if test "$enable_largefile" != no; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+if ${ac_cv_sys_largefile_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_sys_largefile_CC=no
@@ -6960,7 +7640,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+if ${ac_cv_sys_file_offset_bits+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -7027,7 +7707,7 @@ rm -rf conftest*
   if test $ac_cv_sys_file_offset_bits = unknown; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then :
+if ${ac_cv_sys_large_files+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -7092,351 +7772,94 @@ _ACEOF
 esac
 rm -rf conftest*
   fi
-fi
-
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AS"; then
-  ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AS="${ac_tool_prefix}as"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
-  ac_ct_AS=$AS
-  # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AS"; then
-  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AS="as"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
 fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_AS" = x; then
-    AS="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AS=$ac_ct_AS
-  fi
-else
-  AS="$ac_cv_prog_AS"
-fi
 
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DLLTOOL"; then
-  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
-  ac_ct_DLLTOOL=$DLLTOOL
-  # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DLLTOOL"; then
-  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_DLLTOOL" = x; then
-    DLLTOOL="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+case `pwd` in
+  *\ * | *\    *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
-    DLLTOOL=$ac_ct_DLLTOOL
-  fi
-else
-  DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OBJDUMP"; then
-  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
-  ac_ct_OBJDUMP=$OBJDUMP
-  # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OBJDUMP"; then
-  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_OBJDUMP" = x; then
-    OBJDUMP="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OBJDUMP=$ac_ct_OBJDUMP
-  fi
-else
-  OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
 
-  ;;
-esac
+macro_version='2.4.2'
+macro_revision='1.3337'
 
-test -z "$AS" && AS=as
 
 
 
 
 
-test -z "$DLLTOOL" && DLLTOOL=dlltool
 
 
 
 
 
-test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
+ltmain="$ac_aux_dir/ltmain.sh"
 
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)" >&5
-$as_echo_n "checking if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)... " >&6; }
-case $host in
-  x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    with_pic=yes
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-esac
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is icc (to build with PIC)" >&5
-$as_echo_n "checking if compiler is icc (to build with PIC)... " >&6; }
-case $CC in
-  icc | */icc)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    with_pic=yes
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-esac
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
 
-case `pwd` in
-  *\ * | *\    *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
 esac
 
 
 
-macro_version='2.2.6b'
-macro_revision='1.3017'
 
 
 
@@ -7448,13 +7871,9 @@ macro_revision='1.3017'
 
 
 
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -7474,7 +7893,7 @@ do
     for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -7536,7 +7955,7 @@ Xsed="$SED -e 1s/^X//"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -7553,7 +7972,7 @@ do
     for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -7667,7 +8086,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -7707,7 +8126,7 @@ fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -7734,7 +8153,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
@@ -7787,14 +8206,17 @@ if test "$lt_cv_path_NM" != "no"; then
   NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -7806,7 +8228,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7832,13 +8254,13 @@ fi
 fi
 if test -z "$DUMPBIN"; then
   ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  for ac_prog in dumpbin "link -dump"
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -7850,7 +8272,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -7887,6 +8309,15 @@ esac
   fi
 fi
 
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
 
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -7901,18 +8332,18 @@ test -z "$NM" && NM=nm
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
+if ${lt_cv_nm_interface+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:7909: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:7912: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:7915: output\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7936,7 +8367,7 @@ fi
 # find the maximum length of command line arguments
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
@@ -7969,6 +8400,11 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -7994,6 +8430,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -8020,7 +8461,8 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
@@ -8033,8 +8475,8 @@ else
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
              test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
@@ -8076,8 +8518,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -8126,9 +8568,83 @@ esac
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
@@ -8142,6 +8658,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -8164,7 +8685,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -8176,7 +8697,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8204,7 +8725,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
 set dummy objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -8216,7 +8737,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8260,7 +8781,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -8302,16 +8823,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -8337,7 +8860,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -8349,11 +8872,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -8374,8 +8897,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -8456,6 +8979,21 @@ esac
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
 $as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -8471,12 +9009,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+
+
+
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -8488,8 +9176,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8509,14 +9197,18 @@ $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_AR"; then
+if test -z "$AR"; then
   ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -8528,8 +9220,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8548,6 +9240,10 @@ else
 $as_echo "no" >&6; }
 fi
 
+
+  test -n "$ac_ct_AR" && break
+done
+
   if test "x$ac_ct_AR" = x; then
     AR="false"
   else
@@ -8559,18 +9255,73 @@ ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
   fi
-else
-  AR="$ac_cv_prog_AR"
 fi
 
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
 
 
 
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+       if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
 
 
 
@@ -8581,7 +9332,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -8593,7 +9344,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8621,7 +9372,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -8633,7 +9384,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8680,7 +9431,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -8692,7 +9443,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8720,7 +9471,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -8732,7 +9483,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8782,15 +9533,27 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
 
 
 
@@ -8837,7 +9600,7 @@ compiler=$CC
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8898,8 +9661,8 @@ esac
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -8923,6 +9686,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -8935,6 +9699,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -8960,8 +9725,8 @@ _LT_EOF
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "$nlist"; then
@@ -8976,6 +9741,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -8987,7 +9764,7 @@ _LT_EOF
          cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -9012,9 +9789,9 @@ static const void *lt_preloaded_setup() {
 #endif
 _LT_EOF
          # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
+         mv -f conftest.$ac_objext conftstm.$ac_objext
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
          if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
@@ -9024,8 +9801,8 @@ _LT_EOF
   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
            pipe_works=yes
          fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
        else
          echo "cannot find nm_test_func in $nlist" >&5
        fi
@@ -9062,6 +9839,17 @@ else
 $as_echo "ok" >&6; }
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
 
 
 
@@ -9083,6 +9871,44 @@ fi
 
 
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
@@ -9114,7 +9940,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 9117 "configure"' > conftest.$ac_ext
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9165,7 +9991,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
          ppc64-*linux*|powerpc64-*linux*)
            LD="${LD-ld} -m elf32ppclinux"
@@ -9208,7 +10041,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -9248,7 +10081,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -9259,7 +10092,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
          LD="${LD-ld} -64"
@@ -9275,6 +10121,123 @@ esac
 
 need_locks="$enable_libtool_lock"
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
 
   case $host_os in
     rhapsody* | darwin*)
@@ -9283,7 +10246,7 @@ need_locks="$enable_libtool_lock"
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DSYMUTIL"; then
@@ -9295,7 +10258,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9323,7 +10286,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
 set dummy dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DSYMUTIL"; then
@@ -9335,7 +10298,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9375,7 +10338,7 @@ fi
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NMEDIT"; then
@@ -9387,7 +10350,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9415,7 +10378,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
 set dummy nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -9427,7 +10390,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9467,7 +10430,7 @@ fi
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -9479,7 +10442,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9507,7 +10470,7 @@ if test -z "$ac_cv_prog_LIPO"; then
 set dummy lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -9519,7 +10482,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9559,7 +10522,7 @@ fi
 set dummy ${ac_tool_prefix}otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -9571,7 +10534,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9599,7 +10562,7 @@ if test -z "$ac_cv_prog_OTOOL"; then
 set dummy otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -9611,7 +10574,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9651,7 +10614,7 @@ fi
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -9663,7 +10626,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9691,7 +10654,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then
 set dummy otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -9703,7 +10666,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -9766,7 +10729,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
 $as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
@@ -9782,7 +10745,13 @@ else
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # If there is a non-empty error log, and "single_module"
+       # appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+         cat conftest.err >&5
+       # Otherwise, if the output was created with a 0 exit code from
+       # the compiler, it worked.
+       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&5
@@ -9793,9 +10762,10 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
@@ -9824,6 +10794,41 @@ rm -f core conftest.err conftest.$ac_objext \
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+       cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -9851,7 +10856,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -9863,7 +10868,7 @@ for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
 
 done
 
+# ------------------------------------ #
+#  Determine libtool default behavior  #
+# ------------------------------------ #
+
+#
+# Default behavior is to enable shared and static libraries on systems
+# where libtool knows how to build both library versions, and does not
+# require separate configuration and build runs for each flavor.
+#
+
+xc_lt_want_enable_shared='yes'
+xc_lt_want_enable_static='yes'
+
+#
+# User may have disabled shared or static libraries.
+#
+case "x$enable_shared" in # (
+  xno)
+    xc_lt_want_enable_shared='no'
+    ;;
+esac
+case "x$enable_static" in # (
+  xno)
+    xc_lt_want_enable_static='no'
+    ;;
+esac
+if test "x$xc_lt_want_enable_shared" = 'xno' &&
+  test "x$xc_lt_want_enable_static" = 'xno'; then
+  as_fn_error $? "can not disable shared and static libraries simultaneously" "$LINENO" 5
+fi
+
+#
+# Default behavior on systems that require independent configuration
+# and build runs for shared and static is to enable shared libraries
+# and disable static ones. On these systems option '--disable-shared'
+# must be used in order to build a proper static library.
+#
+
+if test "x$xc_lt_want_enable_shared" = 'xyes' &&
+  test "x$xc_lt_want_enable_static" = 'xyes'; then
+  case $host_os in # (
+    mingw* | pw32* | cegcc* | os2* | aix*)
+      xc_lt_want_enable_static='no'
+      ;;
+  esac
+fi
+
+#
+# Make libtool aware of current shared and static library preferences
+# taking in account that, depending on host characteristics, libtool
+# may modify these option preferences later in this configure script.
+#
+
+enable_shared=$xc_lt_want_enable_shared
+enable_static=$xc_lt_want_enable_static
+
+#
+# Default behavior is to build PIC objects for shared libraries and
+# non-PIC objects for static libraries.
+#
+
+xc_lt_want_with_pic='default'
+
+#
+# User may have specified PIC preference.
+#
+
+case "x$with_pic" in # ((
+  xno)
+    xc_lt_want_with_pic='no'
+    ;;
+  xyes)
+    xc_lt_want_with_pic='yes'
+    ;;
+esac
+
+#
+# Default behavior on some systems where building a shared library out
+# of non-PIC compiled objects will fail with following linker error
+# "relocation R_X86_64_32 can not be used when making a shared object"
+# is to build PIC objects even for static libraries. This behavior may
+# be overriden using 'configure --disable-shared --without-pic'.
+#
+
+if test "x$xc_lt_want_with_pic" = 'xdefault'; then
+  case $host_cpu in # (
+    x86_64 | amd64 | ia64)
+      case $host_os in # (
+        linux* | freebsd*)
+          xc_lt_want_with_pic='yes'
+          ;;
+      esac
+      ;;
+  esac
+fi
+
+#
+# Make libtool aware of current PIC preference taking in account that,
+# depending on host characteristics, libtool may modify PIC default
+# behavior to fit host system idiosyncrasies later in this script.
+#
+
+with_pic=$xc_lt_want_with_pic
+
+## ----------------------- ##
+##  Start of libtool code  ##
+## ----------------------- ##
+
+
 
 
 # Set options
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AS="${ac_tool_prefix}as"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AS="as"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
 
 
 
@@ -9947,7 +11361,22 @@ fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+       IFS="$lt_save_ifs"
+       if test "X$lt_pkg" = "X$lt_p"; then
+         pic_mode=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -10024,6 +11453,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -10045,7 +11479,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -10073,19 +11507,6 @@ _ACEOF
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
@@ -10098,23 +11519,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -10143,7 +11547,7 @@ for cc_temp in $compiler""; do
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
 
 # Only perform the check for file, if the check method requires it
@@ -10153,7 +11557,7 @@ file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -10219,7 +11623,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
 $as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -10352,11 +11756,16 @@ if test -n "$compiler"; then
 lt_prog_compiler_no_builtin_flag=
 
 if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
@@ -10372,15 +11781,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10375: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:10379: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_rtti_exceptions=yes
@@ -10409,8 +11818,6 @@ fi
 lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
   if test "$GCC" = yes; then
     lt_prog_compiler_wl='-Wl,'
@@ -10458,6 +11865,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -10500,6 +11913,15 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -10541,7 +11963,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -10562,7 +11984,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='--shared'
        lt_prog_compiler_static='--static'
        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+       # NAG Fortran compiler
+       lt_prog_compiler_wl='-Wl,-Wl,,'
+       lt_prog_compiler_pic='-PIC'
+       lt_prog_compiler_static='-Bstatic'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
        lt_prog_compiler_wl='-Wl,'
@@ -10574,25 +12002,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static='-non_shared'
         ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-qpic'
        lt_prog_compiler_static='-qstaticlink'
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl=''
+         ;;
+       *Sun\ F* | *Sun*Fortran*)
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl='-Qoption ld '
+         ;;
        *Sun\ C*)
          # Sun C 5.9
          lt_prog_compiler_pic='-KPIC'
          lt_prog_compiler_static='-Bstatic'
          lt_prog_compiler_wl='-Wl,'
          ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         lt_prog_compiler_pic='-KPIC'
+        *Intel*\ [CF]*Compiler*)
+         lt_prog_compiler_wl='-Wl,'
+         lt_prog_compiler_pic='-fPIC'
+         lt_prog_compiler_static='-static'
+         ;;
+       *Portland\ Group*)
+         lt_prog_compiler_wl='-Wl,'
+         lt_prog_compiler_pic='-fpic'
          lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl=''
          ;;
        esac
        ;;
@@ -10624,7 +12067,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
        lt_prog_compiler_wl='-Qoption ld ';;
       *)
        lt_prog_compiler_wl='-Wl,';;
@@ -10681,13 +12124,17 @@ case $host_os in
     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
@@ -10695,7 +12142,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; }
 if test -n "$lt_prog_compiler_pic"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
@@ -10711,15 +12158,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10714: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:10718: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works=yes
 
 
 
+
+
+
+
+
 #
 # Check to make sure the static flag actually works.
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
@@ -10767,7 +12219,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works=yes
@@ -10797,7 +12249,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -10816,16 +12268,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10819: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:10823: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -10852,7 +12304,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -10871,16 +12323,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10874: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:10878: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -10946,7 +12398,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -10990,13 +12441,39 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   openbsd*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu)
+  linux* | k*bsd*-gnu | gnu*)
     link_all_deplibs=no
     ;;
   esac
 
   ld_shlibs=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
   if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+         *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
@@ -11030,11 +12507,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
        ld_shlibs=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -11070,10 +12548,12 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='${wl}--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -11091,6 +12571,11 @@ _LT_EOF
       fi
       ;;
 
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
@@ -11116,15 +12601,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
         && test "$tmp_diet" = no
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -11135,13 +12621,17 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          whole_archive_flag_spec=
          tmp_sharedflag='--shared' ;;
-       xl[cC]*)                        # IBM XL C 8.0 on PPC (deal with xlf below)
+       xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         compiler_needs_object=yes
+         ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          compiler_needs_object=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
@@ -11157,17 +12647,16 @@ _LT_EOF
         fi
 
        case $cc_basename in
-       xlf*)
+       xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-         hardcode_libdir_flag_spec=
-         hardcode_libdir_flag_spec_ld='-rpath $libdir'
-         archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+         archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
          if test "x$supports_anon_versioning" = xyes; then
            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
              echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -11181,8 +12670,8 @@ _LT_EOF
        archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -11200,8 +12689,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
@@ -11247,8 +12736,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
@@ -11288,8 +12777,10 @@ _LT_EOF
       else
        # If we're using GNU nm, then we don't want the "-C" option.
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # Also, AIX nm treats weak defined symbols like other global
+       # defined symbols, whereas GNU nm marks them as "W".
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        else
          export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        fi
@@ -11377,7 +12868,13 @@ _LT_EOF
        allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int main (void)
@@ -11389,25 +12886,32 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
        if test "$host_cpu" = ia64; then
          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
@@ -11416,7 +12920,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int main (void)
@@ -11428,30 +12938,42 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
          no_undefined_flag=' ${wl}-bernotok'
          allow_undefined_flag=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec='$convenience'
+         if test "$with_gnu_ld" = yes; then
+           # We only use this code for GNU lds that support --whole-archive.
+           whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           whole_archive_flag_spec='$convenience'
+         fi
          archive_cmds_need_lc=yes
          # This is similar to how AIX traditionally builds its shared libraries.
          archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -11483,20 +13005,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       always_export_symbols=yes
+       file_list_spec='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+         else
+           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+         fi~
+         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+         linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+       enable_shared_with_static_runtimes=yes
+       exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       old_postinstall_cmds='chmod 644 $oldlib'
+       postlink_cmds='lt_outputfile="@OUTPUT@"~
+         lt_tool_outputfile="@TOOL_OUTPUT@"~
+         case $lt_outputfile in
+           *.exe|*.EXE) ;;
+           *)
+             lt_outputfile="$lt_outputfile.exe"
+             lt_tool_outputfile="$lt_tool_outputfile.exe"
+             ;;
+         esac~
+         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+           $RM "$lt_outputfile.manifest";
+         fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_from_new_cmds='true'
+       # FIXME: Should let the user specify the lib program.
+       old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       enable_shared_with_static_runtimes=yes
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -11506,7 +13072,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+  else
+    whole_archive_flag_spec=''
+  fi
   link_all_deplibs=yes
   allow_undefined_flag="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -11514,7 +13085,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    output_verbose_link_cmd=func_echo_all
     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
@@ -11532,10 +13103,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -11548,7 +13115,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -11557,7 +13124,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
@@ -11565,9 +13132,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     hpux9*)
       if test "$GCC" = yes; then
-       archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
       else
-       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
       fi
       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
       hardcode_libdir_separator=:
@@ -11580,14 +13147,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
       if test "$with_gnu_ld" = no; then
        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_flag_spec_ld='+b $libdir'
        hardcode_libdir_separator=:
        hardcode_direct=yes
        hardcode_direct_absolute=yes
@@ -11599,16 +13165,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
        case $host_cpu in
        hppa*64*)
          archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
@@ -11620,7 +13186,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
          archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS -b"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
          ;;
        esac
       fi
@@ -11648,26 +13253,39 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       # This should be the same for all languages, so no per-tag cache variable.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS="$LDFLAGS"
+          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int foo(void) {}
+int foo (void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+       if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+       fi
       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -11729,17 +13347,17 @@ rm -f core conftest.err conftest.$ac_objext \
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -11749,13 +13367,13 @@ rm -f core conftest.err conftest.$ac_objext \
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
        archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        hardcode_libdir_flag_spec='-rpath $libdir'
@@ -11768,9 +13386,9 @@ rm -f core conftest.err conftest.$ac_objext \
       no_undefined_flag=' -z defs'
       if test "$GCC" = yes; then
        wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
@@ -11958,44 +13576,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-       pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$lt_prog_compiler_wl
+         pic_flag=$lt_prog_compiler_pic
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$allow_undefined_flag
+         allow_undefined_flag=
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-         archive_cmds_need_lc=no
-        else
-         archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
+         then
+           lt_cv_archive_cmds_need_lc=no
+         else
+           lt_cv_archive_cmds_need_lc=yes
+         fi
+         allow_undefined_flag=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
   fi
@@ -12153,11 +13777,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -12166,16 +13785,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
   # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
@@ -12188,7 +13814,7 @@ if test "$GCC" = yes; then
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -12208,7 +13834,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[lt_foo]++; }
   if (lt_freq[lt_foo] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
@@ -12234,7 +13866,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -12243,7 +13875,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -12296,7 +13928,7 @@ amigaos*)
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
@@ -12308,7 +13940,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -12327,8 +13959,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -12349,36 +13982,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -12399,7 +14079,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -12407,10 +14087,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -12418,7 +14094,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -12436,7 +14112,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -12455,13 +14131,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
+  dynamic_linker="$host_os runtime_loader"
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -12507,12 +14186,14 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -12528,7 +14209,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
        if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
@@ -12565,9 +14246,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -12575,12 +14256,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+        LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int main (void)
@@ -12592,13 +14278,17 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
@@ -12607,7 +14297,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -12651,7 +14341,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -12720,7 +14410,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -12745,7 +14435,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -12769,7 +14459,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
     soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
@@ -12800,7 +14490,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -12810,7 +14500,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
 
 
 
+
+
+
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
@@ -12994,7 +14689,7 @@ else
   # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13025,7 +14720,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13075,16 +14770,16 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13115,12 +14810,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13151,12 +14846,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13187,7 +14882,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
@@ -13228,7 +14923,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
          if test "$cross_compiling" = yes; then :
@@ -13237,7 +14932,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13240 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13278,7 +14973,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -13287,7 +14988,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
       /* dlclose (self); */
     }
   else
@@ -13324,7 +15029,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
          if test "$cross_compiling" = yes; then :
@@ -13333,7 +15038,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13336 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13374,7 +15079,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -13383,7 +15094,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
       /* dlclose (self); */
     }
   else
@@ -13552,6 +15267,8 @@ CC="$lt_save_CC"
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -13560,81 +15277,223 @@ CC="$lt_save_CC"
 # Only expand once:
 
 
+## --------------------- ##
+##  End of libtool code  ##
+## --------------------- ##
+
+#
+# Verify if finally libtool shared libraries will be built
+#
+
+case "x$enable_shared" in # ((
+  xyes | xno)
+    xc_lt_build_shared=$enable_shared
+    ;;
+  *)
+    as_fn_error $? "unexpected libtool enable_shared value: $enable_shared" "$LINENO" 5
+    ;;
+esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need -mimpure-text" >&5
-$as_echo_n "checking if we need -mimpure-text... " >&6; }
-mimpure=no
-case $host in
-  *-*-solaris2*)
-    if test "$GCC" = "yes"; then
-      mimpure="yes"
+#
+# Verify if finally libtool static libraries will be built
+#
+
+case "x$enable_static" in # ((
+  xyes | xno)
+    xc_lt_build_static=$enable_static
+    ;;
+  *)
+    as_fn_error $? "unexpected libtool enable_static value: $enable_static" "$LINENO" 5
+    ;;
+esac
+
+#
+# Verify if libtool shared libraries should be linked using flag -version-info
+#
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -version-info" >&5
+$as_echo_n "checking whether to build shared libraries with -version-info... " >&6; }
+xc_lt_shlib_use_version_info='yes'
+if test "x$version_type" = 'xnone'; then
+  xc_lt_shlib_use_version_info='no'
+fi
+case $host_os in # (
+  amigaos*)
+    xc_lt_shlib_use_version_info='yes'
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_version_info" >&5
+$as_echo "$xc_lt_shlib_use_version_info" >&6; }
+
+#
+# Verify if libtool shared libraries should be linked using flag -no-undefined
+#
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -no-undefined" >&5
+$as_echo_n "checking whether to build shared libraries with -no-undefined... " >&6; }
+xc_lt_shlib_use_no_undefined='no'
+if test "x$allow_undefined" = 'xno'; then
+  xc_lt_shlib_use_no_undefined='yes'
+elif test "x$allow_undefined_flag" = 'xunsupported'; then
+  xc_lt_shlib_use_no_undefined='yes'
+fi
+case $host_os in # (
+  cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
+    xc_lt_shlib_use_no_undefined='yes'
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_no_undefined" >&5
+$as_echo "$xc_lt_shlib_use_no_undefined" >&6; }
+
+#
+# Verify if libtool shared libraries should be linked using flag -mimpure-text
+#
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -mimpure-text" >&5
+$as_echo_n "checking whether to build shared libraries with -mimpure-text... " >&6; }
+xc_lt_shlib_use_mimpure_text='no'
+case $host_os in # (
+  solaris2*)
+    if test "x$GCC" = 'xyes'; then
+      xc_lt_shlib_use_mimpure_text='yes'
     fi
     ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_mimpure_text" >&5
+$as_echo "$xc_lt_shlib_use_mimpure_text" >&6; }
+
+#
+# Find out wether libtool libraries would be built wit PIC
+#
+
+case "x$pic_mode" in # ((((
+  xdefault)
+    xc_lt_build_shared_with_pic='yes'
+    xc_lt_build_static_with_pic='no'
+    ;;
+  xyes)
+    xc_lt_build_shared_with_pic='yes'
+    xc_lt_build_static_with_pic='yes'
+    ;;
+  xno)
+    xc_lt_build_shared_with_pic='no'
+    xc_lt_build_static_with_pic='no'
+    ;;
   *)
+    xc_lt_build_shared_with_pic='unknown'
+    xc_lt_build_static_with_pic='unknown'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unexpected libtool pic_mode value: $pic_mode" >&5
+$as_echo "$as_me: WARNING: unexpected libtool pic_mode value: $pic_mode" >&2;}
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mimpure" >&5
-$as_echo "$mimpure" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with PIC" >&5
+$as_echo_n "checking whether to build shared libraries with PIC... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_with_pic" >&5
+$as_echo "$xc_lt_build_shared_with_pic" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries with PIC" >&5
+$as_echo_n "checking whether to build static libraries with PIC... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_with_pic" >&5
+$as_echo "$xc_lt_build_static_with_pic" >&6; }
+
+#
+# Verify if libtool shared libraries will be built while static not built
+#
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries only" >&5
+$as_echo_n "checking whether to build shared libraries only... " >&6; }
+if test "$xc_lt_build_shared" = 'yes' &&
+  test "$xc_lt_build_static" = 'no'; then
+  xc_lt_build_shared_only='yes'
+else
+  xc_lt_build_shared_only='no'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_only" >&5
+$as_echo "$xc_lt_build_shared_only" >&6; }
+
+#
+# Verify if libtool static libraries will be built while shared not built
+#
 
-if test x$mimpure = xyes; then
-  MIMPURE_TRUE=
-  MIMPURE_FALSE='#'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries only" >&5
+$as_echo_n "checking whether to build static libraries only... " >&6; }
+if test "$xc_lt_build_static" = 'yes' &&
+  test "$xc_lt_build_shared" = 'no'; then
+  xc_lt_build_static_only='yes'
 else
-  MIMPURE_TRUE='#'
-  MIMPURE_FALSE=
+  xc_lt_build_static_only='no'
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_only" >&5
+$as_echo "$xc_lt_build_static_only" >&6; }
 
 
 
 
-if false; then
-  STATICLIB_TRUE=
-  STATICLIB_FALSE='#'
+#
+# Automake conditionals based on libtool related checks
+#
+
+ if test "x$xc_lt_shlib_use_version_info" = 'xyes'; then
+  CURL_LT_SHLIB_USE_VERSION_INFO_TRUE=
+  CURL_LT_SHLIB_USE_VERSION_INFO_FALSE='#'
 else
-  STATICLIB_TRUE='#'
-  STATICLIB_FALSE=
+  CURL_LT_SHLIB_USE_VERSION_INFO_TRUE='#'
+  CURL_LT_SHLIB_USE_VERSION_INFO_FALSE=
 fi
 
+ if test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
+  CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE=
+  CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE='#'
+else
+  CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#'
+  CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE=
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need BUILDING_LIBCURL" >&5
-$as_echo_n "checking if we need BUILDING_LIBCURL... " >&6; }
-case $host in
-  *-*-mingw*)
+ if test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'; then
+  CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE=
+  CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE='#'
+else
+  CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#'
+  CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE=
+fi
 
-$as_echo "#define BUILDING_LIBCURL 1" >>confdefs.h
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need CURL_STATICLIB" >&5
-$as_echo_n "checking if we need CURL_STATICLIB... " >&6; }
-    if test "X$enable_shared" = "Xno"
-    then
+#
+# Due to libtool and automake machinery limitations of not allowing
+# specifying separate CPPFLAGS or CFLAGS when compiling objects for
+# inclusion of these in shared or static libraries, we are forced to
+# build using separate configure runs for shared and static libraries
+# on systems where different CPPFLAGS or CFLAGS are mandatory in order
+# to compile objects for each kind of library. Notice that relying on
+# the '-DPIC' CFLAG that libtool provides is not valid given that the
+# user might for example choose to build static libraries with PIC.
+#
 
-$as_echo "#define CURL_STATICLIB 1" >>confdefs.h
+#
+# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
+# targeting a static library and not building its shared counterpart.
+#
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ if test "x$xc_lt_build_static_only" = 'xyes'; then
+  USE_CPPFLAG_CURL_STATICLIB_TRUE=
+  USE_CPPFLAG_CURL_STATICLIB_FALSE='#'
+else
+  USE_CPPFLAG_CURL_STATICLIB_TRUE='#'
+  USE_CPPFLAG_CURL_STATICLIB_FALSE=
+fi
 
 
-if true; then
-  STATICLIB_TRUE=
-  STATICLIB_FALSE='#'
-else
-  STATICLIB_TRUE='#'
-  STATICLIB_FALSE=
+#
+# Make staticlib CPPFLAG variable and its definition visible in output
+# files unconditionally, providing an empty definition unless strictly
+# targeting a static library and not building its shared counterpart.
+#
+
+CPPFLAG_CURL_STATICLIB=
+if test "x$xc_lt_build_static_only" = 'xyes'; then
+  CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
 fi
 
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-esac
+
 
 # Determine whether all dependent libraries must be specified when linking
 if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
@@ -13644,42 +15503,18 @@ else
     REQUIRE_LIB_DEPS=yes
 fi
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
-  $as_echo_n "(cached) " >&6
+ if test x$REQUIRE_LIB_DEPS = xyes; then
+  USE_EXPLICIT_LIB_DEPS_TRUE=
+  USE_EXPLICIT_LIB_DEPS_FALSE='#'
 else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
+  USE_EXPLICIT_LIB_DEPS_TRUE='#'
+  USE_EXPLICIT_LIB_DEPS_FALSE=
 fi
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -13733,6 +15568,8 @@ esac
   flags_opt_yes="unknown"
   flags_opt_off="unknown"
   #
+  flags_prefer_cppflags="no"
+  #
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is DEC/Compaq/HP C" >&5
 $as_echo_n "checking if compiler is DEC/Compaq/HP C... " >&6; }
@@ -13759,7 +15596,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC"; then
       tmp_exp=""
@@ -13799,7 +15636,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC_VER"; then
       tmp_exp=""
@@ -13823,7 +15660,7 @@ $as_echo "yes" >&6; }
     compiler_id="DEC_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g2"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
     flags_opt_yes="-O1"
     flags_opt_off="-O0"
@@ -13858,7 +15695,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__HP_cc"; then
       tmp_exp=""
@@ -13916,7 +15753,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__IBMC__"; then
       tmp_exp=""
@@ -13950,6 +15787,7 @@ $as_echo "yes" >&6; }
     flags_opt_all="$flags_opt_all -qoptimize=5"
     flags_opt_yes="-O2"
     flags_opt_off="-qnooptimize"
+    flags_prefer_cppflags="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -13981,7 +15819,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__INTEL_COMPILER"; then
       tmp_exp=""
@@ -14025,7 +15863,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = ""; then
       tmp_exp=""
@@ -14046,7 +15884,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext
       compiler_id="INTEL_UNIX_C"
       flags_dbg_all="-g -g0"
       flags_dbg_yes="-g"
-      flags_dbg_off="-g0"
+      flags_dbg_off=""
       flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
@@ -14097,7 +15935,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__clang__"; then
       tmp_exp=""
@@ -14131,7 +15969,7 @@ $as_echo "yes" >&6; }
     flags_dbg_all="$flags_dbg_all -gdwarf-2"
     flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
     flags_opt_yes="-Os"
     flags_opt_off="-O0"
@@ -14166,7 +16004,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
       tmp_exp=""
@@ -14201,10 +16039,50 @@ $as_echo "yes" >&6; }
     flags_dbg_all="$flags_dbg_all -gdwarf-2"
     flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
+
+      if test -z "$SED"; then
+    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
+  fi
+  if test -z "$GREP"; then
+    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
+  fi
+
+  tmp_exp=""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef _WIN32
+CURL_DEF_TOKEN _WIN32
+#endif
+
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
+      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
+      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
+    if test -z "$tmp_exp" || test "$tmp_exp" = "_WIN32"; then
+      tmp_exp=""
+    fi
+
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+  if test -z "$tmp_exp"; then
+    curl_cv_have_def__WIN32=no
+
+  else
+    curl_cv_have_def__WIN32=yes
+    curl_cv_def__WIN32=$tmp_exp
+
+  fi
+
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -14236,7 +16114,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then
       tmp_exp=""
@@ -14294,7 +16172,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
       tmp_exp=""
@@ -14334,7 +16212,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "_COMPILER_VERSION"; then
       tmp_exp=""
@@ -14374,7 +16252,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "_SGI_COMPILER_VERSION"; then
       tmp_exp=""
@@ -14399,7 +16277,7 @@ $as_echo "yes" >&6; }
     compiler_id="SGI_MIPSPRO_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -14434,7 +16312,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then
       tmp_exp=""
@@ -14474,7 +16352,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__sgi"; then
       tmp_exp=""
@@ -14499,7 +16377,7 @@ $as_echo "yes" >&6; }
     compiler_id="SGI_MIPS_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -14534,7 +16412,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__SUNPRO_C"; then
       tmp_exp=""
@@ -14592,7 +16470,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__TINYC__"; then
       tmp_exp=""
@@ -14650,7 +16528,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then
       tmp_exp=""
@@ -14693,7 +16571,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 
     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
-      "$SED" 's/.*CURL_DEF_TOKEN[ ]//' 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
       "$SED" 's/["][ ]*["]//g' 2>/dev/null`
     if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then
       tmp_exp=""
@@ -14771,35 +16649,38 @@ squeeze() {
     if test "$compiler_id" = "GNU_C" ||
       test "$compiler_id" = "CLANG"; then
 
+      if test "$compiler_id" = "GNU_C" ||
+    test "$compiler_id" = "CLANG"; then
     tmp_has_include="no"
-  tmp_chg_FLAGS="$CFLAGS"
-  for word1 in $tmp_chg_FLAGS; do
-    case "$word1" in
-      -I*)
-        tmp_has_include="yes"
-        ;;
-    esac
-  done
-  if test "$tmp_has_include" = "yes"; then
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
-    CFLAGS="$tmp_chg_FLAGS"
-    squeeze CFLAGS
-  fi
-  tmp_has_include="no"
-  tmp_chg_FLAGS="$CPPFLAGS"
-  for word1 in $tmp_chg_FLAGS; do
-    case "$word1" in
-      -I*)
-        tmp_has_include="yes"
-        ;;
-    esac
-  done
-  if test "$tmp_has_include" = "yes"; then
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
-    CPPFLAGS="$tmp_chg_FLAGS"
-    squeeze CPPFLAGS
+    tmp_chg_FLAGS="$CFLAGS"
+    for word1 in $tmp_chg_FLAGS; do
+      case "$word1" in
+        -I*)
+          tmp_has_include="yes"
+          ;;
+      esac
+    done
+    if test "$tmp_has_include" = "yes"; then
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+      CFLAGS="$tmp_chg_FLAGS"
+      squeeze CFLAGS
+    fi
+    tmp_has_include="no"
+    tmp_chg_FLAGS="$CPPFLAGS"
+    for word1 in $tmp_chg_FLAGS; do
+      case "$word1" in
+        -I*)
+          tmp_has_include="yes"
+          ;;
+      esac
+    done
+    if test "$tmp_has_include" = "yes"; then
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+      CPPFLAGS="$tmp_chg_FLAGS"
+      squeeze CPPFLAGS
+    fi
   fi
 
     fi
@@ -14837,9 +16718,9 @@ squeeze() {
         #
       IBM_C)
         #
-                tmp_CFLAGS="$tmp_CFLAGS -qthreaded"
-                                        tmp_CFLAGS="$tmp_CFLAGS -qnoansialias"
-                        tmp_CFLAGS="$tmp_CFLAGS -qhalt=e"
+                tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
+                                        tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
+                        tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
         ;;
         #
       INTEL_UNIX_C)
@@ -14970,7 +16851,7 @@ rm -f core conftest.err conftest.$ac_objext \
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15084,8 +16965,13 @@ $as_echo_n "checking if compiler accepts debug disabling options... " >&6; }
       tmp_options="$flags_dbg_off"
     fi
     #
-    CPPFLAGS="$tmp_CPPFLAGS"
-    CFLAGS="$tmp_CFLAGS $tmp_options"
+    if test "$flags_prefer_cppflags" = "yes"; then
+      CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+      CFLAGS="$tmp_CFLAGS"
+    else
+      CPPFLAGS="$tmp_CPPFLAGS"
+      CFLAGS="$tmp_CFLAGS $tmp_options"
+    fi
     squeeze CPPFLAGS
     squeeze CFLAGS
 
@@ -15157,7 +17043,7 @@ rm -f core conftest.err conftest.$ac_objext \
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15324,8 +17210,13 @@ $as_echo_n "checking if compiler accepts optimizer enabling options... " >&6; }
 $as_echo_n "checking if compiler accepts optimizer disabling options... " >&6; }
         tmp_options="$flags_opt_off"
       fi
-      CPPFLAGS="$tmp_CPPFLAGS"
-      CFLAGS="$tmp_CFLAGS $tmp_options"
+      if test "$flags_prefer_cppflags" = "yes"; then
+        CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+        CFLAGS="$tmp_CFLAGS"
+      else
+        CPPFLAGS="$tmp_CPPFLAGS"
+        CFLAGS="$tmp_CFLAGS $tmp_options"
+      fi
       squeeze CPPFLAGS
       squeeze CFLAGS
 
@@ -15397,7 +17288,7 @@ rm -f core conftest.err conftest.$ac_objext \
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15471,7 +17362,7 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
       CLANG)
         #
         if test "$want_warnings" = "yes"; then
-                              tmp_CFLAGS="$tmp_CFLAGS -pedantic"
+          tmp_CFLAGS="$tmp_CFLAGS -pedantic"
           tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
           tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
           tmp_CFLAGS="$tmp_CFLAGS -Wshadow"
@@ -15556,9 +17447,14 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
             tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
           fi
           #
+                    if test "$compiler_num" -ge "400"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+          fi
+          #
                     if test "$compiler_num" -ge "402"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
           fi
+          #
                     if test "$compiler_num" -ge "403"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wtype-limits -Wold-style-declaration"
             tmp_CFLAGS="$tmp_CFLAGS -Wmissing-parameter-type -Wempty-body"
@@ -15566,6 +17462,12 @@ $as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;}
             tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
           fi
           #
+                    if test "$compiler_num" -ge "405"; then
+                        if test "$curl_cv_have_def__WIN32" = "yes"; then
+              tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+            fi
+          fi
+          #
         fi
         #
                 if test "$compiler_num" -ge "300"; then
@@ -15756,7 +17658,7 @@ rm -f core conftest.err conftest.$ac_objext \
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on function prototype mismatch" >&5
+$as_echo_n "checking if compiler halts on function prototype mismatch... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared libraries need -no-undefined" >&5
-$as_echo_n "checking if shared libraries need -no-undefined... " >&6; }
-  need_no_undefined="no"
-  case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
-      need_no_undefined="yes"
+
+#     include <stdlib.h>
+      int rand(int n);
+      int rand(int n)
+      {
+        if(n)
+          return ++n;
+        else
+          return n;
+      }
+
+int main (void)
+{
+
+      int i[2];
+      int j = rand(i[0]);
+      if(j)
+        return j;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    as_fn_error $? "compiler does not halt on function prototype mismatch." "$LINENO" 5
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports hiding library internal symbols" >&5
+$as_echo_n "checking if compiler supports hiding library internal symbols... " >&6; }
+  supports_symbol_hiding="no"
+  symbol_hiding_CFLAGS=""
+  symbol_hiding_EXTERN=""
+  tmp_CFLAGS=""
+  tmp_EXTERN=""
+  case "$compiler_id" in
+    CLANG)
+            tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+      tmp_CFLAGS="-fvisibility=hidden"
+      supports_symbol_hiding="yes"
+      ;;
+    GNU_C)
+            if test "$compiler_num" -ge "304"; then
+        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+          tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+          tmp_CFLAGS="-fvisibility=hidden"
+          supports_symbol_hiding="yes"
+        fi
+      fi
+      ;;
+    INTEL_UNIX_C)
+            if test "$compiler_num" -ge "900"; then
+        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+          tmp_save_CFLAGS="$CFLAGS"
+          CFLAGS="$CFLAGS -fvisibility=hidden"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#             include <stdio.h>
+
+int main (void)
+{
+
+              printf("icc fvisibility bug test");
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+            tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+            tmp_CFLAGS="-fvisibility=hidden"
+            supports_symbol_hiding="yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          CFLAGS="$tmp_save_CFLAGS"
+        fi
+      fi
+      ;;
+    SUNPRO_C)
+      if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
+        tmp_EXTERN="__global"
+        tmp_CFLAGS="-xldscope=hidden"
+        supports_symbol_hiding="yes"
+      fi
       ;;
   esac
-  if test "x$allow_undefined" = "xno"; then
-    need_no_undefined="yes"
-  elif test "x$allow_undefined_flag" = "xunsupported"; then
-    need_no_undefined="yes"
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_no_undefined" >&5
-$as_echo "$need_no_undefined" >&6; }
+  if test "$supports_symbol_hiding" = "yes"; then
+    tmp_save_CFLAGS="$CFLAGS"
+    CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
+    squeeze CFLAGS
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+        $tmp_EXTERN char *dummy(char *buff);
+        char *dummy(char *buff)
+        {
+         if(buff)
+           return ++buff;
+         else
+           return buff;
+        }
+
+int main (void)
+{
+
+        char b[16];
+        char *r = dummy(&b[0]);
+        if(r)
+          return (int)*r;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      supports_symbol_hiding="yes"
+      if test -f conftest.err; then
+        grep 'visibility' conftest.err >/dev/null
+        if test "$?" -eq "0"; then
+          supports_symbol_hiding="no"
+        fi
+      fi
 
-if test x$need_no_undefined = xyes; then
-  NO_UNDEFINED_TRUE=
-  NO_UNDEFINED_FALSE='#'
 else
-  NO_UNDEFINED_TRUE='#'
-  NO_UNDEFINED_FALSE=
+
+      supports_symbol_hiding="no"
+      echo " " >&6
+      sed 's/^/cc-src: /' conftest.$ac_ext >&6
+      sed 's/^/cc-err: /' conftest.err >&6
+      echo " " >&6
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    CFLAGS="$tmp_save_CFLAGS"
+  fi
+  if test "$supports_symbol_hiding" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    symbol_hiding_CFLAGS="$tmp_CFLAGS"
+    symbol_hiding_EXTERN="$tmp_EXTERN"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
 
 
 
-    supports_curldebug="unknown"
+      supports_curldebug="unknown"
   if test "$want_curldebug" = "yes"; then
     if test "x$enable_shared" != "xno" &&
       test "x$enable_shared" != "xyes"; then
@@ -15938,7 +17983,7 @@ $as_echo "$as_me: WARNING: unknown enable_static setting." >&2;}
     fi
     if test "$supports_curldebug" != "no"; then
       if test "$enable_shared" = "yes" &&
-        test "$need_no_undefined" = "yes"; then
+        test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
         supports_curldebug="no"
         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared library does not support undefined symbols." >&5
 $as_echo "$as_me: WARNING: shared library does not support undefined symbols." >&2;}
@@ -15960,17 +18005,15 @@ $as_echo "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;}
   fi
   #
   if test "$want_curldebug" = "yes"; then
-    CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
+    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
     squeeze CPPFLAGS
   fi
   if test "$want_debug" = "yes"; then
-    CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
+    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
     squeeze CPPFLAGS
   fi
 
-
-
-if test x$want_curldebug = xyes; then
+ if test x$want_curldebug = xyes; then
   CURLDEBUG_TRUE=
   CURLDEBUG_FALSE='#'
 else
@@ -15979,12 +18022,56 @@ else
 fi
 
 
+supports_unittests=yes
+# cross-compilation of unit tests static library/programs fails when
+# libcurl shared library is built. This might be due to a libtool or
+# automake issue. In this case we disable unit tests.
+if test "x$cross_compiling" != "xno" &&
+   test "x$enable_shared" != "xno"; then
+  supports_unittests=no
+fi
+
+# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
+# a problem related with OpenSSL headers and library versions not matching.
+# Disable unit tests while time to further investigate this is found.
+case $host in
+  mips-sgi-irix6.5)
+    if test "$compiler_id" = "GNU_C"; then
+      supports_unittests=no
+    fi
+    ;;
+esac
+
+# All AIX autobuilds fails unit tests linking against unittests library
+# due to unittests library being built with no symbols or members. Libtool ?
+# Disable unit tests while time to further investigate this is found.
+case $host_os in
+  aix*)
+    supports_unittests=no
+    ;;
+esac
+
+if test "x$want_debug" = "xyes" &&
+   test "x$supports_unittests" = "xyes"; then
+  want_unittests=yes
+else
+  want_unittests=no
+fi
+ if test x$want_unittests = xyes; then
+  BUILD_UNITTESTS_TRUE=
+  BUILD_UNITTESTS_FALSE='#'
+else
+  BUILD_UNITTESTS_TRUE='#'
+  BUILD_UNITTESTS_FALSE=
+fi
+
+
 
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
+if ${ac_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16044,7 +18131,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target is a native Windows one" >&5
 $as_echo_n "checking whether build target is a native Windows one... " >&6; }
-if test "${ac_cv_native_windows+set}" = set; then :
+if ${ac_cv_native_windows+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16086,22 +18173,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_native_windows" >&5
 $as_echo "$ac_cv_native_windows" >&6; }
-  case "$ac_cv_native_windows" in
-    yes)
-
-cat >>confdefs.h <<_ACEOF
-#define NATIVE_WINDOWS 1
-_ACEOF
+   if test "x$ac_cv_native_windows" = xyes; then
+  DOING_NATIVE_WINDOWS_TRUE=
+  DOING_NATIVE_WINDOWS_FALSE='#'
+else
+  DOING_NATIVE_WINDOWS_TRUE='#'
+  DOING_NATIVE_WINDOWS_FALSE=
+fi
 
-      ;;
-  esac
 
 case X-"$ac_cv_native_windows" in
   X-yes)
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
 $as_echo_n "checking for winsock.h... " >&6; }
-if test "${ac_cv_header_winsock_h+set}" = set; then :
+if ${ac_cv_header_winsock_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16157,7 +18243,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
+if ${ac_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16213,7 +18299,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
 $as_echo_n "checking for ws2tcpip.h... " >&6; }
-if test "${ac_cv_header_ws2tcpip_h+set}" = set; then :
+if ${ac_cv_header_ws2tcpip_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16270,7 +18356,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5
 $as_echo_n "checking for winldap.h... " >&6; }
-if test "${ac_cv_header_winldap_h+set}" = set; then :
+if ${ac_cv_header_winldap_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16329,7 +18415,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5
 $as_echo_n "checking for winber.h... " >&6; }
-if test "${ac_cv_header_winber_h+set}" = set; then :
+if ${ac_cv_header_winber_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -16473,7 +18559,7 @@ _ACEOF
 $as_echo "yes (large file disabled)" >&6; }
 
 cat >>confdefs.h <<_ACEOF
-#define USE_WIN32_LARGE_FILES 1
+#define USE_WIN32_SMALL_FILES 1
 _ACEOF
 
       ;;
@@ -16905,6 +18991,51 @@ $as_echo "yes" >&6; }
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable generation of C code" >&5
+$as_echo_n "checking whether to enable generation of C code... " >&6; }
+# Check whether --enable-libcurl_option was given.
+if test "${enable_libcurl_option+set}" = set; then :
+  enableval=$enable_libcurl_option;  case "$enableval" in
+  no)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define CURL_DISABLE_LIBCURL_OPTION 1" >>confdefs.h
+
+       curl_libcurl_msg="no"
+       ;;
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
+  esac
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libgcc" >&5
+$as_echo_n "checking whether to use libgcc... " >&6; }
+# Check whether --enable-libgcc was given.
+if test "${enable_libgcc+set}" = set; then :
+  enableval=$enable_libgcc;  case "$enableval" in
+  yes)
+       LIBS="-lgcc $LIBS"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       ;;
+  esac
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X/Open network library is required" >&5
@@ -16930,7 +19061,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
     tst_lib_xnet_required="yes"
-    LIBS="$LIBS -lxnet"
+    LIBS="-lxnet $LIBS"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -16939,13 +19070,13 @@ $as_echo "$tst_lib_xnet_required" >&6; }
 
 
 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
   HAVE_GETHOSTBYNAME="1"
 
 else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16976,9 +19107,9 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   HAVE_GETHOSTBYNAME="1"
-                             LIBS="$LIBS -lnsl"
+                             LIBS="-lnsl $LIBS"
 
 fi
 
@@ -16990,7 +19121,7 @@ if test "$HAVE_GETHOSTBYNAME" != "1"
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
 $as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_socket_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17021,9 +19152,54 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
 $as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
-if test "x$ac_cv_lib_socket_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
+  HAVE_GETHOSTBYNAME="1"
+               LIBS="-lsocket $LIBS"
+
+fi
+
+fi
+
+if test "$HAVE_GETHOSTBYNAME" != "1"
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lwatt" >&5
+$as_echo_n "checking for gethostbyname in -lwatt... " >&6; }
+if ${ac_cv_lib_watt_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwatt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int main (void)
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_watt_gethostbyname=yes
+else
+  ac_cv_lib_watt_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_watt_gethostbyname" >&5
+$as_echo "$ac_cv_lib_watt_gethostbyname" >&6; }
+if test "x$ac_cv_lib_watt_gethostbyname" = xyes; then :
   HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lsocket"
+               CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
+               LDFLAGS="-L/dev/env/WATT_ROOT/lib"
+               LIBS="-lwatt $LIBS"
 
 fi
 
@@ -17214,7 +19390,7 @@ if test "$HAVE_GETHOSTBYNAME" != "1"
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnetwork" >&5
 $as_echo_n "checking for gethostbyname in -lnetwork... " >&6; }
-if test "${ac_cv_lib_network_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_network_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17245,9 +19421,9 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_gethostbyname" >&5
 $as_echo "$ac_cv_lib_network_gethostbyname" >&6; }
-if test "x$ac_cv_lib_network_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_network_gethostbyname" = xyes; then :
   HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnetwork"
+               LIBS="-lnetwork $LIBS"
 
 fi
 
@@ -17257,7 +19433,7 @@ if test "$HAVE_GETHOSTBYNAME" != "1"
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnet" >&5
 $as_echo_n "checking for gethostbyname in -lnet... " >&6; }
-if test "${ac_cv_lib_net_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_net_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17288,9 +19464,9 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_gethostbyname" >&5
 $as_echo "$ac_cv_lib_net_gethostbyname" >&6; }
-if test "x$ac_cv_lib_net_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_net_gethostbyname" = xyes; then :
   HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnet"
+               LIBS="-lnet $LIBS"
 
 fi
 
@@ -17302,12 +19478,12 @@ if test "$HAVE_GETHOSTBYNAME" != "1"; then
 fi
 
 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = x""yes; then :
+if test "x$ac_cv_func_strcasecmp" = xyes; then :
 
 else
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
 $as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then :
+if ${ac_cv_lib_resolve_strcasecmp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17338,7 +19514,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
 $as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = x""yes; then :
+if test "x$ac_cv_lib_resolve_strcasecmp" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRESOLVE 1
 _ACEOF
@@ -17353,7 +19529,7 @@ fi
 if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolve" >&5
 $as_echo_n "checking for strcasecmp in -lresolve... " >&6; }
-if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then :
+if ${ac_cv_lib_resolve_strcasecmp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17384,7 +19560,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolve_strcasecmp" >&5
 $as_echo "$ac_cv_lib_resolve_strcasecmp" >&6; }
-if test "x$ac_cv_lib_resolve_strcasecmp" = x""yes; then :
+if test "x$ac_cv_lib_resolve_strcasecmp" = xyes; then :
   LIBS="-lresolve $LIBS"
 fi
 
@@ -17411,7 +19587,7 @@ curl_includes_winsock2="\
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
+if ${ac_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -17471,7 +19647,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5
 $as_echo_n "checking for winsock.h... " >&6; }
-if test "${ac_cv_header_winsock_h+set}" = set; then :
+if ${ac_cv_header_winsock_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -17527,7 +19703,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
+if ${ac_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -17642,7 +19818,7 @@ CURL_NETWORK_LIBS=$LIBS
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17811,7 +19987,6 @@ $as_echo "no additional lib required" >&6; }
         else
           LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
         fi
-        CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_gclk_LIBS" >&5
 $as_echo "$curl_cv_gclk_LIBS" >&6; }
         ac_cv_func_clock_gettime="yes"
@@ -17826,7 +20001,7 @@ $as_echo_n "checking if monotonic clock_gettime works... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -17898,30 +20073,184 @@ _ACEOF
   #
 
 
-TEST_SERVER_LIBS=$LIBS
+CURL_NETWORK_AND_TIME_LIBS=$LIBS
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libgcc" >&5
-$as_echo_n "checking whether to use libgcc... " >&6; }
-# Check whether --enable-libgcc was given.
-if test "${enable_libgcc+set}" = set; then :
-  enableval=$enable_libgcc;  case "$enableval" in
-  yes)
-        ALL_LIBS="$ALL_LIBS -lgcc"
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ;;
-  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       ;;
-  esac
+
+
+clean_CPPFLAGS=$CPPFLAGS
+clean_LDFLAGS=$LDFLAGS
+clean_LIBS=$LIBS
+ZLIB_LIBS=""
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib; OPT_ZLIB="$withval"
+fi
+
+
+if test "$OPT_ZLIB" = "no" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
+$as_echo "$as_me: WARNING: zlib disabled" >&2;}
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  if test "$OPT_ZLIB" = "yes" ; then
+    OPT_ZLIB=""
+  fi
+
+  if test -z "$OPT_ZLIB" ; then
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
+$as_echo_n "checking for inflateEnd in -lz... " >&6; }
+if ${ac_cv_lib_z_inflateEnd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateEnd ();
+int main (void)
+{
+return inflateEnd ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_inflateEnd=yes
+else
+  ac_cv_lib_z_inflateEnd=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
+$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
+if test "x$ac_cv_lib_z_inflateEnd" = xyes; then :
+                     HAVE_LIBZ="1"
+                    LIBS="-lz $LIBS"
+else
+                     OPT_ZLIB="/usr/local"
+fi
+
+
+  fi
+
+    if test -n "$OPT_ZLIB"; then
+     CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
+     LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
+  fi
+
+  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+
+        HAVE_ZLIB_H="1"
+        if test "$HAVE_LIBZ" != "1"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
+$as_echo_n "checking for gzread in -lz... " >&6; }
+if ${ac_cv_lib_z_gzread+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzread ();
+int main (void)
+{
+return gzread ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_gzread=yes
+else
+  ac_cv_lib_z_gzread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
+$as_echo "$ac_cv_lib_z_gzread" >&6; }
+if test "x$ac_cv_lib_z_gzread" = xyes; then :
+
+                                      HAVE_LIBZ="1"
+                   LIBS="-lz $LIBS"
+
+else
+   CPPFLAGS=$clean_CPPFLAGS
+                   LDFLAGS=$clean_LDFLAGS
+fi
+
+    fi
+
+else
+
+            CPPFLAGS=$clean_CPPFLAGS
+      LDFLAGS=$clean_LDFLAGS
+
+fi
+
+
+
+  if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
+  then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5
+$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;}
+    HAVE_LIBZ=""
+    CPPFLAGS=$clean_CPPFLAGS
+    LDFLAGS=$clean_LDFLAGS
+    LIBS=$clean_LIBS
+  elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
+  then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5
+$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;}
+    CPPFLAGS=$clean_CPPFLAGS
+    LDFLAGS=$clean_LDFLAGS
+    LIBS=$clean_LIBS
+  elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
+  then
+
+
+$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+
+    ZLIB_LIBS="-lz"
+    LIBS="-lz $clean_LIBS"
+
+        AMFIXLIB="1"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5
+$as_echo "$as_me: found both libz and libz.h header" >&6;}
+    curl_zlib_msg="enabled"
+  fi
+fi
 
+ if test x"$AMFIXLIB" = x1; then
+  HAVE_LIBZ_TRUE=
+  HAVE_LIBZ_FALSE='#'
+else
+  HAVE_LIBZ_TRUE='#'
+  HAVE_LIBZ_FALSE=
 fi
 
 
 
+
 LDAPLIBNAME=""
 
 # Check whether --with-ldap-lib was given.
@@ -17943,7 +20272,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lber.h" >&5
 $as_echo_n "checking for lber.h... " >&6; }
-if test "${ac_cv_header_lber_h+set}" = set; then :
+if ${ac_cv_header_lber_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18060,7 +20389,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5
 $as_echo_n "checking for ldap.h... " >&6; }
-if test "${ac_cv_header_ldap_h+set}" = set; then :
+if ${ac_cv_header_ldap_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18125,7 +20454,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5
 $as_echo_n "checking for ldapssl.h... " >&6; }
-if test "${ac_cv_header_ldapssl_h+set}" = set; then :
+if ${ac_cv_header_ldapssl_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18196,7 +20525,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5
 $as_echo_n "checking for ldap_ssl.h... " >&6; }
-if test "${ac_cv_header_ldap_ssl_h+set}" = set; then :
+if ${ac_cv_header_ldap_ssl_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -18272,7 +20601,7 @@ _ACEOF
     as_ac_Lib=`$as_echo "ac_cv_lib_"$LDAPLIBNAME"''_ldap_init" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l\"$LDAPLIBNAME\"" >&5
 $as_echo_n "checking for ldap_init in -l\"$LDAPLIBNAME\"... " >&6; }
-if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18320,13 +20649,13 @@ $as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
 
       CURL_DISABLE_LDAP=1
 
-fi
-
 
 $as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
 
       CURL_DISABLE_LDAPS=1
 
+fi
+
   else
 
     #
@@ -18453,7 +20782,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
       as_ac_Lib=`$as_echo "ac_cv_lib_"$LBERLIBNAME"''_ber_free" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -l\"$LBERLIBNAME\"" >&5
 $as_echo_n "checking for ber_free in -l\"$LBERLIBNAME\"... " >&6; }
-if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18501,13 +20830,13 @@ $as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h
 
         CURL_DISABLE_LDAP=1
 
-fi
-
 
 $as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h
 
         CURL_DISABLE_LDAPS=1
 
+fi
+
     fi
   fi
 fi
@@ -18757,7 +21086,7 @@ $as_echo "libs in $KRB4LIB, headers in $KRB4INC" >&6; }
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_pcbc_encrypt in -ldes" >&5
 $as_echo_n "checking for des_pcbc_encrypt in -ldes... " >&6; }
-if test "${ac_cv_lib_des_des_pcbc_encrypt+set}" = set; then :
+if ${ac_cv_lib_des_des_pcbc_encrypt+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18788,12 +21117,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_pcbc_encrypt" >&5
 $as_echo "$ac_cv_lib_des_des_pcbc_encrypt" >&6; }
-if test "x$ac_cv_lib_des_des_pcbc_encrypt" = x""yes; then :
+if test "x$ac_cv_lib_des_des_pcbc_encrypt" = xyes; then :
 
     for ac_header in des.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
-if test "x$ac_cv_header_des_h" = x""yes; then :
+if test "x$ac_cv_header_des_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DES_H 1
 _ACEOF
@@ -18804,12 +21133,12 @@ done
 
 
         ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search"
-if test "x$ac_cv_func_res_search" = x""yes; then :
+if test "x$ac_cv_func_res_search" = xyes; then :
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5
 $as_echo_n "checking for res_search in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_search+set}" = set; then :
+if ${ac_cv_lib_resolv_res_search+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18840,7 +21169,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_search" >&5
 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
-if test "x$ac_cv_lib_resolv_res_search" = x""yes; then :
+if test "x$ac_cv_lib_resolv_res_search" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRESOLV 1
 _ACEOF
@@ -18854,7 +21183,7 @@ fi
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_net_read in -lkrb" >&5
 $as_echo_n "checking for krb_net_read in -lkrb... " >&6; }
-if test "${ac_cv_lib_krb_krb_net_read+set}" = set; then :
+if ${ac_cv_lib_krb_krb_net_read+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18885,12 +21214,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_net_read" >&5
 $as_echo "$ac_cv_lib_krb_krb_net_read" >&6; }
-if test "x$ac_cv_lib_krb_krb_net_read" = x""yes; then :
+if test "x$ac_cv_lib_krb_krb_net_read" = xyes; then :
 
             for ac_header in krb.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
-if test "x$ac_cv_header_krb_h" = x""yes; then :
+if test "x$ac_cv_header_krb_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_KRB_H 1
 _ACEOF
@@ -18905,7 +21234,7 @@ done
                   for ac_func in krb_get_our_ip_for_realm
 do :
   ac_fn_c_check_func "$LINENO" "krb_get_our_ip_for_realm" "ac_cv_func_krb_get_our_ip_for_realm"
-if test "x$ac_cv_func_krb_get_our_ip_for_realm" = x""yes; then :
+if test "x$ac_cv_func_krb_get_our_ip_for_realm" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_KRB_GET_OUR_IP_FOR_REALM 1
 _ACEOF
@@ -18926,7 +21255,7 @@ $as_echo "#define HAVE_KRB4 1" >>confdefs.h
             for ac_func in strlcpy
 do :
   ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
-if test "x$ac_cv_func_strlcpy" = x""yes; then :
+if test "x$ac_cv_func_strlcpy" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRLCPY 1
 _ACEOF
@@ -19040,7 +21369,7 @@ $as_echo "yes" >&6; }
   CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
 
   ac_fn_c_check_header_mongrel "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default"
-if test "x$ac_cv_header_gss_h" = x""yes; then :
+if test "x$ac_cv_header_gss_h" = xyes; then :
 
 
 $as_echo "#define HAVE_GSSGNU 1" >>confdefs.h
@@ -19052,7 +21381,7 @@ else
             for ac_header in gssapi/gssapi.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then :
+if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GSSAPI_GSSAPI_H 1
 _ACEOF
@@ -19086,7 +21415,7 @@ done
 
       if test "x$not_mit" = "x1"; then
                 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
-if test "x$ac_cv_header_gssapi_h" = x""yes; then :
+if test "x$ac_cv_header_gssapi_h" = xyes; then :
 
 
 $as_echo "#define HAVE_GSSHEIMDAL 1" >>confdefs.h
@@ -19165,33 +21494,104 @@ $as_echo "#define HAVE_GSSAPI 1" >>confdefs.h
   if test -n "$gnu_gss"; then
     curl_gss_msg="enabled (GNU GSS)"
     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-    LIBS="$LIBS -lgss"
+    LIBS="-lgss $LIBS"
   elif test -z "$GSSAPI_LIB_DIR"; then
      case $host in
      *-*-darwin*)
-        LIBS="$LIBS -lgssapi_krb5 -lresolv"
+        LIBS="-lgssapi_krb5 -lresolv $LIBS"
         ;;
      *)
         if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
                                  gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
-           LIBS="$LIBS $gss_libs"
+           LIBS="$gss_libs $LIBS"
         elif test "$GSSAPI_ROOT" != "yes"; then
            LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
-           LIBS="$LIBS -lgssapi"
+           LIBS="-lgssapi $LIBS"
         else
-           LIBS="$LIBS -lgssapi"
+           LIBS="-lgssapi $LIBS"
         fi
         ;;
      esac
   else
      LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-     LIBS="$LIBS -lgssapi"
+     LIBS="-lgssapi $LIBS"
   fi
 else
   CPPFLAGS="$save_CPPFLAGS"
 fi
 
 
+OPT_WINSSL=no
+
+# Check whether --with-winssl was given.
+if test "${with_winssl+set}" = set; then :
+  withval=$with_winssl; OPT_WINSSL=$withval
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS (Windows native builds only)" >&5
+$as_echo_n "checking whether to enable Windows native SSL/TLS (Windows native builds only)... " >&6; }
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test "x$OPT_WINSSL" != "xno"  &&
+     test "x$ac_cv_native_windows" = "xyes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_SCHANNEL 1" >>confdefs.h
+
+    USE_SCHANNEL=1
+
+    curl_ssl_msg="enabled (Windows-native)"
+    WINSSL_ENABLED=1
+    # --with-winssl implies --enable-sspi
+
+$as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h
+
+    USE_WINDOWS_SSPI=1
+
+    curl_sspi_msg="enabled"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+OPT_DARWINSSL=no
+
+# Check whether --with-darwinssl was given.
+if test "${with_darwinssl+set}" = set; then :
+  withval=$with_darwinssl; OPT_DARWINSSL=$withval
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable iOS/Mac OS X native SSL/TLS" >&5
+$as_echo_n "checking whether to enable iOS/Mac OS X native SSL/TLS... " >&6; }
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test "x$OPT_DARWINSSL" != "xno" &&
+     test -d "/System/Library/Frameworks/Security.framework"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_DARWINSSL 1" >>confdefs.h
+
+    USE_DARWINSSL=1
+
+    curl_ssl_msg="enabled (iOS/Mac OS X-native)"
+    DARWINSSL_ENABLED=1
+    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
 OPT_SSL=off
 ca="no"
 
@@ -19201,7 +21601,7 @@ if test "${with_ssl+set}" = set; then :
 fi
 
 
-if test X"$OPT_SSL" != Xno; then
+if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
     CLEANLDFLAGS="$LDFLAGS"
   CLEANCPPFLAGS="$CPPFLAGS"
   CLEANLIBS="$LIBS"
@@ -19227,7 +21627,7 @@ if test X"$OPT_SSL" != Xno; then
                 OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
     { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
 $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
-    if test -e "$OPENSSL_PCDIR/openssl.pc"; then
+    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
       PKGTEST="yes"
     fi
 
@@ -19246,12 +21646,12 @@ $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-            # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKGCONFIG in
@@ -19266,7 +21666,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -19275,7 +21675,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
@@ -19289,19 +21688,19 @@ $as_echo "no" >&6; }
 fi
 
 
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PKGCONFIG in
+  case $ac_pt_PKGCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -19311,8 +21710,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -19320,21 +21719,33 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-    fi
 
     if test x$PKGCONFIG != xno; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5
@@ -19388,7 +21799,7 @@ $as_echo "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;}
 
       LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
 
-                                          LIBS="$LIBS $SSL_LIBS"
+                                          LIBS="$SSL_LIBS $LIBS"
     fi
   fi
 
@@ -19428,7 +21839,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_lock in -lcrypto" >&5
 $as_echo_n "checking for CRYPTO_lock in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then :
+if ${ac_cv_lib_crypto_CRYPTO_lock+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -19459,7 +21870,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5
 $as_echo "$ac_cv_lib_crypto_CRYPTO_lock" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_lock" = x""yes; then :
+if test "x$ac_cv_lib_crypto_CRYPTO_lock" = xyes; then :
 
      HAVECRYPTO="yes"
      LIBS="-lcrypto $LIBS"
@@ -19470,7 +21881,7 @@ else
      CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_add_lock in -lcrypto" >&5
 $as_echo_n "checking for CRYPTO_add_lock in -lcrypto... " >&6; }
-if test "${ac_cv_lib_crypto_CRYPTO_add_lock+set}" = set; then :
+if ${ac_cv_lib_crypto_CRYPTO_add_lock+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -19501,7 +21912,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_add_lock" >&5
 $as_echo "$ac_cv_lib_crypto_CRYPTO_add_lock" >&6; }
-if test "x$ac_cv_lib_crypto_CRYPTO_add_lock" = x""yes; then :
+if test "x$ac_cv_lib_crypto_CRYPTO_add_lock" = xyes; then :
 
        HAVECRYPTO="yes"
        LIBS="-lcrypto $LIBS"
@@ -19522,7 +21933,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
 $as_echo_n "checking for SSL_connect in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then :
+if ${ac_cv_lib_ssl_SSL_connect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -19553,7 +21964,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
 $as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = x""yes; then :
+if test "x$ac_cv_lib_ssl_SSL_connect" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSSL 1
 _ACEOF
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5
 $as_echo_n "checking for ssl with RSAglue/rsaref libs in use... " >&6; };
         OLIBS=$LIBS
-        LIBS="$LIBS -lRSAglue -lrsaref"
+        LIBS="-lRSAglue -lrsaref $LIBS"
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5
 $as_echo_n "checking for SSL_connect in -lssl... " >&6; }
-if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then :
+if ${ac_cv_lib_ssl_SSL_connect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -19601,7 +22012,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5
 $as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; }
-if test "x$ac_cv_lib_ssl_SSL_connect" = x""yes; then :
+if test "x$ac_cv_lib_ssl_SSL_connect" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSSL 1
 _ACEOF
@@ -19672,7 +22083,7 @@ $as_echo "#define USE_SSLEAY 1" >>confdefs.h
               for ac_header in openssl/pkcs12.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "openssl/pkcs12.h" "ac_cv_header_openssl_pkcs12_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_pkcs12_h" = x""yes; then :
+if test "x$ac_cv_header_openssl_pkcs12_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENSSL_PKCS12_H 1
 _ACEOF
@@ -19695,12 +22106,12 @@ done
 
   if test X"$OPENSSL_ENABLED" = X"1"; then
             ac_fn_c_check_func "$LINENO" "ENGINE_init" "ac_cv_func_ENGINE_init"
-if test "x$ac_cv_func_ENGINE_init" = x""yes; then :
+if test "x$ac_cv_func_ENGINE_init" = xyes; then :
 
                 for ac_header in openssl/engine.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "openssl/engine.h" "ac_cv_header_openssl_engine_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_engine_h" = x""yes; then :
+if test "x$ac_cv_header_openssl_engine_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENSSL_ENGINE_H 1
 _ACEOF
@@ -19718,254 +22129,669 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-fi
-done
+fi
+done
+
+
+fi
+
+
+
+    for ac_func in RAND_status \
+                    RAND_screen \
+                    RAND_egd \
+                    ENGINE_cleanup \
+                    CRYPTO_cleanup_all_ex_data \
+                    SSL_get_shutdown \
+                    SSLv2_client_method
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaSSL using OpenSSL compatibility mode" >&5
+$as_echo_n "checking for yaSSL using OpenSSL compatibility mode... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <openssl/ssl.h>
+
+int main (void)
+{
+
+#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
+        int dummy = SSL_ERROR_NONE;
+#else
+        Not the yaSSL OpenSSL compatibility header.
+#endif
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define USE_YASSLEMUL 1
+_ACEOF
+
+      curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
+
+else
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+
+  if test "$OPENSSL_ENABLED" = "1"; then
+    if test -n "$LIB_OPENSSL"; then
+                            if test "x$cross_compiling" != "xyes"; then
+         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+         export LD_LIBRARY_PATH
+         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
+       fi
+    fi
+
+  #
+
+  #
+  tst_api="unknown"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers version" >&5
+$as_echo_n "checking for OpenSSL headers version... " >&6; }
+
+      if test -z "$SED"; then
+    as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5
+  fi
+  if test -z "$GREP"; then
+    as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5
+  fi
+
+  tmp_exp=""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#   ifdef USE_OPENSSL
+#     include <openssl/crypto.h>
+#   else
+#     include <crypto.h>
+#   endif
+
+#ifdef OPENSSL_VERSION_NUMBER
+CURL_DEF_TOKEN OPENSSL_VERSION_NUMBER
+#endif
+
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+    tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
+      "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
+      "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \
+      "$SED" 's/["][ ]*["]//g' 2>/dev/null`
+    if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_NUMBER"; then
+      tmp_exp=""
+    fi
+
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+  if test -z "$tmp_exp"; then
+    curl_cv_have_def_OPENSSL_VERSION_NUMBER=no
+
+  else
+    curl_cv_have_def_OPENSSL_VERSION_NUMBER=yes
+    curl_cv_def_OPENSSL_VERSION_NUMBER=$tmp_exp
+
+  fi
+
+  if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then
+    tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'`
+    case "x$tst_verlen" in
+      x6)
+        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4`
+        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+        ;;
+      x11|x10)
+        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`
+        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+        ;;
+      *)
+        tst_api="unknown"
+        ;;
+    esac
+    case $tst_api in
+      0x110) tst_show="1.1.0" ;;
+      0x101) tst_show="1.0.1" ;;
+      0x100) tst_show="1.0.0" ;;
+      0x099) tst_show="0.9.9" ;;
+      0x098) tst_show="0.9.8" ;;
+      0x097) tst_show="0.9.7" ;;
+      0x096) tst_show="0.9.6" ;;
+      0x095) tst_show="0.9.5" ;;
+      0x094) tst_show="0.9.4" ;;
+      0x093) tst_show="0.9.3" ;;
+      0x092) tst_show="0.9.2" ;;
+      0x091) tst_show="0.9.1" ;;
+      *)     tst_show="unknown" ;;
+    esac
+    tst_show="$tst_show - $curl_cv_def_OPENSSL_VERSION_NUMBER"
+  else
+    tst_show="unknown"
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
+$as_echo "$tst_show" >&6; }
+  #
+  curl_openssl_api_headers=$tst_api
+
+
+  #
+  tst_api="unknown"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library version" >&5
+$as_echo_n "checking for OpenSSL library version... " >&6; }
+  if test "$tst_api" = "unknown"; then
+    case $host in
+      *-*-vms*)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define SSL_CTX_set_not_resumbl_sess_cb innocuous_SSL_CTX_set_not_resumbl_sess_cb
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_CTX_set_not_resumbl_sess_cb
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_CTX_set_not_resumbl_sess_cb ();
+#if defined __stub_SSL_CTX_set_not_resumbl_sess_cb || defined __stub___SSL_CTX_set_not_resumbl_sess_cb
+choke me
+#endif
+
+int main (void)
+{
+return SSL_CTX_set_not_resumbl_sess_cb ();
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+          tst_api="0x110"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        ;;
+      *)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+#define SSL_CTX_set_not_resumable_session_callback innocuous_SSL_CTX_set_not_resumable_session_callback
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_CTX_set_not_resumable_session_callback
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_CTX_set_not_resumable_session_callback ();
+#if defined __stub_SSL_CTX_set_not_resumable_session_callback || defined __stub___SSL_CTX_set_not_resumable_session_callback
+choke me
+#endif
 
-    for ac_func in RAND_status \
-                    RAND_screen \
-                    RAND_egd \
-                    ENGINE_cleanup \
-                    CRYPTO_cleanup_all_ex_data \
-                    SSL_get_shutdown
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
+int main (void)
+{
+return SSL_CTX_set_not_resumable_session_callback ();
+ ;
+ return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+          tst_api="0x110"
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yaSSL using OpenSSL compatibility mode" >&5
-$as_echo_n "checking for yaSSL using OpenSSL compatibility mode... " >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        ;;
+    esac
+  fi
+  if test "$tst_api" = "unknown"; then
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#include <openssl/ssl.h>
+#define SSL_renegotiate_abbreviated innocuous_SSL_renegotiate_abbreviated
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_renegotiate_abbreviated
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_renegotiate_abbreviated ();
+#if defined __stub_SSL_renegotiate_abbreviated || defined __stub___SSL_renegotiate_abbreviated
+choke me
+#endif
 
 int main (void)
 {
+return SSL_renegotiate_abbreviated ();
+ ;
+ return 0;
+}
 
-#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
-        int dummy = SSL_ERROR_NONE;
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+      tst_api="0x101"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define OBJ_add_sigid innocuous_OBJ_add_sigid
+#ifdef __STDC__
+# include <limits.h>
 #else
-        Not the yaSSL OpenSSL compatibility header.
+# include <assert.h>
+#endif
+#undef OBJ_add_sigid
+#ifdef __cplusplus
+extern "C"
+#endif
+char OBJ_add_sigid ();
+#if defined __stub_OBJ_add_sigid || defined __stub___OBJ_add_sigid
+choke me
 #endif
 
+int main (void)
+{
+return OBJ_add_sigid ();
  ;
  return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
 
-cat >>confdefs.h <<_ACEOF
-#define USE_YASSLEMUL 1
-_ACEOF
+      tst_api="0x100"
 
-      curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+#define ERR_set_mark innocuous_ERR_set_mark
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef ERR_set_mark
+#ifdef __cplusplus
+extern "C"
+#endif
+char ERR_set_mark ();
+#if defined __stub_ERR_set_mark || defined __stub___ERR_set_mark
+choke me
+#endif
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
+int main (void)
+{
+return ERR_set_mark ();
+ ;
+ return 0;
+}
 
-  if test "$OPENSSL_ENABLED" = "1"; then
-    if test -n "$LIB_OPENSSL"; then
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
-       export LD_LIBRARY_PATH
-       { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
-    fi
-  fi
+      tst_api="0x098"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+#define ERR_peek_last_error innocuous_ERR_peek_last_error
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef ERR_peek_last_error
+#ifdef __cplusplus
+extern "C"
+#endif
+char ERR_peek_last_error ();
+#if defined __stub_ERR_peek_last_error || defined __stub___ERR_peek_last_error
+choke me
+#endif
 
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
+int main (void)
+{
+return ERR_peek_last_error ();
+ ;
+ return 0;
+}
 
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
-  withval=$with_zlib; OPT_ZLIB="$withval"
-fi
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+      tst_api="0x097"
 
-if test "$OPT_ZLIB" = "no" ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
-$as_echo "$as_me: WARNING: zlib disabled" >&2;}
-else
-  if test "$OPT_ZLIB" = "yes" ; then
-     OPT_ZLIB=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
   fi
-
-  if test -z "$OPT_ZLIB" ; then
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
-$as_echo_n "checking for inflateEnd in -lz... " >&6; }
-if test "${ac_cv_lib_z_inflateEnd+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#define c2i_ASN1_OBJECT innocuous_c2i_ASN1_OBJECT
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef c2i_ASN1_OBJECT
 #ifdef __cplusplus
 extern "C"
 #endif
-char inflateEnd ();
+char c2i_ASN1_OBJECT ();
+#if defined __stub_c2i_ASN1_OBJECT || defined __stub___c2i_ASN1_OBJECT
+choke me
+#endif
+
 int main (void)
 {
-return inflateEnd ();
+return c2i_ASN1_OBJECT ();
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_inflateEnd=yes
-else
-  ac_cv_lib_z_inflateEnd=no
+
+      tst_api="0x096"
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
-$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
-if test "x$ac_cv_lib_z_inflateEnd" = x""yes; then :
-                     HAVE_LIBZ="1"
-else
-                     OPT_ZLIB="/usr/local"
-fi
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-  fi
+#define SSL_CTX_set_purpose innocuous_SSL_CTX_set_purpose
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_CTX_set_purpose
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_CTX_set_purpose ();
+#if defined __stub_SSL_CTX_set_purpose || defined __stub___SSL_CTX_set_purpose
+choke me
+#endif
 
-    if test -n "$OPT_ZLIB"; then
-     CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
-     LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
-  fi
+int main (void)
+{
+return SSL_CTX_set_purpose ();
+ ;
+ return 0;
+}
 
-  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-        HAVE_ZLIB_H="1"
-        if test "$HAVE_LIBZ" != "1"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
-$as_echo_n "checking for gzread in -lz... " >&6; }
-if test "${ac_cv_lib_z_gzread+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      tst_api="0x095"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#define OBJ_obj2txt innocuous_OBJ_obj2txt
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef OBJ_obj2txt
 #ifdef __cplusplus
 extern "C"
 #endif
-char gzread ();
+char OBJ_obj2txt ();
+#if defined __stub_OBJ_obj2txt || defined __stub___OBJ_obj2txt
+choke me
+#endif
+
 int main (void)
 {
-return gzread ();
+return OBJ_obj2txt ();
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_gzread=yes
-else
-  ac_cv_lib_z_gzread=no
+
+      tst_api="0x094"
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
-$as_echo "$ac_cv_lib_z_gzread" >&6; }
-if test "x$ac_cv_lib_z_gzread" = x""yes; then :
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-                                      HAVE_LIBZ="1"
 
-else
-   CPPFLAGS=$_cppflags
-                   LDFLAGS=$_ldflags
-fi
+#define SSL_get_verify_depth innocuous_SSL_get_verify_depth
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_get_verify_depth
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_get_verify_depth ();
+#if defined __stub_SSL_get_verify_depth || defined __stub___SSL_get_verify_depth
+choke me
+#endif
 
-    fi
+int main (void)
+{
+return SSL_get_verify_depth ();
+ ;
+ return 0;
+}
 
-else
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-            CPPFLAGS=$_cppflags
-      LDFLAGS=$_ldflags
+      tst_api="0x093"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+#define SSL_library_init innocuous_SSL_library_init
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_library_init
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_library_init ();
+#if defined __stub_SSL_library_init || defined __stub___SSL_library_init
+choke me
+#endif
 
-  if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
-  then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5
-$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;}
-    HAVE_LIBZ=""
-  elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
-  then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5
-$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;}
-  elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
-  then
+int main (void)
+{
+return SSL_library_init ();
+ ;
+ return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
+      tst_api="0x092"
 
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  if test "$tst_api" = "unknown"; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
 
+#define SSL_CTX_set_cipher_list innocuous_SSL_CTX_set_cipher_list
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef SSL_CTX_set_cipher_list
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_CTX_set_cipher_list ();
+#if defined __stub_SSL_CTX_set_cipher_list || defined __stub___SSL_CTX_set_cipher_list
+choke me
+#endif
 
-    CURL_LIBS="$CURL_LIBS -lz"
-    LIBS="$LIBS -lz"
+int main (void)
+{
+return SSL_CTX_set_cipher_list ();
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+      tst_api="0x091"
 
-        AMFIXLIB="1"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5
-$as_echo "$as_me: found both libz and libz.h header" >&6;}
-    curl_zlib_msg="enabled"
-  fi
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  case $tst_api in
+    0x110) tst_show="1.1.0" ;;
+    0x101) tst_show="1.0.1" ;;
+    0x100) tst_show="1.0.0" ;;
+    0x099) tst_show="0.9.9" ;;
+    0x098) tst_show="0.9.8" ;;
+    0x097) tst_show="0.9.7" ;;
+    0x096) tst_show="0.9.6" ;;
+    0x095) tst_show="0.9.5" ;;
+    0x094) tst_show="0.9.4" ;;
+    0x093) tst_show="0.9.3" ;;
+    0x092) tst_show="0.9.2" ;;
+    0x091) tst_show="0.9.1" ;;
+    *)     tst_show="unknown" ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5
+$as_echo "$tst_show" >&6; }
+  #
+  curl_openssl_api_library=$tst_api
 
+  #
+  tst_match="yes"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers and library versions matching" >&5
+$as_echo_n "checking for OpenSSL headers and library versions matching... " >&6; }
+  if test "$curl_openssl_api_headers" = "unknown" ||
+    test "$curl_openssl_api_library" = "unknown"; then
+    tst_match="fail"
+    tst_warns="Can not compare OpenSSL headers and library versions."
+  elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then
+    tst_match="no"
+    tst_warns="OpenSSL headers and library versions do not match."
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5
+$as_echo "$tst_match" >&6; }
+  if test "$tst_match" != "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5
+$as_echo "$as_me: WARNING: $tst_warns" >&2;}
+  fi
 
+  fi
 
-if test x"$AMFIXLIB" = x1; then
-  HAVE_LIBZ_TRUE=
-  HAVE_LIBZ_FALSE='#'
-else
-  HAVE_LIBZ_TRUE='#'
-  HAVE_LIBZ_FALSE=
 fi
 
 
-
 if test X"$OPENSSL_ENABLED" = X"1"; then
 
 # Check whether --with-egd-socket was given.
@@ -19988,10 +22814,11 @@ if test "${with_random+set}" = set; then :
   withval=$with_random;  RANDOM_FILE="$withval"
 else
 
-                    as_ac_File=`$as_echo "ac_cv_file_"/dev/urandom"" | $as_tr_sh`
+          if test x$cross_compiling != xyes; then
+                        as_ac_File=`$as_echo "ac_cv_file_"/dev/urandom"" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/urandom\"" >&5
 $as_echo_n "checking for \"/dev/urandom\"... " >&6; }
-if eval "test \"\${$as_ac_File+set}\"" = set; then :
+if eval \${$as_ac_File+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
@@ -20009,6 +22836,10 @@ if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
    RANDOM_FILE="/dev/urandom"
 fi
 
+          else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipped the /dev/urandom detection when cross-compiling" >&5
+$as_echo "$as_me: WARNING: skipped the /dev/urandom detection when cross-compiling" >&2;}
+          fi
 
 
 fi
@@ -20023,6 +22854,52 @@ _ACEOF
   fi
 fi
 
+if test "$OPENSSL_ENABLED" = "1"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SRP_Calc_client_key in -lcrypto" >&5
+$as_echo_n "checking for SRP_Calc_client_key in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_SRP_Calc_client_key+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char SRP_Calc_client_key ();
+int main (void)
+{
+return SRP_Calc_client_key ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crypto_SRP_Calc_client_key=yes
+else
+  ac_cv_lib_crypto_SRP_Calc_client_key=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SRP_Calc_client_key" >&5
+$as_echo "$ac_cv_lib_crypto_SRP_Calc_client_key" >&6; }
+if test "x$ac_cv_lib_crypto_SRP_Calc_client_key" = xyes; then :
+
+
+$as_echo "#define HAVE_SSLEAY_SRP 1" >>confdefs.h
+
+     HAVE_SSLEAY_SRP=1
+
+
+fi
+
+fi
+
 
 OPT_GNUTLS=no
 
@@ -20033,22 +22910,27 @@ if test "${with_gnutls+set}" = set; then :
 fi
 
 
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_GNUTLS" != Xno; then
 
     addld=""
+    addlib=""
+    gtlslib=""
+    version=""
+    addcflags=""
+
     if test "x$OPT_GNUTLS" = "xyes"; then
 
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-            # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKGCONFIG in
@@ -20063,7 +22945,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20072,7 +22954,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
@@ -20086,19 +22967,19 @@ $as_echo "no" >&6; }
 fi
 
 
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PKGCONFIG in
+  case $ac_pt_PKGCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -20108,8 +22989,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -20117,21 +22998,33 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-    fi
 
     if test x$PKGCONFIG != xno; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls options with pkg-config" >&5
@@ -20194,9 +23087,9 @@ $as_echo "found" >&6; }
 
       CLEANLIBS="$LIBS"
       CLEANCPPFLAGS="$CPPFLAGS"
-      CLEADLDFLAGS="$LDFLAGS"
+      CLEANLDFLAGS="$LDFLAGS"
 
-      LIBS="$LIBS $addlib"
+      LIBS="$addlib $LIBS"
       LDFLAGS="$LDFLAGS $addld"
       if test "$addcflags" != "-I/usr/include"; then
          CPPFLAGS="$CPPFLAGS $addcflags"
@@ -20204,7 +23097,7 @@ $as_echo "found" >&6; }
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_check_version in -lgnutls" >&5
 $as_echo_n "checking for gnutls_check_version in -lgnutls... " >&6; }
-if test "${ac_cv_lib_gnutls_gnutls_check_version+set}" = set; then :
+if ${ac_cv_lib_gnutls_gnutls_check_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20235,7 +23128,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_check_version" >&5
 $as_echo "$ac_cv_lib_gnutls_gnutls_check_version" >&6; }
-if test "x$ac_cv_lib_gnutls_gnutls_check_version" = x""yes; then :
+if test "x$ac_cv_lib_gnutls_gnutls_check_version" = xyes; then :
 
 
 $as_echo "#define USE_GNUTLS 1" >>confdefs.h
 $as_echo "$as_me: detected GnuTLS version $version" >&6;}
 
         if test -n "$gtlslib"; then
-
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
-          export LD_LIBRARY_PATH
-          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to LD_LIBRARY_PATH" >&5
+                                                  if test "x$cross_compiling" != "xyes"; then
+            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
+            export LD_LIBRARY_PATH
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to LD_LIBRARY_PATH" >&5
 $as_echo "$as_me: Added $gtlslib to LD_LIBRARY_PATH" >&6;}
+          fi
         fi
       fi
 
@@ -20272,10 +23166,130 @@ $as_echo "$as_me: Added $gtlslib to LD_LIBRARY_PATH" >&6;}
   fi
 fi
 
-if test "$GNUTLS_ENABLED" = "1"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
+
+if test "$GNUTLS_ENABLED" = "1"; then
+  USE_GNUTLS_NETTLE=
+  # First check if we can detect either crypto library via transitive linking
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lgnutls" >&5
+$as_echo_n "checking for nettle_MD5Init in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_nettle_MD5Init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char nettle_MD5Init ();
+int main (void)
+{
+return nettle_MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_nettle_MD5Init=yes
+else
+  ac_cv_lib_gnutls_nettle_MD5Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_nettle_MD5Init" >&5
+$as_echo "$ac_cv_lib_gnutls_nettle_MD5Init" >&6; }
+if test "x$ac_cv_lib_gnutls_nettle_MD5Init" = xyes; then :
+   USE_GNUTLS_NETTLE=1
+fi
+
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgnutls" >&5
+$as_echo_n "checking for gcry_control in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_gcry_control+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char gcry_control ();
+int main (void)
+{
+return gcry_control ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_gcry_control=yes
+else
+  ac_cv_lib_gnutls_gcry_control=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gcry_control" >&5
+$as_echo "$ac_cv_lib_gnutls_gcry_control" >&6; }
+if test "x$ac_cv_lib_gnutls_gcry_control" = xyes; then :
+   USE_GNUTLS_NETTLE=0
+fi
+
+  fi
+  # If not, try linking directly to both of them to see if they are available
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lnettle" >&5
+$as_echo_n "checking for nettle_MD5Init in -lnettle... " >&6; }
+if ${ac_cv_lib_nettle_nettle_MD5Init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnettle  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char nettle_MD5Init ();
+int main (void)
+{
+return nettle_MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nettle_nettle_MD5Init=yes
+else
+  ac_cv_lib_nettle_nettle_MD5Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_MD5Init" >&5
+$as_echo "$ac_cv_lib_nettle_nettle_MD5Init" >&6; }
+if test "x$ac_cv_lib_nettle_nettle_MD5Init" = xyes; then :
+   USE_GNUTLS_NETTLE=1
+fi
+
+  fi
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
 $as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
-if test "${ac_cv_lib_gcrypt_gcry_control+set}" = set; then :
+if ${ac_cv_lib_gcrypt_gcry_control+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20306,16 +23320,67 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_control" >&5
 $as_echo "$ac_cv_lib_gcrypt_gcry_control" >&6; }
-if test "x$ac_cv_lib_gcrypt_gcry_control" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGCRYPT 1
-_ACEOF
+if test "x$ac_cv_lib_gcrypt_gcry_control" = xyes; then :
+   USE_GNUTLS_NETTLE=0
+fi
+
+  fi
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    as_fn_error $? "GnuTLS found, but neither gcrypt nor nettle found" "$LINENO" 5
+  fi
+  if test "$USE_GNUTLS_NETTLE" = "1"; then
+
+$as_echo "#define USE_GNUTLS_NETTLE 1" >>confdefs.h
+
+    USE_GNUTLS_NETTLE=1
+
+    LIBS="-lnettle $LIBS"
+  else
+    LIBS="-lgcrypt $LIBS"
+  fi
+fi
+
+if test "$GNUTLS_ENABLED" = "1"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_srp_verifier in -lgnutls" >&5
+$as_echo_n "checking for gnutls_srp_verifier in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_gnutls_srp_verifier+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  LIBS="-lgcrypt $LIBS"
 
+#ifdef __cplusplus
+extern "C"
+#endif
+char gnutls_srp_verifier ();
+int main (void)
+{
+return gnutls_srp_verifier ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_gnutls_srp_verifier=yes
 else
+  ac_cv_lib_gnutls_gnutls_srp_verifier=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_srp_verifier" >&5
+$as_echo "$ac_cv_lib_gnutls_gnutls_srp_verifier" >&6; }
+if test "x$ac_cv_lib_gnutls_gnutls_srp_verifier" = xyes; then :
+
+
+$as_echo "#define HAVE_GNUTLS_SRP 1" >>confdefs.h
+
+     HAVE_GNUTLS_SRP=1
 
-      as_fn_error $? "need GnuTLS built with gcrypt to function with GnuTLS" "$LINENO" 5
 
 fi
 
@@ -20333,7 +23398,7 @@ if test "${with_polarssl+set}" = set; then :
 fi
 
 
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_POLARSSL" != Xno; then
 
@@ -20345,7 +23410,7 @@ if test "$OPENSSL_ENABLED" != "1"; then
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for havege_init in -lpolarssl" >&5
 $as_echo_n "checking for havege_init in -lpolarssl... " >&6; }
-if test "${ac_cv_lib_polarssl_havege_init+set}" = set; then :
+if ${ac_cv_lib_polarssl_havege_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20376,7 +23441,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_polarssl_havege_init" >&5
 $as_echo "$ac_cv_lib_polarssl_havege_init" >&6; }
-if test "x$ac_cv_lib_polarssl_havege_init" = x""yes; then :
+if test "x$ac_cv_lib_polarssl_havege_init" = xyes; then :
 
 
 $as_echo "#define USE_POLARSSL 1" >>confdefs.h
 
     fi
 
+    addld=""
+    addlib=""
+    addcflags=""
+    polarssllib=""
+
     if test "x$USE_POLARSSL" != "xyes"; then
             addld=-L$OPT_POLARSSL/lib$libsuff
       addcflags=-I$OPT_POLARSSL/include
@@ -20403,7 +23473,7 @@ fi
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl_init in -lpolarssl" >&5
 $as_echo_n "checking for ssl_init in -lpolarssl... " >&6; }
-if test "${ac_cv_lib_polarssl_ssl_init+set}" = set; then :
+if ${ac_cv_lib_polarssl_ssl_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20434,7 +23504,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_polarssl_ssl_init" >&5
 $as_echo "$ac_cv_lib_polarssl_ssl_init" >&6; }
-if test "x$ac_cv_lib_polarssl_ssl_init" = x""yes; then :
+if test "x$ac_cv_lib_polarssl_ssl_init" = xyes; then :
 
 
 $as_echo "#define USE_POLARSSL 1" >>confdefs.h
       { $as_echo "$as_me:${as_lineno-$LINENO}: detected PolarSSL" >&5
 $as_echo "$as_me: detected PolarSSL" >&6;}
 
-      CURL_LIBS="$CURL_LIBS -lpolarssl"
-      LIBS="$LIBS -lpolarssl"
+      LIBS="-lpolarssl $LIBS"
 
       if test -n "$polarssllib"; then
-
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
-        export LD_LIBRARY_PATH
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $polarssllib to LD_LIBRARY_PATH" >&5
+                                        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
+          export LD_LIBRARY_PATH
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $polarssllib to LD_LIBRARY_PATH" >&5
 $as_echo "$as_me: Added $polarssllib to LD_LIBRARY_PATH" >&6;}
+        fi
+      fi
+    fi
+
+  fi
+fi
+
+
+OPT_CYASSL=no
+
+_cppflags=$CPPFLAGS
+_ldflags=$LDFLAGS
+
+# Check whether --with-cyassl was given.
+if test "${with_cyassl+set}" = set; then :
+  withval=$with_cyassl; OPT_CYASSL=$withval
+fi
+
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+
+  if test X"$OPT_CYASSL" != Xno; then
+
+    if test "$OPT_CYASSL" = "yes"; then
+      OPT_CYASSL=""
+    fi
+
+    if test -z "$OPT_CYASSL" ; then
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CyaSSL_Init in -lcyassl" >&5
+$as_echo_n "checking for CyaSSL_Init in -lcyassl... " >&6; }
+if ${ac_cv_lib_cyassl_CyaSSL_Init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcyassl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char CyaSSL_Init ();
+int main (void)
+{
+return CyaSSL_Init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_cyassl_CyaSSL_Init=yes
+else
+  ac_cv_lib_cyassl_CyaSSL_Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cyassl_CyaSSL_Init" >&5
+$as_echo "$ac_cv_lib_cyassl_CyaSSL_Init" >&6; }
+if test "x$ac_cv_lib_cyassl_CyaSSL_Init" = xyes; then :
+
+
+$as_echo "#define USE_CYASSL 1" >>confdefs.h
+
+         USE_CYASSL=1
+
+         CYASSL_ENABLED=1
+         USE_CYASSL="yes"
+         curl_ssl_msg="enabled (CyaSSL)"
+
+fi
+
+    fi
+
+    addld=""
+    addlib=""
+    addcflags=""
+    cyassllib=""
+
+    if test "x$USE_CYASSL" != "xyes"; then
+            addld=-L$OPT_CYASSL/lib$libsuff
+      addcflags=-I$OPT_CYASSL/include
+      cyassllib=$OPT_CYASSL/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CyaSSL_Init in -lcyassl" >&5
+$as_echo_n "checking for CyaSSL_Init in -lcyassl... " >&6; }
+if ${ac_cv_lib_cyassl_CyaSSL_Init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcyassl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char CyaSSL_Init ();
+int main (void)
+{
+return CyaSSL_Init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_cyassl_CyaSSL_Init=yes
+else
+  ac_cv_lib_cyassl_CyaSSL_Init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cyassl_CyaSSL_Init" >&5
+$as_echo "$ac_cv_lib_cyassl_CyaSSL_Init" >&6; }
+if test "x$ac_cv_lib_cyassl_CyaSSL_Init" = xyes; then :
+
+
+$as_echo "#define USE_CYASSL 1" >>confdefs.h
+
+       USE_CYASSL=1
+
+       CYASSL_ENABLED=1
+       USE_CYASSL="yes"
+       curl_ssl_msg="enabled (CyaSSL)"
+
+else
+
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+
+fi
+
+    fi
+
+    if test "x$USE_CYASSL" = "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: detected CyaSSL" >&5
+$as_echo "$as_me: detected CyaSSL" >&6;}
+
+      LIBS="-lcyassl -lm $LIBS"
+
+      if test -n "$cyassllib"; then
+                                        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
+          export LD_LIBRARY_PATH
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $cyassllib to LD_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $cyassllib to LD_LIBRARY_PATH" >&6;}
+        fi
       fi
 
     fi
@@ -20474,6 +23701,7 @@ $as_echo "$as_me: Added $polarssllib to LD_LIBRARY_PATH" >&6;}
   fi
 fi
 
+
 OPT_NSS=no
 
 
@@ -20483,21 +23711,28 @@ if test "${with_nss+set}" = set; then :
 fi
 
 
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_NSS" != Xno; then
+
+    addld=""
+    addlib=""
+    addcflags=""
+    nssprefix=""
+    version=""
+
     if test "x$OPT_NSS" = "xyes"; then
 
 
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-            # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKGCONFIG in
@@ -20512,7 +23747,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20521,7 +23756,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
@@ -20535,19 +23769,19 @@ $as_echo "no" >&6; }
 fi
 
 
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PKGCONFIG in
+  case $ac_pt_PKGCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -20557,8 +23791,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -20566,21 +23800,33 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-    fi
 
     if test x$PKGCONFIG != xno; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5
@@ -20630,9 +23876,19 @@ $as_echo "found" >&6; }
         nssprefix=$OPT_NSS
     fi
 
+    if test -n "$addlib"; then
+
+      CLEANLIBS="$LIBS"
+      CLEANCPPFLAGS="$CPPFLAGS"
+
+      LIBS="$addlib $LIBS"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
+      fi
+
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreateGenericObject in -lnss3" >&5
 $as_echo_n "checking for PK11_CreateGenericObject in -lnss3... " >&6; }
-if test "${ac_cv_lib_nss3_PK11_CreateGenericObject+set}" = set; then :
+if ${ac_cv_lib_nss3_PK11_CreateGenericObject+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20663,33 +23919,93 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreateGenericObject" >&5
 $as_echo "$ac_cv_lib_nss3_PK11_CreateGenericObject" >&6; }
-if test "x$ac_cv_lib_nss3_PK11_CreateGenericObject" = x""yes; then :
+if test "x$ac_cv_lib_nss3_PK11_CreateGenericObject" = xyes; then :
+
 
+$as_echo "#define USE_NSS 1" >>confdefs.h
+
+       USE_NSS=1
 
-$as_echo "#define HAVE_PK11_CREATEGENERICOBJECT 1" >>confdefs.h
+       USE_NSS="yes"
+       NSS_ENABLED=1
+       curl_ssl_msg="enabled (NSS)"
 
-     HAVE_PK11_CREATEGENERICOBJECT=1
+else
 
+         LIBS="$CLEANLIBS"
+         CPPFLAGS="$CLEANCPPFLAGS"
 
 fi
 
-    if test -n "$addlib"; then
 
-      CLEANLIBS="$LIBS"
-      CLEANCPPFLAGS="$CPPFLAGS"
+      if test "x$USE_NSS" = "xyes"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
+$as_echo "$as_me: detected NSS version $version" >&6;}
 
-      LIBS="$LIBS $addlib"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
+                        ac_fn_c_check_func "$LINENO" "NSS_InitContext" "ac_cv_func_NSS_InitContext"
+if test "x$ac_cv_func_NSS_InitContext" = xyes; then :
+
+
+$as_echo "#define HAVE_NSS_INITCONTEXT 1" >>confdefs.h
+
+          HAVE_NSS_INITCONTEXT=1
+
+
+fi
+
+
+                                        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
+          export LD_LIBRARY_PATH
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
+        fi
       fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
-$as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
-if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
+    fi
+
+  fi
+fi
+OPT_AXTLS=off
+
+
+# Check whether --with-axtls was given.
+if test "${with_axtls+set}" = set; then :
+  withval=$with_axtls; OPT_AXTLS=$withval
+fi
+
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test X"$OPT_AXTLS" != Xno; then
+        CLEANLDFLAGS="$LDFLAGS"
+    CLEANCPPFLAGS="$CPPFLAGS"
+    CLEANLIBS="$LIBS"
+
+    case "$OPT_AXTLS" in
+    yes)
+            PREFIX_AXTLS=/usr/local
+      LIB_AXTLS="$PREFIX_AXTLS/lib"
+      LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+      CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+      ;;
+    off)
+            PREFIX_AXTLS=
+      ;;
+    *)
+            PREFIX_AXTLS=$OPT_AXTLS
+      LIB_AXTLS="$PREFIX_AXTLS/lib"
+      LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+      CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+      ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl_version in -laxtls" >&5
+$as_echo_n "checking for ssl_version in -laxtls... " >&6; }
+if ${ac_cv_lib_axtls_ssl_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnss3  $LIBS"
+LIBS="-laxtls  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -20697,64 +24013,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char NSS_Initialize ();
+char ssl_version ();
 int main (void)
 {
-return NSS_Initialize ();
+return ssl_version ();
  ;
  return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_nss3_NSS_Initialize=yes
+  ac_cv_lib_axtls_ssl_version=yes
 else
-  ac_cv_lib_nss3_NSS_Initialize=no
+  ac_cv_lib_axtls_ssl_version=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
-$as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
-if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
-
-
-$as_echo "#define USE_NSS 1" >>confdefs.h
-
-       USE_NSS=1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_axtls_ssl_version" >&5
+$as_echo "$ac_cv_lib_axtls_ssl_version" >&6; }
+if test "x$ac_cv_lib_axtls_ssl_version" = xyes; then :
 
-       USE_NSS="yes"
-       NSS_ENABLED=1
-       curl_ssl_msg="enabled (NSS)"
+      LIBS="-laxtls $LIBS"
 
-else
+$as_echo "#define USE_AXTLS 1" >>confdefs.h
 
-         LIBS="$CLEANLIBS"
-         CPPFLAGS="$CLEANCPPFLAGS"
+      USE_AXTLS=1
 
-fi
+      AXTLS_ENABLED=1
+      USE_AXTLS="yes"
+      curl_ssl_msg="enabled (axTLS)"
 
 
-      if test "x$USE_NSS" = "xyes"; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5
-$as_echo "$as_me: detected NSS version $version" >&6;}
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
+      export LD_LIBRARY_PATH
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_AXTLS to LD_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $LIB_AXTLS to LD_LIBRARY_PATH" >&6;}
 
+else
 
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
-        export LD_LIBRARY_PATH
-        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
-$as_echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
-      fi
+      LDFLAGS="$CLEANLDFLAGS"
+      CPPFLAGS="$CLEANCPPFLAGS"
+      LIBS="$CLEANLIBS"
 
-    fi
+fi
 
   fi
 fi
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
+
+if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5
 $as_echo "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this." >&5
-$as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this." >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this." >&5
+$as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this." >&2;}
 else
   # SSL is enabled, genericly
 
     fi
     capath="$want_capath"
     ca="no"
-  else
-                ca="no"
+  elif test "x$cross_compiling" != "xyes"; then
+
+            ca="no"
     capath="no"
     if test "x$want_ca" = "xunset"; then
                         if test "x$prefix" != xNONE; then
         cac="${prefix}/share/curl/curl-ca-bundle.crt"
       else
-        cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
+        cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
+      fi
+
+      for a in /etc/ssl/certs/ca-certificates.crt \
+               /etc/pki/tls/certs/ca-bundle.crt \
+               /usr/share/ssl/certs/ca-bundle.crt \
+               /usr/local/share/certs/ca-root.crt \
+               /etc/ssl/cert.pem \
+               "$cac"; do
+        if test -f "$a"; then
+          ca="$a"
+          break
+        fi
+      done
+    fi
+    if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
+            "x$OPENSSL_ENABLED" = "x1"; then
+      for a in /etc/ssl/certs/; do
+        if test -d "$a" && ls "$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then
+          capath="$a"
+          break
+        fi
+      done
+    fi
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipped the ca-cert path detection when cross-compiling" >&5
+$as_echo "$as_me: WARNING: skipped the ca-cert path detection when cross-compiling" >&2;}
+  fi
+
+  if test "x$ca" != "xno"; then
+    CURL_CA_BUNDLE='"'$ca'"'
+
+cat >>confdefs.h <<_ACEOF
+#define CURL_CA_BUNDLE "$ca"
+_ACEOF
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ca" >&5
+$as_echo "$ca" >&6; }
+  elif test "x$capath" != "xno"; then
+    CURL_CA_PATH="\"$capath\""
+
+cat >>confdefs.h <<_ACEOF
+#define CURL_CA_PATH "$capath"
+_ACEOF
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $capath (capath)" >&5
+$as_echo "$capath (capath)" >&6; }
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  fi
+
+
+
+OPT_LIBMETALINK=no
+
+
+# Check whether --with-libmetalink was given.
+if test "${with_libmetalink+set}" = set; then :
+  withval=$with_libmetalink; OPT_LIBMETALINK=$withval
+fi
+
+
+if test X"$OPT_LIBMETALINK" != Xno; then
+
+  addld=""
+  addlib=""
+  addcflags=""
+  version=""
+  libmetalinklib=""
+
+  PKGTEST="no"
+  if test "x$OPT_LIBMETALINK" = "xyes"; then
+        PKGTEST="yes"
+
+
+    PKGCONFIG="no"
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
+
+    if test x$PKGCONFIG != xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5
+$as_echo_n "checking for libmetalink options with pkg-config... " >&6; }
+            itexists=`
+    if test -n ""; then
+      PKG_CONFIG_LIBDIR=""
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      fi
+    fi
+
+  else
+        LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&5
+$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&6;}
+    if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
+      PKGTEST="yes"
+    fi
+    if test "$PKGTEST" = "yes"; then
+
+
+    PKGCONFIG="no"
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
+
+    if test x$PKGCONFIG != xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5
+$as_echo_n "checking for libmetalink options with pkg-config... " >&6; }
+            itexists=`
+    if test -n "$LIBMETALINK_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
       fi
+    fi
 
-      for a in /etc/ssl/certs/ca-certificates.crt \
-               /etc/pki/tls/certs/ca-bundle.crt \
-               /usr/share/ssl/certs/ca-bundle.crt \
-               /usr/local/share/certs/ca-root.crt \
-               /etc/ssl/cert.pem \
-               "$cac"; do
-        if test -f "$a"; then
-          ca="$a"
-          break
-        fi
-      done
     fi
-    if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
-            "x$OPENSSL_ENABLED" = "x1"; then
-      for a in /etc/ssl/certs/; do
-        if test -d "$a" && ls "$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then
-          capath="$a"
-          break
-        fi
-      done
+  fi
+  if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
+    addlib=`
+    if test -n "$LIBMETALINK_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+       $PKGCONFIG --libs-only-l libmetalink`
+    addld=`
+    if test -n "$LIBMETALINK_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+       $PKGCONFIG --libs-only-L libmetalink`
+    addcflags=`
+    if test -n "$LIBMETALINK_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+       $PKGCONFIG --cflags-only-I libmetalink`
+    version=`
+    if test -n "$LIBMETALINK_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR"
+      export PKG_CONFIG_LIBDIR
     fi
+       $PKGCONFIG --modversion libmetalink`
+    libmetalinklib=`echo $addld | $SED -e 's/-L//'`
   fi
+  if test -n "$addlib"; then
 
+    clean_CPPFLAGS="$CPPFLAGS"
+    clean_LDFLAGS="$LDFLAGS"
+    clean_LIBS="$LIBS"
+    CPPFLAGS="$addcflags $clean_CPPFLAGS"
+    LDFLAGS="$addld $clean_LDFLAGS"
+    LIBS="$addlib $clean_LIBS"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmetalink is recent enough" >&5
+$as_echo_n "checking if libmetalink is recent enough... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-  if test "x$ca" != "xno"; then
-    CURL_CA_BUNDLE='"'$ca'"'
+#       include <metalink/metalink.h>
 
-cat >>confdefs.h <<_ACEOF
-#define CURL_CA_BUNDLE "$ca"
-_ACEOF
+int main (void)
+{
 
+        if(0 != metalink_strerror(0)) /* added in 0.1.0 */
+          return 1;
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ca" >&5
-$as_echo "$ca" >&6; }
-  elif test "x$capath" != "xno"; then
-    CURL_CA_PATH="\"$capath\""
+ ;
+ return 0;
+}
 
-cat >>confdefs.h <<_ACEOF
-#define CURL_CA_PATH "$capath"
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $capath (capath)" >&5
-$as_echo "$capath (capath)" >&6; }
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($version)" >&5
+$as_echo "yes ($version)" >&6; }
+      want_metalink="yes"
+
+else
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no ($version)" >&5
+$as_echo "no ($version)" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: libmetalink library defective or too old" >&5
+$as_echo "$as_me: libmetalink library defective or too old" >&6;}
+      want_metalink="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+    if test "$want_metalink" = "yes"; then
+
+$as_echo "#define USE_METALINK 1" >>confdefs.h
+
+      LIBMETALINK_LIBS=$addlib
+      LIBMETALINK_LDFLAGS=$addld
+      LIBMETALINK_CPPFLAGS=$addcflags
+
+
+
+      curl_mtlnk_msg="enabled"
+    fi
 
+  fi
+fi
 
 
 OPT_LIBSSH2=off
@@ -20886,12 +24570,12 @@ if test X"$OPT_LIBSSH2" != Xno; then
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-            # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKGCONFIG in
@@ -20906,7 +24590,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -20915,7 +24599,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
@@ -20929,19 +24612,19 @@ $as_echo "no" >&6; }
 fi
 
 
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PKGCONFIG in
+  case $ac_pt_PKGCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -20951,8 +24634,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -20960,21 +24643,33 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-    fi
 
     if test x$PKGCONFIG != xno; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2 options with pkg-config" >&5
@@ -21014,6 +24709,7 @@ $as_echo "found" >&6; }
   esac
 
     if test -n "$PREFIX_SSH2"; then
+    LIB_SSH2="-lssh2"
     LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
     CPP_SSH2=-I${PREFIX_SSH2}/include
     DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
@@ -21021,11 +24717,11 @@ $as_echo "found" >&6; }
 
   LDFLAGS="$LDFLAGS $LD_SSH2"
   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
-  LIBS="$LIBS $LIB_SSH2"
+  LIBS="$LIB_SSH2 $LIBS"
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_channel_open_ex in -lssh2" >&5
 $as_echo_n "checking for libssh2_channel_open_ex in -lssh2... " >&6; }
-if test "${ac_cv_lib_ssh2_libssh2_channel_open_ex+set}" = set; then :
+if ${ac_cv_lib_ssh2_libssh2_channel_open_ex+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21056,7 +24752,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_channel_open_ex" >&5
 $as_echo "$ac_cv_lib_ssh2_libssh2_channel_open_ex" >&6; }
-if test "x$ac_cv_lib_ssh2_libssh2_channel_open_ex" = x""yes; then :
+if test "x$ac_cv_lib_ssh2_libssh2_channel_open_ex" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSSH2 1
 _ACEOF
@@ -21069,7 +24765,7 @@ fi
   for ac_header in libssh2.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default"
-if test "x$ac_cv_header_libssh2_h" = x""yes; then :
+if test "x$ac_cv_header_libssh2_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSSH2_H 1
 _ACEOF
@@ -21107,11 +24803,12 @@ _ACEOF
 fi
 done
 
-
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
-       export LD_LIBRARY_PATH
-       { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&5
+       if test "x$cross_compiling" != "xyes"; then
+         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
+         export LD_LIBRARY_PATH
+         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&5
 $as_echo "$as_me: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&6;}
+       fi
     fi
   else
         LDFLAGS=$CLEANLDFLAGS
@@ -21140,12 +24837,12 @@ if test X"$OPT_LIBRTMP" != Xno; then
 
     PKGCONFIG="no"
 
-    if test x$cross_compiling = xyes; then
-            # Extract the first word of "${host}-pkg-config", so it can be a program name with args.
-set dummy ${host}-pkg-config; ac_word=$2
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKGCONFIG in
@@ -21160,7 +24857,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -21169,7 +24866,6 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
@@ -21183,19 +24879,19 @@ $as_echo "no" >&6; }
 fi
 
 
-    fi
-
-    if test x$PKGCONFIG = xno; then
-      # Extract the first word of "pkg-config", so it can be a program name with args.
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PKGCONFIG in
+  case $ac_pt_PKGCONFIG in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -21205,8 +24901,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -21214,21 +24910,33 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
   ;;
 esac
 fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-    fi
 
     if test x$PKGCONFIG != xno; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librtmp options with pkg-config" >&5
@@ -21278,11 +24986,11 @@ $as_echo "found" >&6; }
 
   LDFLAGS="$LDFLAGS $LD_RTMP"
   CPPFLAGS="$CPPFLAGS $CPP_RTMP"
-  LIBS="$LIBS $LIB_RTMP"
+  LIBS="$LIB_RTMP $LIBS"
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5
 $as_echo_n "checking for RTMP_Init in -lrtmp... " >&6; }
-if test "${ac_cv_lib_rtmp_RTMP_Init+set}" = set; then :
+if ${ac_cv_lib_rtmp_RTMP_Init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -21313,12 +25021,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rtmp_RTMP_Init" >&5
 $as_echo "$ac_cv_lib_rtmp_RTMP_Init" >&6; }
-if test "x$ac_cv_lib_rtmp_RTMP_Init" = x""yes; then :
+if test "x$ac_cv_lib_rtmp_RTMP_Init" = xyes; then :
 
      for ac_header in librtmp/rtmp.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "librtmp/rtmp.h" "ac_cv_header_librtmp_rtmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_librtmp_rtmp_h" = x""yes; then :
+if test "x$ac_cv_header_librtmp_rtmp_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRTMP_RTMP_H 1
 _ACEOF
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn" >&5
-$as_echo_n "checking whether to build with libidn... " >&6; }
+versioned_symbols_flavour=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether versioned symbols are wanted" >&5
+$as_echo_n "checking whether versioned symbols are wanted... " >&6; }
+# Check whether --enable-versioned-symbols was given.
+if test "${enable_versioned_symbols+set}" = set; then :
+  enableval=$enable_versioned_symbols;  case "$enableval" in
+  yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
+$as_echo_n "checking if libraries can be versioned... " >&6; }
+    GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+    if test -z "$GLD"; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need an ld version supporting the --version-script option" >&5
+$as_echo "$as_me: WARNING: You need an ld version supporting the --version-script option" >&2;}
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        if test "x$OPENSSL_ENABLED" = "x1"; then
+          versioned_symbols_flavour="OPENSSL_"
+        elif test "x$GNUTLS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="GNUTLS_"
+        elif test "x$NSS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="NSS_"
+        elif test "x$POLARSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="POLARSSL_"
+        elif test "x$CYASSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="CYASSL_"
+        elif test "x$AXTLS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="AXTLS_"
+        elif test "x$WINSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="WINSSL_"
+        elif test "x$DARWINSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="DARWINSSL_"
+        else
+          versioned_symbols_flavour=""
+        fi
+        versioned_symbols="yes"
+    fi
+    ;;
+
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+
+else
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 
-# Check whether --with-libidn was given.
-if test "${with_libidn+set}" = set; then :
-  withval=$with_libidn; LIBIDN="$withval"
 fi
 
 
-case "$LIBIDN" in
-  no)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+CURL_LT_SHLIB_VERSIONED_FLAVOUR="$versioned_symbols_flavour"
+
+ if test "x$versioned_symbols" = 'xyes'; then
+  CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE=
+  CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE='#'
+else
+  CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE='#'
+  CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native IDN (Windows native builds only)" >&5
+$as_echo_n "checking whether to enable Windows native IDN (Windows native builds only)... " >&6; }
+OPT_WINIDN="default"
+
+# Check whether --with-winidn was given.
+if test "${with_winidn+set}" = set; then :
+  withval=$with_winidn; OPT_WINIDN=$withval
+fi
+
+case "$OPT_WINIDN" in
+  no|default)
+        want_winidn="no"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       ;;
-  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+    ;;
+  yes)
+        want_winidn="yes"
+    want_winidn_path="default"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+    ;;
+  *)
+        want_winidn="yes"
+    want_winidn_path="$withval"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
+$as_echo "yes ($withval)" >&6; }
+    ;;
+esac
 
-       idn=""
-              if test -n "$LIBIDN"; then
-         if test "x$LIBIDN" != "xyes"; then
-            oldLDFLAGS=$LDFLAGS
-            oldCPPFLAGS=$CPPFLAGS
-            LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
-            CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
-            idn="yes"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idna_to_ascii_4i in -lidn" >&5
-$as_echo_n "checking for idna_to_ascii_4i in -lidn... " >&6; }
-if test "${ac_cv_lib_idn_idna_to_ascii_4i+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lidn  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "$want_winidn" = "yes"; then
+    clean_CPPFLAGS="$CPPFLAGS"
+  clean_LDFLAGS="$LDFLAGS"
+  clean_LIBS="$LIBS"
+  WINIDN_LIBS="-lnormaliz"
+  #
+  if test "$want_winidn_path" != "default"; then
+            WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
+    WINIDN_CPPFLAGS="-I$want_winidn_path/include"
+    WINIDN_DIR="$want_winidn_path/lib$libsuff"
+  fi
+  #
+  CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS"
+  LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS"
+  LIBS="$WINIDN_LIBS $LIBS"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IdnToUnicode can be linked" >&5
+$as_echo_n "checking if IdnToUnicode can be linked... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#define IdnToUnicode innocuous_IdnToUnicode
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef IdnToUnicode
 #ifdef __cplusplus
 extern "C"
 #endif
-char idna_to_ascii_4i ();
+char IdnToUnicode ();
+#if defined __stub_IdnToUnicode || defined __stub___IdnToUnicode
+choke me
+#endif
+
 int main (void)
 {
-return idna_to_ascii_4i ();
+return IdnToUnicode ();
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_idn_idna_to_ascii_4i=yes
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    tst_links_winidn="yes"
+
 else
-  ac_cv_lib_idn_idna_to_ascii_4i=no
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    tst_links_winidn="no"
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  #
+  if test "$tst_links_winidn" = "yes"; then
+
+$as_echo "#define USE_WIN32_IDN 1" >>confdefs.h
+
+
+$as_echo "#define WANT_IDN_PROTOTYPES 1" >>confdefs.h
+
+    IDN_ENABLED=1
+
+    curl_idn_msg="enabled (Windows-native)"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
+$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+  fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idna_to_ascii_4i" >&5
-$as_echo "$ac_cv_lib_idn_idna_to_ascii_4i" >&6; }
-if test "x$ac_cv_lib_idn_idna_to_ascii_4i" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBIDN 1
-_ACEOF
 
-  LIBS="-lidn $LIBS"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn" >&5
+$as_echo_n "checking whether to build with libidn... " >&6; }
+OPT_IDN="default"
+
+# Check whether --with-libidn was given.
+if test "${with_libidn+set}" = set; then :
+  withval=$with_libidn; OPT_IDN=$withval
+fi
+
+case "$OPT_IDN" in
+  no)
+        want_idn="no"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  default)
+        want_idn="yes"
+    want_idn_path="default"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
+$as_echo "(assumed) yes" >&6; }
+    ;;
+  yes)
+        want_idn="yes"
+    want_idn_path="default"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    ;;
+  *)
+        want_idn="yes"
+    want_idn_path="$withval"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5
+$as_echo "yes ($withval)" >&6; }
+    ;;
+esac
+
+if test "$want_idn" = "yes"; then
+    clean_CPPFLAGS="$CPPFLAGS"
+  clean_LDFLAGS="$LDFLAGS"
+  clean_LIBS="$LIBS"
+  PKGCONFIG="no"
+  #
+  if test "$want_idn_path" != "default"; then
+        IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
+
+
+    PKGCONFIG="no"
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
 else
-  idn=""
-                         LDFLAGS=$oldLDFLAGS
-                         CPPFLAGS=$oldCPPFLAGS
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
 fi
 
-         fi
-       fi
 
-       if test "x$idn" != "xyes"; then
-                    idn="yes"
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idna_to_ascii_lz in -lidn" >&5
-$as_echo_n "checking for idna_to_ascii_lz in -lidn... " >&6; }
-if test "${ac_cv_lib_idn_idna_to_ascii_lz+set}" = set; then :
+    if test x$PKGCONFIG != xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn options with pkg-config" >&5
+$as_echo_n "checking for libidn options with pkg-config... " >&6; }
+            itexists=`
+    if test -n "$IDN_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$IDN_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists libidn >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      fi
+    fi
+
+    if test "$PKGCONFIG" != "no"; then
+      IDN_LIBS=`
+    if test -n "$IDN_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$IDN_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --libs-only-l libidn 2>/dev/null`
+      IDN_LDFLAGS=`
+    if test -n "$IDN_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$IDN_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --libs-only-L libidn 2>/dev/null`
+      IDN_CPPFLAGS=`
+    if test -n "$IDN_PCDIR"; then
+      PKG_CONFIG_LIBDIR="$IDN_PCDIR"
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+      IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+    else
+            IDN_LIBS="-lidn"
+      IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
+      IDN_CPPFLAGS="-I$want_idn_path/include"
+      IDN_DIR="$want_idn_path/lib$libsuff"
+    fi
+  else
+
+
+    PKGCONFIG="no"
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lidn  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/bin:/usr/local/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
+
+
+    if test x$PKGCONFIG != xno; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn options with pkg-config" >&5
+$as_echo_n "checking for libidn options with pkg-config... " >&6; }
+            itexists=`
+    if test -n ""; then
+      PKG_CONFIG_LIBDIR=""
+      export PKG_CONFIG_LIBDIR
+    fi
+         $PKGCONFIG --exists libidn >/dev/null 2>&1 && echo 1`
+
+      if test -z "$itexists"; then
+                        PKGCONFIG="no"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      fi
+    fi
+
+    if test "$PKGCONFIG" != "no"; then
+      IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
+      IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
+      IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+      IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+    else
+            IDN_LIBS="-lidn"
+    fi
+  fi
+  #
+  if test "$PKGCONFIG" != "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&5
+$as_echo "$as_me: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5
+$as_echo "$as_me: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5
+$as_echo "$as_me: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&5
+$as_echo "$as_me: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&6;}
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_LIBS: \"$IDN_LIBS\"" >&5
+$as_echo "$as_me: IDN_LIBS: \"$IDN_LIBS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5
+$as_echo "$as_me: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5
+$as_echo "$as_me: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_DIR: \"$IDN_DIR\"" >&5
+$as_echo "$as_me: IDN_DIR: \"$IDN_DIR\"" >&6;}
+  fi
+  #
+  CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
+  LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
+  LIBS="$IDN_LIBS $LIBS"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idna_to_ascii_4i can be linked" >&5
+$as_echo_n "checking if idna_to_ascii_4i can be linked... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
+#define idna_to_ascii_4i innocuous_idna_to_ascii_4i
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef idna_to_ascii_4i
 #ifdef __cplusplus
 extern "C"
 #endif
-char idna_to_ascii_lz ();
+char idna_to_ascii_4i ();
+#if defined __stub_idna_to_ascii_4i || defined __stub___idna_to_ascii_4i
+choke me
+#endif
+
 int main (void)
 {
-return idna_to_ascii_lz ();
+return idna_to_ascii_4i ();
  ;
  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_idn_idna_to_ascii_lz=yes
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    tst_links_libidn="yes"
+
 else
-  ac_cv_lib_idn_idna_to_ascii_lz=no
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    tst_links_libidn="no"
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idna_to_ascii_lz" >&5
-$as_echo "$ac_cv_lib_idn_idna_to_ascii_lz" >&6; }
-if test "x$ac_cv_lib_idn_idna_to_ascii_lz" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBIDN 1
+  if test "$tst_links_libidn" = "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idna_to_ascii_lz can be linked" >&5
+$as_echo_n "checking if idna_to_ascii_lz can be linked... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define idna_to_ascii_lz innocuous_idna_to_ascii_lz
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef idna_to_ascii_lz
+#ifdef __cplusplus
+extern "C"
+#endif
+char idna_to_ascii_lz ();
+#if defined __stub_idna_to_ascii_lz || defined __stub___idna_to_ascii_lz
+choke me
+#endif
+
+int main (void)
+{
+return idna_to_ascii_lz ();
+ ;
+ return 0;
+}
+
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-  LIBS="-lidn $LIBS"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      tst_links_libidn="yes"
 
 else
-  idn=""
-fi
 
-       fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      tst_links_libidn="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  fi
+  #
+  if test "$tst_links_libidn" = "yes"; then
 
-       if test "x$idn" = "xyes"; then
-         curl_idn_msg="enabled"
-         IDN_ENABLED=1
+$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
 
-                  for ac_func in idn_free idna_strerror tld_strerror
+        for ac_func in idn_free idna_strerror tld_strerror
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -21489,7 +25698,7 @@ _ACEOF
 fi
 done
 
-         for ac_header in idn-free.h tld.h
+    for ac_header in idn-free.h tld.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
 done
 
-       fi
+    if test "x$ac_cv_header_tld_h" = "xyes"; then
+      IDN_ENABLED=1
 
-       ;;
-esac
+      curl_idn_msg="enabled"
+      if test -n "$IDN_DIR"; then
+        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
+        export LD_LIBRARY_PATH
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to LD_LIBRARY_PATH" >&5
+$as_echo "$as_me: Added $IDN_DIR to LD_LIBRARY_PATH" >&6;}
+      fi
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libraries for IDN support too old: IDN disabled" >&5
+$as_echo "$as_me: WARNING: Libraries for IDN support too old: IDN disabled" >&2;}
+      CPPFLAGS="$clean_CPPFLAGS"
+      LDFLAGS="$clean_LDFLAGS"
+      LIBS="$clean_LIBS"
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
+$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+  fi
+fi
 
 
 
@@ -21513,7 +25743,7 @@ esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21626,7 +25856,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5
 $as_echo_n "checking for malloc.h... " >&6; }
-if test "${ac_cv_header_malloc_h+set}" = set; then :
+if ${ac_cv_header_malloc_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -21714,7 +25944,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5
 $as_echo_n "checking for memory.h... " >&6; }
-if test "${ac_cv_header_memory_h+set}" = set; then :
+if ${ac_cv_header_memory_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -21839,6 +26069,7 @@ for ac_header in sys/types.h \
         stdbool.h \
         arpa/tftp.h \
         sys/filio.h \
+        sys/wait.h \
         setjmp.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -21876,7 +26107,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21884,11 +26115,11 @@ else
 
 int main (void)
 {
-/* FIXME: Include the comments suggested by Paul. */
+
 #ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
+  /* Ultrix mips cc rejects this sort of thing.  */
   typedef int charset[2];
-  const charset cs;
+  const charset cs = { 0, 0 };
   /* SunOS 4.1.1 cc rejects this.  */
   char const *const *pcpcc;
   char **ppc;
@@ -21905,8 +26136,9 @@ int main (void)
   ++pcpcc;
   ppc = (char**) pcpcc;
   pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
     char const *s = 0 ? (char *) 0 : (char const *) 0;
 
     *t++ = 0;
@@ -21922,10 +26154,10 @@ int main (void)
     iptr p = 0;
     ++p;
   }
-  { /* AIX XL C 1.02.0.0 rejects this saying
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
   }
   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
     const int foo = 10;
@@ -21956,7 +26188,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of C99 variadic macro style" >&5
 $as_echo_n "checking for compiler support of C99 variadic macro style... " >&6; }
-if test "${curl_cv_variadic_macros_c99+set}" = set; then :
+if ${curl_cv_variadic_macros_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22009,7 +26241,7 @@ _ACEOF
   esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of old gcc variadic macro style" >&5
 $as_echo_n "checking for compiler support of old gcc variadic macro style... " >&6; }
-if test "${curl_cv_variadic_macros_gcc+set}" = set; then :
+if ${curl_cv_variadic_macros_gcc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22062,7 +26294,7 @@ _ACEOF
   esac
 
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
 
@@ -22074,7 +26306,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22122,7 +26354,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
 $as_echo_n "checking for struct timeval... " >&6; }
-if test "${ac_cv_struct_timeval+set}" = set; then :
+if ${ac_cv_struct_timeval+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22207,7 +26439,7 @@ $as_echo_n "checking run-time libs availability... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -22241,7 +26473,7 @@ fi
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
 $as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then :
+if ${ac_cv_sizeof_size_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
@@ -22251,7 +26483,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_size_t=0
    fi
@@ -22274,7 +26506,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
 $as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
@@ -22284,7 +26516,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long=0
    fi
@@ -22307,7 +26539,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
 $as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
@@ -22317,7 +26549,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_int=0
    fi
@@ -22340,7 +26572,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
 $as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
+if ${ac_cv_sizeof_short+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
@@ -22350,7 +26582,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_short=0
    fi
@@ -22384,7 +26616,7 @@ _EOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
 $as_echo_n "checking size of time_t... " >&6; }
-if test "${ac_cv_sizeof_time_t+set}" = set; then :
+if ${ac_cv_sizeof_time_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
@@ -22394,7 +26626,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_time_t=0
    fi
@@ -22417,7 +26649,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
 $as_echo_n "checking size of off_t... " >&6; }
-if test "${ac_cv_sizeof_off_t+set}" = set; then :
+if ${ac_cv_sizeof_off_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
@@ -22427,7 +26659,7 @@ else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "cannot compute sizeof (off_t)
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_off_t=0
    fi
@@ -22457,7 +26689,7 @@ fi
 
 
 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = x""yes; then :
+if test "x$ac_cv_type_long_long" = xyes; then :
 
 $as_echo "#define HAVE_LONGLONG 1" >>confdefs.h
 
@@ -22504,7 +26736,7 @@ fi
 
 # check for ssize_t
 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = x""yes; then :
+if test "x$ac_cv_type_ssize_t" = xyes; then :
 
 else
 
@@ -22523,7 +26755,7 @@ ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" "
 #endif
 
 "
-if test "x$ac_cv_type_bool" = x""yes; then :
+if test "x$ac_cv_type_bool" = xyes; then :
 
 
 $as_echo "#define HAVE_BOOL_T 1" >>confdefs.h
@@ -22551,7 +26783,7 @@ curl_includes_ws2tcpip="\
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5
 $as_echo_n "checking for windows.h... " >&6; }
-if test "${ac_cv_header_windows_h+set}" = set; then :
+if ${ac_cv_header_windows_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22611,7 +26843,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5
 $as_echo_n "checking for winsock2.h... " >&6; }
-if test "${ac_cv_header_winsock2_h+set}" = set; then :
+if ${ac_cv_header_winsock2_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22667,7 +26899,7 @@ _ACEOF
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5
 $as_echo_n "checking for ws2tcpip.h... " >&6; }
-if test "${ac_cv_header_ws2tcpip_h+set}" = set; then :
+if ${ac_cv_header_ws2tcpip_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -22759,6 +26991,7 @@ curl_preprocess_callconv="\
 
 
         #
+    #
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_socklen_t data type" >&5
 $as_echo_n "checking for curl_socklen_t data type... " >&6; }
   curl_typeof_curl_socklen_t="unknown"
@@ -22934,6 +27167,81 @@ _EOF
 
 
 
+curl_includes_poll="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#ifdef HAVE_POLL_H
+#  include <poll.h>
+#endif
+#ifdef HAVE_SYS_POLL_H
+#  include <sys/poll.h>
+#endif
+/* includes end */"
+  for ac_header in sys/types.h poll.h sys/poll.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_poll
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+    #
+  tst_poll_events_macro_defined="unknown"
+  #
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+      $curl_includes_poll
+
+int main (void)
+{
+
+#if defined(events) || defined(revents)
+      return 0;
+#else
+      force compilation error
+#endif
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+    tst_poll_events_macro_defined="yes"
+
+else
+
+    tst_poll_events_macro_defined="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  #
+  if test "$tst_poll_events_macro_defined" = "yes"; then
+    if test "x$ac_cv_header_sys_poll_h" = "xyes"; then
+
+cat >>confdefs.h <<_EOF
+#define CURL_PULL_SYS_POLL_H 1
+_EOF
+
+    fi
+  fi
+  #
+
+
+
   ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
 #undef inline
 #ifdef HAVE_WINDOWS_H
@@ -22964,13 +27272,13 @@ _EOF
 #endif
 
 "
-if test "x$ac_cv_type_in_addr_t" = x""yes; then :
+if test "x$ac_cv_type_in_addr_t" = xyes; then :
 
 else
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t equivalent" >&5
 $as_echo_n "checking for in_addr_t equivalent... " >&6; }
-if test "${curl_cv_in_addr_t_equiv+set}" = set; then :
+if ${curl_cv_in_addr_t_equiv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -23076,7 +27384,7 @@ fi
 #endif
 
 "
-if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
 
 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
 
@@ -23088,7 +27396,7 @@ fi
   for ac_header in signal.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
-if test "x$ac_cv_header_signal_h" = x""yes; then :
+if test "x$ac_cv_header_signal_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_SIGNAL_H 1
 _ACEOF
@@ -23103,7 +27411,7 @@ done
 #endif
 
 "
-if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
+if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
 
 
 $as_echo "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
@@ -23161,7 +27469,7 @@ $as_echo "#define HAVE_SIG_ATOMIC_T_VOLATILE 1" >>confdefs.h
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
 $as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
+if ${ac_cv_type_signal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23278,7 +27586,7 @@ rm -f core conftest.err conftest.$ac_objext \
   if test "$curl_cv_select" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for select" >&5
 $as_echo_n "checking types of args and return type for select... " >&6; }
-if test "${curl_cv_func_select_args+set}" = set; then :
+if ${curl_cv_func_select_args+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -23495,195 +27803,7 @@ $as_echo_n "checking for recv... " >&6; }
 int main (void)
 {
 
-      recv(0, 0, 0, 0);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    curl_cv_recv="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    curl_cv_recv="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$curl_cv_recv" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5
-$as_echo_n "checking types of args and return type for recv... " >&6; }
-if test "${curl_cv_func_recv_args+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-
-      curl_cv_func_recv_args="unknown"
-      for recv_retv in 'int' 'ssize_t'; do
-        for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
-          for recv_arg2 in 'char *' 'void *'; do
-            for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
-              for recv_arg4 in 'int' 'unsigned int'; do
-                if test "$curl_cv_func_recv_args" = "unknown"; then
-                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#define RECVCALLCONV PASCAL
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#define RECVCALLCONV
-#endif
-                      extern $recv_retv RECVCALLCONV
-                      recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
-
-int main (void)
-{
-
-                      $recv_arg1 s=0;
-                      $recv_arg2 buf=0;
-                      $recv_arg3 len=0;
-                      $recv_arg4 flags=0;
-                      $recv_retv res = recv(s, buf, len, flags);
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-                    curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                fi
-              done
-            done
-          done
-        done
-      done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5
-$as_echo "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK
-    if test "$curl_cv_func_recv_args" = "unknown"; then
-      as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5
-    else
-      recv_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
-      IFS=$recv_prev_IFS
-      shift
-      #
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG2 $2
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG3 $3
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_ARG4 $4
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECV_TYPE_RETV $5
-_ACEOF
-
-      #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECV 1
-_ACEOF
-
-      ac_cv_func_recv="yes"
-    fi
-  else
-    as_fn_error $? "Unable to link function recv" "$LINENO" 5
-  fi
-
-
-      for ac_header in sys/types.h sys/socket.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvfrom" >&5
-$as_echo_n "checking for recvfrom... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#undef inline
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#else
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#endif
-
-int main (void)
-{
-
-      recvfrom(0, 0, 0, 0, 0, 0);
+      recv(0, 0, 0, 0);
 
  ;
  return 0;
@@ -23694,35 +27814,33 @@ if ac_fn_c_try_link "$LINENO"; then :
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    curl_cv_recvfrom="yes"
+    curl_cv_recv="yes"
 
 else
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    curl_cv_recvfrom="no"
+    curl_cv_recv="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   #
-  if test "$curl_cv_recvfrom" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recvfrom" >&5
-$as_echo_n "checking types of args and return type for recvfrom... " >&6; }
-if test "${curl_cv_func_recvfrom_args+set}" = set; then :
+  if test "$curl_cv_recv" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5
+$as_echo_n "checking types of args and return type for recv... " >&6; }
+if ${curl_cv_func_recv_args+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-      curl_cv_func_recvfrom_args="unknown"
-      for recvfrom_retv in 'int' 'ssize_t'; do
-        for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
-          for recvfrom_arg2 in 'char *' 'void *'; do
-            for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
-              for recvfrom_arg4 in 'int' 'unsigned int'; do
-                for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
-                  for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
-                    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
-                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      curl_cv_func_recv_args="unknown"
+      for recv_retv in 'int' 'ssize_t'; do
+        for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do
+          for recv_arg2 in 'char *' 'void *'; do
+            for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
+              for recv_arg4 in 'int' 'unsigned int'; do
+                if test "$curl_cv_func_recv_args" = "unknown"; then
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -23739,7 +27857,7 @@ else
 #include <winsock.h>
 #endif
 #endif
-#define RECVFROMCALLCONV PASCAL
+#define RECVCALLCONV PASCAL
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -23747,24 +27865,19 @@ else
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#define RECVFROMCALLCONV
+#define RECVCALLCONV
 #endif
-                          extern $recvfrom_retv RECVFROMCALLCONV
-                          recvfrom($recvfrom_arg1, $recvfrom_arg2,
-                                   $recvfrom_arg3, $recvfrom_arg4,
-                                   $recvfrom_arg5, $recvfrom_arg6);
+                      extern $recv_retv RECVCALLCONV
+                      recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
 
 int main (void)
 {
 
-                          $recvfrom_arg1 s=0;
-                          $recvfrom_arg2 buf=0;
-                          $recvfrom_arg3 len=0;
-                          $recvfrom_arg4 flags=0;
-                          $recvfrom_arg5 addr=0;
-                          $recvfrom_arg6 addrlen=0;
-                          $recvfrom_retv res=0;
-                          res = recvfrom(s, buf, len, flags, addr, addrlen);
+                      $recv_arg1 s=0;
+                      $recv_arg2 buf=0;
+                      $recv_arg3 len=0;
+                      $recv_arg4 flags=0;
+                      $recv_retv res = recv(s, buf, len, flags);
 
  ;
  return 0;
@@ -23773,13 +27886,11 @@ int main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-                        curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
+                    curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                    fi
-                  done
-                done
+                fi
               done
             done
           done
@@ -23787,120 +27898,51 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       done
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recvfrom_args" >&5
-$as_echo "$curl_cv_func_recvfrom_args" >&6; } # AC-CACHE-CHECK
-    # Nearly last minute change for this release starts here
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVFROM 1
-_ACEOF
-
-    ac_cv_func_recvfrom="yes"
-    # Nearly last minute change for this release ends here
-    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for recvfrom args" >&5
-$as_echo "$as_me: WARNING: Cannot find proper types to use for recvfrom args" >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5
+$as_echo "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK
+    if test "$curl_cv_func_recv_args" = "unknown"; then
+      as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5
     else
-      recvfrom_prev_IFS=$IFS; IFS=','
-      set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
-      IFS=$recvfrom_prev_IFS
+      recv_prev_IFS=$IFS; IFS=','
+      set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'`
+      IFS=$recv_prev_IFS
       shift
       #
-      recvfrom_ptrt_arg2=$2
-      recvfrom_ptrt_arg5=$5
-      recvfrom_ptrt_arg6=$6
-      #
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG3 $3
-_ACEOF
-
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG4 $4
+#define RECV_TYPE_ARG1 $1
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_RETV $7
+#define RECV_TYPE_ARG2 $2
 _ACEOF
 
-      #
-      prev_sh_opts=$-
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set -f
-          ;;
-      esac
-      #
-      recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
-      recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
-      recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
-      #
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG2 $recvfrom_type_arg2
+#define RECV_TYPE_ARG3 $3
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG5 $recvfrom_type_arg5
+#define RECV_TYPE_ARG4 $4
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG6 $recvfrom_type_arg6
+#define RECV_TYPE_RETV $5
 _ACEOF
 
       #
-      if test "$recvfrom_type_arg2" = "void"; then
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-_ACEOF
-
-      fi
-      if test "$recvfrom_type_arg5" = "void"; then
-
-cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG5_IS_VOID 1
-_ACEOF
-
-      fi
-      if test "$recvfrom_type_arg6" = "void"; then
 
 cat >>confdefs.h <<_ACEOF
-#define RECVFROM_TYPE_ARG6_IS_VOID 1
-_ACEOF
-
-      fi
-      #
-      case $prev_sh_opts in
-        *f*)
-          ;;
-        *)
-          set +f
-          ;;
-      esac
-      #
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVFROM 1
+#define HAVE_RECV 1
 _ACEOF
 
-      ac_cv_func_recvfrom="yes"
+      ac_cv_func_recv="yes"
     fi
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to link function recvfrom" >&5
-$as_echo "$as_me: WARNING: Unable to link function recvfrom" >&2;}
+    as_fn_error $? "Unable to link function recv" "$LINENO" 5
   fi
 
 
@@ -23975,7 +28017,7 @@ rm -f core conftest.err conftest.$ac_objext \
   if test "$curl_cv_send" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for send" >&5
 $as_echo_n "checking types of args and return type for send... " >&6; }
-if test "${curl_cv_func_send_args+set}" = set; then :
+if ${curl_cv_func_send_args+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -24143,7 +28185,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5
 $as_echo_n "checking for MSG_NOSIGNAL... " >&6; }
-if test "${ac_cv_msg_nosignal+set}" = set; then :
+if ${ac_cv_msg_nosignal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -26226,7 +30268,7 @@ done
 
 
 
-            #
+              #
   tst_links_getaddrinfo="unknown"
   tst_proto_getaddrinfo="unknown"
   tst_compi_getaddrinfo="unknown"
@@ -26346,7 +30388,7 @@ $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -26477,6 +30519,10 @@ $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; }
                 tst_tsafe_getaddrinfo="yes"
         ;;
     esac
+    if test "$tst_tsafe_getaddrinfo" = "unknown" &&
+       test "$ac_cv_native_windows" = "yes"; then
+      tst_tsafe_getaddrinfo="yes"
+    fi
     if test "$tst_tsafe_getaddrinfo" = "unknown"; then
 
 
@@ -26484,7 +30530,6 @@ $as_echo_n "checking if getaddrinfo is threadsafe... " >&6; }
 /* end confdefs.h.  */
 
 
-        $curl_includes_ws2tcpip
         $curl_includes_sys_socket
         $curl_includes_netdb
 
@@ -26517,13 +30562,79 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
   fi
 
-      if test "$curl_cv_have_def_h_errno" = "no"; then
+      if test "$curl_cv_have_def_h_errno" = "yes"; then
+        tst_h_errno_macro="yes"
+      else
+        tst_h_errno_macro="no"
+      fi
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+          $curl_includes_sys_socket
+          $curl_includes_netdb
+
+int main (void)
+{
+
+          h_errno = 2;
+          if(0 != h_errno)
+            return 1;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+        tst_h_errno_modifiable_lvalue="yes"
+
+else
+
+        tst_h_errno_modifiable_lvalue="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+
+int main (void)
+{
+
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
+          return 0;
+#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
+          return 0;
+#else
+          force compilation error
+#endif
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+        tst_h_errno_sbs_issue_7="yes"
+
+else
+
+        tst_h_errno_sbs_issue_7="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      if test "$tst_h_errno_macro" = "no" &&
+         test "$tst_h_errno_modifiable_lvalue" = "no" &&
+         test "$tst_h_errno_sbs_issue_7" = "no"; then
         tst_tsafe_getaddrinfo="no"
+      else
+        tst_tsafe_getaddrinfo="yes"
       fi
     fi
-    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
-      tst_tsafe_getaddrinfo="yes"
-    fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_tsafe_getaddrinfo" >&5
 $as_echo "$tst_tsafe_getaddrinfo" >&6; }
     if test "$tst_tsafe_getaddrinfo" = "yes"; then
@@ -26540,6 +30651,148 @@ _ACEOF
 
 
       #
+  tst_links_gai_strerror="unknown"
+  tst_proto_gai_strerror="unknown"
+  tst_compi_gai_strerror="unknown"
+  tst_allow_gai_strerror="unknown"
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror can be linked" >&5
+$as_echo_n "checking if gai_strerror can be linked... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+      $curl_includes_winsock2
+      $curl_includes_netdb
+
+int main (void)
+{
+
+      if(0 != gai_strerror(0))
+        return 1;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    tst_links_gai_strerror="yes"
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    tst_links_gai_strerror="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  #
+  if test "$tst_links_gai_strerror" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is prototyped" >&5
+$as_echo_n "checking if gai_strerror is prototyped... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+      $curl_includes_winsock2
+      $curl_includes_netdb
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gai_strerror" >/dev/null 2>&1; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      tst_proto_gai_strerror="yes"
+
+else
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      tst_proto_gai_strerror="no"
+
+fi
+rm -f conftest*
+
+  fi
+  #
+  if test "$tst_proto_gai_strerror" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is compilable" >&5
+$as_echo_n "checking if gai_strerror is compilable... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+        $curl_includes_winsock2
+        $curl_includes_netdb
+
+int main (void)
+{
+
+        if(0 != gai_strerror(0))
+          return 1;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      tst_compi_gai_strerror="yes"
+
+else
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      tst_compi_gai_strerror="no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  fi
+  #
+  if test "$tst_compi_gai_strerror" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror usage allowed" >&5
+$as_echo_n "checking if gai_strerror usage allowed... " >&6; }
+    if test "x$curl_disallow_gai_strerror" != "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      tst_allow_gai_strerror="yes"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      tst_allow_gai_strerror="no"
+    fi
+  fi
+  #
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror might be used" >&5
+$as_echo_n "checking if gai_strerror might be used... " >&6; }
+  if test "$tst_links_gai_strerror" = "yes" &&
+     test "$tst_proto_gai_strerror" = "yes" &&
+     test "$tst_compi_gai_strerror" = "yes" &&
+     test "$tst_allow_gai_strerror" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GAI_STRERROR 1
+_ACEOF
+
+    ac_cv_func_gai_strerror="yes"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ac_cv_func_gai_strerror="no"
+  fi
+
+
+      #
   tst_links_gethostbyaddr="unknown"
   tst_proto_gethostbyaddr="unknown"
   tst_compi_gethostbyaddr="unknown"
@@ -27321,7 +31574,7 @@ $as_echo "no" >&6; }
   fi
 
 
-      #
+        #
   tst_links_gethostname="unknown"
   tst_proto_gethostname="unknown"
   tst_compi_gethostname="unknown"
@@ -27429,6 +31682,53 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   fi
   #
   if test "$tst_compi_gethostname" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname arg 2 data type" >&5
+$as_echo_n "checking for gethostname arg 2 data type... " >&6; }
+    tst_gethostname_type_arg2="unknown"
+    for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do
+      for tst_arg2 in 'int' 'unsigned int' 'size_t'; do
+        if test "$tst_gethostname_type_arg2" = "unknown"; then
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+              $curl_includes_winsock2
+              $curl_includes_unistd
+              $curl_preprocess_callconv
+              extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
+
+int main (void)
+{
+
+              if(0 != gethostname(0, 0))
+                return 1;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+            tst_gethostname_type_arg2="$tst_arg2"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        fi
+      done
+    done
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_gethostname_type_arg2" >&5
+$as_echo "$tst_gethostname_type_arg2" >&6; }
+    if test "$tst_gethostname_type_arg2" != "unknown"; then
+
+cat >>confdefs.h <<_ACEOF
+#define GETHOSTNAME_TYPE_ARG2 $tst_gethostname_type_arg2
+_ACEOF
+
+    fi
+  fi
+  #
+  if test "$tst_compi_gethostname" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname usage allowed" >&5
 $as_echo_n "checking if gethostname usage allowed... " >&6; }
     if test "x$curl_disallow_gethostname" != "xyes"; then
@@ -27586,7 +31886,7 @@ $as_echo_n "checking if getifaddrs seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -28071,7 +32371,7 @@ $as_echo_n "checking if gmtime_r seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -28518,7 +32818,7 @@ $as_echo_n "checking if inet_ntop seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -28765,7 +33065,7 @@ $as_echo_n "checking if inet_pton seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -29773,7 +34073,7 @@ $as_echo_n "checking if localtime_r seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -30043,34 +34343,6 @@ $as_echo "no" >&6; }
   fi
 
 
-curl_includes_poll="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
-#endif
-#ifdef HAVE_POLL_H
-#  include <poll.h>
-#endif
-#ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-#endif
-/* includes end */"
-  for ac_header in sys/types.h poll.h sys/poll.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_poll
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
       #
   tst_links_poll="unknown"
   tst_proto_poll="unknown"
@@ -30190,7 +34462,7 @@ $as_echo_n "checking if poll seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -31321,36 +35593,36 @@ $as_echo "no" >&6; }
   fi
 
 
-    #
-  tst_links_strcasecmp="unknown"
-  tst_proto_strcasecmp="unknown"
-  tst_compi_strcasecmp="unknown"
-  tst_allow_strcasecmp="unknown"
+      #
+  tst_links_socketpair="unknown"
+  tst_proto_socketpair="unknown"
+  tst_compi_socketpair="unknown"
+  tst_allow_socketpair="unknown"
   #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp can be linked" >&5
-$as_echo_n "checking if strcasecmp can be linked... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair can be linked" >&5
+$as_echo_n "checking if socketpair can be linked... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define strcasecmp innocuous_strcasecmp
+#define socketpair innocuous_socketpair
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
-#undef strcasecmp
+#undef socketpair
 #ifdef __cplusplus
 extern "C"
 #endif
-char strcasecmp ();
-#if defined __stub_strcasecmp || defined __stub___strcasecmp
+char socketpair ();
+#if defined __stub_socketpair || defined __stub___socketpair
 choke me
 #endif
 
 int main (void)
 {
-return strcasecmp ();
+return socketpair ();
  ;
  return 0;
 }
@@ -31360,58 +35632,61 @@ if ac_fn_c_try_link "$LINENO"; then :
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    tst_links_strcasecmp="yes"
+    tst_links_socketpair="yes"
 
 else
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    tst_links_strcasecmp="no"
+    tst_links_socketpair="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   #
-  if test "$tst_links_strcasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is prototyped" >&5
-$as_echo_n "checking if strcasecmp is prototyped... " >&6; }
+  if test "$tst_links_socketpair" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair is prototyped" >&5
+$as_echo_n "checking if socketpair is prototyped... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-      $curl_includes_string
+      $curl_includes_sys_socket
+      $curl_includes_socket
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strcasecmp" >/dev/null 2>&1; then :
+  $EGREP "socketpair" >/dev/null 2>&1; then :
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_proto_strcasecmp="yes"
+      tst_proto_socketpair="yes"
 
 else
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_proto_strcasecmp="no"
+      tst_proto_socketpair="no"
 
 fi
 rm -f conftest*
 
   fi
   #
-  if test "$tst_proto_strcasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is compilable" >&5
-$as_echo_n "checking if strcasecmp is compilable... " >&6; }
+  if test "$tst_proto_socketpair" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair is compilable" >&5
+$as_echo_n "checking if socketpair is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-        $curl_includes_string
+        $curl_includes_sys_socket
+        $curl_includes_socket
 
 int main (void)
 {
 
-        if(0 != strcasecmp(0, 0))
+        int sv[2];
+        if(0 != socketpair(0, 0, 0, sv))
           return 1;
 
  ;
@@ -31423,83 +35698,83 @@ if ac_fn_c_try_compile "$LINENO"; then :
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_compi_strcasecmp="yes"
+      tst_compi_socketpair="yes"
 
 else
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_compi_strcasecmp="no"
+      tst_compi_socketpair="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   fi
   #
-  if test "$tst_compi_strcasecmp" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp usage allowed" >&5
-$as_echo_n "checking if strcasecmp usage allowed... " >&6; }
-    if test "x$curl_disallow_strcasecmp" != "xyes"; then
+  if test "$tst_compi_socketpair" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair usage allowed" >&5
+$as_echo_n "checking if socketpair usage allowed... " >&6; }
+    if test "x$curl_disallow_socketpair" != "xyes"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_allow_strcasecmp="yes"
+      tst_allow_socketpair="yes"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_allow_strcasecmp="no"
+      tst_allow_socketpair="no"
     fi
   fi
   #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp might be used" >&5
-$as_echo_n "checking if strcasecmp might be used... " >&6; }
-  if test "$tst_links_strcasecmp" = "yes" &&
-     test "$tst_proto_strcasecmp" = "yes" &&
-     test "$tst_compi_strcasecmp" = "yes" &&
-     test "$tst_allow_strcasecmp" = "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair might be used" >&5
+$as_echo_n "checking if socketpair might be used... " >&6; }
+  if test "$tst_links_socketpair" = "yes" &&
+     test "$tst_proto_socketpair" = "yes" &&
+     test "$tst_compi_socketpair" = "yes" &&
+     test "$tst_allow_socketpair" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCASECMP 1
+#define HAVE_SOCKETPAIR 1
 _ACEOF
 
-    ac_cv_func_strcasecmp="yes"
+    ac_cv_func_socketpair="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strcasecmp="no"
+    ac_cv_func_socketpair="no"
   fi
 
 
     #
-  tst_links_strcasestr="unknown"
-  tst_proto_strcasestr="unknown"
-  tst_compi_strcasestr="unknown"
-  tst_allow_strcasestr="unknown"
+  tst_links_strcasecmp="unknown"
+  tst_proto_strcasecmp="unknown"
+  tst_compi_strcasecmp="unknown"
+  tst_allow_strcasecmp="unknown"
   #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr can be linked" >&5
-$as_echo_n "checking if strcasestr can be linked... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp can be linked" >&5
+$as_echo_n "checking if strcasecmp can be linked... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
-#define strcasestr innocuous_strcasestr
+#define strcasecmp innocuous_strcasecmp
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
-#undef strcasestr
+#undef strcasecmp
 #ifdef __cplusplus
 extern "C"
 #endif
-char strcasestr ();
-#if defined __stub_strcasestr || defined __stub___strcasestr
+char strcasecmp ();
+#if defined __stub_strcasecmp || defined __stub___strcasecmp
 choke me
 #endif
 
 int main (void)
 {
-return strcasestr ();
+return strcasecmp ();
  ;
  return 0;
 }
@@ -31509,21 +35784,21 @@ if ac_fn_c_try_link "$LINENO"; then :
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    tst_links_strcasestr="yes"
+    tst_links_strcasecmp="yes"
 
 else
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    tst_links_strcasestr="no"
+    tst_links_strcasecmp="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   #
-  if test "$tst_links_strcasestr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr is prototyped" >&5
-$as_echo_n "checking if strcasestr is prototyped... " >&6; }
+  if test "$tst_links_strcasecmp" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is prototyped" >&5
+$as_echo_n "checking if strcasecmp is prototyped... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31531,26 +35806,26 @@ $as_echo_n "checking if strcasestr is prototyped... " >&6; }
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strcasestr" >/dev/null 2>&1; then :
+  $EGREP "strcasecmp" >/dev/null 2>&1; then :
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_proto_strcasestr="yes"
+      tst_proto_strcasecmp="yes"
 
 else
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_proto_strcasestr="no"
+      tst_proto_strcasecmp="no"
 
 fi
 rm -f conftest*
 
   fi
   #
-  if test "$tst_proto_strcasestr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr is compilable" >&5
-$as_echo_n "checking if strcasestr is compilable... " >&6; }
+  if test "$tst_proto_strcasecmp" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is compilable" >&5
+$as_echo_n "checking if strcasecmp is compilable... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -31560,7 +35835,7 @@ $as_echo_n "checking if strcasestr is compilable... " >&6; }
 int main (void)
 {
 
-        if(0 != strcasestr(0, 0))
+        if(0 != strcasecmp(0, 0))
           return 1;
 
  ;
@@ -31572,50 +35847,50 @@ if ac_fn_c_try_compile "$LINENO"; then :
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_compi_strcasestr="yes"
+      tst_compi_strcasecmp="yes"
 
 else
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_compi_strcasestr="no"
+      tst_compi_strcasecmp="no"
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   fi
   #
-  if test "$tst_compi_strcasestr" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr usage allowed" >&5
-$as_echo_n "checking if strcasestr usage allowed... " >&6; }
-    if test "x$curl_disallow_strcasestr" != "xyes"; then
+  if test "$tst_compi_strcasecmp" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp usage allowed" >&5
+$as_echo_n "checking if strcasecmp usage allowed... " >&6; }
+    if test "x$curl_disallow_strcasecmp" != "xyes"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      tst_allow_strcasestr="yes"
+      tst_allow_strcasecmp="yes"
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      tst_allow_strcasestr="no"
+      tst_allow_strcasecmp="no"
     fi
   fi
   #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasestr might be used" >&5
-$as_echo_n "checking if strcasestr might be used... " >&6; }
-  if test "$tst_links_strcasestr" = "yes" &&
-     test "$tst_proto_strcasestr" = "yes" &&
-     test "$tst_compi_strcasestr" = "yes" &&
-     test "$tst_allow_strcasestr" = "yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp might be used" >&5
+$as_echo_n "checking if strcasecmp might be used... " >&6; }
+  if test "$tst_links_strcasecmp" = "yes" &&
+     test "$tst_proto_strcasecmp" = "yes" &&
+     test "$tst_compi_strcasecmp" = "yes" &&
+     test "$tst_allow_strcasecmp" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCASESTR 1
+#define HAVE_STRCASECMP 1
 _ACEOF
 
-    ac_cv_func_strcasestr="yes"
+    ac_cv_func_strcasecmp="yes"
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ac_cv_func_strcasestr="no"
+    ac_cv_func_strcasecmp="no"
   fi
 
 
@@ -32048,11 +36323,11 @@ $as_echo_n "checking if strerror_r is glibc like... " >&6; }
 
 
             $curl_includes_string
+            char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
 
 int main (void)
 {
 
-            char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
             if(0 != strerror_r(0, 0, 0))
               return 1;
 
@@ -32091,7 +36366,7 @@ $as_echo_n "checking if strerror_r seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32151,11 +36426,11 @@ $as_echo_n "checking if strerror_r is POSIX like... " >&6; }
 
 
             $curl_includes_string
+            int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
 
 int main (void)
 {
 
-            int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
             if(0 != strerror_r(0, 0, 0))
               return 1;
 
@@ -32194,7 +36469,7 @@ $as_echo_n "checking if strerror_r seems to work... " >&6; }
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32479,155 +36754,6 @@ $as_echo "no" >&6; }
 
 
     #
-  tst_links_strlcat="unknown"
-  tst_proto_strlcat="unknown"
-  tst_compi_strlcat="unknown"
-  tst_allow_strlcat="unknown"
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat can be linked" >&5
-$as_echo_n "checking if strlcat can be linked... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define strlcat innocuous_strlcat
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-#undef strlcat
-#ifdef __cplusplus
-extern "C"
-#endif
-char strlcat ();
-#if defined __stub_strlcat || defined __stub___strlcat
-choke me
-#endif
-
-int main (void)
-{
-return strlcat ();
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    tst_links_strlcat="yes"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    tst_links_strlcat="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  #
-  if test "$tst_links_strlcat" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat is prototyped" >&5
-$as_echo_n "checking if strlcat is prototyped... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      $curl_includes_string
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "strlcat" >/dev/null 2>&1; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_proto_strlcat="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_proto_strlcat="no"
-
-fi
-rm -f conftest*
-
-  fi
-  #
-  if test "$tst_proto_strlcat" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat is compilable" >&5
-$as_echo_n "checking if strlcat is compilable... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-        $curl_includes_string
-
-int main (void)
-{
-
-        if(0 != strlcat(0, 0, 0))
-          return 1;
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_compi_strlcat="yes"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_compi_strlcat="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  fi
-  #
-  if test "$tst_compi_strlcat" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat usage allowed" >&5
-$as_echo_n "checking if strlcat usage allowed... " >&6; }
-    if test "x$curl_disallow_strlcat" != "xyes"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-      tst_allow_strlcat="yes"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-      tst_allow_strlcat="no"
-    fi
-  fi
-  #
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strlcat might be used" >&5
-$as_echo_n "checking if strlcat might be used... " >&6; }
-  if test "$tst_links_strlcat" = "yes" &&
-     test "$tst_proto_strlcat" = "yes" &&
-     test "$tst_compi_strlcat" = "yes" &&
-     test "$tst_allow_strlcat" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRLCAT 1
-_ACEOF
-
-    ac_cv_func_strlcat="yes"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ac_cv_func_strlcat="no"
-  fi
-
-
-    #
   tst_links_strncasecmp="unknown"
   tst_proto_strncasecmp="unknown"
   tst_compi_strncasecmp="unknown"
@@ -33759,7 +37885,7 @@ $as_echo "yes" >&6; }
       eval "ac_cv_func_$func=yes"
 
 cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$func" | $as_tr_cpp` 1
+#define `echo "HAVE_$func" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | sed 's/^A-Z0-9_/_/g'` 1
 _ACEOF
 
 
@@ -33933,7 +38059,7 @@ rm -f core conftest.err conftest.$ac_objext \
   if test "$curl_cv_getnameinfo" = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for getnameinfo" >&5
 $as_echo_n "checking types of arguments for getnameinfo... " >&6; }
-if test "${curl_cv_func_getnameinfo_args+set}" = set; then :
+if ${curl_cv_func_getnameinfo_args+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -34115,7 +38241,7 @@ done
   #
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working NI_WITHSCOPEID" >&5
 $as_echo_n "checking for working NI_WITHSCOPEID... " >&6; }
-if test "${ac_cv_working_ni_withscopeid+set}" = set; then :
+if ${ac_cv_working_ni_withscopeid+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -34248,60 +38374,27 @@ $as_echo "#define HAVE_NI_WITHSCOPEID 1" >>confdefs.h
 fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable non-blocking communications" >&5
-$as_echo_n "checking whether to enable non-blocking communications... " >&6; }
-  OPT_NONBLOCKING="default"
-  # Check whether --enable-nonblocking was given.
-if test "${enable_nonblocking+set}" = set; then :
-  enableval=$enable_nonblocking; OPT_NONBLOCKING=$enableval
-fi
-
-  case "$OPT_NONBLOCKING" in
-    no)
-            want_nonblocking="no"
-      ;;
-    default)
-            want_nonblocking="yes"
-      ;;
-    *)
-            want_nonblocking="yes"
-      ;;
-  esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_nonblocking" >&5
-$as_echo "$want_nonblocking" >&6; }
-
-
-              #
+            #
   tst_method="unknown"
-  if test "$want_nonblocking" = "yes"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5
 $as_echo_n "checking how to set a socket into non-blocking mode... " >&6; }
-    if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
-      tst_method="fcntl O_NONBLOCK"
-    elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
-      tst_method="ioctl FIONBIO"
-    elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
-      tst_method="ioctlsocket FIONBIO"
-    elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
-      tst_method="IoctlSocket FIONBIO"
-    elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
-      tst_method="setsockopt SO_NONBLOCK"
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5
+  if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
+    tst_method="fcntl O_NONBLOCK"
+  elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
+    tst_method="ioctl FIONBIO"
+  elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
+    tst_method="ioctlsocket FIONBIO"
+  elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
+    tst_method="IoctlSocket FIONBIO"
+  elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
+    tst_method="setsockopt SO_NONBLOCK"
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5
 $as_echo "$tst_method" >&6; }
-    if test "$tst_method" = "unknown"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine non-blocking socket method." >&5
-$as_echo "$as_me: WARNING: cannot determine non-blocking socket method." >&2;}
-    fi
-  fi
   if test "$tst_method" = "unknown"; then
-
-cat >>confdefs.h <<_ACEOF
-#define USE_BLOCKING_SOCKETS 1
-_ACEOF
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: non-blocking sockets disabled." >&5
-$as_echo "$as_me: WARNING: non-blocking sockets disabled." >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine non-blocking socket method." >&5
+$as_echo "$as_me: WARNING: cannot determine non-blocking socket method." >&2;}
   fi
 
 
@@ -34310,7 +38403,7 @@ $as_echo "$as_me: WARNING: non-blocking sockets disabled." >&2;}
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -34325,7 +38418,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -34355,7 +38448,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NROFF+set}" = set; then :
+if ${ac_cv_path_NROFF+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $NROFF in
@@ -34370,7 +38463,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -34438,9 +38531,7 @@ $as_echo "#define USE_MANUAL 1" >>confdefs.h
   curl_manual_msg="enabled"
 fi
 
-
-
-if test x"$USE_MANUAL" = x1; then
+ if test x"$USE_MANUAL" = x1; then
   USE_MANUAL_TRUE=
   USE_MANUAL_FALSE='#'
 else
@@ -34541,9 +38632,7 @@ $as_echo "#define USE_ARES 1" >>confdefs.h
     fi
   fi
 
-
-
-if test x$embedded_ares = xyes; then
+ if test x$embedded_ares = xyes; then
   USE_EMBEDDED_ARES_TRUE=
   USE_EMBEDDED_ARES_FALSE='#'
 else
@@ -34552,14 +38641,13 @@ else
 fi
 
 
-if test "x$enable_shared" = "xyes"; then
+if test "x$ac_cv_native_windows" != "xyes" &&
+   test "x$enable_shared" = "xyes"; then
   build_libhostname=yes
 else
   build_libhostname=no
 fi
-
-
-if test x$build_libhostname = xyes; then
+ if test x$build_libhostname = xyes; then
   BUILD_LIBHOSTNAME_TRUE=
   BUILD_LIBHOSTNAME_FALSE='#'
 else
 
 if test "$want_thres" = "yes"; then
   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = x""yes; then :
+if test "x$ac_cv_header_pthread_h" = xyes; then :
 
 $as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h
 
       save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -pthread"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+
+            ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
+if test "x$ac_cv_func_pthread_create" = xyes; then :
+  USE_THREADS_POSIX=1
+fi
+
+
+            if test "$USE_THREADS_POSIX" != "1"
+      then
+        CFLAGS="$CFLAGS -pthread"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -34634,18 +38731,22 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: using POSIX threaded DNS lookup" >&5
-$as_echo "$as_me: using POSIX threaded DNS lookup" >&6;}
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+  USE_THREADS_POSIX=1
+else
+   CFLAGS="$save_CFLAGS"
+fi
+
+      fi
+
+      if test "x$USE_THREADS_POSIX" = "x1"
+      then
 
 $as_echo "#define USE_THREADS_POSIX 1" >>confdefs.h
 
-          USE_THREADS_POSIX=1
-          curl_res_msg="threaded"
+        curl_res_msg="POSIX threaded"
+      fi
 
-else
-   CFLAGS="$save_CFLAGS"
-fi
 
 
 fi
@@ -34700,13 +38801,25 @@ $as_echo "$as_me: WARNING: --enable-sspi Ignored. Only supported on native Windo
        fi
        ;;
   *)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+       if test "x$WINSSL_ENABLED" = "x1"; then
+         # --with-winssl implies --enable-sspi
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+       fi
        ;;
   esac
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  if test "x$WINSSL_ENABLED" = "x1"; then
+         # --with-winssl implies --enable-sspi
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+       fi
 
 fi
 
@@ -34734,84 +38847,143 @@ $as_echo "yes" >&6; }
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable support for cookies" >&5
-$as_echo_n "checking whether to enable support for cookies... " >&6; }
-# Check whether --enable-cookies was given.
-if test "${enable_cookies+set}" = set; then :
-  enableval=$enable_cookies;  case "$enableval" in
+
+    OPT_NTLM_WB="default"
+  # Check whether --enable-ntlm-wb was given.
+if test "${enable_ntlm_wb+set}" = set; then :
+  enableval=$enable_ntlm_wb; OPT_NTLM_WB=$enableval
+fi
+
+  want_ntlm_wb_file="/usr/bin/ntlm_auth"
+  case "$OPT_NTLM_WB" in
+    no)
+            want_ntlm_wb="no"
+      ;;
+    default)
+            want_ntlm_wb="yes"
+      ;;
+    *)
+            want_ntlm_wb="yes"
+      if test -n "$enableval" && test "$enableval" != "yes"; then
+        want_ntlm_wb_file="$enableval"
+      fi
+      ;;
+  esac
+
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable NTLM delegation to winbind's helper" >&5
+$as_echo_n "checking whether to enable NTLM delegation to winbind's helper... " >&6; }
+  if test "$ac_cv_native_windows" = "yes" ||
+    test "x$SSL_ENABLED" = "x"; then
+    want_ntlm_wb_file=""
+    want_ntlm_wb="no"
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_ntlm_wb" >&5
+$as_echo "$want_ntlm_wb" >&6; }
+  if test "$want_ntlm_wb" = "yes"; then
+
+$as_echo "#define NTLM_WB_ENABLED 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define NTLM_WB_FILE "$want_ntlm_wb_file"
+_ACEOF
+
+    NTLM_WB_ENABLED=1
+  fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable TLS-SRP authentication" >&5
+$as_echo_n "checking whether to enable TLS-SRP authentication... " >&6; }
+# Check whether --enable-tls-srp was given.
+if test "${enable_tls_srp+set}" = set; then :
+  enableval=$enable_tls_srp;  case "$enableval" in
   no)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-$as_echo "#define CURL_DISABLE_COOKIES 1" >>confdefs.h
+$as_echo "#define CURL_DISABLE_TLS_SRP 1" >>confdefs.h
 
+       want_tls_srp=no
        ;;
   *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+       want_tls_srp=yes
        ;;
   esac
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+       want_tls_srp=yes
 
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hidden symbols in the library" >&5
-$as_echo_n "checking whether to enable hidden symbols in the library... " >&6; }
-# Check whether --enable-hidden-symbols was given.
-if test "${enable_hidden_symbols+set}" = set; then :
-  enableval=$enable_hidden_symbols;  case "$enableval" in
+if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
+
+$as_echo "#define USE_TLS_SRP 1" >>confdefs.h
+
+   USE_TLS_SRP=1
+   curl_tls_srp_msg="enabled"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable support for cookies" >&5
+$as_echo_n "checking whether to enable support for cookies... " >&6; }
+# Check whether --enable-cookies was given.
+if test "${enable_cookies+set}" = set; then :
+  enableval=$enable_cookies;  case "$enableval" in
   no)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       ;;
-  *)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports it" >&5
-$as_echo_n "checking whether $CC supports it... " >&6; }
-       if test "$GCC" = yes ; then
-         if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
-                                 test "$compiler_id" = "CLANG"; then
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define CURL_HIDDEN_SYMBOLS 1" >>confdefs.h
 
+$as_echo "#define CURL_DISABLE_COOKIES 1" >>confdefs.h
 
-$as_echo "#define CURL_EXTERN_SYMBOL __attribute__ ((visibility (\"default\")))" >>confdefs.h
+       ;;
+  *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       ;;
+  esac
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-           CFLAGS="$CFLAGS -fvisibility=hidden"
-         else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-          fi
+fi
 
-       else
-                  if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define CURL_HIDDEN_SYMBOLS 1" >>confdefs.h
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hiding of library internal symbols will actually happen" >&5
+$as_echo_n "checking whether hiding of library internal symbols will actually happen... " >&6; }
+  CFLAG_CURL_SYMBOL_HIDING=""
+  doing_symbol_hiding="no"
+  if test x"$ac_cv_native_windows" != "xyes" &&
+    test "$want_symbol_hiding" = "yes" &&
+    test "$supports_symbol_hiding" = "yes"; then
+    doing_symbol_hiding="yes"
+    CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
 
-$as_echo "#define CURL_EXTERN_SYMBOL __global" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define CURL_EXTERN_SYMBOL $symbol_hiding_EXTERN
+_ACEOF
 
-           CFLAGS="$CFLAGS -xldscope=hidden"
-         else
-           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-         fi
-       fi
-       ;;
-  esac
+  fi
+   if test x$doing_symbol_hiding = xyes; then
+  DOING_CURL_SYMBOL_HIDING_TRUE=
+  DOING_CURL_SYMBOL_HIDING_FALSE='#'
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+  DOING_CURL_SYMBOL_HIDING_TRUE='#'
+  DOING_CURL_SYMBOL_HIDING_FALSE=
 fi
 
 
 
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enforce SONAME bump" >&5
 $as_echo_n "checking whether to enforce SONAME bump... " >&6; }
 # Check whether --enable-soname-bump was given.
@@ -34832,9 +39004,7 @@ $as_echo "$soname_bump" >&6; }
 
 fi
 
-
-
-if test x$soname_bump = xyes; then
+ if test x$soname_bump = xyes; then
   SONAME_BUMP_TRUE=
   SONAME_BUMP_FALSE='#'
 else
@@ -34843,25 +39013,16 @@ else
 fi
 
 
-
-if test ! -z "$winsock_LIB"; then
-
-
-  LIBS="$LIBS $winsock_LIB"
-  TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
-
-fi
-
 LIBCURL_LIBS=$LIBS
 
 
 
 
 
-LIBS=$ALL_LIBS
+BLANK_AT_MAKETIME=
 
 
-if test x$cross_compiling = xyes; then
+ if test x$cross_compiling = xyes; then
   CROSSCOMPILING_TRUE=
   CROSSCOMPILING_FALSE='#'
 else
 ENABLE_SHARED="$enable_shared"
 
 
+ENABLE_STATIC="$enable_static"
+
+
+
 
 if test "x$USE_SSLEAY" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
 if test "x$USE_WINDOWS_SSPI" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
 fi
-if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-    -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+if test "x$CURL_DISABLE_HTTP" != "x1"; then
+  if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+      -o "x$DARWINSSL_ENABLED" = "x1"; then
+    SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+    if test "x$NTLM_WB_ENABLED" = "x1"; then
+      SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
+    fi
+  fi
+fi
+if test "x$USE_TLS_SRP" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 fi
 
 
@@ -34980,20 +39154,187 @@ squeeze DEFS
 squeeze LDFLAGS
 squeeze LIBS
 
-squeeze CURL_LIBS
 squeeze LIBCURL_LIBS
-squeeze TEST_SERVER_LIBS
 squeeze CURL_NETWORK_LIBS
+squeeze CURL_NETWORK_AND_TIME_LIBS
 
 squeeze SUPPORT_FEATURES
 squeeze SUPPORT_PROTOCOLS
 
+
+
+  xc_bad_var_libs=no
+  for xc_word in $LIBS; do
+    case "$xc_word" in
+      -l* | --library=*)
+        :
+        ;;
+      *)
+        xc_bad_var_libs=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_libs = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5
+$as_echo "$as_me: using LIBS: $LIBS" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5
+$as_echo "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;}
+  fi
+
+
+  xc_bad_var_ldflags=no
+  for xc_word in $LDFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -U*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -I*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_ldflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_ldflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5
+$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;}
+    xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
+    for xc_word in $LDFLAGS; do
+      case "$xc_word" in
+        -D*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -U*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -I*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+
+  xc_bad_var_cppflags=no
+  for xc_word in $CPPFLAGS; do
+    case "$xc_word" in
+      -rpath*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cppflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cppflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5
+$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;}
+    xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
+    for xc_word in $CPPFLAGS; do
+      case "$xc_word" in
+        -rpath*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -L* | --library-path=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+
+  xc_bad_var_cflags=no
+  for xc_word in $CFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_cflags=yes
+        ;;
+      -U*)
+        xc_bad_var_cflags=yes
+        ;;
+      -I*)
+        xc_bad_var_cflags=yes
+        ;;
+      -rpath*)
+        xc_bad_var_cflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cflags = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5
+$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;}
+    xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
+    for xc_word in $CFLAGS; do
+      case "$xc_word" in
+        -D*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -U*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -I*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;}
+          ;;
+        -rpath*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -L* | --library-path=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;}
+          ;;
+        -l* | --library=*)
+          { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5
+$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;}
+          ;;
+      esac
+    done
+  fi
+
+  if test $xc_bad_var_libs = yes ||
+     test $xc_bad_var_cflags = yes ||
+     test $xc_bad_var_ldflags = yes ||
+     test $xc_bad_var_cppflags = yes; then
+     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5
+$as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;}
+  fi
+
+
 if test "x$want_curldebug_assumed" = "xyes" &&
   test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
   ac_configure_args="$ac_configure_args --enable-curldebug"
 fi
 
-ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile tests/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile packages/Makefile packages/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile packages/AIX/Makefile packages/AIX/RPM/Makefile packages/AIX/RPM/curl.spec curl-config libcurl.pc"
+ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile lib/libcurl.vers tests/Makefile tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile packages/Makefile packages/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile packages/AIX/Makefile packages/AIX/RPM/Makefile packages/AIX/RPM/curl.spec curl-config libcurl.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -35059,10 +39400,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -35097,6 +39449,14 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -35105,30 +39465,54 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${MIMPURE_TRUE}" && test -z "${MIMPURE_FALSE}"; then
-  as_fn_error $? "conditional \"MIMPURE\" was never defined.
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_FALSE}"; then
+  as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSION_INFO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE}" && test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE}"; then
+  as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_NO_UNDEFINED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${STATICLIB_TRUE}" && test -z "${STATICLIB_FALSE}"; then
-  as_fn_error $? "conditional \"STATICLIB\" was never defined.
+if test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE}" && test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE}"; then
+  as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_MIMPURE_TEXT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${STATICLIB_TRUE}" && test -z "${STATICLIB_FALSE}"; then
-  as_fn_error $? "conditional \"STATICLIB\" was never defined.
+if test -z "${USE_CPPFLAG_CURL_STATICLIB_TRUE}" && test -z "${USE_CPPFLAG_CURL_STATICLIB_FALSE}"; then
+  as_fn_error $? "conditional \"USE_CPPFLAG_CURL_STATICLIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then
-  as_fn_error $? "conditional \"NO_UNDEFINED\" was never defined.
+if test -z "${USE_EXPLICIT_LIB_DEPS_TRUE}" && test -z "${USE_EXPLICIT_LIB_DEPS_FALSE}"; then
+  as_fn_error $? "conditional \"USE_EXPLICIT_LIB_DEPS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${CURLDEBUG_TRUE}" && test -z "${CURLDEBUG_FALSE}"; then
   as_fn_error $? "conditional \"CURLDEBUG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${BUILD_UNITTESTS_TRUE}" && test -z "${BUILD_UNITTESTS_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_UNITTESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DOING_NATIVE_WINDOWS_TRUE}" && test -z "${DOING_NATIVE_WINDOWS_FALSE}"; then
+  as_fn_error $? "conditional \"DOING_NATIVE_WINDOWS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE}"; then
+  as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then
   as_fn_error $? "conditional \"USE_MANUAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -35141,6 +39525,10 @@ if test -z "${BUILD_LIBHOSTNAME_TRUE}" && test -z "${BUILD_LIBHOSTNAME_FALSE}";
   as_fn_error $? "conditional \"BUILD_LIBHOSTNAME\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DOING_CURL_SYMBOL_HIDING_TRUE}" && test -z "${DOING_CURL_SYMBOL_HIDING_FALSE}"; then
+  as_fn_error $? "conditional \"DOING_CURL_SYMBOL_HIDING\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${SONAME_BUMP_TRUE}" && test -z "${SONAME_BUMP_FALSE}"; then
   as_fn_error $? "conditional \"SONAME_BUMP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -35150,7 +39538,7 @@ if test -z "${CROSSCOMPILING_TRUE}" && test -z "${CROSSCOMPILING_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -35243,6 +39631,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -35438,16 +39827,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -35507,28 +39896,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -35550,7 +39927,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by curl $as_me -, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -35616,16 +39993,17 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 curl config.status -
-configured by $0, generated by GNU Autoconf 2.67,
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
 AWK='$AWK'
 test -n "\$AWK" || AWK=awk
 _ACEOF
@@ -35709,7 +40087,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
@@ -35743,133 +40121,158 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
-for var in SED \
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
 GREP \
 EGREP \
 FGREP \
@@ -35881,8 +40284,12 @@ lt_NL2SP \
 reload_flag \
 deplibs_check_method \
 file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
 AR \
 AR_FLAGS \
+archiver_list_spec \
 STRIP \
 RANLIB \
 CC \
@@ -35892,14 +40299,14 @@ lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
+nm_file_list_spec \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 lt_prog_compiler_pic \
+lt_prog_compiler_wl \
 lt_prog_compiler_static \
 lt_cv_prog_compiler_c_o \
 need_locks \
+MANIFEST_TOOL \
 DSYMUTIL \
 NMEDIT \
 LIPO \
@@ -35913,9 +40320,7 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
-fix_srcfile_path \
 exclude_expsyms \
 include_expsyms \
 file_list_spec \
@@ -35923,12 +40328,13 @@ variables_saved_for_relink \
 libname_spec \
 library_names_spec \
 soname_spec \
+install_override_mode \
 finish_eval \
 old_striplib \
 striplib; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -35950,14 +40356,15 @@ module_cmds \
 module_expsym_cmds \
 export_symbols_cmds \
 prelink_cmds \
+postlink_cmds \
 postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
 sys_lib_dlsearch_path_spec; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -35965,12 +40372,6 @@ sys_lib_dlsearch_path_spec; do
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
-  ;;
-esac
-
 ac_aux_dir='$ac_aux_dir'
 xsi_shell='$xsi_shell'
 lt_shell_append='$lt_shell_append'
@@ -36000,7 +40401,6 @@ for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
     "lib/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/curl_config.h" ;;
-    "src/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/curl_config.h" ;;
     "include/curl/curlbuild.h") CONFIG_HEADERS="$CONFIG_HEADERS include/curl/curlbuild.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "include/curl/Makefile") CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+    "lib/libcurl.vers") CONFIG_FILES="$CONFIG_FILES lib/libcurl.vers" ;;
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tests/certs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/Makefile" ;;
+    "tests/certs/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/scripts/Makefile" ;;
     "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;;
     "tests/server/Makefile") CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;;
     "tests/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;;
+    "tests/unit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit/Makefile" ;;
     "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;;
     "packages/Win32/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Win32/Makefile" ;;
     "packages/Win32/cygwin/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Win32/cygwin/Makefile" ;;
@@ -36033,7 +40437,7 @@ do
     "curl-config") CONFIG_FILES="$CONFIG_FILES curl-config" ;;
     "libcurl.pc") CONFIG_FILES="$CONFIG_FILES libcurl.pc" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -36066,12 +40471,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -36093,7 +40499,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -36121,7 +40527,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -36169,7 +40575,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -36201,7 +40607,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -36235,7 +40641,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -36247,8 +40653,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -36349,7 +40755,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -36368,7 +40774,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be DOS-style,
         # because $ac_f cannot contain `:'.
@@ -36377,7 +40783,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -36403,8 +40809,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -36478,6 +40884,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -36532,23 +40943,25 @@ s&@builddir@&$ac_builddir&;t t
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -36559,38 +40972,39 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    "$ac_file" | "$ac_file":* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -36617,17 +41031,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
@@ -36650,28 +41075,26 @@ $as_echo X"$mf" |
            q
          }
          s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
@@ -36694,11 +41117,12 @@ $as_echo X"$file" |
            q
          }
          s/.*/./; q'`
-    as_dir=$dirpart/$fdir; as_fn_mkdir_p
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
  ;;
     "libtool":C)
 
@@ -36721,7 +41145,8 @@ done
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -36753,18 +41178,18 @@ available_tags=""
 
 # ### BEGIN LIBTOOL CONFIG
 
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
 # Assembler program.
-AS=$AS
+AS=$lt_AS
 
 # DLL creation program.
-DLLTOOL=$DLLTOOL
+DLLTOOL=$lt_DLLTOOL
 
 # Object dumper program.
-OBJDUMP=$OBJDUMP
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
+OBJDUMP=$lt_OBJDUMP
 
 # Whether or not to build shared libraries.
 build_libtool_libs=$enable_shared
@@ -36778,6 +41203,15 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -36827,20 +41261,36 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == "file_magic".
+# Command to use when deplibs_check_method = "file_magic".
 file_magic_cmd=$lt_file_magic_cmd
 
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
 # The archiver.
 AR=$lt_AR
+
+# Flags to create an archive.
 AR_FLAGS=$lt_AR_FLAGS
 
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
 # A symbol stripping program.
 STRIP=$lt_STRIP
 
@@ -36849,6 +41299,9 @@ RANLIB=$lt_RANLIB
 old_postinstall_cmds=$lt_old_postinstall_cmds
 old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
 # A C compiler.
 LTCC=$lt_CC
 
@@ -36867,14 +41320,14 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
 
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
 # Used to examine libraries when file_magic_cmd begins with "file".
 MAGIC_CMD=$MAGIC_CMD
@@ -36882,6 +41335,9 @@ MAGIC_CMD=$MAGIC_CMD
 # Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
 DSYMUTIL=$lt_DSYMUTIL
 
@@ -36938,6 +41394,9 @@ library_names_spec=$lt_library_names_spec
 # The coded name of the library, if different from the real name.
 soname_spec=$lt_soname_spec
 
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
 # Command to use after installation of a shared archive.
 postinstall_cmds=$lt_postinstall_cmds
 
@@ -36977,6 +41436,10 @@ striplib=$lt_striplib
 # The linker used to build libraries.
 LD=$lt_LD
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds
 
@@ -36989,12 +41452,12 @@ with_gcc=$GCC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
@@ -37044,10 +41507,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
@@ -37081,9 +41540,6 @@ inherit_rpath=$inherit_rpath
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols
 
@@ -37099,6 +41555,9 @@ include_expsyms=$lt_include_expsyms
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec
 
@@ -37131,212 +41590,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1+=\$2"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1=\$$1\$2"
-}
-
-_LT_EOF
-    ;;
-  esac
-
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
@@ -37557,59 +41973,67 @@ use vars qw(
 _EOF
 
 
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: Configured to build curl/libcurl:
 
-  curl version:    ${VERSION}
-  Host setup:      ${host}
-  Install prefix:  ${prefix}
-  Compiler:        ${CC}
-  SSL support:     ${curl_ssl_msg}
-  SSH support:     ${curl_ssh_msg}
-  zlib support:    ${curl_zlib_msg}
-  krb4 support:    ${curl_krb4_msg}
-  GSSAPI support:  ${curl_gss_msg}
-  SPNEGO support:  ${curl_spnego_msg}
-  resolver:        ${curl_res_msg}
-  ipv6 support:    ${curl_ipv6_msg}
-  IDN support:     ${curl_idn_msg}
-  Build libcurl:   Shared=${enable_shared}, Static=${enable_static}
-  Built-in manual: ${curl_manual_msg}
-  Verbose errors:  ${curl_verbose_msg}
-  SSPI support:    ${curl_sspi_msg}
-  ca cert bundle:  ${ca}
-  ca cert path:    ${capath}
-  LDAP support:    ${curl_ldap_msg}
-  LDAPS support:   ${curl_ldaps_msg}
-  RTSP support:    ${curl_rtsp_msg}
-  RTMP support:    ${curl_rtmp_msg}
-  Protocols:       ${SUPPORT_PROTOCOLS}
+  curl version:     ${CURLVERSION}
+  Host setup:       ${host}
+  Install prefix:   ${prefix}
+  Compiler:         ${CC}
+  SSL support:      ${curl_ssl_msg}
+  SSH support:      ${curl_ssh_msg}
+  zlib support:     ${curl_zlib_msg}
+  krb4 support:     ${curl_krb4_msg}
+  GSSAPI support:   ${curl_gss_msg}
+  SPNEGO support:   ${curl_spnego_msg}
+  TLS-SRP support:  ${curl_tls_srp_msg}
+  resolver:         ${curl_res_msg}
+  ipv6 support:     ${curl_ipv6_msg}
+  IDN support:      ${curl_idn_msg}
+  Build libcurl:    Shared=${enable_shared}, Static=${enable_static}
+  Built-in manual:  ${curl_manual_msg}
+  --libcurl option: ${curl_libcurl_msg}
+  Verbose errors:   ${curl_verbose_msg}
+  SSPI support:     ${curl_sspi_msg}
+  ca cert bundle:   ${ca}
+  ca cert path:     ${capath}
+  LDAP support:     ${curl_ldap_msg}
+  LDAPS support:    ${curl_ldaps_msg}
+  RTSP support:     ${curl_rtsp_msg}
+  RTMP support:     ${curl_rtmp_msg}
+  metalink support: ${curl_mtlnk_msg}
+  Protocols:        ${SUPPORT_PROTOCOLS}
 " >&5
 $as_echo "$as_me: Configured to build curl/libcurl:
 
-  curl version:    ${VERSION}
-  Host setup:      ${host}
-  Install prefix:  ${prefix}
-  Compiler:        ${CC}
-  SSL support:     ${curl_ssl_msg}
-  SSH support:     ${curl_ssh_msg}
-  zlib support:    ${curl_zlib_msg}
-  krb4 support:    ${curl_krb4_msg}
-  GSSAPI support:  ${curl_gss_msg}
-  SPNEGO support:  ${curl_spnego_msg}
-  resolver:        ${curl_res_msg}
-  ipv6 support:    ${curl_ipv6_msg}
-  IDN support:     ${curl_idn_msg}
-  Build libcurl:   Shared=${enable_shared}, Static=${enable_static}
-  Built-in manual: ${curl_manual_msg}
-  Verbose errors:  ${curl_verbose_msg}
-  SSPI support:    ${curl_sspi_msg}
-  ca cert bundle:  ${ca}
-  ca cert path:    ${capath}
-  LDAP support:    ${curl_ldap_msg}
-  LDAPS support:   ${curl_ldaps_msg}
-  RTSP support:    ${curl_rtsp_msg}
-  RTMP support:    ${curl_rtmp_msg}
-  Protocols:       ${SUPPORT_PROTOCOLS}
+  curl version:     ${CURLVERSION}
+  Host setup:       ${host}
+  Install prefix:   ${prefix}
+  Compiler:         ${CC}
+  SSL support:      ${curl_ssl_msg}
+  SSH support:      ${curl_ssh_msg}
+  zlib support:     ${curl_zlib_msg}
+  krb4 support:     ${curl_krb4_msg}
+  GSSAPI support:   ${curl_gss_msg}
+  SPNEGO support:   ${curl_spnego_msg}
+  TLS-SRP support:  ${curl_tls_srp_msg}
+  resolver:         ${curl_res_msg}
+  ipv6 support:     ${curl_ipv6_msg}
+  IDN support:      ${curl_idn_msg}
+  Build libcurl:    Shared=${enable_shared}, Static=${enable_static}
+  Built-in manual:  ${curl_manual_msg}
+  --libcurl option: ${curl_libcurl_msg}
+  Verbose errors:   ${curl_verbose_msg}
+  SSPI support:     ${curl_sspi_msg}
+  ca cert bundle:   ${ca}
+  ca cert path:     ${capath}
+  LDAP support:     ${curl_ldap_msg}
+  LDAPS support:    ${curl_ldaps_msg}
+  RTSP support:     ${curl_rtsp_msg}
+  RTMP support:     ${curl_rtmp_msg}
+  metalink support: ${curl_mtlnk_msg}
+  Protocols:        ${SUPPORT_PROTOCOLS}
 " >&6;}
 
 if test "x$soname_bump" = "xyes"; then
index b77c1d5..00ffe5c 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -26,15 +26,18 @@ AC_PREREQ(2.57)
 dnl We don't know the version number "statically" so we use a dash here
 AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
 
+XC_OVR_ZZ50
+XC_OVR_ZZ60
 CURL_OVERRIDE_AUTOCONF
 
 dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
+AC_COPYRIGHT([Copyright (c) 1998 - 2013 Daniel Stenberg, <daniel@haxx.se>
 This configure script may be copied, distributed and modified under the
 terms of the curl license; see COPYING for more details])
 
 AC_CONFIG_SRCDIR([lib/urldata.h])
-AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
+AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
+AC_CONFIG_MACRO_DIR([m4])
 AM_MAINTAINER_MODE
 
 CURL_CHECK_OPTION_DEBUG
@@ -42,9 +45,10 @@ CURL_CHECK_OPTION_OPTIMIZE
 CURL_CHECK_OPTION_WARNINGS
 CURL_CHECK_OPTION_WERROR
 CURL_CHECK_OPTION_CURLDEBUG
+CURL_CHECK_OPTION_SYMBOL_HIDING
 CURL_CHECK_OPTION_ARES
 
-CURL_CHECK_PATH_SEPARATOR_REQUIRED
+XC_CHECK_PATH_SEPARATOR
 
 #
 # save the configure arguments
@@ -120,10 +124,13 @@ if test -f ${srcdir}/include/curl/curlbuild.h; then
 fi
 
 dnl figure out the libcurl version
-VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
-AM_INIT_AUTOMAKE(curl,$VERSION)
+CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
+XC_CHECK_PROG_CC
+XC_AUTOMAKE
 AC_MSG_CHECKING([curl version])
-AC_MSG_RESULT($VERSION)
+AC_MSG_RESULT($CURLVERSION)
+
+AC_SUBST(CURLVERSION)
 
 dnl
 dnl we extract the numerical version for curl-config only
@@ -140,27 +147,33 @@ AC_SUBST(PKGADD_VENDOR)
 
 dnl
 dnl initialize all the info variables
-    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,polarssl} )"
+    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )"
     curl_ssh_msg="no      (--with-libssh2)"
    curl_zlib_msg="no      (--with-zlib)"
    curl_krb4_msg="no      (--with-krb4*)"
     curl_gss_msg="no      (--with-gssapi)"
  curl_spnego_msg="no      (--with-spnego)"
+curl_tls_srp_msg="no      (--enable-tls-srp)"
     curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
    curl_ipv6_msg="no      (--enable-ipv6)"
-    curl_idn_msg="no      (--with-libidn)"
+    curl_idn_msg="no      (--with-{libidn,winidn})"
  curl_manual_msg="no      (--enable-manual)"
+curl_libcurl_msg="enabled (--disable-libcurl-option)"
 curl_verbose_msg="enabled (--disable-verbose)"
    curl_sspi_msg="no      (--enable-sspi)"
    curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
   curl_ldaps_msg="no      (--enable-ldaps)"
    curl_rtsp_msg="no      (--enable-rtsp)"
    curl_rtmp_msg="no      (--with-librtmp)"
+  curl_mtlnk_msg="no      (--with-libmetalink)"
+
+    init_ssl_msg=${curl_ssl_msg}
 
 dnl
-dnl Save anything in $LIBS for later
+dnl Save some initial values the user might have provided
 dnl
-ALL_LIBS=$LIBS
+INITIAL_LDFLAGS=$LDFLAGS
+INITIAL_LIBS=$LIBS
 
 dnl
 dnl Detect the canonical host and target build environment
@@ -171,7 +184,6 @@ dnl Get system canonical name
 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
 
 dnl Checks for programs.
-CURL_CHECK_PROG_CC
 
 dnl Our curl_off_t internal and external configure settings
 CURL_CONFIGURE_CURL_OFF_T
@@ -186,72 +198,50 @@ CURL_CONFIGURE_REENTRANT
 dnl check for how to do large files
 AC_SYS_LARGEFILE
 
-dnl support building of Windows DLLs
-AC_LIBTOOL_WIN32_DLL
+XC_LIBTOOL
 
-dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
-AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
-case $host in
-  x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
-    AC_MSG_RESULT([yes])
-    with_pic=yes
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-esac
+#
+# Automake conditionals based on libtool related checks
+#
 
-AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
-case $CC in
-  icc | */icc)
-    AC_MSG_RESULT([yes])
-    with_pic=yes
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-esac
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
+  [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
+  [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
+  [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
 
-dnl libtool setup
-AC_PROG_LIBTOOL
+#
+# Due to libtool and automake machinery limitations of not allowing
+# specifying separate CPPFLAGS or CFLAGS when compiling objects for
+# inclusion of these in shared or static libraries, we are forced to
+# build using separate configure runs for shared and static libraries
+# on systems where different CPPFLAGS or CFLAGS are mandatory in order
+# to compile objects for each kind of library. Notice that relying on
+# the '-DPIC' CFLAG that libtool provides is not valid given that the
+# user might for example choose to build static libraries with PIC.
+#
 
-AC_MSG_CHECKING([if we need -mimpure-text])
-mimpure=no
-case $host in
-  *-*-solaris2*)
-    if test "$GCC" = "yes"; then
-      mimpure="yes"
-    fi
-    ;;
-  *)
-    ;;
-esac
-AC_MSG_RESULT($mimpure)
-AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
+#
+# Make our Makefile.am files use the staticlib CPPFLAG only when strictly
+# targeting a static library and not building its shared counterpart.
+#
 
-dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
-dnl builds on Windows
-AM_CONDITIONAL(STATICLIB, false)
+AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
+  [test "x$xc_lt_build_static_only" = 'xyes'])
+
+#
+# Make staticlib CPPFLAG variable and its definition visible in output
+# files unconditionally, providing an empty definition unless strictly
+# targeting a static library and not building its shared counterpart.
+#
+
+CPPFLAG_CURL_STATICLIB=
+if test "x$xc_lt_build_static_only" = 'xyes'; then
+  CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
+fi
+AC_SUBST([CPPFLAG_CURL_STATICLIB])
 
-AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
-case $host in
-  *-*-mingw*)
-    AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
-    AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([if we need CURL_STATICLIB])
-    if test "X$enable_shared" = "Xno"
-    then
-      AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
-      AC_MSG_RESULT(yes)
-      AM_CONDITIONAL(STATICLIB, true)
-    else
-      AC_MSG_RESULT(no)
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-esac
 
 # Determine whether all dependent libraries must be specified when linking
 if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
@@ -261,10 +251,7 @@ else
     REQUIRE_LIB_DEPS=yes
 fi
 AC_SUBST(REQUIRE_LIB_DEPS)
-
-dnl The install stuff has already been taken care of by the automake stuff
-dnl AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
 
 dnl check if there's a way to force code inline
 AC_C_INLINE
@@ -293,13 +280,50 @@ fi
 
 CURL_CHECK_COMPILER_HALT_ON_ERROR
 CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
-
-CURL_CHECK_NO_UNDEFINED
-AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
+CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
+CURL_CHECK_COMPILER_SYMBOL_HIDING
 
 CURL_CHECK_CURLDEBUG
 AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
 
+supports_unittests=yes
+# cross-compilation of unit tests static library/programs fails when
+# libcurl shared library is built. This might be due to a libtool or
+# automake issue. In this case we disable unit tests.
+if test "x$cross_compiling" != "xno" &&
+   test "x$enable_shared" != "xno"; then
+  supports_unittests=no
+fi
+
+# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
+# a problem related with OpenSSL headers and library versions not matching.
+# Disable unit tests while time to further investigate this is found.
+case $host in
+  mips-sgi-irix6.5)
+    if test "$compiler_id" = "GNU_C"; then
+      supports_unittests=no
+    fi
+    ;;
+esac
+
+# All AIX autobuilds fails unit tests linking against unittests library
+# due to unittests library being built with no symbols or members. Libtool ?
+# Disable unit tests while time to further investigate this is found.
+case $host_os in
+  aix*)
+    supports_unittests=no
+    ;;
+esac
+
+dnl Build unit tests when option --enable-debug is given.
+if test "x$want_debug" = "xyes" &&
+   test "x$supports_unittests" = "xyes"; then
+  want_unittests=yes
+else
+  want_unittests=no
+fi
+AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
+
 dnl **********************************************************************
 dnl Compilation based checks should not be done before this point.
 dnl **********************************************************************
@@ -607,10 +631,43 @@ AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
 dnl The actual use of the USE_MANUAL variable is done much later in this
 dnl script to allow other actions to disable it as well.
 
+dnl ************************************************************
+dnl disable C code generation support
+dnl
+AC_MSG_CHECKING([whether to enable generation of C code])
+AC_ARG_ENABLE(libcurl_option,
+AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
+AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
+[ case "$enableval" in
+  no)
+       AC_MSG_RESULT(no)
+       AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
+       curl_libcurl_msg="no"
+       ;;
+  *)   AC_MSG_RESULT(yes)
+       ;;
+  esac ],
+       AC_MSG_RESULT(yes)
+)
+
 dnl **********************************************************************
 dnl Checks for libraries.
 dnl **********************************************************************
 
+AC_MSG_CHECKING([whether to use libgcc])
+AC_ARG_ENABLE(libgcc,
+AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
+[ case "$enableval" in
+  yes)
+       LIBS="-lgcc $LIBS"
+       AC_MSG_RESULT(yes)
+       ;;
+  *)   AC_MSG_RESULT(no)
+       ;;
+  esac ],
+       AC_MSG_RESULT(no)
+)
+
 CURL_CHECK_LIB_XNET
 
 dnl gethostbyname without lib or in the nsl lib?
@@ -619,7 +676,7 @@ AC_CHECK_FUNC(gethostbyname,
               ],
               [ AC_CHECK_LIB(nsl, gethostbyname,
                              [HAVE_GETHOSTBYNAME="1"
-                             LIBS="$LIBS -lnsl"
+                             LIBS="-lnsl $LIBS"
                              ])
               ])
 
@@ -628,7 +685,18 @@ then
   dnl gethostbyname in the socket lib?
   AC_CHECK_LIB(socket, gethostbyname,
                [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lsocket"
+               LIBS="-lsocket $LIBS"
+               ])
+fi
+
+if test "$HAVE_GETHOSTBYNAME" != "1"
+then
+  dnl gethostbyname in the watt lib?
+  AC_CHECK_LIB(watt, gethostbyname,
+               [HAVE_GETHOSTBYNAME="1"
+               CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
+               LDFLAGS="-L/dev/env/WATT_ROOT/lib"
+               LIBS="-lwatt $LIBS"
                ])
 fi
 
@@ -747,7 +815,7 @@ then
   dnl gethostbyname in the network lib - for Haiku OS
   AC_CHECK_LIB(network, gethostbyname,
                [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnetwork"
+               LIBS="-lnetwork $LIBS"
                ])
 fi
 
@@ -756,7 +824,7 @@ then
   dnl gethostbyname in the net lib - for BeOS
   AC_CHECK_LIB(net, gethostbyname,
                [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnet"
+               LIBS="-lnet $LIBS"
                ])
 fi
 
@@ -788,25 +856,108 @@ CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
 
 dnl **********************************************************************
 dnl The preceding library checks are all potentially useful for test
-dnl servers (for providing networking support).  Save the list of required
-dnl libraries at this point for use while linking those test servers.
+dnl servers and libtest cases which require networking and clock_gettime
+dnl support.  Save the list of required libraries at this point for use
+dnl while linking those test servers and programs.
 dnl **********************************************************************
-TEST_SERVER_LIBS=$LIBS
+CURL_NETWORK_AND_TIME_LIBS=$LIBS
 
 dnl **********************************************************************
-AC_MSG_CHECKING([whether to use libgcc])
-AC_ARG_ENABLE(libgcc,
-AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
-[ case "$enableval" in
-  yes)
-        ALL_LIBS="$ALL_LIBS -lgcc"
-       AC_MSG_RESULT(yes)
-       ;;
-  *)   AC_MSG_RESULT(no)
-       ;;
-  esac ],
-       AC_MSG_RESULT(no)
-)
+dnl Check for the presence of ZLIB libraries and headers
+dnl **********************************************************************
+
+dnl Check for & handle argument to --with-zlib.
+
+clean_CPPFLAGS=$CPPFLAGS
+clean_LDFLAGS=$LDFLAGS
+clean_LIBS=$LIBS
+ZLIB_LIBS=""
+AC_ARG_WITH(zlib,
+AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
+AC_HELP_STRING([--without-zlib],[disable use of zlib]),
+               [OPT_ZLIB="$withval"])
+
+if test "$OPT_ZLIB" = "no" ; then
+    AC_MSG_WARN([zlib disabled])
+else
+  if test "$OPT_ZLIB" = "yes" ; then
+    OPT_ZLIB=""
+  fi
+
+  if test -z "$OPT_ZLIB" ; then
+    dnl check for the lib first without setting any new path, since many
+    dnl people have it in the default path
+
+    AC_CHECK_LIB(z, inflateEnd,
+                   dnl libz found, set the variable
+                   [HAVE_LIBZ="1"
+                    LIBS="-lz $LIBS"],
+                   dnl if no lib found, try /usr/local
+                   [OPT_ZLIB="/usr/local"])
+
+  fi
+
+  dnl Add a nonempty path to the compiler flags
+  if test -n "$OPT_ZLIB"; then
+     CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
+     LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
+  fi
+
+  AC_CHECK_HEADER(zlib.h,
+    [
+    dnl zlib.h was found
+    HAVE_ZLIB_H="1"
+    dnl if the lib wasn't found already, try again with the new paths
+    if test "$HAVE_LIBZ" != "1"; then
+      AC_CHECK_LIB(z, gzread,
+                   [
+                   dnl the lib was found!
+                   HAVE_LIBZ="1"
+                   LIBS="-lz $LIBS"
+                   ],
+                   [ CPPFLAGS=$clean_CPPFLAGS
+                   LDFLAGS=$clean_LDFLAGS])
+    fi
+    ],
+    [
+      dnl zlib.h was not found, restore the flags
+      CPPFLAGS=$clean_CPPFLAGS
+      LDFLAGS=$clean_LDFLAGS]
+    )
+
+  if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
+  then
+    AC_MSG_WARN([configure found only the libz lib, not the header file!])
+    HAVE_LIBZ=""
+    CPPFLAGS=$clean_CPPFLAGS
+    LDFLAGS=$clean_LDFLAGS
+    LIBS=$clean_LIBS
+  elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
+  then
+    AC_MSG_WARN([configure found only the libz header file, not the lib!])
+    CPPFLAGS=$clean_CPPFLAGS
+    LDFLAGS=$clean_LDFLAGS
+    LIBS=$clean_LIBS
+  elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
+  then
+    dnl both header and lib were found!
+    AC_SUBST(HAVE_LIBZ)
+    AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
+    AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
+
+    ZLIB_LIBS="-lz"
+    LIBS="-lz $clean_LIBS"
+
+    dnl replace 'HAVE_LIBZ' in the automake makefile.ams
+    AMFIXLIB="1"
+    AC_MSG_NOTICE([found both libz and libz.h header])
+    curl_zlib_msg="enabled"
+  fi
+fi
+
+dnl set variable for use in automakefile(s)
+AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
+AC_SUBST(ZLIB_LIBS)
 
 dnl **********************************************************************
 dnl Check for LDAP
@@ -841,9 +992,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
     AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
       AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
       AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-      AC_SUBST(CURL_DISABLE_LDAP, [1])])
+      AC_SUBST(CURL_DISABLE_LDAP, [1])
       AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-      AC_SUBST(CURL_DISABLE_LDAPS, [1])
+      AC_SUBST(CURL_DISABLE_LDAPS, [1])])
   else
     dnl Try to find the right ldap libraries for this system
     CURL_CHECK_LIBS_LDAP
@@ -868,9 +1019,9 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
       AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
         AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
         AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-        AC_SUBST(CURL_DISABLE_LDAP, [1])])
+        AC_SUBST(CURL_DISABLE_LDAP, [1])
         AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-        AC_SUBST(CURL_DISABLE_LDAPS, [1])
+        AC_SUBST(CURL_DISABLE_LDAPS, [1])])
     fi
   fi
 fi
@@ -1232,35 +1383,87 @@ if test x"$want_gss" = xyes; then
   if test -n "$gnu_gss"; then
     curl_gss_msg="enabled (GNU GSS)"
     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-    LIBS="$LIBS -lgss"
+    LIBS="-lgss $LIBS"
   elif test -z "$GSSAPI_LIB_DIR"; then
      case $host in
      *-*-darwin*)
-        LIBS="$LIBS -lgssapi_krb5 -lresolv"
+        LIBS="-lgssapi_krb5 -lresolv $LIBS"
         ;;
      *)
         if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
            dnl krb5-config doesn't have --libs-only-L or similar, put everything
            dnl into LIBS
            gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
-           # LIBS="$LIBS $gss_libs"
-          LIBS="$LIBS -lgssapi_krb5"
+           LIBS="$gss_libs $LIBS"
         elif test "$GSSAPI_ROOT" != "yes"; then
            LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
-           LIBS="$LIBS -lgssapi"
+           LIBS="-lgssapi $LIBS"
         else
-           LIBS="$LIBS -lgssapi"
+           LIBS="-lgssapi $LIBS"
         fi
         ;;
      esac
   else
      LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-     LIBS="$LIBS -lgssapi"
+     LIBS="-lgssapi $LIBS"
   fi
 else
   CPPFLAGS="$save_CPPFLAGS"
 fi
 
+dnl -------------------------------------------------
+dnl check winssl option before other SSL libraries
+dnl -------------------------------------------------
+
+OPT_WINSSL=no
+AC_ARG_WITH(winssl,dnl
+AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
+AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
+  OPT_WINSSL=$withval)
+
+AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test "x$OPT_WINSSL" != "xno"  &&
+     test "x$ac_cv_native_windows" = "xyes"; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
+    AC_SUBST(USE_SCHANNEL, [1])
+    curl_ssl_msg="enabled (Windows-native)"
+    WINSSL_ENABLED=1
+    # --with-winssl implies --enable-sspi
+    AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
+    AC_SUBST(USE_WINDOWS_SSPI, [1])
+    curl_sspi_msg="enabled"
+  else
+    AC_MSG_RESULT(no)
+  fi
+else
+  AC_MSG_RESULT(no)
+fi
+
+OPT_DARWINSSL=no
+AC_ARG_WITH(darwinssl,dnl
+AC_HELP_STRING([--with-darwinssl],[enable iOS/Mac OS X native SSL/TLS])
+AC_HELP_STRING([--without-darwinssl], [disable iOS/Mac OS X native SSL/TLS]),
+  OPT_DARWINSSL=$withval)
+
+AC_MSG_CHECKING([whether to enable iOS/Mac OS X native SSL/TLS])
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test "x$OPT_DARWINSSL" != "xno" &&
+     test -d "/System/Library/Frameworks/Security.framework"; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(USE_DARWINSSL, 1, [to enable iOS/Mac OS X native SSL/TLS support])
+    AC_SUBST(USE_DARWINSSL, [1])
+    curl_ssl_msg="enabled (iOS/Mac OS X-native)"
+    DARWINSSL_ENABLED=1
+    LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
+  else
+    AC_MSG_RESULT(no)
+  fi
+else
+  AC_MSG_RESULT(no)
+fi
+
 dnl **********************************************************************
 dnl Check for the presence of SSL libraries and headers
 dnl **********************************************************************
@@ -1274,7 +1477,7 @@ AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the
 AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
   OPT_SSL=$withval)
 
-if test X"$OPT_SSL" != Xno; then
+if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
   dnl backup the pre-ssl variables
   CLEANLDFLAGS="$LDFLAGS"
   CLEANCPPFLAGS="$CPPFLAGS"
@@ -1308,7 +1511,7 @@ if test X"$OPT_SSL" != Xno; then
     dnl the user told us to look
     OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
     AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
-    if test -e "$OPENSSL_PCDIR/openssl.pc"; then
+    if test -f "$OPENSSL_PCDIR/openssl.pc"; then
       PKGTEST="yes"
     fi
 
@@ -1349,7 +1552,7 @@ if test X"$OPT_SSL" != Xno; then
       dnl the argument to --with-ssl we don't know what
       dnl additional libs may be necessary.  Hope that we
       dnl don't need any.
-      LIBS="$LIBS $SSL_LIBS"
+      LIBS="$SSL_LIBS $LIBS"
     fi
   fi
 
@@ -1401,7 +1604,7 @@ if test X"$OPT_SSL" != Xno; then
         dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
         AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
         OLIBS=$LIBS
-        LIBS="$LIBS -lRSAglue -lrsaref"
+        LIBS="-lRSAglue -lrsaref $LIBS"
         AC_CHECK_LIB(ssl, SSL_connect)
         if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
             dnl still no SSL_connect
@@ -1472,7 +1675,8 @@ if test X"$OPT_SSL" != Xno; then
                     RAND_egd \
                     ENGINE_cleanup \
                     CRYPTO_cleanup_all_ex_data \
-                    SSL_get_shutdown )
+                    SSL_get_shutdown \
+                    SSLv2_client_method )
 
     dnl Make an attempt to detect if this is actually yassl's headers and
     dnl OpenSSL emulation layer. We still leave everything else believing
@@ -1504,150 +1708,86 @@ if test X"$OPT_SSL" != Xno; then
        dnl when the ssl shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
        dnl to prevent further configure tests to fail due to this
-
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
-       export LD_LIBRARY_PATH
-       AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
+       if test "x$cross_compiling" != "xyes"; then
+         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
+         export LD_LIBRARY_PATH
+         AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
+       fi
     fi
+    CURL_CHECK_OPENSSL_API
   fi
 
 fi
 
 dnl **********************************************************************
-dnl Check for the presence of ZLIB libraries and headers
+dnl Check for the random seed preferences
 dnl **********************************************************************
 
-dnl Check for & handle argument to --with-zlib.
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(zlib,
-AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
-AC_HELP_STRING([--without-zlib],[disable use of zlib]),
-               [OPT_ZLIB="$withval"])
-
-if test "$OPT_ZLIB" = "no" ; then
-    AC_MSG_WARN([zlib disabled])
-else
-  if test "$OPT_ZLIB" = "yes" ; then
-     OPT_ZLIB=""
+if test X"$OPENSSL_ENABLED" = X"1"; then
+  AC_ARG_WITH(egd-socket,
+  AC_HELP_STRING([--with-egd-socket=FILE],
+                 [Entropy Gathering Daemon socket pathname]),
+      [ EGD_SOCKET="$withval" ]
+  )
+  if test -n "$EGD_SOCKET" ; then
+          AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
+          [your Entropy Gathering Daemon socket pathname] )
   fi
 
-  if test -z "$OPT_ZLIB" ; then
-    dnl check for the lib first without setting any new path, since many
-    dnl people have it in the default path
+  dnl Check for user-specified random device
+  AC_ARG_WITH(random,
+  AC_HELP_STRING([--with-random=FILE],
+                 [read randomness from FILE (default=/dev/urandom)]),
+      [ RANDOM_FILE="$withval" ],
+      [
+          if test x$cross_compiling != xyes; then
+            dnl Check for random device
+            AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+          else
+            AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
+          fi
+      ]
+  )
+  if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
+          AC_SUBST(RANDOM_FILE)
+          AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
+          [a suitable file to read random data from])
+  fi
+fi
 
-    AC_CHECK_LIB(z, inflateEnd,
-                   dnl libz found, set the variable
-                   [HAVE_LIBZ="1"],
-                   dnl if no lib found, try /usr/local
-                   [OPT_ZLIB="/usr/local"])
+dnl ---
+dnl We require OpenSSL with SRP support.
+dnl ---
+if test "$OPENSSL_ENABLED" = "1"; then
+  AC_CHECK_LIB(crypto, SRP_Calc_client_key,
+   [
+     AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
+     AC_SUBST(HAVE_SSLEAY_SRP, [1])
+   ])
+fi
 
-  fi
+dnl ----------------------------------------------------
+dnl check for GnuTLS
+dnl ----------------------------------------------------
 
-  dnl Add a nonempty path to the compiler flags
-  if test -n "$OPT_ZLIB"; then
-     CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
-     LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
-  fi
-
-  AC_CHECK_HEADER(zlib.h,
-    [
-    dnl zlib.h was found
-    HAVE_ZLIB_H="1"
-    dnl if the lib wasn't found already, try again with the new paths
-    if test "$HAVE_LIBZ" != "1"; then
-      AC_CHECK_LIB(z, gzread,
-                   [
-                   dnl the lib was found!
-                   HAVE_LIBZ="1"
-                   ],
-                   [ CPPFLAGS=$_cppflags
-                   LDFLAGS=$_ldflags])
-    fi
-    ],
-    [
-      dnl zlib.h was not found, restore the flags
-      CPPFLAGS=$_cppflags
-      LDFLAGS=$_ldflags]
-    )
-
-  if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
-  then
-    AC_MSG_WARN([configure found only the libz lib, not the header file!])
-    HAVE_LIBZ=""
-  elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
-  then
-    AC_MSG_WARN([configure found only the libz header file, not the lib!])
-  elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
-  then
-    dnl both header and lib were found!
-    AC_SUBST(HAVE_LIBZ)
-    AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
-    AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
-
-    CURL_LIBS="$CURL_LIBS -lz"
-    LIBS="$LIBS -lz"
-
-    dnl replace 'HAVE_LIBZ' in the automake makefile.ams
-    AMFIXLIB="1"
-    AC_MSG_NOTICE([found both libz and libz.h header])
-    curl_zlib_msg="enabled"
-  fi
-fi
-
-dnl set variable for use in automakefile(s)
-AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
-
-dnl **********************************************************************
-dnl Check for the random seed preferences
-dnl **********************************************************************
-
-if test X"$OPENSSL_ENABLED" = X"1"; then
-  AC_ARG_WITH(egd-socket,
-  AC_HELP_STRING([--with-egd-socket=FILE],
-                 [Entropy Gathering Daemon socket pathname]),
-      [ EGD_SOCKET="$withval" ]
-  )
-  if test -n "$EGD_SOCKET" ; then
-          AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
-          [your Entropy Gathering Daemon socket pathname] )
-  fi
-
-  dnl Check for user-specified random device
-  AC_ARG_WITH(random,
-  AC_HELP_STRING([--with-random=FILE],
-                 [read randomness from FILE (default=/dev/urandom)]),
-      [ RANDOM_FILE="$withval" ],
-      [
-          dnl Check for random device
-          AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
-      ]
-  )
-  if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
-          AC_SUBST(RANDOM_FILE)
-          AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
-          [a suitable file to read random data from])
-  fi
-fi
-
-dnl ----------------------------------------------------
-dnl check for GnuTLS
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for GnuTLS files & libraries.
-OPT_GNUTLS=no
+dnl Default to compiler & linker defaults for GnuTLS files & libraries.
+OPT_GNUTLS=no
 
 AC_ARG_WITH(gnutls,dnl
-AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
 AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
   OPT_GNUTLS=$withval)
 
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_GNUTLS" != Xno; then
 
     addld=""
+    addlib=""
+    gtlslib=""
+    version=""
+    addcflags=""
+
     if test "x$OPT_GNUTLS" = "xyes"; then
       dnl this is with no partiular path given
       CURL_CHECK_PKGCONFIG(gnutls)
@@ -1698,9 +1838,9 @@ if test "$OPENSSL_ENABLED" != "1"; then
 
       CLEANLIBS="$LIBS"
       CLEANCPPFLAGS="$CPPFLAGS"
-      CLEADLDFLAGS="$LDFLAGS"
+      CLEANLDFLAGS="$LDFLAGS"
 
-      LIBS="$LIBS $addlib"
+      LIBS="$addlib $LIBS"
       LDFLAGS="$LDFLAGS $addld"
       if test "$addcflags" != "-I/usr/include"; then
          CPPFLAGS="$CPPFLAGS $addcflags"
@@ -1727,10 +1867,11 @@ if test "$OPENSSL_ENABLED" != "1"; then
           dnl linker doesn't search through, we need to add it to
           dnl LD_LIBRARY_PATH to prevent further configure tests to fail
           dnl due to this
-
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
-          export LD_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
+          if test "x$cross_compiling" != "xyes"; then 
+            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
+            export LD_LIBRARY_PATH
+            AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
+          fi
         fi
       fi
 
@@ -1738,20 +1879,47 @@ if test "$OPENSSL_ENABLED" != "1"; then
 
   fi dnl GNUTLS not disabled
 
-fi dnl OPENSSL != 1
+fi
 
 dnl ---
-dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since
-dnl curl code relies on that but recent GnuTLS versions can in fact build
-dnl with different crypto libraries which curl right now cannot handle
+dnl Check which crypto backend GnuTLS uses
 dnl ---
 
 if test "$GNUTLS_ENABLED" = "1"; then
-  AC_CHECK_LIB(gcrypt,
-               gcry_control, ,
-    [
-      AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS])
-    ])
+  USE_GNUTLS_NETTLE=
+  # First check if we can detect either crypto library via transitive linking
+  AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+  fi
+  # If not, try linking directly to both of them to see if they are available
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+  fi
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+  fi
+  if test "$USE_GNUTLS_NETTLE" = ""; then
+    AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
+  fi
+  if test "$USE_GNUTLS_NETTLE" = "1"; then
+    AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
+    AC_SUBST(USE_GNUTLS_NETTLE, [1])
+    LIBS="-lnettle $LIBS"
+  else
+    LIBS="-lgcrypt $LIBS"
+  fi
+fi
+
+dnl ---
+dnl We require GnuTLS with SRP support.
+dnl ---
+if test "$GNUTLS_ENABLED" = "1"; then
+  AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
+   [
+     AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
+     AC_SUBST(HAVE_GNUTLS_SRP, [1])
+   ])
 fi
 
 dnl ----------------------------------------------------
@@ -1764,11 +1932,11 @@ OPT_POLARSSL=no
 _cppflags=$CPPFLAGS
 _ldflags=$LDFLAGS
 AC_ARG_WITH(polarssl,dnl
-AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
 AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
   OPT_POLARSSL=$withval)
 
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_POLARSSL" != Xno; then
 
@@ -1790,6 +1958,11 @@ if test "$OPENSSL_ENABLED" != "1"; then
         ])
     fi
 
+    addld=""
+    addlib=""
+    addcflags=""
+    polarssllib=""
+
     if test "x$USE_POLARSSL" != "xyes"; then
       dnl add the path and test again
       addld=-L$OPT_POLARSSL/lib$libsuff
@@ -1818,25 +1991,113 @@ if test "$OPENSSL_ENABLED" != "1"; then
     if test "x$USE_POLARSSL" = "xyes"; then
       AC_MSG_NOTICE([detected PolarSSL])
 
-      CURL_LIBS="$CURL_LIBS -lpolarssl"
-      LIBS="$LIBS -lpolarssl"
+      LIBS="-lpolarssl $LIBS"
 
       if test -n "$polarssllib"; then
         dnl when shared libs were found in a path that the run-time
         dnl linker doesn't search through, we need to add it to
         dnl LD_LIBRARY_PATH to prevent further configure tests to fail
         dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
+          export LD_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
+        fi
+      fi
+    fi
 
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
-        export LD_LIBRARY_PATH
-        AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
+  fi dnl PolarSSL not disabled
+
+fi
+
+dnl ----------------------------------------------------
+dnl check for CyaSSL
+dnl ----------------------------------------------------
+
+dnl Default to compiler & linker defaults for CyaSSL files & libraries.
+OPT_CYASSL=no
+
+_cppflags=$CPPFLAGS
+_ldflags=$LDFLAGS
+AC_ARG_WITH(cyassl,dnl
+AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
+AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
+  OPT_CYASSL=$withval)
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+
+  if test X"$OPT_CYASSL" != Xno; then
+
+    if test "$OPT_CYASSL" = "yes"; then
+      OPT_CYASSL=""
+    fi
+
+    if test -z "$OPT_CYASSL" ; then
+      dnl check for lib in system default first
+
+      AC_CHECK_LIB(cyassl, CyaSSL_Init,
+      dnl libcyassl found, set the variable
+       [
+         AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
+         AC_SUBST(USE_CYASSL, [1])
+         CYASSL_ENABLED=1
+         USE_CYASSL="yes"
+         curl_ssl_msg="enabled (CyaSSL)"
+        ])
+    fi
+
+    addld=""
+    addlib=""
+    addcflags=""
+    cyassllib=""
+
+    if test "x$USE_CYASSL" != "xyes"; then
+      dnl add the path and test again
+      addld=-L$OPT_CYASSL/lib$libsuff
+      addcflags=-I$OPT_CYASSL/include
+      cyassllib=$OPT_CYASSL/lib$libsuff
+
+      LDFLAGS="$LDFLAGS $addld"
+      if test "$addcflags" != "-I/usr/include"; then
+         CPPFLAGS="$CPPFLAGS $addcflags"
       fi
 
+      AC_CHECK_LIB(cyassl, CyaSSL_Init,
+       [
+       AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
+       AC_SUBST(USE_CYASSL, [1])
+       CYASSL_ENABLED=1
+       USE_CYASSL="yes"
+       curl_ssl_msg="enabled (CyaSSL)"
+       ],
+       [
+         CPPFLAGS=$_cppflags
+         LDFLAGS=$_ldflags
+       ])
     fi
 
-  fi dnl PolarSSL not disabled
+    if test "x$USE_CYASSL" = "xyes"; then
+      AC_MSG_NOTICE([detected CyaSSL])
+
+      LIBS="-lcyassl -lm $LIBS"
+
+      if test -n "$cyassllib"; then
+        dnl when shared libs were found in a path that the run-time
+        dnl linker doesn't search through, we need to add it to
+        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
+        dnl due to this
+        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
+          export LD_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
+        fi
+      fi
+
+    fi
+
+  fi dnl CyaSSL not disabled
 
-fi dnl OPENSSL != 1
+fi
 
 dnl ----------------------------------------------------
 dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
@@ -1846,13 +2107,20 @@ dnl Default to compiler & linker defaults for NSS files & libraries.
 OPT_NSS=no
 
 AC_ARG_WITH(nss,dnl
-AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)])
+AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
 AC_HELP_STRING([--without-nss], [disable NSS detection]),
   OPT_NSS=$withval)
 
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
 
   if test X"$OPT_NSS" != Xno; then
+
+    addld=""
+    addlib=""
+    addcflags=""
+    nssprefix=""
+    version=""
+
     if test "x$OPT_NSS" = "xyes"; then
 
       CURL_CHECK_PKGCONFIG(nss)
@@ -1885,24 +2153,18 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
         nssprefix=$OPT_NSS
     fi
 
-    dnl Check for functionPK11_CreateGenericObject
-    dnl this is needed for using the PEM PKCS#11 module
-    AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
-     [
-     AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject])
-     AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1])
-     ])
     if test -n "$addlib"; then
 
       CLEANLIBS="$LIBS"
       CLEANCPPFLAGS="$CPPFLAGS"
 
-      LIBS="$LIBS $addlib"
+      LIBS="$addlib $LIBS"
       if test "$addcflags" != "-I/usr/include"; then
          CPPFLAGS="$CPPFLAGS $addcflags"
       fi
 
-      AC_CHECK_LIB(nss3, NSS_Initialize,
+      dnl The function PK11_CreateGenericObject is needed to load libnsspem.so
+      AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
        [
        AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
        AC_SUBST(USE_NSS, [1])
@@ -1918,25 +2180,89 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
       if test "x$USE_NSS" = "xyes"; then
         AC_MSG_NOTICE([detected NSS version $version])
 
+        dnl NSS_InitContext() was introduced in NSS 3.12.5 and helps to prevent
+        dnl collisions on NSS initialization/shutdown with other libraries
+        AC_CHECK_FUNC(NSS_InitContext,
+        [
+          AC_DEFINE(HAVE_NSS_INITCONTEXT, 1, [if you have the NSS_InitContext function])
+          AC_SUBST(HAVE_NSS_INITCONTEXT, [1])
+        ])
+
         dnl when shared libs were found in a path that the run-time
         dnl linker doesn't search through, we need to add it to
         dnl LD_LIBRARY_PATH to prevent further configure tests to fail
         dnl due to this
-
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
-        export LD_LIBRARY_PATH
-        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
+        if test "x$cross_compiling" != "xyes"; then
+          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
+          export LD_LIBRARY_PATH
+          AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
+        fi
       fi
 
     fi
 
   fi dnl NSS not disabled
 
-fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
+fi dnl curl_ssl_msg = init_ssl_msg
+
+OPT_AXTLS=off
+
+AC_ARG_WITH(axtls,dnl
+AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local).  Ignored if another SSL engine is selected.])
+AC_HELP_STRING([--without-axtls], [disable axTLS]),
+  OPT_AXTLS=$withval)
+
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+  if test X"$OPT_AXTLS" != Xno; then
+    dnl backup the pre-axtls variables
+    CLEANLDFLAGS="$LDFLAGS"
+    CLEANCPPFLAGS="$CPPFLAGS"
+    CLEANLIBS="$LIBS"
+
+    case "$OPT_AXTLS" in
+    yes)
+      dnl --with-axtls (without path) used
+      PREFIX_AXTLS=/usr/local
+      LIB_AXTLS="$PREFIX_AXTLS/lib"
+      LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+      CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+      ;;
+    off)
+      dnl no --with-axtls option given, just check default places
+      PREFIX_AXTLS=
+      ;;
+    *)
+      dnl check the given --with-axtls spot
+      PREFIX_AXTLS=$OPT_AXTLS
+      LIB_AXTLS="$PREFIX_AXTLS/lib"
+      LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
+      CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
+      ;;
+    esac
+
+    AC_CHECK_LIB(axtls, ssl_version,[
+      LIBS="-laxtls $LIBS"
+      AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
+      AC_SUBST(USE_AXTLS, [1])
+      AXTLS_ENABLED=1
+      USE_AXTLS="yes"
+      curl_ssl_msg="enabled (axTLS)"
+
 
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
+      export LD_LIBRARY_PATH
+      AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
+      ],[
+      LDFLAGS="$CLEANLDFLAGS"
+      CPPFLAGS="$CLEANCPPFLAGS"
+      LIBS="$CLEANLIBS"
+    ])
+  fi
+fi
+
+if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
   AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
-  AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this.])
+  AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to address this.])
 else
   # SSL is enabled, genericly
   AC_SUBST(SSL_ENABLED)
@@ -1950,13 +2276,101 @@ dnl **********************************************************************
 CURL_CHECK_CA_BUNDLE
 
 dnl **********************************************************************
+dnl Check for libmetalink
+dnl **********************************************************************
+
+OPT_LIBMETALINK=no
+
+AC_ARG_WITH(libmetalink,dnl
+AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
+AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
+  OPT_LIBMETALINK=$withval)
+
+if test X"$OPT_LIBMETALINK" != Xno; then
+
+  addld=""
+  addlib=""
+  addcflags=""
+  version=""
+  libmetalinklib=""
+
+  PKGTEST="no"
+  if test "x$OPT_LIBMETALINK" = "xyes"; then
+    dnl this is with no partiular path given
+    PKGTEST="yes"
+    CURL_CHECK_PKGCONFIG(libmetalink)
+  else
+    dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
+    LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
+    AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
+    if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
+      PKGTEST="yes"
+    fi
+    if test "$PKGTEST" = "yes"; then
+      CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
+    fi
+  fi
+  if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
+    addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+      $PKGCONFIG --libs-only-l libmetalink`
+    addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+      $PKGCONFIG --libs-only-L libmetalink`
+    addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+      $PKGCONFIG --cflags-only-I libmetalink`
+    version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
+      $PKGCONFIG --modversion libmetalink`
+    libmetalinklib=`echo $addld | $SED -e 's/-L//'`
+  fi
+  if test -n "$addlib"; then
+
+    clean_CPPFLAGS="$CPPFLAGS"
+    clean_LDFLAGS="$LDFLAGS"
+    clean_LIBS="$LIBS"
+    CPPFLAGS="$addcflags $clean_CPPFLAGS"
+    LDFLAGS="$addld $clean_LDFLAGS"
+    LIBS="$addlib $clean_LIBS"
+    AC_MSG_CHECKING([if libmetalink is recent enough])
+    AC_LINK_IFELSE([
+      AC_LANG_PROGRAM([[
+#       include <metalink/metalink.h>
+      ]],[[
+        if(0 != metalink_strerror(0)) /* added in 0.1.0 */
+          return 1;
+      ]])
+    ],[
+      AC_MSG_RESULT([yes ($version)])
+      want_metalink="yes"
+    ],[
+      AC_MSG_RESULT([no ($version)])
+      AC_MSG_NOTICE([libmetalink library defective or too old])
+      want_metalink="no"
+    ])
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+    if test "$want_metalink" = "yes"; then
+      dnl finally libmetalink will be used
+      AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
+      LIBMETALINK_LIBS=$addlib
+      LIBMETALINK_LDFLAGS=$addld
+      LIBMETALINK_CPPFLAGS=$addcflags
+      AC_SUBST([LIBMETALINK_LIBS])
+      AC_SUBST([LIBMETALINK_LDFLAGS])
+      AC_SUBST([LIBMETALINK_CPPFLAGS])
+      curl_mtlnk_msg="enabled"
+    fi
+
+  fi
+fi
+
+dnl **********************************************************************
 dnl Check for the presence of LIBSSH2 libraries and headers
 dnl **********************************************************************
 
 dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
 OPT_LIBSSH2=off
 AC_ARG_WITH(libssh2,dnl
-AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
 AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
   OPT_LIBSSH2=$withval)
 
@@ -1991,6 +2405,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
 
   dnl if given with a prefix, we set -L and -I based on that
   if test -n "$PREFIX_SSH2"; then
+    LIB_SSH2="-lssh2"
     LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
     CPP_SSH2=-I${PREFIX_SSH2}/include
     DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
@@ -1998,7 +2413,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
 
   LDFLAGS="$LDFLAGS $LD_SSH2"
   CPPFLAGS="$CPPFLAGS $CPP_SSH2"
-  LIBS="$LIBS $LIB_SSH2"
+  LIBS="$LIB_SSH2 $LIBS"
 
   AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
 
@@ -2026,10 +2441,11 @@ if test X"$OPT_LIBSSH2" != Xno; then
        dnl libssh2_session_handshake was added in 1.2.8
        AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
                        libssh2_scp_send64 libssh2_session_handshake)
-
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
-       export LD_LIBRARY_PATH
-       AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
+       if test "x$cross_compiling" != "xyes"; then
+         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
+         export LD_LIBRARY_PATH
+         AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
+       fi
     fi
   else
     dnl no libssh2, revert back to clean variables
@@ -2046,7 +2462,7 @@ dnl **********************************************************************
 dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
 OPT_LIBRTMP=off
 AC_ARG_WITH(librtmp,dnl
-AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
+AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
 AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
   OPT_LIBRTMP=$withval)
 
@@ -2093,7 +2509,7 @@ if test X"$OPT_LIBRTMP" != Xno; then
 
   LDFLAGS="$LDFLAGS $LD_RTMP"
   CPPFLAGS="$CPPFLAGS $CPP_RTMP"
-  LIBS="$LIBS $LIB_RTMP"
+  LIBS="$LIB_RTMP $LIBS"
 
   AC_CHECK_LIB(rtmp, RTMP_Init,
     [
@@ -2121,98 +2537,271 @@ dnl **********************************************************************
 dnl Check for linker switch for versioned symbols
 dnl **********************************************************************
 
-AC_MSG_CHECKING([if libraries can be versioned])
-GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
-if test -z "$GLD"; then
-    versioned_symbols_flavour=
-    AC_MSG_RESULT(no)
-    AC_MSG_WARN(***
-*** You may want to rerun configure using --with-gnu-ld to enable versioned symbols.
-)
-else
-    AC_MSG_RESULT(yes)
-
-AC_MSG_CHECKING([whether versioned symbols are wanted])
 versioned_symbols_flavour=
-
+AC_MSG_CHECKING([whether versioned symbols are wanted])
 AC_ARG_ENABLE(versioned-symbols,
 AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
 AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
 [ case "$enableval" in
   yes) AC_MSG_RESULT(yes)
-          if test "$OPENSSL_ENABLED" = "1"; then
-                  versioned_symbols_flavour="OPENSSL_"
-          else
-                  if test "$OPT_GNUTLS" != "no"; then
-                          versioned_symbols_flavour="GNUTLS_"
-                  fi
-          fi
-          versioned_symbols="yes"
-          ;;
+    AC_MSG_CHECKING([if libraries can be versioned])
+    GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+    if test -z "$GLD"; then
+        AC_MSG_RESULT(no)
+        AC_MSG_WARN([You need an ld version supporting the --version-script option])
+    else
+        AC_MSG_RESULT(yes)
+        if test "x$OPENSSL_ENABLED" = "x1"; then
+          versioned_symbols_flavour="OPENSSL_"
+        elif test "x$GNUTLS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="GNUTLS_"
+        elif test "x$NSS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="NSS_"
+        elif test "x$POLARSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="POLARSSL_"
+        elif test "x$CYASSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="CYASSL_"
+        elif test "x$AXTLS_ENABLED" == "x1"; then
+          versioned_symbols_flavour="AXTLS_"
+        elif test "x$WINSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="WINSSL_"
+        elif test "x$DARWINSSL_ENABLED" == "x1"; then
+          versioned_symbols_flavour="DARWINSSL_"
+        else
+          versioned_symbols_flavour=""
+        fi
+        versioned_symbols="yes"
+    fi
+    ;;
 
   *)   AC_MSG_RESULT(no)
-          ;;
+    ;;
   esac
 ], [
 AC_MSG_RESULT(no)
 ]
 )
-fi
 
-AC_SUBST(VERSIONED_FLAVOUR, ["$versioned_symbols_flavour"])
-AM_CONDITIONAL(VERSIONED_SYMBOLS, test "$versioned_symbols" = "yes")
+AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
+  ["$versioned_symbols_flavour"])
+AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
+  [test "x$versioned_symbols" = 'xyes'])
+
+dnl -------------------------------------------------
+dnl check winidn option before other IDN libraries
+dnl -------------------------------------------------
+
+AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
+OPT_WINIDN="default"
+AC_ARG_WITH(winidn,
+AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
+AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
+  OPT_WINIDN=$withval)
+case "$OPT_WINIDN" in
+  no|default)
+    dnl --without-winidn option used or configure option not specified
+    want_winidn="no"
+    AC_MSG_RESULT([no])
+    ;;
+  yes)
+    dnl --with-winidn option used without path
+    want_winidn="yes"
+    want_winidn_path="default"
+    AC_MSG_RESULT([yes])
+    ;;
+  *)
+    dnl --with-winidn option used with path
+    want_winidn="yes"
+    want_winidn_path="$withval"
+    AC_MSG_RESULT([yes ($withval)])
+    ;;
+esac
 
+if test "$want_winidn" = "yes"; then
+  dnl winidn library support has been requested
+  clean_CPPFLAGS="$CPPFLAGS"
+  clean_LDFLAGS="$LDFLAGS"
+  clean_LIBS="$LIBS"
+  WINIDN_LIBS="-lnormaliz"
+  #
+  if test "$want_winidn_path" != "default"; then
+    dnl path has been specified
+    dnl pkg-config not available or provides no info
+    WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
+    WINIDN_CPPFLAGS="-I$want_winidn_path/include"
+    WINIDN_DIR="$want_winidn_path/lib$libsuff"
+  fi
+  #
+  CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS"
+  LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS"
+  LIBS="$WINIDN_LIBS $LIBS"
+  #
+  AC_MSG_CHECKING([if IdnToUnicode can be linked])
+  AC_LINK_IFELSE([
+    AC_LANG_FUNC_LINK_TRY([IdnToUnicode])
+  ],[
+    AC_MSG_RESULT([yes])
+    tst_links_winidn="yes"
+  ],[
+    AC_MSG_RESULT([no])
+    tst_links_winidn="no"
+  ])
+  #
+  if test "$tst_links_winidn" = "yes"; then
+    AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
+    AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
+    AC_SUBST([IDN_ENABLED], [1])
+    curl_idn_msg="enabled (Windows-native)"
+  else
+    AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+  fi
+fi
 
 dnl **********************************************************************
 dnl Check for the presence of IDN libraries and headers
 dnl **********************************************************************
 
 AC_MSG_CHECKING([whether to build with libidn])
+OPT_IDN="default"
 AC_ARG_WITH(libidn,
 AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
 AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
-  [LIBIDN="$withval"])
-
-case "$LIBIDN" in
+  [OPT_IDN=$withval])
+case "$OPT_IDN" in
   no)
-       AC_MSG_RESULT(no)
-       ;;
-  *)   AC_MSG_RESULT(yes)
-
-       idn=""
-       dnl if there is a given path, check that FIRST
-       if test -n "$LIBIDN"; then
-         if test "x$LIBIDN" != "xyes"; then
-            oldLDFLAGS=$LDFLAGS
-            oldCPPFLAGS=$CPPFLAGS
-            LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
-            CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
-            idn="yes"
-            AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
-                         idn=""
-                         LDFLAGS=$oldLDFLAGS
-                         CPPFLAGS=$oldCPPFLAGS)
-         fi
-       fi
-
-       if test "x$idn" != "xyes"; then
-          dnl check with default paths
-          idn="yes"
-          AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
-                       idn="")
-       fi
-
-       if test "x$idn" = "xyes"; then
-         curl_idn_msg="enabled"
-         AC_SUBST(IDN_ENABLED, [1])
-         dnl different versions of libidn have different setups of these:
-         AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
-         AC_CHECK_HEADERS( idn-free.h tld.h )
-       fi
-
-       ;;
+    dnl --without-libidn option used
+    want_idn="no"
+    AC_MSG_RESULT([no])
+    ;;
+  default)
+    dnl configure option not specified
+    want_idn="yes"
+    want_idn_path="default"
+    AC_MSG_RESULT([(assumed) yes])
+    ;;
+  yes)
+    dnl --with-libidn option used without path
+    want_idn="yes"
+    want_idn_path="default"
+    AC_MSG_RESULT([yes])
+    ;;
+  *)
+    dnl --with-libidn option used with path
+    want_idn="yes"
+    want_idn_path="$withval"
+    AC_MSG_RESULT([yes ($withval)])
+    ;;
 esac
 
+if test "$want_idn" = "yes"; then
+  dnl idn library support has been requested
+  clean_CPPFLAGS="$CPPFLAGS"
+  clean_LDFLAGS="$LDFLAGS"
+  clean_LIBS="$LIBS"
+  PKGCONFIG="no"
+  #
+  if test "$want_idn_path" != "default"; then
+    dnl path has been specified
+    IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
+    CURL_CHECK_PKGCONFIG(libidn, [$IDN_PCDIR])
+    if test "$PKGCONFIG" != "no"; then
+      IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+        $PKGCONFIG --libs-only-l libidn 2>/dev/null`
+      IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+        $PKGCONFIG --libs-only-L libidn 2>/dev/null`
+      IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
+        $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+      IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+    else
+      dnl pkg-config not available or provides no info
+      IDN_LIBS="-lidn"
+      IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
+      IDN_CPPFLAGS="-I$want_idn_path/include"
+      IDN_DIR="$want_idn_path/lib$libsuff"
+    fi
+  else
+    dnl path not specified
+    CURL_CHECK_PKGCONFIG(libidn)
+    if test "$PKGCONFIG" != "no"; then
+      IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
+      IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
+      IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
+      IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
+    else
+      dnl pkg-config not available or provides no info
+      IDN_LIBS="-lidn"
+    fi
+  fi
+  #
+  if test "$PKGCONFIG" != "no"; then
+    AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
+    AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
+    AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
+    AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
+  else
+    AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
+    AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
+    AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
+    AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
+  fi
+  #
+  CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
+  LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
+  LIBS="$IDN_LIBS $LIBS"
+  #
+  AC_MSG_CHECKING([if idna_to_ascii_4i can be linked])
+  AC_LINK_IFELSE([
+    AC_LANG_FUNC_LINK_TRY([idna_to_ascii_4i])
+  ],[
+    AC_MSG_RESULT([yes])
+    tst_links_libidn="yes"
+  ],[
+    AC_MSG_RESULT([no])
+    tst_links_libidn="no"
+  ])
+  if test "$tst_links_libidn" = "no"; then
+    AC_MSG_CHECKING([if idna_to_ascii_lz can be linked])
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([idna_to_ascii_lz])
+    ],[
+      AC_MSG_RESULT([yes])
+      tst_links_libidn="yes"
+    ],[
+      AC_MSG_RESULT([no])
+      tst_links_libidn="no"
+    ])
+  fi
+  #
+  if test "$tst_links_libidn" = "yes"; then
+    AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you have the `idn' library (-lidn).])
+    dnl different versions of libidn have different setups of these:
+    AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror )
+    AC_CHECK_HEADERS( idn-free.h tld.h )
+    if test "x$ac_cv_header_tld_h" = "xyes"; then
+      AC_SUBST([IDN_ENABLED], [1])
+      curl_idn_msg="enabled"
+      if test -n "$IDN_DIR"; then
+        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
+        export LD_LIBRARY_PATH
+        AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
+      fi
+    else
+      AC_MSG_WARN([Libraries for IDN support too old: IDN disabled])
+      CPPFLAGS="$clean_CPPFLAGS"
+      LDFLAGS="$clean_LDFLAGS"
+      LIBS="$clean_LIBS"
+    fi
+  else
+    AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
+    CPPFLAGS="$clean_CPPFLAGS"
+    LDFLAGS="$clean_LDFLAGS"
+    LIBS="$clean_LIBS"
+  fi
+fi
+
 
 dnl Let's hope this split URL remains working:
 dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
@@ -2271,6 +2860,7 @@ AC_CHECK_HEADERS(
         stdbool.h \
         arpa/tftp.h \
         sys/filio.h \
+        sys/wait.h \
         setjmp.h,
 dnl to do if not found
 [],
@@ -2365,6 +2955,8 @@ AC_CHECK_TYPE([bool],[
 
 CURL_CONFIGURE_CURL_SOCKLEN_T
 
+CURL_CONFIGURE_PULL_SYS_POLL
+
 TYPE_IN_ADDR_T
 
 TYPE_SOCKADDR_STORAGE
@@ -2376,7 +2968,6 @@ AC_TYPE_SIGNAL
 CURL_CHECK_FUNC_SELECT
 
 CURL_CHECK_FUNC_RECV
-CURL_CHECK_FUNC_RECVFROM
 CURL_CHECK_FUNC_SEND
 CURL_CHECK_MSG_NOSIGNAL
 
@@ -2392,6 +2983,7 @@ CURL_CHECK_FUNC_FREEIFADDRS
 CURL_CHECK_FUNC_FSETXATTR
 CURL_CHECK_FUNC_FTRUNCATE
 CURL_CHECK_FUNC_GETADDRINFO
+CURL_CHECK_FUNC_GAI_STRERROR
 CURL_CHECK_FUNC_GETHOSTBYADDR
 CURL_CHECK_FUNC_GETHOSTBYADDR_R
 CURL_CHECK_FUNC_GETHOSTBYNAME
@@ -2415,13 +3007,12 @@ CURL_CHECK_FUNC_SIGINTERRUPT
 CURL_CHECK_FUNC_SIGNAL
 CURL_CHECK_FUNC_SIGSETJMP
 CURL_CHECK_FUNC_SOCKET
+CURL_CHECK_FUNC_SOCKETPAIR
 CURL_CHECK_FUNC_STRCASECMP
-CURL_CHECK_FUNC_STRCASESTR
 CURL_CHECK_FUNC_STRCMPI
 CURL_CHECK_FUNC_STRDUP
 CURL_CHECK_FUNC_STRERROR_R
 CURL_CHECK_FUNC_STRICMP
-CURL_CHECK_FUNC_STRLCAT
 CURL_CHECK_FUNC_STRNCASECMP
 CURL_CHECK_FUNC_STRNCMPI
 CURL_CHECK_FUNC_STRNICMP
@@ -2468,7 +3059,7 @@ AC_CHECK_FUNCS([fork \
     ],[
       AC_MSG_RESULT([yes])
       eval "ac_cv_func_$func=yes"
-      AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
+      AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
         [Define to 1 if you have the $func function.])
     ],[
       AC_MSG_RESULT([but still no])
@@ -2489,10 +3080,6 @@ if test "$ipv6" = "yes"; then
   CURL_CHECK_NI_WITHSCOPEID
 fi
 
-dnl ************************************************************
-dnl enable non-blocking communications
-dnl
-CURL_CHECK_OPTION_NONBLOCKING
 CURL_CHECK_NONBLOCKING_SOCKET
 
 dnl ************************************************************
@@ -2552,7 +3139,8 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
 CURL_CHECK_LIB_ARES
 AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
 
-if test "x$enable_shared" = "xyes"; then
+if test "x$ac_cv_native_windows" != "xyes" &&
+   test "x$enable_shared" = "xyes"; then
   build_libhostname=yes
 else
   build_libhostname=no
@@ -2570,14 +3158,26 @@ if test "$want_thres" = "yes"; then
   AC_CHECK_HEADER(pthread.h,
     [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
       save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -pthread"
-      AC_CHECK_LIB(pthread, pthread_create,
-        [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
-          AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
-          USE_THREADS_POSIX=1
-          curl_res_msg="threaded"
-        ],
-        [ CFLAGS="$save_CFLAGS"])
+
+      dnl first check for function without lib
+      AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
+
+      dnl if it wasn't found without lib, search for it in pthread lib
+      if test "$USE_THREADS_POSIX" != "1"
+      then
+        CFLAGS="$CFLAGS -pthread"
+        AC_CHECK_LIB(pthread, pthread_create,
+                     [USE_THREADS_POSIX=1],
+                     [ CFLAGS="$save_CFLAGS"])
+      fi
+
+      if test "x$USE_THREADS_POSIX" = "x1"
+      then
+        AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
+        curl_res_msg="POSIX threaded"
+      fi
+
+
   ])
 fi
 
@@ -2620,10 +3220,20 @@ AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
        fi
        ;;
   *)
-       AC_MSG_RESULT(no)
+       if test "x$WINSSL_ENABLED" = "x1"; then
+         # --with-winssl implies --enable-sspi
+         AC_MSG_RESULT(yes)
+       else
+         AC_MSG_RESULT(no)
+       fi
        ;;
   esac ],
-       AC_MSG_RESULT(no)
+       if test "x$WINSSL_ENABLED" = "x1"; then
+         # --with-winssl implies --enable-sspi
+         AC_MSG_RESULT(yes)
+       else
+         AC_MSG_RESULT(no)
+       fi
 )
 
 dnl ************************************************************
@@ -2644,69 +3254,61 @@ AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
        AC_MSG_RESULT(yes)
 )
 
+CURL_CHECK_OPTION_NTLM_WB
+
+CURL_CHECK_NTLM_WB
+
 dnl ************************************************************
-dnl disable cookies support
+dnl disable TLS-SRP authentication
 dnl
-AC_MSG_CHECKING([whether to enable support for cookies])
-AC_ARG_ENABLE(cookies,
-AC_HELP_STRING([--enable-cookies],[Enable cookies support])
-AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
+AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
+AC_ARG_ENABLE(tls-srp,
+AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
+AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
+       AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
+       want_tls_srp=no
        ;;
   *)   AC_MSG_RESULT(yes)
+       want_tls_srp=yes
        ;;
   esac ],
        AC_MSG_RESULT(yes)
+       want_tls_srp=yes
 )
 
+if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
+   AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
+   USE_TLS_SRP=1
+   curl_tls_srp_msg="enabled"
+fi
+
 dnl ************************************************************
-dnl Enable hiding of internal symbols in library to reduce its size and
-dnl speed dynamic linking of applications.  This currently is only supported
-dnl on gcc >= 4.0 and SunPro C.
+dnl disable cookies support
 dnl
-AC_MSG_CHECKING([whether to enable hidden symbols in the library])
-AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
-AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
+AC_MSG_CHECKING([whether to enable support for cookies])
+AC_ARG_ENABLE(cookies,
+AC_HELP_STRING([--enable-cookies],[Enable cookies support])
+AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
 [ case "$enableval" in
   no)
        AC_MSG_RESULT(no)
+       AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
        ;;
-  *)
-       AC_MSG_CHECKING([whether $CC supports it])
-       if test "$GCC" = yes ; then
-         if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
-           dnl clang always supports -fvisibility= but it doesn't show up
-           dnl under --help.
-           test "$compiler_id" = "CLANG"; then
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
-           AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
-           CFLAGS="$CFLAGS -fvisibility=hidden"
-         else
-            AC_MSG_RESULT(no)
-          fi
-
-       else
-         dnl Test for SunPro cc
-         if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
-           AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
-           CFLAGS="$CFLAGS -xldscope=hidden"
-         else
-           AC_MSG_RESULT(no)
-         fi
-       fi
+  *)   AC_MSG_RESULT(yes)
        ;;
   esac ],
-       AC_MSG_RESULT(no)
+       AC_MSG_RESULT(yes)
 )
 
 dnl ************************************************************
+dnl hiding of library internal symbols
+dnl
+CURL_CONFIGURE_SYMBOL_HIDING
+
+dnl ************************************************************
 dnl enforce SONAME bump
 dnl
 
@@ -2726,33 +3328,21 @@ AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
 )
 AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
 
-
-dnl ************************************************************
-if test ! -z "$winsock_LIB"; then
-
-  dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
-  dnl things work when built with c-ares). But we can't just move it last
-  dnl since then other stuff (SSL) won't build. So we simply append it to the
-  dnl end.
-
-  LIBS="$LIBS $winsock_LIB"
-  TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
-
-fi
-
 dnl
 dnl All the library dependencies put into $LIB apply to libcurl only.
-dnl Those in $CURL_LIBS apply to the curl command-line client only.
-dnl Those in $TEST_SERVER_LIBS apply to test servers only.
-dnl Those in $ALL_LIBS apply to all targets, including test targets.
 dnl
 LIBCURL_LIBS=$LIBS
 
 AC_SUBST(LIBCURL_LIBS)
-AC_SUBST(CURL_LIBS)
-AC_SUBST(TEST_SERVER_LIBS)
 AC_SUBST(CURL_NETWORK_LIBS)
-LIBS=$ALL_LIBS  dnl LIBS is a magic variable that's used for every link
+AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
+
+dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
+dnl LIBS variable used in generated makefile at makefile processing
+dnl time. Doing this functionally prevents LIBS from being used for
+dnl all link targets in given makefile.
+BLANK_AT_MAKETIME=
+AC_SUBST(BLANK_AT_MAKETIME)
 
 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
 
@@ -2760,9 +3350,14 @@ dnl yes or no
 ENABLE_SHARED="$enable_shared"
 AC_SUBST(ENABLE_SHARED)
 
+dnl to let curl-config output the static libraries correctly
+ENABLE_STATIC="$enable_static"
+AC_SUBST(ENABLE_STATIC)
+
+
 dnl
 dnl For keeping supported features and protocols also in pkg-config file
-dnl since it is more cross-compile frient than curl-config
+dnl since it is more cross-compile friendly than curl-config
 dnl
 
 if test "x$USE_SSLEAY" = "x1"; then
@@ -2788,9 +3383,18 @@ fi
 if test "x$USE_WINDOWS_SSPI" = "x1"; then
   SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
 fi
-if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-    -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+if test "x$CURL_DISABLE_HTTP" != "x1"; then
+  if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
+      -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
+      -o "x$DARWINSSL_ENABLED" = "x1"; then
+    SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
+    if test "x$NTLM_WB_ENABLED" = "x1"; then
+      SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
+    fi
+  fi
+fi
+if test "x$USE_TLS_SRP" = "x1"; then
+  SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
 fi
 
 AC_SUBST(SUPPORT_FEATURES)
@@ -2876,14 +3480,15 @@ squeeze DEFS
 squeeze LDFLAGS
 squeeze LIBS
 
-squeeze CURL_LIBS
 squeeze LIBCURL_LIBS
-squeeze TEST_SERVER_LIBS
 squeeze CURL_NETWORK_LIBS
+squeeze CURL_NETWORK_AND_TIME_LIBS
 
 squeeze SUPPORT_FEATURES
 squeeze SUPPORT_PROTOCOLS
 
+XC_CHECK_BUILD_FLAGS
+
 if test "x$want_curldebug_assumed" = "xyes" &&
   test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
   ac_configure_args="$ac_configure_args --enable-curldebug"
@@ -2899,9 +3504,12 @@ AC_CONFIG_FILES([Makefile \
            lib/Makefile \
            lib/libcurl.vers \
            tests/Makefile \
+           tests/certs/Makefile \
+           tests/certs/scripts/Makefile \
            tests/data/Makefile \
            tests/server/Makefile \
            tests/libtest/Makefile \
+           tests/unit/Makefile \
            packages/Makefile \
            packages/Win32/Makefile \
            packages/Win32/cygwin/Makefile \
@@ -2923,32 +3531,37 @@ AC_OUTPUT
 
 CURL_GENERATE_CONFIGUREHELP_PM
 
+XC_AMEND_DISTCLEAN([lib src tests/unit tests/server tests/libtest docs/examples])
+
 AC_MSG_NOTICE([Configured to build curl/libcurl:
 
-  curl version:    ${VERSION}
-  Host setup:      ${host}
-  Install prefix:  ${prefix}
-  Compiler:        ${CC}
-  SSL support:     ${curl_ssl_msg}
-  SSH support:     ${curl_ssh_msg}
-  zlib support:    ${curl_zlib_msg}
-  krb4 support:    ${curl_krb4_msg}
-  GSSAPI support:  ${curl_gss_msg}
-  SPNEGO support:  ${curl_spnego_msg}
-  resolver:        ${curl_res_msg}
-  ipv6 support:    ${curl_ipv6_msg}
-  IDN support:     ${curl_idn_msg}
-  Build libcurl:   Shared=${enable_shared}, Static=${enable_static}
-  Built-in manual: ${curl_manual_msg}
-  Verbose errors:  ${curl_verbose_msg}
-  SSPI support:    ${curl_sspi_msg}
-  ca cert bundle:  ${ca}
-  ca cert path:    ${capath}
-  LDAP support:    ${curl_ldap_msg}
-  LDAPS support:   ${curl_ldaps_msg}
-  RTSP support:    ${curl_rtsp_msg}
-  RTMP support:    ${curl_rtmp_msg}
-  Protocols:       ${SUPPORT_PROTOCOLS}
+  curl version:     ${CURLVERSION}
+  Host setup:       ${host}
+  Install prefix:   ${prefix}
+  Compiler:         ${CC}
+  SSL support:      ${curl_ssl_msg}
+  SSH support:      ${curl_ssh_msg}
+  zlib support:     ${curl_zlib_msg}
+  krb4 support:     ${curl_krb4_msg}
+  GSSAPI support:   ${curl_gss_msg}
+  SPNEGO support:   ${curl_spnego_msg}
+  TLS-SRP support:  ${curl_tls_srp_msg}
+  resolver:         ${curl_res_msg}
+  ipv6 support:     ${curl_ipv6_msg}
+  IDN support:      ${curl_idn_msg}
+  Build libcurl:    Shared=${enable_shared}, Static=${enable_static}
+  Built-in manual:  ${curl_manual_msg}
+  --libcurl option: ${curl_libcurl_msg}
+  Verbose errors:   ${curl_verbose_msg}
+  SSPI support:     ${curl_sspi_msg}
+  ca cert bundle:   ${ca}
+  ca cert path:     ${capath}
+  LDAP support:     ${curl_ldap_msg}
+  LDAPS support:    ${curl_ldaps_msg}
+  RTSP support:     ${curl_rtsp_msg}
+  RTMP support:     ${curl_rtmp_msg}
+  metalink support: ${curl_mtlnk_msg}
+  Protocols:        ${SUPPORT_PROTOCOLS}
 ])
 
 if test "x$soname_bump" = "xyes"; then
diff --git a/configure.ac.orig b/configure.ac.orig
deleted file mode 100644 (file)
index 22ca6ca..0000000
+++ /dev/null
@@ -1,2916 +0,0 @@
-#***************************************************************************
-#                                  _   _ ____  _
-#  Project                     ___| | | |  _ \| |
-#                             / __| | | | |_) | |
-#                            | (__| |_| |  _ <| |___
-#                             \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2010, 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.
-#
-#***************************************************************************
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.57)
-
-dnl We don't know the version number "statically" so we use a dash here
-AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
-
-CURL_OVERRIDE_AUTOCONF
-
-dnl configure script copyright
-AC_COPYRIGHT([Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
-This configure script may be copied, distributed and modified under the
-terms of the curl license; see COPYING for more details])
-
-AC_CONFIG_SRCDIR([lib/urldata.h])
-AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
-AM_MAINTAINER_MODE
-
-CURL_CHECK_OPTION_DEBUG
-CURL_CHECK_OPTION_OPTIMIZE
-CURL_CHECK_OPTION_WARNINGS
-CURL_CHECK_OPTION_WERROR
-CURL_CHECK_OPTION_CURLDEBUG
-CURL_CHECK_OPTION_ARES
-
-CURL_CHECK_PATH_SEPARATOR_REQUIRED
-
-#
-# save the configure arguments
-#
-CONFIGURE_OPTIONS="\"$ac_configure_args\""
-AC_SUBST(CONFIGURE_OPTIONS)
-
-CURL_CFLAG_EXTRAS=""
-if test X"$want_werror" = Xyes; then
-  CURL_CFLAG_EXTRAS="-Werror"
-fi
-AC_SUBST(CURL_CFLAG_EXTRAS)
-
-dnl SED is mandatory for configure process and libtool.
-dnl Set it now, allowing it to be changed later.
-if test -z "$SED"; then
-  dnl allow it to be overridden
-  AC_PATH_PROG([SED], [sed], [not_found],
-    [$PATH:/usr/bin:/usr/local/bin])
-  if test -z "$SED" || test "$SED" = "not_found"; then
-    AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
-  fi
-fi
-AC_SUBST([SED])
-
-dnl GREP is mandatory for configure process and libtool.
-dnl Set it now, allowing it to be changed later.
-if test -z "$GREP"; then
-  dnl allow it to be overridden
-  AC_PATH_PROG([GREP], [grep], [not_found],
-    [$PATH:/usr/bin:/usr/local/bin])
-  if test -z "$GREP" || test "$GREP" = "not_found"; then
-    AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
-  fi
-fi
-AC_SUBST([GREP])
-
-dnl EGREP is mandatory for configure process and libtool.
-dnl Set it now, allowing it to be changed later.
-if test -z "$EGREP"; then
-  dnl allow it to be overridden
-  if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
-    AC_MSG_CHECKING([for egrep])
-    EGREP="$GREP -E"
-    AC_MSG_RESULT([$EGREP])
-  else
-    AC_PATH_PROG([EGREP], [egrep], [not_found],
-      [$PATH:/usr/bin:/usr/local/bin])
-  fi
-fi
-if test -z "$EGREP" || test "$EGREP" = "not_found"; then
-  AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
-fi
-AC_SUBST([EGREP])
-
-dnl AR is mandatory for configure process and libtool.
-dnl This is target dependent, so check it as a tool.
-if test -z "$AR"; then
-  dnl allow it to be overridden
-  AC_PATH_TOOL([AR], [ar], [not_found],
-    [$PATH:/usr/bin:/usr/local/bin])
-  if test -z "$AR" || test "$AR" = "not_found"; then
-    AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
-  fi
-fi
-AC_SUBST([AR])
-
-AC_SUBST(libext)
-
-dnl Remove non-configure distributed curlbuild.h
-if test -f ${srcdir}/include/curl/curlbuild.h; then
-  rm -f ${srcdir}/include/curl/curlbuild.h
-fi
-
-dnl figure out the libcurl version
-VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
-AM_INIT_AUTOMAKE(curl,$VERSION)
-AC_MSG_CHECKING([curl version])
-AC_MSG_RESULT($VERSION)
-
-dnl
-dnl we extract the numerical version for curl-config only
-VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
-AC_SUBST(VERSIONNUM)
-
-dnl Solaris pkgadd support definitions
-PKGADD_PKG="HAXXcurl"
-PKGADD_NAME="cURL - a client that groks URLs"
-PKGADD_VENDOR="curl.haxx.se"
-AC_SUBST(PKGADD_PKG)
-AC_SUBST(PKGADD_NAME)
-AC_SUBST(PKGADD_VENDOR)
-
-dnl
-dnl initialize all the info variables
-    curl_ssl_msg="no      (--with-{ssl,gnutls,nss,polarssl} )"
-    curl_ssh_msg="no      (--with-libssh2)"
-   curl_zlib_msg="no      (--with-zlib)"
-   curl_krb4_msg="no      (--with-krb4*)"
-    curl_gss_msg="no      (--with-gssapi)"
- curl_spnego_msg="no      (--with-spnego)"
-    curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
-   curl_ipv6_msg="no      (--enable-ipv6)"
-    curl_idn_msg="no      (--with-libidn)"
- curl_manual_msg="no      (--enable-manual)"
-curl_verbose_msg="enabled (--disable-verbose)"
-   curl_sspi_msg="no      (--enable-sspi)"
-   curl_ldap_msg="no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
-  curl_ldaps_msg="no      (--enable-ldaps)"
-   curl_rtsp_msg="no      (--enable-rtsp)"
-   curl_rtmp_msg="no      (--with-librtmp)"
-
-dnl
-dnl Save anything in $LIBS for later
-dnl
-ALL_LIBS=$LIBS
-
-dnl
-dnl Detect the canonical host and target build environment
-dnl
-
-AC_CANONICAL_HOST
-dnl Get system canonical name
-AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
-
-dnl Checks for programs.
-CURL_CHECK_PROG_CC
-
-dnl Our curl_off_t internal and external configure settings
-CURL_CONFIGURE_CURL_OFF_T
-
-dnl This defines _ALL_SOURCE for AIX
-CURL_CHECK_AIX_ALL_SOURCE
-
-dnl Our configure and build reentrant settings
-CURL_CONFIGURE_THREAD_SAFE
-CURL_CONFIGURE_REENTRANT
-
-dnl check for how to do large files
-AC_SYS_LARGEFILE
-
-dnl support building of Windows DLLs
-AC_LIBTOOL_WIN32_DLL
-
-dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
-AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
-case $host in
-  x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
-    AC_MSG_RESULT([yes])
-    with_pic=yes
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-esac
-
-AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
-case $CC in
-  icc | */icc)
-    AC_MSG_RESULT([yes])
-    with_pic=yes
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-esac
-
-dnl libtool setup
-AC_PROG_LIBTOOL
-
-AC_MSG_CHECKING([if we need -mimpure-text])
-mimpure=no
-case $host in
-  *-*-solaris2*)
-    if test "$GCC" = "yes"; then
-      mimpure="yes"
-    fi
-    ;;
-  *)
-    ;;
-esac
-AC_MSG_RESULT($mimpure)
-AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
-
-dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
-dnl builds on Windows
-AM_CONDITIONAL(STATICLIB, false)
-
-AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
-case $host in
-  *-*-mingw*)
-    AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
-    AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([if we need CURL_STATICLIB])
-    if test "X$enable_shared" = "Xno"
-    then
-      AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
-      AC_MSG_RESULT(yes)
-      AM_CONDITIONAL(STATICLIB, true)
-    else
-      AC_MSG_RESULT(no)
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-esac
-
-# Determine whether all dependent libraries must be specified when linking
-if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
-then
-    REQUIRE_LIB_DEPS=no
-else
-    REQUIRE_LIB_DEPS=yes
-fi
-AC_SUBST(REQUIRE_LIB_DEPS)
-
-dnl The install stuff has already been taken care of by the automake stuff
-dnl AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-dnl check if there's a way to force code inline
-AC_C_INLINE
-
-dnl **********************************************************************
-dnl platform/compiler/architecture specific checks/flags
-dnl **********************************************************************
-
-CURL_CHECK_COMPILER
-CURL_SET_COMPILER_BASIC_OPTS
-CURL_SET_COMPILER_DEBUG_OPTS
-CURL_SET_COMPILER_OPTIMIZE_OPTS
-CURL_SET_COMPILER_WARNING_OPTS
-
-if test "$compiler_id" = "INTEL_UNIX_C"; then
-  #
-  if test "$compiler_num" -ge "1000"; then
-    dnl icc 10.X or later
-    CFLAGS="$CFLAGS -shared-intel"
-  elif test "$compiler_num" -ge "900"; then
-    dnl icc 9.X specific
-    CFLAGS="$CFLAGS -i-dynamic"
-  fi
-  #
-fi
-
-CURL_CHECK_COMPILER_HALT_ON_ERROR
-CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
-
-CURL_CHECK_NO_UNDEFINED
-AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
-
-CURL_CHECK_CURLDEBUG
-AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
-
-dnl **********************************************************************
-dnl Compilation based checks should not be done before this point.
-dnl **********************************************************************
-
-dnl **********************************************************************
-dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
-dnl and ws2tcpip.h take precedence over any other further checks which
-dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
-dnl this specific header files. And do them before its results are used.
-dnl **********************************************************************
-
-CURL_CHECK_HEADER_WINDOWS
-CURL_CHECK_NATIVE_WINDOWS
-case X-"$ac_cv_native_windows" in
-  X-yes)
-    CURL_CHECK_HEADER_WINSOCK
-    CURL_CHECK_HEADER_WINSOCK2
-    CURL_CHECK_HEADER_WS2TCPIP
-    CURL_CHECK_HEADER_WINLDAP
-    CURL_CHECK_HEADER_WINBER
-    ;;
-  *)
-    ac_cv_header_winsock_h="no"
-    ac_cv_header_winsock2_h="no"
-    ac_cv_header_ws2tcpip_h="no"
-    ac_cv_header_winldap_h="no"
-    ac_cv_header_winber_h="no"
-    ;;
-esac
-CURL_CHECK_WIN32_LARGEFILE
-
-dnl ************************************************************
-dnl switch off particular protocols
-dnl
-AC_MSG_CHECKING([whether to support http])
-AC_ARG_ENABLE(http,
-AC_HELP_STRING([--enable-http],[Enable HTTP support])
-AC_HELP_STRING([--disable-http],[Disable HTTP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
-       AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
-       AC_SUBST(CURL_DISABLE_HTTP, [1])
-       AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
-       AC_SUBST(CURL_DISABLE_RTSP, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-AC_MSG_CHECKING([whether to support ftp])
-AC_ARG_ENABLE(ftp,
-AC_HELP_STRING([--enable-ftp],[Enable FTP support])
-AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
-       AC_SUBST(CURL_DISABLE_FTP, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-AC_MSG_CHECKING([whether to support file])
-AC_ARG_ENABLE(file,
-AC_HELP_STRING([--enable-file],[Enable FILE support])
-AC_HELP_STRING([--disable-file],[Disable FILE support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
-       AC_SUBST(CURL_DISABLE_FILE, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-AC_MSG_CHECKING([whether to support ldap])
-AC_ARG_ENABLE(ldap,
-AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
-AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-       AC_SUBST(CURL_DISABLE_LDAP, [1])
-       ;;
-  *)
-       AC_MSG_RESULT(yes)
-       ;;
-  esac ],[
-       AC_MSG_RESULT(yes) ]
-)
-AC_MSG_CHECKING([whether to support ldaps])
-AC_ARG_ENABLE(ldaps,
-AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
-AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-       AC_SUBST(CURL_DISABLE_LDAPS, [1])
-       ;;
-  *)   if test "x$CURL_DISABLE_LDAP" = "x1" ; then
-         AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
-         AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-         AC_SUBST(CURL_DISABLE_LDAPS, [1])
-       else
-         AC_MSG_RESULT(yes)
-         AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
-         AC_SUBST(HAVE_LDAP_SSL, [1])
-       fi
-       ;;
-  esac ],[
-       if test "x$CURL_DISABLE_LDAP" = "x1" ; then
-         AC_MSG_RESULT(no)
-         AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-         AC_SUBST(CURL_DISABLE_LDAPS, [1])
-       else
-         AC_MSG_RESULT(yes)
-         AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
-         AC_SUBST(HAVE_LDAP_SSL, [1])
-       fi ]
-)
-
-AC_MSG_CHECKING([whether to support rtsp])
-AC_ARG_ENABLE(rtsp,
-AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
-AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
-       AC_SUBST(CURL_DISABLE_RTSP, [1])
-       ;;
-  *)   if test x$CURL_DISABLE_HTTP = x1 ; then
-          AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
-       else
-          AC_MSG_RESULT(yes)
-          curl_rtsp_msg="enabled"
-       fi
-       ;;
-  esac ],
-       if test "x$CURL_DISABLE_HTTP" != "x1"; then
-          AC_MSG_RESULT(yes)
-          curl_rtsp_msg="enabled"
-       else
-          AC_MSG_RESULT(no)
-       fi
-)
-
-AC_MSG_CHECKING([whether to support proxies])
-AC_ARG_ENABLE(proxy,
-AC_HELP_STRING([--enable-proxy],[Enable proxy support])
-AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
-       AC_SUBST(CURL_DISABLE_PROXY, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-AC_MSG_CHECKING([whether to support dict])
-AC_ARG_ENABLE(dict,
-AC_HELP_STRING([--enable-dict],[Enable DICT support])
-AC_HELP_STRING([--disable-dict],[Disable DICT support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
-       AC_SUBST(CURL_DISABLE_DICT, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-AC_MSG_CHECKING([whether to support telnet])
-AC_ARG_ENABLE(telnet,
-AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
-AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
-       AC_SUBST(CURL_DISABLE_TELNET, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-AC_MSG_CHECKING([whether to support tftp])
-AC_ARG_ENABLE(tftp,
-AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
-AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
-       AC_SUBST(CURL_DISABLE_TFTP, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-AC_MSG_CHECKING([whether to support pop3])
-AC_ARG_ENABLE(pop3,
-AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
-AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
-       AC_SUBST(CURL_DISABLE_POP3, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-
-AC_MSG_CHECKING([whether to support imap])
-AC_ARG_ENABLE(imap,
-AC_HELP_STRING([--enable-imap],[Enable IMAP support])
-AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
-       AC_SUBST(CURL_DISABLE_IMAP, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-
-AC_MSG_CHECKING([whether to support smtp])
-AC_ARG_ENABLE(smtp,
-AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
-AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
-       AC_SUBST(CURL_DISABLE_SMTP, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-AC_MSG_CHECKING([whether to support gopher])
-AC_ARG_ENABLE(gopher,
-AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
-AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
-       AC_SUBST(CURL_DISABLE_GOPHER, [1])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-
-dnl **********************************************************************
-dnl Check for built-in manual
-dnl **********************************************************************
-
-AC_MSG_CHECKING([whether to provide built-in manual])
-AC_ARG_ENABLE(manual,
-AC_HELP_STRING([--enable-manual],[Enable built-in manual])
-AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       USE_MANUAL="1"
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-       USE_MANUAL="1"
-)
-dnl The actual use of the USE_MANUAL variable is done much later in this
-dnl script to allow other actions to disable it as well.
-
-dnl **********************************************************************
-dnl Checks for libraries.
-dnl **********************************************************************
-
-CURL_CHECK_LIB_XNET
-
-dnl gethostbyname without lib or in the nsl lib?
-AC_CHECK_FUNC(gethostbyname,
-              [HAVE_GETHOSTBYNAME="1"
-              ],
-              [ AC_CHECK_LIB(nsl, gethostbyname,
-                             [HAVE_GETHOSTBYNAME="1"
-                             LIBS="$LIBS -lnsl"
-                             ])
-              ])
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl gethostbyname in the socket lib?
-  AC_CHECK_LIB(socket, gethostbyname,
-               [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lsocket"
-               ])
-fi
-
-dnl At least one system has been identified to require BOTH nsl and socket
-dnl libs at the same time to link properly.
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
-  my_ac_save_LIBS=$LIBS
-  LIBS="-lnsl -lsocket $LIBS"
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-    ]],[[
-      gethostbyname();
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    HAVE_GETHOSTBYNAME="1"
-  ],[
-    AC_MSG_RESULT([no])
-    LIBS=$my_ac_save_LIBS
-  ])
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl This is for winsock systems
-  if test "$ac_cv_header_windows_h" = "yes"; then
-    if test "$ac_cv_header_winsock_h" = "yes"; then
-      case $host in
-        *-*-mingw32ce*)
-          winsock_LIB="-lwinsock"
-          ;;
-        *)
-          winsock_LIB="-lwsock32"
-          ;;
-      esac
-    fi
-    if test "$ac_cv_header_winsock2_h" = "yes"; then
-      winsock_LIB="-lws2_32"
-    fi
-    if test ! -z "$winsock_LIB"; then
-      my_ac_save_LIBS=$LIBS
-      LIBS="$winsock_LIB $LIBS"
-      AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
-      AC_LINK_IFELSE([
-        AC_LANG_PROGRAM([[
-#ifdef HAVE_WINDOWS_H
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#else
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#endif
-#endif
-        ]],[[
-          gethostbyname("www.dummysite.com");
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        HAVE_GETHOSTBYNAME="1"
-      ],[
-        AC_MSG_RESULT([no])
-        winsock_LIB=""
-        LIBS=$my_ac_save_LIBS
-      ])
-    fi
-  fi
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl This is for Minix 3.1
-  AC_MSG_CHECKING([for gethostbyname for Minix 3])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-/* Older Minix versions may need <net/gen/netdb.h> here instead */
-#include <netdb.h>
-    ]],[[
-      gethostbyname("www.dummysite.com");
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    HAVE_GETHOSTBYNAME="1"
-  ],[
-    AC_MSG_RESULT([no])
-  ])
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl This is for eCos with a stubbed DNS implementation
-  AC_MSG_CHECKING([for gethostbyname for eCos])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <netdb.h>
-    ]],[[
-      gethostbyname("www.dummysite.com");
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    HAVE_GETHOSTBYNAME="1"
-  ],[
-    AC_MSG_RESULT([no])
-  ])
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl gethostbyname in the network lib - for Haiku OS
-  AC_CHECK_LIB(network, gethostbyname,
-               [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnetwork"
-               ])
-fi
-
-if test "$HAVE_GETHOSTBYNAME" != "1"
-then
-  dnl gethostbyname in the net lib - for BeOS
-  AC_CHECK_LIB(net, gethostbyname,
-               [HAVE_GETHOSTBYNAME="1"
-               LIBS="$LIBS -lnet"
-               ])
-fi
-
-
-if test "$HAVE_GETHOSTBYNAME" != "1"; then
-  AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
-fi
-
-dnl resolve lib?
-AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
-
-if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
-  AC_CHECK_LIB(resolve, strcasecmp,
-              [LIBS="-lresolve $LIBS"],
-               ,
-               -lnsl)
-fi
-ac_cv_func_strcasecmp="no"
-
-CURL_CHECK_LIBS_CONNECT
-
-CURL_NETWORK_LIBS=$LIBS
-
-dnl **********************************************************************
-dnl In case that function clock_gettime with monotonic timer is available,
-dnl check for additional required libraries.
-dnl **********************************************************************
-CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
-
-dnl **********************************************************************
-dnl The preceding library checks are all potentially useful for test
-dnl servers (for providing networking support).  Save the list of required
-dnl libraries at this point for use while linking those test servers.
-dnl **********************************************************************
-TEST_SERVER_LIBS=$LIBS
-
-dnl **********************************************************************
-AC_MSG_CHECKING([whether to use libgcc])
-AC_ARG_ENABLE(libgcc,
-AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
-[ case "$enableval" in
-  yes)
-        ALL_LIBS="$ALL_LIBS -lgcc"
-       AC_MSG_RESULT(yes)
-       ;;
-  *)   AC_MSG_RESULT(no)
-       ;;
-  esac ],
-       AC_MSG_RESULT(no)
-)
-
-dnl **********************************************************************
-dnl Check for LDAP
-dnl **********************************************************************
-
-LDAPLIBNAME=""
-AC_ARG_WITH(ldap-lib,
-AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
- [LDAPLIBNAME="$withval"])
-
-LBERLIBNAME=""
-AC_ARG_WITH(lber-lib,
-AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
- [LBERLIBNAME="$withval"])
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
-
-  CURL_CHECK_HEADER_LBER
-  CURL_CHECK_HEADER_LDAP
-  CURL_CHECK_HEADER_LDAPSSL
-  CURL_CHECK_HEADER_LDAP_SSL
-
-  if test -z "$LDAPLIBNAME" ; then
-    if test "$ac_cv_native_windows" = "yes"; then
-      dnl Windows uses a single and unique LDAP library name
-      LDAPLIBNAME="wldap32"
-      LBERLIBNAME="no"
-    fi
-  fi
-
-  if test "$LDAPLIBNAME" ; then
-    AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
-      AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
-      AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-      AC_SUBST(CURL_DISABLE_LDAP, [1])])
-      AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-      AC_SUBST(CURL_DISABLE_LDAPS, [1])
-  else
-    dnl Try to find the right ldap libraries for this system
-    CURL_CHECK_LIBS_LDAP
-    case X-"$curl_cv_ldap_LIBS" in
-      X-unknown)
-        AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
-        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-        AC_SUBST(CURL_DISABLE_LDAP, [1])
-        AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-        AC_SUBST(CURL_DISABLE_LDAPS, [1])
-        ;;
-    esac
-  fi
-fi
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
-
-  if test "$LBERLIBNAME" ; then
-    dnl If name is "no" then don't define this library at all
-    dnl (it's only needed if libldap.so's dependencies are broken).
-    if test "$LBERLIBNAME" != "no" ; then
-      AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
-        AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
-        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-        AC_SUBST(CURL_DISABLE_LDAP, [1])])
-        AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
-        AC_SUBST(CURL_DISABLE_LDAPS, [1])
-    fi
-  fi
-fi
-
-if test x$CURL_DISABLE_LDAP != x1 ; then
-  AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
-
-  if test "$LDAPLIBNAME" = "wldap32"; then
-    curl_ldap_msg="enabled (winldap)"
-    AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
-  else
-    curl_ldap_msg="enabled (OpenLDAP)"
-    if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
-      AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
-      AC_SUBST(USE_OPENLDAP, [1])
-    fi
-  fi
-fi
-
-if test x$CURL_DISABLE_LDAPS != x1 ; then
-    curl_ldaps_msg="enabled"
-fi
-
-dnl **********************************************************************
-dnl Checks for IPv6
-dnl **********************************************************************
-
-AC_MSG_CHECKING([whether to enable ipv6])
-AC_ARG_ENABLE(ipv6,
-AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
-AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       ipv6=no
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ipv6=yes
-       ;;
-  esac ],
-
-  AC_TRY_RUN([ /* is AF_INET6 available? */
-#include <sys/types.h>
-#include <sys/socket.h>
-main()
-{
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-   exit(1);
- else
-   exit(0);
-}
-],
-  AC_MSG_RESULT(yes)
-  ipv6=yes,
-  AC_MSG_RESULT(no)
-  ipv6=no,
-  AC_MSG_RESULT(no)
-  ipv6=no
-))
-
-if test "$ipv6" = "yes"; then
-  curl_ipv6_msg="enabled"
-fi
-
-# Check if struct sockaddr_in6 have sin6_scope_id member
-if test "$ipv6" = yes; then
-  AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
-  AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <netinet/in.h>] ,
-  struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
-  if test "$have_sin6_scope_id" = yes; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
-  else
-    AC_MSG_RESULT([no])
-  fi
-fi
-
-dnl **********************************************************************
-dnl Check if the operating system allows programs to write to their own argv[]
-dnl **********************************************************************
-
-AC_MSG_CHECKING([if argv can be written to])
-AC_RUN_IFELSE([
-  AC_LANG_SOURCE([[
-int main(int argc, char ** argv) {
-    argv[0][0] = ' ';
-    return (argv[0][0] == ' ')?0:1;
-}
-  ]])
-],[
-  curl_cv_writable_argv=yes
-],[
-  curl_cv_writable_argv=no
-],[
-  curl_cv_writable_argv=cross
-])
-case $curl_cv_writable_argv in
-yes)
-        AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
-        AC_MSG_RESULT(yes)
-        ;;
-no)
-        AC_MSG_RESULT(no)
-        ;;
-*)
-        AC_MSG_RESULT(no)
-        AC_MSG_WARN([the previous check could not be made default was used])
-        ;;
-esac
-
-dnl **********************************************************************
-dnl Check for the presence of Kerberos4 libraries and headers
-dnl **********************************************************************
-
-AC_ARG_WITH(krb4-includes,
-AC_HELP_STRING([--with-krb4-includes=DIR],
-               [Specify location of kerberos4 headers]),[
- CPPFLAGS="$CPPFLAGS -I$withval"
- KRB4INC="$withval"
- want_krb4=yes
- ])
-
-AC_ARG_WITH(krb4-libs,
-AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
- LDFLAGS="$LDFLAGS -L$withval"
- KRB4LIB="$withval"
- want_krb4=yes
- ])
-
-
-OPT_KRB4=off
-AC_ARG_WITH(krb4,dnl
-AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
-  OPT_KRB4="$withval"
-  if test X"$OPT_KRB4" != Xno; then
-    want_krb4="yes"
-    if test X"$OPT_KRB4" != Xyes; then
-      LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
-      KRB4LIB="$OPT_KRB4/lib$libsuff"
-      CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
-      KRB4INC="$OPT_KRB4/include"
-    fi
-  fi
- ])
-
-AC_MSG_CHECKING([if Kerberos4 support is requested])
-
-if test "$want_krb4" = yes
-then
-  if test "$ipv6" = "yes"; then
-    echo krb4 is not compatible with IPv6
-    exit 1
-  fi
-  AC_MSG_RESULT(yes)
-
-  dnl Check for & handle argument to --with-krb4
-
-  AC_MSG_CHECKING(where to look for Kerberos4)
-  if test X"$OPT_KRB4" = Xyes
-  then
-    AC_MSG_RESULT([defaults])
-  else
-    AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
-  fi
-
-  dnl Check for DES library
-  AC_CHECK_LIB(des, des_pcbc_encrypt,
-  [
-    AC_CHECK_HEADERS(des.h)
-
-    dnl resolv lib?
-    AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
-
-    dnl Check for the Kerberos4 library
-    AC_CHECK_LIB(krb, krb_net_read,
-    [
-      dnl Check for header files
-      AC_CHECK_HEADERS(krb.h)
-
-      dnl we found the required libraries, add to LIBS
-      LIBS="-lkrb -lcom_err -ldes $LIBS"
-
-      dnl Check for function krb_get_our_ip_for_realm
-      dnl this is needed for NAT networks
-      AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
-
-      dnl add define KRB4
-      AC_DEFINE(HAVE_KRB4, 1,
-      [if you have the Kerberos4 libraries (including -ldes)])
-
-      dnl substitute it too!
-      KRB4_ENABLED=1
-      AC_SUBST(KRB4_ENABLED)
-
-      curl_krb4_msg="enabled"
-
-      dnl the krb4 stuff needs a strlcpy()
-      AC_CHECK_FUNCS(strlcpy)
-
-    ])
-  ])
-else
-  AC_MSG_RESULT(no)
-fi
-
-dnl **********************************************************************
-dnl Check for FBopenssl(SPNEGO) libraries
-dnl **********************************************************************
-
-AC_ARG_WITH(spnego,
-  AC_HELP_STRING([--with-spnego=DIR],
-                 [Specify location of SPNEGO library fbopenssl]), [
-  SPNEGO_ROOT="$withval"
-  if test x"$SPNEGO_ROOT" != xno; then
-    want_spnego="yes"
-  fi
-])
-
-AC_MSG_CHECKING([if SPNEGO support is requested])
-if test x"$want_spnego" = xyes; then
-
-  if test X"$SPNEGO_ROOT" = Xyes; then
-     AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
-     AC_MSG_RESULT(no)
-  else
-     if test -z "$SPNEGO_LIB_DIR"; then
-        LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
-     else
-        LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
-     fi
-
-     AC_MSG_RESULT(yes)
-     AC_DEFINE(HAVE_SPNEGO, 1,
-               [Define this if you have the SPNEGO library fbopenssl])
-     curl_spnego_msg="enabled"
-  fi
-else
-  AC_MSG_RESULT(no)
-fi
-
-dnl **********************************************************************
-dnl Check for GSS-API libraries
-dnl **********************************************************************
-
-dnl check for gss stuff in the /usr as default
-
-GSSAPI_ROOT="/usr"
-AC_ARG_WITH(gssapi-includes,
-  AC_HELP_STRING([--with-gssapi-includes=DIR],
-                 [Specify location of GSSAPI header]),
-  [ GSSAPI_INCS="-I$withval"
-    want_gss="yes" ]
-)
-
-AC_ARG_WITH(gssapi-libs,
-  AC_HELP_STRING([--with-gssapi-libs=DIR],
-                 [Specify location of GSSAPI libs]),
-  [ GSSAPI_LIB_DIR="-L$withval"
-    want_gss="yes" ]
-)
-
-AC_ARG_WITH(gssapi,
-  AC_HELP_STRING([--with-gssapi=DIR],
-                 [Where to look for GSSAPI]), [
-  GSSAPI_ROOT="$withval"
-  if test x"$GSSAPI_ROOT" != xno; then
-    want_gss="yes"
-    if test x"$GSSAPI_ROOT" = xyes; then
-      dnl if yes, then use default root
-      GSSAPI_ROOT="/usr"
-    fi
-  fi
-])
-
-save_CPPFLAGS="$CPPFLAGS"
-AC_MSG_CHECKING([if GSSAPI support is requested])
-if test x"$want_gss" = xyes; then
-  AC_MSG_RESULT(yes)
-
-  if test -z "$GSSAPI_INCS"; then
-     if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
-        GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
-     elif test "$GSSAPI_ROOT" != "yes"; then
-        GSSAPI_INCS="-I$GSSAPI_ROOT/include"
-     fi
-  fi
-
-  CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
-
-  AC_CHECK_HEADER(gss.h,
-    [
-      dnl found in the given dirs
-      AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
-      gnu_gss=yes
-    ],
-    [
-      dnl not found, check Heimdal or MIT
-      AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
-      AC_CHECK_HEADERS(
-        [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
-        [],
-        [not_mit=1],
-        [
-AC_INCLUDES_DEFAULT
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-        ])
-      if test "x$not_mit" = "x1"; then
-        dnl MIT not found, check for Heimdal
-        AC_CHECK_HEADER(gssapi.h,
-            [
-              dnl found
-              AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
-            ],
-            [
-              dnl no header found, disabling GSS
-              want_gss=no
-              AC_MSG_WARN(disabling GSSAPI since no header files was found)
-            ]
-          )
-      else
-        dnl MIT found
-        AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
-        dnl check if we have a really old MIT kerberos (<= 1.2)
-        AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
-        AC_COMPILE_IFELSE([
-          AC_LANG_PROGRAM([[
-#include <gssapi/gssapi.h>
-#include <gssapi/gssapi_generic.h>
-#include <gssapi/gssapi_krb5.h>
-          ]],[[
-            gss_import_name(
-                            (OM_uint32 *)0,
-                            (gss_buffer_t)0,
-                            GSS_C_NT_HOSTBASED_SERVICE,
-                            (gss_name_t *)0);
-          ]])
-        ],[
-          AC_MSG_RESULT([yes])
-        ],[
-          AC_MSG_RESULT([no])
-          AC_DEFINE(HAVE_OLD_GSSMIT, 1,
-            [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
-        ])
-      fi
-    ]
-  )
-else
-  AC_MSG_RESULT(no)
-fi
-if test x"$want_gss" = xyes; then
-  AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
-
-  curl_gss_msg="enabled (MIT/Heimdal)"
-
-  if test -n "$gnu_gss"; then
-    curl_gss_msg="enabled (GNU GSS)"
-    LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-    LIBS="$LIBS -lgss"
-  elif test -z "$GSSAPI_LIB_DIR"; then
-     case $host in
-     *-*-darwin*)
-        LIBS="$LIBS -lgssapi_krb5 -lresolv"
-        ;;
-     *)
-        if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
-           dnl krb5-config doesn't have --libs-only-L or similar, put everything
-           dnl into LIBS
-           gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
-           # LIBS="$LIBS $gss_libs"
-          LIBS="$LIBS -lgssapi_krb5"
-        elif test "$GSSAPI_ROOT" != "yes"; then
-           LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
-           LIBS="$LIBS -lgssapi"
-        else
-           LIBS="$LIBS -lgssapi"
-        fi
-        ;;
-     esac
-  else
-     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
-     LIBS="$LIBS -lgssapi"
-  fi
-else
-  CPPFLAGS="$save_CPPFLAGS"
-fi
-
-dnl **********************************************************************
-dnl Check for the presence of SSL libraries and headers
-dnl **********************************************************************
-
-dnl Default to compiler & linker defaults for SSL files & libraries.
-OPT_SSL=off
-dnl Default to no CA bundle
-ca="no"
-AC_ARG_WITH(ssl,dnl
-AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
-  OPT_SSL=$withval)
-
-if test X"$OPT_SSL" != Xno; then
-  dnl backup the pre-ssl variables
-  CLEANLDFLAGS="$LDFLAGS"
-  CLEANCPPFLAGS="$CPPFLAGS"
-  CLEANLIBS="$LIBS"
-
-  case "$OPT_SSL" in
-  yes)
-    dnl --with-ssl (without path) used
-    if test x$cross_compiling != xyes; then
-      dnl only do pkg-config magic when not cross-compiling
-      PKGTEST="yes"
-    fi
-    PREFIX_OPENSSL=/usr/local/ssl
-    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    ;;
-  off)
-    dnl no --with-ssl option given, just check default places
-    if test x$cross_compiling != xyes; then
-      dnl only do pkg-config magic when not cross-compiling
-      PKGTEST="yes"
-    fi
-    PREFIX_OPENSSL=
-    ;;
-  *)
-    dnl check the given --with-ssl spot
-    PKGTEST="no"
-    PREFIX_OPENSSL=$OPT_SSL
-
-    dnl Try pkg-config even when cross-compiling.  Since we
-    dnl specify PKG_CONFIG_LIBDIR we're only looking where
-    dnl the user told us to look
-    OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
-    AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
-    if test -e "$OPENSSL_PCDIR/openssl.pc"; then
-      PKGTEST="yes"
-    fi
-
-    dnl in case pkg-config comes up empty, use what we got
-    dnl via --with-ssl
-    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
-    if test "$PREFIX_OPENSSL" != "/usr" ; then
-      SSL_LDFLAGS="-L$LIB_OPENSSL"
-      SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
-    fi
-    SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
-    ;;
-  esac
-
-  if test "$PKGTEST" = "yes"; then
-
-    CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
-
-    if test "$PKGCONFIG" != "no" ; then
-      SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --libs-only-l openssl 2>/dev/null`
-
-      SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
-      SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
-        $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
-      AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
-      AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
-      AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
-
-      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
-
-      dnl use the values pkg-config reported.  This is here
-      dnl instead of below with CPPFLAGS and LDFLAGS because we only
-      dnl learn about this via pkg-config.  If we only have
-      dnl the argument to --with-ssl we don't know what
-      dnl additional libs may be necessary.  Hope that we
-      dnl don't need any.
-      LIBS="$LIBS $SSL_LIBS"
-    fi
-  fi
-
-  dnl finally, set flags to use SSL
-  CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
-  LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
-  dnl This is for Msys/Mingw
-  case $host in
-    *-*-msys* | *-*-mingw*)
-      AC_MSG_CHECKING([for gdi32])
-      my_ac_save_LIBS=$LIBS
-      LIBS="-lgdi32 $LIBS"
-      AC_TRY_LINK([#include <windef.h>
-                   #include <wingdi.h>],
-                   [GdiFlush();],
-                   [ dnl worked!
-                   AC_MSG_RESULT([yes])],
-                   [ dnl failed, restore LIBS
-                   LIBS=$my_ac_save_LIBS
-                   AC_MSG_RESULT(no)]
-                  )
-      ;;
-  esac
-
-  AC_CHECK_LIB(crypto, CRYPTO_lock,[
-     HAVECRYPTO="yes"
-     LIBS="-lcrypto $LIBS"
-     ],[
-     LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
-     AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
-       HAVECRYPTO="yes"
-       LIBS="-lcrypto $LIBS"], [
-       LDFLAGS="$CLEANLDFLAGS"
-       CPPFLAGS="$CLEANCPPFLAGS"
-       LIBS="$CLEANLIBS"
-       ])
-    ])
-
-
-  if test X"$HAVECRYPTO" = X"yes"; then
-    dnl This is only reasonable to do if crypto actually is there: check for
-    dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
-
-    AC_CHECK_LIB(ssl, SSL_connect)
-
-    if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-        dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
-        AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
-        OLIBS=$LIBS
-        LIBS="$LIBS -lRSAglue -lrsaref"
-        AC_CHECK_LIB(ssl, SSL_connect)
-        if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
-            dnl still no SSL_connect
-            AC_MSG_RESULT(no)
-            LIBS=$OLIBS
-        else
-            AC_MSG_RESULT(yes)
-        fi
-
-    else
-
-      dnl Have the libraries--check for SSLeay/OpenSSL headers
-      AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
-                       openssl/pem.h openssl/ssl.h openssl/err.h,
-        curl_ssl_msg="enabled (OpenSSL)"
-        OPENSSL_ENABLED=1
-        AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
-
-      if test $ac_cv_header_openssl_x509_h = no; then
-        dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
-        dnl since 'err.h' might in fact find a krb4 header with the same
-        dnl name
-        AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
-
-        if test $ac_cv_header_x509_h = yes &&
-           test $ac_cv_header_crypto_h = yes &&
-           test $ac_cv_header_ssl_h = yes; then
-          dnl three matches
-          curl_ssl_msg="enabled (OpenSSL)"
-          OPENSSL_ENABLED=1
-        fi
-      fi
-    fi
-
-    if test X"$OPENSSL_ENABLED" = X"1"; then
-       AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
-
-       dnl is there a pkcs12.h header present?
-       AC_CHECK_HEADERS(openssl/pkcs12.h)
-    else
-       LIBS="$CLEANLIBS"
-    fi
-    dnl USE_SSLEAY is the historical name for what configure calls
-    dnl OPENSSL_ENABLED; the names should really be unified
-    USE_SSLEAY="$OPENSSL_ENABLED"
-    AC_SUBST(USE_SSLEAY)
-
-    if test X"$OPT_SSL" != Xoff &&
-       test "$OPENSSL_ENABLED" != "1"; then
-      AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
-    fi
-  fi
-
-  if test X"$OPENSSL_ENABLED" = X"1"; then
-    dnl If the ENGINE library seems to be around, check for the OpenSSL engine
-    dnl stuff, it is kind of "separated" from the main SSL check
-    AC_CHECK_FUNC(ENGINE_init,
-              [
-                AC_CHECK_HEADERS(openssl/engine.h)
-                AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
-              ])
-
-    dnl these can only exist if openssl exists
-    dnl yassl doesn't have SSL_get_shutdown
-
-    AC_CHECK_FUNCS( RAND_status \
-                    RAND_screen \
-                    RAND_egd \
-                    ENGINE_cleanup \
-                    CRYPTO_cleanup_all_ex_data \
-                    SSL_get_shutdown )
-
-    dnl Make an attempt to detect if this is actually yassl's headers and
-    dnl OpenSSL emulation layer. We still leave everything else believing
-    dnl and acting like OpenSSL.
-
-    AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <openssl/ssl.h>
-      ]],[[
-#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
-        int dummy = SSL_ERROR_NONE;
-#else
-        Not the yaSSL OpenSSL compatibility header.
-#endif
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
-        [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
-      curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
-    ],[
-      AC_MSG_RESULT([no])
-    ])
-  fi
-
-  if test "$OPENSSL_ENABLED" = "1"; then
-    if test -n "$LIB_OPENSSL"; then
-       dnl when the ssl shared libs were found in a path that the run-time
-       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
-       dnl to prevent further configure tests to fail due to this
-
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
-       export LD_LIBRARY_PATH
-       AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
-    fi
-  fi
-
-fi
-
-dnl **********************************************************************
-dnl Check for the presence of ZLIB libraries and headers
-dnl **********************************************************************
-
-dnl Check for & handle argument to --with-zlib.
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(zlib,
-AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
-AC_HELP_STRING([--without-zlib],[disable use of zlib]),
-               [OPT_ZLIB="$withval"])
-
-if test "$OPT_ZLIB" = "no" ; then
-    AC_MSG_WARN([zlib disabled])
-else
-  if test "$OPT_ZLIB" = "yes" ; then
-     OPT_ZLIB=""
-  fi
-
-  if test -z "$OPT_ZLIB" ; then
-    dnl check for the lib first without setting any new path, since many
-    dnl people have it in the default path
-
-    AC_CHECK_LIB(z, inflateEnd,
-                   dnl libz found, set the variable
-                   [HAVE_LIBZ="1"],
-                   dnl if no lib found, try /usr/local
-                   [OPT_ZLIB="/usr/local"])
-
-  fi
-
-  dnl Add a nonempty path to the compiler flags
-  if test -n "$OPT_ZLIB"; then
-     CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
-     LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
-  fi
-
-  AC_CHECK_HEADER(zlib.h,
-    [
-    dnl zlib.h was found
-    HAVE_ZLIB_H="1"
-    dnl if the lib wasn't found already, try again with the new paths
-    if test "$HAVE_LIBZ" != "1"; then
-      AC_CHECK_LIB(z, gzread,
-                   [
-                   dnl the lib was found!
-                   HAVE_LIBZ="1"
-                   ],
-                   [ CPPFLAGS=$_cppflags
-                   LDFLAGS=$_ldflags])
-    fi
-    ],
-    [
-      dnl zlib.h was not found, restore the flags
-      CPPFLAGS=$_cppflags
-      LDFLAGS=$_ldflags]
-    )
-
-  if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
-  then
-    AC_MSG_WARN([configure found only the libz lib, not the header file!])
-    HAVE_LIBZ=""
-  elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
-  then
-    AC_MSG_WARN([configure found only the libz header file, not the lib!])
-  elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
-  then
-    dnl both header and lib were found!
-    AC_SUBST(HAVE_LIBZ)
-    AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
-    AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
-
-    CURL_LIBS="$CURL_LIBS -lz"
-    LIBS="$LIBS -lz"
-
-    dnl replace 'HAVE_LIBZ' in the automake makefile.ams
-    AMFIXLIB="1"
-    AC_MSG_NOTICE([found both libz and libz.h header])
-    curl_zlib_msg="enabled"
-  fi
-fi
-
-dnl set variable for use in automakefile(s)
-AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
-
-dnl **********************************************************************
-dnl Check for the random seed preferences
-dnl **********************************************************************
-
-if test X"$OPENSSL_ENABLED" = X"1"; then
-  AC_ARG_WITH(egd-socket,
-  AC_HELP_STRING([--with-egd-socket=FILE],
-                 [Entropy Gathering Daemon socket pathname]),
-      [ EGD_SOCKET="$withval" ]
-  )
-  if test -n "$EGD_SOCKET" ; then
-          AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
-          [your Entropy Gathering Daemon socket pathname] )
-  fi
-
-  dnl Check for user-specified random device
-  AC_ARG_WITH(random,
-  AC_HELP_STRING([--with-random=FILE],
-                 [read randomness from FILE (default=/dev/urandom)]),
-      [ RANDOM_FILE="$withval" ],
-      [
-          dnl Check for random device
-          AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
-      ]
-  )
-  if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
-          AC_SUBST(RANDOM_FILE)
-          AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
-          [a suitable file to read random data from])
-  fi
-fi
-
-dnl ----------------------------------------------------
-dnl check for GnuTLS
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for GnuTLS files & libraries.
-OPT_GNUTLS=no
-
-AC_ARG_WITH(gnutls,dnl
-AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
-AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
-  OPT_GNUTLS=$withval)
-
-if test "$OPENSSL_ENABLED" != "1"; then
-
-  if test X"$OPT_GNUTLS" != Xno; then
-
-    addld=""
-    if test "x$OPT_GNUTLS" = "xyes"; then
-      dnl this is with no partiular path given
-      CURL_CHECK_PKGCONFIG(gnutls)
-
-      if test "$PKGCONFIG" != "no" ; then
-        addlib=`$PKGCONFIG --libs-only-l gnutls`
-        addld=`$PKGCONFIG --libs-only-L gnutls`
-        addcflags=`$PKGCONFIG --cflags-only-I gnutls`
-        version=`$PKGCONFIG --modversion gnutls`
-        gtlslib=`echo $addld | $SED -e 's/-L//'`
-      else
-        dnl without pkg-config, we try libgnutls-config as that was how it
-        dnl used to be done
-        check=`libgnutls-config --version 2>/dev/null`
-        if test -n "$check"; then
-          addlib=`libgnutls-config --libs`
-          addcflags=`libgnutls-config --cflags`
-          version=`libgnutls-config --version`
-          gtlslib=`libgnutls-config --prefix`/lib$libsuff
-        fi
-      fi
-    else
-      dnl this is with a given path, first check if there's a libgnutls-config
-      dnl there and if not, make an educated guess
-      cfg=$OPT_GNUTLS/bin/libgnutls-config
-      check=`$cfg --version 2>/dev/null`
-      if test -n "$check"; then
-        addlib=`$cfg --libs`
-        addcflags=`$cfg --cflags`
-        version=`$cfg --version`
-        gtlslib=`$cfg --prefix`/lib$libsuff
-      else
-        dnl without pkg-config and libgnutls-config, we guess a lot!
-        addlib=-lgnutls
-        addld=-L$OPT_GNUTLS/lib$libsuff
-        addcflags=-I$OPT_GNUTLS/include
-        version="" # we just don't know
-        gtlslib=$OPT_GNUTLS/lib$libsuff
-      fi
-    fi
-
-    if test -z "$version"; then
-      dnl lots of efforts, still no go
-      version="unknown"
-    fi
-
-    if test -n "$addlib"; then
-
-      CLEANLIBS="$LIBS"
-      CLEANCPPFLAGS="$CPPFLAGS"
-      CLEADLDFLAGS="$LDFLAGS"
-
-      LIBS="$LIBS $addlib"
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(gnutls, gnutls_check_version,
-       [
-       AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
-       AC_SUBST(USE_GNUTLS, [1])
-       GNUTLS_ENABLED=1
-       USE_GNUTLS="yes"
-       curl_ssl_msg="enabled (GnuTLS)"
-       ],
-       [
-         LIBS="$CLEANLIBS"
-         CPPFLAGS="$CLEANCPPFLAGS"
-       ])
-
-      if test "x$USE_GNUTLS" = "xyes"; then
-        AC_MSG_NOTICE([detected GnuTLS version $version])
-
-        if test -n "$gtlslib"; then
-          dnl when shared libs were found in a path that the run-time
-          dnl linker doesn't search through, we need to add it to
-          dnl LD_LIBRARY_PATH to prevent further configure tests to fail
-          dnl due to this
-
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
-          export LD_LIBRARY_PATH
-          AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
-        fi
-      fi
-
-    fi
-
-  fi dnl GNUTLS not disabled
-
-fi dnl OPENSSL != 1
-
-dnl ---
-dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since
-dnl curl code relies on that but recent GnuTLS versions can in fact build
-dnl with different crypto libraries which curl right now cannot handle
-dnl ---
-
-if test "$GNUTLS_ENABLED" = "1"; then
-  AC_CHECK_LIB(gcrypt,
-               gcry_control, ,
-    [
-      AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS])
-    ])
-fi
-
-dnl ----------------------------------------------------
-dnl check for PolarSSL
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for PolarSSL files & libraries.
-OPT_POLARSSL=no
-
-_cppflags=$CPPFLAGS
-_ldflags=$LDFLAGS
-AC_ARG_WITH(polarssl,dnl
-AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
-AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
-  OPT_POLARSSL=$withval)
-
-if test "$OPENSSL_ENABLED" != "1"; then
-
-  if test X"$OPT_POLARSSL" != Xno; then
-
-    if test "$OPT_POLARSSL" = "yes"; then
-      OPT_POLARSSL=""
-    fi
-
-    if test -z "$OPT_POLARSSL" ; then
-      dnl check for lib first without setting any new path
-
-      AC_CHECK_LIB(polarssl, havege_init,
-      dnl libpolarssl found, set the variable
-       [
-         AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
-         AC_SUBST(USE_POLARSSL, [1])
-         POLARSSL_ENABLED=1
-         USE_POLARSSL="yes"
-         curl_ssl_msg="enabled (PolarSSL)"
-        ])
-    fi
-
-    if test "x$USE_POLARSSL" != "xyes"; then
-      dnl add the path and test again
-      addld=-L$OPT_POLARSSL/lib$libsuff
-      addcflags=-I$OPT_POLARSSL/include
-      polarssllib=$OPT_POLARSSL/lib$libsuff
-
-      LDFLAGS="$LDFLAGS $addld"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(polarssl, ssl_init,
-       [
-       AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
-       AC_SUBST(USE_POLARSSL, [1])
-       POLARSSL_ENABLED=1
-       USE_POLARSSL="yes"
-       curl_ssl_msg="enabled (PolarSSL)"
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ])
-    fi
-
-    if test "x$USE_POLARSSL" = "xyes"; then
-      AC_MSG_NOTICE([detected PolarSSL])
-
-      CURL_LIBS="$CURL_LIBS -lpolarssl"
-      LIBS="$LIBS -lpolarssl"
-
-      if test -n "$polarssllib"; then
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
-        export LD_LIBRARY_PATH
-        AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
-      fi
-
-    fi
-
-  fi dnl PolarSSL not disabled
-
-fi dnl OPENSSL != 1
-
-dnl ----------------------------------------------------
-dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
-dnl ----------------------------------------------------
-
-dnl Default to compiler & linker defaults for NSS files & libraries.
-OPT_NSS=no
-
-AC_ARG_WITH(nss,dnl
-AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)])
-AC_HELP_STRING([--without-nss], [disable NSS detection]),
-  OPT_NSS=$withval)
-
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
-
-  if test X"$OPT_NSS" != Xno; then
-    if test "x$OPT_NSS" = "xyes"; then
-
-      CURL_CHECK_PKGCONFIG(nss)
-
-      if test "$PKGCONFIG" != "no" ; then
-        addlib=`$PKGCONFIG --libs nss`
-        addcflags=`$PKGCONFIG --cflags nss`
-        version=`$PKGCONFIG --modversion nss`
-        nssprefix=`$PKGCONFIG --variable=prefix nss`
-      else
-        dnl Without pkg-config, we check for nss-config
-
-        check=`nss-config --version 2>/dev/null`
-        if test -n "$check"; then
-          addlib=`nss-config --libs`
-          addcflags=`nss-config --cflags`
-          version=`nss-config --version`
-          nssprefix=`nss-config --prefix`
-        else
-          addlib="-lnss3"
-          addcflags=""
-          version="unknown"
-        fi
-      fi
-    else
-        # Without pkg-config, we'll kludge in some defaults
-        addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
-        addcflags="-I$OPT_NSS/include"
-        version="unknown"
-        nssprefix=$OPT_NSS
-    fi
-
-    dnl Check for functionPK11_CreateGenericObject
-    dnl this is needed for using the PEM PKCS#11 module
-    AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
-     [
-     AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject])
-     AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1])
-     ])
-    if test -n "$addlib"; then
-
-      CLEANLIBS="$LIBS"
-      CLEANCPPFLAGS="$CPPFLAGS"
-
-      LIBS="$LIBS $addlib"
-      if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-      fi
-
-      AC_CHECK_LIB(nss3, NSS_Initialize,
-       [
-       AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
-       AC_SUBST(USE_NSS, [1])
-       USE_NSS="yes"
-       NSS_ENABLED=1
-       curl_ssl_msg="enabled (NSS)"
-       ],
-       [
-         LIBS="$CLEANLIBS"
-         CPPFLAGS="$CLEANCPPFLAGS"
-       ])
-
-      if test "x$USE_NSS" = "xyes"; then
-        AC_MSG_NOTICE([detected NSS version $version])
-
-        dnl when shared libs were found in a path that the run-time
-        dnl linker doesn't search through, we need to add it to
-        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
-        dnl due to this
-
-        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
-        export LD_LIBRARY_PATH
-        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
-      fi
-
-    fi
-
-  fi dnl NSS not disabled
-
-fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
-
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
-  AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
-  AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this.])
-else
-  # SSL is enabled, genericly
-  AC_SUBST(SSL_ENABLED)
-  SSL_ENABLED="1"
-fi
-
-dnl **********************************************************************
-dnl Check for the CA bundle
-dnl **********************************************************************
-
-CURL_CHECK_CA_BUNDLE
-
-dnl **********************************************************************
-dnl Check for the presence of LIBSSH2 libraries and headers
-dnl **********************************************************************
-
-dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
-OPT_LIBSSH2=off
-AC_ARG_WITH(libssh2,dnl
-AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
-  OPT_LIBSSH2=$withval)
-
-if test X"$OPT_LIBSSH2" != Xno; then
-  dnl backup the pre-libssh2 variables
-  CLEANLDFLAGS="$LDFLAGS"
-  CLEANCPPFLAGS="$CPPFLAGS"
-  CLEANLIBS="$LIBS"
-
-  case "$OPT_LIBSSH2" in
-  yes)
-    dnl --with-libssh2 (without path) used
-    CURL_CHECK_PKGCONFIG(libssh2)
-
-    if test "$PKGCONFIG" != "no" ; then
-      LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
-      LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
-      CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
-      version=`$PKGCONFIG --modversion libssh2`
-      DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
-    fi
-
-    ;;
-  off)
-    dnl no --with-libssh2 option given, just check default places
-    ;;
-  *)
-    dnl use the given --with-libssh2 spot
-    PREFIX_SSH2=$OPT_LIBSSH2
-    ;;
-  esac
-
-  dnl if given with a prefix, we set -L and -I based on that
-  if test -n "$PREFIX_SSH2"; then
-    LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
-    CPP_SSH2=-I${PREFIX_SSH2}/include
-    DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
-  fi
-
-  LDFLAGS="$LDFLAGS $LD_SSH2"
-  CPPFLAGS="$CPPFLAGS $CPP_SSH2"
-  LIBS="$LIBS $LIB_SSH2"
-
-  AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
-
-  AC_CHECK_HEADERS(libssh2.h,
-    curl_ssh_msg="enabled (libSSH2)"
-    LIBSSH2_ENABLED=1
-    AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
-    AC_SUBST(USE_LIBSSH2, [1])
-  )
-
-  if test X"$OPT_LIBSSH2" != Xoff &&
-     test "$LIBSSH2_ENABLED" != "1"; then
-    AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
-  fi
-
-  if test "$LIBSSH2_ENABLED" = "1"; then
-    if test -n "$DIR_SSH2"; then
-       dnl when the libssh2 shared libs were found in a path that the run-time
-       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
-       dnl to prevent further configure tests to fail due to this
-
-       dnl libssh2_version is a post 1.0 addition
-       dnl libssh2_init and libssh2_exit were added in 1.2.5
-       dnl libssh2_scp_send64 was added in 1.2.6
-       dnl libssh2_session_handshake was added in 1.2.8
-       AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
-                       libssh2_scp_send64 libssh2_session_handshake)
-
-       LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
-       export LD_LIBRARY_PATH
-       AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
-    fi
-  else
-    dnl no libssh2, revert back to clean variables
-    LDFLAGS=$CLEANLDFLAGS
-    CPPFLAGS=$CLEANCPPFLAGS
-    LIBS=$CLEANLIBS
-  fi
-fi
-
-dnl **********************************************************************
-dnl Check for the presence of LIBRTMP libraries and headers
-dnl **********************************************************************
-
-dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
-OPT_LIBRTMP=off
-AC_ARG_WITH(librtmp,dnl
-AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
-  OPT_LIBRTMP=$withval)
-
-if test X"$OPT_LIBRTMP" != Xno; then
-  dnl backup the pre-librtmp variables
-  CLEANLDFLAGS="$LDFLAGS"
-  CLEANCPPFLAGS="$CPPFLAGS"
-  CLEANLIBS="$LIBS"
-
-  case "$OPT_LIBRTMP" in
-  yes)
-    dnl --with-librtmp (without path) used
-    CURL_CHECK_PKGCONFIG(librtmp)
-
-    if test "$PKGCONFIG" != "no" ; then
-      LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
-      LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
-      CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
-      version=`$PKGCONFIG --modversion librtmp`
-      DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
-    else
-      dnl To avoid link errors, we do not allow --librtmp without
-      dnl a pkgconfig file
-      AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
-    fi
-
-    ;;
-  off)
-    dnl no --with-librtmp option given, just check default places
-    LIB_RTMP="-lrtmp"
-    ;;
-  *)
-    dnl use the given --with-librtmp spot
-    PREFIX_RTMP=$OPT_LIBRTMP
-    ;;
-  esac
-
-  dnl if given with a prefix, we set -L and -I based on that
-  if test -n "$PREFIX_RTMP"; then
-    LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
-    CPP_RTMP=-I${PREFIX_RTMP}/include
-    DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
-  fi
-
-  LDFLAGS="$LDFLAGS $LD_RTMP"
-  CPPFLAGS="$CPPFLAGS $CPP_RTMP"
-  LIBS="$LIBS $LIB_RTMP"
-
-  AC_CHECK_LIB(rtmp, RTMP_Init,
-    [
-     AC_CHECK_HEADERS(librtmp/rtmp.h,
-        curl_rtmp_msg="enabled (librtmp)"
-        LIBRTMP_ENABLED=1
-        AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
-        AC_SUBST(USE_LIBRTMP, [1])
-     )
-    ],
-      dnl not found, revert back to clean variables
-      LDFLAGS=$CLEANLDFLAGS
-      CPPFLAGS=$CLEANCPPFLAGS
-      LIBS=$CLEANLIBS
-  )
-
-  if test X"$OPT_LIBRTMP" != Xoff &&
-     test "$LIBRTMP_ENABLED" != "1"; then
-    AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
-  fi
-
-fi
-
-dnl **********************************************************************
-dnl Check for the presence of IDN libraries and headers
-dnl **********************************************************************
-
-AC_MSG_CHECKING([whether to build with libidn])
-AC_ARG_WITH(libidn,
-AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
-AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
-  [LIBIDN="$withval"])
-
-case "$LIBIDN" in
-  no)
-       AC_MSG_RESULT(no)
-       ;;
-  *)   AC_MSG_RESULT(yes)
-
-       idn=""
-       dnl if there is a given path, check that FIRST
-       if test -n "$LIBIDN"; then
-         if test "x$LIBIDN" != "xyes"; then
-            oldLDFLAGS=$LDFLAGS
-            oldCPPFLAGS=$CPPFLAGS
-            LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
-            CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
-            idn="yes"
-            AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
-                         idn=""
-                         LDFLAGS=$oldLDFLAGS
-                         CPPFLAGS=$oldCPPFLAGS)
-         fi
-       fi
-
-       if test "x$idn" != "xyes"; then
-          dnl check with default paths
-          idn="yes"
-          AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
-                       idn="")
-       fi
-
-       if test "x$idn" = "xyes"; then
-         curl_idn_msg="enabled"
-         AC_SUBST(IDN_ENABLED, [1])
-         dnl different versions of libidn have different setups of these:
-         AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
-         AC_CHECK_HEADERS( idn-free.h tld.h )
-       fi
-
-       ;;
-esac
-
-
-dnl Let's hope this split URL remains working:
-dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
-dnl genprogc/thread_quick_ref.htm
-
-
-dnl **********************************************************************
-dnl Back to "normal" configuring
-dnl **********************************************************************
-
-dnl Checks for header files.
-AC_HEADER_STDC
-
-CURL_CHECK_HEADER_MALLOC
-CURL_CHECK_HEADER_MEMORY
-
-dnl Now check for the very most basic headers. Then we can use these
-dnl ones as default-headers when checking for the rest!
-AC_CHECK_HEADERS(
-        sys/types.h \
-        sys/time.h \
-        sys/select.h \
-        sys/socket.h \
-        sys/ioctl.h \
-        sys/uio.h \
-        assert.h \
-        unistd.h \
-        stdlib.h \
-        limits.h \
-        arpa/inet.h \
-        net/if.h \
-        netinet/in.h \
-        sys/un.h \
-        netinet/tcp.h \
-        netdb.h \
-        sys/sockio.h \
-        sys/stat.h \
-        sys/param.h \
-        termios.h \
-        termio.h \
-        sgtty.h \
-        fcntl.h \
-        alloca.h \
-        time.h \
-        io.h \
-        pwd.h \
-        utime.h \
-        sys/utime.h \
-        sys/poll.h \
-        poll.h \
-        socket.h \
-        sys/resource.h \
-        libgen.h \
-        locale.h \
-        errno.h \
-        stdbool.h \
-        arpa/tftp.h \
-        sys/filio.h \
-        setjmp.h,
-dnl to do if not found
-[],
-dnl to do if found
-[],
-dnl default includes
-[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-]
-)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-CURL_CHECK_VARIADIC_MACROS
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-CURL_CHECK_STRUCT_TIMEVAL
-CURL_VERIFY_RUNTIMELIBS
-
-AC_CHECK_SIZEOF(size_t)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(short)
-CURL_CONFIGURE_LONG
-AC_CHECK_SIZEOF(time_t)
-AC_CHECK_SIZEOF(off_t)
-
-soname_bump=no
-if test x"$ac_cv_native_windows" != "xyes" &&
-   test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
-  AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
-  AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
-  soname_bump=yes
-fi
-
-
-AC_CHECK_TYPE(long long,
-   [AC_DEFINE(HAVE_LONGLONG, 1,
-      [Define to 1 if the compiler supports the 'long long' data type.])]
-   longlong="yes"
-)
-
-if test "xyes" = "x$longlong"; then
-  AC_MSG_CHECKING([if numberLL works])
-  AC_COMPILE_IFELSE([
-    AC_LANG_PROGRAM([[
-    ]],[[
-      long long val = 1000LL;
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
-  ],[
-    AC_MSG_RESULT([no])
-  ])
-fi
-
-
-# check for ssize_t
-AC_CHECK_TYPE(ssize_t, ,
-   AC_DEFINE(ssize_t, int, [the signed version of size_t]))
-
-# check for bool type
-AC_CHECK_TYPE([bool],[
-  AC_DEFINE(HAVE_BOOL_T, 1,
-    [Define to 1 if bool is an available type.])
-], ,[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-])
-
-CURL_CONFIGURE_CURL_SOCKLEN_T
-
-TYPE_IN_ADDR_T
-
-TYPE_SOCKADDR_STORAGE
-
-TYPE_SIG_ATOMIC_T
-
-AC_TYPE_SIGNAL
-
-CURL_CHECK_FUNC_SELECT
-
-CURL_CHECK_FUNC_RECV
-CURL_CHECK_FUNC_RECVFROM
-CURL_CHECK_FUNC_SEND
-CURL_CHECK_MSG_NOSIGNAL
-
-CURL_CHECK_FUNC_ALARM
-CURL_CHECK_FUNC_BASENAME
-CURL_CHECK_FUNC_CLOSESOCKET
-CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
-CURL_CHECK_FUNC_CONNECT
-CURL_CHECK_FUNC_FCNTL
-CURL_CHECK_FUNC_FDOPEN
-CURL_CHECK_FUNC_FREEADDRINFO
-CURL_CHECK_FUNC_FREEIFADDRS
-CURL_CHECK_FUNC_FSETXATTR
-CURL_CHECK_FUNC_FTRUNCATE
-CURL_CHECK_FUNC_GETADDRINFO
-CURL_CHECK_FUNC_GETHOSTBYADDR
-CURL_CHECK_FUNC_GETHOSTBYADDR_R
-CURL_CHECK_FUNC_GETHOSTBYNAME
-CURL_CHECK_FUNC_GETHOSTBYNAME_R
-CURL_CHECK_FUNC_GETHOSTNAME
-CURL_CHECK_FUNC_GETIFADDRS
-CURL_CHECK_FUNC_GETSERVBYPORT_R
-CURL_CHECK_FUNC_GMTIME_R
-CURL_CHECK_FUNC_INET_NTOA_R
-CURL_CHECK_FUNC_INET_NTOP
-CURL_CHECK_FUNC_INET_PTON
-CURL_CHECK_FUNC_IOCTL
-CURL_CHECK_FUNC_IOCTLSOCKET
-CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
-CURL_CHECK_FUNC_LOCALTIME_R
-CURL_CHECK_FUNC_MEMRCHR
-CURL_CHECK_FUNC_POLL
-CURL_CHECK_FUNC_SETSOCKOPT
-CURL_CHECK_FUNC_SIGACTION
-CURL_CHECK_FUNC_SIGINTERRUPT
-CURL_CHECK_FUNC_SIGNAL
-CURL_CHECK_FUNC_SIGSETJMP
-CURL_CHECK_FUNC_SOCKET
-CURL_CHECK_FUNC_STRCASECMP
-CURL_CHECK_FUNC_STRCASESTR
-CURL_CHECK_FUNC_STRCMPI
-CURL_CHECK_FUNC_STRDUP
-CURL_CHECK_FUNC_STRERROR_R
-CURL_CHECK_FUNC_STRICMP
-CURL_CHECK_FUNC_STRLCAT
-CURL_CHECK_FUNC_STRNCASECMP
-CURL_CHECK_FUNC_STRNCMPI
-CURL_CHECK_FUNC_STRNICMP
-CURL_CHECK_FUNC_STRSTR
-CURL_CHECK_FUNC_STRTOK_R
-CURL_CHECK_FUNC_STRTOLL
-CURL_CHECK_FUNC_WRITEV
-
-case $host in
-  *msdosdjgpp)
-     ac_cv_func_pipe=no
-     skipcheck_pipe=yes
-     AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
-    ;;
-esac
-
-AC_CHECK_FUNCS([fork \
-  geteuid \
-  getpass_r \
-  getppid \
-  getprotobyname \
-  getpwuid \
-  getrlimit \
-  gettimeofday \
-  inet_addr \
-  perror \
-  pipe \
-  setlocale \
-  setmode \
-  setrlimit \
-  uname \
-  utime
-],[
-],[
-  func="$ac_func"
-  eval skipcheck=\$skipcheck_$func
-  if test "x$skipcheck" != "xyes"; then
-    AC_MSG_CHECKING([deeper for $func])
-    AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-      ]],[[
-        $func ();
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      eval "ac_cv_func_$func=yes"
-      AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
-        [Define to 1 if you have the $func function.])
-    ],[
-      AC_MSG_RESULT([but still no])
-    ])
-  fi
-])
-
-dnl Check if the getnameinfo function is available
-dnl and get the types of five of its arguments.
-CURL_CHECK_FUNC_GETNAMEINFO
-
-if test "$ipv6" = "yes"; then
-  if test "$ac_cv_func_getaddrinfo" = "yes"; then
-    AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
-    IPV6_ENABLED=1
-    AC_SUBST(IPV6_ENABLED)
-  fi
-  CURL_CHECK_NI_WITHSCOPEID
-fi
-
-dnl ************************************************************
-dnl enable non-blocking communications
-dnl
-CURL_CHECK_OPTION_NONBLOCKING
-CURL_CHECK_NONBLOCKING_SOCKET
-
-dnl ************************************************************
-dnl nroff tool stuff
-dnl
-
-AC_PATH_PROG( PERL, perl, ,
-  $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
-AC_SUBST(PERL)
-
-AC_PATH_PROGS( NROFF, gnroff nroff, ,
-  $PATH:/usr/bin/:/usr/local/bin )
-AC_SUBST(NROFF)
-
-if test -n "$NROFF"; then
-  dnl only check for nroff options if an nroff command was found
-
-  AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
-  MANOPT="-man"
-  mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
-  if test -z "$mancheck"; then
-    MANOPT="-mandoc"
-   mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
-    if test -z "$mancheck"; then
-      MANOPT=""
-      AC_MSG_RESULT([failed])
-      AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
-    else
-      AC_MSG_RESULT([$MANOPT])
-    fi
-  else
-    AC_MSG_RESULT([$MANOPT])
-  fi
-  AC_SUBST(MANOPT)
-fi
-
-if test -z "$MANOPT"
-then
-  dnl if no nroff tool was found, or no option that could convert man pages
-  dnl was found, then disable the built-in manual stuff
-  AC_MSG_WARN([disabling built-in manual])
-  USE_MANUAL="no";
-fi
-
-dnl *************************************************************************
-dnl If the manual variable still is set, then we go with providing a built-in
-dnl manual
-
-if test "$USE_MANUAL" = "1"; then
-  AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
-  curl_manual_msg="enabled"
-fi
-
-dnl set variable for use in automakefile(s)
-AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
-
-CURL_CHECK_LIB_ARES
-AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
-
-if test "x$enable_shared" = "xyes"; then
-  build_libhostname=yes
-else
-  build_libhostname=no
-fi
-AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
-
-CURL_CHECK_OPTION_THREADED_RESOLVER
-
-if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
-  AC_MSG_ERROR(
-[Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
-fi
-
-if test "$want_thres" = "yes"; then
-  AC_CHECK_HEADER(pthread.h,
-    [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
-      save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -pthread"
-      AC_CHECK_LIB(pthread, pthread_create,
-        [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
-          AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
-          USE_THREADS_POSIX=1
-          curl_res_msg="threaded"
-        ],
-        [ CFLAGS="$save_CFLAGS"])
-  ])
-fi
-
-dnl ************************************************************
-dnl disable verbose text strings
-dnl
-AC_MSG_CHECKING([whether to enable verbose strings])
-AC_ARG_ENABLE(verbose,
-AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
-AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
-       curl_verbose_msg="no"
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-dnl ************************************************************
-dnl enable SSPI support
-dnl
-AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
-AC_ARG_ENABLE(sspi,
-AC_HELP_STRING([--enable-sspi],[Enable SSPI])
-AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
-[ case "$enableval" in
-  yes)
-       if test "$ac_cv_native_windows" = "yes"; then
-         AC_MSG_RESULT(yes)
-         AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
-         AC_SUBST(USE_WINDOWS_SSPI, [1])
-         curl_sspi_msg="enabled"
-       else
-         AC_MSG_RESULT(no)
-         AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
-       fi
-       ;;
-  *)
-       AC_MSG_RESULT(no)
-       ;;
-  esac ],
-       AC_MSG_RESULT(no)
-)
-
-dnl ************************************************************
-dnl disable cryptographic authentication
-dnl
-AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
-AC_ARG_ENABLE(crypto-auth,
-AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
-AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-dnl ************************************************************
-dnl disable cookies support
-dnl
-AC_MSG_CHECKING([whether to enable support for cookies])
-AC_ARG_ENABLE(cookies,
-AC_HELP_STRING([--enable-cookies],[Enable cookies support])
-AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
-       ;;
-  *)   AC_MSG_RESULT(yes)
-       ;;
-  esac ],
-       AC_MSG_RESULT(yes)
-)
-
-dnl ************************************************************
-dnl Enable hiding of internal symbols in library to reduce its size and
-dnl speed dynamic linking of applications.  This currently is only supported
-dnl on gcc >= 4.0 and SunPro C.
-dnl
-AC_MSG_CHECKING([whether to enable hidden symbols in the library])
-AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
-AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
-[ case "$enableval" in
-  no)
-       AC_MSG_RESULT(no)
-       ;;
-  *)
-       AC_MSG_CHECKING([whether $CC supports it])
-       if test "$GCC" = yes ; then
-         if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
-           dnl clang always supports -fvisibility= but it doesn't show up
-           dnl under --help.
-           test "$compiler_id" = "CLANG"; then
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
-           AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
-           CFLAGS="$CFLAGS -fvisibility=hidden"
-         else
-            AC_MSG_RESULT(no)
-          fi
-
-       else
-         dnl Test for SunPro cc
-         if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
-           AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
-           CFLAGS="$CFLAGS -xldscope=hidden"
-         else
-           AC_MSG_RESULT(no)
-         fi
-       fi
-       ;;
-  esac ],
-       AC_MSG_RESULT(no)
-)
-
-dnl ************************************************************
-dnl enforce SONAME bump
-dnl
-
-AC_MSG_CHECKING([whether to enforce SONAME bump])
-AC_ARG_ENABLE(soname-bump,
-AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
-AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
-[ case "$enableval" in
-  yes)   AC_MSG_RESULT(yes)
-         soname_bump=yes
-         ;;
-  *)
-         AC_MSG_RESULT(no)
-         ;;
-  esac ],
-        AC_MSG_RESULT($soname_bump)
-)
-AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
-
-
-dnl ************************************************************
-if test ! -z "$winsock_LIB"; then
-
-  dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
-  dnl things work when built with c-ares). But we can't just move it last
-  dnl since then other stuff (SSL) won't build. So we simply append it to the
-  dnl end.
-
-  LIBS="$LIBS $winsock_LIB"
-  TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
-
-fi
-
-dnl
-dnl All the library dependencies put into $LIB apply to libcurl only.
-dnl Those in $CURL_LIBS apply to the curl command-line client only.
-dnl Those in $TEST_SERVER_LIBS apply to test servers only.
-dnl Those in $ALL_LIBS apply to all targets, including test targets.
-dnl
-LIBCURL_LIBS=$LIBS
-
-AC_SUBST(LIBCURL_LIBS)
-AC_SUBST(CURL_LIBS)
-AC_SUBST(TEST_SERVER_LIBS)
-AC_SUBST(CURL_NETWORK_LIBS)
-LIBS=$ALL_LIBS  dnl LIBS is a magic variable that's used for every link
-
-AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
-
-dnl yes or no
-ENABLE_SHARED="$enable_shared"
-AC_SUBST(ENABLE_SHARED)
-
-dnl
-dnl For keeping supported features and protocols also in pkg-config file
-dnl since it is more cross-compile frient than curl-config
-dnl
-
-if test "x$USE_SSLEAY" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
-elif test -n "$SSL_ENABLED"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
-fi
-if test "@KRB4_ENABLED@" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
-fi
-if test "x$IPV6_ENABLED" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
-fi
-if test "x$HAVE_LIBZ" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
-fi
-if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
-fi
-if test "x$IDN_ENABLED" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
-fi
-if test "x$USE_WINDOWS_SSPI" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
-fi
-if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
-    -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
-fi
-
-AC_SUBST(SUPPORT_FEATURES)
-
-dnl For supported protocols in pkg-config file
-if test "x$CURL_DISABLE_HTTP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
-  if test "x$SSL_ENABLED" = "x1"; then
-    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
-  fi
-fi
-if test "x$CURL_DISABLE_FTP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
-  if test "x$SSL_ENABLED" = "x1"; then
-    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
-  fi
-fi
-if test "x$CURL_DISABLE_FILE" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
-fi
-if test "x$CURL_DISABLE_TELNET" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
-fi
-if test "x$CURL_DISABLE_LDAP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
-  if test "x$CURL_DISABLE_LDAPS" != "x1"; then
-    if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
-      (test "x$USE_OPENLDAP" != "x1"  && test "x$HAVE_LDAP_SSL" = "x1"); then
-      SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
-    fi
-  fi
-fi
-if test "x$CURL_DISABLE_DICT" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
-fi
-if test "x$CURL_DISABLE_TFTP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
-fi
-if test "x$CURL_DISABLE_GOPHER" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
-fi
-if test "x$CURL_DISABLE_POP3" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
-  if test "x$SSL_ENABLED" = "x1"; then
-    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
-  fi
-fi
-if test "x$CURL_DISABLE_IMAP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
-  if test "x$SSL_ENABLED" = "x1"; then
-    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
-  fi
-fi
-if test "x$CURL_DISABLE_SMTP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
-  if test "x$SSL_ENABLED" = "x1"; then
-    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
-  fi
-fi
-if test "x$USE_LIBSSH2" = "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
-fi
-if test "x$CURL_DISABLE_RTSP" != "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
-fi
-if test "x$USE_LIBRTMP" = "x1"; then
-  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
-fi
-
-dnl replace spaces with newlines
-dnl sort the lines
-dnl replace the newlines back to spaces
-SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
-
-AC_SUBST(SUPPORT_PROTOCOLS)
-
-dnl squeeze whitespace out of some variables
-
-squeeze CFLAGS
-squeeze CPPFLAGS
-squeeze DEFS
-squeeze LDFLAGS
-squeeze LIBS
-
-squeeze CURL_LIBS
-squeeze LIBCURL_LIBS
-squeeze TEST_SERVER_LIBS
-squeeze CURL_NETWORK_LIBS
-
-squeeze SUPPORT_FEATURES
-squeeze SUPPORT_PROTOCOLS
-
-if test "x$want_curldebug_assumed" = "xyes" &&
-  test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
-  ac_configure_args="$ac_configure_args --enable-curldebug"
-fi
-
-AC_CONFIG_FILES([Makefile \
-           docs/Makefile \
-           docs/examples/Makefile \
-           docs/libcurl/Makefile \
-           include/Makefile \
-           include/curl/Makefile \
-           src/Makefile \
-           lib/Makefile \
-           tests/Makefile \
-           tests/data/Makefile \
-           tests/server/Makefile \
-           tests/libtest/Makefile \
-           packages/Makefile \
-           packages/Win32/Makefile \
-           packages/Win32/cygwin/Makefile \
-           packages/Linux/Makefile \
-           packages/Linux/RPM/Makefile \
-           packages/Linux/RPM/curl.spec \
-           packages/Linux/RPM/curl-ssl.spec \
-           packages/Solaris/Makefile \
-           packages/EPM/curl.list \
-           packages/EPM/Makefile \
-           packages/vms/Makefile \
-           packages/AIX/Makefile \
-           packages/AIX/RPM/Makefile \
-           packages/AIX/RPM/curl.spec \
-           curl-config \
-           libcurl.pc
-])
-AC_OUTPUT
-
-CURL_GENERATE_CONFIGUREHELP_PM
-
-AC_MSG_NOTICE([Configured to build curl/libcurl:
-
-  curl version:    ${VERSION}
-  Host setup:      ${host}
-  Install prefix:  ${prefix}
-  Compiler:        ${CC}
-  SSL support:     ${curl_ssl_msg}
-  SSH support:     ${curl_ssh_msg}
-  zlib support:    ${curl_zlib_msg}
-  krb4 support:    ${curl_krb4_msg}
-  GSSAPI support:  ${curl_gss_msg}
-  SPNEGO support:  ${curl_spnego_msg}
-  resolver:        ${curl_res_msg}
-  ipv6 support:    ${curl_ipv6_msg}
-  IDN support:     ${curl_idn_msg}
-  Build libcurl:   Shared=${enable_shared}, Static=${enable_static}
-  Built-in manual: ${curl_manual_msg}
-  Verbose errors:  ${curl_verbose_msg}
-  SSPI support:    ${curl_sspi_msg}
-  ca cert bundle:  ${ca}
-  ca cert path:    ${capath}
-  LDAP support:    ${curl_ldap_msg}
-  LDAPS support:   ${curl_ldaps_msg}
-  RTSP support:    ${curl_rtsp_msg}
-  RTMP support:    ${curl_rtmp_msg}
-  Protocols:       ${SUPPORT_PROTOCOLS}
-])
-
-if test "x$soname_bump" = "xyes"; then
-
-cat <<EOM
-  SONAME bump:     yes - WARNING: this library will be built with the SONAME
-                   number bumped due to (a detected) ABI breakage.
-                   See lib/README.curl_off_t for details on this.
-EOM
-
-fi
-
index 27b9f7f..1ddf4c2 100644 (file)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2001 - 2012, 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
@@ -24,6 +24,7 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 includedir=@includedir@
+cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
 
 usage()
 {
@@ -70,96 +71,106 @@ while test $# -gt 0; do
         ;;
 
     --ca)
-       echo "@CURL_CA_BUNDLE@"
-       ;;
+        echo "@CURL_CA_BUNDLE@"
+        ;;
 
     --cc)
-       echo "@CC@"
-       ;;
+        echo "@CC@"
+        ;;
 
     --prefix)
-       echo "$prefix"
-       ;;
+        echo "$prefix"
+        ;;
 
     --feature|--features)
         for feature in @SUPPORT_FEATURES@ ""; do
             test -n "$feature" && echo "$feature"
         done
-       ;;
+        ;;
 
     --protocols)
         for protocol in @SUPPORT_PROTOCOLS@; do
             echo "$protocol"
         done
-       ;;
+        ;;
 
     --version)
-       echo libcurl @VERSION@
-       exit 0
-       ;;
+        echo libcurl @CURLVERSION@
+        exit 0
+        ;;
 
     --checkfor)
         checkfor=$2
         cmajor=`echo $checkfor | cut -d. -f1`
         cminor=`echo $checkfor | cut -d. -f2`
         # when extracting the patch part we strip off everything after a
-       # dash as that's used for things like version 1.2.3-CVS
-       cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
+        # dash as that's used for things like version 1.2.3-CVS
+        cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
         checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
         numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
         nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
 
-       if test "$nownum" -ge "$checknum"; then
-         # silent success
-         exit 0
-       else
-         echo "requested version $checkfor is newer than existing @VERSION@"
-         exit 1
-       fi
-       ;;
+        if test "$nownum" -ge "$checknum"; then
+          # silent success
+          exit 0
+        else
+          echo "requested version $checkfor is newer than existing @CURLVERSION@"
+          exit 1
+        fi
+        ;;
 
     --vernum)
-       echo @VERSIONNUM@
-       exit 0
-       ;;
+        echo @VERSIONNUM@
+        exit 0
+        ;;
 
     --help)
-       usage 0
-       ;;
+        usage 0
+        ;;
 
     --cflags)
-               if test "X@includedir@" = "X/usr/include"; then
-          echo ""
+        if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
+          CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
+        else
+          CPPFLAG_CURL_STATICLIB=""
+        fi
+        if test "X@includedir@" = "X/usr/include"; then
+          echo "$CPPFLAG_CURL_STATICLIB"
         else
-          echo "-I@includedir@"
+          echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
         fi
-               ;;
+        ;;
 
     --libs)
-       if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
-          CURLLIBDIR="-L@libdir@ "
-       else
-          CURLLIBDIR=""
-       fi
-       if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
-         echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
-       else
-         echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
-       fi
-       ;;
+        if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
+           CURLLIBDIR="-L@libdir@ "
+        else
+           CURLLIBDIR=""
+        fi
+        if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
+          echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
+        else
+          echo ${CURLLIBDIR}-lcurl
+        fi
+        ;;
 
     --static-libs)
-       echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
-       ;;
+        if test "X@ENABLE_STATIC@" != "Xno" ; then
+          echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
+        else
+          echo "curl was built with static libraries disabled" >&2
+          exit 1
+        fi
+        ;;
 
     --configure)
-      echo @CONFIGURE_OPTIONS@
-    ;;
+        echo @CONFIGURE_OPTIONS@
+        ;;
 
     *)
         echo "unknown option: $1"
-       usage 1
-       ;;
+        usage 1
+        ;;
     esac
     shift
 done
diff --git a/curl-style.el b/curl-style.el
deleted file mode 100644 (file)
index 83cf8cc..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-;;;; Emacs Lisp help for writing curl code. ;;;;
-
-;;; The curl hacker's C conventions.
-;;; See the sample.emacs file on how this file can be made to take
-;;; effect automatically when editing curl source files.
-
-(defconst curl-c-style
-  '((c-basic-offset . 2)
-    (c-comment-only-line-offset . 0)
-    (c-hanging-braces-alist     . ((substatement-open before after)))
-    (c-offsets-alist . ((topmost-intro        . 0)
-                       (topmost-intro-cont   . 0)
-                       (substatement         . +)
-                       (substatement-open    . 0)
-                       (statement-case-intro . +)
-                       (statement-case-open  . 0)
-                       (case-label           . 0)
-                       ))
-    )
-  "Curl C Programming Style")
-
-(defun curl-code-cleanup ()
-  "no docs"
-  (interactive)
-  (untabify (point-min) (point-max))
-  (delete-trailing-whitespace)
-)
-
-;; Customizations for all of c-mode, c++-mode, and objc-mode
-(defun curl-c-mode-common-hook ()
-  "Curl C mode hook"
-  ;; add curl style and set it for the current buffer
-  (c-add-style "curl" curl-c-style t)
-  (setq tab-width 8
-       indent-tabs-mode nil            ; Use spaces. Not tabs.
-       comment-column 40
-       c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "curl_socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
-       )
-  ;; keybindings for C, C++, and Objective-C.  We can put these in
-  ;; c-mode-base-map because of inheritance ...
-  (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
-  (define-key c-mode-base-map "\M-m" 'curl-code-cleanup)
-  (setq c-recognize-knr-p nil)
-  ;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
-  (setq show-trailing-whitespace t)
-  )
-
-;; Set this is in your .emacs if you want to use the c-mode-hook as
-;; defined here right out of the box.
-; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
diff --git a/depcomp b/depcomp
index 04701da..4ebd5b3 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-07-09.11
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,9 +16,7 @@ scriptversion=2005-07-09.11
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -29,9 +27,9 @@ scriptversion=2005-07-09.11
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -41,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake@gnu.org>.
@@ -58,6 +56,66 @@ EOF
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -70,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -81,9 +142,32 @@ if test "$depmode" = hp; then
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -91,10 +175,22 @@ gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -102,13 +198,17 @@ gcc3)
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -116,31 +216,31 @@ gcc)
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -158,8 +258,7 @@ sgi)
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -167,99 +266,156 @@ sgi)
 
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
     echo "$object : \\" > "$depfile"
-
     # Clip off the initial element (the dependent).  Don't try to be
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
+    echo >> "$depfile"
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
   else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
-
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
   fi
 
-  if test $stat -eq 0; then :
-  else
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
-
-  if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
 
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -271,68 +427,141 @@ icc)
   sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
   # Some versions of the HPUX 10.20 sed can't process this invocation
   # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  set_dir_from  "$object"
+  set_base_from "$object"
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -ne 0; then
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
+    sed -ne '2,${
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
+  else
+    make_dummy_depfile
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
 
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
@@ -345,13 +574,13 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -371,18 +600,18 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -396,41 +625,51 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -441,13 +680,13 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -466,10 +705,10 @@ cpp)
     esac
   done
 
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
+  "$@" -E \
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -479,35 +718,56 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -526,5 +786,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 5cf07fe..466c36b 100644 (file)
@@ -6,14 +6,14 @@
 
                                libcurl bindings
 
-Creative people have written bindings or interfaces for various environments
-and programming languages. Using one of these allows you to take advantage of
-curl powers from within your favourite language or system.
+ Creative people have written bindings or interfaces for various environments
+ and programming languages. Using one of these allows you to take advantage of
+ curl powers from within your favourite language or system.
 
-This is a list of all known interfaces as of this writing.
+ This is a list of all known interfaces as of this writing.
 
-The bindings listed below are not part of the curl/libcurl distribution
-archives, but must be downloaded and installed separately.
+ The bindings listed below are not part of the curl/libcurl distribution
+ archives, but must be downloaded and installed separately.
 
 Ada95
 
@@ -41,7 +41,10 @@ Ch
 
 Cocoa
 
-  Written by Dan Wood
+  BBHTTP: written by Bruno de Carvalho
+  https://github.com/brunodecarvalho/BBHTTP
+
+  curlhandle: Written by Dan Wood
   http://curlhandle.sourceforge.net/
 
 D
@@ -55,6 +58,7 @@ Dylan
   http://dylanlibs.sourceforge.net/
 
 Eiffel
+
   Written by Eiffel Software
   http://curl.haxx.se/libcurl/eiffel/
 
@@ -81,6 +85,11 @@ glib/GTK+
   Written by Richard Atterer
   http://atterer.net/glibcurl/
 
+Guile:
+
+  Written by Michael L. Gran
+  http://www.lonelycactus.com/guile-curl.html
+
 Haskell
 
   Written by Galois, Inc
@@ -91,6 +100,11 @@ Java
   Maintained by [blank]
   http://curl.haxx.se/libcurl/java/
 
+Julia
+
+  Written by Paul Howe
+  https://github.com/forio/Curl.jl
+
 Lisp
 
   Written by Liam Healy
index 8cbad04..c0c6fa8 100644 (file)
--- a/docs/BUGS
+++ b/docs/BUGS
@@ -6,39 +6,56 @@
 
 BUGS
 
+ 1. Bugs
+  1.1 There are still bugs
+  1.2 Where to report
+  1.3 What to report
+  1.4 libcurl problems
+  1.5 Who will fix the problems
+  1.6 How to get a stack trace
+  1.7 Bugs in libcurl bindings
+
+==============================================================================
+
+1.1 There are still bugs
+
   Curl and libcurl have grown substantially since the beginning. At the time
-  of writing (July 2007), there are about 47000 lines of source code, and by
-  the time you read this it has probably grown even more.
+  of writing (January 2013), there are about 83,000 lines of source code, and
+  by the time you read this it has probably grown even more.
 
   Of course there are lots of bugs left. And lots of misfeatures.
 
   To help us make curl the stable and solid product we want it to be, we need
   bug reports and bug fixes.
 
-WHERE TO REPORT
+1.2 Where to report
 
   If you can't fix a bug yourself and submit a fix for it, try to report an as
   detailed report as possible to a curl mailing list to allow one of us to
-  have a go at a solution. You should also post your bug/problem at curl's bug
-  tracking system over at
+  have a go at a solution. You can optionally also post your bug/problem at
+  curl's bug tracking system over at
 
-        http://sourceforge.net/bugs/?group_id=976
+        https://sourceforge.net/p/curl/bugs/
 
-  (but please read the sections below first before doing that)
+  Please read the rest of this document below first before doing that! Also,
+  you need to login to your sourceforge account before being able to submit a
+  bug report (necessary evil done to avoid spam).
 
   If you feel you need to ask around first, find a suitable mailing list and
   post there. The lists are available on http://curl.haxx.se/mail/
 
-WHAT TO REPORT
+1.3 What to report
 
   When reporting a bug, you should include all information that will help us
   understand what's wrong, what you expected to happen and how to repeat the
   bad behavior. You therefore need to tell us:
 
-   - your operating system's name and version number (uname -a under a unix
-     is fine)
+   - your operating system's name and version number
+
    - what version of curl you're using (curl -V is fine)
+
    - versions of the used libraries that libcurl is built to use
+
    - what URL you were working with (if possible), at least which protocol
 
   and anything and everything else you think matters. Tell us what you
@@ -59,7 +76,48 @@ WHAT TO REPORT
   The address and how to subscribe to the mailing lists are detailed in the
   MANUAL file.
 
-HOW TO GET A STACK TRACE
+1.4 libcurl problems
+
+  First, post all libcurl problems on the curl-library mailing list.
+
+  When you've written your own application with libcurl to perform transfers,
+  it is even more important to be specific and detailed when reporting bugs.
+
+  Tell us the libcurl version and your operating system. Tell us the name and
+  version of all relevant sub-components like for example the SSL library
+  you're using and what name resolving your libcurl uses. If you use SFTP or
+  SCP, the libssh2 version is relevant etc.
+
+  Showing us a real source code example repeating your problem is the best way
+  to get our attention and it will greatly increase our chances to understand
+  your problem and to work on a fix (if we agree it truly is a problem).
+
+  Lots of problems that appear to be libcurl problems are actually just abuses
+  of the libcurl API or other malfunctions in your applications. It is advised
+  that you run your problematic program using a memory debug tool like
+  valgrind or similar before you post memory-related or "crashing" problems to
+  us.
+
+1.5 Who will fix the problems
+
+  If the problems or bugs you describe are considered to be bugs, we want to
+  have the problems fixed.
+
+  There are no developers in the curl project that are paid to work on bugs.
+  All developers that take on reported bugs do this on a voluntary basis. We
+  do it out of an ambition to keep curl and libcurl excellent products and out
+  of pride.
+
+  But please do not assume that you can just lump over something to us and it
+  will then magically be fixed after some given time. Most often we need
+  feedback and help to understand what you've experienced and how to repeat a
+  problem. Then we may only be able to assist YOU to debug the problem and to
+  track down the proper fix.
+
+  We get reports from many people every month and each report can take a
+  considerable amount of time to really go to the bottom with.
+
+1.6 How to get a stack trace
 
   First, you must make sure that you compile all sources with -g and that you
   don't 'strip' the final executable. Try to avoid optimizing the code as
@@ -79,3 +137,12 @@ HOW TO GET A STACK TRACE
   crashed. Include the stack trace with your detailed bug report. It'll help a
   lot.
 
+1.7 Bugs in libcurl bindings
+
+  There will of course pop up bugs in libcurl bindings. You should then
+  primarily approach the team that works on that particular binding and see
+  what you can do to help them fix the problem.
+
+  If you suspect that the problem exists in the underlying libcurl, then
+  please convert your program over to plain C and follow the steps outlined
+  above.
index db03c42..75e7ebb 100644 (file)
@@ -34,6 +34,7 @@
  3.3 How To Make a Patch without git
  3.4 How to get your changes into the main sources
  3.5 Write good commit messages
+ 3.6 Please don't send pull requests
 
 ==============================================================================
 
@@ -78,9 +79,9 @@
 1.3 What To Read
 
  Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the
- most recent CHANGES. Just lurking on the libcurl mailing list is gonna give
- you a lot of insights on what's going on right now. Asking there is a good
- idea too.
+ most recent CHANGES. Just lurking on the curl-library mailing list is gonna
+ give you a lot of insights on what's going on right now. Asking there is a
good idea too.
 
 2. cURL Coding Standards
 
 
 2.2 Indenting
 
Please try using the same indenting levels and bracing method as all the
- other code already does. It makes the source code a lot easier to follow if
- all of it is written using the same style. We don't ask you to like it, we
- just ask you to follow the tradition! ;-) This mainly means: 2-level indents,
- using spaces only (no tabs) and having the opening brace ({) on the same line
as the if() or while().
Use the same indenting levels and bracing method as all the other code
+ already does. It makes the source code easier to follow if all of it is
+ written using the same style. We don't ask you to like it, we just ask you to
+ follow the tradition! ;-) This mainly means: 2-level indents, using spaces
+ only (no tabs) and having the opening brace ({) on the same line as the if()
+ or while().
 
  Also note that we use if() and while() with no space before the parenthesis.
 
  description exactly what they correct so that all patches can be selectively
  applied by the maintainer or other interested parties.
 
+ Also, separate patches enable bisecting much better when we track problems in
+ the future.
+
 2.9 Patch Against Recent Sources
 
  Please try to get the latest available sources to make your patches
  test case that verifies that it works as documented. If every submitter also
  posts a few test cases, it won't end up as a heavy burden on a single person!
 
+ If you don't have test cases or perhaps you have done something that is very
+ hard to write tests for, do explain exactly how you have otherwise tested and
+ verified your changes.
+
 3. Pushing Out Your Changes
 
 3.1 Write Access to git Repository
 
 3.2 How To Make a Patch with git
 
- You need to first checkout the respository:
+ You need to first checkout the repository:
 
      git clone git://github.com/bagder/curl.git
 
  commit.
 
  Now send those patches off to the curl-library list. You can of course opt to
- do that with the 'get send-email' command.
+ do that with the 'git send-email' command.
 
 3.3 How To Make a Patch without git
 
 
  For unix-like operating systems:
 
-   http://www.gnu.org/software/patch/patch.html
-   http://www.gnu.org/directory/diffutils.html
+     http://www.gnu.org/software/patch/patch.html
+     http://www.gnu.org/directory/diffutils.html
 
  For Windows:
 
-   http://gnuwin32.sourceforge.net/packages/patch.htm
-   http://gnuwin32.sourceforge.net/packages/diffutils.htm
+     http://gnuwin32.sourceforge.net/packages/patch.htm
+     http://gnuwin32.sourceforge.net/packages/diffutils.htm
 
 3.4 How to get your changes into the main sources
 
- 1. Submit your patch to the curl-library mailing list
+ Submit your patch to the curl-library mailing list.
 
2. Make the patch against as recent sources as possible.
+ Make the patch against as recent sources as possible.
 
- 3. Make sure your patch adheres to the source indent and coding style of
   already existing source code. Failing to do so just adds more work for me.
+ Make sure your patch adheres to the source indent and coding style of already
+ existing source code. Failing to do so just adds more work for me.
 
4. Respond to replies on the list about the patch and answer questions and/or
-    fix nits/flaws. This is very important. I will take lack of replies as a
-    sign that you're not very anxious to get your patch accepted and I tend to
   simply drop such patches from my TODO list.
+ Respond to replies on the list about the patch and answer questions and/or
+ fix nits/flaws. This is very important. I will take lack of replies as a sign
+ that you're not very anxious to get your patch accepted and I tend to simply
+ drop such patches from my TODO list.
 
- 5. If you've followed the above mentioned paragraphs and your patch still
-    hasn't been incorporated after some weeks, consider resubmitting it to the
-    list.
+ If you've followed the above paragraphs and your patch still hasn't been
+ incorporated after some weeks, consider resubmitting it to the list.
 
 3.5 Write good commit messages
 
-  A short guide to how to do fine commit messages in the curl project.
+ A short guide to how to do fine commit messages in the curl project.
+
+      ---- start ----
+      [area]: [short line describing the main effect]
+
+      [separate the above single line from the rest with an empty line]
+
+      [full description, no wider than 72 columns that describe as much as
+      possible as to why this change is made, and possibly what things
+      it fixes and everything else that is related]
+      ---- stop ----
+
+ Don't forget to use commit --author="" if you commit someone else's work,
+ and make sure that you have your own user and email setup correctly in git
+ before you commit
+
+3.6 Please don't send pull requests
+
+ With git (and especially github) it is easy and tempting to send a pull
+ request to one or more people in the curl project to have changes merged this
+ way instead of mailing patches to the curl-library mailing list.
+
+ We don't like that. We want them mailed for these reasons:
 
-  ---- start ----
-  [area]: [short line describing the main effect]
+ - Peer review. Anyone and everyone on the list can review, comment and
+   improve on the patch. Pull requests limit this ability.
 
-  [separate the above single line from the rest with an empty line]
+ - Anyone can merge the patch into their own trees for testing and those who
+   have push rights can push it to the main repo. It doesn't have to be anyone
+   the patch author knows beforehand.
 
-  [full description, no wider than 72 columns that describe as much as
-  possible as to why this change is made, and possibly what things
-  it fixes and everything else that is related]
-   ---- stop ----
+ - Commit messages can be tweaked and changed if merged locally instead of
+   using github. Merges directly on github requires the changes to be perfect
+   already, which they seldom are.
 
-  Don't forget to use commit --author="" if you commit someone else's work,
-  and make sure that you have your own user and email setup correctly in git
-  before you commit
+ - Merges on github prevents rebases and even enforces --no-ff which is a git
+   style we don't otherwise use in the project
 
+ However: once patches have been reviewed and deemed fine on list they are
+ perfectly OK to be pulled from a published git tree.
index bed125e..2b15254 100644 (file)
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -1,4 +1,3 @@
-Updated: October 6, 2010 (http://curl.haxx.se/docs/faq.html)
                                   _   _ ____  _
                               ___| | | |  _ \| |
                              / __| | | | |_) | |
@@ -36,7 +35,7 @@ FAQ
   3.2 How do I tell curl to resume a transfer?
   3.3 Why doesn't my posting using -F work?
   3.4 How do I tell curl to run custom FTP commands?
-  3.5 How can I disable the Pragma: nocache header?
+  3.5 How can I disable the Accept: */* header?
   3.6 Does curl support ASP, XML, XHTML or HTML version Y?
   3.7 Can I use curl to delete/rename a file through FTP?
   3.8 How do I tell curl to follow HTTP redirects?
@@ -51,6 +50,9 @@ FAQ
   3.17 How do I list the root dir of an FTP server?
   3.18 Can I use curl to send a POST/PUT and not wait for a response?
   3.19 How do I get HTTP from a host using a specific IP address?
+  3.20 How to SFTP from my user's home directory?
+  3.21 Protocol xxx not supported or disabled in libcurl
+  3.22 curl -X gives me HTTP problems
 
  4. Running Problems
   4.1 Problems connecting to SSL servers.
@@ -95,6 +97,8 @@ FAQ
   5.13 How do I stop an ongoing transfer?
   5.14 Using C++ non-static functions for callbacks?
   5.15 How do I get an FTP directory listing?
+  5.16 I want a different time-out!
+  5.17 Can I write a server with libcurl?
 
  6. License Issues
   6.1 I have a GPL program, can I use the libcurl library?
@@ -107,7 +111,7 @@ FAQ
 
  7. PHP/CURL Issues
   7.1 What is PHP/CURL?
-  7.2 Who write PHP/CURL?
+  7.2 Who wrote PHP/CURL?
   7.3 Can I perform multiple requests using the same handle?
 
 ==============================================================================
@@ -136,7 +140,7 @@ FAQ
 
     libcurl is highly portable, it builds and works identically on numerous
     platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
-    IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac
+    IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac
     OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF,
     Android, Minix, IBM TPF and more...
 
@@ -241,10 +245,10 @@ FAQ
   supervised in any way by the project.
 
   We still get help from companies. Haxx provides web site, bandwidth, mailing
-  lists etc and sourceforge.net hosts project services we take advantage from,
-  like the bug tracker. Also again, some companies have sponsored certain
-  parts of the development in the past and I hope some will continue to do so
-  in the future.
+  lists etc, sourceforge.net hosts project services we take advantage from,
+  like the bug tracker and github hosts the primary git repository. Also
+  again, some companies have sponsored certain parts of the development in the
+  past and I hope some will continue to do so in the future.
 
   If you want to support our project, consider a donation or a banner-program
   or even better: by helping us coding, documenting, testing etc.
@@ -304,49 +308,17 @@ FAQ
   We don't know how many users that downloaded or installed curl and then
   never use it.
 
-  Some facts to use as input to the math:
+  In May 2012 Daniel did a counting game and came up with a number that may
+  be completely wrong or somewhat accurate. Over 500 million!
 
-  curl packages are downloaded from the curl.haxx.se and mirrors over a
-  million times per year. curl is installed by default with most Linux
-  distributions. curl is installed by default with Mac OS X. curl and libcurl
-  as used by numerous applications that include libcurl binaries in their
-  distribution packages (like Adobe Acrobat Reader and Google Earth).
-
-  More than a hundred known named companies use curl in commercial
-  environments and products and more than a hundred known named open source
-  projects depend on (lib)curl.
-
-  In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
-  estimated a user base of one million users or more.
-
-  In March 2005, the "Linux Counter project" estimated a total Linux user base
-  of some 29 millions, while Netcraft detected some 4 million "active" Linux
-  based web servers. A guess is that a fair amount of these Linux
-  installations have curl installed.
-
-  The Debian project maintains statistics on packages installed by people
-  who have voluntarily run their package counting application.  In mid-2010,
-  libcurl3 was installed on over 55000 such systems (62% of reporting systems)
-  and was one of the 320 most popular installed packages (out of about 107000
-  possible packages).
-
-  All this taken together, there is no doubt that there are millions of
-  (lib)curl users.
-
-  http://curl.haxx.se/docs/companies.html
-  http://curl.haxx.se/docs/programs.html
-  http://curl.haxx.se/libcurl/using/apps.html
-  http://counter.li.org/estimates.php
-  http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
-  http://qa.debian.org/popcon.php?package=curl
+  See http://daniel.haxx.se/blog/2012/05/16/300m-users/
 
   1.11 Why don't you update ca-bundle.crt
 
-  The ca-bundle.crt file that used to be bundled with curl was very outdated
-  (it being last modified year 2000 should tell) and must be replaced with a
-  much more modern and up-to-date version by anyone who wants to verify peers
-  anyway. It is no longer provided, the last curl release that shipped it was
-  curl 7.18.0.
+  The ca cert bundle that used to shipped with curl was very outdated and must
+  be replaced with an up-to-date version by anyone who wants to verify
+  peers. It is no longer provided by curl. The last curl release ever that
+  shipped a ca cert bundle was curl 7.18.0.
 
   In the cURL project we've decided not to attempt to keep this file updated
   (or even present anymore) since deciding what to add to a ca cert bundle is
@@ -446,19 +418,24 @@ FAQ
 
   2.2 Does curl work/build with other SSL libraries?
 
-  Curl has been written to use OpenSSL, GnuTLS, yassl, NSS or PolarSSL,
-  although there should not be many problems using a different library. If
-  anyone does "port" curl to use a different SSL library, we are of course
-  very interested in getting the patch!
+  Curl has been written to use a generic SSL function layer internally, and
+  that SSL functionality can then be provided by one out of many different SSL
+  backends.
+
+  curl can be built to use one of the following SSL alternatives: OpenSSL,
+  GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X),
+  schannel (native Windows) or qssl (native IBM i). They all have their pros
+  and cons, and we try to maintain a comparison of them here:
+  http://curl.haxx.se/docs/ssl-compared.html
 
   2.3 Where can I find a copy of LIBEAY32.DLL?
 
   That is an OpenSSL binary built for Windows.
 
-  Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs
-  on a windows machine to do https://. Check out the curl web site to find
-  accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
-  packages.
+  Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then
+  what curl needs on a windows machine to do https:// etc. Check out the curl
+  web site to find accurate and up-to-date pointers to recent OpenSSL DLLs and
+  other binary packages.
 
   2.4 Does curl support SOCKS (RFC 1928) ?
 
@@ -470,9 +447,13 @@ FAQ
   3.1 curl: (1) SSL is disabled, https: not supported
 
   If you get this output when trying to get anything from a https:// server,
-  it means that the configure script couldn't find all libs and include files
-  it requires for SSL to work. If the configure script fails to find them,
-  curl is simply built without SSL support.
+  it means that the instance of curl/libcurl that you're using was built
+  without support for this protocol.
+
+  This could've happened if the configure script that was run at build time
+  couldn't find all libs and include files curl requires for SSL to work. If
+  the configure script fails to find them, curl is simply built without SSL
+  support.
 
   To get the https:// support into a curl that was previously built but that
   reports that https:// is not supported, you should dig through the document
@@ -485,15 +466,14 @@ FAQ
   3.2 How do I tell curl to resume a transfer?
 
   Curl supports resumed transfers both ways on both FTP and HTTP.
-
   Try the -C option.
 
   3.3 Why doesn't my posting using -F work?
 
   You can't simply use -F or -d at your choice. The web server that will
-  receive your post assumes one of the formats. If the form you're trying to
-  "fake" sets the type to 'multipart/form-data', then and only then you must
-  use the -F type. In all the most common cases, you should use -d which then
+  receive your post expects one of the formats. If the form you're trying to
+  submit uses the type 'multipart/form-data', then and only then you must use
+  the -F type. In all the most common cases, you should use -d which then
   causes a posting with the type 'application/x-www-form-urlencoded'.
 
   This is described in some detail in the MANUAL and TheArtOfHttpScripting
@@ -507,22 +487,23 @@ FAQ
   You can tell curl to perform optional commands both before and/or after a
   file transfer. Study the -Q/--quote option.
 
-  Since curl is used for file transfers, you don't use curl to just perform
-  FTP commands without transferring anything. Therefore you must always specify
-  a URL to transfer to/from even when doing custom FTP commands.
+  Since curl is used for file transfers, you don't normally use curl to
+  perform FTP commands without transferring anything. Therefore you must
+  always specify a URL to transfer to/from even when doing custom FTP
+  commands, or use -I which implies the "no body" option sent to libcurl.
 
-  3.5 How can I disable the Pragma: nocache header?
+  3.5 How can I disable the Accept: */* header?
 
   You can change all internally generated headers by adding a replacement with
   the -H/--header option. By adding a header with empty contents you safely
-  disable that one. Use -H "Pragma:" to disable that specific header.
+  disable that one. Use -H "Accept:" to disable that specific header.
 
   3.6 Does curl support ASP, XML, XHTML or HTML version Y?
 
   To curl, all contents are alike. It doesn't matter how the page was
-  generated. It may be ASP, PHP, Perl, shell-script, SSI or plain
-  HTML-files. There's no difference to curl and it doesn't even know what kind
-  of language that generated the page.
+  generated. It may be ASP, PHP, Perl, shell-script, SSI or plain HTML
+  files. There's no difference to curl and it doesn't even know what kind of
+  language that generated the page.
 
   See also item 3.14 regarding javascript.
 
@@ -559,6 +540,12 @@ FAQ
   install and use them, in the libcurl section of the curl web site:
   http://curl.haxx.se/libcurl/
 
+  All the various bindings to libcurl are made by other projects and people,
+  outside of the cURL project. The cURL project itself only produces libcurl
+  with its plain C API. If you don't find anywhere else to ask you can ask
+  about bindings on the curl-library list too, but be prepared that people on
+  that list may not know anything about bindings.
+
   In October 2009, there were interfaces available for the following
   languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
   Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
@@ -715,6 +702,68 @@ FAQ
 
     curl --header "Host: www.example.com" http://127.0.0.1/
 
+  You can also opt to add faked host name entries to curl with the --resolve
+  option. That has the added benefit that things like redirects will also work
+  properly. The above operation would instead be done as:
+
+    curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/
+
+  3.20 How to SFTP from my user's home directory?
+
+  Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
+  work with. It means that if you don't specify that you want the user's home
+  directory, you get the actual root directory.
+
+  To specify a file in your user's home directory, you need to use the correct
+  URL syntax which for sftp might look similar to:
+
+    curl -O -u user:password sftp://example.com/~/file.txt
+
+  and for SCP it is just a different protocol prefix:
+
+    curl -O -u user:password scp://example.com/~/file.txt
+
+  3.21 Protocol xxx not supported or disabled in libcurl
+
+  When passing on a URL to curl to use, it may respond that the particular
+  protocol is not supported or disabled. The particular way this error message
+  is phrased is because curl doesn't make a distinction internally of whether
+  a particular protocol is not supported (i.e. never got any code added that
+  knows how to speak that protocol) or if it was explicitly disabled. curl can
+  be built to only support a given set of protocols, and the rest would then
+  be disabled or not supported.
+
+  Note that this error will also occur if you pass a wrongly spelled protocol
+  part as in "htpt://example.com" or as in the less evident case if you prefix
+  the protocol part with a space as in " http://example.com/".
+
+  3.22 curl -X gives me HTTP problems
+
+  In normal circumstances, -X should hardly ever be used.
+
+  By default you use curl without explicitly saying which request method to
+  use when the URL identifies a HTTP transfer. If you just pass in a URL like
+  "curl http://example.com" it will use GET. If you use -d or -F curl will use
+  POST, -I will cause a HEAD and -T will make it a PUT.
+
+  If for whatever reason you're not happy with these default choices that curl
+  does for you, you can override those request methods by specifying -X
+  [WHATEVER]. This way you can for example send a DELETE by doing "curl -X
+  DELETE [URL]".
+
+  It is thus pointless to do "curl -XGET [URL]" as GET would be used
+  anyway. In the same vein it is pointless to do "curl -X POST -d data
+  [URL]"... But you can make a fun and somewhat rare request that sends a
+  request-body in a GET request with something like "curl -X GET -d data
+  [URL]"
+
+  Note that -X doesn't change curl's behavior. It only modifies the actual
+  string sent in the request.
+
+  Accordingly, by using -XPOST on a command line that for example would follow
+  a 303 redirect, you will effectively prevent curl from behaving
+  correctly. Be aware.
+
 
 4. Running Problems
 
@@ -792,7 +841,7 @@ FAQ
 
     4.5.3 "403 Forbidden"
 
-    The server understood the request, but is refusing to fulfill it.
+    The server understood the request, but is refusing to fulfil it.
     Authorization will not help and the request SHOULD NOT be repeated.
 
     4.5.4 "404 Not Found"
@@ -863,8 +912,8 @@ FAQ
 
   4.9 Curl can't authenticate to the server that requires NTLM?
 
-  NTLM support requires OpenSSL, GnuTLS, NSS or Microsoft Windows libraries at
-  build-time to provide this functionality.
+  NTLM support requires OpenSSL, GnuTLS, NSS, Secure Transport, or Microsoft
+  Windows libraries at build-time to provide this functionality.
 
   NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
   should not use such ones.
@@ -1006,11 +1055,11 @@ FAQ
 
   4.19 Why doesn't cURL return an error when the network cable is unplugged?
 
-  Unplugging the cable is not an error situation. The TCP/IP protocol stack
+  Unplugging a cable is not an error situation. The TCP/IP protocol stack
   was designed to be fault tolerant, so even though there may be a physical
   break somewhere the connection shouldn't be affected, just possibly
   delayed.  Eventually, the physical break will be fixed or the data will be
-  re-routed around the physical problem.
+  re-routed around the physical problem through another path.
 
   In such cases, the TCP/IP stack is responsible for detecting when the
   network connection is irrevocably lost. Since with some protocols it is
@@ -1028,6 +1077,12 @@ FAQ
   falls too low, and --connect-timeout and --max-time can be used to put an
   overall timeout on the connection phase or the entire transfer.
 
+  A libcurl-using application running in a known physical environment (e.g.
+  an embedded device with only a single network connection) may want to act
+  immediately if its lone network connection goes down.  That can be achieved
+  by having the application monitor the network connection on its own using an
+  OS-specific mechanism, then signalling libcurl to abort (see also item 5.13).
+  
 
 5. libcurl Issues
 
@@ -1037,7 +1092,9 @@ FAQ
 
   We have written the libcurl code specifically adjusted for multi-threaded
   programs. libcurl will use thread-safe functions instead of non-safe ones if
-  your system has such.
+  your system has such.  Note that you must never share the same handle in
+  multiple threads.
+
 
   If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
   need to provide one or two locking functions:
@@ -1117,6 +1174,11 @@ FAQ
   libcurl will reuse connections for all transfers that are made using the
   same libcurl handle.
 
+  When you use the easy interface, the connection cache is kept within the
+  easy handle. If you instead use the multi interface, the connection cache
+  will be kept within the multi handle and will be shared among all the easy
+  handles that are used within the same multi handle.
+
   5.7 Link errors when building libcurl on Windows!
 
   You need to make sure that your project, and all the libraries (both static
@@ -1138,13 +1200,12 @@ FAQ
   the import libraries below. These are the libraries produced by the various
   lib/Makefile.* files:
 
-  Target:          static lib.   import lib for libcurl*.dll.
-  -----------------------------------------------------------
-  MingW:           libcurl.a     libcurldll.a
-  MSVC (release):  libcurl.lib   libcurl_imp.lib
-  MSVC (debug):    libcurld.lib  libcurld_imp.lib
-  Borland:         libcurl.lib   libcurl_imp.lib
-
+       Target:          static lib.   import lib for libcurl*.dll.
+       -----------------------------------------------------------
+       MingW:           libcurl.a     libcurldll.a
+       MSVC (release):  libcurl.lib   libcurl_imp.lib
+       MSVC (debug):    libcurld.lib  libcurld_imp.lib
+       Borland:         libcurl.lib   libcurl_imp.lib
 
   5.8 libcurl.so.X: open failed: No such file or directory
 
@@ -1178,21 +1239,20 @@ FAQ
   - The non-ipv6 resolver that can use one out of four host name resolve calls
     (depending on what your system supports):
 
-    A - gethostbyname()
-    B - gethostbyname_r() with 3 arguments
-    C - gethostbyname_r() with 5 arguments
-    D - gethostbyname_r() with 6 arguments
+      A - gethostbyname()
+      B - gethostbyname_r() with 3 arguments
+      C - gethostbyname_r() with 5 arguments
+      D - gethostbyname_r() with 6 arguments
 
   - The ipv6-resolver that uses getaddrinfo()
 
   - The c-ares based name resolver that uses the c-ares library for resolves.
-    Using this offers asynchronous name resolves but it currently has no IPv6
-    support.
+    Using this offers asynchronous name resolves.
 
   - The threaded resolver (default option on Windows). It uses:
 
-    A - gethostbyname() on plain ipv4 hosts
-    B - getaddrinfo() on ipv6-enabled hosts
+      A - gethostbyname() on plain ipv4 hosts
+      B - getaddrinfo() on ipv6-enabled hosts
 
   Also note that libcurl never resolves or reverse-lookups addresses given as
   pure numbers, such as 127.0.0.1 or ::1.
@@ -1224,16 +1284,17 @@ FAQ
 
   5.13 How do I stop an ongoing transfer?
 
-  There are several ways, but none of them are instant. There is no function
-  you can call from another thread or similar that will stop it immediately.
-  Instead you need to make sure that one of the callbacks you use return an
-  appropriate value that will stop the transfer.
-
-  Suitable callbacks that you can do this with include the progress callback,
-  the read callback and the write callback.
+  With the easy interface you make sure to return the correct error code from
+  one of the callbacks, but none of them are instant. There is no function you
+  can call from another thread or similar that will stop it immediately.
+  Instead, you need to make sure that one of the callbacks you use returns an
+  appropriate value that will stop the transfer.  Suitable callbacks that you
+  can do this with include the progress callback, the read callback and the
+  write callback.
 
-  If you're using the multi interface, you also stop a transfer by removing
-  the particular easy handle from the multi stack.
+  If you're using the multi interface, you can also stop a transfer by
+  removing the particular easy handle from the multi stack at any moment you
+  think the transfer is done or when you wish to abort the transfer.
 
   5.14 Using C++ non-static functions for callbacks?
 
@@ -1243,14 +1304,14 @@ FAQ
   member function that is passed a pointer to the class:
 
      // f is the pointer to your object.
-     static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
+     static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
      {
        // Call non-static member function.
        static_cast<YourClass*>(f)->nonStaticFunction();
      }
 
      // This is how you pass pointer to the static function:
-     curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
+     curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
      curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
 
   5.15 How do I get an FTP directory listing?
@@ -1275,6 +1336,31 @@ FAQ
   libcurl since 7.21.0 also provide the ability to specify a wildcard to
   download multiple files from one FTP directory.
 
+  5.16 I want a different time-out!
+
+  Time and time again users realize that CURLOPT_TIMEOUT and
+  CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all
+  the various use cases and scenarios applications end up with.
+
+  libcurl offers many more ways to time-out operations. A common alternative
+  is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to
+  specify the lowest possible speed to accept before to consider the transfer
+  timed out.
+
+  The most flexible way is by writing your own time-out logic and using
+  CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and
+  use that to figure out exactly when the right condition is met when the
+  transfer should get stopped.
+
+  5.17 Can I write a server with libcurl?
+
+  No. libcurl offers no functions or building blocks to build any kind of
+  internet protocol server. libcurl is only a client-side library. For server
+  libraries, you need to continue your search elsewhere but there exist many
+  good open source ones out there for most protocols you could possibly want a
+  server for. And there are really good stand-alone ones that have been tested
+  and proven for many years. There's no need for you to reinvent them!
+
 
 6. License Issues
 
@@ -1345,12 +1431,16 @@ FAQ
   You do not have to reveal or make public any changes to the libcurl source
   code.
 
-  You do not have to reveal or make public that you are using libcurl within
+  You do not have to broadcast to the world that you are using libcurl within
   your app.
 
-  As can be seen here: http://curl.haxx.se/docs/companies.html and
-  elsewhere, more and more companies are discovering the power
-  of libcurl and take advantage of it even in commercial environments.
+  All we ask is that you disclose "the copyright notice and this permission
+  notice" somewhere. Most probably like in the documentation or in the section
+  where other third party dependencies already are mentioned and acknowledged.
+
+  As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
+  more and more companies are discovering the power of libcurl and take
+  advantage of it even in commercial environments.
 
 
 7. PHP/CURL Issues
@@ -1366,7 +1456,7 @@ FAQ
   CURL (often using all caps) or sometimes ext/curl, but both cause much
   confusion to users which in turn gives us a higher question load.
 
-  7.2 Who write PHP/CURL?
+  7.2 Who wrote PHP/CURL?
 
   PHP/CURL is a module that comes with the regular PHP package. It depends and
   uses libcurl, so you need to have libcurl installed properly first before
index 32589e1..14d7e78 100644 (file)
@@ -13,27 +13,29 @@ curl tool
  - multiple file upload on a single command line
  - custom maximum transfer rate
  - redirectable stderr
+ - metalink support (*13)
 
-libcurl supports
+libcurl
  - full URL syntax with no length limit
  - custom maximum download time
  - custom least download speed acceptable
  - custom output result after completion
  - guesses protocol from host name unless specified
  - uses .netrc
- - progress bar/time specs while downloading
+ - progress bar with time statistics while downloading
  - "standard" proxy environment variables support
  - compiles on win32 (reported builds on 40+ operating systems)
  - selectable network interface for outgoing traffic
  - IPv6 support on unix and Windows
- - persistant connections
+ - persistent connections
  - socks5 support
- - supports user name + password in proxy environment variables
+ - supports user name and password in proxy environment variables
  - operations through proxy "tunnel" (using CONNECT)
- - supports large files (>2GB and >4GB) both upload/download
- - replacable memory functions (malloc, free, realloc, etc)
+ - support for large files (>2GB and >4GB) during upload and download
+ - replaceable memory functions (malloc, free, realloc, etc)
  - asynchronous name resolving (*6)
  - both a push and a pull style interface
+ - international domain names (*11)
 
 HTTP
  - HTTP/1.1 compliant (optionally uses 1.0)
@@ -43,7 +45,7 @@ HTTP
  - POST
  - Pipelining
  - multipart formpost (RFC1867-style)
- - authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
+ - authentication: Basic, Digest, NTLM (*9), GSS-Negotiate/Negotiate (*3) and
    SPNEGO (*4) to server and proxy
  - resume (both GET and PUT)
  - follow redirects
@@ -60,7 +62,8 @@ HTTP
  - via http-proxy
  - retrieve file modification date
  - Content-Encoding support for deflate and gzip
- - "Transfer-Encoding: chunked" support for "uploads"
+ - "Transfer-Encoding: chunked" support in uploads
+ - data compression (*12)
 
 HTTPS (*1)
  - (all the HTTP features)
@@ -68,12 +71,13 @@ HTTPS (*1)
  - verify server certificate
  - via http-proxy
  - select desired encryption
- - force usage of a specific SSL version (SSLv2(*7), SSLv3 or TLSv1)
+ - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
 
 FTP
  - download
  - authentication
- - kerberos4 (*5), kerberos5 (*3)
+ - kerberos4 (*5)
+ - kerberos5 (*3)
  - active/passive using PORT, EPRT, PASV or EPSV
  - single file size information (compare to HTTP HEAD)
  - 'type=' URL support
@@ -93,7 +97,7 @@ FTP
 
 FTPS (*1)
  - implicit ftps:// support that use SSL on both connections
- - explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
+ - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
    connection to use SSL for both or one of the connections
 
 SCP (*8)
@@ -104,7 +108,8 @@ SFTP (*8)
  - with custom commands sent before/after the transfer
 
 TFTP
- - download / upload
+ - download
+ - upload
 
 TELNET
  - connection negotiation
@@ -119,18 +124,73 @@ DICT
 
 FILE
  - URL support
- - "uploads"
+ - upload
  - resume
 
+SMTP
+ - authentication: Plain, Login, CRAM-MD5, Digest-MD5 and NTLM (*9)
+ - send e-mails
+ - mail from support
+ - mail size support
+ - mail auth support for trusted server-to-server relaying
+ - multiple recipients
+ - via http-proxy
+
+SMTPS (*1)
+ - implicit smtps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
+ - via http-proxy
+
+POP3
+ - authentication: Clear Text, APOP and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
+   NTLM (*9)
+ - list e-mails
+ - retrieve e-mails
+ - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
+   custom requests
+ - via http-proxy
+
+POP3S (*1)
+ - implicit pop3s:// support
+ - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
+ - via http-proxy
+
+IMAP
+ - authentication: Clear Text and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
+   NTLM (*9)
+ - list the folders of a mailbox
+ - select a mailbox with support for verifing the UIDVALIDITY
+ - fetch e-mails with support for specifing the UID and SECTION
+ - upload e-mails via the append command
+ - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
+   STORE, COPY and UID via custom requests
+ - via http-proxy
+
+IMAPS (*1)
+ - implicit imaps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
+ - via http-proxy
+
 FOOTNOTES
 =========
 
-  *1 = requires OpenSSL, GnuTLS, NSS, yassl or PolarSSL
+  *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, schannel (native
+       Windows), Secure Transport (native iOS/OS X) or qssl (native IBM i)
   *2 = requires OpenLDAP
-  *3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
+  *3 = requires a GSSAPI-compliant library, such as Heimdal or similar
   *4 = requires FBopenssl
-  *5 = requires a krb4 library, such as the MIT one or similar.
+  *5 = requires a krb4 library, such as the MIT one or similar
   *6 = requires c-ares
-  *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
+  *7 = requires OpenSSL, NSS, qssl, schannel or Secure Transport; GnuTLS, for
+       example, only supports SSLv3 and TLSv1
   *8 = requires libssh2
-  *9 = requires OpenSSL, GnuTLS, NSS or yassl
+  *9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
+       Windows)
+  *10 = requires any of the SSL libraries in (*1) above other than axTLS, which
+        does not support SSLv3
+  *11 = requires libidn or Windows
+  *12 = requires libz
+  *13 = requires libmetalink, and either an Apple or Microsoft operating
+        system, or OpenSSL, or GnuTLS, or NSS
index e04fb53..3c14099 100644 (file)
@@ -7,19 +7,19 @@
                           How cURL Became Like This
 
 
-In the second half of 1997, Daniel Stenberg came up with the idea to make
+Towards the end of 1996, Daniel Stenberg came up with the idea to make
 currency-exchange calculations available to Internet Relay Chat (IRC)
 users. All the necessary data are published on the Web; he just needed to
 automate their retrieval.
 
 Daniel simply adopted an existing command-line open-source tool, httpget, that
-Brazilian Rafael Sagula had written. After a few minor adjustments, it did
-just what he needed.
+Brazilian Rafael Sagula had written and recently release version 0.1 of. After
+a few minor adjustments, it did just what he needed. HttpGet 1.0 was released
+on April 8th 1997 with brand new HTTP proxy support.
 
-Soon, he found currencies on a GOPHER site, so support for that had to go in,
-and not before long FTP download support was added as well. The name of the
-project was changed to urlget to better fit what it actually did now, since
-the http-only days were already passed.
+We soon found and fixed support for getting currencies over GOPHER.  Once FTP
+download support was added, the name of the project was changed and urlget 2.0
+was released in August 1997. The http-only days were already passed.
 
 The project slowly grew bigger. When upload capabilities were added and the
 name once again was misleading, a second name change was made and on March 20,
diff --git a/docs/HTTP-COOKIES b/docs/HTTP-COOKIES
new file mode 100644 (file)
index 0000000..818e161
--- /dev/null
@@ -0,0 +1,123 @@
+Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
+                                  _   _ ____  _
+                              ___| | | |  _ \| |
+                             / __| | | | |_) | |
+                            | (__| |_| |  _ <| |___
+                             \___|\___/|_| \_\_____|
+
+
+HTTP Cookies
+
+ 1. HTTP Cookies
+ 1.1 Cookie overview
+ 1.2 Cookies saved to disk
+ 1.3 Cookies with curl the command line tool
+ 1.4 Cookies with libcurl
+ 1.5 Cookies with javascript
+
+==============================================================================
+
+1. HTTP Cookies
+
+  1.1 Cookie overview
+
+  HTTP cookies are pieces of 'name=contents' snippets that a server tells the
+  client to hold and then the client sends back those the server on subsequent
+  requests to the same domains/paths for which the cookies were set.
+
+  Cookies are either "session cookies" which typically are forgotten when the
+  session is over which is often translated to equal when browser quits, or
+  the cookies aren't session cookies they have expiration dates after which
+  the client will throw them away.
+
+  Cookies are set to the client with the Set-Cookie: header and are sent to
+  servers with the Cookie: header.
+
+  For a very long time, the only spec explaining how to use cookies was the
+  original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
+
+  In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published
+  and details how cookies work within HTTP.
+
+  1.2 Cookies saved to disk
+
+  Netscape once created a file format for storing cookies on disk so that they
+  would survive browser restarts. curl adopted that file format to allow
+  sharing the cookies with browsers, only to see browsers move away from that
+  format. Modern browsers no longer use it, while curl still does.
+
+  The netscape cookie file format stores one cookie per physical line in the
+  file with a bunch of associated meta data, each field separated with
+  TAB. That file is called the cookiejar in curl terminology.
+
+  When libcurl saves a cookiejar, it creates a file header of its own in which
+  there is a URL mention that will link to the web version of this document.
+
+  1.3 Cookies with curl the command line tool
+
+  curl has a full cookie "engine" built in. If you just activate it, you can
+  have curl receive and send cookies exactly as mandated in the specs.
+
+  Command line options:
+
+  -b, --cookie
+
+    tell curl a file to read cookies from and start the cookie engine, or if
+    it isn't a file it will pass on the given string. -b name=var works and so
+    does -b cookiefile.
+
+  -j, --junk-session-cookies
+
+    when used in combination with -b, it will skip all "session cookies" on
+    load so as to appear to start a new cookie session.
+
+  -c, --cookie-jar
+
+    tell curl to start the cookie engine and write cookies to the given file
+    after the request(s)
+
+  1.4 Cookies with libcurl
+
+  libcurl offers several ways to enable and interface the cookie engine. These
+  options are the ones provided by the native API. libcurl bindings may offer
+  access to them using other means.
+
+  CURLOPT_COOKIE
+
+    Is used when you want to specify the exact contents of a cookie header to
+    send to the server.
+
+  CURLOPT_COOKIEFILE
+
+    Tell libcurl to activate the cookie engine, and to read the initial set of
+    cookies from the given file. Read-only.
+
+  CURLOPT_COOKIEJAR
+
+    Tell libcurl to activate the cookie engine, and when the easy handle is
+    closed save all known cookies to the given cookiejar file. Write-only.
+
+  CURLOPT_COOKIELIST
+
+    Provide detailed information about a single cookie to add to the internal
+    storage of cookies. Pass in the cookie as a HTTP header with all the
+    details set, or pass in a line from a netscape cookie file. This option
+    can also be used to flush the cookies etc.
+    
+  CURLINFO_COOKIELIST
+
+    Extract cookie information from the internal cookie storage as a linked
+    list.
+
+  1.5 Cookies with javascript
+
+  These days a lot of the web is built up by javascript. The webbrowser loads
+  complete programs that render the page you see. These javascript programs
+  can also set and access cookies.
+
+  Since curl and libcurl are plain HTTP clients without any knowledge of or
+  capability to handle javascript, such cookies will not be detected or used.
+
+  Often, if you want to mimic what a browser does on such web sites, you can
+  record web browser HTTP traffic when using such a site and then repeat the
+  cookie operations using curl or libcurl.
index 9a5844f..4140359 100644 (file)
@@ -14,6 +14,12 @@ Installing Binary Packages
    binary package. This document describes how to compile, build and install
    curl and libcurl from source code.
 
+Building from git
+=================
+
+   If you get your code off a git repository, see the GIT-INFO file in the
+   root directory for specific instructions on how to proceed.
+
 UNIX
 ====
    A normal unix installation is made in three or four steps (after you've
@@ -129,18 +135,18 @@ UNIX
      default. But if you want to alter it, you can select how to deal with
      each individual library.
 
-     To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
-     you need to use both --without-ssl and --with-gnutls.
+     To build with GnuTLS for SSL/TLS, use both --without-ssl and
+     --with-gnutls.
 
-     To build with yassl support instead of OpenSSL or GnuTLS, you must build
-     yassl with its OpenSSL emulation enabled and point to that directory root
-     with configure --with-ssl.
+     To build with Cyassl for SSL/TLS, use both --without-ssl and
+     --with-cyassl.
 
-     To build with NSS support instead of OpenSSL for SSL/TLS, note that
-     you need to use both --without-ssl and --with-nss.
+     To build with NSS for SSL/TLS, use both --without-ssl and --with-nss.
 
-     To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
-     you need to use both --without-ssl and --with-polarssl.
+     To build with PolarSSL for SSL/TLS, use both --without-ssl and
+     --with-polarssl.
+
+     To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls.
 
      To get GSSAPI support, build with --with-gssapi and have the MIT or
      Heimdal Kerberos 5 packages installed.
@@ -148,6 +154,9 @@ UNIX
      To get support for SCP and SFTP, build with --with-libssh2 and have
      libssh2 0.16 or later installed.
 
+     To get Metalink support, build with --with-libmetalink and have the
+     libmetalink packages installed.
+
    SPECIAL CASES
    -------------
    Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
@@ -188,6 +197,9 @@ Win32
    first to rebuild every single library your app uses as well as your
    app using the debug multithreaded dynamic C runtime.
 
+   If you get linkage errors read section 5.7 of the FAQ document.
+
+
    MingW32
    -------
 
@@ -208,9 +220,9 @@ Win32
    adjust as necessary. It is also possible to override these paths with
    environment variables, for example:
 
-     set ZLIB_PATH=c:\zlib-1.2.3
-     set OPENSSL_PATH=c:\openssl-0.9.8k
-     set LIBSSH2_PATH=c:\libssh2-1.1
+     set ZLIB_PATH=c:\zlib-1.2.8
+     set OPENSSL_PATH=c:\openssl-0.9.8y
+     set LIBSSH2_PATH=c:\libssh2-1.4.3
 
    ATTENTION: if you want to build with libssh2 support you have to use latest
    version 0.17 - previous versions will NOT work with 7.17.0 and later!
@@ -229,7 +241,7 @@ Win32
 
    If you want to enable LDAPS support then set LDAPS=1.
 
-   - optional MingW32-built OpenlDAP SDK available from:
+   - optional MingW32-built OpenLDAP SDK available from:
      http://www.gknw.net/mirror/openldap/
    - optional recent Novell CLDAP SDK available from:
      http://developer.novell.com/ndk/cldap.htm
@@ -311,7 +323,7 @@ Win32
    documentation on how to compile zlib. Define the ZLIB_PATH environment
    variable to the location of zlib.h and zlib.lib, for example:
 
-     set ZLIB_PATH=c:\zlib-1.2.3
+     set ZLIB_PATH=c:\zlib-1.2.8
 
    Then run 'nmake vc-zlib' in curl's root directory.
 
@@ -325,7 +337,7 @@ Win32
    Before running nmake define the OPENSSL_PATH environment variable with
    the root/base directory of OpenSSL, for example:
 
-     set OPENSSL_PATH=c:\openssl-0.9.8k
+     set OPENSSL_PATH=c:\openssl-0.9.8y
 
    Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
    directory.  'nmake vc-ssl' will create a libcurl static and dynamic
@@ -347,7 +359,7 @@ Win32
    source distribution archive to allow proper building of the two included
    projects, the libcurl library and the curl tool.
 
-   1) Open the vc6curl.dsw workspace with MSVC6's IDE.
+   1) Open the vs/vc6/vc6curl.dsw workspace with MSVC6's IDE.
    2) Select 'Build' from top menu.
    3) Select 'Batch Build' from dropdown menu.
    4) Make sure that the eight project configurations are 'checked'.
@@ -355,12 +367,12 @@ Win32
    6) Once the eight project configurations are built you are done.
 
    Dynamic and static libcurl libraries are built in debug and release flavours,
-   and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
-   LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
+   and can be located each one in its own subdirectory, dll-debug, dll-release,
+   lib-debug and lib-release, all of them below the 'vs/vc6/lib' subdirectory.
 
    In the same way four curl executables are created, each using its respective
    library. The resulting curl executables are located in its own subdirectory,
-   DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
+   dll-debug, dll-release, lib-debug and lib-release, below 'vs/vc6/src' subdir.
 
    These reference VC++ 6.0 configurations are generated using the dynamic CRT.
 
@@ -374,30 +386,49 @@ Win32
    Borland C++ compiler
    ---------------------
 
-   compile openssl
+   Ensure that your build environment is properly set up to use the compiler
+   and associated tools. PATH environment variable must include the path to
+   bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
+
+   It is advisable to set environment variable BCCDIR to the base path of
+   the compiler installation.
+
+     set BCCDIR=c:\Borland\BCC55
+
+   In order to build a plain vanilla version of curl and libcurl run the
+   following command from curl's root directory:
+
+     make borland
+
+   To build curl and libcurl with zlib and OpenSSL support set environment
+   variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
+   already built zlib and OpenSSL libraries and from curl's root directory
+   run command:
+
+     make borland-ssl-zlib
+
+   libcurl library will be built in 'lib' subdirectory while curl tool
+   is built in 'src' subdirectory. In order to use libcurl library it is
+   advisable to modify compiler's configuration file bcc32.cfg located
+   in c:\Borland\BCC55\bin to reflect the location of libraries include
+   paths for example the '-I' line could result in something like:
 
-   Make sure you include the paths to curl/include and openssl/inc32 in
-   your bcc32.cnf file
+     -I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
 
-   eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
+   bcc3.cfg '-L' line could also be modified to reflect the location of
+   of libcurl library resulting for example:
 
-   Check to make sure that all of the sources listed in lib/Makefile.b32
-   are present in the /path_to_curl/lib directory. (Check the src
-   directory for missing ones.)
+     -L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
 
-   Make sure the environment variable "BCCDIR" is set to the install
-   location for the compiler eg : c:\Borland\BCC55
+   In order to build sample program 'simple.c' from the docs\examples
+   subdirectory run following command from mentioned subdirectory:
 
-   command line:
-   make -f /path_to_curl/lib/Makefile-ssl.b32
+     bcc32 simple.c libcurl.lib cw32mt.lib
 
-   compile simplessl.c with appropriate links
+   In order to build sample program simplessl.c an SSL enabled libcurl
+   is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
+   libraries.
 
-   c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
-                                 -L c:\borland\bcc55\lib\psdk\ws2_32.lib
-                                 -L c:\openssl\out32\libeay32.lib
-                                 -L c:\openssl\out32\ssleay32.lib
-                                 simplessl.c
 
    OTHER MSVC IDEs
    ---------------
@@ -433,12 +464,40 @@ Win32
    possibilities:
 
    - Modify lib/config-win32.h
-   - Modify lib/setup.h
+   - Modify lib/curl_setup.h
    - Modify lib/Makefile.vc6
    - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
      in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
 
 
+   Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
+   --------------------------------------------------------------------
+
+   In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack
+   it is necessary to make definition of preprocessor symbol USE_LWIPSOCK
+   visible to libcurl and curl compilation processes. To set this definition
+   you have the following alternatives:
+
+   - Modify lib/config-win32.h and src/config-win32.h
+   - Modify lib/Makefile.vc6
+   - Add definition to Project/Settings/C/C++/General/Preprocessor Definitions
+     in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
+
+   Once that libcurl has been built with BSD-style lwIP TCP/IP stack support,
+   in order to use it with your program it is mandatory that your program
+   includes lwIP header file <lwip/opt.h> (or another lwIP header that includes
+   this) before including any libcurl header. Your program does not need the
+   USE_LWIPSOCK preprocessor definition which is for libcurl internals only.
+
+   Compilation has been verified with lwIP 1.4.0 and contrib-1.4.0 from:
+
+   http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip
+   http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip
+
+   This BSD-style lwIP TCP/IP stack support must be considered experimental
+   given that it has been verified that lwIP 1.4.0 still needs some polish,
+   and libcurl might yet need some additional adjustment, caveat emptor.
+
    Important static libcurl usage note
    -----------------------------------
 
@@ -447,6 +506,38 @@ Win32
    dynamic import symbols.
 
 
+Apple iOS and Mac OS X
+======================
+   On recent Apple operating systems, curl can be built to use Apple's
+   SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with
+   Secure Transport for SSL/TLS, use the configure option --with-darwinssl. (It
+   is not necessary to use the option --without-ssl.) This feature requires iOS
+   5.0 or later, or OS X 10.5 ("Leopard") or later.
+
+   When Secure Transport is in use, the curl options --cacert and --capath and
+   their libcurl equivalents, will be ignored, because Secure Transport uses
+   the certificates stored in the Keychain to evaluate whether or not to trust
+   the server. This, of course, includes the root certificates that ship with
+   the OS. The --cert and --engine options, and their libcurl equivalents, are
+   currently unimplemented in curl with Secure Transport.
+
+   For OS X users: In OS X 10.8 ("Mountain Lion"), Apple made a major
+   overhaul to the Secure Transport API that, among other things, added
+   support for the newer TLS 1.1 and 1.2 protocols. To get curl to support
+   TLS 1.1 and 1.2, you must build curl on Mountain Lion or later, or by
+   using the equivalent SDK. If you set the MACOSX_DEPLOYMENT_TARGET
+   environmental variable to an earlier version of OS X prior to building curl,
+   then curl will use the new Secure Transport API on Mountain Lion and later,
+   and fall back on the older API when the same curl binary is executed on
+   older cats. For example, running these commands in curl's directory in the
+   shell will build the code such that it will run on cats as old as OS X 10.6
+   ("Snow Leopard") (using bash):
+
+      export MACOSX_DEPLOYMENT_TARGET="10.6"
+      ./configure --with-darwinssl
+      make
+
+
 IBM OS/2
 ========
    Building under OS/2 is not much different from building under unix.
@@ -484,7 +575,7 @@ VMS
    Curl seems to work with FTP & HTTP other protocols are not tested.  (the
    perl http/ftp testing server supplied as testing too cannot work on VMS
    because vms has no concept of fork(). [ I tried to give it a whack, but
-   thats of no use.
+   that's of no use.
 
    SSL stuff has not been ported.
 
@@ -617,7 +708,7 @@ NetWare
      you can find precompiled packages at:
      http://www.gknw.net/development/ossl/netware/
      for CLIB-based builds OpenSSL 0.9.8h or later is required  - earlier versions
-     dont support buildunf with CLIB BSD sockets.
+     don't support building with CLIB BSD sockets.
    - optional SSH2 sources (version 0.17 or later);
 
    Set a search path to your compiler, linker and tools; on Linux make
@@ -638,7 +729,7 @@ NetWare
    Builds automatically created 8 times a day from current git are here:
    http://www.gknw.net/mirror/curl/autobuilds/
    the status of these builds can be viewed at the autobuild table:
-   http://curl.haxx.se/auto/
+   http://curl.haxx.se/dev/builds.html
 
 
 eCos
@@ -784,7 +875,44 @@ VxWorks
 
 Android
 =======
-   See the build notes in the Android.mk file.
+   Method using the static makefile:
+      - see the build notes in the packages/Android/Android.mk file.
+
+   Method using a configure cross-compile (tested with Android NDK r7c, r8):
+      - prepare the toolchain of the Android NDK for standalone use; this can
+        be done by invoking the script:
+        ./build/tools/make-standalone-toolchain.sh
+        which creates a usual cross-compile toolchain. Lets assume that you put
+        this toolchain below /opt then invoke configure with something like:
+        export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
+        ./configure --host=arm-linux-androideabi [more configure options]
+        make
+      - if you want to compile directly from our GIT repo you might run into
+        this issue with older automake stuff:
+        checking host system type...
+        Invalid configuration `arm-linux-androideabi':
+        system `androideabi' not recognized
+        configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
+        this issue can be fixed with using more recent versions of config.sub
+        and config.guess which can be obtained here:
+        http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
+        you need to replace your system-own versions which usually can be
+        found in your automake folder:
+        find /usr -name config.sub
+
+   Wrapper for pkg-config
+      - In order to make proper use of pkg-config so that configure is able to
+        find all dependencies you should create a wrapper script for pkg-config;
+        file /opt/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-pkg-config:
+
+        #!/bin/sh
+        SYSROOT=$(dirname ${0%/*})/sysroot
+        export PKG_CONFIG_DIR=
+        export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
+        export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
+        exec pkg-config "$@"
+
+        also create a copy or symlink with name arm-unknown-linux-androideabi-pkg-config.
 
 
 CROSS COMPILE
@@ -871,8 +999,9 @@ REDUCING SIZE
    The GNU compiler and linker have a number of options that can reduce the
    size of the libcurl dynamic libraries on some platforms even further.
    Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
-   configure command-line:
-     CFLAGS="-ffunction-sections -fdata-sections" \
+   configure command-line, e.g.
+     CFLAGS="-Os -ffunction-sections -fdata-sections \
+             -fno-unwind-tables -fno-asynchronous-unwind-tables" \
      LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
 
    Be sure also to strip debugging symbols from your binaries after
@@ -882,9 +1011,9 @@ REDUCING SIZE
    .comment section).
 
    Using these techniques it is possible to create a basic HTTP-only shared
-   libcurl library for i386 Linux platforms that is only 98 KiB in size, and
-   an FTP-only library that is 94 KiB in size (as of libcurl version 7.20.0,
-   using gcc 4.3.3).
+   libcurl library for i386 Linux platforms that is only 106 KiB in size, and
+   an FTP-only library that is 108 KiB in size (as of libcurl version 7.27.0,
+   using gcc 4.6.3).
 
    You may find that statically linking libcurl to your application will
    result in a lower total size than dynamically linking.
@@ -916,9 +1045,9 @@ PORTS
         - Alpha OpenVMS V7.1-1H2
         - Alpha Tru64 v5.0 5.1
         - AVR32 Linux
-        - ARM Android 1.5, 2.1
+        - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x
         - ARM INTEGRITY
-        - ARM iPhone OS
+        - ARM iOS
         - Cell Linux
         - Cell Cell OS
         - HP-PA HP-UX 9.X 10.X 11.X
@@ -956,6 +1085,7 @@ PORTS
         - i386 HURD
         - i386 Haiku OS
         - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
+        - i386 Mac OS X
         - i386 MINIX 3.1
         - i386 NetBSD
         - i386 Novell NetWare
@@ -980,17 +1110,22 @@ PORTS
 Useful URLs
 ===========
 
-c-ares    http://daniel.haxx.se/projects/c-ares/license.html
-GNU GSS   http://www.gnu.org/software/gss/
-GnuTLS    http://www.gnu.org/software/gnutls/
-Heimdal   http://www.pdc.kth.se/heimdal/
-libidn    http://www.gnu.org/software/libidn/
-libssh2   http://www.libssh2.org
-MingW     http://www.mingw.org
+axTLS        http://axtls.sourceforge.net/
+c-ares       http://c-ares.haxx.se/
+GNU GSS      http://www.gnu.org/software/gss/
+GnuTLS       http://www.gnu.org/software/gnutls/
+Heimdal      http://www.pdc.kth.se/heimdal/
+libidn       http://www.gnu.org/software/libidn/
+libmetalink  https://launchpad.net/libmetalink/
+libssh2      http://www.libssh2.org/
 MIT Kerberos http://web.mit.edu/kerberos/www/dist/
-NSS       http://www.mozilla.org/projects/security/pki/nss/
-OpenLDAP  http://www.openldap.org
-OpenSSL   http://www.openssl.org
-PolarSSL  http://polarssl.org
-yassl     http://www.yassl.com/
-Zlib      http://www.gzip.org/zlib/
+NSS          http://www.mozilla.org/projects/security/pki/nss/
+OpenLDAP     http://www.openldap.org/
+OpenSSL      http://www.openssl.org/
+PolarSSL     http://polarssl.org/
+yassl        http://www.yassl.com/
+Zlib         http://www.zlib.net/
+
+MingW        http://www.mingw.org/
+MinGW-w64    http://mingw-w64.sourceforge.net/
+OpenWatcom   http://www.openwatcom.org/
index 7f58e4b..46d1836 100644 (file)
@@ -26,7 +26,7 @@ exists for a Unix/linux command line environments. This is of little help when
 it comes to Windows O/S.
 
 Secondly the help that does exist for the Windows O/S focused around mingw
-thru a command line argument environment.
+through a command line argument environment.
 
 You may ask "Why is this a problem?"
 
index 9d0bdba..66e11a4 100644 (file)
@@ -15,7 +15,7 @@ INTERNALS
 GIT
 ===
  All changes to the sources are committed to the git repository as soon as
- they're somewhat verified to work. Changes shall be commited as independently
+ they're somewhat verified to work. Changes shall be committed as independently
  as possible so that individual changes can be easier spotted and tracked
  afterwards.
 
@@ -39,22 +39,20 @@ Portability
  libssh2      0.16
  c-ares       1.6.0
  libidn       0.4.1
- *yassl       1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
+ cyassl       2.0.0
  openldap     2.0
  MIT krb5 lib 1.2.4
- qsossl       V5R2M0
- NSS          3.11.x
+ qsossl       V5R3M0
+ NSS          3.12.x
+ axTLS        1.2.7
  Heimdal      ?
 
- * = only partly functional, but that's due to bugs in the third party lib, not
-     because of libcurl code
-
  On systems where configure runs, we aim at working on them all - if they have
  a suitable C compiler. On systems that don't run configure, we strive to keep
  curl running fine on:
 
  Windows      98
- AS/400       V5R2M0
+ AS/400       V5R3M0
  Symbian      9.1
  Windows CE   ?
  TPF          ?
@@ -67,7 +65,7 @@ Portability
  GNU Autoconf 2.57
  GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
  GNU M4       1.4
- perl         4
+ perl         5.004
  roffit       0.5
  groff        ? (any version that supports "groff -Tps -man [in] [out]")
  ps2pdf (gs)  ?
@@ -90,7 +88,7 @@ Windows vs Unix
    do it etc there might be reasons for applications to alter that behaviour.
 
  3. The file descriptors for network communication and file operations are
-    not easily interchangable as in unix.
+    not easily interchangeable as in unix.
 
    We avoid this by not trying any funny tricks on file descriptors.
 
@@ -103,9 +101,9 @@ Windows vs Unix
  Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
  conditionals that deal with features *should* instead be in the format
  '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
- we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
- are supposed to look exactly as a curl_config.h file would have looked like on
a Windows machine!
+ we maintain a curl_config-win32.h file in lib directory that is supposed to
+ look exactly as a curl_config.h file would have looked like on a Windows
+ machine!
 
  Generally speaking: always remember that this will be compiled on dozens of
  operating systems. Don't walk on the edge.
@@ -113,6 +111,9 @@ Windows vs Unix
 Library
 =======
 
+ (See LIBCURL-STRUCTS for a separate document describing all major internal
+ structs and their purposes.)
+
  There are plenty of entry points to the library, namely each publicly defined
  function that libcurl offers to applications. All of those functions are
  rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
@@ -137,16 +138,18 @@ Library
  options is documented in the man page. This function mainly sets things in
  the 'SessionHandle' struct.
 
- curl_easy_perform() does a whole lot of things:
+ curl_easy_perform() is just a wrapper function that makes use of the multi
+ API.  It basically curl_multi_init(), curl_multi_add_handle(),
+ curl_multi_wait(), and curl_multi_perform() until the transfer is done and
+ then returns.
 
- It starts off in the lib/easy.c file by calling Curl_perform() and the main
- work then continues in lib/url.c. The flow continues with a call to
- Curl_connect() to connect to the remote site.
+ Some of the most important key functions in url.c are called from multi.c
+ when certain key steps are to be made in the transfer operation.
 
  o Curl_connect()
 
-   ... analyzes the URL, it separates the different components and connects to
-   the remote host. This may involve using a proxy and/or using SSL. The
+   Analyzes the URL, it separates the different components and connects to the
+   remote host. This may involve using a proxy and/or using SSL. The
    Curl_resolv() function in lib/hostip.c is used for looking up host names
    (it does then use the proper underlying method, which may vary between
    platforms and builds).
@@ -162,10 +165,7 @@ Library
  o Curl_do()
 
    Curl_do() makes sure the proper protocol-specific function is called. The
-   functions are named after the protocols they handle. Curl_ftp(),
-   Curl_http(), Curl_dict(), etc. They all reside in their respective files
-   (ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by
-   Curl_ftp().
+   functions are named after the protocols they handle.
 
    The protocol-specific functions of course deal with protocol-specific
    negotiations and setup. They have access to the Curl_sendf() (from
@@ -182,12 +182,11 @@ Library
 
    Some time during the DO function, the Curl_setup_transfer() function must
    be called with some basic info about the upcoming transfer: what socket(s)
-   to read/write and the expected file tranfer sizes (if known).
+   to read/write and the expected file transfer sizes (if known).
 
- o Transfer()
+ o Curl_readwrite()
 
-   Curl_perform() then calls Transfer() in lib/transfer.c that performs the
-   entire file transfer.
+   Called during the transfer of the actual protocol payload.
 
    During transfer, the progress functions in lib/progress.c are called at a
    frequent interval (or at the user's choice, a specified callback might get
@@ -209,33 +208,11 @@ Library
    used. This function is only used when we are certain that no more transfers
    is going to be made on the connection. It can be also closed by force, or
    it can be called to make sure that libcurl doesn't keep too many
-   connections alive at the same time (there's a default amount of 5 but that
-   can be changed with the CURLOPT_MAXCONNECTS option).
+   connections alive at the same time.
 
    This function cleans up all resources that are associated with a single
    connection.
 
- Curl_perform() is the function that does the main "connect - do - transfer -
- done" loop. It loops if there's a Location: to follow.
-
- When completed, the curl_easy_cleanup() should be called to free up used
- resources. It runs Curl_disconnect() on all open connectons.
-
- A quick roundup on internal function sequences (many of these call
- protocol-specific function-pointers):
-
-  curl_connect - connects to a remote site and does initial connect fluff
-   This also checks for an existing connection to the requested site and uses
-   that one if it is possible.
-
-   curl_do - starts a transfer
-    curl_transfer() - transfers data
-   curl_done - ends a transfer
-
-  curl_disconnect - disconnects from a remote site. This is called when the
-   disconnect is really requested, which doesn't necessarily have to be
-   exactly after curl_done in case we want to keep the connection open for
-   a while.
 
  HTTP(S)
 
@@ -249,16 +226,16 @@ Library
  HTTPS uses in almost every means the same procedure as HTTP, with only two
  exceptions: the connect procedure is different and the function used to read
  or write from the socket is different, although the latter fact is hidden in
- the source by the use of curl_read() for reading and curl_write() for writing
+ the source by the use of Curl_read() for reading and Curl_write() for writing
  data to the remote server.
 
  http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
  encoding.
 
- An interesting detail with the HTTP(S) request, is the add_buffer() series of
- functions we use. They append data to one single buffer, and when the
building is done the entire request is sent off in one single write. This is
- done this way to overcome problems with flawed firewalls and lame servers.
+ An interesting detail with the HTTP(S) request, is the Curl_add_buffer()
+ series of functions we use. They append data to one single buffer, and when
the building is done the entire request is sent off in one single write. This
is done this way to overcome problems with flawed firewalls and lame servers.
 
  FTP
 
@@ -284,14 +261,14 @@ Library
 
  LDAP
 
- Everything LDAP is in lib/ldap.c.
+ Everything LDAP is in lib/ldap.c and lib/openldap.c
 
  GENERAL
 
  URL encoding and decoding, called escaping and unescaping in the source code,
  is found in lib/escape.c.
 
- While transfering data in Transfer() a few functions might get used.
+ While transferring data in Transfer() a few functions might get used.
  curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
 
  lib/getenv.c offers curl_getenv() which is for reading environment variables
@@ -303,7 +280,7 @@ Library
  lib/netrc.c holds the .netrc parser
 
  lib/timeval.c features replacement functions for systems that don't have
- gettimeofday() and a few support functions for timeval convertions.
+ gettimeofday() and a few support functions for timeval conversions.
 
  A function named curl_version() that returns the full curl version string is
  found in lib/version.c.
@@ -318,46 +295,38 @@ Persistent Connections
    hold connection-oriented data. It is meant to hold the root data as well as
    all the options etc that the library-user may choose.
  o The 'SessionHandle' struct holds the "connection cache" (an array of
-   pointers to 'connectdata' structs). There's one connectdata struct
-   allocated for each connection that libcurl knows about. Note that when you
-   use the multi interface, the multi handle will hold the connection cache
-   and not the particular easy handle. This of course to allow all easy handles
-   in a multi stack to be able to share and re-use connections.
+   pointers to 'connectdata' structs).
  o This enables the 'curl handle' to be reused on subsequent transfers.
- o When we are about to perform a transfer with curl_easy_perform(), we first
-   check for an already existing connection in the cache that we can use,
-   otherwise we create a new one and add to the cache. If the cache is full
-   already when we add a new connection, we close one of the present ones. We
-   select which one to close dependent on the close policy that may have been
-   previously set.
- o When the transfer operation is complete, we try to leave the connection
-   open. Particular options may tell us not to, and protocols may signal
-   closure on connections and then we don't keep it open of course.
+ o When libcurl is told to perform a transfer, it first checks for an already
+   existing connection in the cache that we can use. Otherwise it creates a
+   new one and adds that the cache. If the cache is full already when a new
+   conncetion is added added, it will first close the oldest unused one.
+ o When the transfer operation is complete, the connection is left
+   open. Particular options may tell libcurl not to, and protocols may signal
+   closure on connections and then they won't be kept open of course.
  o When curl_easy_cleanup() is called, we close all still opened connections,
    unless of course the multi interface "owns" the connections.
 
- You do realize that the curl handle must be re-used in order for the
persistent connections to work.
+ The curl handle must be re-used in order for the persistent connections to
+ work.
 
 multi interface/non-blocking
 ============================
 
- We make an effort to provide a non-blocking interface to the library, the
- multi interface. To make that interface work as good as possible, no
- low-level functions within libcurl must be written to work in a blocking
- manner.
+ The multi interface is a non-blocking interface to the library. To make that
+ interface work as good as possible, no low-level functions within libcurl
+ must be written to work in a blocking manner. (There are still a few spots
+ violating this rule.)
 
  One of the primary reasons we introduced c-ares support was to allow the name
  resolve phase to be perfectly non-blocking as well.
 
- The ultimate goal is to provide the easy interface simply by wrapping the
- multi interface functions and thus treat everything internally as the multi
- interface is the single interface we have.
-
- The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
- and adjust the code to allow non-blocking operations even on multi-stage
- protocols. The DICT, LDAP and TELNET are crappy examples and they are subject
- for rewrite in the future to better fit the libcurl protocol family.
+ The FTP and the SFTP/SCP protocols are examples of how we adapt and adjust
+ the code to allow non-blocking operations even on multi-stage command-
+ response protocols. They are built around state machines that return when
+ they would otherwise block waiting for data.  The DICT, LDAP and TELNET
+ protocols are crappy examples and they are subject for rewrite in the future
+ to better fit the libcurl protocol family.
 
 SSL libraries
 =============
@@ -379,7 +348,9 @@ Library Symbols
  All symbols used internally in libcurl must use a 'Curl_' prefix if they're
  used in more than a single file. Single-file symbols must be made static.
  Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
- but they are to be changed to follow this pattern in future versions.)
+ but they are to be changed to follow this pattern in future versions.) Public
+ API functions are marked with CURL_EXTERN in the public header files so that
+ all others can be hidden on platforms where this is possible.
 
 Return Codes and Informationals
 ===============================
@@ -406,12 +377,12 @@ API/ABI
 Client
 ======
 
- main() resides in src/main.c together with most of the client code.
+ main() resides in src/tool_main.c.
 
- src/hugehelp.c is automatically generated by the mkhelp.pl perl script to
- display the complete "manual" and the src/urlglob.c file holds the functions
- used for the URL-"globbing" support. Globbing in the sense that the {} and []
- expansion stuff is there.
+ src/tool_hugehelp.c is automatically generated by the mkhelp.pl perl script
+ to display the complete "manual" and the src/tool_urlglob.c file holds the
+ functions used for the URL-"globbing" support. Globbing in the sense that the
{} and [] expansion stuff is there.
 
  The client mostly messes around to setup its 'config' struct properly, then
  it calls the curl_easy_*() functions of the library and when it gets back
@@ -423,8 +394,8 @@ Client
  curl_easy_getinfo() function to extract useful information from the curl
  session.
 
Recent versions may loop and do all this several times if many URLs were
specified on the command line or config file.
It may loop and do all this several times if many URLs were specified on the
+ command line or config file.
 
 Memory Debugging
 ================
@@ -458,31 +429,43 @@ Memory Debugging
 Test Suite
 ==========
 
- Since November 2000, a test suite has evolved. It is placed in its own
- subdirectory directly off the root in the curl archive tree, and it contains
a bunch of scripts and a lot of test case data.
+ The test suite is placed in its own subdirectory directly off the root in the
+ curl archive tree, and it contains a bunch of scripts and a lot of test case
+ data.
 
- The main test script is runtests.pl that will invoke the two servers
+ The main test script is runtests.pl that will invoke test servers like
  httpserver.pl and ftpserver.pl before all the test cases are performed. The
  test suite currently only runs on unix-like platforms.
 
- You'll find a complete description of the test case data files in the
- tests/README file.
+ You'll find a description of the test suite in the tests/README file, and the
+ test case data files in the tests/FILEFORMAT file.
 
  The test suite automatically detects if curl was built with the memory
- debugging enabled, and if it was it will detect memory leaks too.
+ debugging enabled, and if it was it will detect memory leaks, too.
 
 Building Releases
 =================
 
  There's no magic to this. When you consider everything stable enough to be
- released, run the 'maketgz' script (using 'make distcheck' will give you a
- pretty good view on the status of the current sources). maketgz prompts for
- version number of the client and the library before it creates a release
- archive. maketgz uses 'make dist' for the actual archive building, why you
- need to fill in the Makefile.am files properly for which files that should
- be included in the release archives.
-
- NOTE: you need to have curl checked out from git to be able to do a proper
+ released, do this:
+
+   1. Tag the source code accordingly.
+
+   2. run the 'maketgz' script (using 'make distcheck' will give you a pretty
+      good view on the status of the current sources). maketgz requires a
+      version number and creates the release archive. maketgz uses 'make dist'
+      for the actual archive building, why you need to fill in the Makefile.am
+      files properly for which files that should be included in the release
+      archives.
+
+   3. When that's complete, sign the output files.
+
+   4. Upload
+
+   5. Update web site and changelog on site
+
+   6. Send announcement to the mailing lists
+
+ NOTE: you must have curl checked out from git to be able to do a proper
  release build. The release tarballs do not have everything setup in order to
  do releases properly.
index 9647891..7bd6e6e 100644 (file)
@@ -3,20 +3,57 @@ 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!
 
+83. curl is unable to load non-default openssl engines, because openssl isn't
+  initialized properly. This seems to require OpenSSL_config() or
+  CONF_modules_load_file() to be used by libcurl but the first seems to not
+  work and we've gotten not reports from tests with the latter. Possibly we
+  need to discuss with OpenSSL developers how this is supposed to be done. We
+  need users with actual external openssl engines for testing to work on this.
+  http://curl.haxx.se/bug/view.cgi?id=1208
+
+82. When building with the Windows Borland compiler, it fails because the
+  "tlib" tool doesn't support hyphens (minus signs) in file names and we have
+  such in the build.
+  http://curl.haxx.se/bug/view.cgi?id=1222
+
+81. When using -J (with -O), automaticly resumed downloading together with "-C
+  -" fails. Without -J the same command line works! This happens because the
+  resume logic is worked out before the target file name (and thus its
+  pre-transfer size) has been figured out!
+  http://curl.haxx.se/bug/view.cgi?id=1169
+
+80. Curl doesn't recognize certificates in DER format in keychain, but it
+  works with PEM.
+  http://curl.haxx.se/bug/view.cgi?id=3439999
+
+79. SMTP. When sending data to multiple recipients, curl will abort and return
+  failure if one of the recipients indicate failure (on the "RCPT TO"
+  command). Ordinary mail programs would proceed and still send to the ones
+  that can receive data. This is subject for change in the future.
+  http://curl.haxx.se/bug/view.cgi?id=3438362
+
+78. curl and libcurl don't always signal the client properly when "sending"
+  zero bytes files - it makes for example the command line client not creating
+  any file at all. Like when using FTP.
+  http://curl.haxx.se/bug/view.cgi?id=3438362
+
+77. CURLOPT_FORBID_REUSE on a handle prevents NTLM from working since it
+  "abuses" the underlying connection re-use system and if connections are
+  forced to close they break the NTLM support.
+
 76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
   that platform), and long is only 32 bits. It makes it impossible for
   curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
   option as for all other operating systems.
 
-75. NTLM authentication involving unicode user name or password.
+75. NTLM authentication involving unicode user name or password only works
+  properly if built with UNICODE defined together with the schannel/winssl
+  backend. The original problem was mentioned in:
   http://curl.haxx.se/mail/lib-2009-10/0024.html
   http://curl.haxx.se/bug/view.cgi?id=2944325
 
-74. The HTTP spec allows headers to be merged and become comma-separated
-  instead of being repeated several times. This also include Authenticate: and
-  Proxy-Authenticate: headers and while this hardly every happens in real life
-  it will confuse libcurl which does not properly support it for all headers -
-  like those Authenticate headers.
+  The schannel version verified to work as mentioned in
+  http://curl.haxx.se/mail/lib-2012-07/0073.html
 
 73. if a connection is made to a FTP server but the server then just never
   sends the 220 response or otherwise is dead slow, libcurl will not
@@ -67,13 +104,6 @@ may have been fixed since this was written!
   CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
   not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
 
-57. On VMS-Alpha: When using an http-file-upload the file is not sent to the
-  Server with the correct content-length.  Sending a file with 511 or less
-  bytes, content-length 512 is used.  Sending a file with 513 - 1023 bytes,
-  content-length 1024 is used.  Files with a length of a multiple of 512 Bytes
-  show the correct content-length. Only these files work for upload.
-  http://curl.haxx.se/bug/view.cgi?id=2057858
-
 56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
   server using the multi interface, the commands are not being sent correctly
   and instead the connection is "cancelled" (the operation is considered done)
@@ -116,13 +146,6 @@ may have been fixed since this was written!
 38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
   http://curl.haxx.se/mail/lib-2007-01/0103.html
 
-37. Having more than one connection to the same host when doing NTLM
-  authentication (with performs multiple "passes" and authenticates a
-  connection rather than a HTTP request), and particularly when using the
-  multi interface, there's a risk that libcurl will re-use a wrong connection
-  when doing the different passes in the NTLM negotiation and thus fail to
-  negotiate (in seemingly mysterious ways).
-
 35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
   bad when used with the multi interface.
 
@@ -152,19 +175,12 @@ may have been fixed since this was written!
   to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=1281867
 
 23. SOCKS-related problems:
-  A) libcurl doesn't support SOCKS for IPv6.
   B) libcurl doesn't support FTPS over a SOCKS proxy.
   E) libcurl doesn't support active FTP over a SOCKS proxy
 
   We probably have even more bugs and lack of features when a SOCKS proxy is
   used.
 
-22. Sending files to a FTP server using curl on VMS, might lead to curl
-  complaining on "unaligned file size" on completion. The problem is related
-  to VMS file structures and the perceived file sizes stat() returns. A
-  possible fix would involve sending a "STRU VMS" command.
-  http://curl.haxx.se/bug/view.cgi?id=1156287
-
 21. FTP ASCII transfers do not follow RFC959. They don't convert the data
    accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
    clearly describes how this should be done:
diff --git a/docs/LIBCURL-STRUCTS b/docs/LIBCURL-STRUCTS
new file mode 100644 (file)
index 0000000..20f2d34
--- /dev/null
@@ -0,0 +1,245 @@
+                                  _   _ ____  _
+                              ___| | | |  _ \| |
+                             / __| | | | |_) | |
+                            | (__| |_| |  _ <| |___
+                             \___|\___/|_| \_\_____|
+
+Structs in libcurl
+
+This document should cover 7.32.0 pretty accurately, but will make sense even
+for older and later versions as things don't change drastically that often.
+
+ 1. The main structs in libcurl
+  1.1 SessionHandle
+  1.2 connectdata
+  1.3 Curl_multi
+  1.4 Curl_handler
+  1.5 conncache
+  1.6 Curl_share
+  1.7 CookieInfo
+
+==============================================================================
+
+1. The main structs in libcurl
+
+  1.1 SessionHandle
+
+  The SessionHandle handle struct is the one returned to the outside in the
+  external API as a "CURL *". This is usually known as an easy handle in API
+  documentations and examples.
+
+  Information and state that is related to the actual connection is in the
+  'connectdata' struct. When a transfer is about to be made, libcurl will
+  either create a new connection or re-use an existing one. The particular
+  connectdata that is used by this handle is pointed out by
+  SessionHandle->easy_conn.
+
+  Data and information that regard this particular single transfer is put in
+  the SingleRequest sub-struct.
+
+  When the SessionHandle struct is added to a multi handle, as it must be in
+  order to do any transfer, the ->multi member will point to the Curl_multi
+  struct it belongs to. The ->prev and ->next members will then be used by the
+  multi code to keep a linked list of SessionHandle structs that are added to
+  that same multi handle. libcurl always uses multi so ->multi *will* point to
+  a Curl_multi when a transfer is in progress.
+
+  ->mstate is the multi state of this particular SessionHandle. When
+  multi_runsingle() is called, it will act on this handle according to which
+  state it is in. The mstate is also what tells which sockets to return for a
+  speicific SessionHandle when curl_multi_fdset() is called etc.
+
+  The libcurl source code generally use the name 'data' for the variable that
+  points to the SessionHandle.
+
+
+  1.2 connectdata
+
+  A general idea in libcurl is to keep connections around in a connection
+  "cache" after they have been used in case they will be used again and then
+  re-use an existing one instead of creating a new as it creates a significant
+  performance boost.
+
+  Each 'connectdata' identifies a single physical conncetion to a server. If
+  the connection can't be kept alive, the connection will be closed after use
+  and then this struct can be removed from the cache and freed.
+
+  Thus, the same SessionHandle can be used multiple times and each time select
+  another connectdata struct to use for the connection. Keep this in mind, as
+  it is then important to consider if options or choices are based on the
+  connection or the SessionHandle.
+
+  Functions in libcurl will assume that connectdata->data points to the
+  SessionHandle that uses this connection.
+
+  As a special complexity, some protocols supported by libcurl require a
+  special disconnect procedure that is more than just shutting down the
+  socket. It can involve sending one or more commands to the server before
+  doing so. Since connections are kept in the connection cache after use, the
+  original SessionHandle may no longer be around when the time comes to shut
+  down a particular connection. For this purpose, libcurl holds a special
+  dummy 'closure_handle' SessionHandle in the Curl_multi struct to 
+
+  FTP uses two TCP connections for a typical transfer but it keeps both in
+  this single struct and thus can be considered a single connection for most
+  internal concerns.
+
+  The libcurl source code generally use the name 'conn' for the variable that
+  points to the connectdata.
+
+
+  1.3 Curl_multi
+
+  Internally, the easy interface is implemented as a wrapper around multi
+  interface functions. This makes everything multi interface.
+
+  Curl_multi is the multi handle struct exposed as "CURLM *" in external APIs.
+
+  This struct holds a list of SessionHandle structs that have been added to
+  this handle with curl_multi_add_handle(). The start of the list is ->easyp
+  and ->num_easy is a counter of added SessionHandles.
+
+  ->msglist is a linked list of messages to send back when
+  curl_multi_info_read() is called. Basically a node is added to that list
+  when an individual SessionHandle's transfer has completed.
+
+  ->hostcache points to the name cache. It is a hash table for looking up name
+  to IP. The nodes have a limited life time in there and this cache is meant
+  to reduce the time for when the same name is wanted within a short period of
+  time.
+
+  ->timetree points to a tree of SessionHandles, sorted by the remaining time
+  until it should be checked - normally some sort of timeout. Each
+  SessionHandle has one node in the tree.
+
+  ->sockhash is a hash table to allow fast lookups of socket descriptor to
+  which SessionHandle that uses that descriptor. This is necessary for the
+  multi_socket API.
+
+  ->conn_cache points to the connection cache. It keeps track of all
+  connections that are kept after use. The cache has a maximum size.
+
+  ->closure_handle is described in the 'connectdata' section.
+
+  The libcurl source code generally use the name 'multi' for the variable that
+  points to the Curl_multi struct.
+
+
+  1.4 Curl_handler
+
+  Each unique protocol that is supported by libcurl needs to provide at least
+  one Curl_handler struct. It defines what the protocol is called and what
+  functions the main code should call to deal with protocol specific issues.
+  In general, there's a source file named [protocol].c in which there's a
+  "struct Curl_handler Curl_handler_[protocol]" declared. In url.c there's
+  then the main array with all individual Curl_handler structs pointed to from
+  a single array which is scanned through when a URL is given to libcurl to
+  work with.
+
+  ->scheme is the URL scheme name, usually spelled out in uppercase. That's
+  "HTTP" or "FTP" etc. SSL versions of the protcol need its own Curl_handler
+  setup so HTTPS separate from HTTP.
+
+  ->setup_connection is called to allow the protocol code to allocate protocol
+  specific data that then gets associated with that SessionHandle for the rest
+  of this transfer. It gets freed again at the end of the transfer. It will be
+  called before the 'connectdata' for the transfer has been selected/created.
+  Most protocols will allocate its private 'struct [PROTOCOL]' here and assign
+  SessionHandle->req.protop to point to it.
+
+  ->connect_it allows a protocol to do some specific actions after the TCP
+  connect is done, that can still be considered part of the connection phase.
+
+  Some protocols will alter the connectdata->recv[] and connectdata->send[]
+  function pointers in this function.
+
+  ->connecting is similarly a function that keeps getting called as long as the
+  protocol considers itself still in the connecting phase.
+
+  ->do_it is the function called to issue the transfer request. What we call
+  the DO action internally. If the DO is not enough and things need to be kept
+  getting done for the entier DO sequence to complete, ->doing is then usually
+  also provided. Each protocol that needs to do multiple commands or similar
+  for do/doing need to implement their own state machines (see SCP, SFTP,
+  FTP). Some protocols (only FTP and only due to historical reasons) has a
+  separate piece of the DO state called DO_MORE.
+
+  ->doing keeps getting called while issudeing the transfer request command(s)
+
+  ->done gets called when the transfer is complete and DONE. That's after the
+  main data has been transferred.
+
+  ->do_more gets called doring the DO_MORE state. The FTP protocol uses this
+  state when setting up the second connection.
+
+  ->proto_getsock
+  ->doing_getsock
+  ->domore_getsock
+  ->perform_getsock
+  Functions that return socket information. Which socket(s) to wait for which
+  action(s) during the particular multi state.
+
+  ->disconnect is called immediately before the TCP connection is shutdown.
+
+  ->readwrite gets called during transfer to allow the protocol to do extra
+  reads/writes
+
+  ->defport is the default report TCP or UDP port this protocol uses
+
+  ->protocol is one or more bits in the CURLPROTO_* set. The SSL versions have
+  their "base" protocol set and then the SSL variation. Like "HTTP|HTTPS".
+
+  ->flags is a bitmask with additional information about the protocol that will
+  make it get treated differently by the generic engine:
+
+    PROTOPT_SSL - will make it connect and negotiate SSL
+
+    PROTOPT_DUAL - this protocol uses two connections
+
+    PROTOPT_CLOSEACTION - this protocol has actions to do before closing the
+    connection. This flag is no longer used by code, yet still set for a bunch
+    protocol handlers.
+  
+    PROTOPT_DIRLOCK - "direction lock". The SSH protocols set this bit to
+    limit which "direction" of socket actions that the main engine will
+    concern itself about.
+
+    PROTOPT_NONETWORK - a protocol that doesn't use network (read file:)
+
+    PROTOPT_NEEDSPWD - this protocol needs a password and will use a default
+    one unless one is provided
+
+    PROTOPT_NOURLQUERY - this protocol can't handle a query part on the URL
+    (?foo=bar)
+
+
+  1.5 conncache
+
+  Is a hash table with connections for later re-use. Each SessionHandle has
+  a pointer to its connection cache. Each multi handle sets up a connection
+  cache that all added SessionHandles share by default.
+
+
+  1.6 Curl_share
+  
+  The libcurl share API allocates a Curl_share struct, exposed to the external
+  API as "CURLSH *".
+
+  The idea is that the struct can have a set of own versions of caches and
+  pools and then by providing this struct in the CURLOPT_SHARE option, those
+  specific SessionHandles will use the caches/pools that this share handle
+  holds.
+
+  Then individual SessionHandle structs can be made to share specific things
+  that they otherwise wouldn't, such as cookies.
+
+  The Curl_share struct can currently hold cookies, DNS cache and the SSL
+  session cache.
+
+  
+  1.7 CookieInfo
+
+  This is the main cookie struct. It holds all known cookies and related
+  information. Each SessionHandle has its own private CookieInfo even when
+  they are added to a multi handle. They can be made to share cookies by using
+  the share API.
index 3db1a3d..f596546 100644 (file)
@@ -55,6 +55,10 @@ NSS     http://www.mozilla.org/projects/security/pki/nss/
         grant you different permissions and impose different obligations. You
         should select the license that best meets your needs.
 
+axTLS   http://axtls.sourceforge.net/
+
+        (May be used for SSL/TLS support) Uses a Modified BSD-style license.
+
 c-ares  http://daniel.haxx.se/projects/c-ares/license.html
 
         (Used for asynchronous name resolves) Uses an MIT license that is very
diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE
new file mode 100644 (file)
index 0000000..ae1821a
--- /dev/null
@@ -0,0 +1,228 @@
+                                  _   _ ____  _
+                              ___| | | |  _ \| |
+                             / __| | | | |_) | |
+                            | (__| |_| |  _ <| |___
+                             \___|\___/|_| \_\_____|
+
+MAIL ETIQUETTE
+
+ 1. About the lists
+  1.1 Mailing Lists
+  1.2 Netiquette
+  1.3 Do Not Mail a Single Individual
+  1.4 Subscription Required
+  1.5 Moderation of new posters
+  1.6 Handling trolls and spam
+  1.7 How to unsubscribe
+
+ 2. Sending mail
+  2.1 Reply or New Mail
+  2.2 Reply to the List
+  2.3 Use a Sensible Subject
+  2.4 Do Not Top-Post
+  2.5 HTML is not for mails
+  2.6 Quoting
+  2.7 Digest
+  2.8 Please Tell Us How You Solved The Problem!
+
+==============================================================================
+
+1. About the lists
+
+  1.1 Mailing Lists
+
+  The mailing lists we have are all listed and described at
+  http://curl.haxx.se/mail/
+
+  Each mailing list is targeted to a specific set of users and subjects,
+  please use the one or the ones that suit you the most.
+
+  Each mailing list have hundreds up to thousands of readers, meaning that
+  each mail sent will be received and read by a very large amount of people.
+  People from various cultures, regions, religions and continents.
+
+  1.2 Netiquette
+
+  Netiquette is a common name for how to behave on the internet. Of course, in
+  each particular group and subculture there will be differences in what is
+  acceptable and what is considered good manners.
+
+  This document outlines what we in the cURL project considers to be good
+  etiquette, and primarily this focus on how to behave on and how to use our
+  mailing lists.
+
+  1.3 Do Not Mail a Single Individual
+
+  Many people send one question to one person. One person gets many mails, and
+  there is only one person who can give you a reply. The question may be
+  something that other people are also wanting to ask. These other people have
+  no way to read the reply, but to ask the one person the question. The one
+  person consequently gets overloaded with mail.
+
+  If you really want to contact an individual and perhaps pay for his or her
+  services, by all means go ahead, but if it's just another curl question,
+  take it to a suitable list instead.
+
+  1.4 Subscription Required
+
+  All curl mailing lists require that you are subscribed to allow a mail to go
+  through to all the subscribers.
+
+  If you post without being subscribed (or from a different mail address than
+  the one you are subscribed with), your mail will simply be silently
+  discarded. You have to subscribe first, then post.
+
+  The reason for this unfortunate and strict subscription policy is of course
+  to stop spam from pestering the lists.
+
+  1.5 Moderation of new posters
+
+  Several of the curl mailing lists automatically make all posts from new
+  subscribers require moderation. This means that after you've subscribed and
+  send your first mail to a list, that mail will not be let through to the
+  list until a mailing list administrator has verified that it is OK and
+  permits it to get posted.
+
+  Once a first post has been made that proves the sender is actually talking
+  about curl-related subjects, the moderation "flag" will be switched off and
+  future posts will go through without being moderated.
+
+  The reason for this moderation policy is that we do suffer from spammers who
+  actually subscribe and send spam to our lists.
+
+  1.6 Handling trolls and spam
+
+  Despite our good intentions and hard work to keep spam off the lists and to
+  maintain a friendly and positive atmosphere, there will be times when spam
+  and or trolls get through.
+
+  Troll - "someone who posts inflammatory, extraneous, or off-topic messages
+  in an online community"
+
+  Spam - "use of electronic messaging systems to send unsolicited bulk
+  messages"
+
+  No matter what, we NEVER EVER respond to trolls or spammers on the list. If
+  you believe the list admin should do something particular, contact him/her
+  off-list. The subject will be taken care of as good as possible to prevent
+  repeated offences, but responding on the list to such messages never lead to
+  anything good and only puts the light even more on the offender: which was
+  the entire purpose of it getting to the list in the first place.
+
+  Don't feed the trolls!
+
+  1.7 How to unsubscribe
+
+  You unsubscribe the same way you subscribed in the first place. You go to
+  the page for the particular mailing list you're subscribed to and you enter
+  your email address and password and press the unsubscribe button.
+
+  Also, this information is included in the headers of every mail that is sent
+  out to all curl related mailing lists and there's footer in each mail that
+  links to the "admin" page on which you can unsubscribe and change other
+  options.
+
+  You NEVER EVER email the mailing list requesting someone else to get you off
+  the list.
+
+
+2. Sending mail
+
+  2.1 Reply or New Mail
+
+  Please do not reply to an existing message as a short-cut to post a message
+  to the lists.
+
+  Many mail programs and web archivers use information within mails to keep
+  them together as "threads", as collections of posts that discuss a certain
+  subject. If you don't intend to reply on the same or similar subject, don't
+  just hit reply on an existing mail and change subject, create a new mail.
+
+  2.2 Reply to the List
+
+  When replying to a message from the list, make sure that you do "group
+  reply" or "reply to all", and not just reply to the author of the single
+  mail you reply to.
+
+  We're actively discouraging replying back to the single person by setting
+  the Reply-To: field in outgoing mails back to the mailing list address,
+  making it harder for people to mail the author only by mistake.
+
+  2.3 Use a Sensible Subject
+
+  Please use a subject of the mail that makes sense and that is related to the
+  contents of your mail. It makes it a lot easier to find your mail afterwards
+  and it makes it easier to track mail threads and topics.
+
+  2.4 Do Not Top-Post
+
+  If you reply to a message, don't use top-posting. Top-posting is when you
+  write the new text at the top of a mail and you insert the previous quoted
+  mail conversation below. It forces users to read the mail in a backwards
+  order to properly understand it.
+
+  This is why top posting is so bad:
+
+      A: Because it messes up the order in which people normally read
+         text.
+      Q: Why is top-posting such a bad thing?
+      A: Top-posting.
+      Q: What is the most annoying thing in e-mail?
+
+  Apart from the screwed up read order (especially when mixed together in a
+  thread when someone responds using the mandated bottom-posting style), it
+  also makes it impossible to quote only parts of the original mail.
+
+  When you reply to a mail. You let the mail client insert the previous mail
+  quoted. Then you put the cursor on the first line of the mail and you move
+  down through the mail, deleting all parts of the quotes that don't add
+  context for your comments. When you want to add a comment you do so, inline,
+  right after the quotes that relate to your comment. Then you continue
+  downwards again.
+
+  When most of the quotes have been removed and you've added your own words,
+  you're done!
+
+  2.5 HTML is not for mails
+
+  Please switch off those HTML encoded messages. You can mail all those funny
+  mails to your friends. We speak plain text mails.
+
+  2.6 Quoting
+
+  Quote as little as possible. Just enough to provide the context you cannot
+  leave out. A lengthy description can be found here:
+
+      http://www.netmeister.org/news/learn2quote.html
+
+  2.7 Digest
+
+  We allow subscribers to subscribe to the "digest" version of the mailing
+  lists. A digest is a collection of mails lumped together in one single mail.
+
+  Should you decide to reply to a mail sent out as a digest, there are two
+  things you MUST consider if you really really cannot subscribe normally
+  instead:
+
+  Cut off all mails and chatter that is not related to the mail you want to
+  reply to.
+
+  Change the subject name to something sensible and related to the subject,
+  preferably even the actual subject of the single mail you wanted to reply to
+
+  2.8 Please Tell Us How You Solved The Problem!
+
+  Many people mail questions to the list, people spend some of their time and
+  make an effort in providing good answers to these questions.
+
+  If you are the one who asks, please consider responding once more in case
+  one of the hints was what solved your problems. The guys who write answers
+  feel good to know that they provided a good answer and that you fixed the
+  problem. Far too often, the person who asked the question is never heard of
+  again, and we never get to know if he/she is gone because the problem was
+  solved or perhaps because the problem was unsolvable!
+
+  Getting the solution posted also helps other users that experience the same
+  problem(s). They get to see (possibly in the web archives) that the
+  suggested fixes actually has helped at least one person.
+
index d7085b7..4ad2e13 100644 (file)
@@ -19,7 +19,7 @@ SIMPLE USAGE
 
         curl http://www.weirdserver.com:8000/
 
-  Get a list of a directory of an FTP site:
+  Get a directory listing of an FTP site:
 
         curl ftp://cool.haxx.se/
 
@@ -54,7 +54,7 @@ SIMPLE USAGE
 
 DOWNLOAD TO A FILE
 
-  Get a web page and store in a local file:
+  Get a web page and store in a local file with a specific name:
 
         curl -o thatpage.html http://www.netscape.com/
 
@@ -113,9 +113,10 @@ USING PASSWORDS
    ones out of the ones that the server accepts for the given URL, by using
    --anyauth.
 
-   NOTE! Since HTTP URLs don't support user and password, you can't use that
-   style when using Curl via a proxy. You _must_ use the -u style fetch
-   during such circumstances.
+   NOTE! According to the URL specification, HTTP URLs can not contain a user
+   and password, so that style will not work when using curl via a proxy, even
+   though curl allows it at other times. When using a proxy, you _must_ use
+   the -u style for user and password.
 
  HTTPS
 
@@ -123,11 +124,17 @@ USING PASSWORDS
 
 PROXY
 
- Get an ftp file using a proxy named my-proxy that uses port 888:
+ curl supports both HTTP and SOCKS proxy servers, with optional authentication.
+ It does not have special support for FTP proxy servers since there are no
+ standards for those, but it can still be made to work with many of them. You
+ can also use both HTTP and SOCKS proxies to transfer files to and from FTP
+ servers.
+
+ Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
 
         curl -x my-proxy:888 ftp://ftp.leachsite.com/README
 
- Get a file from a HTTP server that requires user and password, using the
+ Get a file from an HTTP server that requires user and password, using the
  same proxy as above:
 
         curl -u user:passwd -x my-proxy:888 http://www.get.this/
@@ -146,12 +153,26 @@ PROXY
 
  curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
 
- See also the environment variables Curl support that offer further proxy
+ See also the environment variables Curl supports that offer further proxy
  control.
 
+ Most FTP proxy servers are set up to appear as a normal FTP server from the
+ client's perspective, with special commands to select the remote FTP server.
+ curl supports the -u, -Q and --ftp-account options that can be used to
+ set up transfers through many FTP proxies. For example, a file can be
+ uploaded to a remote FTP server using a Blue Coat FTP proxy with the
+ options:
+
+   curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \
+    --ftp-account Proxy-Password --upload-file local-file \
+    ftp://my-ftp.proxy.server:21/remote/upload/path/
+
+ See the manual for your FTP proxy to determine the form it expects to set up
+ transfers, and curl's -v option to see exactly what curl is sending.
+
 RANGES
 
-  With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
+  HTTP 1.1 introduced byte-ranges. Using this, a client can request
   to get only one or more subparts of a specified document. Curl supports
   this with the -r flag.
 
@@ -182,8 +203,8 @@ UPLOADING
 
         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
 
-  Upload a local file to the remote site, and use the local file name remote
-  too:
+  Upload a local file to the remote site, and use the local file name at the remote
+  site too:
 
         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
 
@@ -199,14 +220,14 @@ UPLOADING
 
  HTTP
 
-  Upload all data on stdin to a specified http site:
+  Upload all data on stdin to a specified HTTP site:
 
         curl -T - http://www.upload.com/myfile
 
-  Note that the http server must have been configured to accept PUT before
+  Note that the HTTP server must have been configured to accept PUT before
   this can be done successfully.
 
-  For other ways to do http data upload, see the POST section below.
+  For other ways to do HTTP data upload, see the POST section below.
 
 VERBOSE / DEBUG
 
@@ -269,7 +290,7 @@ POST (HTTP)
   The 'variable' names are the names set with "name=" in the <input> tags, and
   the data is the contents you want to fill in for the inputs. The data *must*
   be properly URL encoded. That means you replace space with + and that you
-  write weird letters with %XX where XX is the hexadecimal representation of
+  replace weird letters with %XX where XX is the hexadecimal representation of
   the letter's ASCII code.
 
   Example:
@@ -308,7 +329,7 @@ POST (HTTP)
   If the content-type is not specified, curl will try to guess from the file
   extension (it only knows a few), or use the previously specified type (from
   an earlier file if several files are specified in a list) or else it will
-  using the default type 'text/plain'.
+  use the default type 'application/octet-stream'.
 
   Emulate a fill-in form with -F. Let's say you fill in three fields in a
   form. One field is a file name which to post, one field is your name and one
@@ -341,8 +362,8 @@ POST (HTTP)
 
 REFERRER
 
-  A HTTP request has the option to include information about which address
-  that referred to actual page.  Curl allows you to specify the
+  An HTTP request has the option to include information about which address
+  referred it to the actual page.  Curl allows you to specify the
   referrer to be used on the command line. It is especially useful to
   fool or trick stupid servers or CGI scripts that rely on that information
   being available or contain certain data.
@@ -353,7 +374,7 @@ REFERRER
 
 USER AGENT
 
-  A HTTP request has the option to include information about the browser
+  An HTTP request has the option to include information about the browser
   that generated the request. Curl allows it to be specified on the command
   line. It is especially useful to fool or trick stupid servers or CGI
   scripts that only accept certain browsers.
@@ -593,21 +614,21 @@ SFTP and SCP and PATH NAMES
 FTP and firewalls
 
   The FTP protocol requires one of the involved parties to open a second
-  connection as soon as data is about to get transfered. There are two ways to
+  connection as soon as data is about to get transferred. There are two ways to
   do this.
 
   The default way for curl is to issue the PASV command which causes the
   server to open another port and await another connection performed by the
-  client. This is good if the client is behind a firewall that don't allow
+  client. This is good if the client is behind a firewall that doesn't allow
   incoming connections.
 
         curl ftp.download.com
 
-  If the server for example, is behind a firewall that don't allow connections
-  on other ports than 21 (or if it just doesn't support the PASV command), the
+  If the server, for example, is behind a firewall that doesn't allow connections
+  on ports other than 21 (or if it just doesn't support the PASV command), the
   other way to do it is to use the PORT command and instruct the server to
-  connect to the client on the given (as parameters to the PORT command) IP
-  number and port.
+  connect to the client on the given IP number and port (as parameters to the
+  PORT command).
 
   The -P flag to curl supports a few different options. Your machine may have
   several IP-addresses and/or network interfaces and curl allows you to select
@@ -665,8 +686,8 @@ HTTPS
   If you neglect to specify the password on the command line, you will be
   prompted for the correct password before any data can be received.
 
-  Many older SSL-servers have problems with SSLv3 or TLS, that newer versions
-  of OpenSSL etc is using, therefore it is sometimes useful to specify what
+  Many older SSL-servers have problems with SSLv3 or TLS, which newer versions
+  of OpenSSL etc use, therefore it is sometimes useful to specify what
   SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
   version to use (for SSLv3, SSLv2 or TLSv1 respectively):
 
@@ -675,14 +696,13 @@ HTTPS
   Otherwise, curl will first attempt to use v3 and then v2.
 
   To use OpenSSL to convert your favourite browser's certificate into a PEM
-  formatted one that curl can use, do something like this (assuming netscape,
-  but IE is likely to work similarly):
+  formatted one that curl can use, do something like this:
 
-    You start with hitting the 'security' menu button in netscape.
+    In Netscape, you start with hitting the 'Security' menu button.
 
     Select 'certificates->yours' and then pick a certificate in the list
 
-    Press the 'export' button
+    Press the 'Export' button
 
     enter your PIN code for the certs
 
@@ -693,11 +713,21 @@ HTTPS
 
      # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
 
+    In Firefox, select Options, then Advanced, then the Encryption tab,
+    View Certificates. This opens the Certificate Manager, where you can
+    Export. Be sure to select PEM for the Save as type.
+
+    In Internet Explorer, select Internet Options, then the Content tab, then
+    Certificates. Then you can Export, and depending on the format you may
+    need to convert to PEM.
+
+    In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL
+    select Manage Certificates.
 
 RESUMING FILE TRANSFERS
 
  To continue a file transfer where it was previously aborted, curl supports
- resume on http(s) downloads as well as ftp uploads and downloads.
+ resume on HTTP(S) downloads as well as FTP uploads and downloads.
 
  Continue downloading a document:
 
@@ -711,7 +741,7 @@ RESUMING FILE TRANSFERS
 
         curl -C - -o file http://www.server.com/
 
- (*1) = This requires that the ftp server supports the non-standard command
+ (*1) = This requires that the FTP server supports the non-standard command
         SIZE. If it doesn't, curl will say so.
 
  (*2) = This requires that the web server supports at least HTTP/1.1. If it
@@ -720,7 +750,7 @@ RESUMING FILE TRANSFERS
 TIME CONDITIONS
 
  HTTP allows a client to specify a time condition for the document it
- requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to
+ requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to
  specify them with the -z/--time-cond flag.
 
  For example, you can easily make a download that only gets performed if the
@@ -768,7 +798,7 @@ LDAP
   and offer ldap:// support.
 
   LDAP is a complex thing and writing an LDAP query is not an easy task. I do
-  advice you to dig up the syntax description for that elsewhere. Two places
+  advise you to dig up the syntax description for that elsewhere. Two places
   that might suit you are:
 
   Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
@@ -777,7 +807,7 @@ LDAP
 
   RFC 2255, "The LDAP URL Format" http://curl.haxx.se/rfc/rfc2255.txt
 
-  To show you an example, this is now I can get all people from my local LDAP
+  To show you an example, this is how I can get all people from my local LDAP
   server that has a certain sub-domain in their email address:
 
         curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
@@ -811,15 +841,15 @@ ENVIRONMENT VARIABLES
 NETRC
 
   Unix introduced the .netrc concept a long time ago. It is a way for a user
-  to specify name and password for commonly visited ftp sites in a file so
+  to specify name and password for commonly visited FTP sites in a file so
   that you don't have to type them in each time you visit those sites. You
   realize this is a big security risk if someone else gets hold of your
   passwords, so therefore most unix programs won't read this file unless it is
   only readable by yourself (curl doesn't care though).
 
-  Curl supports .netrc files if told so (using the -n/--netrc and
-  --netrc-optional options). This is not restricted to only ftp,
-  but curl can use it for all protocols where authentication is used.
+  Curl supports .netrc files if told to (using the -n/--netrc and
+  --netrc-optional options). This is not restricted to just FTP,
+  so curl can use it for all protocols where authentication is used.
 
   A very simple .netrc file could look something like:
 
@@ -840,7 +870,7 @@ KERBEROS FTP TRANSFER
 
   Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
   the kerberos package installed and used at curl build time for it to be
-  used.
+  available.
 
   First, get the krb-ticket the normal way, like with the kinit/kauth tool.
   Then use curl in way similar to:
@@ -875,7 +905,7 @@ TELNET
 
    - NEW_ENV=<var,val> Sets an environment variable.
 
-  NOTE: the telnet protocol does not specify any way to login with a specified
+  NOTE: The telnet protocol does not specify any way to login with a specified
   user and password so curl can't do that automatically. To do that, you need
   to track when the login prompt is received and send the username and
   password accordingly.
@@ -894,7 +924,7 @@ PERSISTENT CONNECTIONS
   Note that curl cannot use persistent connections for transfers that are used
   in subsequence curl invokes. Try to stuff as many URLs as possible on the
   same command line if they are using the same host, as that'll make the
-  transfers faster. If you use a http proxy for file transfers, practically
+  transfers faster. If you use an HTTP proxy for file transfers, practically
   all transfers will be persistent.
 
 MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
@@ -935,6 +965,28 @@ IPv6
   IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
   or --ftp-port options) should not be URL encoded.
 
+METALINK
+
+  Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way
+  to list multiple URIs and hashes for a file. Curl will make use of the mirrors
+  listed within for failover if there are errors (such as the file or server not
+  being available). It will also verify the hash of the file after the download
+  completes. The Metalink file itself is downloaded and processed in memory and
+  not stored in the local file system.
+
+  Example to use a remote Metalink file:
+
+    curl --metalink http://www.example.com/example.metalink
+
+  To use a Metalink file in the local file system, use FILE protocol (file://):
+
+    curl --metalink file://example.metalink
+
+  Please note that if FILE protocol is disabled, there is no way to use a local
+  Metalink file at the time of this writing. Also note that if --metalink and
+  --include are used together, --include will be ignored. This is because including
+  headers in the response will break Metalink parser and if the headers are included
+  in the file described in Metalink file, hash check will fail.
 
 MAILING LISTS
 
index 316b4f4..8466a6c 100644 (file)
@@ -1,11 +1,31 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
 
 AUTOMAKE_OPTIONS = foreign no-dependencies
 
 man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
+noinst_man_MANS = mk-ca-bundle.1
+GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
+PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
 
 HTMLPAGES = $(GENHTMLPAGES) index.html
 
@@ -16,7 +36,8 @@ CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
 EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS     \
  README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS      \
  KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL           \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
+ $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
+ MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS
 
 MAN2HTML= roffit < $< >$@
 
index 3cc2e3b..43a3729 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 @SET_MAKE@
 
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+# 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.
+#
+###########################################################################
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -39,64 +100,165 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL \
-       THANKS TODO
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs INSTALL THANKS TODO
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 depcomp =
 am__depfiles_maybe =
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 man1dir = $(mandir)/man1
 am__installdirs = "$(DESTDIR)$(man1dir)"
 MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -113,7 +275,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -126,15 +289,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -144,6 +309,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -151,16 +319,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -173,7 +337,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -186,34 +349,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -225,6 +388,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -244,7 +408,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -254,20 +417,26 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign no-dependencies
 man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
+noinst_man_MANS = mk-ca-bundle.1
+GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
+PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
 HTMLPAGES = $(GENHTMLPAGES) index.html
 SUBDIRS = examples libcurl
 CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
 EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS     \
  README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS      \
  KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL           \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
+ $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
+ MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS
 
 MAN2HTML = roffit < $< >$@
 SUFFIXES = .1 .html .pdf
@@ -279,14 +448,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  docs/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  docs/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign docs/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -304,79 +473,77 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
-
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-install-man1: $(man1_MANS) $(man_MANS)
+install-man1: $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(man_MANS)'; \
+       test -n "$(man1dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.1[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man1:
        @$(NORMAL_UNINSTALL)
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -384,66 +551,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -455,81 +576,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -540,7 +684,7 @@ all-am: Makefile $(MANS)
 installdirs: installdirs-recursive
 installdirs-am:
        for dir in "$(DESTDIR)$(man1dir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -552,10 +696,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -563,6 +712,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -573,25 +723,44 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
 dvi-am:
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am: install-man
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man: install-man1
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -608,25 +777,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-man
-
-uninstall-info: uninstall-info-recursive
+uninstall-am: uninstall-man
 
 uninstall-man: uninstall-man1
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-man1 install-strip \
-       installcheck installcheck-am installdirs installdirs-am \
-       maintainer-clean maintainer-clean-generic \
-       maintainer-clean-recursive mostlyclean mostlyclean-generic \
-       mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
-       tags tags-recursive uninstall uninstall-am uninstall-info-am \
-       uninstall-man uninstall-man1
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+       uninstall-am uninstall-man uninstall-man1
 
 
 html: $(HTMLPAGES)
@@ -644,6 +813,7 @@ pdf: $(PDFPAGES)
        ps2pdf $$foo.ps $@; \
        rm $$foo.ps; \
        echo "converted $< to $@")
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 0d1414c..e6b05c3 100644 (file)
@@ -1,6 +1,12 @@
                       Peer SSL Certificate Verification
                       =================================
 
+(NOTE: If libcurl was built with Schannel or Secure Transport support, then
+this does not apply to you. Scroll down for details on how the OS-native
+engines handle SSL certificates. If you're not sure, then run "curl -V" and
+read the results. If the version string says "WinSSL" in it, then it was built
+with Schannel support.)
+
 libcurl performs peer SSL certificate verification by default.  This is done
 by using CA cert bundle that the SSL library can use to make sure the peer's
 server certificate is valid.
@@ -93,24 +99,40 @@ server.
                       Peer SSL Certificate Verification with NSS
                       ==========================================
 
-If libcurl is build with NSS support then depending on the OS distribution it
-is probably required to take some additional steps to use the system-wide CA
-cert db. RedHat ships with an additional module libnsspem.so which enables NSS
-to read the OpenSSL PEM CA bundle. With OpenSuSE this lib is missing, and NSS
-can only work with its own internal formats. Also NSS got a new database
-format:
-https://wiki.mozilla.org/NSS_Shared_DB
-Starting with version 7.19.7 libcurl will check for the NSS version it runs,
-and add automatically the 'sql:' prefix to the certdb directory (either the
+If libcurl was built with NSS support, then depending on the OS distribution,
+it is probably required to take some additional steps to use the system-wide CA
+cert db. RedHat ships with an additional module, libnsspem.so, which enables
+NSS to read the OpenSSL PEM CA bundle. This library is missing in OpenSuSE, and
+without it, NSS can only work with its own internal formats. NSS also has a new
+database format: https://wiki.mozilla.org/NSS_Shared_DB
+
+Starting with version 7.19.7, libcurl will check for the NSS version it runs,
+and automatically add the 'sql:' prefix to the certdb directory (either the
 hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR
-environment variable) if a version 3.12.0 or later is detected.
-To check which certdb format your distribution provides examine the default
-certdb location /etc/pki/nssdb; the new certdb format can be identified by
+environment variable) if version 3.12.0 or later is detected. To check which
+ertdb format your distribution provides, examine the default
+certdb location: /etc/pki/nssdb; the new certdb format can be identified by
 the filenames cert9.db, key4.db, pkcs11.txt; filenames of older versions are
 cert8.db, key3.db, modsec.db.
-Usually these cert databases are empty; but NSS also has built-in CAs which are
-provided through a shared library libnssckbi.so; if you want to use these
-built-in CAs then create a symlink to libnssckbi.so in /etc/pki/nssdb:
-ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so
 
+Usually these cert databases are empty, but NSS also has built-in CAs which are
+provided through a shared library, libnssckbi.so; if you want to use these
+built-in CAs, then create a symlink to libnssckbi.so in /etc/pki/nssdb:
+ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so
 
+     Peer SSL Certificate Verification with Schannel and Secure Transport
+     ====================================================================
+
+If libcurl was built with Schannel (Microsoft's TLS/SSL engine) or Secure
+Transport (Apple's TLS/SSL engine) support, then libcurl will still perform
+peer certificate verification, but instead of using a CA cert bundle, it will
+use the certificates that are built into the OS. These are the same
+certificates that appear in the Internet Options control panel (under Windows)
+or Keychain Access application (under OS X). Any custom security rules for
+certificates will be honored.
+
+Schannel will run CRL checks on certificates unless peer verification is
+disabled. Secure Transport on iOS will run OCSP checks on certificates unless
+peer verification is disabled. Secure Transport on OS X will run either OCSP
+or CRL checks on certificates if those features are enabled, and this behavior
+can be adjusted in the preferences of Keychain Access.
index edcd513..693139b 100644 (file)
@@ -5,23 +5,34 @@
  If you have contributed but are missing here, please let us know!
 
 Aaron Oneal
+Aaron Orenstein
 Adam D. Moss
 Adam Light
 Adam Piggott
+Adam Tkac
 Adrian Schuur
+Adriano Meirelles
+Ajit Dhumale
+Aki Koskinen
 Akos Pasztory
 Alan Pinstein
 Albert Chin-A-Young
 Albert Choy
 Ale Vesely
+Alejandro Alvarez
 Aleksandar Milivojevic
+Aleksey Tulinov
+Alessandro Ghedini
 Alessandro Vesely
 Alex Bligh
 Alex Fishman
+Alex Gruz
 Alex Neblett
 Alex Suykov
+Alex Vinnik
 Alex aka WindEagle
 Alexander Beedie
+Alexander Klauer
 Alexander Kourakos
 Alexander Krasnostavsky
 Alexander Lazic
@@ -29,68 +40,95 @@ Alexander Zhuravlev
 Alexey Borzov
 Alexey Pesternikov
 Alexey Simak
+Alexey Zakhlestin
 Alexis Carvalho
+Alfred Gebert
 Allen Pulsifer
 Amol Pattekar
+Amr Shahin
 Anatoli Tubman
 Anders Gustafsson
+Anders Havn
 Andi Jahja
 Andre Guibert de Bruet
 Andreas Damm
 Andreas Faerber
 Andreas Farber
+Andreas Malzahn
 Andreas Ntaflos
 Andreas Olsson
 Andreas Rieke
 Andreas Schuldei
 Andreas Wurf
 Andrei Benea
+Andrei Cipu
 Andres Garcia
 Andrew Benham
 Andrew Biggs
 Andrew Bushnell
 Andrew Francis
 Andrew Fuller
+Andrew Kurushin
 Andrew Moise
 Andrew Wansink
 Andrew de los Reyes
-Andrés García
+Andrii Moiseiev
+Andrés García
 Andy Cedilnik
 Andy Serpa
 Andy Tsouladze
 Angus Mackay
 Anthony Bryan
+Anthony G. Basile
 Antoine Calando
+Anton Bychkov
 Anton Kalmykov
+Anton Malov
+Anton Yabchinskiy
 Arkadiusz Miskiewicz
 Armel Asselin
+Arnaud Compan
 Arnaud Ebalard
+Arthur Murray
 Arve Knudsen
 Ates Goral
 Augustus Saunders
 Avery Fay
 Axel Tillequin
+Balaji Parasuram
 Balint Szilakszi
 Bart Whiteley
 Bas Mevissen
 Ben Darnell
 Ben Greear
 Ben Madsen
+Ben Noordhuis
 Ben Van Hof
+Ben Winslow
 Benbuck Nason
 Benjamin Gerard
+Benjamin Gilbert
+Benjamin Johnson
 Bernard Leak
+Bernhard Reutner-Fischer
 Bertrand Demiddelaer
 Bill Egert
 Bill Hoffman
+Bill Middlecamp
+Bjoern Sikora
 Bjorn Augustsson
 Bjorn Reese
-Björn Stenberg
+Björn Stenberg
+Blaise Potard
+Bob Relyea
 Bob Richmond
 Bob Schader
 Bogdan Nicula
 Brad Burdick
+Brad Hards
+Brad King
 Bradford Bruce
+Brandon Wang
 Brendan Jurd
 Brent Beardsley
 Brian Akins
@@ -100,14 +138,18 @@ Brian R Duffy
 Brian Ulm
 Brock Noland
 Bruce Mitchener
+Bruno de Carvalho
 Bryan Henderson
 Bryan Kemp
+Byrial Jensen
 Cameron Kaiser
 Camille Moncelier
 Caolan McNamara
 Carsten Lange
 Casey O'Donnell
+Cedric Deltheil
 Chad Monroe
+Chandrakant Bagul
 Charles Kerr
 Chih-Chung Chang
 Chris "Bob Bob"
@@ -118,19 +160,25 @@ Chris Flerackers
 Chris Gaukroger
 Chris Maltby
 Chris Mumford
+Chris Smowton
+Christian Grothoff
+Christian Hägele
 Christian Krause
 Christian Kurz
 Christian Robottom Reis
 Christian Schmitz
 Christian Vogt
+Christian Weisgerber
 Christophe Demory
 Christophe Legry
 Christopher Conroy
 Christopher Palow
 Christopher R. Palmer
+Christopher Stone
 Ciprian Badescu
 Claes Jakobsson
 Clarence Gardner
+Clemens Gruber
 Clifford Wolf
 Cody Jones
 Colin Hogben
@@ -142,8 +190,12 @@ Craig A West
 Craig Davison
 Craig Markwardt
 Cris Bailiff
+Cristian Rodríguez
 Curt Bogmine
 Cyrill Osterwalder
+Cédric Deltheil
+Dag Ekengren
+Dagobert Michelsen
 Damien Adant
 Dan Becker
 Dan C
@@ -156,19 +208,23 @@ Dan Zitter
 Daniel Black
 Daniel Cater
 Daniel Egger
-Daniel Fandrich
 Daniel Johnson
+Daniel Mentz
 Daniel Steinberg
 Daniel Stenberg
+Daniel Theron
 Daniel at touchtunes
 Darryl House
+Darshan Mody
 Dave Dribin
 Dave Halbakken
 Dave Hamilton
 Dave May
+Dave Reisner
 Dave Vasilevsky
 David Bau
 David Binderman
+David Blaikie
 David Byron
 David Cohen
 David Eriksson
@@ -185,6 +241,7 @@ David Odin
 David Phillips
 David Rosenstrauch
 David Shaw
+David Strauss
 David Tarendash
 David Thiel
 David Wright
@@ -199,6 +256,7 @@ Dimitris Sarris
 Dinar
 Dirk Eddelbuettel
 Dirk Manske
+Dmitri Shubin
 Dmitriy Sergeyev
 Dmitry Bartsevich
 Dmitry Kurochkin
@@ -207,6 +265,7 @@ Dmitry Rechkin
 Dolbneff A.V
 Domenico Andreoli
 Dominick Meglio
+Dominique Leuenberger
 Doug Kaufman
 Doug Porter
 Douglas E. Wegscheid
@@ -215,6 +274,7 @@ Douglas R. Horner
 Douglas Steinwand
 Dov Murik
 Duane Cathey
+Duncan
 Duncan Mac-Vicar Prett
 Dustin Boswell
 Dylan Ellicott
@@ -223,7 +283,11 @@ Early Ehlinger
 Ebenezer Ikonne
 Edin Kadribasic
 Eduard Bloch
+Edward Rudd
+Edward Sheldrake
+Eelco Dolstra
 Eetu Ojanen
+Eldar Zaitov
 Ellis Pritchard
 Emanuele Bovisio
 Emil Romanus
@@ -231,21 +295,26 @@ Emiliano Ida
 Enrico Scholz
 Enrik Berkhan
 Eric Cooper
+Eric Hu
 Eric Landes
 Eric Lavigne
 Eric Melville
 Eric Mertens
 Eric Rautman
+Eric S. Raymond
 Eric Thelin
 Eric Vergnaud
 Eric Wong
 Eric Young
 Erick Nuwendam
+Erik Johansson
 Erwan Legrand
 Erwin Authried
 Eugene Kotlyarov
 Evan Jordan
+Evgeny Turnaev
 Eygene Ryabinkin
+Fabian Hiernaux
 Fabian Keil
 Fabrizio Ammollo
 Fedor Karpelevitch
@@ -258,11 +327,16 @@ Frank Keeney
 Frank McGeough
 Frank Meier
 Frank Ticheler
+Frank Van Uffelen
+František Kučera
 Fred Machado
 Fred New
 Fred Noz
 Frederic Lepied
+Fredrik Thulin
 Gabriel Kuri
+Gabriel Sjoberg
+Garrett Holmstrom
 Gary Maxwell
 Gautam Kachroo
 Gautam Mani
@@ -274,7 +348,8 @@ Georg Lippitsch
 Georg Wicherski
 Gerd v. Egidy
 Gerhard Herre
-Gerrit Bruchhäuser
+Gerrit Bruchhäuser
+Ghennadi Procopciuc
 Giancarlo Formicuccia
 Giaslas Georgios
 Gil Weber
@@ -286,6 +361,7 @@ Giuseppe Attardi
 Giuseppe D'Ambrosio
 Glen Nakamura
 Glen Scott
+Gokhan Sengun
 Grant Erickson
 Greg Hewgill
 Greg Morse
@@ -294,12 +370,14 @@ Greg Zavertnik
 Grigory Entin
 Guenole Bescon
 Guenter Knauf
+Guido Berhoerster
 Guillaume Arluison
 Gustaf Hui
 Gwenole Beauchesne
-Götz Babin-Ebell
+Götz Babin-Ebell
 Hamish Mackenzie
 Hang Kin Lau
+Hang Su
 Hanno Kranzhoff
 Hans Steegers
 Hans-Jurgen May
@@ -307,12 +385,18 @@ Hardeep Singh
 Harshal Pradhan
 Hauke Duden
 Heikki Korpela
+Heinrich Ko
 Hendrik Visage
 Henrik Storner
+Henry Ludemann
+Herve Amblard
 Hidemoto Nakada
+Ho-chi Chen
 Hoi-Ho Chan
+Hongli Lai
 Howard Chu
 Hzhijun
+Ian D Allen
 Ian Ford
 Ian Gulliver
 Ian Lynagh
@@ -328,6 +412,7 @@ Immanuel Gregoire
 Ingmar Runge
 Ingo Ralf Blum
 Ingo Wilken
+Ishan SinghLevett
 Jack Zhang
 Jacky Lam
 Jacob Meuser
@@ -344,10 +429,16 @@ James MacMillan
 Jamie Lokier
 Jamie Newton
 Jamie Wilkinson
+Jan Ehrhardt
+Jan Koen Annot
 Jan Kunder
+Jan Schaumann
 Jan Van Boghout
+Jared Jennings
 Jared Lundell
 Jari Sundell
+Jason Glasgow
+Jason Liu
 Jason McDonald
 Jason S. Priebe
 Jay Austin
@@ -358,7 +449,9 @@ Jean-Claude Chauve
 Jean-Francois Bertrand
 Jean-Louis Lemaire
 Jean-Marc Ranger
+Jean-Noel Rouvignac
 Jean-Philippe Barrette-LaPierre
+Jeff Connelly
 Jeff Johnson
 Jeff Lawson
 Jeff Phillips
@@ -366,31 +459,44 @@ Jeff Pohlmeyer
 Jeff Weber
 Jeffrey Pohlmeyer
 Jeremy Friesner
+Jeremy Huddleston
 Jerome Muffat-Meridol
 Jerome Vouillon
+Jerry Wu
 Jes Badwal
 Jesper Jensen
 Jesse Noller
+Jie He
 Jim Drash
 Jim Freeman
+Jim Hollinger
 Jim Meyering
+Jiri Hruska
+Jiri Jaburek
 Jocelyn Jaubert
 Joe Halpin
 Joe Malicki
+Joe Mason
 Joel Chen
 Jofell Gallardo
 Johan Anderson
 Johan Nilsson
 Johan van Selst
+Johannes Bauer
+John Bradshaw
 John Crow
 John Dennis
 John E. Malmberg
+John Gardiner Myers
 John Janssen
+John Joseph Bachir
 John Kelly
 John Lask
 John Lightsey
+John Marino
 John McGowan
 John P. McCaskey
+John Suprock
 John Wilkinson
 John-Mark Bell
 Johnny Luong
@@ -400,30 +506,39 @@ Jon Sargeant
 Jon Travis
 Jon Turner
 Jonas Forsman
+Jonas Schnelli
 Jonatan Lander
 Jonathan Hseu
+Jonathan Nieder
 Jongki Suwandi
 Jose Kahan
 Josef Wolf
 Josh Kapell
 Joshua Kwan
+Josue Andrade Gomes
+Juan Barreto
 Juan F. Codagnone
-Juan Ignacio Hervás
+Juan Ignacio Hervás
 Judson Bishop
 Juergen Wilke
 Jukka Pihl
 Julian Noble
+Julian Taylor
 Julien Chaffraix
+Julien Royer
 Jun-ichiro itojun Hagino
 Jurij Smakov
 Justin Fletcher
-Jörg Mueller-Tolk
-Jörn Hartroth
+Justin Karneges
+Jörg Mueller-Tolk
+Jörn Hartroth
+Kai Engert
 Kai Sommerfeld
 Kai-Uwe Rommel
 Kalle Vahlman
 Kamil Dudka
 Kang-Jin Lee
+Karl M
 Karl Moerder
 Karol Pietrzak
 Kaspar Brand
@@ -443,21 +558,25 @@ Kevin Lussier
 Kevin Reed
 Kevin Roth
 Kim Rinnewitz
+Kim Vandry
 Kimmo Kinnunen
 Kjell Ericson
 Kjetil Jacobsen
 Klevtsov Vadim
+Konstantin Isakov
 Kris Kennaway
 Krishnendu Majumdar
 Krister Johansen
 Kristian Gunstone
-Kristian Köhntopp
+Kristian Köhntopp
 Kyle Sallee
 Lachlan O'Dea
 Larry Campbell
 Larry Fahnoe
+Lars Buitinck
 Lars Gustafsson
 Lars J. Aas
+Lars Johannesen
 Lars Nilsson
 Lars Torben Wilson
 Lau Hang Kin
@@ -468,36 +587,53 @@ Len Krause
 Lenaic Lefever
 Lenny Rachitsky
 Liam Healy
+Lijo Antony
 Linas Vepstas
 Ling Thio
 Linus Nielsen Feltzing
 Lisa Xu
 Liza Alenchery
+Lluís Batlle i Rossell
 Loic Dachary
 Loren Kirkby
 Luca Altea
 Luca Alteas
 Lucas Adamski
+Ludovico Cavedon
 Lukasz Czekierda
+Luke Amery
 Luke Call
 Luong Dinh Dung
 Maciej Karpiuk
 Maciej W. Rozycki
+Mamoru Tasaka
+Mandy Wu
 Manfred Schwarb
+Manuel Massing
 Marc Boucher
+Marc Doughty
+Marc Hoersken
 Marc Kleine-Budde
+Marcel Raad
+Marcel Roelofs
 Marcelo Juchem
+Marcin Adamski
 Marcin Konicki
 Marco G. Salvagno
 Marco Maggi
+Marcus Sundberg
 Marcus Webster
 Mario Schroeder
+Mark Brand
 Mark Butler
 Mark Davies
 Mark Eichin
 Mark Incley
 Mark Karpeles
 Mark Lentczner
+Mark Salisbury
+Mark Snelling
+Mark Tully
 Markus Duft
 Markus Koetter
 Markus Moeller
@@ -507,6 +643,8 @@ Martin C. Martin
 Martin Drasar
 Martin Hager
 Martin Hedenfalk
+Martin Jansen
+Martin Lemke
 Martin Skinner
 Martin Storsjo
 Marty Kuhrt
@@ -516,40 +654,51 @@ Massimo Callegari
 Mateusz Loskot
 Mathias Axelsson
 Mats Lidell
+Matt Arsenault
 Matt Kraai
 Matt Veenstra
 Matt Witherspoon
 Matt Wixson
+Matteo Rocco
 Matthew Blain
 Matthew Clarke
+Matthias Bolte
 Maurice Barnum
 Mauro Iorio
 Max Katsev
 Maxim Ivanov
 Maxim Perenesenko
+Maxim Prohorov
+Maxime Larocque
+Mehmet Bozkurt
 Mekonikum
 Mettgut Jamalla
 Michael Benedict
 Michael Calmer
 Michael Cronenworth
 Michael Curtis
+Michael Day
 Michael Goffioul
 Michael Jahn
 Michael Jerris
 Michael Mealling
+Michael Mueller
 Michael Smith
 Michael Stillwell
 Michael Wallner
 Michal Bonino
 Michal Gorny
+Michal Kowalczyk
 Michal Marek
 Michele Bini
+Miguel Angel
 Mihai Ionescu
 Mikael Johansson
 Mikael Sennerholm
 Mike Bytnar
 Mike Crowe
 Mike Dobbs
+Mike Giancola
 Mike Hommey
 Mike Power
 Mike Protts
@@ -559,25 +708,31 @@ Mitz Wark
 Mohamed Lrhazi
 Mohun Biswas
 Moonesamy
+Myk Taylor
+Nach M. S.
 Nathan Coulter
 Nathan O'Sullivan
 Nathanael Nerode
+Naveen Chandran
 Naveen Noel
+Neil Bowers
 Neil Dunbar
 Neil Spring
 Nic Roets
+Nicholas Maniscalco
 Nick Gimbrone
 Nick Humfrey
 Nick Zitzmann
 Nico Baggus
 Nicolas Berloquin
 Nicolas Croiset
-Nicolas François
+Nicolas François
 Niels van Tongeren
 Nikita Schmidt
 Nikitinskit Dmitriy
 Niklas Angebrand
 Nikolai Kondrashov
+Nikos Mavrogiannopoulos
 Ning Dong
 Nir Soffer
 Nis Jorgensen
@@ -585,17 +740,28 @@ Nodak Sodak
 Norbert Frese
 Norbert Novotny
 Ofer
+Olaf Flebbe
 Olaf Stueben
-Olaf Stüben
+Olaf Stüben
+Oliver Gondža
+Olivier Berger
 Oren Tirosh
+Ori Avtalion
+Oscar Koeroo
+Oscar Norlander
 P R Schaffner
+Paolo Piacentini
 Pascal Terjan
+Pasha Kuznetsov
 Pat Ray
+Patrice Guerin
+Patricia Muscalu
 Patrick Bihan-Faou
 Patrick Monnerat
 Patrick Scott
 Patrick Smith
 Patrik Thunstrom
+Pau Garcia i Quiles
 Paul Harrington
 Paul Howarth
 Paul Marquis
@@ -607,11 +773,14 @@ Pavel Orehov
 Pavel Raiskup
 Pawel A. Gajda
 Pawel Kierski
+Pedro Larroy
 Pedro Neves
 Pete Su
 Peter Bray
 Peter Forret
+Peter Gal
 Peter Heuchert
+Peter Hjalmarsson
 Peter Korsgaard
 Peter Lamberg
 Peter O'Gorman
@@ -627,6 +796,7 @@ Phil Blundell
 Phil Karn
 Phil Lisiecki
 Phil Pellouchoud
+Philip Craig
 Philip Gladstone
 Philip Langdale
 Philippe Hameau
@@ -634,16 +804,21 @@ Philippe Raoult
 Philippe Vaucher
 Pierre
 Pierre Brico
+Pierre Chapuis
 Pierre Joye
+Pierre Ynard
 Pooyan McSporran
 Pramod Sharma
 Puneet Pawaia
 Quagmire
 Quanah Gibson-Mount
+Quinn Slack
 Rafa Muyo
 Rafael Sagula
 Rainer Canavan
+Rainer Jung
 Rainer Koenig
+Rajesh Naganathan
 Ralf S. Engelschall
 Ralph Beckmann
 Ralph Mitchell
@@ -656,9 +831,11 @@ Reinout van Schouwen
 Renato Botelho
 Renaud Chaillat
 Renaud Duhaut
+Renaud Guillard
 Rene Bernhardt
 Rene Rebe
 Reuven Wachtfogel
+Reza Arbab
 Ricardo Cadime
 Rich Gray
 Rich Rauenzahn
@@ -668,51 +845,70 @@ Richard Bramante
 Richard Clayton
 Richard Cooper
 Richard Gorton
+Richard Michael
 Richard Prescott
+Richard Silverman
 Rick Jones
 Rick Richardson
 Rob Crittenden
 Rob Jones
 Rob Stanzel
+Rob Ward
 Robert A. Monat
+Robert B. Harris
 Robert D. Young
 Robert Foreman
 Robert Iakobashvili
 Robert Olson
+Robert Schumann
 Robert Weaver
+Robert Wruck
 Robin Cornelius
 Robin Johnson
 Robin Kay
 Robson Braga Araujo
 Rodney Simmons
+Rodrigo Silva
 Roland Blom
 Roland Krikava
 Roland Zimmermann
 Rolland Dudemaine
 Roman Koifman
+Roman Mamedov
 Ron Zapp
 Rosimildo da Silva
 Roy Shan
 Rune Kleveland
 Ruslan Gazizov
+Rutger Hofman
 Ryan Chan
 Ryan Nelson
+Ryan Schmidt
 S. Moonesamy
-Salvador Dávila
+Salvador Dávila
 Salvatore Sorrentino
+Sam Deane
 Sam Listopad
 Sampo Kellomaki
-Samuel Díaz García
+Samuel Díaz García
 Samuel Listopad
+Samuel Thibault
 Sander Gates
 Sandor Feldi
+Santhana Todatry
+Saqib Ali
+Sara Golemon
+Saran Neti
 Saul good
+Scott Bailey
 Scott Barrett
 Scott Cantor
 Scott Davis
 Scott McCreary
+Sebastian Rasmussen
 Sebastien Willemijns
 Senthil Raja Velu
+Sergei Nikulov
 Sergio Ballestrero
 Seshubabu Pasam
 Sh Diao
@@ -732,9 +928,12 @@ Spacen Jasset
 Spiridonoff A.V
 Stadler Stephan
 Stan van de Burgt
+Stanislav Ivochkin
 Stefan Esser
 Stefan Krause
+Stefan Neis
 Stefan Teleman
+Stefan Tomanek
 Stefan Ulrich
 Stephan Bergmann
 Stephen Collyer
@@ -742,6 +941,8 @@ Stephen Kick
 Stephen More
 Sterling Hughes
 Steve Green
+Steve H Truong
+Steve Holme
 Steve Lhomme
 Steve Little
 Steve Marx
@@ -749,18 +950,23 @@ Steve Oliphant
 Steve Roskowski
 Steven Bazyl
 Steven G. Johnson
+Steven Gu
 Steven M. Schweda
+Steven Parkes
 Stoned Elipot
 Sven Anders
 Sven Neuhaus
 Sven Wegener
-Sébastien Willemijns
+Sébastien Willemijns
 T. Bharath
 T. Yamada
+Taneli Vahakangas
 Tanguy Fautre
+Tatsuhiro Tsujikawa
 Temprimus
 Thomas J. Moore
 Thomas Klausner
+Thomas L. Shinnick
 Thomas Lopatic
 Thomas Schwinge
 Thomas Tonino
@@ -769,25 +975,36 @@ Tim Baker
 Tim Bartley
 Tim Chen
 Tim Costello
+Tim Harder
+Tim Heckman
 Tim Newsome
 Tim Sneddon
-Tobias Rundström
+Timo Sirainen
+Tinus van den Berg
+Tobias Rundström
 Toby Peterson
+Todd A Ouska
 Todd Kulesza
+Todd Ouska
 Todd Vierling
 Tom Benoist
 Tom Donovan
+Tom Grace
 Tom Lee
 Tom Mattison
 Tom Moers
 Tom Mueller
 Tom Regner
+Tom Wright
 Tom Zerucha
+Tomas Mlcoch
 Tomas Pospisek
 Tomas Szepe
 Tomasz Lacki
+Tommie Gannert
 Tommy Tam
 Ton Voon
+Toni Moreno
 Toon Verwaest
 Tor Arntsen
 Torsten Foertsch
@@ -797,7 +1014,8 @@ Traian Nicolescu
 Troels Walsted Hansen
 Troy Engel
 Tupone Alfredo
-Ulf Härnhammar
+Ulf Härnhammar
+Ulrich Doehner
 Ulrich Zadow
 Venkat Akella
 Victor Snezhko
@@ -807,25 +1025,37 @@ Vincent Bronner
 Vincent Le Normand
 Vincent Penquerc'h
 Vincent Sanders
+Vincent Torri
 Vlad Grachov
 Vlad Ureche
+Vladimir Grishchenko
 Vladimir Lazarenko
 Vojtech Janota
 Vojtech Minarik
+Vsevolod Novikov
 Walter J. Mack
+Ward Willats
 Wayne Haigh
 Werner Koch
 Wesley Laxton
 Wesley Miaw
 Wez Furlong
 Wilfredo Sanchez
+Willem Sparreboom
 Wojciech Zwiefka
+Wouter Van Rooy
+Wu Yongzheng
 Xavier Bouchoux
+Yamada Yasuharu
 Yang Tse
 Yarram Sunil
 Yehoshua Hershberg
+Yukihiro Kawada
 Yuriy Sosov
+Yves Arrouye
 Yves Lejeune
+Zdenek Pavlas
+Zekun Ni
 Zmey Petroff
 Zvi Har'El
 nk
index 0a4c981..8b133dc 100644 (file)
--- a/docs/TODO
+++ b/docs/TODO
  All bugs documented in the KNOWN_BUGS document are subject for fixing!
 
  1. libcurl
- 1.1 Zero-copy interface
  1.2 More data sharing
  1.3 struct lifreq
  1.4 signal-based resolver timeouts
+ 1.5 get rid of PATH_MAX
+ 1.6 Happy Eyeball dual stack connect
+ 1.7 Modified buffer size approach
 
  2. libcurl - multi interface
  2.1 More non-blocking
- 2.2 Remove easy interface internally
- 2.3 Avoid having to remove/readd handles
- 2.4 Fix HTTP Pipelining for PUT
+ 2.2 Fix HTTP Pipelining for PUT
 
  3. Documentation
  3.1  More and better
@@ -38,6 +38,7 @@
  5.1 Better persistency for HTTP 1.0
  5.2 support FF3 sqlite cookie files
  5.3 Rearrange request header order
+ 5.4 HTTP2/SPDY
 
  6. TELNET
  6.1 ditch stdin
  6.3 feature negotiation debug data
  6.4 send data in chunks
 
- 7. SSL
- 7.1 Disable specific versions
- 7.2 Provide mutex locking API
- 7.3 Evaluate SSL patches
- 7.4 Cache OpenSSL contexts
- 7.5 Export session ids
- 7.6 Provide callback for cert verification
- 7.7 Support other SSL libraries
- 7.8  Support SRP on the TLS layer
- 7.9 improve configure --with-ssl
-
- 8. GnuTLS
- 8.1 SSL engine stuff
- 8.2 SRP
- 8.3 check connection
- 8.4 non-gcrypt
-
- 9. Other protocols
-
- 10. New protocols
- 10.1 RSYNC
-
- 11. Client
- 11.1 sync
- 11.2 glob posts
- 11.3 prevent file overwriting
- 11.4 simultaneous parallel transfers
- 11.5 provide formpost headers
- 11.6 url-specific options
- 11.7 metalink support
- 11.8 warning when setting an option
-
- 12. Build
- 12.1 roffit
-
- 13. Test suite
- 13.1 SSL tunnel
- 13.2 nicer lacking perl message
- 13.3 more protocols supported
- 13.4 more platforms supported
-
- 14. Next SONAME bump
- 14.1 http-style HEAD output for ftp
- 14.2 combine error codes
- 14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
-
- 15. Next major release
- 15.1 cleanup return codes
- 15.2 remove obsolete defines
- 15.3 size_t
- 15.4 remove several functions
- 15.5 remove CURLOPT_FAILONERROR
- 15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
- 15.7 remove progress meter from libcurl
+ 7. SMTP
+ 7.1 Pipelining
+ 7.2 Graceful base64 decoding failure
+ 7.3 Enhanced capability support
+ 8. POP3
+ 8.1 Pipelining
+ 8.2 Graceful base64 decoding failure
+ 8.3 Enhanced capability support
+ 9. IMAP
+ 9.1 Graceful base64 decoding failure
+ 9.2 Enhanced capability support
+ 10. LDAP
+ 10.1 SASL based authentication mechanisms
+ 11. New protocols
+ 11.1 RSYNC
+
+ 12. SSL
+ 12.1 Disable specific versions
+ 12.2 Provide mutex locking API
+ 12.3 Evaluate SSL patches
+ 12.4 Cache OpenSSL contexts
+ 12.5 Export session ids
+ 12.6 Provide callback for cert verification
+ 12.7 Support other SSL libraries
+ 12.8 improve configure --with-ssl
+ 12.9 Support DANE
+
+ 13. GnuTLS
+ 13.1 SSL engine stuff
+ 13.2 check connection
+
+ 14. SASL
+ 14.1 Other authentication mechanisms
+ 15. Client
+ 15.1 sync
+ 15.2 glob posts
+ 15.3 prevent file overwriting
+ 15.4 simultaneous parallel transfers
+ 15.5 provide formpost headers
+ 15.6 url-specific options
+ 15.7 warning when setting an option
+ 15.8 IPv6 addresses with globbing
+
+ 16. Build
+ 16.1 roffit
+
+ 17. Test suite
+ 17.1 SSL tunnel
+ 17.2 nicer lacking perl message
+ 17.3 more protocols supported
+ 17.4 more platforms supported
+
+ 18. Next SONAME bump
+ 18.1 http-style HEAD output for ftp
+ 18.2 combine error codes
+ 18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+
+ 19. Next major release
+ 19.1 cleanup return codes
+ 19.2 remove obsolete defines
+ 19.3 size_t
+ 19.4 remove several functions
+ 19.5 remove CURLOPT_FAILONERROR
+ 19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+ 19.7 remove progress meter from libcurl
+ 19.8 remove 'curl_httppost' from public
+ 19.9 have form functions use CURL handle argument
+ 19.10 Add CURLOPT_MAIL_CLIENT option
 
 ==============================================================================
 
 1. libcurl
 
-1.1 Zero-copy interface
-
- Introduce another callback interface for upload/download that makes one less
- copy of data and thus a faster operation.
- [http://curl.haxx.se/dev/no_copy_callbacks.txt]
-
 1.2 More data sharing
 
  curl_share_* functions already exist and work, and they can be extended to
  Also, alarm() provides timeout resolution only to the nearest second. alarm
  ought to be replaced by setitimer on systems that support it.
 
+1.5 get rid of PATH_MAX
+
+ Having code use and rely on PATH_MAX is not nice:
+ http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
+
+ Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
+ we need libssh2 to properly tell us when we pass in a too small buffer and
+ its current API (as of libssh2 1.2.7) doesn't.
+
+1.6 Happy Eyeball dual stack connect
+
+ In order to make alternative technologies not suffer when transitioning, like
+ when introducing IPv6 as an alternative to IPv4 and there are more than one
+ option existing simultaneously there are reasons to reconsider internal
+ choices.
+
+ To make libcurl do blazing fast IPv6 in a dual-stack configuration, this needs
+ to be addressed:
+
+    http://tools.ietf.org/html/rfc6555
+
+1.7 Modified buffer size approach
+
+ Current libcurl allocates a fixed 16K size buffer for download and an
+ additional 16K for upload. They are always unconditionally part of the easy
+ handle. If CRLF translations are requested, an additional 32K "scratch
+ buffer" is allocated. A total of 64K transfer buffers in the worst case.
+
+ First, while the handles are not actually in use these buffers could be freed
+ so that lingering handles just kept in queues or whatever waste less memory.
+
+ Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once
+ since each need to be individually acked and therefore libssh2 must be
+ allowed to send (or receive) many separate ones in parallel to achieve high
+ transfer speeds. A current libcurl build with a 16K buffer makes that
+ impossible, but one with a 512K buffer will reach MUCH faster transfers. But
+ allocating 512K unconditionally for all buffers just in case they would like
+ to do fast SFTP transfers at some point is not a good solution either.
+
+ Dynamically allocate buffer size depending on protocol in use in combination
+ with freeing it after each individual transfer? Other suggestions?
+
+
 2. libcurl - multi interface
 
 2.1 More non-blocking
 
  - Name resolves on non-windows unless c-ares is used
  - NSS SSL connections
- - Active FTP connections
  - HTTP proxy CONNECT operations
  - SOCKS proxy handshakes
  - file:// transfers
  - The "DONE" operation (post transfer protocol-specific actions) for the
    protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
 
-2.2 Remove easy interface internally
-
- Make curl_easy_perform() a wrapper-function that simply creates a multi
- handle, adds the easy handle to it, runs curl_multi_perform() until the
- transfer is done, then detach the easy handle, destroy the multi handle and
- return the easy handle's return code. This will thus make everything
- internally use and assume the multi interface. The select()-loop should use
- curl_multi_socket().
-
-2.3 Avoid having to remove/readd handles
-
- curl_multi_handle_control() - this can control the easy handle (while) added
- to a multi handle in various ways:
-
- o RESTART, unconditionally restart this easy handle's transfer from the
-   start, re-init the state
-
- o RESTART_COMPLETED, restart this easy handle's transfer but only if the
-   existing transfer has already completed and it is in a "finished state".
-
- o STOP, just stop this transfer and consider it completed
-
- o PAUSE?
-
- o RESUME?
-
-2.4 Fix HTTP Pipelining for PUT
+2.2 Fix HTTP Pipelining for PUT
 
  HTTP Pipelining can be a way to greatly enhance performance for multiple
  serial requests and currently libcurl only supports that for HEAD and GET
  headers use a default value so only headers that need to be moved have to be
  specified.
 
+5.4 HTTP2/SPDY
+
+ The first drafts for HTTP2 have been published
+ (http://tools.ietf.org/html/draft-ietf-httpbis-http2-03) and is so far based
+ on SPDY (http://www.chromium.org/spdy) designs and experiences. Chances are
+ it will end up in that style. Chrome and Firefox already support SPDY and
+ lots of web services do.
+
+ It would make sense to implement SPDY support now and later transition into
+ or add HTTP2 support as well.
+
+ We should base or HTTP2/SPDY work on a 3rd party library for the protocol
+ fiddling. The Spindy library (http://spindly.haxx.se/) was an attempt to make
+ such a library with an API suitable for use by libcurl but that effort has
+ more or less stalled.  spdylay (https://github.com/tatsuhiro-t/spdylay) may
+ be a better option, either used directly or wrapped with a more spindly-like
+ API.
+
 
 6. TELNET
 
@@ -277,25 +325,92 @@ to provide the data to send.
   use, but inefficient for any other.  Sent data should be sent in larger
   chunks.
 
-7. SSL
+7. SMTP
+
+7.1 Pipelining
+
+ Add support for pipelining emails.
+
+7.2 Graceful base64 decoding failure
+
+ Rather than shutting down the session and returning an error when the
+ decoding of a base64 encoded authentication response fails, we should
+ gracefully shutdown the authentication process by sending a * response to the
+ server as per RFC4954.
+
+7.3 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the EHLO command.
+
+8. POP3
+
+8.1 Pipelining
+
+ Add support for pipelining commands.
+
+8.2 Graceful base64 decoding failure
+
+ Rather than shutting down the session and returning an error when the
+ decoding of a base64 encoded authentication response fails, we should
+ gracefully shutdown the authentication process by sending a * response to the
+ server as per RFC5034.
+8.3 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPA command.
+
+9. IMAP
 
-7.1 Disable specific versions
+9.1 Graceful base64 decoding failure
+
+ Rather than shutting down the session and returning an error when the
+ decoding of a base64 encoded authentication response fails, we should
+ gracefully shutdown the authentication process by sending a * response to the
+ server as per RFC3501.
+
+9.2 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPABILITY command.
+
+10. LDAP
+
+10.1 SASL based authentication mechanisms
+
+ Currently the LDAP module only supports ldap_simple_bind_s() in order to bind
+ to an LDAP server. However, this function sends username and password details
+ using the simple authentication mechanism (as clear text). However, it should
+ be possible to use ldap_bind_s() instead specifing the security context
+ information ourselves.
+
+11. New protocols
+
+11.1 RSYNC
+
+ There's no RFC for the protocol or an URI/URL format.  An implementation
+ should most probably use an existing rsync library, such as librsync.
+
+12. SSL
+
+12.1 Disable specific versions
 
  Provide an option that allows for disabling specific SSL versions, such as
  SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
 
-7.2 Provide mutex locking API
+12.2 Provide mutex locking API
 
  Provide a libcurl API for setting mutex callbacks in the underlying SSL
  library, so that the same application code can use mutex-locking
  independently of OpenSSL or GnutTLS being used.
 
-7.3 Evaluate SSL patches
+12.3 Evaluate SSL patches
 
  Evaluate/apply Gertjan van Wingerde's SSL patches:
  http://curl.haxx.se/mail/lib-2004-03/0087.html
 
-7.4 Cache OpenSSL contexts
+12.4 Cache OpenSSL contexts
 
  "Look at SSL cafile - quick traces look to me like these are done on every
  request as well, when they should only be necessary once per ssl context (or
@@ -305,7 +420,7 @@ to provide the data to send.
  style connections are re-used. It will make us use slightly more memory but
  it will libcurl do less creations and deletions of SSL contexts.
 
-7.5 Export session ids
+12.5 Export session ids
 
  Add an interface to libcurl that enables "session IDs" to get
  exported/imported. Cris Bailiff said: "OpenSSL has functions which can
@@ -313,67 +428,54 @@ to provide the data to send.
  the state from such a buffer at a later date - this is used by mod_ssl for
  apache to implement and SSL session ID cache".
 
-7.6 Provide callback for cert verification
+12.6 Provide callback for cert verification
 
  OpenSSL supports a callback for customised verification of the peer
  certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
  it be? There's so much that could be done if it were!
 
-7.7 Support other SSL libraries
+12.7 Support other SSL libraries
 
  Make curl's SSL layer capable of using other free SSL libraries.  Such as
  MatrixSSL (http://www.matrixssl.org/).
 
-7.8  Support SRP on the TLS layer
-
- Peter Sylvester's patch for SRP on the TLS layer.  Awaits OpenSSL support for
- this, no need to support this in libcurl before there's an OpenSSL release
- that does it.
-
-7.9 improve configure --with-ssl
+12.8 improve configure --with-ssl
 
  make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
  then NSS...
 
-8. GnuTLS
+12.9 Support DANE
 
-8.1 SSL engine stuff
+ DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
+ keys and certs over DNS using DNSSEC as an alternative to the CA model.
+ http://www.rfc-editor.org/rfc/rfc6698.txt
 
- Is this even possible?
+ An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
+ (http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
+ approach. See Daniel's comments:
+ http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
+ correct library to base this development on.
+
+13. GnuTLS
 
-8.2 SRP
+13.1 SSL engine stuff
 
- Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
- TLS to provide name and password. GnuTLS already supports it...
+ Is this even possible?
 
-8.3 check connection
+13.2 check connection
 
  Add a way to check if the connection seems to be alive, to correspond to the
  SSL_peak() way we use with OpenSSL.
 
-8.4 non-gcrypt
-
- libcurl assumes that there are gcrypt functions available when
- GnuTLS is.
-
- GnuTLS can be built to use libnettle instead as crypto library,
- which breaks the previously mentioned assumption
-
- The correct fix would be to detect which crypto layer that is in use and
- adapt our code to use that instead of blindly assuming gcrypt.
-
-9. Other protocols
+14. SASL
 
-10. New protocols
+14.1 Other authentication mechanisms
 
-10.1 RSYNC
+ Add support for GSSAPI to SMTP, POP3 and IMAP.
 
- There's no RFC for protocol nor URI/URL format.  An implementation should
- most probably use an existing rsync library, such as librsync.
+15. Client
 
-11. Client
-
-11.1 sync
+15.1 sync
 
  "curl --sync http://example.com/feed[1-100].rss" or
  "curl --sync http://example.net/{index,calendar,history}.html"
@@ -382,12 +484,12 @@ to provide the data to send.
  remote file is newer than the local file. A Last-Modified HTTP date header
  should also be used to set the mod date on the downloaded file.
 
-11.2 glob posts
+15.2 glob posts
 
  Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
  This is easily scripted though.
 
-11.3 prevent file overwriting
+15.3 prevent file overwriting
 
  Add an option that prevents cURL from overwriting existing local files. When
  used, and there already is an existing file with the target file name
@@ -395,14 +497,14 @@ to provide the data to send.
  existing). So that index.html becomes first index.html.1 and then
  index.html.2 etc.
 
-11.4 simultaneous parallel transfers
+15.4 simultaneous parallel transfers
 
  The client could be told to use maximum N simultaneous parallel transfers and
  then just make sure that happens. It should of course not make more than one
  connection to the same remote host. This would require the client to use the
  multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
 
-11.5 provide formpost headers
+15.5 provide formpost headers
 
  Extending the capabilities of the multipart formposting. How about leaving
  the ';type=foo' syntax as it is and adding an extra tag (headers) which
@@ -416,7 +518,7 @@ to provide the data to send.
  which should overwrite the program reasonable defaults (plain/text,
  8bit...)
 
-11.6 url-specific options
+15.6 url-specific options
 
  Provide a way to make options bound to a specific URL among several on the
  command line. Possibly by letting ':' separate options between URLs,
@@ -430,55 +532,57 @@ to provide the data to send.
 
  The example would do a POST-GET-POST combination on a single command line.
 
-11.7 metalink support
-
- Add metalink support to curl (http://www.metalinker.org/). This is most useful
- with simultaneous parallel transfers (11.6) but not necessary.
-
-11.8 warning when setting an option
+15.7 warning when setting an option
 
   Display a warning when libcurl returns an error when setting an option.
   This can be useful to tell when support for a particular feature hasn't been
   compiled into the library.
 
-12. Build
+15.8 IPv6 addresses with globbing
+
+  Currently the command line client needs to get url globbing disabled (with
+  -g) for it to support IPv6 numerical addresses. This is a rather silly flaw
+  that should be corrected. It probably involves a smarter detection of the
+  '[' and ']' letters.
+
+16. Build
 
-12.1 roffit
+16.1 roffit
 
  Consider extending 'roffit' to produce decent ASCII output, and use that
- instead of (g)nroff when building src/hugehelp.c
+ instead of (g)nroff when building src/tool_hugehelp.c
 
-13. Test suite
+17. Test suite
 
-13.1 SSL tunnel
+17.1 SSL tunnel
 
  Make our own version of stunnel for simple port forwarding to enable HTTPS
  and FTP-SSL tests without the stunnel dependency, and it could allow us to
  provide test tools built with either OpenSSL or GnuTLS
 
-13.2 nicer lacking perl message
+17.2 nicer lacking perl message
 
  If perl wasn't found by the configure script, don't attempt to run the tests
  but explain something nice why it doesn't.
 
-13.3 more protocols supported
+17.3 more protocols supported
 
  Extend the test suite to include more protocols. The telnet could just do ftp
  or http operations (for which we have test servers).
 
-13.4 more platforms supported
+17.4 more platforms supported
 
  Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
  fork()s and it should become even more portable.
 
-14. Next SONAME bump
+18. Next SONAME bump
 
-14.1 http-style HEAD output for ftp
+18.1 http-style HEAD output for ftp
 
  #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
  from being output in NOBODY requests over ftp
 
-14.2 combine error codes
+18.2 combine error codes
 
  Combine some of the error codes to remove duplicates.  The original
  numbering should not be changed, and the old identifiers would be
@@ -488,37 +592,44 @@ to provide the data to send.
  Candidates for removal and their replacements:
 
     CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
     CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
     CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
+
     CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
+
     CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
+
     CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
+
     CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
+
     CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
 
-14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
 
  The current prototype only provides 'purpose' that tells what the
  connection/socket is for, but not any protocol or similar. It makes it hard
  for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
  similar.
 
-15. Next major release
+10. Next major release
 
-15.1 cleanup return codes
+19.1 cleanup return codes
 
  curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
  CURLMcode. These should be changed to be the same.
 
-15.2 remove obsolete defines
+19.2 remove obsolete defines
 
  remove obsolete defines from curl/curl.h
 
-15.3 size_t
+19.3 size_t
 
  make several functions use size_t instead of int in their APIs
 
-15.4 remove several functions
+19.4 remove several functions
 
  remove the following functions from the public API:
 
@@ -539,18 +650,18 @@ to provide the data to send.
 
  curl_multi_socket_all
 
-15.5 remove CURLOPT_FAILONERROR
+19.5 remove CURLOPT_FAILONERROR
 
  Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
  internally. Let the app judge success or not for itself.
 
-15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
 
  Remove support for a global DNS cache. Anything global is silly, and we
  already offer the share interface for the same functionality but done
  "right".
 
-15.7 remove progress meter from libcurl
+19.7 remove progress meter from libcurl
 
  The internally provided progress meter output doesn't belong in the library.
  Basically no application wants it (apart from curl) but instead applications
@@ -559,3 +670,31 @@ to provide the data to send.
  The progress callback should then be bumped as well to get proper 64bit
  variable types passed to it instead of doubles so that big files work
  correctly.
+
+19.8 remove 'curl_httppost' from public
+
+ curl_formadd() was made to fill in a public struct, but the fact that the
+ struct is public is never really used by application for their own advantage
+ but instead often restricts how the form functions can or can't be modified.
+
+ Changing them to return a private handle will benefit the implementation and
+ allow us much greater freedoms while still maintining a solid API and ABI.
+
+19.9 have form functions use CURL handle argument
+
+ curl_formadd() and curl_formget() both currently have no CURL handle
+ argument, but both can use a callback that is set in the easy handle, and
+ thus curl_formget() with callback cannot function without first having
+ curl_easy_perform() (or similar) called - which is hard to grasp and a design
+ mistake.
+
+19.10 Add CURLOPT_MAIL_CLIENT option
+
+ Rather than use the URL to specify the mail client string to present in the
+ HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
+ specifing this data as the URL is non-standard and to be honest a bit of a
+ hack ;-)
+
+ Please see the following thread for more information:
+ http://curl.haxx.se/mail/lib-2012-05/0178.html
index 183dd17..b0dab5f 100644 (file)
@@ -1,5 +1,5 @@
 Online:  http://curl.haxx.se/docs/httpscripting.html
-Date:    May 28, 2008
+Date:    Jan 19, 2011
 
                 The Art Of Scripting HTTP Requests Using Curl
                 =============================================
@@ -38,10 +38,26 @@ Date:    May 28, 2008
  request a particular action, and then the server replies a few text lines
  before the actual requested content is sent to the client.
 
- Using curl's option --verbose (-v as a short option) will display what kind of
- commands curl sends to the server, as well as a few other informational texts. 
- --verbose is the single most useful option when it comes to debug or even
- understand the curl<->server interaction.
+ The client, curl, sends a HTTP request. The request contains a method (like
+ GET, POST, HEAD etc), a number of request headers and sometimes a request
+ body. The HTTP server responds with a status line (indicating if things went
+ well), response headers and most often also a response body. The "body" part
+ is the plain data you requested, like the actual HTML or the image etc.
+
+ 1.1 See the Protocol
+
+  Using curl's option --verbose (-v as a short option) will display what kind
+  of commands curl sends to the server, as well as a few other informational
+  texts.
+
+  --verbose is the single most useful option when it comes to debug or even
+  understand the curl<->server interaction.
+
+  Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
+  even more details as they show EVERYTHING curl sends and receives. Use it
+  like this:
+
+      curl --trace-ascii debugdump.txt http://www.example.com/
 
 2. URL
 
@@ -61,10 +77,10 @@ Date:    May 28, 2008
  you get a web page returned in your terminal window. The entire HTML document
  that that URL holds.
 
- All HTTP replies contain a set of headers that are normally hidden, use
- curl's --include (-i) option to display them as well as the rest of the
- document. You can also ask the remote server for ONLY the headers by using the
- --head (-I) option (which will make curl issue a HEAD request).
+ All HTTP replies contain a set of response headers that are normally hidden,
use curl's --include (-i) option to display them as well as the rest of the
+ document. You can also ask the remote server for ONLY the headers by using
the --head (-I) option (which will make curl issue a HEAD request).
 
 4. Forms
 
@@ -127,7 +143,8 @@ Date:    May 28, 2008
   And to use curl to post this form with the same data filled in as before, we
   could do it like:
 
-        curl --data "birthyear=1905&press=%20OK%20" http://www.hotmail.com/when/junk.cgi
+        curl --data "birthyear=1905&press=%20OK%20" \
+        http://www.example.com/when.cgi
 
   This kind of POST will use the Content-Type
   application/x-www-form-urlencoded and is the most widely used POST kind.
@@ -204,7 +221,7 @@ Date:    May 28, 2008
 
  Put a file to a HTTP server with curl:
 
-        curl --upload-file uploadfile http://www.uploadhttp.com/receive.cgi
+        curl --upload-file uploadfile http://www.example.com/receive.cgi
 
 6. HTTP Authentication
 
@@ -217,7 +234,7 @@ Date:    May 28, 2008
 
  To tell curl to use a user and password for authentication:
 
-        curl --user name:password http://www.secrets.com
+        curl --user name:password http://www.example.com
 
  The site might require a different authentication method (check the headers
  returned by the server), and then --ntlm, --digest, --negotiate or even
@@ -257,7 +274,7 @@ Date:    May 28, 2008
 
  Use curl to set the referer field with:
 
-        curl --referer http://curl.haxx.se http://daniel.haxx.se
+        curl --referer http://www.example.come http://www.example.com
 
 8. User Agent
 
@@ -273,13 +290,13 @@ Date:    May 28, 2008
  is time to set the User Agent field to fool the server into thinking you're
  one of those browsers.
 
- To make curl look like Internet Explorer on a Windows 2000 box:
+ To make curl look like Internet Explorer on a Windows 2000 box:
 
-        curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
+  curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
 
- Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
+ Or why not look like you're using Netscape 4.73 on an old Linux box:
 
-        curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
+  curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
 
 9. Redirects
 
@@ -294,7 +311,7 @@ Date:    May 28, 2008
 
  To tell curl to follow a Location:
 
-        curl --location http://www.sitethatredirects.com
+        curl --location http://www.example.com
 
  If you use curl to POST to a site that immediately redirects you to another
  page, you can safely use --location (-L) and --data/--form together. Curl will
@@ -321,13 +338,13 @@ Date:    May 28, 2008
  The simplest way to send a few cookies to the server when getting a page with
  curl is to add them on the command line like:
 
-        curl --cookie "name=Daniel" http://www.cookiesite.com
+        curl --cookie "name=Daniel" http://www.example.com
 
  Cookies are sent as common HTTP headers. This is practical as it allows curl
  to record cookies simply by recording headers. Record cookies with curl by
  using the --dump-header (-D) option like:
 
-        curl --dump-header headers_and_cookies http://www.cookiesite.com
+        curl --dump-header headers_and_cookies http://www.example.com
 
  (Take note that the --cookie-jar option described below is a better way to
  store cookies.)
@@ -338,24 +355,25 @@ Date:    May 28, 2008
  believing you had a previous connection). To use previously stored cookies,
  you run curl like:
 
-        curl --cookie stored_cookies_in_file http://www.cookiesite.com
+        curl --cookie stored_cookies_in_file http://www.example.com
 
  Curl's "cookie engine" gets enabled when you use the --cookie option. If you
  only want curl to understand received cookies, use --cookie with a file that
- doesn't exist. Example, if you want to let curl understand cookies from a page 
- and follow a location (and thus possibly send back cookies it received), you
- can invoke it like:
+ doesn't exist. Example, if you want to let curl understand cookies from a
+ page and follow a location (and thus possibly send back cookies it received),
you can invoke it like:
 
-        curl --cookie nada --location http://www.cookiesite.com
+        curl --cookie nada --location http://www.example.com
 
  Curl has the ability to read and write cookie files that use the same file
  format that Netscape and Mozilla do. It is a convenient way to share cookies
- between browsers and automatic scripts. The --cookie (-b) switch automatically
- detects if a given file is such a cookie file and parses it, and by using the
- --cookie-jar (-c) option you'll make curl write a new cookie file at the end of
- an operation:
+ between browsers and automatic scripts. The --cookie (-b) switch
+ automatically detects if a given file is such a cookie file and parses it,
+ and by using the --cookie-jar (-c) option you'll make curl write a new cookie
file at the end of an operation:
 
-        curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.cookiesite.com
+        curl --cookie cookies.txt --cookie-jar newcookies.txt \
+        http://www.example.com
 
 11. HTTPS
 
@@ -371,7 +389,7 @@ Date:    May 28, 2008
  Curl supports encrypted fetches thanks to the freely available OpenSSL
  libraries. To get a page from a HTTPS server, simply run curl like:
 
-        curl https://that.secure.server.com
+        curl https://secure.example.com
 
  11.1 Certificates
 
@@ -382,7 +400,7 @@ Date:    May 28, 2008
   can be specified on the command line or if not, entered interactively when
   curl queries for it. Use a certificate with curl on a HTTPS server like:
 
-        curl --cert mycert.pem https://that.secure.server.com
+        curl --cert mycert.pem https://secure.example.com
 
   curl also tries to verify that the server is who it claims to be, by
   verifying the server's certificate against a locally stored CA cert
@@ -403,17 +421,18 @@ Date:    May 28, 2008
  For example, you can change the POST request to a PROPFIND and send the data
  as "Content-Type: text/xml" (instead of the default Content-Type) like this:
 
-        curl --data "<xml>" --header "Content-Type: text/xml" --request PROPFIND url.com
+         curl --data "<xml>" --header "Content-Type: text/xml" \
+              --request PROPFIND url.com
 
  You can delete a default header by providing one without content. Like you
  can ruin the request by chopping off the Host: header:
 
-        curl --header "Host:" http://mysite.com
+        curl --header "Host:" http://www.example.com
 
  You can add headers the same way. Your server may want a "Destination:"
  header, and you can add it:
 
-        curl --header "Destination: http://moo.com/nowhere" http://url.com
+        curl --header "Destination: http://nowhere" http://example.com
 
 13. Web Login
 
@@ -444,7 +463,6 @@ Date:    May 28, 2008
  to do a proper login POST. Remember that the contents need to be URL encoded
  when sent in a normal POST.
 
-
 14. Debug
 
  Many times when you run curl on a site, you'll notice that the site doesn't
@@ -480,12 +498,10 @@ Date:    May 28, 2008
  RFC 2616 is a must to read if you want in-depth understanding of the HTTP
  protocol.
 
- RFC 2396 explains the URL syntax.
+ RFC 3986 explains the URL syntax.
 
  RFC 2109 defines how cookies are supposed to work.
 
  RFC 1867 defines the HTTP post upload format.
 
- http://www.openssl.org is the home of the OpenSSL project
-
  http://curl.haxx.se is the home of the cURL project
index 21c0d90..0670089 100644 (file)
@@ -11,32 +11,25 @@ Version Numbers and Releases
 
  The version numbering is always built up using the same system:
 
-        X.Y[.Z][-preN]
+        X.Y[.Z]
 
  Where
    X is main version number
    Y is release number
    Z is patch number
-   N is pre-release number
 
  One of these numbers will get bumped in each new release. The numbers to the
  right of a bumped number will be reset to zero. If Z is zero, it may not be
- included in the version number. The pre release number is only included in
- pre releases (they're never used in public, official, releases).
+ included in the version number.
 
  The main version number will get bumped when *really* big, world colliding
- changes are made. The release number is bumped when big changes are
- performed. The patch number is bumped when the changes are mere bugfixes and
- only minor feature changes. The pre-release is a counter, to identify which
- pre-release a certain release is.
-
- When reaching the end of a pre-release period, the version without the
- pre-release part will be released as a public release.
+ changes are made. The release number is bumped when changes are performed or
+ things/features are added. The patch number is bumped when the changes are
+ mere bugfixes.
 
  It means that after release 1.2.3, we can release 2.0 if something really big
  has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
- were fixed. Before 1.2.4 is released, we might release a 1.2.4-pre1 release
- for the brave people to try before the actual release.
+ were fixed.
 
  Bumping, as in increasing the number with 1, is unconditionally only
  affecting one of the numbers (except the ones to the right of it, that may be
@@ -56,12 +49,12 @@ Version Numbers and Releases
         #define LIBCURL_VERSION_NUM 0xXXYYZZ
 
  Where XX, YY and ZZ are the main version, release and patch numbers in
- hexadecimal. All three numbers are always represented using two digits.  1.2
- would appear as "0x010200" while version 9.11.7 appears as "0x090b07".
+ hexadecimal. All three number fields are always represented using two digits
+ (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
+ appears as "0x090b07".
 
- This 6-digit hexadecimal number does not show pre-release number, and it is
- always a greater number in a more recent release. It makes comparisons with
- greater than and less than work.
+ This 6-digit hexadecimal number is always a greater number in a more recent
+ release. It makes comparisons with greater than and less than work.
 
  This number is also available as three separate defines:
  LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH.
index c4f4e2b..14a9d2b 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2012, 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
@@ -93,7 +93,6 @@ What's the installed libcurl version?
 
 How do I build a single file with a one-line command?
 
-  $ `curl-config --cc --cflags --libs` -o example example.c
-
+  $ `curl-config --cc --cflags` -o example example.c `curl-config --libs`
 .SH "SEE ALSO"
 .BR curl (1)
index 3f49388..1563d54 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl-config man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -83,8 +85,7 @@ p.roffit {
 <p class="level0">What's the installed libcurl version? 
 <p class="level0">&nbsp; $ curl-config --version 
 <p class="level0">How do I build a single file with a one-line command? 
-<p class="level0">&nbsp; $ `curl-config --cc --cflags --libs` -o example example.c 
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0">&nbsp; $ `curl-config --cc --cflags` -o example example.c `curl-config --libs` <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><span Class="manpage">curl (1)</span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index e159a94..429812f 100644 (file)
Binary files a/docs/curl-config.pdf and b/docs/curl-config.pdf differ
index 95614c6..9e1a688 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, 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
@@ -20,7 +20,7 @@
 .\" *
 .\" **************************************************************************
 .\"
-.TH curl 1 "28 November 2009" "Curl 7.20.0" "Curl Manual"
+.TH curl 1 "27 July 2012" "Curl 7.27.0" "Curl Manual"
 .SH NAME
 curl \- transfer a URL
 .SH SYNOPSIS
@@ -35,8 +35,8 @@ command is designed to work without user interaction.
 
 curl offers a busload of useful tricks like proxy support, user
 authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
-resume and more. As you will see below, the number of features will make your
-head spin!
+resume, Metalink, and more. As you will see below, the number of features will
+make your head spin!
 
 curl is powered by libcurl for all transfer-related features. See
 .BR libcurl (3)
@@ -79,14 +79,14 @@ curl will do its best to use what you pass to it as a URL. It is not trying to
 validate it as a syntactically correct URL by any means but is instead
 \fBvery\fP liberal with what it accepts.
 
-Curl will attempt to re-use connections for multiple file transfers, so that
+curl will attempt to re-use connections for multiple file transfers, so that
 getting many files from the same server will not do multiple connects /
 handshakes. This improves speed. Of course this is only done on files
 specified on a single command line and cannot be used between separate curl
 invokes.
 .SH "PROGRESS METER"
-curl normally displays a progress meter during operations, indicating the amount
-of transferred data, transfer speeds and estimated time left, etc.
+curl normally displays a progress meter during operations, indicating the
+amount of transferred data, transfer speeds and estimated time left, etc.
 
 curl displays this data to the terminal by default, so if you invoke curl to
 do an operation and it is about to write data to the terminal, it
@@ -103,24 +103,46 @@ any response data to the terminal.
 If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
 friend.
 .SH OPTIONS
-In general, all boolean options are enabled with --option and yet again
+In general, all boolean options are enabled with --\fBoption\fP and yet again
 disabled with --\fBno-\fPoption. That is, you use the exact same option name
 but prefix it with "no-". However, in this list we mostly only list and show
 the --option version of them. (This concept with --no options was added in
 7.19.0. Previously most options were toggled on/off on repeated use of the
 same command line option.)
-.IP "-a/--append"
+.IP "-#, --progress-bar"
+Make curl display progress as a simple progress bar instead of the standard,
+more informational, meter.
+.IP "-0, --http1.0"
+(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
+internally preferred: HTTP 1.1.
+.IP "-1, --tlsv1"
+(SSL)
+Forces curl to use TLS version 1 when negotiating with a remote TLS server.
+.IP "-2, --sslv2"
+(SSL)
+Forces curl to use SSL version 2 when negotiating with a remote SSL server.
+.IP "-3, --sslv3"
+(SSL)
+Forces curl to use SSL version 3 when negotiating with a remote SSL server.
+.IP "-4, --ipv4"
+If curl is capable of resolving an address to multiple IP versions (which it
+is if it is IPv6-capable), this option tells curl to resolve names to IPv4
+addresses only.
+.IP "-6, --ipv6"
+If curl is capable of resolving an address to multiple IP versions (which it
+is if it is IPv6-capable), this option tells curl to resolve names to IPv6
+addresses only.
+.IP "-a, --append"
 (FTP/SFTP) When used in an upload, this will tell curl to append to the target
 file instead of overwriting it. If the file doesn't exist, it will be created.
 Note that this flag is ignored by some SSH servers (including OpenSSH).
-.IP "-A/--user-agent <agent string>"
+.IP "-A--user-agent <agent string>"
 (HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
 done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
 the string, surround the string with single quote marks. This can also be set
-with the \fI-H/--header\fP option of course.
+with the \fI-H--header\fP option of course.
 
-If this option is set more than once, the last one will be the one that's
-used.
+If this option is used several times, the last one will be used.
 .IP "--anyauth"
 (HTTP) Tells curl to figure out authentication method by itself, and use the
 most secure one the remote site claims to support. This is done by first
@@ -133,7 +155,7 @@ Note that using --anyauth is not recommended if you do uploads from stdin,
 since it may require data to be sent twice and then the client must be able to
 rewind. If the need should arise when uploading from stdin, the upload
 operation will fail.
-.IP "-b/--cookie <name=data>"
+.IP "-b--cookie <name=data>"
 (HTTP)
 Pass the data to the HTTP server as a cookie. It is supposedly the
 data previously received from the server in a "Set-Cookie:" line.
@@ -143,19 +165,18 @@ If no '=' symbol is used in the line, it is treated as a filename to use to
 read previously stored cookie lines from, which should be used in this session
 if they match. Using this method also activates the "cookie parser" which will
 make curl record incoming cookies too, which may be handy if you're using this
-in combination with the \fI-L/--location\fP option. The file format of the
+in combination with the \fI-L--location\fP option. The file format of the
 file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
 cookie file format.
 
-\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
+\fBNOTE\fP that the file specified with \fI-b--cookie\fP is only used as
 input. No cookies will be stored in the file. To store cookies, use the
-\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
-using \fI-D/--dump-header\fP!
+\fI-c--cookie-jar\fP option or you could even save the HTTP headers to a file
+using \fI-D--dump-header\fP!
 
-If this option is set more than once, the last one will be the one that's
-used.
-.IP "-B/--use-ascii"
-Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
+If this option is used several times, the last one will be used.
+.IP "-B, --use-ascii"
+(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be
 enforced by using an URL that ends with ";type=A". This option causes data
 sent to stdout to be in text mode for win32 systems.
 .IP "--basic"
@@ -163,35 +184,18 @@ sent to stdout to be in text mode for win32 systems.
 this option is usually pointless, unless you use it to override a previously
 set option that sets a different authentication method (such as \fI--ntlm\fP,
 \fI--digest\fP, or \fI--negotiate\fP).
-.IP "--ciphers <list of ciphers>"
-(SSL) Specifies which ciphers to use in the connection. The list of ciphers
-must specify valid ciphers. Read up on SSL cipher list details on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of
-NSS ciphers is in the NSSCipherSuite entry at this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
-
-If this option is used several times, the last one will override the others.
-.IP "--compressed"
-(HTTP) Request a compressed response using one of the algorithms libcurl
-supports, and return the uncompressed document.  If this option is used and
-the server sends an unsupported encoding, curl will report an error.
-.IP "--connect-timeout <seconds>"
-Maximum time in seconds that you allow the connection to the server to take.
-This only limits the connection phase, once curl has connected this option is
-of no more use. See also the \fI-m/--max-time\fP option.
+.IP "-c, --cookie-jar <file name>"
+(HTTP) Specify to which file you want curl to write all cookies after a
+completed operation. Curl writes all cookies previously read from a specified
+file as well as all cookies received from remote server(s). If no cookies are
+known, no file will be written. The file will be written using the Netscape
+cookie file format. If you set the file name to a single dash, "-", the
+cookies will be written to stdout.
+
+This command line option will activate the cookie engine that makes curl
+record and use cookies. Another way to activate it is to use the \fI-b,
+--cookie\fP option.
 
-If this option is used several times, the last one will be used.
-.IP "-c/--cookie-jar <file name>"
-Specify to which file you want curl to write all cookies after a completed
-operation. Curl writes all cookies previously read from a specified file as
-well as all cookies received from remote server(s). If no cookies are known,
-no file will be written. The file will be written using the Netscape cookie
-file format. If you set the file name to a single dash, "-", the cookies will
-be written to stdout.
-
-.B NOTE
 If the cookie jar can't be created or written to, the whole curl operation
 won't fail or even report an error clearly. Using -v will get a warning
 displayed, but that is the only visible feedback you get about this possibly
@@ -199,7 +203,7 @@ lethal situation.
 
 If this option is used several times, the last specified file name will be
 used.
-.IP "-C/--continue-at <offset>"
+.IP "-C--continue-at <offset>"
 Continue/Resume a previous file transfer at the given offset. The given offset
 is the exact number of bytes that will be skipped, counting from the beginning
 of the source file before it is transferred to the destination.  If used with
@@ -209,11 +213,33 @@ Use "-C -" to tell curl to automatically find out where/how to resume the
 transfer. It then uses the given output/input files to figure that out.
 
 If this option is used several times, the last one will be used.
+.IP "--ciphers <list of ciphers>"
+(SSL) Specifies which ciphers to use in the connection. The list of ciphers
+must specify valid ciphers. Read up on SSL cipher list details on this URL:
+\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
+
+NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
+ciphers is in the NSSCipherSuite entry at this URL:
+\fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
+
+If this option is used several times, the last one will be used.
+.IP "--compressed"
+(HTTP) Request a compressed response using one of the algorithms curl
+supports, and save the uncompressed document.  If this option is used and the
+server sends an unsupported encoding, curl will report an error.
+.IP "--connect-timeout <seconds>"
+Maximum time in seconds that you allow the connection to the server to take.
+This only limits the connection phase, once curl has connected this option is
+of no more use.  Since 7.32.0, this option accepts decimal values, but the
+actual timeout will decrease in accuracy as the specified timeout increases in
+decimal precision. See also the \fI-m, --max-time\fP option.
+
+If this option is used several times, the last one will be used.
 .IP "--create-dirs"
-When used in conjunction with the -o option, curl will create the necessary
-local directory hierarchy as needed. This option creates the dirs mentioned
-with the -o option, nothing else. If the -o file name uses no dir or if the
-dirs it mentions already exist, no dir will be created.
+When used in conjunction with the \fI-o\fP option, curl will create the
+necessary local directory hierarchy as needed. This option creates the dirs
+mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
+uses no dir or if the dirs it mentions already exist, no dir will be created.
 
 To create remote directories when using FTP or SFTP, try
 \fI--ftp-create-dirs\fP.
@@ -226,14 +252,14 @@ List that may specify peer certificates that are to be considered revoked.
 If this option is used several times, the last one will be used.
 
 (Added in 7.19.7)
-.IP "-d/--data <data>"
+.IP "-d--data <data>"
 (HTTP) Sends the specified data in a POST request to the HTTP server, in the
 same way that a browser does when a user has filled in an HTML form and
 presses the submit button. This will cause curl to pass the data to the server
 using the content-type application/x-www-form-urlencoded.  Compare to
-\fI-F/--form\fP.
+\fI-F--form\fP.
 
-\fI-d/--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
+\fI-d--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
 you should instead use the \fI--data-binary\fP option. To URL-encode the value
 of a form field you may use \fI--data-urlencode\fP.
 
@@ -247,6 +273,21 @@ read the data from, or - if you want curl to read the data from stdin.  The
 contents of the file must already be URL-encoded. Multiple files can also be
 specified. Posting data from a file named 'foobar' would thus be done with
 \fI--data @foobar\fP.
+.IP "-D, --dump-header <file>"
+Write the protocol headers to the specified file.
+
+This option is handy to use when you want to store the headers that an HTTP
+site sends to you. Cookies from the headers could then be read in a second
+curl invocation by using the \fI-b, --cookie\fP option! The
+\fI-c, --cookie-jar\fP option is however a better way to store cookies.
+
+When used in FTP, the FTP server response lines are considered being "headers"
+and thus are saved there.
+
+If this option is used several times, the last one will be used.
+
+.IP "--data-ascii <data>"
+See \fI-d, --data\fP.
 .IP "--data-binary <data>"
 (HTTP) This posts data exactly as specified with no extra processing
 whatsoever.
@@ -256,7 +297,7 @@ is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
 are preserved and conversions are never done.
 
 If this option is used several times, the ones following the first will append
-data as described in \fI-d/--data\fP.
+data as described in \fI-d--data\fP.
 .IP "--data-urlencode <data>"
 (HTTP) This posts data, similar to the other --data options with the exception
 that this performs URL-encoding. (Added in 7.18.0)
@@ -284,87 +325,95 @@ URL-encode that data and pass it on in the POST. The name part gets an equal
 sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
 name is expected to be URL-encoded already.
 .RE
+.IP "--delegation LEVEL"
+Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
+comes to user credentials. Used with GSS/kerberos.
+.RS
+.IP "none"
+Don't allow any delegation.
+.IP "policy"
+Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
+service ticket, which is a matter of realm policy.
+.IP "always"
+Unconditionally allow the server to delegate.
+.RE
 .IP "--digest"
-(HTTP) Enables HTTP Digest authentication. This is a authentication that
-prevents the password from being sent over the wire in clear text. Use this in
-combination with the normal \fI-u/--user\fP option to set user name and
-password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
+(HTTP) Enables HTTP Digest authentication. This is an authentication scheme
+that prevents the password from being sent over the wire in clear text. Use
+this in combination with the normal \fI-u, --user\fP option to set user name
+and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
 related options.
 
-If this option is used several times, the following occurrences make no
-difference.
+If this option is used several times, only the first one is used.
 .IP "--disable-eprt"
 (FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
 active FTP transfers. Curl will normally always first attempt to use EPRT,
 then LPRT before using PORT, but with this option, it will use PORT right
-away. EPRT and LPRT are extensions to the original FTP protocol, and may not work
-on all servers, but they enable more functionality in a better way than the
-traditional PORT command.
+away. EPRT and LPRT are extensions to the original FTP protocol, and may not
+work on all servers, but they enable more functionality in a better way than
+the traditional PORT command.
 
 \fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
 is an alias for \fB--disable-eprt\fP.
 
 Disabling EPRT only changes the active behavior. If you want to switch to
-passive mode you need to not use \fI-P/--ftp-port\fP or force it with
+passive mode you need to not use \fI-P--ftp-port\fP or force it with
 \fI--ftp-pasv\fP.
 .IP "--disable-epsv"
 (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
 transfers. Curl will normally always first attempt to use EPSV before PASV,
 but with this option, it will not try using EPSV.
 
-\fB--epsv\fP can be used to explicitly enable EPRT again and \fB--no-epsv\fP
+\fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
 is an alias for \fB--disable-epsv\fP.
 
 Disabling EPSV only changes the passive behavior. If you want to switch to
-active mode you need to use \fI-P/--ftp-port\fP.
-.IP "-D/--dump-header <file>"
-Write the protocol headers to the specified file.
-
-This option is handy to use when you want to store the headers that a HTTP
-site sends to you. Cookies from the headers could then be read in a second
-curl invocation by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
-option is however a better way to store cookies.
-
-When used in FTP, the FTP server response lines are considered being "headers"
-and thus are saved there.
-
-If this option is used several times, the last one will be used.
-.IP "-e/--referer <URL>"
+active mode you need to use \fI-P, --ftp-port\fP.
+.IP "-e, --referer <URL>"
 (HTTP) Sends the "Referer Page" information to the HTTP server. This can also
-be set with the \fI-H/--header\fP flag of course.  When used with
-\fI-L/--location\fP you can append ";auto" to the --referer URL to make curl
+be set with the \fI-H--header\fP flag of course.  When used with
+\fI-L--location\fP you can append ";auto" to the --referer URL to make curl
 automatically set the previous URL when it follows a Location: header. The
 \&";auto" string can be used alone, even if you don't set an initial --referer.
 
 If this option is used several times, the last one will be used.
+.IP "-E, --cert <certificate[:password]>"
+(SSL) Tells curl to use the specified client certificate file when getting a
+file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
+in PEM format.  If the optional password isn't specified, it will be queried
+for on the terminal. Note that this option assumes a \&"certificate" file that
+is the private key and the private certificate concatenated! See \fI--cert\fP
+and \fI--key\fP to specify them independently.
+
+If curl is built against the NSS SSL library then this option can tell
+curl the nickname of the certificate to use within the NSS database defined
+by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
+NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
+loaded. If you want to use a file from the current directory, please precede
+it with "./" prefix, in order to avoid confusion with a nickname.  If the
+nickname contains ":", it needs to be preceded by "\\" so that it is not
+recognized as password delimiter.  If the nickname contains "\\", it needs to
+be escaped as "\\\\" so that it is not recognized as an escape character.
+
+(iOS and Mac OS X only) If curl is built against Secure Transport, then the
+certificate string must match the name of a certificate that's in the system or
+user keychain. The private key corresponding to the certificate, and
+certificate chain (if any),  must also be present in the keychain.
+
+If this option is used several times, the last one will be used.
 .IP "--engine <name>"
 Select the OpenSSL crypto engine to use for cipher
 operations. Use \fI--engine list\fP to print a list of build-time supported
 engines. Note that not all (or none) of the engines may be available at
 run-time.
 .IP "--environment"
-(RISC OS ONLY) Sets a range of environment variables, using the names the -w
-option supports, to allow easier extraction of useful information after having
-run curl.
+(RISC OS ONLY) Sets a range of environment variables, using the names the
+\fI-w\fP option supports, to allow easier extraction of useful information
+after having run curl.
 .IP "--egd-file <file>"
 (SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
 is used to seed the random engine for SSL connections. See also the
 \fI--random-file\fP option.
-.IP "-E/--cert <certificate[:password]>"
-(SSL) Tells curl to use the specified certificate file when getting a file
-with HTTPS or FTPS. The certificate must be in PEM format.  If the optional
-password isn't specified, it will be queried for on the terminal. Note that
-this option assumes a \&"certificate" file that is the private key and the
-private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
-them independently.
-
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the certificate to use within the NSS database defined
-by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
-NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
-loaded.
-
-If this option is used several times, the last one will be used.
 .IP "--cert-type <type>"
 (SSL) Tells curl what certificate type the provided certificate is in. PEM,
 DER and ENG are recognized types.  If not specified, PEM is assumed.
@@ -384,50 +433,101 @@ The windows version of curl will automatically look for a CA certs file named
 \'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
 Current Working Directory, or in any folder along your PATH.
 
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the CA certificate to use within the NSS database
-defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb).
-If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files
-may be loaded.
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
 
 If this option is used several times, the last one will be used.
 .IP "--capath <CA certificate directory>"
 (SSL) Tells curl to use the specified certificate directory to verify the
-peer. The certificates must be in PEM format, and the directory must have been
-processed using the c_rehash utility supplied with openssl. Using
-\fI--capath\fP can allow curl to make SSL-connections much more efficiently
-than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
-certificates.
-
-If this option is used several times, the last one will be used.
-.IP "-f/--fail"
+peer. Multiple paths can be provided by separating them with ":" (e.g.
+\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
+built against OpenSSL, the directory must have been processed using the
+c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
+OpenSSL-powered curl to make SSL-connections much more efficiently than using
+\fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
+
+If this option is set, the default capath value will be ignored, and if it is
+used several times, the last one will be used.
+.IP "-f, --fail"
 (HTTP) Fail silently (no output at all) on server errors. This is mostly done
 to better enable scripts etc to better deal with failed attempts. In
-normal cases when a HTTP server fails to deliver a document, it returns an
+normal cases when an HTTP server fails to deliver a document, it returns an
 HTML document stating so (which often also describes why and more). This flag
 will prevent curl from outputting that and return error 22.
 
 This method is not fail-safe and there are occasions where non-successful
 response codes will slip through, especially when authentication is involved
 (response codes 401 and 407).
+.IP "-F, --form <name=content>"
+(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
+submit button. This causes curl to POST data using the Content-Type
+multipart/form-data according to RFC 2388. This enables uploading of binary
+files etc. To force the 'content' part to be a file, prefix the file name
+with an @ sign. To just get the content part from a file, prefix the file name
+with the symbol <. The difference between @ and < is then that @ makes a file
+get attached in the post as a file upload, while the < makes a text field and
+just get the contents for that text field from a file.
+
+Example, to send your password file to the server, where
+\&'password' is the name of the form-field to which /etc/passwd will be the
+input:
+
+\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
+
+To read content from stdin instead of a file, use - as the filename. This goes
+for both @ and < constructs.
+
+You can also tell curl what Content-Type to use by using 'type=', in a manner
+similar to:
+
+\fBcurl\fP -F "web=@index.html;type=text/html" url.com
+
+or
+
+\fBcurl\fP -F "name=daniel;type=text/foo" url.com
+
+You can also explicitly change the name field of a file upload part by setting
+filename=, like this:
+
+\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
+
+If filename/path contains ',' or ';', it must be quoted by double-quotes like:
+
+\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
+
+or
+
+\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
+
+Note that if a filename/path is quoted by double-quotes, any double-quote
+or backslash within the filename must be escaped by backslash.
+
+See further examples and details in the MANUAL.
+
+This option can be used multiple times.
 .IP "--ftp-account [data]"
 (FTP) When an FTP server asks for "account data" after user name and password
 has been provided, this data is sent off using the ACCT command. (Added in
 7.13.0)
 
-If this option is used twice, the second will override the previous use.
+If this option is used several times, the last one will be used.
+.IP "--ftp-alternative-to-user <command>"
+(FTP) If authenticating with the USER and PASS commands fails, send this
+command.  When connecting to Tumbleweed's Secure Transport server over FTPS
+using a client certificate, using "SITE AUTH" will tell the server to retrieve
+the username from the certificate. (Added in 7.15.5)
 .IP "--ftp-create-dirs"
 (FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
 currently exist on the server, the standard behavior of curl is to
 fail. Using this option, curl will instead attempt to create missing
 directories.
 .IP "--ftp-method [method]"
-(FTP) Control what method curl should use to reach a file on a FTP(S)
+(FTP) Control what method curl should use to reach a file on an FTP(S)
 server. The method argument should be one of the following alternatives:
 .RS
 .IP multicwd
 curl does a single CWD operation for each path part in the given URL. For deep
-hierarchies this means very many commands. This is how RFC1738 says it should
+hierarchies this means very many commands. This is how RFC 1738 says it should
 be done. This is the default but the slowest behavior.
 .IP nocwd
 curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
@@ -439,21 +539,16 @@ compliant than 'nocwd' but without the full penalty of 'multicwd'.
 .RE
 (Added in 7.15.1)
 .IP "--ftp-pasv"
-(FTP) Use passive mode for the data conection. Passive is the internal default
+(FTP) Use passive mode for the data connection. Passive is the internal default
 behavior, but using this option can be used to override a previous
 \fI-P/-ftp-port\fP option. (Added in 7.11.0)
 
-If this option is used several times, the following occurrences make no
-difference. Undoing an enforced passive really isn't doable but you must then
-instead enforce the correct \fI-P/--ftp-port\fP again.
+If this option is used several times, only the first one is used. Undoing an
+enforced passive really isn't doable but you must then instead enforce the
+correct \fI-P, --ftp-port\fP again.
 
 Passive mode means that curl will try the EPSV command first and then PASV,
 unless \fI--disable-epsv\fP is used.
-.IP "--ftp-alternative-to-user <command>"
-(FTP) If authenticating with the USER and PASS commands fails, send this
-command.  When connecting to Tumbleweed's Secure Transport server over FTPS
-using a client certificate, using "SITE AUTH" will tell the server to retrieve
-the username from the certificate. (Added in 7.15.5)
 .IP "--ftp-skip-pasv-ip"
 (FTP) Tell curl to not use the IP address the server suggests in its response
 to curl's PASV command when curl connects the data connection. Instead curl
@@ -466,30 +561,12 @@ This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
 FTP servers, mainly drftpd, require this non-standard command for
 directory listings as well as up and downloads in PASV mode.
 (Added in 7.20.x)
-.IP "--ssl"
-(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a
-non-secure connection if the server doesn't support SSL/TLS.  See also
-\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
-encryption required. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0) and that
-can still be used but will be removed in a future version.
-.IP "--ftp-ssl-control"
-(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
-authentication, but non-encrypted data transfers for efficiency.  Fails the
-transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0)
-.IP "--ssl-reqd"
-(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the
-connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5) and
-that can still be used but will be removed in a future version.
 .IP "--ftp-ssl-ccc"
 (FTP) Use CCC (Clear Command Channel)
 Shuts down the SSL/TLS layer after authenticating. The rest of the
 control channel communication will be unencrypted. This allows
 NAT routers to follow the FTP transaction. The default mode is
-passive. See --ftp-ssl-ccc-mode for other modes.
+passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
 (Added in 7.16.1)
 .IP "--ftp-ssl-ccc-mode [active/passive]"
 (FTP) Use CCC (Clear Command Channel)
@@ -498,68 +575,35 @@ instead wait for the server to do it, and will not reply to the
 shutdown from the server. The active mode initiates the shutdown and
 waits for a reply from the server.
 (Added in 7.16.2)
-.IP "-F/--form <name=content>"
-(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
-submit button. This causes curl to POST data using the Content-Type
-multipart/form-data according to RFC2388. This enables uploading of binary
-files etc. To force the 'content' part to be a file, prefix the file name
-with an @ sign. To just get the content part from a file, prefix the file name
-with the symbol <. The difference between @ and < is then that @ makes a file
-get attached in the post as a file upload, while the < makes a text field and
-just get the contents for that text field from a file.
-
-Example, to send your password file to the server, where
-\&'password' is the name of the form-field to which /etc/passwd will be the
-input:
-
-\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
-
-To read the file's content from stdin instead of a file, use - where the file
-name should've been. This goes for both @ and < constructs.
-
-You can also tell curl what Content-Type to use by using 'type=', in a manner
-similar to:
-
-\fBcurl\fP -F "web=@index.html;type=text/html" url.com
-
-or
-
-\fBcurl\fP -F "name=daniel;type=text/foo" url.com
-
-You can also explicitly change the name field of a file upload part by setting
-filename=, like this:
-
-\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
-
-See further examples and details in the MANUAL.
-
-This option can be used multiple times.
+.IP "--ftp-ssl-control"
+(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure
+authentication, but non-encrypted data transfers for efficiency.  Fails the
+transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0)
+that can still be used but will be removed in a future version.
 .IP "--form-string <name=string>"
 (HTTP) Similar to \fI--form\fP except that the value string for the named
 parameter is used literally. Leading \&'@' and \&'<' characters, and the
 \&';type=' string in the value have no special meaning. Use this in preference
 to \fI--form\fP if there's any possibility that the string value may
 accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
-.IP "-g/--globoff"
+.IP "-g--globoff"
 This option switches off the "URL globbing parser". When you set this option,
 you can specify URLs that contain the letters {}[] without having them being
 interpreted by curl itself. Note that these letters are not normal legal URL
 contents but they should be encoded according to the URI standard.
-.IP "-G/--get"
-When used, this option will make all data specified with \fI-d/--data\fP or
-\fI--data-binary\fP to be used in a HTTP GET request instead of the POST
+.IP "-G--get"
+When used, this option will make all data specified with \fI-d--data\fP or
+\fI--data-binary\fP to be used in an HTTP GET request instead of the POST
 request that otherwise would be used. The data will be appended to the URL
 with a '?' separator.
 
 If used in combination with -I, the POST data will instead be appended to the
 URL with a HEAD request.
 
-If this option is used several times, the following occurrences make no
-difference. This is because undoing a GET doesn't make sense, but you should
-then instead enforce the alternative method you prefer.
-.IP "-h/--help"
-Usage help.
-.IP "-H/--header <header>"
+If this option is used several times, only the first one is used. This is
+because undoing a GET doesn't make sense, but you should then instead enforce
+the alternative method you prefer.
+.IP "-H, --header <header>"
 (HTTP) Extra header to use when getting a web page. You may specify any number
 of extra headers. Note that if you should add a custom header that has the
 same name as one of the internal ones curl would use, your externally set
@@ -567,29 +611,36 @@ header will be used instead of the internal one. This allows you to make even
 trickier stuff than curl would normally do. You should not replace internally
 set headers without knowing perfectly well what you're doing. Remove an
 internal header by giving a replacement without content on the right side of
-the colon, as in: -H \&"Host:".
+the colon, as in: -H \&"Host:". If you send the custom header with no-value
+then its header must be terminated with a semicolon, such as \-H
+\&"X-Custom-Header;" to send "X-Custom-Header:".
 
 curl will make sure that each header you add/replace is sent with the proper
 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
 content: do not add newlines or carriage returns, they will only mess things up
 for you.
 
-See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
+See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
 
 This option can be used multiple times to add/replace/remove multiple headers.
 .IP "--hostpubmd5 <md5>"
-Pass a string containing 32 hexadecimal digits. The string should be the 128
-bit MD5 checksum of the remote host's public key, curl will refuse the
-connection with the host unless the md5sums match. This option is only for SCP
-and SFTP transfers. (Added in 7.17.1)
+(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
+be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
+the connection with the host unless the md5sums match. (Added in 7.17.1)
 .IP "--ignore-content-length"
 (HTTP)
 Ignore the Content-Length header. This is particularly useful for servers
 running Apache 1.x, which will report incorrect Content-Length for files
 larger than 2 gigabytes.
-.IP "-i/--include"
+.IP "-i--include"
 (HTTP) Include the HTTP-header in the output. The HTTP-header includes things
 like server-name, date of the document, HTTP-version and more...
+.IP "-I, --head"
+(HTTP/FTP/FILE)
+Fetch the HTTP-header only! HTTP-servers feature the command HEAD
+which this uses to get nothing but the header of a document. When used
+on an FTP or FILE file, curl displays the file size and last modification
+time only.
 .IP "--interface <name>"
 Perform an operation using a specified interface. You can enter interface
 name, IP address or host name. An example could look like:
@@ -597,58 +648,24 @@ name, IP address or host name. An example could look like:
  curl --interface eth0:1 http://www.netscape.com/
 
 If this option is used several times, the last one will be used.
-.IP "-I/--head"
-(HTTP/FTP/FILE)
-Fetch the HTTP-header only! HTTP-servers feature the command HEAD
-which this uses to get nothing but the header of a document. When used
-on a FTP or FILE file, curl displays the file size and last modification
-time only.
-.IP "-j/--junk-session-cookies"
+.IP "-j, --junk-session-cookies"
 (HTTP) When curl is told to read cookies from a given file, this option will
 make it discard all "session cookies". This will basically have the same effect
 as if a new session is started. Typical browsers always discard session
 cookies when they're closed down.
-.IP "-J/--remote-header-name"
-(HTTP) This option tells the -O/--remote-name option to use the server-specified
-Content-Disposition filename instead of extracting a filename from the URL.
-.IP "-k/--insecure"
+.IP "-J, --remote-header-name"
+(HTTP) This option tells the \fI-O, --remote-name\fP option to use the
+server-specified Content-Disposition filename instead of extracting a filename
+from the URL.
+.IP "-k, --insecure"
 (SSL) This option explicitly allows curl to perform "insecure" SSL connections
 and transfers. All SSL connections are attempted to be made secure by using
 the CA certificate bundle installed by default. This makes all connections
-considered "insecure" fail unless \fI-k/--insecure\fP is used.
+considered "insecure" fail unless \fI-k--insecure\fP is used.
 
 See this online resource for further details:
 \fBhttp://curl.haxx.se/docs/sslcerts.html\fP
-.IP "--keepalive-time <seconds>"
-This option sets the time a connection needs to remain idle before sending
-keepalive probes and the time between individual keepalive probes. It is
-currently effective on operating systems offering the TCP_KEEPIDLE and
-TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
-option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
-
-If this option is used multiple times, the last occurrence sets the amount.
-.IP "--key <key>"
-(SSL/SSH) Private key file name. Allows you to provide your private key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "--key-type <type>"
-(SSL) Private key file type. Specify which type your \fI--key\fP provided
-private key is. DER, PEM, and ENG are supported. If not specified, PEM is
-assumed.
-
-If this option is used several times, the last one will be used.
-.IP "--krb <level>"
-(FTP) Enable Kerberos authentication and use. The level must be entered and
-should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
-a level that is not one of these, 'private' will instead be used.
-
-This option requires a library built with kerberos4 or GSSAPI
-(GSS-Negotiate) support. This is not very common. Use \fI-V/--version\fP to
-see if your curl supports it.
-
-If this option is used several times, the last one will be used.
-.IP "-K/--config <config file>"
+.IP "-K, --config <config file>"
 Specify which config file to read curl arguments from. The config file is a
 text file in which command line arguments can be written which then will be
 used as if they were written on the actual command line. Options and their
@@ -662,7 +679,7 @@ first column of a config line is a '#' character, the rest of the line will be
 treated as a comment. Only write one option per physical line in the config
 file.
 
-Specify the filename to -K/--config as '-' to make curl read the file from
+Specify the filename to -K--config as '-' to make curl read the file from
 stdin.
 
 Note that to be able to specify a URL in the config file, you need to specify
@@ -703,36 +720,37 @@ referer = "http://nowhereatall.com/"
 .fi
 
 This option can be used multiple times to load multiple config files.
-.IP "--libcurl <file>"
-Append this option to any ordinary curl command line, and you will get a
-libcurl-using source code written to the file that does the equivalent
-of what your command-line operation does!
-
-NOTE: this does not properly support -F and the sending of multipart
-formposts, so in those cases the output program will be missing necessary
-calls to \fIcurl_formadd(3)\fP, and possibly more.
+.IP "--keepalive-time <seconds>"
+This option sets the time a connection needs to remain idle before sending
+keepalive probes and the time between individual keepalive probes. It is
+currently effective on operating systems offering the TCP_KEEPIDLE and
+TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
+option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
 
-If this option is used several times, the last given file name will be
-used. (Added in 7.16.1)
-.IP "--limit-rate <speed>"
-Specify the maximum transfer rate you want curl to use. This feature is useful
-if you have a limited pipe and you'd like your transfer not to use your entire
-bandwidth.
+If this option is used several times, the last one will be used. If
+unspecified, the option defaults to 60 seconds.
+.IP "--key <key>"
+(SSL/SSH) Private key file name. Allows you to provide your private key in this
+separate file.
 
-The given speed is measured in bytes/second, unless a suffix is appended.
-Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
-megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
+If this option is used several times, the last one will be used.
+.IP "--key-type <type>"
+(SSL) Private key file type. Specify which type your \fI--key\fP provided
+private key is. DER, PEM, and ENG are supported. If not specified, PEM is
+assumed.
 
-The given rate is the average speed counted during the entire transfer. It
-means that curl might use higher transfer speeds in short bursts, but over
-time it uses no more than the given rate.
+If this option is used several times, the last one will be used.
+.IP "--krb <level>"
+(FTP) Enable Kerberos authentication and use. The level must be entered and
+should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
+a level that is not one of these, 'private' will instead be used.
 
-If you also use the \fI-Y/--speed-limit\fP option, that option will take
-precedence and might cripple the rate-limiting slightly, to help keeping the
-speed-limit logic working.
+This option requires a library built with kerberos4 or GSSAPI
+(GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to
+see if your curl supports it.
 
 If this option is used several times, the last one will be used.
-.IP "-l/--list-only"
+.IP "-l--list-only"
 (FTP)
 When listing an FTP directory, this switch forces a name-only view.
 Especially useful if you want to machine-parse the contents of an FTP
@@ -743,16 +761,11 @@ This option causes an FTP NLST command to be sent.  Some FTP servers
 list only files in their response to NLST; they do not include
 subdirectories and symbolic links.
 
-.IP "--local-port <num>[-num]"
-Set a preferred number or range of local port numbers to use for the
-connection(s).  Note that port numbers by nature are a scarce resource that
-will be busy at times so setting this range to something too narrow might
-cause unnecessary connection setup failures. (Added in 7.15.2)
-.IP "-L/--location"
+.IP "-L, --location"
 (HTTP/HTTPS) If the server reports that the requested page has moved to a
 different location (indicated with a Location: header and a 3XX response code),
 this option will make curl redo the request on the new place. If used together
-with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages
+with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
 will be shown. When authentication is used, curl only sends its credentials to
 the initial host. If a redirect takes curl to a different host, it won't be
 able to intercept the user+password. See also \fI--location-trusted\fP on how
@@ -763,17 +776,57 @@ When curl follows a redirect and the request is not a plain GET (for example
 POST or PUT), it will do the following request with a GET if the HTTP response
 was 301, 302, or 303. If the response code was any other 3xx code, curl will
 re-send the following request using the same unmodified method.
+.IP "--libcurl <file>"
+Append this option to any ordinary curl command line, and you will get a
+libcurl-using C source code written to the file that does the equivalent
+of what your command-line operation does!
+
+If this option is used several times, the last given file name will be
+used. (Added in 7.16.1)
+.IP "--limit-rate <speed>"
+Specify the maximum transfer rate you want curl to use. This feature is useful
+if you have a limited pipe and you'd like your transfer not to use your entire
+bandwidth.
+
+The given speed is measured in bytes/second, unless a suffix is appended.
+Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
+megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
+
+The given rate is the average speed counted during the entire transfer. It
+means that curl might use higher transfer speeds in short bursts, but over
+time it uses no more than the given rate.
+
+If you also use the \fI-Y, --speed-limit\fP option, that option will take
+precedence and might cripple the rate-limiting slightly, to help keeping the
+speed-limit logic working.
+
+If this option is used several times, the last one will be used.
+.IP "--local-port <num>[-num]"
+Set a preferred number or range of local port numbers to use for the
+connection(s).  Note that port numbers by nature are a scarce resource that
+will be busy at times so setting this range to something too narrow might
+cause unnecessary connection setup failures. (Added in 7.15.2)
 .IP "--location-trusted"
-(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
+(HTTP/HTTPS) Like \fI-L--location\fP, but will allow sending the name +
 password to all hosts that the site may redirect to. This may or may not
 introduce a security breach if the site redirects you to a site to which
 you'll send your authentication info (which is plaintext in the case of HTTP
 Basic authentication).
-.IP "--mail-rcpt <address>"
-(SMTP) Specify a single address that the given mail should get sent to. This
-option can be used multiple times to specify many recipients.
+.IP "-m, --max-time <seconds>"
+Maximum time in seconds that you allow the whole operation to take.  This is
+useful for preventing your batch jobs from hanging for hours due to slow
+networks or links going down.  Since 7.32.0, this option accepts decimal
+values, but the actual timeout will decrease in accuracy as the specified
+timeout increases in decimal precision.  See also the \fI--connect-timeout\fP
+option.
 
-(Added in 7.20.0)
+If this option is used several times, the last one will be used.
+.IP "--mail-auth <address>"
+(SMTP) Specify a single address. This will be used to specify the
+authentication address (identity) of a submitted message that is being relayed
+to another server.
+
+(Added in 7.25.0)
 .IP "--mail-from <address>"
 (SMTP) Specify a single address that the given mail should get sent from.
 
@@ -783,18 +836,47 @@ Specify the maximum size (in bytes) of a file to download. If the file
 requested is larger than this value, the transfer will not start and curl will
 return with exit code 63.
 
-\fBNOTE:\fP The file size is not always known prior to download, and for such files
-this option has no effect even if the file transfer ends up being larger than
-this given limit. This concerns both FTP and HTTP transfers.
-.IP "-m/--max-time <seconds>"
-Maximum time in seconds that you allow the whole operation to take.  This is
-useful for preventing your batch jobs from hanging for hours due to slow
-networks or links going down.  See also the \fI--connect-timeout\fP option.
+\fBNOTE:\fP The file size is not always known prior to download, and for such
+files this option has no effect even if the file transfer ends up being larger
+than this given limit. This concerns both FTP and HTTP transfers.
+.IP "--mail-rcpt <address>"
+(SMTP) Specify a single address that the given mail should get sent to. This
+option can be used multiple times to specify many recipients.
+
+(Added in 7.20.0)
+.IP "--max-redirs <num>"
+Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
+is used, this option can be used to prevent curl from following redirections
+\&"in absurdum". By default, the limit is set to 50 redirections. Set this
+option to -1 to make it limitless.
 
 If this option is used several times, the last one will be used.
-.IP "-M/--manual"
-Manual. Display the huge help text.
-.IP "-n/--netrc"
+.IP "--metalink"
+This option can tell curl to parse and process a given URI as Metalink file
+(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
+listed within for failover if there are errors (such as the file or server not
+being available). It will also verify the hash of the file after the download
+completes. The Metalink file itself is downloaded and processed in memory and
+not stored in the local file system.
+
+Example to use a remote Metalink file:
+
+\fBcurl\fP --metalink http://www.example.com/example.metalink
+
+To use a Metalink file in the local file system, use FILE protocol
+(file://):
+
+\fBcurl\fP --metalink file://example.metalink
+
+Please note that if FILE protocol is disabled, there is no way to use
+a local Metalink file at the time of this writing. Also note that if
+\fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
+ignored. This is because including headers in the response will break
+Metalink parser and if the headers are included in the file described
+in Metalink file, hash check will fail.
+
+(Added in 7.27.0, if built against the libmetalink library.)
+.IP "-n, --netrc"
 Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
 home directory for login name and password. This is typically used for FTP on
 UNIX. If used with HTTP, curl will enable user authentication. See
@@ -811,9 +893,28 @@ to FTP to the machine host.domain.com with user name \&'myself' and password
 \&'secret' should look similar to:
 
 .B "machine host.domain.com login myself password secret"
+.IP "-N, --no-buffer"
+Disables the buffering of the output stream. In normal work situations, curl
+will use a standard buffered output stream that will have the effect that it
+will output the data in chunks, not necessarily exactly when the data arrives.
+Using this option will disable that buffering.
+
+Note that this is the negated option name documented. You can thus use
+\fI--buffer\fP to enforce the buffering.
+.IP "--netrc-file"
+This option is similar to \fI--netrc\fP, except that you provide the path
+(absolute or relative) to the netrc file that Curl should use.
+You can only specify one netrc file per invocation. If several
+\fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
+(Added in 7.21.5)
+
+This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
+It will also abide by \fI--netrc-optional\fP if specified.
+
 .IP "--netrc-optional"
 Very similar to \fI--netrc\fP, but this option makes the .netrc usage
 \fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
+
 .IP "--negotiate"
 (HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
 designed by Microsoft and is used in their web applications. It is primarily
@@ -825,23 +926,14 @@ If you want to enable Negotiate for your proxy authentication, then use
 \fI--proxy-negotiate\fP.
 
 This option requires a library built with GSSAPI support. This is
-not very common. Use \fI-V/--version\fP to see if your version supports
+not very common. Use \fI-V--version\fP to see if your version supports
 GSS-Negotiate.
 
-When using this option, you must also provide a fake -u/--user option to
+When using this option, you must also provide a fake \fI-u, --user\fP option to
 activate the authentication code properly. Sending a '-u :' is enough as the
-user name and password from the -u option aren't actually used.
-
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-N/--no-buffer"
-Disables the buffering of the output stream. In normal work situations, curl
-will use a standard buffered output stream that will have the effect that it
-will output the data in chunks, not necessarily exactly when the data arrives.
-Using this option will disable that buffering.
+user name and password from the \fI-u\fP option aren't actually used.
 
-Note that this is the negated option name documented. You can thus use
-\fI--buffer\fP to enforce the buffering.
+If this option is used several times, only the first one is used.
 .IP "--no-keepalive"
 Disables the use of keepalive messages on the TCP connection, as by default
 curl enables them.
@@ -876,11 +968,10 @@ If you want to enable NTLM for your proxy authentication, then use
 \fI--proxy-ntlm\fP.
 
 This option requires a library built with SSL support. Use
-\fI-V/--version\fP to see if your curl supports NTLM.
+\fI-V--version\fP to see if your curl supports NTLM.
 
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-o/--output <file>"
+If this option is used several times, only the first one is used.
+.IP "-o, --output <file>"
 Write output to <file> instead of stdout. If you are using {} or [] to fetch
 multiple documents, you can use '#' followed by a number in the <file>
 specifier. That variable will be replaced with the current string for the URL
@@ -897,37 +988,76 @@ You may use this option as many times as the number of URLs you have.
 See also the \fI--create-dirs\fP option to create the local directories
 dynamically. Specifying the output as '-' (a single dash) will force the
 output to be done to stdout.
-.IP "-O/--remote-name"
+.IP "-O--remote-name"
 Write output to a local file named like the remote file we get. (Only the file
 part of the remote file is used, the path is cut off.)
 
 The remote file name to use for saving is extracted from the given URL,
 nothing else.
 
+Consequentially, the file will be saved in the current working directory. If
+you want the file saved in a different directory, make sure you change current
+working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
+
 You may use this option as many times as the number of URLs you have.
-.IP "--remote-name-all"
-This option changes the default action for all given URLs to be dealt with as
-if \fI-O/--remote-name\fP were used for each one. So if you want to disable
-that for a specific URL after \fI--remote-name-all\fP has been used, you must
-use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
+.IP "-p, --proxytunnel"
+When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
+protocols to attempt to tunnel through the proxy instead of merely using it to
+do HTTP-like operations. The tunnel approach is made with the HTTP proxy
+CONNECT request and requires that the proxy allows direct connect to the
+remote port number curl wants to tunnel through to.
+.IP "-P, --ftp-port <address>"
+(FTP) Reverses the default initiator/listener roles when connecting with
+FTP. This switch makes curl use active mode. In practice, curl then tells the
+server to connect back to the client's specified address and port, while
+passive mode asks the server to setup an IP address and port for it to connect
+to. <address> should be one of:
+.RS
+.IP interface
+i.e "eth0" to specify which interface's IP address you want to use (Unix only)
+.IP "IP address"
+i.e "192.168.10.1" to specify the exact IP address
+.IP "host name"
+i.e "my.host.domain" to specify the machine
+.IP "-"
+make curl pick the same IP address that is already used for the control
+connection
+.RE
+
+If this option is used several times, the last one will be used. Disable the
+use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
+instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
+
+Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
+address, to tell curl what TCP port range to use. That means you specify a
+port range, from a lower to a higher number. A single number works as well,
+but do note that it increases the risk of failure since the port may not be
+available.
 .IP "--pass <phrase>"
 (SSL/SSH) Passphrase for the private key
 
 If this option is used several times, the last one will be used.
 .IP "--post301"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 301 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L--location\fP
 (Added in 7.17.1)
 .IP "--post302"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 302 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
 consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L--location\fP
 (Added in 7.19.1)
+.IP "--post303"
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 303 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
+consistency. However, a server may require a POST to remain a POST after such
+a redirection. This option is meaningful only when using \fI-L, --location\fP
+(Added in 7.26.0)
 .IP "--proto <protocols>"
 Tells curl to use the listed protocols for its initial retrieval. Protocols
 are evaluated left to right, are comma separated, and are each a protocol
@@ -996,71 +1126,41 @@ proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
 Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
 assumed at port 1080.
 
-The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP),
-is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
-protocol instead of the default HTTP 1.1.
-.IP "-p/--proxytunnel"
-When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
-protocols to attempt to tunnel through the proxy instead of merely using it to
-do HTTP-like operations. The tunnel approach is made with the HTTP proxy
-CONNECT request and requires that the proxy allows direct connect to the
-remote port number curl wants to tunnel through to.
-.IP "--pubkey <key>"
-(SSH) Public key file name. Allows you to provide your public key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "-P/--ftp-port <address>"
-(FTP) Reverses the default initiator/listener roles when connecting with
-FTP. This switch makes curl use active mode. In practice, curl then tells the
-server to connect back to the client's specified address and port, while
-passive mode asks the server to setup an IP address and port for it to connect
-to. <address> should be one of:
-.RS
-.IP interface
-i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-.IP "IP address"
-i.e "192.168.10.1" to specify the exact IP address
-.IP "host name"
-i.e "my.host.domain" to specify the machine
-.IP "-"
-make curl pick the same IP address that is already used for the control
-connection
-.RE
-
-If this option is used several times, the last one will be used. Disable the
-use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
-instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
+The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
+is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
+protocol instead of the default HTTP 1.1.
+.IP "--pubkey <key>"
+(SSH) Public key file name. Allows you to provide your public key in this
+separate file.
 
-Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
-address, to tell curl what TCP port range to use. That means you specify a
-port range, from a lower to a higher number. A single number works as well,
-but do note that it increases the risk of failure since the port may not be
-available.
+If this option is used several times, the last one will be used.
 .IP "-q"
 If used as the first parameter on the command line, the \fIcurlrc\fP config
-file will not be read and used. See the \fI-K/--config\fP for details on the
+file will not be read and used. See the \fI-K--config\fP for details on the
 default config file search path.
-.IP "-Q/--quote <command>"
+.IP "-Q--quote <command>"
 (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
-commands are sent BEFORE the transfer takes place (just after the
-initial PWD command in an FTP transfer, to be exact). To make commands
-take place after a successful transfer, prefix them with a dash '-'.
-To make commands be sent after libcurl has changed the working directory,
-just before the transfer command(s), prefix the command with a '+' (this
-is only supported for FTP). You may specify any number of commands. If
-the server returns failure for one of the commands, the entire operation
-will be aborted. You must send syntactically correct FTP commands as
-RFC959 defines to FTP servers, or one of the commands listed below to
-SFTP servers.  This option can be used multiple times.
-
-SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
-commands before sending them to the server.  Following is the list of
+commands are sent BEFORE the transfer takes place (just after the initial PWD
+command in an FTP transfer, to be exact). To make commands take place after a
+successful transfer, prefix them with a dash '-'.  To make commands be sent
+after curl has changed the working directory, just before the transfer
+command(s), prefix the command with a '+' (this is only supported for
+FTP). You may specify any number of commands. If the server returns failure
+for one of the commands, the entire operation will be aborted. You must send
+syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
+of the commands listed below to SFTP servers.  This option can be used
+multiple times. When speaking to an FTP server, prefix the command with an
+asterisk (*) to make curl continue even if the command fails as by default
+curl will stop at first failure.
+
+SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
+itself before sending them to the server.  File names may be quoted
+shell-style to embed spaces or special characters.  Following is the list of
 all supported SFTP quote commands:
 .RS
 .IP "chgrp group file"
-The chgrp command sets the group ID of the file named by the file operand to the
-group ID specified by the group operand. The group operand is a decimal
+The chgrp command sets the group ID of the file named by the file operand to
+the group ID specified by the group operand. The group operand is a decimal
 integer group ID.
 .IP "chmod mode file"
 The chmod command modifies the file mode bits of the specified file. The
@@ -1087,11 +1187,7 @@ operand, provided it is empty.
 .IP "symlink source_file target_file"
 See ln.
 .RE
-.IP "--random-file <file>"
-(SSL) Specify the path name to file containing what will be considered as
-random data. The data is used to seed the random engine for SSL connections.
-See also the \fI--egd-file\fP option.
-.IP "-r/--range <range>"
+.IP "-r, --range <range>"
 (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
 HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
 in a number of ways.
@@ -1122,9 +1218,10 @@ specifies two separate 100-byte ranges(*)(H)
 (*) = NOTE that this will cause the server to reply with a multipart
 response!
 
-Only digit characters (0-9) are valid in the 'start' and 'stop' fields of
-the \&'start-stop' range syntax. If a non-digit character is given in the range, the server's
-response will be unspecified, depending on the server's configuration.
+Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
+\&'start-stop' range syntax. If a non-digit character is given in the range,
+the server's response will be unspecified, depending on the server's
+configuration.
 
 You should also be aware that many HTTP/1.1 servers do not have this feature
 enabled, so that when you attempt to get a range, you'll instead get the whole
@@ -1135,13 +1232,22 @@ FTP and SFTP range downloads only support the simple 'start-stop' syntax
 FTP command SIZE.
 
 If this option is used several times, the last one will be used.
-.IP "--raw"
-When used, it disables all internal HTTP decoding of content or transfer
-encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-.IP "-R/--remote-time"
-When used, this will make libcurl attempt to figure out the timestamp of the
+.IP "-R, --remote-time"
+When used, this will make curl attempt to figure out the timestamp of the
 remote file, and if that is available make the local file get that same
 timestamp.
+.IP "--random-file <file>"
+(SSL) Specify the path name to file containing what will be considered as
+random data. The data is used to seed the random engine for SSL connections.
+See also the \fI--egd-file\fP option.
+.IP "--raw"
+(HTTP) When used, it disables all internal HTTP decoding of content or transfer
+encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
+.IP "--remote-name-all"
+This option changes the default action for all given URLs to be dealt with as
+if \fI-O, --remote-name\fP were used for each one. So if you want to disable
+that for a specific URL after \fI--remote-name-all\fP has been used, you must
+use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
 .IP "--resolve <host:port:address>"
 Provide a custom address for a specific host and port pair. Using this, you
 can make the curl requests(s) use a specified address and prevent the
@@ -1167,7 +1273,7 @@ using \fI--retry-delay\fP you disable this exponential backoff algorithm. See
 also \fI--retry-max-time\fP to limit the total time allowed for
 retries. (Added in 7.12.3)
 
-If this option is used multiple times, the last occurrence decide the amount.
+If this option is used several times, the last one will be used.
 .IP "--retry-delay <seconds>"
 Make curl sleep this amount of time before each retry when a transfer has
 failed with a transient error (it changes the default backoff time algorithm
@@ -1175,46 +1281,78 @@ between retries). This option is only interesting if \fI--retry\fP is also
 used. Setting this delay to zero will make curl use the default backoff time.
 (Added in 7.12.3)
 
-If this option is used multiple times, the last occurrence determines the amount.
+If this option is used several times, the last one will be used.
 .IP "--retry-max-time <seconds>"
 The retry timer is reset before the first transfer attempt. Retries will be
 done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
 given limit. Notice that if the timer hasn't reached the limit, the request
 will be made and while performing, it may take longer than this given time
-period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
+period. To limit a single request\'s maximum time, use \fI-m--max-time\fP.
 Set this option to zero to not timeout retries. (Added in 7.12.3)
 
-If this option is used multiple times, the last occurrence determines the
-amount.
-.IP "-s/--silent"
-Silent or quiet mode. Don't show progress meter or error messages.  Makes
-Curl mute.
-.IP "-S/--show-error"
-When used with -s it makes curl show an error message if it fails.
+If this option is used several times, the last one will be used.
+.IP "-s, --silent"
+Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl
+mute. It will still output the data you ask for, potentially even to the
+terminal/stdout unless you redirect it.
+.IP "--sasl-ir"
+Enable initial response in SASL authentication.
+(Added in 7.31.0)
+.IP "-S, --show-error"
+When used with \fI-s\fP it makes curl show an error message if it fails.
+.IP "--ssl"
+(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a
+non-secure connection if the server doesn't support SSL/TLS.  See also
+\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
+encryption required. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-reqd"
+(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the
+connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-allow-beast"
+(SSL) This option tells curl to not work around a security flaw in the SSL3
+and TLS1.0 protocols known as BEAST.  If this option isn't used, the SSL layer
+may use work-arounds known to cause interoperability problems with some older
+SSL implementations. WARNING: this option loosens the SSL security, and by
+using this flag you ask for exactly that.  (Added in 7.25.0)
 .IP "--socks4 <host[:port]>"
 Use the specified SOCKS4 proxy. If the port number is not specified, it is
 assumed at port 1080. (Added in 7.15.2)
 
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x--proxy\fP, as they are
 mutually exclusive.
 
+Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
+with \fI-x, --proxy\fP using a socks4:// protocol prefix.
+
 If this option is used several times, the last one will be used.
 .IP "--socks4a <host[:port]>"
 Use the specified SOCKS4a proxy. If the port number is not specified, it is
 assumed at port 1080. (Added in 7.18.0)
 
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x--proxy\fP, as they are
 mutually exclusive.
 
+Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
+with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
+
 If this option is used several times, the last one will be used.
 .IP "--socks5-hostname <host[:port]>"
 Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
 the port number is not specified, it is assumed at port 1080. (Added in
 7.18.0)
 
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x--proxy\fP, as they are
 mutually exclusive.
 
+Since 7.21.7, this option is superfluous since you can specify a socks5
+hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
+
 If this option is used several times, the last one will be used. (This option
 was previously wrongly documented and used as --socks without the number
 appended.)
@@ -1222,9 +1360,12 @@ appended.)
 Use the specified SOCKS5 proxy - but resolve the host name locally. If the
 port number is not specified, it is assumed at port 1080.
 
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x--proxy\fP, as they are
 mutually exclusive.
 
+Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
+with \fI-x, --proxy\fP using a socks5:// protocol prefix.
+
 If this option is used several times, the last one will be used. (This option
 was previously wrongly documented and used as --socks without the number
 appended.)
@@ -1234,27 +1375,21 @@ This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
 The default service name for a socks server is rcmd/server-fqdn. This option
 allows you to change it.
 
-Examples:
- --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd   would use
-sockd/proxy-name
- --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name   would use
-sockd/real-name for cases where the proxy-name does not match the princpal name.
- (Added in 7.19.4).
+Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
+sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
+sockd/real-name would use sockd/real-name for cases where the proxy-name does
+not match the principal name.  (Added in 7.19.4).
 .IP "--socks5-gssapi-nec"
-As part of the gssapi negotiation a protection mode is negotiated. The rfc1961
+As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
 says in section 4.3/4.4 it should be protected, but the NEC reference
 implementation does not.  The option \fI--socks5-gssapi-nec\fP allows the
 unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
 .IP "--stderr <file>"
 Redirect all writes to stderr to the specified file instead. If the file name
-is a plain '-', it is instead written to stdout. This option has no point when
-you're using a shell with decent redirecting capabilities.
+is a plain '-', it is instead written to stdout.
 
 If this option is used several times, the last one will be used.
-.IP "--tcp-nodelay"
-Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
-details about this option. (Added in 7.11.2)
-.IP "-t/--telnet-option <OPT=val>"
+.IP "-t, --telnet-option <OPT=val>"
 Pass options to the telnet protocol. Supported options are:
 
 TTYPE=<term> Sets the terminal type.
@@ -1262,21 +1397,13 @@ TTYPE=<term> Sets the terminal type.
 XDISPLOC=<X display> Sets the X display location.
 
 NEW_ENV=<var,val> Sets an environment variable.
-.IP "--tftp-blksize <value>"
-(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
-curl will try to use when tranferring data to or from a TFTP server. By
-default 512 bytes will be used.
-
-If this option is used several times, the last one will be used.
-
-(Added in 7.20.0)
-.IP "-T/--upload-file <file>"
+.IP "-T, --upload-file <file>"
 This transfers the specified local file to the remote URL. If there is no file
 part in the specified URL, Curl will append the local file name. NOTE that you
 must use a trailing / on the last directory to really prove to Curl that there
 is no file name or curl will think that your last directory name is the remote
 file name to use. That will most likely cause the upload operation to fail. If
-this is used on a HTTP(S) server, the PUT command will be used.
+this is used on an HTTP(S) server, the PUT command will be used.
 
 Use the file name "-" (a single dash) to use stdin instead of a given file.
 Alternately, the file name "." (a single period) may be specified instead
@@ -1293,12 +1420,41 @@ curl -T "{file1,file2}" http://www.uploadtothissite.com
 or even
 
 curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
+.IP "--tcp-nodelay"
+Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
+details about this option. (Added in 7.11.2)
+.IP "--tftp-blksize <value>"
+(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
+curl will try to use when transferring data to or from a TFTP server. By
+default 512 bytes will be used.
+
+If this option is used several times, the last one will be used.
+
+(Added in 7.20.0)
+.IP "--tlsauthtype <authtype>"
+Set TLS authentication type. Currently, the only supported option is "SRP",
+for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
+specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
+(Added in 7.21.4)
+.IP "--tlsuser <user>"
+Set username for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set.  (Added in
+7.21.4)
+.IP "--tlspassword <password>"
+Set password for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set.  (Added in
+7.21.4)
+.IP "--tr-encoding"
+(HTTP) Request a compressed Transfer-Encoding response using one of the
+algorithms curl supports, and uncompress the data while receiving it.
+
+(Added in 7.21.6)
 .IP "--trace <file>"
 Enables a full trace dump of all incoming and outgoing data, including
 descriptive information, to the given output file. Use "-" as filename to have
 the output sent to stdout.
 
-This option overrides previous uses of \fI-v/--verbose\fP or
+This option overrides previous uses of \fI-v--verbose\fP or
 \fI--trace-ascii\fP.
 
 If this option is used several times, the last one will be used.
@@ -1311,15 +1467,15 @@ This is very similar to \fI--trace\fP, but leaves out the hex part and only
 shows the ASCII part of the dump. It makes smaller output that might be easier
 to read for untrained humans.
 
-This option overrides previous uses of \fI-v/--verbose\fP or \fI--trace\fP.
+This option overrides previous uses of \fI-v--verbose\fP or \fI--trace\fP.
 
 If this option is used several times, the last one will be used.
 .IP "--trace-time"
 Prepends a time stamp to each trace or verbose line that curl displays.
 (Added in 7.14.0)
-.IP "-u/--user <user:password>"
+.IP "-u--user <user:password>"
 Specify the user name and password to use for server authentication. Overrides
-\fI-n/--netrc\fP and \fI--netrc-optional\fP.
+\fI-n--netrc\fP and \fI--netrc-optional\fP.
 
 If you just give the user name (without entering a colon) curl will prompt for
 a password.
@@ -1329,7 +1485,7 @@ force curl to pick up the user name and password from your environment by
 simply specifying a single colon with this option: "-u :".
 
 If this option is used several times, the last one will be used.
-.IP "-U/--proxy-user <user:password>"
+.IP "-U--proxy-user <user:password>"
 Specify the user name and password to use for proxy authentication.
 
 If you use an SSPI-enabled curl binary and do NTLM authentication, you can
@@ -1342,14 +1498,14 @@ Specify a URL to fetch. This option is mostly handy when you want to specify
 URL(s) in a config file.
 
 This option may be used any number of times. To control where this URL is
-written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
-.IP "-v/--verbose"
+written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
+.IP "-v--verbose"
 Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
 starting with '>' means "header data" sent by curl, '<' means "header data"
 received by curl that is hidden in normal cases, and a line starting with '*'
 means additional info provided by curl.
 
-Note that if you only want HTTP headers in the output, \fI-i/--include\fP
+Note that if you only want HTTP headers in the output, \fI-i--include\fP
 might be the option you're looking for.
 
 If you think this option still doesn't give you enough details, consider using
@@ -1357,47 +1513,8 @@ If you think this option still doesn't give you enough details, consider using
 
 This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
 
-Use \fI-S/--silent\fP to make curl quiet.
-.IP "-V/--version"
-Displays information about curl and the libcurl version it uses.
-
-The first line includes the full version of curl, libcurl and other 3rd party
-libraries linked with the executable.
-
-The second line (starts with "Protocols:") shows all protocols that libcurl
-reports to support.
-
-The third line (starts with "Features:") shows specific features libcurl
-reports to offer. Available features include:
-.RS
-.IP "IPv6"
-You can use IPv6 with this.
-.IP "krb4"
-Krb4 for FTP is supported.
-.IP "SSL"
-HTTPS and FTPS are supported.
-.IP "libz"
-Automatic decompression of compressed files over HTTP is supported.
-.IP "NTLM"
-NTLM authentication is supported.
-.IP "GSS-Negotiate"
-Negotiate authentication and krb5 for FTP is supported.
-.IP "Debug"
-This curl uses a libcurl built with Debug. This enables more error-tracking
-and memory debugging etc. For curl-developers only!
-.IP "AsynchDNS"
-This curl uses asynchronous name resolves.
-.IP "SPNEGO"
-SPNEGO Negotiate authentication is supported.
-.IP "Largefile"
-This curl supports transfers of large files, files larger than 2GB.
-.IP "IDN"
-This curl supports IDN - international domain names.
-.IP "SSPI"
-SSPI is supported. If you use NTLM and set a blank user name, curl will
-authenticate with your current user and password.
-.RE
-.IP "-w/--write-out <format>"
+Use \fI-s, --silent\fP to make curl quiet.
+.IP "-w, --write-out <format>"
 Defines what to display on stdout after a completed and successful
 operation. The format is a string that may contain plain text mixed with any
 number of variables. The string can be specified as "string", to get read from
@@ -1414,12 +1531,21 @@ space with \\t.
 The %-symbol is a special symbol in the win32-environment, where all
 occurrences of % must be doubled when using this option.
 
-The variables available at this point are:
+The variables available are:
 .RS
 .TP 15
-.B url_effective
-The URL that was fetched last. This is most meaningful if you've told curl
-to follow location: headers.
+.B content_type
+The Content-Type of the requested document, if there was any.
+.TP
+.B filename_effective
+The ultimate filename that curl writes out to. This is only meaningful if curl
+is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
+option. It's most useful in combination with the \fI--remote-header-name\fP
+option. (Added in 7.25.1)
+.TP
+.B ftp_entry_path
+The initial path curl ended up in when logging on to the remote FTP
+server. (Added in 7.15.4)
 .TP
 .B http_code
 The numerical response code that was found in the last retrieved HTTP(S) or
@@ -1430,50 +1556,42 @@ same info.
 The numerical code that was found in the last response (from a proxy) to a
 curl CONNECT request. (Added in 7.12.4)
 .TP
-.B time_total
-The total time, in seconds, that the full operation lasted. The time will be
-displayed with millisecond resolution.
+.B local_ip
+The IP address of the local end of the most recently done connection - can be
+either IPv4 or IPv6 (Added in 7.29.0)
 .TP
-.B time_namelookup
-The time, in seconds, it took from the start until the name resolving was
-completed.
+.B local_port
+The local port number of the most recently done connection (Added in 7.29.0)
 .TP
-.B time_connect
-The time, in seconds, it took from the start until the TCP connect to the
-remote host (or proxy) was completed.
+.B num_connects
+Number of new connects made in the recent transfer. (Added in 7.12.3)
 .TP
-.B time_appconnect
-The time, in seconds, it took from the start until the SSL/SSH/etc
-connect/handshake to the remote host was completed. (Added in 7.19.0)
+.B num_redirects
+Number of redirects that were followed in the request. (Added in 7.12.3)
 .TP
-.B time_pretransfer
-The time, in seconds, it took from the start until the file transfer was just
-about to begin. This includes all pre-transfer commands and negotiations that
-are specific to the particular protocol(s) involved.
+.B redirect_url
+When an HTTP request was made without -L to follow redirects, this variable
+will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
 .TP
-.B time_redirect
-The time, in seconds, it took for all redirection steps include name lookup,
-connect, pretransfer and transfer before the final transaction was
-started. time_redirect shows the complete execution time for multiple
-redirections. (Added in 7.12.3)
+.B remote_ip
+The remote IP address of the most recently done connection - can be either
+IPv4 or IPv6 (Added in 7.29.0)
 .TP
-.B time_starttransfer
-The time, in seconds, it took from the start until the first byte was just about
-to be transferred. This includes time_pretransfer and also the time the
-server needed to calculate the result.
+.B remote_port
+The remote port number of the most recently done connection (Added in 7.29.0)
 .TP
 .B size_download
 The total amount of bytes that were downloaded.
 .TP
-.B size_upload
-The total amount of bytes that were uploaded.
-.TP
 .B size_header
 The total amount of bytes of the downloaded headers.
 .TP
 .B size_request
 The total amount of bytes that were sent in the HTTP request.
 .TP
+.B size_upload
+The total amount of bytes that were uploaded.
+.TP
 .B speed_download
 The average download speed that curl measured for the complete download. Bytes
 per second.
@@ -1482,48 +1600,76 @@ per second.
 The average upload speed that curl measured for the complete upload. Bytes per
 second.
 .TP
-.B content_type
-The Content-Type of the requested document, if there was any.
+.B ssl_verify_result
+The result of the SSL peer certificate verification that was requested. 0
+means the verification was successful. (Added in 7.19.0)
 .TP
-.B num_connects
-Number of new connects made in the recent transfer. (Added in 7.12.3)
+.B time_appconnect
+The time, in seconds, it took from the start until the SSL/SSH/etc
+connect/handshake to the remote host was completed. (Added in 7.19.0)
 .TP
-.B num_redirects
-Number of redirects that were followed in the request. (Added in 7.12.3)
+.B time_connect
+The time, in seconds, it took from the start until the TCP connect to the
+remote host (or proxy) was completed.
 .TP
-.B redirect_url
-When a HTTP request was made without -L to follow redirects, this variable
-will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
+.B time_namelookup
+The time, in seconds, it took from the start until the name resolving was
+completed.
 .TP
-.B ftp_entry_path
-The initial path libcurl ended up in when logging on to the remote FTP
-server. (Added in 7.15.4)
+.B time_pretransfer
+The time, in seconds, it took from the start until the file transfer was just
+about to begin. This includes all pre-transfer commands and negotiations that
+are specific to the particular protocol(s) involved.
 .TP
-.B ssl_verify_result
-The result of the SSL peer certificate verification that was requested. 0
-means the verification was successful. (Added in 7.19.0)
+.B time_redirect
+The time, in seconds, it took for all redirection steps include name lookup,
+connect, pretransfer and transfer before the final transaction was
+started. time_redirect shows the complete execution time for multiple
+redirections. (Added in 7.12.3)
+.TP
+.B time_starttransfer
+The time, in seconds, it took from the start until the first byte was just
+about to be transferred. This includes time_pretransfer and also the time the
+server needed to calculate the result.
+.TP
+.B time_total
+The total time, in seconds, that the full operation lasted. The time will be
+displayed with millisecond resolution.
+.TP
+.B url_effective
+The URL that was fetched last. This is most meaningful if you've told curl
+to follow location: headers.
 .RE
 
 If this option is used several times, the last one will be used.
-.IP "-x/--proxy <proxyhost[:port]>"
-Use the specified HTTP proxy. If the port number is not specified, it is assumed
-at port 1080.
+.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
+Use the specified HTTP proxy. If the port number is not specified, it is
+assumed at port 1080.
 
 This option overrides existing environment variables that set the proxy to
 use. If there's an environment variable setting a proxy, you can set proxy to
 \&"" to override it.
 
-\fBNote\fP that all operations that are performed over a HTTP proxy will
-transparently be converted to HTTP. It means that certain protocol specific
-operations might not be available. This is not the case if you can tunnel
-through the proxy, as done with the \fI-p/--proxytunnel\fP option.
+All operations that are performed over an HTTP proxy will transparently be
+converted to HTTP. It means that certain protocol specific operations might
+not be available. This is not the case if you can tunnel through the proxy, as
+one with the \fI-p, --proxytunnel\fP option.
+
+User and password that might be provided in the proxy string are URL decoded
+by curl. This allows you to pass in special characters such as @ by using %40
+or pass in a colon with %3a.
 
-Starting with 7.14.1, the proxy host can be specified the exact same way as
-the proxy environment variables, including the protocol prefix (http://) and
-the embedded user + password.
+The proxy host can be specified the exact same way as the proxy environment
+variables, including the protocol prefix (http://) and the embedded user +
+password.
+
+From 7.21.7, the proxy string may be specified with a protocol:// prefix to
+specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
+socks5h:// to request the specific SOCKS version to be used. No protocol
+specified, http:// and all others will be treated as HTTP proxies.
 
 If this option is used several times, the last one will be used.
-.IP "-X/--request <command>"
+.IP "-X--request <command>"
 (HTTP) Specifies a custom request method to use when communicating with the
 HTTP server.  The specified request will be used instead of the method
 otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
@@ -1531,87 +1677,145 @@ details and explanations. Common additional HTTP requests include PUT and
 DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
 more.
 
+Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
+requests are rather invoked by using dedicated command line options.
+
+This option only changes the actual word used in the HTTP request, it does not
+alter the way curl behaves. So for example if you want to make a proper HEAD
+request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
+option.
+
 (FTP)
 Specifies a custom FTP command to use instead of LIST when doing file lists
 with FTP.
 
 If this option is used several times, the last one will be used.
-.IP "-y/--speed-time <time>"
+
+.IP "--xattr"
+When saving output to a file, this option tells curl to store certain file
+metadata in extended file attributes. Currently, the URL is stored in the
+xdg.origin.url attribute and, for HTTP, the content type is stored in
+the mime_type attribute. If the file system does not support extended
+attributes, a warning is issued.
+
+.IP "-y, --speed-time <time>"
 If a download is slower than speed-limit bytes per second during a speed-time
 period, the download gets aborted. If speed-time is used, the default
-speed-limit will be 1 unless set with -Y.
+speed-limit will be 1 unless set with \fI-Y\fP.
 
 This option controls transfers and thus will not affect slow connects etc. If
 this is a concern for you, try the \fI--connect-timeout\fP option.
 
 If this option is used several times, the last one will be used.
-.IP "-Y/--speed-limit <speed>"
+.IP "-Y--speed-limit <speed>"
 If a download is slower than this given speed (in bytes per second) for
-speed-time seconds it gets aborted. speed-time is set with -y and is 30 if
-not set.
+speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
+if not set.
 
 If this option is used several times, the last one will be used.
-.IP "-z/--time-cond <date expression>"
+.IP "-z, --time-cond <date expression>|<file>"
 (HTTP/FTP) Request a file that has been modified later than the given time and
-date, or one that has been modified before that time. The date expression can
-be all sorts of date strings or if it doesn't match any internal ones, it
-tries to get the time from a given file name instead! See the
-\fIcurl_getdate(3)\fP man pages for date expression details.
+date, or one that has been modified before that time. The <date expression>
+can be all sorts of date strings or if it doesn't match any internal ones, it
+is taken as a filename and tries to get the modification date (mtime) from
+<file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
+details.
 
 Start the date expression with a dash (-) to make it request for a document
 that is older than the given date/time, default is a document that is newer
 than the specified date/time.
 
 If this option is used several times, the last one will be used.
-.IP "--max-redirs <num>"
-Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
-is used, this option can be used to prevent curl from following redirections
-\&"in absurdum". By default, the limit is set to 50 redirections. Set this
-option to -1 to make it limitless.
+.IP "-h, --help"
+Usage help.
+.IP "-M, --manual"
+Manual. Display the huge help text.
+.IP "-V, --version"
+Displays information about curl and the libcurl version it uses.
 
-If this option is used several times, the last one will be used.
-.IP "-0/--http1.0"
-(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
-internally preferred: HTTP 1.1.
-.IP "-1/--tlsv1"
-(SSL)
-Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-.IP "-2/--sslv2"
-(SSL)
-Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-.IP "-3/--sslv3"
-(SSL)
-Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-.IP "-4/--ipv4"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv4 addresses only.
-.IP "-6/--ipv6"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv6 addresses only.
-.IP "-#/--progress-bar"
-Make curl display progress information as a progress bar instead of the
-default statistics.
+The first line includes the full version of curl, libcurl and other 3rd party
+libraries linked with the executable.
+
+The second line (starts with "Protocols:") shows all protocols that libcurl
+reports to support.
+
+The third line (starts with "Features:") shows specific features libcurl
+reports to offer. Available features include:
+.RS
+.IP "IPv6"
+You can use IPv6 with this.
+.IP "krb4"
+Krb4 for FTP is supported.
+.IP "SSL"
+HTTPS and FTPS are supported.
+.IP "libz"
+Automatic decompression of compressed files over HTTP is supported.
+.IP "NTLM"
+NTLM authentication is supported.
+.IP "GSS-Negotiate"
+Negotiate authentication and krb5 for FTP is supported.
+.IP "Debug"
+This curl uses a libcurl built with Debug. This enables more error-tracking
+and memory debugging etc. For curl-developers only!
+.IP "AsynchDNS"
+This curl uses asynchronous name resolves.
+.IP "SPNEGO"
+SPNEGO Negotiate authentication is supported.
+.IP "Largefile"
+This curl supports transfers of large files, files larger than 2GB.
+.IP "IDN"
+This curl supports IDN - international domain names.
+.IP "SSPI"
+SSPI is supported. If you use NTLM and set a blank user name, curl will
+authenticate with your current user and password.
+.IP "TLS-SRP"
+SRP (Secure Remote Password) authentication is supported for TLS.
+.IP "Metalink"
+This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
+describes mirrors and hashes.  curl will use mirrors for failover if
+there are errors (such as the file or server not being available).
+.RE
 .SH FILES
 .I ~/.curlrc
 .RS
-Default config file, see \fI-K/--config\fP for details.
+Default config file, see \fI-K--config\fP for details.
 .SH ENVIRONMENT
 The environment variables can be specified in lower case or upper case. The
 lower case version has precedence. http_proxy is an exception as it is only
 available in lower case.
+
+Using an environment variable to set the proxy has the same effect as using
+the \fI--proxy\fP option.
+
 .IP "http_proxy [protocol://]<host>[:port]"
 Sets the proxy server to use for HTTP.
 .IP "HTTPS_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use for HTTPS.
-.IP "FTP_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use for FTP.
+.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
+Sets the proxy server to use for [url-protocol], where the protocol is a
+protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
+SMTP, LDAP etc.
 .IP "ALL_PROXY [protocol://]<host>[:port]"
 Sets the proxy server to use if no protocol-specific proxy is set.
 .IP "NO_PROXY <comma-separated list of hosts>"
 list of host names that shouldn't go through any proxy. If set to a asterisk
 \&'*' only, it matches all hosts.
+.SH "PROXY PROTOCOL PREFIXES"
+Since curl version 7.21.7, the proxy string may be specified with a
+protocol:// prefix to specify alternative proxy protocols.
+
+If no protocol is specified in the proxy string or if the string doesn't match
+a supported one, the proxy will be treated as an HTTP proxy.
+
+The supported proxy protocol prefixes are as follows:
+.IP "socks4://"
+Makes it the equivalent of \fI--socks4\fP
+.IP "socks4a://"
+Makes it the equivalent of \fI--socks4a\fP
+.IP "socks5://"
+Makes it the equivalent of \fI--socks5\fP
+.IP "socks5h://"
+Makes it the equivalent of \fI--socks5-hostname\fP
 .SH EXIT CODES
 There are a bunch of different error codes and their corresponding error
 messages that may appear during bad conditions. At the time of this writing,
@@ -1622,6 +1826,10 @@ Unsupported protocol. This build of curl has no support for this protocol.
 Failed to initialize.
 .IP 3
 URL malformed. The syntax was not correct.
+.IP 4
+A feature or option that was needed to perform the desired request was not
+enabled or was explicitly disabled at build-time. To make curl able to do
+this, you probably need another build of libcurl!
 .IP 5
 Couldn't resolve proxy. The given proxy host could not be resolved.
 .IP 6
@@ -1654,7 +1862,7 @@ FTP quote error. A quote command returned error from the server.
 .IP 22
 HTTP page not retrieved. The requested url was not found or returned another
 error with the HTTP error code being 400 or above. This return code only
-appears if \fI-f/--fail\fP is used.
+appears if \fI-f--fail\fP is used.
 .IP 23
 Write error. Curl couldn't write data to a local filesystem or similar.
 .IP 25
@@ -1698,11 +1906,13 @@ Interface error. A specified outgoing interface could not be used.
 .IP 47
 Too many redirects. When following redirects, curl hit the maximum amount.
 .IP 48
-Unknown TELNET option specified.
+Unknown option specified to libcurl. This indicates that you passed a weird
+option to curl that was passed on to libcurl and rejected. Read up in the
+manual!
 .IP 49
 Malformed telnet option.
 .IP 51
-The peer's SSL certificate or SSH MD5 fingerprint was not ok.
+The peer's SSL certificate or SSH MD5 fingerprint was not OK.
 .IP 52
 The server didn't reply anything, which here is considered an error.
 .IP 53
@@ -1786,4 +1996,3 @@ ftp://ftp.sunet.se/pub/www/utilities/curl/
 .SH "SEE ALSO"
 .BR ftp (1),
 .BR wget (1)
-
index fb8f4b4..88c7e7e 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -47,9 +49,9 @@ p.roffit {
 <p class="level0">curl - transfer a URL <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
 <p class="level0"><span Class="bold">curl [options]</span> <a class="emphasis" href="#URL">[URL...]</a> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0"><span Class="bold">curl</span> is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP).  The command is designed to work without user interaction. 
-<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more. As you will see below, the number of features will make your head spin! 
+<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume, Metalink, and more. As you will see below, the number of features will make your head spin! 
 <p class="level0">curl is powered by libcurl for all transfer-related features. See <span Class="manpage">libcurl (3)</span> for details. <a name="URL"></a><h2 class="nroffsh">URL</h2>
-<p class="level0">The URL syntax is protocol-dependent. You'll find a detailed description in RFC 3986
+<p class="level0">The URL syntax is protocol-dependent. You'll find a detailed description in <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>
 <p class="level0">You can specify multiple URLs or parts of URLs by writing part sets within braces as in: 
 <p class="level0">&nbsp;<a href="http://site">http://site</a>.{one,two,three}.com 
 <p class="level0">or you can get sequences of alphanumeric series by using [] as in: 
@@ -61,49 +63,64 @@ p.roffit {
 <p class="level0">&nbsp;<a href="http://www.numericals.com/file">http://www.numericals.com/file</a>[1-100:10].txt &nbsp;<a href="http://www.letters.com/file">http://www.letters.com/file</a>[a-z:2].txt 
 <p class="level0">If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default to HTTP but try other protocols based on often-used host name prefixes. For example, for host names starting with "ftp." curl will assume you want to speak FTP. 
 <p class="level0">curl will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any means but is instead <span Class="bold">very</span> liberal with what it accepts. 
-<p class="level0">Curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
+<p class="level0">curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
 <p class="level0">curl normally displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc. 
 <p class="level0">curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about to write data to the terminal, it <span Class="emphasis">disables</span> the progress meter as otherwise it would mess up the output mixing progress meter and response data. 
 <p class="level0">If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (&gt;), -o [file] or similar. 
 <p class="level0">It is not the same case for FTP upload as that operation does not spit out any response data to the terminal. 
 <p class="level0">If you prefer a progress "bar" instead of the regular meter, <a class="emphasis" href="#-">-#</a> is your friend. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">In general, all boolean options are enabled with --option and yet again disabled with --<span Class="bold">no-</span>option. That is, you use the exact same option name but prefix it with "no-". However, in this list we mostly only list and show the --option version of them. (This concept with --no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.) 
-<p class="level0"><a name="-a--append"></a><span class="nroffip">-a/--append</span> 
+<p class="level0">In general, all boolean options are enabled with --<span Class="bold">option</span> and yet again disabled with --<span Class="bold">no-</span>option. That is, you use the exact same option name but prefix it with "no-". However, in this list we mostly only list and show the --option version of them. (This concept with --no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.) 
+<p class="level0"><a name="-"></a><span class="nroffip">-#, --progress-bar</span> 
+<p class="level1">Make curl display progress as a simple progress bar instead of the standard, more informational, meter. 
+<p class="level0"><a name="-0"></a><span class="nroffip">-0, --http1.0</span> 
+<p class="level1">(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its internally preferred: HTTP 1.1. 
+<p class="level0"><a name="-1"></a><span class="nroffip">-1, --tlsv1</span> 
+<p class="level1">(SSL) Forces curl to use TLS version 1 when negotiating with a remote TLS server. 
+<p class="level0"><a name="-2"></a><span class="nroffip">-2, --sslv2</span> 
+<p class="level1">(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server. 
+<p class="level0"><a name="-3"></a><span class="nroffip">-3, --sslv3</span> 
+<p class="level1">(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server. 
+<p class="level0"><a name="-4"></a><span class="nroffip">-4, --ipv4</span> 
+<p class="level1">If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells curl to resolve names to IPv4 addresses only. 
+<p class="level0"><a name="-6"></a><span class="nroffip">-6, --ipv6</span> 
+<p class="level1">If curl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells curl to resolve names to IPv6 addresses only. 
+<p class="level0"><a name="-a"></a><span class="nroffip">-a, --append</span> 
 <p class="level1">(FTP/SFTP) When used in an upload, this will tell curl to append to the target file instead of overwriting it. If the file doesn't exist, it will be created. Note that this flag is ignored by some SSH servers (including OpenSSH). 
-<p class="level0"><a name="-A--user-agent"></a><span class="nroffip">-A/--user-agent &lt;agent string&gt;</span> 
-<p class="level1">(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in the string, surround the string with single quote marks. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> option of course. 
-<p class="level1">If this option is set more than once, the last one will be the one that's used. 
+<p class="level0"><a name="-A"></a><span class="nroffip">-A, --user-agent &lt;agent string&gt;</span> 
+<p class="level1">(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in the string, surround the string with single quote marks. This can also be set with the <a class="emphasis" href="#-H">-H, --header</a> option of course. 
+<p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--anyauth"></a><span class="nroffip">--anyauth</span> 
 <p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a request and checking the response-headers, thus possibly inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>. 
 <p class="level1">Note that using --anyauth is not recommended if you do uploads from stdin, since it may require data to be sent twice and then the client must be able to rewind. If the need should arise when uploading from stdin, the upload operation will fail. 
-<p class="level0"><a name="-b--cookie"></a><span class="nroffip">-b/--cookie &lt;name=data&gt;</span> 
+<p class="level0"><a name="-b"></a><span class="nroffip">-b, --cookie &lt;name=data&gt;</span> 
 <p class="level1">(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data previously received from the server in a "Set-Cookie:" line. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". 
-<p class="level1">If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session if they match. Using this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the <a class="emphasis" href="#-L--location">-L/--location</a> option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format. 
-<p class="level1"><span Class="bold">NOTE</span> that the file specified with <a class="emphasis" href="#-b--cookie">-b/--cookie</a> is only used as input. No cookies will be stored in the file. To store cookies, use the <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option or you could even save the HTTP headers to a file using <a class="emphasis" href="#-D--dump-header">-D/--dump-header</a>! 
-<p class="level1">If this option is set more than once, the last one will be the one that's used. 
-<p class="level0"><a name="-B--use-ascii"></a><span class="nroffip">-B/--use-ascii</span> 
-<p class="level1">Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be enforced by using an URL that ends with ";type=A". This option causes data sent to stdout to be in text mode for win32 systems. 
+<p class="level1">If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session if they match. Using this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the <a class="emphasis" href="#-L">-L, --location</a> option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format. 
+<p class="level1"><span Class="bold">NOTE</span> that the file specified with <a class="emphasis" href="#-b">-b, --cookie</a> is only used as input. No cookies will be stored in the file. To store cookies, use the <a class="emphasis" href="#-c">-c, --cookie-jar</a> option or you could even save the HTTP headers to a file using <a class="emphasis" href="#-D">-D, --dump-header</a>! 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-B"></a><span class="nroffip">-B, --use-ascii</span> 
+<p class="level1">(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using an URL that ends with ";type=A". This option causes data sent to stdout to be in text mode for win32 systems. 
 <p class="level0"><a name="--basic"></a><span class="nroffip">--basic</span> 
 <p class="level1">(HTTP) Tells curl to use HTTP Basic authentication. This is the default and this option is usually pointless, unless you use it to override a previously set option that sets a different authentication method (such as <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a>, or <a class="emphasis" href="#--negotiate">--negotiate</a>). 
+<p class="level0"><a name="-c"></a><span class="nroffip">-c, --cookie-jar &lt;file name&gt;</span> 
+<p class="level1">(HTTP) Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies previously read from a specified file as well as all cookies received from remote server(s). If no cookies are known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash, "-", the cookies will be written to stdout. 
+<p class="level1">This command line option will activate the cookie engine that makes curl record and use cookies. Another way to activate it is to use the <span class="emphasis">-b, --cookie</span> option. 
+<p class="level1">If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation. 
+<p class="level1">If this option is used several times, the last specified file name will be used. 
+<p class="level0"><a name="-C"></a><span class="nroffip">-C, --continue-at &lt;offset&gt;</span> 
+<p class="level1">Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination.  If used with uploads, the FTP server command SIZE will not be used by curl. 
+<p class="level1">Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out. 
+<p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--ciphers"></a><span class="nroffip">--ciphers &lt;list of ciphers&gt;</span> 
 <p class="level1">(SSL) Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. Read up on SSL cipher list details on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span> 
-<p class="level1">NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite entry at this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span> 
-<p class="level1">If this option is used several times, the last one will override the others
+<p class="level1">NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite entry at this URL: <span Class="emphasis"><a href="http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html">http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html</a>#Directives</span> 
+<p class="level1">If this option is used several times, the last one will be used
 <p class="level0"><a name="--compressed"></a><span class="nroffip">--compressed</span> 
-<p class="level1">(HTTP) Request a compressed response using one of the algorithms libcurl supports, and return the uncompressed document.  If this option is used and the server sends an unsupported encoding, curl will report an error. 
+<p class="level1">(HTTP) Request a compressed response using one of the algorithms curl supports, and save the uncompressed document.  If this option is used and the server sends an unsupported encoding, curl will report an error. 
 <p class="level0"><a name="--connect-timeout"></a><span class="nroffip">--connect-timeout &lt;seconds&gt;</span> 
-<p class="level1">Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once curl has connected this option is of no more use. See also the <a class="emphasis" href="#-m--max-time">-m/--max-time</a> option. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-c--cookie-jar"></a><span class="nroffip">-c/--cookie-jar &lt;file name&gt;</span> 
-<p class="level1">Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies previously read from a specified file as well as all cookies received from remote server(s). If no cookies are known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash, "-", the cookies will be written to stdout. 
-<p class="level1"><span Class="bold">NOTE</span> If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation. 
-<p class="level1">If this option is used several times, the last specified file name will be used. 
-<p class="level0"><a name="-C--continue-at"></a><span class="nroffip">-C/--continue-at &lt;offset&gt;</span> 
-<p class="level1">Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination.  If used with uploads, the FTP server command SIZE will not be used by curl. 
-<p class="level1">Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out. 
+<p class="level1">Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once curl has connected this option is of no more use.  Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in decimal precision. See also the <a class="emphasis" href="#-m">-m, --max-time</a> option. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--create-dirs"></a><span class="nroffip">--create-dirs</span> 
-<p class="level1">When used in conjunction with the -o option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it mentions already exist, no dir will be created. 
+<p class="level1">When used in conjunction with the <a class="emphasis" href="#-o">-o</a> option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the <a class="emphasis" href="#-o">-o</a> option, nothing else. If the <a class="emphasis" href="#-o">-o</a> file name uses no dir or if the dirs it mentions already exist, no dir will be created. 
 <p class="level1">To create remote directories when using FTP or SFTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>. 
 <p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span> 
 <p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). 
@@ -111,15 +128,23 @@ p.roffit {
 <p class="level1">(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level1">(Added in 7.19.7) 
-<p class="level0"><a name="-d--data"></a><span class="nroffip">-d/--data &lt;data&gt;</span> 
-<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded.  Compare to <a class="emphasis" href="#-F--form">-F/--form</a>. 
-<p class="level1"><a class="emphasis" href="#-d--data">-d/--data</a> is the same as <span Class="emphasis">--data-ascii</span>. To post data purely binary, you should instead use the <a class="emphasis" href="#--data-binary">--data-binary</a> option. To URL-encode the value of a form field you may use <a class="emphasis" href="#--data-urlencode">--data-urlencode</a>. 
+<p class="level0"><a name="-d"></a><span class="nroffip">-d, --data &lt;data&gt;</span> 
+<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded.  Compare to <a class="emphasis" href="#-F">-F, --form</a>. 
+<p class="level1"><a class="emphasis" href="#-d">-d, --data</a> is the same as <a class="emphasis" href="#--data-ascii">--data-ascii</a>. To post data purely binary, you should instead use the <a class="emphasis" href="#--data-binary">--data-binary</a> option. To URL-encode the value of a form field you may use <a class="emphasis" href="#--data-urlencode">--data-urlencode</a>. 
 <p class="level1">If any of these options is used more than once on the same command line, the data pieces specified will be merged together with a separating &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post chunk that looks like 'name=daniel&skill=lousy'. 
 <p class="level1">If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin.  The contents of the file must already be URL-encoded. Multiple files can also be specified. Posting data from a file named 'foobar' would thus be done with <span Class="emphasis">--data @foobar</span>. 
+<p class="level0"><a name="-D"></a><span class="nroffip">-D, --dump-header &lt;file&gt;</span> 
+<p class="level1">Write the protocol headers to the specified file. 
+<p class="level1">This option is handy to use when you want to store the headers that an HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the <a class="emphasis" href="#-b">-b, --cookie</a> option! The <a class="emphasis" href="#-c">-c, --cookie-jar</a> option is however a better way to store cookies. 
+<p class="level1">When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level1">
+<p class="level0"><a name="--data-ascii"></a><span class="nroffip">--data-ascii &lt;data&gt;</span> 
+<p class="level1">See <a class="emphasis" href="#-d">-d, --data</a>. 
 <p class="level0"><a name="--data-binary"></a><span class="nroffip">--data-binary &lt;data&gt;</span> 
 <p class="level1">(HTTP) This posts data exactly as specified with no extra processing whatsoever. 
-<p class="level1">If you start the data with the letter @, the rest should be a filename.  Data is posted in a similar manner as <span Class="emphasis">--data-ascii</span> does, except that newlines are preserved and conversions are never done. 
-<p class="level1">If this option is used several times, the ones following the first will append data as described in <a class="emphasis" href="#-d--data">-d/--data</a>. 
+<p class="level1">If you start the data with the letter @, the rest should be a filename.  Data is posted in a similar manner as <a class="emphasis" href="#--data-ascii">--data-ascii</a> does, except that newlines are preserved and conversions are never done. 
+<p class="level1">If this option is used several times, the ones following the first will append data as described in <a class="emphasis" href="#-d">-d, --data</a>. 
 <p class="level0"><a name="--data-urlencode"></a><span class="nroffip">--data-urlencode &lt;data&gt;</span> 
 <p class="level1">(HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added in 7.18.0) 
 <p class="level1">To be CGI-compliant, the &lt;data&gt; part should begin with a <span Class="emphasis">name</span> followed by a separator and a content specification. The &lt;data&gt; part can be passed to curl using one of the following syntaxes: 
@@ -135,35 +160,41 @@ p.roffit {
 <p class="level1"><a name="namefilename"></a><span class="nroffip">name@filename</span> 
 <p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST. The name part gets an equal sign appended, resulting in <span Class="emphasis">name=urlencoded-file-content</span>. Note that the name is expected to be URL-encoded already. 
 <p class="level1">
+<p class="level0"><a name="--delegation"></a><span class="nroffip">--delegation LEVEL</span> 
+<p class="level1">Set <span Class="emphasis">LEVEL</span> to tell the server what it is allowed to delegate when it comes to user credentials. Used with GSS/kerberos. 
+<p class="level2">
+<p class="level1"><a name="none"></a><span class="nroffip">none</span> 
+<p class="level2">Don't allow any delegation. 
+<p class="level1"><a name="policy"></a><span class="nroffip">policy</span> 
+<p class="level2">Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos service ticket, which is a matter of realm policy. 
+<p class="level1"><a name="always"></a><span class="nroffip">always</span> 
+<p class="level2">Unconditionally allow the server to delegate. 
+<p class="level1">
 <p class="level0"><a name="--digest"></a><span class="nroffip">--digest</span> 
-<p class="level1">(HTTP) Enables HTTP Digest authentication. This is a authentication that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u--user">-u/--user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options. 
-<p class="level1">If this option is used several times, the following occurrences make no difference
+<p class="level1">(HTTP) Enables HTTP Digest authentication. This is an authentication scheme that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u">-u, --user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options. 
+<p class="level1">If this option is used several times, only the first one is used
 <p class="level0"><a name="--disable-eprt"></a><span class="nroffip">--disable-eprt</span> 
 <p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, and may not work on all servers, but they enable more functionality in a better way than the traditional PORT command. 
 <p class="level1"><span Class="bold">--eprt</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-eprt</span> is an alias for <a class="bold" href="#--disable-eprt">--disable-eprt</a>. 
-<p class="level1">Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> or force it with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. 
+<p class="level1">Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use <a class="emphasis" href="#-P">-P, --ftp-port</a> or force it with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. 
 <p class="level0"><a name="--disable-epsv"></a><span class="nroffip">--disable-epsv</span> 
 <p class="level1">(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV. 
-<p class="level1"><span Class="bold">--epsv</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-epsv</span> is an alias for <a class="bold" href="#--disable-epsv">--disable-epsv</a>. 
-<p class="level1">Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a>. 
-<p class="level0"><a name="-D--dump-header"></a><span class="nroffip">-D/--dump-header &lt;file&gt;</span> 
-<p class="level1">Write the protocol headers to the specified file. 
-<p class="level1">This option is handy to use when you want to store the headers that a HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the <a class="emphasis" href="#-b--cookie">-b/--cookie</a> option! The <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option is however a better way to store cookies. 
-<p class="level1">When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there. 
+<p class="level1"><span Class="bold">--epsv</span> can be used to explicitly enable EPSV again and <span Class="bold">--no-epsv</span> is an alias for <a class="bold" href="#--disable-epsv">--disable-epsv</a>. 
+<p class="level1">Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use <a class="emphasis" href="#-P">-P, --ftp-port</a>. 
+<p class="level0"><a name="-e"></a><span class="nroffip">-e, --referer &lt;URL&gt;</span> 
+<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H">-H, --header</a> flag of course.  When used with <a class="emphasis" href="#-L">-L, --location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer. 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-e--referer"></a><span class="nroffip">-e/--referer &lt;URL&gt;</span> 
-<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> flag of course.  When used with <a class="emphasis" href="#-L--location">-L/--location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer. 
+<p class="level0"><a name="-E"></a><span class="nroffip">-E, --cert &lt;certificate[:password]&gt;</span> 
+<p class="level1">(SSL) Tells curl to use the specified client certificate file when getting a file with HTTPS, FTPS or another SSL-based protocol. The certificate must be in PEM format.  If the optional password isn't specified, it will be queried for on the terminal. Note that this option assumes a "certificate" file that is the private key and the private certificate concatenated! See <span Class="emphasis">--cert</span> and <a class="emphasis" href="#--key">--key</a> to specify them independently. 
+<p class="level1">If curl is built against the NSS SSL library then this option can tell curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname.  If the nickname contains ":", it needs to be preceded by "\" so that it is not recognized as password delimiter.  If the nickname contains "\", it needs to be escaped as "\\" so that it is not recognized as an escape character. 
+<p class="level1">(iOS and Mac OS X only) If curl is built against Secure Transport, then the certificate string must match the name of a certificate that's in the system or user keychain. The private key corresponding to the certificate, and certificate chain (if any),  must also be present in the keychain. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--engine"></a><span class="nroffip">--engine &lt;name&gt;</span> 
 <p class="level1">Select the OpenSSL crypto engine to use for cipher operations. Use <a class="emphasis" href="#--engine">--engine list</a> to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time. 
 <p class="level0"><a name="--environment"></a><span class="nroffip">--environment</span> 
-<p class="level1">(RISC OS ONLY) Sets a range of environment variables, using the names the -w option supports, to allow easier extraction of useful information after having run curl. 
+<p class="level1">(RISC OS ONLY) Sets a range of environment variables, using the names the <a class="emphasis" href="#-w">-w</a> option supports, to allow easier extraction of useful information after having run curl. 
 <p class="level0"><a name="--egd-file"></a><span class="nroffip">--egd-file &lt;file&gt;</span> 
 <p class="level1">(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--random-file">--random-file</a> option. 
-<p class="level0"><a name="-E--cert"></a><span class="nroffip">-E/--cert &lt;certificate[:password]&gt;</span> 
-<p class="level1">(SSL) Tells curl to use the specified certificate file when getting a file with HTTPS or FTPS. The certificate must be in PEM format.  If the optional password isn't specified, it will be queried for on the terminal. Note that this option assumes a "certificate" file that is the private key and the private certificate concatenated! See <span Class="emphasis">--cert</span> and <a class="emphasis" href="#--key">--key</a> to specify them independently. 
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded. 
-<p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--cert-type"></a><span class="nroffip">--cert-type &lt;type&gt;</span> 
 <p class="level1">(SSL) Tells curl what certificate type the provided certificate is in. PEM, DER and ENG are recognized types.  If not specified, PEM is assumed. 
 <p class="level1">If this option is used several times, the last one will be used. 
@@ -171,115 +202,99 @@ p.roffit {
 <p class="level1">(SSL) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file. 
 <p class="level1">curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that variable. 
 <p class="level1">The windows version of curl will automatically look for a CA certs file named &acute;curl-ca-bundle.crt&acute;, either in the same directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH. 
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the CA certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded
+<p class="level1">If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--capath"></a><span class="nroffip">--capath &lt;CA certificate directory&gt;</span> 
-<p class="level1">(SSL) Tells curl to use the specified certificate directory to verify the peer. The certificates must be in PEM format, and the directory must have been processed using the c_rehash utility supplied with openssl. Using <a class="emphasis" href="#--capath">--capath</a> can allow curl to make SSL-connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-f--fail"></a><span class="nroffip">-f/--fail</span> 
-<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal cases when a HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22. 
+<p class="level1">(SSL) Tells curl to use the specified certificate directory to verify the peer. Multiple paths can be provided by separating them with ":" (e.g. "path1:path2:path3"). The certificates must be in PEM format, and if curl is built against OpenSSL, the directory must have been processed using the c_rehash utility supplied with OpenSSL. Using <a class="emphasis" href="#--capath">--capath</a> can allow OpenSSL-powered curl to make SSL-connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates. 
+<p class="level1">If this option is set, the default capath value will be ignored, and if it is used several times, the last one will be used. 
+<p class="level0"><a name="-f"></a><span class="nroffip">-f, --fail</span> 
+<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal cases when an HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22. 
 <p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407). 
+<p class="level0"><a name="-F"></a><span class="nroffip">-F, --form &lt;name=content&gt;</span> 
+<p class="level1">(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to <a href="http://www.ietf.org/rfc/rfc2388.txt">RFC 2388</a>. This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol &lt;. The difference between @ and &lt; is then that @ makes a file get attached in the post as a file upload, while the &lt; makes a text field and just get the contents for that text field from a file. 
+<p class="level1">Example, to send your password file to the server, where 'password' is the name of the form-field to which /etc/passwd will be the input: 
+<p class="level1"><span Class="bold">curl</span> -F password=@/etc/passwd www.mypasswords.com 
+<p class="level1">To read content from stdin instead of a file, use - as the filename. This goes for both @ and &lt; constructs. 
+<p class="level1">You can also tell curl what Content-Type to use by using 'type=', in a manner similar to: 
+<p class="level1"><span Class="bold">curl</span> -F "web=@index.html;type=text/html" url.com 
+<p class="level1">or 
+<p class="level1"><span Class="bold">curl</span> -F "name=daniel;type=text/foo" url.com 
+<p class="level1">You can also explicitly change the name field of a file upload part by setting filename=, like this: 
+<p class="level1"><span Class="bold">curl</span> -F "file=@localfile;filename=nameinpost" url.com 
+<p class="level1">If filename/path contains ',' or ';', it must be quoted by double-quotes like: 
+<p class="level1"><span Class="bold">curl</span> -F "file=@\"localfile\";filename=\"nameinpost\"" url.com 
+<p class="level1">or 
+<p class="level1"><span Class="bold">curl</span> -F 'file=@"localfile";filename="nameinpost"' url.com 
+<p class="level1">Note that if a filename/path is quoted by double-quotes, any double-quote or backslash within the filename must be escaped by backslash. 
+<p class="level1">See further examples and details in the MANUAL. 
+<p class="level1">This option can be used multiple times. 
 <p class="level0"><a name="--ftp-account"></a><span class="nroffip">--ftp-account [data]</span> 
 <p class="level1">(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0) 
-<p class="level1">If this option is used twice, the second will override the previous use. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="--ftp-alternative-to-user"></a><span class="nroffip">--ftp-alternative-to-user &lt;command&gt;</span> 
+<p class="level1">(FTP) If authenticating with the USER and PASS commands fails, send this command.  When connecting to Tumbleweed's Secure Transport server over FTPS using a client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate. (Added in 7.15.5) 
 <p class="level0"><a name="--ftp-create-dirs"></a><span class="nroffip">--ftp-create-dirs</span> 
 <p class="level1">(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories. 
 <p class="level0"><a name="--ftp-method"></a><span class="nroffip">--ftp-method [method]</span> 
-<p class="level1">(FTP) Control what method curl should use to reach a file on a FTP(S) server. The method argument should be one of the following alternatives: 
+<p class="level1">(FTP) Control what method curl should use to reach a file on an FTP(S) server. The method argument should be one of the following alternatives: 
 <p class="level2">
 <p class="level1"><a name="multicwd"></a><span class="nroffip">multicwd</span> 
-<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior. 
+<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how <a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a> says it should be done. This is the default but the slowest behavior. 
 <p class="level1"><a name="nocwd"></a><span class="nroffip">nocwd</span> 
 <p class="level2">curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior. 
 <p class="level1"><a name="singlecwd"></a><span class="nroffip">singlecwd</span> 
 <p class="level2">curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'. 
 <p class="level1">(Added in 7.15.1) 
 <p class="level0"><a name="--ftp-pasv"></a><span class="nroffip">--ftp-pasv</span> 
-<p class="level1">(FTP) Use passive mode for the data conection. Passive is the internal default behavior, but using this option can be used to override a previous <span Class="emphasis">-P/-ftp-port</span> option. (Added in 7.11.0) 
-<p class="level1">If this option is used several times, the following occurrences make no difference. Undoing an enforced passive really isn't doable but you must then instead enforce the correct <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> again. 
+<p class="level1">(FTP) Use passive mode for the data connection. Passive is the internal default behavior, but using this option can be used to override a previous <span Class="emphasis">-P/-ftp-port</span> option. (Added in 7.11.0) 
+<p class="level1">If this option is used several times, only the first one is used. Undoing an enforced passive really isn't doable but you must then instead enforce the correct <a class="emphasis" href="#-P">-P, --ftp-port</a> again. 
 <p class="level1">Passive mode means that curl will try the EPSV command first and then PASV, unless <a class="emphasis" href="#--disable-epsv">--disable-epsv</a> is used. 
-<p class="level0"><a name="--ftp-alternative-to-user"></a><span class="nroffip">--ftp-alternative-to-user &lt;command&gt;</span> 
-<p class="level1">(FTP) If authenticating with the USER and PASS commands fails, send this command.  When connecting to Tumbleweed's Secure Transport server over FTPS using a client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate. (Added in 7.15.5) 
 <p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span> 
 <p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2) 
 <p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV. 
 <p class="level0"><a name="--ftp-pret"></a><span class="nroffip">--ftp-pret</span> 
 <p class="level1">(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x) 
-<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span> 
-<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0) 
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0) and that can still be used but will be removed in a future version. 
-<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span> 
-<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure authentication, but non-encrypted data transfers for efficiency.  Fails the transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0) 
-<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span> 
-<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0) 
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5) and that can still be used but will be removed in a future version. 
 <p class="level0"><a name="--ftp-ssl-ccc"></a><span class="nroffip">--ftp-ssl-ccc</span> 
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See --ftp-ssl-ccc-mode for other modes. (Added in 7.16.1) 
+<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See <a class="emphasis" href="#--ftp-ssl-ccc-mode">--ftp-ssl-ccc-mode</a> for other modes. (Added in 7.16.1) 
 <p class="level0"><a name="--ftp-ssl-ccc-mode"></a><span class="nroffip">--ftp-ssl-ccc-mode [active/passive]</span> 
 <p class="level1">(FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait for the server to do it, and will not reply to the shutdown from the server. The active mode initiates the shutdown and waits for a reply from the server. (Added in 7.16.2) 
-<p class="level0"><a name="-F--form"></a><span class="nroffip">-F/--form &lt;name=content&gt;</span> 
-<p class="level1">(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to RFC2388. This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol &lt;. The difference between @ and &lt; is then that @ makes a file get attached in the post as a file upload, while the &lt; makes a text field and just get the contents for that text field from a file. 
-<p class="level1">Example, to send your password file to the server, where 'password' is the name of the form-field to which /etc/passwd will be the input: 
-<p class="level1"><span Class="bold">curl</span> -F password=@/etc/passwd www.mypasswords.com 
-<p class="level1">To read the file's content from stdin instead of a file, use - where the file name should've been. This goes for both @ and &lt; constructs. 
-<p class="level1">You can also tell curl what Content-Type to use by using 'type=', in a manner similar to: 
-<p class="level1"><span Class="bold">curl</span> -F "web=@index.html;type=text/html" url.com 
-<p class="level1">or 
-<p class="level1"><span Class="bold">curl</span> -F "name=daniel;type=text/foo" url.com 
-<p class="level1">You can also explicitly change the name field of a file upload part by setting filename=, like this: 
-<p class="level1"><span Class="bold">curl</span> -F "file=@localfile;filename=nameinpost" url.com 
-<p class="level1">See further examples and details in the MANUAL. 
-<p class="level1">This option can be used multiple times. 
+<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span> 
+<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure authentication, but non-encrypted data transfers for efficiency.  Fails the transfer if the server doesn't support SSL/TLS.  (Added in 7.16.0) that can still be used but will be removed in a future version. 
 <p class="level0"><a name="--form-string"></a><span class="nroffip">--form-string &lt;name=string&gt;</span> 
 <p class="level1">(HTTP) Similar to <span Class="emphasis">--form</span> except that the value string for the named parameter is used literally. Leading '@' and '&lt;' characters, and the ';type=' string in the value have no special meaning. Use this in preference to <span Class="emphasis">--form</span> if there's any possibility that the string value may accidentally trigger the '@' or '&lt;' features of <span Class="emphasis">--form</span>. 
-<p class="level0"><a name="-g--globoff"></a><span class="nroffip">-g/--globoff</span> 
+<p class="level0"><a name="-g"></a><span class="nroffip">-g, --globoff</span> 
 <p class="level1">This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard. 
-<p class="level0"><a name="-G--get"></a><span class="nroffip">-G/--get</span> 
-<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d--data">-d/--data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in a HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' separator. 
+<p class="level0"><a name="-G"></a><span class="nroffip">-G, --get</span> 
+<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d">-d, --data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in an HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' separator. 
 <p class="level1">If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request. 
-<p class="level1">If this option is used several times, the following occurrences make no difference. This is because undoing a GET doesn't make sense, but you should then instead enforce the alternative method you prefer. 
-<p class="level0"><a name="-h--help"></a><span class="nroffip">-h/--help</span> 
-<p class="level1">Usage help. 
-<p class="level0"><a name="-H--header"></a><span class="nroffip">-H/--header &lt;header&gt;</span> 
-<p class="level1">(HTTP) Extra header to use when getting a web page. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you're doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:". 
+<p class="level1">If this option is used several times, only the first one is used. This is because undoing a GET doesn't make sense, but you should then instead enforce the alternative method you prefer. 
+<p class="level0"><a name="-H"></a><span class="nroffip">-H, --header &lt;header&gt;</span> 
+<p class="level1">(HTTP) Extra header to use when getting a web page. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you're doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:". If you send the custom header with no-value then its header must be terminated with a semicolon, such as -H "X-Custom-Header;" to send "X-Custom-Header:". 
 <p class="level1">curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus <span Class="bold">not</span> add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you. 
-<p class="level1">See also the <a class="emphasis" href="#-A--user-agent">-A/--user-agent</a> and <a class="emphasis" href="#-e--referer">-e/--referer</a> options. 
+<p class="level1">See also the <a class="emphasis" href="#-A">-A, --user-agent</a> and <a class="emphasis" href="#-e">-e, --referer</a> options. 
 <p class="level1">This option can be used multiple times to add/replace/remove multiple headers. 
 <p class="level0"><a name="--hostpubmd5"></a><span class="nroffip">--hostpubmd5 &lt;md5&gt;</span> 
-<p class="level1">Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1) 
+<p class="level1">(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. (Added in 7.17.1) 
 <p class="level0"><a name="--ignore-content-length"></a><span class="nroffip">--ignore-content-length</span> 
 <p class="level1">(HTTP) Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length for files larger than 2 gigabytes. 
-<p class="level0"><a name="-i--include"></a><span class="nroffip">-i/--include</span> 
+<p class="level0"><a name="-i"></a><span class="nroffip">-i, --include</span> 
 <p class="level1">(HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more... 
+<p class="level0"><a name="-I"></a><span class="nroffip">-I, --head</span> 
+<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only. 
 <p class="level0"><a name="--interface"></a><span class="nroffip">--interface &lt;name&gt;</span> 
 <p class="level1">Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like: 
 <p class="level1">&nbsp;curl --interface eth0:1 <a href="http://www.netscape.com/">http://www.netscape.com/</a> 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-I--head"></a><span class="nroffip">-I/--head</span> 
-<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only. 
-<p class="level0"><a name="-j--junk-session-cookies"></a><span class="nroffip">-j/--junk-session-cookies</span> 
+<p class="level0"><a name="-j"></a><span class="nroffip">-j, --junk-session-cookies</span> 
 <p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down. 
-<p class="level0"><a name="-J--remote-header-name"></a><span class="nroffip">-J/--remote-header-name</span> 
-<p class="level1">(HTTP) This option tells the -O/--remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL. 
-<p class="level0"><a name="-k--insecure"></a><span class="nroffip">-k/--insecure</span> 
-<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used. 
+<p class="level0"><a name="-J"></a><span class="nroffip">-J, --remote-header-name</span> 
+<p class="level1">(HTTP) This option tells the <a class="emphasis" href="#-O">-O, --remote-name</a> option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL. 
+<p class="level0"><a name="-k"></a><span class="nroffip">-k, --insecure</span> 
+<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k">-k, --insecure</a> is used. 
 <p class="level1">See this online resource for further details: <span Class="bold"><a href="http://curl.haxx.se/docs/sslcerts.html">http://curl.haxx.se/docs/sslcerts.html</a></span> 
-<p class="level0"><a name="--keepalive-time"></a><span class="nroffip">--keepalive-time &lt;seconds&gt;</span> 
-<p class="level1">This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect if <a class="emphasis" href="#--no-keepalive">--no-keepalive</a> is used. (Added in 7.18.0) 
-<p class="level1">If this option is used multiple times, the last occurrence sets the amount. 
-<p class="level0"><a name="--key"></a><span class="nroffip">--key &lt;key&gt;</span> 
-<p class="level1">(SSL/SSH) Private key file name. Allows you to provide your private key in this separate file. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="--key-type"></a><span class="nroffip">--key-type &lt;type&gt;</span> 
-<p class="level1">(SSL) Private key file type. Specify which type your <a class="emphasis" href="#--key">--key</a> provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="--krb"></a><span class="nroffip">--krb &lt;level&gt;</span> 
-<p class="level1">(FTP) Enable Kerberos authentication and use. The level must be entered and should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a level that is not one of these, 'private' will instead be used. 
-<p class="level1">This option requires a library built with kerberos4 or GSSAPI (GSS-Negotiate) support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports it. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-K--config"></a><span class="nroffip">-K/--config &lt;config file&gt;</span> 
+<p class="level0"><a name="-K"></a><span class="nroffip">-K, --config &lt;config file&gt;</span> 
 <p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line, separated by whitespace, colon, the equals sign or any combination thereof (however, the preferred separator is the equals sign). If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the following escape sequences are available: \\, \", \t, \n, \r and \v. A backslash preceding any other letter is ignored. If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. Only write one option per physical line in the config file. 
-<p class="level1">Specify the filename to -K/--config as '-' to make curl read the file from stdin. 
+<p class="level1">Specify the filename to -K--config as '-' to make curl read the file from stdin. 
 <p class="level1">Note that to be able to specify a URL in the config file, you need to specify it using the <a class="emphasis" href="#--url">--url</a> option, and not by simply writing the URL on its own line. So, it could look similar to this: 
 <p class="level1">url = "<a href="http://curl.haxx.se/docs/">http://curl.haxx.se/docs/</a>" 
 <p class="level1">Long option names can optionally be given in the config file without the initial double dashes. 
@@ -301,56 +316,85 @@ p.roffit {
 
 <p class="level1">
 <p class="level1">This option can be used multiple times to load multiple config files. 
+<p class="level0"><a name="--keepalive-time"></a><span class="nroffip">--keepalive-time &lt;seconds&gt;</span> 
+<p class="level1">This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect if <a class="emphasis" href="#--no-keepalive">--no-keepalive</a> is used. (Added in 7.18.0) 
+<p class="level1">If this option is used several times, the last one will be used. If unspecified, the option defaults to 60 seconds. 
+<p class="level0"><a name="--key"></a><span class="nroffip">--key &lt;key&gt;</span> 
+<p class="level1">(SSL/SSH) Private key file name. Allows you to provide your private key in this separate file. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="--key-type"></a><span class="nroffip">--key-type &lt;type&gt;</span> 
+<p class="level1">(SSL) Private key file type. Specify which type your <a class="emphasis" href="#--key">--key</a> provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="--krb"></a><span class="nroffip">--krb &lt;level&gt;</span> 
+<p class="level1">(FTP) Enable Kerberos authentication and use. The level must be entered and should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a level that is not one of these, 'private' will instead be used. 
+<p class="level1">This option requires a library built with kerberos4 or GSSAPI (GSS-Negotiate) support. This is not very common. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your curl supports it. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-l"></a><span class="nroffip">-l, --list-only</span> 
+<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format. 
+<p class="level1">This option causes an FTP NLST command to be sent.  Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links. 
+<p class="level1">
+<p class="level0"><a name="-L"></a><span class="nroffip">-L, --location</span> 
+<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i">-i, --include</a> or <a class="emphasis" href="#-I">-I, --head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option. 
+<p class="level1">When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method. 
 <p class="level0"><a name="--libcurl"></a><span class="nroffip">--libcurl &lt;file&gt;</span> 
-<p class="level1">Append this option to any ordinary curl command line, and you will get a libcurl-using source code written to the file that does the equivalent of what your command-line operation does! 
-<p class="level1">NOTE: this does not properly support -F and the sending of multipart formposts, so in those cases the output program will be missing necessary calls to <span Class="emphasis">curl_formadd(3)</span>, and possibly more. 
+<p class="level1">Append this option to any ordinary curl command line, and you will get a libcurl-using C source code written to the file that does the equivalent of what your command-line operation does! 
 <p class="level1">If this option is used several times, the last given file name will be used. (Added in 7.16.1) 
 <p class="level0"><a name="--limit-rate"></a><span class="nroffip">--limit-rate &lt;speed&gt;</span> 
 <p class="level1">Specify the maximum transfer rate you want curl to use. This feature is useful if you have a limited pipe and you'd like your transfer not to use your entire bandwidth. 
 <p class="level1">The given speed is measured in bytes/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. 
 <p class="level1">The given rate is the average speed counted during the entire transfer. It means that curl might use higher transfer speeds in short bursts, but over time it uses no more than the given rate. 
-<p class="level1">If you also use the <a class="emphasis" href="#-Y--speed-limit">-Y/--speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working. 
+<p class="level1">If you also use the <a class="emphasis" href="#-Y">-Y, --speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working. 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-l--list-only"></a><span class="nroffip">-l/--list-only</span> 
-<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format. 
-<p class="level1">This option causes an FTP NLST command to be sent.  Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links. 
-<p class="level1">
 <p class="level0"><a name="--local-port"></a><span class="nroffip">--local-port &lt;num&gt;[-num]</span> 
 <p class="level1">Set a preferred number or range of local port numbers to use for the connection(s).  Note that port numbers by nature are a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2) 
-<p class="level0"><a name="-L--location"></a><span class="nroffip">-L/--location</span> 
-<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i--include">-i/--include</a> or <a class="emphasis" href="#-I--head">-I/--head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option. 
-<p class="level1">When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method. 
 <p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span> 
-<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L--location">-L/--location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication). 
-<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt &lt;address&gt;</span> 
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients. 
-<p class="level1">(Added in 7.20.0) 
+<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L">-L, --location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication). 
+<p class="level0"><a name="-m"></a><span class="nroffip">-m, --max-time &lt;seconds&gt;</span> 
+<p class="level1">Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down.  Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in decimal precision.  See also the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="--mail-auth"></a><span class="nroffip">--mail-auth &lt;address&gt;</span> 
+<p class="level1">(SMTP) Specify a single address. This will be used to specify the authentication address (identity) of a submitted message that is being relayed to another server. 
+<p class="level1">(Added in 7.25.0) 
 <p class="level0"><a name="--mail-from"></a><span class="nroffip">--mail-from &lt;address&gt;</span> 
 <p class="level1">(SMTP) Specify a single address that the given mail should get sent from. 
 <p class="level1">(Added in 7.20.0) 
 <p class="level0"><a name="--max-filesize"></a><span class="nroffip">--max-filesize &lt;bytes&gt;</span> 
 <p class="level1">Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63. 
 <p class="level1"><span Class="bold">NOTE:</span> The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. 
-<p class="level0"><a name="-m--max-time"></a><span class="nroffip">-m/--max-time &lt;seconds&gt;</span> 
-<p class="level1">Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down.  See also the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-M--manual"></a><span class="nroffip">-M/--manual</span> 
-<p class="level1">Manual. Display the huge help text. 
-<p class="level0"><a name="-n--netrc"></a><span class="nroffip">-n/--netrc</span> 
+<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt &lt;address&gt;</span> 
+<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients. 
+<p class="level1">(Added in 7.20.0) 
+<p class="level0"><a name="--max-redirs"></a><span class="nroffip">--max-redirs &lt;num&gt;</span> 
+<p class="level1">Set maximum number of redirection-followings allowed. If <a class="emphasis" href="#-L">-L, --location</a> is used, this option can be used to prevent curl from following redirections "in absurdum". By default, the limit is set to 50 redirections. Set this option to -1 to make it limitless. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="--metalink"></a><span class="nroffip">--metalink</span> 
+<p class="level1">This option can tell curl to parse and process a given URI as Metalink file (both version 3 and 4 (<a href="http://www.ietf.org/rfc/rfc5854.txt">RFC 5854</a>) are supported) and make use of the mirrors listed within for failover if there are errors (such as the file or server not being available). It will also verify the hash of the file after the download completes. The Metalink file itself is downloaded and processed in memory and not stored in the local file system. 
+<p class="level1">Example to use a remote Metalink file: 
+<p class="level1"><span Class="bold">curl</span> --metalink <a href="http://www.example.com/example.metalink">http://www.example.com/example.metalink</a> 
+<p class="level1">To use a Metalink file in the local file system, use FILE protocol (file://): 
+<p class="level1"><span Class="bold">curl</span> --metalink file://example.metalink 
+<p class="level1">Please note that if FILE protocol is disabled, there is no way to use a local Metalink file at the time of this writing. Also note that if <a class="emphasis" href="#--metalink">--metalink</a> and <span Class="emphasis">--include</span> are used together, <span Class="emphasis">--include</span> will be ignored. This is because including headers in the response will break Metalink parser and if the headers are included in the file described in Metalink file, hash check will fail. 
+<p class="level1">(Added in 7.27.0, if built against the libmetalink library.) 
+<p class="level0"><a name="-n"></a><span class="nroffip">-n, --netrc</span> 
 <p class="level1">Makes curl scan the <span Class="emphasis">.netrc</span> (<span Class="emphasis">_netrc</span> on Windows) file in the user's home directory for login name and password. This is typically used for FTP on UNIX. If used with HTTP, curl will enable user authentication. See <span Class="manpage">netrc(4)</span> or <span Class="manpage">ftp(1)</span> for details on the file format. Curl will not complain if that file doesn't have the right permissions (it should not be either world- or group-readable). The environment variable "HOME" is used to find the home directory. 
 <p class="level1">A quick and very simple example of how to setup a <span Class="emphasis">.netrc</span> to allow curl to FTP to the machine host.domain.com with user name 'myself' and password 'secret' should look similar to: 
 <p class="level1"><span Class="bold">machine host.domain.com login myself password secret</span> 
+<p class="level0"><a name="-N"></a><span class="nroffip">-N, --no-buffer</span> 
+<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering. 
+<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--buffer</span> to enforce the buffering. 
+<p class="level0"><a name="--netrc-file"></a><span class="nroffip">--netrc-file</span> 
+<p class="level1">This option is similar to <span Class="emphasis">--netrc</span>, except that you provide the path (absolute or relative) to the netrc file that Curl should use. You can only specify one netrc file per invocation. If several <a class="emphasis" href="#--netrc-file">--netrc-file</a> options are provided, only the <span Class="bold">last one</span> will be used. (Added in 7.21.5) 
+<p class="level1">This option overrides any use of <span Class="emphasis">--netrc</span> as they are mutually exclusive. It will also abide by <a class="emphasis" href="#--netrc-optional">--netrc-optional</a> if specified. 
+<p class="level1">
 <p class="level0"><a name="--netrc-optional"></a><span class="nroffip">--netrc-optional</span> 
 <p class="level1">Very similar to <span Class="emphasis">--netrc</span>, but this option makes the .netrc usage <span Class="bold">optional</span> and not mandatory as the <span Class="emphasis">--netrc</span> option does. 
+<p class="level1">
 <p class="level0"><a name="--negotiate"></a><span class="nroffip">--negotiate</span> 
 <p class="level1">(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication method. For more information see IETF draft draft-brezak-spnego-http-04.txt. 
 <p class="level1">If you want to enable Negotiate for your proxy authentication, then use <a class="emphasis" href="#--proxy-negotiate">--proxy-negotiate</a>. 
-<p class="level1">This option requires a library built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your version supports GSS-Negotiate. 
-<p class="level1">When using this option, you must also provide a fake -u/--user option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the -u option aren't actually used. 
-<p class="level1">If this option is used several times, the following occurrences make no difference. 
-<p class="level0"><a name="-N--no-buffer"></a><span class="nroffip">-N/--no-buffer</span> 
-<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering. 
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--buffer</span> to enforce the buffering. 
+<p class="level1">This option requires a library built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your version supports GSS-Negotiate. 
+<p class="level1">When using this option, you must also provide a fake <a class="emphasis" href="#-u">-u, --user</a> option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the <a class="emphasis" href="#-u">-u</a> option aren't actually used. 
+<p class="level1">If this option is used several times, only the first one is used. 
 <p class="level0"><a name="--no-keepalive"></a><span class="nroffip">--no-keepalive</span> 
 <p class="level1">Disables the use of keepalive messages on the TCP connection, as by default curl enables them. 
 <p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--keepalive</span> to enforce keepalive. 
@@ -362,28 +406,45 @@ p.roffit {
 <p class="level0"><a name="--ntlm"></a><span class="nroffip">--ntlm</span> 
 <p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reverse-engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead, such as Digest. 
 <p class="level1">If you want to enable NTLM for your proxy authentication, then use <a class="emphasis" href="#--proxy-ntlm">--proxy-ntlm</a>. 
-<p class="level1">This option requires a library built with SSL support. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports NTLM. 
-<p class="level1">If this option is used several times, the following occurrences make no difference
-<p class="level0"><a name="-o--output"></a><span class="nroffip">-o/--output &lt;file&gt;</span> 
+<p class="level1">This option requires a library built with SSL support. Use <a class="emphasis" href="#-V">-V, --version</a> to see if your curl supports NTLM. 
+<p class="level1">If this option is used several times, only the first one is used
+<p class="level0"><a name="-o"></a><span class="nroffip">-o, --output &lt;file&gt;</span> 
 <p class="level1">Write output to &lt;file&gt; instead of stdout. If you are using {} or [] to fetch multiple documents, you can use '#' followed by a number in the &lt;file&gt; specifier. That variable will be replaced with the current string for the URL being fetched. Like in: 
 <p class="level1">&nbsp; curl http://{one,two}.site.com -o "file_#1.txt" 
 <p class="level1">or use several variables like: 
 <p class="level1">&nbsp; curl http://{site,host}.host[1-5].com -o "#1_#2" 
 <p class="level1">You may use this option as many times as the number of URLs you have. 
 <p class="level1">See also the <a class="emphasis" href="#--create-dirs">--create-dirs</a> option to create the local directories dynamically. Specifying the output as '-' (a single dash) will force the output to be done to stdout. 
-<p class="level0"><a name="-O--remote-name"></a><span class="nroffip">-O/--remote-name</span> 
+<p class="level0"><a name="-O"></a><span class="nroffip">-O, --remote-name</span> 
 <p class="level1">Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.) 
 <p class="level1">The remote file name to use for saving is extracted from the given URL, nothing else. 
+<p class="level1">Consequentially, the file will be saved in the current working directory. If you want the file saved in a different directory, make sure you change current working directory before you invoke curl with the <a class="bold" href="#-O">-O, --remote-name</a> flag! 
 <p class="level1">You may use this option as many times as the number of URLs you have. 
-<p class="level0"><a name="--remote-name-all"></a><span class="nroffip">--remote-name-all</span> 
-<p class="level1">This option changes the default action for all given URLs to be dealt with as if <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> were used for each one. So if you want to disable that for a specific URL after <a class="emphasis" href="#--remote-name-all">--remote-name-all</a> has been used, you must use "-o -" or <span Class="emphasis">--no-remote-name</span>. (Added in 7.19.0) 
+<p class="level0"><a name="-p"></a><span class="nroffip">-p, --proxytunnel</span> 
+<p class="level1">When an HTTP proxy is used (<a class="emphasis" href="#-x">-x, --proxy</a>), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. 
+<p class="level0"><a name="-P"></a><span class="nroffip">-P, --ftp-port &lt;address&gt;</span> 
+<p class="level1">(FTP) Reverses the default initiator/listener roles when connecting with FTP. This switch makes curl use active mode. In practice, curl then tells the server to connect back to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. &lt;address&gt; should be one of: 
+<p class="level2">
+<p class="level1"><a name="interface"></a><span class="nroffip">interface</span> 
+<p class="level2">i.e "eth0" to specify which interface's IP address you want to use (Unix only) 
+<p class="level1"><a name="IP"></a><span class="nroffip">IP address</span> 
+<p class="level2">i.e "192.168.10.1" to specify the exact IP address 
+<p class="level1"><a name="host"></a><span class="nroffip">host name</span> 
+<p class="level2">i.e "my.host.domain" to specify the machine 
+<p class="level1"><a name="-"></a><span class="nroffip">-</span> 
+<p class="level2">make curl pick the same IP address that is already used for the control connection 
+<p class="level1">
+<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++. 
+<p class="level1">Starting in 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available. 
 <p class="level0"><a name="--pass"></a><span class="nroffip">--pass &lt;phrase&gt;</span> 
 <p class="level1">(SSL/SSH) Passphrase for the private key 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--post301"></a><span class="nroffip">--post301</span> 
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.17.1) 
+<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.17.1) 
 <p class="level0"><a name="--post302"></a><span class="nroffip">--post302</span> 
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.19.1) 
+<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.19.1) 
+<p class="level0"><a name="--post303"></a><span class="nroffip">--post303</span> 
+<p class="level1">(HTTP) Tells curl to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 303 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L">-L, --location</a> (Added in 7.26.0) 
 <p class="level0"><a name="--proto"></a><span class="nroffip">--proto &lt;protocols&gt;</span> 
 <p class="level1">Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma separated, and are each a protocol name or 'all', optionally prefixed by zero or more modifiers. Available modifiers are: 
 <p class="level2">
@@ -417,31 +478,15 @@ p.roffit {
 <p class="level1">Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use <a class="emphasis" href="#--ntlm">--ntlm</a> for enabling NTLM with a remote host. 
 <p class="level0"><a name="--proxy10"></a><span class="nroffip">--proxy1.0 &lt;proxyhost[:port]&gt;</span> 
 <p class="level1">Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080. 
-<p class="level1">The only difference between this and the HTTP proxy option (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1. 
-<p class="level0"><a name="-p--proxytunnel"></a><span class="nroffip">-p/--proxytunnel</span> 
-<p class="level1">When an HTTP proxy is used (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. 
+<p class="level1">The only difference between this and the HTTP proxy option (<a class="emphasis" href="#-x">-x, --proxy</a>), is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1. 
 <p class="level0"><a name="--pubkey"></a><span class="nroffip">--pubkey &lt;key&gt;</span> 
 <p class="level1">(SSH) Public key file name. Allows you to provide your public key in this separate file. 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-P--ftp-port"></a><span class="nroffip">-P/--ftp-port &lt;address&gt;</span> 
-<p class="level1">(FTP) Reverses the default initiator/listener roles when connecting with FTP. This switch makes curl use active mode. In practice, curl then tells the server to connect back to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. &lt;address&gt; should be one of: 
-<p class="level2">
-<p class="level1"><a name="interface"></a><span class="nroffip">interface</span> 
-<p class="level2">i.e "eth0" to specify which interface's IP address you want to use (Unix only) 
-<p class="level1"><a name="IP"></a><span class="nroffip">IP address</span> 
-<p class="level2">i.e "192.168.10.1" to specify the exact IP address 
-<p class="level1"><a name="host"></a><span class="nroffip">host name</span> 
-<p class="level2">i.e "my.host.domain" to specify the machine 
-<p class="level1"><a name="-"></a><span class="nroffip">-</span> 
-<p class="level2">make curl pick the same IP address that is already used for the control connection 
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++. 
-<p class="level1">Starting in 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available. 
 <p class="level0"><a name="-q"></a><span class="nroffip">-q</span> 
-<p class="level1">If used as the first parameter on the command line, the <span Class="emphasis">curlrc</span> config file will not be read and used. See the <a class="emphasis" href="#-K--config">-K/--config</a> for details on the default config file search path. 
-<p class="level0"><a name="-Q--quote"></a><span class="nroffip">-Q/--quote &lt;command&gt;</span> 
-<p class="level1">(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'. To make commands be sent after libcurl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any number of commands. If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC959 defines to FTP servers, or one of the commands listed below to SFTP servers.  This option can be used multiple times
-<p class="level1">SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote commands before sending them to the server.  Following is the list of all supported SFTP quote commands: 
+<p class="level1">If used as the first parameter on the command line, the <span Class="emphasis">curlrc</span> config file will not be read and used. See the <a class="emphasis" href="#-K">-K, --config</a> for details on the default config file search path. 
+<p class="level0"><a name="-Q"></a><span class="nroffip">-Q, --quote &lt;command&gt;</span> 
+<p class="level1">(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'.  To make commands be sent after curl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any number of commands. If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as <a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a> defines to FTP servers, or one of the commands listed below to SFTP servers.  This option can be used multiple times. When speaking to an FTP server, prefix the command with an asterisk (*) to make curl continue even if the command fails as by default curl will stop at first failure
+<p class="level1">SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server.  File names may be quoted shell-style to embed spaces or special characters.  Following is the list of all supported SFTP quote commands: 
 <p class="level2">
 <p class="level1"><a name="chgrp"></a><span class="nroffip">chgrp group file</span> 
 <p class="level2">The chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal integer group ID. 
@@ -464,9 +509,7 @@ p.roffit {
 <p class="level1"><a name="symlink"></a><span class="nroffip">symlink source_file target_file</span> 
 <p class="level2">See ln. 
 <p class="level1">
-<p class="level0"><a name="--random-file"></a><span class="nroffip">--random-file &lt;file&gt;</span> 
-<p class="level1">(SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--egd-file">--egd-file</a> option. 
-<p class="level0"><a name="-r--range"></a><span class="nroffip">-r/--range &lt;range&gt;</span> 
+<p class="level0"><a name="-r"></a><span class="nroffip">-r, --range &lt;range&gt;</span> 
 <p class="level1">(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified in a number of ways. 
 <p class="level2">
 <p class="level2"><span Class="bold">0-499</span> specifies the first 500 bytes 
@@ -482,10 +525,14 @@ p.roffit {
 <p class="level1">You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole document. 
 <p class="level1">FTP and SFTP range downloads only support the simple 'start-stop' syntax (optionally with one of the numbers omitted). FTP use depends on the extended FTP command SIZE. 
 <p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-R"></a><span class="nroffip">-R, --remote-time</span> 
+<p class="level1">When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp. 
+<p class="level0"><a name="--random-file"></a><span class="nroffip">--random-file &lt;file&gt;</span> 
+<p class="level1">(SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--egd-file">--egd-file</a> option. 
 <p class="level0"><a name="--raw"></a><span class="nroffip">--raw</span> 
-<p class="level1">When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2) 
-<p class="level0"><a name="-R--remote-time"></a><span class="nroffip">-R/--remote-time</span> 
-<p class="level1">When used, this will make libcurl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp. 
+<p class="level1">(HTTP) When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2) 
+<p class="level0"><a name="--remote-name-all"></a><span class="nroffip">--remote-name-all</span> 
+<p class="level1">This option changes the default action for all given URLs to be dealt with as if <a class="emphasis" href="#-O">-O, --remote-name</a> were used for each one. So if you want to disable that for a specific URL after <a class="emphasis" href="#--remote-name-all">--remote-name-all</a> has been used, you must use "-o -" or <span Class="emphasis">--no-remote-name</span>. (Added in 7.19.0) 
 <p class="level0"><a name="--resolve"></a><span class="nroffip">--resolve &lt;host:port:address&gt;</span> 
 <p class="level1">Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line. The port number should be the number used for the specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports. 
 <p class="level1">This option can be used many times to add many host names to resolve. 
@@ -493,90 +540,181 @@ p.roffit {
 <p class="level0"><a name="--retry"></a><span class="nroffip">--retry &lt;num&gt;</span> 
 <p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code. 
 <p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries.  By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3) 
-<p class="level1">If this option is used multiple times, the last occurrence decide the amount
+<p class="level1">If this option is used several times, the last one will be used
 <p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay &lt;seconds&gt;</span> 
 <p class="level1">Make curl sleep this amount of time before each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3) 
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount
+<p class="level1">If this option is used several times, the last one will be used
 <p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time &lt;seconds&gt;</span> 
-<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3) 
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount. 
-<p class="level0"><a name="-s--silent"></a><span class="nroffip">-s/--silent</span> 
-<p class="level1">Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl mute. 
-<p class="level0"><a name="-S--show-error"></a><span class="nroffip">-S/--show-error</span> 
-<p class="level1">When used with -s it makes curl show an error message if it fails. 
+<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request&acute;s maximum time, use <a class="emphasis" href="#-m">-m, --max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3) 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-s"></a><span class="nroffip">-s, --silent</span> 
+<p class="level1">Silent or quiet mode. Don't show progress meter or error messages.  Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it. 
+<p class="level0"><a name="--sasl-ir"></a><span class="nroffip">--sasl-ir</span> 
+<p class="level1">Enable initial response in SASL authentication. (Added in 7.31.0) 
+<p class="level0"><a name="-S"></a><span class="nroffip">-S, --show-error</span> 
+<p class="level1">When used with <a class="emphasis" href="#-s">-s</a> it makes curl show an error message if it fails. 
+<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span> 
+<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0) 
+<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0). That option name can still be used but will be removed in a future version. 
+<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span> 
+<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection.  Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0) 
+<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5). That option name can still be used but will be removed in a future version. 
+<p class="level0"><a name="--ssl-allow-beast"></a><span class="nroffip">--ssl-allow-beast</span> 
+<p class="level1">(SSL) This option tells curl to not work around a security flaw in the SSL3 and TLS1.0 protocols known as BEAST.  If this option isn't used, the SSL layer may use work-arounds known to cause interoperability problems with some older SSL implementations. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that.  (Added in 7.25.0) 
 <p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 &lt;host[:port]&gt;</span> 
 <p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2) 
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
+<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive. 
+<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks4 proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks4:// protocol prefix. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--socks4a"></a><span class="nroffip">--socks4a &lt;host[:port]&gt;</span> 
 <p class="level1">Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0) 
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
+<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive. 
+<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks4a proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks4a:// protocol prefix. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--socks5-hostname"></a><span class="nroffip">--socks5-hostname &lt;host[:port]&gt;</span> 
 <p class="level1">Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0) 
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
+<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive. 
+<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks5 hostname proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks5h:// protocol prefix. 
 <p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.) 
 <p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 &lt;host[:port]&gt;</span> 
 <p class="level1">Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080. 
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive. 
+<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x">-x, --proxy</a>, as they are mutually exclusive. 
+<p class="level1">Since 7.21.7, this option is superfluous since you can specify a socks5 proxy with <a class="emphasis" href="#-x">-x, --proxy</a> using a socks5:// protocol prefix. 
 <p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.) 
 <p class="level1">This option (as well as <a class="emphasis" href="#--socks4">--socks4</a>) does not work with IPV6, FTPS or LDAP. 
 <p class="level0"><a name="--socks5-gssapi-service"></a><span class="nroffip">--socks5-gssapi-service &lt;servicename&gt;</span> 
 <p class="level1">The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it. 
-<p class="level1">Examples: &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd   would use sockd/proxy-name &nbsp;--socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name   would use sockd/real-name for cases where the proxy-name does not match the princpal name. &nbsp;(Added in 7.19.4). 
+<p class="level1">Examples: --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd would use sockd/proxy-name --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name would use sockd/real-name for cases where the proxy-name does not match the principal name.  (Added in 7.19.4). 
 <p class="level0"><a name="--socks5-gssapi-nec"></a><span class="nroffip">--socks5-gssapi-nec</span> 
-<p class="level1">As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not.  The option <a class="emphasis" href="#--socks5-gssapi-nec">--socks5-gssapi-nec</a> allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4). 
+<p class="level1">As part of the gssapi negotiation a protection mode is negotiated. <a href="http://www.ietf.org/rfc/rfc1961.txt">RFC 1961</a> says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not.  The option <a class="emphasis" href="#--socks5-gssapi-nec">--socks5-gssapi-nec</a> allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4). 
 <p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr &lt;file&gt;</span> 
-<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. This option has no point when you're using a shell with decent redirecting capabilities. 
+<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span> 
-<p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2) 
-<p class="level0"><a name="-t--telnet-option"></a><span class="nroffip">-t/--telnet-option &lt;OPT=val&gt;</span> 
+<p class="level0"><a name="-t"></a><span class="nroffip">-t, --telnet-option &lt;OPT=val&gt;</span> 
 <p class="level1">Pass options to the telnet protocol. Supported options are: 
 <p class="level1">TTYPE=&lt;term&gt; Sets the terminal type. 
 <p class="level1">XDISPLOC=&lt;X display&gt; Sets the X display location. 
 <p class="level1">NEW_ENV=&lt;var,val&gt; Sets an environment variable. 
-<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize &lt;value&gt;</span> 
-<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when tranferring data to or from a TFTP server. By default 512 bytes will be used. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level1">(Added in 7.20.0) 
-<p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file &lt;file&gt;</span> 
-<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a HTTP(S) server, the PUT command will be used. 
+<p class="level0"><a name="-T"></a><span class="nroffip">-T, --upload-file &lt;file&gt;</span> 
+<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on an HTTP(S) server, the PUT command will be used. 
 <p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. Alternately, the file name "." (a single period) may be specified instead of "-" to use stdin in non-blocking mode to allow reading server output while stdin is being uploaded. 
 <p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this: 
 <p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a> 
 <p class="level1">or even 
 <p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a> 
+<p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span> 
+<p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2) 
+<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize &lt;value&gt;</span> 
+<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when transferring data to or from a TFTP server. By default 512 bytes will be used. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level1">(Added in 7.20.0) 
+<p class="level0"><a name="--tlsauthtype"></a><span class="nroffip">--tlsauthtype &lt;authtype&gt;</span> 
+<p class="level1">Set TLS authentication type. Currently, the only supported option is "SRP", for TLS-SRP (<a href="http://www.ietf.org/rfc/rfc5054.txt">RFC 5054</a>). If <a class="emphasis" href="#--tlsuser">--tlsuser</a> and <a class="emphasis" href="#--tlspassword">--tlspassword</a> are specified but <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a> is not, then this option defaults to "SRP". (Added in 7.21.4) 
+<p class="level0"><a name="--tlsuser"></a><span class="nroffip">--tlsuser &lt;user&gt;</span> 
+<p class="level1">Set username for use with the TLS authentication method specified with <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a>. Requires that <a class="emphasis" href="#--tlspassword">--tlspassword</a> also be set.  (Added in 7.21.4) 
+<p class="level0"><a name="--tlspassword"></a><span class="nroffip">--tlspassword &lt;password&gt;</span> 
+<p class="level1">Set password for use with the TLS authentication method specified with <a class="emphasis" href="#--tlsauthtype">--tlsauthtype</a>. Requires that <a class="emphasis" href="#--tlsuser">--tlsuser</a> also be set.  (Added in 7.21.4) 
+<p class="level0"><a name="--tr-encoding"></a><span class="nroffip">--tr-encoding</span> 
+<p class="level1">(HTTP) Request a compressed Transfer-Encoding response using one of the algorithms curl supports, and uncompress the data while receiving it. 
+<p class="level1">(Added in 7.21.6) 
 <p class="level0"><a name="--trace"></a><span class="nroffip">--trace &lt;file&gt;</span> 
 <p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. 
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a>. 
+<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v">-v, --verbose</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a>. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii &lt;file&gt;</span> 
 <p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout. 
 <p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans. 
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace">--trace</a>. 
+<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v">-v, --verbose</a> or <a class="emphasis" href="#--trace">--trace</a>. 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span> 
 <p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0) 
-<p class="level0"><a name="-u--user"></a><span class="nroffip">-u/--user &lt;user:password&gt;</span> 
-<p class="level1">Specify the user name and password to use for server authentication. Overrides <a class="emphasis" href="#-n--netrc">-n/--netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>. 
+<p class="level0"><a name="-u"></a><span class="nroffip">-u, --user &lt;user:password&gt;</span> 
+<p class="level1">Specify the user name and password to use for server authentication. Overrides <a class="emphasis" href="#-n">-n, --netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>. 
 <p class="level1">If you just give the user name (without entering a colon) curl will prompt for a password. 
 <p class="level1">If you use an SSPI-enabled curl binary and do NTLM authentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-u :". 
 <p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-U--proxy-user"></a><span class="nroffip">-U/--proxy-user &lt;user:password&gt;</span> 
+<p class="level0"><a name="-U"></a><span class="nroffip">-U, --proxy-user &lt;user:password&gt;</span> 
 <p class="level1">Specify the user name and password to use for proxy authentication. 
 <p class="level1">If you use an SSPI-enabled curl binary and do NTLM authentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-U :". 
 <p class="level1">If this option is used several times, the last one will be used. 
 <p class="level0"><a name="--url"></a><span class="nroffip">--url &lt;URL&gt;</span> 
 <p class="level1">Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file. 
-<p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o--output">-o/--output</a> or the <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> options. 
-<p class="level0"><a name="-v--verbose"></a><span class="nroffip">-v/--verbose</span> 
+<p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o">-o, --output</a> or the <a class="emphasis" href="#-O">-O, --remote-name</a> options. 
+<p class="level0"><a name="-v"></a><span class="nroffip">-v, --verbose</span> 
 <p class="level1">Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting with '&gt;' means "header data" sent by curl, '&lt;' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl. 
-<p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i--include">-i/--include</a> might be the option you're looking for. 
+<p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i">-i, --include</a> might be the option you're looking for. 
 <p class="level1">If you think this option still doesn't give you enough details, consider using <a class="emphasis" href="#--trace">--trace</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> instead. 
 <p class="level1">This option overrides previous uses of <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> or <a class="emphasis" href="#--trace">--trace</a>. 
-<p class="level1">Use <span Class="emphasis">-S/--silent</span> to make curl quiet. 
-<p class="level0"><a name="-V--version"></a><span class="nroffip">-V/--version</span> 
+<p class="level1">Use <a class="emphasis" href="#-s">-s, --silent</a> to make curl quiet. 
+<p class="level0"><a name="-w"></a><span class="nroffip">-w, --write-out &lt;format&gt;</span> 
+<p class="level1">Defines what to display on stdout after a completed and successful operation. The format is a string that may contain plain text mixed with any number of variables. The string can be specified as "string", to get read from a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-". 
+<p class="level1">The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as %{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t. 
+<p class="level1"><span Class="bold">NOTE:</span> The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option. 
+<p class="level1">The variables available are: 
+<p class="level2">
+<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any. 
+<p class="level2"><span Class="bold">filename_effective</span> The ultimate filename that curl writes out to. This is only meaningful if curl is told to write to a file with the <span Class="emphasis">--remote-name</span> or <span Class="emphasis">--output</span> option. It's most useful in combination with the <span Class="emphasis">--remote-header-name</span> option. (Added in 7.25.1) 
+<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path curl ended up in when logging on to the remote FTP server. (Added in 7.15.4) 
+<p class="level2"><span Class="bold">http_code</span> The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias <span Class="bold">response_code</span> was added to show the same info. 
+<p class="level2"><span Class="bold">http_connect</span> The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4) 
+<p class="level2"><span Class="bold">local_ip</span> The IP address of the local end of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0) 
+<p class="level2"><span Class="bold">local_port</span> The local port number of the most recently done connection (Added in 7.29.0) 
+<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3) 
+<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3) 
+<p class="level2"><span Class="bold">redirect_url</span> When an HTTP request was made without -L to follow redirects, this variable will show the actual URL a redirect <span Class="emphasis">would</span> take you to. (Added in 7.18.2) 
+<p class="level2"><span Class="bold">remote_ip</span> The remote IP address of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0) 
+<p class="level2"><span Class="bold">remote_port</span> The remote port number of the most recently done connection (Added in 7.29.0) 
+<p class="level2"><span Class="bold">size_download</span> The total amount of bytes that were downloaded. 
+<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers. 
+<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request. 
+<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded. 
+<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second. 
+<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second. 
+<p class="level2"><span Class="bold">ssl_verify_result</span> The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0) 
+<p class="level2"><span Class="bold">time_appconnect</span> The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) 
+<p class="level2"><span Class="bold">time_connect</span> The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed. 
+<p class="level2"><span Class="bold">time_namelookup</span> The time, in seconds, it took from the start until the name resolving was completed. 
+<p class="level2"><span Class="bold">time_pretransfer</span> The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. 
+<p class="level2"><span Class="bold">time_redirect</span> The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3) 
+<p class="level2"><span Class="bold">time_starttransfer</span> The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result. 
+<p class="level2"><span Class="bold">time_total</span> The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution. 
+<p class="level2"><span Class="bold">url_effective</span> The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers. 
+<p class="level1">
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-x"></a><span class="nroffip">-x, --proxy &lt;[protocol://][user:password@]proxyhost[:port]&gt;</span> 
+<p class="level1">Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080. 
+<p class="level1">This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to "" to override it. 
+<p class="level1">All operations that are performed over an HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be available. This is not the case if you can tunnel through the proxy, as one with the <a class="emphasis" href="#-p">-p, --proxytunnel</a> option. 
+<p class="level1">User and password that might be provided in the proxy string are URL decoded by curl. This allows you to pass in special characters such as @ by using %40 or pass in a colon with %3a. 
+<p class="level1">The proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (http://) and the embedded user + password. 
+<p class="level1">From 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or socks5h:// to request the specific SOCKS version to be used. No protocol specified, http:// and all others will be treated as HTTP proxies. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-X"></a><span class="nroffip">-X, --request &lt;command&gt;</span> 
+<p class="level1">(HTTP) Specifies a custom request method to use when communicating with the HTTP server.  The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more. 
+<p class="level1">Normally you don't need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options. 
+<p class="level1">This option only changes the actual word used in the HTTP request, it does not alter the way curl behaves. So for example if you want to make a proper HEAD request, using -X HEAD will not suffice. You need to use the <a class="emphasis" href="#-I">-I, --head</a> option. 
+<p class="level1">(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level1">
+<p class="level0"><a name="--xattr"></a><span class="nroffip">--xattr</span> 
+<p class="level1">When saving output to a file, this option tells curl to store certain file metadata in extended file attributes. Currently, the URL is stored in the xdg.origin.url attribute and, for HTTP, the content type is stored in the mime_type attribute. If the file system does not support extended attributes, a warning is issued. 
+<p class="level1">
+<p class="level0"><a name="-y"></a><span class="nroffip">-y, --speed-time &lt;time&gt;</span> 
+<p class="level1">If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit will be 1 unless set with <a class="emphasis" href="#-Y">-Y</a>. 
+<p class="level1">This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-Y"></a><span class="nroffip">-Y, --speed-limit &lt;speed&gt;</span> 
+<p class="level1">If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with <a class="emphasis" href="#-y">-y</a> and is 30 if not set. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-z"></a><span class="nroffip">-z, --time-cond &lt;date expression&gt;|&lt;file&gt;</span> 
+<p class="level1">(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified before that time. The &lt;date expression&gt; can be all sorts of date strings or if it doesn't match any internal ones, it is taken as a filename and tries to get the modification date (mtime) from &lt;file&gt; instead. See the <span Class="emphasis">curl_getdate(3)</span> man pages for date expression details. 
+<p class="level1">Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the specified date/time. 
+<p class="level1">If this option is used several times, the last one will be used. 
+<p class="level0"><a name="-h"></a><span class="nroffip">-h, --help</span> 
+<p class="level1">Usage help. 
+<p class="level0"><a name="-M"></a><span class="nroffip">-M, --manual</span> 
+<p class="level1">Manual. Display the huge help text. 
+<p class="level0"><a name="-V"></a><span class="nroffip">-V, --version</span> 
 <p class="level1">Displays information about curl and the libcurl version it uses. 
 <p class="level1">The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable. 
 <p class="level1">The second line (starts with "Protocols:") shows all protocols that libcurl reports to support. 
@@ -606,88 +744,37 @@ p.roffit {
 <p class="level2">This curl supports IDN - international domain names. 
 <p class="level1"><a name="SSPI"></a><span class="nroffip">SSPI</span> 
 <p class="level2">SSPI is supported. If you use NTLM and set a blank user name, curl will authenticate with your current user and password. 
-<p class="level1">
-<p class="level0"><a name="-w--write-out"></a><span class="nroffip">-w/--write-out &lt;format&gt;</span> 
-<p class="level1">Defines what to display on stdout after a completed and successful operation. The format is a string that may contain plain text mixed with any number of variables. The string can be specified as "string", to get read from a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-". 
-<p class="level1">The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as %{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t. 
-<p class="level1"><span Class="bold">NOTE:</span> The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option. 
-<p class="level1">The variables available at this point are: 
-<p class="level2">
-<p class="level2"><span Class="bold">url_effective</span> The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers. 
-<p class="level2"><span Class="bold">http_code</span> The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias <span Class="bold">response_code</span> was added to show the same info. 
-<p class="level2"><span Class="bold">http_connect</span> The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4) 
-<p class="level2"><span Class="bold">time_total</span> The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution. 
-<p class="level2"><span Class="bold">time_namelookup</span> The time, in seconds, it took from the start until the name resolving was completed. 
-<p class="level2"><span Class="bold">time_connect</span> The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed. 
-<p class="level2"><span Class="bold">time_appconnect</span> The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) 
-<p class="level2"><span Class="bold">time_pretransfer</span> The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. 
-<p class="level2"><span Class="bold">time_redirect</span> The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3) 
-<p class="level2"><span Class="bold">time_starttransfer</span> The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result. 
-<p class="level2"><span Class="bold">size_download</span> The total amount of bytes that were downloaded. 
-<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded. 
-<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers. 
-<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request. 
-<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second. 
-<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second. 
-<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any. 
-<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3) 
-<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3) 
-<p class="level2"><span Class="bold">redirect_url</span> When a HTTP request was made without -L to follow redirects, this variable will show the actual URL a redirect <span Class="emphasis">would</span> take you to. (Added in 7.18.2) 
-<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path libcurl ended up in when logging on to the remote FTP server. (Added in 7.15.4) 
-<p class="level2"><span Class="bold">ssl_verify_result</span> The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0) 
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-x--proxy"></a><span class="nroffip">-x/--proxy &lt;proxyhost[:port]&gt;</span> 
-<p class="level1">Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080. 
-<p class="level1">This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to "" to override it. 
-<p class="level1"><span Class="bold">Note</span> that all operations that are performed over a HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be available. This is not the case if you can tunnel through the proxy, as done with the <a class="emphasis" href="#-p--proxytunnel">-p/--proxytunnel</a> option. 
-<p class="level1">Starting with 7.14.1, the proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (http://) and the embedded user + password. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-X--request"></a><span class="nroffip">-X/--request &lt;command&gt;</span> 
-<p class="level1">(HTTP) Specifies a custom request method to use when communicating with the HTTP server.  The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more. 
-<p class="level1">(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-y--speed-time"></a><span class="nroffip">-y/--speed-time &lt;time&gt;</span> 
-<p class="level1">If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit will be 1 unless set with -Y. 
-<p class="level1">This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-Y--speed-limit"></a><span class="nroffip">-Y/--speed-limit &lt;speed&gt;</span> 
-<p class="level1">If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with -y and is 30 if not set. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-z--time-cond"></a><span class="nroffip">-z/--time-cond &lt;date expression&gt;</span> 
-<p class="level1">(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified before that time. The date expression can be all sorts of date strings or if it doesn't match any internal ones, it tries to get the time from a given file name instead! See the <span Class="emphasis">curl_getdate(3)</span> man pages for date expression details. 
-<p class="level1">Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the specified date/time. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="--max-redirs"></a><span class="nroffip">--max-redirs &lt;num&gt;</span> 
-<p class="level1">Set maximum number of redirection-followings allowed. If <a class="emphasis" href="#-L--location">-L/--location</a> is used, this option can be used to prevent curl from following redirections "in absurdum". By default, the limit is set to 50 redirections. Set this option to -1 to make it limitless. 
-<p class="level1">If this option is used several times, the last one will be used. 
-<p class="level0"><a name="-0--http10"></a><span class="nroffip">-0/--http1.0</span> 
-<p class="level1">(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its internally preferred: HTTP 1.1. 
-<p class="level0"><a name="-1--tlsv1"></a><span class="nroffip">-1/--tlsv1</span> 
-<p class="level1">(SSL) Forces curl to use TLS version 1 when negotiating with a remote TLS server. 
-<p class="level0"><a name="-2--sslv2"></a><span class="nroffip">-2/--sslv2</span> 
-<p class="level1">(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server. 
-<p class="level0"><a name="-3--sslv3"></a><span class="nroffip">-3/--sslv3</span> 
-<p class="level1">(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server. 
-<p class="level0"><a name="-4--ipv4"></a><span class="nroffip">-4/--ipv4</span> 
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv4 addresses only. 
-<p class="level0"><a name="-6--ipv6"></a><span class="nroffip">-6/--ipv6</span> 
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv6 addresses only. 
-<p class="level0"><a name="---progress-bar"></a><span class="nroffip">-#/--progress-bar</span> 
-<p class="level1">Make curl display progress information as a progress bar instead of the default statistics. <a name="FILES"></a><h2 class="nroffsh">FILES</h2>
+<p class="level1"><a name="TLS-SRP"></a><span class="nroffip">TLS-SRP</span> 
+<p class="level2">SRP (Secure Remote Password) authentication is supported for TLS. 
+<p class="level1"><a name="Metalink"></a><span class="nroffip">Metalink</span> 
+<p class="level2">This curl supports Metalink (both version 3 and 4 (<a href="http://www.ietf.org/rfc/rfc5854.txt">RFC 5854</a>)), which describes mirrors and hashes.  curl will use mirrors for failover if there are errors (such as the file or server not being available). 
+<p class="level1"><a name="FILES"></a><h2 class="nroffsh">FILES</h2>
 <p class="level0"><span Class="emphasis">~/.curlrc</span> 
-<p class="level1">Default config file, see <a class="emphasis" href="#-K--config">-K/--config</a> for details. <a name="ENVIRONMENT"></a><h2 class="nroffsh">ENVIRONMENT</h2>
+<p class="level1">Default config file, see <a class="emphasis" href="#-K">-K, --config</a> for details. <a name="ENVIRONMENT"></a><h2 class="nroffsh">ENVIRONMENT</h2>
 <p class="level0">The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is only available in lower case. 
+<p class="level0">Using an environment variable to set the proxy has the same effect as using the <span Class="emphasis">--proxy</span> option. 
+<p class="level0">
 <p class="level0"><a name="httpproxy"></a><span class="nroffip">http_proxy [protocol://]&lt;host&gt;[:port]</span> 
 <p class="level1">Sets the proxy server to use for HTTP. 
 <p class="level0"><a name="HTTPSPROXY"></a><span class="nroffip">HTTPS_PROXY [protocol://]&lt;host&gt;[:port]</span> 
 <p class="level1">Sets the proxy server to use for HTTPS. 
-<p class="level0"><a name="FTPPROXY"></a><span class="nroffip">FTP_PROXY [protocol://]&lt;host&gt;[:port]</span> 
-<p class="level1">Sets the proxy server to use for FTP
+<p class="level0"><a name="url-protocolPROXY"></a><span class="nroffip">[url-protocol]_PROXY [protocol://]&lt;host&gt;[:port]</span> 
+<p class="level1">Sets the proxy server to use for [url-protocol], where the protocol is a protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc
 <p class="level0"><a name="ALLPROXY"></a><span class="nroffip">ALL_PROXY [protocol://]&lt;host&gt;[:port]</span> 
 <p class="level1">Sets the proxy server to use if no protocol-specific proxy is set. 
 <p class="level0"><a name="NOPROXY"></a><span class="nroffip">NO_PROXY &lt;comma-separated list of hosts&gt;</span> 
-<p class="level1">list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts. <a name="EXIT"></a><h2 class="nroffsh">EXIT CODES</h2>
+<p class="level1">list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts. <a name="PROXY"></a><h2 class="nroffsh">PROXY PROTOCOL PREFIXES</h2>
+<p class="level0">Since curl version 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols. 
+<p class="level0">If no protocol is specified in the proxy string or if the string doesn't match a supported one, the proxy will be treated as an HTTP proxy. 
+<p class="level0">The supported proxy protocol prefixes are as follows: 
+<p class="level0"><a name="socks4"></a><span class="nroffip">socks4://</span> 
+<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks4">--socks4</a> 
+<p class="level0"><a name="socks4a"></a><span class="nroffip">socks4a://</span> 
+<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks4a">--socks4a</a> 
+<p class="level0"><a name="socks5"></a><span class="nroffip">socks5://</span> 
+<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks5">--socks5</a> 
+<p class="level0"><a name="socks5h"></a><span class="nroffip">socks5h://</span> 
+<p class="level1">Makes it the equivalent of <a class="emphasis" href="#--socks5-hostname">--socks5-hostname</a> <a name="EXIT"></a><h2 class="nroffsh">EXIT CODES</h2>
 <p class="level0">There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are: 
 <p class="level0"><a name="1"></a><span class="nroffip">1</span> 
 <p class="level1">Unsupported protocol. This build of curl has no support for this protocol. 
@@ -695,6 +782,8 @@ p.roffit {
 <p class="level1">Failed to initialize. 
 <p class="level0"><a name="3"></a><span class="nroffip">3</span> 
 <p class="level1">URL malformed. The syntax was not correct. 
+<p class="level0"><a name="4"></a><span class="nroffip">4</span> 
+<p class="level1">A feature or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you probably need another build of libcurl! 
 <p class="level0"><a name="5"></a><span class="nroffip">5</span> 
 <p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved. 
 <p class="level0"><a name="6"></a><span class="nroffip">6</span> 
@@ -722,7 +811,7 @@ p.roffit {
 <p class="level0"><a name="21"></a><span class="nroffip">21</span> 
 <p class="level1">FTP quote error. A quote command returned error from the server. 
 <p class="level0"><a name="22"></a><span class="nroffip">22</span> 
-<p class="level1">HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <a class="emphasis" href="#-f--fail">-f/--fail</a> is used. 
+<p class="level1">HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <a class="emphasis" href="#-f">-f, --fail</a> is used. 
 <p class="level0"><a name="23"></a><span class="nroffip">23</span> 
 <p class="level1">Write error. Curl couldn't write data to a local filesystem or similar. 
 <p class="level0"><a name="25"></a><span class="nroffip">25</span> 
@@ -762,11 +851,11 @@ p.roffit {
 <p class="level0"><a name="47"></a><span class="nroffip">47</span> 
 <p class="level1">Too many redirects. When following redirects, curl hit the maximum amount. 
 <p class="level0"><a name="48"></a><span class="nroffip">48</span> 
-<p class="level1">Unknown TELNET option specified. 
+<p class="level1">Unknown option specified to libcurl. This indicates that you passed a weird option to curl that was passed on to libcurl and rejected. Read up in the manual! 
 <p class="level0"><a name="49"></a><span class="nroffip">49</span> 
 <p class="level1">Malformed telnet option. 
 <p class="level0"><a name="51"></a><span class="nroffip">51</span> 
-<p class="level1">The peer's SSL certificate or SSH MD5 fingerprint was not ok
+<p class="level1">The peer's SSL certificate or SSH MD5 fingerprint was not OK
 <p class="level0"><a name="52"></a><span class="nroffip">52</span> 
 <p class="level1">The server didn't reply anything, which here is considered an error. 
 <p class="level0"><a name="53"></a><span class="nroffip">53</span> 
@@ -842,7 +931,6 @@ p.roffit {
 <p class="level0">Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file. <a name="WWW"></a><h2 class="nroffsh">WWW</h2>
 <p class="level0"><a href="http://curl.haxx.se">http://curl.haxx.se</a> <a name="FTP"></a><h2 class="nroffsh">FTP</h2>
 <p class="level0"><a href="ftp://ftp.sunet.se/pub/www/utilities/curl/">ftp://ftp.sunet.se/pub/www/utilities/curl/</a> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">ftp (1)</span> <span Class="manpage">wget (1)</span> 
-<p class="level0"><p class="roffit">
+<p class="level0"><span Class="manpage">ftp (1)</span> <span Class="manpage">wget (1)</span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index efb5ee1..c81dd37 100644 (file)
Binary files a/docs/curl.pdf and b/docs/curl.pdf differ
index b215cbf..a85fff4 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example application source code using the multi interface to download many
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi interface to download many
  * files, but with a capped maximum amount of simultaneous transfers.
  *
  * Written by Michael Wallner
index 8d92f73..8e2bc9a 100644 (file)
@@ -1,10 +1,29 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2012, 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.
+#
+###########################################################################
 
 AUTOMAKE_OPTIONS = foreign nostdinc
 
 EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
-       makefile.dj $(COMPLICATED_EXAMPLES)
+       Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES)
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
 # $(top_builddir), to ensure that these paths which belong to the library
@@ -12,26 +31,33 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include
 
 LIBDIR = $(top_builddir)/lib
 
-if STATICLIB
-# we need this define when building with a static lib on Windows
-STATICCPPFLAGS = -DCURL_STATICLIB
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS += -DCURL_NO_OLDIES
+
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
 endif
 
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 
 # Dependencies
+if USE_EXPLICIT_LIB_DEPS
+LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
+else
 LDADD = $(LIBDIR)/libcurl.la
+endif
 
 # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
 include Makefile.inc
 
-
+all: $(check_PROGRAMS)
index 29ca0d7..dfd1178 100644 (file)
@@ -1,11 +1,24 @@
-#############################################################################
+#***************************************************************************
 #                                  _   _ ____  _
 #  Project                     ___| | | |  _ \| |
 #                             / __| | | | |_) | |
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 
 # What to call the final executable
 TARGET = example
index 1c76822..d1deb84 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 @SET_MAKE@
 
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+# 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.
+#
+###########################################################################
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,8 +99,10 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.inc
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \
+       $(top_srcdir)/depcomp README
 check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \
        cookie_interface$(EXEEXT) debug$(EXEEXT) fileupload$(EXEEXT) \
        fopen$(EXEEXT) ftpget$(EXEEXT) ftpgetresp$(EXEEXT) \
@@ -52,209 +115,446 @@ check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \
        simple$(EXEEXT) simplepost$(EXEEXT) simplessl$(EXEEXT) \
        sendrecv$(EXEEXT) httpcustomheader$(EXEEXT) certinfo$(EXEEXT) \
        chkspeed$(EXEEXT) ftpgetinfo$(EXEEXT) ftp-wildcard$(EXEEXT) \
-       smtp-multi$(EXEEXT)
+       smtp-multi$(EXEEXT) simplesmtp$(EXEEXT) smtp-tls$(EXEEXT) \
+       rtsp$(EXEEXT) externalsocket$(EXEEXT) resolve$(EXEEXT) \
+       progressfunc$(EXEEXT) pop3s$(EXEEXT) pop3slist$(EXEEXT) \
+       imap$(EXEEXT) url2file$(EXEEXT) sftpget$(EXEEXT) \
+       ftpsget$(EXEEXT)
 subdir = docs/examples
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 10_at_a_time_SOURCES = 10-at-a-time.c
 10_at_a_time_OBJECTS = 10-at-a-time.$(OBJEXT)
 10_at_a_time_LDADD = $(LDADD)
-10_at_a_time_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@10_at_a_time_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@10_at_a_time_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
 anyauthput_SOURCES = anyauthput.c
 anyauthput_OBJECTS = anyauthput.$(OBJEXT)
 anyauthput_LDADD = $(LDADD)
-anyauthput_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@anyauthput_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@anyauthput_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 certinfo_SOURCES = certinfo.c
 certinfo_OBJECTS = certinfo.$(OBJEXT)
 certinfo_LDADD = $(LDADD)
-certinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@certinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@certinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 chkspeed_SOURCES = chkspeed.c
 chkspeed_OBJECTS = chkspeed.$(OBJEXT)
 chkspeed_LDADD = $(LDADD)
-chkspeed_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@chkspeed_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@chkspeed_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 cookie_interface_SOURCES = cookie_interface.c
 cookie_interface_OBJECTS = cookie_interface.$(OBJEXT)
 cookie_interface_LDADD = $(LDADD)
-cookie_interface_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@cookie_interface_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@cookie_interface_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 debug_SOURCES = debug.c
 debug_OBJECTS = debug.$(OBJEXT)
 debug_LDADD = $(LDADD)
-debug_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@debug_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@debug_DEPENDENCIES = $(LIBDIR)/libcurl.la
+externalsocket_SOURCES = externalsocket.c
+externalsocket_OBJECTS = externalsocket.$(OBJEXT)
+externalsocket_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@externalsocket_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@externalsocket_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 fileupload_SOURCES = fileupload.c
 fileupload_OBJECTS = fileupload.$(OBJEXT)
 fileupload_LDADD = $(LDADD)
-fileupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@fileupload_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@fileupload_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 fopen_SOURCES = fopen.c
 fopen_OBJECTS = fopen.$(OBJEXT)
 fopen_LDADD = $(LDADD)
-fopen_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@fopen_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@fopen_DEPENDENCIES = $(LIBDIR)/libcurl.la
 ftp_wildcard_SOURCES = ftp-wildcard.c
 ftp_wildcard_OBJECTS = ftp-wildcard.$(OBJEXT)
 ftp_wildcard_LDADD = $(LDADD)
-ftp_wildcard_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftp_wildcard_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftp_wildcard_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 ftpget_SOURCES = ftpget.c
 ftpget_OBJECTS = ftpget.$(OBJEXT)
 ftpget_LDADD = $(LDADD)
-ftpget_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 ftpgetinfo_SOURCES = ftpgetinfo.c
 ftpgetinfo_OBJECTS = ftpgetinfo.$(OBJEXT)
 ftpgetinfo_LDADD = $(LDADD)
-ftpgetinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpgetinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpgetinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 ftpgetresp_SOURCES = ftpgetresp.c
 ftpgetresp_OBJECTS = ftpgetresp.$(OBJEXT)
 ftpgetresp_LDADD = $(LDADD)
-ftpgetresp_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpgetresp_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpgetresp_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+ftpsget_SOURCES = ftpsget.c
+ftpsget_OBJECTS = ftpsget.$(OBJEXT)
+ftpsget_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpsget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpsget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 ftpupload_SOURCES = ftpupload.c
 ftpupload_OBJECTS = ftpupload.$(OBJEXT)
 ftpupload_LDADD = $(LDADD)
-ftpupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpupload_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpupload_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 getinfo_SOURCES = getinfo.c
 getinfo_OBJECTS = getinfo.$(OBJEXT)
 getinfo_LDADD = $(LDADD)
-getinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@getinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getinfo_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 getinmemory_SOURCES = getinmemory.c
 getinmemory_OBJECTS = getinmemory.$(OBJEXT)
 getinmemory_LDADD = $(LDADD)
-getinmemory_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@getinmemory_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getinmemory_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 http_post_SOURCES = http-post.c
 http_post_OBJECTS = http-post.$(OBJEXT)
 http_post_LDADD = $(LDADD)
-http_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@http_post_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http_post_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 httpcustomheader_SOURCES = httpcustomheader.c
 httpcustomheader_OBJECTS = httpcustomheader.$(OBJEXT)
 httpcustomheader_LDADD = $(LDADD)
-httpcustomheader_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@httpcustomheader_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@httpcustomheader_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 httpput_SOURCES = httpput.c
 httpput_OBJECTS = httpput.$(OBJEXT)
 httpput_LDADD = $(LDADD)
-httpput_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@httpput_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@httpput_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 https_SOURCES = https.c
 https_OBJECTS = https.$(OBJEXT)
 https_LDADD = $(LDADD)
-https_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@https_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@https_DEPENDENCIES = $(LIBDIR)/libcurl.la
+imap_SOURCES = imap.c
+imap_OBJECTS = imap.$(OBJEXT)
+imap_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_DEPENDENCIES = $(LIBDIR)/libcurl.la
 multi_app_SOURCES = multi-app.c
 multi_app_OBJECTS = multi-app.$(OBJEXT)
 multi_app_LDADD = $(LDADD)
-multi_app_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_app_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_app_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 multi_debugcallback_SOURCES = multi-debugcallback.c
 multi_debugcallback_OBJECTS = multi-debugcallback.$(OBJEXT)
 multi_debugcallback_LDADD = $(LDADD)
-multi_debugcallback_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_debugcallback_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_debugcallback_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 multi_double_SOURCES = multi-double.c
 multi_double_OBJECTS = multi-double.$(OBJEXT)
 multi_double_LDADD = $(LDADD)
-multi_double_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_double_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_double_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 multi_post_SOURCES = multi-post.c
 multi_post_OBJECTS = multi-post.$(OBJEXT)
 multi_post_LDADD = $(LDADD)
-multi_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_post_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_post_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 multi_single_SOURCES = multi-single.c
 multi_single_OBJECTS = multi-single.$(OBJEXT)
 multi_single_LDADD = $(LDADD)
-multi_single_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_single_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_single_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 persistant_SOURCES = persistant.c
 persistant_OBJECTS = persistant.$(OBJEXT)
 persistant_LDADD = $(LDADD)
-persistant_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@persistant_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@persistant_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+pop3s_SOURCES = pop3s.c
+pop3s_OBJECTS = pop3s.$(OBJEXT)
+pop3s_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3s_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3s_DEPENDENCIES = $(LIBDIR)/libcurl.la
+pop3slist_SOURCES = pop3slist.c
+pop3slist_OBJECTS = pop3slist.$(OBJEXT)
+pop3slist_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3slist_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3slist_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 post_callback_SOURCES = post-callback.c
 post_callback_OBJECTS = post-callback.$(OBJEXT)
 post_callback_LDADD = $(LDADD)
-post_callback_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@post_callback_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@post_callback_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 postit2_SOURCES = postit2.c
 postit2_OBJECTS = postit2.$(OBJEXT)
 postit2_LDADD = $(LDADD)
-postit2_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@postit2_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@postit2_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+progressfunc_SOURCES = progressfunc.c
+progressfunc_OBJECTS = progressfunc.$(OBJEXT)
+progressfunc_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@progressfunc_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@progressfunc_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+resolve_SOURCES = resolve.c
+resolve_OBJECTS = resolve.$(OBJEXT)
+resolve_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@resolve_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@resolve_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+rtsp_SOURCES = rtsp.c
+rtsp_OBJECTS = rtsp.$(OBJEXT)
+rtsp_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@rtsp_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@rtsp_DEPENDENCIES = $(LIBDIR)/libcurl.la
 sendrecv_SOURCES = sendrecv.c
 sendrecv_OBJECTS = sendrecv.$(OBJEXT)
 sendrecv_LDADD = $(LDADD)
-sendrecv_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@sendrecv_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sendrecv_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 sepheaders_SOURCES = sepheaders.c
 sepheaders_OBJECTS = sepheaders.$(OBJEXT)
 sepheaders_LDADD = $(LDADD)
-sepheaders_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@sepheaders_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sepheaders_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+sftpget_SOURCES = sftpget.c
+sftpget_OBJECTS = sftpget.$(OBJEXT)
+sftpget_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sftpget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sftpget_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 simple_SOURCES = simple.c
 simple_OBJECTS = simple.$(OBJEXT)
 simple_LDADD = $(LDADD)
-simple_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@simple_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simple_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 simplepost_SOURCES = simplepost.c
 simplepost_OBJECTS = simplepost.$(OBJEXT)
 simplepost_LDADD = $(LDADD)
-simplepost_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@simplepost_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simplepost_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+simplesmtp_SOURCES = simplesmtp.c
+simplesmtp_OBJECTS = simplesmtp.$(OBJEXT)
+simplesmtp_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@simplesmtp_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simplesmtp_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 simplessl_SOURCES = simplessl.c
 simplessl_OBJECTS = simplessl.$(OBJEXT)
 simplessl_LDADD = $(LDADD)
-simplessl_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@simplessl_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simplessl_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
 smtp_multi_SOURCES = smtp-multi.c
 smtp_multi_OBJECTS = smtp-multi.$(OBJEXT)
 smtp_multi_LDADD = $(LDADD)
-smtp_multi_DEPENDENCIES = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_multi_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_multi_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+smtp_tls_SOURCES = smtp-tls.c
+smtp_tls_OBJECTS = smtp-tls.$(OBJEXT)
+smtp_tls_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_tls_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_tls_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+url2file_SOURCES = url2file.c
+url2file_OBJECTS = url2file.$(OBJEXT)
+url2file_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@url2file_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@url2file_DEPENDENCIES =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(LIBDIR)/libcurl.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
-       cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
-       ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
-       getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
-       multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
-       multi-single.c persistant.c post-callback.c postit2.c \
-       sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c \
-       smtp-multi.c
+       cookie_interface.c debug.c externalsocket.c fileupload.c \
+       fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \
+       ftpsget.c ftpupload.c getinfo.c getinmemory.c http-post.c \
+       httpcustomheader.c httpput.c https.c imap.c multi-app.c \
+       multi-debugcallback.c multi-double.c multi-post.c \
+       multi-single.c persistant.c pop3s.c pop3slist.c \
+       post-callback.c postit2.c progressfunc.c resolve.c rtsp.c \
+       sendrecv.c sepheaders.c sftpget.c simple.c simplepost.c \
+       simplesmtp.c simplessl.c smtp-multi.c smtp-tls.c url2file.c
 DIST_SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
-       cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
-       ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
-       getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
-       multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
-       multi-single.c persistant.c post-callback.c postit2.c \
-       sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c \
-       smtp-multi.c
+       cookie_interface.c debug.c externalsocket.c fileupload.c \
+       fopen.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \
+       ftpsget.c ftpupload.c getinfo.c getinmemory.c http-post.c \
+       httpcustomheader.c httpput.c https.c imap.c multi-app.c \
+       multi-debugcallback.c multi-double.c multi-post.c \
+       multi-single.c persistant.c pop3s.c pop3slist.c \
+       post-callback.c postit2.c progressfunc.c resolve.c rtsp.c \
+       sendrecv.c sepheaders.c sftpget.c simple.c simplepost.c \
+       simplesmtp.c simplessl.c smtp-multi.c smtp-tls.c url2file.c
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -271,7 +571,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -284,15 +585,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -302,23 +605,24 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -331,7 +635,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -344,34 +647,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -383,6 +686,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -402,7 +706,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -412,12 +715,16 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign nostdinc
 EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
-       makefile.dj $(COMPLICATED_EXAMPLES)
+       Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES)
 
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
@@ -426,26 +733,25 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include
 
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \
+       -I$(top_srcdir)/include -DCURL_NO_OLDIES $(am__append_1)
 LIBDIR = $(top_builddir)/lib
-
-# we need this define when building with a static lib on Windows
-@STATICLIB_TRUE@STATICCPPFLAGS = -DCURL_STATICLIB
+@USE_EXPLICIT_LIB_DEPS_FALSE@LDADD = $(LIBDIR)/libcurl.la
 
 # Dependencies
-LDADD = $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
 
 # These examples require external dependencies that may not be commonly
 # available on POSIX systems, so don't bother attempting to compile them here.
-COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c       \
+COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c      \
   ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c         \
   opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
-  smooth-gtk-thread.c version-check.pl
+  smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
+  multi-uv.c xmlstream.c usercertinmem.c
 
 all: all-am
 
@@ -455,14 +761,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  docs/examples/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  docs/examples/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/examples/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign docs/examples/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -472,6 +778,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -480,112 +787,196 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-checkPROGRAMS:
-       @list='$(check_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
-10-at-a-time$(EXEEXT): $(10_at_a_time_OBJECTS) $(10_at_a_time_DEPENDENCIES) 
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+10-at-a-time$(EXEEXT): $(10_at_a_time_OBJECTS) $(10_at_a_time_DEPENDENCIES) $(EXTRA_10_at_a_time_DEPENDENCIES) 
        @rm -f 10-at-a-time$(EXEEXT)
-       $(LINK) $(10_at_a_time_LDFLAGS) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS)
-anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS)
+
+anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES) $(EXTRA_anyauthput_DEPENDENCIES) 
        @rm -f anyauthput$(EXEEXT)
-       $(LINK) $(anyauthput_LDFLAGS) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS)
-certinfo$(EXEEXT): $(certinfo_OBJECTS) $(certinfo_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS)
+
+certinfo$(EXEEXT): $(certinfo_OBJECTS) $(certinfo_DEPENDENCIES) $(EXTRA_certinfo_DEPENDENCIES) 
        @rm -f certinfo$(EXEEXT)
-       $(LINK) $(certinfo_LDFLAGS) $(certinfo_OBJECTS) $(certinfo_LDADD) $(LIBS)
-chkspeed$(EXEEXT): $(chkspeed_OBJECTS) $(chkspeed_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(certinfo_OBJECTS) $(certinfo_LDADD) $(LIBS)
+
+chkspeed$(EXEEXT): $(chkspeed_OBJECTS) $(chkspeed_DEPENDENCIES) $(EXTRA_chkspeed_DEPENDENCIES) 
        @rm -f chkspeed$(EXEEXT)
-       $(LINK) $(chkspeed_LDFLAGS) $(chkspeed_OBJECTS) $(chkspeed_LDADD) $(LIBS)
-cookie_interface$(EXEEXT): $(cookie_interface_OBJECTS) $(cookie_interface_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(chkspeed_OBJECTS) $(chkspeed_LDADD) $(LIBS)
+
+cookie_interface$(EXEEXT): $(cookie_interface_OBJECTS) $(cookie_interface_DEPENDENCIES) $(EXTRA_cookie_interface_DEPENDENCIES) 
        @rm -f cookie_interface$(EXEEXT)
-       $(LINK) $(cookie_interface_LDFLAGS) $(cookie_interface_OBJECTS) $(cookie_interface_LDADD) $(LIBS)
-debug$(EXEEXT): $(debug_OBJECTS) $(debug_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(cookie_interface_OBJECTS) $(cookie_interface_LDADD) $(LIBS)
+
+debug$(EXEEXT): $(debug_OBJECTS) $(debug_DEPENDENCIES) $(EXTRA_debug_DEPENDENCIES) 
        @rm -f debug$(EXEEXT)
-       $(LINK) $(debug_LDFLAGS) $(debug_OBJECTS) $(debug_LDADD) $(LIBS)
-fileupload$(EXEEXT): $(fileupload_OBJECTS) $(fileupload_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(debug_OBJECTS) $(debug_LDADD) $(LIBS)
+
+externalsocket$(EXEEXT): $(externalsocket_OBJECTS) $(externalsocket_DEPENDENCIES) $(EXTRA_externalsocket_DEPENDENCIES) 
+       @rm -f externalsocket$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(externalsocket_OBJECTS) $(externalsocket_LDADD) $(LIBS)
+
+fileupload$(EXEEXT): $(fileupload_OBJECTS) $(fileupload_DEPENDENCIES) $(EXTRA_fileupload_DEPENDENCIES) 
        @rm -f fileupload$(EXEEXT)
-       $(LINK) $(fileupload_LDFLAGS) $(fileupload_OBJECTS) $(fileupload_LDADD) $(LIBS)
-fopen$(EXEEXT): $(fopen_OBJECTS) $(fopen_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(fileupload_OBJECTS) $(fileupload_LDADD) $(LIBS)
+
+fopen$(EXEEXT): $(fopen_OBJECTS) $(fopen_DEPENDENCIES) $(EXTRA_fopen_DEPENDENCIES) 
        @rm -f fopen$(EXEEXT)
-       $(LINK) $(fopen_LDFLAGS) $(fopen_OBJECTS) $(fopen_LDADD) $(LIBS)
-ftp-wildcard$(EXEEXT): $(ftp_wildcard_OBJECTS) $(ftp_wildcard_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(fopen_OBJECTS) $(fopen_LDADD) $(LIBS)
+
+ftp-wildcard$(EXEEXT): $(ftp_wildcard_OBJECTS) $(ftp_wildcard_DEPENDENCIES) $(EXTRA_ftp_wildcard_DEPENDENCIES) 
        @rm -f ftp-wildcard$(EXEEXT)
-       $(LINK) $(ftp_wildcard_LDFLAGS) $(ftp_wildcard_OBJECTS) $(ftp_wildcard_LDADD) $(LIBS)
-ftpget$(EXEEXT): $(ftpget_OBJECTS) $(ftpget_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(ftp_wildcard_OBJECTS) $(ftp_wildcard_LDADD) $(LIBS)
+
+ftpget$(EXEEXT): $(ftpget_OBJECTS) $(ftpget_DEPENDENCIES) $(EXTRA_ftpget_DEPENDENCIES) 
        @rm -f ftpget$(EXEEXT)
-       $(LINK) $(ftpget_LDFLAGS) $(ftpget_OBJECTS) $(ftpget_LDADD) $(LIBS)
-ftpgetinfo$(EXEEXT): $(ftpgetinfo_OBJECTS) $(ftpgetinfo_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(ftpget_OBJECTS) $(ftpget_LDADD) $(LIBS)
+
+ftpgetinfo$(EXEEXT): $(ftpgetinfo_OBJECTS) $(ftpgetinfo_DEPENDENCIES) $(EXTRA_ftpgetinfo_DEPENDENCIES) 
        @rm -f ftpgetinfo$(EXEEXT)
-       $(LINK) $(ftpgetinfo_LDFLAGS) $(ftpgetinfo_OBJECTS) $(ftpgetinfo_LDADD) $(LIBS)
-ftpgetresp$(EXEEXT): $(ftpgetresp_OBJECTS) $(ftpgetresp_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(ftpgetinfo_OBJECTS) $(ftpgetinfo_LDADD) $(LIBS)
+
+ftpgetresp$(EXEEXT): $(ftpgetresp_OBJECTS) $(ftpgetresp_DEPENDENCIES) $(EXTRA_ftpgetresp_DEPENDENCIES) 
        @rm -f ftpgetresp$(EXEEXT)
-       $(LINK) $(ftpgetresp_LDFLAGS) $(ftpgetresp_OBJECTS) $(ftpgetresp_LDADD) $(LIBS)
-ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(ftpgetresp_OBJECTS) $(ftpgetresp_LDADD) $(LIBS)
+
+ftpsget$(EXEEXT): $(ftpsget_OBJECTS) $(ftpsget_DEPENDENCIES) $(EXTRA_ftpsget_DEPENDENCIES) 
+       @rm -f ftpsget$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(ftpsget_OBJECTS) $(ftpsget_LDADD) $(LIBS)
+
+ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES) $(EXTRA_ftpupload_DEPENDENCIES) 
        @rm -f ftpupload$(EXEEXT)
-       $(LINK) $(ftpupload_LDFLAGS) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS)
-getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS)
+
+getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES) $(EXTRA_getinfo_DEPENDENCIES) 
        @rm -f getinfo$(EXEEXT)
-       $(LINK) $(getinfo_LDFLAGS) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS)
-getinmemory$(EXEEXT): $(getinmemory_OBJECTS) $(getinmemory_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS)
+
+getinmemory$(EXEEXT): $(getinmemory_OBJECTS) $(getinmemory_DEPENDENCIES) $(EXTRA_getinmemory_DEPENDENCIES) 
        @rm -f getinmemory$(EXEEXT)
-       $(LINK) $(getinmemory_LDFLAGS) $(getinmemory_OBJECTS) $(getinmemory_LDADD) $(LIBS)
-http-post$(EXEEXT): $(http_post_OBJECTS) $(http_post_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(getinmemory_OBJECTS) $(getinmemory_LDADD) $(LIBS)
+
+http-post$(EXEEXT): $(http_post_OBJECTS) $(http_post_DEPENDENCIES) $(EXTRA_http_post_DEPENDENCIES) 
        @rm -f http-post$(EXEEXT)
-       $(LINK) $(http_post_LDFLAGS) $(http_post_OBJECTS) $(http_post_LDADD) $(LIBS)
-httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(http_post_OBJECTS) $(http_post_LDADD) $(LIBS)
+
+httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES) $(EXTRA_httpcustomheader_DEPENDENCIES) 
        @rm -f httpcustomheader$(EXEEXT)
-       $(LINK) $(httpcustomheader_LDFLAGS) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS)
-httpput$(EXEEXT): $(httpput_OBJECTS) $(httpput_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS)
+
+httpput$(EXEEXT): $(httpput_OBJECTS) $(httpput_DEPENDENCIES) $(EXTRA_httpput_DEPENDENCIES) 
        @rm -f httpput$(EXEEXT)
-       $(LINK) $(httpput_LDFLAGS) $(httpput_OBJECTS) $(httpput_LDADD) $(LIBS)
-https$(EXEEXT): $(https_OBJECTS) $(https_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(httpput_OBJECTS) $(httpput_LDADD) $(LIBS)
+
+https$(EXEEXT): $(https_OBJECTS) $(https_DEPENDENCIES) $(EXTRA_https_DEPENDENCIES) 
        @rm -f https$(EXEEXT)
-       $(LINK) $(https_LDFLAGS) $(https_OBJECTS) $(https_LDADD) $(LIBS)
-multi-app$(EXEEXT): $(multi_app_OBJECTS) $(multi_app_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(https_OBJECTS) $(https_LDADD) $(LIBS)
+
+imap$(EXEEXT): $(imap_OBJECTS) $(imap_DEPENDENCIES) $(EXTRA_imap_DEPENDENCIES) 
+       @rm -f imap$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(imap_OBJECTS) $(imap_LDADD) $(LIBS)
+
+multi-app$(EXEEXT): $(multi_app_OBJECTS) $(multi_app_DEPENDENCIES) $(EXTRA_multi_app_DEPENDENCIES) 
        @rm -f multi-app$(EXEEXT)
-       $(LINK) $(multi_app_LDFLAGS) $(multi_app_OBJECTS) $(multi_app_LDADD) $(LIBS)
-multi-debugcallback$(EXEEXT): $(multi_debugcallback_OBJECTS) $(multi_debugcallback_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(multi_app_OBJECTS) $(multi_app_LDADD) $(LIBS)
+
+multi-debugcallback$(EXEEXT): $(multi_debugcallback_OBJECTS) $(multi_debugcallback_DEPENDENCIES) $(EXTRA_multi_debugcallback_DEPENDENCIES) 
        @rm -f multi-debugcallback$(EXEEXT)
-       $(LINK) $(multi_debugcallback_LDFLAGS) $(multi_debugcallback_OBJECTS) $(multi_debugcallback_LDADD) $(LIBS)
-multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(multi_debugcallback_OBJECTS) $(multi_debugcallback_LDADD) $(LIBS)
+
+multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES) $(EXTRA_multi_double_DEPENDENCIES) 
        @rm -f multi-double$(EXEEXT)
-       $(LINK) $(multi_double_LDFLAGS) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS)
-multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS)
+
+multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES) $(EXTRA_multi_post_DEPENDENCIES) 
        @rm -f multi-post$(EXEEXT)
-       $(LINK) $(multi_post_LDFLAGS) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS)
-multi-single$(EXEEXT): $(multi_single_OBJECTS) $(multi_single_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS)
+
+multi-single$(EXEEXT): $(multi_single_OBJECTS) $(multi_single_DEPENDENCIES) $(EXTRA_multi_single_DEPENDENCIES) 
        @rm -f multi-single$(EXEEXT)
-       $(LINK) $(multi_single_LDFLAGS) $(multi_single_OBJECTS) $(multi_single_LDADD) $(LIBS)
-persistant$(EXEEXT): $(persistant_OBJECTS) $(persistant_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(multi_single_OBJECTS) $(multi_single_LDADD) $(LIBS)
+
+persistant$(EXEEXT): $(persistant_OBJECTS) $(persistant_DEPENDENCIES) $(EXTRA_persistant_DEPENDENCIES) 
        @rm -f persistant$(EXEEXT)
-       $(LINK) $(persistant_LDFLAGS) $(persistant_OBJECTS) $(persistant_LDADD) $(LIBS)
-post-callback$(EXEEXT): $(post_callback_OBJECTS) $(post_callback_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(persistant_OBJECTS) $(persistant_LDADD) $(LIBS)
+
+pop3s$(EXEEXT): $(pop3s_OBJECTS) $(pop3s_DEPENDENCIES) $(EXTRA_pop3s_DEPENDENCIES) 
+       @rm -f pop3s$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(pop3s_OBJECTS) $(pop3s_LDADD) $(LIBS)
+
+pop3slist$(EXEEXT): $(pop3slist_OBJECTS) $(pop3slist_DEPENDENCIES) $(EXTRA_pop3slist_DEPENDENCIES) 
+       @rm -f pop3slist$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(pop3slist_OBJECTS) $(pop3slist_LDADD) $(LIBS)
+
+post-callback$(EXEEXT): $(post_callback_OBJECTS) $(post_callback_DEPENDENCIES) $(EXTRA_post_callback_DEPENDENCIES) 
        @rm -f post-callback$(EXEEXT)
-       $(LINK) $(post_callback_LDFLAGS) $(post_callback_OBJECTS) $(post_callback_LDADD) $(LIBS)
-postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(post_callback_OBJECTS) $(post_callback_LDADD) $(LIBS)
+
+postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES) $(EXTRA_postit2_DEPENDENCIES) 
        @rm -f postit2$(EXEEXT)
-       $(LINK) $(postit2_LDFLAGS) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS)
-sendrecv$(EXEEXT): $(sendrecv_OBJECTS) $(sendrecv_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS)
+
+progressfunc$(EXEEXT): $(progressfunc_OBJECTS) $(progressfunc_DEPENDENCIES) $(EXTRA_progressfunc_DEPENDENCIES) 
+       @rm -f progressfunc$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(progressfunc_OBJECTS) $(progressfunc_LDADD) $(LIBS)
+
+resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) $(EXTRA_resolve_DEPENDENCIES) 
+       @rm -f resolve$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
+
+rtsp$(EXEEXT): $(rtsp_OBJECTS) $(rtsp_DEPENDENCIES) $(EXTRA_rtsp_DEPENDENCIES) 
+       @rm -f rtsp$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(rtsp_OBJECTS) $(rtsp_LDADD) $(LIBS)
+
+sendrecv$(EXEEXT): $(sendrecv_OBJECTS) $(sendrecv_DEPENDENCIES) $(EXTRA_sendrecv_DEPENDENCIES) 
        @rm -f sendrecv$(EXEEXT)
-       $(LINK) $(sendrecv_LDFLAGS) $(sendrecv_OBJECTS) $(sendrecv_LDADD) $(LIBS)
-sepheaders$(EXEEXT): $(sepheaders_OBJECTS) $(sepheaders_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(sendrecv_OBJECTS) $(sendrecv_LDADD) $(LIBS)
+
+sepheaders$(EXEEXT): $(sepheaders_OBJECTS) $(sepheaders_DEPENDENCIES) $(EXTRA_sepheaders_DEPENDENCIES) 
        @rm -f sepheaders$(EXEEXT)
-       $(LINK) $(sepheaders_LDFLAGS) $(sepheaders_OBJECTS) $(sepheaders_LDADD) $(LIBS)
-simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(sepheaders_OBJECTS) $(sepheaders_LDADD) $(LIBS)
+
+sftpget$(EXEEXT): $(sftpget_OBJECTS) $(sftpget_DEPENDENCIES) $(EXTRA_sftpget_DEPENDENCIES) 
+       @rm -f sftpget$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(sftpget_OBJECTS) $(sftpget_LDADD) $(LIBS)
+
+simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) $(EXTRA_simple_DEPENDENCIES) 
        @rm -f simple$(EXEEXT)
-       $(LINK) $(simple_LDFLAGS) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
-simplepost$(EXEEXT): $(simplepost_OBJECTS) $(simplepost_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
+
+simplepost$(EXEEXT): $(simplepost_OBJECTS) $(simplepost_DEPENDENCIES) $(EXTRA_simplepost_DEPENDENCIES) 
        @rm -f simplepost$(EXEEXT)
-       $(LINK) $(simplepost_LDFLAGS) $(simplepost_OBJECTS) $(simplepost_LDADD) $(LIBS)
-simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(simplepost_OBJECTS) $(simplepost_LDADD) $(LIBS)
+
+simplesmtp$(EXEEXT): $(simplesmtp_OBJECTS) $(simplesmtp_DEPENDENCIES) $(EXTRA_simplesmtp_DEPENDENCIES) 
+       @rm -f simplesmtp$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(simplesmtp_OBJECTS) $(simplesmtp_LDADD) $(LIBS)
+
+simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES) $(EXTRA_simplessl_DEPENDENCIES) 
        @rm -f simplessl$(EXEEXT)
-       $(LINK) $(simplessl_LDFLAGS) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS)
-smtp-multi$(EXEEXT): $(smtp_multi_OBJECTS) $(smtp_multi_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS)
+
+smtp-multi$(EXEEXT): $(smtp_multi_OBJECTS) $(smtp_multi_DEPENDENCIES) $(EXTRA_smtp_multi_DEPENDENCIES) 
        @rm -f smtp-multi$(EXEEXT)
-       $(LINK) $(smtp_multi_LDFLAGS) $(smtp_multi_OBJECTS) $(smtp_multi_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(smtp_multi_OBJECTS) $(smtp_multi_LDADD) $(LIBS)
+
+smtp-tls$(EXEEXT): $(smtp_tls_OBJECTS) $(smtp_tls_DEPENDENCIES) $(EXTRA_smtp_tls_DEPENDENCIES) 
+       @rm -f smtp-tls$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(smtp_tls_OBJECTS) $(smtp_tls_LDADD) $(LIBS)
+
+url2file$(EXEEXT): $(url2file_OBJECTS) $(url2file_DEPENDENCIES) $(EXTRA_url2file_DEPENDENCIES) 
+       @rm -f url2file$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(url2file_OBJECTS) $(url2file_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -599,12 +990,14 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkspeed.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie_interface.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/externalsocket.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileupload.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp-wildcard.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpget.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetinfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetresp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpsget.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpupload.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinmemory.Po@am__quote@
@@ -612,41 +1005,51 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpcustomheader.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/https.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-app.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistant.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3s.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3slist.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/post-callback.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progressfunc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtsp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendrecv.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sepheaders.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpget.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplesmtp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-multi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-tls.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url2file.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -654,82 +1057,85 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -748,16 +1154,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -771,7 +1183,7 @@ distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
 
 dvi: dvi-am
 
@@ -779,18 +1191,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -811,22 +1243,29 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean \
-       clean-checkPROGRAMS clean-generic clean-libtool ctags \
-       distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+       clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+       ctags ctags-am distclean distclean-compile distclean-generic \
        distclean-libtool distclean-tags distdir dvi dvi-am html \
        html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am
+       tags tags-am uninstall uninstall-am
 
 
 # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
+
+all: $(check_PROGRAMS)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 34c1c0f..6752db4 100644 (file)
@@ -4,11 +4,13 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
   https multi-app multi-debugcallback multi-double multi-post multi-single \
   persistant post-callback postit2 sepheaders simple simplepost simplessl  \
   sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
-  smtp-multi
+  smtp-multi simplesmtp smtp-tls rtsp externalsocket resolve \
+  progressfunc pop3s pop3slist imap url2file sftpget ftpsget
 
 # These examples require external dependencies that may not be commonly
 # available on POSIX systems, so don't bother attempting to compile them here.
-COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c       \
+COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c      \
   ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c         \
   opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
-  smooth-gtk-thread.c version-check.pl
+  smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
+  multi-uv.c xmlstream.c usercertinmem.c
index 15750d0..6bfb9fa 100644 (file)
@@ -1,28 +1,62 @@
-#########################################################################
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
-## Makefile for building curl examples with MingW32
-## and optionally OpenSSL (0.9.8), libssh2 (0.18), zlib (1.2.3)
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
+#
+## Makefile for building curl examples with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3)
 ##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [SSPI=1] [IPV6=1] [DYN=1]
+## Usage:   mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
 ##
 ## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.3
+## set ZLIB_PATH=c:/zlib-1.2.8
 ## set ZLIB=1
-##
-#########################################################################
+#
+###########################################################################
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.3
+ZLIB_PATH = ../../../zlib-1.2.8
 endif
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8k
+OPENSSL_PATH = ../../../openssl-0.9.8y
 endif
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2
+LIBSSH2_PATH = ../../../libssh2-1.4.3
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.3
+endif
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.18
+endif
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs
 endif
 # Edit the path below to point to the base of your Novell LDAP NDK.
 ifndef LDAP_SDK
@@ -30,25 +64,108 @@ LDAP_SDK = c:/novell/ndk/cldapsdk/win32
 endif
 
 PROOT = ../..
-ARES_LIB = $(PROOT)/ares
 
-SSL = 1
-ZLIB = 1
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = $(PROOT)/ares
+endif
 
-CC = gcc
-CFLAGS = -g -O2 -Wall
+# Edit the var below to set to your architecture or set environment var.
+ifndef ARCH
+ARCH = w32
+endif
+
+CC     = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
+ifeq ($(ARCH),w64)
+CFLAGS += -D_AMD64_
+endif
 # comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RC = windres
-RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
-RM = del /q /f > NUL 2>&1
-CP = copy
+LDFLAGS        = -s
+RC     = $(CROSSPREFIX)windres
+RCFLAGS        = --include-dir=$(PROOT)/include -O COFF -i
+
+# Platform-dependent helper tool macros
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL    = rm -f $1
+RMDIR  = rm -fr $1
+MKDIR  = mkdir -p $1
+COPY   = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR  = -rsync -aC $1/* $2
+TOUCH  = touch $1
+CAT    = cat
+ECHONL = echo ""
+DL     = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL    = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR  = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL    = -del 2>NUL $(subst /,\,$1)
+RMDIR  = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR  = -md 2>NUL $(subst /,\,$1)
+COPY   = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR  = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH  = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT    = type
+ECHONL = $(ComSpec) /c echo.
+endif
 
 ########################################################
 ## Nothing more to do below this line!
 
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+SPNEGO = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+METALINK = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+SCHANNEL = 1
+SSPI = 1
+endif
+
 INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
-LINK = $(CC) $(LDFLAGS) -o $@
 
 ifdef DYN
   curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
@@ -57,37 +174,67 @@ else
   curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
   curl_LDADD = -L$(PROOT)/lib -lcurl
   CFLAGS += -DCURL_STATICLIB
+  LDFLAGS += -static
 endif
 ifdef ARES
   ifndef DYN
-    curl_DEPENDENCIES += $(ARES_LIB)/libcares.a
+    curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
   endif
   CFLAGS += -DUSE_ARES
-  curl_LDADD += -L$(ARES_LIB) -lcares
+  curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
+endif
+ifdef RTMP
+  CFLAGS += -DUSE_LIBRTMP
+  curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
 endif
 ifdef SSH2
   CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
-  curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
+  curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
 endif
 ifdef SSL
-  INCLUDES += -I"$(OPENSSL_PATH)/outinc"
-  CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
-  ifdef DYN
-    curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
-  else
-    curl_LDADD += -L$(OPENSSL_PATH)/out -lssl -lcrypto -lgdi32
+  ifndef OPENSSL_LIBPATH
+    OPENSSL_LIBS = -lssl -lcrypto
+    ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+      ifdef DYN
+        OPENSSL_LIBS = -lssl32 -leay32
+      endif
+    endif
+    ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+    endif
+  endif
+  ifndef DYN
+    OPENSSL_LIBS += -lgdi32 -lcrypt32
   endif
+  CFLAGS += -DUSE_SSLEAY
+  curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
 endif
 ifdef ZLIB
   INCLUDES += -I"$(ZLIB_PATH)"
   CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
-  curl_LDADD += -L$(ZLIB_PATH) -lz
+  curl_LDADD += -L"$(ZLIB_PATH)" -lz
+endif
+ifdef IDN
+  CFLAGS += -DUSE_LIBIDN
+  curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+  CFLAGS += -DUSE_WIN32_IDN
+  curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
+endif
 endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
+  ifdef SCHANNEL
+    CFLAGS += -DUSE_SCHANNEL
+  endif
+endif
+ifdef SPNEGO
+  CFLAGS += -DHAVE_SPNEGO
 endif
 ifdef IPV6
-  CFLAGS += -DENABLE_IPV6
+  CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
 endif
 ifdef LDAPS
   CFLAGS += -DHAVE_LDAP_SSL
@@ -102,32 +249,34 @@ ifdef USE_LDAP_OPENLDAP
 endif
 ifndef USE_LDAP_NOVELL
 ifndef USE_LDAP_OPENLDAP
-curl_LDADD += -lwldap32
+  curl_LDADD += -lwldap32
 endif
 endif
 curl_LDADD += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
 
 # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
 include Makefile.inc
 
-example_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS += ftpuploadresume.exe synctime.exe
 
-.SUFFIXES: .rc .res .o .exe
+.PRECIOUS: %.o
 
 
-all: $(example_PROGRAMS)
+all: $(check_PROGRAMS)
 
-.o.exe: $(curl_DEPENDENCIES)
-       $(LINK) $< $(curl_LDADD)
+%.exe: %.o $(curl_DEPENDENCIES)
+       $(CC) $(LDFLAGS) -o $@ $< $(curl_LDADD)
 
-.c.o:
-       $(COMPILE) -c $<
+%.o: %.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c $<
 
-.rc.res:
+%.res: %.rc
        $(RC) $(RCFLAGS) $< -o $@
 
 clean:
-       $(RM) $(example_PROGRAMS)
+       @$(call DEL, $(check_PROGRAMS:.exe=.o))
 
+distclean vclean: clean
+       @$(call DEL, $(check_PROGRAMS))
 
diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware
new file mode 100644 (file)
index 0000000..2816cbd
--- /dev/null
@@ -0,0 +1,441 @@
+#################################################################
+#
+## Makefile for building curl.nlm (NetWare version - gnu make)
+## Use: make -f Makefile.netware
+##
+## Comments to: Guenter Knauf http://www.gknw.net/phpbb
+#
+#################################################################
+
+# Edit the path below to point to the base of your Novell NDK.
+ifndef NDKBASE
+NDKBASE        = c:/novell
+endif
+
+# Edit the path below to point to the base of your Zlib sources.
+ifndef ZLIB_PATH
+ZLIB_PATH = ../../../zlib-1.2.8
+endif
+
+# Edit the path below to point to the base of your OpenSSL package.
+ifndef OPENSSL_PATH
+OPENSSL_PATH = ../../../openssl-0.9.8y
+endif
+
+# Edit the path below to point to the base of your LibSSH2 package.
+ifndef LIBSSH2_PATH
+LIBSSH2_PATH = ../../../libssh2-1.4.3
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../../axTLS-1.2.7
+endif
+
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.18
+endif
+
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.3
+endif
+
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = ../../ares
+endif
+
+ifndef INSTDIR
+INSTDIR        = ..$(DS)..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
+endif
+
+# Edit the vars below to change NLM target settings.
+TARGET  = examples
+VERSION        = $(LIBCURL_VERSION)
+COPYR  = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
+DESCR  = cURL ($(LIBARCH))
+MTSAFE = YES
+STACK  = 8192
+SCREEN = Example Program
+# Comment the line below if you dont want to load protected automatically.
+# LDRING = 3
+
+# Uncomment the next line to enable linking with POSIX semantics.
+# POSIXFL = 1
+
+# Edit the var below to point to your lib architecture.
+ifndef LIBARCH
+LIBARCH = LIBC
+endif
+
+# must be equal to NDEBUG or DEBUG, CURLDEBUG
+ifndef DB
+DB     = NDEBUG
+endif
+# Optimization: -O<n> or debugging: -g
+ifeq ($(DB),NDEBUG)
+       OPT     = -O2
+       OBJDIR  = release
+else
+       OPT     = -g
+       OBJDIR  = debug
+endif
+
+# The following lines defines your compiler.
+ifdef CWFolder
+       METROWERKS = $(CWFolder)
+endif
+ifdef METROWERKS
+       # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
+       MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
+       CC = mwccnlm
+else
+       CC = gcc
+endif
+PERL   = perl
+# Here you can find a native Win32 binary of the original awk:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+AWK    = awk
+CP     = cp -afv
+MKDIR  = mkdir
+# RM   = rm -f
+# 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.net/development/prgtools/mkxdc.zip
+MPKXDC = mkxdc
+
+# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
+LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
+
+# Include the version info retrieved from curlver.h
+-include $(OBJDIR)/version.inc
+
+# Global flags for all compilers
+CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
+
+ifeq ($(CC),mwccnlm)
+LD     = mwldnlm
+LDFLAGS        = -nostdlib $< $(PRELUDE) $(LDLIBS) -o $@ -commandfile
+LIBEXT = lib
+CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
+CFLAGS += -relax_pointers
+#CFLAGS        += -w on
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+       PRELUDE = $(NDK_LIBC)/imports/posixpre.o
+else
+       PRELUDE = $(NDK_LIBC)/imports/libcpre.o
+endif
+       CFLAGS += -align 4
+else
+       # PRELUDE = $(NDK_CLIB)/imports/clibpre.o
+       # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+       PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
+       # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
+       CFLAGS += -align 1
+endif
+else
+LD     = nlmconv
+LDFLAGS        = -T
+LIBEXT = a
+CFLAGS += -m32
+CFLAGS  += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS  += -fpcc-struct-return
+endif
+CFLAGS += -Wall # -pedantic
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+       PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o
+else
+       PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o
+endif
+else
+       # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o
+       # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+       # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
+       PRELUDE = $(NDK_ROOT)/pre/prelude.o
+       CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
+endif
+endif
+
+NDK_ROOT = $(NDKBASE)/ndk
+ifndef NDK_CLIB
+NDK_CLIB = $(NDK_ROOT)/nwsdk
+endif
+ifndef NDK_LIBC
+NDK_LIBC = $(NDK_ROOT)/libc
+endif
+ifndef NDK_LDAP
+NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
+endif
+CURL_INC = ../../include
+CURL_LIB = ../../lib
+
+INCLUDES = -I$(CURL_INC)
+
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+WITH_SPNEGO = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
+ifdef LINK_STATIC
+       LDLIBS  = $(CURL_LIB)/libcurl.$(LIBEXT)
+ifdef WITH_ARES
+       LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
+endif
+else
+       MODULES = libcurl.nlm
+       IMPORTS = @$(CURL_LIB)/libcurl.imp
+endif
+ifdef WITH_SSH2
+       # INCLUDES += -I$(LIBSSH2_PATH)/include
+ifdef LINK_STATIC
+       LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
+else
+       MODULES += libssh2.nlm
+       IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
+endif
+endif
+ifdef WITH_RTMP
+       # INCLUDES += -I$(LIBRTMP_PATH)
+ifdef LINK_STATIC
+       LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT)
+endif
+endif
+ifdef WITH_SSL
+       INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+       LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
+       LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
+       IMPORTS += GetProcessSwitchCount RunningProcess
+ifdef WITH_SPNEGO
+       # INCLUDES += -I$(FBOPENSSL_PATH)/include
+       LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT)
+endif
+else
+ifdef WITH_AXTLS
+       INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+       LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+       MODULES += libaxtls.nlm
+       IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+endif
+endif
+ifdef WITH_ZLIB
+       # INCLUDES += -I$(ZLIB_PATH)
+ifdef LINK_STATIC
+       LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
+else
+       MODULES += libz.nlm
+       IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
+endif
+endif
+ifdef WITH_IDN
+       # INCLUDES += -I$(LIBIDN_PATH)/include
+       LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
+endif
+
+ifeq ($(LIBARCH),LIBC)
+       INCLUDES += -I$(NDK_LIBC)/include
+       # INCLUDES += -I$(NDK_LIBC)/include/nks
+       # INCLUDES += -I$(NDK_LIBC)/include/winsock
+       CFLAGS += -D_POSIX_SOURCE
+else
+       INCLUDES += -I$(NDK_CLIB)/include/nlm
+       # INCLUDES += -I$(NDK_CLIB)/include
+endif
+ifndef DISABLE_LDAP
+       # INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc
+endif
+CFLAGS += $(INCLUDES)
+
+ifeq ($(MTSAFE),YES)
+       XDCOPT = -n
+endif
+ifeq ($(MTSAFE),NO)
+       XDCOPT = -u
+endif
+ifdef XDCOPT
+       XDCDATA = $(OBJDIR)/$(TARGET).xdc
+endif
+
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DL     = '
+DS     = /
+PCT    = %
+#-include $(NDKBASE)/nlmconv/ncpfs.inc
+else
+DS     = \\
+PCT    = %%
+endif
+
+# Makefile.inc provides the CSOURCES and HHEADERS defines
+include Makefile.inc
+
+check_PROGRAMS := $(patsubst %,%.nlm,$(strip $(check_PROGRAMS)))
+
+.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
+
+
+all: prebuild $(check_PROGRAMS)
+
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc
+
+$(OBJDIR)/%.o: %.c
+       @echo Compiling $<
+       $(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
+       @echo Creating $@
+       @$(AWK) -f ../../packages/NetWare/get_ver.awk $< > $@
+
+install: $(INSTDIR) all
+       @$(CP) $(check_PROGRAMS) $(INSTDIR)
+
+clean:
+       -$(RM) -r $(OBJDIR)
+
+distclean vclean: clean
+       -$(RM) $(check_PROGRAMS)
+
+$(OBJDIR) $(INSTDIR):
+       @$(MKDIR) $@
+
+%.nlm: $(OBJDIR)/%.o $(OBJDIR)/%.def $(XDCDATA)
+       @echo Linking $@
+       @-$(RM) $@
+       @$(LD) $(LDFLAGS) $(OBJDIR)/$(@:.nlm=.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) $(notdir $(@:.def=)) Example"$(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 "$(DESCR) $(notdir $(@:.def=)) $(SCREEN)"$(DL) >> $@
+else
+       @echo $(DL)screenname "DEFAULT"$(DL) >> $@
+endif
+ifneq ($(DB),NDEBUG)
+       @echo $(DL)debug$(DL) >> $@
+endif
+       @echo $(DL)threadname "_$(notdir $(@:.def=))"$(DL) >> $@
+ifdef XDCDATA
+       @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
+endif
+ifeq ($(LDRING),0)
+       @echo $(DL)flag_on 16$(DL) >> $@
+endif
+ifeq ($(LDRING),3)
+       @echo $(DL)flag_on 512$(DL) >> $@
+endif
+ifeq ($(LIBARCH),CLIB)
+       @echo $(DL)start _Prelude$(DL) >> $@
+       @echo $(DL)exit _Stop$(DL) >> $@
+       @echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@
+       @echo $(DL)module clib$(DL) >> $@
+ifndef DISABLE_LDAP
+       @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
+#      @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
+       @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
+endif
+else
+ifeq ($(POSIXFL),1)
+       @echo $(DL)flag_on 4194304$(DL) >> $@
+endif
+       @echo $(DL)flag_on 64$(DL) >> $@
+       @echo $(DL)pseudopreemption$(DL) >> $@
+ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
+       @echo $(DL)start POSIX_Start$(DL) >> $@
+       @echo $(DL)exit POSIX_Stop$(DL) >> $@
+       @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
+else
+       @echo $(DL)start _LibCPrelude$(DL) >> $@
+       @echo $(DL)exit _LibCPostlude$(DL) >> $@
+       @echo $(DL)check _LibCCheckUnload$(DL) >> $@
+endif
+       @echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@
+       @echo $(DL)module libc$(DL) >> $@
+ifndef DISABLE_LDAP
+       @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
+       @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
+#      @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
+       @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
+endif
+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 ($(findstring nlmconv,$(LD)),nlmconv)
+       @echo $(DL)input $(PRELUDE)$(DL) >> $@
+       @echo $(DL)input $(@:.def=.o)$(DL) >> $@
+ifdef LDLIBS
+       @echo $(DL)input $(LDLIBS)$(DL) >> $@
+endif
+       @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
+endif
index d6c4785..1ca62a1 100644 (file)
@@ -55,14 +55,18 @@ htmltitle.cc   - download a HTML file and extract the <title> tag from a HTML
 http-post.c    - HTTP POST
 httpput.c      - HTTP PUT a local file
 https.c        - simple HTTPS transfer
+imap.c         - simple IMAP transfer
 multi-app.c    - a multi-interface app
 multi-debugcallback.c - a multi-interface app using the debug callback
 multi-double.c - a multi-interface app doing two simultaneous transfers
 multi-post.c   - a multi-interface app doing a multipart formpost
 multi-single.c - a multi-interface app getting a single file
+multi-uv.c     - a multi-interface app using libuv
 multithread.c  - an example using multi-treading transferring multiple files
 opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
 persistant.c   - request two URLs with a persistent connection
+pop3s.c        - POP3S transfer
+pop3slist.c    - POP3S LIST
 post-callback.c - send a HTTP POST using a callback
 postit2.c      - send a HTTP multipart formpost
 sampleconv.c   - showing how a program on a non-ASCII platform would invoke
@@ -73,4 +77,6 @@ simple.c       - the most simple download a URL source
 simplepost.c   - HTTP POST
 simplessl.c    - HTTPS example with certificates many options set
 synctime.c     - Sync local time by extracting date from remote HTTP servers
+url2file.c     - download a document and store it in a file
+xmlstream.c    - Stream-parse a document using the streaming Expat parser
 10-at-a-time.c - Download many files simultaneously, 10 at a time.
index cec9fed..b89dca2 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <fcntl.h>
 #ifdef WIN32
@@ -14,7 +26,8 @@
 #else
 #  ifdef __VMS
      typedef int intptr_t;
-#  else
+#  endif
+#  if !defined(_AIX) && !defined(__sgi) && !defined(__osf__)
 #    include <stdint.h>
 #  endif
 #  include <unistd.h>
 #define TRUE 1
 #endif
 
+#if defined(_AIX) || defined(__sgi) || defined(__osf__)
+#ifndef intptr_t
+#define intptr_t long
+#endif
+#endif
+
 /*
  * This example shows a HTTP PUT operation with authentiction using "any"
  * type. It PUTs a file given as a command line argument to the URL also given
@@ -77,12 +96,16 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t retcode;
+  curl_off_t nread;
 
   intptr_t fd = (intptr_t)stream;
 
   retcode = read(fd, ptr, size * nmemb);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  nread = (curl_off_t)retcode;
+
+  fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+          " bytes from file\n", nread);
 
   return retcode;
 }
@@ -147,6 +170,10 @@ int main(int argc, char **argv)
 
     /* Now run off and do what you've been told! */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
diff --git a/docs/examples/asiohiper.cpp b/docs/examples/asiohiper.cpp
new file mode 100644 (file)
index 0000000..44836fd
--- /dev/null
@@ -0,0 +1,454 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * file: asiohiper.cpp
+ * Example program to demonstrate the use of multi socket interface
+ * with boost::asio
+ *
+ * This program is in c++ and uses boost::asio instead of libevent/libev.
+ * Requires boost::asio, boost::bind and boost::system
+ *
+ * This is an adaptation of libcurl's "hiperfifo.c" and "evhiperfifo.c"
+ * sample programs. This example implements a subset of the functionality from
+ * hiperfifo.c, for full functionality refer hiperfifo.c or evhiperfifo.c
+ *
+ * Written by Lijo Antony based on hiperfifo.c by Jeff Pohlmeyer
+ *
+ * When running, the program creates an easy handle for a URL and
+ * uses the curl_multi API to fetch it.
+ *
+ * Note:
+ *  For the sake of simplicity, URL is hard coded to "www.google.com"
+ *
+ * This is purely a demo app, all retrieved data is simply discarded by the write
+ * callback.
+ */
+
+
+#include <curl/curl.h>
+#include <boost/asio.hpp>
+#include <boost/bind.hpp>
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+/* boost::asio related objects
+ * using global variables for simplicity
+ */
+boost::asio::io_service io_service;
+boost::asio::deadline_timer timer(io_service);
+std::map<curl_socket_t, boost::asio::ip::tcp::socket *> socket_map;
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+  CURLM *multi;
+  int still_running;
+} GlobalInfo;
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+  CURL *easy;
+  char *url;
+  GlobalInfo *global;
+  char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g);
+
+/* Update the event timer after curl_multi library calls */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+  fprintf(MSG_OUT, "\nmulti_timer_cb: timeout_ms %ld", timeout_ms);
+
+  /* cancel running timer */
+  timer.cancel();
+
+  if ( timeout_ms > 0 )
+  {
+    /* update timer */
+    timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
+    timer.async_wait(boost::bind(&timer_cb, _1, g));
+  }
+  else
+  {
+    /* call timeout function immediately */
+    boost::system::error_code error; /*success*/
+    timer_cb(error, g);
+  }
+
+  return 0;
+}
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+  if ( CURLM_OK != code )
+  {
+    const char *s;
+    switch ( code )
+    {
+    case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
+    case CURLM_BAD_HANDLE:         s="CURLM_BAD_HANDLE";         break;
+    case CURLM_BAD_EASY_HANDLE:    s="CURLM_BAD_EASY_HANDLE";    break;
+    case CURLM_OUT_OF_MEMORY:      s="CURLM_OUT_OF_MEMORY";      break;
+    case CURLM_INTERNAL_ERROR:     s="CURLM_INTERNAL_ERROR";     break;
+    case CURLM_UNKNOWN_OPTION:     s="CURLM_UNKNOWN_OPTION";     break;
+    case CURLM_LAST:               s="CURLM_LAST";               break;
+    default: s="CURLM_unknown";
+      break;
+    case     CURLM_BAD_SOCKET:         s="CURLM_BAD_SOCKET";
+      fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
+      /* ignore this error */
+      return;
+    }
+    fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
+    exit(code);
+  }
+}
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+  char *eff_url;
+  CURLMsg *msg;
+  int msgs_left;
+  ConnInfo *conn;
+  CURL *easy;
+  CURLcode res;
+
+  fprintf(MSG_OUT, "\nREMAINING: %d", g->still_running);
+
+  while ((msg = curl_multi_info_read(g->multi, &msgs_left)))
+  {
+    if (msg->msg == CURLMSG_DONE)
+    {
+      easy = msg->easy_handle;
+      res = msg->data.result;
+      curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+      curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+      fprintf(MSG_OUT, "\nDONE: %s => (%d) %s", eff_url, res, conn->error);
+      curl_multi_remove_handle(g->multi, easy);
+      free(conn->url);
+      curl_easy_cleanup(easy);
+      free(conn);
+    }
+  }
+}
+
+/* Called by asio when there is an action on a socket */
+static void event_cb(GlobalInfo * g, boost::asio::ip::tcp::socket * tcp_socket, int action)
+{
+  fprintf(MSG_OUT, "\nevent_cb: action=%d", action);
+
+  CURLMcode rc;
+  rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action, &g->still_running);
+
+  mcode_or_die("event_cb: curl_multi_socket_action", rc);
+  check_multi_info(g);
+
+  if ( g->still_running <= 0 )
+  {
+    fprintf(MSG_OUT, "\nlast transfer done, kill timeout");
+    timer.cancel();
+  }
+}
+
+/* Called by asio when our timeout expires */
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g)
+{
+  if ( !error)
+  {
+    fprintf(MSG_OUT, "\ntimer_cb: ");
+
+    CURLMcode rc;
+    rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+
+    mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+    check_multi_info(g);
+  }
+}
+
+/* Clean up any data */
+static void remsock(int *f, GlobalInfo *g)
+{
+  fprintf(MSG_OUT, "\nremsock: ");
+
+  if ( f )
+  {
+    free(f);
+  }
+}
+
+static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
+{
+  fprintf(MSG_OUT, "\nsetsock: socket=%d, act=%d, fdp=%p", s, act, fdp);
+
+  std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(s);
+
+  if ( it == socket_map.end() )
+  {
+    fprintf(MSG_OUT, "\nsocket %d is a c-ares socket, ignoring", s);
+    return;
+  }
+
+  boost::asio::ip::tcp::socket * tcp_socket = it->second;
+
+  *fdp = act;
+
+  if ( act == CURL_POLL_IN )
+  {
+    fprintf(MSG_OUT, "\nwatching for socket to become readable");
+
+    tcp_socket->async_read_some(boost::asio::null_buffers(),
+                             boost::bind(&event_cb, g,
+                               tcp_socket,
+                               act));
+  }
+  else if ( act == CURL_POLL_OUT )
+  {
+    fprintf(MSG_OUT, "\nwatching for socket to become writable");
+
+    tcp_socket->async_write_some(boost::asio::null_buffers(),
+                              boost::bind(&event_cb, g,
+                                tcp_socket,
+                                act));
+  }
+  else if ( act == CURL_POLL_INOUT )
+  {
+    fprintf(MSG_OUT, "\nwatching for socket to become readable & writable");
+
+    tcp_socket->async_read_some(boost::asio::null_buffers(),
+                             boost::bind(&event_cb, g,
+                               tcp_socket,
+                               act));
+
+    tcp_socket->async_write_some(boost::asio::null_buffers(),
+                              boost::bind(&event_cb, g,
+                                tcp_socket,
+                                act));
+  }
+}
+
+
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+  int *fdp = (int *)calloc(sizeof(int), 1); /* fdp is used to store current action */
+
+  setsock(fdp, s, easy, action, g);
+  curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+  fprintf(MSG_OUT, "\nsock_cb: socket=%d, what=%d, sockp=%p", s, what, sockp);
+
+  GlobalInfo *g = (GlobalInfo*) cbp;
+  int *actionp = (int*) sockp;
+  const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE"};
+
+  fprintf(MSG_OUT,
+          "\nsocket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+
+  if ( what == CURL_POLL_REMOVE )
+  {
+    fprintf(MSG_OUT, "\n");
+    remsock(actionp, g);
+  }
+  else
+  {
+    if ( !actionp )
+    {
+      fprintf(MSG_OUT, "\nAdding data: %s", whatstr[what]);
+      addsock(s, e, what, g);
+    }
+    else
+    {
+      fprintf(MSG_OUT,
+              "\nChanging action from %s to %s",
+              whatstr[*actionp], whatstr[what]);
+      setsock(actionp, s, e, what, g);
+    }
+  }
+  return 0;
+}
+
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+
+  size_t written = size * nmemb;
+  char* pBuffer = (char*)malloc(written + 1);
+
+  strncpy(pBuffer, (const char *)ptr, written);
+  pBuffer [written] = '\0';
+
+  fprintf(MSG_OUT, "%s", pBuffer);
+
+  free(pBuffer);
+
+  return written;
+}
+
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb (void *p, double dltotal, double dlnow, double ult,
+                    double uln)
+{
+  ConnInfo *conn = (ConnInfo *)p;
+  (void)ult;
+  (void)uln;
+
+  fprintf(MSG_OUT, "\nProgress: %s (%g/%g)", conn->url, dlnow, dltotal);
+  fprintf(MSG_OUT, "\nProgress: %s (%g)", conn->url, ult);
+
+  return 0;
+}
+
+/* CURLOPT_OPENSOCKETFUNCTION */
+static curl_socket_t opensocket(void *clientp,
+                                curlsocktype purpose,
+                                struct curl_sockaddr *address)
+{
+  fprintf(MSG_OUT, "\nopensocket :");
+
+  curl_socket_t sockfd = CURL_SOCKET_BAD;
+
+  /* restrict to ipv4 */
+  if (purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET)
+  {
+    /* create a tcp socket object */
+    boost::asio::ip::tcp::socket *tcp_socket = new boost::asio::ip::tcp::socket(io_service);
+
+    /* open it and get the native handle*/
+    boost::system::error_code ec;
+    tcp_socket->open(boost::asio::ip::tcp::v4(), ec);
+
+    if (ec)
+    {
+      //An error occurred
+      std::cout << std::endl << "Couldn't open socket [" << ec << "][" << ec.message() << "]";
+      fprintf(MSG_OUT, "\nERROR: Returning CURL_SOCKET_BAD to signal error");
+    }
+    else
+    {
+      sockfd = tcp_socket->native_handle();
+      fprintf(MSG_OUT, "\nOpened socket %d", sockfd);
+
+      /* save it for monitoring */
+      socket_map.insert(std::pair<curl_socket_t, boost::asio::ip::tcp::socket *>(sockfd, tcp_socket));
+    }
+  }
+
+  return sockfd;
+}
+
+/* CURLOPT_CLOSESOCKETFUNCTION */
+static int closesocket(void *clientp, curl_socket_t item)
+{
+  fprintf(MSG_OUT, "\nclosesocket : %d", item);
+
+  std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(item);
+
+  if ( it != socket_map.end() )
+  {
+    delete it->second;
+    socket_map.erase(it);
+  }
+
+  return 0;
+}
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g )
+{
+  ConnInfo *conn;
+  CURLMcode rc;
+
+  conn = (ConnInfo *)calloc(1, sizeof(ConnInfo));
+  memset(conn, 0, sizeof(ConnInfo));
+  conn->error[0]='\0';
+
+  conn->easy = curl_easy_init();
+
+  if ( !conn->easy )
+  {
+    fprintf(MSG_OUT, "\ncurl_easy_init() failed, exiting!");
+    exit(2);
+  }
+  conn->global = g;
+  conn->url = strdup(url);
+  curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+  curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+  curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+  curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+  curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+  curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 1L);
+  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+  curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+  curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+
+  /* call this function to get a socket */
+  curl_easy_setopt(conn->easy, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+
+  /* call this function to close a socket */
+  curl_easy_setopt(conn->easy, CURLOPT_CLOSESOCKETFUNCTION, closesocket);
+
+  fprintf(MSG_OUT,
+          "\nAdding easy %p to multi %p (%s)", conn->easy, g->multi, url);
+  rc = curl_multi_add_handle(g->multi, conn->easy);
+  mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+  /* note that the add_handle() will set a time-out to trigger very soon so
+     that the necessary socket_action() call will be called by this app */
+}
+
+int main(int argc, char **argv)
+{
+  GlobalInfo g;
+  CURLMcode rc;
+  (void)argc;
+  (void)argv;
+
+  memset(&g, 0, sizeof(GlobalInfo));
+  g.multi = curl_multi_init();
+
+  curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+  curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+  curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+  curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+  new_conn((char *)"www.google.com", &g);  /* add a URL */
+
+  /* enter io_service run loop */
+  io_service.run();
+
+  curl_multi_cleanup(g.multi);
+
+  fprintf(MSG_OUT, "\ndone.\n");
+  return 0;
+}
index 3870295..051afbc 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example using a "in core" PEM certificate to retrieve a https page.
+ * 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.
+ *
+ ***************************************************************************/
+/* Example using a "in core" PEM certificate to retrieve a https page.
  * Written by Theo Borm
  */
 
index ceb0ac2..ac0109b 100644 (file)
@@ -1,17 +1,36 @@
-/*****************************************************************************
- */
-
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 static size_t wrfu(void *ptr,  size_t  size,  size_t  nmemb,  void *stream)
 {
+  (void)stream;
+  (void)ptr;
   return size * nmemb;
 }
-int main(int argc, char **argv)
+
+int main(void)
 {
   CURL *curl;
   CURLcode res;
@@ -33,18 +52,24 @@ int main(int argc, char **argv)
     res = curl_easy_perform(curl);
 
     if(!res) {
-      struct curl_certinfo *ci = NULL;
+      union {
+        struct curl_slist    *to_info;
+        struct curl_certinfo *to_certinfo;
+      } ptr;
+
+      ptr.to_info = NULL;
 
-      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ptr.to_info);
 
-      if(!res && ci) {
+      if(!res && ptr.to_info) {
         int i;
-        printf("%d certs!\n", ci->num_of_certs);
 
-        for(i=0; i<ci->num_of_certs; i++) {
+        printf("%d certs!\n", ptr.to_certinfo->num_of_certs);
+
+        for(i = 0; i < ptr.to_certinfo->num_of_certs; i++) {
           struct curl_slist *slist;
 
-          for(slist = ci->certinfo[i]; slist; slist = slist->next)
+          for(slist = ptr.to_certinfo->certinfo[i]; slist; slist = slist->next)
             printf("%s\n", slist->data);
 
         }
@@ -52,7 +77,6 @@ int main(int argc, char **argv)
 
     }
 
-
     curl_easy_cleanup(curl);
   }
 
index 00db5bf..31949b8 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example source code to show how the callback function can be used to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
  * download data into a chunk of memory instead of storing it in a file.
  * After successful download we use curl_easy_getinfo() calls to get the
  * amount of downloaded bytes, the time used for the whole download, and
@@ -22,8 +35,6 @@
 #include <time.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 #define URL_BASE "http://speedtest.your.domain/"
 #define URL_1M   URL_BASE "file_1M.bin"
@@ -49,7 +60,7 @@ int main(int argc, char *argv[])
 {
   CURL *curl_handle;
   CURLcode res;
-  int prtsep = 0, prttime = 0;
+  int prtall = 0, prtsep = 0, prttime = 0;
   const char *url = URL_1M;
   char *appname = argv[0];
 
@@ -66,12 +77,14 @@ int main(int argc, char *argv[])
           fprintf(stderr, "\r%s %s - %s\n",
                   appname, CHKSPEED_VERSION, curl_version());
           exit(1);
+        } else if (strncasecmp(*argv, "-A", 2) == 0) {
+          prtall = 1;
         } else if (strncasecmp(*argv, "-X", 2) == 0) {
           prtsep = 1;
         } else if (strncasecmp(*argv, "-T", 2) == 0) {
           prttime = 1;
         } else if (strncasecmp(*argv, "-M=", 3) == 0) {
-          long m = strtol(argv+3, NULL, 10);
+          long m = strtol((*argv)+3, NULL, 10);
           switch(m) {
             case   1: url = URL_1M;
                       break;
@@ -150,6 +163,18 @@ int main(int argc, char *argv[])
     if((CURLE_OK == res) && (val>0))
       printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
 
+    if (prtall) {
+      /* check for name resolution time */
+      res = curl_easy_getinfo(curl_handle, CURLINFO_NAMELOOKUP_TIME, &val);
+      if((CURLE_OK == res) && (val>0))
+        printf("Name lookup time: %0.3f sec.\n", val);
+
+      /* check for connect time */
+      res = curl_easy_getinfo(curl_handle, CURLINFO_CONNECT_TIME, &val);
+      if((CURLE_OK == res) && (val>0))
+        printf("Connect time: %0.3f sec.\n", val);
+    }
+
   } else {
     fprintf(stderr, "Error while fetching '%s' : %s\n",
             url, curl_easy_strerror(res));
index 9f1e629..2e7c66d 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- *  This example shows usage of simple cookie interface.
- */
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+/* This example shows usage of simple cookie interface. */
 
 #include <stdio.h>
 #include <string.h>
@@ -76,7 +89,7 @@ main(void)
 #endif
     /* Netscape format cookie */
     snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
-      ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
+      ".google.com", "TRUE", "/", "FALSE", (unsigned long)time(NULL) + 31337UL, "PREF", "hello google, i like you very much!");
     res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
     if (res != CURLE_OK) {
       fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", curl_easy_strerror(res));
index 2c44280..8cb9914 100644 (file)
@@ -13,8 +13,6 @@
 #include <gtk/gtk.h>
 
 #include <curl/curl.h>
-#include <curl/types.h> /* new for v7 */
-#include <curl/easy.h> /* new for v7 */
 
 GtkWidget *Bar;
 
index 62bdfe4..89d5f40 100644 (file)
@@ -239,8 +239,7 @@ static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm) {
   SSL_CTX_set_cipher_list(ctx,"RC4-MD5");
   SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
 
-  X509_STORE_add_cert(ctx->cert_store,sk_X509_value(p->ca,
-                                                    sk_X509_num(p->ca)-1));
+  X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), sk_X509_value(p->ca, sk_X509_num(p->ca)-1));
 
   SSL_CTX_set_verify_depth(ctx,2);
 
index cc68481..36dd80d 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 <stdio.h>
 #include <curl/curl.h>
 
@@ -28,12 +40,12 @@ void dump(const char *text,
     /* without the hex output, we can fit more on screen */
     width = 0x40;
 
-  fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+  fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
           text, (long)size, (long)size);
 
   for(i=0; i<size; i+= width) {
 
-    fprintf(stream, "%04.4lx: ", (long)i);
+    fprintf(stream, "%4.4lx: ", (long)i);
 
     if(!nohex) {
       /* hex not disabled, show it */
@@ -118,8 +130,15 @@ int main(void)
     /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
+    /* example.com is redirected, so we tell libcurl to follow redirection */
+    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
     curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 6cdccf8..c2e87fc 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example application source code using the multi socket interface to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
  * download many files at once.
  *
  * This example features the same basic functionality as hiperfifo.c does,
@@ -323,7 +336,7 @@ static void new_conn(char *url, GlobalInfo *g )
   conn->url = strdup(url);
   curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
   curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
-  curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+  curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
   curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
   curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
   curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
@@ -367,7 +380,7 @@ static int init_fifo (GlobalInfo *g)
 {
   struct stat st;
   static const char *fifo = "hiper.fifo";
-  int sockfd;
+  curl_socket_t sockfd;
 
   fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
   if ( lstat (fifo, &st) == 0 )
diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c
new file mode 100644 (file)
index 0000000..1b326c8
--- /dev/null
@@ -0,0 +1,153 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+/*
+ * This is an example demonstrating how an application can pass in a custom
+ * socket to libcurl to use. This example also handles the connect itself.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <curl/curl.h>
+
+#ifdef WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define close closesocket
+#else
+#include <sys/types.h>        /*  socket types              */
+#include <sys/socket.h>       /*  socket definitions        */
+#include <netinet/in.h>
+#include <arpa/inet.h>        /*  inet (3) funtions         */
+#include <unistd.h>           /*  misc. UNIX functions      */
+#endif
+
+#include <errno.h>
+
+/* The IP address and port number to connect to */
+#define IPADDR "127.0.0.1"
+#define PORTNUM 80
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+  int written = fwrite(ptr, size, nmemb, (FILE *)stream);
+  return written;
+}
+
+static curl_socket_t opensocket(void *clientp,
+                                curlsocktype purpose,
+                                struct curl_sockaddr *address)
+{
+  curl_socket_t sockfd;
+  (void)purpose;
+  (void)address;
+  sockfd = *(curl_socket_t *)clientp;
+  /* the actual externally set socket is passed in via the OPENSOCKETDATA
+     option */
+  return sockfd;
+}
+
+static int sockopt_callback(void *clientp, curl_socket_t curlfd,
+                            curlsocktype purpose)
+{
+  (void)clientp;
+  (void)curlfd;
+  (void)purpose;
+  /* This return code was added in libcurl 7.21.5 */
+  return CURL_SOCKOPT_ALREADY_CONNECTED;
+}
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+  struct sockaddr_in servaddr;  /*  socket address structure  */
+  curl_socket_t sockfd;
+
+#ifdef WIN32
+  WSADATA wsaData;
+  int initwsa;
+
+  if((initwsa = WSAStartup(MAKEWORD(2,0), &wsaData)) != 0) {
+    printf("WSAStartup failed: %d\n", initwsa);
+    return 1;
+  }
+#endif
+
+  curl = curl_easy_init();
+  if(curl) {
+    /*
+     * Note that libcurl will internally think that you connect to the host
+     * and port that you specify in the URL option.
+     */
+    curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999");
+
+    /* Create the socket "manually" */
+    if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == CURL_SOCKET_BAD ) {
+      printf("Error creating listening socket.\n");
+      return 3;
+    }
+
+    memset(&servaddr, 0, sizeof(servaddr));
+    servaddr.sin_family = AF_INET;
+    servaddr.sin_port   = htons(PORTNUM);
+
+    if (INADDR_NONE == (servaddr.sin_addr.s_addr = inet_addr(IPADDR)))
+      return 2;
+
+    if(connect(sockfd,(struct sockaddr *) &servaddr, sizeof(servaddr)) ==
+       -1) {
+      close(sockfd);
+      printf("client error: connect: %s\n", strerror(errno));
+      return 1;
+    }
+
+    /* no progress meter please */
+    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+
+    /* send all data to this function  */
+    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
+
+    /* call this function to get a socket */
+    curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+    curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
+
+    /* call this function to set options for the socket */
+    curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+
+    res = curl_easy_perform(curl);
+
+    curl_easy_cleanup(curl);
+
+    if(res) {
+      printf("libcurl error: %d\n", res);
+      return 4;
+    }
+  }
+  return 0;
+}
index cdec751..665eca0 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <curl/curl.h>
 #include <sys/stat.h>
@@ -52,14 +64,21 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK) {
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
-    /* now extract transfer info */
-    curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
-    curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
+    }
+    else {
+      /* now extract transfer info */
+      curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
+      curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
 
-    fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
-            speed_upload, total_time);
+      fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
+              speed_upload, total_time);
 
+    }
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
index e4505bf..6fe5c0f 100644 (file)
@@ -68,8 +68,8 @@ struct fcurl_data
   } handle;                   /* handle */
 
   char *buffer;               /* buffer to store cached data*/
-  int buffer_len;             /* currently allocated buffers length */
-  int buffer_pos;             /* end of data in buffer*/
+  size_t buffer_len;          /* currently allocated buffers length */
+  size_t buffer_pos;          /* end of data in buffer*/
   int still_running;          /* Is background url fetch still in progress */
 };
 
@@ -80,7 +80,7 @@ URL_FILE *url_fopen(const char *url,const char *operation);
 int url_fclose(URL_FILE *file);
 int url_feof(URL_FILE *file);
 size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
-char * url_fgets(char *ptr, int size, URL_FILE *file);
+char * url_fgets(char *ptr, size_t size, URL_FILE *file);
 void url_rewind(URL_FILE *file);
 
 /* we use a global one for convenience */
@@ -93,7 +93,7 @@ static size_t write_callback(char *buffer,
                              void *userp)
 {
   char *newbuff;
-  int rembuff;
+  size_t rembuff;
 
   URL_FILE *url = (URL_FILE *)userp;
   size *= nitems;
@@ -121,7 +121,7 @@ static size_t write_callback(char *buffer,
 }
 
 /* use to attempt to fill the read buffer up to requested number of bytes */
-static int fill_buffer(URL_FILE *file,int want,int waittime)
+static int fill_buffer(URL_FILE *file, size_t want)
 {
   fd_set fdread;
   fd_set fdwrite;
@@ -323,7 +323,7 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
   case CFTYPE_CURL:
     want = nmemb * size;
 
-    fill_buffer(file,want,1);
+    fill_buffer(file,want);
 
     /* check if theres data in the buffer - if not fill_buffer()
      * either errored or EOF */
@@ -351,10 +351,10 @@ size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
   return want;
 }
 
-char *url_fgets(char *ptr, int size, URL_FILE *file)
+char *url_fgets(char *ptr, size_t size, URL_FILE *file)
 {
-  int want = size - 1;/* always need to leave room for zero termination */
-  int loop;
+  size_t want = size - 1;/* always need to leave room for zero termination */
+  size_t loop;
 
   switch(file->type) {
   case CFTYPE_FILE:
@@ -362,7 +362,7 @@ char *url_fgets(char *ptr, int size, URL_FILE *file)
     break;
 
   case CFTYPE_CURL:
-    fill_buffer(file,want,1);
+    fill_buffer(file,want);
 
     /* check if theres data in the buffer - if not fill either errored or
      * EOF */
index 0186a38..5a2a103 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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>
 #include <stdio.h>
 
@@ -21,7 +33,7 @@ static long file_is_comming(struct curl_fileinfo *finfo,
 static long file_is_downloaded(struct callback_data *data);
 
 static size_t write_it(char *buff, size_t size, size_t nmemb,
-                       struct callback_data *data);
+                       void *cb_data);
 
 int main(int argc, char **argv)
 {
@@ -123,8 +135,9 @@ static long file_is_downloaded(struct callback_data *data)
 }
 
 static size_t write_it(char *buff, size_t size, size_t nmemb,
-                       struct callback_data *data)
+                       void *cb_data)
 {
+  struct callback_data *data = cb_data;
   size_t written = 0;
   if(data->output)
     written = fwrite(buff, size, nmemb, data->output);
index 3c3888a..bcb42bb 100644 (file)
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 /*
  * This is an example showing how to get a single file from an FTP server.
index c4e234f..dfdcf78 100644 (file)
@@ -1,18 +1,28 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <string.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 /*
  * This is an example showing how to check a single file's size and mtime
@@ -21,6 +31,8 @@
 
 static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
 {
+  (void)ptr;
+  (void)data;
   /* we are not interested in the headers itself,
      so we only return the size we would have saved ... */
   return (size_t)(size * nmemb);
@@ -31,8 +43,8 @@ int main(void)
   char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
   CURL *curl;
   CURLcode res;
-  const time_t filetime;
-  const double filesize;
+  long filetime = -1;
+  double filesize = 0.0;
   const char *filename = strrchr(ftpurl, '/') + 1;
 
   curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -55,10 +67,12 @@ int main(void)
     if(CURLE_OK == res) {
       /* http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
       res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-      if((CURLE_OK == res) && filetime)
-        printf("filetime %s: %s", filename, ctime(&filetime));
+      if((CURLE_OK == res) && (filetime >= 0)) {
+        time_t file_time = (time_t)filetime;
+        printf("filetime %s: %s", filename, ctime(&file_time));
+      }
       res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
-      if((CURLE_OK == res) && filesize)
+      if((CURLE_OK == res) && (filesize>0.0))
         printf("filesize %s: %0.0f bytes\n", filename, filesize);
     } else {
       /* we failed */
index 2122c4f..db96a3a 100644 (file)
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 /*
  * Similar to ftpget.c but this also stores the received response-lines
@@ -27,7 +37,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data)
   return fwrite(ptr, size, nmemb, writehere);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *curl;
   CURLcode res;
@@ -50,6 +60,10 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
     curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c
new file mode 100644 (file)
index 0000000..0cfe320
--- /dev/null
@@ -0,0 +1,101 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
+
+#include <curl/curl.h>
+
+/*
+ * This is an example showing how to get a single file from an FTPS server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+  const char *filename;
+  FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+                        void *stream)
+{
+  struct FtpFile *out=(struct FtpFile *)stream;
+  if(out && !out->stream) {
+    /* open file for writing */
+    out->stream=fopen(out->filename, "wb");
+    if(!out->stream)
+      return -1; /* failure, can't open file to write */
+  }
+  return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+  struct FtpFile ftpfile={
+    "yourfile.bin", /* name to store the file as if succesful */
+    NULL
+  };
+
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+
+  curl = curl_easy_init();
+  if(curl) {
+    /*
+     * You better replace the URL with one that works! Note that we use an
+     * FTP:// URL with standard explicit FTPS. You can also do FTPS:// URLs if
+     * you want to do the rarer kind of transfers: implicit.
+     */
+    curl_easy_setopt(curl, CURLOPT_URL,
+                     "ftp://user@server/home/user/file.txt");
+    /* Define our callback to get called when there's data to be written */
+    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+    /* Set a pointer to our struct to pass to the callback */
+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+    /* We activate SSL and we require it for both control and data */
+    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+
+    /* Switch on full protocol/debug output */
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+    res = curl_easy_perform(curl);
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+
+    if(CURLE_OK != res) {
+      /* we failed */
+      fprintf(stderr, "curl told us %d\n", res);
+    }
+  }
+
+  if(ftpfile.stream)
+    fclose(ftpfile.stream); /* close the local file */
+
+  curl_global_cleanup();
+
+  return 0;
+}
index f1f66c0..e79f8d8 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <string.h>
 
    variable's memory when passed in to it from an app like this. */
 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 {
+  curl_off_t nread;
   /* in real-world cases, this would probably get this data differently
      as this fread() stuff is exactly what the library already would do
      by default internally */
   size_t retcode = fread(ptr, size, nmemb, stream);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  nread = (curl_off_t)retcode;
+
+  fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+          " bytes from file\n", nread);
   return retcode;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *curl;
   CURLcode res;
@@ -106,6 +122,10 @@ int main(int argc, char **argv)
 
     /* Now run off and do what you've been told! */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* clean up the FTP commands list */
     curl_slist_free_all (headerlist);
index 81a790a..55b8986 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Upload to FTP, resuming failed transfers
+ * 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.
+ *
+ ***************************************************************************/
+/* Upload to FTP, resuming failed transfers
  *
  * Compile for MinGW like this:
  *  gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
@@ -26,7 +39,7 @@
 
 /* The MinGW headers are missing a few Win32 function definitions,
    you shouldn't need this if you use VC++ */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64__)
 int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
 #endif
 
index 0d8f1f2..acbe1e1 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <curl/curl.h>
 
index 635a936..8e31e8f 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example source code to show how the callback function can be used to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
  * download data into a chunk of memory instead of storing it in a file.
  */
 
@@ -23,19 +36,19 @@ struct MemoryStruct {
 
 
 static size_t
-WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
 {
   size_t realsize = size * nmemb;
-  struct MemoryStruct *mem = (struct MemoryStruct *)data;
+  struct MemoryStruct *mem = (struct MemoryStruct *)userp;
 
   mem->memory = realloc(mem->memory, mem->size + realsize + 1);
-  if (mem->memory == NULL) {
+  if(mem->memory == NULL) {
     /* out of memory! */
     printf("not enough memory (realloc returned NULL)\n");
-    exit(EXIT_FAILURE);
+    return 0;
   }
 
-  memcpy(&(mem->memory[mem->size]), ptr, realsize);
+  memcpy(&(mem->memory[mem->size]), contents, realsize);
   mem->size += realsize;
   mem->memory[mem->size] = 0;
 
@@ -43,9 +56,10 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
 }
 
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *curl_handle;
+  CURLcode res;
 
   struct MemoryStruct chunk;
 
@@ -71,24 +85,31 @@ int main(int argc, char **argv)
   curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
 
   /* get it! */
-  curl_easy_perform(curl_handle);
+  res = curl_easy_perform(curl_handle);
+
+  /* check for errors */
+  if(res != CURLE_OK) {
+    fprintf(stderr, "curl_easy_perform() failed: %s\n",
+            curl_easy_strerror(res));
+  }
+  else {
+    /*
+     * Now, our chunk.memory points to a memory block that is chunk.size
+     * bytes big and contains the remote file.
+     *
+     * Do something nice with it!
+     *
+     * You should be aware of the fact that at this point we might have an
+     * allocated data block, and nothing has yet deallocated that data. So when
+     * you're done with it, you should free() it as a nice application.
+     */
+
+    printf("%lu bytes retrieved\n", (long)chunk.size);
+  }
 
   /* cleanup curl stuff */
   curl_easy_cleanup(curl_handle);
 
-  /*
-   * Now, our chunk.memory points to a memory block that is chunk.size
-   * bytes big and contains the remote file.
-   *
-   * Do something nice with it!
-   *
-   * You should be aware of the fact that at this point we might have an
-   * allocated data block, and nothing has yet deallocated that data. So when
-   * you're done with it, you should free() it as a nice application.
-   */
-
-  printf("%lu bytes retrieved\n", chunk.size);
-
   if(chunk.memory)
     free(chunk.memory);
 
index ac11790..9a3f46d 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example application source code using the multi socket interface to
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
  * download many files at once.
  *
  * Written by Jeff Pohlmeyer
index c909687..4c4e223 100644 (file)
@@ -1,17 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example application source code using the multi socket interface to
- * download many files at once.
+ * 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.
  *
- * Written by Jeff Pohlmeyer
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
+   download many files at once.
+
+Written by Jeff Pohlmeyer
 
-Requires libevent and a (POSIX?) system that has mkfifo().
+Requires libevent version 2 and a (POSIX?) system that has mkfifo().
 
 This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
 sample programs.
@@ -48,7 +61,7 @@ callback.
 #include <unistd.h>
 #include <sys/poll.h>
 #include <curl/curl.h>
-#include <event.h>
+#include <event2/event.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <errno.h>
@@ -58,9 +71,11 @@ callback.
 
 
 /* Global information, common to all connections */
-typedef struct _GlobalInfo {
-  struct event fifo_event;
-  struct event timer_event;
+typedef struct _GlobalInfo
+{
+  struct event_base *evbase;
+  struct event *fifo_event;
+  struct event *timer_event;
   CURLM *multi;
   int still_running;
   FILE* input;
@@ -68,7 +83,8 @@ typedef struct _GlobalInfo {
 
 
 /* Information associated with a specific easy handle */
-typedef struct _ConnInfo {
+typedef struct _ConnInfo
+{
   CURL *easy;
   char *url;
   GlobalInfo *global;
@@ -77,12 +93,13 @@ typedef struct _ConnInfo {
 
 
 /* Information associated with a specific socket */
-typedef struct _SockInfo {
+typedef struct _SockInfo
+{
   curl_socket_t sockfd;
   CURL *easy;
   int action;
   long timeout;
-  struct event ev;
+  struct event *ev;
   int evset;
   GlobalInfo *global;
 } SockInfo;
@@ -98,7 +115,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
   timeout.tv_sec = timeout_ms/1000;
   timeout.tv_usec = (timeout_ms%1000)*1000;
   fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
-  evtimer_add(&g->timer_event, &timeout);
+  evtimer_add(g->timer_event, &timeout);
   return 0;
 }
 
@@ -173,8 +190,8 @@ static void event_cb(int fd, short kind, void *userp)
   check_multi_info(g);
   if ( g->still_running <= 0 ) {
     fprintf(MSG_OUT, "last transfer done, kill timeout\n");
-    if (evtimer_pending(&g->timer_event, NULL)) {
-      evtimer_del(&g->timer_event);
+    if (evtimer_pending(g->timer_event, NULL)) {
+      evtimer_del(g->timer_event);
     }
   }
 }
@@ -202,7 +219,7 @@ static void remsock(SockInfo *f)
 {
   if (f) {
     if (f->evset)
-      event_del(&f->ev);
+      event_free(f->ev);
     free(f);
   }
 }
@@ -219,16 +236,17 @@ static void setsock(SockInfo*f, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
   f->action = act;
   f->easy = e;
   if (f->evset)
-    event_del(&f->ev);
-  event_set(&f->ev, f->sockfd, kind, event_cb, g);
-  f->evset=1;
-  event_add(&f->ev, NULL);
+    event_free(f->ev);
+  f->ev = event_new(g->evbase, f->sockfd, kind, event_cb, g);
+  f->evset = 1;
+  event_add(f->ev, NULL);
 }
 
 
 
 /* Initialize a new SockInfo structure */
-static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) {
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
   SockInfo *fdp = calloc(sizeof(SockInfo), 1);
 
   fdp->global = g;
@@ -346,11 +364,11 @@ static void fifo_cb(int fd, short event, void *arg)
 }
 
 /* Create a named pipe and tell libevent to monitor it */
+static const char *fifo = "hiper.fifo";
 static int init_fifo (GlobalInfo *g)
 {
   struct stat st;
-  static const char *fifo = "hiper.fifo";
-  int sockfd;
+  curl_socket_t sockfd;
 
   fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
   if (lstat (fifo, &st) == 0) {
@@ -373,11 +391,18 @@ static int init_fifo (GlobalInfo *g)
   g->input = fdopen(sockfd, "r");
 
   fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
-  event_set(&g->fifo_event, sockfd, EV_READ | EV_PERSIST, fifo_cb, g);
-  event_add(&g->fifo_event, NULL);
+  g->fifo_event = event_new(g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb, g);
+  event_add(g->fifo_event, NULL);
   return (0);
 }
 
+static void clean_fifo(GlobalInfo *g)
+{
+    event_free(g->fifo_event);
+    fclose(g->input);
+    unlink(fifo);
+}
+
 int main(int argc, char **argv)
 {
   GlobalInfo g;
@@ -385,10 +410,10 @@ int main(int argc, char **argv)
   (void)argv;
 
   memset(&g, 0, sizeof(GlobalInfo));
-  event_init();
+  g.evbase = event_base_new();
   init_fifo(&g);
   g.multi = curl_multi_init();
-  evtimer_set(&g.timer_event, timer_cb, &g);
+  g.timer_event = evtimer_new(g.evbase, timer_cb, &g);
 
   /* setup the generic multi interface options we want */
   curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
@@ -399,7 +424,13 @@ int main(int argc, char **argv)
   /* we don't call any curl_multi_socket*() function yet as we have no handles
      added! */
 
-  event_dispatch();
+  event_base_dispatch(g.evbase);
+
+  /* this, of course, won't get called since only way to stop this program is
+     via ctrl-C, but it is here to show how cleanup /would/ be done. */
+  clean_fifo(&g);
+  event_free(g.timer_event);
+  event_base_free(g.evbase);
   curl_multi_cleanup(g.multi);
   return 0;
 }
diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c
new file mode 100644 (file)
index 0000000..4b307a2
--- /dev/null
@@ -0,0 +1,86 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * This example uses the "Streaming HTML parser" to extract the href pieces in
+ * a streaming manner from a downloaded HTML. Kindly donated by Michał
+ * Kowalczyk.
+ *
+ * The parser is found at
+ * http://code.google.com/p/htmlstreamparser/
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+#include <htmlstreamparser.h>
+
+
+static size_t write_callback(void *buffer, size_t size, size_t nmemb,
+                             void *hsp)
+{
+  size_t realsize = size * nmemb, p;
+  for (p = 0; p < realsize; p++) {
+    html_parser_char_parse(hsp, ((char *)buffer)[p]);
+    if (html_parser_cmp_tag(hsp, "a", 1))
+      if (html_parser_cmp_attr(hsp, "href", 4))
+        if (html_parser_is_in(hsp, HTML_VALUE_ENDED)) {
+          html_parser_val(hsp)[html_parser_val_length(hsp)] = '\0';
+          printf("%s\n", html_parser_val(hsp));
+        }
+  }
+  return realsize;
+}
+
+int main(int argc, char *argv[])
+{
+  char tag[1], attr[4], val[128];
+  CURL *curl;
+  HTMLSTREAMPARSER *hsp;
+
+  if (argc != 2) {
+    printf("Usage: %s URL\n", argv[0]);
+    return EXIT_FAILURE;
+  }
+
+  curl = curl_easy_init();
+
+  hsp = html_parser_init();
+
+  html_parser_set_tag_to_lower(hsp, 1);
+  html_parser_set_attr_to_lower(hsp, 1);
+  html_parser_set_tag_buffer(hsp, tag, sizeof(tag));
+  html_parser_set_attr_buffer(hsp, attr, sizeof(attr));
+  html_parser_set_val_buffer(hsp, val, sizeof(val)-1);
+
+  curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+  curl_easy_setopt(curl, CURLOPT_WRITEDATA, hsp);
+  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+
+  curl_easy_perform(curl);
+
+  curl_easy_cleanup(curl);
+
+  html_parser_cleanup(hsp);
+
+  return EXIT_SUCCESS;
+}
index 9a46955..a36e331 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Download a document and use libtidy to parse the HTML.
+ * 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.
+ *
+ ***************************************************************************/
+/* Download a document and use libtidy to parse the HTML.
  * Written by Jeff Pohlmeyer
  *
  * LibTidy => http://tidy.sourceforge.net
similarity index 88%
rename from docs/examples/htmltitle.cc
rename to docs/examples/htmltitle.cpp
index da3354a..ab89bb6 100644 (file)
@@ -1,19 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 // Get a web page, parse it with libxml.
 //
 // Written by Lars Nilsson
 //
 // GNU C++ compile command line suggestion (edit paths accordingly):
 //
-// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cc \
+// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
 // -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
 
 #include <stdio.h>
index 523177d..f1975b1 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <curl/curl.h>
 
@@ -15,6 +27,10 @@ int main(void)
   CURL *curl;
   CURLcode res;
 
+  /* In windows, this will init the winsock stuff */
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  /* get a curl handle */
   curl = curl_easy_init();
   if(curl) {
     /* First set the URL that is about to receive our POST. This URL can
@@ -26,9 +42,14 @@ int main(void)
 
     /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
+  curl_global_cleanup();
   return 0;
 }
index 599b84f..07ff959 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <curl/curl.h>
 
@@ -26,13 +38,24 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "localhost");
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* redo request with our own custom Accept: */
     res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
+
+    /* free the custom headers */
+    curl_slist_free_all(chunk);
   }
   return 0;
 }
index 821e95f..fbbca94 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 {
   size_t retcode;
+  curl_off_t nread;
 
   /* in real-world cases, this would probably get this data differently
      as this fread() stuff is exactly what the library already would do
      by default internally */
   retcode = fread(ptr, size, nmemb, stream);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  nread = (curl_off_t)retcode;
+
+  fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+          " bytes from file\n", nread);
 
   return retcode;
 }
@@ -94,6 +110,10 @@ int main(int argc, char **argv)
 
     /* Now run off and do what you've been told! */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 10b5c65..bd9a33b 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 #include <curl/curl.h>
 
@@ -15,6 +27,8 @@ int main(void)
   CURL *curl;
   CURLcode res;
 
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -33,7 +47,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
 #endif
 
-#ifdef SKIP_HOSTNAME_VERFICATION
+#ifdef SKIP_HOSTNAME_VERIFICATION
     /*
      * If the site you're connecting to uses a different host name that what
      * they have mentioned in their server certificate's commonName (or
@@ -43,10 +57,18 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
 #endif
 
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
+
+  curl_global_cleanup();
+
   return 0;
 }
diff --git a/docs/examples/imap.c b/docs/examples/imap.c
new file mode 100644 (file)
index 0000000..ba07f02
--- /dev/null
@@ -0,0 +1,44 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res = CURLE_OK;
+
+  curl = curl_easy_init();
+  if(curl) {
+    /* Set username and password */
+    curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
+
+    /* This will fetch the mailbox named "foobar" */
+    curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/foobar");
+
+    res = curl_easy_perform(curl);
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+  return (int)res;
+}
index 8736e6e..c18ef8a 100644 (file)
@@ -1,6 +1,27 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 #
 #  Adapted for djgpp / Watt-32 / DOS by
-#  Gisle Vanem <giva@bgnett.no>
+#  Gisle Vanem <gvanem@broadpark.no>
 #
 
 TOPDIR = ../..
index 6ba1318..a5f71c5 100644 (file)
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is an example application source code using the multi interface.
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* This is an example application source code using the multi interface. */
 
 #include <stdio.h>
 #include <string.h>
@@ -27,7 +39,7 @@
 #define HTTP_HANDLE 0   /* Index for the HTTP transfer */
 #define FTP_HANDLE 1    /* Index for the FTP transfer */
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *handles[HANDLECOUNT];
   CURLM *multi_handle;
@@ -58,7 +70,7 @@ int main(int argc, char **argv)
   /* we start some action by calling perform right away */
   curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
+  do {
     struct timeval timeout;
     int rc; /* select() return code */
 
@@ -106,7 +118,7 @@ int main(int argc, char **argv)
       curl_multi_perform(multi_handle, &still_running);
       break;
     }
-  }
+  } while(still_running);
 
   /* See how the transfers went */
   while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
index 529c3d9..8eedcee 100644 (file)
@@ -1,14 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is a very simple example using the multi interface and the debug
- * callback.
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* This is an example showing the multi interface and the debug callback. */
 
 #include <stdio.h>
 #include <string.h>
@@ -37,12 +48,12 @@ void dump(const char *text,
     /* without the hex output, we can fit more on screen */
     width = 0x40;
 
-  fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+  fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
           text, (long)size, (long)size);
 
   for(i=0; i<size; i+= width) {
 
-    fprintf(stream, "%04.4lx: ", (long)i);
+    fprintf(stream, "%4.4lx: ", (long)i);
 
     if(!nohex) {
       /* hex not disabled, show it */
@@ -79,6 +90,7 @@ int my_trace(CURL *handle, curl_infotype type,
 {
   const char *text;
 
+  (void)userp;
   (void)handle; /* prevent compiler warning */
 
   switch (type) {
@@ -108,7 +120,7 @@ int my_trace(CURL *handle, curl_infotype type,
 /*
  * Simply download a HTTP file.
  */
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *http_handle;
   CURLM *multi_handle;
@@ -132,7 +144,7 @@ int main(int argc, char **argv)
   /* we start some action by calling perform right away */
   curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
+  do {
     struct timeval timeout;
     int rc; /* select() return code */
 
@@ -183,7 +195,7 @@ int main(int argc, char **argv)
       curl_multi_perform(multi_handle, &still_running);
       break;
     }
-  }
+  } while(still_running);
 
   curl_multi_cleanup(multi_handle);
 
index 3ea106b..91422e6 100644 (file)
@@ -1,14 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is a very simple example using the multi interface.
- */
-
+ * 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 <stdio.h>
 #include <string.h>
 
@@ -22,7 +32,7 @@
 /*
  * Simply download two HTTP files!
  */
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *http_handle;
   CURL *http_handle2;
@@ -49,7 +59,7 @@ int main(int argc, char **argv)
   /* we start some action by calling perform right away */
   curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
+  do {
     struct timeval timeout;
     int rc; /* select() return code */
 
@@ -98,7 +108,7 @@ int main(int argc, char **argv)
       curl_multi_perform(multi_handle, &still_running);
       break;
     }
-  }
+  } while(still_running);
 
   curl_multi_cleanup(multi_handle);
 
index 8b4f03e..965a2c3 100644 (file)
@@ -1,21 +1,33 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is an example application source code using the multi interface
- * to do a multipart formpost without "blocking".
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* This is an example application source code using the multi interface
+ * to do a multipart formpost without "blocking". */
 #include <stdio.h>
 #include <string.h>
 #include <sys/time.h>
 
 #include <curl/curl.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
   CURL *curl;
 
@@ -68,7 +80,7 @@ int main(int argc, char *argv[])
 
     curl_multi_perform(multi_handle, &still_running);
 
-    while(still_running) {
+    do {
       struct timeval timeout;
       int rc; /* select() return code */
 
@@ -119,7 +131,7 @@ int main(int argc, char *argv[])
         printf("running: %d!\n", still_running);
         break;
       }
-    }
+    } while(still_running);
 
     curl_multi_cleanup(multi_handle);
 
index f248afe..37a01cd 100644 (file)
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is a very simple example using the multi interface.
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* This is a very simple example using the multi interface. */
 
 #include <stdio.h>
 #include <string.h>
 /*
  * Simply download a HTTP file.
  */
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *http_handle;
   CURLM *multi_handle;
 
   int still_running; /* keep number of running handles */
 
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+
   http_handle = curl_easy_init();
 
   /* set the options (I left out a few, you'll get the point anyway) */
@@ -43,7 +57,7 @@ int main(int argc, char **argv)
   /* we start some action by calling perform right away */
   curl_multi_perform(multi_handle, &still_running);
 
-  while(still_running) {
+  do {
     struct timeval timeout;
     int rc; /* select() return code */
 
@@ -94,11 +108,15 @@ int main(int argc, char **argv)
       curl_multi_perform(multi_handle, &still_running);
       break;
     }
-  }
+  } while(still_running);
 
-  curl_multi_cleanup(multi_handle);
+  curl_multi_remove_handle(multi_handle, http_handle);
 
   curl_easy_cleanup(http_handle);
 
+  curl_multi_cleanup(multi_handle);
+
+  curl_global_cleanup();
+
   return 0;
 }
diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c
new file mode 100644 (file)
index 0000000..57d712f
--- /dev/null
@@ -0,0 +1,212 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
+/* Example application code using the multi socket interface to download
+   multiple files at once, but instead of using curl_multi_perform and
+   curl_multi_wait, which uses select(), we use libuv.
+   It supports epoll, kqueue, etc. on unixes and fast IO completion ports on
+   Windows, which means, it should be very fast on all platforms..
+
+   Written by Clemens Gruber, based on an outdated example from uvbook and
+   some tests from libuv.
+
+   Requires libuv and (of course) libcurl.
+
+   See http://nikhilm.github.com/uvbook/ for more information on libuv.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <uv.h>
+#include <curl/curl.h>
+
+uv_loop_t *loop;
+CURLM *curl_handle;
+uv_timer_t timeout;
+
+typedef struct curl_context_s {
+  uv_poll_t poll_handle;
+  curl_socket_t sockfd;
+} curl_context_t;
+
+curl_context_t* create_curl_context(curl_socket_t sockfd)
+{
+  curl_context_t *context;
+
+  context = (curl_context_t *) malloc(sizeof *context);
+
+  context->sockfd = sockfd;
+
+  uv_poll_init_socket(loop, &context->poll_handle, sockfd);
+  context->poll_handle.data = context;
+
+  return context;
+}
+
+void curl_close_cb(uv_handle_t *handle)
+{
+  curl_context_t* context = (curl_context_t*) handle->data;
+  free(context);
+}
+
+void destroy_curl_context(curl_context_t *context)
+{
+  uv_close((uv_handle_t*) &context->poll_handle, curl_close_cb);
+}
+
+
+void add_download(const char *url, int num)
+{
+  char filename[50];
+  FILE *file;
+  CURL *handle;
+
+  sprintf(filename, "%d.download", num);
+
+  file = fopen(filename, "w");
+  if (file == NULL) {
+    fprintf(stderr, "Error opening %s\n", filename);
+    return;
+  }
+
+  handle = curl_easy_init();
+  curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
+  curl_easy_setopt(handle, CURLOPT_URL, url);
+  curl_multi_add_handle(curl_handle, handle);
+  fprintf(stderr, "Added download %s -> %s\n", url, filename);
+}
+
+void curl_perform(uv_poll_t *req, int status, int events)
+{
+  int running_handles;
+  int flags = 0;
+  curl_context_t *context;
+  char *done_url;
+  CURLMsg *message;
+  int pending;
+
+  uv_timer_stop(&timeout);
+
+  if (events & UV_READABLE)
+    flags |= CURL_CSELECT_IN;
+  if (events & UV_WRITABLE)
+    flags |= CURL_CSELECT_OUT;
+
+  context = (curl_context_t*)req;
+
+  curl_multi_socket_action(curl_handle, context->sockfd, flags,
+                           &running_handles);
+
+  while ((message = curl_multi_info_read(curl_handle, &pending))) {
+    switch (message->msg) {
+    case CURLMSG_DONE:
+      curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL,
+                        &done_url);
+      printf("%s DONE\n", done_url);
+
+      curl_multi_remove_handle(curl_handle, message->easy_handle);
+      curl_easy_cleanup(message->easy_handle);
+
+      break;
+    default:
+      fprintf(stderr, "CURLMSG default\n");
+      abort();
+    }
+  }
+}
+
+void on_timeout(uv_timer_t *req, int status)
+{
+  int running_handles;
+  curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0,
+                           &running_handles);
+}
+
+void start_timeout(CURLM *multi, long timeout_ms, void *userp)
+{
+  if (timeout_ms <= 0)
+    timeout_ms = 1; /* 0 means directly call socket_action, but we'll do it in
+                       a bit */
+  uv_timer_start(&timeout, on_timeout, timeout_ms, 0);
+}
+
+int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
+                  void *socketp)
+{
+  curl_context_t *curl_context;
+  if (action == CURL_POLL_IN || action == CURL_POLL_OUT) {
+    if (socketp) {
+      curl_context = (curl_context_t*) socketp;
+    }
+    else {
+      curl_context = create_curl_context(s);
+    }
+    curl_multi_assign(curl_handle, s, (void *) curl_context);
+  }
+
+  switch (action) {
+  case CURL_POLL_IN:
+    uv_poll_start(&curl_context->poll_handle, UV_READABLE, curl_perform);
+    break;
+  case CURL_POLL_OUT:
+    uv_poll_start(&curl_context->poll_handle, UV_WRITABLE, curl_perform);
+    break;
+  case CURL_POLL_REMOVE:
+    if (socketp) {
+      uv_poll_stop(&((curl_context_t*)socketp)->poll_handle);
+      destroy_curl_context((curl_context_t*) socketp);
+      curl_multi_assign(curl_handle, s, NULL);
+    }
+    break;
+  default:
+    abort();
+  }
+
+  return 0;
+}
+
+int main(int argc, char **argv)
+{
+  loop = uv_default_loop();
+
+  if (argc <= 1)
+    return 0;
+
+  if (curl_global_init(CURL_GLOBAL_ALL)) {
+    fprintf(stderr, "Could not init cURL\n");
+    return 1;
+  }
+
+  uv_timer_init(loop, &timeout);
+
+  curl_handle = curl_multi_init();
+  curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
+  curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
+
+  while (argc-- > 1) {
+    add_download(argv[argc], argc);
+  }
+
+  uv_run(loop, UV_RUN_DEFAULT);
+  curl_multi_cleanup(curl_handle);
+  return 0;
+}
index 5f59a99..831a074 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 /* A multi-threaded example that uses pthreads extensively to fetch
  * X remote files at once */
 
index 706e901..ad54f08 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example source code to show one way to set the necessary OpenSSL locking
+ * 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.
+ *
+ ***************************************************************************/
+/* Example source code to show one way to set the necessary OpenSSL locking
  * callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
  * libcurl built to use OpenSSL.
  *
index 177ada3..0917dfd 100644 (file)
@@ -1,17 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <unistd.h>
 #include <curl/curl.h>
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *curl;
   CURLcode res;
@@ -25,12 +37,24 @@ int main(int argc, char **argv)
 
     /* get the first document */
     curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* get another document from the same server using the same
        connection */
     curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
+
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
diff --git a/docs/examples/pop3s.c b/docs/examples/pop3s.c
new file mode 100644 (file)
index 0000000..44d7c80
--- /dev/null
@@ -0,0 +1,73 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+
+  curl = curl_easy_init();
+  if(curl) {
+    /* Set username and password */
+    curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
+
+    /* This will only fetch the message with ID "1" of the given mailbox */
+    curl_easy_setopt(curl, CURLOPT_URL, "pop3s://user@pop.example.com/1");
+
+#ifdef SKIP_PEER_VERIFICATION
+    /*
+     * If you want to connect to a site who isn't using a certificate that is
+     * signed by one of the certs in the CA bundle you have, you can skip the
+     * verification of the server's certificate. This makes the connection
+     * A LOT LESS SECURE.
+     *
+     * If you have a CA cert for the server stored someplace else than in the
+     * default bundle, then the CURLOPT_CAPATH option might come handy for
+     * you.
+     */
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+#ifdef SKIP_HOSTNAME_VERFICATION
+    /*
+     * If the site you're connecting to uses a different host name that what
+     * they have mentioned in their server certificate's commonName (or
+     * subjectAltName) fields, libcurl will refuse to connect. You can skip
+     * this check, but this will make the connection less secure.
+     */
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+    /* Perform the request, res will get the return code */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+  return 0;
+}
diff --git a/docs/examples/pop3slist.c b/docs/examples/pop3slist.c
new file mode 100644 (file)
index 0000000..9d9668f
--- /dev/null
@@ -0,0 +1,73 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+
+  curl = curl_easy_init();
+  if(curl) {
+    /* Set username and password */
+    curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
+
+    /* This will list every message of the given mailbox */
+    curl_easy_setopt(curl, CURLOPT_URL, "pop3s://user@pop.example.com/");
+
+#ifdef SKIP_PEER_VERIFICATION
+    /*
+     * If you want to connect to a site who isn't using a certificate that is
+     * signed by one of the certs in the CA bundle you have, you can skip the
+     * verification of the server's certificate. This makes the connection
+     * A LOT LESS SECURE.
+     *
+     * If you have a CA cert for the server stored someplace else than in the
+     * default bundle, then the CURLOPT_CAPATH option might come handy for
+     * you.
+     */
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+#ifdef SKIP_HOSTNAME_VERFICATION
+    /*
+     * If the site you're connecting to uses a different host name that what
+     * they have mentioned in their server certificate's commonName (or
+     * subjectAltName) fields, libcurl will refuse to connect. You can skip
+     * this check, but this will make the connection less secure.
+     */
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+    /* Perform the request, res will get the return code */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+  return 0;
+}
index ae4f4db..3e1cfb0 100644 (file)
@@ -1,14 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * An example source code that issues a HTTP POST and we provide the actual
- * data through a read callback.
+ * 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.
  *
+ ***************************************************************************/
+/* An example source code that issues a HTTP POST and we provide the actual
+ * data through a read callback.
  */
 #include <stdio.h>
 #include <string.h>
@@ -18,7 +30,7 @@ const char data[]="this is what we post to the silly web server";
 
 struct WriteThis {
   const char *readptr;
-  int sizeleft;
+  long sizeleft;
 };
 
 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
@@ -46,8 +58,18 @@ int main(void)
   struct WriteThis pooh;
 
   pooh.readptr = data;
-  pooh.sizeleft = strlen(data);
+  pooh.sizeleft = (long)strlen(data);
+
+  /* In windows, this will init the winsock stuff */
+  res = curl_global_init(CURL_GLOBAL_DEFAULT);
+  /* Check for errors */
+  if(res != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed: %s\n",
+            curl_easy_strerror(res));
+    return 1;
+  }
 
+  /* get a curl handle */
   curl = curl_easy_init();
   if(curl) {
     /* First set the URL that is about to receive our POST. */
@@ -84,7 +106,7 @@ int main(void)
 #else
     /* Set the expected POST size. If you want to POST large amounts of data,
        consider CURLOPT_POSTFIELDSIZE_LARGE */
-    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (curl_off_t)pooh.sizeleft);
+    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft);
 #endif
 
 #ifdef DISABLE_EXPECT
@@ -108,9 +130,14 @@ int main(void)
 
     /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
+  curl_global_cleanup();
   return 0;
 }
index a6292c5..67dcc13 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Example code that uploads a file name 'foo' to a remote script that accepts
+ * 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.
+ *
+ ***************************************************************************/
+/* Example code that uploads a file name 'foo' to a remote script that accepts
  * "HTML form based" (as described in RFC1738) uploads using HTTP POST.
  *
  * The imaginary form we'll fill in looks like:
@@ -24,8 +37,6 @@
 #include <string.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 int main(int argc, char *argv[])
 {
@@ -72,7 +83,13 @@ int main(int argc, char *argv[])
       /* only disable 100-continue header if explicitly requested */
       curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
     curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c
new file mode 100644 (file)
index 0000000..b2635bc
--- /dev/null
@@ -0,0 +1,119 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 <stdio.h>
+#include <curl/curl.h>
+
+#define STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES         6000
+#define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL     3
+
+struct myprogress {
+  double lastruntime;
+  CURL *curl;
+};
+
+/* this is how the CURLOPT_XFERINFOFUNCTION callback works */
+static int xferinfo(void *p,
+                    curl_off_t dltotal, curl_off_t dlnow,
+                    curl_off_t ultotal, curl_off_t ulnow)
+{
+  struct myprogress *myp = (struct myprogress *)p;
+  CURL *curl = myp->curl;
+  double curtime = 0;
+
+  curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &curtime);
+
+  /* under certain circumstances it may be desirable for certain functionality
+     to only run every N seconds, in order to do this the transaction time can
+     be used */
+  if((curtime - myp->lastruntime) >= MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL) {
+    myp->lastruntime = curtime;
+    fprintf(stderr, "TOTAL TIME: %f \r\n", curtime);
+  }
+
+  fprintf(stderr, "UP: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+          "  DOWN: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+          "\r\n",
+          ulnow, ultotal, dlnow, dltotal);
+
+  if(dlnow > STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES)
+    return 1;
+  return 0;
+}
+
+/* for libcurl older than 7.32.0 (CURLOPT_PROGRESSFUNCTION) */
+static int older_progress(void *p,
+                          double dltotal, double dlnow,
+                          double ultotal, double ulnow)
+{
+  return xferinfo(p,
+                  (curl_off_t)dltotal,
+                  (curl_off_t)dlnow,
+                  (curl_off_t)ultotal,
+                  (curl_off_t)ulnow);
+}
+
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res = CURLE_OK;
+  struct myprogress prog;
+
+  curl = curl_easy_init();
+  if(curl) {
+    prog.lastruntime = 0;
+    prog.curl = curl;
+
+    curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, older_progress);
+    /* pass the struct pointer into the progress function */
+    curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &prog);
+
+#if LIBCURL_VERSION_NUM >= 0x072000
+    /* xferinfo was introduced in 7.32.0, no earlier libcurl versions will
+       compile as they won't have the symbols around.
+
+       If built with a newer libcurl, but running with an older libcurl:
+       curl_easy_setopt() will fail in run-time trying to set the new
+       callback, making the older callback get used.
+
+       New libcurls will prefer the new callback and instead use that one even
+       if both callbacks are set. */
+
+    curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfo);
+    /* pass the struct pointer into the xferinfo function, note that this is
+       an alias to CURLOPT_PROGRESSDATA */
+    curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
+#endif
+
+    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+    res = curl_easy_perform(curl);
+
+    if(res != CURLE_OK)
+      fprintf(stderr, "%s\n", curl_easy_strerror(res));
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+  return (int)res;
+}
diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c
new file mode 100644 (file)
index 0000000..7b3e565
--- /dev/null
@@ -0,0 +1,51 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res = CURLE_OK;
+  struct curl_slist *host = NULL;
+
+  /* Each single name resolve string should be written using the format
+     HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve,
+     PORT is the port number of the service where libcurl wants to connect to
+     the HOST and ADDRESS is the numerical IP address
+   */
+  host = curl_slist_append(NULL, "example.com:80:127.0.0.1");
+
+  curl = curl_easy_init();
+  if(curl) {
+    curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
+    curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+    res = curl_easy_perform(curl);
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+  }
+
+  curl_slist_free_all(host);
+
+  return (int)res;
+}
diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c
new file mode 100644 (file)
index 0000000..669780a
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2011, Jim Hollinger
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *   * Neither the name of Jim Hollinger nor the names of its contributors
+ *     may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined (WIN32)
+#  include <conio.h>  /* _getch() */
+#else
+#  include <termios.h>
+#  include <unistd.h>
+
+static int _getch(void)
+{
+  struct termios oldt, newt;
+  int ch;
+  tcgetattr( STDIN_FILENO, &oldt );
+  newt = oldt;
+  newt.c_lflag &= ~( ICANON | ECHO );
+  tcsetattr( STDIN_FILENO, TCSANOW, &newt );
+  ch = getchar();
+  tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
+  return ch;
+}
+#endif
+
+#include <curl/curl.h>
+
+#define VERSION_STR  "V1.0"
+
+/* error handling macros */
+#define my_curl_easy_setopt(A, B, C) \
+  if ((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) \
+    fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
+            #A, #B, #C, res);
+
+#define my_curl_easy_perform(A) \
+  if ((res = curl_easy_perform((A))) != CURLE_OK) \
+    fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
+
+
+/* send RTSP OPTIONS request */
+static void rtsp_options(CURL *curl, const char *uri)
+{
+  CURLcode res = CURLE_OK;
+  printf("\nRTSP: OPTIONS %s\n", uri);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_OPTIONS);
+  my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP DESCRIBE request and write sdp response to a file */
+static void rtsp_describe(CURL *curl, const char *uri,
+                          const char *sdp_filename)
+{
+  CURLcode res = CURLE_OK;
+  FILE *sdp_fp = fopen(sdp_filename, "wt");
+  printf("\nRTSP: DESCRIBE %s\n", uri);
+  if (sdp_fp == NULL) {
+    fprintf(stderr, "Could not open '%s' for writing\n", sdp_filename);
+    sdp_fp = stdout;
+  }
+  else {
+    printf("Writing SDP to '%s'\n", sdp_filename);
+  }
+  my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, sdp_fp);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_DESCRIBE);
+  my_curl_easy_perform(curl);
+  my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, stdout);
+  if (sdp_fp != stdout) {
+    fclose(sdp_fp);
+  }
+}
+
+/* send RTSP SETUP request */
+static void rtsp_setup(CURL *curl, const char *uri, const char *transport)
+{
+  CURLcode res = CURLE_OK;
+  printf("\nRTSP: SETUP %s\n", uri);
+  printf("      TRANSPORT %s\n", transport);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, transport);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_SETUP);
+  my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP PLAY request */
+static void rtsp_play(CURL *curl, const char *uri, const char *range)
+{
+  CURLcode res = CURLE_OK;
+  printf("\nRTSP: PLAY %s\n", uri);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+  my_curl_easy_setopt(curl, CURLOPT_RANGE, range);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_PLAY);
+  my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP TEARDOWN request */
+static void rtsp_teardown(CURL *curl, const char *uri)
+{
+  CURLcode res = CURLE_OK;
+  printf("\nRTSP: TEARDOWN %s\n", uri);
+  my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_TEARDOWN);
+  my_curl_easy_perform(curl);
+}
+
+
+/* convert url into an sdp filename */
+static void get_sdp_filename(const char *url, char *sdp_filename)
+{
+  const char *s = strrchr(url, '/');
+  strcpy(sdp_filename, "video.sdp");
+  if (s != NULL) {
+    s++;
+    if (s[0] != '\0') {
+      sprintf(sdp_filename, "%s.sdp", s);
+    }
+  }
+}
+
+
+/* scan sdp file for media control attribute */
+static void get_media_control_attribute(const char *sdp_filename,
+                                        char *control)
+{
+  int max_len = 256;
+  char *s = malloc(max_len);
+  FILE *sdp_fp = fopen(sdp_filename, "rt");
+  control[0] = '\0';
+  if (sdp_fp != NULL) {
+    while (fgets(s, max_len - 2, sdp_fp) != NULL) {
+      sscanf(s, " a = control: %s", control);
+    }
+    fclose(sdp_fp);
+  }
+  free(s);
+}
+
+
+/* main app */
+int main(int argc, char * const argv[])
+{
+#if 1
+  const char *transport = "RTP/AVP;unicast;client_port=1234-1235";  /* UDP */
+#else
+  const char *transport = "RTP/AVP/TCP;unicast;client_port=1234-1235";  /* TCP */
+#endif
+  const char *range = "0.000-";
+  int rc = EXIT_SUCCESS;
+  char *base_name = NULL;
+
+  printf("\nRTSP request %s\n", VERSION_STR);
+  printf("    Project web site: http://code.google.com/p/rtsprequest/\n");
+  printf("    Requires cURL V7.20 or greater\n\n");
+
+  /* check command line */
+  if ((argc != 2) && (argc != 3)) {
+    base_name = strrchr(argv[0], '/');
+    if (base_name == NULL) {
+      base_name = strrchr(argv[0], '\\');
+    }
+    if (base_name == NULL) {
+      base_name = argv[0];
+    } else {
+      base_name++;
+    }
+    printf("Usage:   %s url [transport]\n", base_name);
+    printf("         url of video server\n");
+    printf("         transport (optional) specifier for media stream protocol\n");
+    printf("         default transport: %s\n", transport);
+    printf("Example: %s rtsp://192.168.0.2/media/video1\n\n", base_name);
+    rc = EXIT_FAILURE;
+  } else {
+    const char *url = argv[1];
+    char *uri = malloc(strlen(url) + 32);
+    char *sdp_filename = malloc(strlen(url) + 32);
+    char *control = malloc(strlen(url) + 32);
+    CURLcode res;
+    get_sdp_filename(url, sdp_filename);
+    if (argc == 3) {
+      transport = argv[2];
+    }
+
+    /* initialize curl */
+    res = curl_global_init(CURL_GLOBAL_ALL);
+    if (res == CURLE_OK) {
+      curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+      CURL *curl;
+      fprintf(stderr, "    cURL V%s loaded\n", data->version);
+
+      /* initialize this curl session */
+      curl = curl_easy_init();
+      if (curl != NULL) {
+        my_curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+        my_curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+        my_curl_easy_setopt(curl, CURLOPT_WRITEHEADER, stdout);
+        my_curl_easy_setopt(curl, CURLOPT_URL, url);
+
+        /* request server options */
+        sprintf(uri, "%s", url);
+        rtsp_options(curl, uri);
+
+        /* request session description and write response to sdp file */
+        rtsp_describe(curl, uri, sdp_filename);
+
+        /* get media control attribute from sdp file */
+        get_media_control_attribute(sdp_filename, control);
+
+        /* setup media stream */
+        sprintf(uri, "%s/%s", url, control);
+        rtsp_setup(curl, uri, transport);
+
+        /* start playing media stream */
+        sprintf(uri, "%s/", url);
+        rtsp_play(curl, uri, range);
+        printf("Playing video, press any key to stop ...");
+        _getch();
+        printf("\n");
+
+        /* teardown session */
+        rtsp_teardown(curl, uri);
+
+        /* cleanup */
+        curl_easy_cleanup(curl);
+        curl = NULL;
+      } else {
+        fprintf(stderr, "curl_easy_init() failed\n");
+      }
+      curl_global_cleanup();
+    } else {
+      fprintf(stderr, "curl_global_init(%s) failed: %d\n",
+              "CURL_GLOBAL_ALL", res);
+    }
+    free(control);
+    free(sdp_filename);
+    free(uri);
+  }
+
+  return rc;
+}
index ed45851..3db3160 100644 (file)
@@ -1,11 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 /*
    This is a simple example showing how a program on a non-ASCII platform
    would invoke callbacks to do its own codeset conversions instead of
index ad5ddd1..88fddf5 100644 (file)
@@ -1,20 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * An example of curl_easy_send() and curl_easy_recv() usage.
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+/* An example of curl_easy_send() and curl_easy_recv() usage. */
 
 #include <stdio.h>
 #include <string.h>
 #include <curl/curl.h>
 
 /* Auxiliary function that waits on the socket. */
-static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
+static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
 {
   struct timeval tv;
   fd_set infd, outfd, errfd;
@@ -49,8 +61,10 @@ int main(void)
   CURLcode res;
   /* Minimalistic http request */
   const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
-  int sockfd; /* socket */
+  curl_socket_t sockfd; /* socket */
+  long sockextr;
   size_t iolen;
+  curl_off_t nread;
 
   curl = curl_easy_init();
   if(curl) {
@@ -65,9 +79,11 @@ int main(void)
       return 1;
     }
 
-    /* Extract the socket from the curl handle - we'll need it
-     * for waiting */
-    res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
+    /* Extract the socket from the curl handle - we'll need it for waiting.
+     * Note that this API takes a pointer to a 'long' while we use
+     * curl_socket_t for sockets otherwise.
+     */
+    res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
 
     if(CURLE_OK != res)
     {
@@ -75,6 +91,8 @@ int main(void)
       return 1;
     }
 
+    sockfd = sockextr;
+
     /* wait for the socket to become ready for sending */
     if(!wait_on_socket(sockfd, 0, 60000L))
     {
@@ -105,7 +123,9 @@ int main(void)
       if(CURLE_OK != res)
         break;
 
-      printf("Received %u bytes.\n", iolen);
+      nread = (curl_off_t)iolen;
+
+      printf("Received %" CURL_FORMAT_CURL_OFF_T " bytes.\n", nread);
     }
 
     /* always cleanup */
index e0c4cbb..d944ab9 100644 (file)
@@ -1,19 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
 
 static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
 {
@@ -21,7 +31,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
   return written;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
   CURL *curl_handle;
   static const char *headerfilename = "head.out";
@@ -44,23 +54,22 @@ int main(int argc, char **argv)
   curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
 
   /* open the files */
-  headerfile = fopen(headerfilename,"w");
+  headerfile = fopen(headerfilename,"wb");
   if (headerfile == NULL) {
     curl_easy_cleanup(curl_handle);
     return -1;
   }
-  bodyfile = fopen(bodyfilename,"w");
+  bodyfile = fopen(bodyfilename,"wb");
   if (bodyfile == NULL) {
     curl_easy_cleanup(curl_handle);
     return -1;
   }
 
-  /* we want the headers to this file handle */
+  /* we want the headers be written to this file handle */
   curl_easy_setopt(curl_handle,   CURLOPT_WRITEHEADER, headerfile);
 
-  /*
-   * Notice here that if you want the actual data sent anywhere else but
-   * stdout, you should consider using the CURLOPT_WRITEDATA option.  */
+  /* we want the body be written to this file handle instead of stdout */
+  curl_easy_setopt(curl_handle,   CURLOPT_WRITEDATA, bodyfile);
 
   /* get it! */
   curl_easy_perform(curl_handle);
@@ -68,6 +77,9 @@ int main(int argc, char **argv)
   /* close the header file */
   fclose(headerfile);
 
+  /* close the body file */
+  fclose(bodyfile);
+
   /* cleanup curl stuff */
   curl_easy_cleanup(curl_handle);
 
diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c
new file mode 100644 (file)
index 0000000..8317462
--- /dev/null
@@ -0,0 +1,106 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
+
+#include <curl/curl.h>
+
+/* define this to switch off the use of ssh-agent in this program */
+#undef DISABLE_SSH_AGENT
+
+/*
+ * This is an example showing how to get a single file from an SFTP server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+  const char *filename;
+  FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+                        void *stream)
+{
+  struct FtpFile *out=(struct FtpFile *)stream;
+  if(out && !out->stream) {
+    /* open file for writing */
+    out->stream=fopen(out->filename, "wb");
+    if(!out->stream)
+      return -1; /* failure, can't open file to write */
+  }
+  return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+  struct FtpFile ftpfile={
+    "yourfile.bin", /* name to store the file as if succesful */
+    NULL
+  };
+
+  curl_global_init(CURL_GLOBAL_DEFAULT);
+
+  curl = curl_easy_init();
+  if(curl) {
+    /*
+     * You better replace the URL with one that works!
+     */
+    curl_easy_setopt(curl, CURLOPT_URL,
+                     "sftp://user@server/home/user/file.txt");
+    /* Define our callback to get called when there's data to be written */
+    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+    /* Set a pointer to our struct to pass to the callback */
+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+#ifndef DISABLE_SSH_AGENT
+    /* We activate ssh agent. For this to work you need
+       to have ssh-agent running (type set | grep SSH_AGENT to check) or
+       pageant on Windows (there is an icon in systray if so) */
+    curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_AGENT);
+#endif
+
+    /* Switch on full protocol/debug output */
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+    res = curl_easy_perform(curl);
+
+    /* always cleanup */
+    curl_easy_cleanup(curl);
+
+    if(CURLE_OK != res) {
+      /* we failed */
+      fprintf(stderr, "curl told us %d\n", res);
+    }
+  }
+
+  if(ftpfile.stream)
+    fclose(ftpfile.stream); /* close the local file */
+
+  curl_global_cleanup();
+
+  return 0;
+}
index 351cf72..1912ce6 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 <stdio.h>
 #include <curl/curl.h>
 
@@ -18,7 +30,15 @@ int main(void)
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+    /* example.com is redirected, so we tell libcurl to follow redirection */
+    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index b8e61e0..8657771 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
 #include <string.h>
 #include <curl/curl.h>
@@ -27,7 +39,12 @@ int main(void)
        itself */
     curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
 
+    /* Perform the request, res will get the return code */
     res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
diff --git a/docs/examples/simplesmtp.c b/docs/examples/simplesmtp.c
new file mode 100644 (file)
index 0000000..df85162
--- /dev/null
@@ -0,0 +1,87 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+  struct curl_slist *recipients = NULL;
+
+  /* value for envelope reverse-path */
+  static const char *from = "<bradh@example.com>";
+
+  /* this becomes the envelope forward-path */
+  static const char *to = "<bradh@example.net>";
+
+  curl = curl_easy_init();
+  if(curl) {
+    /* this is the URL for your mailserver - you can also use an smtps:// URL
+     * here */
+    curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.net.");
+
+    /* Note that this option isn't strictly required, omitting it will result in
+     * libcurl will sent the MAIL FROM command with no sender data. All
+     * autoresponses should have an empty reverse-path, and should be directed
+     * to the address in the reverse-path which triggered them. Otherwise, they
+     * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+     */
+    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from);
+
+    /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array.  */
+    recipients = curl_slist_append(recipients, to);
+    curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+    /* You provide the payload (headers and the body of the message) as the
+     * "data" element. There are two choices, either:
+     * - provide a callback function and specify the function name using the
+     * CURLOPT_READFUNCTION option; or
+     * - just provide a FILE pointer that can be used to read the data from.
+     * The easiest case is just to read from standard input, (which is available
+     * as a FILE pointer) as shown here.
+     */
+    curl_easy_setopt(curl, CURLOPT_READDATA, stdin);
+
+    /* send the message (including headers) */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+
+    /* free the list of recipients */
+    curl_slist_free_all(recipients);
+
+    /* curl won't send the QUIT command until you call cleanup, so you should be
+     * able to re-use this connection for additional messages (setting
+     * CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
+     * curl_easy_perform() again. It may not be a good idea to keep the
+     * connection open for a very long time though (more than a few minutes may
+     * result in the server timing out the connection), and you do want to clean
+     * up in the end.
+     */
+    curl_easy_cleanup(curl);
+  }
+  return 0;
+}
index db3acca..74c5846 100644 (file)
@@ -1,18 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
 
 #include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-
 
 /* some requirements for this to work:
    1.   set pCertFile to the file with the client certificate
@@ -32,8 +41,9 @@
 
 */
 
-int main(int argc, char **argv)
+int main(void)
 {
+  int i;
   CURL *curl;
   CURLcode res;
   FILE *headerfile;
@@ -47,7 +57,7 @@ int main(int argc, char **argv)
 
   const char *pEngine;
 
-#if USE_ENGINE
+#ifdef USE_ENGINE
   pKeyName  = "rsa_test";
   pKeyType  = "ENG";
   pEngine   = "chil";            /* for nChiper HSM... */
@@ -67,7 +77,7 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_URL, "HTTPS://your.favourite.ssl.site");
     curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile);
 
-    while(1)                    /* do some ugly short cut... */
+    for(i = 0; i < 1; i++) /* single-iteration loop, just to break out from */
     {
       if (pEngine)             /* use crypto engine */
       {
@@ -109,8 +119,14 @@ int main(int argc, char **argv)
       /* disconnect if we can't validate server's cert */
       curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1L);
 
+      /* Perform the request, res will get the return code */
       res = curl_easy_perform(curl);
-      break;                   /* we are done... */
+      /* Check for errors */
+      if(res != CURLE_OK)
+        fprintf(stderr, "curl_easy_perform() failed: %s\n",
+                curl_easy_strerror(res));
+
+      /* we are done... */
     }
     /* always cleanup */
     curl_easy_cleanup(curl);
index 5b60ded..932f6e3 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is a multi threaded application that uses a progress bar to show
+ * 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.
+ *
+ ***************************************************************************/
+/* This is a multi threaded application that uses a progress bar to show
  * status.  It uses Gtk+ to make a smooth pulse.
  *
  * Written by Jud Bishop after studying the other examples provided with
@@ -24,8 +37,6 @@
 #include <pthread.h>
 
 #include <curl/curl.h>
-#include <curl/types.h> /* new for v7 */
-#include <curl/easy.h> /* new for v7 */
 
 #define NUMT 4
 
index 239172b..6462aff 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is an example application source code sending SMTP mail using the
+ * 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.
+ *
+ ***************************************************************************/
+/* This is an example application source code sending SMTP mail using the
  * multi interface.
  */
 
@@ -21,7 +34,7 @@
 #define SMTPSERVER "smtp.example.com"
 #define SMTPPORT ":587" /* it is a colon+port string, but you can set it
                            to "" to use the default port */
-#define RECEPIENT "receipient@example.com"
+#define RECIPIENT "<recipient@example.com>"
 #define MAILFROM "<realuser@example.com>"
 
 #define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
@@ -83,7 +96,6 @@ int main(void)
    CURLM *mcurl;
    int still_running = 1;
    struct timeval mp_start;
-   char mp_timedout = 0;
    struct WriteThis pooh;
    struct curl_slist* rcpt_list = NULL;
 
@@ -99,9 +111,9 @@ int main(void)
    if(!mcurl)
      return 2;
 
-   rcpt_list = curl_slist_append(rcpt_list, RECEPIENT);
+   rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
    /* more addresses can be added here
-      rcpt_list = curl_slist_append(rcpt_list, "others@example.com");
+      rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
    */
 
    curl_easy_setopt(curl, CURLOPT_URL, "smtp://" SMTPSERVER SMTPPORT);
@@ -110,16 +122,15 @@ int main(void)
    curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
    curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
-   curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
-   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER,0);
-   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
+   curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
    curl_easy_setopt(curl, CURLOPT_READDATA, &pooh);
-   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-   curl_easy_setopt(curl, CURLOPT_SSLVERSION, 0);
-   curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0);
+   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+   curl_easy_setopt(curl, CURLOPT_SSLVERSION, 0L);
+   curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
    curl_multi_add_handle(mcurl, curl);
 
-   mp_timedout = 0;
    mp_start = tvnow();
 
   /* we start some action by calling perform right away */
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
new file mode 100644 (file)
index 0000000..3635c10
--- /dev/null
@@ -0,0 +1,152 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the simplesmtp.c example, adding some
+ * authentication and transport security.
+ */
+
+#define FROM    "<sender@example.org>"
+#define TO      "<addressee@example.net>"
+#define CC      "<info@example.org>"
+
+static const char *payload_text[]={
+  "Date: Mon, 29 Nov 2010 21:54:29 +1100\n",
+  "To: " TO "\n",
+  "From: " FROM "(Example User)\n",
+  "Cc: " CC "(Another example User)\n",
+  "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\n",
+  "Subject: SMTP TLS example message\n",
+  "\n", /* empty line to divide headers from body, see RFC5322 */
+  "The body of the message starts here.\n",
+  "\n",
+  "It could be a lot of lines, could be MIME encoded, whatever.\n",
+  "Check RFC5322.\n",
+  NULL
+};
+
+struct upload_status {
+  int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+  struct upload_status *upload_ctx = (struct upload_status *)userp;
+  const char *data;
+
+  if ((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+    return 0;
+  }
+
+  data = payload_text[upload_ctx->lines_read];
+
+  if (data) {
+    size_t len = strlen(data);
+    memcpy(ptr, data, len);
+    upload_ctx->lines_read ++;
+    return len;
+  }
+  return 0;
+}
+
+
+int main(void)
+{
+  CURL *curl;
+  CURLcode res;
+  struct curl_slist *recipients = NULL;
+  struct upload_status upload_ctx;
+
+  upload_ctx.lines_read = 0;
+
+  curl = curl_easy_init();
+  if (curl) {
+    /* This is the URL for your mailserver. Note the use of port 587 here,
+     * instead of the normal SMTP port (25). Port 587 is commonly used for
+     * secure mail submission (see RFC4403), but you should use whatever
+     * matches your server configuration. */
+    curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
+
+    /* In this example, we'll start with a plain text connection, and upgrade
+     * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+     * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+     * will continue anyway - see the security discussion in the libcurl
+     * tutorial for more details. */
+    curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+    /* If your server doesn't have a valid certificate, then you can disable
+     * part of the Transport Layer Security protection by setting the
+     * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+     *   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+     *   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+     * That is, in general, a bad idea. It is still better than sending your
+     * authentication details in plain text though.
+     * Instead, you should get the issuer certificate (or the host certificate
+     * if the certificate is self-signed) and add it to the set of certificates
+     * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+     * docs/SSLCERTS for more information.
+     */
+    curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+    /* A common reason for requiring transport security is to protect
+     * authentication details (user names and passwords) from being "snooped"
+     * on the network. Here is how the user name and password are provided: */
+    curl_easy_setopt(curl, CURLOPT_USERNAME, "user@example.net");
+    curl_easy_setopt(curl, CURLOPT_PASSWORD, "P@ssw0rd");
+
+    /* value for envelope reverse-path */
+    curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+    /* Add two recipients, in this particular case they correspond to the
+     * To: and Cc: addressees in the header, but they could be any kind of
+     * recipient. */
+    recipients = curl_slist_append(recipients, TO);
+    recipients = curl_slist_append(recipients, CC);
+    curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+    /* In this case, we're using a callback function to specify the data. You
+     * could just use the CURLOPT_READDATA option to specify a FILE pointer to
+     * read from.
+     */
+    curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+    curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+
+    /* Since the traffic will be encrypted, it is very useful to turn on debug
+     * information within libcurl to see what is happening during the transfer.
+     */
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+    /* send the message (including headers) */
+    res = curl_easy_perform(curl);
+    /* Check for errors */
+    if(res != CURLE_OK)
+      fprintf(stderr, "curl_easy_perform() failed: %s\n",
+              curl_easy_strerror(res));
+
+    /* free the list of recipients and clean up */
+    curl_slist_free_all(recipients);
+    curl_easy_cleanup(curl);
+  }
+  return 0;
+}
index 4ed031a..14d77de 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This example code only builds as-is on Windows.
+ * 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.
+ *
+ ***************************************************************************/
+/* This example code only builds as-is on Windows.
  *
  * While Unix/Linux user, you do not need this software.
  * You can achieve the same result as synctime using curl, awk and date.
@@ -134,7 +147,7 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
                                          TmpStr1 & 2? */
         AutoSyncTime = 0;
       else {
-        RetVal = sscanf ((char *)(ptr), "Date: %s %d %s %d %d:%d:%d",
+        RetVal = sscanf ((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
                          TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
                          &SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond);
 
index 284edc4..a7e9c2d 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * A multi-threaded example that uses pthreads and fetches 4 remote files at
+ * 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.
+ *
+ ***************************************************************************/
+/* A multi-threaded example that uses pthreads and fetches 4 remote files at
  * once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
  * (libgcrypt) so far.
  *
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
new file mode 100644 (file)
index 0000000..64d27c8
--- /dev/null
@@ -0,0 +1,81 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+  size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+  return written;
+}
+
+int main(int argc, char *argv[])
+{
+  CURL *curl_handle;
+  static const char *pagefilename = "page.out";
+  FILE *pagefile;
+
+  if(argc < 2 ) {
+    printf("Usage: %s <URL>\n", argv[0]);
+    return 1;
+  }
+
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  /* init the curl session */
+  curl_handle = curl_easy_init();
+
+  /* set URL to get here */
+  curl_easy_setopt(curl_handle, CURLOPT_URL, argv[1]);
+
+  /* Switch on full protocol/debug output while testing */
+  curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+
+  /* disable progress meter, set to 0L to enable and disable debug output */
+  curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+
+  /* send all data to this function  */
+  curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
+
+  /* open the file */
+  pagefile = fopen(pagefilename, "wb");
+  if (pagefile) {
+
+    /* write the page body to this file handle. CURLOPT_FILE is also known as
+       CURLOPT_WRITEDATA*/
+    curl_easy_setopt(curl_handle, CURLOPT_FILE, pagefile);
+
+    /* get it! */
+    curl_easy_perform(curl_handle);
+
+    /* close the header file */
+    fclose(pagefile);
+  }
+
+  /* cleanup curl stuff */
+  curl_easy_cleanup(curl_handle);
+
+  return 0;
+}
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
new file mode 100644 (file)
index 0000000..99740fd
--- /dev/null
@@ -0,0 +1,211 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, 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.
+ *
+ ***************************************************************************/
+/* Example using an in memory PEM user certificate and RSA key to retrieve an
+ * https page.
+ * Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
+ * Note this example does not use a CA certificate, however one should be used
+ * if you want a properly secure connection
+ */
+
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <curl/curl.h>
+#include <stdio.h>
+
+static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+  fwrite(ptr,size,nmemb,stream);
+  return(nmemb*size);
+}
+
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
+{
+  X509 *cert = NULL;
+  BIO *bio = NULL;
+  BIO *kbio = NULL;
+  RSA *rsa = NULL;
+  int ret;
+
+  const char *mypem = /* www.cacert.org */
+    "-----BEGIN CERTIFICATE-----\n"\
+    "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\
+    "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\
+    "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n"\
+    "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n"\
+    "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi\n"\
+    "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ\n"\
+    "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC\n"\
+    "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ\n"\
+    "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6\n"\
+    "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y\n"\
+    "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7\n"\
+    "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc\n"\
+    "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k\n"\
+    "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q\n"\
+    "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQ\n"\
+    "QUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivU\n"\
+    "fslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826\n"\
+    "YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4w\n"\
+    "ggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGY\n"\
+    "gBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEe\n"\
+    "MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0\n"\
+    "IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2Vy\n"\
+    "dC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRw\n"\
+    "czovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0\n"\
+    "dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYl\n"\
+    "aHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhC\n"\
+    "AQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQg\n"\
+    "b3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIB\n"\
+    "ACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCc\n"\
+    "nWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg\n"\
+    "18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/c\n"\
+    "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl\n"\
+    "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY\n"\
+    "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T\n"\
+    "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF\n"\
+    "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum\n"\
+    "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n"\
+    "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n"\
+    "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\
+    "-----END CERTIFICATE-----\n";
+
+/*replace the XXX with the actual RSA key*/
+  const char *mykey =
+    "-----BEGIN RSA PRIVATE KEY-----\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+    "-----END RSA PRIVATE KEY-----\n";
+
+  (void)curl; /* avoid warnings */
+  (void)parm; /* avoid warnings */
+
+  /* get a BIO */
+  bio = BIO_new_mem_buf((char *)mypem, -1);
+
+  if (bio == NULL) {
+    printf("BIO_new_mem_buf failed\n");
+  }
+
+  /* use it to read the PEM formatted certificate from memory into an X509
+   * structure that SSL can use
+   */
+  cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
+  if (cert == NULL) {
+    printf("PEM_read_bio_X509 failed...\n");
+  }
+
+  /*tell SSL to use the X509 certificate*/
+  ret = SSL_CTX_use_certificate((SSL_CTX*)sslctx, cert);
+  if (ret != 1) {
+    printf("Use certificate failed\n");
+  }
+
+  /*create a bio for the RSA key*/
+  kbio = BIO_new_mem_buf((char *)mykey, -1);
+  if (kbio == NULL) {
+    printf("BIO_new_mem_buf failed\n");
+  }
+
+  /*read the key bio into an RSA object*/
+  rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL);
+  if (rsa == NULL) {
+    printf("Failed to create key bio\n");
+  }
+
+  /*tell SSL to use the RSA key from memory*/
+  ret = SSL_CTX_use_RSAPrivateKey((SSL_CTX*)sslctx, rsa);
+  if (ret != 1) {
+    printf("Use Key failed\n");
+  }
+
+
+  /* all set to go */
+  return CURLE_OK ;
+}
+
+int main(void)
+{
+  CURL *ch;
+  CURLcode rv;
+
+  rv = curl_global_init(CURL_GLOBAL_ALL);
+  ch = curl_easy_init();
+  rv = curl_easy_setopt(ch,CURLOPT_VERBOSE, 0L);
+  rv = curl_easy_setopt(ch,CURLOPT_HEADER, 0L);
+  rv = curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1L);
+  rv = curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1L);
+  rv = curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
+  rv = curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
+  rv = curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
+  rv = curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
+  rv = curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
+
+  /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is
+     no CA certificate*/
+
+  rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER, 0L);
+  rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYHOST, 0L);
+  rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+  rv = curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
+
+  /* first try: retrieve page without user certificate and key -> will fail
+   */
+  rv = curl_easy_perform(ch);
+  if (rv==CURLE_OK) {
+    printf("*** transfer succeeded ***\n");
+  }
+  else {
+    printf("*** transfer failed ***\n");
+  }
+
+  /* second try: retrieve page using user certificate and key -> will succeed
+   * load the certificate and key by installing a function doing the necessary
+   * "modifications" to the SSL CONTEXT just before link init
+   */
+  rv = curl_easy_setopt(ch,CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+  rv = curl_easy_perform(ch);
+  if (rv==CURLE_OK) {
+    printf("*** transfer succeeded ***\n");
+  }
+  else {
+    printf("*** transfer failed ***\n");
+  }
+
+  curl_easy_cleanup(ch);
+  curl_global_cleanup();
+  return rv;
+}
index 9b6a268..92f0808 100755 (executable)
@@ -90,7 +90,7 @@ my @recent = reverse sort sortversions keys %used;
 # the most recent symbol
 my $newsym = $recent[0];
 # the most recent version
-my $newver = $doc{$newsym}; 
+my $newver = $doc{$newsym};
 
 print "The scanned source uses these symbols introduced in $newver:\n";
 
diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c
new file mode 100644 (file)
index 0000000..4d67f98
--- /dev/null
@@ -0,0 +1,158 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+/* Stream-parse a document using the streaming Expat parser.
+ * Written by David Strauss
+ *
+ * Expat => http://www.libexpat.org/
+ *
+ * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <expat.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+  char *memory;
+  size_t size;
+};
+
+struct ParserStruct {
+  int ok;
+  size_t tags;
+  size_t depth;
+  struct MemoryStruct characters;
+};
+
+static void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
+{
+  struct ParserStruct *state = (struct ParserStruct *) userData;
+  state->tags++;
+  state->depth++;
+
+  /* Get a clean slate for reading in character data. */
+  free(state->characters.memory);
+  state->characters.memory = NULL;
+  state->characters.size = 0;
+}
+
+static void characterDataHandler(void *userData, const XML_Char *s, int len)
+{
+  struct ParserStruct *state = (struct ParserStruct *) userData;
+  struct MemoryStruct *mem = &state->characters;
+
+  mem->memory = realloc(mem->memory, mem->size + len + 1);
+  if(mem->memory == NULL) {
+    /* Out of memory. */
+    fprintf(stderr, "Not enough memory (realloc returned NULL).\n");
+    state->ok = 0;
+    return;
+  }
+
+  memcpy(&(mem->memory[mem->size]), s, len);
+  mem->size += len;
+  mem->memory[mem->size] = 0;
+}
+
+static void endElement(void *userData, const XML_Char *name)
+{
+  struct ParserStruct *state = (struct ParserStruct *) userData;
+  state->depth--;
+
+  printf("%5lu   %10lu   %s\n", state->depth, state->characters.size, name);
+}
+
+static size_t parseStreamCallback(void *contents, size_t length, size_t nmemb, void *userp)
+{
+  XML_Parser parser = (XML_Parser) userp;
+  size_t real_size = length * nmemb;
+  struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
+
+  /* Only parse if we're not already in a failure state. */
+  if (state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
+    int error_code = XML_GetErrorCode(parser);
+    fprintf(stderr, "Parsing response buffer of length %lu failed with error code %d (%s).\n",
+            real_size, error_code, XML_ErrorString(error_code));
+    state->ok = 0;
+  }
+
+  return real_size;
+}
+
+int main(void)
+{
+  CURL *curl_handle;
+  CURLcode res;
+  XML_Parser parser;
+  struct ParserStruct state;
+
+  /* Initialize the state structure for parsing. */
+  memset(&state, 0, sizeof(struct ParserStruct));
+  state.ok = 1;
+
+  /* Initialize a namespace-aware parser. */
+  parser = XML_ParserCreateNS(NULL, '\0');
+  XML_SetUserData(parser, &state);
+  XML_SetElementHandler(parser, startElement, endElement);
+  XML_SetCharacterDataHandler(parser, characterDataHandler);
+
+  /* Initalize a libcurl handle. */
+  curl_global_init(CURL_GLOBAL_ALL ^ CURL_GLOBAL_SSL);
+  curl_handle = curl_easy_init();
+  curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.w3schools.com/xml/simple.xml");
+  curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback);
+  curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser);
+
+  printf("Depth   Characters   Closing Tag\n");
+
+  /* Perform the request and any follow-up parsing. */
+  res = curl_easy_perform(curl_handle);
+  if(res != CURLE_OK) {
+    fprintf(stderr, "curl_easy_perform() failed: %s\n",
+            curl_easy_strerror(res));
+  }
+  else if (state.ok) {
+    /* Expat requires one final call to finalize parsing. */
+    if (XML_Parse(parser, NULL, 0, 1) == 0) {
+      int error_code = XML_GetErrorCode(parser);
+      fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
+              error_code, XML_ErrorString(error_code));
+    }
+    else {
+      printf("                     --------------\n");
+      printf("                     %lu tags total\n", state.tags);
+    }
+  }
+
+  /* Clean up. */
+  free(state.characters.memory);
+  XML_ParserFree(parser);
+  curl_easy_cleanup(curl_handle);
+  curl_global_cleanup();
+
+  return 0;
+}
index f53411b..4390378 100644 (file)
@@ -12,7 +12,7 @@
 <br><a href="curl.html">curl</A>
 
 <h2>Tutorial</h2>
-<a href="../TheArtOfHttpScripting.gz">The Art Of Scripting HTTP Requests Using Curl</a> (plain text)
+<a href="TheArtOfHttpScripting">The Art Of Scripting HTTP Requests Using Curl</a> (plain text)
 
 <h2>libcurl</h2>
 See the <a href="libcurl/index.html">libcurl section</a>
index 3f949d6..3114e2b 100644 (file)
@@ -1,5 +1,24 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2012, 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.
+#
+###########################################################################
 
 AUTOMAKE_OPTIONS = foreign no-dependencies
 
@@ -19,7 +38,7 @@ man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3    \
  curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3           \
  curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3                \
  curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3                    \
- curl_multi_socket_action.3
+ curl_multi_socket_action.3 curl_multi_wait.3
 
 HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html              \
  curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html      \
@@ -39,7 +58,7 @@ HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html             \
  curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
  curl_multi_timeout.html curl_formget.html curl_multi_assign.html      \
  curl_easy_pause.html curl_easy_recv.html curl_easy_send.html          \
- curl_multi_socket_action.html
+ curl_multi_socket_action.html curl_multi_wait.html
 
 PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf                  \
  curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf          \
@@ -58,12 +77,12 @@ PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf                       \
  curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf      \
  curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf          \
  curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf           \
- curl_easy_send.pdf curl_multi_socket_action.pdf
+ curl_easy_send.pdf curl_multi_socket_action.pdf curl_multi_wait.pdf
 
 CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
 
 EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
-  symbols-in-versions
+  symbols-in-versions symbols.pl
 MAN2HTML= roffit --mandir=. < $< >$@
 
 SUFFIXES = .3 .html
index 4815127..fa1939d 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 @SET_MAKE@
 
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
 #
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+# 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.
+#
+###########################################################################
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -39,54 +100,105 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = docs/libcurl
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 depcomp =
 am__depfiles_maybe =
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 man3dir = $(mandir)/man3
 am__installdirs = "$(DESTDIR)$(man3dir)"
 MANS = $(man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -103,7 +215,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -116,15 +229,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -134,6 +249,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -141,16 +259,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -163,7 +277,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -176,34 +289,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -215,6 +328,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -234,7 +348,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -244,9 +357,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign no-dependencies
 man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3     \
  curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3           \
@@ -264,7 +381,7 @@ man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3  \
  curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3           \
  curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3                \
  curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3                    \
- curl_multi_socket_action.3
+ curl_multi_socket_action.3 curl_multi_wait.3
 
 HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html              \
  curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html      \
@@ -284,7 +401,7 @@ HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html           \
  curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
  curl_multi_timeout.html curl_formget.html curl_multi_assign.html      \
  curl_easy_pause.html curl_easy_recv.html curl_easy_send.html          \
- curl_multi_socket_action.html
+ curl_multi_socket_action.html curl_multi_wait.html
 
 PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf                  \
  curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf          \
@@ -303,11 +420,11 @@ PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf                     \
  curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf      \
  curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf          \
  curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf           \
- curl_easy_send.pdf curl_multi_socket_action.pdf
+ curl_easy_send.pdf curl_multi_socket_action.pdf curl_multi_wait.pdf
 
 CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
 EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
-  symbols-in-versions
+  symbols-in-versions symbols.pl
 
 MAN2HTML = roffit --mandir=. < $< >$@
 SUFFIXES = .3 .html
@@ -319,14 +436,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  docs/libcurl/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  docs/libcurl/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/libcurl/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign docs/libcurl/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -344,92 +461,90 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
-
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-install-man3: $(man3_MANS) $(man_MANS)
+install-man3: $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
-       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.3*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(man_MANS)'; \
+       test -n "$(man3dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.3[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           3*) ;; \
-           *) ext='3' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man3:
        @$(NORMAL_UNINSTALL)
-       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.3*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           3*) ;; \
-           *) ext='3' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
-       done
-tags: TAGS
-TAGS:
+       @list=''; test -n "$(man3dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.3[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -438,7 +553,7 @@ check: check-am
 all-am: Makefile $(MANS)
 installdirs:
        for dir in "$(DESTDIR)$(man3dir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -450,10 +565,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -461,6 +581,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -471,24 +592,44 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
 dvi-am:
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am: install-man
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man: install-man3
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -505,19 +646,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-man
+uninstall-am: uninstall-man
 
 uninstall-man: uninstall-man3
 
+.MAKE: install-am install-strip
+
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-man3 \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am uninstall-info-am uninstall-man \
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man3 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags-am uninstall uninstall-am uninstall-man \
        uninstall-man3
 
 
@@ -534,6 +679,7 @@ pdf: $(PDFPAGES)
        ps2pdf $$foo.ps $@; \
        rm $$foo.ps; \
        echo "converted $< to $@")
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 75a3703..d8a3f9f 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2011, 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
@@ -37,8 +37,15 @@ This will effectively close all connections this handle has used and possibly
 has kept open until now. Don't call this function if you intend to transfer
 more files.
 
-Any uses of the \fBhandle\fP after this function has been called are
-illegal. This kills the handle and all memory associated with it!
+Occasionally you may get your progress callback or header callback called from
+within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using
+\fIcurl_easy_setopt(3)\fP). Like if libcurl decides to shut down the
+connection and the protocol is of a kind that requires a command/response
+sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP.
+
+Any uses of the \fBhandle\fP after this function has been called and have
+returned, are illegal. This kills the handle and all memory associated with
+it!
 
 With libcurl versions prior to 7.17.: when you've called this, you can safely
 remove all the strings you've previously told libcurl to use, as it won't use
index bc113e6..2ea921d 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -50,7 +52,8 @@ p.roffit {
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">This function must be the last function to call for an easy session. It is the opposite of the <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> function and must be called with the same <span Class="emphasis">handle</span> as input that the curl_easy_init call returned. 
 <p class="level0">This will effectively close all connections this handle has used and possibly has kept open until now. Don't call this function if you intend to transfer more files. 
-<p class="level0">Any uses of the <span Class="bold">handle</span> after this function has been called are illegal. This kills the handle and all memory associated with it! 
+<p class="level0">Occasionally you may get your progress callback or header callback called from within <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> (if previously set for the handle using <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>). Like if libcurl decides to shut down the connection and the protocol is of a kind that requires a command/response sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP. 
+<p class="level0">Any uses of the <span Class="bold">handle</span> after this function has been called and have returned, are illegal. This kills the handle and all memory associated with it! 
 <p class="level0">With libcurl versions prior to 7.17.: when you've called this, you can safely remove all the strings you've previously told libcurl to use, as it won't use them anymore now. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <span Class="manpage"> </span> 
index 76a0306..cf588e5 100644 (file)
Binary files a/docs/libcurl/curl_easy_cleanup.pdf and b/docs/libcurl/curl_easy_cleanup.pdf differ
index 3fae30e..e53ced4 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
 .SH NAME
 curl_easy_duphandle - Clone a libcurl session handle
index d072ded..f84f0d3 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_duphandle man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index b8fcc8b..864fedf 100644 (file)
Binary files a/docs/libcurl/curl_easy_duphandle.pdf and b/docs/libcurl/curl_easy_duphandle.pdf differ
index 2c09875..3a98e6f 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2011, 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
@@ -31,8 +31,8 @@ curl_easy_escape - URL encodes the given string
 .SH DESCRIPTION
 This function converts the given input string to an URL encoded string and
 returns that as a new allocated string. All input characters that are not a-z,
-A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a
-two-digit hexadecimal number).
+A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version
+(%NN where NN is a two-digit hexadecimal number).
 
 If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
 uses strlen() on the input \fBurl\fP to find out the size.
index 1ecf464..64b65dc 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_escape man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -48,11 +50,11 @@ p.roffit {
 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
 <p class="level0"><span Class="bold">char *curl_easy_escape( CURL * curl , char * url , int length  );</span> 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function converts the given input string to an URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number). 
+<p class="level0">This function converts the given input string to an URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number). 
 <p class="level0">If the <span Class="bold">length</span> argument is set to 0 (zero), <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> uses strlen() on the input <span Class="bold">url</span> to find out the size. 
 <p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_escape.html">curl_escape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_unescape.html">curl_easy_unescape (3)</a> <a class="manpage" href="./curl_free.html">  curl_free (3)</a> <span Class="manpage">  RFC 2396</span> <p class="roffit">
+<p class="level0"><a class="manpage" href="./curl_easy_unescape.html">curl_easy_unescape (3)</a> <a class="manpage" href="./curl_free.html">  curl_free (3)</a> <span Class="manpage">  <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a></span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 0f44f22..cf281c8 100644 (file)
Binary files a/docs/libcurl/curl_easy_escape.pdf and b/docs/libcurl/curl_easy_escape.pdf differ
index 9f298ed..62d8ae4 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2012, 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
@@ -44,11 +44,13 @@ The following information can be extracted:
 .IP CURLINFO_EFFECTIVE_URL
 Pass a pointer to a char pointer to receive the last used effective URL.
 .IP CURLINFO_RESPONSE_CODE
-Pass a pointer to a long to receive the last received HTTP or FTP code. This
-option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This
-will be zero if no server response code has been received. Note that a proxy's
-CONNECT response should be read with \fICURLINFO_HTTP_CONNECTCODE\fP and not
-this.
+Pass a pointer to a long to receive the last received HTTP, FTP or SMTP
+response code. This option was previously known as CURLINFO_HTTP_CODE in
+libcurl 7.10.7 and earlier. The value will be zero if no server response code
+has been received. Note that a proxy's CONNECT response should be read with
+\fICURLINFO_HTTP_CONNECTCODE\fP and not this.
+
+Support for SMTP responses added in 7.25.0.
 .IP CURLINFO_HTTP_CONNECTCODE
 Pass a pointer to a long to receive the last received proxy response code to a
 CONNECT request.
@@ -80,12 +82,13 @@ waits in line for the pipeline and more. (Added in 7.19.0)
 Pass a pointer to a double to receive the time, in seconds, it took from the
 start until the file transfer is just about to begin. This includes all
 pre-transfer commands and negotiations that are specific to the particular
-protocol(s) involved.
+protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
+specific request that triggers a transfer.
 .IP CURLINFO_STARTTRANSFER_TIME
 Pass a pointer to a double to receive the time, in seconds, it took from the
-start until the first byte is just about to be transferred. This includes
-CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
-the result.
+start until the first byte is received by libcurl. This includes
+CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the
+result.
 .IP CURLINFO_REDIRECT_TIME
 Pass a pointer to a double to receive the total time, in seconds, it took for
 all redirection steps include name lookup, connect, pretransfer and transfer
@@ -159,7 +162,7 @@ method(s) available for your proxy authentication.  (Added in 7.10.8)
 .IP CURLINFO_OS_ERRNO
 Pass a pointer to a long to receive the errno variable from a connect failure.
 Note that the value is only set on failure, it is not reset upon a
-successfull operation.  (Added in 7.12.2)
+successful operation.  (Added in 7.12.2)
 .IP CURLINFO_NUM_CONNECTS
 Pass a pointer to a long to receive how many new connections libcurl had to
 create to achieve the previous transfer (only the successful connects are
@@ -206,6 +209,8 @@ Pass a pointer to a char pointer to receive a pointer to a string holding the
 path of the entry path. That is the initial path libcurl ended up in when
 logging on to the remote FTP server. This stores a NULL as pointer if
 something is wrong. (Added in 7.15.4)
+
+Also works for SFTP since 7.21.4
 .IP CURLINFO_CERTINFO
 Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
 struct that holds a number of linked lists with info about the certificate
@@ -227,7 +232,7 @@ Pass a pointer to a char pointer to receive a pointer to a string holding the
 most recent RTSP Session ID.
 
 Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
 .IP CURLINFO_RTSP_CLIENT_CSEQ
 Pass a pointer to a long to receive the next CSeq that will be used by the
 application.
@@ -239,7 +244,7 @@ by the application.
 unimplemented).\fP
 
 Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
 .IP CURLINFO_RTSP_CSEQ_RECV
 Pass a pointer to a long to receive the most recently received CSeq from the
 server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you
@@ -273,7 +278,7 @@ file transfer is just about to begin. This includes all pre-transfer commands
 and negotiations that are specific to the particular protocol(s) involved.
 .IP STARTTRANSFER
 \fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
-first byte is just about to be transferred.
+first byte is received by libcurl.
 .IP TOTAL
 \fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
 .IP REDIRECT
index 5b949e9..6a9967d 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_getinfo man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,7 +56,8 @@ p.roffit {
 <p class="level0"><a name="CURLINFOEFFECTIVEURL"></a><span class="nroffip">CURLINFO_EFFECTIVE_URL</span> 
 <p class="level1">Pass a pointer to a char pointer to receive the last used effective URL. 
 <p class="level0"><a name="CURLINFORESPONSECODE"></a><span class="nroffip">CURLINFO_RESPONSE_CODE</span> 
-<p class="level1">Pass a pointer to a long to receive the last received HTTP or FTP code. This option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with <a class="emphasis" href="#CURLINFOHTTPCONNECTCODE">CURLINFO_HTTP_CONNECTCODE</a> and not this. 
+<p class="level1">Pass a pointer to a long to receive the last received HTTP, FTP or SMTP response code. This option was previously known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. The value will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with <a class="emphasis" href="#CURLINFOHTTPCONNECTCODE">CURLINFO_HTTP_CONNECTCODE</a> and not this. 
+<p class="level1">Support for SMTP responses added in 7.25.0. 
 <p class="level0"><a name="CURLINFOHTTPCONNECTCODE"></a><span class="nroffip">CURLINFO_HTTP_CONNECTCODE</span> 
 <p class="level1">Pass a pointer to a long to receive the last received proxy response code to a CONNECT request. 
 <p class="level0"><a name="CURLINFOFILETIME"></a><span class="nroffip">CURLINFO_FILETIME</span> 
@@ -68,9 +71,9 @@ p.roffit {
 <p class="level0"><a name="CURLINFOAPPCONNECTTIME"></a><span class="nroffip">CURLINFO_APPCONNECT_TIME</span> 
 <p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed. This time is most often very near to the PRETRANSFER time, except for cases such as HTTP pippelining where the pretransfer time can be delayed due to waits in line for the pipeline and more. (Added in 7.19.0) 
 <p class="level0"><a name="CURLINFOPRETRANSFERTIME"></a><span class="nroffip">CURLINFO_PRETRANSFER_TIME</span> 
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. 
+<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. It does <span Class="emphasis">not</span> involve the sending of the protocol- specific request that triggers a transfer. 
 <p class="level0"><a name="CURLINFOSTARTTRANSFERTIME"></a><span class="nroffip">CURLINFO_STARTTRANSFER_TIME</span> 
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be transferred. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result. 
+<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is received by libcurl. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result. 
 <p class="level0"><a name="CURLINFOREDIRECTTIME"></a><span class="nroffip">CURLINFO_REDIRECT_TIME</span> 
 <p class="level1">Pass a pointer to a double to receive the total time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. CURLINFO_REDIRECT_TIME contains the complete execution time for multiple redirections.  (Added in 7.9.7) 
 <p class="level0"><a name="CURLINFOREDIRECTCOUNT"></a><span class="nroffip">CURLINFO_REDIRECT_COUNT</span> 
@@ -106,7 +109,7 @@ p.roffit {
 <p class="level0"><a name="CURLINFOPROXYAUTHAVAIL"></a><span class="nroffip">CURLINFO_PROXYAUTH_AVAIL</span> 
 <p class="level1">Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication.  (Added in 7.10.8) 
 <p class="level0"><a name="CURLINFOOSERRNO"></a><span class="nroffip">CURLINFO_OS_ERRNO</span> 
-<p class="level1">Pass a pointer to a long to receive the errno variable from a connect failure. Note that the value is only set on failure, it is not reset upon a successfull operation.  (Added in 7.12.2) 
+<p class="level1">Pass a pointer to a long to receive the errno variable from a connect failure. Note that the value is only set on failure, it is not reset upon a successful operation.  (Added in 7.12.2) 
 <p class="level0"><a name="CURLINFONUMCONNECTS"></a><span class="nroffip">CURLINFO_NUM_CONNECTS</span> 
 <p class="level1">Pass a pointer to a long to receive how many new connections libcurl had to create to achieve the previous transfer (only the successful connects are counted).  Combined with <a class="emphasis" href="#CURLINFOREDIRECTCOUNT">CURLINFO_REDIRECT_COUNT</a> you are able to know how many times libcurl successfully reused existing connection(s) or not.  See the Connection Options of <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> to see how libcurl tries to make persistent connections to save time.  (Added in 7.12.3) 
 <p class="level0"><a name="CURLINFOPRIMARYIP"></a><span class="nroffip">CURLINFO_PRIMARY_IP</span> 
@@ -124,19 +127,20 @@ p.roffit {
 <p class="level1">NOTE: this API is not really working on win64, since the SOCKET type on win64 is 64 bit large while its 'long' is only 32 bits. 
 <p class="level0"><a name="CURLINFOFTPENTRYPATH"></a><span class="nroffip">CURLINFO_FTP_ENTRY_PATH</span> 
 <p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the path of the entry path. That is the initial path libcurl ended up in when logging on to the remote FTP server. This stores a NULL as pointer if something is wrong. (Added in 7.15.4) 
+<p class="level1">Also works for SFTP since 7.21.4 
 <p class="level0"><a name="CURLINFOCERTINFO"></a><span class="nroffip">CURLINFO_CERTINFO</span> 
 <p class="level1">Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to struct that holds a number of linked lists with info about the certificate chain, assuming you had CURLOPT_CERTINFO enabled when the previous request was done. The struct reports how many certs it found and then you can extract info for each of those certs by following the linked lists. The info chain is provided in a series of data in the format "name:content" where the content is for the specific named data. See also the certinfo.c example. NOTE: this option is only available in libcurl built with OpenSSL support. (Added in 7.19.1) 
 <p class="level0"><a name="CURLINFOCONDITIONUNMET"></a><span class="nroffip">CURLINFO_CONDITION_UNMET</span> 
 <p class="level1">Pass a pointer to a long to receive the number 1 if the condition provided in the previous request didn't match (see <span Class="emphasis">CURLOPT_TIMECONDITION</span>). Alas, if this returns a 1 you know that the reason you didn't get data in return is because it didn't fulfill the condition. The long ths argument points to will get a zero stored if the condition instead was met. (Added in 7.19.4) 
 <p class="level0"><a name="CURLINFORTSPSESSIONID"></a><span class="nroffip">CURLINFO_RTSP_SESSION_ID</span> 
 <p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the most recent RTSP Session ID. 
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection. 
+<p class="level1">Applications wishing to resume an RTSP session on another connection should retrieve this info before closing the active connection. 
 <p class="level0"><a name="CURLINFORTSPCLIENTCSEQ"></a><span class="nroffip">CURLINFO_RTSP_CLIENT_CSEQ</span> 
 <p class="level1">Pass a pointer to a long to receive the next CSeq that will be used by the application. 
 <p class="level0"><a name="CURLINFORTSPSERVERCSEQ"></a><span class="nroffip">CURLINFO_RTSP_SERVER_CSEQ</span> 
 <p class="level1">Pass a pointer to a long to receive the next server CSeq that will be expected by the application. 
 <p class="level1"><span class="emphasis">(NOTE: listening for server initiated requests is currently unimplemented).</span> 
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection. 
+<p class="level1">Applications wishing to resume an RTSP session on another connection should retrieve this info before closing the active connection. 
 <p class="level0"><a name="CURLINFORTSPCSEQRECV"></a><span class="nroffip">CURLINFO_RTSP_CSEQ_RECV</span> 
 <p class="level1">Pass a pointer to a long to receive the most recently received CSeq from the server. If your application encounters a <span Class="emphasis">CURLE_RTSP_CSEQ_ERROR</span> then you may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this value. <a name="TIMES"></a><h2 class="nroffsh">TIMES</h2>
 <p class="level0"><pre>
@@ -162,7 +166,7 @@ p.roffit {
 <p class="level0"><a name="PRETRANSFER"></a><span class="nroffip">PRETRANSFER</span> 
 <p class="level1"><a class="emphasis" href="#CURLINFOPRETRANSFERTIME">CURLINFO_PRETRANSFER_TIME</a>. The time it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. 
 <p class="level0"><a name="STARTTRANSFER"></a><span class="nroffip">STARTTRANSFER</span> 
-<p class="level1"><a class="emphasis" href="#CURLINFOSTARTTRANSFERTIME">CURLINFO_STARTTRANSFER_TIME</a>. The time it took from the start until the first byte is just about to be transferred
+<p class="level1"><a class="emphasis" href="#CURLINFOSTARTTRANSFERTIME">CURLINFO_STARTTRANSFER_TIME</a>. The time it took from the start until the first byte is received by libcurl
 <p class="level0"><a name="TOTAL"></a><span class="nroffip">TOTAL</span> 
 <p class="level1"><a class="emphasis" href="#CURLINFOTOTALTIME">CURLINFO_TOTAL_TIME</a>. Total time of the previous request. 
 <p class="level0"><a name="REDIRECT"></a><span class="nroffip">REDIRECT</span> 
index 53e77f8..d5d43b6 100644 (file)
Binary files a/docs/libcurl/curl_easy_getinfo.pdf and b/docs/libcurl/curl_easy_getinfo.pdf differ
index 478db5c..837ba32 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
 .SH NAME
 curl_easy_init - Start a libcurl easy session
index 7e63cbd..2f547dc 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_init man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index c7bd250..18cdc7c 100644 (file)
Binary files a/docs/libcurl/curl_easy_init.pdf and b/docs/libcurl/curl_easy_init.pdf differ
index 4d16ecf..7debfd8 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2013, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
 .SH NAME
 curl_easy_pause - pause and unpause a connection
@@ -48,6 +68,18 @@ code means something wrong occurred after the new state was set.  See the
 .SH AVAILABILITY
 This function was added in libcurl 7.18.0. Before this version, there was no
 explicit support for pausing transfers.
+.SH "USAGE WITH THE MULTI-SOCKET INTERFACE"
+Before libcurl 7.32.0, when a specific handle was unpaused with this function,
+there was no particular forced rechecking or similar of the socket's state,
+which made the continuation of the transfer get delayed until next
+multi-socket call invoke or even longer. Alternatively, the user could
+forcibly call for example curl_multi_socket_all(3) - with a rather hefty
+performance penalty.
+
+Starting in libcurl 7.32.0, unpausing a transfer will schedule a timeout
+trigger for that handle 1 millisecond into the future, so that a
+curl_multi_socket_action( ... CURL_SOCKET_TIMEOUT) can be used immediately
+afterwards to get the transfer going again as desired.
 .SH "MEMORY USE"
 When pausing a read by returning the magic return code from a write callback,
 the read data is already in libcurl's internal buffers so it'll have to keep
index a82a77b..866a848 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_pause man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -63,7 +65,9 @@ p.roffit {
 <p class="level0"><a name="CURLPAUSECONT"></a><span class="nroffip">CURLPAUSE_CONT</span> 
 <p class="level1">Convenience define that unpauses both directions <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">CURLE_OK (zero) means that the option was set properly, and a non-zero return code means something wrong occurred after the new state was set.  See the <span Class="emphasis">libcurl-errors(3)</span> man page for the full list with descriptions. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.18.0. Before this version, there was no explicit support for pausing transfers. <a name="MEMORY"></a><h2 class="nroffsh">MEMORY USE</h2>
+<p class="level0">This function was added in libcurl 7.18.0. Before this version, there was no explicit support for pausing transfers. <a name="USAGE"></a><h2 class="nroffsh">USAGE WITH THE MULTI-SOCKET INTERFACE</h2>
+<p class="level0">Before libcurl 7.32.0, when a specific handle was unpaused with this function, there was no particular forced rechecking or similar of the socket's state, which made the continuation of the transfer get delayed until next multi-socket call invoke or even longer. Alternatively, the user could forcibly call for example curl_multi_socket_all(3) - with a rather hefty performance penalty. 
+<p class="level0">Starting in libcurl 7.32.0, unpausing a transfer will schedule a timeout trigger for that handle 1 millisecond into the future, so that a curl_multi_socket_action( ... CURL_SOCKET_TIMEOUT) can be used immediately afterwards to get the transfer going again as desired. <a name="MEMORY"></a><h2 class="nroffsh">MEMORY USE</h2>
 <p class="level0">When pausing a read by returning the magic return code from a write callback, the read data is already in libcurl's internal buffers so it'll have to keep it in an allocated buffer until the reading is again unpaused using this function. 
 <p class="level0">If the downloaded data is compressed and is asked to get uncompressed automatically on download, libcurl will continue to uncompress the entire downloaded chunk and it will cache the data uncompressed. This has the side- effect that if you download something that is compressed a lot, it can result in a very large data amount needing to be allocated to save the data during the pause. This said, you should probably consider not using paused reading if you allow libcurl to uncompress data automatically. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_reset.html">  curl_easy_reset (3)</a> <p class="roffit">
index 383834c..86196a3 100644 (file)
Binary files a/docs/libcurl/curl_easy_pause.pdf and b/docs/libcurl/curl_easy_pause.pdf differ
index 1ed006b..8f8517f 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
 .SH NAME
 curl_easy_perform - Perform a file transfer
index 8654fea..f50024b 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_perform man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 537da2d..72e34cb 100644 (file)
Binary files a/docs/libcurl/curl_easy_perform.pdf and b/docs/libcurl/curl_easy_perform.pdf differ
index 1ede589..0de6037 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, 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
@@ -59,8 +59,13 @@ On success, returns \fBCURLE_OK\fP, stores the received data into
 
 On failure, returns the appropriate error code.
 
-If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use
-your operating system facilities to wait until the data is ready, and retry.
+If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use your
+operating system facilities to wait until the data is ready, and retry.
+
+Reading exactly 0 bytes would indicate a closed connection.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
 .SH EXAMPLE
 See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
 .SH "SEE ALSO"
index 51f77f9..48ba906 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_recv man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -55,7 +57,9 @@ p.roffit {
 <p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">On success, returns <span Class="bold">CURLE_OK</span>, stores the received data into <span Class="bold">buffer</span>, and the number of bytes it actually read into <span Class="bold">*n</span>. 
 <p class="level0">On failure, returns the appropriate error code. 
-<p class="level0">If there is no data to read, the function returns <span Class="bold">CURLE_AGAIN</span>. Use your operating system facilities to wait until the data is ready, and retry. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
+<p class="level0">If there is no data to read, the function returns <span Class="bold">CURLE_AGAIN</span>. Use your operating system facilities to wait until the data is ready, and retry. 
+<p class="level0">Reading exactly 0 bytes would indicate a closed connection. 
+<p class="level0">If there's no socket available to use from the previous transfer, this function returns CURLE_UNSUPPORTED_PROTOCOL. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
 <p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html">  curl_easy_perform (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_getinfo.html">curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_send.html">curl_easy_send (3) </a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index 2a968c5..521cd2a 100644 (file)
Binary files a/docs/libcurl/curl_easy_recv.pdf and b/docs/libcurl/curl_easy_recv.pdf differ
index 4652f7e..592d3ed 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
 .SH NAME
 curl_easy_reset - reset all options of a libcurl session handle
index daed742..a7dc70c 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_reset man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 0be6286..ba8e171 100644 (file)
Binary files a/docs/libcurl/curl_easy_reset.pdf and b/docs/libcurl/curl_easy_reset.pdf differ
index 17c4c1f..777735f 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, 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
@@ -57,6 +57,9 @@ sent into \fB*n\fP. Note that this may very well be less than the amount you
 wanted to send.
 
 On failure, returns the appropriate error code.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
 .SH EXAMPLE
 See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
 .SH "SEE ALSO"
index b24a601..4a85a27 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_send man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,7 +56,8 @@ p.roffit {
 <p class="level0">You must ensure that the socket is writable before calling <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a>, otherwise the call will return <span Class="bold">CURLE_AGAIN</span> - the socket is used in non-blocking mode internally. Use <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with <span Class="bold">CURLINFO_LASTSOCKET</span> to obtain the socket; use your operating system facilities like <span Class="emphasis">select(2)</span> to check if it can be written to. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">On success, returns <span Class="bold">CURLE_OK</span> and stores the number of bytes actually sent into <span Class="bold">*n</span>. Note that this may very well be less than the amount you wanted to send. 
-<p class="level0">On failure, returns the appropriate error code. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
+<p class="level0">On failure, returns the appropriate error code. 
+<p class="level0">If there's no socket available to use from the previous transfer, this function returns CURLE_UNSUPPORTED_PROTOCOL. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
 <p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html">  curl_easy_perform (3)</a> <a class="manpage" href="./curl_easy_getinfo.html">  curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_recv.html">curl_easy_recv (3) </a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index a6afb67..bb73bfc 100644 (file)
Binary files a/docs/libcurl/curl_easy_send.pdf and b/docs/libcurl/curl_easy_send.pdf differ
index 3d76b66..bebf8c0 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, 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
@@ -58,7 +58,8 @@ The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
 Set the parameter to 1 to get the library to display a lot of verbose
 information about its operations. Very useful for libcurl and/or protocol
 debugging and understanding. The verbose information will be sent to stderr,
-or the stream set with \fICURLOPT_STDERR\fP.
+or the stream set with \fICURLOPT_STDERR\fP. The default value for this
+parameter is 0.
 
 You hardly ever want this set in production use, you will almost always want
 this when you debug/report problems. Another neat option for debugging is the
@@ -66,10 +67,11 @@ this when you debug/report problems. Another neat option for debugging is the
 .IP CURLOPT_HEADER
 A parameter set to 1 tells the library to include the header in the body
 output. This is only relevant for protocols that actually have headers
-preceding the data (like HTTP).
+preceding the data (like HTTP). The default value for this parameter is 0.
 .IP CURLOPT_NOPROGRESS
-A parameter set to 1 tells the library to shut off the built-in progress meter
-completely.
+Pass a long. If set to 1, it tells the library to shut off the progress meter
+completely. It will also prevent the \fICURLOPT_PROGRESSFUNCTION\fP from
+getting called. The default value for this parameter is 1.
 
 Future versions of libcurl are likely to not have any built-in progress meter
 at all.
@@ -78,6 +80,7 @@ Pass a long. If it is 1, libcurl will not use any functions that
 install signal handlers or any functions that cause signals to be sent to the
 process. This option is mainly here to allow multi-threaded unix applications
 to still set/use all timeout options etc, without risking getting signals.
+The default value for this parameter is 0.
 (Added in 7.10)
 
 If this option is set and libcurl has been built with the standard name
@@ -90,7 +93,9 @@ SIGPIPE signals, which otherwise are sent by the system when trying to send
 data to a socket which is closed in the other end. libcurl makes an effort to
 never cause such SIGPIPEs to trigger, but some operating systems have no way
 to avoid them and even on those that have there are some corner cases when
-they may still happen, contrary to our desire.
+they may still happen, contrary to our desire. In addition, using
+\fICURLAUTH_NTLM_WB\fP authentication could cause a SIGCHLD signal to be
+raised.
 .IP CURLOPT_WILDCARDMATCH
 Set this option to 1 if you want to transfer multiple files according to a
 file name pattern. The pattern can be specified as part of the
@@ -105,18 +110,18 @@ This feature is only supported by the FTP download for now.
 
 A brief introduction of its syntax follows:
 .RS
-.IP "\fB*\fP - ASTERISK"
+.IP "* - ASTERISK"
 \&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
 directory)
 .RE
 .RS
-.IP "\fB?\fP - QUESTION MARK"
+.IP "? - QUESTION MARK"
 Question mark matches any (exactly one) character.
 
 \&ftp://example.com/some/path/\fBphoto?.jpeg\fP
 .RE
 .RS
-.IP "\fB[\fP - BRACKET EXPRESSION"
+.IP "[ - BRACKET EXPRESSION"
 The left bracket opens a bracket expression. The question mark and asterisk have
 no special meaning in a bracket expression. Each bracket expression ends by the
 right bracket and matches exactly one character. Some examples follow:
@@ -144,10 +149,10 @@ Using the rules above, a file name pattern can be constructed:
 (This was added in 7.21.0)
 .SH CALLBACK OPTIONS
 .IP CURLOPT_WRITEFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as there is data received that needs
-to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
+Pass a pointer to a function that matches the following prototype:
+\fBsize_t function( char *ptr, size_t size, size_t nmemb, void *userdata);\fP
+This function gets called by libcurl as soon as there is data received that
+needs to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
 multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
 of bytes actually taken care of. If that amount differs from the amount passed
 to your function, it'll signal an error to the library. This will abort the
@@ -168,13 +173,18 @@ Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA\fP option.
 
 The callback function will be passed as much data as possible in all invokes,
 but you cannot possibly make any assumptions. It may be one byte, it may be
-thousands. The maximum amount of data that can be passed to the write callback
-is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
+thousands. The maximum amount of body data that can be passed to the write
+callback is defined in the curl.h header file: CURL_MAX_WRITE_SIZE (the usual
+default is 16K). If you however have \fICURLOPT_HEADER\fP set, which sends
+header data to the write callback, you can get up to
+\fICURL_MAX_HTTP_HEADER\fP bytes of header data passed into it. This usually
+means 100K.
 .IP CURLOPT_WRITEDATA
 Data pointer to pass to the file write function. If you use the
 \fICURLOPT_WRITEFUNCTION\fP option, this is the pointer you'll get as
-input. If you don't use a callback, you must pass a 'FILE *' as libcurl will
-pass this to fwrite() when writing data.
+input. If you don't use a callback, you must pass a 'FILE *' (cast
+to 'void *') as libcurl will pass this to fwrite() when writing data.
+By default, the value of this parameter is unspecified.
 
 The internal \fICURLOPT_WRITEFUNCTION\fP will write the data to the FILE *
 given with this option, or to stdout if this option hasn't been set.
@@ -186,11 +196,11 @@ crashes.
 This option is also known with the older name \fICURLOPT_FILE\fP, the name
 \fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
 .IP CURLOPT_READFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as it needs to read data in order to
-send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
-filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
+Pass a pointer to a function that matches the following prototype:
+\fBsize_t function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP
+This function gets called by libcurl as soon as it needs to read data in order
+to send it to the peer. The data area pointed at by the pointer \fIptr\fP may
+be filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
 bytes. Your function must return the actual number of bytes that you stored in
 that memory area. Returning 0 will signal end-of-file to the library and cause
 it to stop the current transfer.
@@ -208,6 +218,10 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
 reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
 for further details.
 
+\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
+that the callback wants, or it will be considered the final packet by the
+server end and the transfer will end there.
+
 If you set this callback pointer to NULL, or don't set it at all, the default
 internal read function will be used. It is doing an fread() on the FILE *
 userdata set with \fICURLOPT_READDATA\fP.
@@ -215,7 +229,7 @@ userdata set with \fICURLOPT_READDATA\fP.
 Data pointer to pass to the file read function. If you use the
 \fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
 you don't specify a read callback but instead rely on the default internal
-read function, this data must be a valid readable FILE *.
+read function, this data must be a valid readable FILE * (cast to 'void *').
 
 If you're using libcurl as a win32 DLL, you MUST use a
 \fICURLOPT_READFUNCTION\fP if you set this option.
@@ -223,21 +237,23 @@ If you're using libcurl as a win32 DLL, you MUST use a
 This option was also known by the older name \fICURLOPT_INFILE\fP, the name
 \fICURLOPT_READDATA\fP was introduced in 7.9.7.
 .IP CURLOPT_IOCTLFUNCTION
-Function pointer that should match the \fIcurl_ioctl_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl when
-something special I/O-related needs to be done that the library can't do by
-itself. For now, rewinding the read data stream is the only action it can
-request. The rewinding of the read data stream may be necessary when doing a
-HTTP PUT or POST with a multi-pass authentication method.  (Option added in
-7.12.3).
-
-Use \fICURLOPT_SEEKFUNCTION\fP instead to provide seeking!
+Pass a pointer to a function that matches the following prototype:
+\fBcurlioerr function(CURL *handle, int cmd, void *clientp);\fP. This function
+gets called by libcurl when something special I/O-related needs to be done
+that the library can't do by itself. For now, rewinding the read data stream
+is the only action it can request. The rewinding of the read data stream may
+be necessary when doing a HTTP PUT or POST with a multi-pass authentication
+method. By default, this parameter is set to NULL.  (Option added in 7.12.3).
+
+Use \fICURLOPT_SEEKFUNCTION\fP instead to provide seeking! If
+\fICURLOPT_SEEKFUNCTION\fP is set, this parameter will be ignored when seeking.
 .IP CURLOPT_IOCTLDATA
 Pass a pointer that will be untouched by libcurl and passed as the 3rd
-argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION\fP.  (Option
-added in 7.12.3)
+argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION\fP.
+By default, the value of this parameter is unspecified.  (Option added in
+7.12.3)
 .IP CURLOPT_SEEKFUNCTION
-Function pointer that should match the following prototype: \fIint
+Pass a pointer to a function that matches the following prototype: \fBint
 function(void *instream, curl_off_t offset, int origin);\fP This function gets
 called by libcurl to seek to a certain position in the input stream and can be
 used to fast forward a file in a resumed upload (instead of reading all
@@ -251,46 +267,58 @@ success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2
 free to work around the problem if possible. The latter can sometimes be done
 by instead reading from the input or similar.
 
+By default, this parameter is unset.
+
 If you forward the input arguments directly to "fseek" or "lseek", note that
 the data type for \fIoffset\fP is not the same as defined for curl_off_t on
 many systems! (Option added in 7.18.0)
 .IP CURLOPT_SEEKDATA
-Data pointer to pass to the file read function. If you use the
+Data pointer to pass to the file seek function. If you use the
 \fICURLOPT_SEEKFUNCTION\fP option, this is the pointer you'll get as input. If
 you don't specify a seek callback, NULL is passed. (Option added in 7.18.0)
 .IP CURLOPT_SOCKOPTFUNCTION
-Function pointer that should match the \fIcurl_sockopt_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl after the
-socket() call but before the connect() call. The callback's \fIpurpose\fP
-argument identifies the exact purpose for this particular socket, and
-currently only one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the
-primary connection (meaning the control connection in the FTP case). Future
-versions of libcurl may support more purposes. It passes the newly created
-socket descriptor so additional setsockopt() calls can be done at the user's
-discretion.  Return 0 (zero) from the callback on success. Return 1 from the
-callback function to signal an unrecoverable error to the library and it will
-close the socket and return \fICURLE_COULDNT_CONNECT\fP.  (Option added in
-7.15.6.)
+Pass a pointer to a function that matches the following prototype: \fBint
+function(void *clientp, curl_socket_t curlfd, curlsocktype purpose);\fP. By
+default, this parameter is unset. If set, this
+function gets called by libcurl after the socket() call but before the
+connect() call. The callback's \fIpurpose\fP argument identifies the exact
+purpose for this particular socket:
+
+\fICURLSOCKTYPE_IPCXN\fP for actively created connections or since 7.28.0
+\fICURLSOCKTYPE_ACCEPT\fP for FTP when the connection was setup with PORT/EPSV
+(in earlier versions these sockets weren't passed to this callback).
+
+Future versions of libcurl may support more purposes. It passes the newly
+created socket descriptor so additional setsockopt() calls can be done at the
+user's discretion.  Return 0 (zero) from the callback on success. Return 1
+from the callback function to signal an unrecoverable error to the library and
+it will close the socket and return \fICURLE_COULDNT_CONNECT\fP.  (Option
+added in 7.16.0)
+
+Added in 7.21.5, the callback function may return
+\fICURL_SOCKOPT_ALREADY_CONNECTED\fP, which tells libcurl that the socket is
+in fact already connected and then libcurl will not attempt to connect it.
 .IP CURLOPT_SOCKOPTDATA
 Pass a pointer that will be untouched by libcurl and passed as the first
 argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
-(Option added in 7.15.6.)
+The default value of this parameter is unspecified.
+(Option added in 7.16.0)
 .IP CURLOPT_OPENSOCKETFUNCTION
-Function pointer that should match the \fIcurl_opensocket_callback\fP
-prototype found in \fI<curl/curl.h>\fP. This function gets called by libcurl
-instead of the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument
-identifies the exact purpose for this particular socket, and currently only
-one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the primary connection
-(meaning the control connection in the FTP case). Future versions of libcurl
-may support more purposes. It passes the resolved peer address as a
-\fIaddress\fP argument so the callback can modify the address or refuse to
-connect at all. The callback function should return the socket or
-\fICURL_SOCKET_BAD\fP in case no connection should be established or any error
-detected. Any additional \fIsetsockopt(2)\fP calls can be done on the socket
-at the user's discretion.  \fICURL_SOCKET_BAD\fP return value from the
-callback function will signal an unrecoverable error to the library and it
-will return \fICURLE_COULDNT_CONNECT\fP.  This return code can be used for IP
-address blacklisting.  The default behavior is:
+Pass a pointer to a function that matches the following prototype:
+\fBcurl_socket_t function(void *clientp, curlsocktype purpose, struct
+curl_sockaddr *address);\fP. This function gets called by libcurl instead of
+the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument identifies the
+exact purpose for this particular socket: \fICURLSOCKTYPE_IPCXN\fP is for IP
+based connections. Future versions of libcurl may support more purposes. It
+passes the resolved peer address as a \fIaddress\fP argument so the callback
+can modify the address or refuse to connect at all. The callback function
+should return the socket or \fICURL_SOCKET_BAD\fP in case no connection could
+be established or another error was detected. Any additional
+\fIsetsockopt(2)\fP calls can be done on the socket at the user's discretion.
+\fICURL_SOCKET_BAD\fP return value from the callback function will signal an
+unrecoverable error to the library and it will return
+\fICURLE_COULDNT_CONNECT\fP.  This return code can be used for IP address
+blacklisting.  The default behavior is:
 .nf
    return socket(addr->family, addr->socktype, addr->protocol);
 .fi
@@ -298,16 +326,50 @@ address blacklisting.  The default behavior is:
 .IP CURLOPT_OPENSOCKETDATA
 Pass a pointer that will be untouched by libcurl and passed as the first
 argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION\fP.
+The default value of this parameter is unspecified.
 (Option added in 7.17.1.)
+.IP CURLOPT_CLOSESOCKETFUNCTION
+Pass a pointer to a function that matches the following prototype: \fBint
+function(void *clientp, curl_socket_t item);\fP. This function gets called by
+libcurl instead of the \fIclose(3)\fP or \fIclosesocket(3)\fP call when
+sockets are closed (not for any other file descriptors). This is pretty much
+the reverse to the \fICURLOPT_OPENSOCKETFUNCTION\fP option. Return 0 to signal
+success and 1 if there was an error.  (Option added in 7.21.7)
+.IP CURLOPT_CLOSESOCKETDATA
+Pass a pointer that will be untouched by libcurl and passed as the first
+argument in the closesocket callback set with
+\fICURLOPT_CLOSESOCKETFUNCTION\fP.
+The default value of this parameter is unspecified.
+(Option added in 7.21.7)
 .IP CURLOPT_PROGRESSFUNCTION
-Function pointer that should match the \fIcurl_progress_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl instead of
-its internal equivalent with a frequent interval during operation (roughly
-once per second or sooner) no matter if data is being transfered or not.
+Pass a pointer to a function that matches the following prototype:
+
+\fBint function(void *clientp, double dltotal, double dlnow, double ultotal,
+double ulnow);\fP
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_PROGRESSDATA\fP, it is not
+actually used by libcurl but is only passed along from the application to the
+callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
 Unknown/unused argument values passed to the callback will be set to zero
-(like if you only download data, the upload size will remain 0). Returning a
-non-zero value from this callback will cause libcurl to abort the transfer and
-return \fICURLE_ABORTED_BY_CALLBACK\fP.
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
 
 If you transfer data with the multi interface, this function will not be
 called during periods of idleness unless you call the appropriate libcurl
@@ -315,23 +377,71 @@ function that performs transfers.
 
 \fICURLOPT_NOPROGRESS\fP must be set to 0 to make this function actually
 get called.
+.IP CURLOPT_XFERINFOFUNCTION
+Pass a pointer to a function that matches the following prototype:
+
+.nf
+\fBint function(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
+                curl_off_t ultotal, curl_off_t ulnow);\fP
+.fi
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_XFERINFODATA\fP, it is only
+passed along from the application to the callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
+Unknown/unused argument values passed to the callback will be set to zero
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
+
+If you transfer data with the multi interface, this function will not be
+called during periods of idleness unless you call the appropriate libcurl
+function that performs transfers.
+
+\fICURLOPT_NOPROGRESS\fP must be set to 0 to make this function actually
+get called.
+
+(Added in 7.32.0)
 .IP CURLOPT_PROGRESSDATA
 Pass a pointer that will be untouched by libcurl and passed as the first
 argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
+The default value of this parameter is unspecified.
+.IP CURLOPT_XFERINFODATA
+Pass a pointer that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_XFERINFOFUNCTION\fP.
+The default value of this parameter is unspecified. This option is an alias
+for CURLOPT_PROGRESSDATA. (Added in 7.32.0)
 .IP CURLOPT_HEADERFUNCTION
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP. This
-function gets called by libcurl as soon as it has received header data. The
-header callback will be called once for each header and only complete header
-lines are passed on to the callback. Parsing headers should be easy enough
-using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
-multiplied with \fInmemb\fP. Do not assume that the header line is zero
-terminated! The pointer named \fIuserdata\fP is the one you set with the
+Pass a pointer to a function that matches the following prototype:
+\fBsize_t function( void *ptr, size_t size, size_t nmemb, void
+*userdata);\fP. This function gets called by libcurl as soon as it has
+received header data. The header callback will be called once for each header
+and only complete header lines are passed on to the callback. Parsing headers
+is very easy using this. The size of the data pointed to by \fIptr\fP is
+\fIsize\fP multiplied with \fInmemb\fP. Do not assume that the header line is
+zero terminated! The pointer named \fIuserdata\fP is the one you set with the
 \fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
 of bytes actually taken care of. If that amount differs from the amount passed
 to your function, it'll signal an error to the library. This will abort the
 transfer and return \fICURL_WRITE_ERROR\fP.
 
+A complete HTTP header that is passed to this function can be up to
+\fICURL_MAX_HTTP_HEADER\fP (100K) bytes.
+
 If this option is not set, or if it is set to NULL, but
 \fICURLOPT_HEADERDATA\fP (\fICURLOPT_WRITEHEADER\fP) is set to anything but
 NULL, the function used to accept response data will be used instead. That is,
@@ -345,21 +455,25 @@ negotiation. If you need to operate on only the headers from the final
 response, you will need to collect headers in the callback yourself and use
 HTTP status lines, for example, to delimit response boundaries.
 
-Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a
-trailer. That trailer is identical to a HTTP header and if such a trailer is
-received it is passed to the application using this callback as well. There
-are several ways to detect it being a trailer and not an ordinary header: 1)
-it comes after the response-body. 2) it comes after the final header line (CR
-LF) 3) a Trailer: header among the response-headers mention what header to
-expect in the trailer.
+When a server sends a chunked encoded transfer, it may contain a trailer. That
+trailer is identical to a HTTP header and if such a trailer is received it is
+passed to the application using this callback as well. There are several ways
+to detect it being a trailer and not an ordinary header: 1) it comes after the
+response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
+header among the regular response-headers mention what header(s) to expect in
+the trailer.
+
+For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get
+called with the server responses to the commands that libcurl sends.
 .IP CURLOPT_WRITEHEADER
 (This option is also known as \fBCURLOPT_HEADERDATA\fP) Pass a pointer to be
-used to write the header part of the received data to. If you don't use your
-own callback to take care of the writing, this must be a valid FILE *. See
-also the \fICURLOPT_HEADERFUNCTION\fP option above on how to set a custom
-get-all-headers callback.
+used to write the header part of the received data to. If you don't use
+\fICURLOPT_WRITEFUNCTION\fP or \fICURLOPT_HEADERFUNCTION\fP to take care of
+the writing, this must be a valid FILE * as the internal default will then be
+a plain fwrite(). See also the \fICURLOPT_HEADERFUNCTION\fP option above on
+how to set a custom get-all-headers callback.
 .IP CURLOPT_DEBUGFUNCTION
-Function pointer that should match the following prototype: \fIint
+Pass a pointer to a function that matches the following prototype: \fBint
 curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);\fP
 \fICURLOPT_DEBUGFUNCTION\fP replaces the standard debug function used when
 \fICURLOPT_VERBOSE \fP is in effect. This callback receives debug information,
@@ -388,11 +502,11 @@ used by libcurl, it is only passed to the callback.
 This option does only function for libcurl powered by OpenSSL. If libcurl was
 built against another SSL library, this functionality is absent.
 
-Function pointer that should match the following prototype: \fBCURLcode
-sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function gets called
-by libcurl just before the initialization of an SSL connection after having
-processed all other SSL related options to give a last chance to an
-application to modify the behaviour of openssl's ssl initialization. The
+Pass a pointer to a function that matches the following prototype:
+\fBCURLcode sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function
+gets called by libcurl just before the initialization of a SSL connection
+after having processed all other SSL related options to give a last chance to
+an application to modify the behaviour of openssl's ssl initialization. The
 \fIsslctx\fP parameter is actually a pointer to an openssl \fISSL_CTX\fP. If
 an error is returned no attempt to establish a connection is made and the
 perform operation will return the error code from this callback function.  Set
@@ -405,7 +519,7 @@ the SSL negotiation. The SSL_CTX pointer will be a new one every time.
 To use this properly, a non-trivial amount of knowledge of the openssl
 libraries is necessary. For example, using this function allows you to use
 openssl callbacks to add additional validation code for certificates, and even
-to change the actual URI of an HTTPS request (example used in the lib509 test
+to change the actual URI of a HTTPS request (example used in the lib509 test
 case).  See also the example section for a replacement of the key, certificate
 and trust file settings.
 .IP CURLOPT_SSL_CTX_DATA
@@ -415,8 +529,8 @@ parameter, otherwise \fBNULL\fP. (Added in 7.11.0)
 .IP CURLOPT_CONV_TO_NETWORK_FUNCTION
 .IP CURLOPT_CONV_FROM_NETWORK_FUNCTION
 .IP CURLOPT_CONV_FROM_UTF8_FUNCTION
-Function pointers that should match the following prototype: CURLcode
-function(char *ptr, size_t length);
+Pass a pointer to a function that matches the following prototype:
+\fBCURLcode function(char *ptr, size_t length);\fP
 
 These three options apply to non-ASCII platforms only.  They are available
 only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. When
@@ -458,18 +572,19 @@ follows:
 You will need to override these definitions if they are different on your
 system.
 .IP CURLOPT_INTERLEAVEFUNCTION
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata)\fP. This
-function gets called by libcurl as soon as it has received interleaved RTP
-data. This function gets called for each $ block and therefore contains
-exactly one upper-layer protocol unit (e.g.  one RTP packet). Curl writes the
-interleaved header as well as the included data for each call. The first byte
-is always an ASCII dollar sign. The dollar sign is followed by a one byte
-channel identifier and then a 2 byte integer length in network byte order. See
-\fIRFC 2326 Section 10.12\fP for more information on how RTP interleaving
-behaves. If unset or set to NULL, curl will use the default write function.
-
-Interleaved RTP poses some challeneges for the client application. Since the
+Pass a pointer to a function that matches the following prototype:
+\fBsize_t function( void *ptr, size_t size, size_t nmemb, void
+*userdata)\fP. This function gets called by libcurl as soon as it has received
+interleaved RTP data. This function gets called for each $ block and therefore
+contains exactly one upper-layer protocol unit (e.g.  one RTP packet). Curl
+writes the interleaved header as well as the included data for each call. The
+first byte is always an ASCII dollar sign. The dollar sign is followed by a
+one byte channel identifier and then a 2 byte integer length in network byte
+order. See \fIRFC2326 Section 10.12\fP for more information on how RTP
+interleaving behaves. If unset or set to NULL, curl will use the default write
+function.
+
+Interleaved RTP poses some challenges for the client application. Since the
 stream data is sharing the RTSP control connection, it is critical to service
 the RTP in a timely fashion. If the RTP data is not handled quickly,
 subsequent response processing may become unreasonably delayed and the
@@ -483,10 +598,10 @@ This is the userdata pointer that will be passed to
 \fICURLOPT_INTERLEAVEFUNCTION\fP when interleaved RTP data is received. (Added
 in 7.20.0)
 .IP CURLOPT_CHUNK_BGN_FUNCTION
-Function pointer that should match the following prototype: \fBlong function
-(const void *transfer_info, void *ptr, int remains)\fP. This function gets
-called by libcurl before a part of the stream is going to be transferred (if
-the transfer supports chunks).
+Pass a pointer to a function that matches the following prototype:
+\fBlong function (const void *transfer_info, void *ptr, int remains)\fP. This
+function gets called by libcurl before a part of the stream is going to be
+transferred (if the transfer supports chunks).
 
 This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH\fP
 option for now.
@@ -503,9 +618,9 @@ Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
 \fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
 (This was added in 7.21.0)
 .IP CURLOPT_CHUNK_END_FUNCTION
-Function pointer that should match the following prototype: \fBlong
-function(void *ptr)\fP. This function gets called by libcurl as soon as a part
-of the stream has been transferred (or skipped).
+Pass a pointer to a function that matches the following prototype:
+\fBlong function(void *ptr)\fP. This function gets called by libcurl as soon
+as a part of the stream has been transferred (or skipped).
 
 Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
 \fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
@@ -515,9 +630,9 @@ Pass a pointer that will be untouched by libcurl and passed as the ptr
 argument to the \fICURL_CHUNK_BGN_FUNTION\fP and \fICURL_CHUNK_END_FUNTION\fP.
 (This was added in 7.21.0)
 .IP CURLOPT_FNMATCH_FUNCTION
-Function pointer that should match \fBint function(void *ptr, const char
-*pattern, const char *string)\fP prototype (see \fIcurl/curl.h\fP). It is used
-internally for the wildcard matching feature.
+Pass a pointer to a function that matches the following prototype: \fBint
+function(void *ptr, const char *pattern, const char *string)\fP prototype (see
+\fIcurl/curl.h\fP). It is used internally for the wildcard matching feature.
 
 Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
 \fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
@@ -531,11 +646,11 @@ Pass a char * to a buffer that the libcurl may store human readable error
 messages in. This may be more helpful than just the return code from
 \fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
 Although this argument is a 'char *', it does not describe an input string.
-Therefore the (probably undefined) contents of the buffer is NOT copied
-by the library. You should keep the associated storage available until
-libcurl no longer needs it. Failing to do so will cause very odd behavior
-or even crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP
-or you set the same option again to use a different pointer.
+Therefore the (probably undefined) contents of the buffer is NOT copied by the
+library. You must keep the associated storage available until libcurl no
+longer needs it. Failing to do so will cause very odd behavior or even
+crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP or you
+set the same option again to use a different pointer.
 
 Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
 debug/trace why errors happen.
@@ -560,21 +675,226 @@ detected, like when a "100-continue" is received as a response to a
 POST/PUT and a 401 or 407 is received immediately afterwards.
 .SH NETWORK OPTIONS
 .IP CURLOPT_URL
-The actual URL to deal with. The parameter should be a char * to a zero
-terminated string.
+Pass in a pointer to the actual URL to deal with. The parameter should be a
+char * to a zero terminated string which must be URL-encoded in the following
+format:
+
+scheme://host:port/path
+
+For a greater explanation of the format please see RFC3986.
+
+If the given URL lacks the scheme (such as "http://" or "ftp://" etc) then
+libcurl will attempt to resolve the protocol based on one of the following
+given host names:
+
+HTTP, FTP, DICT, LDAP, IMAP, POP3 or SMTP
+
+(POP3 and SMTP added in 7.31.0)
+
+Should the protocol, either that specified by the scheme or deduced by libcurl
+from the host name, not be supported by libcurl then
+(\fICURLE_UNSUPPORTED_PROTOCOL\fP) will be returned from either the
+\fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP functions when you
+call them. Use \fIcurl_version_info(3)\fP for detailed information of which
+protocols are supported by the build of libcurl you are using.
+
+The host part of the URL contains the address of the server that you want to
+connect to. This can be the fully qualified domain name of the server, the
+local network name of the machine on your network or the IP address of the
+server or machine represented by either an IPv4 or IPv6 address. For example:
+
+http://www.example.com/
+
+http://hostname/
+
+http://192.168.0.1/
+
+http://[2001:1890:1112:1::20]/
+
+It is also possible to specify the user name, password and any supported login
+options as part of the host, for the following protocols, when connecting to
+servers that require authentication:
+
+http://user:password@www.example.com
+
+ftp://user:password@ftp.example.com
+
+imap://user:password;options@mail.example.com
+
+pop3://user:password;options@mail.example.com
+
+smtp://user:password;options@mail.example.com
+
+At present only IMAP, POP3 and SMTP support login options as part of the host.
+For more information about the login options in URL syntax please see RFC2384,
+RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
+
+The port is optional and when not specified libcurl will use the default port
+based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25
+for SMTP, etc. The following examples show how to specify the port:
+
+http://www.example.com:8080/ - This will connect to a web server using port
+8080 rather than 80.
+
+smtp://mail.example.com:587/ - This will connect to a SMTP server on the
+alternative mail port.
+
+The path part of the URL is protocol specific and whilst some examples are
+given below this list is not conclusive:
+
+.B HTTP
+
+The path part of a HTTP request specifies the file to retrieve and from what
+directory. If the directory is not specified then the web server's root
+directory is used. If the file is omitted then the default document will be
+retrieved for either the directory specified or the root directory. The
+exact resource returned for each URL is entirely dependent on the server's
+configuration.
+
+http://www.example.com - This gets the main page from the web server.
+
+http://www.example.com/index.html - This returns the main page by explicitly
+requesting it.
+
+http://www.example.com/contactus/ - This returns the default document from
+the contactus directory.
+
+.B FTP
+
+The path part of an FTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the directory is omitted then
+the directory listing for the root / home directory will be returned.
+
+ftp://ftp.example.com - This retrieves the directory listing for the root
+directory.
+
+ftp://ftp.example.com/readme.txt - This downloads the file readme.txt from the
+root directory.
+
+ftp://ftp.example.com/libcurl/readme.txt - This downloads readme.txt from the
+libcurl directory.
+
+ftp://user:password@ftp.example.com/readme.txt - This retrieves the readme.txt
+file from the user's home directory. When a username and password is
+specified, everything that is specified in the path part is relative to the
+user's home directory. To retrieve files from the root directory or a
+directory underneath the root directory then the absolute path must be
+specified by prepending an additional forward slash to the beginning of the
+path.
+
+ftp://user:password@ftp.example.com//readme.txt - This retrieves the readme.txt
+from the root directory when logging in as a specified user.
+
+.B SMTP
+
+The path part of a SMTP request specifies the host name to present during
+communication with the mail server. If the path is omitted then libcurl will
+attempt to resolve the local computer's host name. However, this may not
+return the fully qualified domain name that is required by some mail servers
+and specifying this path allows you to set an alternative name, such as
+your machine's fully qualified domain name, which you might have obtained
+from an external function such as gethostname or getaddrinfo.
+
+smtp://mail.example.com - This connects to the mail server at example.com and
+sends your local computer's host name in the HELO / EHLO command.
+
+smtp://mail.example.com/client.example.com - This will send client.example.com in
+the HELO / EHLO command to the mail server at example.com.
+
+.B POP3
+
+The path part of a POP3 request specifies the message ID to retrieve. If the
+ID is not specified then a list of waiting messages is returned instead.
+
+pop3://user:password@mail.example.com - This lists the available messages for
+the user
+
+pop3://user:password@mail.example.com/1 - This retrieves the first message for
+the user
+
+.B IMAP
+
+The path part of an IMAP request not only specifies the mailbox to list (Added
+in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the
+mailbox and to specify the UID and SECTION of the message to fetch (Added in
+7.30.0).
+
+imap://user:password@mail.example.com - Performs a top level folder list
+
+imap://user:password@mail.example.com/INBOX - Performs a folder list on the
+user's inbox
+
+imap://user:password@mail.example.com/INBOX/;UID=1 - Selects the user's inbox
+and fetches message 1
+
+imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2 - Selects
+the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches
+message 2 if it is
+
+imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT - Selects the
+user's inbox and fetches message 3 with only the text portion of the message
+
+For more information about the individual components of an IMAP URL please
+see RFC5092.
+
+.B SCP
 
-If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will
-attempt to guess which protocol to use based on the given host name. If the
-given protocol of the set URL is not supported, libcurl will return on error
-(\fICURLE_UNSUPPORTED_PROTOCOL\fP) when you call \fIcurl_easy_perform(3)\fP or
-\fIcurl_multi_perform(3)\fP. Use \fIcurl_version_info(3)\fP for detailed info
-on which protocols are supported.
+The path part of a SCP request specifies the file to retrieve and from what
+directory. The file part may not be omitted. The file is taken as an absolute
+path from the root directory on the server. To specify a path relative to
+the user's home directory on the server, prepend ~/ to the path portion.
+If the user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD\fP or \fBCURLOPT_USERNAME\fP option.
 
-The string given to CURLOPT_URL must be url-encoded and follow RFC 2396
-(http://curl.haxx.se/rfc/rfc2396.txt).
+scp://user@example.com/etc/issue - This specifies the file /etc/issue
 
-Starting with version 7.20.0, the fragment part of the URI will not be send as
-part of the path, which was the case previously.
+scp://example.com/~/my-file - This specifies the file my-file in the
+user's home directory on the server
+
+.B SFTP
+
+The path part of a SFTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified.  If the path ends in a / then a directory
+listing is returned instead of a file.  If the path is omitted entirely then
+the directory listing for the root / home directory will be returned.
+If the user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD\fP or \fBCURLOPT_USERNAME\fP option.
+
+sftp://user:password@example.com/etc/issue - This specifies the file
+/etc/issue
+
+sftp://user@example.com/~/my-file - This specifies the file my-file in the
+user's home directory
+
+sftp://ssh.example.com/~/Documents/ - This requests a directory listing
+of the Documents directory under the user's home directory
+
+.B LDAP
+
+The path part of a LDAP request can be used to specify the: Distinguished
+Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field
+is separated by a question mark and when that field is not required an empty
+string with the question mark separator should be included.
+
+ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search
+with the DN as My Organisation.
+
+ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform
+the same search but will only return postalAddress attributes.
+
+ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN
+and requests information about the rootDomainNamingContext attribute for an
+Active Directory server.
+
+For more information about the individual components of a LDAP URL please
+see RFC4516.
+
+.B NOTES
+
+Starting with version 7.20.0, the fragment part of the URI will not be sent as
+part of the path, which was previously the case.
 
 \fICURLOPT_URL\fP is the only option that \fBmust\fP be set before
 \fIcurl_easy_perform(3)\fP is called.
@@ -607,7 +927,7 @@ proxy's port number may optionally be specified with the separate option. If
 not specified, libcurl will default to using port 1080 for proxies.
 \fICURLOPT_PROXYPORT\fP.
 
-When you tell the library to use an HTTP proxy, libcurl will transparently
+When you tell the library to use a HTTP proxy, libcurl will transparently
 convert operations to HTTP even if you specify an FTP URL etc. This may have
 an impact on what other features of the library you can use, such as
 \fICURLOPT_QUOTE\fP and similar FTP specifics that don't work unless you
@@ -624,23 +944,36 @@ use of a proxy, even if there is an environment variable set for it.
 Since 7.14.1, the proxy host string given in environment variables can be
 specified the exact same way as the proxy can be set with \fICURLOPT_PROXY\fP,
 include protocol prefix (http://) and embedded user + password.
+
+Since 7.21.7, the proxy string may be specified with a protocol:// prefix to
+specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
+socks5h:// (the last one to enable socks5 and asking the proxy to do the
+resolving, also known as CURLPROXY_SOCKS5_HOSTNAME type) to request the
+specific SOCKS version to be used. No protocol specified, http:// and all
+others will be treated as HTTP proxies.
 .IP CURLOPT_PROXYPORT
 Pass a long with this option to set the proxy port to connect to unless it is
 specified in the proxy string \fICURLOPT_PROXY\fP.
 .IP CURLOPT_PROXYTYPE
 Pass a long with this option to set type of the proxy. Available options for
 this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.19.4),
-\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP,
+\fICURLPROXY_SOCKS4\fP (added in 7.10), \fICURLPROXY_SOCKS5\fP,
 \fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP
 (added in 7.18.0). The HTTP type is default. (Added in 7.10)
+
+If you set \fBCURLOPT_PROXYTYPE\fP to \fICURLPROXY_HTTP_1_0\fP, it will only
+affect how libcurl speaks to a proxy when CONNECT is used. The HTTP version
+used for "regular" HTTP requests is instead controlled with
+\fICURLOPT_HTTP_VERSION\fP.
 .IP CURLOPT_NOPROXY
-Pass a pointer to a zero terminated string. The should be a comma- separated
-list of hosts which do not use a proxy, if one is specified.  The only
-wildcard is a single * character, which matches all hosts, and effectively
-disables the proxy. Each name in this list is matched as either a domain which
-contains the hostname, or the hostname itself. For example, local.com would
-match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
-(Added in 7.19.4)
+Pass a pointer to a zero terminated string. The string consists of a comma
+separated list of host names that do not require a proxy to get reached, even
+if one is specified.  The only wildcard available is a single * character,
+which matches all hosts, and effectively disables the proxy. Each name in this
+list is matched as either a domain which contains the hostname, or the
+hostname itself. For example, example.com would match example.com,
+example.com:80, and www.example.com, but not www.notanexample.com.  (Added in
+7.19.4)
 .IP CURLOPT_HTTPPROXYTUNNEL
 Set the parameter to 1 to make the library tunnel all operations through a
 given HTTP proxy. There is a big difference between using a proxy and to
@@ -652,7 +985,7 @@ default service name for a SOCKS5 server is rcmd/server-fqdn. This option
 allows you to change it. (Added in 7.19.4)
 .IP CURLOPT_SOCKS5_GSSAPI_NEC
 Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
-negotiation a protection mode is negotiated. The rfc1961 says in section
+negotiation a protection mode is negotiated. The RFC1961 says in section
 4.3/4.4 it should be protected, but the NEC reference implementation does not.
 If enabled, this option allows the unprotected exchange of the protection mode
 negotiation. (Added in 7.19.4).
@@ -660,13 +993,22 @@ negotiation. (Added in 7.19.4).
 Pass a char * as parameter. This sets the interface name to use as outgoing
 network interface. The name can be an interface name, an IP address, or a host
 name.
+
+Starting with 7.24.0: If the parameter starts with "if!" then it is treated as
+only as interface name and no attempt will ever be named to do treat it as an
+IP address or to do name resolution on it.  If the parameter starts with
+\&"host!" it is treated as either an IP address or a hostname.  Hostnames are
+resolved synchronously.  Using the if! format is highly recommended when using
+the multi interfaces to avoid allowing the code to block.  If "if!" is
+specified but the parameter does not match an existing interface,
+CURLE_INTERFACE_FAILED is returned.
 .IP CURLOPT_LOCALPORT
 Pass a long. This sets the local port number of the socket used for
 connection. This can be used in combination with \fICURLOPT_INTERFACE\fP and
 you are recommended to use \fICURLOPT_LOCALPORTRANGE\fP as well when this is
 set. Valid port numbers are 1 - 65535. (Added in 7.15.2)
 .IP CURLOPT_LOCALPORTRANGE
-Pass a long. This is the number of attempts libcurl should make to find a
+Pass a long. This is the number of attempts libcurl will make to find a
 working local port number. It starts with the given \fICURLOPT_LOCALPORT\fP
 and adds one to the number for each retry. Setting this to 1 or below will
 make libcurl do only one try for the exact port number. Port numbers by nature
@@ -705,24 +1047,37 @@ only makes sense to use this option if you want it smaller.
 Pass a long specifying what remote port number to connect to, instead of the
 one specified in the URL or the default port for the used protocol.
 .IP CURLOPT_TCP_NODELAY
-Pass a long specifying whether the TCP_NODELAY option should be set or
-cleared (1 = set, 0 = clear). The option is cleared by default. This
-will have no effect after the connection has been established.
+Pass a long specifying whether the TCP_NODELAY option is to be set or cleared
+(1 = set, 0 = clear). The option is cleared by default. This will have no
+effect after the connection has been established.
 
-Setting this option will disable TCP's Nagle algorithm. The purpose of
-this algorithm is to try to minimize the number of small packets on
-the network (where "small packets" means TCP segments less than the
-Maximum Segment Size (MSS) for the network).
+Setting this option will disable TCP's Nagle algorithm. The purpose of this
+algorithm is to try to minimize the number of small packets on the network
+(where "small packets" means TCP segments less than the Maximum Segment Size
+(MSS) for the network).
 
 Maximizing the amount of data sent per TCP segment is good because it
-amortizes the overhead of the send. However, in some cases (most
-notably telnet or rlogin) small segments may need to be sent
-without delay. This is less efficient than sending larger amounts of
-data at a time, and can contribute to congestion on the network if
-overdone.
+amortizes the overhead of the send. However, in some cases (most notably
+telnet or rlogin) small segments may need to be sent without delay. This is
+less efficient than sending larger amounts of data at a time, and can
+contribute to congestion on the network if overdone.
 .IP CURLOPT_ADDRESS_SCOPE
 Pass a long specifying the scope_id value to use when connecting to IPv6
 link-local or site-local addresses. (Added in 7.19.0)
+.IP CURLOPT_TCP_KEEPALIVE
+Pass a long. If set to 1, TCP keepalive probes will be sent. The delay and
+frequency of these probes can be controlled by the \fICURLOPT_TCP_KEEPIDLE\fP
+and \fICURLOPT_TCP_KEEPINTVL\fP options, provided the operating system supports
+them. Set to 0 (default behavior) to disable keepalive probes (Added in
+7.25.0).
+.IP CURLOPT_TCP_KEEPIDLE
+Pass a long. Sets the delay, in seconds, that the operating system will wait
+while the connection is idle before sending keepalive probes. Not all operating
+systems support this option. (Added in 7.25.0)
+.IP CURLOPT_TCP_KEEPINTVL
+Pass a long. Sets the interval, in seconds, that the operating system will wait
+between sending keepalive probes. Not all operating systems support this
+option. (Added in 7.25.0)
 .SH NAMES and PASSWORDS OPTIONS (Authentication)
 .IP CURLOPT_NETRC
 This parameter controls the preference of libcurl between using user names and
@@ -762,8 +1117,8 @@ the full path name to the file you want libcurl to use as .netrc file. If this
 option is omitted, and \fICURLOPT_NETRC\fP is set, libcurl will attempt to
 find a .netrc file in the current user's home directory. (Added in 7.10.9)
 .IP CURLOPT_USERPWD
-Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection. Use \fICURLOPT_HTTPAUTH\fP to decide the authentication method.
+Pass a char * as parameter, pointing to a zero terminated login details string
+for the connection. The format of which is: [user name]:[password];[options].
 
 When using NTLM, you can set the domain by prepending it to the user name and
 separating the domain and name with a forward (/) or backward slash (\\). Like
@@ -776,10 +1131,18 @@ and password information to hosts using the initial host name (unless
 \fICURLOPT_UNRESTRICTED_AUTH\fP is set), so if libcurl follows locations to
 other hosts it will not send the user and password to those. This is enforced
 to prevent accidental information leakage.
+
+At present only IMAP, POP3 and SMTP support login options as part of the
+details string. For more information about the login options please see
+RFC2384, RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
+
+Use \fICURLOPT_HTTPAUTH\fP to specify the authentication method for HTTP based
+connections.
 .IP CURLOPT_PROXYUSERPWD
 Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection to the HTTP proxy.  Use \fICURLOPT_PROXYAUTH\fP to decide
-the authentication method.
+the connection to the HTTP proxy.
+
+Use \fICURLOPT_PROXYAUTH\fP to specify the authentication method.
 .IP CURLOPT_USERNAME
 Pass a char * as parameter, which should be pointing to the zero terminated
 user name to use for the transfer.
@@ -823,7 +1186,7 @@ below. If more than one bit is set, libcurl will first query the site to see
 which authentication methods it supports and then pick the best one you allow
 it to use. For some methods, this will induce an extra network round-trip. Set
 the actual name and password with the \fICURLOPT_USERPWD\fP option or
-with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
+with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_PASSWORD\fP options.
 (Added in 7.10.6)
 .RS
 .IP CURLAUTH_BASIC
@@ -855,8 +1218,22 @@ HTTP NTLM authentication. A proprietary protocol invented and used by
 Microsoft. It uses a challenge-response and hash concept similar to Digest, to
 prevent the password from being eavesdropped.
 
-You need to build libcurl with OpenSSL support for this option to work, or
-build libcurl on Windows.
+You need to build libcurl with either OpenSSL, GnuTLS or NSS support for this
+option to work, or build libcurl on Windows with SSPI support.
+.IP CURLAUTH_NTLM_WB
+NTLM delegating to winbind helper. Authentication is performed by a separate
+binary application that is executed when needed. The name of the application
+is specified at compile time but is typically /usr/bin/ntlm_auth
+(Added in 7.22.0)
+
+Note that libcurl will fork when necessary to run the winbind application and
+kill it when complete, calling waitpid() to await its exit when done. On POSIX
+operating systems, killing the process will cause a SIGCHLD signal to be
+raised (regardless of whether \fICURLOPT_NOSIGNAL\fP is set), which must be
+handled intelligently by the application. In particular, the application must
+not unconditionally call wait() in its SIGCHLD signal handler to avoid being
+subject to a race condition.  This behavior is subject to change in future
+versions of libcurl.
 .IP CURLAUTH_ANY
 This is a convenience macro that sets all bits and thus makes libcurl pick any
 it finds suitable. libcurl will automatically select the one it finds most
@@ -870,6 +1247,29 @@ This is a meta symbol. Or this value together with a single specific auth
 value to force libcurl to probe for un-restricted auth and if not, only that
 single auth algorithm is acceptable. (Added in 7.21.3)
 .RE
+.IP CURLOPT_TLSAUTH_TYPE
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+authentication method(s) you want it to use for TLS authentication.
+.RS
+.IP CURLOPT_TLSAUTH_SRP
+TLS-SRP authentication. Secure Remote Password authentication for TLS is
+defined in RFC5054 and provides mutual authentication if both sides have a
+shared secret. To use TLS-SRP, you must also set the
+\fICURLOPT_TLSAUTH_USERNAME\fP and \fICURLOPT_TLSAUTH_PASSWORD\fP options.
+
+You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
+to work. (Added in 7.21.4)
+.RE
+.IP CURLOPT_TLSAUTH_USERNAME
+Pass a char * as parameter, which should point to the zero terminated username
+to use for the TLS authentication method specified with the
+\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
+\fICURLOPT_TLS_PASSWORD\fP option also be set. (Added in 7.21.4)
+.IP CURLOPT_TLSAUTH_PASSWORD
+Pass a char * as parameter, which should point to the zero terminated password
+to use for the TLS authentication method specified with the
+\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
+\fICURLOPT_TLS_USERNAME\fP option also be set. (Added in 7.21.4)
 .IP CURLOPT_PROXYAUTH
 Pass a long as parameter, which is set to a bitmask, to tell libcurl which
 authentication method(s) you want it to use for your proxy authentication.  If
@@ -880,13 +1280,22 @@ actual name and password with the \fICURLOPT_PROXYUSERPWD\fP option. The
 bitmask can be constructed by or'ing together the bits listed above for the
 \fICURLOPT_HTTPAUTH\fP option. As of this writing, only Basic, Digest and NTLM
 work. (Added in 7.10.7)
+.IP CURLOPT_SASL_IR
+Pass a long. If the value is 1, curl will send the initial response to the
+server in the first authentication packet in order to reduce the number of
+ping pong requests. Only applicable to supporting SASL authentication
+mechanisms and to the IMAP, POP3 and SMTP protocols. (Added in 7.31.0)
+
+Note: Whilst IMAP supports this option there is no need to explicitly set it,
+as libcurl can determine the feature itself when the server supports the
+SASL-IR CAPABILITY.
 .SH HTTP OPTIONS
 .IP CURLOPT_AUTOREFERER
 Pass a parameter set to 1 to enable this. When enabled, libcurl will
 automatically set the Referer: field in requests where it follows a Location:
 redirect.
-.IP CURLOPT_ENCODING
-Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
+.IP CURLOPT_ACCEPT_ENCODING
+Sets the contents of the Accept-Encoding: header sent in a HTTP request, and
 enables decoding of a response when a Content-Encoding: header is received.
 Three encodings are supported: \fIidentity\fP, which does nothing,
 \fIdeflate\fP which requests the server to compress its response using the
@@ -897,9 +1306,24 @@ supported encodings is sent.
 This is a request, not an order; the server may or may not do it.  This option
 must be set (to any non-NULL value) or else any unsolicited encoding done by
 the server is ignored. See the special file lib/README.encoding for details.
+
+(This option was called CURLOPT_ENCODING before 7.21.6)
+.IP CURLOPT_TRANSFER_ENCODING
+Adds a request for compressed Transfer Encoding in the outgoing HTTP
+request. If the server supports this and so desires, it can respond with the
+HTTP response sent using a compressed Transfer-Encoding that will be
+automatically uncompressed by libcurl on reception.
+
+Transfer-Encoding differs slightly from the Content-Encoding you ask for with
+\fBCURLOPT_ACCEPT_ENCODING\fP in that a Transfer-Encoding is strictly meant to
+be for the transfer and thus MUST be decoded before the data arrives in the
+client. Traditionally, Transfer-Encoding has been much less used and supported
+by both HTTP clients and HTTP servers.
+
+(Added in 7.21.6)
 .IP CURLOPT_FOLLOWLOCATION
 A parameter set to 1 tells the library to follow any Location: header that the
-server sends as part of an HTTP header.
+server sends as part of a HTTP header.
 
 This means that the library will re-send the same request on the new location
 and follow new Location: headers all the way until no more such headers are
@@ -922,19 +1346,20 @@ Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for
 an infinite number of redirects (which is the default)
 .IP CURLOPT_POSTREDIR
 Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
-301 or 302 response back.  A parameter with bit 0 set (value
-\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC 2616/10.3.2 and
-not convert POST requests into GET requests when following a 301
-redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain
-the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience
-define that sets both bits.
+301, 302 or 303 response back.  A parameter with bit 0 set (value
+\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC2616/10.3.2 and not
+convert POST requests into GET requests when following a 301 redirection.
+Setting bit 1 (value \fBCURL_REDIR_POST_302\fP) makes libcurl maintain the
+request method after a 302 redirect whilst setting bit 2 (value
+\fBCURL_REDIR_POST_303\fP) makes libcurl maintain the request method after a
+303 redirect. The value \fBCURL_REDIR_POST_ALL\fP is a convenience define that
+sets all three bits.
 
 The non-RFC behaviour is ubiquitous in web browsers, so the library does the
 conversion by default to maintain consistency. However, a server may require a
 POST to remain a POST after such a redirection. This option is meaningful only
 when setting \fICURLOPT_FOLLOWLOCATION\fP.  (Added in 7.17.1) (This option was
-known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before
-then)
+known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 then)
 .IP CURLOPT_PUT
 A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
 data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP.
@@ -979,7 +1404,7 @@ If you issue a POST request and then want to make a HEAD or GET using the same
 re-used handle, you must explicitly set the new request type using
 \fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
 .IP CURLOPT_POSTFIELDS
-Pass a void * as parameter, which should be the full data to post in an HTTP
+Pass a void * as parameter, which should be the full data to post in a HTTP
 POST operation. You must make sure that the data is formatted the way you want
 the server to receive it. libcurl will not convert or encode it for you. Most
 web servers will assume this data to be url-encoded.
@@ -1014,7 +1439,7 @@ Pass a curl_off_t as parameter. Use this to set the size of 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_COPYPOSTFIELDS
-Pass a char * as parameter, which should be the full data to post in an HTTP
+Pass a char * as parameter, which should be the full data to post in a HTTP
 POST operation. It behaves as the \fICURLOPT_POSTFIELDS\fP option, but the
 original data are copied by the library, allowing the application to overwrite
 the original data after setting this option.
@@ -1061,10 +1486,12 @@ internally, your added one will be used instead. If you add a header with no
 content as in 'Accept:' (no data on the right side of the colon), the
 internally used header will get disabled. Thus, using this option you can add
 new headers, replace internal headers and remove internal headers. To add a
-header with no content, make the content be two quotes: \&"". The headers
-included in the linked list must not be CRLF-terminated, because curl adds
-CRLF after each header item. Failure to comply with this will result in
-strange bugs because the server will most likely ignore part of the headers
+header with no content (nothing to the right side of the colon), use the
+form 'MyHeader;' (note the ending semicolon).
+
+The headers included in the linked list must not be CRLF-terminated, because
+curl adds CRLF after each header item. Failure to comply with this will result
+in strange bugs because the server will most likely ignore part of the headers
 you specified.
 
 The first line in a request (containing the method, usually a GET or POST) is
@@ -1101,7 +1528,7 @@ option and thus you need to concatenate them all in one single string. Set
 multiple cookies in one string like this: "name1=content1; name2=content2;"
 etc.
 
-This option sets the cookie header explictly in the outgoing request(s). If
+This option sets the cookie header explicitly in the outgoing request(s). If
 multiple requests are done due to authentication, followed redirections or
 similar, they will all get this cookie passed on.
 
@@ -1154,7 +1581,7 @@ to GET. Usable if a POST, HEAD, PUT, or a custom request has been used
 previously using the same curl handle.
 
 When setting \fICURLOPT_HTTPGET\fP to 1, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
+\fICURLOPT_NOBODY\fP to 0 and \fICURLOPT_UPLOAD\fP to 0.
 .IP CURLOPT_HTTP_VERSION
 Pass a long, set to one of the values described below. They force libcurl to
 use the specific HTTP versions. This is not sensible to do unless you have a
@@ -1177,8 +1604,8 @@ connection. (added in 7.14.1)
 .IP CURLOPT_HTTP_CONTENT_DECODING
 Pass a long to tell libcurl how to act on content decoding. If set to zero,
 content decoding will be disabled. If set to 1 it is enabled. Libcurl has no
-default content decoding but requires you to use \fICURLOPT_ENCODING\fP for
-that. (added in 7.16.2)
+default content decoding but requires you to use \fICURLOPT_ACCEPT_ENCODING\fP
+for that. (added in 7.16.2)
 .IP CURLOPT_HTTP_TRANSFER_DECODING
 Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
 transfer decoding will be disabled, if set to 1 it is enabled
@@ -1186,28 +1613,55 @@ transfer decoding will be disabled, if set to 1 it is enabled
 option is set to zero. (added in 7.16.2)
 .SH SMTP OPTIONS
 .IP CURLOPT_MAIL_FROM
-Pass a pointer to a zero terminated string as parameter. It will be used to
-specify the sender address in a mail when sending an SMTP mail with libcurl.
+Pass a pointer to a zero terminated string as parameter. This should be used
+to specify the sender's email address when sending SMTP mail with libcurl.
+
+An originator email address should be specified with angled brackets (<>)
+around it, which if not specified, will be added by libcurl from version
+7.21.4 onwards. Failing to provide such brackets may cause the server to
+reject the email.
+
+If this parameter is not specified then an empty address will be sent to the
+mail server which may or may not cause the email to be rejected.
 
 (Added in 7.20.0)
 .IP CURLOPT_MAIL_RCPT
 Pass a pointer to a linked list of recipients to pass to the server in your
-SMTP mail request.  The linked list should be a fully valid list of \fBstruct
+SMTP mail request. The linked list should be a fully valid list of \fBstruct
 curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
 create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list.
 
-Each recipient in SMTP lingo is specified with angle brackets (<>), but should
-you not use an angle bracket as first letter libcurl will assume you provide a
-single email address only and enclose that with angle brackets for you.
+Each recipient should be specified within a pair of angled brackets (<>),
+however, should you not use an angled bracket as the first character libcurl
+will assume you provided a single email address and enclose that address
+within brackets for you.
 
 (Added in 7.20.0)
+.IP CURLOPT_MAIL_AUTH
+Pass a pointer to a zero terminated string as parameter. This will be used
+to specify the authentication address (identity) of a submitted message that
+is being relayed to another server.
+
+This optional parameter allows co-operating agents in a trusted environment to
+communicate the authentication of individual messages and should only be used
+by the application program, using libcurl, if the application is itself a
+mail server acting in such an environment. If the application is operating as
+such and the AUTH address is not known or is invalid, then an empty string
+should be used for this parameter.
+
+Unlike CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT, the address should not be
+specified within a pair of angled brackets (<>). However, if an empty string
+is used then a pair of brackets will be sent by libcurl as required by
+RFC2554.
+
+(Added in 7.25.0)
 .SH TFTP OPTIONS
 .IP CURLOPT_TFTP_BLKSIZE
-Specify block size to use for TFTP data transmission. Valid range as per RFC
-2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is
-not specified. The specified block size will only be used pending support by
-the remote server. If the server does not return an option acknowledgement or
-returns an option acknowledgement with no blksize, the default of 512 bytes
+Specify block size to use for TFTP data transmission. Valid range as per
+RFC2348 is 8-65464 bytes. The default of 512 bytes will be used if this option
+is not specified. The specified block size will only be used pending support
+by the remote server. If the server does not return an option acknowledgement
+or returns an option acknowledgement with no blksize, the default of 512 bytes
 will be used. (added in 7.19.4)
 .SH FTP OPTIONS
 .IP CURLOPT_FTPPORT
@@ -1238,18 +1692,22 @@ Examples with specified ports:
 You disable PORT again and go back to using the passive version by setting
 this option to NULL.
 .IP CURLOPT_QUOTE
-Pass a pointer to a linked list of FTP or SFTP commands to pass to
-the server prior to your FTP request. This will be done before any
-other commands are issued (even before the CWD command for FTP). The
-linked list should be a fully valid list of 'struct curl_slist' structs
-properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
-to append strings (commands) to the list, and clear the entire list
-afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation
-again by setting a NULL to this option.
-The set of valid FTP commands depends on the server (see RFC959 for a
-list of mandatory commands).
-The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd,
-rename, rm, rmdir, symlink (see
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+prior to your FTP request. This will be done before any other commands are
+issued (even before the CWD command for FTP). The linked list should be a
+fully valid list of 'struct curl_slist' structs properly filled in with text
+strings. Use \fIcurl_slist_append(3)\fP to append strings (commands) to the
+list, and clear the entire list afterwards with
+\fIcurl_slist_free_all(3)\fP. Disable this operation again by setting a NULL
+to this option. When speaking to a FTP (or SFTP since 7.24.0) server, prefix
+the command with an asterisk (*) to make libcurl continue even if the command
+fails as by default libcurl will stop at first failure.
+
+The set of valid FTP commands depends on the server (see RFC959 for a list of
+mandatory commands).
+
+The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm,
+rmdir, symlink (see
 .BR curl (1))
 (SFTP support added in 7.16.3)
 .IP CURLOPT_POSTQUOTE
@@ -1263,7 +1721,7 @@ Pass a pointer to a linked list of FTP commands to pass to the server after
 the transfer type is set. The linked list should be a fully valid list of
 struct curl_slist structs properly filled in as described for
 \fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
-option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP to 1, this
+option. Before version 7.16.0, if you also set \fICURLOPT_NOBODY\fP to 1, this
 option didn't work.
 .IP CURLOPT_DIRLISTONLY
 A parameter set to 1 tells the library to just list the names of files in a
@@ -1318,7 +1776,7 @@ already exists or lack of permissions prevents creation. (Added in 7.16.3)
 
 Starting with 7.19.4, you can also set this value to 2, which will make
 libcurl retry the CWD command again if the subsequent MKD command fails. This
-is especially useful if you're doing many simultanoes connections against the
+is especially useful if you're doing many simultaneous connections against the
 same server and they all have this option enabled, as then CWD may first fail
 but then another connection does MKD before this connection and thus MKD fails
 but trying CWD works! 7.19.4 also introduced the \fICURLFTP_CREATE_DIR\fP and
@@ -1376,7 +1834,7 @@ a reply.
 Initiate the shutdown and wait for a reply.
 .RE
 .IP CURLOPT_FTP_ACCOUNT
-Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP
+Pass a pointer to a zero terminated string (or NULL to disable). When an FTP
 server asks for "account data" after user name and password has been provided,
 this data is sent off using the ACCT command. (Added in 7.13.0)
 .IP CURLOPT_FTP_FILEMETHOD
@@ -1405,7 +1863,7 @@ initialized. (Added in 7.20.0)
 .RS
 .IP CURL_RTSPREQ_OPTIONS
 Used to retrieve the available methods of the server. The application is
-responsbile for parsing and obeying the response. \fB(The session ID is not
+responsible for parsing and obeying the response. \fB(The session ID is not
 needed for this method.)\fP  (Added in 7.20.0)
 .IP CURL_RTSPREQ_DESCRIBE
 Used to get the low level description of a stream. The application should note
@@ -1418,7 +1876,7 @@ needed for this method)\fP  (Added in 7.20.0)
 When sent by a client, this method changes the description of the session. For
 example, if a client is using the server to record a meeting, the client can
 use Announce to inform the server of all the meta-information about the
-session.  ANNOUNCE acts like an HTTP PUT or POST just like
+session.  ANNOUNCE acts like a HTTP PUT or POST just like
 \fICURL_RTSPREQ_SET_PARAMETER\fP (Added in 7.20.0)
 .IP CURL_RTSPREQ_SETUP
 Setup is used to initialize the transport layer for the session. The
@@ -1441,7 +1899,7 @@ different connections.  (Added in 7.20.0)
 .IP CURL_RTSPREQ_GET_PARAMETER
 Retrieve a parameter from the server. By default, libcurl will automatically
 include a \fIContent-Type: text/parameters\fP header on all non-empty requests
-unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST
+unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST
 (see \fICURL_RTSPREQ_SET_PARAMETER\fP).
 Applications wishing to send a heartbeat message (e.g. in the presence of a
 server-specified timeout) should send use an empty GET_PARAMETER request.
@@ -1449,9 +1907,9 @@ server-specified timeout) should send use an empty GET_PARAMETER request.
 .IP CURL_RTSPREQ_SET_PARAMETER
 Set a parameter on the server. By default, libcurl will automatically include
 a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
-interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application
-may either use \fICURLOPT_UPLOAD\fP with \fICURLOPT_READDATA\fP like an HTTP
-PUT, or it may use \fICURLOPT_POSTFIELDS\fP like an HTTP POST. No chunked
+interaction with SET_PARAMTER is much like a HTTP PUT or POST. An application
+may either use \fICURLOPT_UPLOAD\fP with \fICURLOPT_READDATA\fP like a HTTP
+PUT, or it may use \fICURLOPT_POSTFIELDS\fP like a HTTP POST. No chunked
 transfers are allowed, so the application must set the
 \fICURLOPT_INFILESIZE\fP in the former and \fICURLOPT_POSTFIELDSIZE\fP in the
 latter. Also, there is no use of multi-part POSTs within RTSP. (Added in
@@ -1513,7 +1971,7 @@ over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
 simply sets the mode to ASCII and performs a standard transfer.
 .IP CURLOPT_PROXY_TRANSFER_MODE
 Pass a long. If the value is set to 1 (one), it tells libcurl to set the
-transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by
+transfer mode (binary or ASCII) for FTP transfers done via a HTTP proxy, by
 appending ;type=a or ;type=i to the URL. Without this setting, or it being set
 to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT\fP has no effect when doing
 FTP via a proxy. Beware that not all proxies support this feature.  (Added in
@@ -1528,7 +1986,7 @@ want. It should be in the format "X-Y", where X or Y may be left out. HTTP
 transfers also support several intervals, separated with commas as in
 \fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
 server to send the response document in pieces (using standard MIME separation
-techniques). For RTSP, the formatting of a range should follow RFC 2326
+techniques). For RTSP, the formatting of a range should follow RFC2326
 Section 12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges
 should be given in npt, utc, or smpte formats.
 
@@ -1550,33 +2008,45 @@ source file to the remote target file.
 Pass a curl_off_t as parameter. It contains the offset in number of bytes that
 you want the transfer to start from. (Added in 7.11.0)
 .IP CURLOPT_CUSTOMREQUEST
-Pass a pointer to a zero terminated string as parameter. It will be used
-instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
-when doing a FTP directory listing. This is useful for doing DELETE or other
-more or less obscure HTTP requests. Don't do this at will, make sure your
-server supports the command first.
-
+Pass a pointer to a zero terminated string as parameter. It can be used to
+specify the request instead of GET or HEAD when performing HTTP based
+requests, instead of LIST and NLST when performing FTP directory listings and
+instead of LIST and RETR when issuing POP3 based commands. This is
+particularly useful, for example, for performing a HTTP DELETE request or a
+POP3 DELE command.
+
+Please don't perform this at will, on HTTP based requests, by making sure
+your server supports the command you are sending first.
 When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST\fP to
-something, you don't actually change how libcurl behaves or acts in regards to
-the particular request method, it will only change the actual string sent in
-the request.
+something, you don't actually change how libcurl behaves or acts in regards
+to the particular request method, it will only change the actual string sent
+in the request.
 
-For example: if you tell libcurl to do a HEAD request, but then change the
-request to a "GET" with \fBCURLOPT_CUSTOMREQUEST\fP you'll still see libcurl
-act as if it sent a HEAD even when it does send a GET.
+For example:
 
-To switch to a proper HEAD, use \fICURLOPT_NOBODY\fP, to switch to a proper
-POST, use \fICURLOPT_POST\fP or \fICURLOPT_POSTFIELDS\fP and so on.
+With the HTTP protocol when you tell libcurl to do a HEAD request, but then
+specify a GET though a custom request libcurl will still act as if it sent a
+HEAD. To switch to a proper HEAD use \fICURLOPT_NOBODY\fP, to switch to a
+proper POST use \fICURLOPT_POST\fP or \fICURLOPT_POSTFIELDS\fP and to switch
+to a proper GET use CURLOPT_HTTPGET.
+
+With the POP3 protocol when you tell libcurl to use a custom request it will
+behave like a LIST or RETR command was sent where it expects data to be
+returned by the server. As such \fICURLOPT_NOBODY\fP should be used when
+specifying commands such as DELE and NOOP for example.
 
 Restore to the internal default by setting this to NULL.
 
 Many people have wrongly used this option to replace the entire request with
-their own, including multiple headers and POST contents. While that might work
-in many cases, it will cause libcurl to send invalid requests and it could
-possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and
+their own, including multiple headers and POST contents. While that might
+work in many cases, it will cause libcurl to send invalid requests and it
+could possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and
 \fICURLOPT_POSTFIELDS\fP to set POST data. Use \fICURLOPT_HTTPHEADER\fP to
 replace or extend the set of headers sent by libcurl. Use
 \fICURLOPT_HTTP_VERSION\fP to change HTTP version.
+
+(Support for POP3 added in 7.26.0)
 .IP CURLOPT_FILETIME
 Pass a long. If it is 1, libcurl will attempt to get the modification date of
 the remote document in this operation. This requires that the remote server
@@ -1585,11 +2055,11 @@ sends the time or replies to a time querying command. The
 can be used after a transfer to extract the received time (if any).
 .IP CURLOPT_NOBODY
 A parameter set to 1 tells the library to not include the body-part in the
-output. This is only relevant for protocols that have separate header and body
-parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
+output. This is only relevant for protocols that have separate header and
+body parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
 
-To change request to GET, you should use \fICURLOPT_HTTPGET\fP. Change request
-to POST with \fICURLOPT_POST\fP etc.
+To change request to GET, you should use \fICURLOPT_HTTPGET\fP. Change
+request to POST with \fICURLOPT_POST\fP etc.
 .IP CURLOPT_INFILESIZE
 When uploading a file to a remote site, this option should be used to tell
 libcurl what the expected size of the infile is. This value should be passed
@@ -1598,6 +2068,9 @@ as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
 For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE\fP is
 mandatory.
 
+When sending emails using SMTP, this command can be used to specify the
+optional SIZE parameter for the MAIL FROM command. (Added in 7.23.0)
+
 This option does not limit how much data libcurl will actually send, as that
 is controlled entirely by what the read callback returns.
 .IP CURLOPT_INFILESIZE_LARGE
@@ -1644,8 +2117,8 @@ given limit. This concerns both FTP and HTTP transfers.
 .IP CURLOPT_TIMECONDITION
 Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
 value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
-or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, and
-RTSP.
+or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, RTSP,
+and FILE.
 
 The last modification time of a file is not always known and in such instances
 this feature will have no effect even if the given time condition would not
@@ -1666,6 +2139,8 @@ SIGALRM to enable time-outing system calls.
 
 In unix-like systems, this might cause signals to be used unless
 \fICURLOPT_NOSIGNAL\fP is set.
+
+Default timeout is 0 (zero) which means it never times out.
 .IP CURLOPT_TIMEOUT_MS
 Like \fICURLOPT_TIMEOUT\fP but takes number of milliseconds instead. If
 libcurl is built to use the standard system name resolver, that portion
@@ -1727,9 +2202,9 @@ re-use (default behavior).
 .IP CURLOPT_CONNECTTIMEOUT
 Pass a long. It should contain the maximum time in seconds that you allow the
 connection to the server to take.  This only limits the connection phase, once
-it has connected, this option is of no more use. Set to zero to disable
-connection timeout (it will then only timeout on the system's internal
-timeouts). See also the \fICURLOPT_TIMEOUT\fP option.
+it has connected, this option is of no more use. Set to zero to switch to the
+default built-in connection timeout - 300 seconds. See also the
+\fICURLOPT_TIMEOUT\fP option.
 
 In unix-like systems, this might cause signals to be used unless
 \fICURLOPT_NOSIGNAL\fP is set.
@@ -1754,11 +2229,12 @@ Resolve to IPv6 addresses.
 .IP CURLOPT_CONNECT_ONLY
 Pass a long. If the parameter equals 1, it tells the library to perform all
 the required proxy authentication and connection setup, but no data transfer.
-This option is useful only on HTTP URLs.
+This option is implemented for HTTP, SMTP and POP3.
 
-This option is useful with the \fICURLINFO_LASTSOCKET\fP option to
-\fIcurl_easy_getinfo(3)\fP. The library can set up the connection and then the
-application can obtain the most recently used socket for special data
+The option can be used to simply test a connection to a server, but is more
+useful when used with the \fICURLINFO_LASTSOCKET\fP option to
+\fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then
+the application can obtain the most recently used socket for special data
 transfers. (Added in 7.15.2)
 .IP CURLOPT_USE_SSL
 Pass a long using one of the values from below, to make libcurl use your
@@ -1800,15 +2276,40 @@ resolves, by including a string in the linked list that uses the format
 \&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
 and port number must exactly match what was already added previously.
 
-(Added in 7.12.3)
+(Added in 7.21.3)
+.IP CURLOPT_DNS_SERVERS
+Set the list of DNS servers to be used instead of the system default.
+The format of the dns servers option is:
+
+host[:port][,host[:port]]...
+
+For example:
+
+192.168.1.100,192.168.1.101,3.4.5.6
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+(Added in 7.24.0)
+.IP CURLOPT_ACCEPTTIMEOUT_MS
+Pass a long telling libcurl the maximum number of milliseconds to wait for a
+server to connect back to libcurl when an active FTP connection is used. If no
+timeout is set, the internal default of 60000 will be used. (Added in 7.24.0)
 .SH SSL and SECURITY OPTIONS
 .IP CURLOPT_SSLCERT
 Pass a pointer to a zero terminated string as parameter. The string should be
 the file name of your certificate. The default format is "PEM" and can be
 changed with \fICURLOPT_SSLCERTTYPE\fP.
 
-With NSS this is the nickname of the certificate you wish to authenticate
-with.
+With NSS this can also be the nickname of the certificate you wish to
+authenticate with. If you want to use a file from the current directory, please
+precede it with "./" prefix, in order to avoid confusion with a nickname.
+
+(iOS and Mac OS X only) With Secure Transport, this string must match the name
+of a certificate that's in the system or user keychain. You should encode this
+string in UTF-8 format in case it contains non-ASCII characters. The private
+key corresponding to the certificate, and certificate chain (if any),  must
+also be present in the keychain. (Added in 7.31.0)
 .IP CURLOPT_SSLCERTTYPE
 Pass a pointer to a zero terminated string as parameter. The string should be
 the format of your certificate. Supported formats are "PEM" and "DER".  (Added
@@ -1817,6 +2318,10 @@ in 7.9.3)
 Pass a pointer to a zero terminated string as parameter. The string should be
 the file name of your private key. The default format is "PEM" and can be
 changed with \fICURLOPT_SSLKEYTYPE\fP.
+
+(iOS and Mac OS X only) This option is ignored if curl was built against Secure
+Transport. Secure Transport expects the private key to be already present in
+the keychain containing the certificate.
 .IP CURLOPT_SSLKEYTYPE
 Pass a pointer to a zero terminated string as parameter. The string should be
 the format of your private key. Supported formats are "PEM", "DER" and "ENG".
@@ -1867,28 +2372,30 @@ Force SSLv2
 Force SSLv3
 .RE
 .IP CURLOPT_SSL_VERIFYPEER
-Pass a long as parameter.
+Pass a long as parameter. By default, curl assumes a value of 1.
 
 This option determines whether curl verifies the authenticity of the peer's
-certificate. A value of 1 means curl verifies; zero means it doesn't.  The
-default is nonzero, but before 7.10, it was zero.
+certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
 
-When negotiating an SSL connection, the server sends a certificate indicating
+When negotiating a SSL connection, the server sends a certificate indicating
 its identity.  Curl verifies whether the certificate is authentic, i.e. that
 you can trust that the server is who the certificate says it is.  This trust
 is based on a chain of digital signatures, rooted in certification authority
-(CA) certificates you supply.  As of 7.10, curl installs a default bundle of
-CA certificates and you can specify alternate certificates with the
-\fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP option.
+(CA) certificates you supply.  curl uses a default bundle of CA certificates
+(the path for that is determined at build time) and you can specify alternate
+certificates with the \fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP
+option.
 
 When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
 prove that the certificate is authentic, the connection fails.  When the
-option is zero, the connection succeeds regardless.
+option is zero, the peer certificate verification succeeds regardless.
 
 Authenticating the certificate is not by itself very useful.  You typically
 want to ensure that the server, as authentically identified by its
 certificate, is the server you mean to be talking to.  Use
-\fICURLOPT_SSL_VERIFYHOST\fP to control that.
+\fICURLOPT_SSL_VERIFYHOST\fP to control that. The check that the host name in
+the certificate is valid for the host name you're connecting to is done
+independently of the \fICURLOPT_SSL_VERIFYPEER\fP option.
 .IP CURLOPT_CAINFO
 Pass a char * to a zero terminated string naming a file holding one or more
 certificates to verify the peer with.  This makes sense only when used in
@@ -1899,8 +2406,8 @@ even indicate an accessible file.
 This option is by default set to the system path where libcurl's cacert bundle
 is assumed to be stored, as established at build time.
 
-When built against NSS, this is the directory that the NSS certificate
-database resides in.
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
 .IP CURLOPT_ISSUERCERT
 Pass a char * to a zero terminated string naming a file holding a CA
 certificate in PEM format. If the option is set, an additional check against
@@ -1919,13 +2426,15 @@ mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER\fP has
 to be set too for the check to fail). (Added in 7.19.0)
 .IP CURLOPT_CAPATH
 Pass a char * to a zero terminated string naming a directory holding multiple
-CA certificates to verify the peer with. The certificate directory must be
-prepared using the openssl c_rehash utility. This makes sense only when used
-in combination with the \fICURLOPT_SSL_VERIFYPEER\fP option.  If
-\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAPATH\fP need not even
-indicate an accessible path.  The \fICURLOPT_CAPATH\fP function apparently
-does not work in Windows due to some limitation in openssl. This option is
-OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
+CA certificates to verify the peer with. If libcurl is built against OpenSSL,
+the certificate directory must be prepared using the openssl c_rehash utility.
+This makes sense only when used in combination with the
+\fICURLOPT_SSL_VERIFYPEER\fP option.  If \fICURLOPT_SSL_VERIFYPEER\fP is zero,
+\fICURLOPT_CAPATH\fP need not even indicate an accessible path.  The
+\fICURLOPT_CAPATH\fP function apparently does not work in Windows due to some
+limitation in openssl. This option is OpenSSL-specific and does nothing if
+libcurl is built to use GnuTLS. NSS-powered libcurl provides the option only
+for backward compatibility.
 .IP CURLOPT_CRLFILE
 Pass a char * to a zero terminated string naming a file with the concatenation
 of CRL (in PEM format) to use in the certificate validation that occurs during
@@ -1944,20 +2453,6 @@ A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It
 is returned when the SSL exchange fails because the CRL file cannot be loaded.
 A failure in certificate verification due to a revocation information found in
 the CRL does not trigger this specific error. (Added in 7.19.0)
-.IP CURLOPT_CERTINFO
-Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
-this enabled, libcurl (if built with OpenSSL) will extract lots of information
-and data about the certificates in the certificate chain used in the SSL
-connection. This data is then possible to extract after a transfer using
-\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
-7.19.1)
-.IP CURLOPT_RANDOM_FILE
-Pass a char * to a zero terminated file name. The file will be used to read
-from to seed the random engine for SSL. The more random the specified file is,
-the more secure the SSL connection will become.
-.IP CURLOPT_EGDSOCKET
-Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
-socket. It will be used to seed the random engine for SSL.
 .IP CURLOPT_SSL_VERIFYHOST
 Pass a long as parameter.
 
@@ -1975,16 +2470,35 @@ Curl considers the server the intended one when the Common Name field or a
 Subject Alternate Name field in the certificate matches the host name in the
 URL to which you told Curl to connect.
 
-When the value is 1, the certificate must contain a Common Name field, but it
-doesn't matter what name it says.  (This is not ordinarily a useful setting).
+When the value is 1, libcurl will return a failure. It was previously (in
+7.28.0 and earlier) a debug option of some sorts, but it is no longer
+supported due to frequently leading to programmer mistakes.
 
 When the value is 0, the connection succeeds regardless of the names in the
 certificate.
 
-The default, since 7.10, is 2.
+The default value for this option is 2.
+
+This option controls checking the server's certificate's claimed identity.
+The server could be lying.  To control lying, see
+\fICURLOPT_SSL_VERIFYPEER\fP.  If libcurl is built against NSS and
+\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_SSL_VERIFYHOST\fP
+is ignored.
 
-This option controls checking the server's claimed identity.  The server could
-be lying.  To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
+.IP CURLOPT_CERTINFO
+Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
+this enabled, libcurl (if built with OpenSSL) will extract lots of information
+and data about the certificates in the certificate chain used in the SSL
+connection. This data is then possible to extract after a transfer using
+\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
+7.19.1)
+.IP CURLOPT_RANDOM_FILE
+Pass a char * to a zero terminated file name. The file will be used to read
+from to seed the random engine for SSL. The more random the specified file is,
+the more secure the SSL connection will become.
+.IP CURLOPT_EGDSOCKET
+Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
+socket. It will be used to seed the random engine for SSL.
 .IP CURLOPT_SSL_CIPHER_LIST
 Pass a char *, pointing to a zero terminated string holding the list of
 ciphers to use for the SSL connection. The list must be syntactically correct,
@@ -2005,7 +2519,7 @@ this option then all known ciphers are disabled and only those passed in
 are enabled.
 
 You'll find more details about the NSS cipher lists on this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
+\fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
 
 .IP CURLOPT_SSL_SESSIONID_CACHE
 Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
@@ -2013,6 +2527,16 @@ this to 1 to enable it. By default all transfers are done using the
 cache. While nothing ever should get hurt by attempting to reuse SSL
 session-IDs, there seem to be broken SSL implementations in the wild that may
 require you to disable this in order for you to succeed. (Added in 7.16.0)
+.IP CURLOPT_SSL_OPTIONS
+Pass a long with a bitmask to tell libcurl about specific SSL behaviors.
+
+CURLSSLOPT_ALLOW_BEAST is the only supported bit and by setting this the user
+will tell libcurl to not attempt to use any workarounds for a security flaw
+in the SSL3 and TLS1.0 protocols.  If this option isn't used or this bit is
+set to 0, the SSL layer libcurl uses may use a work-around for this flaw
+although it might cause interoperability problems with some (older) SSL
+implementations. WARNING: avoiding this work-around loosens the security, and
+by setting this option to 1 you ask for exactly that. (Added in 7.25.0)
 .IP CURLOPT_KRBLEVEL
 Pass a char * as parameter. Set the kerberos security level for FTP; this also
 enables kerberos awareness.  This is a string, \&'clear', \&'safe',
@@ -2021,12 +2545,23 @@ of these, 'private' will be used. Set the string to NULL to disable kerberos
 support for FTP.
 
 (This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
+.IP CURLOPT_GSSAPI_DELEGATION
+Set the parameter to CURLGSSAPI_DELEGATION_FLAG to allow unconditional GSSAPI
+credential delegation.  The delegation is disabled by default since 7.21.7.
+Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG to delegate only if
+the OK-AS-DELEGATE flag is set in the service ticket in case this feature is
+supported by the GSSAPI implementation and the definition of
+GSS_C_DELEG_POLICY_FLAG was available at compile-time.
+(Added in 7.22.0)
 .SH SSH OPTIONS
 .IP CURLOPT_SSH_AUTH_TYPES
 Pass a long set to a bitmask consisting of one or more of
 CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
-CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
-(Added in 7.16.1)
+CURLSSH_AUTH_KEYBOARD and CURLSSH_AUTH_AGENT. Set CURLSSH_AUTH_ANY to let
+libcurl pick a suitable one. Currently CURLSSH_AUTH_HOST has no effect. (Added
+in 7.16.1) If CURLSSH_AUTH_AGENT is used, libcurl attempts to connect to
+ssh-agent or pageant and let the agent attempt the authentication. (Added in
+7.28.0)
 .IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
 Pass a char * pointing to a string containing 32 hexadecimal digits. The
 string should be the 128 bit MD5 checksum of the remote host's public key, and
@@ -2034,13 +2569,18 @@ libcurl will reject the connection to the host unless the md5sums match. This
 option is only for SCP and SFTP transfers. (Added in 7.17.1)
 .IP CURLOPT_SSH_PUBLIC_KEYFILE
 Pass a char * pointing to a file name for your public key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
-(Added in 7.16.1)
+libcurl defaults to \fB$HOME/.ssh/id_dsa.pub\fP if the HOME environment
+variable is set, and just "id_dsa.pub" in the current directory if HOME is not
+set.  (Added in 7.16.1)
+If an empty string is passed, libcurl will pass no public key to libssh2
+which then tries to compute it from the private key, this is known to work
+when libssh2 1.4.0+ is linked against OpenSSL. (Added in 7.26.0)
 .IP CURLOPT_SSH_PRIVATE_KEYFILE
 Pass a char * pointing to a file name for your private key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa\fP.  If the file is
-password-protected, set the password with \fICURLOPT_KEYPASSWD\fP. (Added in
-7.16.1)
+libcurl defaults to \fB$HOME/.ssh/id_dsa\fP if the HOME environment variable
+is set, and just "id_dsa" in the current directory if HOME is not set.  If the
+file is password-protected, set the password with
+\fICURLOPT_KEYPASSWD\fP. (Added in 7.16.1)
 .IP CURLOPT_SSH_KNOWNHOSTS
 Pass a pointer to a zero terminated string holding the file name of the
 known_host file to use.  The known_hosts file should use the OpenSSH file
@@ -2051,7 +2591,10 @@ behavior on host and key (mis)matching. (Added in 7.19.6)
 .IP CURLOPT_SSH_KEYFUNCTION
 Pass a pointer to a curl_sshkeycallback function. It gets called when the
 known_host matching has been done, to allow the application to act and decide
-for libcurl how to proceed. It gets passed the CURL handle, the key from the
+for libcurl how to proceed. The callback will only be called if
+\fICURLOPT_SSH_KNOWNHOSTS\fP is also set.
+
+The curl_sshkeycallback function gets passed the CURL handle, the key from the
 known_hosts file, the key from the remote site, info from libcurl on the
 matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
 MUST return one of the following return codes to tell libcurl how to act:
index 396c61b..f39674f 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,104 +56,139 @@ p.roffit {
 <p class="level0">The <span Class="emphasis">handle</span> is the return code from a <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> or <a class="emphasis" href="./curl_easy_duphandle.html">curl_easy_duphandle(3)</a> call. <a name="BEHAVIOR"></a><h2 class="nroffsh">BEHAVIOR OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTVERBOSE"></a><span class="nroffip">CURLOPT_VERBOSE</span> 
-<p class="level1">Set the parameter to 1 to get the library to display a lot of verbose information about its operations. Very useful for libcurl and/or protocol debugging and understanding. The verbose information will be sent to stderr, or the stream set with <a class="emphasis" href="#CURLOPTSTDERR">CURLOPT_STDERR</a>. 
+<p class="level1">Set the parameter to 1 to get the library to display a lot of verbose information about its operations. Very useful for libcurl and/or protocol debugging and understanding. The verbose information will be sent to stderr, or the stream set with <a class="emphasis" href="#CURLOPTSTDERR">CURLOPT_STDERR</a>. The default value for this parameter is 0. 
 <p class="level1">You hardly ever want this set in production use, you will almost always want this when you debug/report problems. Another neat option for debugging is the <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a>. 
 <p class="level0"><a name="CURLOPTHEADER"></a><span class="nroffip">CURLOPT_HEADER</span> 
-<p class="level1">A parameter set to 1 tells the library to include the header in the body output. This is only relevant for protocols that actually have headers preceding the data (like HTTP). 
+<p class="level1">A parameter set to 1 tells the library to include the header in the body output. This is only relevant for protocols that actually have headers preceding the data (like HTTP). The default value for this parameter is 0. 
 <p class="level0"><a name="CURLOPTNOPROGRESS"></a><span class="nroffip">CURLOPT_NOPROGRESS</span> 
-<p class="level1">A parameter set to 1 tells the library to shut off the built-in progress meter completely
+<p class="level1">Pass a long. If set to 1, it tells the library to shut off the progress meter completely. It will also prevent the <a class="emphasis" href="#CURLOPTPROGRESSFUNCTION">CURLOPT_PROGRESSFUNCTION</a> from getting called. The default value for this parameter is 1
 <p class="level1">Future versions of libcurl are likely to not have any built-in progress meter at all. 
 <p class="level0"><a name="CURLOPTNOSIGNAL"></a><span class="nroffip">CURLOPT_NOSIGNAL</span> 
-<p class="level1">Pass a long. If it is 1, libcurl will not use any functions that install signal handlers or any functions that cause signals to be sent to the process. This option is mainly here to allow multi-threaded unix applications to still set/use all timeout options etc, without risking getting signals. (Added in 7.10) 
+<p class="level1">Pass a long. If it is 1, libcurl will not use any functions that install signal handlers or any functions that cause signals to be sent to the process. This option is mainly here to allow multi-threaded unix applications to still set/use all timeout options etc, without risking getting signals. The default value for this parameter is 0. (Added in 7.10) 
 <p class="level1">If this option is set and libcurl has been built with the standard name resolver, timeouts will not occur while the name resolve takes place. Consider building libcurl with c-ares support to enable asynchronous DNS lookups, which enables nice timeouts for name resolves without signals. 
-<p class="level1">Setting <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> to 1 makes libcurl NOT ask the system to ignore SIGPIPE signals, which otherwise are sent by the system when trying to send data to a socket which is closed in the other end. libcurl makes an effort to never cause such SIGPIPEs to trigger, but some operating systems have no way to avoid them and even on those that have there are some corner cases when they may still happen, contrary to our desire. 
+<p class="level1">Setting <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> to 1 makes libcurl NOT ask the system to ignore SIGPIPE signals, which otherwise are sent by the system when trying to send data to a socket which is closed in the other end. libcurl makes an effort to never cause such SIGPIPEs to trigger, but some operating systems have no way to avoid them and even on those that have there are some corner cases when they may still happen, contrary to our desire. In addition, using <a class="emphasis" href="#CURLAUTHNTLMWB">CURLAUTH_NTLM_WB</a> authentication could cause a SIGCHLD signal to be raised. 
 <p class="level0"><a name="CURLOPTWILDCARDMATCH"></a><span class="nroffip">CURLOPT_WILDCARDMATCH</span> 
 <p class="level1">Set this option to 1 if you want to transfer multiple files according to a file name pattern. The pattern can be specified as part of the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> option, using an fnmatch-like pattern (Shell Pattern Matching) in the last part of URL (file name). 
 <p class="level1">By default, libcurl uses its internal wildcard matching implementation. You can provide your own matching function by the <a class="emphasis" href="#CURLOPTFNMATCHFUNCTION">CURLOPT_FNMATCH_FUNCTION</a> option. 
 <p class="level1">This feature is only supported by the FTP download for now. 
 <p class="level1">A brief introduction of its syntax follows: 
 <p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB*\fP - ASTERISK</span> 
+<p class="level1"><a name=""></a><span class="nroffip">* - ASTERISK</span> 
 <p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">*.txt</span> (for all txt's from the root directory) 
 <p class="level1">
 <p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB?\fP - QUESTION MARK</span> 
+<p class="level1"><a name=""></a><span class="nroffip">? - QUESTION MARK</span> 
 <p class="level2">Question mark matches any (exactly one) character. 
 <p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">photo?.jpeg</span> 
 <p class="level1">
 <p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB[\fP - BRACKET EXPRESSION</span> 
+<p class="level1"><a name=""></a><span class="nroffip">[ - BRACKET EXPRESSION</span> 
 <p class="level2">The left bracket opens a bracket expression. The question mark and asterisk have no special meaning in a bracket expression. Each bracket expression ends by the right bracket and matches exactly one character. Some examples follow: 
 <p class="level2"><span Class="bold">[a-zA-Z0-9]</span> or <span Class="bold">[f-gF-G]</span> - character interval 
 <p class="level2"><span Class="bold">[abc]</span> - character enumeration 
 <p class="level2"><span Class="bold">[^abc]</span> or <span Class="bold">[!abc]</span> - negation 
-<p class="level2"><span Class="bold">[[:</span><span Class="emphasis">name</span><span Class="bold">:]]</span> class expression. Supported classes are <span Class="bold">alnum</span>,<span Class="bold">lower</span>, <span Class="bold">space</span>, <span Class="bold">alpha</span>, <span Class="bold">digit</span>, <span Class="bold">print</span>, <span Class="bold">upper</span>, <span Class="bold">blank</span>, <span Class="bold">graph</span>, <span Class="bold">xdigit</span>. 
+<p class="level2"><a class="bold" href="#">[[:</a><span Class="emphasis">name</span><a class="bold" href="#">:]]</a> class expression. Supported classes are <span Class="bold">alnum</span>,<span Class="bold">lower</span>, <span Class="bold">space</span>, <span Class="bold">alpha</span>, <span Class="bold">digit</span>, <span Class="bold">print</span>, <span Class="bold">upper</span>, <span Class="bold">blank</span>, <span Class="bold">graph</span>, <span Class="bold">xdigit</span>. 
 <p class="level2"><span Class="bold">[][-!^]</span> - special case - matches only '-', ']', '[', '!' or '^'. These characters have no special purpose. 
-<p class="level2"><span Class="bold">[\[\]\\]</span> - escape syntax. Matches '[', ']' or '&acute;. 
+<p class="level2"><a class="bold" href="#">[\[\]\\]</a> - escape syntax. Matches '[', ']' or '&acute;. 
 <p class="level2">Using the rules above, a file name pattern can be constructed: 
 <p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">[a-z[:upper:]\\].jpeg</span> 
 <p class="level1">
 <p class="level1">(This was added in 7.21.0) <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTWRITEFUNCTION"></a><span class="nroffip">CURLOPT_WRITEFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as there is data received that needs to be saved. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>, it will not be zero terminated. Return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURLE_WRITE_ERROR</span>. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">size_t function( char *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as there is data received that needs to be saved. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>, it will not be zero terminated. Return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURLE_WRITE_ERROR</span>. 
 <p class="level1">From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will cause writing to this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details. 
 <p class="level1">This function may be called with zero bytes data if the transferred file is empty. 
 <p class="level1">Set this option to NULL to get the internal default function. The internal default function will write the data to the FILE * given with <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a>. 
 <p class="level1">Set the <span Class="emphasis">userdata</span> argument with the <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> option. 
-<p class="level1">The callback function will be passed as much data as possible in all invokes, but you cannot possibly make any assumptions. It may be one byte, it may be thousands. The maximum amount of data that can be passed to the write callback is defined in the curl.h header file: CURL_MAX_WRITE_SIZE
+<p class="level1">The callback function will be passed as much data as possible in all invokes, but you cannot possibly make any assumptions. It may be one byte, it may be thousands. The maximum amount of body data that can be passed to the write callback is defined in the curl.h header file: CURL_MAX_WRITE_SIZE (the usual default is 16K). If you however have <a class="emphasis" href="#CURLOPTHEADER">CURLOPT_HEADER</a> set, which sends header data to the write callback, you can get up to <span Class="emphasis">CURL_MAX_HTTP_HEADER</span> bytes of header data passed into it. This usually means 100K
 <p class="level0"><a name="CURLOPTWRITEDATA"></a><span class="nroffip">CURLOPT_WRITEDATA</span> 
-<p class="level1">Data pointer to pass to the file write function. If you use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> option, this is the pointer you'll get as input. If you don't use a callback, you must pass a 'FILE *' as libcurl will pass this to fwrite() when writing data
+<p class="level1">Data pointer to pass to the file write function. If you use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> option, this is the pointer you'll get as input. If you don't use a callback, you must pass a 'FILE *' (cast to 'void *') as libcurl will pass this to fwrite() when writing data. By default, the value of this parameter is unspecified
 <p class="level1">The internal <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> will write the data to the FILE * given with this option, or to stdout if this option hasn't been set. 
 <p class="level1">If you're using libcurl as a win32 DLL, you <span Class="bold">MUST</span> use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> if you set this option or you will experience crashes. 
 <p class="level1">This option is also known with the older name <span Class="emphasis">CURLOPT_FILE</span>, the name <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> was introduced in 7.9.7. 
 <p class="level0"><a name="CURLOPTREADFUNCTION"></a><span class="nroffip">CURLOPT_READFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as it needs to read data in order to send it to the peer. The data area pointed at by the pointer <span Class="emphasis">ptr</span> may be filled with at most <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span> number of bytes. Your function must return the actual number of bytes that you stored in that memory area. Returning 0 will signal end-of-file to the library and cause it to stop the current transfer. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as it needs to read data in order to send it to the peer. The data area pointed at by the pointer <span Class="emphasis">ptr</span> may be filled with at most <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span> number of bytes. Your function must return the actual number of bytes that you stored in that memory area. Returning 0 will signal end-of-file to the library and cause it to stop the current transfer. 
 <p class="level1">If you stop the current transfer by returning 0 "pre-maturely" (i.e before the server expected it, like when you've said you will upload N bytes and you upload less than N bytes), you may experience that the server "hangs" waiting for the rest of the data that won't come. 
 <p class="level1">The read callback may return <span Class="emphasis">CURL_READFUNC_ABORT</span> to stop the current operation immediately, resulting in a <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span> error code from the transfer (Added in 7.12.1) 
 <p class="level1">From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause reading from this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details. 
+<p class="level1"><span Class="bold">Bugs</span>: when doing TFTP uploads, you must return the exact amount of data that the callback wants, or it will be considered the final packet by the server end and the transfer will end there. 
 <p class="level1">If you set this callback pointer to NULL, or don't set it at all, the default internal read function will be used. It is doing an fread() on the FILE * userdata set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a>. 
 <p class="level0"><a name="CURLOPTREADDATA"></a><span class="nroffip">CURLOPT_READDATA</span> 
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a read callback but instead rely on the default internal read function, this data must be a valid readable FILE *. 
+<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a read callback but instead rely on the default internal read function, this data must be a valid readable FILE * (cast to 'void *')
 <p class="level1">If you're using libcurl as a win32 DLL, you MUST use a <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> if you set this option. 
 <p class="level1">This option was also known by the older name <span Class="emphasis">CURLOPT_INFILE</span>, the name <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> was introduced in 7.9.7. 
 <p class="level0"><a name="CURLOPTIOCTLFUNCTION"></a><span class="nroffip">CURLOPT_IOCTLFUNCTION</span> 
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_ioctl_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl when something special I/O-related needs to be done that the library can't do by itself. For now, rewinding the read data stream is the only action it can request. The rewinding of the read data stream may be necessary when doing a HTTP PUT or POST with a multi-pass authentication method.  (Option added in 7.12.3). 
-<p class="level1">Use <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> instead to provide seeking! 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">curlioerr function(CURL *handle, int cmd, void *clientp);</span>. This function gets called by libcurl when something special I/O-related needs to be done that the library can't do by itself. For now, rewinding the read data stream is the only action it can request. The rewinding of the read data stream may be necessary when doing a HTTP PUT or POST with a multi-pass authentication method. By default, this parameter is set to NULL.  (Option added in 7.12.3). 
+<p class="level1">Use <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> instead to provide seeking! If <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> is set, this parameter will be ignored when seeking. 
 <p class="level0"><a name="CURLOPTIOCTLDATA"></a><span class="nroffip">CURLOPT_IOCTLDATA</span> 
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the 3rd argument in the ioctl callback set with <a class="emphasis" href="#CURLOPTIOCTLFUNCTION">CURLOPT_IOCTLFUNCTION</a>.  (Option added in 7.12.3) 
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the 3rd argument in the ioctl callback set with <a class="emphasis" href="#CURLOPTIOCTLFUNCTION">CURLOPT_IOCTLFUNCTION</a>. By default, the value of this parameter is unspecified.  (Option added in 7.12.3) 
 <p class="level0"><a name="CURLOPTSEEKFUNCTION"></a><span class="nroffip">CURLOPT_SEEKFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int function(void *instream, curl_off_t offset, int origin);</span> This function gets called by libcurl to seek to a certain position in the input stream and can be used to fast forward a file in a resumed upload (instead of reading all uploaded bytes with the normal read function/callback). It is also called to rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET, SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2 (CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is free to work around the problem if possible. The latter can sometimes be done by instead reading from the input or similar. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">int function(void *instream, curl_off_t offset, int origin);</span> This function gets called by libcurl to seek to a certain position in the input stream and can be used to fast forward a file in a resumed upload (instead of reading all uploaded bytes with the normal read function/callback). It is also called to rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET, SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2 (CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is free to work around the problem if possible. The latter can sometimes be done by instead reading from the input or similar. 
+<p class="level1">By default, this parameter is unset. 
 <p class="level1">If you forward the input arguments directly to "fseek" or "lseek", note that the data type for <span Class="emphasis">offset</span> is not the same as defined for curl_off_t on many systems! (Option added in 7.18.0) 
 <p class="level0"><a name="CURLOPTSEEKDATA"></a><span class="nroffip">CURLOPT_SEEKDATA</span> 
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a seek callback, NULL is passed. (Option added in 7.18.0) 
+<p class="level1">Data pointer to pass to the file seek function. If you use the <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a seek callback, NULL is passed. (Option added in 7.18.0) 
 <p class="level0"><a name="CURLOPTSOCKOPTFUNCTION"></a><span class="nroffip">CURLOPT_SOCKOPTFUNCTION</span> 
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_sockopt_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl after the socket() call but before the connect() call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the newly created socket descriptor so additional setsockopt() calls can be done at the user's discretion.  Return 0 (zero) from the callback on success. Return 1 from the callback function to signal an unrecoverable error to the library and it will close the socket and return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>.  (Option added in 7.15.6.) 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">int function(void *clientp, curl_socket_t curlfd, curlsocktype purpose);</span>. By default, this parameter is unset. If set, this function gets called by libcurl after the socket() call but before the connect() call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket: 
+<p class="level1"><span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for actively created connections or since 7.28.0 <span Class="emphasis">CURLSOCKTYPE_ACCEPT</span> for FTP when the connection was setup with PORT/EPSV (in earlier versions these sockets weren't passed to this callback). 
+<p class="level1">Future versions of libcurl may support more purposes. It passes the newly created socket descriptor so additional setsockopt() calls can be done at the user's discretion.  Return 0 (zero) from the callback on success. Return 1 from the callback function to signal an unrecoverable error to the library and it will close the socket and return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>.  (Option added in 7.16.0) 
+<p class="level1">Added in 7.21.5, the callback function may return <span Class="emphasis">CURL_SOCKOPT_ALREADY_CONNECTED</span>, which tells libcurl that the socket is in fact already connected and then libcurl will not attempt to connect it. 
 <p class="level0"><a name="CURLOPTSOCKOPTDATA"></a><span class="nroffip">CURLOPT_SOCKOPTDATA</span> 
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the sockopt callback set with <a class="emphasis" href="#CURLOPTSOCKOPTFUNCTION">CURLOPT_SOCKOPTFUNCTION</a>. (Option added in 7.15.6.
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the sockopt callback set with <a class="emphasis" href="#CURLOPTSOCKOPTFUNCTION">CURLOPT_SOCKOPTFUNCTION</a>. The default value of this parameter is unspecified. (Option added in 7.16.0
 <p class="level0"><a name="CURLOPTOPENSOCKETFUNCTION"></a><span class="nroffip">CURLOPT_OPENSOCKETFUNCTION</span> 
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_opensocket_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl instead of the <span Class="emphasis">socket(2)</span> call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the resolved peer address as a <span Class="emphasis">address</span> argument so the callback can modify the address or refuse to connect at all. The callback function should return the socket or <span Class="emphasis">CURL_SOCKET_BAD</span> in case no connection should be established or any error detected. Any additional <span Class="emphasis">setsockopt(2)</span> calls can be done on the socket at the user's discretion.  <span Class="emphasis">CURL_SOCKET_BAD</span> return value from the callback function will signal an unrecoverable error to the library and it will return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>.  This return code can be used for IP address blacklisting.  The default behavior is: <pre>
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">curl_socket_t function(void *clientp, curlsocktype purpose, struct curl_sockaddr *address);</span>. This function gets called by libcurl instead of the <span Class="emphasis">socket(2)</span> call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> is for IP based connections. Future versions of libcurl may support more purposes. It passes the resolved peer address as a <span Class="emphasis">address</span> argument so the callback can modify the address or refuse to connect at all. The callback function should return the socket or <span Class="emphasis">CURL_SOCKET_BAD</span> in case no connection could be established or another error was detected. Any additional <span Class="emphasis">setsockopt(2)</span> calls can be done on the socket at the user's discretion. <span Class="emphasis">CURL_SOCKET_BAD</span> return value from the callback function will signal an unrecoverable error to the library and it will return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>.  This return code can be used for IP address blacklisting.  The default behavior is: <pre>
 <p class="level1">&nbsp;  return socket(addr-&gt;family, addr-&gt;socktype, addr-&gt;protocol);
  </pre>
 
 <p class="level1">(Option added in 7.17.1.) 
 <p class="level0"><a name="CURLOPTOPENSOCKETDATA"></a><span class="nroffip">CURLOPT_OPENSOCKETDATA</span> 
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the opensocket callback set with <a class="emphasis" href="#CURLOPTOPENSOCKETFUNCTION">CURLOPT_OPENSOCKETFUNCTION</a>. (Option added in 7.17.1.) 
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the opensocket callback set with <a class="emphasis" href="#CURLOPTOPENSOCKETFUNCTION">CURLOPT_OPENSOCKETFUNCTION</a>. The default value of this parameter is unspecified. (Option added in 7.17.1.) 
+<p class="level0"><a name="CURLOPTCLOSESOCKETFUNCTION"></a><span class="nroffip">CURLOPT_CLOSESOCKETFUNCTION</span> 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">int function(void *clientp, curl_socket_t item);</span>. This function gets called by libcurl instead of the <span Class="emphasis">close(3)</span> or <span Class="emphasis">closesocket(3)</span> call when sockets are closed (not for any other file descriptors). This is pretty much the reverse to the <a class="emphasis" href="#CURLOPTOPENSOCKETFUNCTION">CURLOPT_OPENSOCKETFUNCTION</a> option. Return 0 to signal success and 1 if there was an error.  (Option added in 7.21.7) 
+<p class="level0"><a name="CURLOPTCLOSESOCKETDATA"></a><span class="nroffip">CURLOPT_CLOSESOCKETDATA</span> 
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the closesocket callback set with <a class="emphasis" href="#CURLOPTCLOSESOCKETFUNCTION">CURLOPT_CLOSESOCKETFUNCTION</a>. The default value of this parameter is unspecified. (Option added in 7.21.7) 
 <p class="level0"><a name="CURLOPTPROGRESSFUNCTION"></a><span class="nroffip">CURLOPT_PROGRESSFUNCTION</span> 
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_progress_callback</span> prototype found in <span Class="emphasis">&lt;curl/curl.h&gt;</span>. This function gets called by libcurl instead of its internal equivalent with a frequent interval during operation (roughly once per second or sooner) no matter if data is being transfered or not. Unknown/unused argument values passed to the callback will be set to zero (like if you only download data, the upload size will remain 0). Returning a non-zero value from this callback will cause libcurl to abort the transfer and return <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span>. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: 
+<p class="level1"><span class="bold">int function(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);</span> 
+<p class="level1">This function gets called by libcurl instead of its internal equivalent with a frequent interval. While data is being transferred it will be called very frequently, and during slow periods like when nothing is being transferred it can slow down to about one call per second. 
+<p class="level1"><span Class="emphasis">clientp</span> is the pointer set with <a class="emphasis" href="#CURLOPTPROGRESSDATA">CURLOPT_PROGRESSDATA</a>, it is not actually used by libcurl but is only passed along from the application to the callback. 
+<p class="level1">The callback gets told how much data libcurl will transfer and has transferred, in number of bytes. <span Class="emphasis">dltotal</span> is the total number of bytes libcurl expects to download in this transfer. <span Class="emphasis">dlnow</span> is the number of bytes downloaded so far. <span Class="emphasis">ultotal</span> is the total number of bytes libcurl expects to upload in this transfer. <span Class="emphasis">ulnow</span> is the number of bytes uploaded so far. 
+<p class="level1">Unknown/unused argument values passed to the callback will be set to zero (like if you only download data, the upload size will remain 0). Many times the callback will be called one or more times first, before it knows the data sizes so a program must be made to handle that. 
+<p class="level1">Returning a non-zero value from this callback will cause libcurl to abort the transfer and return <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span>. 
 <p class="level1">If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl function that performs transfers. 
 <p class="level1"><a class="emphasis" href="#CURLOPTNOPROGRESS">CURLOPT_NOPROGRESS</a> must be set to 0 to make this function actually get called. 
+<p class="level0"><a name="CURLOPTXFERINFOFUNCTION"></a><span class="nroffip">CURLOPT_XFERINFOFUNCTION</span> 
+<p class="level1">Pass a pointer to a function that matches the following prototype: 
+<p class="level1"><pre>
+<p class="level1"><span class="bold">int function(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
+ &nbsp;               curl_off_t ultotal, curl_off_t ulnow);</span>
+ </pre>
+
+<p class="level1">
+<p class="level1">This function gets called by libcurl instead of its internal equivalent with a frequent interval. While data is being transferred it will be called very frequently, and during slow periods like when nothing is being transferred it can slow down to about one call per second. 
+<p class="level1"><span Class="emphasis">clientp</span> is the pointer set with <a class="emphasis" href="#CURLOPTXFERINFODATA">CURLOPT_XFERINFODATA</a>, it is only passed along from the application to the callback. 
+<p class="level1">The callback gets told how much data libcurl will transfer and has transferred, in number of bytes. <span Class="emphasis">dltotal</span> is the total number of bytes libcurl expects to download in this transfer. <span Class="emphasis">dlnow</span> is the number of bytes downloaded so far. <span Class="emphasis">ultotal</span> is the total number of bytes libcurl expects to upload in this transfer. <span Class="emphasis">ulnow</span> is the number of bytes uploaded so far. 
+<p class="level1">Unknown/unused argument values passed to the callback will be set to zero (like if you only download data, the upload size will remain 0). Many times the callback will be called one or more times first, before it knows the data sizes so a program must be made to handle that. 
+<p class="level1">Returning a non-zero value from this callback will cause libcurl to abort the transfer and return <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span>. 
+<p class="level1">If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl function that performs transfers. 
+<p class="level1"><a class="emphasis" href="#CURLOPTNOPROGRESS">CURLOPT_NOPROGRESS</a> must be set to 0 to make this function actually get called. 
+<p class="level1">(Added in 7.32.0) 
 <p class="level0"><a name="CURLOPTPROGRESSDATA"></a><span class="nroffip">CURLOPT_PROGRESSDATA</span> 
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the progress callback set with <a class="emphasis" href="#CURLOPTPROGRESSFUNCTION">CURLOPT_PROGRESSFUNCTION</a>. 
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the progress callback set with <a class="emphasis" href="#CURLOPTPROGRESSFUNCTION">CURLOPT_PROGRESSFUNCTION</a>. The default value of this parameter is unspecified. 
+<p class="level0"><a name="CURLOPTXFERINFODATA"></a><span class="nroffip">CURLOPT_XFERINFODATA</span> 
+<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the progress callback set with <a class="emphasis" href="#CURLOPTXFERINFOFUNCTION">CURLOPT_XFERINFOFUNCTION</a>. The default value of this parameter is unspecified. This option is an alias for CURLOPT_PROGRESSDATA. (Added in 7.32.0) 
 <p class="level0"><a name="CURLOPTHEADERFUNCTION"></a><span class="nroffip">CURLOPT_HEADERFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span>. This function gets called by libcurl as soon as it has received header data. The header callback will be called once for each header and only complete header lines are passed on to the callback. Parsing headers should be easy enough using this. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>. Do not assume that the header line is zero terminated! The pointer named <span Class="emphasis">userdata</span> is the one you set with the <a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a> option. The callback function must return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURL_WRITE_ERROR</span>. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span>. This function gets called by libcurl as soon as it has received header data. The header callback will be called once for each header and only complete header lines are passed on to the callback. Parsing headers is very easy using this. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>. Do not assume that the header line is zero terminated! The pointer named <span Class="emphasis">userdata</span> is the one you set with the <a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a> option. The callback function must return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURL_WRITE_ERROR</span>. 
+<p class="level1">A complete HTTP header that is passed to this function can be up to <span Class="emphasis">CURL_MAX_HTTP_HEADER</span> (100K) bytes. 
 <p class="level1">If this option is not set, or if it is set to NULL, but <span Class="emphasis">CURLOPT_HEADERDATA</span> (<a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a>) is set to anything but NULL, the function used to accept response data will be used instead. That is, it will be the function specified with <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a>, or if it is not specified or NULL - the default, stream-writing function. 
 <p class="level1">It's important to note that the callback will be invoked for the headers of all responses received after initiating a request and not just the final response. This includes all responses which occur during authentication negotiation. If you need to operate on only the headers from the final response, you will need to collect headers in the callback yourself and use HTTP status lines, for example, to delimit response boundaries. 
-<p class="level1">Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a trailer. That trailer is identical to a HTTP header and if such a trailer is received it is passed to the application using this callback as well. There are several ways to detect it being a trailer and not an ordinary header: 1) it comes after the response-body. 2) it comes after the final header line (CR LF) 3) a Trailer: header among the response-headers mention what header to expect in the trailer. 
+<p class="level1">When a server sends a chunked encoded transfer, it may contain a trailer. That trailer is identical to a HTTP header and if such a trailer is received it is passed to the application using this callback as well. There are several ways to detect it being a trailer and not an ordinary header: 1) it comes after the response-body. 2) it comes after the final header line (CR LF) 3) a Trailer: header among the regular response-headers mention what header(s) to expect in the trailer. 
+<p class="level1">For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get called with the server responses to the commands that libcurl sends. 
 <p class="level0"><a name="CURLOPTWRITEHEADER"></a><span class="nroffip">CURLOPT_WRITEHEADER</span> 
-<p class="level1">(This option is also known as <span Class="bold">CURLOPT_HEADERDATA</span>) Pass a pointer to be used to write the header part of the received data to. If you don't use your own callback to take care of the writing, this must be a valid FILE *. See also the <a class="emphasis" href="#CURLOPTHEADERFUNCTION">CURLOPT_HEADERFUNCTION</a> option above on how to set a custom get-all-headers callback. 
+<p class="level1">(This option is also known as <span Class="bold">CURLOPT_HEADERDATA</span>) Pass a pointer to be used to write the header part of the received data to. If you don't use <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> or <a class="emphasis" href="#CURLOPTHEADERFUNCTION">CURLOPT_HEADERFUNCTION</a> to take care of the writing, this must be a valid FILE * as the internal default will then be a plain fwrite(). See also the <a class="emphasis" href="#CURLOPTHEADERFUNCTION">CURLOPT_HEADERFUNCTION</a> option above on how to set a custom get-all-headers callback. 
 <p class="level0"><a name="CURLOPTDEBUGFUNCTION"></a><span class="nroffip">CURLOPT_DEBUGFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);</span> <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> replaces the standard debug function used when <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE </a> is in effect. This callback receives debug information, as specified with the <span Class="bold">curl_infotype</span> argument. This function must return 0.  The data pointed to by the char * passed to this function WILL NOT be zero terminated, but will be exactly of the size as told by the size_t argument. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">int curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);</span> <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> replaces the standard debug function used when <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE </a> is in effect. This callback receives debug information, as specified with the <span Class="bold">curl_infotype</span> argument. This function must return 0.  The data pointed to by the char * passed to this function WILL NOT be zero terminated, but will be exactly of the size as told by the size_t argument. 
 <p class="level1">Available curl_infotype values: 
 <p class="level2">
 <p class="level1"><a name="CURLINFOTEXT"></a><span class="nroffip">CURLINFO_TEXT</span> 
@@ -169,9 +206,9 @@ p.roffit {
 <p class="level1">Pass a pointer to whatever you want passed in to your <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> in the last void * argument. This pointer is not used by libcurl, it is only passed to the callback. 
 <p class="level0"><a name="CURLOPTSSLCTXFUNCTION"></a><span class="nroffip">CURLOPT_SSL_CTX_FUNCTION</span> 
 <p class="level1">This option does only function for libcurl powered by OpenSSL. If libcurl was built against another SSL library, this functionality is absent. 
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm);</span> This function gets called by libcurl just before the initialization of an SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behaviour of openssl's ssl initialization. The <span Class="emphasis">sslctx</span> parameter is actually a pointer to an openssl <span Class="emphasis">SSL_CTX</span>. If an error is returned no attempt to establish a connection is made and the perform operation will return the error code from this callback function.  Set the <span Class="emphasis">parm</span> argument with the <a class="emphasis" href="#CURLOPTSSLCTXDATA">CURLOPT_SSL_CTX_DATA</a> option. This option was introduced in 7.11.0. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm);</span> This function gets called by libcurl just before the initialization of a SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behaviour of openssl's ssl initialization. The <span Class="emphasis">sslctx</span> parameter is actually a pointer to an openssl <span Class="emphasis">SSL_CTX</span>. If an error is returned no attempt to establish a connection is made and the perform operation will return the error code from this callback function.  Set the <span Class="emphasis">parm</span> argument with the <a class="emphasis" href="#CURLOPTSSLCTXDATA">CURLOPT_SSL_CTX_DATA</a> option. This option was introduced in 7.11.0. 
 <p class="level1">This function will get called on all new connections made to a server, during the SSL negotiation. The SSL_CTX pointer will be a new one every time. 
-<p class="level1">To use this properly, a non-trivial amount of knowledge of the openssl libraries is necessary. For example, using this function allows you to use openssl callbacks to add additional validation code for certificates, and even to change the actual URI of an HTTPS request (example used in the lib509 test case).  See also the example section for a replacement of the key, certificate and trust file settings. 
+<p class="level1">To use this properly, a non-trivial amount of knowledge of the openssl libraries is necessary. For example, using this function allows you to use openssl callbacks to add additional validation code for certificates, and even to change the actual URI of a HTTPS request (example used in the lib509 test case).  See also the example section for a replacement of the key, certificate and trust file settings. 
 <p class="level0"><a name="CURLOPTSSLCTXDATA"></a><span class="nroffip">CURLOPT_SSL_CTX_DATA</span> 
 <p class="level1">Data pointer to pass to the ssl context callback set by the option <a class="emphasis" href="#CURLOPTSSLCTXFUNCTION">CURLOPT_SSL_CTX_FUNCTION</a>, this is the pointer you'll get as third parameter, otherwise <span Class="bold">NULL</span>. (Added in 7.11.0) 
 <p class="level0"><a name="CURLOPTCONVTONETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_TO_NETWORK_FUNCTION</span> 
@@ -179,7 +216,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTCONVFROMNETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_NETWORK_FUNCTION</span> 
 <p class="level1">
 <p class="level0"><a name="CURLOPTCONVFROMUTF8FUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_UTF8_FUNCTION</span> 
-<p class="level1">Function pointers that should match the following prototype: CURLcode function(char *ptr, size_t length); 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">CURLcode function(char *ptr, size_t length);</span> 
 <p class="level1">These three options apply to non-ASCII platforms only.  They are available only if <span Class="bold">CURL_DOES_CONVERSIONS</span> was defined when libcurl was built. When this is the case, <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> will return the CURL_VERSION_CONV feature bit set. 
 <p class="level1">The data to be converted is in a buffer pointed to by the ptr parameter.  The amount of data to convert is indicated by the length parameter.  The converted data overlays the input data in the buffer pointed to by the ptr parameter. CURLE_OK should be returned upon successful conversion.  A CURLcode return value defined by curl.h, such as CURLE_CONV_FAILED, should be returned if an error was encountered. 
 <p class="level1"><a class="bold" href="#CURLOPTCONVTONETWORKFUNCTION">CURLOPT_CONV_TO_NETWORK_FUNCTION</a> and <a class="bold" href="#CURLOPTCONVFROMNETWORKFUNCTION">CURLOPT_CONV_FROM_NETWORK_FUNCTION</a> convert between the host encoding and the network encoding.  They are used when commands or ASCII data are sent/received over the network. 
@@ -192,28 +229,28 @@ p.roffit {
 <p class="level1">&nbsp;#define CURL_ICONV_CODESET_FOR_UTF8   "UTF-8" 
 <p class="level1">You will need to override these definitions if they are different on your system. 
 <p class="level0"><a name="CURLOPTINTERLEAVEFUNCTION"></a><span class="nroffip">CURLOPT_INTERLEAVEFUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata)</span>. This function gets called by libcurl as soon as it has received interleaved RTP data. This function gets called for each $ block and therefore contains exactly one upper-layer protocol unit (e.g.  one RTP packet). Curl writes the interleaved header as well as the included data for each call. The first byte is always an ASCII dollar sign. The dollar sign is followed by a one byte channel identifier and then a 2 byte integer length in network byte order. See <span Class="emphasis">RFC 2326 Section 10.12</span> for more information on how RTP interleaving behaves. If unset or set to NULL, curl will use the default write function. 
-<p class="level1">Interleaved RTP poses some challeneges for the client application. Since the stream data is sharing the RTSP control connection, it is critical to service the RTP in a timely fashion. If the RTP data is not handled quickly, subsequent response processing may become unreasonably delayed and the connection may close. The application may use <a class="emphasis" href="#CURLRTSPREQRECEIVE">CURL_RTSPREQ_RECEIVE</a> to service RTP data when no requests are desired. If the application makes a request, (e.g.  <a class="emphasis" href="#CURLRTSPREQPAUSE">CURL_RTSPREQ_PAUSE</a>) then the response handler will process any pending RTP data before marking the request as finished.  (Added in 7.20.0) 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata)</span>. This function gets called by libcurl as soon as it has received interleaved RTP data. This function gets called for each $ block and therefore contains exactly one upper-layer protocol unit (e.g.  one RTP packet). Curl writes the interleaved header as well as the included data for each call. The first byte is always an ASCII dollar sign. The dollar sign is followed by a one byte channel identifier and then a 2 byte integer length in network byte order. See <span Class="emphasis"><a href="http://www.ietf.org/rfc/rfc2326.txt">RFC 2326</a> Section 10.12</span> for more information on how RTP interleaving behaves. If unset or set to NULL, curl will use the default write function. 
+<p class="level1">Interleaved RTP poses some challenges for the client application. Since the stream data is sharing the RTSP control connection, it is critical to service the RTP in a timely fashion. If the RTP data is not handled quickly, subsequent response processing may become unreasonably delayed and the connection may close. The application may use <a class="emphasis" href="#CURLRTSPREQRECEIVE">CURL_RTSPREQ_RECEIVE</a> to service RTP data when no requests are desired. If the application makes a request, (e.g.  <a class="emphasis" href="#CURLRTSPREQPAUSE">CURL_RTSPREQ_PAUSE</a>) then the response handler will process any pending RTP data before marking the request as finished.  (Added in 7.20.0) 
 <p class="level0"><a name="CURLOPTINTERLEAVEDATA"></a><span class="nroffip">CURLOPT_INTERLEAVEDATA</span> 
 <p class="level1">This is the userdata pointer that will be passed to <a class="emphasis" href="#CURLOPTINTERLEAVEFUNCTION">CURLOPT_INTERLEAVEFUNCTION</a> when interleaved RTP data is received. (Added in 7.20.0) 
 <p class="level0"><a name="CURLOPTCHUNKBGNFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_BGN_FUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function (const void *transfer_info, void *ptr, int remains)</span>. This function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks). 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">long function (const void *transfer_info, void *ptr, int remains)</span>. This function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks). 
 <p class="level1">This callback makes sense only when using the <a class="emphasis" href="#CURLOPTWILDCARDMATCH">CURLOPT_WILDCARDMATCH</a> option for now. 
 <p class="level1">The target of transfer_info parameter is a "feature depended" structure. For the FTP wildcard download, the target is curl_fileinfo structure (see <span Class="emphasis">curl/curl.h</span>).  The parameter ptr is a pointer given by <a class="emphasis" href="#CURLOPTCHUNKDATA">CURLOPT_CHUNK_DATA</a>. The parameter remains contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value. 
 <p class="level1">Return <span Class="emphasis">CURL_CHUNK_BGN_FUNC_OK</span> if everything is fine, <span Class="emphasis">CURL_CHUNK_BGN_FUNC_SKIP</span> if you want to skip the concrete chunk or <span Class="emphasis">CURL_CHUNK_BGN_FUNC_FAIL</span> to tell libcurl to stop if some error occurred. (This was added in 7.21.0) 
 <p class="level0"><a name="CURLOPTCHUNKENDFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_END_FUNCTION</span> 
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function(void *ptr)</span>. This function gets called by libcurl as soon as a part of the stream has been transferred (or skipped). 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span Class="bold">long function(void *ptr)</span>. This function gets called by libcurl as soon as a part of the stream has been transferred (or skipped). 
 <p class="level1">Return <span Class="emphasis">CURL_CHUNK_END_FUNC_OK</span> if everything is fine or <span Class="bold">CURL_CHUNK_END_FUNC_FAIL</span> to tell the lib to stop if some error occurred. (This was added in 7.21.0) 
 <p class="level0"><a name="CURLOPTCHUNKDATA"></a><span class="nroffip">CURLOPT_CHUNK_DATA</span> 
 <p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_CHUNK_BGN_FUNTION</span> and <span Class="emphasis">CURL_CHUNK_END_FUNTION</span>. (This was added in 7.21.0) 
 <p class="level0"><a name="CURLOPTFNMATCHFUNCTION"></a><span class="nroffip">CURLOPT_FNMATCH_FUNCTION</span> 
-<p class="level1">Function pointer that should match <span class="bold">int function(void *ptr, const char *pattern, const char *string)</span> prototype (see <span Class="emphasis">curl/curl.h</span>). It is used internally for the wildcard matching feature. 
+<p class="level1">Pass a pointer to a function that matches the following prototype: <span class="bold">int function(void *ptr, const char *pattern, const char *string)</span> prototype (see <span Class="emphasis">curl/curl.h</span>). It is used internally for the wildcard matching feature. 
 <p class="level1">Return <span Class="emphasis">CURL_FNMATCHFUNC_MATCH</span> if pattern matches the string, <span Class="emphasis">CURL_FNMATCHFUNC_NOMATCH</span> if not or <span Class="emphasis">CURL_FNMATCHFUNC_FAIL</span> if an error occurred.  (This was added in 7.21.0) 
 <p class="level0"><a name="CURLOPTFNMATCHDATA"></a><span class="nroffip">CURLOPT_FNMATCH_DATA</span> 
 <p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_FNMATCH_FUNCTION</span>. (This was added in 7.21.0) <a name="ERROR"></a><h2 class="nroffsh">ERROR OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTERRORBUFFER"></a><span class="nroffip">CURLOPT_ERRORBUFFER</span> 
-<p class="level1">Pass a char * to a buffer that the libcurl may store human readable error messages in. This may be more helpful than just the return code from <span Class="emphasis">curl_easy_perform</span>. The buffer must be at least CURL_ERROR_SIZE big. Although this argument is a 'char *', it does not describe an input string. Therefore the (probably undefined) contents of the buffer is NOT copied by the library. You should keep the associated storage available until libcurl no longer needs it. Failing to do so will cause very odd behavior or even crashes. libcurl will need it until you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> or you set the same option again to use a different pointer. 
+<p class="level1">Pass a char * to a buffer that the libcurl may store human readable error messages in. This may be more helpful than just the return code from <span Class="emphasis">curl_easy_perform</span>. The buffer must be at least CURL_ERROR_SIZE big. Although this argument is a 'char *', it does not describe an input string. Therefore the (probably undefined) contents of the buffer is NOT copied by the library. You must keep the associated storage available until libcurl no longer needs it. Failing to do so will cause very odd behavior or even crashes. libcurl will need it until you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> or you set the same option again to use a different pointer. 
 <p class="level1">Use <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> and <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> to better debug/trace why errors happen. 
 <p class="level1">If the library does not return an error, the buffer may not have been touched. Do not rely on the contents in those cases. 
 <p class="level1">
@@ -225,10 +262,74 @@ p.roffit {
 <p class="level1">You might get some amounts of headers transferred before this situation is detected, like when a "100-continue" is received as a response to a POST/PUT and a 401 or 407 is received immediately afterwards. <a name="NETWORK"></a><h2 class="nroffsh">NETWORK OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTURL"></a><span class="nroffip">CURLOPT_URL</span> 
-<p class="level1">The actual URL to deal with. The parameter should be a char * to a zero terminated string. 
-<p class="level1">If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will attempt to guess which protocol to use based on the given host name. If the given protocol of the set URL is not supported, libcurl will return on error (<span Class="emphasis">CURLE_UNSUPPORTED_PROTOCOL</span>) when you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. Use <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> for detailed info on which protocols are supported. 
-<p class="level1">The string given to CURLOPT_URL must be url-encoded and follow RFC 2396 (<a href="http://curl.haxx.se/rfc/rfc2396.txt">http://curl.haxx.se/rfc/rfc2396.txt</a>). 
-<p class="level1">Starting with version 7.20.0, the fragment part of the URI will not be send as part of the path, which was the case previously. 
+<p class="level1">Pass in a pointer to the actual URL to deal with. The parameter should be a char * to a zero terminated string which must be URL-encoded in the following format: 
+<p class="level1">scheme://host:port/path 
+<p class="level1">For a greater explanation of the format please see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>. 
+<p class="level1">If the given URL lacks the scheme (such as "http://" or "ftp://" etc) then libcurl will attempt to resolve the protocol based on one of the following given host names: 
+<p class="level1">HTTP, FTP, DICT, LDAP, IMAP, POP3 or SMTP 
+<p class="level1">(POP3 and SMTP added in 7.31.0) 
+<p class="level1">Should the protocol, either that specified by the scheme or deduced by libcurl from the host name, not be supported by libcurl then (<span Class="emphasis">CURLE_UNSUPPORTED_PROTOCOL</span>) will be returned from either the <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> functions when you call them. Use <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> for detailed information of which protocols are supported by the build of libcurl you are using. 
+<p class="level1">The host part of the URL contains the address of the server that you want to connect to. This can be the fully qualified domain name of the server, the local network name of the machine on your network or the IP address of the server or machine represented by either an IPv4 or IPv6 address. For example: 
+<p class="level1"><a href="http://www.example.com/">http://www.example.com/</a> 
+<p class="level1"><a href="http://hostname/">http://hostname/</a> 
+<p class="level1"><a href="http://192.168.0.1/">http://192.168.0.1/</a> 
+<p class="level1">http://[2001:1890:1112:1::20]/ 
+<p class="level1">It is also possible to specify the user name, password and any supported login options as part of the host, for the following protocols, when connecting to servers that require authentication: 
+<p class="level1"><a href="http://user">http://user</a>:password@www.example.com 
+<p class="level1"><a href="ftp://user">ftp://user</a>:password@ftp.example.com 
+<p class="level1">imap://user:password;options@mail.example.com 
+<p class="level1">pop3://user:password;options@mail.example.com 
+<p class="level1">smtp://user:password;options@mail.example.com 
+<p class="level1">At present only IMAP, POP3 and SMTP support login options as part of the host. For more information about the login options in URL syntax please see <a href="http://www.ietf.org/rfc/rfc2384.txt">RFC 2384</a>, <a href="http://www.ietf.org/rfc/rfc5092.txt">RFC 5092</a> and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0). 
+<p class="level1">The port is optional and when not specified libcurl will use the default port based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25 for SMTP, etc. The following examples show how to specify the port: 
+<p class="level1"><a href="http://www.example.com">http://www.example.com</a>:8080/ - This will connect to a web server using port 8080 rather than 80. 
+<p class="level1">smtp://mail.example.com:587/ - This will connect to a SMTP server on the alternative mail port. 
+<p class="level1">The path part of the URL is protocol specific and whilst some examples are given below this list is not conclusive: 
+<p class="level1"><a class="bold" href="#HTTP">HTTP</a> 
+<p class="level1">The path part of a HTTP request specifies the file to retrieve and from what directory. If the directory is not specified then the web server's root directory is used. If the file is omitted then the default document will be retrieved for either the directory specified or the root directory. The exact resource returned for each URL is entirely dependent on the server's configuration. 
+<p class="level1"><a href="http://www.example.com">http://www.example.com</a> - This gets the main page from the web server. 
+<p class="level1"><a href="http://www.example.com/index.html">http://www.example.com/index.html</a> - This returns the main page by explicitly requesting it. 
+<p class="level1"><a href="http://www.example.com/contactus/">http://www.example.com/contactus/</a> - This returns the default document from the contactus directory. 
+<p class="level1"><a class="bold" href="#FTP">FTP</a> 
+<p class="level1">The path part of an FTP request specifies the file to retrieve and from what directory. If the file part is omitted then libcurl downloads the directory listing for the directory specified. If the directory is omitted then the directory listing for the root / home directory will be returned. 
+<p class="level1"><a href="ftp://ftp.example.com">ftp://ftp.example.com</a> - This retrieves the directory listing for the root directory. 
+<p class="level1"><a href="ftp://ftp.example.com/readme.txt">ftp://ftp.example.com/readme.txt</a> - This downloads the file readme.txt from the root directory. 
+<p class="level1"><a href="ftp://ftp.example.com/libcurl/readme.txt">ftp://ftp.example.com/libcurl/readme.txt</a> - This downloads readme.txt from the libcurl directory. 
+<p class="level1"><a href="ftp://user">ftp://user</a>:password@ftp.example.com/readme.txt - This retrieves the readme.txt file from the user's home directory. When a username and password is specified, everything that is specified in the path part is relative to the user's home directory. To retrieve files from the root directory or a directory underneath the root directory then the absolute path must be specified by prepending an additional forward slash to the beginning of the path. 
+<p class="level1"><a href="ftp://user">ftp://user</a>:password@ftp.example.com//readme.txt - This retrieves the readme.txt from the root directory when logging in as a specified user. 
+<p class="level1"><a class="bold" href="#SMTP">SMTP</a> 
+<p class="level1">The path part of a SMTP request specifies the host name to present during communication with the mail server. If the path is omitted then libcurl will attempt to resolve the local computer's host name. However, this may not return the fully qualified domain name that is required by some mail servers and specifying this path allows you to set an alternative name, such as your machine's fully qualified domain name, which you might have obtained from an external function such as gethostname or getaddrinfo. 
+<p class="level1">smtp://mail.example.com - This connects to the mail server at example.com and sends your local computer's host name in the HELO / EHLO command. 
+<p class="level1">smtp://mail.example.com/client.example.com - This will send client.example.com in the HELO / EHLO command to the mail server at example.com. 
+<p class="level1"><span Class="bold">POP3</span> 
+<p class="level1">The path part of a POP3 request specifies the message ID to retrieve. If the ID is not specified then a list of waiting messages is returned instead. 
+<p class="level1">pop3://user:password@mail.example.com - This lists the available messages for the user 
+<p class="level1">pop3://user:password@mail.example.com/1 - This retrieves the first message for the user 
+<p class="level1"><span Class="bold">IMAP</span> 
+<p class="level1">The path part of an IMAP request not only specifies the mailbox to list (Added in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the mailbox and to specify the UID and SECTION of the message to fetch (Added in 7.30.0). 
+<p class="level1">imap://user:password@mail.example.com - Performs a top level folder list 
+<p class="level1">imap://user:password@mail.example.com/INBOX - Performs a folder list on the user's inbox 
+<p class="level1">imap://user:password@mail.example.com/INBOX/;UID=1 - Selects the user's inbox and fetches message 1 
+<p class="level1">imap://user:password@mail.example.com/INBOX;UIDVALIDITY=50/;UID=2 - Selects the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches message 2 if it is 
+<p class="level1">imap://user:password@mail.example.com/INBOX/;UID=3/;SECTION=TEXT - Selects the user's inbox and fetches message 3 with only the text portion of the message 
+<p class="level1">For more information about the individual components of an IMAP URL please see <a href="http://www.ietf.org/rfc/rfc5092.txt">RFC 5092</a>. 
+<p class="level1"><span Class="bold">SCP</span> 
+<p class="level1">The path part of a SCP request specifies the file to retrieve and from what directory. The file part may not be omitted. The file is taken as an absolute path from the root directory on the server. To specify a path relative to the user's home directory on the server, prepend ~/ to the path portion. If the user name is not embedded in the URL, it can be set with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> or <a class="bold" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> option. 
+<p class="level1">scp://user@example.com/etc/issue - This specifies the file /etc/issue 
+<p class="level1">scp://example.com/~/my-file - This specifies the file my-file in the user's home directory on the server 
+<p class="level1"><span Class="bold">SFTP</span> 
+<p class="level1">The path part of a SFTP request specifies the file to retrieve and from what directory. If the file part is omitted then libcurl downloads the directory listing for the directory specified.  If the path ends in a / then a directory listing is returned instead of a file.  If the path is omitted entirely then the directory listing for the root / home directory will be returned. If the user name is not embedded in the URL, it can be set with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> or <a class="bold" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> option. 
+<p class="level1">s<a href="ftp://user">ftp://user</a>:password@example.com/etc/issue - This specifies the file /etc/issue 
+<p class="level1">s<a href="ftp://user">ftp://user</a>@example.com/~/my-file - This specifies the file my-file in the user's home directory 
+<p class="level1">s<a href="ftp://ssh.example.com/">ftp://ssh.example.com/</a>~/Documents/ - This requests a directory listing of the Documents directory under the user's home directory 
+<p class="level1"><span Class="bold">LDAP</span> 
+<p class="level1">The path part of a LDAP request can be used to specify the: Distinguished Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field is separated by a question mark and when that field is not required an empty string with the question mark separator should be included. 
+<p class="level1">ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search with the DN as My Organisation. 
+<p class="level1">ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform the same search but will only return postalAddress attributes. 
+<p class="level1">ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN and requests information about the rootDomainNamingContext attribute for an Active Directory server. 
+<p class="level1">For more information about the individual components of a LDAP URL please see <a href="http://www.ietf.org/rfc/rfc4516.txt">RFC 4516</a>. 
+<p class="level1"><span Class="bold">NOTES</span> 
+<p class="level1">Starting with version 7.20.0, the fragment part of the URI will not be sent as part of the path, which was previously the case. 
 <p class="level1"><a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> is the only option that <span Class="bold">must</span> be set before <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> is called. 
 <p class="level1"><a class="emphasis" href="#CURLOPTPROTOCOLS">CURLOPT_PROTOCOLS</a> can be used to limit what protocols libcurl will use for this transfer, independent of what libcurl has been compiled to support. That may be useful if you accept the URL from an external source and want to limit the accessibility. 
 <p class="level0"><a name="CURLOPTPROTOCOLS"></a><span class="nroffip">CURLOPT_PROTOCOLS</span> 
@@ -237,28 +338,31 @@ p.roffit {
 <p class="level1">Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in a transfer that it follows to in a redirect when <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> is enabled. This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections. By default libcurl will allow all protocols except for FILE and SCP. This is a difference compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported. (Added in 7.19.4) 
 <p class="level0"><a name="CURLOPTPROXY"></a><span class="nroffip">CURLOPT_PROXY</span> 
 <p class="level1">Set HTTP proxy to use. The parameter should be a char * to a zero terminated string holding the host name or dotted IP address. To specify port number in this string, append :[port] to the end of the host name. The proxy string may be prefixed with [protocol]:// since any such prefix will be ignored. The proxy's port number may optionally be specified with the separate option. If not specified, libcurl will default to using port 1080 for proxies. <a class="emphasis" href="#CURLOPTPROXYPORT">CURLOPT_PROXYPORT</a>. 
-<p class="level1">When you tell the library to use an HTTP proxy, libcurl will transparently convert operations to HTTP even if you specify an FTP URL etc. This may have an impact on what other features of the library you can use, such as <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a> and similar FTP specifics that don't work unless you tunnel through the HTTP proxy. Such tunneling is activated with <a class="emphasis" href="#CURLOPTHTTPPROXYTUNNEL">CURLOPT_HTTPPROXYTUNNEL</a>. 
+<p class="level1">When you tell the library to use a HTTP proxy, libcurl will transparently convert operations to HTTP even if you specify an FTP URL etc. This may have an impact on what other features of the library you can use, such as <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a> and similar FTP specifics that don't work unless you tunnel through the HTTP proxy. Such tunneling is activated with <a class="emphasis" href="#CURLOPTHTTPPROXYTUNNEL">CURLOPT_HTTPPROXYTUNNEL</a>. 
 <p class="level1">libcurl respects the environment variables <span Class="bold">http_proxy</span>, <span Class="bold">ftp_proxy</span>, <span Class="bold">all_proxy</span> etc, if any of those are set. The <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a> option does however override any possibly set environment variables. 
 <p class="level1">Setting the proxy string to "" (an empty string) will explicitly disable the use of a proxy, even if there is an environment variable set for it. 
 <p class="level1">Since 7.14.1, the proxy host string given in environment variables can be specified the exact same way as the proxy can be set with <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>, include protocol prefix (http://) and embedded user + password. 
+<p class="level1">Since 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving, also known as CURLPROXY_SOCKS5_HOSTNAME type) to request the specific SOCKS version to be used. No protocol specified, http:// and all others will be treated as HTTP proxies. 
 <p class="level0"><a name="CURLOPTPROXYPORT"></a><span class="nroffip">CURLOPT_PROXYPORT</span> 
 <p class="level1">Pass a long with this option to set the proxy port to connect to unless it is specified in the proxy string <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>. 
 <p class="level0"><a name="CURLOPTPROXYTYPE"></a><span class="nroffip">CURLOPT_PROXYTYPE</span> 
-<p class="level1">Pass a long with this option to set type of the proxy. Available options for this are <span Class="emphasis">CURLPROXY_HTTP</span>, <span Class="emphasis">CURLPROXY_HTTP_1_0</span> (added in 7.19.4), <span Class="emphasis">CURLPROXY_SOCKS4</span> (added in 7.15.2), <span Class="emphasis">CURLPROXY_SOCKS5</span>, <span Class="emphasis">CURLPROXY_SOCKS4A</span> (added in 7.18.0) and <span Class="emphasis">CURLPROXY_SOCKS5_HOSTNAME</span> (added in 7.18.0). The HTTP type is default. (Added in 7.10) 
+<p class="level1">Pass a long with this option to set type of the proxy. Available options for this are <span Class="emphasis">CURLPROXY_HTTP</span>, <span Class="emphasis">CURLPROXY_HTTP_1_0</span> (added in 7.19.4), <span Class="emphasis">CURLPROXY_SOCKS4</span> (added in 7.10), <span Class="emphasis">CURLPROXY_SOCKS5</span>, <span Class="emphasis">CURLPROXY_SOCKS4A</span> (added in 7.18.0) and <span Class="emphasis">CURLPROXY_SOCKS5_HOSTNAME</span> (added in 7.18.0). The HTTP type is default. (Added in 7.10) 
+<p class="level1">If you set <a class="bold" href="#CURLOPTPROXYTYPE">CURLOPT_PROXYTYPE</a> to <span Class="emphasis">CURLPROXY_HTTP_1_0</span>, it will only affect how libcurl speaks to a proxy when CONNECT is used. The HTTP version used for "regular" HTTP requests is instead controlled with <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a>. 
 <p class="level0"><a name="CURLOPTNOPROXY"></a><span class="nroffip">CURLOPT_NOPROXY</span> 
-<p class="level1">Pass a pointer to a zero terminated string. The should be a comma- separated list of hosts which do not use a proxy, if one is specified.  The only wildcard is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4) 
+<p class="level1">Pass a pointer to a zero terminated string. The string consists of a comma separated list of host names that do not require a proxy to get reached, even if one is specified.  The only wildcard available is a single * character, which matches all hosts, and effectively disables the proxy. Each name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, example.com would match example.com, example.com:80, and www.example.com, but not www.notanexample.com.  (Added in 7.19.4) 
 <p class="level0"><a name="CURLOPTHTTPPROXYTUNNEL"></a><span class="nroffip">CURLOPT_HTTPPROXYTUNNEL</span> 
 <p class="level1">Set the parameter to 1 to make the library tunnel all operations through a given HTTP proxy. There is a big difference between using a proxy and to tunnel through it. If you don't know what this means, you probably don't want this tunneling option. 
 <p class="level0"><a name="CURLOPTSOCKS5GSSAPISERVICE"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_SERVICE</span> 
 <p class="level1">Pass a char * as parameter to a string holding the name of the service. The default service name for a SOCKS5 server is rcmd/server-fqdn. This option allows you to change it. (Added in 7.19.4) 
 <p class="level0"><a name="CURLOPTSOCKS5GSSAPINEC"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_NEC</span> 
-<p class="level1">Pass a long set to 1 to enable or 0 to disable. As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. If enabled, this option allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4). 
+<p class="level1">Pass a long set to 1 to enable or 0 to disable. As part of the gssapi negotiation a protection mode is negotiated. The <a href="http://www.ietf.org/rfc/rfc1961.txt">RFC 1961</a> says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. If enabled, this option allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4). 
 <p class="level0"><a name="CURLOPTINTERFACE"></a><span class="nroffip">CURLOPT_INTERFACE</span> 
 <p class="level1">Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name. 
+<p class="level1">Starting with 7.24.0: If the parameter starts with "if!" then it is treated as only as interface name and no attempt will ever be named to do treat it as an IP address or to do name resolution on it.  If the parameter starts with "host!" it is treated as either an IP address or a hostname.  Hostnames are resolved synchronously.  Using the if! format is highly recommended when using the multi interfaces to avoid allowing the code to block.  If "if!" is specified but the parameter does not match an existing interface, CURLE_INTERFACE_FAILED is returned. 
 <p class="level0"><a name="CURLOPTLOCALPORT"></a><span class="nroffip">CURLOPT_LOCALPORT</span> 
 <p class="level1">Pass a long. This sets the local port number of the socket used for connection. This can be used in combination with <a class="emphasis" href="#CURLOPTINTERFACE">CURLOPT_INTERFACE</a> and you are recommended to use <a class="emphasis" href="#CURLOPTLOCALPORTRANGE">CURLOPT_LOCALPORTRANGE</a> as well when this is set. Valid port numbers are 1 - 65535. (Added in 7.15.2) 
 <p class="level0"><a name="CURLOPTLOCALPORTRANGE"></a><span class="nroffip">CURLOPT_LOCALPORTRANGE</span> 
-<p class="level1">Pass a long. This is the number of attempts libcurl should make to find a working local port number. It starts with the given <a class="emphasis" href="#CURLOPTLOCALPORT">CURLOPT_LOCALPORT</a> and adds one to the number for each retry. Setting this to 1 or below will make libcurl do only one try for the exact port number. Port numbers by nature are scarce resources that will be busy at times so setting this value to something too low might cause unnecessary connection setup failures. (Added in 7.15.2) 
+<p class="level1">Pass a long. This is the number of attempts libcurl will make to find a working local port number. It starts with the given <a class="emphasis" href="#CURLOPTLOCALPORT">CURLOPT_LOCALPORT</a> and adds one to the number for each retry. Setting this to 1 or below will make libcurl do only one try for the exact port number. Port numbers by nature are scarce resources that will be busy at times so setting this value to something too low might cause unnecessary connection setup failures. (Added in 7.15.2) 
 <p class="level0"><a name="CURLOPTDNSCACHETIMEOUT"></a><span class="nroffip">CURLOPT_DNS_CACHE_TIMEOUT</span> 
 <p class="level1">Pass a long, this sets the timeout in seconds. Name resolves will be kept in memory for this number of seconds. Set to zero to completely disable caching, or set to -1 to make the cached entries remain forever. By default, libcurl caches this info for 60 seconds. 
 <p class="level1">The name resolve functions of various libc implementations don't re-read name server information unless explicitly told so (for example, by calling <span Class="emphasis">res_init(3)</span>). This may cause libcurl to keep using the older server even if DHCP has updated the server info, and this may look like a DNS cache issue to the casual libcurl-app user. 
@@ -271,11 +375,17 @@ p.roffit {
 <p class="level0"><a name="CURLOPTPORT"></a><span class="nroffip">CURLOPT_PORT</span> 
 <p class="level1">Pass a long specifying what remote port number to connect to, instead of the one specified in the URL or the default port for the used protocol. 
 <p class="level0"><a name="CURLOPTTCPNODELAY"></a><span class="nroffip">CURLOPT_TCP_NODELAY</span> 
-<p class="level1">Pass a long specifying whether the TCP_NODELAY option should be set or cleared (1 = set, 0 = clear). The option is cleared by default. This will have no effect after the connection has been established. 
+<p class="level1">Pass a long specifying whether the TCP_NODELAY option is to be set or cleared (1 = set, 0 = clear). The option is cleared by default. This will have no effect after the connection has been established. 
 <p class="level1">Setting this option will disable TCP's Nagle algorithm. The purpose of this algorithm is to try to minimize the number of small packets on the network (where "small packets" means TCP segments less than the Maximum Segment Size (MSS) for the network). 
 <p class="level1">Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the send. However, in some cases (most notably telnet or rlogin) small segments may need to be sent without delay. This is less efficient than sending larger amounts of data at a time, and can contribute to congestion on the network if overdone. 
 <p class="level0"><a name="CURLOPTADDRESSSCOPE"></a><span class="nroffip">CURLOPT_ADDRESS_SCOPE</span> 
-<p class="level1">Pass a long specifying the scope_id value to use when connecting to IPv6 link-local or site-local addresses. (Added in 7.19.0) <a name="NAMES"></a><h2 class="nroffsh">NAMES and PASSWORDS OPTIONS (Authentication)</h2>
+<p class="level1">Pass a long specifying the scope_id value to use when connecting to IPv6 link-local or site-local addresses. (Added in 7.19.0) 
+<p class="level0"><a name="CURLOPTTCPKEEPALIVE"></a><span class="nroffip">CURLOPT_TCP_KEEPALIVE</span> 
+<p class="level1">Pass a long. If set to 1, TCP keepalive probes will be sent. The delay and frequency of these probes can be controlled by the <a class="emphasis" href="#CURLOPTTCPKEEPIDLE">CURLOPT_TCP_KEEPIDLE</a> and <a class="emphasis" href="#CURLOPTTCPKEEPINTVL">CURLOPT_TCP_KEEPINTVL</a> options, provided the operating system supports them. Set to 0 (default behavior) to disable keepalive probes (Added in 7.25.0). 
+<p class="level0"><a name="CURLOPTTCPKEEPIDLE"></a><span class="nroffip">CURLOPT_TCP_KEEPIDLE</span> 
+<p class="level1">Pass a long. Sets the delay, in seconds, that the operating system will wait while the connection is idle before sending keepalive probes. Not all operating systems support this option. (Added in 7.25.0) 
+<p class="level0"><a name="CURLOPTTCPKEEPINTVL"></a><span class="nroffip">CURLOPT_TCP_KEEPINTVL</span> 
+<p class="level1">Pass a long. Sets the interval, in seconds, that the operating system will wait between sending keepalive probes. Not all operating systems support this option. (Added in 7.25.0) <a name="NAMES"></a><h2 class="nroffsh">NAMES and PASSWORDS OPTIONS (Authentication)</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTNETRC"></a><span class="nroffip">CURLOPT_NETRC</span> 
 <p class="level1">This parameter controls the preference of libcurl between using user names and passwords from your <span Class="emphasis">~/.netrc</span> file, relative to user names and passwords in the URL supplied with <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a>. 
@@ -295,11 +405,14 @@ p.roffit {
 <p class="level0"><a name="CURLOPTNETRCFILE"></a><span class="nroffip">CURLOPT_NETRC_FILE</span> 
 <p class="level1">Pass a char * as parameter, pointing to a zero terminated string containing the full path name to the file you want libcurl to use as .netrc file. If this option is omitted, and <a class="emphasis" href="#CURLOPTNETRC">CURLOPT_NETRC</a> is set, libcurl will attempt to find a .netrc file in the current user's home directory. (Added in 7.10.9) 
 <p class="level0"><a name="CURLOPTUSERPWD"></a><span class="nroffip">CURLOPT_USERPWD</span> 
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection. Use <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> to decide the authentication method
+<p class="level1">Pass a char * as parameter, pointing to a zero terminated login details string for the connection. The format of which is: [user name]:[password];[options]
 <p class="level1">When using NTLM, you can set the domain by prepending it to the user name and separating the domain and name with a forward (/) or backward slash (\). Like this: "domain/user:password" or "domain\user:password". Some HTTP servers (on Windows) support this style even for Basic authentication. 
 <p class="level1">When using HTTP and <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>, libcurl might perform several requests to possibly different hosts. libcurl will only send this user and password information to hosts using the initial host name (unless <a class="emphasis" href="#CURLOPTUNRESTRICTEDAUTH">CURLOPT_UNRESTRICTED_AUTH</a> is set), so if libcurl follows locations to other hosts it will not send the user and password to those. This is enforced to prevent accidental information leakage. 
+<p class="level1">At present only IMAP, POP3 and SMTP support login options as part of the details string. For more information about the login options please see <a href="http://www.ietf.org/rfc/rfc2384.txt">RFC 2384</a>, RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0). 
+<p class="level1">Use <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> to specify the authentication method for HTTP based connections. 
 <p class="level0"><a name="CURLOPTPROXYUSERPWD"></a><span class="nroffip">CURLOPT_PROXYUSERPWD</span> 
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection to the HTTP proxy.  Use <a class="emphasis" href="#CURLOPTPROXYAUTH">CURLOPT_PROXYAUTH</a> to decide the authentication method. 
+<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection to the HTTP proxy. 
+<p class="level1">Use <a class="emphasis" href="#CURLOPTPROXYAUTH">CURLOPT_PROXYAUTH</a> to specify the authentication method. 
 <p class="level0"><a name="CURLOPTUSERNAME"></a><span class="nroffip">CURLOPT_USERNAME</span> 
 <p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated user name to use for the transfer. 
 <p class="level1"><a class="bold" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> sets the user name to be used in protocol authentication. You should not use this option together with the (older) CURLOPT_USERPWD option. 
@@ -315,20 +428,23 @@ p.roffit {
 <p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated password to use for the transfer while connecting to Proxy. 
 <p class="level1">The CURLOPT_PROXYPASSWORD option should be used in conjunction with the <a class="emphasis" href="#CURLOPTPROXYUSERNAME">CURLOPT_PROXYUSERNAME</a> option. (Added in 7.19.1) 
 <p class="level0"><a name="CURLOPTHTTPAUTH"></a><span class="nroffip">CURLOPT_HTTPAUTH</span> 
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use. The available bits are listed below. If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> option or with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> and the <span Class="emphasis">CURLOPT_USERPASSWORD</span> options. (Added in 7.10.6) 
+<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use. The available bits are listed below. If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> option or with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> and the <a class="emphasis" href="#CURLOPTPASSWORD">CURLOPT_PASSWORD</a> options. (Added in 7.10.6) 
 <p class="level2">
 <p class="level1"><a name="CURLAUTHBASIC"></a><span class="nroffip">CURLAUTH_BASIC</span> 
 <p class="level2">HTTP Basic authentication. This is the default choice, and the only method that is in wide-spread use and supported virtually everywhere. This sends the user name and password over the network in plain text, easily captured by others. 
 <p class="level1"><a name="CURLAUTHDIGEST"></a><span class="nroffip">CURLAUTH_DIGEST</span> 
-<p class="level2">HTTP Digest authentication.  Digest authentication is defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. 
+<p class="level2">HTTP Digest authentication.  Digest authentication is defined in <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a> and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. 
 <p class="level1"><a name="CURLAUTHDIGESTIE"></a><span class="nroffip">CURLAUTH_DIGEST_IE</span> 
-<p class="level2">HTTP Digest authentication with an IE flavor.  Digest authentication is defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use. (This define was added in 7.19.3) 
+<p class="level2">HTTP Digest authentication with an IE flavor.  Digest authentication is defined in <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a> and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use. (This define was added in 7.19.3) 
 <p class="level1"><a name="CURLAUTHGSSNEGOTIATE"></a><span class="nroffip">CURLAUTH_GSSNEGOTIATE</span> 
 <p class="level2">HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain "Negotiate") method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may also be used along with other authentication methods. For more information see IETF draft draft-brezak-spnego-http-04.txt. 
 <p class="level2">You need to build libcurl with a suitable GSS-API library for this to work. 
 <p class="level1"><a name="CURLAUTHNTLM"></a><span class="nroffip">CURLAUTH_NTLM</span> 
 <p class="level2">HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft. It uses a challenge-response and hash concept similar to Digest, to prevent the password from being eavesdropped. 
-<p class="level2">You need to build libcurl with OpenSSL support for this option to work, or build libcurl on Windows. 
+<p class="level2">You need to build libcurl with either OpenSSL, GnuTLS or NSS support for this option to work, or build libcurl on Windows with SSPI support. 
+<p class="level1"><a name="CURLAUTHNTLMWB"></a><span class="nroffip">CURLAUTH_NTLM_WB</span> 
+<p class="level2">NTLM delegating to winbind helper. Authentication is performed by a separate binary application that is executed when needed. The name of the application is specified at compile time but is typically /usr/bin/ntlm_auth (Added in 7.22.0) 
+<p class="level2">Note that libcurl will fork when necessary to run the winbind application and kill it when complete, calling waitpid() to await its exit when done. On POSIX operating systems, killing the process will cause a SIGCHLD signal to be raised (regardless of whether <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set), which must be handled intelligently by the application. In particular, the application must not unconditionally call wait() in its SIGCHLD signal handler to avoid being subject to a race condition.  This behavior is subject to change in future versions of libcurl. 
 <p class="level1"><a name="CURLAUTHANY"></a><span class="nroffip">CURLAUTH_ANY</span> 
 <p class="level2">This is a convenience macro that sets all bits and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure. 
 <p class="level1"><a name="CURLAUTHANYSAFE"></a><span class="nroffip">CURLAUTH_ANYSAFE</span> 
@@ -336,16 +452,35 @@ p.roffit {
 <p class="level1"><a name="CURLAUTHONLY"></a><span class="nroffip">CURLAUTH_ONLY</span> 
 <p class="level2">This is a meta symbol. Or this value together with a single specific auth value to force libcurl to probe for un-restricted auth and if not, only that single auth algorithm is acceptable. (Added in 7.21.3) 
 <p class="level1">
+<p class="level0"><a name="CURLOPTTLSAUTHTYPE"></a><span class="nroffip">CURLOPT_TLSAUTH_TYPE</span> 
+<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use for TLS authentication. 
+<p class="level2">
+<p class="level1"><a name="CURLOPTTLSAUTHSRP"></a><span class="nroffip">CURLOPT_TLSAUTH_SRP</span> 
+<p class="level2">TLS-SRP authentication. Secure Remote Password authentication for TLS is defined in <a href="http://www.ietf.org/rfc/rfc5054.txt">RFC 5054</a> and provides mutual authentication if both sides have a shared secret. To use TLS-SRP, you must also set the <a class="emphasis" href="#CURLOPTTLSAUTHUSERNAME">CURLOPT_TLSAUTH_USERNAME</a> and <a class="emphasis" href="#CURLOPTTLSAUTHPASSWORD">CURLOPT_TLSAUTH_PASSWORD</a> options. 
+<p class="level2">You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this to work. (Added in 7.21.4) 
+<p class="level1">
+<p class="level0"><a name="CURLOPTTLSAUTHUSERNAME"></a><span class="nroffip">CURLOPT_TLSAUTH_USERNAME</span> 
+<p class="level1">Pass a char * as parameter, which should point to the zero terminated username to use for the TLS authentication method specified with the <a class="emphasis" href="#CURLOPTTLSAUTHTYPE">CURLOPT_TLSAUTH_TYPE</a> option. Requires that the <span Class="emphasis">CURLOPT_TLS_PASSWORD</span> option also be set. (Added in 7.21.4) 
+<p class="level0"><a name="CURLOPTTLSAUTHPASSWORD"></a><span class="nroffip">CURLOPT_TLSAUTH_PASSWORD</span> 
+<p class="level1">Pass a char * as parameter, which should point to the zero terminated password to use for the TLS authentication method specified with the <a class="emphasis" href="#CURLOPTTLSAUTHTYPE">CURLOPT_TLSAUTH_TYPE</a> option. Requires that the <span Class="emphasis">CURLOPT_TLS_USERNAME</span> option also be set. (Added in 7.21.4) 
 <p class="level0"><a name="CURLOPTPROXYAUTH"></a><span class="nroffip">CURLOPT_PROXYAUTH</span> 
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use for your proxy authentication.  If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option. The bitmask can be constructed by or'ing together the bits listed above for the <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> option. As of this writing, only Basic, Digest and NTLM work. (Added in 7.10.7) <a name="HTTP"></a><h2 class="nroffsh">HTTP OPTIONS</h2>
+<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use for your proxy authentication.  If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option. The bitmask can be constructed by or'ing together the bits listed above for the <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> option. As of this writing, only Basic, Digest and NTLM work. (Added in 7.10.7) 
+<p class="level0"><a name="CURLOPTSASLIR"></a><span class="nroffip">CURLOPT_SASL_IR</span> 
+<p class="level1">Pass a long. If the value is 1, curl will send the initial response to the server in the first authentication packet in order to reduce the number of ping pong requests. Only applicable to supporting SASL authentication mechanisms and to the IMAP, POP3 and SMTP protocols. (Added in 7.31.0) 
+<p class="level1">Note: Whilst IMAP supports this option there is no need to explicitly set it, as libcurl can determine the feature itself when the server supports the SASL-IR CAPABILITY. <a name="HTTP"></a><h2 class="nroffsh">HTTP OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTAUTOREFERER"></a><span class="nroffip">CURLOPT_AUTOREFERER</span> 
 <p class="level1">Pass a parameter set to 1 to enable this. When enabled, libcurl will automatically set the Referer: field in requests where it follows a Location: redirect. 
-<p class="level0"><a name="CURLOPTENCODING"></a><span class="nroffip">CURLOPT_ENCODING</span> 
-<p class="level1">Sets the contents of the Accept-Encoding: header sent in an HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: <span Class="emphasis">identity</span>, which does nothing, <span Class="emphasis">deflate</span> which requests the server to compress its response using the zlib algorithm, and <span Class="emphasis">gzip</span> which requests the gzip algorithm.  If a zero-length string is set, then an Accept-Encoding: header containing all supported encodings is sent. 
+<p class="level0"><a name="CURLOPTACCEPTENCODING"></a><span class="nroffip">CURLOPT_ACCEPT_ENCODING</span> 
+<p class="level1">Sets the contents of the Accept-Encoding: header sent in a HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: <span Class="emphasis">identity</span>, which does nothing, <span Class="emphasis">deflate</span> which requests the server to compress its response using the zlib algorithm, and <span Class="emphasis">gzip</span> which requests the gzip algorithm.  If a zero-length string is set, then an Accept-Encoding: header containing all supported encodings is sent. 
 <p class="level1">This is a request, not an order; the server may or may not do it.  This option must be set (to any non-NULL value) or else any unsolicited encoding done by the server is ignored. See the special file lib/README.encoding for details. 
+<p class="level1">(This option was called CURLOPT_ENCODING before 7.21.6) 
+<p class="level0"><a name="CURLOPTTRANSFERENCODING"></a><span class="nroffip">CURLOPT_TRANSFER_ENCODING</span> 
+<p class="level1">Adds a request for compressed Transfer Encoding in the outgoing HTTP request. If the server supports this and so desires, it can respond with the HTTP response sent using a compressed Transfer-Encoding that will be automatically uncompressed by libcurl on reception. 
+<p class="level1">Transfer-Encoding differs slightly from the Content-Encoding you ask for with <a class="bold" href="#CURLOPTACCEPTENCODING">CURLOPT_ACCEPT_ENCODING</a> in that a Transfer-Encoding is strictly meant to be for the transfer and thus MUST be decoded before the data arrives in the client. Traditionally, Transfer-Encoding has been much less used and supported by both HTTP clients and HTTP servers. 
+<p class="level1">(Added in 7.21.6) 
 <p class="level0"><a name="CURLOPTFOLLOWLOCATION"></a><span class="nroffip">CURLOPT_FOLLOWLOCATION</span> 
-<p class="level1">A parameter set to 1 tells the library to follow any Location: header that the server sends as part of an HTTP header. 
+<p class="level1">A parameter set to 1 tells the library to follow any Location: header that the server sends as part of a HTTP header. 
 <p class="level1">This means that the library will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. <a class="emphasis" href="#CURLOPTMAXREDIRS">CURLOPT_MAXREDIRS</a> can be used to limit the number of redirects libcurl will follow. 
 <p class="level1">Since 7.19.4, libcurl can limit what protocols it will automatically follow. The accepted protocols are set with <a class="emphasis" href="#CURLOPTREDIRPROTOCOLS">CURLOPT_REDIR_PROTOCOLS</a> and it excludes the FILE protocol by default. 
 <p class="level0"><a name="CURLOPTUNRESTRICTEDAUTH"></a><span class="nroffip">CURLOPT_UNRESTRICTED_AUTH</span> 
@@ -353,8 +488,8 @@ p.roffit {
 <p class="level0"><a name="CURLOPTMAXREDIRS"></a><span class="nroffip">CURLOPT_MAXREDIRS</span> 
 <p class="level1">Pass a long. The set number will be the redirection limit. If that many redirections have been followed, the next redirect will cause an error (<span Class="emphasis">CURLE_TOO_MANY_REDIRECTS</span>). This option only makes sense if the <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> is used at the same time. Added in 7.15.1: Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for an infinite number of redirects (which is the default) 
 <p class="level0"><a name="CURLOPTPOSTREDIR"></a><span class="nroffip">CURLOPT_POSTREDIR</span> 
-<p class="level1">Pass a bitmask to control how libcurl acts on redirects after POSTs that get a 301 or 302 response back.  A parameter with bit 0 set (value <span Class="bold">CURL_REDIR_POST_301</span>) tells the library to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience define that sets both bits. 
-<p class="level1">The non-RFC behaviour is ubiquitous in web browsers, so the library does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>.  (Added in 7.17.1) (This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before then) 
+<p class="level1">Pass a bitmask to control how libcurl acts on redirects after POSTs that get a 301, 302 or 303 response back.  A parameter with bit 0 set (value <span Class="bold">CURL_REDIR_POST_301</span>) tells the library to respect <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. Setting bit 1 (value <span Class="bold">CURL_REDIR_POST_302</span>) makes libcurl maintain the request method after a 302 redirect whilst setting bit 2 (value <span Class="bold">CURL_REDIR_POST_303</span>) makes libcurl maintain the request method after a 303 redirect. The value <span Class="bold">CURL_REDIR_POST_ALL</span> is a convenience define that sets all three bits. 
+<p class="level1">The non-RFC behaviour is ubiquitous in web browsers, so the library does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>.  (Added in 7.17.1) (This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 then) 
 <p class="level0"><a name="CURLOPTPUT"></a><span class="nroffip">CURLOPT_PUT</span> 
 <p class="level1">A parameter set to 1 tells the library to use HTTP PUT to transfer data. The data should be set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> and <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a>. 
 <p class="level1">This option is deprecated and starting with version 7.12.1 you should instead use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a>. 
@@ -368,18 +503,18 @@ p.roffit {
 <p class="level1">When setting <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1). 
 <p class="level1">If you issue a POST request and then want to make a HEAD or GET using the same re-used handle, you must explicitly set the new request type using <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> or <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> or similar. 
 <p class="level0"><a name="CURLOPTPOSTFIELDS"></a><span class="nroffip">CURLOPT_POSTFIELDS</span> 
-<p class="level1">Pass a void * as parameter, which should be the full data to post in an HTTP POST operation. You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you. Most web servers will assume this data to be url-encoded. 
+<p class="level1">Pass a void * as parameter, which should be the full data to post in a HTTP POST operation. You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you. Most web servers will assume this data to be url-encoded. 
 <p class="level1">The pointed data are NOT copied by the library: as a consequence, they must be preserved by the calling application until the transfer finishes. 
 <p class="level1">This POST is a normal application/x-www-form-urlencoded kind (and libcurl will set that Content-Type by default when this option is used), which is the most commonly used one by HTML forms. See also the <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>. Using <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> implies <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>. 
 <p class="level1">If you want to do a zero-byte POST, you need to set <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> explicitly to zero, as simply setting <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to NULL or "" just effectively disables the sending of the specified string. libcurl will instead assume that you'll send the POST data using the read callback! 
 <p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual. 
-<p class="level1">To make multipart/formdata posts (aka RFC2388-posts), check out the <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a> option. 
+<p class="level1">To make multipart/formdata posts (aka <a href="http://www.ietf.org/rfc/rfc2388.txt">RFC 2388</a>-posts), check out the <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a> option. 
 <p class="level0"><a name="CURLOPTPOSTFIELDSIZE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE</span> 
 <p class="level1">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 -1, the library will use strlen() to get the size. 
 <p class="level0"><a name="CURLOPTPOSTFIELDSIZELARGE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE_LARGE</span> 
 <p class="level1">Pass a curl_off_t as parameter. Use this to set the size of the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> data to prevent libcurl from doing strlen() on the data to figure out the size. This is the large file version of the <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> option. (Added in 7.11.1) 
 <p class="level0"><a name="CURLOPTCOPYPOSTFIELDS"></a><span class="nroffip">CURLOPT_COPYPOSTFIELDS</span> 
-<p class="level1">Pass a char * as parameter, which should be the full data to post in an HTTP POST operation. It behaves as the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> option, but the original data are copied by the library, allowing the application to overwrite the original data after setting this option. 
+<p class="level1">Pass a char * as parameter, which should be the full data to post in a HTTP POST operation. It behaves as the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> option, but the original data are copied by the library, allowing the application to overwrite the original data after setting this option. 
 <p class="level1">Because data are copied, care must be taken when using this option in conjunction with <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a>: If the size has not been set prior to <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, the data are assumed to be a NUL-terminated string; else the stored size informs the library about the data byte count to copy. In any case, the size must not be changed after <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, unless another <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> or <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a> option is issued. (Added in 7.17.1) 
 <p class="level0"><a name="CURLOPTHTTPPOST"></a><span class="nroffip">CURLOPT_HTTPPOST</span> 
 <p class="level1">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 of curl_httppost structs as parameter.  The easiest way to create such a list, is to use <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> as documented. The data in this list must remain intact until you close this curl handle again with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>. 
@@ -390,7 +525,8 @@ p.roffit {
 <p class="level0"><a name="CURLOPTUSERAGENT"></a><span class="nroffip">CURLOPT_USERAGENT</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set the User-Agent: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>. 
 <p class="level0"><a name="CURLOPTHTTPHEADER"></a><span class="nroffip">CURLOPT_HTTPHEADER</span> 
-<p class="level1">Pass a pointer to a linked list of HTTP headers to pass to the server in your HTTP request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. If you add a header that is otherwise generated and used by libcurl internally, your added one will be used instead. If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the internally used header will get disabled. Thus, using this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content, make the content be two quotes: "". The headers included in the linked list must not be CRLF-terminated, because curl adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified. 
+<p class="level1">Pass a pointer to a linked list of HTTP headers to pass to the server in your HTTP request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. If you add a header that is otherwise generated and used by libcurl internally, your added one will be used instead. If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the internally used header will get disabled. Thus, using this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content (nothing to the right side of the colon), use the form 'MyHeader;' (note the ending semicolon). 
+<p class="level1">The headers included in the linked list must not be CRLF-terminated, because curl adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified. 
 <p class="level1">The first line in a request (containing the method, usually a GET or POST) is not a header and cannot be replaced using this option. Only the lines following the request-line are headers. Adding this method line in this list of headers will only cause your request to send an invalid header. 
 <p class="level1">Pass a NULL to this to reset back to no custom headers. 
 <p class="level1">The most commonly replaced headers have "shortcuts" in the options <a class="emphasis" href="#CURLOPTCOOKIE">CURLOPT_COOKIE</a>, <a class="emphasis" href="#CURLOPTUSERAGENT">CURLOPT_USERAGENT</a> and <a class="emphasis" href="#CURLOPTREFERER">CURLOPT_REFERER</a>. 
@@ -401,7 +537,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTCOOKIE"></a><span class="nroffip">CURLOPT_COOKIE</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set a cookie in the http request. The format of the string should be NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie should contain. 
 <p class="level1">If you need to set multiple cookies, you need to set them all using a single option and thus you need to concatenate them all in one single string. Set multiple cookies in one string like this: "name1=content1; name2=content2;" etc. 
-<p class="level1">This option sets the cookie header explictly in the outgoing request(s). If multiple requests are done due to authentication, followed redirections or similar, they will all get this cookie passed on. 
+<p class="level1">This option sets the cookie header explicitly in the outgoing request(s). If multiple requests are done due to authentication, followed redirections or similar, they will all get this cookie passed on. 
 <p class="level1">Using this option multiple times will only make the latest string override the previous ones. 
 <p class="level0"><a name="CURLOPTCOOKIEFILE"></a><span class="nroffip">CURLOPT_COOKIEFILE</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. It should contain the name of your file holding cookie data to read. The cookie data may be in Netscape / Mozilla cookie data format or just regular HTTP-style headers dumped to a file. 
@@ -416,7 +552,7 @@ p.roffit {
 <p class="level1">Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL cookie engine was not enabled it will enable its cookie engine.  Passing a magic string "ALL" will erase all cookies known by cURL. (Added in 7.14.1) Passing the special string "SESS" will only erase all session cookies known by cURL. (Added in 7.15.4) Passing the special string "FLUSH" will write all cookies known by cURL to the file specified by <a class="emphasis" href="#CURLOPTCOOKIEJAR">CURLOPT_COOKIEJAR</a>. (Added in 7.17.1) 
 <p class="level0"><a name="CURLOPTHTTPGET"></a><span class="nroffip">CURLOPT_HTTPGET</span> 
 <p class="level1">Pass a long. If the long is 1, this forces the HTTP request to get back to GET. Usable if a POST, HEAD, PUT, or a custom request has been used previously using the same curl handle. 
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1)
+<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 and <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a> to 0
 <p class="level0"><a name="CURLOPTHTTPVERSION"></a><span class="nroffip">CURLOPT_HTTP_VERSION</span> 
 <p class="level1">Pass a long, set to one of the values described below. They force libcurl to use the specific HTTP versions. This is not sensible to do unless you have a good reason. 
 <p class="level2">
@@ -430,20 +566,27 @@ p.roffit {
 <p class="level0"><a name="CURLOPTIGNORECONTENTLENGTH"></a><span class="nroffip">CURLOPT_IGNORE_CONTENT_LENGTH</span> 
 <p class="level1">Ignore the Content-Length header. This is useful for Apache 1.x (and similar servers) which will report incorrect content length for files over 2 gigabytes. If this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the connection. (added in 7.14.1) 
 <p class="level0"><a name="CURLOPTHTTPCONTENTDECODING"></a><span class="nroffip">CURLOPT_HTTP_CONTENT_DECODING</span> 
-<p class="level1">Pass a long to tell libcurl how to act on content decoding. If set to zero, content decoding will be disabled. If set to 1 it is enabled. Libcurl has no default content decoding but requires you to use <a class="emphasis" href="#CURLOPTENCODING">CURLOPT_ENCODING</a> for that. (added in 7.16.2) 
+<p class="level1">Pass a long to tell libcurl how to act on content decoding. If set to zero, content decoding will be disabled. If set to 1 it is enabled. Libcurl has no default content decoding but requires you to use <a class="emphasis" href="#CURLOPTACCEPTENCODING">CURLOPT_ACCEPT_ENCODING</a> for that. (added in 7.16.2) 
 <p class="level0"><a name="CURLOPTHTTPTRANSFERDECODING"></a><span class="nroffip">CURLOPT_HTTP_TRANSFER_DECODING</span> 
 <p class="level1">Pass a long to tell libcurl how to act on transfer decoding. If set to zero, transfer decoding will be disabled, if set to 1 it is enabled (default). libcurl does chunked transfer decoding by default unless this option is set to zero. (added in 7.16.2) <a name="SMTP"></a><h2 class="nroffsh">SMTP OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTMAILFROM"></a><span class="nroffip">CURLOPT_MAIL_FROM</span> 
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to specify the sender address in a mail when sending an SMTP mail with libcurl. 
+<p class="level1">Pass a pointer to a zero terminated string as parameter. This should be used to specify the sender's email address when sending SMTP mail with libcurl. 
+<p class="level1">An originator email address should be specified with angled brackets (&lt;&gt;) around it, which if not specified, will be added by libcurl from version 7.21.4 onwards. Failing to provide such brackets may cause the server to reject the email. 
+<p class="level1">If this parameter is not specified then an empty address will be sent to the mail server which may or may not cause the email to be rejected. 
 <p class="level1">(Added in 7.20.0) 
 <p class="level0"><a name="CURLOPTMAILRCPT"></a><span class="nroffip">CURLOPT_MAIL_RCPT</span> 
-<p class="level1">Pass a pointer to a linked list of recipients to pass to the server in your SMTP mail request.  The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. 
-<p class="level1">Each recipient in SMTP lingo is specified with angle brackets (&lt;&gt;), but should you not use an angle bracket as first letter libcurl will assume you provide a single email address only and enclose that with angle brackets for you. 
-<p class="level1">(Added in 7.20.0) <a name="TFTP"></a><h2 class="nroffsh">TFTP OPTIONS</h2>
+<p class="level1">Pass a pointer to a linked list of recipients to pass to the server in your SMTP mail request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. 
+<p class="level1">Each recipient should be specified within a pair of angled brackets (&lt;&gt;), however, should you not use an angled bracket as the first character libcurl will assume you provided a single email address and enclose that address within brackets for you. 
+<p class="level1">(Added in 7.20.0) 
+<p class="level0"><a name="CURLOPTMAILAUTH"></a><span class="nroffip">CURLOPT_MAIL_AUTH</span> 
+<p class="level1">Pass a pointer to a zero terminated string as parameter. This will be used to specify the authentication address (identity) of a submitted message that is being relayed to another server. 
+<p class="level1">This optional parameter allows co-operating agents in a trusted environment to communicate the authentication of individual messages and should only be used by the application program, using libcurl, if the application is itself a mail server acting in such an environment. If the application is operating as such and the AUTH address is not known or is invalid, then an empty string should be used for this parameter. 
+<p class="level1">Unlike CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT, the address should not be specified within a pair of angled brackets (&lt;&gt;). However, if an empty string is used then a pair of brackets will be sent by libcurl as required by <a href="http://www.ietf.org/rfc/rfc2554.txt">RFC 2554</a>. 
+<p class="level1">(Added in 7.25.0) <a name="TFTP"></a><h2 class="nroffsh">TFTP OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTTFTPBLKSIZE"></a><span class="nroffip">CURLOPT_TFTP_BLKSIZE</span> 
-<p class="level1">Specify block size to use for TFTP data transmission. Valid range as per RFC 2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is not specified. The specified block size will only be used pending support by the remote server. If the server does not return an option acknowledgement or returns an option acknowledgement with no blksize, the default of 512 bytes will be used. (added in 7.19.4) <a name="FTP"></a><h2 class="nroffsh">FTP OPTIONS</h2>
+<p class="level1">Specify block size to use for TFTP data transmission. Valid range as per <a href="http://www.ietf.org/rfc/rfc2348.txt">RFC 2348</a> is 8-65464 bytes. The default of 512 bytes will be used if this option is not specified. The specified block size will only be used pending support by the remote server. If the server does not return an option acknowledgement or returns an option acknowledgement with no blksize, the default of 512 bytes will be used. (added in 7.19.4) <a name="FTP"></a><h2 class="nroffsh">FTP OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTFTPPORT"></a><span class="nroffip">CURLOPT_FTPPORT</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to get the IP address to use for the FTP PORT instruction. The PORT instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a host name, a network interface name (under Unix) or just a '-' symbol to let the library use your system's default IP address. Default FTP operations are passive, and thus won't use PORT. 
@@ -459,11 +602,13 @@ p.roffit {
 <p class="level1">
 <p class="level1">You disable PORT again and go back to using the passive version by setting this option to NULL. 
 <p class="level0"><a name="CURLOPTQUOTE"></a><span class="nroffip">CURLOPT_QUOTE</span> 
-<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server prior to your FTP request. This will be done before any other commands are issued (even before the CWD command for FTP). The linked list should be a fully valid list of 'struct curl_slist' structs properly filled in with text strings. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to append strings (commands) to the list, and clear the entire list afterwards with <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. Disable this operation again by setting a NULL to this option. The set of valid FTP commands depends on the server (see RFC959 for a list of mandatory commands). The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink (see <span Class="manpage">curl (1))</span> (SFTP support added in 7.16.3) 
+<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server prior to your FTP request. This will be done before any other commands are issued (even before the CWD command for FTP). The linked list should be a fully valid list of 'struct curl_slist' structs properly filled in with text strings. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to append strings (commands) to the list, and clear the entire list afterwards with <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. Disable this operation again by setting a NULL to this option. When speaking to a FTP (or SFTP since 7.24.0) server, prefix the command with an asterisk (*) to make libcurl continue even if the command fails as by default libcurl will stop at first failure. 
+<p class="level1">The set of valid FTP commands depends on the server (see <a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a> for a list of mandatory commands). 
+<p class="level1">The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink (see <span Class="manpage">curl (1))</span> (SFTP support added in 7.16.3) 
 <p class="level0"><a name="CURLOPTPOSTQUOTE"></a><span class="nroffip">CURLOPT_POSTQUOTE</span> 
 <p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server after your FTP transfer request. The commands will only be run if no error occurred. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option. 
 <p class="level0"><a name="CURLOPTPREQUOTE"></a><span class="nroffip">CURLOPT_PREQUOTE</span> 
-<p class="level1">Pass a pointer to a linked list of FTP commands to pass to the server after the transfer type is set. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option. Before version 7.15.6, if you also set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 1, this option didn't work. 
+<p class="level1">Pass a pointer to a linked list of FTP commands to pass to the server after the transfer type is set. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option. Before version 7.16.0, if you also set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 1, this option didn't work. 
 <p class="level0"><a name="CURLOPTDIRLISTONLY"></a><span class="nroffip">CURLOPT_DIRLISTONLY</span> 
 <p class="level1">A parameter set to 1 tells the library to just list the names of files in a directory, instead of doing a full directory listing that would include file sizes, dates etc. This works for FTP and SFTP URLs. 
 <p class="level1">This causes an FTP NLST command to be sent on an FTP server.  Beware that some FTP servers list only files in their response to NLST; they might not include subdirectories and symbolic links. 
@@ -484,7 +629,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTFTPCREATEMISSINGDIRS"></a><span class="nroffip">CURLOPT_FTP_CREATE_MISSING_DIRS</span> 
 <p class="level1">Pass a long. If the value is 1, curl will attempt to create any remote directory that it fails to CWD into. CWD is the command that changes working directory. (Added in 7.10.7) 
 <p class="level1">This setting also applies to SFTP-connections. curl will attempt to create the remote directory if it can't obtain a handle to the target-location. The creation will fail if a file of the same name as the directory to create already exists or lack of permissions prevents creation. (Added in 7.16.3) 
-<p class="level1">Starting with 7.19.4, you can also set this value to 2, which will make libcurl retry the CWD command again if the subsequent MKD command fails. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! 7.19.4 also introduced the <span Class="emphasis">CURLFTP_CREATE_DIR</span> and <span Class="emphasis">CURLFTP_CREATE_DIR_RETRY</span> enum names for these arguments. 
+<p class="level1">Starting with 7.19.4, you can also set this value to 2, which will make libcurl retry the CWD command again if the subsequent MKD command fails. This is especially useful if you're doing many simultaneous connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! 7.19.4 also introduced the <span Class="emphasis">CURLFTP_CREATE_DIR</span> and <span Class="emphasis">CURLFTP_CREATE_DIR_RETRY</span> enum names for these arguments. 
 <p class="level1">Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act as if 1 was selected. 
 <p class="level0"><a name="CURLOPTFTPRESPONSETIMEOUT"></a><span class="nroffip">CURLOPT_FTP_RESPONSE_TIMEOUT</span> 
 <p class="level1">Pass a long.  Causes curl to set a timeout period (in seconds) on the amount of time that the server is allowed to take in order to generate a response message for a command before the session is considered hung.  While curl is waiting for a response, this value overrides <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>. It is recommended that if used in conjunction with <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>, you set <a class="emphasis" href="#CURLOPTFTPRESPONSETIMEOUT">CURLOPT_FTP_RESPONSE_TIMEOUT</a> to a value smaller than <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>.  (Added in 7.10.8) 
@@ -514,12 +659,12 @@ p.roffit {
 <p class="level2">Initiate the shutdown and wait for a reply. 
 <p class="level1">
 <p class="level0"><a name="CURLOPTFTPACCOUNT"></a><span class="nroffip">CURLOPT_FTP_ACCOUNT</span> 
-<p class="level1">Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0) 
+<p class="level1">Pass a pointer to a zero terminated string (or NULL to disable). When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0) 
 <p class="level0"><a name="CURLOPTFTPFILEMETHOD"></a><span class="nroffip">CURLOPT_FTP_FILEMETHOD</span> 
 <p class="level1">Pass a long that should have one of the following values. This option controls what method libcurl should use to reach a file on a FTP(S) server. The argument should be one of the following alternatives: 
 <p class="level2">
 <p class="level1"><a name="CURLFTPMETHODMULTICWD"></a><span class="nroffip">CURLFTPMETHOD_MULTICWD</span> 
-<p class="level2">libcurl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior. 
+<p class="level2">libcurl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how <a href="http://www.ietf.org/rfc/rfc1738.txt">RFC 1738</a> says it should be done. This is the default but the slowest behavior. 
 <p class="level1"><a name="CURLFTPMETHODNOCWD"></a><span class="nroffip">CURLFTPMETHOD_NOCWD</span> 
 <p class="level2">libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior. 
 <p class="level1"><a name="CURLFTPMETHODSINGLECWD"></a><span class="nroffip">CURLFTPMETHOD_SINGLECWD</span> 
@@ -530,11 +675,11 @@ p.roffit {
 <p class="level1">Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP enum values. Unless noted otherwise, commands require the Session ID to be initialized. (Added in 7.20.0) 
 <p class="level2">
 <p class="level1"><a name="CURLRTSPREQOPTIONS"></a><span class="nroffip">CURL_RTSPREQ_OPTIONS</span> 
-<p class="level2">Used to retrieve the available methods of the server. The application is responsbile for parsing and obeying the response. <span class="bold">(The session ID is not needed for this method.)</span>  (Added in 7.20.0) 
+<p class="level2">Used to retrieve the available methods of the server. The application is responsible for parsing and obeying the response. <span class="bold">(The session ID is not needed for this method.)</span>  (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQDESCRIBE"></a><span class="nroffip">CURL_RTSPREQ_DESCRIBE</span> 
 <p class="level2">Used to get the low level description of a stream. The application should note what formats it understands in the <span Class="emphasis">'Accept:'</span> header. Unless set manually, libcurl will automatically fill in <span class="emphasis">'Accept: application/sdp'</span>. Time-condition headers will be added to Describe requests if the <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a> option is active. <span class="bold">(The session ID is not needed for this method)</span>  (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQANNOUNCE"></a><span class="nroffip">CURL_RTSPREQ_ANNOUNCE</span> 
-<p class="level2">When sent by a client, this method changes the description of the session. For example, if a client is using the server to record a meeting, the client can use Announce to inform the server of all the meta-information about the session.  ANNOUNCE acts like an HTTP PUT or POST just like <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a> (Added in 7.20.0) 
+<p class="level2">When sent by a client, this method changes the description of the session. For example, if a client is using the server to record a meeting, the client can use Announce to inform the server of all the meta-information about the session.  ANNOUNCE acts like a HTTP PUT or POST just like <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a> (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQSETUP"></a><span class="nroffip">CURL_RTSPREQ_SETUP</span> 
 <p class="level2">Setup is used to initialize the transport layer for the session. The application must set the desired Transport options for a session by using the <a class="emphasis" href="#CURLOPTRTSPTRANSPORT">CURLOPT_RTSP_TRANSPORT</a> option prior to calling setup. If no session ID is currently set with <a class="emphasis" href="#CURLOPTRTSPSESSIONID">CURLOPT_RTSP_SESSION_ID</a>, libcurl will extract and use the session ID in the response to this request. <span class="bold">(The session ID is not needed for this method).</span>  (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQPLAY"></a><span class="nroffip">CURL_RTSPREQ_PLAY</span> 
@@ -544,9 +689,9 @@ p.roffit {
 <p class="level1"><a name="CURLRTSPREQTEARDOWN"></a><span class="nroffip">CURL_RTSPREQ_TEARDOWN</span> 
 <p class="level2">This command terminates an RTSP session. Simply closing a connection does not terminate the RTSP session since it is valid to control an RTSP session over different connections.  (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQGETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_GET_PARAMETER</span> 
-<p class="level2">Retrieve a parameter from the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header on all non-empty requests unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST (see <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a>). Applications wishing to send a heartbeat message (e.g. in the presence of a server-specified timeout) should send use an empty GET_PARAMETER request. (Added in 7.20.0) 
+<p class="level2">Retrieve a parameter from the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header on all non-empty requests unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST (see <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a>). Applications wishing to send a heartbeat message (e.g. in the presence of a server-specified timeout) should send use an empty GET_PARAMETER request. (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQSETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_SET_PARAMETER</span> 
-<p class="level2">Set a parameter on the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header unless a custom one is set. The interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application may either use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a> with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> like an HTTP PUT, or it may use <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> like an HTTP POST. No chunked transfers are allowed, so the application must set the <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> in the former and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> in the latter. Also, there is no use of multi-part POSTs within RTSP. (Added in 7.20.0) 
+<p class="level2">Set a parameter on the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header unless a custom one is set. The interaction with SET_PARAMTER is much like a HTTP PUT or POST. An application may either use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a> with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> like a HTTP PUT, or it may use <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> like a HTTP POST. No chunked transfers are allowed, so the application must set the <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> in the former and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> in the latter. Also, there is no use of multi-part POSTs within RTSP. (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQRECORD"></a><span class="nroffip">CURL_RTSPREQ_RECORD</span> 
 <p class="level2">Used to tell the server to record a session. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option to modify the record time. (Added in 7.20.0) 
 <p class="level1"><a name="CURLRTSPREQRECEIVE"></a><span class="nroffip">CURL_RTSPREQ_RECEIVE</span> 
@@ -569,11 +714,11 @@ p.roffit {
 <p class="level1">A parameter set to 1 tells the library to use ASCII mode for FTP transfers, instead of the default binary transfer. For win32 systems it does not set the stdout to binary mode. This option can be usable when transferring text data between systems with different views on certain characters, such as newlines or similar. 
 <p class="level1">libcurl does not do a complete ASCII conversion when doing ASCII transfers over FTP. This is a known limitation/flaw that nobody has rectified. libcurl simply sets the mode to ASCII and performs a standard transfer. 
 <p class="level0"><a name="CURLOPTPROXYTRANSFERMODE"></a><span class="nroffip">CURLOPT_PROXY_TRANSFER_MODE</span> 
-<p class="level1">Pass a long. If the value is set to 1 (one), it tells libcurl to set the transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by appending ;type=a or ;type=i to the URL. Without this setting, or it being set to 0 (zero, the default), <a class="emphasis" href="#CURLOPTTRANSFERTEXT">CURLOPT_TRANSFERTEXT</a> has no effect when doing FTP via a proxy. Beware that not all proxies support this feature.  (Added in 7.18.0) 
+<p class="level1">Pass a long. If the value is set to 1 (one), it tells libcurl to set the transfer mode (binary or ASCII) for FTP transfers done via a HTTP proxy, by appending ;type=a or ;type=i to the URL. Without this setting, or it being set to 0 (zero, the default), <a class="emphasis" href="#CURLOPTTRANSFERTEXT">CURLOPT_TRANSFERTEXT</a> has no effect when doing FTP via a proxy. Beware that not all proxies support this feature.  (Added in 7.18.0) 
 <p class="level0"><a name="CURLOPTCRLF"></a><span class="nroffip">CURLOPT_CRLF</span> 
 <p class="level1">Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to CRLF newlines on transfers. Disable this option again by setting the value to 0 (zero). 
 <p class="level0"><a name="CURLOPTRANGE"></a><span class="nroffip">CURLOPT_RANGE</span> 
-<p class="level1">Pass a char * as parameter, which should contain the specified range you want. It should be in the format "X-Y", where X or Y may be left out. HTTP transfers also support several intervals, separated with commas as in <span Class="emphasis">"X-Y,N-M"</span>. Using this kind of multiple intervals will cause the HTTP server to send the response document in pieces (using standard MIME separation techniques). For RTSP, the formatting of a range should follow RFC 2326 Section 12.29. For RTSP, byte ranges are <span Class="bold">not</span> permitted. Instead, ranges should be given in npt, utc, or smpte formats. 
+<p class="level1">Pass a char * as parameter, which should contain the specified range you want. It should be in the format "X-Y", where X or Y may be left out. HTTP transfers also support several intervals, separated with commas as in <span Class="emphasis">"X-Y,N-M"</span>. Using this kind of multiple intervals will cause the HTTP server to send the response document in pieces (using standard MIME separation techniques). For RTSP, the formatting of a range should follow <a href="http://www.ietf.org/rfc/rfc2326.txt">RFC 2326</a> Section 12.29. For RTSP, byte ranges are <span Class="bold">not</span> permitted. Instead, ranges should be given in npt, utc, or smpte formats. 
 <p class="level1">Pass a NULL to this option to disable the use of ranges. 
 <p class="level1">Ranges work on HTTP, FTP, FILE (since 7.18.0), and RTSP (since 7.20.0) transfers only. 
 <p class="level0"><a name="CURLOPTRESUMEFROM"></a><span class="nroffip">CURLOPT_RESUME_FROM</span> 
@@ -582,12 +727,15 @@ p.roffit {
 <p class="level0"><a name="CURLOPTRESUMEFROMLARGE"></a><span class="nroffip">CURLOPT_RESUME_FROM_LARGE</span> 
 <p class="level1">Pass a curl_off_t as parameter. It contains the offset in number of bytes that you want the transfer to start from. (Added in 7.11.0) 
 <p class="level0"><a name="CURLOPTCUSTOMREQUEST"></a><span class="nroffip">CURLOPT_CUSTOMREQUEST</span> 
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST when doing a FTP directory listing. This is useful for doing DELETE or other more or less obscure HTTP requests. Don't do this at will, make sure your server supports the command first. 
+<p class="level1">Pass a pointer to a zero terminated string as parameter. It can be used to specify the request instead of GET or HEAD when performing HTTP based requests, instead of LIST and NLST when performing FTP directory listings and instead of LIST and RETR when issuing POP3 based commands. This is particularly useful, for example, for performing a HTTP DELETE request or a POP3 DELE command. 
+<p class="level1">Please don't perform this at will, on HTTP based requests, by making sure your server supports the command you are sending first. 
 <p class="level1">When you change the request method by setting <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> to something, you don't actually change how libcurl behaves or acts in regards to the particular request method, it will only change the actual string sent in the request. 
-<p class="level1">For example: if you tell libcurl to do a HEAD request, but then change the request to a "GET" with <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> you'll still see libcurl act as if it sent a HEAD even when it does send a GET. 
-<p class="level1">To switch to a proper HEAD, use <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a>, to switch to a proper POST, use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> and so on. 
+<p class="level1">For example: 
+<p class="level1">With the HTTP protocol when you tell libcurl to do a HEAD request, but then specify a GET though a custom request libcurl will still act as if it sent a HEAD. To switch to a proper HEAD use <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a>, to switch to a proper POST use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> and to switch to a proper GET use CURLOPT_HTTPGET. 
+<p class="level1">With the POP3 protocol when you tell libcurl to use a custom request it will behave like a LIST or RETR command was sent where it expects data to be returned by the server. As such <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> should be used when specifying commands such as DELE and NOOP for example. 
 <p class="level1">Restore to the internal default by setting this to NULL. 
 <p class="level1">Many people have wrongly used this option to replace the entire request with their own, including multiple headers and POST contents. While that might work in many cases, it will cause libcurl to send invalid requests and it could possibly confuse the remote server badly. Use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> and <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to set POST data. Use <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> to replace or extend the set of headers sent by libcurl. Use <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a> to change HTTP version. 
+<p class="level1">(Support for POP3 added in 7.26.0) 
 <p class="level0"><a name="CURLOPTFILETIME"></a><span class="nroffip">CURLOPT_FILETIME</span> 
 <p class="level1">Pass a long. If it is 1, libcurl will attempt to get the modification date of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> function with the <span Class="emphasis">CURLINFO_FILETIME</span> argument can be used after a transfer to extract the received time (if any). 
 <p class="level0"><a name="CURLOPTNOBODY"></a><span class="nroffip">CURLOPT_NOBODY</span> 
@@ -596,6 +744,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTINFILESIZE"></a><span class="nroffip">CURLOPT_INFILESIZE</span> 
 <p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a long. See also <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a>. 
 <p class="level1">For uploading using SCP, this option or <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a> is mandatory. 
+<p class="level1">When sending emails using SMTP, this command can be used to specify the optional SIZE parameter for the MAIL FROM command. (Added in 7.23.0) 
 <p class="level1">This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns. 
 <p class="level0"><a name="CURLOPTINFILESIZELARGE"></a><span class="nroffip">CURLOPT_INFILESIZE_LARGE</span> 
 <p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is.  This value should be passed as a curl_off_t. (Added in 7.11.0) 
@@ -612,7 +761,7 @@ p.roffit {
 <p class="level1">Pass a curl_off_t as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and <span Class="emphasis">CURLE_FILESIZE_EXCEEDED</span> will be returned. (Added in 7.11.0) 
 <p class="level1">The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers. 
 <p class="level0"><a name="CURLOPTTIMECONDITION"></a><span class="nroffip">CURLOPT_TIMECONDITION</span> 
-<p class="level1">Pass a long as parameter. This defines how the <a class="emphasis" href="#CURLOPTTIMEVALUE">CURLOPT_TIMEVALUE</a> time value is treated. You can set this parameter to <span Class="emphasis">CURL_TIMECOND_IFMODSINCE</span> or <span Class="emphasis">CURL_TIMECOND_IFUNMODSINCE</span>. This feature applies to HTTP, FTP, and RTSP
+<p class="level1">Pass a long as parameter. This defines how the <a class="emphasis" href="#CURLOPTTIMEVALUE">CURLOPT_TIMEVALUE</a> time value is treated. You can set this parameter to <span Class="emphasis">CURL_TIMECOND_IFMODSINCE</span> or <span Class="emphasis">CURL_TIMECOND_IFUNMODSINCE</span>. This feature applies to HTTP, FTP, RTSP, and FILE
 <p class="level1">The last modification time of a file is not always known and in such instances this feature will have no effect even if the given time condition would not have been met. <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with the <span Class="emphasis">CURLINFO_CONDITION_UNMET</span> option can be used after a transfer to learn if a zero-byte successful "transfer" was due to this condition not matching. 
 <p class="level0"><a name="CURLOPTTIMEVALUE"></a><span class="nroffip">CURLOPT_TIMEVALUE</span> 
 <p class="level1">Pass a long as parameter. This should be the time in seconds since 1 Jan 1970, and the time will be used in a condition as specified with <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a>. <a name="CONNECTION"></a><h2 class="nroffsh">CONNECTION OPTIONS</h2>
@@ -620,6 +769,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTTIMEOUT"></a><span class="nroffip">CURLOPT_TIMEOUT</span> 
 <p class="level1">Pass a long as parameter containing the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option will cause curl to use the SIGALRM to enable time-outing system calls. 
 <p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set. 
+<p class="level1">Default timeout is 0 (zero) which means it never times out. 
 <p class="level0"><a name="CURLOPTTIMEOUTMS"></a><span class="nroffip">CURLOPT_TIMEOUT_MS</span> 
 <p class="level1">Like <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> but takes number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the transfer will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2) 
 <p class="level0"><a name="CURLOPTLOWSPEEDLIMIT"></a><span class="nroffip">CURLOPT_LOW_SPEED_LIMIT</span> 
@@ -642,7 +792,7 @@ p.roffit {
 <p class="level0"><a name="CURLOPTFORBIDREUSE"></a><span class="nroffip">CURLOPT_FORBID_REUSE</span> 
 <p class="level1">Pass a long. Set to 1 to make the next transfer explicitly close the connection when done. Normally, libcurl keeps all connections alive when done with one transfer in case a succeeding one follows that can re-use them. This option should be used with caution and only if you understand what it does. Set to 0 to have libcurl keep the connection open for possible later re-use (default behavior). 
 <p class="level0"><a name="CURLOPTCONNECTTIMEOUT"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT</span> 
-<p class="level1">Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take.  This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to disable connection timeout (it will then only timeout on the system's internal timeouts). See also the <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> option. 
+<p class="level1">Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take.  This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 300 seconds. See also the <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> option. 
 <p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set. 
 <p class="level0"><a name="CURLOPTCONNECTTIMEOUTMS"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT_MS</span> 
 <p class="level1">Like <a class="emphasis" href="#CURLOPTCONNECTTIMEOUT">CURLOPT_CONNECTTIMEOUT</a> but takes the number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2) 
@@ -657,8 +807,8 @@ p.roffit {
 <p class="level2">Resolve to IPv6 addresses. 
 <p class="level1">
 <p class="level0"><a name="CURLOPTCONNECTONLY"></a><span class="nroffip">CURLOPT_CONNECT_ONLY</span> 
-<p class="level1">Pass a long. If the parameter equals 1, it tells the library to perform all the required proxy authentication and connection setup, but no data transfer. This option is useful only on HTTP URLs
-<p class="level1">This option is useful with the <span Class="emphasis">CURLINFO_LASTSOCKET</span> option to <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a>. The library can set up the connection and then the application can obtain the most recently used socket for special data transfers. (Added in 7.15.2) 
+<p class="level1">Pass a long. If the parameter equals 1, it tells the library to perform all the required proxy authentication and connection setup, but no data transfer. This option is implemented for HTTP, SMTP and POP3
+<p class="level1">The option can be used to simply test a connection to a server, but is more useful when used with the <span Class="emphasis">CURLINFO_LASTSOCKET</span> option to <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> as the library can set up the connection and then the application can obtain the most recently used socket for special data transfers. (Added in 7.15.2) 
 <p class="level0"><a name="CURLOPTUSESSL"></a><span class="nroffip">CURLOPT_USE_SSL</span> 
 <p class="level1">Pass a long using one of the values from below, to make libcurl use your desired level of SSL for the transfer. (Added in 7.11.0) 
 <p class="level1">This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc. 
@@ -678,15 +828,26 @@ p.roffit {
 <p class="level1">Each single name resolve string should be written using the format HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is the port number of the service where libcurl wants to connect to the HOST and ADDRESS is the numerical IP address. If libcurl is built to support IPv6, ADDRESS can of course be either IPv4 or IPv6 style addressing. 
 <p class="level1">This option effectively pre-populates the DNS cache with entries for the host+port pair so redirects and everything that operations against the HOST+PORT will instead use your provided ADDRESS. 
 <p class="level1">You can remove names from the DNS cache again, to stop providing these fake resolves, by including a string in the linked list that uses the format "-HOST:PORT". The host name must be prefixed with a dash, and the host name and port number must exactly match what was already added previously. 
-<p class="level1">(Added in 7.12.3) <a name="SSL"></a><h2 class="nroffsh">SSL and SECURITY OPTIONS</h2>
+<p class="level1">(Added in 7.21.3) 
+<p class="level0"><a name="CURLOPTDNSSERVERS"></a><span class="nroffip">CURLOPT_DNS_SERVERS</span> 
+<p class="level1">Set the list of DNS servers to be used instead of the system default. The format of the dns servers option is: 
+<p class="level1">host[:port][,host[:port]]... 
+<p class="level1">For example: 
+<p class="level1">192.168.1.100,192.168.1.101,3.4.5.6 
+<p class="level1">This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares backend is the only such one. 
+<p class="level1">(Added in 7.24.0) 
+<p class="level0"><a name="CURLOPTACCEPTTIMEOUTMS"></a><span class="nroffip">CURLOPT_ACCEPTTIMEOUT_MS</span> 
+<p class="level1">Pass a long telling libcurl the maximum number of milliseconds to wait for a server to connect back to libcurl when an active FTP connection is used. If no timeout is set, the internal default of 60000 will be used. (Added in 7.24.0) <a name="SSL"></a><h2 class="nroffsh">SSL and SECURITY OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTSSLCERT"></a><span class="nroffip">CURLOPT_SSLCERT</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your certificate. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLCERTTYPE">CURLOPT_SSLCERTTYPE</a>. 
-<p class="level1">With NSS this is the nickname of the certificate you wish to authenticate with. 
+<p class="level1">With NSS this can also be the nickname of the certificate you wish to authenticate with. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname. 
+<p class="level1">(iOS and Mac OS X only) With Secure Transport, this string must match the name of a certificate that's in the system or user keychain. You should encode this string in UTF-8 format in case it contains non-ASCII characters. The private key corresponding to the certificate, and certificate chain (if any),  must also be present in the keychain. (Added in 7.31.0) 
 <p class="level0"><a name="CURLOPTSSLCERTTYPE"></a><span class="nroffip">CURLOPT_SSLCERTTYPE</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your certificate. Supported formats are "PEM" and "DER".  (Added in 7.9.3) 
 <p class="level0"><a name="CURLOPTSSLKEY"></a><span class="nroffip">CURLOPT_SSLKEY</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your private key. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLKEYTYPE">CURLOPT_SSLKEYTYPE</a>. 
+<p class="level1">(iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport. Secure Transport expects the private key to be already present in the keychain containing the certificate. 
 <p class="level0"><a name="CURLOPTSSLKEYTYPE"></a><span class="nroffip">CURLOPT_SSLKEYTYPE</span> 
 <p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG". 
 <p class="level1">The format "ENG" enables you to load the private key from a crypto engine. In this case <a class="emphasis" href="#CURLOPTSSLKEY">CURLOPT_SSLKEY</a> is used as an identifier passed to the engine. You have to set the crypto engine with <a class="emphasis" href="#CURLOPTSSLENGINE">CURLOPT_SSLENGINE</a>. "DER" format key file currently does not work because of a bug in OpenSSL. 
@@ -713,67 +874,74 @@ p.roffit {
 <p class="level2">Force SSLv3 
 <p class="level1">
 <p class="level0"><a name="CURLOPTSSLVERIFYPEER"></a><span class="nroffip">CURLOPT_SSL_VERIFYPEER</span> 
-<p class="level1">Pass a long as parameter. 
-<p class="level1">This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; zero means it doesn't.  The default is nonzero, but before 7.10, it was zero
-<p class="level1">When negotiating an SSL connection, the server sends a certificate indicating its identity.  Curl verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is.  This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply.  As of 7.10, curl installs a default bundle of CA certificates and you can specify alternate certificates with the <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> option or the <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> option. 
-<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is nonzero, and the verification fails to prove that the certificate is authentic, the connection fails.  When the option is zero, the connection succeeds regardless. 
-<p class="level1">Authenticating the certificate is not by itself very useful.  You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to.  Use <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> to control that. 
+<p class="level1">Pass a long as parameter. By default, curl assumes a value of 1. 
+<p class="level1">This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't
+<p class="level1">When negotiating a SSL connection, the server sends a certificate indicating its identity.  Curl verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is.  This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply.  curl uses a default bundle of CA certificates (the path for that is determined at build time) and you can specify alternate certificates with the <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> option or the <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> option. 
+<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is nonzero, and the verification fails to prove that the certificate is authentic, the connection fails.  When the option is zero, the peer certificate verification succeeds regardless. 
+<p class="level1">Authenticating the certificate is not by itself very useful.  You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to.  Use <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> to control that. The check that the host name in the certificate is valid for the host name you're connecting to is done independently of the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. 
 <p class="level0"><a name="CURLOPTCAINFO"></a><span class="nroffip">CURLOPT_CAINFO</span> 
 <p class="level1">Pass a char * to a zero terminated string naming a file holding one or more certificates to verify the peer with.  This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option.  If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> need not even indicate an accessible file. 
 <p class="level1">This option is by default set to the system path where libcurl's cacert bundle is assumed to be stored, as established at build time. 
-<p class="level1">When built against NSS, this is the directory that the NSS certificate database resides in
+<p class="level1">If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly
 <p class="level0"><a name="CURLOPTISSUERCERT"></a><span class="nroffip">CURLOPT_ISSUERCERT</span> 
 <p class="level1">Pass a char * to a zero terminated string naming a file holding a CA certificate in PEM format. If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree. 
 <p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. Otherwise, the result of the check is not considered as failure. 
 <p class="level1">A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (<a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> has to be set too for the check to fail). (Added in 7.19.0) 
 <p class="level0"><a name="CURLOPTCAPATH"></a><span class="nroffip">CURLOPT_CAPATH</span> 
-<p class="level1">Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option.  If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> need not even indicate an accessible path.  The <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS
+<p class="level1">Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. If libcurl is built against OpenSSL, the certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option.  If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> need not even indicate an accessible path.  The <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS. NSS-powered libcurl provides the option only for backward compatibility
 <p class="level0"><a name="CURLOPTCRLFILE"></a><span class="nroffip">CURLOPT_CRLFILE</span> 
 <p class="level1">Pass a char * to a zero terminated string naming a file with the concatenation of CRL (in PEM format) to use in the certificate validation that occurs during the SSL exchange. 
 <p class="level1">When curl is built to use NSS or GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. When libcurl is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed. 
 <p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. 
 <p class="level1">A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. (Added in 7.19.0) 
-<p class="level0"><a name="CURLOPTCERTINFO"></a><span class="nroffip">CURLOPT_CERTINFO</span> 
-<p class="level1">Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With this enabled, libcurl (if built with OpenSSL) will extract lots of information and data about the certificates in the certificate chain used in the SSL connection. This data is then possible to extract after a transfer using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> and its option <span Class="emphasis">CURLINFO_CERTINFO</span>. (Added in 7.19.1) 
-<p class="level0"><a name="CURLOPTRANDOMFILE"></a><span class="nroffip">CURLOPT_RANDOM_FILE</span> 
-<p class="level1">Pass a char * to a zero terminated file name. The file will be used to read from to seed the random engine for SSL. The more random the specified file is, the more secure the SSL connection will become. 
-<p class="level0"><a name="CURLOPTEGDSOCKET"></a><span class="nroffip">CURLOPT_EGDSOCKET</span> 
-<p class="level1">Pass a char * to the zero terminated path name to the Entropy Gathering Daemon socket. It will be used to seed the random engine for SSL. 
 <p class="level0"><a name="CURLOPTSSLVERIFYHOST"></a><span class="nroffip">CURLOPT_SSL_VERIFYHOST</span> 
 <p class="level1">Pass a long as parameter. 
 <p class="level1">This option determines whether libcurl verifies that the server cert is for the server it is known as. 
 <p class="level1">When negotiating a SSL connection, the server sends a certificate indicating its identity. 
 <p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails. 
 <p class="level1">Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect. 
-<p class="level1">When the value is 1, the certificate must contain a Common Name field, but it doesn't matter what name it says.  (This is not ordinarily a useful setting)
+<p class="level1">When the value is 1, libcurl will return a failure. It was previously (in 7.28.0 and earlier) a debug option of some sorts, but it is no longer supported due to frequently leading to programmer mistakes
 <p class="level1">When the value is 0, the connection succeeds regardless of the names in the certificate. 
-<p class="level1">The default, since 7.10, is 2. 
-<p class="level1">This option controls checking the server's claimed identity.  The server could be lying.  To control lying, see <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a>. 
+<p class="level1">The default value for this option is 2. 
+<p class="level1">This option controls checking the server's certificate's claimed identity. The server could be lying.  To control lying, see <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a>.  If libcurl is built against NSS and <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is ignored. 
+<p class="level1">
+<p class="level0"><a name="CURLOPTCERTINFO"></a><span class="nroffip">CURLOPT_CERTINFO</span> 
+<p class="level1">Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With this enabled, libcurl (if built with OpenSSL) will extract lots of information and data about the certificates in the certificate chain used in the SSL connection. This data is then possible to extract after a transfer using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> and its option <span Class="emphasis">CURLINFO_CERTINFO</span>. (Added in 7.19.1) 
+<p class="level0"><a name="CURLOPTRANDOMFILE"></a><span class="nroffip">CURLOPT_RANDOM_FILE</span> 
+<p class="level1">Pass a char * to a zero terminated file name. The file will be used to read from to seed the random engine for SSL. The more random the specified file is, the more secure the SSL connection will become. 
+<p class="level0"><a name="CURLOPTEGDSOCKET"></a><span class="nroffip">CURLOPT_EGDSOCKET</span> 
+<p class="level1">Pass a char * to the zero terminated path name to the Entropy Gathering Daemon socket. It will be used to seed the random engine for SSL. 
 <p class="level0"><a name="CURLOPTSSLCIPHERLIST"></a><span class="nroffip">CURLOPT_SSL_CIPHER_LIST</span> 
 <p class="level1">Pass a char *, pointing to a zero terminated string holding the list of ciphers to use for the SSL connection. The list must be syntactically correct, it consists of one or more cipher strings separated by colons. Commas or spaces are also acceptable separators but colons are normally used, !, - and + can be used as operators. 
 <p class="level1">For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA', &acute;SHA1+DES&acute;, 'TLSv1' and 'DEFAULT'. The default list is normally set when you compile OpenSSL. 
 <p class="level1">You'll find more details about cipher lists on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span> 
 <p class="level1">For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5', &acute;rsa_aes_128_sha&acute;, etc. With NSS you don't add/remove ciphers. If one uses this option then all known ciphers are disabled and only those passed in are enabled. 
-<p class="level1">You'll find more details about the NSS cipher lists on this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span> 
+<p class="level1">You'll find more details about the NSS cipher lists on this URL: <span Class="emphasis"><a href="http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html">http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html</a>#Directives</span> 
 <p class="level1">
 <p class="level0"><a name="CURLOPTSSLSESSIONIDCACHE"></a><span class="nroffip">CURLOPT_SSL_SESSIONID_CACHE</span> 
 <p class="level1">Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set this to 1 to enable it. By default all transfers are done using the cache. While nothing ever should get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0) 
+<p class="level0"><a name="CURLOPTSSLOPTIONS"></a><span class="nroffip">CURLOPT_SSL_OPTIONS</span> 
+<p class="level1">Pass a long with a bitmask to tell libcurl about specific SSL behaviors. 
+<p class="level1">CURLSSLOPT_ALLOW_BEAST is the only supported bit and by setting this the user will tell libcurl to not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.  If this option isn't used or this bit is set to 0, the SSL layer libcurl uses may use a work-around for this flaw although it might cause interoperability problems with some (older) SSL implementations. WARNING: avoiding this work-around loosens the security, and by setting this option to 1 you ask for exactly that. (Added in 7.25.0) 
 <p class="level0"><a name="CURLOPTKRBLEVEL"></a><span class="nroffip">CURLOPT_KRBLEVEL</span> 
 <p class="level1">Pass a char * as parameter. Set the kerberos security level for FTP; this also enables kerberos awareness.  This is a string, 'clear', 'safe', 'confidential' or 'private'.  If the string is set but doesn't match one of these, 'private' will be used. Set the string to NULL to disable kerberos support for FTP. 
-<p class="level1">(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3) <a name="SSH"></a><h2 class="nroffsh">SSH OPTIONS</h2>
+<p class="level1">(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3) 
+<p class="level0"><a name="CURLOPTGSSAPIDELEGATION"></a><span class="nroffip">CURLOPT_GSSAPI_DELEGATION</span> 
+<p class="level1">Set the parameter to CURLGSSAPI_DELEGATION_FLAG to allow unconditional GSSAPI credential delegation.  The delegation is disabled by default since 7.21.7. Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG to delegate only if the OK-AS-DELEGATE flag is set in the service ticket in case this feature is supported by the GSSAPI implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time. (Added in 7.22.0) <a name="SSH"></a><h2 class="nroffsh">SSH OPTIONS</h2>
 <p class="level0">
 <p class="level0"><a name="CURLOPTSSHAUTHTYPES"></a><span class="nroffip">CURLOPT_SSH_AUTH_TYPES</span> 
-<p class="level1">Pass a long set to a bitmask consisting of one or more of CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one. (Added in 7.16.1
+<p class="level1">Pass a long set to a bitmask consisting of one or more of CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD and CURLSSH_AUTH_AGENT. Set CURLSSH_AUTH_ANY to let libcurl pick a suitable one. Currently CURLSSH_AUTH_HOST has no effect. (Added in 7.16.1) If CURLSSH_AUTH_AGENT is used, libcurl attempts to connect to ssh-agent or pageant and let the agent attempt the authentication. (Added in 7.28.0
 <p class="level0"><a name="CURLOPTSSHHOSTPUBLICKEYMD5"></a><span class="nroffip">CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</span> 
 <p class="level1">Pass a char * pointing to a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, and libcurl will reject the connection to the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1) 
 <p class="level0"><a name="CURLOPTSSHPUBLICKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PUBLIC_KEYFILE</span> 
-<p class="level1">Pass a char * pointing to a file name for your public key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa.pub</span>. (Added in 7.16.1
+<p class="level1">Pass a char * pointing to a file name for your public key. If not used, libcurl defaults to <span Class="bold">$HOME/.ssh/id_dsa.pub</span> if the HOME environment variable is set, and just "id_dsa.pub" in the current directory if HOME is not set.  (Added in 7.16.1) If an empty string is passed, libcurl will pass no public key to libssh2 which then tries to compute it from the private key, this is known to work when libssh2 1.4.0+ is linked against OpenSSL. (Added in 7.26.0
 <p class="level0"><a name="CURLOPTSSHPRIVATEKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PRIVATE_KEYFILE</span> 
-<p class="level1">Pass a char * pointing to a file name for your private key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa</span>.  If the file is password-protected, set the password with <a class="emphasis" href="#CURLOPTKEYPASSWD">CURLOPT_KEYPASSWD</a>. (Added in 7.16.1) 
+<p class="level1">Pass a char * pointing to a file name for your private key. If not used, libcurl defaults to <span Class="bold">$HOME/.ssh/id_dsa</span> if the HOME environment variable is set, and just "id_dsa" in the current directory if HOME is not set.  If the file is password-protected, set the password with <a class="emphasis" href="#CURLOPTKEYPASSWD">CURLOPT_KEYPASSWD</a>. (Added in 7.16.1) 
 <p class="level0"><a name="CURLOPTSSHKNOWNHOSTS"></a><span class="nroffip">CURLOPT_SSH_KNOWNHOSTS</span> 
 <p class="level1">Pass a pointer to a zero terminated string holding the file name of the known_host file to use.  The known_hosts file should use the OpenSSH file format as supported by libssh2. If this file is specified, libcurl will only accept connections with hosts that are known and present in that file, with a matching public key. Use <a class="emphasis" href="#CURLOPTSSHKEYFUNCTION">CURLOPT_SSH_KEYFUNCTION</a> to alter the default behavior on host and key (mis)matching. (Added in 7.19.6) 
 <p class="level0"><a name="CURLOPTSSHKEYFUNCTION"></a><span class="nroffip">CURLOPT_SSH_KEYFUNCTION</span> 
-<p class="level1">Pass a pointer to a curl_sshkeycallback function. It gets called when the known_host matching has been done, to allow the application to act and decide for libcurl how to proceed. It gets passed the CURL handle, the key from the known_hosts file, the key from the remote site, info from libcurl on the matching status and a custom pointer (set with <a class="emphasis" href="#CURLOPTSSHKEYDATA">CURLOPT_SSH_KEYDATA</a>). It MUST return one of the following return codes to tell libcurl how to act: 
+<p class="level1">Pass a pointer to a curl_sshkeycallback function. It gets called when the known_host matching has been done, to allow the application to act and decide for libcurl how to proceed. The callback will only be called if <a class="emphasis" href="#CURLOPTSSHKNOWNHOSTS">CURLOPT_SSH_KNOWNHOSTS</a> is also set. 
+<p class="level1">The curl_sshkeycallback function gets passed the CURL handle, the key from the known_hosts file, the key from the remote site, info from libcurl on the matching status and a custom pointer (set with <a class="emphasis" href="#CURLOPTSSHKEYDATA">CURLOPT_SSH_KEYDATA</a>). It MUST return one of the following return codes to tell libcurl how to act: 
 <p class="level2">
 <p class="level1"><a name="CURLKHSTATFINEADDTOFILE"></a><span class="nroffip">CURLKHSTAT_FINE_ADD_TO_FILE</span> 
 <p class="level2">The host+key is accepted and libcurl will append it to the known_hosts file before continuing with the connection. This will also add the host+key combo to the known_host pool kept in memory if it wasn't already present there. The adding of data to the file is done by completely replacing the file with a new copy, so the permissions of the file must allow this. 
index 9c1d9e9..e6d675c 100644 (file)
Binary files a/docs/libcurl/curl_easy_setopt.pdf and b/docs/libcurl/curl_easy_setopt.pdf differ
index 1afbd12..a26c9c5 100644 (file)
@@ -1,13 +1,31 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_easy_strerror - return string describing error code
 .SH SYNOPSIS
-.nf
-.B #include <curl/curl.h>
-.BI "const char *curl_easy_strerror(CURLcode " errornum ");"
+#include <curl/curl.h>
+
+const char *curl_easy_strerror(CURLcode errornum);
 .SH DESCRIPTION
 The curl_easy_strerror() function returns a string describing the CURLcode
 error code passed in the argument \fIerrornum\fP.
index 1dcca6c..d8cb379 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -45,11 +47,8 @@ p.roffit {
 
 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
 <p class="level0">curl_easy_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
-<span Class="bold">const char *curl_easy_strerror(CURLcode  errornum );</span> 
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
+<p class="level0">#include &lt;curl/curl.h&gt; 
+<p class="level0">const char *curl_easy_strerror(CURLcode errornum); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">The curl_easy_strerror() function returns a string describing the CURLcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
index 0463528..889e197 100644 (file)
Binary files a/docs/libcurl/curl_easy_strerror.pdf and b/docs/libcurl/curl_easy_strerror.pdf differ
index 3844862..5d1f018 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_easy_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,6 +56,6 @@ p.roffit {
 <p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_unescape.html">curl_unescape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_free(3), RFC 2396</span> <p class="roffit">
+<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_free(3), <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a></span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 11effc7..6c334d1 100644 (file)
Binary files a/docs/libcurl/curl_easy_unescape.pdf and b/docs/libcurl/curl_easy_unescape.pdf differ
index 5990615..75fd51f 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
 .SH NAME
 curl_escape - URL encodes the given string
index 4e1c6ff..6212096 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_escape man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,6 +56,6 @@ p.roffit {
 <p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_unescape.html">curl_unescape (3)</a> <a class="manpage" href="./curl_free.html">  curl_free (3)</a> <span Class="manpage">  RFC 2396</span> <p class="roffit">
+<p class="level0"><a class="manpage" href="./curl_unescape.html">curl_unescape (3)</a> <a class="manpage" href="./curl_free.html">  curl_free (3)</a> <span Class="manpage">  <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a></span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 03e801c..888e53e 100644 (file)
Binary files a/docs/libcurl/curl_escape.pdf and b/docs/libcurl/curl_escape.pdf differ
index 06757ed..f03fe06 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2013, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
 .SH NAME
 curl_formadd - add a section to a multipart/formdata HTTP POST
@@ -12,18 +30,19 @@ curl_formadd - add a section to a multipart/formdata HTTP POST
 .ad
 .SH DESCRIPTION
 curl_formadd() is used to append sections when building a multipart/formdata
-HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at
-a time until you've added all the sections you want included and then you pass
-the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
-\fIlastitem\fP is set after each call and on repeated invokes it should be
-left as set to allow repeated invokes to find the end of the list faster.
+HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
+at a time until you've added all the sections you want included and then you
+pass the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
+\fIlastitem\fP is set after each \fIcurl_formadd(3)\fP call and on repeated
+invokes it should be left as set to allow repeated invokes to find the end of
+the list faster.
 
 After the \fIlastitem\fP pointer follow the real arguments.
 
-The pointers \fI*firstitem\fP and \fI*lastitem\fP should both be pointing to
+The pointers \fIfirstitem\fP and \fIlastitem\fP should both be pointing to
 NULL in the first call to this function. All list-data will be allocated by
-the function itself. You must call \fIcurl_formfree(3)\fP after the form post
-has been done to free the resources.
+the function itself. You must call \fIcurl_formfree(3)\fP on the
+\fIfirstitem\fP after the form post has been done to free the resources.
 
 Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
 You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
index f6557db..8cdfe6d 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_formadd man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -48,9 +50,9 @@ p.roffit {
 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
 <p class="level0"><span Class="bold">CURLFORMcode curl_formadd(struct curl_httppost **  firstitem,</span> <span Class="bold">struct curl_httppost **  lastitem,  ...);</span> 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formadd() is used to append sections when building a multipart/formdata HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at a time until you've added all the sections you want included and then you pass the <span Class="emphasis">firstitem</span> pointer as parameter to <span Class="bold">CURLOPT_HTTPPOST</span>. <span Class="emphasis">lastitem</span> is set after each call and on repeated invokes it should be left as set to allow repeated invokes to find the end of the list faster. 
+<p class="level0">curl_formadd() is used to append sections when building a multipart/formdata HTTP POST (sometimes referred to as <a href="http://www.ietf.org/rfc/rfc2388.txt">RFC 2388</a>-style posts). Append one section at a time until you've added all the sections you want included and then you pass the <span Class="emphasis">firstitem</span> pointer as parameter to <span Class="bold">CURLOPT_HTTPPOST</span>. <span Class="emphasis">lastitem</span> is set after each <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> call and on repeated invokes it should be left as set to allow repeated invokes to find the end of the list faster. 
 <p class="level0">After the <span Class="emphasis">lastitem</span> pointer follow the real arguments. 
-<p class="level0">The pointers <span Class="emphasis">*firstitem</span> and <span Class="emphasis">*lastitem</span> should both be pointing to NULL in the first call to this function. All list-data will be allocated by the function itself. You must call <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a> after the form post has been done to free the resources. 
+<p class="level0">The pointers <span Class="emphasis">firstitem</span> and <span Class="emphasis">lastitem</span> should both be pointing to NULL in the first call to this function. All list-data will be allocated by the function itself. You must call <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a> on the <span Class="emphasis">firstitem</span> after the form post has been done to free the resources. 
 <p class="level0">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <span Class="emphasis">CURLOPT_HTTPHEADER</span> as usual. 
 <p class="level0">First, there are some basics you need to understand about multipart/formdata posts. Each part consists of at least a NAME and a CONTENTS part. If the part is made for file upload, there are also a stored CONTENT-TYPE and a FILENAME. Below, we'll discuss what options you use to set these properties in the parts you want to add to your post. 
 <p class="level0">The options listed first are for making normal parts. The options from <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a> through <a class="emphasis" href="#CURLFORMBUFFERLENGTH">CURLFORM_BUFFERLENGTH</a> are for file upload parts. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
index d406931..3e7ac97 100644 (file)
Binary files a/docs/libcurl/curl_formadd.pdf and b/docs/libcurl/curl_formadd.pdf differ
index 2fba295..7438a16 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
 .SH NAME
 curl_formfree - free a previously build multipart/formdata HTTP POST chain
@@ -13,6 +31,13 @@ curl_formfree - free a previously build multipart/formdata HTTP POST chain
 curl_formfree() is used to clean up data previously built/appended with
 \fIcurl_formadd(3)\fP. This must be called when the data has been used, which
 typically means after \fIcurl_easy_perform(3)\fP has been called.
+
+The pointer to free is the same pointer you passed to the
+\fBCURLOPT_HTTPPOST\fP option, which is the \fIfirstitem\fP pointer from the
+\fIcurl_formadd(3)\fP invoke(s).
+
+\fBform\fP is the pointer as returned from a previous call to
+\fIcurl_formadd(3)\fP and may be NULL.
 .SH RETURN VALUE
 None
 .SH "SEE ALSO"
index 73837b0..9ea2c74 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_formfree man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -48,7 +50,9 @@ p.roffit {
 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
 <p class="level0"><span Class="bold">void curl_formfree(struct curl_httppost * form);</span> 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formfree() is used to clean up data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. This must be called when the data has been used, which typically means after <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> has been called. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0">curl_formfree() is used to clean up data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. This must be called when the data has been used, which typically means after <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> has been called. 
+<p class="level0">The pointer to free is the same pointer you passed to the <span Class="bold">CURLOPT_HTTPPOST</span> option, which is the <span Class="emphasis">firstitem</span> pointer from the <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> invoke(s). 
+<p class="level0"><span Class="bold">form</span> is the pointer as returned from a previous call to <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> and may be NULL. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index da460c0..8ad71fe 100644 (file)
Binary files a/docs/libcurl/curl_formfree.pdf and b/docs/libcurl/curl_formfree.pdf differ
index b0dd8fe..b526221 100644 (file)
@@ -1,28 +1,49 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
 .SH NAME
 curl_formget - serialize a previously built multipart/formdata HTTP POST chain
 .SH SYNOPSIS
+.nf
 .B #include <curl/curl.h>
-.sp
-.BI "void curl_formget(struct curl_httppost *" form, " void *" arg,
-.BI " curl_formget_callback " append ");"
-.ad
+
+void curl_formget(struct curl_httppost * form, void *userp,
+                  curl_formget_callback append );
 .SH DESCRIPTION
 curl_formget() is used to serialize data previously built/appended with
-\fIcurl_formadd(3)\fP. Accepts a void pointer as second argument which will be
-passed to the curl_formget_callback function.
+\fIcurl_formadd(3)\fP. Accepts a void pointer as second argument named
+\fIuserp\fP which will be passed as the first argument to the
+curl_formget_callback function.
 
-.BI "typedef size_t (*curl_formget_callback)(void *" arg, " const char *" buf,
+.BI "typedef size_t (*curl_formget_callback)(void *" userp, " const char *" buf,
 .BI " size_t " len ");"
-.nf
 
 The curl_formget_callback will be executed for each part of the HTTP POST
-chain. The void *arg pointer will be the one passed as second argument to
-curl_formget(). The character buffer passed to it must not be freed. The
+chain. The character buffer passed to the callback must not be freed. The
 callback should return the buffer length passed to it on success.
+
+If the \fBCURLFORM_STREAM\fP option is used in the formpost, it will prevent
+\fIcurl_formget(3)\fP from working until you've performed the actual HTTP
+request as only then will libcurl get the actual read callback to use!
 .SH RETURN VALUE
 0 means everything was ok, non-zero means an error occurred
 .SH EXAMPLE
@@ -34,6 +55,7 @@ callback should return the buffer length passed to it on success.
    (*(size_t *) arg) += len;
    return len;
  }
+
  size_t print_httppost(struct curl_httppost *post)
  {
    size_t total_size = 0;
index 0564f61..e5b4b29 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_formget man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -45,17 +47,16 @@ p.roffit {
 
 <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
 <p class="level0">curl_formget - serialize a previously built multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
+<p class="level0"><pre>
 <p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
-<p class="level0"><span Class="bold">void curl_formget(struct curl_httppost * form,  void * arg,</span> <span Class="bold"> curl_formget_callback  append );</span> 
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formget() is used to serialize data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Accepts a void pointer as second argument which will be passed to the curl_formget_callback function. 
-<p class="level0"><span Class="bold">typedef size_t (*curl_formget_callback)(void * arg,  const char * buf,</span> <span Class="bold"> size_t  len );</span> <pre>
-<p class="level0"><p class="level0">The curl_formget_callback will be executed for each part of the HTTP POST
- chain. The void *arg pointer will be the one passed as second argument to
- curl_formget(). The character buffer passed to it must not be freed. The
- callback should return the buffer length passed to it on success.
+<p class="level0">void curl_formget(struct curl_httppost * form, void *userp,
+ &nbsp;                 curl_formget_callback append );
  </pre>
-<a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
+<p class="level0">curl_formget() is used to serialize data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Accepts a void pointer as second argument named <span Class="emphasis">userp</span> which will be passed as the first argument to the curl_formget_callback function. 
+<p class="level0"><span Class="bold">typedef size_t (*curl_formget_callback)(void * userp,  const char * buf,</span> <span Class="bold"> size_t  len );</span> 
+<p class="level0">The curl_formget_callback will be executed for each part of the HTTP POST chain. The character buffer passed to the callback must not be freed. The callback should return the buffer length passed to it on success. 
+<p class="level0">If the <span Class="bold">CURLFORM_STREAM</span> option is used in the formpost, it will prevent <a class="emphasis" href="./curl_formget.html">curl_formget(3)</a> from working until you've performed the actual HTTP request as only then will libcurl get the actual read callback to use! <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">0 means everything was ok, non-zero means an error occurred <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
 <p class="level0"><pre>
 <p class="level0"><p class="level0">&nbsp;size_t print_httppost_callback(void *arg, const char *buf, size_t len)
@@ -64,7 +65,7 @@ p.roffit {
  &nbsp;  (*(size_t *) arg) += len;
  &nbsp;  return len;
  &nbsp;}
- &nbsp;size_t print_httppost(struct curl_httppost *post)
<p class="level0">&nbsp;size_t print_httppost(struct curl_httppost *post)
  &nbsp;{
  &nbsp;  size_t total_size = 0;
  &nbsp;  if(curl_formget(post, &total_size, print_httppost_callback)) {
index a810f8c..ccf6e8e 100644 (file)
Binary files a/docs/libcurl/curl_formget.pdf and b/docs/libcurl/curl_formget.pdf differ
index f854693..08ec9b6 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
 .SH NAME
 curl_free - reclaim memory that has been obtained through a libcurl call
index 4bffdc1..7d75c24 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_free man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index a3c5ea0..041e759 100644 (file)
Binary files a/docs/libcurl/curl_free.pdf and b/docs/libcurl/curl_free.pdf differ
index 73cd3ef..65eed9c 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
 .SH NAME
 curl_getdate - Convert a date string to number of seconds since January 1,
index cd1612d..f2ece23 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_getdate man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -83,7 +85,7 @@ p.roffit {
  </pre>
 
 <p class="level0"><a name="STANDARDS"></a><h2 class="nroffsh">STANDARDS</h2>
-<p class="level0">This parser was written to handle date formats specified in RFC 822 (including the update in RFC 1123) using time zone name or time zone delta and RFC 850 (obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the only ones RFC2616 says HTTP applications may use. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0">This parser was written to handle date formats specified in <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a> (including the update in <a href="http://www.ietf.org/rfc/rfc1123.txt">RFC 1123</a>) using time zone name or time zone delta and RFC 850 (obsoleted by <a href="http://www.ietf.org/rfc/rfc1036.txt">RFC 1036</a>) and ANSI C's asctime() format. These formats are the only ones <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> says HTTP applications may use. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">This function returns -1 when it fails to parse the date string. Otherwise it returns the number of seconds as described. 
 <p class="level0">If the year is larger than 2037 on systems with 32 bit time_t, this function will return 0x7fffffff (since that is the largest possible signed 32 bit number). 
 <p class="level0">Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC, January 19, 2038 will work fine. On systems with a 64 bit time_t but with a crippled mktime(), <span Class="emphasis">curl_getdate</span> will return -1 in this case. <a name="REWRITE"></a><h2 class="nroffsh">REWRITE</h2>
index 3222f7f..c683cc0 100644 (file)
Binary files a/docs/libcurl/curl_getdate.pdf and b/docs/libcurl/curl_getdate.pdf differ
index 7413292..3355447 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_getenv - return value for environment name
index be1a007..fcab4e0 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_getenv man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 98e477b..e1f5fb6 100644 (file)
Binary files a/docs/libcurl/curl_getenv.pdf and b/docs/libcurl/curl_getenv.pdf differ
index 9ca11d6..83a54e4 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
 .SH NAME
 curl_global_cleanup - global libcurl cleanup
index ac8cad8..afee7bc 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_global_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 9ea39d8..9a73cf6 100644 (file)
Binary files a/docs/libcurl/curl_global_cleanup.pdf and b/docs/libcurl/curl_global_cleanup.pdf differ
index e732911..8e1cc18 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_global_init - Global libcurl initialisation
@@ -38,7 +56,8 @@ details of how to use this function.
 .SH FLAGS
 .TP 5
 .B CURL_GLOBAL_ALL
-Initialize everything possible. This sets all known bits.
+Initialize everything possible. This sets all known bits except
+\fBCURL_GLOBAL_ACK_EINTR\fP.
 .TP
 .B CURL_GLOBAL_SSL
 Initialize SSL
@@ -48,6 +67,14 @@ Initialize the Win32 socket libraries.
 .TP
 .B CURL_GLOBAL_NOTHING
 Initialise nothing extra. This sets no bit.
+.TP
+.B CURL_GLOBAL_DEFAULT
+A sensible default. It will init both SSL and Win32. Right now, this equals
+the functionality of the \fBCURL_GLOBAL_ALL\fP mask.
+.TP
+.B CURL_GLOBAL_ACK_EINTR
+When this flag is set, curl will acknowledge EINTR condition when connecting
+or when waiting for data.  Otherwise, curl waits until full timeout elapses.
 .SH RETURN VALUE
 If this function returns non-zero, something went wrong and you cannot use the
 other curl functions.
index e54ced3..26a1200 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_global_init man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -55,10 +57,12 @@ p.roffit {
 <p class="level0">See the description in <span Class="bold">libcurl</span>(3) of global environment requirements for details of how to use this function. 
 <p class="level0"><a name="FLAGS"></a><h2 class="nroffsh">FLAGS</h2>
 <p class="level0">
-<p class="level0"><span Class="bold">CURL_GLOBAL_ALL</span> Initialize everything possible. This sets all known bits. 
+<p class="level0"><span Class="bold">CURL_GLOBAL_ALL</span> Initialize everything possible. This sets all known bits except <span Class="bold">CURL_GLOBAL_ACK_EINTR</span>
 <p class="level0"><span Class="bold">CURL_GLOBAL_SSL</span> Initialize SSL 
 <p class="level0"><span Class="bold">CURL_GLOBAL_WIN32</span> Initialize the Win32 socket libraries. 
-<p class="level0"><span Class="bold">CURL_GLOBAL_NOTHING</span> Initialise nothing extra. This sets no bit. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0"><span Class="bold">CURL_GLOBAL_NOTHING</span> Initialise nothing extra. This sets no bit. 
+<p class="level0"><span Class="bold">CURL_GLOBAL_DEFAULT</span> A sensible default. It will init both SSL and Win32. Right now, this equals the functionality of the <span Class="bold">CURL_GLOBAL_ALL</span> mask. 
+<p class="level0"><span Class="bold">CURL_GLOBAL_ACK_EINTR</span> When this flag is set, curl will acknowledge EINTR condition when connecting or when waiting for data.  Otherwise, curl waits until full timeout elapses. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">If this function returns non-zero, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_global_init_mem.html">curl_global_init_mem (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_init.html">curl_easy_init (3) </a> <a class="manpage" href="./libcurl.html">libcurl (3) </a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index 9ec6bb5..989774a 100644 (file)
Binary files a/docs/libcurl/curl_global_init.pdf and b/docs/libcurl/curl_global_init.pdf differ
index 57ae6ae..9cddef7 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
 .SH NAME
 curl_global_init_mem - Global libcurl initialisation with memory callbacks
@@ -34,7 +52,7 @@ To replace strdup()
 .IP "void *calloc_callback(size_t nmemb, size_t size);"
 To replace calloc()
 .SH "CAUTION"
-Manipulating these gives considerable powers to the application to severly
+Manipulating these gives considerable powers to the application to severely
 screw things up for libcurl. Take care!
 .SH "SEE ALSO"
 .BR curl_global_init "(3), "
index 055d9db..eed8fad 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_global_init_mem man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -67,7 +69,7 @@ p.roffit {
 <p class="level1">To replace strdup() 
 <p class="level0"><a name="void"></a><span class="nroffip">void *calloc_callback(size_t nmemb, size_t size);</span> 
 <p class="level1">To replace calloc() <a name="CAUTION"></a><h2 class="nroffsh">CAUTION</h2>
-<p class="level0">Manipulating these gives considerable powers to the application to severly screw things up for libcurl. Take care! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0">Manipulating these gives considerable powers to the application to severely screw things up for libcurl. Take care! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span> 
 <p class="level0"><p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index d5b3544..a9ea24b 100644 (file)
Binary files a/docs/libcurl/curl_global_init_mem.pdf and b/docs/libcurl/curl_global_init_mem.pdf differ
index ade7f65..cbf10e1 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
index 5a16d57..9bc9790 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_printf man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 77b0428..35713e0 100644 (file)
Binary files a/docs/libcurl/curl_mprintf.pdf and b/docs/libcurl/curl_mprintf.pdf differ
index 85f199e..506ea41 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2013, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
 .SH NAME
 curl_multi_add_handle - add an easy handle to a multi session
@@ -9,9 +29,9 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
 .ad
 .SH DESCRIPTION
 Adds a standard easy handle to the multi stack. This function call will make
-this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
-Furthermore, libcurl now initiates the connection associated with the
-specified \fIeasy_handle\fP.
+this \fImulti_handle\fP control the specified \fIeasy_handle\fP.  Furthermore,
+libcurl now initiates the connection associated with the specified
+\fIeasy_handle\fP.
 
 When an easy handle has been added to a multi stack, you can not and you must
 not use \fIcurl_easy_perform(3)\fP on that handle!
@@ -21,6 +41,12 @@ cache (CURLOPT_DNS_USE_GLOBAL_CACHE), it will be made to use the DNS cache
 that is shared between all easy handles within the multi handle when
 \fIcurl_multi_add_handle(3)\fP is called.
 
+If you have CURLMOPT_TIMERFUNCTION set in the multi handle (and you really
+should if you're working event-based with \fIcurl_multi_socket_action(3)\fP
+and friends), that callback will be called from within this function to ask
+for an updated timer so that your main event loop will get the activity on
+this handle to get started.
+
 The easy handle will remain added until you remove it again with
 \fIcurl_multi_remove_handle(3)\fP. You should remove the easy handle from the
 multi stack before you terminate first the easy handle and then the multi
index 75ca271..7652494 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_add_handle man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -48,9 +50,10 @@ p.roffit {
 <p class="level0">#include &lt;curl/curl.h&gt; 
 <p class="level0">CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle); 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Adds a standard easy handle to the multi stack. This function call will make this <span Class="emphasis">multi_handle</span> control the specified <span Class="emphasis">easy_handle</span>. Furthermore, libcurl now initiates the connection associated with the specified <span Class="emphasis">easy_handle</span>. 
+<p class="level0">Adds a standard easy handle to the multi stack. This function call will make this <span Class="emphasis">multi_handle</span> control the specified <span Class="emphasis">easy_handle</span>.  Furthermore, libcurl now initiates the connection associated with the specified <span Class="emphasis">easy_handle</span>. 
 <p class="level0">When an easy handle has been added to a multi stack, you can not and you must not use <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on that handle! 
 <p class="level0">If the easy handle is not set to use a shared (CURLOPT_SHARE) or global DNS cache (CURLOPT_DNS_USE_GLOBAL_CACHE), it will be made to use the DNS cache that is shared between all easy handles within the multi handle when <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> is called. 
+<p class="level0">If you have CURLMOPT_TIMERFUNCTION set in the multi handle (and you really should if you're working event-based with <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> and friends), that callback will be called from within this function to ask for an updated timer so that your main event loop will get the activity on this handle to get started. 
 <p class="level0">The easy handle will remain added until you remove it again with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. You should remove the easy handle from the multi stack before you terminate first the easy handle and then the multi handle: 
 <p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> 
 <p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> 
index 4eb18c3..46a1d17 100644 (file)
Binary files a/docs/libcurl/curl_multi_add_handle.pdf and b/docs/libcurl/curl_multi_add_handle.pdf differ
index 3e15d73..0b580fe 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_assign \- set data to association with an internal socket
index e560218..fc46807 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_assign man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 84b1ad9..a1b05a4 100644 (file)
Binary files a/docs/libcurl/curl_multi_assign.pdf and b/docs/libcurl/curl_multi_assign.pdf differ
index d40173c..50bc8ad 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
 .SH NAME
 curl_multi_cleanup - close down a multi session
@@ -21,6 +41,7 @@ handle is no longer connected to the multi handle
 3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
 removed
 .SH RETURN VALUE
-CURLMcode type, general libcurl multi interface error code.
+CURLMcode type, general libcurl multi interface error code. On success,
+CURLM_OK is returned.
 .SH "SEE ALSO"
 .BR curl_multi_init "(3)," curl_easy_cleanup "(3)," curl_easy_init "(3)"
index 40381fd..f6b9a1c 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -52,7 +54,7 @@ p.roffit {
 <p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> before any easy handles are cleaned up 
 <p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> can now be called independently since the easy handle is no longer connected to the multi handle 
 <p class="level0">3 - <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> should be called when all easy handles are removed <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0">CURLMcode type, general libcurl multi interface error code. On success, CURLM_OK is returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_multi_init.html">curl_multi_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_init.html"> curl_easy_init (3)</a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 88f18d1..0dc13c2 100644 (file)
Binary files a/docs/libcurl/curl_multi_cleanup.pdf and b/docs/libcurl/curl_multi_cleanup.pdf differ
index 7928105..3dbdc45 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_fdset - extracts file descriptor information from a multi handle
@@ -20,19 +40,28 @@ but be sure to FD_ZERO them before calling this function as
 otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be
 called as soon as one of them is ready to be read from or written to.
 
-To be sure to have up-to-date results, you should call
-\fIcurl_multi_perform\fP until it does not return CURLM_CALL_MULTI_PERFORM
-prior to calling \fIcurl_multi_fdset\fP.  This will make sure that libcurl has
-updated the handles' socket states.
-
 If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
 this function returns. Otherwise it will contain the higher descriptor number
-libcurl set.
+libcurl set. When libcurl returns -1 in \fImax_fd\fP, it is because libcurl
+currently does something that isn't possible for your application to monitor
+with a socket and unfortunately you can then not know exactly when the current
+action is completed using select(). When max_fd returns with -1, you need to
+wait a while and then proceed and call \fIcurl_multi_perform\fP anyway. How
+long to wait? I would suggest 100 milliseconds at least, but you may want to
+test it out in your own particular conditions to find a suitable value.
 
 When doing select(), you should use \fBcurl_multi_timeout\fP to figure out how
 long to wait for action. Call \fIcurl_multi_perform\fP even if no activity has
 been seen on the fd_sets after the timeout expires as otherwise internal
 retries and timeouts may not work as you'd think and want.
+
+If one of the sockets used by libcurl happens to be larger than what can be
+set in an fd_set, which on POSIX systems means that the file descriptor is
+larger than FD_SETSIZE, then libcurl will try to not set it. Setting a too
+large file descriptor in an fd_set implies an out of bounds write which can
+cause crashes, or worse. The effect of NOT storing it will possibly save you
+from the crash, but will make your program NOT wait for sockets it should wait
+for...
 .SH RETURN VALUE
 CURLMcode type, general libcurl multi interface error code. See
 \fIlibcurl-errors(3)\fP
index 51e444c..2f0e169 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_fdset man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -55,9 +57,9 @@ p.roffit {
  <p class="level0"></pre>
 <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">This function extracts file descriptor information from a given multi_handle. libcurl returns its fd_set sets. The application can use these to select() on, but be sure to FD_ZERO them before calling this function as <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> only adds its own descriptors, it doesn't zero or otherwise remove any others. The <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> function should be called as soon as one of them is ready to be read from or written to. 
-<p class="level0">To be sure to have up-to-date results, you should call <span Class="emphasis">curl_multi_perform</span> until it does not return CURLM_CALL_MULTI_PERFORM prior to calling <span Class="emphasis">curl_multi_fdset</span>.  This will make sure that libcurl has updated the handles' socket states
-<p class="level0">If no file descriptors are set by libcurl, <span Class="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set. 
-<p class="level0">When doing select(), you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. Call <span Class="emphasis">curl_multi_perform</span> even if no activity has been seen on the fd_sets after the timeout expires as otherwise internal retries and timeouts may not work as you'd think and want. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0">If no file descriptors are set by libcurl, <span Class="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set. When libcurl returns -1 in <span Class="emphasis">max_fd</span>, it is because libcurl currently does something that isn't possible for your application to monitor with a socket and unfortunately you can then not know exactly when the current action is completed using select(). When max_fd returns with -1, you need to wait a while and then proceed and call <span Class="emphasis">curl_multi_perform</span> anyway. How long to wait? I would suggest 100 milliseconds at least, but you may want to test it out in your own particular conditions to find a suitable value
+<p class="level0">When doing select(), you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. Call <span Class="emphasis">curl_multi_perform</span> even if no activity has been seen on the fd_sets after the timeout expires as otherwise internal retries and timeouts may not work as you'd think and want. 
+<p class="level0">If one of the sockets used by libcurl happens to be larger than what can be set in an fd_set, which on POSIX systems means that the file descriptor is larger than FD_SETSIZE, then libcurl will try to not set it. Setting a too large file descriptor in an fd_set implies an out of bounds write which can cause crashes, or worse. The effect of NOT storing it will possibly save you from the crash, but will make your program NOT wait for sockets it should wait for... <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">CURLMcode type, general libcurl multi interface error code. See <span Class="emphasis">libcurl-errors(3)</span> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html">  curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_timeout.html">curl_multi_timeout (3)</a> <a class="manpage" href="./curl_multi_perform.html">  curl_multi_perform (3) </a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index df1efa2..c9e63f3 100644 (file)
Binary files a/docs/libcurl/curl_multi_fdset.pdf and b/docs/libcurl/curl_multi_fdset.pdf differ
index 9ff08e7..8751764 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
 .SH NAME
 curl_multi_info_read - read multi stack informationals
index 2f53e6d..2e91fae 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_info_read man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index bccf106..1156c7c 100644 (file)
Binary files a/docs/libcurl/curl_multi_info_read.pdf and b/docs/libcurl/curl_multi_info_read.pdf differ
index 0ac298e..ca9374e 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
 .SH NAME
 curl_multi_init - create a multi handle
index cf9b304..f1c7086 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_init man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index a353301..780c16c 100644 (file)
Binary files a/docs/libcurl/curl_multi_init.pdf and b/docs/libcurl/curl_multi_init.pdf differ
index ede2390..304197b 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
 .SH NAME
 curl_multi_perform - reads/writes available data from each easy handle
@@ -8,21 +28,24 @@ curl_multi_perform - reads/writes available data from each easy handle
 CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
 .ad
 .SH DESCRIPTION
-When the app thinks there's data available for the multi_handle, it should
-call this function to read/write whatever there is to read or write right
-now. curl_multi_perform() returns as soon as the reads/writes are done. This
+This function handles transfers on all the added handles that need attention
+in an non-blocking fashion.
+
+When an application has found out there's data available for the multi_handle
+or a timeout has elapsed, the application should call this function to
+read/write whatever there is to read or write right now etc.
+curl_multi_perform() returns as soon as the reads/writes are done. This
 function does not require that there actually is any data available for
 reading or that data can be written, it can be called just in case. It will
 write the number of handles that still transfer data in the second argument's
 integer-pointer.
 
-When you call curl_multi_perform() and the amount of \fIrunning_handles\fP is
-changed from the previous call (or is less than the amount of easy handles
-you've added to the multi handle), you know that there is one or more
-transfers less "running". You can then call \fIcurl_multi_info_read(3)\fP to
-get information about each individual completed transfer, and that returned
-info includes CURLcode and more. If an added handle fails very quickly, it may
-never be counted as a running_handle.
+If the amount of \fIrunning_handles\fP is changed from the previous call (or
+is less than the amount of easy handles you've added to the multi handle), you
+know that there is one or more transfers less "running". You can then call
+\fIcurl_multi_info_read(3)\fP to get information about each individual
+completed transfer, and that returned info includes CURLcode and more. If an
+added handle fails very quickly, it may never be counted as a running_handle.
 
 When \fIrunning_handles\fP is set to zero (0) on the return of this function,
 there is no longer any transfers in progress.
@@ -41,12 +64,14 @@ need to wait for \&"action" and then call this function again.
 
 This function only returns errors etc regarding the whole multi stack.
 Problems still might have occurred on individual transfers even when this
-function returns \fICURLM_OK\fP.
+function returns \fICURLM_OK\fP. Use \fIcurl_multi_info_read(3)\fP to figure
+out how individual transfers did.
 .SH "TYPICAL USAGE"
 Most applications will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
-file descriptors, then it'll wait for action on them using \fBselect(3)\fP and
-as soon as one or more of them are ready, \fIcurl_multi_perform(3)\fP gets
-called.
+file descriptors, and \fIcurl_multi_timeout(3)\fP to get a suitable timeout
+period, then it'll wait for action on the file descriptors using
+\fBselect(3)\fP. As soon as one or more file descriptor is ready,
+\fIcurl_multi_perform(3)\fP gets called.
 .SH "SEE ALSO"
 .BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
 .BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
index 46fc226..832d928 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_perform man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -48,13 +50,14 @@ p.roffit {
 <p class="level0">#include &lt;curl/curl.h&gt; 
 <p class="level0">CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles); 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the app thinks there's data available for the multi_handle, it should call this function to read/write whatever there is to read or write right now. curl_multi_perform() returns as soon as the reads/writes are done. This function does not require that there actually is any data available for reading or that data can be written, it can be called just in case. It will write the number of handles that still transfer data in the second argument's integer-pointer. 
-<p class="level0">When you call curl_multi_perform() and the amount of <span Class="emphasis">running_handles</span> is changed from the previous call (or is less than the amount of easy handles you've added to the multi handle), you know that there is one or more transfers less "running". You can then call <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to get information about each individual completed transfer, and that returned info includes CURLcode and more. If an added handle fails very quickly, it may never be counted as a running_handle. 
+<p class="level0">This function handles transfers on all the added handles that need attention in an non-blocking fashion. 
+<p class="level0">When an application has found out there's data available for the multi_handle or a timeout has elapsed, the application should call this function to read/write whatever there is to read or write right now etc. curl_multi_perform() returns as soon as the reads/writes are done. This function does not require that there actually is any data available for reading or that data can be written, it can be called just in case. It will write the number of handles that still transfer data in the second argument's integer-pointer. 
+<p class="level0">If the amount of <span Class="emphasis">running_handles</span> is changed from the previous call (or is less than the amount of easy handles you've added to the multi handle), you know that there is one or more transfers less "running". You can then call <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to get information about each individual completed transfer, and that returned info includes CURLcode and more. If an added handle fails very quickly, it may never be counted as a running_handle. 
 <p class="level0">When <span Class="emphasis">running_handles</span> is set to zero (0) on the return of this function, there is no longer any transfers in progress. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">CURLMcode type, general libcurl multi interface error code. 
 <p class="level0">Before version 7.20.0: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <span Class="emphasis">curl_multi_perform</span> 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". Do note that <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> will return <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span> only when it wants to be called again <span Class="bold">immediately</span>. When things are fine and there is nothing immediate it wants done, it'll return <span Class="emphasis">CURLM_OK</span> and you need to wait for "action" and then call this function again. 
-<p class="level0">This function only returns errors etc regarding the whole multi stack. Problems still might have occurred on individual transfers even when this function returns <span Class="emphasis">CURLM_OK</span>. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">Most applications will use <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> to get the multi_handle's file descriptors, then it'll wait for action on them using <span Class="bold">select(3)</span> and as soon as one or more of them are ready, <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> gets called. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0">This function only returns errors etc regarding the whole multi stack. Problems still might have occurred on individual transfers even when this function returns <span Class="emphasis">CURLM_OK</span>. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out how individual transfers did. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
+<p class="level0">Most applications will use <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> to get the multi_handle's file descriptors, and <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> to get a suitable timeout period, then it'll wait for action on the file descriptors using <span Class="bold">select(3)</span>. As soon as one or more file descriptor is ready, <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> gets called. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html">  curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html">  curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">libcurl-errors (3)</span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 13ed106..6257e39 100644 (file)
Binary files a/docs/libcurl/curl_multi_perform.pdf and b/docs/libcurl/curl_multi_perform.pdf differ
index efecb10..ad6d2ba 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl Manual"
 .SH NAME
 curl_multi_remove_handle - remove an easy handle from a multi session
index 15bd02b..fb4c499 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_remove_handle man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 7e0591a..6d84a5b 100644 (file)
Binary files a/docs/libcurl/curl_multi_remove_handle.pdf and b/docs/libcurl/curl_multi_remove_handle.pdf differ
index a1cbb70..99984cf 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_setopt \- set options for a curl multi handle
@@ -29,7 +49,7 @@ argument with \fICURLMOPT_SOCKETDATA\fP.  See \fIcurl_multi_socket(3)\fP for
 more callback details.
 .IP CURLMOPT_SOCKETDATA
 Pass a pointer to whatever you want passed to the \fBcurl_socket_callback\fP's
-forth argument, the userp pointer. This is not used by libcurl but only
+fourth argument, the userp pointer. This is not used by libcurl but only
 passed-thru as-is. Set the callback pointer with
 \fICURLMOPT_SOCKETFUNCTION\fP.
 .IP CURLMOPT_PIPELINING
@@ -41,14 +61,17 @@ on the same connection rather than being executed in parallel. (Added in
 7.16.0)
 .IP CURLMOPT_TIMERFUNCTION
 Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP
-prototype.  This function will then be called when the timeout value
+prototype: int curl_multi_timer_callback(CURLM *multi /* multi handle */,
+long timeout_ms /* timeout in milliseconds */, void *userp /* TIMERDATA */).
+This function will then be called when the timeout value
 changes. The timeout value is at what latest time the application should call
 one of the \&"performing" functions of the multi interface
 (\fIcurl_multi_socket_action(3)\fP and \fIcurl_multi_perform(3)\fP) - to allow
 libcurl to keep timeouts and retries etc to work. A timeout value of -1 means
 that there is no timeout at all, and 0 means that the timeout is already
 reached. Libcurl attempts to limit calling this only when the fixed future
-timeout time actually changes. See also \fICURLMOPT_TIMERDATA\fP. This
+timeout time actually changes. See also \fICURLMOPT_TIMERDATA\fP. The callback
+should return 0 on success, and -1 on error. This
 callback can be used instead of, or in addition to,
 \fIcurl_multi_timeout(3)\fP. (Added in 7.16.0)
 .IP CURLMOPT_TIMERDATA
@@ -72,6 +95,112 @@ This option is for the multi handle's use only, when using the easy interface
 you should instead use the \fICURLOPT_MAXCONNECTS\fP option.
 
 (Added in 7.16.3)
+.IP CURLMOPT_MAX_HOST_CONNECTIONS
+Pass a long. The set number will be used as the maximum amount of
+simultaneously open connections to a single host. For each new session to
+a host, libcurl will open a new connection up to the limit set by
+CURLMOPT_MAX_HOST_CONNECTIONS. When the limit is reached, the sessions will
+be pending until there are available connections. If CURLMOPT_PIPELINING is
+1, libcurl will try to pipeline if the host is capable of it.
+
+The default value is 0, which means that there is no limit.
+However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING
+is 1 will not be treated as unlimited. Instead it will open only 1 connection
+and try to pipeline on it.
+
+(Added in 7.30.0)
+.IP CURLMOPT_MAX_PIPELINE_LENGTH
+Pass a long. The set number will be used as the maximum amount of requests
+in a pipelined connection. When this limit is reached, libcurl will use another
+connection to the same host (see CURLMOPT_MAX_HOST_CONNECTIONS), or queue the
+requests until one of the pipelines to the host is ready to accept a request.
+Thus, the total number of requests in-flight is CURLMOPT_MAX_HOST_CONNECTIONS *
+CURLMOPT_MAX_PIPELINE_LENGTH.
+The default value is 5.
+
+(Added in 7.30.0)
+.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
+Pass a long. If a pipelined connection is currently processing a request
+with a Content-Length larger than CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, that
+connection will not be considered for additional requests, even if it is
+shorter than CURLMOPT_MAX_PIPELINE_LENGTH.
+The default value is 0, which means that the penalization is inactive.
+
+(Added in 7.30.0)
+.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
+Pass a long. If a pipelined connection is currently processing a
+chunked (Transfer-encoding: chunked) request with a current chunk length
+larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, that connection will not be
+considered for additional requests, even if it is shorter than
+CURLMOPT_MAX_PIPELINE_LENGTH.
+The default value is 0, which means that the penalization is inactive.
+
+(Added in 7.30.0)
+.IP CURLMOPT_PIPELINING_SITE_BL
+Pass an array of char *, ending with NULL. This is a list of sites that are
+blacklisted from pipelining, i.e sites that are known to not support HTTP
+pipelining. The array is copied by libcurl.
+
+The default value is NULL, which means that there is no blacklist.
+
+Pass a NULL pointer to clear the blacklist.
+
+Example:
+
+.nf
+  site_blacklist[] =
+  {
+    "www.haxx.se",
+    "www.example.com:1234",
+    NULL
+  };
+
+  curl_multi_setopt(m, CURLMOPT_PIPELINE_SITE_BL, site_blacklist);
+.fi
+
+(Added in 7.30.0)
+.IP CURLMOPT_PIPELINING_SERVER_BL
+Pass an array of char *, ending with NULL. This is a list of server types
+prefixes (in the Server: HTTP header) that are blacklisted from pipelining,
+i.e server types that are known to not support HTTP pipelining. The array is
+copied by libcurl.
+
+Note that the comparison matches if the Server: header begins with the string
+in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can 
+both be blacklisted by having "Ninja" in the backlist.
+
+The default value is NULL, which means that there is no blacklist.
+
+Pass a NULL pointer to clear the blacklist.
+
+Example:
+
+.nf
+  server_blacklist[] =
+  {
+    "Microsoft-IIS/6.0",
+    "nginx/0.8.54",
+    NULL
+  };
+
+  curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist);
+.fi
+
+(Added in 7.30.0)
+.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
+Pass a long. The set number will be used as the maximum amount of
+simultaneously open connections in total. For each new session, libcurl
+will open a new connection up to the limit set by
+CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the sessions will
+be pending until there are available connections. If CURLMOPT_PIPELINING is
+1, libcurl will try to pipeline if the host is capable of it.
+
+The default value is 0, which means that there is no limit.
+However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING
+is 1 will not be treated as unlimited. Instead it will open only 1 connection
+and try to pipeline on it.
+
+(Added in 7.30.0)
 .SH RETURNS
 The standard CURLMcode for multi interface error codes. Note that it returns a
 CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
index 1e67582..b95192b 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -53,11 +55,11 @@ p.roffit {
 <p class="level0"><a name="CURLMOPTSOCKETFUNCTION"></a><span class="nroffip">CURLMOPT_SOCKETFUNCTION</span> 
 <p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_socket_callback</span> prototype. The <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function informs the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the curl_socket_callback given in the <span Class="bold">param</span> argument. They update the status with changes since the previous time a <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> function was called. If the given callback pointer is NULL, no callback will be called. Set the callback's <span Class="bold">userp</span> argument with <a class="emphasis" href="#CURLMOPTSOCKETDATA">CURLMOPT_SOCKETDATA</a>.  See <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> for more callback details. 
 <p class="level0"><a name="CURLMOPTSOCKETDATA"></a><span class="nroffip">CURLMOPT_SOCKETDATA</span> 
-<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_socket_callback</span>'s forth argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTSOCKETFUNCTION">CURLMOPT_SOCKETFUNCTION</a>. 
+<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_socket_callback</span>'s fourth argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTSOCKETFUNCTION">CURLMOPT_SOCKETFUNCTION</a>. 
 <p class="level0"><a name="CURLMOPTPIPELINING"></a><span class="nroffip">CURLMOPT_PIPELINING</span> 
 <p class="level1">Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi handle will make it attempt to perform HTTP Pipelining as far as possible for transfers using this handle. This means that if you add a second request that can use an already existing connection, the second request will be "piped" on the same connection rather than being executed in parallel. (Added in 7.16.0) 
 <p class="level0"><a name="CURLMOPTTIMERFUNCTION"></a><span class="nroffip">CURLMOPT_TIMERFUNCTION</span> 
-<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_multi_timer_callback</span> prototype.  This function will then be called when the timeout value changes. The timeout value is at what latest time the application should call one of the "performing" functions of the multi interface (<a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> and <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) - to allow libcurl to keep timeouts and retries etc to work. A timeout value of -1 means that there is no timeout at all, and 0 means that the timeout is already reached. Libcurl attempts to limit calling this only when the fixed future timeout time actually changes. See also <a class="emphasis" href="#CURLMOPTTIMERDATA">CURLMOPT_TIMERDATA</a>. This callback can be used instead of, or in addition to, <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>. (Added in 7.16.0) 
+<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_multi_timer_callback</span> prototype: int curl_multi_timer_callback(CURLM *multi /* multi handle */, long timeout_ms /* timeout in milliseconds */, void *userp /* TIMERDATA */). This function will then be called when the timeout value changes. The timeout value is at what latest time the application should call one of the "performing" functions of the multi interface (<a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> and <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) - to allow libcurl to keep timeouts and retries etc to work. A timeout value of -1 means that there is no timeout at all, and 0 means that the timeout is already reached. Libcurl attempts to limit calling this only when the fixed future timeout time actually changes. See also <a class="emphasis" href="#CURLMOPTTIMERDATA">CURLMOPT_TIMERDATA</a>. The callback should return 0 on success, and -1 on error. This callback can be used instead of, or in addition to, <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>. (Added in 7.16.0) 
 <p class="level0"><a name="CURLMOPTTIMERDATA"></a><span class="nroffip">CURLMOPT_TIMERDATA</span> 
 <p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_multi_timer_callback</span>'s third argument, the userp pointer.  This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTTIMERFUNCTION">CURLMOPT_TIMERFUNCTION</a>. (Added in 7.16.0) 
 <p class="level0"><a name="CURLMOPTMAXCONNECTS"></a><span class="nroffip">CURLMOPT_MAXCONNECTS</span> 
@@ -65,7 +67,59 @@ p.roffit {
 <p class="level1">By setting this option, you can prevent the cache size from growing beyond the limit set by you. 
 <p class="level1">When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing. 
 <p class="level1">This option is for the multi handle's use only, when using the easy interface you should instead use the <span Class="emphasis">CURLOPT_MAXCONNECTS</span> option. 
-<p class="level1">(Added in 7.16.3) <a name="RETURNS"></a><h2 class="nroffsh">RETURNS</h2>
+<p class="level1">(Added in 7.16.3) 
+<p class="level0"><a name="CURLMOPTMAXHOSTCONNECTIONS"></a><span class="nroffip">CURLMOPT_MAX_HOST_CONNECTIONS</span> 
+<p class="level1">Pass a long. The set number will be used as the maximum amount of simultaneously open connections to a single host. For each new session to a host, libcurl will open a new connection up to the limit set by CURLMOPT_MAX_HOST_CONNECTIONS. When the limit is reached, the sessions will be pending until there are available connections. If CURLMOPT_PIPELINING is 1, libcurl will try to pipeline if the host is capable of it. 
+<p class="level1">The default value is 0, which means that there is no limit. However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING is 1 will not be treated as unlimited. Instead it will open only 1 connection and try to pipeline on it. 
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTMAXPIPELINELENGTH"></a><span class="nroffip">CURLMOPT_MAX_PIPELINE_LENGTH</span> 
+<p class="level1">Pass a long. The set number will be used as the maximum amount of requests in a pipelined connection. When this limit is reached, libcurl will use another connection to the same host (see CURLMOPT_MAX_HOST_CONNECTIONS), or queue the requests until one of the pipelines to the host is ready to accept a request. Thus, the total number of requests in-flight is CURLMOPT_MAX_HOST_CONNECTIONS * CURLMOPT_MAX_PIPELINE_LENGTH. The default value is 5. 
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTCONTENTLENGTHPENALTYSIZE"></a><span class="nroffip">CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</span> 
+<p class="level1">Pass a long. If a pipelined connection is currently processing a request with a Content-Length larger than CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, that connection will not be considered for additional requests, even if it is shorter than CURLMOPT_MAX_PIPELINE_LENGTH. The default value is 0, which means that the penalization is inactive. 
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTCHUNKLENGTHPENALTYSIZE"></a><span class="nroffip">CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</span> 
+<p class="level1">Pass a long. If a pipelined connection is currently processing a chunked (Transfer-encoding: chunked) request with a current chunk length larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, that connection will not be considered for additional requests, even if it is shorter than CURLMOPT_MAX_PIPELINE_LENGTH. The default value is 0, which means that the penalization is inactive. 
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTPIPELININGSITEBL"></a><span class="nroffip">CURLMOPT_PIPELINING_SITE_BL</span> 
+<p class="level1">Pass an array of char *, ending with NULL. This is a list of sites that are blacklisted from pipelining, i.e sites that are known to not support HTTP pipelining. The array is copied by libcurl. 
+<p class="level1">The default value is NULL, which means that there is no blacklist. 
+<p class="level1">Pass a NULL pointer to clear the blacklist. 
+<p class="level1">Example: 
+<p class="level1"><pre>
+<p class="level1">&nbsp; site_blacklist[] =
+ &nbsp; {
+ &nbsp;   "www.haxx.se",
+ &nbsp;   "www.example.com:1234",
+ &nbsp;   NULL
+ &nbsp; };
+ <p class="level1">&nbsp; curl_multi_setopt(m, CURLMOPT_PIPELINE_SITE_BL, site_blacklist);
+ </pre>
+
+<p class="level1">
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTPIPELININGSERVERBL"></a><span class="nroffip">CURLMOPT_PIPELINING_SERVER_BL</span> 
+<p class="level1">Pass an array of char *, ending with NULL. This is a list of server types prefixes (in the Server: HTTP header) that are blacklisted from pipelining, i.e server types that are known to not support HTTP pipelining. The array is copied by libcurl. 
+<p class="level1">Note that the comparison matches if the Server: header begins with the string in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can  both be blacklisted by having "Ninja" in the backlist. 
+<p class="level1">The default value is NULL, which means that there is no blacklist. 
+<p class="level1">Pass a NULL pointer to clear the blacklist. 
+<p class="level1">Example: 
+<p class="level1"><pre>
+<p class="level1">&nbsp; server_blacklist[] =
+ &nbsp; {
+ &nbsp;   "Microsoft-IIS/6.0",
+ &nbsp;   "nginx/0.8.54",
+ &nbsp;   NULL
+ &nbsp; };
+ <p class="level1">&nbsp; curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist);
+ </pre>
+
+<p class="level1">
+<p class="level1">(Added in 7.30.0) 
+<p class="level0"><a name="CURLMOPTMAXTOTALCONNECTIONS"></a><span class="nroffip">CURLMOPT_MAX_TOTAL_CONNECTIONS</span> 
+<p class="level1">Pass a long. The set number will be used as the maximum amount of simultaneously open connections in total. For each new session, libcurl will open a new connection up to the limit set by CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the sessions will be pending until there are available connections. If CURLMOPT_PIPELINING is 1, libcurl will try to pipeline if the host is capable of it. 
+<p class="level1">The default value is 0, which means that there is no limit. However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING is 1 will not be treated as unlimited. Instead it will open only 1 connection and try to pipeline on it. 
+<p class="level1">(Added in 7.30.0) <a name="RETURNS"></a><h2 class="nroffsh">RETURNS</h2>
 <p class="level0">The standard CURLMcode for multi interface error codes. Note that it returns a CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl doesn't know of. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">This function was added in libcurl 7.15.4. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html">  curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_socket.html">curl_multi_socket (3)</a> <a class="manpage" href="./curl_multi_info_read.html">  curl_multi_info_read (3)</a> <p class="roffit">
index 0b354a7..37e3279 100644 (file)
Binary files a/docs/libcurl/curl_multi_setopt.pdf and b/docs/libcurl/curl_multi_setopt.pdf differ
index 18b571c..6b262f2 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_socket 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_socket \- reads/writes available data
index 72d803f..2e92236 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_socket man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 5e93029..277295d 100644 (file)
Binary files a/docs/libcurl/curl_multi_socket.pdf and b/docs/libcurl/curl_multi_socket.pdf differ
index 94e6f10..45b6105 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_socket_action \- reads/writes available data given an action
@@ -18,7 +38,9 @@ can be passed as an events bitmask \fBev_bitmask\fP by first setting
 \fBev_bitmask\fP to 0, and then adding using bitwise OR (|) any combination of
 events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or
 CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and
-libcurl will test the descriptor internally.
+libcurl will test the descriptor internally. It is also permissible to pass
+CURL_SOCKET_TIMEOUT to the \fBsockfd\fP parameter in order to initiate the
+whole process or when a timeout occurs.
 
 At return, the integer \fBrunning_handles\fP points to will contain the number
 of running easy handles within the multi handle. When this number reaches
@@ -51,7 +73,10 @@ The socket \fBcallback\fP function uses a prototype like this
                            curl_socket_t s, /* socket */
                            int action,      /* see values below */
                            void *userp,    /* private callback pointer */
-                           void *socketp); /* private socket pointer */
+                           void *socketp); /* private socket pointer,
+                                              \fBNULL\fP if not
+                                              previously assigned with
+                                              \fBcurl_multi_assign(3)\fP */
 
 .fi
 The callback MUST return 0.
@@ -112,15 +137,15 @@ timeout value to use when waiting for socket activities.
 them for activity. This can be done through your application code, or by way
 of an external library such as libevent or glib.
 
-6. Call curl_multi_socket_action() to kickstart everything. To get one or more
-callbacks called.
+6. Call curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...)
+to kickstart everything. To get one or more callbacks called.
 
 7. Wait for activity on any of libcurl's sockets, use the timeout value your
-callback has been told
+callback has been told.
 
 8, When activity is detected, call curl_multi_socket_action() for the
 socket(s) that got action. If no activity is detected and the timeout expires,
-call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
+call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP.
 .SH AVAILABILITY
 This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
 .SH "SEE ALSO"
index eee2bde..626f6f1 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_socket_action man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -53,7 +55,7 @@ p.roffit {
  </pre>
 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the application has detected action on a socket handled by libcurl, it should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with the <span Class="bold">sockfd</span> argument set to the socket with the action. When the events on a socket are known, they can be passed as an events bitmask <span Class="bold">ev_bitmask</span> by first setting <span Class="bold">ev_bitmask</span> to 0, and then adding using bitwise OR (|) any combination of events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and libcurl will test the descriptor internally. 
+<p class="level0">When the application has detected action on a socket handled by libcurl, it should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with the <span Class="bold">sockfd</span> argument set to the socket with the action. When the events on a socket are known, they can be passed as an events bitmask <span Class="bold">ev_bitmask</span> by first setting <span Class="bold">ev_bitmask</span> to 0, and then adding using bitwise OR (|) any combination of events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and libcurl will test the descriptor internally. It is also permissible to pass CURL_SOCKET_TIMEOUT to the <span Class="bold">sockfd</span> parameter in order to initiate the whole process or when a timeout occurs. 
 <p class="level0">At return, the integer <span Class="bold">running_handles</span> points to will contain the number of running easy handles within the multi handle. When this number reaches zero, all transfers are complete/done. When you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> on a specific socket and the counter decreases by one, it DOES NOT necessarily mean that this exact socket/transfer is the one that completed. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out which easy handle that completed. 
 <p class="level0">The <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> functions inform the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION option to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. They update the status with changes since the previous time the callback was called. 
 <p class="level0">Get the timeout time by setting the <span Class="emphasis">CURLMOPT_TIMERFUNCTION</span> option with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. Your application will then get called with information on how long to wait for socket actions at most before doing the timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT. You can also use the <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value. <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK DETAILS</h2>
@@ -63,7 +65,10 @@ p.roffit {
  &nbsp;                          curl_socket_t s, /* socket */
  &nbsp;                          int action,      /* see values below */
  &nbsp;                          void *userp,    /* private callback pointer */
- &nbsp;                          void *socketp); /* private socket pointer */
+ &nbsp;                          void *socketp); /* private socket pointer,
+ &nbsp;                                             <span Class="bold">NULL</span> if not
+ &nbsp;                                             previously assigned with
+ &nbsp;                                             <a class="bold" href="./curl_multi_assign.html">curl_multi_assign(3)</a> */
  <p class="level0"></pre>
 
 <p class="level0">The callback MUST return 0. 
@@ -92,9 +97,9 @@ p.roffit {
 <p class="level0">3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what timeout value to use when waiting for socket activities. 
 <p class="level0">4. Add easy handles with curl_multi_add_handle() 
 <p class="level0">5. Provide some means to manage the sockets libcurl is using, so you can check them for activity. This can be done through your application code, or by way of an external library such as libevent or glib. 
-<p class="level0">6. Call curl_multi_socket_action() to kickstart everything. To get one or more callbacks called. 
-<p class="level0">7. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told 
-<p class="level0">8, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span> <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
+<p class="level0">6. Call curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...) to kickstart everything. To get one or more callbacks called. 
+<p class="level0">7. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told. 
+<p class="level0">8, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html">  curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html">  curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">the hiperfifo.c example</span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
index d6ca6b0..6a8187b 100644 (file)
Binary files a/docs/libcurl/curl_multi_socket_action.pdf and b/docs/libcurl/curl_multi_socket_action.pdf differ
index 2d9801d..40d0974 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_multi_strerror - return string describing error code
index ac885aa..198a1a5 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index b2cebb1..3d848cf 100644 (file)
Binary files a/docs/libcurl/curl_multi_strerror.pdf and b/docs/libcurl/curl_multi_strerror.pdf differ
index 9e53d0b..e18b935 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_multi_timeout 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
 .SH NAME
 curl_multi_timeout \- how long to wait for action before proceeding
@@ -22,7 +42,7 @@ of milliseconds at this very moment. If 0, it means you should proceed
 immediately without waiting for anything. If it returns -1, there's no timeout
 at all set.
 
-An application that uses the multi_socket API SHOULD not use this function, but
+An application that uses the multi_socket API SHOULD NOT use this function, but
 SHOULD instead use \fIcurl_multi_setopt(3)\fP and its
 \fPCURLMOPT_TIMERFUNCTION\fP option for proper and desired behavior.
 
index 78a383f..676d776 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_multi_timeout man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -51,7 +53,7 @@ p.roffit {
 <p class="level0">An application using the libcurl multi interface should call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> to figure out how long it should wait for socket actions - at most - before proceeding. 
 <p class="level0">Proceeding means either doing the socket-style timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT, or call <a class="bold" href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach. 
 <p class="level0">The timeout value returned in the long <span Class="bold">timeout</span> points to, is in number of milliseconds at this very moment. If 0, it means you should proceed immediately without waiting for anything. If it returns -1, there's no timeout at all set. 
-<p class="level0">An application that uses the multi_socket API SHOULD not use this function, but SHOULD instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and its </span>CURLMOPT_TIMERFUNCTION</span> option for proper and desired behavior. 
+<p class="level0">An application that uses the multi_socket API SHOULD NOT use this function, but SHOULD instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and its </span>CURLMOPT_TIMERFUNCTION</span> option for proper and desired behavior. 
 <p class="level0">Note: if libcurl returns a -1 timeout here, it just means that libcurl currently has no stored timeout value. You must not wait too long (more than a few seconds perhaps) before you call curl_multi_perform() again. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
 <p class="level0">Call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>, then wait for action on the sockets. You figure out which sockets to wait for by calling <a class="bold" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> or by a previous call to <a class="bold" href="./curl_multi_socket.html">curl_multi_socket(3)</a>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
index 1e1afbd..9a542c1 100644 (file)
Binary files a/docs/libcurl/curl_multi_timeout.pdf and b/docs/libcurl/curl_multi_timeout.pdf differ
diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3
new file mode 100644 (file)
index 0000000..21ade93
--- /dev/null
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2013, 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.
+.\" *
+.\" **************************************************************************
+.TH curl_multi_wait 3 "12 Jul 2012" "libcurl 7.28.0" "libcurl Manual"
+.SH NAME
+curl_multi_wait - polls on all easy handles in a multi handle
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLMcode curl_multi_wait(CURLM *multi_handle,
+                          struct curl_waitfd extra_fds[],
+                          unsigned int extra_nfds,
+                          int timeout_ms,
+                          int *numfds);
+.ad
+.SH DESCRIPTION
+This function polls on all file descriptors used by the curl easy handles
+contained in the given multi handle set.  It will block until activity is
+detected on at least one of the handles or \fItimeout_ms\fP has passed.
+Alternatively, if the multi handle has a pending internal timeout that has a
+shorter expiry time than \fItimeout_ms\fP, that shorter time will be used
+instead to make sure timeout accuracy is reasonably kept.
+
+The calling application may pass additional curl_waitfd structures which are
+similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call.
+
+On completion, if \fInumfds\fP is supplied, it will be populated with the
+total number of file descriptors on which interesting events occured. This
+number can include both libcurl internal descriptors as well as descriptors
+provided in \fIextra_fds\fP.
+
+If no extra file descriptors are provided and libcurl has no file descriptor
+to offer to wait for, this function will return immediately.
+
+This function is encouraged to be used instead of select(3) when using the
+multi interface to allow applications to easier circumvent the common problem
+with 1024 maximum file descriptors.
+.SH curl_waitfd
+.nf
+struct curl_waitfd {
+  curl_socket_t fd;
+  short events;
+  short revents;
+};
+.fi
+.IP CURL_WAIT_POLLIN
+Bit flag to curl_waitfd.events indicating the socket should poll on read
+events such as new data received.
+.IP CURL_WAIT_POLLPRI
+Bit flag to curl_waitfd.events indicating the socket should poll on high
+priority read events such as out of band data.
+.IP CURL_WAIT_POLLOUT
+Bit flag to curl_waitfd.events indicating the socket should poll on write
+events such as the socket being clear to write without blocking.
+.SH RETURN VALUE
+CURLMcode type, general libcurl multi interface error code. See
+\fIlibcurl-errors(3)\fP
+.SH AVAILABILITY
+This function was added in libcurl 7.28.0.
+.SH "SEE ALSO"
+.BR curl_multi_fdset "(3), " curl_multi_perform "(3)"
diff --git a/docs/libcurl/curl_multi_wait.html b/docs/libcurl/curl_multi_wait.html
new file mode 100644 (file)
index 0000000..7d43abd
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html><head>
+<title>curl_multi_wait man page</title>
+<meta name="generator" content="roffit">
+<STYLE type="text/css">
+P.level0 {
+ padding-left: 2em;
+}
+
+P.level1 {
+ padding-left: 4em;
+}
+
+P.level2 {
+ padding-left: 6em;
+}
+
+span.emphasis {
+ font-style: italic;
+}
+
+span.bold {
+ font-weight: bold;
+}
+
+span.manpage {
+ font-weight: bold;
+}
+
+h2.nroffsh {
+ background-color: #e0e0e0;
+}
+
+span.nroffip {
+ font-weight: bold;
+ font-size: 120%;
+ font-family: monospace;
+}
+
+p.roffit {
+ text-align: center;
+ font-size: 80%;
+}
+</STYLE>
+</head><body>
+
+<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
+<p class="level0">curl_multi_wait - polls on all easy handles in a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
+<p class="level0"><pre>
+<p class="level0">#include &lt;curl/curl.h&gt;
+ <p class="level0">CURLMcode curl_multi_wait(CURLM *multi_handle,
+ &nbsp;                         struct curl_waitfd extra_fds[],
+ &nbsp;                         unsigned int extra_nfds,
+ &nbsp;                         int timeout_ms,
+ &nbsp;                         int *numfds);
+ <p class="level0"></pre>
+<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
+<p class="level0">This function polls on all file descriptors used by the curl easy handles contained in the given multi handle set.  It will block until activity is detected on at least one of the handles or <span Class="emphasis">timeout_ms</span> has passed. Alternatively, if the multi handle has a pending internal timeout that has a shorter expiry time than <span Class="emphasis">timeout_ms</span>, that shorter time will be used instead to make sure timeout accuracy is reasonably kept. 
+<p class="level0">The calling application may pass additional curl_waitfd structures which are similar to <span Class="emphasis">poll(2)</span>'s pollfd structure to be waited on in the same call. 
+<p class="level0">On completion, if <span Class="emphasis">numfds</span> is supplied, it will be populated with the total number of file descriptors on which interesting events occured. This number can include both libcurl internal descriptors as well as descriptors provided in <span Class="emphasis">extra_fds</span>. 
+<p class="level0">If no extra file descriptors are provided and libcurl has no file descriptor to offer to wait for, this function will return immediately. 
+<p class="level0">This function is encouraged to be used instead of select(3) when using the multi interface to allow applications to easier circumvent the common problem with 1024 maximum file descriptors. <a name="curlwaitfd"></a><h2 class="nroffsh">curl_waitfd</h2>
+<p class="level0"><pre>
+<p class="level0">struct curl_waitfd {
+ &nbsp; curl_socket_t fd;
+ &nbsp; short events;
+ &nbsp; short revents;
+ };
+ </pre>
+
+<p class="level0">
+<p class="level0"><a name="CURLWAITPOLLIN"></a><span class="nroffip">CURL_WAIT_POLLIN</span> 
+<p class="level1">Bit flag to curl_waitfd.events indicating the socket should poll on read events such as new data received. 
+<p class="level0"><a name="CURLWAITPOLLPRI"></a><span class="nroffip">CURL_WAIT_POLLPRI</span> 
+<p class="level1">Bit flag to curl_waitfd.events indicating the socket should poll on high priority read events such as out of band data. 
+<p class="level0"><a name="CURLWAITPOLLOUT"></a><span class="nroffip">CURL_WAIT_POLLOUT</span> 
+<p class="level1">Bit flag to curl_waitfd.events indicating the socket should poll on write events such as the socket being clear to write without blocking. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
+<p class="level0">CURLMcode type, general libcurl multi interface error code. See <span Class="emphasis">libcurl-errors(3)</span> <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
+<p class="level0">This function was added in libcurl 7.28.0. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0"><a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_perform.html">  curl_multi_perform (3)</a> <p class="roffit">
+ This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
+</body></html>
diff --git a/docs/libcurl/curl_multi_wait.pdf b/docs/libcurl/curl_multi_wait.pdf
new file mode 100644 (file)
index 0000000..cb23594
Binary files /dev/null and b/docs/libcurl/curl_multi_wait.pdf differ
index 222197c..3af1707 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
 .SH NAME
 curl_share_cleanup - Clean up a shared object
index 758f1e9..3e1e637 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_share_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 300b15c..3b1f5c9 100644 (file)
Binary files a/docs/libcurl/curl_share_cleanup.pdf and b/docs/libcurl/curl_share_cleanup.pdf differ
index 871519c..ce00d95 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_share_init 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
 .SH NAME
 curl_share_init - Create a shared object
index cbc8231..ebf555b 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_share_init man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index f8ff5b9..0427da6 100644 (file)
Binary files a/docs/libcurl/curl_share_init.pdf and b/docs/libcurl/curl_share_init.pdf differ
index 351360d..c196743 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
 .SH NAME
 curl_share_setopt - Set options for a shared object
@@ -44,6 +64,11 @@ Cached DNS hosts will be shared across the easy handles using this shared
 object. Note that when you use the multi interface, all easy handles added to
 the same multi handle will share DNS cache by default without this having to
 be used!
+.IP CURL_LOCK_DATA_SSL_SESSION
+SSL session IDs will be shared across the easy handles using this shared
+object. This will reduce the time spent in the SSL handshake when reconnecting
+to the same server. Note SSL session IDs are reused within the same easy handle
+by default.
 .RE
 .IP CURLSHOPT_UNSHARE
 This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
index 4392387..14b3677 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_share_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -68,6 +70,8 @@ p.roffit {
 <p class="level2">Cookie data will be shared across the easy handles using this shared object. 
 <p class="level1"><a name="CURLLOCKDATADNS"></a><span class="nroffip">CURL_LOCK_DATA_DNS</span> 
 <p class="level2">Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to the same multi handle will share DNS cache by default without this having to be used! 
+<p class="level1"><a name="CURLLOCKDATASSLSESSION"></a><span class="nroffip">CURL_LOCK_DATA_SSL_SESSION</span> 
+<p class="level2">SSL session IDs will be shared across the easy handles using this shared object. This will reduce the time spent in the SSL handshake when reconnecting to the same server. Note SSL session IDs are reused within the same easy handle by default. 
 <p class="level1">
 <p class="level0"><a name="CURLSHOPTUNSHARE"></a><span class="nroffip">CURLSHOPT_UNSHARE</span> 
 <p class="level1">This option does the opposite of <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>. It specifies that the specified <span Class="emphasis">parameter</span> will no longer be shared. Valid values are the same as those for <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>. 
index 37e49f2..0c4f432 100644 (file)
Binary files a/docs/libcurl/curl_share_setopt.pdf and b/docs/libcurl/curl_share_setopt.pdf differ
index 69087db..f1bc398 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_share_strerror - return string describing error code
index 0b5b050..f09b0e0 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_share_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 5de438a..d301a6e 100644 (file)
Binary files a/docs/libcurl/curl_share_strerror.pdf and b/docs/libcurl/curl_share_strerror.pdf differ
index 5cca9b7..529560e 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
 .SH NAME
 curl_slist_append - add a string to an slist
index 50436e8..0b77859 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_slist_append man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 38c1db9..3025e43 100644 (file)
Binary files a/docs/libcurl/curl_slist_append.pdf and b/docs/libcurl/curl_slist_append.pdf differ
index ec1b360..fab3d60 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
 .SH NAME
 curl_slist_free_all - free an entire curl_slist list
index 76a0a9d..0bd7418 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_slist_free_all man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 693f895..f233108 100644 (file)
@@ -3,16 +3,14 @@
 5 0 obj
 <</Length 6 0 R/Filter /FlateDecode>>
 stream
-x\9c\85\8bÓ@\10ÿ\9e¿bÀ\ fnÄlg7Ù<P\84ªAîèãls\82´RriÚFÓ´\97GÅÿÞÝdKSì!K6agfç÷\98<\ 3R\ 6¨\96~'{c0ó`[\19\b_ä³5\9e\rÖ&\80~%{ø\18É$_\1dD\e£«càqð\1c\a¢½Á\98OQ@ôÛX\90¤)óU\95gU½Ú\94\8aó|I쥠  yö¤b¦Å\ 5RD\8f\8cã¢\89sx©Àü\11Ý\e\16\ 2\88\12Ù?\90ýi \14\ 4Û\85hd\90ÉÐ|-!Ë(\13T\ 4\84\15­\r2\ eÍèg\ f0Gê \a\16ã*\8c
-ç-\98`\81ú\84¸\80´¨³2íA\ 3µu·ö`X\12\87Å\ê·mçß'Ó\87ùÝü\92¦¡êÆäUV$y³Nὺx 6ºû Ò-å\86¤Á\9d\96×épæ\15Р#µ ÙúZ*S\89\8e\9e\9aUuÙ$u\1fô\9bVÃÁ\8cáÙ:סèj\99TÊÒ|÷/+\8e²m\9fÙçpþiv÷\10ÝM'×ÊöÈÝ´QÚ^¦ûÃ\99¢h­BF=Oc8¥*Æ©èÈr?ð\1d\1dªb\15êÜEêÛÈÎJH«ê2NÒ
-\ e\e\88áX¦&\17J\v\9b\9c²CSå\7fàÉäH\9a,¯¯=,~\99\f»ÌtÝzJµD}þLxÔ\ f\17d\16F\8f³   |3\99íHi\18\19\8e\1eC]yC\8bÉ¡ÞeÅ\96þo`Â\10\86£ùôÅ\81éi\1a\1f\8fi±¾Vß\93\ 6z@HûÓ¼m¥f\8cQ!\a^Ø\·Ò?\1fx\14{\82s\14
-XW/Æ\17½]jK't .\93\1dpDÖV:HÝó\ 4µ'ad|\95ë/zë\1eÏendstream
+x\9c\85SY\8fÓ0\10~ϯ\18\89\a\1cDܱSç\10\b©@\1e\8az,m\16        µ¨Ê¦i\eHÓn\8e®ø÷Ø\89æ¢+dÉ\89<3\9eï\18?\ 2R\ 6¨\96þÆGc°pa_\1a\b{ãÑ`M\10ô'>ÂÇP&xê Ü\19m\r\ 3\97\83ëÛÔó!<\1a\8cy\14\ 5\84\8aÄu\91mÊ,-«Í®H\92M\94ekb¯MÈÒ\a\153-.\90"ºd\1aåu\94ÁK\ 5æ\8fð\8ba!åLö\88%\ 4_B ¾P(l\aÂ\89Af#óµD-£LPáÛ\12Y¸5È40Ã\9f\1cé\10\18WaT8oÁ\ 4\vÔ/D9$y\95\16I\ f\1a¨­½µ\aÃ\928,æP¯i»ü>\9bß-ÇËç4\rU7&¯Ò<Îêm\ 2ïÕÅ\ 3µÑÃ\a\95n)3$\r>lx]N\1d/\9fú-©\15I·×R\99Jtt=ÒiVVE\1dW}Ðo\1a\r\a\v\86\9d\90¢£eR)kóÝ¿¬8ʶ}f\9f\83å§Åø.\1cÏg×ÊöÈÝ´QÚ^$ÇSGQ4V!£®«1\\12\15ãT´d¹ç{C\1d*#\15jÝEêÙÈ:%¤UU\11ÅI §\1dDp.\12\93\v¥\85M.é©.³ßð`r$u\9a\1eæ¿L\86mf²m<¥Z¢>\7f&\5Ø\7fù¯È"\bï\173øf2{(¥ad4¹\ f\r-f§ê\90æ{ú¿\81   \ 2\18M\96ó\17\a¦§it>'ùöZ}W\ e½ãë\ 1!Í£yÛHÍ\18£B\ e¼°¹n¥\1f\1f¸\14{\82s\14
+X[/¦Ïz;Ô\96Nè@TÄ\aà\88¬©\1c"uº        jN\82Ðø*×\1fz\15\1eÑendstream
 endobj
 6 0 obj
-547
+546
 endobj
 4 0 obj
-<</Type/Page/MediaBox [0 0 612 792]
+<</Type/Page/MediaBox [0 0 595 842]
 /Rotate 0/Parent 3 0 R
 /Resources<</ProcSet[/PDF /Text]
 /ExtGState 11 0 R
@@ -59,17 +57,17 @@ endobj
 endobj
 13 0 obj
 <</Type/Metadata
-/Subtype/XML/Length 1321>>stream
+/Subtype/XML/Length 1346>>stream
 <?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
 <?adobe-xap-filters esc="CRLF"?>
 <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
 <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
-<rdf:Description rdf:about='3e2370bc-4071-11eb-0000-0d90648fa894' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.71'/>
-<rdf:Description rdf:about='3e2370bc-4071-11eb-0000-0d90648fa894' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2010-12-15T15:07:47+01:00</xmp:ModifyDate>
-<xmp:CreateDate>2010-12-15T15:07:47+01:00</xmp:CreateDate>
-<xmp:CreatorTool>groff version 1.20.1</xmp:CreatorTool></rdf:Description>
-<rdf:Description rdf:about='3e2370bc-4071-11eb-0000-0d90648fa894' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='3e2370bc-4071-11eb-0000-0d90648fa894'/>
-<rdf:Description rdf:about='3e2370bc-4071-11eb-0000-0d90648fa894' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
+<rdf:Description rdf:about='uuid:075b48f7-381b-11ee-0000-224f381b10d2' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.05'/>
+<rdf:Description rdf:about='uuid:075b48f7-381b-11ee-0000-224f381b10d2' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2013-08-08T09:45:22+02:00</xmp:ModifyDate>
+<xmp:CreateDate>2013-08-08T09:45:22+02:00</xmp:CreateDate>
+<xmp:CreatorTool>groff version 1.22.2</xmp:CreatorTool></rdf:Description>
+<rdf:Description rdf:about='uuid:075b48f7-381b-11ee-0000-224f381b10d2' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:075b48f7-381b-11ee-0000-224f381b10d2'/>
+<rdf:Description rdf:about='uuid:075b48f7-381b-11ee-0000-224f381b10d2' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
 </rdf:RDF>
 </x:xmpmeta>
                                                                         
@@ -78,30 +76,30 @@ endobj
 endstream
 endobj
 2 0 obj
-<</Producer(GPL Ghostscript 8.71)
-/CreationDate(D:20101215150747+01'00')
-/ModDate(D:20101215150747+01'00')
-/Creator(groff version 1.20.1)>>endobj
+<</Producer(GPL Ghostscript 9.05)
+/CreationDate(D:20130808094522+02'00')
+/ModDate(D:20130808094522+02'00')
+/Creator(groff version 1.22.2)>>endobj
 xref
 0 14
 0000000000 65535 f 
-0000000870 00000 n 
-0000002653 00000 n 
-0000000811 00000 n 
-0000000651 00000 n 
+0000000869 00000 n 
+0000002677 00000 n 
+0000000810 00000 n 
+0000000650 00000 n 
 0000000015 00000 n 
-0000000632 00000 n 
-0000000935 00000 n 
-0000001189 00000 n 
-0000001124 00000 n 
-0000001056 00000 n 
-0000000976 00000 n 
-0000001006 00000 n 
-0000001255 00000 n 
+0000000631 00000 n 
+0000000934 00000 n 
+0000001188 00000 n 
+0000001123 00000 n 
+0000001055 00000 n 
+0000000975 00000 n 
+0000001005 00000 n 
+0000001254 00000 n 
 trailer
 << /Size 14 /Root 1 0 R /Info 2 0 R
-/ID [<D43E949F03B6608F551A21E4ED709EA6><D43E949F03B6608F551A21E4ED709EA6>]
+/ID [(\n>Bte\216\016U%\t=b.w\370\357)(\n>Bte\216\016U%\t=b.w\370\357)]
 >>
 startxref
-2807
+2831
 %%EOF
index 8ab4234..ce575d7 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
 .SH NAME
 curl_strequal, curl_strnequal - case insensitive string comparisons
index eefdf10..c4f6b55 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_strequal man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 89827bb..e9ed9eb 100644 (file)
Binary files a/docs/libcurl/curl_strequal.pdf and b/docs/libcurl/curl_strequal.pdf differ
index 9bb470f..2a24866 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
 .SH NAME
 curl_unescape - URL decodes the given string
index 5e34606..b8e434c 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -54,6 +56,6 @@ p.roffit {
 <p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 <p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 <p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396</span> <p class="roffit">
+<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a></span> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index b1085c5..cbadf5e 100644 (file)
Binary files a/docs/libcurl/curl_unescape.pdf and b/docs/libcurl/curl_unescape.pdf differ
index 24793ca..f66e38d 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH curl_version 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
 .SH NAME
 curl_version - returns the libcurl version string
@@ -13,6 +31,7 @@ curl_version - returns the libcurl version string
 Returns a human readable string with the version number of libcurl and some of
 its important components (like OpenSSL version).
 .SH RETURN VALUE
-A pointer to a zero terminated string.
+A pointer to a zero terminated string. The string resides in a statically
+allocated buffer and must not be freed by the caller.
 .SH "SEE ALSO"
 .BR curl_version_info "(3)"
index d2f1032..aca7ecc 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_version man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -49,7 +51,7 @@ p.roffit {
 <p class="level0"><span Class="bold">char *curl_version( );</span> 
 <p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 <p class="level0">Returns a human readable string with the version number of libcurl and some of its important components (like OpenSSL version). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0">A pointer to a zero terminated string. The string resides in a statically allocated buffer and must not be freed by the caller. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 <p class="level0"><a class="manpage" href="./curl_version_info.html">curl_version_info (3)</a> <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 0f058b0..d54b3d7 100644 (file)
Binary files a/docs/libcurl/curl_version.pdf and b/docs/libcurl/curl_version.pdf differ
index 4481830..ccb2028 100644 (file)
@@ -128,6 +128,11 @@ the app having to pass them on. (Added in 7.13.2)
 .IP CURL_VERSION_CONV
 libcurl was built with support for character conversions, as provided by the
 CURLOPT_CONV_* callbacks. (Added in 7.15.4)
+.IP CURL_VERSION_TLSAUTH_SRP
+libcurl was built with support for TLS-SRP. (Added in 7.21.4)
+.IP CURL_VERSION_NTLM_WB
+libcurl was built with support for NTLM delegation to a winbind helper.
+(Added in 7.22.0)
 .RE
 \fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
 has no SSL support, this is NULL.
index b6602bf..6da3aaa 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>curl_version_info man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -101,7 +103,7 @@ p.roffit {
 <p class="level0"><a name="CURLVERSIONASYNCHDNS"></a><span class="nroffip">CURL_VERSION_ASYNCHDNS</span> 
 <p class="level1">libcurl was built with support for asynchronous name lookups, which allows more exact timeouts (even on Windows) and less blocking when using the multi interface. (added in 7.10.7) 
 <p class="level0"><a name="CURLVERSIONSPNEGO"></a><span class="nroffip">CURL_VERSION_SPNEGO</span> 
-<p class="level1">libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8) 
+<p class="level1">libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in <a href="http://www.ietf.org/rfc/rfc2478.txt">RFC 2478</a>.) (added in 7.10.8) 
 <p class="level0"><a name="CURLVERSIONLARGEFILE"></a><span class="nroffip">CURL_VERSION_LARGEFILE</span> 
 <p class="level1">libcurl was built with support for large files. (Added in 7.11.1) 
 <p class="level0"><a name="CURLVERSIONIDN"></a><span class="nroffip">CURL_VERSION_IDN</span> 
@@ -110,6 +112,10 @@ p.roffit {
 <p class="level1">libcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for NTLM authentication. It also allows libcurl to use the current user and the current user's password without the app having to pass them on. (Added in 7.13.2) 
 <p class="level0"><a name="CURLVERSIONCONV"></a><span class="nroffip">CURL_VERSION_CONV</span> 
 <p class="level1">libcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. (Added in 7.15.4) 
+<p class="level0"><a name="CURLVERSIONTLSAUTHSRP"></a><span class="nroffip">CURL_VERSION_TLSAUTH_SRP</span> 
+<p class="level1">libcurl was built with support for TLS-SRP. (Added in 7.21.4) 
+<p class="level0"><a name="CURLVERSIONNTLMWB"></a><span class="nroffip">CURL_VERSION_NTLM_WB</span> 
+<p class="level1">libcurl was built with support for NTLM delegation to a winbind helper. (Added in 7.22.0) 
 <p class="level0"><span Class="emphasis">ssl_version</span> is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL. 
 <p class="level0"><span Class="emphasis">ssl_version_num</span> is the numerical OpenSSL version value as defined by the OpenSSL project. If libcurl has no SSL support, this is 0. 
 <p class="level0"><span Class="emphasis">libz_version</span> is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL. 
index 0ade732..3ca916b 100644 (file)
Binary files a/docs/libcurl/curl_version_info.pdf and b/docs/libcurl/curl_version_info.pdf differ
index 287a2dd..ca77313 100644 (file)
 <H2>Library Functions (A-Z)</H2>
 <a href="curl_easy_cleanup.html">curl_easy_cleanup</A>
 <br><a href="curl_easy_duphandle.html">curl_easy_duphandle</A>
+<br><a href="curl_easy_escape.html">curl_easy_escape</A>
 <br><a href="curl_easy_getinfo.html">curl_easy_getinfo</A>
 <br><a href="curl_easy_init.html">curl_easy_init</A>
+<br><a href="curl_easy_pause.html">curl_easy_pause</A>
 <br><a href="curl_easy_perform.html">curl_easy_perform</A>
 <br><a href="curl_easy_recv.html">curl_easy_recv</A>
 <br><a href="curl_easy_reset.html">curl_easy_reset</A>
 <br><a href="curl_easy_send.html">curl_easy_send</A>
 <br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
 <br><a href="curl_easy_strerror.html">curl_easy_strerror</A>
-<br><a href="curl_escape.html">curl_escape</A>
+<br><a href="curl_easy_unescape.html">curl_easy_unescape</A>
+<br><a href="curl_escape.html">curl_escape</A> (deprecated)
 <br><a href="curl_formadd.html">curl_formadd</A>
 <br><a href="curl_formfree.html">curl_formfree</A>
+<br><a href="curl_formget.html">curl_formget</A>
 <br><a href="curl_free.html">curl_free</A>
 <br><a href="curl_getdate.html">curl_getdate</A>
-<br><a href="curl_getenv.html">curl_getenv</A>
+<br><a href="curl_getenv.html">curl_getenv</A> (deprecated)
 <br><a href="curl_global_cleanup.html">curl_global_cleanup</A>
 <br><a href="curl_global_init.html">curl_global_init</A>
 <br><a href="curl_global_init_mem.html">curl_global_init_mem</A>
-<br><a href="curl_mprintf.html">curl_mprintf</A>
+<br><a href="curl_mprintf.html">curl_mprintf</A> (deprecated)
 <br><a href="curl_multi_add_handle.html">curl_multi_add_handle</a>
+<br><a href="curl_multi_assign.html">curl_multi_assign</a>
 <br><a href="curl_multi_cleanup.html">curl_multi_cleanup</a>
 <br><a href="curl_multi_fdset.html">curl_multi_fdset</a>
 <br><a href="curl_multi_info_read.html">curl_multi_info_read</a>
 <br><a href="curl_multi_init.html">curl_multi_init</a>
 <br><a href="curl_multi_perform.html">curl_multi_perform</a>
 <br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
-<br><a href="curl_multi_strerror.html">curl_multi_strerror.html</a>
+<br><a href="curl_multi_setopt.html">curl_multi_setopt</a>
+<br><a href="curl_multi_socket.html">curl_multi_socket</a> (deprecated)
+<br><a href="curl_multi_socket_action.html">curl_multi_socket_action</a>
+<br><a href="curl_multi_strerror.html">curl_multi_strerror</a>
+<br><a href="curl_multi_timeout.html">curl_multi_timeout</a> (deprecated)
 <br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
 <br><a href="curl_share_init.html">curl_share_init</A>
 <br><a href="curl_share_setopt.html">curl_share_setopt</A>
-<br><a href="curl_share_strerror.html">curl_share_strerror.html</a>
+<br><a href="curl_share_strerror.html">curl_share_strerror</a>
 <br><a href="curl_slist_append.html">curl_slist_append</A>
 <br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
 <br><a href="curl_strequal.html">curl_strequal and curl_strnequal</A>
-<br><a href="curl_unescape.html">curl_unescape</A>
+<br><a href="curl_unescape.html">curl_unescape</A> (deprecated)
 <br><a href="curl_version.html">curl_version</A>
 <br><a href="curl_version_info.html">curl_version_info</A>
 
index 803e542..698a4ce 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface"
 .SH NAME
 libcurl-easy \- easy interface overview
index 8c9f5e5..e10411f 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 9a2b9dd..01bf41d 100644 (file)
Binary files a/docs/libcurl/libcurl-easy.pdf and b/docs/libcurl/libcurl-easy.pdf differ
index c3c854e..7b68237 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2012, 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
@@ -44,9 +44,15 @@ can be a misspelled protocol string or just a protocol libcurl has no code
 for.
 .IP "CURLE_FAILED_INIT (2)"
 Very early initialization code failed. This is likely to be an internal error
-or problem.
+or problem, or a resource problem where something fundamental couldn't get
+done at init time.
 .IP "CURLE_URL_MALFORMAT (3)"
 The URL was not properly formatted.
+.IP "CURLE_NOT_BUILT_IN (4)"
+A requested feature, protocol or option was not found built-in in this libcurl
+due to a build-time decision. This means that a feature or option was not
+enabled or explicitly disabled when libcurl was built and in order to get it
+to function you have to get a rebuilt libcurl.
 .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
 Couldn't resolve proxy. The given proxy host could not be resolved.
 .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
@@ -60,20 +66,21 @@ remote server is probably not an OK FTP server.
 .IP "CURLE_REMOTE_ACCESS_DENIED (9)"
 We were denied access to the resource given in the URL.  For FTP, this occurs
 while trying to change to the remote directory.
+.IP "CURLE_FTP_ACCEPT_FAILED (10)"
+While waiting for the server to connect back when an active FTP session is
+used, an error code was sent over the control connection or similar.
 .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
 After having sent the FTP password to the server, libcurl expects a proper
 reply. This error code indicates that an unexpected code was returned.
+.IP "CURLE_FTP_ACCEPT_TIMEOUT (12)"
+During an active FTP session while waiting for the server to connect, the
+\fICURLOPT_ACCEPTTIMOUT_MS\fP (or the internal default) timeout expired.
 .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
 libcurl failed to get a sensible result back from the server as a response to
 either a PASV or a EPSV command. The server is flawed.
 .IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
 FTP servers return a 227-line as a response to a PASV command. If libcurl
 fails to parse that line, this return code is passed back.
-.IP "CURLE_FTP_PRET_FAILED (84)"
-The FTP server does not understand the PRET command at all or does not support
-the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST\fP, a
-custom LIST command will be sent with PRET CMD before PASV as well. (Added in
-7.20.0)
 .IP "CURLE_FTP_CANT_GET_HOST (15)"
 An internal failure to lookup the host used for the new connection.
 .IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
@@ -145,9 +152,11 @@ CURLOPT_INTERFACE.
 .IP "CURLE_TOO_MANY_REDIRECTS (47)"
 Too many redirects. When following redirects, libcurl hit the maximum amount.
 Set your limit with CURLOPT_MAXREDIRS.
-.IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
-An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
-the appropriate documentation.
+.IP "CURLE_UNKNOWN_OPTION (48)"
+An option passed to libcurl is not recognized/known. Refer to the appropriate
+documentation. This is most likely a problem in the program that uses
+libcurl. The error buffer might contain more specific information about which
+exact option it concerns.
 .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
 A telnet option string was Illegally formatted.
 .IP "CURLE_PEER_FAILED_VERIFICATION (51)"
@@ -219,7 +228,10 @@ Failed to load CRL file (Added in 7.19.0)
 .IP "CURLE_SSL_ISSUER_ERROR (83)"
 Issuer check failed (Added in 7.19.0)
 .IP "CURLE_FTP_PRET_FAILED (84)"
-PRET command failed
+The FTP server does not understand the PRET command at all or does not support
+the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST\fP, a
+custom LIST command will be sent with PRET CMD before PASV as well. (Added in
+7.20.0)
 .IP "CURLE_RTSP_CSEQ_ERROR (85)"
 Mismatch of RTSP CSeq numbers.
 .IP "CURLE_RTSP_SESSION_ERROR (86)"
@@ -228,6 +240,9 @@ Mismatch of RTSP Session Identifiers.
 Unable to parse FTP file list (during FTP wildcard downloading).
 .IP "CURLE_CHUNK_FAILED (88)"
 Chunk callback reported error.
+.IP "CURLE_NO_CONNECTION_AVAILABLE (89)"
+(For internal use only, will never be returned by libcurl) No connection
+available, the session will be queued. (added in 7.30.0)
 .IP "CURLE_OBSOLETE*"
 These error codes will never be returned. They were used in an old libcurl
 version and are currently unused.
@@ -236,7 +251,10 @@ This is the generic return code used by functions in the libcurl multi
 interface. Also consider \fIcurl_multi_strerror(3)\fP.
 .IP "CURLM_CALL_MULTI_PERFORM (-1)"
 This is not really an error. It means you should call
-\fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
+\fIcurl_multi_perform(3)\fP again without doing select() or similar in
+between. Before version 7.20.0 this could be returned by
+\fIcurl_multi_perform(3)\fP, but in later versions this return code is never
+used.
 .IP "CURLM_OK (0)"
 Things are fine.
 .IP "CURLM_BAD_HANDLE (1)"
@@ -269,3 +287,6 @@ An invalid share object was passed to the function.
 .IP "CURLSHE_NOMEM (4)"
 Not enough memory was available.
 (Added in 7.12.0)
+.IP "CURLSHE_NOT_BUILT_IN (5)"
+The requested sharing could not be done because the library you use don't have
+that particular feature enabled. (Added in 7.23.0)
index 0a2cf70..194b150 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl-errors man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -53,9 +55,11 @@ p.roffit {
 <p class="level0"><a name="CURLEUNSUPPORTEDPROTOCOL"></a><span class="nroffip">CURLE_UNSUPPORTED_PROTOCOL (1)</span> 
 <p class="level1">The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for. 
 <p class="level0"><a name="CURLEFAILEDINIT"></a><span class="nroffip">CURLE_FAILED_INIT (2)</span> 
-<p class="level1">Very early initialization code failed. This is likely to be an internal error or problem. 
+<p class="level1">Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn't get done at init time
 <p class="level0"><a name="CURLEURLMALFORMAT"></a><span class="nroffip">CURLE_URL_MALFORMAT (3)</span> 
 <p class="level1">The URL was not properly formatted. 
+<p class="level0"><a name="CURLENOTBUILTIN"></a><span class="nroffip">CURLE_NOT_BUILT_IN (4)</span> 
+<p class="level1">A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl. 
 <p class="level0"><a name="CURLECOULDNTRESOLVEPROXY"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_PROXY (5)</span> 
 <p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved. 
 <p class="level0"><a name="CURLECOULDNTRESOLVEHOST"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_HOST (6)</span> 
@@ -66,14 +70,16 @@ p.roffit {
 <p class="level1">After connecting to a FTP server, libcurl expects to get a certain reply back. This error code implies that it got a strange or bad reply. The given remote server is probably not an OK FTP server. 
 <p class="level0"><a name="CURLEREMOTEACCESSDENIED"></a><span class="nroffip">CURLE_REMOTE_ACCESS_DENIED (9)</span> 
 <p class="level1">We were denied access to the resource given in the URL.  For FTP, this occurs while trying to change to the remote directory. 
+<p class="level0"><a name="CURLEFTPACCEPTFAILED"></a><span class="nroffip">CURLE_FTP_ACCEPT_FAILED (10)</span> 
+<p class="level1">While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar. 
 <p class="level0"><a name="CURLEFTPWEIRDPASSREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASS_REPLY (11)</span> 
 <p class="level1">After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned. 
+<p class="level0"><a name="CURLEFTPACCEPTTIMEOUT"></a><span class="nroffip">CURLE_FTP_ACCEPT_TIMEOUT (12)</span> 
+<p class="level1">During an active FTP session while waiting for the server to connect, the <span Class="emphasis">CURLOPT_ACCEPTTIMOUT_MS</span> (or the internal default) timeout expired. 
 <p class="level0"><a name="CURLEFTPWEIRDPASVREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASV_REPLY (13)</span> 
 <p class="level1">libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed. 
 <p class="level0"><a name="CURLEFTPWEIRD227FORMAT"></a><span class="nroffip">CURLE_FTP_WEIRD_227_FORMAT (14)</span> 
 <p class="level1">FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back. 
-<p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span> 
-<p class="level1">The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <span Class="emphasis">CURLOPT_CUSTOMREQUEST</span>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0) 
 <p class="level0"><a name="CURLEFTPCANTGETHOST"></a><span class="nroffip">CURLE_FTP_CANT_GET_HOST (15)</span> 
 <p class="level1">An internal failure to lookup the host used for the new connection. 
 <p class="level0"><a name="CURLEFTPCOULDNTSETTYPE"></a><span class="nroffip">CURLE_FTP_COULDNT_SET_TYPE (17)</span> 
@@ -124,8 +130,8 @@ p.roffit {
 <p class="level1">Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE. 
 <p class="level0"><a name="CURLETOOMANYREDIRECTS"></a><span class="nroffip">CURLE_TOO_MANY_REDIRECTS (47)</span> 
 <p class="level1">Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS. 
-<p class="level0"><a name="CURLEUNKNOWNTELNETOPTION"></a><span class="nroffip">CURLE_UNKNOWN_TELNET_OPTION (48)</span> 
-<p class="level1">An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to the appropriate documentation
+<p class="level0"><a name="CURLEUNKNOWNOPTION"></a><span class="nroffip">CURLE_UNKNOWN_OPTION (48)</span> 
+<p class="level1">An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns
 <p class="level0"><a name="CURLETELNETOPTIONSYNTAX"></a><span class="nroffip">CURLE_TELNET_OPTION_SYNTAX (49)</span> 
 <p class="level1">A telnet option string was Illegally formatted. 
 <p class="level0"><a name="CURLEPEERFAILEDVERIFICATION"></a><span class="nroffip">CURLE_PEER_FAILED_VERIFICATION (51)</span> 
@@ -193,7 +199,7 @@ p.roffit {
 <p class="level0"><a name="CURLESSLISSUERERROR"></a><span class="nroffip">CURLE_SSL_ISSUER_ERROR (83)</span> 
 <p class="level1">Issuer check failed (Added in 7.19.0) 
 <p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span> 
-<p class="level1">PRET command failed 
+<p class="level1">The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <span Class="emphasis">CURLOPT_CUSTOMREQUEST</span>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0) 
 <p class="level0"><a name="CURLERTSPCSEQERROR"></a><span class="nroffip">CURLE_RTSP_CSEQ_ERROR (85)</span> 
 <p class="level1">Mismatch of RTSP CSeq numbers. 
 <p class="level0"><a name="CURLERTSPSESSIONERROR"></a><span class="nroffip">CURLE_RTSP_SESSION_ERROR (86)</span> 
@@ -202,11 +208,13 @@ p.roffit {
 <p class="level1">Unable to parse FTP file list (during FTP wildcard downloading). 
 <p class="level0"><a name="CURLECHUNKFAILED"></a><span class="nroffip">CURLE_CHUNK_FAILED (88)</span> 
 <p class="level1">Chunk callback reported error. 
+<p class="level0"><a name="CURLENOCONNECTIONAVAILABLE"></a><span class="nroffip">CURLE_NO_CONNECTION_AVAILABLE (89)</span> 
+<p class="level1">(For internal use only, will never be returned by libcurl) No connection available, the session will be queued. (added in 7.30.0) 
 <p class="level0"><a name="CURLEOBSOLETE"></a><span class="nroffip">CURLE_OBSOLETE*</span> 
 <p class="level1">These error codes will never be returned. They were used in an old libcurl version and are currently unused. <a name="CURLMcode"></a><h2 class="nroffsh">CURLMcode</h2>
 <p class="level0">This is the generic return code used by functions in the libcurl multi interface. Also consider <a class="emphasis" href="./curl_multi_strerror.html">curl_multi_strerror(3)</a>. 
 <p class="level0"><a name="CURLMCALLMULTIPERFORM"></a><span class="nroffip">CURLM_CALL_MULTI_PERFORM (-1)</span> 
-<p class="level1">This is not really an error. It means you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> again without doing select() or similar in between. 
+<p class="level1">This is not really an error. It means you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> again without doing select() or similar in between. Before version 7.20.0 this could be returned by <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, but in later versions this return code is never used. 
 <p class="level0"><a name="CURLMOK"></a><span class="nroffip">CURLM_OK (0)</span> 
 <p class="level1">Things are fine. 
 <p class="level0"><a name="CURLMBADHANDLE"></a><span class="nroffip">CURLM_BAD_HANDLE (1)</span> 
@@ -231,6 +239,8 @@ p.roffit {
 <p class="level0"><a name="CURLSHEINVALID"></a><span class="nroffip">CURLSHE_INVALID (3)</span> 
 <p class="level1">An invalid share object was passed to the function. 
 <p class="level0"><a name="CURLSHENOMEM"></a><span class="nroffip">CURLSHE_NOMEM (4)</span> 
-<p class="level1">Not enough memory was available. (Added in 7.12.0) <p class="roffit">
+<p class="level1">Not enough memory was available. (Added in 7.12.0) 
+<p class="level0"><a name="CURLSHENOTBUILTIN"></a><span class="nroffip">CURLSHE_NOT_BUILT_IN (5)</span> 
+<p class="level1">The requested sharing could not be done because the library you use don't have that particular feature enabled. (Added in 7.23.0) <p class="roffit">
  This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 </body></html>
index 0566c36..42c1162 100644 (file)
Binary files a/docs/libcurl/libcurl-errors.pdf and b/docs/libcurl/libcurl-errors.pdf differ
index d84bafc..2af0299 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2011, 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
@@ -82,14 +82,6 @@ might need attention. This also makes it very easy for your program to wait
 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(3)\fP: if you receive
-\fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you should call
-\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(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
@@ -118,23 +110,40 @@ If you want to re-use an easy handle that was added to the multi handle for
 transfer, you must first remove it from the multi stack and then re-add it
 again (possibly after having altered some options at your own choice).
 .SH "MULTI_SOCKET"
-Since 7.16.0, the \fIcurl_multi_socket_action(3)\fP function offers a way for
-applications to not only avoid being forced to use select(), but it also
-offers a much more high-performance API that will make a significant
-difference for applications using large numbers of simultaneous connections.
-
-\fIcurl_multi_socket_action(3)\fP is then used
-instead of \fIcurl_multi_perform(3)\fP.
+\fIcurl_multi_socket_action(3)\fP function offers a way for applications to
+not only avoid being forced to use select(), but it also offers a much more
+high-performance API that will make a significant difference for applications
+using large numbers of simultaneous connections.
+
+\fIcurl_multi_socket_action(3)\fP is then used instead of
+\fIcurl_multi_perform(3)\fP.
+
+When using this API, you add easy handles to the multi handle just as with the
+normal multi interface. Then you also set two callbacks with the
+CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to
+\fIcurl_multi_setopt(3)\fP.
+
+The API is then designed to inform your application about which sockets
+libcurl is currently using and for what activities (read and/or write) on
+those sockets your application is expected to wait for.
+
+Your application must then make sure to receive all sockets informed about in
+the CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given
+activity on them. When a socket has the given activity, you call
+\fIcurl_multi_socket_action(3)\fP specifying which socket and action there
+are.
+
+The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that
+timeout expires, your application should call the
+\fIcurl_multi_socket_action(3)\fP function saying it was due to a timeout.
 .SH "BLOCKING"
 A few areas in the code are still using blocking code, even when used from the
 multi interface. While we certainly want and intend for these to get fixed in
 the future, you should be aware of the following current restrictions:
 
 .nf
- - Name resolves on non-windows unless c-ares is used
- - GnuTLS SSL connections
+ - Name resolves unless the c-ares or threaded-resolver backends are used
  - NSS SSL connections
- - Active FTP connections
  - HTTP proxy CONNECT operations
  - SOCKS proxy handshakes
  - file:// transfers
index 70601d1..c430616 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl-multi man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -57,20 +59,21 @@ p.roffit {
 <p class="level0">Should you change your mind, the easy handle is again removed from the multi stack using <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. Once removed from the multi handle, you can again use other easy interface functions like <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on the handle or whatever you think is necessary. 
 <p class="level0">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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. 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. 
 <p class="level0">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 <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> like crazy. <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> 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 for input on your own private file descriptors at the same time or perhaps timeout every now and then, should you want that. 
-<p class="level0">A little note here about the return codes from the multi functions, and especially the <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>: if you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> 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". 
 <p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> 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. 
 <p class="level0">To get information about completed transfers, to figure out success or not and similar, <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> 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. 
 <p class="level0">When a single transfer is completed, the easy handle is still left added to the multi stack. You need to first remove the easy handle with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> and then close it with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>, or possibly set new options to it and add it again with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> to start another transfer. 
 <p class="level0">When all transfers in the multi stack are done, cleanup the multi handle with <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a>. Be careful and please note that you <span Class="bold">MUST</span> invoke separate <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> calls on every single easy handle to clean them up properly. 
 <p class="level0">If you want to re-use an easy handle that was added to the multi handle for transfer, you must first remove it from the multi stack and then re-add it again (possibly after having altered some options at your own choice). <a name="MULTISOCKET"></a><h2 class="nroffsh">MULTI_SOCKET</h2>
-<p class="level0">Since 7.16.0, the <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function offers a way for applications to not only avoid being forced to use select(), but it also offers a much more high-performance API that will make a significant difference for applications using large numbers of simultaneous connections. 
-<p class="level0"><a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> is then used instead of <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. <a name="BLOCKING"></a><h2 class="nroffsh">BLOCKING</h2>
+<p class="level0"><a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function offers a way for applications to not only avoid being forced to use select(), but it also offers a much more high-performance API that will make a significant difference for applications using large numbers of simultaneous connections. 
+<p class="level0"><a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> is then used instead of <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. 
+<p class="level0">When using this API, you add easy handles to the multi handle just as with the normal multi interface. Then you also set two callbacks with the CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. 
+<p class="level0">The API is then designed to inform your application about which sockets libcurl is currently using and for what activities (read and/or write) on those sockets your application is expected to wait for. 
+<p class="level0">Your application must then make sure to receive all sockets informed about in the CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given activity on them. When a socket has the given activity, you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> specifying which socket and action there are. 
+<p class="level0">The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that timeout expires, your application should call the <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function saying it was due to a timeout. <a name="BLOCKING"></a><h2 class="nroffsh">BLOCKING</h2>
 <p class="level0">A few areas in the code are still using blocking code, even when used from the multi interface. While we certainly want and intend for these to get fixed in the future, you should be aware of the following current restrictions: 
 <p class="level0"><pre>
-<p class="level0">&nbsp;- Name resolves on non-windows unless c-ares is used
- &nbsp;- GnuTLS SSL connections
+<p class="level0">&nbsp;- Name resolves unless the c-ares or threaded-resolver backends are used
  &nbsp;- NSS SSL connections
- &nbsp;- Active FTP connections
  &nbsp;- HTTP proxy CONNECT operations
  &nbsp;- SOCKS proxy handshakes
  &nbsp;- file:// transfers
index a897e93..1ae9527 100644 (file)
Binary files a/docs/libcurl/libcurl-multi.pdf and b/docs/libcurl/libcurl-multi.pdf differ
index 2e58c0b..1e6c139 100644 (file)
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, 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.
+.\" *
+.\" **************************************************************************
 .TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface"
 .SH NAME
 libcurl-share \- how to use the share interface
@@ -16,15 +34,16 @@ The share interface was added to enable sharing of data between curl
 \&"handles".
 .SH "ONE SET OF DATA - MANY TRANSFERS"
 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).
+and use the \fBsame\fP cookie database, DNS cache, TLS session cache! This
+way, each single transfer will take advantage from data updates made by the
+other transfer(s). The sharing interface, however, does not share active or
+persistent connections between different easy handles.
 .SH "SHARE OBJECT"
 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(3)\fP. Currently you can only share DNS and/or COOKIE
-data.
+\fIcurl_share_setopt(3)\fP.
 
 Since you can use this share from multiple threads, and libcurl has no
 internal thread synchronization, you must provide mutex callbacks if you're
index 6a66f32..196853e 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl-share man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -49,9 +51,9 @@ p.roffit {
 <p class="level0">All functions in the share interface are prefixed with curl_share. 
 <p class="level0"><a name="OBJECTIVES"></a><h2 class="nroffsh">OBJECTIVES</h2>
 <p class="level0">The share interface was added to enable sharing of data between curl "handles". <a name="ONE"></a><h2 class="nroffsh">ONE SET OF DATA - MANY TRANSFERS</h2>
-<p class="level0">You can have multiple easy handles share data between them. Have them update and use the <span Class="bold">same</span> cookie database or DNS cache! This way, each single transfer will take advantage from data updates made by the other transfer(s). <a name="SHARE"></a><h2 class="nroffsh">SHARE OBJECT</h2>
+<p class="level0">You can have multiple easy handles share data between them. Have them update and use the <span Class="bold">same</span> cookie database, DNS cache, TLS session cache! This way, each single transfer will take advantage from data updates made by the other transfer(s). The sharing interface, however, does not share active or persistent connections between different easy handles. <a name="SHARE"></a><h2 class="nroffsh">SHARE OBJECT</h2>
 <p class="level0">You create a shared object with <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>. It returns a handle for a newly created one. 
-<p class="level0">You tell the shared object what data you want it to share by using <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a>. Currently you can only share DNS and/or COOKIE data. 
+<p class="level0">You tell the shared object what data you want it to share by using <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a>. 
 <p class="level0">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 <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a> too. 
 <p class="level0">Then, you make an easy handle to use this share, you set the <span Class="emphasis">CURLOPT_SHARE</span> option with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, and pass in share handle. You can make any number of easy handles share the same share handle. 
 <p class="level0">To make an easy handle stop using that particular share, you set <span Class="emphasis">CURLOPT_SHARE</span> to NULL for that easy handle. To make a handle stop sharing a particular data, you can <span Class="emphasis">CURLSHOPT_UNSHARE</span> it. 
index dc2b365..0b8ebb9 100644 (file)
Binary files a/docs/libcurl/libcurl-share.pdf and b/docs/libcurl/libcurl-share.pdf differ
index 72f0029..eb44502 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2013, 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
@@ -249,9 +249,11 @@ complication for you. Given simply the URL to a file, libcurl will take care
 of all the details needed to get the file moved from one machine to another.
 
 .SH "Multi-threading Issues"
-The first basic rule is that you must \fBnever\fP share a libcurl handle (be
-it easy or multi or whatever) between multiple threads. Only use one handle in
-one thread at a time.
+The first basic rule is that you must \fBnever\fP simultaneously share a
+libcurl handle (be it easy or multi or whatever) between multiple
+threads. Only use one handle in one thread at any time. You can pass the
+handles around among threads, but you must never use a single handle from more
+than one thread at any given time.
 
 libcurl is completely thread safe, except for two issues: signals and SSL/TLS
 handlers. Signals are used for timing out name resolves (during DNS lookup) -
@@ -283,6 +285,14 @@ yassl
 
  Required actions unknown.
 
+axTLS
+
+ Required actions unknown.
+
+Secure Transport
+
+ The engine is fully thread-safe, and no additional steps are required.
+
 When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1
 for all handles. Everything will or might work fine except that timeouts are
 not honored during the DNS lookup - which you can work around by building
@@ -811,10 +821,6 @@ This header is required by HTTP 1.1 and even many 1.0 servers and should be
 the name of the server we want to talk to. This includes the port number if
 anything but default.
 
-.IP "Pragma"
-\&"no-cache". Tells a possible proxy to not grab a copy from the cache but to
-fetch a fresh one.
-
 .IP "Accept"
 \&"*/*".
 
@@ -1151,13 +1157,13 @@ and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses
 are sanitized before use.
 
 .IP "Private Resources"
-A user who can control the DNS server of a domain being passed in within
-a URL can change the address of the host to a local, private address
-which the libcurl application will then use. e.g. The innocuous URL
-http://fuzzybunnies.example.com/ could actually resolve to the IP address
-of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3
-Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION
-and checking the address before a connection.
+A user who can control the DNS server of a domain being passed in within a URL
+can change the address of the host to a local, private address which a
+server-side libcurl-using application could then use. e.g. the innocuous URL
+http://fuzzybunnies.example.com/ could actually resolve to the IP address of a
+server behind a firewall, such as 127.0.0.1 or 10.1.2.3.  Apps can mitigate
+against this by setting a CURLOPT_OPENSOCKETFUNCTION and checking the address
+before a connection.
 
 All the malicious scenarios regarding redirected URLs apply just as well
 to non-redirected URLs, if the user is allowed to specify an arbitrary URL
@@ -1172,6 +1178,19 @@ IP address and port number for a server local to the app running libcurl
 but behind a firewall.  Apps can mitigate against this by using the
 CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
 
+.IP "IPv6 Addresses"
+libcurl will normally handle IPv6 addresses transparently and just as easily
+as IPv4 addresses. That means that a sanitizing function that filters out
+addressses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1,
+::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker
+would all bypass a naive filter and could allow access to undesired local
+resources.  IPv6 also has special address blocks like link-local and site-local
+that generally shouldn't be accessed by a server-side libcurl-using
+application.  A poorly-configured firewall installed in a data center,
+organization or server may also be configured to limit IPv4 connections but
+leave IPv6 connections wide open.  In some cases, the CURL_IPRESOLVE_V4 option
+can be used to limit resolved addresses to IPv4 only and bypass these issues.
+
 .IP Uploads
 When uploading, a redirect can cause a local (or remote) file to be
 overwritten.  Apps must not allow any unsanitized URL to be passed in
@@ -1244,7 +1263,7 @@ using the Content-disposition: header to generate a file name.  An application
 could also use CURLINFO_EFFECTIVE_URL to generate a file name from a
 server-supplied redirect URL. Special care must be taken to sanitize such
 names to avoid the possibility of a malicious server supplying one like
-"/etc/passwd", "\autoexec.bat" or even ".bashrc".
+"/etc/passwd", "\\autoexec.bat", "prn:" or even ".bashrc".
 
 .IP "Server Certificates"
 A secure application should never use the CURLOPT_SSL_VERIFYPEER option to
@@ -1257,10 +1276,15 @@ validated certificates is potentially as insecure as a plain HTTP connection.
 On a related issue, be aware that even in situations like when you have
 problems with libcurl and ask someone for help, everything you reveal in order
 to get best possible help might also impose certain security related
-risks. Host names, user names, paths, operating system specifics, etc (not to
+risks. Host names, user names, paths, operating system specifics, etc. (not to
 mention passwords of course) may in fact be used by intruders to gain
 additional information of a potential target.
 
+Be sure to limit access to application logs if they could hold private or
+security-related data.  Besides the obvious candidates like user names and
+passwords, things like URLs, cookies or even file names could also hold
+sensitive data.
+
 To avoid this problem, you must of course use your common sense. Often, you
 can just edit out the sensitive data or just search/replace your true
 information with faked data.
@@ -1297,9 +1321,7 @@ ones at any time), you start the transfers by calling
 
 \fIcurl_multi_perform(3)\fP is asynchronous. It will only execute as little as
 possible and then return back control to your program. It is designed to never
-block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon,
-as that is a signal that it still has local data to send or remote data to
-receive.
+block.
 
 The best usage of this interface is when you do a select() on all possible
 file descriptors or sockets to know when to call libcurl again. This also
@@ -1335,9 +1357,21 @@ to figure out success on each individual transfer.
  [ seeding, passwords, keys, certificates, ENGINE, ca certs ]
 
 .SH "Sharing Data Between Easy Handles"
+You can share some data between easy handles when the easy interface is used,
+and some data is share automatically when you use the multi interface.
+
+When you add easy handles to a multi handle, these easy handles will
+automatically share a lot of the data that otherwise would be kept on a
+per-easy handle basis when the easy interface is used.
 
- [ fill in ]
+The DNS cache is shared between handles within a multi handle, making
+subsequent name resolving faster, and the connection pool that is kept to
+better allow persistent connections and connection re-use is also shared. If
+you're using the easy interface, you can still share these between specific
+easy handles by using the share interface, see \fIlibcurl-share(3)\fP.
 
+Some things are never shared automatically, not within multi handles, like for
+example cookies so the only way to share that is with the share interface.
 .SH "Footnotes"
 
 .IP "[1]"
index 593d191..56a0205 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl-tutorial man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -116,7 +118,7 @@ p.roffit {
 <p class="level0">If you then want to transfer another file, the handle is ready to be used again. Mind you, it is even preferred that you re-use an existing handle if you intend to make another transfer. libcurl will then attempt to re-use the previous connection. 
 <p class="level0">For some protocols, downloading a file can involve a complicated process of logging in, setting the transfer mode, changing the current directory and finally transferring the file data. libcurl takes care of all that complication for you. Given simply the URL to a file, libcurl will take care of all the details needed to get the file moved from one machine to another. 
 <p class="level0"><a name="Multi-threading"></a><h2 class="nroffsh">Multi-threading Issues</h2>
-<p class="level0">The first basic rule is that you must <span Class="bold">never</span> share a libcurl handle (be it easy or multi or whatever) between multiple threads. Only use one handle in one thread at a time. 
+<p class="level0">The first basic rule is that you must <span Class="bold">never</span> simultaneously share a libcurl handle (be it easy or multi or whatever) between multiple threads. Only use one handle in one thread at any time. You can pass the handles around among threads, but you must never use a single handle from more than one thread at any given time. 
 <p class="level0">libcurl is completely thread safe, except for two issues: signals and SSL/TLS handlers. Signals are used for timing out name resolves (during DNS lookup) - when built without c-ares support and not on Windows. 
 <p class="level0">If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are then of course using the underlying SSL library multi-threaded and those libs might have their own requirements on this issue. Basically, you need to provide one or two functions to allow it to function properly. For all details, see this: 
 <p class="level0">OpenSSL 
@@ -129,6 +131,10 @@ p.roffit {
 <p class="level0">&nbsp;Required actions unknown. 
 <p class="level0">yassl 
 <p class="level0">&nbsp;Required actions unknown. 
+<p class="level0">axTLS 
+<p class="level0">&nbsp;Required actions unknown. 
+<p class="level0">Secure Transport 
+<p class="level0">&nbsp;The engine is fully thread-safe, and no additional steps are required. 
 <p class="level0">When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1 for all handles. Everything will or might work fine except that timeouts are not honored during the DNS lookup - which you can work around by building libcurl with c-ares support. c-ares is a library that provides asynchronous name resolves. On some platforms, libcurl simply will not function properly multi-threaded unless this option is set. 
 <p class="level0">Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe. 
 <p class="level0"><a name="When"></a><h2 class="nroffsh">When It Doesn't Work</h2>
@@ -214,7 +220,7 @@ p.roffit {
  </pre>
 
 <p class="level0">
-<p class="level0">While the simple examples above cover the majority of all cases where HTTP POST operations are required, they don't do multi-part formposts. Multi-part formposts were introduced as a better way to post (possibly large) binary data and were first documented in the RFC1867 (updated in RFC2388). They're called multi-part because they're built by a chain of parts, each part being a single unit of data. Each part has its own name and contents. You can in fact create and post a multi-part formpost with the regular libcurl POST support described above, but that would require that you build a formpost yourself and provide to libcurl. To make that easier, libcurl provides <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Using this function, you add parts to the form. When you're done adding parts, you post the whole form. 
+<p class="level0">While the simple examples above cover the majority of all cases where HTTP POST operations are required, they don't do multi-part formposts. Multi-part formposts were introduced as a better way to post (possibly large) binary data and were first documented in the <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> (updated in RFC2388). They're called multi-part because they're built by a chain of parts, each part being a single unit of data. Each part has its own name and contents. You can in fact create and post a multi-part formpost with the regular libcurl POST support described above, but that would require that you build a formpost yourself and provide to libcurl. To make that easier, libcurl provides <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Using this function, you add parts to the form. When you're done adding parts, you post the whole form. 
 <p class="level0">The following example sets two simple text parts with plain textual contents, and then a file with binary contents and uploads the whole thing. 
 <p class="level0"><pre>
 <p class="level0">&nbsp;struct curl_httppost *post=NULL;
@@ -349,9 +355,6 @@ p.roffit {
 <p class="level0"><a name="Host"></a><span class="nroffip">Host</span> 
 <p class="level1">This header is required by HTTP 1.1 and even many 1.0 servers and should be the name of the server we want to talk to. This includes the port number if anything but default. 
 <p class="level1">
-<p class="level0"><a name="Pragma"></a><span class="nroffip">Pragma</span> 
-<p class="level1">"no-cache". Tells a possible proxy to not grab a copy from the cache but to fetch a fresh one. 
-<p class="level1">
 <p class="level0"><a name="Accept"></a><span class="nroffip">Accept</span> 
 <p class="level1">"*/*". 
 <p class="level1">
@@ -405,7 +408,7 @@ p.roffit {
 <p class="level0"><a name="FTP"></a><span class="nroffip">FTP Custom Commands</span> 
 <p class="level1">
 <p class="level1">Not all protocols are HTTP-like, and thus the above may not help you when you want to make, for example, your FTP transfers to behave differently. 
-<p class="level1">Sending custom commands to a FTP server means that you need to send the commands exactly as the FTP server expects them (RFC959 is a good guide here), and you can only use commands that work on the control-connection alone. All kinds of commands that require data interchange and thus need a data-connection must be left to libcurl's own judgement. Also be aware that libcurl will do its very best to change directory to the target directory before doing any transfer, so if you change directory (with CWD or similar) you might confuse libcurl and then it might not attempt to transfer the file in the correct remote directory. 
+<p class="level1">Sending custom commands to a FTP server means that you need to send the commands exactly as the FTP server expects them (<a href="http://www.ietf.org/rfc/rfc959.txt">RFC 959</a> is a good guide here), and you can only use commands that work on the control-connection alone. All kinds of commands that require data interchange and thus need a data-connection must be left to libcurl's own judgement. Also be aware that libcurl will do its very best to change directory to the target directory before doing any transfer, so if you change directory (with CWD or similar) you might confuse libcurl and then it might not attempt to transfer the file in the correct remote directory. 
 <p class="level1">A little example that deletes a given file before an operation: 
 <p class="level1"><pre>
 <p class="level1">&nbsp;headers = curl_slist_append(headers, "DELE file-to-remove");
@@ -477,10 +480,13 @@ p.roffit {
 <p class="level1">Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself, sanitizing URLs as necessary. Alternately, an app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses are sanitized before use. 
 <p class="level1">
 <p class="level0"><a name="Private"></a><span class="nroffip">Private Resources</span> 
-<p class="level1">A user who can control the DNS server of a domain being passed in within a URL can change the address of the host to a local, private address which the libcurl application will then use. e.g. The innocuous URL <a href="http://fuzzybunnies.example.com/">http://fuzzybunnies.example.com/</a> could actually resolve to the IP address of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3 Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION and checking the address before a connection. 
+<p class="level1">A user who can control the DNS server of a domain being passed in within a URL can change the address of the host to a local, private address which a server-side libcurl-using application could then use. e.g. the innocuous URL <a href="http://fuzzybunnies.example.com/">http://fuzzybunnies.example.com/</a> could actually resolve to the IP address of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3.  Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION and checking the address before a connection. 
 <p class="level1">All the malicious scenarios regarding redirected URLs apply just as well to non-redirected URLs, if the user is allowed to specify an arbitrary URL that could point to a private resource. For example, a web app providing a translation service might happily translate file://localhost/etc/passwd and display the result.  Apps can mitigate against this with the CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for redirections. 
 <p class="level1">A malicious FTP server could in response to the PASV command return an IP address and port number for a server local to the app running libcurl but behind a firewall.  Apps can mitigate against this by using the CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT. 
 <p class="level1">
+<p class="level0"><a name="IPv6"></a><span class="nroffip">IPv6 Addresses</span> 
+<p class="level1">libcurl will normally handle IPv6 addresses transparently and just as easily as IPv4 addresses. That means that a sanitizing function that filters out addressses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1, ::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker would all bypass a naive filter and could allow access to undesired local resources.  IPv6 also has special address blocks like link-local and site-local that generally shouldn't be accessed by a server-side libcurl-using application.  A poorly-configured firewall installed in a data center, organization or server may also be configured to limit IPv4 connections but leave IPv6 connections wide open.  In some cases, the CURL_IPRESOLVE_V4 option can be used to limit resolved addresses to IPv4 only and bypass these issues. 
+<p class="level1">
 <p class="level0"><a name="Uploads"></a><span class="nroffip">Uploads</span> 
 <p class="level1">When uploading, a redirect can cause a local (or remote) file to be overwritten.  Apps must not allow any unsanitized URL to be passed in for uploads.  Also, CURLOPT_FOLLOWLOCATION should not be used on uploads. Instead, the app should handle redirects itself, sanitizing each URL first. 
 <p class="level1">
@@ -505,13 +511,14 @@ p.roffit {
 <p class="level1">User-supplied data must be sanitized when used in options like CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that are used to generate structured data. Characters like embedded carriage returns or ampersands could allow the user to create additional headers or fields that could cause malicious transactions. 
 <p class="level1">
 <p class="level0"><a name="Server-supplied"></a><span class="nroffip">Server-supplied Names</span> 
-<p class="level1">A server can supply data which the application may, in some cases, use as a file name. The curl command-line tool does this with --remote-header-name, using the Content-disposition: header to generate a file name.  An application could also use CURLINFO_EFFECTIVE_URL to generate a file name from a server-supplied redirect URL. Special care must be taken to sanitize such names to avoid the possibility of a malicious server supplying one like "/etc/passwd", "autoexec.bat" or even ".bashrc". 
+<p class="level1">A server can supply data which the application may, in some cases, use as a file name. The curl command-line tool does this with --remote-header-name, using the Content-disposition: header to generate a file name.  An application could also use CURLINFO_EFFECTIVE_URL to generate a file name from a server-supplied redirect URL. Special care must be taken to sanitize such names to avoid the possibility of a malicious server supplying one like "/etc/passwd", "\autoexec.bat", "prn:" or even ".bashrc". 
 <p class="level1">
 <p class="level0"><a name="Server"></a><span class="nroffip">Server Certificates</span> 
 <p class="level1">A secure application should never use the CURLOPT_SSL_VERIFYPEER option to disable certificate validation. There are numerous attacks that are enabled by apps that fail to properly validate server TLS/SSL certificates, thus enabling a malicious server to spoof a legitimate one. HTTPS without validated certificates is potentially as insecure as a plain HTTP connection. 
 <p class="level1">
 <p class="level0"><a name="Showing"></a><span class="nroffip">Showing What You Do</span> 
-<p class="level1">On a related issue, be aware that even in situations like when you have problems with libcurl and ask someone for help, everything you reveal in order to get best possible help might also impose certain security related risks. Host names, user names, paths, operating system specifics, etc (not to mention passwords of course) may in fact be used by intruders to gain additional information of a potential target. 
+<p class="level1">On a related issue, be aware that even in situations like when you have problems with libcurl and ask someone for help, everything you reveal in order to get best possible help might also impose certain security related risks. Host names, user names, paths, operating system specifics, etc. (not to mention passwords of course) may in fact be used by intruders to gain additional information of a potential target. 
+<p class="level1">Be sure to limit access to application logs if they could hold private or security-related data.  Besides the obvious candidates like user names and passwords, things like URLs, cookies or even file names could also hold sensitive data. 
 <p class="level1">To avoid this problem, you must of course use your common sense. Often, you can just edit out the sensitive data or just search/replace your true information with faked data. 
 <p class="level1"><a name="Multiple"></a><h2 class="nroffsh">Multiple Transfers Using the multi Interface</h2>
 <p class="level0">
@@ -520,7 +527,7 @@ p.roffit {
 <p class="level0">To use this interface, you are better off if you first understand the basics of how to use the easy interface. The multi interface is simply a way to make multiple transfers at the same time by adding up multiple easy handles into a "multi stack". 
 <p class="level0">You create the easy handles you want and you set all the options just like you have been told above, and then you create a multi handle with <a class="emphasis" href="./curl_multi_init.html">curl_multi_init(3)</a> and add all those easy handles to that multi handle with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a>. 
 <p class="level0">When you've added the handles you have for the moment (you can still add new ones at any time), you start the transfers by calling <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. 
-<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> is asynchronous. It will only execute as little as possible and then return back control to your program. It is designed to never block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon, as that is a signal that it still has local data to send or remote data to receive. 
+<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> is asynchronous. It will only execute as little as possible and then return back control to your program. It is designed to never block. 
 <p class="level0">The best usage of this interface is when you do a select() on all possible file descriptors or sockets to know when to call libcurl again. This also makes it easy for you to wait and respond to actions on your own application's sockets/handles. You figure out what to select() for by using <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a>, that fills in a set of fd_set variables for you with the particular file descriptors libcurl uses for the moment. 
 <p class="level0">When you then call select(), it'll return when one of the file handles signal action and you then call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> to allow libcurl to do what it wants to do. Take note that libcurl does also feature some time-out code so we advise you to never use very long timeouts on select() before you call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, which thus should be called unconditionally every now and then even if none of its file descriptors have signaled ready. Another precaution you should use: always call <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> immediately before the select() call since the current set of file descriptors may change when calling a curl function. 
 <p class="level0">If you want to stop the transfer of one of the easy handles in the stack, you can use <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> to remove individual easy handles. Remember that easy handles should be <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>ed. 
@@ -530,9 +537,10 @@ p.roffit {
 <p class="level0">
 <p class="level0">&nbsp;[ seeding, passwords, keys, certificates, ENGINE, ca certs ] 
 <p class="level0"><a name="Sharing"></a><h2 class="nroffsh">Sharing Data Between Easy Handles</h2>
-<p class="level0">
-<p class="level0">&nbsp;[ fill in ] 
-<p class="level0"><a name="Footnotes"></a><h2 class="nroffsh">Footnotes</h2>
+<p class="level0">You can share some data between easy handles when the easy interface is used, and some data is share automatically when you use the multi interface. 
+<p class="level0">When you add easy handles to a multi handle, these easy handles will automatically share a lot of the data that otherwise would be kept on a per-easy handle basis when the easy interface is used. 
+<p class="level0">The DNS cache is shared between handles within a multi handle, making subsequent name resolving faster, and the connection pool that is kept to better allow persistent connections and connection re-use is also shared. If you're using the easy interface, you can still share these between specific easy handles by using the share interface, see <span Class="emphasis">libcurl-share(3)</span>. 
+<p class="level0">Some things are never shared automatically, not within multi handles, like for example cookies so the only way to share that is with the share interface. <a name="Footnotes"></a><h2 class="nroffsh">Footnotes</h2>
 <p class="level0">
 <p class="level0">
 <p class="level0"><a name="1"></a><span class="nroffip">[1]</span> 
index c538d19..ab87af1 100644 (file)
Binary files a/docs/libcurl/libcurl-tutorial.pdf and b/docs/libcurl/libcurl-tutorial.pdf differ
index c0b221f..d2dcd78 100644 (file)
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" *                                  _   _ ____  _
+.\" *  Project                     ___| | | |  _ \| |
+.\" *                             / __| | | | |_) | |
+.\" *                            | (__| |_| |  _ <| |___
+.\" *                             \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, 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.
+.\" *
+.\" **************************************************************************
 .TH libcurl 3 "19 March 2002" "libcurl 7.9.6" "libcurl overview"
 .SH NAME
 libcurl \- client-side URL transfers
index 43b9bdd..e1c00f0 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index 952b79f..d7d5a52 100644 (file)
@@ -146,7 +146,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
            _libcurl_save_libs=$LIBS
            LIBS="$LIBCURL $LIBS"
 
-           AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
 /* Try and use a few common options to force a failure if we are
    missing symbols or can't link. */
 int x;
@@ -157,7 +157,8 @@ x=CURLOPT_FILE;
 x=CURLOPT_ERRORBUFFER;
 x=CURLOPT_STDERR;
 x=CURLOPT_VERBOSE;
-]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+if (x) ;
+]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
 
            CPPFLAGS=$_libcurl_save_cppflags
            LIBS=$_libcurl_save_libs
index 0f777df..4099137 100644 (file)
Binary files a/docs/libcurl/libcurl.pdf and b/docs/libcurl/libcurl.pdf differ
index e22b625..e61cbbe 100644 (file)
@@ -20,6 +20,7 @@ CURLAUTH_DIGEST_IE              7.19.3
 CURLAUTH_GSSNEGOTIATE           7.10.6
 CURLAUTH_NONE                   7.10.6
 CURLAUTH_NTLM                   7.10.6
+CURLAUTH_NTLM_WB                7.22.0
 CURLAUTH_ONLY                   7.21.3
 CURLCLOSEPOLICY_CALLBACK        7.7
 CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
@@ -34,8 +35,8 @@ CURLE_BAD_CALLING_ORDER         7.1           7.17.0
 CURLE_BAD_CONTENT_ENCODING      7.10
 CURLE_BAD_DOWNLOAD_RESUME       7.10
 CURLE_BAD_FUNCTION_ARGUMENT     7.1
-CURLE_BAD_PASSWORD_ENTERED      -             7.17.0
-CURLE_CHUNK_FAILED              7.20.1
+CURLE_BAD_PASSWORD_ENTERED      7.4.2         7.17.0
+CURLE_CHUNK_FAILED              7.21.0
 CURLE_CONV_FAILED               7.15.4
 CURLE_CONV_REQD                 7.15.4
 CURLE_COULDNT_CONNECT           7.1
@@ -44,10 +45,11 @@ CURLE_COULDNT_RESOLVE_PROXY     7.1
 CURLE_FAILED_INIT               7.1
 CURLE_FILESIZE_EXCEEDED         7.10.8
 CURLE_FILE_COULDNT_READ_FILE    7.1
+CURLE_FTP_ACCEPT_FAILED         7.24.0
+CURLE_FTP_ACCEPT_TIMEOUT        7.24.0
 CURLE_FTP_ACCESS_DENIED         7.1
-CURLE_FTP_BAD_DOWNLOAD_RESUME   7.1
 CURLE_FTP_BAD_DOWNLOAD_RESUME   7.1           7.1
-CURLE_FTP_BAD_FILE_LIST         7.20.1
+CURLE_FTP_BAD_FILE_LIST         7.21.0
 CURLE_FTP_CANT_GET_HOST         7.1
 CURLE_FTP_CANT_RECONNECT        7.1           7.17.0
 CURLE_FTP_COULDNT_GET_SIZE      7.1           7.17.0
@@ -61,7 +63,7 @@ CURLE_FTP_PARTIAL_FILE          7.1           7.1
 CURLE_FTP_PORT_FAILED           7.1
 CURLE_FTP_PRET_FAILED           7.20.0
 CURLE_FTP_QUOTE_ERROR           7.1           7.17.0
-CURLE_FTP_SSL_FAILED            -             7.17.0
+CURLE_FTP_SSL_FAILED            7.11.0        7.17.0
 CURLE_FTP_USER_PASSWORD_INCORRECT 7.1         7.17.0
 CURLE_FTP_WEIRD_227_FORMAT      7.1
 CURLE_FTP_WEIRD_PASS_REPLY      7.1
@@ -72,7 +74,7 @@ CURLE_FTP_WRITE_ERROR           7.1           7.17.0
 CURLE_FUNCTION_NOT_FOUND        7.1
 CURLE_GOT_NOTHING               7.9.1
 CURLE_HTTP_NOT_FOUND            7.1
-CURLE_HTTP_PORT_FAILED          -             7.12.0
+CURLE_HTTP_PORT_FAILED          7.3           7.12.0
 CURLE_HTTP_POST_ERROR           7.1
 CURLE_HTTP_RANGE_ERROR          7.1           7.17.0
 CURLE_HTTP_RETURNED_ERROR       7.10.3
@@ -83,8 +85,10 @@ CURLE_LDAP_SEARCH_FAILED        7.1
 CURLE_LIBRARY_NOT_FOUND         7.1           7.17.0
 CURLE_LOGIN_DENIED              7.13.1
 CURLE_MALFORMAT_USER            7.1           7.17.0
+CURLE_NO_CONNECTION_AVAILABLE   7.30.0
+CURLE_NOT_BUILT_IN              7.21.5
 CURLE_OK                        7.1
-CURLE_OPERATION_TIMEDOUT        7.17.0
+CURLE_OPERATION_TIMEDOUT        7.10.2
 CURLE_OPERATION_TIMEOUTED       7.1           7.17.0
 CURLE_OUT_OF_MEMORY             7.1
 CURLE_PARTIAL_FILE              7.1
@@ -92,16 +96,16 @@ CURLE_PEER_FAILED_VERIFICATION  7.17.1
 CURLE_QUOTE_ERROR               7.17.0
 CURLE_RANGE_ERROR               7.17.0
 CURLE_READ_ERROR                7.1
-CURLE_RECV_ERROR                7.13.0
+CURLE_RECV_ERROR                7.10
 CURLE_REMOTE_ACCESS_DENIED      7.17.0
 CURLE_REMOTE_DISK_FULL          7.17.0
 CURLE_REMOTE_FILE_EXISTS        7.17.0
 CURLE_REMOTE_FILE_NOT_FOUND     7.16.1
 CURLE_RTSP_CSEQ_ERROR           7.20.0
 CURLE_RTSP_SESSION_ERROR        7.20.0
-CURLE_SEND_ERROR                7.13.0
+CURLE_SEND_ERROR                7.10
 CURLE_SEND_FAIL_REWIND          7.12.3
-CURLE_SHARE_IN_USE              -             7.17.0
+CURLE_SHARE_IN_USE              7.9.6         7.17.0
 CURLE_SSH                       7.16.1
 CURLE_SSL_CACERT                7.10
 CURLE_SSL_CACERT_BADFILE        7.16.0
@@ -109,11 +113,11 @@ CURLE_SSL_CERTPROBLEM           7.10
 CURLE_SSL_CIPHER                7.10
 CURLE_SSL_CONNECT_ERROR         7.1
 CURLE_SSL_CRL_BADFILE           7.19.0
-CURLE_SSL_ENGINE_INITFAILED     7.13.0
+CURLE_SSL_ENGINE_INITFAILED     7.12.3
 CURLE_SSL_ENGINE_NOTFOUND       7.9.3
 CURLE_SSL_ENGINE_SETFAILED      7.9.3
 CURLE_SSL_ISSUER_ERROR          7.19.0
-CURLE_SSL_PEER_CERTIFICATE      -             7.17.1
+CURLE_SSL_PEER_CERTIFICATE      7.8           7.17.1
 CURLE_SSL_SHUTDOWN_FAILED       7.16.1
 CURLE_TELNET_OPTION_SYNTAX      7.7
 CURLE_TFTP_DISKFULL             7.15.0        7.17.0
@@ -124,6 +128,7 @@ CURLE_TFTP_NOTFOUND             7.15.0
 CURLE_TFTP_PERM                 7.15.0
 CURLE_TFTP_UNKNOWNID            7.15.0
 CURLE_TOO_MANY_REDIRECTS        7.5
+CURLE_UNKNOWN_OPTION            7.21.5
 CURLE_UNKNOWN_TELNET_OPTION     7.7
 CURLE_UNSUPPORTED_PROTOCOL      7.1
 CURLE_UPLOAD_FAILED             7.16.3
@@ -149,36 +154,35 @@ CURLFINFOFLAG_KNOWN_SIZE        7.21.0
 CURLFINFOFLAG_KNOWN_TIME        7.21.0
 CURLFINFOFLAG_KNOWN_UID         7.21.0
 CURLFORM_ARRAY                  7.9.1
+CURLFORM_ARRAY_END              7.9.1         7.9.5       7.9.6
+CURLFORM_ARRAY_START            7.9.1         7.9.5       7.9.6
 CURLFORM_BUFFER                 7.9.8
 CURLFORM_BUFFERLENGTH           7.9.8
 CURLFORM_BUFFERPTR              7.9.8
 CURLFORM_CONTENTHEADER          7.9.3
-CURLFORM_CONTENTSLENGTH         7.9.1
-CURLFORM_CONTENTTYPE            7.9.1
-CURLFORM_COPYCONTENTS           7.9.1
-CURLFORM_COPYNAME               7.9.1
-CURLFORM_END                    7.9.1
-CURLFORM_FILE                   7.9.1
+CURLFORM_CONTENTSLENGTH         7.9
+CURLFORM_CONTENTTYPE            7.9
+CURLFORM_COPYCONTENTS           7.9
+CURLFORM_COPYNAME               7.9
+CURLFORM_END                    7.9
+CURLFORM_FILE                   7.9
 CURLFORM_FILECONTENT            7.9.1
 CURLFORM_FILENAME               7.9.6
-CURLFORM_NAMELENGTH             7.9.1
-CURLFORM_NOTHING                7.9.1
-CURLFORM_PTRCONTENTS            7.9.1
-CURLFORM_PTRNAME                7.9.1
+CURLFORM_NAMELENGTH             7.9
+CURLFORM_NOTHING                7.9
+CURLFORM_PTRCONTENTS            7.9
+CURLFORM_PTRNAME                7.9
 CURLFORM_STREAM                 7.18.2
 CURLFTPAUTH_DEFAULT             7.12.2
-CURLFTPAUTH_DEFAULT             7.12.2
-CURLFTPAUTH_SSL                 7.12.2
 CURLFTPAUTH_SSL                 7.12.2
 CURLFTPAUTH_TLS                 7.12.2
-CURLFTPAUTH_TLS                 7.12.2
-CURLFTPMETHOD_DEFAULT           7.15.1
-CURLFTPMETHOD_MULTICWD          7.15.1
-CURLFTPMETHOD_NOCWD             7.15.1
-CURLFTPMETHOD_SINGLECWD         7.15.1
-CURLFTPSSL_ALL                  -             7.17.0
-CURLFTPSSL_CCC_ACTIVE           7.16.1
-CURLFTPSSL_CCC_NONE             7.16.1
+CURLFTPMETHOD_DEFAULT           7.15.3
+CURLFTPMETHOD_MULTICWD          7.15.3
+CURLFTPMETHOD_NOCWD             7.15.3
+CURLFTPMETHOD_SINGLECWD         7.15.3
+CURLFTPSSL_ALL                  7.11.0        7.17.0
+CURLFTPSSL_CCC_ACTIVE           7.16.2
+CURLFTPSSL_CCC_NONE             7.16.2
 CURLFTPSSL_CCC_PASSIVE          7.16.1
 CURLFTPSSL_CONTROL              7.11.0        7.17.0
 CURLFTPSSL_NONE                 7.11.0        7.17.0
@@ -186,6 +190,9 @@ CURLFTPSSL_TRY                  7.11.0        7.17.0
 CURLFTP_CREATE_DIR              7.19.4
 CURLFTP_CREATE_DIR_NONE         7.19.4
 CURLFTP_CREATE_DIR_RETRY        7.19.4
+CURLGSSAPI_DELEGATION_FLAG      7.22.0
+CURLGSSAPI_DELEGATION_NONE      7.22.0
+CURLGSSAPI_DELEGATION_POLICY_FLAG 7.22.0
 CURLINFO_APPCONNECT_TIME        7.19.0
 CURLINFO_CERTINFO               7.19.1
 CURLINFO_CONDITION_UNMET        7.19.4
@@ -197,8 +204,8 @@ CURLINFO_COOKIELIST             7.14.1
 CURLINFO_DATA_IN                7.9.6
 CURLINFO_DATA_OUT               7.9.6
 CURLINFO_DOUBLE                 7.4.1
-CURLINFO_EFFECTIVE_URL          7.3
-CURLINFO_END                    7.4.1
+CURLINFO_EFFECTIVE_URL          7.4
+CURLINFO_END                    7.9.6
 CURLINFO_FILETIME               7.5
 CURLINFO_FTP_ENTRY_PATH         7.15.4
 CURLINFO_HEADER_IN              7.9.6
@@ -221,7 +228,6 @@ CURLINFO_PRETRANSFER_TIME       7.4.1
 CURLINFO_PRIMARY_IP             7.19.0
 CURLINFO_PRIMARY_PORT           7.21.0
 CURLINFO_PRIVATE                7.10.3
-CURLINFO_PRIVATE                7.10.3
 CURLINFO_PROXYAUTH_AVAIL        7.10.8
 CURLINFO_REDIRECT_COUNT         7.9.7
 CURLINFO_REDIRECT_TIME          7.9.7
@@ -262,8 +268,15 @@ CURLKHTYPE_DSS                  7.19.6
 CURLKHTYPE_RSA                  7.19.6
 CURLKHTYPE_RSA1                 7.19.6
 CURLKHTYPE_UNKNOWN              7.19.6
+CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_MAX_HOST_CONNECTIONS   7.30.0
+CURLMOPT_MAX_PIPELINE_LENGTH    7.30.0
+CURLMOPT_MAX_TOTAL_CONNECTIONS  7.30.0
 CURLMOPT_MAXCONNECTS            7.16.3
 CURLMOPT_PIPELINING             7.16.0
+CURLMOPT_PIPELINING_SERVER_BL   7.30.0
+CURLMOPT_PIPELINING_SITE_BL     7.30.0
 CURLMOPT_SOCKETDATA             7.15.4
 CURLMOPT_SOCKETFUNCTION         7.15.4
 CURLMOPT_TIMERDATA              7.16.0
@@ -283,8 +296,10 @@ CURLOPTTYPE_FUNCTIONPOINT       7.1
 CURLOPTTYPE_LONG                7.1
 CURLOPTTYPE_OBJECTPOINT         7.1
 CURLOPTTYPE_OFF_T               7.11.0
+CURLOPT_ACCEPTTIMEOUT_MS        7.24.0
+CURLOPT_ACCEPT_ENCODING         7.21.6
 CURLOPT_ADDRESS_SCOPE           7.19.0
-CURLOPT_APPEND                  7.16.4
+CURLOPT_APPEND                  7.17.0
 CURLOPT_AUTOREFERER             7.1
 CURLOPT_BUFFERSIZE              7.10
 CURLOPT_CAINFO                  7.4.2
@@ -293,8 +308,10 @@ CURLOPT_CERTINFO                7.19.1
 CURLOPT_CHUNK_BGN_FUNCTION      7.21.0
 CURLOPT_CHUNK_DATA              7.21.0
 CURLOPT_CHUNK_END_FUNCTION      7.21.0
-CURLOPT_CLOSEFUNCTION           7.7           7.11.1      7.15.4
+CURLOPT_CLOSEFUNCTION           7.7           7.11.1      7.15.5
 CURLOPT_CLOSEPOLICY             7.7           7.16.1
+CURLOPT_CLOSESOCKETDATA         7.21.7
+CURLOPT_CLOSESOCKETFUNCTION     7.21.7
 CURLOPT_CONNECTTIMEOUT          7.7
 CURLOPT_CONNECTTIMEOUT_MS       7.16.2
 CURLOPT_CONNECT_ONLY            7.15.2
@@ -304,7 +321,7 @@ CURLOPT_CONV_TO_NETWORK_FUNCTION 7.15.4
 CURLOPT_COOKIE                  7.1
 CURLOPT_COOKIEFILE              7.1
 CURLOPT_COOKIEJAR               7.9
-CURLOPT_COOKIELIST              7.17.1
+CURLOPT_COOKIELIST              7.14.1
 CURLOPT_COOKIESESSION           7.9.7
 CURLOPT_COPYPOSTFIELDS          7.17.1
 CURLOPT_CRLF                    7.1
@@ -312,27 +329,27 @@ CURLOPT_CRLFILE                 7.19.0
 CURLOPT_CUSTOMREQUEST           7.1
 CURLOPT_DEBUGDATA               7.9.6
 CURLOPT_DEBUGFUNCTION           7.9.6
-CURLOPT_DIRLISTONLY             7.16.4
+CURLOPT_DIRLISTONLY             7.17.0
 CURLOPT_DNS_CACHE_TIMEOUT       7.9.3
+CURLOPT_DNS_SERVERS             7.24.0
 CURLOPT_DNS_USE_GLOBAL_CACHE    7.9.3         7.11.1
 CURLOPT_EGDSOCKET               7.7
-CURLOPT_ENCODING                7.12.2
+CURLOPT_ENCODING                7.10
 CURLOPT_ERRORBUFFER             7.1
 CURLOPT_FAILONERROR             7.1
 CURLOPT_FILE                    7.1           7.9.7
 CURLOPT_FILETIME                7.5
-CURLOPT_FLAGS                   7.1           -           7.9.2
 CURLOPT_FNMATCH_DATA            7.21.0
 CURLOPT_FNMATCH_FUNCTION        7.21.0
 CURLOPT_FOLLOWLOCATION          7.1
 CURLOPT_FORBID_REUSE            7.7
 CURLOPT_FRESH_CONNECT           7.7
 CURLOPT_FTPAPPEND               7.1           7.16.4
-CURLOPT_FTPASCII                7.1           7.11.1      7.15.4
+CURLOPT_FTPASCII                7.1           7.11.1      7.15.5
 CURLOPT_FTPLISTONLY             7.1           7.16.4
 CURLOPT_FTPPORT                 7.1
 CURLOPT_FTPSSLAUTH              7.12.2
-CURLOPT_FTP_ACCOUNT             7.13.1
+CURLOPT_FTP_ACCOUNT             7.13.0
 CURLOPT_FTP_ALTERNATIVE_TO_USER 7.15.5
 CURLOPT_FTP_CREATE_MISSING_DIRS 7.10.7
 CURLOPT_FTP_FILEMETHOD          7.15.1
@@ -343,6 +360,7 @@ CURLOPT_FTP_SSL_CCC             7.16.1
 CURLOPT_FTP_USE_EPRT            7.10.5
 CURLOPT_FTP_USE_EPSV            7.9.2
 CURLOPT_FTP_USE_PRET            7.20.0
+CURLOPT_GSSAPI_DELEGATION       7.22.0
 CURLOPT_HEADER                  7.1
 CURLOPT_HEADERDATA              7.10
 CURLOPT_HEADERFUNCTION          7.7.2
@@ -352,7 +370,7 @@ CURLOPT_HTTPGET                 7.8.1
 CURLOPT_HTTPHEADER              7.1
 CURLOPT_HTTPPOST                7.1
 CURLOPT_HTTPPROXYTUNNEL         7.3
-CURLOPT_HTTPREQUEST             7.1           -           7.15.4
+CURLOPT_HTTPREQUEST             7.1           -           7.15.5
 CURLOPT_HTTP_CONTENT_DECODING   7.16.2
 CURLOPT_HTTP_TRANSFER_DECODING  7.16.2
 CURLOPT_HTTP_VERSION            7.9.1
@@ -369,11 +387,12 @@ CURLOPT_IPRESOLVE               7.10.8
 CURLOPT_ISSUERCERT              7.19.0
 CURLOPT_KEYPASSWD               7.17.0
 CURLOPT_KRB4LEVEL               7.3           7.17.0
-CURLOPT_KRBLEVEL                7.17.0
+CURLOPT_KRBLEVEL                7.16.4
 CURLOPT_LOCALPORT               7.15.2
 CURLOPT_LOCALPORTRANGE          7.15.2
 CURLOPT_LOW_SPEED_LIMIT         7.1
 CURLOPT_LOW_SPEED_TIME          7.1
+CURLOPT_MAIL_AUTH               7.25.0
 CURLOPT_MAIL_FROM               7.20.0
 CURLOPT_MAIL_RCPT               7.20.0
 CURLOPT_MAXCONNECTS             7.7
@@ -382,7 +401,7 @@ CURLOPT_MAXFILESIZE_LARGE       7.11.0
 CURLOPT_MAXREDIRS               7.5
 CURLOPT_MAX_RECV_SPEED_LARGE    7.15.5
 CURLOPT_MAX_SEND_SPEED_LARGE    7.15.5
-CURLOPT_MUTE                    7.1           7.8         7.15.4
+CURLOPT_MUTE                    7.1           7.8         7.15.5
 CURLOPT_NETRC                   7.1
 CURLOPT_NETRC_FILE              7.11.0
 CURLOPT_NEW_DIRECTORY_PERMS     7.16.4
@@ -391,12 +410,13 @@ CURLOPT_NOBODY                  7.1
 CURLOPT_NOPROGRESS              7.1
 CURLOPT_NOPROXY                 7.19.4
 CURLOPT_NOSIGNAL                7.10
+CURLOPT_NOTHING                 7.1.1         7.11.1      7.11.0
 CURLOPT_OPENSOCKETDATA          7.17.1
 CURLOPT_OPENSOCKETFUNCTION      7.17.1
-CURLOPT_PASSWDDATA              7.1           7.11.1      7.15.4
-CURLOPT_PASSWDFUNCTION          7.1           7.11.1      7.15.4
+CURLOPT_PASSWDDATA              7.4.2         7.11.1      7.15.5
+CURLOPT_PASSWDFUNCTION          7.4.2         7.11.1      7.15.5
 CURLOPT_PASSWORD                7.19.1
-CURLOPT_PASV_POST               7.12.1        -           7.13.0
+CURLOPT_PASV_HOST               7.12.1        7.16.0      7.15.5
 CURLOPT_PORT                    7.1
 CURLOPT_POST                    7.1
 CURLOPT_POST301                 7.17.1        7.19.1
@@ -408,8 +428,7 @@ CURLOPT_POSTREDIR               7.19.1
 CURLOPT_PREQUOTE                7.9.5
 CURLOPT_PRIVATE                 7.10.3
 CURLOPT_PROGRESSDATA            7.1
-CURLOPT_PROGRESSFUNCTION        7.1
-CURLOPT_PROGRESSMODE            7.1           -           7.9.2
+CURLOPT_PROGRESSFUNCTION        7.1           7.32.0
 CURLOPT_PROTOCOLS               7.19.4
 CURLOPT_PROXY                   7.1
 CURLOPT_PROXYAUTH               7.10.7
@@ -437,22 +456,23 @@ CURLOPT_RTSP_SERVER_CSEQ        7.20.0
 CURLOPT_RTSP_SESSION_ID         7.20.0
 CURLOPT_RTSP_STREAM_URI         7.20.0
 CURLOPT_RTSP_TRANSPORT          7.20.0
-CURLOPT_SEEKDATA                7.18.1
-CURLOPT_SEEKFUNCTION            7.18.1
+CURLOPT_SASL_IR                 7.31.0
+CURLOPT_SEEKDATA                7.18.0
+CURLOPT_SEEKFUNCTION            7.18.0
 CURLOPT_SERVER_RESPONSE_TIMEOUT 7.20.0
 CURLOPT_SHARE                   7.10
 CURLOPT_SOCKOPTDATA             7.16.0
 CURLOPT_SOCKOPTFUNCTION         7.16.0
 CURLOPT_SOCKS5_GSSAPI_NEC       7.19.4
 CURLOPT_SOCKS5_GSSAPI_SERVICE   7.19.4
-CURLOPT_SOURCE_HOST             7.12.1        -           7.13.0
-CURLOPT_SOURCE_PATH             7.12.1        -           7.13.0
-CURLOPT_SOURCE_PORT             7.12.1        -           7.13.0
-CURLOPT_SOURCE_POSTQUOTE        7.12.1        -           7.15.4
-CURLOPT_SOURCE_PREQUOTE         7.12.1        -           7.15.4
-CURLOPT_SOURCE_QUOTE            7.13.0        -           7.15.4
-CURLOPT_SOURCE_URL              7.13.0        -           7.15.4
-CURLOPT_SOURCE_USERPWD          7.12.1        -           7.15.4
+CURLOPT_SOURCE_HOST             7.12.1        -           7.15.5
+CURLOPT_SOURCE_PATH             7.12.1        -           7.15.5
+CURLOPT_SOURCE_PORT             7.12.1        -           7.15.5
+CURLOPT_SOURCE_POSTQUOTE        7.12.1        -           7.15.5
+CURLOPT_SOURCE_PREQUOTE         7.12.1        -           7.15.5
+CURLOPT_SOURCE_QUOTE            7.13.0        -           7.15.5
+CURLOPT_SOURCE_URL              7.13.0        -           7.15.5
+CURLOPT_SOURCE_USERPWD          7.12.1        -           7.15.5
 CURLOPT_SSH_AUTH_TYPES          7.16.1
 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
 CURLOPT_SSH_KEYDATA             7.19.6
@@ -461,22 +481,25 @@ CURLOPT_SSH_KNOWNHOSTS          7.19.6
 CURLOPT_SSH_PRIVATE_KEYFILE     7.16.1
 CURLOPT_SSH_PUBLIC_KEYFILE      7.16.1
 CURLOPT_SSLCERT                 7.1
-CURLOPT_SSLCERTPASSWD           7.17.0
+CURLOPT_SSLCERTPASSWD           7.1.1         7.17.0
 CURLOPT_SSLCERTTYPE             7.9.3
 CURLOPT_SSLENGINE               7.9.3
 CURLOPT_SSLENGINE_DEFAULT       7.9.3
 CURLOPT_SSLKEY                  7.9.3
-CURLOPT_SSLKEYPASSWD            7.17.0
-CURLOPT_SSLKEYPASSWD            7.17.0
+CURLOPT_SSLKEYPASSWD            7.9.3         7.17.0
 CURLOPT_SSLKEYTYPE              7.9.3
 CURLOPT_SSLVERSION              7.1
 CURLOPT_SSL_CIPHER_LIST         7.9
 CURLOPT_SSL_CTX_DATA            7.10.6
 CURLOPT_SSL_CTX_FUNCTION        7.10.6
+CURLOPT_SSL_OPTIONS             7.25.0
 CURLOPT_SSL_SESSIONID_CACHE     7.16.0
 CURLOPT_SSL_VERIFYHOST          7.8.1
 CURLOPT_SSL_VERIFYPEER          7.4.2
 CURLOPT_STDERR                  7.1
+CURLOPT_TCP_KEEPALIVE           7.25.0
+CURLOPT_TCP_KEEPIDLE            7.25.0
+CURLOPT_TCP_KEEPINTVL           7.25.0
 CURLOPT_TCP_NODELAY             7.11.2
 CURLOPT_TELNETOPTIONS           7.7
 CURLOPT_TFTP_BLKSIZE            7.19.4
@@ -484,7 +507,11 @@ CURLOPT_TIMECONDITION           7.1
 CURLOPT_TIMEOUT                 7.1
 CURLOPT_TIMEOUT_MS              7.16.2
 CURLOPT_TIMEVALUE               7.1
-CURLOPT_TRANSFERTEXT            7.11.1
+CURLOPT_TLSAUTH_PASSWORD        7.21.4
+CURLOPT_TLSAUTH_TYPE            7.21.4
+CURLOPT_TLSAUTH_USERNAME        7.21.4
+CURLOPT_TRANSFERTEXT            7.1.1
+CURLOPT_TRANSFER_ENCODING       7.21.6
 CURLOPT_UNRESTRICTED_AUTH       7.10.4
 CURLOPT_UPLOAD                  7.1
 CURLOPT_URL                     7.1
@@ -498,6 +525,8 @@ CURLOPT_WRITEDATA               7.9.7
 CURLOPT_WRITEFUNCTION           7.1
 CURLOPT_WRITEHEADER             7.1
 CURLOPT_WRITEINFO               7.1
+CURLOPT_XFERINFODATA            7.32.0
+CURLOPT_XFERINFOFUNCTION        7.32.0
 CURLPAUSE_ALL                   7.18.0
 CURLPAUSE_CONT                  7.18.0
 CURLPAUSE_RECV                  7.18.0
@@ -540,7 +569,8 @@ CURLPROXY_SOCKS5_HOSTNAME       7.18.0
 CURLSHE_BAD_OPTION              7.10.3
 CURLSHE_INVALID                 7.10.3
 CURLSHE_IN_USE                  7.10.3
-CURLSHE_NOMEM                   7.10.3
+CURLSHE_NOMEM                   7.12.0
+CURLSHE_NOT_BUILT_IN            7.23.0
 CURLSHE_OK                      7.10.3
 CURLSHOPT_LOCKFUNC              7.10.3
 CURLSHOPT_NONE                  7.10.3
@@ -548,7 +578,9 @@ CURLSHOPT_SHARE                 7.10.3
 CURLSHOPT_UNLOCKFUNC            7.10.3
 CURLSHOPT_UNSHARE               7.10.3
 CURLSHOPT_USERDATA              7.10.3
-CURLSOCKTYPE_IPCXN              7.15.6
+CURLSOCKTYPE_ACCEPT             7.28.0
+CURLSOCKTYPE_IPCXN              7.16.0
+CURLSSH_AUTH_AGENT              7.28.0
 CURLSSH_AUTH_ANY                7.16.1
 CURLSSH_AUTH_DEFAULT            7.16.1
 CURLSSH_AUTH_HOST               7.16.1
@@ -556,13 +588,10 @@ CURLSSH_AUTH_KEYBOARD           7.16.1
 CURLSSH_AUTH_NONE               7.16.1
 CURLSSH_AUTH_PASSWORD           7.16.1
 CURLSSH_AUTH_PUBLICKEY          7.16.1
+CURLSSLOPT_ALLOW_BEAST          7.25.0
 CURLUSESSL_ALL                  7.17.0
-CURLUSESSL_ALL                  7.17.0
-CURLUSESSL_CONTROL              7.17.0
 CURLUSESSL_CONTROL              7.17.0
 CURLUSESSL_NONE                 7.17.0
-CURLUSESSL_NONE                 7.17.0
-CURLUSESSL_TRY                  7.17.0
 CURLUSESSL_TRY                  7.17.0
 CURLVERSION_FIRST               7.10
 CURLVERSION_FOURTH              7.16.1
@@ -577,6 +606,8 @@ CURL_CHUNK_END_FUNC_OK          7.21.0
 CURL_CSELECT_ERR                7.16.3
 CURL_CSELECT_IN                 7.16.3
 CURL_CSELECT_OUT                7.16.3
+CURL_EASY_NONE                  7.14.0        -           7.15.4
+CURL_EASY_TIMEOUT               7.14.0        -           7.15.4
 CURL_ERROR_SIZE                 7.1
 CURL_FNMATCHFUNC_FAIL           7.21.0
 CURL_FNMATCHFUNC_MATCH          7.21.0
@@ -594,6 +625,7 @@ CURL_GLOBAL_DEFAULT             7.8
 CURL_GLOBAL_NOTHING             7.8
 CURL_GLOBAL_SSL                 7.8
 CURL_GLOBAL_WIN32               7.8.1
+CURL_GLOBAL_ACK_EINTR           7.30.0
 CURL_HTTP_VERSION_1_0           7.9.1
 CURL_HTTP_VERSION_1_1           7.9.1
 CURL_HTTP_VERSION_NONE          7.9.1
@@ -609,6 +641,11 @@ CURL_LOCK_DATA_DNS              7.10.3
 CURL_LOCK_DATA_NONE             7.10.3
 CURL_LOCK_DATA_SHARE            7.10.4
 CURL_LOCK_DATA_SSL_SESSION      7.10.3
+CURL_LOCK_TYPE_CONNECT          7.10          -           7.10.2
+CURL_LOCK_TYPE_COOKIE           7.10          -           7.10.2
+CURL_LOCK_TYPE_DNS              7.10          -           7.10.2
+CURL_LOCK_TYPE_NONE             7.10          -           7.10.2
+CURL_LOCK_TYPE_SSL_SESSION      7.10          -           7.10.2
 CURL_MAX_HTTP_HEADER            7.19.7
 CURL_MAX_WRITE_SIZE             7.9.7
 CURL_NETRC_IGNORED              7.9.8
@@ -619,11 +656,14 @@ CURL_POLL_INOUT                 7.14.0
 CURL_POLL_NONE                  7.14.0
 CURL_POLL_OUT                   7.14.0
 CURL_POLL_REMOVE                7.14.0
+CURL_PROGRESS_BAR               7.1.1         -           7.4.1
+CURL_PROGRESS_STATS             7.1.1         -           7.4.1
 CURL_READFUNC_ABORT             7.12.1
 CURL_READFUNC_PAUSE             7.18.0
 CURL_REDIR_GET_ALL              7.19.1
 CURL_REDIR_POST_301             7.19.1
 CURL_REDIR_POST_302             7.19.1
+CURL_REDIR_POST_303             7.25.1
 CURL_REDIR_POST_ALL             7.19.1
 CURL_RTSPREQ_ANNOUNCE           7.20.0
 CURL_RTSPREQ_DESCRIBE           7.20.0
@@ -642,6 +682,9 @@ CURL_SEEKFUNC_FAIL              7.19.5
 CURL_SEEKFUNC_OK                7.19.5
 CURL_SOCKET_BAD                 7.14.0
 CURL_SOCKET_TIMEOUT             7.14.0
+CURL_SOCKOPT_ALREADY_CONNECTED  7.21.5
+CURL_SOCKOPT_ERROR              7.21.5
+CURL_SOCKOPT_OK                 7.21.5
 CURL_SSLVERSION_DEFAULT         7.9.2
 CURL_SSLVERSION_SSLv2           7.9.2
 CURL_SSLVERSION_SSLv3           7.9.2
@@ -650,6 +693,8 @@ CURL_TIMECOND_IFMODSINCE        7.9.7
 CURL_TIMECOND_IFUNMODSINCE      7.9.7
 CURL_TIMECOND_LASTMOD           7.9.7
 CURL_TIMECOND_NONE              7.9.7
+CURL_TLSAUTH_NONE               7.21.4
+CURL_TLSAUTH_SRP                7.21.4
 CURL_VERSION_ASYNCHDNS          7.10.7
 CURL_VERSION_CONV               7.15.4
 CURL_VERSION_CURLDEBUG          7.19.6
@@ -661,7 +706,12 @@ CURL_VERSION_KERBEROS4          7.10
 CURL_VERSION_LARGEFILE          7.11.1
 CURL_VERSION_LIBZ               7.10
 CURL_VERSION_NTLM               7.10.6
+CURL_VERSION_NTLM_WB            7.22.0
 CURL_VERSION_SPNEGO             7.10.8
 CURL_VERSION_SSL                7.10
 CURL_VERSION_SSPI               7.13.2
+CURL_VERSION_TLSAUTH_SRP        7.21.4
+CURL_WAIT_POLLIN                7.28.0
+CURL_WAIT_POLLOUT               7.28.0
+CURL_WAIT_POLLPRI               7.28.0
 CURL_WRITEFUNC_PAUSE            7.18.0
diff --git a/docs/libcurl/symbols.pl b/docs/libcurl/symbols.pl
new file mode 100755 (executable)
index 0000000..d1ff7a6
--- /dev/null
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2011, 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.
+#
+###########################################################################
+#
+# Experience has shown that the symbols-in-versions file is very useful to
+# applications that want to build with a wide range of libcurl versions.
+# It is however easy to get it wrong and the source gets a bit messy with all
+# the fixed numerical comparisions.
+#
+# The point of this script is to provide an easy-to-use macro for libcurl-
+# using applications to do preprocessor checks for specific libcurl defines,
+# and yet make the code clearly show what the macro is used for.
+#
+# Run this script and generate libcurl-symbols.h and then use that header in
+# a fashion similar to:
+#
+# #include "libcurl-symbols.h"
+#
+# #if LIBCURL_HAS(CURLOPT_MUTE)
+#   has mute
+# #else
+#   no mute
+# #endif
+#
+#
+open F, "<symbols-in-versions";
+
+sub str2num {
+    my ($str)=@_;
+    if($str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
+        return sprintf("0x%06x", $1<<16 | $2 << 8 | $3);
+    }
+}
+
+print <<EOS
+
+#include <curl/curl.h>
+
+#define LIBCURL_HAS(x) \\
+  (defined(x ## _FIRST) && (x ## _FIRST <= LIBCURL_VERSION_NUM) && \\
+   (!defined(x ## _LAST) || ( x ## _LAST >= LIBCURL_VERSION_NUM)))
+
+EOS
+    ;
+
+while(<F>) {
+    if(/^(CURL[^ ]*)[ \t]*(.*)/) {
+        my ($sym, $vers)=($1, $2);
+
+        my $intr;
+        my $rm;
+        my $dep;
+
+        # is there removed info?
+        if($vers =~ /([\d.]+)[ \t-]+([\d.]+)[ \t]+([\d.]+)/) {
+            ($intr, $dep, $rm)=($1, $2, $3);
+        }
+        # is it a dep-only line?
+        elsif($vers =~ /([\d.]+)[ \t-]+([\d.]+)/) {
+            ($intr, $dep)=($1, $2);
+        }
+        else {
+            $intr = $vers;
+        }
+
+        my $inum = str2num($intr);
+
+        print <<EOS
+#define ${sym}_FIRST $inum /* Added in $intr */
+EOS
+;
+        my $irm = str2num($rm);
+        if($rm) {
+        print <<EOS
+#define ${sym}_LAST $irm /* Last featured in $rm */
+EOS
+;
+        }
+
+    }
+}
diff --git a/docs/mk-ca-bundle.html b/docs/mk-ca-bundle.html
new file mode 100644 (file)
index 0000000..fbdd589
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html><head>
+<title>mk-ca-bundle man page</title>
+<meta name="generator" content="roffit">
+<STYLE type="text/css">
+P.level0 {
+ padding-left: 2em;
+}
+
+P.level1 {
+ padding-left: 4em;
+}
+
+P.level2 {
+ padding-left: 6em;
+}
+
+span.emphasis {
+ font-style: italic;
+}
+
+span.bold {
+ font-weight: bold;
+}
+
+span.manpage {
+ font-weight: bold;
+}
+
+h2.nroffsh {
+ background-color: #e0e0e0;
+}
+
+span.nroffip {
+ font-weight: bold;
+ font-size: 120%;
+ font-family: monospace;
+}
+
+p.roffit {
+ text-align: center;
+ font-size: 80%;
+}
+</STYLE>
+</head><body>
+
+<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
+<p class="level0">mk-ca-bundle - convert mozilla's certdata.txt to PEM format <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
+<p class="level0">mk-ca-bundle [bilnqtuv] <span Class="emphasis">[outputfile]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
+<p class="level0">The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source tree over HTTP, then parses certdata.txt and extracts CA Root Certificates into PEM format.  These are then processed with the OpenSSL commandline tool to produce the final ca-bundle file. 
+<p class="level0">The default <span Class="emphasis">outputfile</span> name is <span Class="bold">ca-bundle.crt</span>. By setting it to '-' (a single dash) you will get the output sent to STDOUT instead of a file. 
+<p class="level0">The PEM format this scripts uses for output makes the result readily available for use by just about all OpenSSL or GnuTLS powered applications, such as curl, wget and more. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
+<p class="level0">The following options are supported: 
+<p class="level0"><a name="-b"></a><span class="nroffip">-b</span> 
+<p class="level1">backup an existing version of <span Class="emphasis">outputfilename</span> 
+<p class="level0"><a name="-f"></a><span class="nroffip">-f</span> 
+<p class="level1">force rebuild even if certdata.txt is current (Added in version 1.17) 
+<p class="level0"><a name="-i"></a><span class="nroffip">-i</span> 
+<p class="level1">print version info about used modules 
+<p class="level0"><a name="-l"></a><span class="nroffip">-l</span> 
+<p class="level1">print license info about certdata.txt 
+<p class="level0"><a name="-n"></a><span class="nroffip">-n</span> 
+<p class="level1">no download of certdata.txt (to use existing) 
+<p class="level0"><a name="-q"></a><span class="nroffip">-q</span> 
+<p class="level1">be really quiet (no progress output at all) 
+<p class="level0"><a name="-t"></a><span class="nroffip">-t</span> 
+<p class="level1">include plain text listing of certificates 
+<p class="level0"><a name="-u"></a><span class="nroffip">-u</span> 
+<p class="level1">unlink (remove) certdata.txt after processing 
+<p class="level0"><a name="-v"></a><span class="nroffip">-v</span> 
+<p class="level1">be verbose and print out processed CAs <a name="EXIT"></a><h2 class="nroffsh">EXIT STATUS</h2>
+<p class="level0">Returns 0 on success. Returns 1 if it fails to download data. <a name="CERTDATA"></a><h2 class="nroffsh">CERTDATA FORMAT</h2>
+<p class="level0">The file format used by Mozilla for this trust information seems to be documented here: <pre>
+<p class="level0"><a href="http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html">http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html</a>
+ </pre>
+
+<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
+<p class="level0"><span Class="manpage">curl (1)</span> <a name="HISTORY"></a><h2 class="nroffsh">HISTORY</h2>
+<p class="level0"><span Class="bold">mk-ca-bundle</span> is a command line tool that is shipped as part of every curl and libcurl release (see <a href="http://curl.haxx.se/">http://curl.haxx.se/</a>). It was originally based on the parse-certs script written by Roland Krikava and was later much improved by Guenter Knauf.  This manual page was initially written by Jan Schaumann &lt;jschauma@netmeister.org&gt;. <p class="roffit">
+ This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
+</body></html>
diff --git a/docs/mk-ca-bundle.pdf b/docs/mk-ca-bundle.pdf
new file mode 100644 (file)
index 0000000..5fe5224
Binary files /dev/null and b/docs/mk-ca-bundle.pdf differ
index 169197f..187d55e 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,60 +78,135 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 depcomp =
 am__depfiles_maybe =
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -106,7 +223,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -119,15 +237,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -137,6 +257,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -144,16 +267,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -166,7 +285,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -179,34 +297,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -218,6 +336,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -237,7 +356,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -247,9 +365,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = curl
 EXTRA_DIST = README
 AUTOMAKE_OPTIONS = foreign no-dependencies
@@ -260,14 +382,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  include/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  include/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign include/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -285,6 +407,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -292,27 +415,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -320,66 +442,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -391,81 +467,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -485,16 +584,22 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -505,8 +610,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -514,18 +618,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -544,22 +668,23 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 205f9f7..3e52a1d 100644 (file)
@@ -36,7 +36,7 @@ The following notes apply to libcurl version 7.19.0 and later.
 * If you intend to distribute an already compiled libcurl library you _MUST_
   also distribute along with it the generated curl/curlbuild.h which has been
   used to compile it. Otherwise the library will be of no use for the users of
-  the library that you have built. It is _your_ responsability to provide this
+  the library that you have built. It is _your_ responsibility to provide this
   file. No one at the cURL project can know how you have built the library.
 
 * File curl/curlbuild.h includes platform and configuration dependent info,
index a3b4443..86e8b78 100644 (file)
@@ -1,5 +1,26 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 pkginclude_HEADERS = \
-       curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
+       curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
        typecheck-gcc.h curlbuild.h curlrules.h
 
 pkgincludedir= $(includedir)/curl
@@ -23,3 +44,10 @@ EXTRA_DIST = curlbuild.h.in
 
 DISTCLEANFILES = curlbuild.h
 
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
index 7edaf46..9b7fc9c 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
-top_builddir = ../..
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,61 +78,122 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include/curl
-DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/curlbuild.h.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(srcdir)/curlbuild.h.in $(top_srcdir)/mkinstalldirs \
+       $(pkginclude_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pkgincludedir)"
-pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
 HEADERS = $(pkginclude_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+       $(LISP)curlbuild.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkgincludedir = $(includedir)/curl
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -107,7 +210,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -120,15 +224,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -138,6 +244,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -145,16 +254,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -167,7 +272,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -180,34 +284,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -219,6 +323,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -238,7 +343,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -248,11 +352,37 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 pkginclude_HEADERS = \
-       curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
+       curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
        typecheck-gcc.h curlbuild.h curlrules.h
 
 
@@ -280,14 +410,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  include/curl/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  include/curl/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/curl/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign include/curl/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -305,132 +435,135 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
-curlbuild.h: stamp-h3
-       @if test ! -f $@; then \
-         rm -f stamp-h3; \
-         $(MAKE) stamp-h3; \
-       else :; fi
+curlbuild.h: stamp-h2
+       @if test ! -f $@; then rm -f stamp-h2; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
 
-stamp-h3: $(srcdir)/curlbuild.h.in $(top_builddir)/config.status
-       @rm -f stamp-h3
+stamp-h2: $(srcdir)/curlbuild.h.in $(top_builddir)/config.status
+       @rm -f stamp-h2
        cd $(top_builddir) && $(SHELL) ./config.status include/curl/curlbuild.h
-$(srcdir)/curlbuild.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       rm -f stamp-h3
-       touch $@
 
 distclean-hdr:
-       -rm -f curlbuild.h stamp-h3
+       -rm -f curlbuild.h stamp-h2
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
-
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
 install-pkgincludeHEADERS: $(pkginclude_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
-       @list='$(pkginclude_HEADERS)'; for p in $$list; do \
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
-         $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
        done
 
 uninstall-pkgincludeHEADERS:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkginclude_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
-       done
+       @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(HEADERS) curlbuild.h
+@CURLDEBUG_FALSE@all-local:
+all-am: Makefile $(HEADERS) curlbuild.h all-local
 installdirs:
        for dir in "$(DESTDIR)$(pkgincludedir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -442,16 +575,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
        -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
@@ -463,8 +602,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr \
-       distclean-libtool distclean-tags
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
 
 dvi: dvi-am
 
@@ -472,18 +610,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am: install-pkgincludeHEADERS
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -502,19 +660,30 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool ctags distclean distclean-generic distclean-hdr \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-pkgincludeHEADERS \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am \
-       uninstall-pkgincludeHEADERS
+uninstall-am: uninstall-pkgincludeHEADERS
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+       clean-generic clean-libtool cscopelist-am ctags ctags-am \
+       distclean distclean-generic distclean-hdr distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-pkgincludeHEADERS \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+       uninstall-am uninstall-pkgincludeHEADERS
+
+
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST)
+
+# for debug builds, we scan the sources on all regular make invokes
+@CURLDEBUG_TRUE@all-local: checksrc
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index fbd0d9b..41c0881 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
 #include <sys/types.h>
 #include <time.h>
 
-#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \
-  !defined(__CYGWIN__) || defined(__MINGW32__)
-#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
+#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
+#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))
 /* The check above prevents the winsock2 inclusion if winsock.h already was
    included, since they can't co-exist without problems */
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #endif
-#else
+#endif
 
 /* 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
+   libc5-based Linux systems. Only include it on systems that are known to
    require it! */
 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
     defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
-    defined(ANDROID) || \
+    defined(ANDROID) || defined(__ANDROID__) || \
    (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
 #include <sys/select.h>
 #endif
 
-#ifndef _WIN32_WCE
+#if !defined(WIN32) && !defined(_WIN32_WCE)
 #include <sys/socket.h>
 #endif
+
 #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
 #include <sys/time.h>
 #endif
-#include <sys/types.h>
-#endif
 
 #ifdef __BEOS__
 #include <support/SupportDefs.h>
@@ -95,34 +93,26 @@ extern "C" {
 typedef void CURL;
 
 /*
- * Decorate exportable functions for Win32 and Symbian OS DLL linking.
- * This avoids using a .def file for building libcurl.dll.
+ * libcurl external API function linkage decorations.
  */
-#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \
-     !defined(CURL_STATICLIB)
-#if defined(BUILDING_LIBCURL)
-#define CURL_EXTERN  __declspec(dllexport)
-#else
-#define CURL_EXTERN  __declspec(dllimport)
-#endif
-#else
 
-#ifdef CURL_HIDDEN_SYMBOLS
-/*
- * This definition is used to make external definitions visible in the
- * shared library when symbols are hidden by default.  It makes no
- * difference when compiling applications whether this is set or not,
- * only when compiling the library.
- */
-#define CURL_EXTERN CURL_EXTERN_SYMBOL
+#ifdef CURL_STATICLIB
+#  define CURL_EXTERN
+#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
+#  if defined(BUILDING_LIBCURL)
+#    define CURL_EXTERN  __declspec(dllexport)
+#  else
+#    define CURL_EXTERN  __declspec(dllimport)
+#  endif
+#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
+#  define CURL_EXTERN CURL_EXTERN_SYMBOL
 #else
-#define CURL_EXTERN
-#endif
+#  define CURL_EXTERN
 #endif
 
 #ifndef curl_socket_typedef
 /* socket typedef */
-#ifdef WIN32
+#if defined(WIN32) && !defined(__LWIP_OPT_H__)
 typedef SOCKET curl_socket_t;
 #define CURL_SOCKET_BAD INVALID_SOCKET
 #else
@@ -166,12 +156,22 @@ struct curl_httppost {
                                        HTTPPOST_CALLBACK posts */
 };
 
+/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
+   deprecated but was the only choice up until 7.31.0 */
 typedef int (*curl_progress_callback)(void *clientp,
                                       double dltotal,
                                       double dlnow,
                                       double ultotal,
                                       double ulnow);
 
+/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
+   7.32.0, it avoids floating point and provides more detailed information. */
+typedef int (*curl_xferinfo_callback)(void *clientp,
+                                      curl_off_t dltotal,
+                                      curl_off_t dlnow,
+                                      curl_off_t ultotal,
+                                      curl_off_t ulnow);
+
 #ifndef CURL_MAX_WRITE_SIZE
   /* Tests have proven that 20K is a very bad buffer size for uploads on
      Windows, while 16K for some odd reason performed a lot better.
@@ -189,10 +189,10 @@ typedef int (*curl_progress_callback)(void *clientp,
 #define CURL_MAX_HTTP_HEADER (100*1024)
 #endif
 
-
 /* This is a magic return code for the write callback that, when returned,
    will signal libcurl to pause receiving on the current transfer. */
 #define CURL_WRITEFUNC_PAUSE 0x10000001
+
 typedef size_t (*curl_write_callback)(char *buffer,
                                       size_t size,
                                       size_t nitems,
@@ -311,10 +311,18 @@ typedef size_t (*curl_read_callback)(char *buffer,
                                       void *instream);
 
 typedef enum  {
-  CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
-  CURLSOCKTYPE_LAST   /* never use */
+  CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */
+  CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+  CURLSOCKTYPE_LAST    /* never use */
 } curlsocktype;
 
+/* The return code from the sockopt_callback can signal information back
+   to libcurl: */
+#define CURL_SOCKOPT_OK 0
+#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
+                                CURLE_ABORTED_BY_CALLBACK */
+#define CURL_SOCKOPT_ALREADY_CONNECTED 2
+
 typedef int (*curl_sockopt_callback)(void *clientp,
                                      curl_socket_t curlfd,
                                      curlsocktype purpose);
@@ -334,6 +342,9 @@ typedef curl_socket_t
                             curlsocktype purpose,
                             struct curl_sockaddr *address);
 
+typedef int
+(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
+
 typedef enum {
   CURLIOE_OK,            /* I/O operation successful */
   CURLIOE_UNKNOWNCMD,    /* command was unknown to callback */
@@ -394,7 +405,8 @@ typedef enum {
   CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */
   CURLE_FAILED_INIT,             /* 2 */
   CURLE_URL_MALFORMAT,           /* 3 */
-  CURLE_OBSOLETE4,               /* 4 - NOT USED */
+  CURLE_NOT_BUILT_IN,            /* 4 - [was obsoleted in August 2007 for
+                                    7.17.0, reused in April 2011 for 7.21.5] */
   CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
   CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
   CURLE_COULDNT_CONNECT,         /* 7 */
@@ -402,9 +414,12 @@ typedef enum {
   CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
                                     due to lack of access - when login fails
                                     this is not returned. */
-  CURLE_OBSOLETE10,              /* 10 - NOT USED */
+  CURLE_FTP_ACCEPT_FAILED,       /* 10 - [was obsoleted in April 2006 for
+                                    7.15.4, reused in Dec 2011 for 7.24.0]*/
   CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */
-  CURLE_OBSOLETE12,              /* 12 - NOT USED */
+  CURLE_FTP_ACCEPT_TIMEOUT,      /* 12 - timeout occurred accepting server
+                                    [was obsoleted in August 2007 for 7.17.0,
+                                    reused in Dec 2011 for 7.24.0]*/
   CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */
   CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */
   CURLE_FTP_CANT_GET_HOST,       /* 15 */
@@ -444,7 +459,7 @@ typedef enum {
   CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
   CURLE_OBSOLETE46,              /* 46 - NOT USED */
   CURLE_TOO_MANY_REDIRECTS ,     /* 47 - catch endless re-direct loops */
-  CURLE_UNKNOWN_TELNET_OPTION,   /* 48 - User specified an unknown option */
+  CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
   CURLE_TELNET_OPTION_SYNTAX ,   /* 49 - Malformed telnet option */
   CURLE_OBSOLETE50,              /* 50 - NOT USED */
   CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
@@ -459,7 +474,7 @@ typedef enum {
   CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */
   CURLE_SSL_CIPHER,              /* 59 - couldn't use specified cipher */
   CURLE_SSL_CACERT,              /* 60 - problem with the CA cert (path?) */
-  CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized transfer encoding */
+  CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized/bad encoding */
   CURLE_LDAP_INVALID_URL,        /* 62 - Invalid LDAP URL */
   CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */
   CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */
@@ -499,17 +514,26 @@ typedef enum {
                                     7.19.0) */
   CURLE_FTP_PRET_FAILED,         /* 84 - a PRET command failed */
   CURLE_RTSP_CSEQ_ERROR,         /* 85 - mismatch of RTSP CSeq numbers */
-  CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Identifiers */
+  CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Ids */
   CURLE_FTP_BAD_FILE_LIST,       /* 87 - unable to parse FTP file list */
   CURLE_CHUNK_FAILED,            /* 88 - chunk callback reported error */
-
+  CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
+                                    session will be queued */
   CURL_LAST /* never use! */
 } CURLcode;
 
 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
                           the obsolete stuff removed! */
 
-/* Backwards compatibility with older names */
+/* Previously obsoletes error codes re-used in 7.24.0 */
+#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
+#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
+
+/*  compatibility with older names */
+#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
+
+/* The following were added in 7.21.5, April 2011 */
+#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
 
 /* The following were added in 7.17.1 */
 /* These are scheduled to disappear by 2009 */
@@ -517,7 +541,7 @@ typedef enum {
 
 /* The following were added in 7.17.0 */
 /* These are scheduled to disappear by 2009 */
-#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */
+#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
@@ -529,7 +553,7 @@ typedef enum {
 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
-#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4
+#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
 
 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
@@ -579,17 +603,32 @@ typedef enum {
                                    in 7.18.0 */
 } curl_proxytype;  /* this enum was added in 7.10 */
 
-#define CURLAUTH_NONE         0       /* nothing */
-#define CURLAUTH_BASIC        (1<<0)  /* Basic (default) */
-#define CURLAUTH_DIGEST       (1<<1)  /* Digest */
-#define CURLAUTH_GSSNEGOTIATE (1<<2)  /* GSS-Negotiate */
-#define CURLAUTH_NTLM         (1<<3)  /* NTLM */
-#define CURLAUTH_DIGEST_IE    (1<<4)  /* Digest with IE flavour */
-#define CURLAUTH_ONLY         (1<<31) /* used together with a single other
-                                         type to force no auth or just that
-                                         single type */
-#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)  /* all fine types set */
-#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
+/*
+ * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
+ *
+ * CURLAUTH_NONE         - No HTTP authentication
+ * CURLAUTH_BASIC        - HTTP Basic authentication (default)
+ * CURLAUTH_DIGEST       - HTTP Digest authentication
+ * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication
+ * CURLAUTH_NTLM         - HTTP NTLM authentication
+ * CURLAUTH_DIGEST_IE    - HTTP Digest authentication with IE flavour
+ * CURLAUTH_NTLM_WB      - HTTP NTLM authentication delegated to winbind helper
+ * CURLAUTH_ONLY         - Use together with a single other type to force no
+ *                         authentication or just that single type
+ * CURLAUTH_ANY          - All fine types set
+ * CURLAUTH_ANYSAFE      - All fine types except Basic
+ */
+
+#define CURLAUTH_NONE         ((unsigned long)0)
+#define CURLAUTH_BASIC        (((unsigned long)1)<<0)
+#define CURLAUTH_DIGEST       (((unsigned long)1)<<1)
+#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2)
+#define CURLAUTH_NTLM         (((unsigned long)1)<<3)
+#define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
+#define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
+#define CURLAUTH_ONLY         (((unsigned long)1)<<31)
+#define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
+#define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
 
 #define CURLSSH_AUTH_ANY       ~0     /* all types supported by the server */
 #define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
@@ -597,8 +636,13 @@ typedef enum {
 #define CURLSSH_AUTH_PASSWORD  (1<<1) /* password */
 #define CURLSSH_AUTH_HOST      (1<<2) /* host key files */
 #define CURLSSH_AUTH_KEYBOARD  (1<<3) /* keyboard interactive */
+#define CURLSSH_AUTH_AGENT     (1<<4) /* agent (ssh-agent, pageant...) */
 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
 
+#define CURLGSSAPI_DELEGATION_NONE        0      /* no delegation (default) */
+#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
+#define CURLGSSAPI_DELEGATION_FLAG        (1<<1) /* delegate always */
+
 #define CURL_ERROR_SIZE 256
 
 struct curl_khkey {
@@ -649,6 +693,15 @@ typedef enum {
   CURLUSESSL_LAST     /* not an option, never use */
 } curl_usessl;
 
+/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
+
+/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
+   name of improving interoperability with older servers. Some SSL libraries
+   have introduced work-arounds for this flaw but those work-arounds sometimes
+   make the SSL communication fail. To regain functionality with those broken
+   servers, a user can this way allow the vulnerability back. */
+#define CURLSSLOPT_ALLOW_BEAST (1<<0)
+
 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
                           the obsolete stuff removed! */
 
@@ -743,7 +796,7 @@ typedef enum {
 #endif
 
 #ifdef CURL_ISOCPP
-#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
+#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
 #else
 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
 #define LONG          CURLOPTTYPE_LONG
@@ -901,9 +954,7 @@ typedef enum {
   /* send linked-list of post-transfer QUOTE commands */
   CINIT(POSTQUOTE, OBJECTPOINT, 39),
 
-  /* Pass a pointer to string of the output using full variable-replacement
-     as described elsewhere. */
-  CINIT(WRITEINFO, OBJECTPOINT, 40),
+  CINIT(WRITEINFO, OBJECTPOINT, 40), /* DEPRECATED, do not use! */
 
   CINIT(VERBOSE, LONG, 41),      /* talk a lot */
   CINIT(HEADER, LONG, 42),       /* throw the header out too */
@@ -912,7 +963,7 @@ typedef enum {
   CINIT(FAILONERROR, LONG, 45),  /* no output on http error codes >= 300 */
   CINIT(UPLOAD, LONG, 46),       /* this is an upload */
   CINIT(POST, LONG, 47),         /* HTTP POST method */
-  CINIT(DIRLISTONLY, LONG, 48),  /* return bare names when listing directories */
+  CINIT(DIRLISTONLY, LONG, 48),  /* bare names when listing directories */
 
   CINIT(APPEND, LONG, 50),       /* Append instead of overwrite on upload! */
 
@@ -927,13 +978,16 @@ typedef enum {
 
   /* 55 = OBSOLETE */
 
-  /* Function that will be called instead of the internal progress display
+  /* DEPRECATED
+   * Function that will be called instead of the internal progress display
    * function. This function should be defined as the curl_progress_callback
    * prototype defines. */
   CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
 
-  /* Data passed to the progress callback */
+  /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
+     callbacks */
   CINIT(PROGRESSDATA, OBJECTPOINT, 57),
+#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
 
   /* We want the referrer field set automatically when following locations */
   CINIT(AUTOREFERER, LONG, 58),
@@ -979,9 +1033,7 @@ typedef enum {
   /* Max amount of cached alive connections */
   CINIT(MAXCONNECTS, LONG, 71),
 
-  /* What policy to use when closing connections when the cache is filled
-     up */
-  CINIT(CLOSEPOLICY, LONG, 72),
+  CINIT(CLOSEPOLICY, LONG, 72), /* DEPRECATED, do not use! */
 
   /* 73 = OBSOLETE */
 
@@ -1002,9 +1054,8 @@ typedef enum {
   /* Set to the Entropy Gathering Daemon socket pathname */
   CINIT(EGDSOCKET, OBJECTPOINT, 77),
 
-  /* Time-out connect operations after this amount of seconds, if connects
-     are OK within this time, then fine... This only aborts the connect
-     phase. [Only works on unix-style/SIGALRM operating systems] */
+  /* Time-out connect operations after this amount of seconds, if connects are
+     OK within this time, then fine... This only aborts the connect phase. */
   CINIT(CONNECTTIMEOUT, LONG, 78),
 
   /* Function that will be called to store headers (instead of fwrite). The
@@ -1055,7 +1106,7 @@ typedef enum {
   CINIT(SSLENGINE_DEFAULT, LONG, 90),
 
   /* Non-zero value means to use the global dns cache */
-  CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */
+  CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
 
   /* DNS cache timeout */
   CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
@@ -1092,8 +1143,9 @@ typedef enum {
   CINIT(PROXYTYPE, LONG, 101),
 
   /* Set the Accept-Encoding string. Use this to tell a server you would like
-     the response to be compressed. */
-  CINIT(ENCODING, OBJECTPOINT, 102),
+     the response to be compressed. Before 7.21.6, this was known as
+     CURLOPT_ENCODING */
+  CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
 
   /* Set pointer to private data */
   CINIT(PRIVATE, OBJECTPOINT, 103),
@@ -1106,8 +1158,8 @@ typedef enum {
      and password to whatever host the server decides. */
   CINIT(UNRESTRICTED_AUTH, LONG, 105),
 
-  /* Specifically switch on or off the FTP engine's use of the EPRT command ( it
-     also disables the LPRT attempt). By default, those ones will always be
+  /* Specifically switch on or off the FTP engine's use of the EPRT command (
+     it also disables the LPRT attempt). By default, those ones will always be
      attempted before the good old traditional PORT command. */
   CINIT(FTP_USE_EPRT, LONG, 106),
 
@@ -1177,9 +1229,9 @@ typedef enum {
   CINIT(NETRC_FILE, OBJECTPOINT, 118),
 
   /* Enable SSL/TLS for FTP, pick one of:
-     CURLFTPSSL_TRY     - try using SSL, proceed anyway otherwise
-     CURLFTPSSL_CONTROL - SSL for the control connection or fail
-     CURLFTPSSL_ALL     - SSL for all communication or fail
+     CURLUSESSL_TRY     - try using SSL, proceed anyway otherwise
+     CURLUSESSL_CONTROL - SSL for the control connection or fail
+     CURLUSESSL_ALL     - SSL for all communication or fail
   */
   CINIT(USE_SSL, LONG, 119),
 
@@ -1442,6 +1494,63 @@ typedef enum {
   /* send linked-list of name:port:address sets */
   CINIT(RESOLVE, OBJECTPOINT, 203),
 
+  /* Set a username for authenticated TLS */
+  CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),
+
+  /* Set a password for authenticated TLS */
+  CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),
+
+  /* Set authentication type for authenticated TLS */
+  CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
+
+  /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
+     compressed transfer-encoded responses. Set to 0 to disable the use of TE:
+     in outgoing requests. The current default is 0, but it might change in a
+     future libcurl release.
+
+     libcurl will ask for the compressed methods it knows of, and if that
+     isn't any, it will not ask for transfer-encoding at all even if this
+     option is set to 1.
+
+  */
+  CINIT(TRANSFER_ENCODING, LONG, 207),
+
+  /* Callback function for closing socket (instead of close(2)). The callback
+     should have type curl_closesocket_callback */
+  CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
+  CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
+
+  /* allow GSSAPI credential delegation */
+  CINIT(GSSAPI_DELEGATION, LONG, 210),
+
+  /* Set the name servers to use for DNS resolution */
+  CINIT(DNS_SERVERS, OBJECTPOINT, 211),
+
+  /* Time-out accept operations (currently for FTP only) after this amount
+     of miliseconds. */
+  CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
+
+  /* Set TCP keepalive */
+  CINIT(TCP_KEEPALIVE, LONG, 213),
+
+  /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
+  CINIT(TCP_KEEPIDLE, LONG, 214),
+  CINIT(TCP_KEEPINTVL, LONG, 215),
+
+  /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
+  CINIT(SSL_OPTIONS, LONG, 216),
+
+  /* Set the SMTP auth originator */
+  CINIT(MAIL_AUTH, OBJECTPOINT, 217),
+
+  /* Enable/disable SASL initial response */
+  CINIT(SASL_IR, LONG, 218),
+
+  /* Function that will be called instead of the internal progress display
+   * function. This function should be defined as the curl_xferinfo_callback
+   * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
+  CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
+
   CURLOPT_LASTENTRY /* the last unused */
 } CURLoption;
 
@@ -1538,14 +1647,23 @@ enum {
   CURL_SSLVERSION_LAST /* never use, keep last */
 };
 
+enum CURL_TLSAUTH {
+  CURL_TLSAUTH_NONE,
+  CURL_TLSAUTH_SRP,
+  CURL_TLSAUTH_LAST /* never use, keep last */
+};
+
 /* symbols to use with CURLOPT_POSTREDIR.
-   CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that
-   CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */
+   CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
+   can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
+   | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
 
 #define CURL_REDIR_GET_ALL  0
 #define CURL_REDIR_POST_301 1
 #define CURL_REDIR_POST_302 2
-#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302)
+#define CURL_REDIR_POST_303 4
+#define CURL_REDIR_POST_ALL \
+    (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
 
 typedef enum {
   CURL_TIMECOND_NONE,
@@ -1664,7 +1782,8 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
  * Should return the buffer length passed to it as the argument "len" on
  *   success.
  */
-typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len);
+typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
+                                        size_t len);
 
 /*
  * NAME curl_formget()
@@ -1919,6 +2038,7 @@ typedef enum {
 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
 #define CURL_GLOBAL_NOTHING 0
 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
+#define CURL_GLOBAL_ACK_EINTR (1<<2)
 
 
 /*****************************************************************************
@@ -1963,8 +2083,9 @@ typedef enum {
   CURLSHE_BAD_OPTION, /* 1 */
   CURLSHE_IN_USE,     /* 2 */
   CURLSHE_INVALID,    /* 3 */
-  CURLSHE_NOMEM,      /* out of memory */
-  CURLSHE_LAST /* never use */
+  CURLSHE_NOMEM,      /* 4 out of memory */
+  CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
+  CURLSHE_LAST        /* never use */
 } CURLSHcode;
 
 typedef enum {
@@ -2043,8 +2164,10 @@ typedef struct {
 #define CURL_VERSION_SSPI      (1<<11) /* SSPI is supported */
 #define CURL_VERSION_CONV      (1<<12) /* character conversions supported */
 #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */
+#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
+#define CURL_VERSION_NTLM_WB   (1<<15) /* NTLM delegating to winbind helper */
 
-/*
+ /*
  * NAME curl_version_info()
  *
  * DESCRIPTION
index d0b32ac..3ad2f01 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
 /* ===================================== */
 
 #elif defined(__GNUC__)
-#  if defined(__i386__) || defined(__ppc__)
+#  if defined(__ILP32__) || \
+      defined(__i386__) || defined(__ppc__) || defined(__arm__)
 #    define CURL_SIZEOF_LONG           4
 #    define CURL_TYPEOF_CURL_OFF_T     long long
 #    define CURL_FORMAT_CURL_OFF_T     "lld"
 #    define CURL_SIZEOF_CURL_OFF_T     8
 #    define CURL_SUFFIX_CURL_OFF_T     LL
 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
-#  elif defined(__x86_64__) || defined(__ppc64__)
+#  elif defined(__LP64__) || \
+        defined(__x86_64__) || defined(__ppc64__)
 #    define CURL_SIZEOF_LONG           8
 #    define CURL_TYPEOF_CURL_OFF_T     long
 #    define CURL_FORMAT_CURL_OFF_T     "ld"
index cb1de80..e29f195 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
 /* ================================================================ */
 
 #ifdef CURL_SIZEOF_LONG
-#  error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
 #endif
 
 #ifdef CURL_TYPEOF_CURL_SOCKLEN_T
-#  error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
 #endif
 
 #ifdef CURL_SIZEOF_CURL_SOCKLEN_T
-#  error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
 #endif
 
 #ifdef CURL_TYPEOF_CURL_OFF_T
-#  error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
 #endif
 
 #ifdef CURL_FORMAT_CURL_OFF_T
-#  error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
 #endif
 
 #ifdef CURL_FORMAT_CURL_OFF_TU
-#  error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
 #endif
 
 #ifdef CURL_FORMAT_OFF_T
-#  error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
 #endif
 
 #ifdef CURL_SIZEOF_CURL_OFF_T
-#  error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
 #endif
 
 #ifdef CURL_SUFFIX_CURL_OFF_T
-#  error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
 #endif
 
 #ifdef CURL_SUFFIX_CURL_OFF_TU
-#  error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
    Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
 #endif
 
 #  include <sys/socket.h>
 #endif
 
+/* Configure process defines this to 1 when it finds out that system  */
+/* header file sys/poll.h must be included by the external interface. */
+#undef CURL_PULL_SYS_POLL_H
+#ifdef CURL_PULL_SYS_POLL_H
+#  include <sys/poll.h>
+#endif
+
 /* The size of `long', as computed by sizeof. */
 #undef CURL_SIZEOF_LONG
 
index 8aad1df..7c2ede3 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -190,7 +190,7 @@ typedef char
  * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
  * these to be visible and exported by the external libcurl interface API,
  * while also making them visible to the library internals, simply including
- * setup.h, without actually needing to include curl.h internally.
+ * curl_setup.h, without actually needing to include curl.h internally.
  * If some day this section would grow big enough, all this should be moved
  * to its own header file.
  */
@@ -216,14 +216,23 @@ typedef char
  * Macros for minimum-width signed and unsigned curl_off_t integer constants.
  */
 
-#ifdef CURL_ISOCPP
-#  define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix
+#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
+#  define __CURL_OFF_T_C_HLPR2(x) x
+#  define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
+#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val) ## \
+                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
+#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
+                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
 #else
-#  define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
+#  ifdef CURL_ISOCPP
+#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
+#  else
+#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
+#  endif
+#  define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
+#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
+#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
 #endif
-#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix)
-#define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
-#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
 
 /*
  * Get rid of macros private to this header file.
@@ -239,6 +248,7 @@ typedef char
 #undef CURL_PULL_WS2TCPIP_H
 #undef CURL_PULL_SYS_TYPES_H
 #undef CURL_PULL_SYS_SOCKET_H
+#undef CURL_PULL_SYS_POLL_H
 #undef CURL_PULL_STDINT_H
 #undef CURL_PULL_INTTYPES_H
 
index 7c3ccc9..c2be02c 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
    a script at release-time. This was made its own header file in 7.11.2 */
 
 /* This is the global package copyright */
-#define LIBCURL_COPYRIGHT "1996 - 2010 Daniel Stenberg, <daniel@haxx.se>."
+#define LIBCURL_COPYRIGHT "1996 - 2013 Daniel Stenberg, <daniel@haxx.se>."
 
 /* This is the version number of the libcurl package from which this header
    file origins: */
-#define LIBCURL_VERSION "7.21.3"
+#define LIBCURL_VERSION "7.32.0"
 
 /* The numeric version number is also available "in parts" by using these
    defines: */
 #define LIBCURL_VERSION_MAJOR 7
-#define LIBCURL_VERSION_MINOR 21
-#define LIBCURL_VERSION_PATCH 3
+#define LIBCURL_VERSION_MINOR 32
+#define LIBCURL_VERSION_PATCH 0
 
 /* This is the numeric version of the libcurl version number, meant for easier
    parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@@ -53,7 +53,7 @@
    and it is always a greater number in a more recent release. It makes
    comparisons with greater than and less than work.
 */
-#define LIBCURL_VERSION_NUM 0x071503
+#define LIBCURL_VERSION_NUM 0x072000
 
 /*
  * This is the date and time when the full source package was created. The
@@ -64,6 +64,6 @@
  *
  * "Mon Feb 12 11:35:33 UTC 2007"
  */
-#define LIBCURL_TIMESTAMP "Wed Dec 15 14:07:08 UTC 2010"
+#define LIBCURL_TIMESTAMP "Sun Aug 11 22:15:54 UTC 2013"
 
 #endif /* __CURL_CURLVER_H */
index 1ddb4fe..c1e3e76 100644 (file)
@@ -53,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
  *
  * Creates a new curl session handle with the same options set for the handle
  * passed in. Duplicating a handle could only be a matter of cloning data and
- * options, internal state info and things like persistant connections cannot
- * be transfered. It is useful in multithreaded applications when you can run
+ * options, internal state info and things like persistent connections cannot
+ * be transferred. It is useful in multithreaded applications when you can run
  * curl_easy_duphandle() for each new thread to avoid a series of identical
  * curl_easy_setopt() invokes in every thread.
  */
index de7dd2f..cc9e7f5 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -58,7 +58,7 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
 # define printf curl_mprintf
 # define fprintf curl_mfprintf
 #ifdef CURLDEBUG
-/* When built with CURLDEBUG we define away the sprintf() functions since we
+/* When built with CURLDEBUG we define away the sprintf functions since we
    don't want internal code to be using them */
 # define sprintf sprintf_was_used
 # define vsprintf vsprintf_was_used
index f965666..a5eb3c6 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -89,6 +89,19 @@ struct CURLMsg {
 };
 typedef struct CURLMsg CURLMsg;
 
+/* Based on poll(2) structure and values.
+ * We don't use pollfd and POLL* constants explicitly
+ * to cover platforms without poll(). */
+#define CURL_WAIT_POLLIN    0x0001
+#define CURL_WAIT_POLLPRI   0x0002
+#define CURL_WAIT_POLLOUT   0x0004
+
+struct curl_waitfd {
+  curl_socket_t fd;
+  short events;
+  short revents; /* not supported yet */
+};
+
 /*
  * Name:    curl_multi_init()
  *
@@ -133,6 +146,20 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
                                        fd_set *exc_fd_set,
                                        int *max_fd);
 
+/*
+ * Name:     curl_multi_wait()
+ *
+ * Desc:     Poll on all fds within a CURLM set as well as any
+ *           additional fds passed to the function.
+ *
+ * Returns:  CURLMcode type, general multi error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
+                                      struct curl_waitfd extra_fds[],
+                                      unsigned int extra_nfds,
+                                      int timeout_ms,
+                                      int *ret);
+
  /*
   * Name:    curl_multi_perform()
   *
@@ -311,6 +338,31 @@ typedef enum {
   /* maximum number of entries in the connection cache */
   CINIT(MAXCONNECTS, LONG, 6),
 
+  /* maximum number of (pipelining) connections to one host */
+  CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
+
+  /* maximum number of requests in a pipeline */
+  CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
+
+  /* a connection with a content-length longer than this
+     will not be considered for pipelining */
+  CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
+
+  /* a connection with a chunk length longer than this
+     will not be considered for pipelining */
+  CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
+
+  /* a list of site names(+port) that are blacklisted from
+     pipelining */
+  CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
+
+  /* a list of server types that are blacklisted from
+     pipelining */
+  CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
+
+  /* maximum number of open connections in total */
+  CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
+
   CURLMOPT_LASTENTRY /* the last unused */
 } CURLMoption;
 
index e6f74a9..f8917e8 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
 #define curl_easy_setopt(handle, option, value)                               \
 __extension__ ({                                                              \
   __typeof__ (option) _curl_opt = option;                                     \
-  if (__builtin_constant_p(_curl_opt)) {                                      \
-    if (_curl_is_long_option(_curl_opt))                                      \
-      if (!_curl_is_long(value))                                              \
+  if(__builtin_constant_p(_curl_opt)) {                                       \
+    if(_curl_is_long_option(_curl_opt))                                       \
+      if(!_curl_is_long(value))                                               \
         _curl_easy_setopt_err_long();                                         \
-    if (_curl_is_off_t_option(_curl_opt))                                     \
-      if (!_curl_is_off_t(value))                                             \
+    if(_curl_is_off_t_option(_curl_opt))                                      \
+      if(!_curl_is_off_t(value))                                              \
         _curl_easy_setopt_err_curl_off_t();                                   \
-    if (_curl_is_string_option(_curl_opt))                                    \
-      if (!_curl_is_string(value))                                            \
+    if(_curl_is_string_option(_curl_opt))                                     \
+      if(!_curl_is_string(value))                                             \
         _curl_easy_setopt_err_string();                                       \
-    if (_curl_is_write_cb_option(_curl_opt))                                  \
-      if (!_curl_is_write_cb(value))                                          \
+    if(_curl_is_write_cb_option(_curl_opt))                                   \
+      if(!_curl_is_write_cb(value))                                           \
         _curl_easy_setopt_err_write_callback();                               \
-    if ((_curl_opt) == CURLOPT_READFUNCTION)                                  \
-      if (!_curl_is_read_cb(value))                                           \
+    if((_curl_opt) == CURLOPT_READFUNCTION)                                   \
+      if(!_curl_is_read_cb(value))                                            \
         _curl_easy_setopt_err_read_cb();                                      \
-    if ((_curl_opt) == CURLOPT_IOCTLFUNCTION)                                 \
-      if (!_curl_is_ioctl_cb(value))                                          \
+    if((_curl_opt) == CURLOPT_IOCTLFUNCTION)                                  \
+      if(!_curl_is_ioctl_cb(value))                                           \
         _curl_easy_setopt_err_ioctl_cb();                                     \
-    if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION)                               \
-      if (!_curl_is_sockopt_cb(value))                                        \
+    if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION)                                \
+      if(!_curl_is_sockopt_cb(value))                                         \
         _curl_easy_setopt_err_sockopt_cb();                                   \
-    if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION)                            \
-      if (!_curl_is_opensocket_cb(value))                                     \
+    if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION)                             \
+      if(!_curl_is_opensocket_cb(value))                                      \
         _curl_easy_setopt_err_opensocket_cb();                                \
-    if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION)                              \
-      if (!_curl_is_progress_cb(value))                                       \
+    if((_curl_opt) == CURLOPT_PROGRESSFUNCTION)                               \
+      if(!_curl_is_progress_cb(value))                                        \
         _curl_easy_setopt_err_progress_cb();                                  \
-    if ((_curl_opt) == CURLOPT_DEBUGFUNCTION)                                 \
-      if (!_curl_is_debug_cb(value))                                          \
+    if((_curl_opt) == CURLOPT_DEBUGFUNCTION)                                  \
+      if(!_curl_is_debug_cb(value))                                           \
         _curl_easy_setopt_err_debug_cb();                                     \
-    if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION)                              \
-      if (!_curl_is_ssl_ctx_cb(value))                                        \
+    if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION)                               \
+      if(!_curl_is_ssl_ctx_cb(value))                                         \
         _curl_easy_setopt_err_ssl_ctx_cb();                                   \
-    if (_curl_is_conv_cb_option(_curl_opt))                                   \
-      if (!_curl_is_conv_cb(value))                                           \
+    if(_curl_is_conv_cb_option(_curl_opt))                                    \
+      if(!_curl_is_conv_cb(value))                                            \
         _curl_easy_setopt_err_conv_cb();                                      \
-    if ((_curl_opt) == CURLOPT_SEEKFUNCTION)                                  \
-      if (!_curl_is_seek_cb(value))                                           \
+    if((_curl_opt) == CURLOPT_SEEKFUNCTION)                                   \
+      if(!_curl_is_seek_cb(value))                                            \
         _curl_easy_setopt_err_seek_cb();                                      \
-    if (_curl_is_cb_data_option(_curl_opt))                                   \
-      if (!_curl_is_cb_data(value))                                           \
+    if(_curl_is_cb_data_option(_curl_opt))                                    \
+      if(!_curl_is_cb_data(value))                                            \
         _curl_easy_setopt_err_cb_data();                                      \
-    if ((_curl_opt) == CURLOPT_ERRORBUFFER)                                   \
-      if (!_curl_is_error_buffer(value))                                      \
+    if((_curl_opt) == CURLOPT_ERRORBUFFER)                                    \
+      if(!_curl_is_error_buffer(value))                                       \
         _curl_easy_setopt_err_error_buffer();                                 \
-    if ((_curl_opt) == CURLOPT_STDERR)                                        \
-      if (!_curl_is_FILE(value))                                              \
+    if((_curl_opt) == CURLOPT_STDERR)                                         \
+      if(!_curl_is_FILE(value))                                               \
         _curl_easy_setopt_err_FILE();                                         \
-    if (_curl_is_postfields_option(_curl_opt))                                \
-      if (!_curl_is_postfields(value))                                        \
+    if(_curl_is_postfields_option(_curl_opt))                                 \
+      if(!_curl_is_postfields(value))                                         \
         _curl_easy_setopt_err_postfields();                                   \
-    if ((_curl_opt) == CURLOPT_HTTPPOST)                                      \
-      if (!_curl_is_arr((value), struct curl_httppost))                       \
+    if((_curl_opt) == CURLOPT_HTTPPOST)                                       \
+      if(!_curl_is_arr((value), struct curl_httppost))                        \
         _curl_easy_setopt_err_curl_httpost();                                 \
-    if (_curl_is_slist_option(_curl_opt))                                     \
-      if (!_curl_is_arr((value), struct curl_slist))                          \
+    if(_curl_is_slist_option(_curl_opt))                                      \
+      if(!_curl_is_arr((value), struct curl_slist))                           \
         _curl_easy_setopt_err_curl_slist();                                   \
-    if ((_curl_opt) == CURLOPT_SHARE)                                         \
-      if (!_curl_is_ptr((value), CURLSH))                                     \
+    if((_curl_opt) == CURLOPT_SHARE)                                          \
+      if(!_curl_is_ptr((value), CURLSH))                                      \
         _curl_easy_setopt_err_CURLSH();                                       \
   }                                                                           \
   curl_easy_setopt(handle, _curl_opt, value);                                 \
@@ -111,18 +111,18 @@ __extension__ ({                                                              \
 #define curl_easy_getinfo(handle, info, arg)                                  \
 __extension__ ({                                                              \
   __typeof__ (info) _curl_info = info;                                        \
-  if (__builtin_constant_p(_curl_info)) {                                     \
-    if (_curl_is_string_info(_curl_info))                                     \
-      if (!_curl_is_arr((arg), char *))                                       \
+  if(__builtin_constant_p(_curl_info)) {                                      \
+    if(_curl_is_string_info(_curl_info))                                      \
+      if(!_curl_is_arr((arg), char *))                                        \
         _curl_easy_getinfo_err_string();                                      \
-    if (_curl_is_long_info(_curl_info))                                       \
-      if (!_curl_is_arr((arg), long))                                         \
+    if(_curl_is_long_info(_curl_info))                                        \
+      if(!_curl_is_arr((arg), long))                                          \
         _curl_easy_getinfo_err_long();                                        \
-    if (_curl_is_double_info(_curl_info))                                     \
-      if (!_curl_is_arr((arg), double))                                       \
+    if(_curl_is_double_info(_curl_info))                                      \
+      if(!_curl_is_arr((arg), double))                                        \
         _curl_easy_getinfo_err_double();                                      \
-    if (_curl_is_slist_info(_curl_info))                                      \
-      if (!_curl_is_arr((arg), struct curl_slist *))                          \
+    if(_curl_is_slist_info(_curl_info))                                       \
+      if(!_curl_is_arr((arg), struct curl_slist *))                           \
         _curl_easy_getinfo_err_curl_slist();                                  \
   }                                                                           \
   curl_easy_getinfo(handle, _curl_info, arg);                                 \
@@ -141,15 +141,17 @@ __extension__ ({                                                              \
 
 /* To define a new warning, use _CURL_WARNING(identifier, "message") */
 #define _CURL_WARNING(id, message)                                            \
-  static void __attribute__((warning(message))) __attribute__((unused))       \
-  __attribute__((noinline)) id(void) { __asm__(""); }
+  static void __attribute__((__warning__(message)))                           \
+  __attribute__((__unused__)) __attribute__((__noinline__))                   \
+  id(void) { __asm__(""); }
 
 _CURL_WARNING(_curl_easy_setopt_err_long,
   "curl_easy_setopt expects a long argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
   "curl_easy_setopt expects a curl_off_t argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_string,
-  "curl_easy_setopt expects a string (char* or char[]) argument for this option"
+              "curl_easy_setopt expects a "
+              "string (char* or char[]) argument for this option"
   )
 _CURL_WARNING(_curl_easy_setopt_err_write_callback,
   "curl_easy_setopt expects a curl_write_callback argument for this option")
@@ -160,7 +162,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
 _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
   "curl_easy_setopt expects a curl_sockopt_callback argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
-  "curl_easy_setopt expects a curl_opensocket_callback argument for this option"
+              "curl_easy_setopt expects a "
+              "curl_opensocket_callback argument for this option"
   )
 _CURL_WARNING(_curl_easy_setopt_err_progress_cb,
   "curl_easy_setopt expects a curl_progress_callback argument for this option")
@@ -173,9 +176,11 @@ _CURL_WARNING(_curl_easy_setopt_err_conv_cb,
 _CURL_WARNING(_curl_easy_setopt_err_seek_cb,
   "curl_easy_setopt expects a curl_seek_callback argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_cb_data,
-  "curl_easy_setopt expects a private data pointer as argument for this option")
+              "curl_easy_setopt expects a "
+              "private data pointer as argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_error_buffer,
-  "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option")
+              "curl_easy_setopt expects a "
+              "char buffer of CURL_ERROR_SIZE as argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_FILE,
   "curl_easy_setopt expects a FILE* argument for this option")
 _CURL_WARNING(_curl_easy_setopt_err_postfields,
@@ -224,7 +229,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
    (option) == CURLOPT_PROXYUSERNAME ||                                       \
    (option) == CURLOPT_PROXYPASSWORD ||                                       \
    (option) == CURLOPT_NOPROXY ||                                             \
-   (option) == CURLOPT_ENCODING ||                                            \
+   (option) == CURLOPT_ACCEPT_ENCODING ||                                     \
    (option) == CURLOPT_REFERER ||                                             \
    (option) == CURLOPT_USERAGENT ||                                           \
    (option) == CURLOPT_COOKIE ||                                              \
@@ -388,7 +393,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
 /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
 /* XXX: also check size of an char[] array? */
 #define _curl_is_error_buffer(expr)                                           \
-  (__builtin_types_compatible_p(__typeof__(expr), char *) ||                  \
+  (_curl_is_NULL(expr) ||                                                     \
+   __builtin_types_compatible_p(__typeof__(expr), char *) ||                  \
    __builtin_types_compatible_p(__typeof__(expr), char[]))
 
 /* evaluates to true if expr is of type (const) void* or (const) FILE* */
@@ -481,7 +487,8 @@ typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
 typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t,
                                       curlsocktype);
 
-/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */
+/* evaluates to true if expr is of type curl_opensocket_callback or
+   "similar" */
 #define _curl_is_opensocket_cb(expr)                                    \
   (_curl_is_NULL(expr) ||                                                     \
    __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\
@@ -516,7 +523,11 @@ typedef int (_curl_progress_callback2)(const void *,
    _curl_callback_compatible((expr), _curl_debug_callback1) ||                \
    _curl_callback_compatible((expr), _curl_debug_callback2) ||                \
    _curl_callback_compatible((expr), _curl_debug_callback3) ||                \
-   _curl_callback_compatible((expr), _curl_debug_callback4))
+   _curl_callback_compatible((expr), _curl_debug_callback4) ||                \
+   _curl_callback_compatible((expr), _curl_debug_callback5) ||                \
+   _curl_callback_compatible((expr), _curl_debug_callback6) ||                \
+   _curl_callback_compatible((expr), _curl_debug_callback7) ||                \
+   _curl_callback_compatible((expr), _curl_debug_callback8))
 typedef int (_curl_debug_callback1) (CURL *,
     curl_infotype, char *, size_t, void *);
 typedef int (_curl_debug_callback2) (CURL *,
@@ -525,6 +536,14 @@ typedef int (_curl_debug_callback3) (CURL *,
     curl_infotype, const char *, size_t, void *);
 typedef int (_curl_debug_callback4) (CURL *,
     curl_infotype, const char *, size_t, const void *);
+typedef int (_curl_debug_callback5) (CURL *,
+    curl_infotype, unsigned char *, size_t, void *);
+typedef int (_curl_debug_callback6) (CURL *,
+    curl_infotype, unsigned char *, size_t, const void *);
+typedef int (_curl_debug_callback7) (CURL *,
+    curl_infotype, const unsigned char *, size_t, void *);
+typedef int (_curl_debug_callback8) (CURL *,
+    curl_infotype, const unsigned char *, size_t, const void *);
 
 /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
 /* this is getting even messier... */
@@ -550,7 +569,8 @@ typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *);
 typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
 typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
 typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
-typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *);
+typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
+                                           const void *);
 #else
 typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
 typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
diff --git a/include/curl/types.h b/include/curl/types.h
deleted file mode 100644 (file)
index d37d6ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* not used */
index a85c202..a9244eb 100755 (executable)
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""       $nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
 else
-       true
+  doit_exec=$doit
 fi
 
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-       else
-               instcmd=mkdir
-       fi
-else
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
+posix_mkdir=
 
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
+# Desired mode of installed file.
+mode=0755
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
 
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
-fi
+src=
+dst=
+dir_arg=
+dst_arg=
 
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+copy_on_change=false
+no_target_directory=
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
 
-pathcomp=''
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-       pathcomp="${pathcomp}/"
-done
-fi
+    -C) copy_on_change=true;;
 
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
+    -d) dir_arg=true;;
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
 
-# If we're going to rename the final executable, determine the name now.
+    --help) echo "$usage"; exit $?;;
 
-       if [ x"$transformarg" = x ]
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename |
-                       sed $transformarg`$transformbasename
-       fi
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
 
-# don't allow the sed command to completely eliminate the filename
+    -o) chowncmd="$chownprog $2"
+       shift;;
 
-       if [ x"$dstfile" = x ]
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
+    -s) stripcmd=$stripprog;;
 
-# Make a temp file name in the proper directory.
+    -t) dst_arg=$2
+       # Protect names problematic for `test' and other utilities.
+       case $dst_arg in
+         -* | [=\(\)!]) dst_arg=./$dst_arg;;
+       esac
+       shift;;
 
-       dsttmp=$dstdir/#inst.$$#
+    -T) no_target_directory=true;;
 
-# Move or copy the file name to the temp name
+    --version) echo "$0 $scriptversion"; exit $?;;
 
-       $doit $instcmd $src $dsttmp &&
+    --)        shift
+       break;;
 
-       trap "rm -f ${dsttmp}" 0 &&
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
 
-# and set any options; do chmod last to preserve setuid bits
+    *)  break;;
+  esac
+  shift
+done
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-# Now rename the file to the real destination.
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
 
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile
+for src
+do
+  # Protect names problematic for `test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
 
-fi &&
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
 
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       [-=\(\)!]*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test X"$d" = X && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
 
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index aec1a3c..b2bcf09 100644 (file)
@@ -94,6 +94,10 @@ add_library(
   ${HHEADERS} ${CSOURCES}
   )
 
+if(MSVC AND CURL_STATICLIB)
+  set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+endif()
+
 target_link_libraries(${LIB_NAME} ${CURL_LIBS})
 
 if(WIN32)
@@ -108,17 +112,11 @@ setup_curl_dependencies(${LIB_NAME})
 set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
 set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
 
-if(MSVC)
-  if(NOT BUILD_RELEASE_DEBUG_DIRS)
-    # Ugly workaround to remove the "/debug" or "/release" in each output
-    set_target_properties(${LIB_NAME} PROPERTIES PREFIX "../")
-    set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
-  endif()
-endif()
-
 if(WIN32)
   if(NOT CURL_STATICLIB)
     # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"
     set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
   endif()
 endif()
+
+install(TARGETS ${LIB_NAME} DESTINATION lib)
index 7af368b..b775365 100644 (file)
@@ -70,19 +70,26 @@ CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
 CFLAGS += -dUSE_WINDOWS_SSPI
 !endif
 
+!ifdef %use_winidn
+CFLAGS += -dWINVER=0x0600 -dUSE_WIN32_IDN
+!  if $(__VERSION__) <= 1290
+CFLAGS += -dWANT_IDN_PROTOTYPES
+!  endif
+!endif
+
 #
 # Change to suite.
 #
 !ifdef %zlib_root
 ZLIB_ROOT = $(%zlib_root)
 !else
-ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.5
+ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.8
 !endif
 
 !ifdef %libssh2_root
 LIBSSH2_ROOT = $(%libssh2_root)
 !else
-LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.2.7
+LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.4.3
 !endif
 
 !ifdef %librtmp_root
@@ -94,7 +101,7 @@ LIBRTMP_ROOT = ..$(DS)..$(DS)rtmpdump-2.3
 !ifdef %openssl_root
 OPENSSL_ROOT = $(%openssl_root)
 !else
-OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8q
+OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8y
 !endif
 
 !ifdef %ares_root
@@ -229,6 +236,14 @@ $(LINK_ARG): $(__MAKEFILES__)
 !ifdef %use_ares
        @%append $^@ library $(ARES_ROOT)$(DS)cares.lib
 !endif
+!ifdef %use_winidn
+!  if $(__VERSION__) > 1290
+       @%append $^@ library normaliz.lib
+!  else
+       @%append $^@ import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii'
+       @%append $^@ import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode'
+!  endif
+!endif
 
 $(LIB_ARG): $(__MAKEFILES__)
        %create $^@
index 8c81cbf..4477cc2 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
 ###########################################################################
 AUTOMAKE_OPTIONS = foreign nostdinc
 
-DSP = vc6libcurl.dsp
-VCPROJ = libcurl.vcproj
-
 DOCS = README.encoding README.memoryleak README.ares README.curlx      \
  README.hostip README.multi_socket README.httpauth README.pipelining    \
  README.curl_off_t README.pingpong
 
 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
 
-EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP)                 \
- vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h            \
- config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist      \
- libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga                   \
- Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot   \
- config-win32ce.h config-os400.h setup-os400.h config-symbian.h                   \
- Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl                   \
- mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h        \
- Makefile.vxworks config-vms.h
-
-CLEANFILES = $(DSP) $(VCPROJ)
+EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h     \
+ config-win32ce.h config-riscos.h config-mac.h curl_config.h.in                \
+ makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h    \
+ makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h       \
+ config-os400.h setup-os400.h config-symbian.h Makefile.Watcom         \
+ config-tpf.h $(DOCS) mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST)   \
+ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl       \
+ objnames-test08.sh objnames-test10.sh objnames.inc
 
 lib_LTLIBRARIES = libcurl.la
-LIBCURL_LIBS = @LIBCURL_LIBS@
+
+if BUILD_UNITTESTS
+noinst_LTLIBRARIES = libcurlu.la
+else
+noinst_LTLIBRARIES =
+endif
 
 # This might hold -Werror
 CFLAGS += @CURL_CFLAG_EXTRAS@
@@ -54,29 +53,32 @@ CFLAGS += @CURL_CFLAG_EXTRAS@
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
 
 if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_builddir)/ares         \
-           -I$(top_srcdir)/ares
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_builddir)/ares         \
+              -I$(top_srcdir)/ares
 else
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib
 endif
 
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
 if SONAME_BUMP
 #
 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
@@ -87,9 +89,9 @@ if SONAME_BUMP
 #
 # This conditional soname bump SHOULD be removed at next "proper" bump.
 #
-VERSIONINFO=-version-info 7:0:2
+VERSIONINFO=-version-info 8:0:3
 else
-VERSIONINFO=-version-info 6:0:2
+VERSIONINFO=-version-info 7:0:3
 endif
 
 # This flag accepts an argument of the form current[:revision[:age]]. So,
@@ -105,75 +107,57 @@ endif
 #
 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
 
-if NO_UNDEFINED
-# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
-UNDEF = -no-undefined
+AM_CPPFLAGS += -DBUILDING_LIBCURL
+AM_LDFLAGS =
+AM_CFLAGS =
+
+libcurl_la_CPPFLAGS_EXTRA =
+libcurl_la_LDFLAGS_EXTRA =
+libcurl_la_CFLAGS_EXTRA =
+
+if CURL_LT_SHLIB_USE_VERSION_INFO
+libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
 endif
 
-if MIMPURE
-# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
-# allocatable but non-writable sections" problems.
-MIMPURE = -mimpure-text
+if CURL_LT_SHLIB_USE_NO_UNDEFINED
+libcurl_la_LDFLAGS_EXTRA += -no-undefined
 endif
 
-if VERSIONED_SYMBOLS
-VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
+if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+libcurl_la_LDFLAGS_EXTRA += -mimpure-text
 endif
 
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS) $(VERSIONED_SYMBOLS)
+if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
+libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+endif
+
+if USE_CPPFLAG_CURL_STATICLIB
+libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
+endif
+
+if DOING_CURL_SYMBOL_HIDING
+libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+endif
+
+libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
+libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
+libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
+
+libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
+libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
+libcurlu_la_CFLAGS = $(AM_CFLAGS)
 
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
 
 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
+libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
 
-WIN32SOURCES = $(CSOURCES)
-WIN32HEADERS = $(HHEADERS) config-win32.h
-
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
-
-$(DSP): msvcproj.head msvcproj.foot Makefile.am
-       echo "creating $(DSP)"
-       @(cp $(srcdir)/msvcproj.head $(DSP); \
-       echo "# Begin Group \"Source Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       echo "# Begin Group \"Header Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       cat $(srcdir)/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
-       echo "creating $(VCPROJ)"
-       @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/lib/Makefile.am.orig b/lib/Makefile.am.orig
deleted file mode 100644 (file)
index 4a35c72..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-#***************************************************************************
-#                                  _   _ ____  _
-#  Project                     ___| | | |  _ \| |
-#                             / __| | | | |_) | |
-#                            | (__| |_| |  _ <| |___
-#                             \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2010, 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.
-#
-###########################################################################
-AUTOMAKE_OPTIONS = foreign nostdinc
-
-DSP = vc6libcurl.dsp
-VCPROJ = libcurl.vcproj
-
-DOCS = README.encoding README.memoryleak README.ares README.curlx      \
- README.hostip README.multi_socket README.httpauth README.pipelining    \
- README.curl_off_t README.pingpong
-
-CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
-
-EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP)                 \
- vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h            \
- config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist      \
- libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga                   \
- Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot   \
- config-win32ce.h config-os400.h setup-os400.h config-symbian.h                   \
- Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl                   \
- mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h        \
- Makefile.vxworks config-vms.h
-
-CLEANFILES = $(DSP) $(VCPROJ)
-
-lib_LTLIBRARIES = libcurl.la
-LIBCURL_LIBS = @LIBCURL_LIBS@
-
-# This might hold -Werror
-CFLAGS += @CURL_CFLAG_EXTRAS@
-
-# Specify our include paths here, and do it relative to $(top_srcdir) and
-# $(top_builddir), to ensure that these paths which belong to the library
-# being currently built and tested are searched before the library which
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
-# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
-# $(top_srcdir)/ares is for in-tree c-ares's external include files
-
-if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_builddir)/ares         \
-           -I$(top_srcdir)/ares
-else
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib
-endif
-
-if SONAME_BUMP
-#
-# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
-# it is. The problem is that we try to avoid the bump as hard as possible, but
-# yet it is still necessary for a few rare situations. The configure script will
-# attempt to figure out these situations, and it can be forced to consider this
-# to be such a case! See README.curl_off_t for further details.
-#
-# This conditional soname bump SHOULD be removed at next "proper" bump.
-#
-VERSIONINFO=-version-info 7:0:2
-else
-VERSIONINFO=-version-info 6:0:2
-endif
-
-# This flag accepts an argument of the form current[:revision[:age]]. So,
-# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
-# 1.
-#
-# Here's the simplified rule guide on how to change -version-info:
-# (current version is C:R:A)
-#
-# 1. if there are only source changes, use C:R+1:A
-# 2. if interfaces were added use C+1:0:A+1
-# 3. if interfaces were removed, then use C+1:0:0
-#
-# For the full guide on libcurl ABI rules, see docs/libcurl/ABI
-
-if NO_UNDEFINED
-# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
-UNDEF = -no-undefined
-endif
-
-if MIMPURE
-# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
-# allocatable but non-writable sections" problems.
-MIMPURE = -mimpure-text
-endif
-
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
-
-# Makefile.inc provides the CSOURCES and HHEADERS defines
-include Makefile.inc
-
-libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
-
-WIN32SOURCES = $(CSOURCES)
-WIN32HEADERS = $(HHEADERS) config-win32.h
-
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
-
-$(DSP): msvcproj.head msvcproj.foot Makefile.am
-       echo "creating $(DSP)"
-       @(cp $(srcdir)/msvcproj.head $(DSP); \
-       echo "# Begin Group \"Source Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       echo "# Begin Group \"Header Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       cat $(srcdir)/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
-       echo "creating $(VCPROJ)"
-       @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
index 509ae27..7dbb37f 100644 (file)
@@ -6,19 +6,28 @@
 #
 #  'BCCDIR' has to be set up to point to the base directory
 #  of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
-#  where c:\Borland\BCC55 is the compiler is installed
 #
-#  Written by Jaepil Kim, pit@paradise.net.nz
+#  Initially written by Jaepil Kim, pit@paradise.net.nz
 ############################################################
 
+!if "$(__MAKE__)" == ""
+!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
+!endif
+
+# Borland's $(MAKEDIR) expands to the path where make.exe is located,
+# use this feature to define BCCDIR when user has not defined BCCDIR.
+!ifndef BCCDIR
+BCCDIR = $(MAKEDIR)\..
+!endif
+
 # Edit the path below to point to the base of your Zlib sources.
 !ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.1
+ZLIB_PATH = ..\..\zlib-1.2.8
 !endif
 
 # Edit the path below to point to the base of your OpenSSL package.
 !ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.7d
+OPENSSL_PATH = ..\..\openssl-0.9.8y
 !endif
 
 # Set libcurl static lib, dll and import lib
@@ -27,55 +36,115 @@ LIBCURL_DLL    = libcurl.dll
 LIBCURL_IMPLIB = libcurl_imp.lib
 
 # Setup environment
-CXX      = bcc32
+PP_CMD   = cpp32 -q -P-
+CC_CMD   = bcc32 -q -c
 LD       = bcc32
-CP       = copy
-RM       = del
+RM       = del 2>NUL
+MKDIR    = md
+RMDIR    = rd /q
 LIB      = tlib
 IMPLIB   = implib
 
-CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
+CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
 LIBFLAGS = /C /P32
 LDFLAGS  = -q -lq -laa -tWD
 
-INCDIRS  = -I.;../include
-LINKLIB  = $(BCCDIR)/lib/cw32mt.lib
+SRCDIR   = .
+OBJDIR   = .\BCC_objs
+INCDIRS  = -I.;..\include
+LINKLIB  = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
+DEFINES  = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL
 
-# If you build with SSL support, set WITH_SSL=1
-DEFINES  = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL
+# By default SSPI support is enabled for BCC
+!ifndef DISABLE_SSPI
+DEFINES  = $(DEFINES) -DUSE_WINDOWS_SSPI
+!endif
 
+# By default LDAP support is disabled for BCC
+!ifndef WITH_LDAP
+DEFINES  = $(DEFINES) -DCURL_DISABLE_LDAP
+!endif
+
+# ZLIB support is enabled setting WITH_ZLIB=1
 !ifdef WITH_ZLIB
 DEFINES  = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
 INCDIRS  = $(INCDIRS);$(ZLIB_PATH)
-LINKLIB  = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
+LINKLIB  = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
 !endif
 
+# SSL support is enabled setting WITH_SSL=1
 !ifdef WITH_SSL
 DEFINES  = $(DEFINES) -DUSE_SSLEAY
-INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
-LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
+INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
+LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
 !endif
 
 .autodepend
 
+.path.c   = $(SRCDIR)
+.path.obj = $(OBJDIR)
+.path.int = $(OBJDIR)
+
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 !include Makefile.inc
 
-OBJECTS = $(CSOURCES:.c=.obj)
+# Borland's command line librarian program TLIB version 4.5 is not capable
+# of building a library when any of its objects contains an hypen in its
+# name, due to a command line parsing bug. In order to workaround this, we
+# build source files with hyphens in their name as objects with underscores
+# using explicit compilation build rules instead of implicit ones.
+
+NOHYPHEN = $(CSOURCES:-=_)
+
+OBJECTS = $(NOHYPHEN:.c=.obj)
+PREPROCESSED = $(NOHYPHEN:.c=.int)
+
+# Borland's command line compiler (BCC32) version 5.5.1 integrated
+# preprocessor has a bug which results in silently generating wrong
+# definitions for libcurl macros such as CURL_OFF_T_C, on the other
+# hand Borland's command line preprocessor (CPP32) version 5.5.1 does
+# not have the bug and achieves proper results. In order to avoid the
+# silent bug we first preprocess source files and later compile the
+# preprocessed result.
 
 .c.obj:
-       $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
+       @-$(RM) $(@R).int
+       $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
+       $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
+
+all:   $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL)
+
+asyn_ares.obj: asyn-ares.c
+       @-$(RM) $(@R).int
+       $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+       $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
+
+asyn_thread.obj: asyn-thread.c
+       @-$(RM) $(@R).int
+       $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+       $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
 
-all:   $(LIBCURL_LIB) $(LIBCURL_DLL)
+non_ascii.obj: non-ascii.c
+       @-$(RM) $(@R).int
+       $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?)
+       $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
 
 clean:
-       -$(RM) $(LIBCURL_LIB)
-       -$(RM) $(LIBCURL_IMPLIB)
-       -$(RM) libcurl.tds
-       -$(RM) *.obj
+       cd $(OBJDIR)
+       @-$(RM) $(OBJECTS)
+       @-$(RM) $(PREPROCESSED)
+       cd ..
+       @-$(RMDIR) $(OBJDIR)
+       @-$(RM) $(LIBCURL_LIB)
+       @-$(RM) $(LIBCURL_IMPLIB)
+       @-$(RM) libcurl.tds
+
+$(OBJDIR):
+       @-$(RMDIR) $(OBJDIR)
+       @-$(MKDIR) $(OBJDIR)
 
 $(LIBCURL_LIB): $(OBJECTS)
-       @-$(RM) $@
+       @-$(RM) $(LIBCURL_LIB)
        $(LIB) $(LIBFLAGS) $@ @&&!
 +$(**: = &^
 +)
@@ -84,6 +153,11 @@ $(LIBCURL_LIB): $(OBJECTS)
 $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
        @-$(RM) $(LIBCURL_DLL)
        @-$(RM) $(LIBCURL_IMPLIB)
-       $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) $**
+       $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) @&&!
+$(**: = ^
+)
+!
        $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
 
+
+# End of Makefile.b32
index 1a86821..51e7c5f 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # CSRC2 = file4.c file5.c file6.c
 # CSOURCES = $(CSRC1) $(CSRC2)
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -45,96 +87,278 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.inc $(srcdir)/curl_config.h.in
+@CURL_LT_SHLIB_USE_VERSION_INFO_TRUE@am__append_1 = $(VERSIONINFO)
+@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_2 = -no-undefined
+@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_3 = -mimpure-text
+@CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE@am__append_4 = -Wl,--version-script=libcurl.vers
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_5 = -DCURL_STATICLIB
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_6 = -DCURL_HIDDEN_SYMBOLS
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_7 = $(CFLAG_CURL_SYMBOL_HIDING)
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(srcdir)/curl_config.h.in \
+       $(top_srcdir)/mkinstalldirs $(srcdir)/libcurl.vers.in \
+       $(top_srcdir)/depcomp
 subdir = lib
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = curl_config.h $(top_builddir)/src/curl_config.h \
-       $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
+CONFIG_HEADER = curl_config.h $(top_builddir)/include/curl/curlbuild.h
+CONFIG_CLEAN_FILES = libcurl.vers
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 libcurl_la_LIBADD =
-am__objects_1 = file.lo timeval.lo base64.lo hostip.lo progress.lo \
-       formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo dict.lo \
-       if2ip.lo speedcheck.lo ldap.lo ssluse.lo version.lo getenv.lo \
-       escape.lo mprintf.lo telnet.lo netrc.lo getinfo.lo transfer.lo \
-       strequal.lo easy.lo security.lo krb4.lo curl_fnmatch.lo \
-       fileinfo.lo ftplistparser.lo wildcard.lo krb5.lo memdebug.lo \
-       http_chunks.lo strtok.lo connect.lo llist.lo hash.lo multi.lo \
-       content_encoding.lo share.lo http_digest.lo md4.lo md5.lo \
-       curl_rand.lo http_negotiate.lo http_ntlm.lo inet_pton.lo \
-       strtoofft.lo strerror.lo hostares.lo hostasyn.lo hostip4.lo \
-       hostip6.lo hostsyn.lo hostthre.lo inet_ntop.lo parsedate.lo \
-       select.lo gtls.lo sslgen.lo tftp.lo splay.lo strdup.lo \
-       socks.lo ssh.lo nss.lo qssl.lo rawstr.lo curl_addrinfo.lo \
-       socks_gssapi.lo socks_sspi.lo curl_sspi.lo slist.lo \
-       nonblock.lo curl_memrchr.lo imap.lo pop3.lo smtp.lo \
-       pingpong.lo rtsp.lo curl_threads.lo warnless.lo hmac.lo \
-       polarssl.lo curl_rtmp.lo openldap.lo curl_gethostname.lo \
-       gopher.lo
+am__objects_1 = libcurl_la-file.lo libcurl_la-timeval.lo \
+       libcurl_la-base64.lo libcurl_la-hostip.lo \
+       libcurl_la-progress.lo libcurl_la-formdata.lo \
+       libcurl_la-cookie.lo libcurl_la-http.lo libcurl_la-sendf.lo \
+       libcurl_la-ftp.lo libcurl_la-url.lo libcurl_la-dict.lo \
+       libcurl_la-if2ip.lo libcurl_la-speedcheck.lo \
+       libcurl_la-ldap.lo libcurl_la-ssluse.lo libcurl_la-version.lo \
+       libcurl_la-getenv.lo libcurl_la-escape.lo \
+       libcurl_la-mprintf.lo libcurl_la-telnet.lo libcurl_la-netrc.lo \
+       libcurl_la-getinfo.lo libcurl_la-transfer.lo \
+       libcurl_la-strequal.lo libcurl_la-easy.lo \
+       libcurl_la-security.lo libcurl_la-krb4.lo \
+       libcurl_la-curl_fnmatch.lo libcurl_la-fileinfo.lo \
+       libcurl_la-ftplistparser.lo libcurl_la-wildcard.lo \
+       libcurl_la-krb5.lo libcurl_la-memdebug.lo \
+       libcurl_la-http_chunks.lo libcurl_la-strtok.lo \
+       libcurl_la-connect.lo libcurl_la-llist.lo libcurl_la-hash.lo \
+       libcurl_la-multi.lo libcurl_la-content_encoding.lo \
+       libcurl_la-share.lo libcurl_la-http_digest.lo \
+       libcurl_la-md4.lo libcurl_la-md5.lo \
+       libcurl_la-http_negotiate.lo libcurl_la-inet_pton.lo \
+       libcurl_la-strtoofft.lo libcurl_la-strerror.lo \
+       libcurl_la-amigaos.lo libcurl_la-hostasyn.lo \
+       libcurl_la-hostip4.lo libcurl_la-hostip6.lo \
+       libcurl_la-hostsyn.lo libcurl_la-inet_ntop.lo \
+       libcurl_la-parsedate.lo libcurl_la-select.lo \
+       libcurl_la-gtls.lo libcurl_la-sslgen.lo libcurl_la-tftp.lo \
+       libcurl_la-splay.lo libcurl_la-strdup.lo libcurl_la-socks.lo \
+       libcurl_la-ssh.lo libcurl_la-nss.lo libcurl_la-qssl.lo \
+       libcurl_la-rawstr.lo libcurl_la-curl_addrinfo.lo \
+       libcurl_la-socks_gssapi.lo libcurl_la-socks_sspi.lo \
+       libcurl_la-curl_sspi.lo libcurl_la-slist.lo \
+       libcurl_la-nonblock.lo libcurl_la-curl_memrchr.lo \
+       libcurl_la-imap.lo libcurl_la-pop3.lo libcurl_la-smtp.lo \
+       libcurl_la-pingpong.lo libcurl_la-rtsp.lo \
+       libcurl_la-curl_threads.lo libcurl_la-warnless.lo \
+       libcurl_la-hmac.lo libcurl_la-polarssl.lo \
+       libcurl_la-polarssl_threadlock.lo libcurl_la-curl_rtmp.lo \
+       libcurl_la-openldap.lo libcurl_la-curl_gethostname.lo \
+       libcurl_la-gopher.lo libcurl_la-axtls.lo \
+       libcurl_la-idn_win32.lo libcurl_la-http_negotiate_sspi.lo \
+       libcurl_la-cyassl.lo libcurl_la-http_proxy.lo \
+       libcurl_la-non-ascii.lo libcurl_la-asyn-ares.lo \
+       libcurl_la-asyn-thread.lo libcurl_la-curl_gssapi.lo \
+       libcurl_la-curl_ntlm.lo libcurl_la-curl_ntlm_wb.lo \
+       libcurl_la-curl_ntlm_core.lo libcurl_la-curl_ntlm_msgs.lo \
+       libcurl_la-curl_sasl.lo libcurl_la-curl_schannel.lo \
+       libcurl_la-curl_multibyte.lo libcurl_la-curl_darwinssl.lo \
+       libcurl_la-hostcheck.lo libcurl_la-bundles.lo \
+       libcurl_la-conncache.lo libcurl_la-pipeline.lo \
+       libcurl_la-dotdot.lo libcurl_la-x509asn1.lo \
+       libcurl_la-gskit.lo
 am__objects_2 =
 am_libcurl_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcurl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcurl_la_CFLAGS) \
+       $(CFLAGS) $(libcurl_la_LDFLAGS) $(LDFLAGS) -o $@
+libcurlu_la_LIBADD =
+am__objects_3 = libcurlu_la-file.lo libcurlu_la-timeval.lo \
+       libcurlu_la-base64.lo libcurlu_la-hostip.lo \
+       libcurlu_la-progress.lo libcurlu_la-formdata.lo \
+       libcurlu_la-cookie.lo libcurlu_la-http.lo libcurlu_la-sendf.lo \
+       libcurlu_la-ftp.lo libcurlu_la-url.lo libcurlu_la-dict.lo \
+       libcurlu_la-if2ip.lo libcurlu_la-speedcheck.lo \
+       libcurlu_la-ldap.lo libcurlu_la-ssluse.lo \
+       libcurlu_la-version.lo libcurlu_la-getenv.lo \
+       libcurlu_la-escape.lo libcurlu_la-mprintf.lo \
+       libcurlu_la-telnet.lo libcurlu_la-netrc.lo \
+       libcurlu_la-getinfo.lo libcurlu_la-transfer.lo \
+       libcurlu_la-strequal.lo libcurlu_la-easy.lo \
+       libcurlu_la-security.lo libcurlu_la-krb4.lo \
+       libcurlu_la-curl_fnmatch.lo libcurlu_la-fileinfo.lo \
+       libcurlu_la-ftplistparser.lo libcurlu_la-wildcard.lo \
+       libcurlu_la-krb5.lo libcurlu_la-memdebug.lo \
+       libcurlu_la-http_chunks.lo libcurlu_la-strtok.lo \
+       libcurlu_la-connect.lo libcurlu_la-llist.lo \
+       libcurlu_la-hash.lo libcurlu_la-multi.lo \
+       libcurlu_la-content_encoding.lo libcurlu_la-share.lo \
+       libcurlu_la-http_digest.lo libcurlu_la-md4.lo \
+       libcurlu_la-md5.lo libcurlu_la-http_negotiate.lo \
+       libcurlu_la-inet_pton.lo libcurlu_la-strtoofft.lo \
+       libcurlu_la-strerror.lo libcurlu_la-amigaos.lo \
+       libcurlu_la-hostasyn.lo libcurlu_la-hostip4.lo \
+       libcurlu_la-hostip6.lo libcurlu_la-hostsyn.lo \
+       libcurlu_la-inet_ntop.lo libcurlu_la-parsedate.lo \
+       libcurlu_la-select.lo libcurlu_la-gtls.lo \
+       libcurlu_la-sslgen.lo libcurlu_la-tftp.lo libcurlu_la-splay.lo \
+       libcurlu_la-strdup.lo libcurlu_la-socks.lo libcurlu_la-ssh.lo \
+       libcurlu_la-nss.lo libcurlu_la-qssl.lo libcurlu_la-rawstr.lo \
+       libcurlu_la-curl_addrinfo.lo libcurlu_la-socks_gssapi.lo \
+       libcurlu_la-socks_sspi.lo libcurlu_la-curl_sspi.lo \
+       libcurlu_la-slist.lo libcurlu_la-nonblock.lo \
+       libcurlu_la-curl_memrchr.lo libcurlu_la-imap.lo \
+       libcurlu_la-pop3.lo libcurlu_la-smtp.lo \
+       libcurlu_la-pingpong.lo libcurlu_la-rtsp.lo \
+       libcurlu_la-curl_threads.lo libcurlu_la-warnless.lo \
+       libcurlu_la-hmac.lo libcurlu_la-polarssl.lo \
+       libcurlu_la-polarssl_threadlock.lo libcurlu_la-curl_rtmp.lo \
+       libcurlu_la-openldap.lo libcurlu_la-curl_gethostname.lo \
+       libcurlu_la-gopher.lo libcurlu_la-axtls.lo \
+       libcurlu_la-idn_win32.lo libcurlu_la-http_negotiate_sspi.lo \
+       libcurlu_la-cyassl.lo libcurlu_la-http_proxy.lo \
+       libcurlu_la-non-ascii.lo libcurlu_la-asyn-ares.lo \
+       libcurlu_la-asyn-thread.lo libcurlu_la-curl_gssapi.lo \
+       libcurlu_la-curl_ntlm.lo libcurlu_la-curl_ntlm_wb.lo \
+       libcurlu_la-curl_ntlm_core.lo libcurlu_la-curl_ntlm_msgs.lo \
+       libcurlu_la-curl_sasl.lo libcurlu_la-curl_schannel.lo \
+       libcurlu_la-curl_multibyte.lo libcurlu_la-curl_darwinssl.lo \
+       libcurlu_la-hostcheck.lo libcurlu_la-bundles.lo \
+       libcurlu_la-conncache.lo libcurlu_la-pipeline.lo \
+       libcurlu_la-dotdot.lo libcurlu_la-x509asn1.lo \
+       libcurlu_la-gskit.lo
+am_libcurlu_la_OBJECTS = $(am__objects_3) $(am__objects_2)
+libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS)
+libcurlu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcurlu_la_CFLAGS) \
+       $(CFLAGS) $(libcurlu_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_UNITTESTS_TRUE@am_libcurlu_la_rpath =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libcurl_la_SOURCES)
-DIST_SOURCES = $(libcurl_la_SOURCES)
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libcurl_la_SOURCES) $(libcurlu_la_SOURCES)
+DIST_SOURCES = $(libcurl_la_SOURCES) $(libcurlu_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+       $(LISP)curl_config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 
 # This might hold -Werror
 CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -151,7 +375,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -164,15 +389,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -182,23 +409,24 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -211,7 +439,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -224,34 +451,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -263,6 +490,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -282,7 +510,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -292,9 +519,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 #***************************************************************************
 #                                  _   _ ____  _
@@ -303,7 +534,7 @@ target_alias = @target_alias@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -318,31 +549,42 @@ target_alias = @target_alias@
 #
 ###########################################################################
 AUTOMAKE_OPTIONS = foreign nostdinc
-DSP = vc6libcurl.dsp
-VCPROJ = libcurl.vcproj
 DOCS = README.encoding README.memoryleak README.ares README.curlx      \
  README.hostip README.multi_socket README.httpauth README.pipelining    \
  README.curl_off_t README.pingpong
 
 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
-EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP)                 \
- vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h            \
- config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist      \
- libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga                   \
- Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot   \
- config-win32ce.h config-os400.h setup-os400.h config-symbian.h                   \
- Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl                   \
- mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h        \
- Makefile.vxworks config-vms.h
-
-CLEANFILES = $(DSP) $(VCPROJ)
+EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h     \
+ config-win32ce.h config-riscos.h config-mac.h curl_config.h.in                \
+ makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h    \
+ makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h       \
+ config-os400.h setup-os400.h config-symbian.h Makefile.Watcom         \
+ config-tpf.h $(DOCS) mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST)   \
+ firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl       \
+ objnames-test08.sh objnames-test10.sh objnames.inc
+
 lib_LTLIBRARIES = libcurl.la
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/lib
+@BUILD_UNITTESTS_FALSE@noinst_LTLIBRARIES = 
+@BUILD_UNITTESTS_TRUE@noinst_LTLIBRARIES = libcurlu.la
 
+# This flag accepts an argument of the form current[:revision[:age]]. So,
+# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
+# 1.
+#
+# Here's the simplified rule guide on how to change -version-info:
+# (current version is C:R:A)
+#
+# 1. if there are only source changes, use C:R+1:A
+# 2. if interfaces were added use C+1:0:A+1
+# 3. if interfaces were removed, then use C+1:0:0
+#
+# For the full guide on libcurl ABI rules, see docs/libcurl/ABI
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -DBUILDING_LIBCURL
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
 # $(top_builddir), to ensure that these paths which belong to the library
@@ -350,32 +592,12 @@ lib_LTLIBRARIES = libcurl.la
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/lib            \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/ares         \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/ares
-
-@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 6:0:2
-
-#
-# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
-# it is. The problem is that we try to avoid the bump as hard as possible, but
-# yet it is still necessary for a few rare situations. The configure script will
-# attempt to figure out these situations, and it can be forced to consider this
-# to be such a case! See README.curl_off_t for further details.
-#
-# This conditional soname bump SHOULD be removed at next "proper" bump.
-#
-@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 7:0:2
 
 # This flag accepts an argument of the form current[:revision[:age]]. So,
 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
@@ -389,52 +611,82 @@ lib_LTLIBRARIES = libcurl.la
 # 3. if interfaces were removed, then use C+1:0:0
 #
 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/ares \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/ares \
+@USE_EMBEDDED_ARES_TRUE@       -DBUILDING_LIBCURL
+@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 7:0:3
 
-# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
-@NO_UNDEFINED_TRUE@UNDEF = -no-undefined
-
-# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
-# allocatable but non-writable sections" problems.
-@MIMPURE_TRUE@MIMPURE = -mimpure-text
-libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
+#
+# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
+# it is. The problem is that we try to avoid the bump as hard as possible, but
+# yet it is still necessary for a few rare situations. The configure script will
+# attempt to figure out these situations, and it can be forced to consider this
+# to be such a case! See README.curl_off_t for further details.
+#
+# This conditional soname bump SHOULD be removed at next "proper" bump.
+#
+@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 8:0:3
+AM_LDFLAGS = 
+AM_CFLAGS = 
+libcurl_la_CPPFLAGS_EXTRA = $(am__append_5) $(am__append_6)
+libcurl_la_LDFLAGS_EXTRA = $(am__append_1) $(am__append_2) \
+       $(am__append_3) $(am__append_4)
+libcurl_la_CFLAGS_EXTRA = $(am__append_7)
+libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
+libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS)
+libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
+libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
+libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS)
+libcurlu_la_CFLAGS = $(AM_CFLAGS)
 CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c    \
   cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c      \
   ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c       \
   netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c     \
   curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c          \
   memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c   \
-  content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c     \
-  http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c      \
-  hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c       \
-  inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c      \
-  strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c         \
-  socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c           \
-  curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
-  warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
-  gopher.c
+  content_encoding.c share.c http_digest.c md4.c md5.c \
+  http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c                \
+  hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c     \
+  select.c gtls.c sslgen.c tftp.c splay.c strdup.c socks.c ssh.c nss.c \
+  qssl.c rawstr.c curl_addrinfo.c socks_gssapi.c socks_sspi.c          \
+  curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c   \
+  pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c                \
+  polarssl_threadlock.c curl_rtmp.c openldap.c curl_gethostname.c      \
+  gopher.c axtls.c idn_win32.c http_negotiate_sspi.c cyassl.c          \
+  http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c     \
+  curl_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_ntlm_msgs.c         \
+  curl_sasl.c curl_schannel.c curl_multibyte.c curl_darwinssl.c                \
+  hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c      \
+  gskit.c
 
 HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h      \
   progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h     \
   if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h        \
-  getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.h     \
+  getinfo.h strequal.h krb4.h memdebug.h http_chunks.h \
   curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h                \
   connect.h llist.h hash.h content_encoding.h share.h curl_md4.h       \
-  curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h    \
-  strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h     \
+  curl_md5.h http_digest.h http_negotiate.h inet_pton.h amigaos.h      \
+  strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h curl_setup.h        \
   transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h   \
-  tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
-  curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h        \
+  tftp.h sockaddr.h splay.h strdup.h socks.h ssh.h nssg.h curl_base64.h        \
+  rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h              \
   curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
-  warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h      \
-  gopher.h
+  warnless.h curl_hmac.h polarssl.h polarssl_threadlock.h curl_rtmp.h  \
+  curl_gethostname.h gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h        \
+  asyn.h curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h     \
+  curl_ntlm_msgs.h curl_sasl.h curl_schannel.h curl_multibyte.h                \
+  curl_darwinssl.h hostcheck.h bundles.h conncache.h curl_setup_once.h \
+  multihandle.h setup-vms.h pipeline.h dotdot.h x509asn1.h gskit.h
 
 
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
-WIN32SOURCES = $(CSOURCES)
-WIN32HEADERS = $(HHEADERS) config-win32.h
-DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
-VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
+libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
 all: curl_config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -444,14 +696,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  lib/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  lib/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -461,6 +713,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -469,52 +722,76 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 curl_config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
-       else :; fi
+       @if test ! -f $@; then rm -f stamp-h1; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/curl_config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status lib/curl_config.h
 $(srcdir)/curl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
 distclean-hdr:
        -rm -f curl_config.h stamp-h1
+libcurl.vers: $(top_builddir)/config.status $(srcdir)/libcurl.vers.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           list2="$$list2 $$p"; \
          else :; fi; \
-       done
+       done; \
+       test -z "$$list2" || { \
+         echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+       }
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
        done
 
 clean-libLTLIBRARIES:
        -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" != "$$p" || dir=.; \
-         echo "rm -f \"$${dir}/so_locations\""; \
-         rm -f "$${dir}/so_locations"; \
-       done
-libcurl.la: $(libcurl_la_OBJECTS) $(libcurl_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libcurl_la_LDFLAGS) $(libcurl_la_OBJECTS) $(libcurl_la_LIBADD) $(LIBS)
+       @list='$(lib_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+libcurl.la: $(libcurl_la_OBJECTS) $(libcurl_la_DEPENDENCIES) $(EXTRA_libcurl_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcurl_la_LINK) -rpath $(libdir) $(libcurl_la_OBJECTS) $(libcurl_la_LIBADD) $(LIBS)
+
+libcurlu.la: $(libcurlu_la_OBJECTS) $(libcurlu_la_DEPENDENCIES) $(EXTRA_libcurlu_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcurlu_la_LINK) $(am_libcurlu_la_rpath) $(libcurlu_la_OBJECTS) $(libcurlu_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -522,344 +799,2041 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/content_encoding.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_addrinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_fnmatch.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_gethostname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_memrchr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rand.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rtmp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_sspi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_threads.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/easy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escape.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formdata.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftplistparser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gopher.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtls.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostares.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostasyn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip6.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostsyn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostthre.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_chunks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_digest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_negotiate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_ntlm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/if2ip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memdebug.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netrc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nss.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openldap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsedate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pingpong.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polarssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progress.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtsp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/share.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks_gssapi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socks_sspi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speedcheck.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splay.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslgen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssluse.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strequal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoofft.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telnet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transfer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warnless.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wildcard.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-amigaos.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-asyn-ares.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-asyn-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-axtls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-base64.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-bundles.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-conncache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-connect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-content_encoding.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-cookie.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_addrinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_darwinssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_fnmatch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_gethostname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_gssapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_memrchr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_multibyte.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm_core.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm_msgs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_ntlm_wb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_rtmp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_sasl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_schannel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-curl_threads.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-cyassl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-dict.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-dotdot.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-easy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-escape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-fileinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-formdata.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ftp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ftplistparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-getenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-getinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-gopher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-gskit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-gtls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostasyn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostcheck.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip6.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostsyn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http_chunks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http_digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http_negotiate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http_negotiate_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-http_proxy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-idn_win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-if2ip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-imap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-inet_ntop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-inet_pton.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-krb4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-krb5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ldap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-llist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-md4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-md5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-memdebug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-mprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-multi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-netrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-non-ascii.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-nonblock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-nss.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-openldap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-parsedate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-pingpong.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-pipeline.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-polarssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-polarssl_threadlock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-pop3.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-progress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-qssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-rawstr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-rtsp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-security.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-sendf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-share.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-slist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-smtp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-socks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-socks_gssapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-socks_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-speedcheck.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-splay.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ssh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-sslgen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-ssluse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strdup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strequal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strerror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strtok.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-strtoofft.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-telnet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-tftp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-timeval.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-transfer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-url.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-version.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-warnless.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-wildcard.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-x509asn1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-amigaos.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-asyn-ares.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-asyn-thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-axtls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-base64.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-bundles.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-conncache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-connect.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-content_encoding.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-cookie.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_addrinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_darwinssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_fnmatch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_gethostname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_gssapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_memrchr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_multibyte.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm_core.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm_msgs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_ntlm_wb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_rtmp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_sasl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_schannel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_threads.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-cyassl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-dict.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-dotdot.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-easy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-escape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-fileinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-formdata.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ftp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ftplistparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-getenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-getinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-gopher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-gskit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-gtls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostasyn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostcheck.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip6.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostsyn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http_chunks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http_digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http_negotiate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http_negotiate_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-http_proxy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-idn_win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-if2ip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-imap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-inet_ntop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-inet_pton.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-krb4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-krb5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ldap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-llist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-md4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-md5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-memdebug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-mprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-multi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-netrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-non-ascii.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-nonblock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-nss.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-openldap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-parsedate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-pingpong.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-pipeline.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-polarssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-polarssl_threadlock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-pop3.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-progress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-qssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-rawstr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-rtsp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-security.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-sendf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-share.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-slist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-smtp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-socks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-socks_gssapi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-socks_sspi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-speedcheck.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-splay.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ssh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-sslgen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-ssluse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strdup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strequal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strerror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strtok.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-strtoofft.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-telnet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-tftp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-timeval.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-transfer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-url.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-version.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-warnless.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-wildcard.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-x509asn1.Plo@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-mostlyclean-libtool:
-       -rm -f *.lo
+libcurl_la-file.lo: file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-file.lo -MD -MP -MF $(DEPDIR)/libcurl_la-file.Tpo -c -o libcurl_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-file.Tpo $(DEPDIR)/libcurl_la-file.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='file.c' object='libcurl_la-file.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c
 
-clean-libtool:
-       -rm -rf .libs _libs
+libcurl_la-timeval.lo: timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-timeval.lo -MD -MP -MF $(DEPDIR)/libcurl_la-timeval.Tpo -c -o libcurl_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-timeval.Tpo $(DEPDIR)/libcurl_la-timeval.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='timeval.c' object='libcurl_la-timeval.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+libcurl_la-base64.lo: base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-base64.lo -MD -MP -MF $(DEPDIR)/libcurl_la-base64.Tpo -c -o libcurl_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-base64.Tpo $(DEPDIR)/libcurl_la-base64.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='base64.c' object='libcurl_la-base64.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c
 
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+libcurl_la-hostip.lo: hostip.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostip.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostip.Tpo -c -o libcurl_la-hostip.lo `test -f 'hostip.c' || echo '$(srcdir)/'`hostip.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostip.Tpo $(DEPDIR)/libcurl_la-hostip.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip.c' object='libcurl_la-hostip.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostip.lo `test -f 'hostip.c' || echo '$(srcdir)/'`hostip.c
 
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+libcurl_la-progress.lo: progress.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-progress.lo -MD -MP -MF $(DEPDIR)/libcurl_la-progress.Tpo -c -o libcurl_la-progress.lo `test -f 'progress.c' || echo '$(srcdir)/'`progress.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-progress.Tpo $(DEPDIR)/libcurl_la-progress.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='progress.c' object='libcurl_la-progress.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-progress.lo `test -f 'progress.c' || echo '$(srcdir)/'`progress.c
 
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) curl_config.h
-installdirs:
-       for dir in "$(DESTDIR)$(libdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+libcurl_la-formdata.lo: formdata.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-formdata.lo -MD -MP -MF $(DEPDIR)/libcurl_la-formdata.Tpo -c -o libcurl_la-formdata.lo `test -f 'formdata.c' || echo '$(srcdir)/'`formdata.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-formdata.Tpo $(DEPDIR)/libcurl_la-formdata.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='formdata.c' object='libcurl_la-formdata.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-formdata.lo `test -f 'formdata.c' || echo '$(srcdir)/'`formdata.c
 
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+libcurl_la-cookie.lo: cookie.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-cookie.lo -MD -MP -MF $(DEPDIR)/libcurl_la-cookie.Tpo -c -o libcurl_la-cookie.lo `test -f 'cookie.c' || echo '$(srcdir)/'`cookie.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-cookie.Tpo $(DEPDIR)/libcurl_la-cookie.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cookie.c' object='libcurl_la-cookie.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-cookie.lo `test -f 'cookie.c' || echo '$(srcdir)/'`cookie.c
 
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
+libcurl_la-http.lo: http.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http.Tpo -c -o libcurl_la-http.lo `test -f 'http.c' || echo '$(srcdir)/'`http.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http.Tpo $(DEPDIR)/libcurl_la-http.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http.c' object='libcurl_la-http.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http.lo `test -f 'http.c' || echo '$(srcdir)/'`http.c
 
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+libcurl_la-sendf.lo: sendf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-sendf.lo -MD -MP -MF $(DEPDIR)/libcurl_la-sendf.Tpo -c -o libcurl_la-sendf.lo `test -f 'sendf.c' || echo '$(srcdir)/'`sendf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-sendf.Tpo $(DEPDIR)/libcurl_la-sendf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sendf.c' object='libcurl_la-sendf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-sendf.lo `test -f 'sendf.c' || echo '$(srcdir)/'`sendf.c
 
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+libcurl_la-ftp.lo: ftp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ftp.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ftp.Tpo -c -o libcurl_la-ftp.lo `test -f 'ftp.c' || echo '$(srcdir)/'`ftp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ftp.Tpo $(DEPDIR)/libcurl_la-ftp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ftp.c' object='libcurl_la-ftp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ftp.lo `test -f 'ftp.c' || echo '$(srcdir)/'`ftp.c
 
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+libcurl_la-url.lo: url.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-url.lo -MD -MP -MF $(DEPDIR)/libcurl_la-url.Tpo -c -o libcurl_la-url.lo `test -f 'url.c' || echo '$(srcdir)/'`url.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-url.Tpo $(DEPDIR)/libcurl_la-url.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='url.c' object='libcurl_la-url.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-url.lo `test -f 'url.c' || echo '$(srcdir)/'`url.c
 
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-       mostlyclean-am
+libcurl_la-dict.lo: dict.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-dict.lo -MD -MP -MF $(DEPDIR)/libcurl_la-dict.Tpo -c -o libcurl_la-dict.lo `test -f 'dict.c' || echo '$(srcdir)/'`dict.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-dict.Tpo $(DEPDIR)/libcurl_la-dict.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='dict.c' object='libcurl_la-dict.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-dict.lo `test -f 'dict.c' || echo '$(srcdir)/'`dict.c
 
-distclean: distclean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-libtool distclean-tags
+libcurl_la-if2ip.lo: if2ip.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-if2ip.lo -MD -MP -MF $(DEPDIR)/libcurl_la-if2ip.Tpo -c -o libcurl_la-if2ip.lo `test -f 'if2ip.c' || echo '$(srcdir)/'`if2ip.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-if2ip.Tpo $(DEPDIR)/libcurl_la-if2ip.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='if2ip.c' object='libcurl_la-if2ip.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-if2ip.lo `test -f 'if2ip.c' || echo '$(srcdir)/'`if2ip.c
 
-dvi: dvi-am
+libcurl_la-speedcheck.lo: speedcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-speedcheck.lo -MD -MP -MF $(DEPDIR)/libcurl_la-speedcheck.Tpo -c -o libcurl_la-speedcheck.lo `test -f 'speedcheck.c' || echo '$(srcdir)/'`speedcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-speedcheck.Tpo $(DEPDIR)/libcurl_la-speedcheck.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='speedcheck.c' object='libcurl_la-speedcheck.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-speedcheck.lo `test -f 'speedcheck.c' || echo '$(srcdir)/'`speedcheck.c
 
-dvi-am:
+libcurl_la-ldap.lo: ldap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ldap.Tpo -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ldap.Tpo $(DEPDIR)/libcurl_la-ldap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ldap.c' object='libcurl_la-ldap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
 
-html: html-am
+libcurl_la-ssluse.lo: ssluse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ssluse.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ssluse.Tpo -c -o libcurl_la-ssluse.lo `test -f 'ssluse.c' || echo '$(srcdir)/'`ssluse.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ssluse.Tpo $(DEPDIR)/libcurl_la-ssluse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ssluse.c' object='libcurl_la-ssluse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ssluse.lo `test -f 'ssluse.c' || echo '$(srcdir)/'`ssluse.c
 
-info: info-am
+libcurl_la-version.lo: version.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-version.lo -MD -MP -MF $(DEPDIR)/libcurl_la-version.Tpo -c -o libcurl_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-version.Tpo $(DEPDIR)/libcurl_la-version.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='version.c' object='libcurl_la-version.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
 
-info-am:
+libcurl_la-getenv.lo: getenv.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-getenv.lo -MD -MP -MF $(DEPDIR)/libcurl_la-getenv.Tpo -c -o libcurl_la-getenv.lo `test -f 'getenv.c' || echo '$(srcdir)/'`getenv.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-getenv.Tpo $(DEPDIR)/libcurl_la-getenv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getenv.c' object='libcurl_la-getenv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-getenv.lo `test -f 'getenv.c' || echo '$(srcdir)/'`getenv.c
 
-install-data-am:
+libcurl_la-escape.lo: escape.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-escape.lo -MD -MP -MF $(DEPDIR)/libcurl_la-escape.Tpo -c -o libcurl_la-escape.lo `test -f 'escape.c' || echo '$(srcdir)/'`escape.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-escape.Tpo $(DEPDIR)/libcurl_la-escape.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='escape.c' object='libcurl_la-escape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-escape.lo `test -f 'escape.c' || echo '$(srcdir)/'`escape.c
 
-install-exec-am: install-libLTLIBRARIES
+libcurl_la-mprintf.lo: mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-mprintf.lo -MD -MP -MF $(DEPDIR)/libcurl_la-mprintf.Tpo -c -o libcurl_la-mprintf.lo `test -f 'mprintf.c' || echo '$(srcdir)/'`mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-mprintf.Tpo $(DEPDIR)/libcurl_la-mprintf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='mprintf.c' object='libcurl_la-mprintf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-mprintf.lo `test -f 'mprintf.c' || echo '$(srcdir)/'`mprintf.c
 
-install-info: install-info-am
+libcurl_la-telnet.lo: telnet.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-telnet.lo -MD -MP -MF $(DEPDIR)/libcurl_la-telnet.Tpo -c -o libcurl_la-telnet.lo `test -f 'telnet.c' || echo '$(srcdir)/'`telnet.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-telnet.Tpo $(DEPDIR)/libcurl_la-telnet.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='telnet.c' object='libcurl_la-telnet.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-telnet.lo `test -f 'telnet.c' || echo '$(srcdir)/'`telnet.c
 
-install-man:
+libcurl_la-netrc.lo: netrc.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-netrc.lo -MD -MP -MF $(DEPDIR)/libcurl_la-netrc.Tpo -c -o libcurl_la-netrc.lo `test -f 'netrc.c' || echo '$(srcdir)/'`netrc.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-netrc.Tpo $(DEPDIR)/libcurl_la-netrc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='netrc.c' object='libcurl_la-netrc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-netrc.lo `test -f 'netrc.c' || echo '$(srcdir)/'`netrc.c
 
-installcheck-am:
+libcurl_la-getinfo.lo: getinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-getinfo.lo -MD -MP -MF $(DEPDIR)/libcurl_la-getinfo.Tpo -c -o libcurl_la-getinfo.lo `test -f 'getinfo.c' || echo '$(srcdir)/'`getinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-getinfo.Tpo $(DEPDIR)/libcurl_la-getinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getinfo.c' object='libcurl_la-getinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-getinfo.lo `test -f 'getinfo.c' || echo '$(srcdir)/'`getinfo.c
 
-maintainer-clean: maintainer-clean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
+libcurl_la-transfer.lo: transfer.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-transfer.lo -MD -MP -MF $(DEPDIR)/libcurl_la-transfer.Tpo -c -o libcurl_la-transfer.lo `test -f 'transfer.c' || echo '$(srcdir)/'`transfer.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-transfer.Tpo $(DEPDIR)/libcurl_la-transfer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='transfer.c' object='libcurl_la-transfer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-transfer.lo `test -f 'transfer.c' || echo '$(srcdir)/'`transfer.c
 
-mostlyclean: mostlyclean-am
+libcurl_la-strequal.lo: strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-strequal.lo -MD -MP -MF $(DEPDIR)/libcurl_la-strequal.Tpo -c -o libcurl_la-strequal.lo `test -f 'strequal.c' || echo '$(srcdir)/'`strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-strequal.Tpo $(DEPDIR)/libcurl_la-strequal.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strequal.c' object='libcurl_la-strequal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-strequal.lo `test -f 'strequal.c' || echo '$(srcdir)/'`strequal.c
 
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool
+libcurl_la-easy.lo: easy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-easy.lo -MD -MP -MF $(DEPDIR)/libcurl_la-easy.Tpo -c -o libcurl_la-easy.lo `test -f 'easy.c' || echo '$(srcdir)/'`easy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-easy.Tpo $(DEPDIR)/libcurl_la-easy.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='easy.c' object='libcurl_la-easy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-easy.lo `test -f 'easy.c' || echo '$(srcdir)/'`easy.c
 
-pdf: pdf-am
+libcurl_la-security.lo: security.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-security.lo -MD -MP -MF $(DEPDIR)/libcurl_la-security.Tpo -c -o libcurl_la-security.lo `test -f 'security.c' || echo '$(srcdir)/'`security.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-security.Tpo $(DEPDIR)/libcurl_la-security.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='security.c' object='libcurl_la-security.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-security.lo `test -f 'security.c' || echo '$(srcdir)/'`security.c
 
-pdf-am:
+libcurl_la-krb4.lo: krb4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-krb4.lo -MD -MP -MF $(DEPDIR)/libcurl_la-krb4.Tpo -c -o libcurl_la-krb4.lo `test -f 'krb4.c' || echo '$(srcdir)/'`krb4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-krb4.Tpo $(DEPDIR)/libcurl_la-krb4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='krb4.c' object='libcurl_la-krb4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-krb4.lo `test -f 'krb4.c' || echo '$(srcdir)/'`krb4.c
 
-ps: ps-am
+libcurl_la-curl_fnmatch.lo: curl_fnmatch.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_fnmatch.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_fnmatch.Tpo -c -o libcurl_la-curl_fnmatch.lo `test -f 'curl_fnmatch.c' || echo '$(srcdir)/'`curl_fnmatch.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_fnmatch.Tpo $(DEPDIR)/libcurl_la-curl_fnmatch.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_fnmatch.c' object='libcurl_la-curl_fnmatch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_fnmatch.lo `test -f 'curl_fnmatch.c' || echo '$(srcdir)/'`curl_fnmatch.c
 
-ps-am:
+libcurl_la-fileinfo.lo: fileinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-fileinfo.lo -MD -MP -MF $(DEPDIR)/libcurl_la-fileinfo.Tpo -c -o libcurl_la-fileinfo.lo `test -f 'fileinfo.c' || echo '$(srcdir)/'`fileinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-fileinfo.Tpo $(DEPDIR)/libcurl_la-fileinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fileinfo.c' object='libcurl_la-fileinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-fileinfo.lo `test -f 'fileinfo.c' || echo '$(srcdir)/'`fileinfo.c
 
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+libcurl_la-ftplistparser.lo: ftplistparser.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ftplistparser.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ftplistparser.Tpo -c -o libcurl_la-ftplistparser.lo `test -f 'ftplistparser.c' || echo '$(srcdir)/'`ftplistparser.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ftplistparser.Tpo $(DEPDIR)/libcurl_la-ftplistparser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ftplistparser.c' object='libcurl_la-ftplistparser.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ftplistparser.lo `test -f 'ftplistparser.c' || echo '$(srcdir)/'`ftplistparser.c
+
+libcurl_la-wildcard.lo: wildcard.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-wildcard.lo -MD -MP -MF $(DEPDIR)/libcurl_la-wildcard.Tpo -c -o libcurl_la-wildcard.lo `test -f 'wildcard.c' || echo '$(srcdir)/'`wildcard.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-wildcard.Tpo $(DEPDIR)/libcurl_la-wildcard.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='wildcard.c' object='libcurl_la-wildcard.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-wildcard.lo `test -f 'wildcard.c' || echo '$(srcdir)/'`wildcard.c
+
+libcurl_la-krb5.lo: krb5.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-krb5.lo -MD -MP -MF $(DEPDIR)/libcurl_la-krb5.Tpo -c -o libcurl_la-krb5.lo `test -f 'krb5.c' || echo '$(srcdir)/'`krb5.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-krb5.Tpo $(DEPDIR)/libcurl_la-krb5.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='krb5.c' object='libcurl_la-krb5.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-krb5.lo `test -f 'krb5.c' || echo '$(srcdir)/'`krb5.c
+
+libcurl_la-memdebug.lo: memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-memdebug.lo -MD -MP -MF $(DEPDIR)/libcurl_la-memdebug.Tpo -c -o libcurl_la-memdebug.lo `test -f 'memdebug.c' || echo '$(srcdir)/'`memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-memdebug.Tpo $(DEPDIR)/libcurl_la-memdebug.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='memdebug.c' object='libcurl_la-memdebug.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-memdebug.lo `test -f 'memdebug.c' || echo '$(srcdir)/'`memdebug.c
+
+libcurl_la-http_chunks.lo: http_chunks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http_chunks.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http_chunks.Tpo -c -o libcurl_la-http_chunks.lo `test -f 'http_chunks.c' || echo '$(srcdir)/'`http_chunks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http_chunks.Tpo $(DEPDIR)/libcurl_la-http_chunks.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_chunks.c' object='libcurl_la-http_chunks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http_chunks.lo `test -f 'http_chunks.c' || echo '$(srcdir)/'`http_chunks.c
+
+libcurl_la-strtok.lo: strtok.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-strtok.lo -MD -MP -MF $(DEPDIR)/libcurl_la-strtok.Tpo -c -o libcurl_la-strtok.lo `test -f 'strtok.c' || echo '$(srcdir)/'`strtok.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-strtok.Tpo $(DEPDIR)/libcurl_la-strtok.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strtok.c' object='libcurl_la-strtok.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-strtok.lo `test -f 'strtok.c' || echo '$(srcdir)/'`strtok.c
+
+libcurl_la-connect.lo: connect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-connect.lo -MD -MP -MF $(DEPDIR)/libcurl_la-connect.Tpo -c -o libcurl_la-connect.lo `test -f 'connect.c' || echo '$(srcdir)/'`connect.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-connect.Tpo $(DEPDIR)/libcurl_la-connect.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='connect.c' object='libcurl_la-connect.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-connect.lo `test -f 'connect.c' || echo '$(srcdir)/'`connect.c
+
+libcurl_la-llist.lo: llist.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-llist.lo -MD -MP -MF $(DEPDIR)/libcurl_la-llist.Tpo -c -o libcurl_la-llist.lo `test -f 'llist.c' || echo '$(srcdir)/'`llist.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-llist.Tpo $(DEPDIR)/libcurl_la-llist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='llist.c' object='libcurl_la-llist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-llist.lo `test -f 'llist.c' || echo '$(srcdir)/'`llist.c
+
+libcurl_la-hash.lo: hash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hash.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hash.Tpo -c -o libcurl_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hash.Tpo $(DEPDIR)/libcurl_la-hash.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hash.c' object='libcurl_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+
+libcurl_la-multi.lo: multi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-multi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-multi.Tpo -c -o libcurl_la-multi.lo `test -f 'multi.c' || echo '$(srcdir)/'`multi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-multi.Tpo $(DEPDIR)/libcurl_la-multi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='multi.c' object='libcurl_la-multi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-multi.lo `test -f 'multi.c' || echo '$(srcdir)/'`multi.c
+
+libcurl_la-content_encoding.lo: content_encoding.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-content_encoding.lo -MD -MP -MF $(DEPDIR)/libcurl_la-content_encoding.Tpo -c -o libcurl_la-content_encoding.lo `test -f 'content_encoding.c' || echo '$(srcdir)/'`content_encoding.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-content_encoding.Tpo $(DEPDIR)/libcurl_la-content_encoding.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='content_encoding.c' object='libcurl_la-content_encoding.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-content_encoding.lo `test -f 'content_encoding.c' || echo '$(srcdir)/'`content_encoding.c
+
+libcurl_la-share.lo: share.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-share.lo -MD -MP -MF $(DEPDIR)/libcurl_la-share.Tpo -c -o libcurl_la-share.lo `test -f 'share.c' || echo '$(srcdir)/'`share.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-share.Tpo $(DEPDIR)/libcurl_la-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='share.c' object='libcurl_la-share.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-share.lo `test -f 'share.c' || echo '$(srcdir)/'`share.c
+
+libcurl_la-http_digest.lo: http_digest.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http_digest.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http_digest.Tpo -c -o libcurl_la-http_digest.lo `test -f 'http_digest.c' || echo '$(srcdir)/'`http_digest.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http_digest.Tpo $(DEPDIR)/libcurl_la-http_digest.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_digest.c' object='libcurl_la-http_digest.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http_digest.lo `test -f 'http_digest.c' || echo '$(srcdir)/'`http_digest.c
+
+libcurl_la-md4.lo: md4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-md4.lo -MD -MP -MF $(DEPDIR)/libcurl_la-md4.Tpo -c -o libcurl_la-md4.lo `test -f 'md4.c' || echo '$(srcdir)/'`md4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-md4.Tpo $(DEPDIR)/libcurl_la-md4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='md4.c' object='libcurl_la-md4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-md4.lo `test -f 'md4.c' || echo '$(srcdir)/'`md4.c
+
+libcurl_la-md5.lo: md5.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-md5.lo -MD -MP -MF $(DEPDIR)/libcurl_la-md5.Tpo -c -o libcurl_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-md5.Tpo $(DEPDIR)/libcurl_la-md5.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='md5.c' object='libcurl_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
+
+libcurl_la-http_negotiate.lo: http_negotiate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http_negotiate.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http_negotiate.Tpo -c -o libcurl_la-http_negotiate.lo `test -f 'http_negotiate.c' || echo '$(srcdir)/'`http_negotiate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http_negotiate.Tpo $(DEPDIR)/libcurl_la-http_negotiate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_negotiate.c' object='libcurl_la-http_negotiate.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http_negotiate.lo `test -f 'http_negotiate.c' || echo '$(srcdir)/'`http_negotiate.c
+
+libcurl_la-inet_pton.lo: inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-inet_pton.lo -MD -MP -MF $(DEPDIR)/libcurl_la-inet_pton.Tpo -c -o libcurl_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-inet_pton.Tpo $(DEPDIR)/libcurl_la-inet_pton.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='inet_pton.c' object='libcurl_la-inet_pton.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c
+
+libcurl_la-strtoofft.lo: strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-strtoofft.lo -MD -MP -MF $(DEPDIR)/libcurl_la-strtoofft.Tpo -c -o libcurl_la-strtoofft.lo `test -f 'strtoofft.c' || echo '$(srcdir)/'`strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-strtoofft.Tpo $(DEPDIR)/libcurl_la-strtoofft.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strtoofft.c' object='libcurl_la-strtoofft.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-strtoofft.lo `test -f 'strtoofft.c' || echo '$(srcdir)/'`strtoofft.c
+
+libcurl_la-strerror.lo: strerror.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-strerror.lo -MD -MP -MF $(DEPDIR)/libcurl_la-strerror.Tpo -c -o libcurl_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-strerror.Tpo $(DEPDIR)/libcurl_la-strerror.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strerror.c' object='libcurl_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
+
+libcurl_la-amigaos.lo: amigaos.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-amigaos.lo -MD -MP -MF $(DEPDIR)/libcurl_la-amigaos.Tpo -c -o libcurl_la-amigaos.lo `test -f 'amigaos.c' || echo '$(srcdir)/'`amigaos.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-amigaos.Tpo $(DEPDIR)/libcurl_la-amigaos.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='amigaos.c' object='libcurl_la-amigaos.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-amigaos.lo `test -f 'amigaos.c' || echo '$(srcdir)/'`amigaos.c
+
+libcurl_la-hostasyn.lo: hostasyn.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostasyn.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostasyn.Tpo -c -o libcurl_la-hostasyn.lo `test -f 'hostasyn.c' || echo '$(srcdir)/'`hostasyn.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostasyn.Tpo $(DEPDIR)/libcurl_la-hostasyn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostasyn.c' object='libcurl_la-hostasyn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostasyn.lo `test -f 'hostasyn.c' || echo '$(srcdir)/'`hostasyn.c
+
+libcurl_la-hostip4.lo: hostip4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostip4.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostip4.Tpo -c -o libcurl_la-hostip4.lo `test -f 'hostip4.c' || echo '$(srcdir)/'`hostip4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostip4.Tpo $(DEPDIR)/libcurl_la-hostip4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip4.c' object='libcurl_la-hostip4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostip4.lo `test -f 'hostip4.c' || echo '$(srcdir)/'`hostip4.c
+
+libcurl_la-hostip6.lo: hostip6.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostip6.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostip6.Tpo -c -o libcurl_la-hostip6.lo `test -f 'hostip6.c' || echo '$(srcdir)/'`hostip6.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostip6.Tpo $(DEPDIR)/libcurl_la-hostip6.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip6.c' object='libcurl_la-hostip6.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostip6.lo `test -f 'hostip6.c' || echo '$(srcdir)/'`hostip6.c
+
+libcurl_la-hostsyn.lo: hostsyn.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostsyn.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostsyn.Tpo -c -o libcurl_la-hostsyn.lo `test -f 'hostsyn.c' || echo '$(srcdir)/'`hostsyn.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostsyn.Tpo $(DEPDIR)/libcurl_la-hostsyn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostsyn.c' object='libcurl_la-hostsyn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostsyn.lo `test -f 'hostsyn.c' || echo '$(srcdir)/'`hostsyn.c
+
+libcurl_la-inet_ntop.lo: inet_ntop.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-inet_ntop.lo -MD -MP -MF $(DEPDIR)/libcurl_la-inet_ntop.Tpo -c -o libcurl_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-inet_ntop.Tpo $(DEPDIR)/libcurl_la-inet_ntop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='inet_ntop.c' object='libcurl_la-inet_ntop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c
+
+libcurl_la-parsedate.lo: parsedate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-parsedate.lo -MD -MP -MF $(DEPDIR)/libcurl_la-parsedate.Tpo -c -o libcurl_la-parsedate.lo `test -f 'parsedate.c' || echo '$(srcdir)/'`parsedate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-parsedate.Tpo $(DEPDIR)/libcurl_la-parsedate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='parsedate.c' object='libcurl_la-parsedate.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-parsedate.lo `test -f 'parsedate.c' || echo '$(srcdir)/'`parsedate.c
+
+libcurl_la-select.lo: select.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-select.lo -MD -MP -MF $(DEPDIR)/libcurl_la-select.Tpo -c -o libcurl_la-select.lo `test -f 'select.c' || echo '$(srcdir)/'`select.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-select.Tpo $(DEPDIR)/libcurl_la-select.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='select.c' object='libcurl_la-select.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-select.lo `test -f 'select.c' || echo '$(srcdir)/'`select.c
+
+libcurl_la-gtls.lo: gtls.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-gtls.lo -MD -MP -MF $(DEPDIR)/libcurl_la-gtls.Tpo -c -o libcurl_la-gtls.lo `test -f 'gtls.c' || echo '$(srcdir)/'`gtls.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-gtls.Tpo $(DEPDIR)/libcurl_la-gtls.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gtls.c' object='libcurl_la-gtls.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-gtls.lo `test -f 'gtls.c' || echo '$(srcdir)/'`gtls.c
+
+libcurl_la-sslgen.lo: sslgen.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-sslgen.lo -MD -MP -MF $(DEPDIR)/libcurl_la-sslgen.Tpo -c -o libcurl_la-sslgen.lo `test -f 'sslgen.c' || echo '$(srcdir)/'`sslgen.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-sslgen.Tpo $(DEPDIR)/libcurl_la-sslgen.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sslgen.c' object='libcurl_la-sslgen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-sslgen.lo `test -f 'sslgen.c' || echo '$(srcdir)/'`sslgen.c
+
+libcurl_la-tftp.lo: tftp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-tftp.lo -MD -MP -MF $(DEPDIR)/libcurl_la-tftp.Tpo -c -o libcurl_la-tftp.lo `test -f 'tftp.c' || echo '$(srcdir)/'`tftp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-tftp.Tpo $(DEPDIR)/libcurl_la-tftp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tftp.c' object='libcurl_la-tftp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-tftp.lo `test -f 'tftp.c' || echo '$(srcdir)/'`tftp.c
+
+libcurl_la-splay.lo: splay.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-splay.lo -MD -MP -MF $(DEPDIR)/libcurl_la-splay.Tpo -c -o libcurl_la-splay.lo `test -f 'splay.c' || echo '$(srcdir)/'`splay.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-splay.Tpo $(DEPDIR)/libcurl_la-splay.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='splay.c' object='libcurl_la-splay.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-splay.lo `test -f 'splay.c' || echo '$(srcdir)/'`splay.c
+
+libcurl_la-strdup.lo: strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-strdup.lo -MD -MP -MF $(DEPDIR)/libcurl_la-strdup.Tpo -c -o libcurl_la-strdup.lo `test -f 'strdup.c' || echo '$(srcdir)/'`strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-strdup.Tpo $(DEPDIR)/libcurl_la-strdup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strdup.c' object='libcurl_la-strdup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-strdup.lo `test -f 'strdup.c' || echo '$(srcdir)/'`strdup.c
+
+libcurl_la-socks.lo: socks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-socks.lo -MD -MP -MF $(DEPDIR)/libcurl_la-socks.Tpo -c -o libcurl_la-socks.lo `test -f 'socks.c' || echo '$(srcdir)/'`socks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-socks.Tpo $(DEPDIR)/libcurl_la-socks.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks.c' object='libcurl_la-socks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-socks.lo `test -f 'socks.c' || echo '$(srcdir)/'`socks.c
+
+libcurl_la-ssh.lo: ssh.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ssh.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ssh.Tpo -c -o libcurl_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-ssh.Tpo $(DEPDIR)/libcurl_la-ssh.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ssh.c' object='libcurl_la-ssh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c
+
+libcurl_la-nss.lo: nss.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-nss.lo -MD -MP -MF $(DEPDIR)/libcurl_la-nss.Tpo -c -o libcurl_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-nss.Tpo $(DEPDIR)/libcurl_la-nss.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='nss.c' object='libcurl_la-nss.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
+
+libcurl_la-qssl.lo: qssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-qssl.lo -MD -MP -MF $(DEPDIR)/libcurl_la-qssl.Tpo -c -o libcurl_la-qssl.lo `test -f 'qssl.c' || echo '$(srcdir)/'`qssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-qssl.Tpo $(DEPDIR)/libcurl_la-qssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='qssl.c' object='libcurl_la-qssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-qssl.lo `test -f 'qssl.c' || echo '$(srcdir)/'`qssl.c
+
+libcurl_la-rawstr.lo: rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-rawstr.lo -MD -MP -MF $(DEPDIR)/libcurl_la-rawstr.Tpo -c -o libcurl_la-rawstr.lo `test -f 'rawstr.c' || echo '$(srcdir)/'`rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-rawstr.Tpo $(DEPDIR)/libcurl_la-rawstr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rawstr.c' object='libcurl_la-rawstr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-rawstr.lo `test -f 'rawstr.c' || echo '$(srcdir)/'`rawstr.c
+
+libcurl_la-curl_addrinfo.lo: curl_addrinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_addrinfo.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_addrinfo.Tpo -c -o libcurl_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_addrinfo.Tpo $(DEPDIR)/libcurl_la-curl_addrinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_addrinfo.c' object='libcurl_la-curl_addrinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c
+
+libcurl_la-socks_gssapi.lo: socks_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-socks_gssapi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-socks_gssapi.Tpo -c -o libcurl_la-socks_gssapi.lo `test -f 'socks_gssapi.c' || echo '$(srcdir)/'`socks_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-socks_gssapi.Tpo $(DEPDIR)/libcurl_la-socks_gssapi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks_gssapi.c' object='libcurl_la-socks_gssapi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-socks_gssapi.lo `test -f 'socks_gssapi.c' || echo '$(srcdir)/'`socks_gssapi.c
+
+libcurl_la-socks_sspi.lo: socks_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-socks_sspi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-socks_sspi.Tpo -c -o libcurl_la-socks_sspi.lo `test -f 'socks_sspi.c' || echo '$(srcdir)/'`socks_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-socks_sspi.Tpo $(DEPDIR)/libcurl_la-socks_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks_sspi.c' object='libcurl_la-socks_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-socks_sspi.lo `test -f 'socks_sspi.c' || echo '$(srcdir)/'`socks_sspi.c
+
+libcurl_la-curl_sspi.lo: curl_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_sspi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_sspi.Tpo -c -o libcurl_la-curl_sspi.lo `test -f 'curl_sspi.c' || echo '$(srcdir)/'`curl_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_sspi.Tpo $(DEPDIR)/libcurl_la-curl_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_sspi.c' object='libcurl_la-curl_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_sspi.lo `test -f 'curl_sspi.c' || echo '$(srcdir)/'`curl_sspi.c
+
+libcurl_la-slist.lo: slist.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-slist.lo -MD -MP -MF $(DEPDIR)/libcurl_la-slist.Tpo -c -o libcurl_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-slist.Tpo $(DEPDIR)/libcurl_la-slist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='slist.c' object='libcurl_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c
+
+libcurl_la-nonblock.lo: nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-nonblock.lo -MD -MP -MF $(DEPDIR)/libcurl_la-nonblock.Tpo -c -o libcurl_la-nonblock.lo `test -f 'nonblock.c' || echo '$(srcdir)/'`nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-nonblock.Tpo $(DEPDIR)/libcurl_la-nonblock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='nonblock.c' object='libcurl_la-nonblock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-nonblock.lo `test -f 'nonblock.c' || echo '$(srcdir)/'`nonblock.c
+
+libcurl_la-curl_memrchr.lo: curl_memrchr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_memrchr.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_memrchr.Tpo -c -o libcurl_la-curl_memrchr.lo `test -f 'curl_memrchr.c' || echo '$(srcdir)/'`curl_memrchr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_memrchr.Tpo $(DEPDIR)/libcurl_la-curl_memrchr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_memrchr.c' object='libcurl_la-curl_memrchr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_memrchr.lo `test -f 'curl_memrchr.c' || echo '$(srcdir)/'`curl_memrchr.c
+
+libcurl_la-imap.lo: imap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-imap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-imap.Tpo -c -o libcurl_la-imap.lo `test -f 'imap.c' || echo '$(srcdir)/'`imap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-imap.Tpo $(DEPDIR)/libcurl_la-imap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='imap.c' object='libcurl_la-imap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-imap.lo `test -f 'imap.c' || echo '$(srcdir)/'`imap.c
+
+libcurl_la-pop3.lo: pop3.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-pop3.lo -MD -MP -MF $(DEPDIR)/libcurl_la-pop3.Tpo -c -o libcurl_la-pop3.lo `test -f 'pop3.c' || echo '$(srcdir)/'`pop3.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-pop3.Tpo $(DEPDIR)/libcurl_la-pop3.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pop3.c' object='libcurl_la-pop3.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-pop3.lo `test -f 'pop3.c' || echo '$(srcdir)/'`pop3.c
+
+libcurl_la-smtp.lo: smtp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-smtp.lo -MD -MP -MF $(DEPDIR)/libcurl_la-smtp.Tpo -c -o libcurl_la-smtp.lo `test -f 'smtp.c' || echo '$(srcdir)/'`smtp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-smtp.Tpo $(DEPDIR)/libcurl_la-smtp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='smtp.c' object='libcurl_la-smtp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-smtp.lo `test -f 'smtp.c' || echo '$(srcdir)/'`smtp.c
+
+libcurl_la-pingpong.lo: pingpong.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-pingpong.lo -MD -MP -MF $(DEPDIR)/libcurl_la-pingpong.Tpo -c -o libcurl_la-pingpong.lo `test -f 'pingpong.c' || echo '$(srcdir)/'`pingpong.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-pingpong.Tpo $(DEPDIR)/libcurl_la-pingpong.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pingpong.c' object='libcurl_la-pingpong.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-pingpong.lo `test -f 'pingpong.c' || echo '$(srcdir)/'`pingpong.c
+
+libcurl_la-rtsp.lo: rtsp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-rtsp.lo -MD -MP -MF $(DEPDIR)/libcurl_la-rtsp.Tpo -c -o libcurl_la-rtsp.lo `test -f 'rtsp.c' || echo '$(srcdir)/'`rtsp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-rtsp.Tpo $(DEPDIR)/libcurl_la-rtsp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rtsp.c' object='libcurl_la-rtsp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-rtsp.lo `test -f 'rtsp.c' || echo '$(srcdir)/'`rtsp.c
+
+libcurl_la-curl_threads.lo: curl_threads.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_threads.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_threads.Tpo -c -o libcurl_la-curl_threads.lo `test -f 'curl_threads.c' || echo '$(srcdir)/'`curl_threads.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_threads.Tpo $(DEPDIR)/libcurl_la-curl_threads.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_threads.c' object='libcurl_la-curl_threads.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_threads.lo `test -f 'curl_threads.c' || echo '$(srcdir)/'`curl_threads.c
+
+libcurl_la-warnless.lo: warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-warnless.lo -MD -MP -MF $(DEPDIR)/libcurl_la-warnless.Tpo -c -o libcurl_la-warnless.lo `test -f 'warnless.c' || echo '$(srcdir)/'`warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-warnless.Tpo $(DEPDIR)/libcurl_la-warnless.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='warnless.c' object='libcurl_la-warnless.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-warnless.lo `test -f 'warnless.c' || echo '$(srcdir)/'`warnless.c
+
+libcurl_la-hmac.lo: hmac.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hmac.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hmac.Tpo -c -o libcurl_la-hmac.lo `test -f 'hmac.c' || echo '$(srcdir)/'`hmac.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hmac.Tpo $(DEPDIR)/libcurl_la-hmac.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hmac.c' object='libcurl_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hmac.lo `test -f 'hmac.c' || echo '$(srcdir)/'`hmac.c
+
+libcurl_la-polarssl.lo: polarssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-polarssl.lo -MD -MP -MF $(DEPDIR)/libcurl_la-polarssl.Tpo -c -o libcurl_la-polarssl.lo `test -f 'polarssl.c' || echo '$(srcdir)/'`polarssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-polarssl.Tpo $(DEPDIR)/libcurl_la-polarssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='polarssl.c' object='libcurl_la-polarssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-polarssl.lo `test -f 'polarssl.c' || echo '$(srcdir)/'`polarssl.c
+
+libcurl_la-polarssl_threadlock.lo: polarssl_threadlock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-polarssl_threadlock.lo -MD -MP -MF $(DEPDIR)/libcurl_la-polarssl_threadlock.Tpo -c -o libcurl_la-polarssl_threadlock.lo `test -f 'polarssl_threadlock.c' || echo '$(srcdir)/'`polarssl_threadlock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-polarssl_threadlock.Tpo $(DEPDIR)/libcurl_la-polarssl_threadlock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='polarssl_threadlock.c' object='libcurl_la-polarssl_threadlock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-polarssl_threadlock.lo `test -f 'polarssl_threadlock.c' || echo '$(srcdir)/'`polarssl_threadlock.c
+
+libcurl_la-curl_rtmp.lo: curl_rtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_rtmp.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_rtmp.Tpo -c -o libcurl_la-curl_rtmp.lo `test -f 'curl_rtmp.c' || echo '$(srcdir)/'`curl_rtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_rtmp.Tpo $(DEPDIR)/libcurl_la-curl_rtmp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_rtmp.c' object='libcurl_la-curl_rtmp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_rtmp.lo `test -f 'curl_rtmp.c' || echo '$(srcdir)/'`curl_rtmp.c
+
+libcurl_la-openldap.lo: openldap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-openldap.Tpo -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-openldap.Tpo $(DEPDIR)/libcurl_la-openldap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='openldap.c' object='libcurl_la-openldap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
+
+libcurl_la-curl_gethostname.lo: curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_gethostname.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_gethostname.Tpo -c -o libcurl_la-curl_gethostname.lo `test -f 'curl_gethostname.c' || echo '$(srcdir)/'`curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_gethostname.Tpo $(DEPDIR)/libcurl_la-curl_gethostname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_gethostname.c' object='libcurl_la-curl_gethostname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_gethostname.lo `test -f 'curl_gethostname.c' || echo '$(srcdir)/'`curl_gethostname.c
+
+libcurl_la-gopher.lo: gopher.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-gopher.lo -MD -MP -MF $(DEPDIR)/libcurl_la-gopher.Tpo -c -o libcurl_la-gopher.lo `test -f 'gopher.c' || echo '$(srcdir)/'`gopher.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-gopher.Tpo $(DEPDIR)/libcurl_la-gopher.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gopher.c' object='libcurl_la-gopher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-gopher.lo `test -f 'gopher.c' || echo '$(srcdir)/'`gopher.c
+
+libcurl_la-axtls.lo: axtls.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-axtls.lo -MD -MP -MF $(DEPDIR)/libcurl_la-axtls.Tpo -c -o libcurl_la-axtls.lo `test -f 'axtls.c' || echo '$(srcdir)/'`axtls.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-axtls.Tpo $(DEPDIR)/libcurl_la-axtls.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='axtls.c' object='libcurl_la-axtls.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-axtls.lo `test -f 'axtls.c' || echo '$(srcdir)/'`axtls.c
+
+libcurl_la-idn_win32.lo: idn_win32.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-idn_win32.lo -MD -MP -MF $(DEPDIR)/libcurl_la-idn_win32.Tpo -c -o libcurl_la-idn_win32.lo `test -f 'idn_win32.c' || echo '$(srcdir)/'`idn_win32.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-idn_win32.Tpo $(DEPDIR)/libcurl_la-idn_win32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='idn_win32.c' object='libcurl_la-idn_win32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-idn_win32.lo `test -f 'idn_win32.c' || echo '$(srcdir)/'`idn_win32.c
+
+libcurl_la-http_negotiate_sspi.lo: http_negotiate_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http_negotiate_sspi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http_negotiate_sspi.Tpo -c -o libcurl_la-http_negotiate_sspi.lo `test -f 'http_negotiate_sspi.c' || echo '$(srcdir)/'`http_negotiate_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http_negotiate_sspi.Tpo $(DEPDIR)/libcurl_la-http_negotiate_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_negotiate_sspi.c' object='libcurl_la-http_negotiate_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http_negotiate_sspi.lo `test -f 'http_negotiate_sspi.c' || echo '$(srcdir)/'`http_negotiate_sspi.c
+
+libcurl_la-cyassl.lo: cyassl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-cyassl.lo -MD -MP -MF $(DEPDIR)/libcurl_la-cyassl.Tpo -c -o libcurl_la-cyassl.lo `test -f 'cyassl.c' || echo '$(srcdir)/'`cyassl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-cyassl.Tpo $(DEPDIR)/libcurl_la-cyassl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cyassl.c' object='libcurl_la-cyassl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-cyassl.lo `test -f 'cyassl.c' || echo '$(srcdir)/'`cyassl.c
+
+libcurl_la-http_proxy.lo: http_proxy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-http_proxy.lo -MD -MP -MF $(DEPDIR)/libcurl_la-http_proxy.Tpo -c -o libcurl_la-http_proxy.lo `test -f 'http_proxy.c' || echo '$(srcdir)/'`http_proxy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-http_proxy.Tpo $(DEPDIR)/libcurl_la-http_proxy.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_proxy.c' object='libcurl_la-http_proxy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-http_proxy.lo `test -f 'http_proxy.c' || echo '$(srcdir)/'`http_proxy.c
+
+libcurl_la-non-ascii.lo: non-ascii.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-non-ascii.lo -MD -MP -MF $(DEPDIR)/libcurl_la-non-ascii.Tpo -c -o libcurl_la-non-ascii.lo `test -f 'non-ascii.c' || echo '$(srcdir)/'`non-ascii.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-non-ascii.Tpo $(DEPDIR)/libcurl_la-non-ascii.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='non-ascii.c' object='libcurl_la-non-ascii.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-non-ascii.lo `test -f 'non-ascii.c' || echo '$(srcdir)/'`non-ascii.c
+
+libcurl_la-asyn-ares.lo: asyn-ares.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-asyn-ares.lo -MD -MP -MF $(DEPDIR)/libcurl_la-asyn-ares.Tpo -c -o libcurl_la-asyn-ares.lo `test -f 'asyn-ares.c' || echo '$(srcdir)/'`asyn-ares.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-asyn-ares.Tpo $(DEPDIR)/libcurl_la-asyn-ares.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='asyn-ares.c' object='libcurl_la-asyn-ares.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-asyn-ares.lo `test -f 'asyn-ares.c' || echo '$(srcdir)/'`asyn-ares.c
+
+libcurl_la-asyn-thread.lo: asyn-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-asyn-thread.lo -MD -MP -MF $(DEPDIR)/libcurl_la-asyn-thread.Tpo -c -o libcurl_la-asyn-thread.lo `test -f 'asyn-thread.c' || echo '$(srcdir)/'`asyn-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-asyn-thread.Tpo $(DEPDIR)/libcurl_la-asyn-thread.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='asyn-thread.c' object='libcurl_la-asyn-thread.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-asyn-thread.lo `test -f 'asyn-thread.c' || echo '$(srcdir)/'`asyn-thread.c
+
+libcurl_la-curl_gssapi.lo: curl_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_gssapi.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_gssapi.Tpo -c -o libcurl_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_gssapi.Tpo $(DEPDIR)/libcurl_la-curl_gssapi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_gssapi.c' object='libcurl_la-curl_gssapi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
+
+libcurl_la-curl_ntlm.lo: curl_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_ntlm.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_ntlm.Tpo -c -o libcurl_la-curl_ntlm.lo `test -f 'curl_ntlm.c' || echo '$(srcdir)/'`curl_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_ntlm.Tpo $(DEPDIR)/libcurl_la-curl_ntlm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm.c' object='libcurl_la-curl_ntlm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_ntlm.lo `test -f 'curl_ntlm.c' || echo '$(srcdir)/'`curl_ntlm.c
+
+libcurl_la-curl_ntlm_wb.lo: curl_ntlm_wb.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_ntlm_wb.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_ntlm_wb.Tpo -c -o libcurl_la-curl_ntlm_wb.lo `test -f 'curl_ntlm_wb.c' || echo '$(srcdir)/'`curl_ntlm_wb.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_ntlm_wb.Tpo $(DEPDIR)/libcurl_la-curl_ntlm_wb.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_wb.c' object='libcurl_la-curl_ntlm_wb.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_ntlm_wb.lo `test -f 'curl_ntlm_wb.c' || echo '$(srcdir)/'`curl_ntlm_wb.c
+
+libcurl_la-curl_ntlm_core.lo: curl_ntlm_core.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_ntlm_core.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_ntlm_core.Tpo -c -o libcurl_la-curl_ntlm_core.lo `test -f 'curl_ntlm_core.c' || echo '$(srcdir)/'`curl_ntlm_core.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_ntlm_core.Tpo $(DEPDIR)/libcurl_la-curl_ntlm_core.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_core.c' object='libcurl_la-curl_ntlm_core.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_ntlm_core.lo `test -f 'curl_ntlm_core.c' || echo '$(srcdir)/'`curl_ntlm_core.c
+
+libcurl_la-curl_ntlm_msgs.lo: curl_ntlm_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_ntlm_msgs.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_ntlm_msgs.Tpo -c -o libcurl_la-curl_ntlm_msgs.lo `test -f 'curl_ntlm_msgs.c' || echo '$(srcdir)/'`curl_ntlm_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_ntlm_msgs.Tpo $(DEPDIR)/libcurl_la-curl_ntlm_msgs.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_msgs.c' object='libcurl_la-curl_ntlm_msgs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_ntlm_msgs.lo `test -f 'curl_ntlm_msgs.c' || echo '$(srcdir)/'`curl_ntlm_msgs.c
+
+libcurl_la-curl_sasl.lo: curl_sasl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_sasl.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_sasl.Tpo -c -o libcurl_la-curl_sasl.lo `test -f 'curl_sasl.c' || echo '$(srcdir)/'`curl_sasl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_sasl.Tpo $(DEPDIR)/libcurl_la-curl_sasl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_sasl.c' object='libcurl_la-curl_sasl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_sasl.lo `test -f 'curl_sasl.c' || echo '$(srcdir)/'`curl_sasl.c
+
+libcurl_la-curl_schannel.lo: curl_schannel.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_schannel.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_schannel.Tpo -c -o libcurl_la-curl_schannel.lo `test -f 'curl_schannel.c' || echo '$(srcdir)/'`curl_schannel.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_schannel.Tpo $(DEPDIR)/libcurl_la-curl_schannel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_schannel.c' object='libcurl_la-curl_schannel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_schannel.lo `test -f 'curl_schannel.c' || echo '$(srcdir)/'`curl_schannel.c
+
+libcurl_la-curl_multibyte.lo: curl_multibyte.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_multibyte.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_multibyte.Tpo -c -o libcurl_la-curl_multibyte.lo `test -f 'curl_multibyte.c' || echo '$(srcdir)/'`curl_multibyte.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_multibyte.Tpo $(DEPDIR)/libcurl_la-curl_multibyte.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_multibyte.c' object='libcurl_la-curl_multibyte.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_multibyte.lo `test -f 'curl_multibyte.c' || echo '$(srcdir)/'`curl_multibyte.c
+
+libcurl_la-curl_darwinssl.lo: curl_darwinssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-curl_darwinssl.lo -MD -MP -MF $(DEPDIR)/libcurl_la-curl_darwinssl.Tpo -c -o libcurl_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-curl_darwinssl.Tpo $(DEPDIR)/libcurl_la-curl_darwinssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_darwinssl.c' object='libcurl_la-curl_darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c
+
+libcurl_la-hostcheck.lo: hostcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostcheck.lo -MD -MP -MF $(DEPDIR)/libcurl_la-hostcheck.Tpo -c -o libcurl_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-hostcheck.Tpo $(DEPDIR)/libcurl_la-hostcheck.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostcheck.c' object='libcurl_la-hostcheck.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c
+
+libcurl_la-bundles.lo: bundles.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-bundles.lo -MD -MP -MF $(DEPDIR)/libcurl_la-bundles.Tpo -c -o libcurl_la-bundles.lo `test -f 'bundles.c' || echo '$(srcdir)/'`bundles.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-bundles.Tpo $(DEPDIR)/libcurl_la-bundles.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='bundles.c' object='libcurl_la-bundles.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-bundles.lo `test -f 'bundles.c' || echo '$(srcdir)/'`bundles.c
+
+libcurl_la-conncache.lo: conncache.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-conncache.lo -MD -MP -MF $(DEPDIR)/libcurl_la-conncache.Tpo -c -o libcurl_la-conncache.lo `test -f 'conncache.c' || echo '$(srcdir)/'`conncache.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-conncache.Tpo $(DEPDIR)/libcurl_la-conncache.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='conncache.c' object='libcurl_la-conncache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-conncache.lo `test -f 'conncache.c' || echo '$(srcdir)/'`conncache.c
+
+libcurl_la-pipeline.lo: pipeline.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-pipeline.lo -MD -MP -MF $(DEPDIR)/libcurl_la-pipeline.Tpo -c -o libcurl_la-pipeline.lo `test -f 'pipeline.c' || echo '$(srcdir)/'`pipeline.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-pipeline.Tpo $(DEPDIR)/libcurl_la-pipeline.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pipeline.c' object='libcurl_la-pipeline.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-pipeline.lo `test -f 'pipeline.c' || echo '$(srcdir)/'`pipeline.c
+
+libcurl_la-dotdot.lo: dotdot.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-dotdot.lo -MD -MP -MF $(DEPDIR)/libcurl_la-dotdot.Tpo -c -o libcurl_la-dotdot.lo `test -f 'dotdot.c' || echo '$(srcdir)/'`dotdot.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-dotdot.Tpo $(DEPDIR)/libcurl_la-dotdot.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='dotdot.c' object='libcurl_la-dotdot.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-dotdot.lo `test -f 'dotdot.c' || echo '$(srcdir)/'`dotdot.c
+
+libcurl_la-x509asn1.lo: x509asn1.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-x509asn1.lo -MD -MP -MF $(DEPDIR)/libcurl_la-x509asn1.Tpo -c -o libcurl_la-x509asn1.lo `test -f 'x509asn1.c' || echo '$(srcdir)/'`x509asn1.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-x509asn1.Tpo $(DEPDIR)/libcurl_la-x509asn1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='x509asn1.c' object='libcurl_la-x509asn1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-x509asn1.lo `test -f 'x509asn1.c' || echo '$(srcdir)/'`x509asn1.c
+
+libcurl_la-gskit.lo: gskit.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-gskit.lo -MD -MP -MF $(DEPDIR)/libcurl_la-gskit.Tpo -c -o libcurl_la-gskit.lo `test -f 'gskit.c' || echo '$(srcdir)/'`gskit.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurl_la-gskit.Tpo $(DEPDIR)/libcurl_la-gskit.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gskit.c' object='libcurl_la-gskit.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-gskit.lo `test -f 'gskit.c' || echo '$(srcdir)/'`gskit.c
+
+libcurlu_la-file.lo: file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-file.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-file.Tpo -c -o libcurlu_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-file.Tpo $(DEPDIR)/libcurlu_la-file.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='file.c' object='libcurlu_la-file.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c
+
+libcurlu_la-timeval.lo: timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-timeval.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-timeval.Tpo -c -o libcurlu_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-timeval.Tpo $(DEPDIR)/libcurlu_la-timeval.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='timeval.c' object='libcurlu_la-timeval.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+
+libcurlu_la-base64.lo: base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-base64.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-base64.Tpo -c -o libcurlu_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-base64.Tpo $(DEPDIR)/libcurlu_la-base64.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='base64.c' object='libcurlu_la-base64.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c
+
+libcurlu_la-hostip.lo: hostip.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostip.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostip.Tpo -c -o libcurlu_la-hostip.lo `test -f 'hostip.c' || echo '$(srcdir)/'`hostip.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostip.Tpo $(DEPDIR)/libcurlu_la-hostip.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip.c' object='libcurlu_la-hostip.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostip.lo `test -f 'hostip.c' || echo '$(srcdir)/'`hostip.c
+
+libcurlu_la-progress.lo: progress.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-progress.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-progress.Tpo -c -o libcurlu_la-progress.lo `test -f 'progress.c' || echo '$(srcdir)/'`progress.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-progress.Tpo $(DEPDIR)/libcurlu_la-progress.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='progress.c' object='libcurlu_la-progress.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-progress.lo `test -f 'progress.c' || echo '$(srcdir)/'`progress.c
+
+libcurlu_la-formdata.lo: formdata.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-formdata.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-formdata.Tpo -c -o libcurlu_la-formdata.lo `test -f 'formdata.c' || echo '$(srcdir)/'`formdata.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-formdata.Tpo $(DEPDIR)/libcurlu_la-formdata.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='formdata.c' object='libcurlu_la-formdata.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-formdata.lo `test -f 'formdata.c' || echo '$(srcdir)/'`formdata.c
+
+libcurlu_la-cookie.lo: cookie.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-cookie.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-cookie.Tpo -c -o libcurlu_la-cookie.lo `test -f 'cookie.c' || echo '$(srcdir)/'`cookie.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-cookie.Tpo $(DEPDIR)/libcurlu_la-cookie.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cookie.c' object='libcurlu_la-cookie.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-cookie.lo `test -f 'cookie.c' || echo '$(srcdir)/'`cookie.c
+
+libcurlu_la-http.lo: http.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http.Tpo -c -o libcurlu_la-http.lo `test -f 'http.c' || echo '$(srcdir)/'`http.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http.Tpo $(DEPDIR)/libcurlu_la-http.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http.c' object='libcurlu_la-http.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http.lo `test -f 'http.c' || echo '$(srcdir)/'`http.c
+
+libcurlu_la-sendf.lo: sendf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-sendf.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-sendf.Tpo -c -o libcurlu_la-sendf.lo `test -f 'sendf.c' || echo '$(srcdir)/'`sendf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-sendf.Tpo $(DEPDIR)/libcurlu_la-sendf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sendf.c' object='libcurlu_la-sendf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-sendf.lo `test -f 'sendf.c' || echo '$(srcdir)/'`sendf.c
+
+libcurlu_la-ftp.lo: ftp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ftp.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ftp.Tpo -c -o libcurlu_la-ftp.lo `test -f 'ftp.c' || echo '$(srcdir)/'`ftp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ftp.Tpo $(DEPDIR)/libcurlu_la-ftp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ftp.c' object='libcurlu_la-ftp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ftp.lo `test -f 'ftp.c' || echo '$(srcdir)/'`ftp.c
+
+libcurlu_la-url.lo: url.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-url.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-url.Tpo -c -o libcurlu_la-url.lo `test -f 'url.c' || echo '$(srcdir)/'`url.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-url.Tpo $(DEPDIR)/libcurlu_la-url.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='url.c' object='libcurlu_la-url.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-url.lo `test -f 'url.c' || echo '$(srcdir)/'`url.c
+
+libcurlu_la-dict.lo: dict.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-dict.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-dict.Tpo -c -o libcurlu_la-dict.lo `test -f 'dict.c' || echo '$(srcdir)/'`dict.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-dict.Tpo $(DEPDIR)/libcurlu_la-dict.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='dict.c' object='libcurlu_la-dict.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-dict.lo `test -f 'dict.c' || echo '$(srcdir)/'`dict.c
+
+libcurlu_la-if2ip.lo: if2ip.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-if2ip.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-if2ip.Tpo -c -o libcurlu_la-if2ip.lo `test -f 'if2ip.c' || echo '$(srcdir)/'`if2ip.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-if2ip.Tpo $(DEPDIR)/libcurlu_la-if2ip.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='if2ip.c' object='libcurlu_la-if2ip.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-if2ip.lo `test -f 'if2ip.c' || echo '$(srcdir)/'`if2ip.c
+
+libcurlu_la-speedcheck.lo: speedcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-speedcheck.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-speedcheck.Tpo -c -o libcurlu_la-speedcheck.lo `test -f 'speedcheck.c' || echo '$(srcdir)/'`speedcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-speedcheck.Tpo $(DEPDIR)/libcurlu_la-speedcheck.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='speedcheck.c' object='libcurlu_la-speedcheck.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-speedcheck.lo `test -f 'speedcheck.c' || echo '$(srcdir)/'`speedcheck.c
+
+libcurlu_la-ldap.lo: ldap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ldap.Tpo -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ldap.Tpo $(DEPDIR)/libcurlu_la-ldap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ldap.c' object='libcurlu_la-ldap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
+
+libcurlu_la-ssluse.lo: ssluse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ssluse.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ssluse.Tpo -c -o libcurlu_la-ssluse.lo `test -f 'ssluse.c' || echo '$(srcdir)/'`ssluse.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ssluse.Tpo $(DEPDIR)/libcurlu_la-ssluse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ssluse.c' object='libcurlu_la-ssluse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ssluse.lo `test -f 'ssluse.c' || echo '$(srcdir)/'`ssluse.c
+
+libcurlu_la-version.lo: version.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-version.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-version.Tpo -c -o libcurlu_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-version.Tpo $(DEPDIR)/libcurlu_la-version.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='version.c' object='libcurlu_la-version.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+
+libcurlu_la-getenv.lo: getenv.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-getenv.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-getenv.Tpo -c -o libcurlu_la-getenv.lo `test -f 'getenv.c' || echo '$(srcdir)/'`getenv.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-getenv.Tpo $(DEPDIR)/libcurlu_la-getenv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getenv.c' object='libcurlu_la-getenv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-getenv.lo `test -f 'getenv.c' || echo '$(srcdir)/'`getenv.c
+
+libcurlu_la-escape.lo: escape.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-escape.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-escape.Tpo -c -o libcurlu_la-escape.lo `test -f 'escape.c' || echo '$(srcdir)/'`escape.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-escape.Tpo $(DEPDIR)/libcurlu_la-escape.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='escape.c' object='libcurlu_la-escape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-escape.lo `test -f 'escape.c' || echo '$(srcdir)/'`escape.c
+
+libcurlu_la-mprintf.lo: mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-mprintf.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-mprintf.Tpo -c -o libcurlu_la-mprintf.lo `test -f 'mprintf.c' || echo '$(srcdir)/'`mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-mprintf.Tpo $(DEPDIR)/libcurlu_la-mprintf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='mprintf.c' object='libcurlu_la-mprintf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-mprintf.lo `test -f 'mprintf.c' || echo '$(srcdir)/'`mprintf.c
+
+libcurlu_la-telnet.lo: telnet.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-telnet.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-telnet.Tpo -c -o libcurlu_la-telnet.lo `test -f 'telnet.c' || echo '$(srcdir)/'`telnet.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-telnet.Tpo $(DEPDIR)/libcurlu_la-telnet.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='telnet.c' object='libcurlu_la-telnet.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-telnet.lo `test -f 'telnet.c' || echo '$(srcdir)/'`telnet.c
+
+libcurlu_la-netrc.lo: netrc.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-netrc.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-netrc.Tpo -c -o libcurlu_la-netrc.lo `test -f 'netrc.c' || echo '$(srcdir)/'`netrc.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-netrc.Tpo $(DEPDIR)/libcurlu_la-netrc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='netrc.c' object='libcurlu_la-netrc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-netrc.lo `test -f 'netrc.c' || echo '$(srcdir)/'`netrc.c
+
+libcurlu_la-getinfo.lo: getinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-getinfo.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-getinfo.Tpo -c -o libcurlu_la-getinfo.lo `test -f 'getinfo.c' || echo '$(srcdir)/'`getinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-getinfo.Tpo $(DEPDIR)/libcurlu_la-getinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getinfo.c' object='libcurlu_la-getinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-getinfo.lo `test -f 'getinfo.c' || echo '$(srcdir)/'`getinfo.c
+
+libcurlu_la-transfer.lo: transfer.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-transfer.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-transfer.Tpo -c -o libcurlu_la-transfer.lo `test -f 'transfer.c' || echo '$(srcdir)/'`transfer.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-transfer.Tpo $(DEPDIR)/libcurlu_la-transfer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='transfer.c' object='libcurlu_la-transfer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-transfer.lo `test -f 'transfer.c' || echo '$(srcdir)/'`transfer.c
+
+libcurlu_la-strequal.lo: strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-strequal.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-strequal.Tpo -c -o libcurlu_la-strequal.lo `test -f 'strequal.c' || echo '$(srcdir)/'`strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-strequal.Tpo $(DEPDIR)/libcurlu_la-strequal.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strequal.c' object='libcurlu_la-strequal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-strequal.lo `test -f 'strequal.c' || echo '$(srcdir)/'`strequal.c
+
+libcurlu_la-easy.lo: easy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-easy.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-easy.Tpo -c -o libcurlu_la-easy.lo `test -f 'easy.c' || echo '$(srcdir)/'`easy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-easy.Tpo $(DEPDIR)/libcurlu_la-easy.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='easy.c' object='libcurlu_la-easy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-easy.lo `test -f 'easy.c' || echo '$(srcdir)/'`easy.c
+
+libcurlu_la-security.lo: security.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-security.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-security.Tpo -c -o libcurlu_la-security.lo `test -f 'security.c' || echo '$(srcdir)/'`security.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-security.Tpo $(DEPDIR)/libcurlu_la-security.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='security.c' object='libcurlu_la-security.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-security.lo `test -f 'security.c' || echo '$(srcdir)/'`security.c
+
+libcurlu_la-krb4.lo: krb4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-krb4.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-krb4.Tpo -c -o libcurlu_la-krb4.lo `test -f 'krb4.c' || echo '$(srcdir)/'`krb4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-krb4.Tpo $(DEPDIR)/libcurlu_la-krb4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='krb4.c' object='libcurlu_la-krb4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-krb4.lo `test -f 'krb4.c' || echo '$(srcdir)/'`krb4.c
+
+libcurlu_la-curl_fnmatch.lo: curl_fnmatch.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_fnmatch.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_fnmatch.Tpo -c -o libcurlu_la-curl_fnmatch.lo `test -f 'curl_fnmatch.c' || echo '$(srcdir)/'`curl_fnmatch.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_fnmatch.Tpo $(DEPDIR)/libcurlu_la-curl_fnmatch.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_fnmatch.c' object='libcurlu_la-curl_fnmatch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_fnmatch.lo `test -f 'curl_fnmatch.c' || echo '$(srcdir)/'`curl_fnmatch.c
+
+libcurlu_la-fileinfo.lo: fileinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-fileinfo.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-fileinfo.Tpo -c -o libcurlu_la-fileinfo.lo `test -f 'fileinfo.c' || echo '$(srcdir)/'`fileinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-fileinfo.Tpo $(DEPDIR)/libcurlu_la-fileinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fileinfo.c' object='libcurlu_la-fileinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-fileinfo.lo `test -f 'fileinfo.c' || echo '$(srcdir)/'`fileinfo.c
+
+libcurlu_la-ftplistparser.lo: ftplistparser.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ftplistparser.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ftplistparser.Tpo -c -o libcurlu_la-ftplistparser.lo `test -f 'ftplistparser.c' || echo '$(srcdir)/'`ftplistparser.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ftplistparser.Tpo $(DEPDIR)/libcurlu_la-ftplistparser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ftplistparser.c' object='libcurlu_la-ftplistparser.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ftplistparser.lo `test -f 'ftplistparser.c' || echo '$(srcdir)/'`ftplistparser.c
+
+libcurlu_la-wildcard.lo: wildcard.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-wildcard.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-wildcard.Tpo -c -o libcurlu_la-wildcard.lo `test -f 'wildcard.c' || echo '$(srcdir)/'`wildcard.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-wildcard.Tpo $(DEPDIR)/libcurlu_la-wildcard.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='wildcard.c' object='libcurlu_la-wildcard.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-wildcard.lo `test -f 'wildcard.c' || echo '$(srcdir)/'`wildcard.c
+
+libcurlu_la-krb5.lo: krb5.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-krb5.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-krb5.Tpo -c -o libcurlu_la-krb5.lo `test -f 'krb5.c' || echo '$(srcdir)/'`krb5.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-krb5.Tpo $(DEPDIR)/libcurlu_la-krb5.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='krb5.c' object='libcurlu_la-krb5.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-krb5.lo `test -f 'krb5.c' || echo '$(srcdir)/'`krb5.c
+
+libcurlu_la-memdebug.lo: memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-memdebug.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-memdebug.Tpo -c -o libcurlu_la-memdebug.lo `test -f 'memdebug.c' || echo '$(srcdir)/'`memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-memdebug.Tpo $(DEPDIR)/libcurlu_la-memdebug.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='memdebug.c' object='libcurlu_la-memdebug.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-memdebug.lo `test -f 'memdebug.c' || echo '$(srcdir)/'`memdebug.c
+
+libcurlu_la-http_chunks.lo: http_chunks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http_chunks.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http_chunks.Tpo -c -o libcurlu_la-http_chunks.lo `test -f 'http_chunks.c' || echo '$(srcdir)/'`http_chunks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http_chunks.Tpo $(DEPDIR)/libcurlu_la-http_chunks.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_chunks.c' object='libcurlu_la-http_chunks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http_chunks.lo `test -f 'http_chunks.c' || echo '$(srcdir)/'`http_chunks.c
+
+libcurlu_la-strtok.lo: strtok.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-strtok.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-strtok.Tpo -c -o libcurlu_la-strtok.lo `test -f 'strtok.c' || echo '$(srcdir)/'`strtok.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-strtok.Tpo $(DEPDIR)/libcurlu_la-strtok.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strtok.c' object='libcurlu_la-strtok.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-strtok.lo `test -f 'strtok.c' || echo '$(srcdir)/'`strtok.c
+
+libcurlu_la-connect.lo: connect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-connect.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-connect.Tpo -c -o libcurlu_la-connect.lo `test -f 'connect.c' || echo '$(srcdir)/'`connect.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-connect.Tpo $(DEPDIR)/libcurlu_la-connect.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='connect.c' object='libcurlu_la-connect.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-connect.lo `test -f 'connect.c' || echo '$(srcdir)/'`connect.c
+
+libcurlu_la-llist.lo: llist.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-llist.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-llist.Tpo -c -o libcurlu_la-llist.lo `test -f 'llist.c' || echo '$(srcdir)/'`llist.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-llist.Tpo $(DEPDIR)/libcurlu_la-llist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='llist.c' object='libcurlu_la-llist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-llist.lo `test -f 'llist.c' || echo '$(srcdir)/'`llist.c
+
+libcurlu_la-hash.lo: hash.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hash.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hash.Tpo -c -o libcurlu_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hash.Tpo $(DEPDIR)/libcurlu_la-hash.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hash.c' object='libcurlu_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+
+libcurlu_la-multi.lo: multi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-multi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-multi.Tpo -c -o libcurlu_la-multi.lo `test -f 'multi.c' || echo '$(srcdir)/'`multi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-multi.Tpo $(DEPDIR)/libcurlu_la-multi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='multi.c' object='libcurlu_la-multi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-multi.lo `test -f 'multi.c' || echo '$(srcdir)/'`multi.c
+
+libcurlu_la-content_encoding.lo: content_encoding.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-content_encoding.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-content_encoding.Tpo -c -o libcurlu_la-content_encoding.lo `test -f 'content_encoding.c' || echo '$(srcdir)/'`content_encoding.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-content_encoding.Tpo $(DEPDIR)/libcurlu_la-content_encoding.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='content_encoding.c' object='libcurlu_la-content_encoding.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-content_encoding.lo `test -f 'content_encoding.c' || echo '$(srcdir)/'`content_encoding.c
+
+libcurlu_la-share.lo: share.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-share.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-share.Tpo -c -o libcurlu_la-share.lo `test -f 'share.c' || echo '$(srcdir)/'`share.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-share.Tpo $(DEPDIR)/libcurlu_la-share.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='share.c' object='libcurlu_la-share.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-share.lo `test -f 'share.c' || echo '$(srcdir)/'`share.c
+
+libcurlu_la-http_digest.lo: http_digest.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http_digest.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http_digest.Tpo -c -o libcurlu_la-http_digest.lo `test -f 'http_digest.c' || echo '$(srcdir)/'`http_digest.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http_digest.Tpo $(DEPDIR)/libcurlu_la-http_digest.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_digest.c' object='libcurlu_la-http_digest.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http_digest.lo `test -f 'http_digest.c' || echo '$(srcdir)/'`http_digest.c
+
+libcurlu_la-md4.lo: md4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-md4.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-md4.Tpo -c -o libcurlu_la-md4.lo `test -f 'md4.c' || echo '$(srcdir)/'`md4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-md4.Tpo $(DEPDIR)/libcurlu_la-md4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='md4.c' object='libcurlu_la-md4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-md4.lo `test -f 'md4.c' || echo '$(srcdir)/'`md4.c
+
+libcurlu_la-md5.lo: md5.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-md5.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-md5.Tpo -c -o libcurlu_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-md5.Tpo $(DEPDIR)/libcurlu_la-md5.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='md5.c' object='libcurlu_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
+
+libcurlu_la-http_negotiate.lo: http_negotiate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http_negotiate.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http_negotiate.Tpo -c -o libcurlu_la-http_negotiate.lo `test -f 'http_negotiate.c' || echo '$(srcdir)/'`http_negotiate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http_negotiate.Tpo $(DEPDIR)/libcurlu_la-http_negotiate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_negotiate.c' object='libcurlu_la-http_negotiate.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http_negotiate.lo `test -f 'http_negotiate.c' || echo '$(srcdir)/'`http_negotiate.c
+
+libcurlu_la-inet_pton.lo: inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-inet_pton.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-inet_pton.Tpo -c -o libcurlu_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-inet_pton.Tpo $(DEPDIR)/libcurlu_la-inet_pton.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='inet_pton.c' object='libcurlu_la-inet_pton.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c
+
+libcurlu_la-strtoofft.lo: strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-strtoofft.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-strtoofft.Tpo -c -o libcurlu_la-strtoofft.lo `test -f 'strtoofft.c' || echo '$(srcdir)/'`strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-strtoofft.Tpo $(DEPDIR)/libcurlu_la-strtoofft.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strtoofft.c' object='libcurlu_la-strtoofft.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-strtoofft.lo `test -f 'strtoofft.c' || echo '$(srcdir)/'`strtoofft.c
+
+libcurlu_la-strerror.lo: strerror.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-strerror.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-strerror.Tpo -c -o libcurlu_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-strerror.Tpo $(DEPDIR)/libcurlu_la-strerror.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strerror.c' object='libcurlu_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-strerror.lo `test -f 'strerror.c' || echo '$(srcdir)/'`strerror.c
+
+libcurlu_la-amigaos.lo: amigaos.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-amigaos.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-amigaos.Tpo -c -o libcurlu_la-amigaos.lo `test -f 'amigaos.c' || echo '$(srcdir)/'`amigaos.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-amigaos.Tpo $(DEPDIR)/libcurlu_la-amigaos.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='amigaos.c' object='libcurlu_la-amigaos.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-amigaos.lo `test -f 'amigaos.c' || echo '$(srcdir)/'`amigaos.c
+
+libcurlu_la-hostasyn.lo: hostasyn.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostasyn.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostasyn.Tpo -c -o libcurlu_la-hostasyn.lo `test -f 'hostasyn.c' || echo '$(srcdir)/'`hostasyn.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostasyn.Tpo $(DEPDIR)/libcurlu_la-hostasyn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostasyn.c' object='libcurlu_la-hostasyn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostasyn.lo `test -f 'hostasyn.c' || echo '$(srcdir)/'`hostasyn.c
+
+libcurlu_la-hostip4.lo: hostip4.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostip4.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostip4.Tpo -c -o libcurlu_la-hostip4.lo `test -f 'hostip4.c' || echo '$(srcdir)/'`hostip4.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostip4.Tpo $(DEPDIR)/libcurlu_la-hostip4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip4.c' object='libcurlu_la-hostip4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostip4.lo `test -f 'hostip4.c' || echo '$(srcdir)/'`hostip4.c
+
+libcurlu_la-hostip6.lo: hostip6.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostip6.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostip6.Tpo -c -o libcurlu_la-hostip6.lo `test -f 'hostip6.c' || echo '$(srcdir)/'`hostip6.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostip6.Tpo $(DEPDIR)/libcurlu_la-hostip6.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostip6.c' object='libcurlu_la-hostip6.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostip6.lo `test -f 'hostip6.c' || echo '$(srcdir)/'`hostip6.c
+
+libcurlu_la-hostsyn.lo: hostsyn.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostsyn.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostsyn.Tpo -c -o libcurlu_la-hostsyn.lo `test -f 'hostsyn.c' || echo '$(srcdir)/'`hostsyn.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostsyn.Tpo $(DEPDIR)/libcurlu_la-hostsyn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostsyn.c' object='libcurlu_la-hostsyn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostsyn.lo `test -f 'hostsyn.c' || echo '$(srcdir)/'`hostsyn.c
+
+libcurlu_la-inet_ntop.lo: inet_ntop.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-inet_ntop.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-inet_ntop.Tpo -c -o libcurlu_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-inet_ntop.Tpo $(DEPDIR)/libcurlu_la-inet_ntop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='inet_ntop.c' object='libcurlu_la-inet_ntop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c
+
+libcurlu_la-parsedate.lo: parsedate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-parsedate.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-parsedate.Tpo -c -o libcurlu_la-parsedate.lo `test -f 'parsedate.c' || echo '$(srcdir)/'`parsedate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-parsedate.Tpo $(DEPDIR)/libcurlu_la-parsedate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='parsedate.c' object='libcurlu_la-parsedate.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-parsedate.lo `test -f 'parsedate.c' || echo '$(srcdir)/'`parsedate.c
+
+libcurlu_la-select.lo: select.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-select.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-select.Tpo -c -o libcurlu_la-select.lo `test -f 'select.c' || echo '$(srcdir)/'`select.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-select.Tpo $(DEPDIR)/libcurlu_la-select.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='select.c' object='libcurlu_la-select.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-select.lo `test -f 'select.c' || echo '$(srcdir)/'`select.c
+
+libcurlu_la-gtls.lo: gtls.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-gtls.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-gtls.Tpo -c -o libcurlu_la-gtls.lo `test -f 'gtls.c' || echo '$(srcdir)/'`gtls.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-gtls.Tpo $(DEPDIR)/libcurlu_la-gtls.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gtls.c' object='libcurlu_la-gtls.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-gtls.lo `test -f 'gtls.c' || echo '$(srcdir)/'`gtls.c
+
+libcurlu_la-sslgen.lo: sslgen.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-sslgen.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-sslgen.Tpo -c -o libcurlu_la-sslgen.lo `test -f 'sslgen.c' || echo '$(srcdir)/'`sslgen.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-sslgen.Tpo $(DEPDIR)/libcurlu_la-sslgen.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sslgen.c' object='libcurlu_la-sslgen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-sslgen.lo `test -f 'sslgen.c' || echo '$(srcdir)/'`sslgen.c
+
+libcurlu_la-tftp.lo: tftp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-tftp.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-tftp.Tpo -c -o libcurlu_la-tftp.lo `test -f 'tftp.c' || echo '$(srcdir)/'`tftp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-tftp.Tpo $(DEPDIR)/libcurlu_la-tftp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tftp.c' object='libcurlu_la-tftp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-tftp.lo `test -f 'tftp.c' || echo '$(srcdir)/'`tftp.c
+
+libcurlu_la-splay.lo: splay.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-splay.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-splay.Tpo -c -o libcurlu_la-splay.lo `test -f 'splay.c' || echo '$(srcdir)/'`splay.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-splay.Tpo $(DEPDIR)/libcurlu_la-splay.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='splay.c' object='libcurlu_la-splay.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-splay.lo `test -f 'splay.c' || echo '$(srcdir)/'`splay.c
+
+libcurlu_la-strdup.lo: strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-strdup.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-strdup.Tpo -c -o libcurlu_la-strdup.lo `test -f 'strdup.c' || echo '$(srcdir)/'`strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-strdup.Tpo $(DEPDIR)/libcurlu_la-strdup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='strdup.c' object='libcurlu_la-strdup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-strdup.lo `test -f 'strdup.c' || echo '$(srcdir)/'`strdup.c
+
+libcurlu_la-socks.lo: socks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-socks.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-socks.Tpo -c -o libcurlu_la-socks.lo `test -f 'socks.c' || echo '$(srcdir)/'`socks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-socks.Tpo $(DEPDIR)/libcurlu_la-socks.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks.c' object='libcurlu_la-socks.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-socks.lo `test -f 'socks.c' || echo '$(srcdir)/'`socks.c
+
+libcurlu_la-ssh.lo: ssh.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ssh.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ssh.Tpo -c -o libcurlu_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-ssh.Tpo $(DEPDIR)/libcurlu_la-ssh.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='ssh.c' object='libcurlu_la-ssh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ssh.lo `test -f 'ssh.c' || echo '$(srcdir)/'`ssh.c
+
+libcurlu_la-nss.lo: nss.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-nss.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-nss.Tpo -c -o libcurlu_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-nss.Tpo $(DEPDIR)/libcurlu_la-nss.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='nss.c' object='libcurlu_la-nss.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
+
+libcurlu_la-qssl.lo: qssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-qssl.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-qssl.Tpo -c -o libcurlu_la-qssl.lo `test -f 'qssl.c' || echo '$(srcdir)/'`qssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-qssl.Tpo $(DEPDIR)/libcurlu_la-qssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='qssl.c' object='libcurlu_la-qssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-qssl.lo `test -f 'qssl.c' || echo '$(srcdir)/'`qssl.c
+
+libcurlu_la-rawstr.lo: rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-rawstr.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-rawstr.Tpo -c -o libcurlu_la-rawstr.lo `test -f 'rawstr.c' || echo '$(srcdir)/'`rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-rawstr.Tpo $(DEPDIR)/libcurlu_la-rawstr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rawstr.c' object='libcurlu_la-rawstr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-rawstr.lo `test -f 'rawstr.c' || echo '$(srcdir)/'`rawstr.c
+
+libcurlu_la-curl_addrinfo.lo: curl_addrinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_addrinfo.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_addrinfo.Tpo -c -o libcurlu_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_addrinfo.Tpo $(DEPDIR)/libcurlu_la-curl_addrinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_addrinfo.c' object='libcurlu_la-curl_addrinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_addrinfo.lo `test -f 'curl_addrinfo.c' || echo '$(srcdir)/'`curl_addrinfo.c
+
+libcurlu_la-socks_gssapi.lo: socks_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-socks_gssapi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-socks_gssapi.Tpo -c -o libcurlu_la-socks_gssapi.lo `test -f 'socks_gssapi.c' || echo '$(srcdir)/'`socks_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-socks_gssapi.Tpo $(DEPDIR)/libcurlu_la-socks_gssapi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks_gssapi.c' object='libcurlu_la-socks_gssapi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-socks_gssapi.lo `test -f 'socks_gssapi.c' || echo '$(srcdir)/'`socks_gssapi.c
+
+libcurlu_la-socks_sspi.lo: socks_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-socks_sspi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-socks_sspi.Tpo -c -o libcurlu_la-socks_sspi.lo `test -f 'socks_sspi.c' || echo '$(srcdir)/'`socks_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-socks_sspi.Tpo $(DEPDIR)/libcurlu_la-socks_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='socks_sspi.c' object='libcurlu_la-socks_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-socks_sspi.lo `test -f 'socks_sspi.c' || echo '$(srcdir)/'`socks_sspi.c
+
+libcurlu_la-curl_sspi.lo: curl_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_sspi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_sspi.Tpo -c -o libcurlu_la-curl_sspi.lo `test -f 'curl_sspi.c' || echo '$(srcdir)/'`curl_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_sspi.Tpo $(DEPDIR)/libcurlu_la-curl_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_sspi.c' object='libcurlu_la-curl_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_sspi.lo `test -f 'curl_sspi.c' || echo '$(srcdir)/'`curl_sspi.c
+
+libcurlu_la-slist.lo: slist.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-slist.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-slist.Tpo -c -o libcurlu_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-slist.Tpo $(DEPDIR)/libcurlu_la-slist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='slist.c' object='libcurlu_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-slist.lo `test -f 'slist.c' || echo '$(srcdir)/'`slist.c
+
+libcurlu_la-nonblock.lo: nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-nonblock.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-nonblock.Tpo -c -o libcurlu_la-nonblock.lo `test -f 'nonblock.c' || echo '$(srcdir)/'`nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-nonblock.Tpo $(DEPDIR)/libcurlu_la-nonblock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='nonblock.c' object='libcurlu_la-nonblock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-nonblock.lo `test -f 'nonblock.c' || echo '$(srcdir)/'`nonblock.c
+
+libcurlu_la-curl_memrchr.lo: curl_memrchr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_memrchr.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_memrchr.Tpo -c -o libcurlu_la-curl_memrchr.lo `test -f 'curl_memrchr.c' || echo '$(srcdir)/'`curl_memrchr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_memrchr.Tpo $(DEPDIR)/libcurlu_la-curl_memrchr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_memrchr.c' object='libcurlu_la-curl_memrchr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_memrchr.lo `test -f 'curl_memrchr.c' || echo '$(srcdir)/'`curl_memrchr.c
+
+libcurlu_la-imap.lo: imap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-imap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-imap.Tpo -c -o libcurlu_la-imap.lo `test -f 'imap.c' || echo '$(srcdir)/'`imap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-imap.Tpo $(DEPDIR)/libcurlu_la-imap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='imap.c' object='libcurlu_la-imap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-imap.lo `test -f 'imap.c' || echo '$(srcdir)/'`imap.c
+
+libcurlu_la-pop3.lo: pop3.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-pop3.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-pop3.Tpo -c -o libcurlu_la-pop3.lo `test -f 'pop3.c' || echo '$(srcdir)/'`pop3.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-pop3.Tpo $(DEPDIR)/libcurlu_la-pop3.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pop3.c' object='libcurlu_la-pop3.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-pop3.lo `test -f 'pop3.c' || echo '$(srcdir)/'`pop3.c
+
+libcurlu_la-smtp.lo: smtp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-smtp.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-smtp.Tpo -c -o libcurlu_la-smtp.lo `test -f 'smtp.c' || echo '$(srcdir)/'`smtp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-smtp.Tpo $(DEPDIR)/libcurlu_la-smtp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='smtp.c' object='libcurlu_la-smtp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-smtp.lo `test -f 'smtp.c' || echo '$(srcdir)/'`smtp.c
+
+libcurlu_la-pingpong.lo: pingpong.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-pingpong.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-pingpong.Tpo -c -o libcurlu_la-pingpong.lo `test -f 'pingpong.c' || echo '$(srcdir)/'`pingpong.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-pingpong.Tpo $(DEPDIR)/libcurlu_la-pingpong.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pingpong.c' object='libcurlu_la-pingpong.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-pingpong.lo `test -f 'pingpong.c' || echo '$(srcdir)/'`pingpong.c
+
+libcurlu_la-rtsp.lo: rtsp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-rtsp.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-rtsp.Tpo -c -o libcurlu_la-rtsp.lo `test -f 'rtsp.c' || echo '$(srcdir)/'`rtsp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-rtsp.Tpo $(DEPDIR)/libcurlu_la-rtsp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rtsp.c' object='libcurlu_la-rtsp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-rtsp.lo `test -f 'rtsp.c' || echo '$(srcdir)/'`rtsp.c
+
+libcurlu_la-curl_threads.lo: curl_threads.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_threads.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_threads.Tpo -c -o libcurlu_la-curl_threads.lo `test -f 'curl_threads.c' || echo '$(srcdir)/'`curl_threads.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_threads.Tpo $(DEPDIR)/libcurlu_la-curl_threads.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_threads.c' object='libcurlu_la-curl_threads.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_threads.lo `test -f 'curl_threads.c' || echo '$(srcdir)/'`curl_threads.c
+
+libcurlu_la-warnless.lo: warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-warnless.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-warnless.Tpo -c -o libcurlu_la-warnless.lo `test -f 'warnless.c' || echo '$(srcdir)/'`warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-warnless.Tpo $(DEPDIR)/libcurlu_la-warnless.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='warnless.c' object='libcurlu_la-warnless.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-warnless.lo `test -f 'warnless.c' || echo '$(srcdir)/'`warnless.c
+
+libcurlu_la-hmac.lo: hmac.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hmac.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hmac.Tpo -c -o libcurlu_la-hmac.lo `test -f 'hmac.c' || echo '$(srcdir)/'`hmac.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hmac.Tpo $(DEPDIR)/libcurlu_la-hmac.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hmac.c' object='libcurlu_la-hmac.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hmac.lo `test -f 'hmac.c' || echo '$(srcdir)/'`hmac.c
+
+libcurlu_la-polarssl.lo: polarssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-polarssl.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-polarssl.Tpo -c -o libcurlu_la-polarssl.lo `test -f 'polarssl.c' || echo '$(srcdir)/'`polarssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-polarssl.Tpo $(DEPDIR)/libcurlu_la-polarssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='polarssl.c' object='libcurlu_la-polarssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-polarssl.lo `test -f 'polarssl.c' || echo '$(srcdir)/'`polarssl.c
+
+libcurlu_la-polarssl_threadlock.lo: polarssl_threadlock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-polarssl_threadlock.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-polarssl_threadlock.Tpo -c -o libcurlu_la-polarssl_threadlock.lo `test -f 'polarssl_threadlock.c' || echo '$(srcdir)/'`polarssl_threadlock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-polarssl_threadlock.Tpo $(DEPDIR)/libcurlu_la-polarssl_threadlock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='polarssl_threadlock.c' object='libcurlu_la-polarssl_threadlock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-polarssl_threadlock.lo `test -f 'polarssl_threadlock.c' || echo '$(srcdir)/'`polarssl_threadlock.c
+
+libcurlu_la-curl_rtmp.lo: curl_rtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_rtmp.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_rtmp.Tpo -c -o libcurlu_la-curl_rtmp.lo `test -f 'curl_rtmp.c' || echo '$(srcdir)/'`curl_rtmp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_rtmp.Tpo $(DEPDIR)/libcurlu_la-curl_rtmp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_rtmp.c' object='libcurlu_la-curl_rtmp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_rtmp.lo `test -f 'curl_rtmp.c' || echo '$(srcdir)/'`curl_rtmp.c
+
+libcurlu_la-openldap.lo: openldap.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-openldap.Tpo -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-openldap.Tpo $(DEPDIR)/libcurlu_la-openldap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='openldap.c' object='libcurlu_la-openldap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
+
+libcurlu_la-curl_gethostname.lo: curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_gethostname.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_gethostname.Tpo -c -o libcurlu_la-curl_gethostname.lo `test -f 'curl_gethostname.c' || echo '$(srcdir)/'`curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_gethostname.Tpo $(DEPDIR)/libcurlu_la-curl_gethostname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_gethostname.c' object='libcurlu_la-curl_gethostname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_gethostname.lo `test -f 'curl_gethostname.c' || echo '$(srcdir)/'`curl_gethostname.c
+
+libcurlu_la-gopher.lo: gopher.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-gopher.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-gopher.Tpo -c -o libcurlu_la-gopher.lo `test -f 'gopher.c' || echo '$(srcdir)/'`gopher.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-gopher.Tpo $(DEPDIR)/libcurlu_la-gopher.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gopher.c' object='libcurlu_la-gopher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-gopher.lo `test -f 'gopher.c' || echo '$(srcdir)/'`gopher.c
+
+libcurlu_la-axtls.lo: axtls.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-axtls.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-axtls.Tpo -c -o libcurlu_la-axtls.lo `test -f 'axtls.c' || echo '$(srcdir)/'`axtls.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-axtls.Tpo $(DEPDIR)/libcurlu_la-axtls.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='axtls.c' object='libcurlu_la-axtls.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-axtls.lo `test -f 'axtls.c' || echo '$(srcdir)/'`axtls.c
+
+libcurlu_la-idn_win32.lo: idn_win32.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-idn_win32.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-idn_win32.Tpo -c -o libcurlu_la-idn_win32.lo `test -f 'idn_win32.c' || echo '$(srcdir)/'`idn_win32.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-idn_win32.Tpo $(DEPDIR)/libcurlu_la-idn_win32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='idn_win32.c' object='libcurlu_la-idn_win32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-idn_win32.lo `test -f 'idn_win32.c' || echo '$(srcdir)/'`idn_win32.c
+
+libcurlu_la-http_negotiate_sspi.lo: http_negotiate_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http_negotiate_sspi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http_negotiate_sspi.Tpo -c -o libcurlu_la-http_negotiate_sspi.lo `test -f 'http_negotiate_sspi.c' || echo '$(srcdir)/'`http_negotiate_sspi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http_negotiate_sspi.Tpo $(DEPDIR)/libcurlu_la-http_negotiate_sspi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_negotiate_sspi.c' object='libcurlu_la-http_negotiate_sspi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http_negotiate_sspi.lo `test -f 'http_negotiate_sspi.c' || echo '$(srcdir)/'`http_negotiate_sspi.c
+
+libcurlu_la-cyassl.lo: cyassl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-cyassl.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-cyassl.Tpo -c -o libcurlu_la-cyassl.lo `test -f 'cyassl.c' || echo '$(srcdir)/'`cyassl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-cyassl.Tpo $(DEPDIR)/libcurlu_la-cyassl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cyassl.c' object='libcurlu_la-cyassl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-cyassl.lo `test -f 'cyassl.c' || echo '$(srcdir)/'`cyassl.c
+
+libcurlu_la-http_proxy.lo: http_proxy.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-http_proxy.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-http_proxy.Tpo -c -o libcurlu_la-http_proxy.lo `test -f 'http_proxy.c' || echo '$(srcdir)/'`http_proxy.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-http_proxy.Tpo $(DEPDIR)/libcurlu_la-http_proxy.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='http_proxy.c' object='libcurlu_la-http_proxy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-http_proxy.lo `test -f 'http_proxy.c' || echo '$(srcdir)/'`http_proxy.c
+
+libcurlu_la-non-ascii.lo: non-ascii.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-non-ascii.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-non-ascii.Tpo -c -o libcurlu_la-non-ascii.lo `test -f 'non-ascii.c' || echo '$(srcdir)/'`non-ascii.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-non-ascii.Tpo $(DEPDIR)/libcurlu_la-non-ascii.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='non-ascii.c' object='libcurlu_la-non-ascii.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-non-ascii.lo `test -f 'non-ascii.c' || echo '$(srcdir)/'`non-ascii.c
+
+libcurlu_la-asyn-ares.lo: asyn-ares.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-asyn-ares.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-asyn-ares.Tpo -c -o libcurlu_la-asyn-ares.lo `test -f 'asyn-ares.c' || echo '$(srcdir)/'`asyn-ares.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-asyn-ares.Tpo $(DEPDIR)/libcurlu_la-asyn-ares.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='asyn-ares.c' object='libcurlu_la-asyn-ares.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-asyn-ares.lo `test -f 'asyn-ares.c' || echo '$(srcdir)/'`asyn-ares.c
+
+libcurlu_la-asyn-thread.lo: asyn-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-asyn-thread.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-asyn-thread.Tpo -c -o libcurlu_la-asyn-thread.lo `test -f 'asyn-thread.c' || echo '$(srcdir)/'`asyn-thread.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-asyn-thread.Tpo $(DEPDIR)/libcurlu_la-asyn-thread.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='asyn-thread.c' object='libcurlu_la-asyn-thread.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-asyn-thread.lo `test -f 'asyn-thread.c' || echo '$(srcdir)/'`asyn-thread.c
+
+libcurlu_la-curl_gssapi.lo: curl_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_gssapi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_gssapi.Tpo -c -o libcurlu_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_gssapi.Tpo $(DEPDIR)/libcurlu_la-curl_gssapi.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_gssapi.c' object='libcurlu_la-curl_gssapi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
+
+libcurlu_la-curl_ntlm.lo: curl_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_ntlm.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_ntlm.Tpo -c -o libcurlu_la-curl_ntlm.lo `test -f 'curl_ntlm.c' || echo '$(srcdir)/'`curl_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_ntlm.Tpo $(DEPDIR)/libcurlu_la-curl_ntlm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm.c' object='libcurlu_la-curl_ntlm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_ntlm.lo `test -f 'curl_ntlm.c' || echo '$(srcdir)/'`curl_ntlm.c
+
+libcurlu_la-curl_ntlm_wb.lo: curl_ntlm_wb.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_ntlm_wb.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_ntlm_wb.Tpo -c -o libcurlu_la-curl_ntlm_wb.lo `test -f 'curl_ntlm_wb.c' || echo '$(srcdir)/'`curl_ntlm_wb.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_ntlm_wb.Tpo $(DEPDIR)/libcurlu_la-curl_ntlm_wb.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_wb.c' object='libcurlu_la-curl_ntlm_wb.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_ntlm_wb.lo `test -f 'curl_ntlm_wb.c' || echo '$(srcdir)/'`curl_ntlm_wb.c
+
+libcurlu_la-curl_ntlm_core.lo: curl_ntlm_core.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_ntlm_core.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_ntlm_core.Tpo -c -o libcurlu_la-curl_ntlm_core.lo `test -f 'curl_ntlm_core.c' || echo '$(srcdir)/'`curl_ntlm_core.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_ntlm_core.Tpo $(DEPDIR)/libcurlu_la-curl_ntlm_core.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_core.c' object='libcurlu_la-curl_ntlm_core.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_ntlm_core.lo `test -f 'curl_ntlm_core.c' || echo '$(srcdir)/'`curl_ntlm_core.c
+
+libcurlu_la-curl_ntlm_msgs.lo: curl_ntlm_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_ntlm_msgs.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_ntlm_msgs.Tpo -c -o libcurlu_la-curl_ntlm_msgs.lo `test -f 'curl_ntlm_msgs.c' || echo '$(srcdir)/'`curl_ntlm_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_ntlm_msgs.Tpo $(DEPDIR)/libcurlu_la-curl_ntlm_msgs.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_ntlm_msgs.c' object='libcurlu_la-curl_ntlm_msgs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_ntlm_msgs.lo `test -f 'curl_ntlm_msgs.c' || echo '$(srcdir)/'`curl_ntlm_msgs.c
+
+libcurlu_la-curl_sasl.lo: curl_sasl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_sasl.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_sasl.Tpo -c -o libcurlu_la-curl_sasl.lo `test -f 'curl_sasl.c' || echo '$(srcdir)/'`curl_sasl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_sasl.Tpo $(DEPDIR)/libcurlu_la-curl_sasl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_sasl.c' object='libcurlu_la-curl_sasl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_sasl.lo `test -f 'curl_sasl.c' || echo '$(srcdir)/'`curl_sasl.c
+
+libcurlu_la-curl_schannel.lo: curl_schannel.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_schannel.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_schannel.Tpo -c -o libcurlu_la-curl_schannel.lo `test -f 'curl_schannel.c' || echo '$(srcdir)/'`curl_schannel.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_schannel.Tpo $(DEPDIR)/libcurlu_la-curl_schannel.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_schannel.c' object='libcurlu_la-curl_schannel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_schannel.lo `test -f 'curl_schannel.c' || echo '$(srcdir)/'`curl_schannel.c
+
+libcurlu_la-curl_multibyte.lo: curl_multibyte.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_multibyte.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_multibyte.Tpo -c -o libcurlu_la-curl_multibyte.lo `test -f 'curl_multibyte.c' || echo '$(srcdir)/'`curl_multibyte.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_multibyte.Tpo $(DEPDIR)/libcurlu_la-curl_multibyte.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_multibyte.c' object='libcurlu_la-curl_multibyte.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_multibyte.lo `test -f 'curl_multibyte.c' || echo '$(srcdir)/'`curl_multibyte.c
+
+libcurlu_la-curl_darwinssl.lo: curl_darwinssl.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_darwinssl.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_darwinssl.Tpo -c -o libcurlu_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-curl_darwinssl.Tpo $(DEPDIR)/libcurlu_la-curl_darwinssl.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='curl_darwinssl.c' object='libcurlu_la-curl_darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c
+
+libcurlu_la-hostcheck.lo: hostcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostcheck.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-hostcheck.Tpo -c -o libcurlu_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-hostcheck.Tpo $(DEPDIR)/libcurlu_la-hostcheck.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='hostcheck.c' object='libcurlu_la-hostcheck.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c
+
+libcurlu_la-bundles.lo: bundles.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-bundles.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-bundles.Tpo -c -o libcurlu_la-bundles.lo `test -f 'bundles.c' || echo '$(srcdir)/'`bundles.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-bundles.Tpo $(DEPDIR)/libcurlu_la-bundles.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='bundles.c' object='libcurlu_la-bundles.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-bundles.lo `test -f 'bundles.c' || echo '$(srcdir)/'`bundles.c
+
+libcurlu_la-conncache.lo: conncache.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-conncache.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-conncache.Tpo -c -o libcurlu_la-conncache.lo `test -f 'conncache.c' || echo '$(srcdir)/'`conncache.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-conncache.Tpo $(DEPDIR)/libcurlu_la-conncache.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='conncache.c' object='libcurlu_la-conncache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-conncache.lo `test -f 'conncache.c' || echo '$(srcdir)/'`conncache.c
+
+libcurlu_la-pipeline.lo: pipeline.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-pipeline.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-pipeline.Tpo -c -o libcurlu_la-pipeline.lo `test -f 'pipeline.c' || echo '$(srcdir)/'`pipeline.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-pipeline.Tpo $(DEPDIR)/libcurlu_la-pipeline.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='pipeline.c' object='libcurlu_la-pipeline.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-pipeline.lo `test -f 'pipeline.c' || echo '$(srcdir)/'`pipeline.c
+
+libcurlu_la-dotdot.lo: dotdot.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-dotdot.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-dotdot.Tpo -c -o libcurlu_la-dotdot.lo `test -f 'dotdot.c' || echo '$(srcdir)/'`dotdot.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-dotdot.Tpo $(DEPDIR)/libcurlu_la-dotdot.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='dotdot.c' object='libcurlu_la-dotdot.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-dotdot.lo `test -f 'dotdot.c' || echo '$(srcdir)/'`dotdot.c
+
+libcurlu_la-x509asn1.lo: x509asn1.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-x509asn1.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-x509asn1.Tpo -c -o libcurlu_la-x509asn1.lo `test -f 'x509asn1.c' || echo '$(srcdir)/'`x509asn1.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-x509asn1.Tpo $(DEPDIR)/libcurlu_la-x509asn1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='x509asn1.c' object='libcurlu_la-x509asn1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-x509asn1.lo `test -f 'x509asn1.c' || echo '$(srcdir)/'`x509asn1.c
+
+libcurlu_la-gskit.lo: gskit.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-gskit.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-gskit.Tpo -c -o libcurlu_la-gskit.lo `test -f 'gskit.c' || echo '$(srcdir)/'`gskit.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurlu_la-gskit.Tpo $(DEPDIR)/libcurlu_la-gskit.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='gskit.c' object='libcurlu_la-gskit.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-gskit.lo `test -f 'gskit.c' || echo '$(srcdir)/'`gskit.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
+       here=`pwd`; \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+@CURLDEBUG_FALSE@all-local:
+all-am: Makefile $(LTLIBRARIES) curl_config.h all-local
+installdirs:
+       for dir in "$(DESTDIR)$(libdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+       clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+       clean-generic clean-libLTLIBRARIES clean-libtool \
+       clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+       distclean-compile distclean-generic distclean-hdr \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-libLTLIBRARIES install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
+
+# for debug builds, we scan the sources on all regular make invokes
+@CURLDEBUG_TRUE@all-local: checksrc
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libLTLIBRARIES clean-libtool ctags distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-libLTLIBRARIES install-man \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am \
-       uninstall-info-am uninstall-libLTLIBRARIES
-
-
-$(DSP): msvcproj.head msvcproj.foot Makefile.am
-       echo "creating $(DSP)"
-       @(cp $(srcdir)/msvcproj.head $(DSP); \
-       echo "# Begin Group \"Source Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       echo "# Begin Group \"Header Files\"" $(DSPOUT); \
-        echo "" $(DSPOUT); \
-        echo "# PROP Default_Filter \"\"" $(DSPOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "# Begin Source File" $(DSPOUT); \
-       echo "" $(DSPOUT); \
-       echo "SOURCE=.\\"$$file $(DSPOUT); \
-       echo "# End Source File" $(DSPOUT); \
-       done; \
-       echo "# End Group" $(DSPOUT); \
-       cat $(srcdir)/msvcproj.foot $(DSPOUT) )
-
-$(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
-       echo "creating $(VCPROJ)"
-       @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
-        win32_srcs='$(WIN32SOURCES)'; \
-        sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
-        for file in $$sorted_srcs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
-        win32_hdrs='$(WIN32HEADERS)'; \
-        sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
-        for file in $$sorted_hdrs; do \
-       echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
-       done; \
-       cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 41ab827..586d94a 100644 (file)
@@ -13,28 +13,36 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
   netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c     \
   curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c          \
   memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c   \
-  content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c     \
-  http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c      \
-  hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c       \
-  inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c      \
-  strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c         \
-  socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c           \
-  curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
-  warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
-  gopher.c
+  content_encoding.c share.c http_digest.c md4.c md5.c \
+  http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c                \
+  hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c     \
+  select.c gtls.c sslgen.c tftp.c splay.c strdup.c socks.c ssh.c nss.c \
+  qssl.c rawstr.c curl_addrinfo.c socks_gssapi.c socks_sspi.c          \
+  curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c   \
+  pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c                \
+  polarssl_threadlock.c curl_rtmp.c openldap.c curl_gethostname.c      \
+  gopher.c axtls.c idn_win32.c http_negotiate_sspi.c cyassl.c          \
+  http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c     \
+  curl_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_ntlm_msgs.c         \
+  curl_sasl.c curl_schannel.c curl_multibyte.c curl_darwinssl.c                \
+  hostcheck.c bundles.c conncache.c pipeline.c dotdot.c x509asn1.c      \
+  gskit.c
 
 HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h      \
   progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h     \
   if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h        \
-  getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.h     \
+  getinfo.h strequal.h krb4.h memdebug.h http_chunks.h \
   curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h                \
   connect.h llist.h hash.h content_encoding.h share.h curl_md4.h       \
-  curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h    \
-  strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h     \
+  curl_md5.h http_digest.h http_negotiate.h inet_pton.h amigaos.h      \
+  strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h curl_setup.h        \
   transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h   \
-  tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
-  curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h        \
+  tftp.h sockaddr.h splay.h strdup.h socks.h ssh.h nssg.h curl_base64.h        \
+  rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h              \
   curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
-  warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h      \
-  gopher.h
-
+  warnless.h curl_hmac.h polarssl.h polarssl_threadlock.h curl_rtmp.h  \
+  curl_gethostname.h gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h        \
+  asyn.h curl_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h     \
+  curl_ntlm_msgs.h curl_sasl.h curl_schannel.h curl_multibyte.h                \
+  curl_darwinssl.h hostcheck.h bundles.h conncache.h curl_setup_once.h \
+  multihandle.h setup-vms.h pipeline.h dotdot.h x509asn1.h gskit.h
index 04b6450..a401c71 100644 (file)
-#########################################################################
+###########################################################################
 #
-## Makefile for building libcurl.a with MingW32 (GCC-3.2 or later)
-## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
+## Makefile for building libcurl.a with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3)
 ##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1]
+## Usage:   mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn
 ##
 ## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.5
+## set ZLIB_PATH=c:/zlib-1.2.8
 ## set ZLIB=1
-##
-## Comments to: Troy Engel <tengel@sonic.net> or
-##              Joern Hartroth <hartroth@acm.org>
-#########################################################################
+#
+###########################################################################
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
 endif
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8q
+OPENSSL_PATH = ../../openssl-0.9.8y
 endif
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.4.3
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../librtmp-2.3
 endif
 # Edit the path below to point to the base of your libidn package.
 ifndef LIBIDN_PATH
 LIBIDN_PATH = ../../libidn-1.18
 endif
-# Edit the path below to point to the base of your librtmp package.
-ifndef LIBRTMP_PATH
-LIBRTMP_PATH = ../../librtmp-2.3
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../Microsoft IDN Mitigation APIs
 endif
 # Edit the path below to point to the base of your Novell LDAP NDK.
 ifndef LDAP_SDK
 LDAP_SDK = c:/novell/ndk/cldapsdk/win32
 endif
 
+PROOT = ..
+
 # Edit the path below to point to the base of your c-ares package.
 ifndef LIBCARES_PATH
-LIBCARES_PATH = ../ares
+LIBCARES_PATH = $(PROOT)/ares
 endif
 
-CC = gcc
-AR = ar
+# Edit the var below to set to your architecture or set environment var.
+ifndef ARCH
+ARCH = w32
+endif
+
+CC     = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
+ifeq ($(ARCH),w64)
+CFLAGS += -D_AMD64_
+endif
 # comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RANLIB = ranlib
-RC = windres
-RCFLAGS = --include-dir=../include -DDEBUGBUILD=0 -O COFF -i
-RM = del /q /f 2>NUL
-STRIP = strip -g
+LDFLAGS        = -s
+AR     = $(CROSSPREFIX)ar
+RANLIB = $(CROSSPREFIX)ranlib
+RC     = $(CROSSPREFIX)windres
+RCFLAGS        = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -i
+STRIP  = $(CROSSPREFIX)strip -g
+
+# Platform-dependent helper tool macros
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL    = rm -f $1
+RMDIR  = rm -fr $1
+MKDIR  = mkdir -p $1
+COPY   = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR  = -rsync -aC $1/* $2
+TOUCH  = touch $1
+CAT    = cat
+ECHONL = echo ""
+DL     = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL    = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR  = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL    = -del 2>NUL $(subst /,\,$1)
+RMDIR  = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR  = -md 2>NUL $(subst /,\,$1)
+COPY   = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR  = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH  = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT    = type
+ECHONL = $(ComSpec) /c echo.
+endif
 
 ########################################################
 ## Nothing more to do below this line!
 
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -sync,$(CFG)),-sync)
+SYNC = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -srp,$(CFG)),-srp)
+SRP = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+SPNEGO = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+
 INCLUDES = -I. -I../include
-CFLAGS = -g -O2 -DBUILDING_LIBCURL
-ifdef ARES
-  INCLUDES += -I$(LIBCARES_PATH)
-  CFLAGS += -DUSE_ARES
-  DLL_LIBS += -L$(LIBCARES_PATH) -lcares
-  libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
+CFLAGS += -DBUILDING_LIBCURL
+
+ifdef SYNC
+  CFLAGS += -DUSE_SYNC_DNS
+else
+  ifdef ARES
+    INCLUDES += -I"$(LIBCARES_PATH)"
+    CFLAGS += -DUSE_ARES -DCARES_STATICLIB
+    DLL_LIBS += -L"$(LIBCARES_PATH)" -lcares
+    libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
+  endif
 endif
 ifdef RTMP
   INCLUDES += -I"$(LIBRTMP_PATH)"
@@ -73,30 +172,68 @@ endif
 ifdef SSH2
   INCLUDES += -I"$(LIBSSH2_PATH)/include" -I"$(LIBSSH2_PATH)/win32"
   CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
-  DLL_LIBS += -L$(LIBSSH2_PATH)/win32 -lssh2
+  DLL_LIBS += -L"$(LIBSSH2_PATH)/win32" -lssh2
 endif
 ifdef SSL
-  INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
+  ifndef OPENSSL_INCLUDE
+    ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
+      OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
+    endif
+    ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
+      OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
+    endif
+  endif
+  ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
+  $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+  endif
+  ifndef OPENSSL_LIBPATH
+    ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+      OPENSSL_LIBS = -leay32 -lssl32
+    endif
+    ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+      OPENSSL_LIBS = -lcrypto -lssl
+    endif
+  endif
+  INCLUDES += -I"$(OPENSSL_INCLUDE)"
   CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
             -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \
             -DCURL_WANTS_CA_BUNDLE_ENV
-  DLL_LIBS += -L$(OPENSSL_PATH)/out -leay32 -lssl32
+  DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
+  ifdef SRP
+    ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h"
+      CFLAGS += -DHAVE_SSLEAY_SRP -DUSE_TLS_SRP
+    endif
+  endif
 endif
 ifdef ZLIB
   INCLUDES += -I"$(ZLIB_PATH)"
   CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
-  DLL_LIBS += -L$(ZLIB_PATH) -lz
+  DLL_LIBS += -L"$(ZLIB_PATH)" -lz
 endif
 ifdef IDN
   INCLUDES += -I"$(LIBIDN_PATH)/include"
   CFLAGS += -DUSE_LIBIDN
-  DLL_LIBS += -L$(LIBIDN_PATH)/lib -lidn
+  DLL_LIBS += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+  CFLAGS += -DUSE_WIN32_IDN
+  CFLAGS += -DWANT_IDN_PROTOTYPES
+  DLL_LIBS += -L"$(WINIDN_PATH)" -lnormaliz
+endif
 endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
+  ifdef WINSSL
+    CFLAGS += -DUSE_SCHANNEL
+  endif
+endif
+ifdef SPNEGO
+  CFLAGS += -DHAVE_SPNEGO
 endif
 ifdef IPV6
-  CFLAGS += -DENABLE_IPV6
+  CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
 endif
 ifdef LDAPS
   CFLAGS += -DHAVE_LDAP_SSL
@@ -113,11 +250,10 @@ ifdef USE_LDAP_OPENLDAP
 endif
 ifndef USE_LDAP_NOVELL
 ifndef USE_LDAP_OPENLDAP
-DLL_LIBS += -lwldap32
+  DLL_LIBS += -lwldap32
 endif
 endif
 DLL_LIBS += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
 
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
@@ -131,12 +267,11 @@ libcurl_a_DEPENDENCIES := $(strip $(CSOURCES) $(HHEADERS))
 
 RESOURCE = libcurl.res
 
-.SUFFIXES: .rc .res
 
 all: $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY)
 
 $(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
-       -$(RM) $@
+       @$(call DEL, $@)
        $(AR) cru $@ $(libcurl_a_OBJECTS)
        $(RANLIB) $@
        $(STRIP) $@
@@ -144,24 +279,31 @@ $(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
 # remove the last line above to keep debug info
 
 $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENCIES)
-       -$(RM) $@
-       $(CC) $(LDFLAGS) -shared -Wl,--out-implib,$(libcurl_dll_a_LIBRARY) \
-         -o $@ $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS)
+       @$(call DEL, $@)
+       $(CC) $(LDFLAGS) -shared -o $@ \
+         -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \
+         $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS)
 
-.c.o:
-       $(COMPILE) -c $<
+%.o: %.c $(PROOT)/include/curl/curlbuild.h
+       $(CC) $(INCLUDES) $(CFLAGS) -c $<
 
-.rc.res:
+%.res: %.rc
        $(RC) $(RCFLAGS) $< -o $@
 
 clean:
-       -$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
+ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist"
+       @$(call DEL, $(PROOT)/include/curl/curlbuild.h)
+endif
+       @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE))
 
 distclean vclean: clean
-       -$(RM) $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_a_LIBRARY)
+       @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY))
 
-FORCE: ;
+$(PROOT)/include/curl/curlbuild.h:
+       @echo Creating $@
+       @$(call COPY, $@.dist, $@)
 
 $(LIBCARES_PATH)/libcares.a:
        $(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
 
+
index bce429e..058047b 100644 (file)
@@ -14,17 +14,22 @@ endif
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
 endif
 
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8q
+OPENSSL_PATH = ../../openssl-0.9.8y
 endif
 
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.4.3
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../axTLS-1.2.7
 endif
 
 # Edit the path below to point to the base of your libidn package.
@@ -37,6 +42,11 @@ ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../librtmp-2.3
 endif
 
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
 # Edit the path below to point to the base of your c-ares package.
 ifndef LIBCARES_PATH
 LIBCARES_PATH = ../ares
@@ -54,7 +64,8 @@ DESCR = cURL libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
 MTSAFE = YES
 STACK  = 64000
 SCREEN = none
-EXPORTS        = @libcurl.imp
+EXPORTF        = $(TARGET).imp
+EXPORTS        = @$(EXPORTF)
 
 # Uncomment the next line to enable linking with POSIX semantics.
 # POSIXFL = 1
@@ -90,7 +101,7 @@ else
 endif
 PERL   = perl
 # Here you can find a native Win32 binary of the original awk:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
 AWK    = awk
 CP     = cp -afv
 MKDIR  = mkdir
@@ -140,7 +151,11 @@ AR = ar
 ARFLAGS        = -cq
 LIBEXT = a
 RANLIB = ranlib
-CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
+CFLAGS  += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
 CFLAGS += -Wall # -pedantic
 ifeq ($(LIBARCH),LIBC)
 ifeq ($(POSIXFL),1)
@@ -172,6 +187,43 @@ CURL_LIB = ../lib
 
 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
 
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+WITH_SPNEGO = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
 ifdef WITH_ARES
        INCLUDES += -I$(LIBCARES_PATH)
        LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
@@ -195,6 +247,21 @@ ifdef WITH_SSL
        LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
        IMPORTS += GetProcessSwitchCount RunningProcess
        INSTDEP += ca-bundle.crt
+ifdef WITH_SPNEGO
+       INCLUDES += -I$(FBOPENSSL_PATH)/include
+       LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT)
+endif
+else
+ifdef WITH_AXTLS
+       INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+       LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+       MODULES += libaxtls.nlm
+       IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+       INSTDEP += ca-bundle.crt
+endif
 endif
 ifdef WITH_ZLIB
        INCLUDES += -I$(ZLIB_PATH)
@@ -264,7 +331,7 @@ $(OBJDIR)/%.o: %.c
 #      @echo Compiling $<
        $(CC) $(CFLAGS) -c $< -o $@
 
-$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
        @echo Creating $@
        @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
 
@@ -284,7 +351,7 @@ clean:
        -$(RM) -r $(OBJDIR)
 
 distclean vclean: clean
-       -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm
+       -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm $(TARGET).imp
        -$(RM) certdata.txt ca-bundle.crt
 
 $(OBJDIR) $(INSTDIR):
@@ -298,7 +365,7 @@ ifdef RANLIB
        @$(RANLIB) $@
 endif
 
-$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(XDCDATA)
+$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(EXPORTF) $(XDCDATA)
        @echo Linking $@
        @-$(RM) $@
        @$(LD) $(LDFLAGS) $<
@@ -478,6 +545,7 @@ endif
        @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
        @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+       @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@@ -563,6 +631,13 @@ ifdef WITH_SSL
        @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
        @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
        @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
+ifdef WITH_SPNEGO
+       @echo $(DL)#define HAVE_SPNEGO 1$(DL) >> $@
+endif
+else
+ifdef WITH_AXTLS
+       @echo $(DL)#define USE_AXTLS 1$(DL) >> $@
+endif
 endif
 ifdef WITH_SSH2
        @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
@@ -586,6 +661,10 @@ else
        @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
 endif
 
+$(EXPORTF): $(CURL_INC)/curl/curl.h $(CURL_INC)/curl/easy.h $(CURL_INC)/curl/multi.h $(CURL_INC)/curl/mprintf.h
+       @echo Creating $@
+       @$(AWK) -f ../packages/NetWare/get_exp.awk $^ > $@
+
 FORCE: ;
 
 info: $(OBJDIR)/version.inc
@@ -622,13 +701,6 @@ else
        @echo ipv6 support:    no
 endif
 
-$(LIBCARES_PATH)/libcares.$(LIBEXT):
-       $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
-
-ca-bundle.crt: mk-ca-bundle.pl
-       @echo Creating $@
-       @-$(PERL) $< -b -n $@
-
 $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
        @echo Creating $@
        @echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
@@ -667,3 +739,10 @@ endif
        @echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@
        @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@
 
+$(LIBCARES_PATH)/libcares.$(LIBEXT):
+       $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
+
+ca-bundle.crt: mk-ca-bundle.pl
+       @echo Creating $@
+       @-$(PERL) $< -b -n $@
+
index 9600527..b4a8354 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___\r
 #                             \___|\___/|_| \_\_____|\r
 #\r
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
 #\r
 # This software is licensed as described in the file COPYING, which\r
 # you should have received as part of this distribution. The terms\r
 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
 # KIND, either express or implied.\r
 #\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-library.\r
+\r
 ###########################################################################\r
 #\r
 # Makefile for building libcurl with MSVC10\r
 #\r
 ##############################################################\r
 \r
-#\r
-# Stem for static libs and DLLs\r
-#\r
-LIB_NAME       = libcurl\r
-LIB_NAME_DEBUG = libcurld\r
+# ----------------------------------------------\r
+# Verify that current subdir is libcurl's 'lib'\r
+# ----------------------------------------------\r
 \r
-#\r
-# Stem for DLL import libs\r
-#\r
-IMPLIB_NAME       = libcurl_imp\r
-IMPLIB_NAME_DEBUG = libcurld_imp\r
+!IF ! EXIST(.\curl_addrinfo.c)\r
+!  MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.\r
+!  MESSAGE Change to libcurl's 'lib' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
 \r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH   = ../../openssl-0.9.8o\r
+OPENSSL_PATH   = ../../openssl-0.9.8y\r
+!ENDIF\r
+\r
+!IFNDEF LIBSSH2_PATH\r
+LIBSSH2_PATH   = ../../libssh2-1.4.3\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH  = ../../zlib-1.2.5\r
+ZLIB_PATH  = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -81,29 +96,31 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 #############################################################\r
 ## Nothing more to do below this line!\r
 \r
-CCNODBG    = cl.exe /O2 /DNDEBUG\r
-CCDEBUG    = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
-CFLAGSSSL  = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
-CFLAGS     = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL\r
-CFLAGSLIB  = /DCURL_STATICLIB\r
-LNKDLL     = link.exe /DLL\r
-LNKLIB     = link.exe /lib\r
-LFLAGS     = /nologo /machine:$(MACHINE)\r
-SSLLIBS    = libeay32.lib ssleay32.lib\r
-ZLIBLIBSDLL= zdll.lib\r
-ZLIBLIBS   = zlib.lib\r
-WINLIBS    = ws2_32.lib wldap32.lib\r
-CFLAGS     = $(CFLAGS)\r
-\r
-CFGSET     = FALSE\r
+CCNODBG      = cl.exe /O2 /DNDEBUG\r
+CCDEBUG      = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
+CFLAGSSSL    = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
+CFLAGSWINSSL = /DUSE_SCHANNEL\r
+CFLAGSSSH2   = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"\r
+CFLAGSZLIB   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
+CFLAGS       = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
+CFLAGSLIB    = /DCURL_STATICLIB\r
+LNKDLL       = link.exe /DLL\r
+LNKLIB       = link.exe /lib\r
+LFLAGS       = /nologo /machine:$(MACHINE)\r
+SSLLIBS      = libeay32.lib ssleay32.lib\r
+ZLIBLIBSDLL  = zdll.lib\r
+ZLIBLIBS     = zlib.lib\r
+WINLIBS      = ws2_32.lib wldap32.lib advapi32.lib\r
+CFLAGS       = $(CFLAGS)\r
+\r
+CFGSET       = FALSE\r
 \r
 !IFDEF WINDOWS_SSPI\r
 CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include\r
@@ -129,7 +146,7 @@ RTLIBD = /MTd
 # release\r
 \r
 !IF "$(CFG)" == "release"\r
-TARGET = $(LIB_NAME).lib\r
+TARGET = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)\r
@@ -137,10 +154,22 @@ CFGSET = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-ssl\r
+\r
+!IF "$(CFG)" == "release-ssl"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
 # release-zlib\r
 \r
 !IF "$(CFG)" == "release-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -149,72 +178,61 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# release-dll\r
-\r
-!IF "$(CFG)" == "release-dll"\r
-TARGET = $(LIB_NAME).dll\r
-DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC     = $(CCNODBG) $(RTLIB)\r
-CFGSET = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
-!ENDIF\r
-\r
-######################\r
-# release-ssl\r
+# release-ssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-dll\r
+# release-winssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-zlib\r
+# release-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-dll-ssl-dll\r
+# release-ssl-dll\r
 \r
-!IF "$(CFG)" == "release-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+!IF "$(CFG)" == "release-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
 !ENDIF\r
 \r
 ######################\r
 # release-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -226,7 +244,7 @@ CFGSET   = TRUE
 # release-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -236,13 +254,38 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-dll\r
+\r
+!IF "$(CFG)" == "release-dll"\r
+TARGET = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ = $(CFG)\r
+LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC     = $(CCNODBG) $(RTLIB)\r
+CFGSET = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
+# release-dll-ssl-dll\r
+\r
+!IF "$(CFG)" == "release-dll-ssl-dll"\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+CFGSET   = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
 # release-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -252,11 +295,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # release-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -266,7 +309,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug\r
 \r
 !IF "$(CFG)" == "debug"\r
-TARGET = $(LIB_NAME_DEBUG).lib\r
+TARGET = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)\r
@@ -277,7 +320,7 @@ CFGSET = TRUE
 # debug-ssl\r
 \r
 !IF "$(CFG)" == "debug-ssl"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
 LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
@@ -289,7 +332,7 @@ CFGSET   = TRUE
 # debug-zlib\r
 \r
 !IF "$(CFG)" == "debug-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -298,27 +341,41 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-dll\r
+# debug-ssl-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-zlib\r
+# debug-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
+# debug-ssl-dll\r
+\r
+!IF "$(CFG)" == "debug-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
@@ -326,7 +383,7 @@ CFGSET   = TRUE
 # debug-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -338,7 +395,7 @@ CFGSET   = TRUE
 # debug-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -351,9 +408,9 @@ CFGSET   = TRUE
 # debug-dll\r
 \r
 !IF "$(CFG)" == "debug-dll"\r
-TARGET = $(LIB_NAME_DEBUG).dll\r
+TARGET = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC     = $(CCDEBUG) $(RTLIBD) \r
 CFGSET = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -363,10 +420,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -376,10 +433,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -389,11 +446,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -409,6 +466,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   release-ssl                  - release static library with ssl\r
 !MESSAGE   release-zlib                 - release static library with zlib\r
 !MESSAGE   release-ssl-zlib             - release static library with ssl and zlib\r
+!MESSAGE   release-ssl-ssh2-zlib        - release static library with ssl, ssh2 and zlib\r
 !MESSAGE   release-ssl-dll              - release static library with dynamic ssl\r
 !MESSAGE   release-zlib-dll             - release static library with dynamic zlib\r
 !MESSAGE   release-ssl-dll-zlib-dll     - release static library with dynamic ssl and dynamic zlib\r
@@ -420,6 +478,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   debug-ssl                    - debug static library with ssl\r
 !MESSAGE   debug-zlib                   - debug static library with zlib\r
 !MESSAGE   debug-ssl-zlib               - debug static library with ssl and zlib\r
+!MESSAGE   debug-ssl-ssh2-zlib          - debug static library with ssl, ssh2 and zlib\r
 !MESSAGE   debug-ssl-dll                - debug static library with dynamic ssl\r
 !MESSAGE   debug-zlib-dll               - debug static library with dynamic zlib\r
 !MESSAGE   debug-ssl-dll-zlib-dll       - debug static library with dynamic ssl and dynamic zlib\r
@@ -448,48 +507,67 @@ clean:
 # A config was provided, so the library can be built.\r
 #\r
 X_OBJS= \\r
+       $(DIROBJ)\amigaos.obj \\r
+       $(DIROBJ)\asyn-ares.obj \\r
+       $(DIROBJ)\asyn-thread.obj \\r
+       $(DIROBJ)\axtls.obj \\r
        $(DIROBJ)\base64.obj \\r
+       $(DIROBJ)\bundles.obj \\r
+       $(DIROBJ)\conncache.obj \\r
        $(DIROBJ)\connect.obj \\r
        $(DIROBJ)\content_encoding.obj \\r
        $(DIROBJ)\cookie.obj \\r
        $(DIROBJ)\curl_addrinfo.obj \\r
+       $(DIROBJ)\curl_darwinssl.obj \\r
        $(DIROBJ)\curl_fnmatch.obj \\r
        $(DIROBJ)\curl_gethostname.obj \\r
+       $(DIROBJ)\curl_gssapi.obj \\r
        $(DIROBJ)\curl_memrchr.obj \\r
-       $(DIROBJ)\curl_rand.obj \\r
+       $(DIROBJ)\curl_multibyte.obj \\r
+       $(DIROBJ)\curl_ntlm.obj \\r
+       $(DIROBJ)\curl_ntlm_core.obj \\r
+       $(DIROBJ)\curl_ntlm_msgs.obj \\r
+       $(DIROBJ)\curl_ntlm_wb.obj \\r
        $(DIROBJ)\curl_rtmp.obj \\r
+       $(DIROBJ)\curl_sasl.obj \\r
+       $(DIROBJ)\curl_schannel.obj \\r
        $(DIROBJ)\curl_sspi.obj \\r
        $(DIROBJ)\curl_threads.obj \\r
+       $(DIROBJ)\cyassl.obj \\r
        $(DIROBJ)\dict.obj \\r
+       $(DIROBJ)\dotdot.obj \\r
        $(DIROBJ)\easy.obj \\r
        $(DIROBJ)\escape.obj \\r
-       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\file.obj \\r
+       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\formdata.obj \\r
-       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\ftp.obj \\r
+       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\getenv.obj \\r
        $(DIROBJ)\getinfo.obj \\r
-       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\gopher.obj \\r
+       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\hash.obj \\r
        $(DIROBJ)\hmac.obj \\r
-       $(DIROBJ)\hostares.obj \\r
        $(DIROBJ)\hostasyn.obj \\r
+       $(DIROBJ)\hostcheck.obj \\r
+       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostip4.obj \\r
        $(DIROBJ)\hostip6.obj \\r
-       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostsyn.obj \\r
-       $(DIROBJ)\hostthre.obj \\r
+       $(DIROBJ)\http.obj \\r
        $(DIROBJ)\http_chunks.obj \\r
        $(DIROBJ)\http_digest.obj \\r
        $(DIROBJ)\http_negotiate.obj \\r
-       $(DIROBJ)\http_ntlm.obj \\r
-       $(DIROBJ)\http.obj \\r
+       $(DIROBJ)\http_negotiate_sspi.obj \\r
+       $(DIROBJ)\http_proxy.obj \\r
+       $(DIROBJ)\idn_win32.obj \\r
        $(DIROBJ)\if2ip.obj \\r
        $(DIROBJ)\imap.obj \\r
        $(DIROBJ)\inet_ntop.obj \\r
        $(DIROBJ)\inet_pton.obj \\r
+       $(DIROBJ)\krb4.obj \\r
+       $(DIROBJ)\krb5.obj \\r
        $(DIROBJ)\ldap.obj \\r
        $(DIROBJ)\llist.obj \\r
        $(DIROBJ)\md4.obj \\r
@@ -498,28 +576,35 @@ X_OBJS= \
        $(DIROBJ)\mprintf.obj \\r
        $(DIROBJ)\multi.obj \\r
        $(DIROBJ)\netrc.obj \\r
-        $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\non-ascii.obj \\r
+       $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\nss.obj \\r
        $(DIROBJ)\openldap.obj \\r
        $(DIROBJ)\parsedate.obj \\r
        $(DIROBJ)\pingpong.obj \\r
+       $(DIROBJ)\pipeline.obj \\r
        $(DIROBJ)\polarssl.obj \\r
+       $(DIROBJ)\polarssl_threadlock.obj \\r
        $(DIROBJ)\pop3.obj \\r
        $(DIROBJ)\progress.obj \\r
+       $(DIROBJ)\qssl.obj \\r
        $(DIROBJ)\rawstr.obj \\r
        $(DIROBJ)\rtsp.obj \\r
+       $(DIROBJ)\security.obj \\r
        $(DIROBJ)\select.obj \\r
        $(DIROBJ)\sendf.obj \\r
        $(DIROBJ)\share.obj \\r
        $(DIROBJ)\slist.obj \\r
        $(DIROBJ)\smtp.obj \\r
-       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks.obj \\r
+       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks_sspi.obj \\r
        $(DIROBJ)\speedcheck.obj \\r
        $(DIROBJ)\splay.obj \\r
        $(DIROBJ)\ssh.obj \\r
        $(DIROBJ)\sslgen.obj \\r
        $(DIROBJ)\ssluse.obj \\r
+       $(DIROBJ)\strdup.obj \\r
        $(DIROBJ)\strequal.obj \\r
        $(DIROBJ)\strerror.obj \\r
        $(DIROBJ)\strtok.obj \\r
@@ -538,14 +623,14 @@ all : $(TARGET)
 \r
 $(TARGET): $(X_OBJS)\r
        $(LNK) $(LFLAGS) $(X_OBJS)\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).dll       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).lib       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib    . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\*.exp                 . /y\r
-       -xcopy $(DIROBJ)\*.pdb                 . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\*.exp                  . /y\r
+       -xcopy $(DIROBJ)\*.pdb                  . /y\r
 \r
 $(X_OBJS): $(DIROBJ)\r
 \r
index 2e18e14..fda1e13 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___\r
 #                             \___|\___/|_| \_\_____|\r
 #\r
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
 #\r
 # This software is licensed as described in the file COPYING, which\r
 # you should have received as part of this distribution. The terms\r
 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
 # KIND, either express or implied.\r
 #\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-library.\r
+\r
 ###########################################################################\r
 #\r
 # Makefile for building libcurl with MSVC6\r
 #\r
 ##############################################################\r
 \r
-#\r
-# Stem for static libs and DLLs\r
-#\r
-LIB_NAME       = libcurl\r
-LIB_NAME_DEBUG = libcurld\r
+# ----------------------------------------------\r
+# Verify that current subdir is libcurl's 'lib'\r
+# ----------------------------------------------\r
 \r
-#\r
-# Stem for DLL import libs\r
-#\r
-IMPLIB_NAME       = libcurl_imp\r
-IMPLIB_NAME_DEBUG = libcurld_imp\r
+!IF ! EXIST(.\curl_addrinfo.c)\r
+!  MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.\r
+!  MESSAGE Change to libcurl's 'lib' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
 \r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH   = ../../openssl-0.9.8o\r
+OPENSSL_PATH   = ../../openssl-0.9.8y\r
+!ENDIF\r
+\r
+!IFNDEF LIBSSH2_PATH\r
+LIBSSH2_PATH   = ../../libssh2-1.4.3\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH  = ../../zlib-1.2.5\r
+ZLIB_PATH  = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -81,29 +96,31 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 #############################################################\r
 ## Nothing more to do below this line!\r
 \r
-CCNODBG    = cl.exe /O2 /DNDEBUG\r
-CCDEBUG    = cl.exe /Od /Gm /Zi /D_DEBUG /GZ\r
-CFLAGSSSL  = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
-CFLAGS     = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL\r
-CFLAGSLIB  = /DCURL_STATICLIB\r
-LNKDLL     = link.exe /DLL\r
-LNKLIB     = link.exe /lib\r
-LFLAGS     = /nologo /machine:$(MACHINE)\r
-SSLLIBS    = libeay32.lib ssleay32.lib\r
-ZLIBLIBSDLL= zdll.lib\r
-ZLIBLIBS   = zlib.lib\r
-WINLIBS    = ws2_32.lib wldap32.lib\r
-CFLAGS     = $(CFLAGS)\r
-\r
-CFGSET     = FALSE\r
+CCNODBG      = cl.exe /O2 /DNDEBUG\r
+CCDEBUG      = cl.exe /Od /Gm /Zi /D_DEBUG /GZ\r
+CFLAGSSSL    = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
+CFLAGSWINSSL = /DUSE_SCHANNEL\r
+CFLAGSSSH2   = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"\r
+CFLAGSZLIB   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
+CFLAGS       = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
+CFLAGSLIB    = /DCURL_STATICLIB\r
+LNKDLL       = link.exe /DLL\r
+LNKLIB       = link.exe /lib\r
+LFLAGS       = /nologo /machine:$(MACHINE)\r
+SSLLIBS      = libeay32.lib ssleay32.lib\r
+ZLIBLIBSDLL  = zdll.lib\r
+ZLIBLIBS     = zlib.lib\r
+WINLIBS      = ws2_32.lib wldap32.lib advapi32.lib\r
+CFLAGS       = $(CFLAGS)\r
+\r
+CFGSET       = FALSE\r
 \r
 !IFDEF WINDOWS_SSPI\r
 CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include\r
@@ -129,7 +146,7 @@ RTLIBD = /MTd
 # release\r
 \r
 !IF "$(CFG)" == "release"\r
-TARGET = $(LIB_NAME).lib\r
+TARGET = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)\r
@@ -137,10 +154,22 @@ CFGSET = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-ssl\r
+\r
+!IF "$(CFG)" == "release-ssl"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
 # release-zlib\r
 \r
 !IF "$(CFG)" == "release-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -149,72 +178,61 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# release-dll\r
-\r
-!IF "$(CFG)" == "release-dll"\r
-TARGET = $(LIB_NAME).dll\r
-DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC     = $(CCNODBG) $(RTLIB)\r
-CFGSET = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
-!ENDIF\r
-\r
-######################\r
-# release-ssl\r
+# release-ssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-dll\r
+# release-winssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-zlib\r
+# release-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-dll-ssl-dll\r
+# release-ssl-dll\r
 \r
-!IF "$(CFG)" == "release-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+!IF "$(CFG)" == "release-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
 !ENDIF\r
 \r
 ######################\r
 # release-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -226,7 +244,7 @@ CFGSET   = TRUE
 # release-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -236,13 +254,38 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-dll\r
+\r
+!IF "$(CFG)" == "release-dll"\r
+TARGET = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ = $(CFG)\r
+LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC     = $(CCNODBG) $(RTLIB)\r
+CFGSET = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
+# release-dll-ssl-dll\r
+\r
+!IF "$(CFG)" == "release-dll-ssl-dll"\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+CFGSET   = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
 # release-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -252,11 +295,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # release-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -266,7 +309,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug\r
 \r
 !IF "$(CFG)" == "debug"\r
-TARGET = $(LIB_NAME_DEBUG).lib\r
+TARGET = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)\r
@@ -277,7 +320,7 @@ CFGSET = TRUE
 # debug-ssl\r
 \r
 !IF "$(CFG)" == "debug-ssl"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
 LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
@@ -289,7 +332,7 @@ CFGSET   = TRUE
 # debug-zlib\r
 \r
 !IF "$(CFG)" == "debug-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -298,27 +341,41 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-dll\r
+# debug-ssl-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-zlib\r
+# debug-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
+# debug-ssl-dll\r
+\r
+!IF "$(CFG)" == "debug-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
@@ -326,7 +383,7 @@ CFGSET   = TRUE
 # debug-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -338,7 +395,7 @@ CFGSET   = TRUE
 # debug-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -351,9 +408,9 @@ CFGSET   = TRUE
 # debug-dll\r
 \r
 !IF "$(CFG)" == "debug-dll"\r
-TARGET = $(LIB_NAME_DEBUG).dll\r
+TARGET = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC     = $(CCDEBUG) $(RTLIBD) \r
 CFGSET = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -363,10 +420,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -376,10 +433,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -389,11 +446,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -409,6 +466,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   release-ssl                  - release static library with ssl\r
 !MESSAGE   release-zlib                 - release static library with zlib\r
 !MESSAGE   release-ssl-zlib             - release static library with ssl and zlib\r
+!MESSAGE   release-ssl-ssh2-zlib        - release static library with ssl, ssh2 and zlib\r
 !MESSAGE   release-ssl-dll              - release static library with dynamic ssl\r
 !MESSAGE   release-zlib-dll             - release static library with dynamic zlib\r
 !MESSAGE   release-ssl-dll-zlib-dll     - release static library with dynamic ssl and dynamic zlib\r
@@ -420,6 +478,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   debug-ssl                    - debug static library with ssl\r
 !MESSAGE   debug-zlib                   - debug static library with zlib\r
 !MESSAGE   debug-ssl-zlib               - debug static library with ssl and zlib\r
+!MESSAGE   debug-ssl-ssh2-zlib          - debug static library with ssl, ssh2 and zlib\r
 !MESSAGE   debug-ssl-dll                - debug static library with dynamic ssl\r
 !MESSAGE   debug-zlib-dll               - debug static library with dynamic zlib\r
 !MESSAGE   debug-ssl-dll-zlib-dll       - debug static library with dynamic ssl and dynamic zlib\r
@@ -448,48 +507,67 @@ clean:
 # A config was provided, so the library can be built.\r
 #\r
 X_OBJS= \\r
+       $(DIROBJ)\amigaos.obj \\r
+       $(DIROBJ)\asyn-ares.obj \\r
+       $(DIROBJ)\asyn-thread.obj \\r
+       $(DIROBJ)\axtls.obj \\r
        $(DIROBJ)\base64.obj \\r
+       $(DIROBJ)\bundles.obj \\r
+       $(DIROBJ)\conncache.obj \\r
        $(DIROBJ)\connect.obj \\r
        $(DIROBJ)\content_encoding.obj \\r
        $(DIROBJ)\cookie.obj \\r
        $(DIROBJ)\curl_addrinfo.obj \\r
+       $(DIROBJ)\curl_darwinssl.obj \\r
        $(DIROBJ)\curl_fnmatch.obj \\r
        $(DIROBJ)\curl_gethostname.obj \\r
+       $(DIROBJ)\curl_gssapi.obj \\r
        $(DIROBJ)\curl_memrchr.obj \\r
-       $(DIROBJ)\curl_rand.obj \\r
+       $(DIROBJ)\curl_multibyte.obj \\r
+       $(DIROBJ)\curl_ntlm.obj \\r
+       $(DIROBJ)\curl_ntlm_core.obj \\r
+       $(DIROBJ)\curl_ntlm_msgs.obj \\r
+       $(DIROBJ)\curl_ntlm_wb.obj \\r
        $(DIROBJ)\curl_rtmp.obj \\r
+       $(DIROBJ)\curl_sasl.obj \\r
+       $(DIROBJ)\curl_schannel.obj \\r
        $(DIROBJ)\curl_sspi.obj \\r
        $(DIROBJ)\curl_threads.obj \\r
+       $(DIROBJ)\cyassl.obj \\r
        $(DIROBJ)\dict.obj \\r
+       $(DIROBJ)\dotdot.obj \\r
        $(DIROBJ)\easy.obj \\r
        $(DIROBJ)\escape.obj \\r
-       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\file.obj \\r
+       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\formdata.obj \\r
-       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\ftp.obj \\r
+       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\getenv.obj \\r
        $(DIROBJ)\getinfo.obj \\r
-       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\gopher.obj \\r
+       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\hash.obj \\r
        $(DIROBJ)\hmac.obj \\r
-       $(DIROBJ)\hostares.obj \\r
        $(DIROBJ)\hostasyn.obj \\r
+       $(DIROBJ)\hostcheck.obj \\r
+       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostip4.obj \\r
        $(DIROBJ)\hostip6.obj \\r
-       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostsyn.obj \\r
-       $(DIROBJ)\hostthre.obj \\r
+       $(DIROBJ)\http.obj \\r
        $(DIROBJ)\http_chunks.obj \\r
        $(DIROBJ)\http_digest.obj \\r
        $(DIROBJ)\http_negotiate.obj \\r
-       $(DIROBJ)\http_ntlm.obj \\r
-       $(DIROBJ)\http.obj \\r
+       $(DIROBJ)\http_negotiate_sspi.obj \\r
+       $(DIROBJ)\http_proxy.obj \\r
+       $(DIROBJ)\idn_win32.obj \\r
        $(DIROBJ)\if2ip.obj \\r
        $(DIROBJ)\imap.obj \\r
        $(DIROBJ)\inet_ntop.obj \\r
        $(DIROBJ)\inet_pton.obj \\r
+       $(DIROBJ)\krb4.obj \\r
+       $(DIROBJ)\krb5.obj \\r
        $(DIROBJ)\ldap.obj \\r
        $(DIROBJ)\llist.obj \\r
        $(DIROBJ)\md4.obj \\r
@@ -498,28 +576,35 @@ X_OBJS= \
        $(DIROBJ)\mprintf.obj \\r
        $(DIROBJ)\multi.obj \\r
        $(DIROBJ)\netrc.obj \\r
-        $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\non-ascii.obj \\r
+       $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\nss.obj \\r
        $(DIROBJ)\openldap.obj \\r
        $(DIROBJ)\parsedate.obj \\r
        $(DIROBJ)\pingpong.obj \\r
+       $(DIROBJ)\pipeline.obj \\r
        $(DIROBJ)\polarssl.obj \\r
+       $(DIROBJ)\polarssl_threadlock.obj \\r
        $(DIROBJ)\pop3.obj \\r
        $(DIROBJ)\progress.obj \\r
+       $(DIROBJ)\qssl.obj \\r
        $(DIROBJ)\rawstr.obj \\r
        $(DIROBJ)\rtsp.obj \\r
+       $(DIROBJ)\security.obj \\r
        $(DIROBJ)\select.obj \\r
        $(DIROBJ)\sendf.obj \\r
        $(DIROBJ)\share.obj \\r
        $(DIROBJ)\slist.obj \\r
        $(DIROBJ)\smtp.obj \\r
-       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks.obj \\r
+       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks_sspi.obj \\r
        $(DIROBJ)\speedcheck.obj \\r
        $(DIROBJ)\splay.obj \\r
        $(DIROBJ)\ssh.obj \\r
        $(DIROBJ)\sslgen.obj \\r
        $(DIROBJ)\ssluse.obj \\r
+       $(DIROBJ)\strdup.obj \\r
        $(DIROBJ)\strequal.obj \\r
        $(DIROBJ)\strerror.obj \\r
        $(DIROBJ)\strtok.obj \\r
@@ -538,14 +623,14 @@ all : $(TARGET)
 \r
 $(TARGET): $(X_OBJS)\r
        $(LNK) $(LFLAGS) $(X_OBJS)\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).dll       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).lib       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib    . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\*.exp                 . /y\r
-       -xcopy $(DIROBJ)\*.pdb                 . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\*.exp                  . /y\r
+       -xcopy $(DIROBJ)\*.pdb                  . /y\r
 \r
 $(X_OBJS): $(DIROBJ)\r
 \r
index af6fbf0..e0f851d 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___\r
 #                             \___|\___/|_| \_\_____|\r
 #\r
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
 #\r
 # This software is licensed as described in the file COPYING, which\r
 # you should have received as part of this distribution. The terms\r
 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
 # KIND, either express or implied.\r
 #\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-library.\r
+\r
 ###########################################################################\r
 #\r
 # Makefile for building libcurl with MSVC8\r
 #\r
 ##############################################################\r
 \r
-#\r
-# Stem for static libs and DLLs\r
-#\r
-LIB_NAME       = libcurl\r
-LIB_NAME_DEBUG = libcurld\r
+# ----------------------------------------------\r
+# Verify that current subdir is libcurl's 'lib'\r
+# ----------------------------------------------\r
 \r
-#\r
-# Stem for DLL import libs\r
-#\r
-IMPLIB_NAME       = libcurl_imp\r
-IMPLIB_NAME_DEBUG = libcurld_imp\r
+!IF ! EXIST(.\curl_addrinfo.c)\r
+!  MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.\r
+!  MESSAGE Change to libcurl's 'lib' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
 \r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH   = ../../openssl-0.9.8o\r
+OPENSSL_PATH   = ../../openssl-0.9.8y\r
+!ENDIF\r
+\r
+!IFNDEF LIBSSH2_PATH\r
+LIBSSH2_PATH   = ../../libssh2-1.4.3\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH  = ../../zlib-1.2.5\r
+ZLIB_PATH  = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -81,29 +96,31 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 #############################################################\r
 ## Nothing more to do below this line!\r
 \r
-CCNODBG    = cl.exe /O2 /DNDEBUG\r
-CCDEBUG    = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
-CFLAGSSSL  = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
-CFLAGS     = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL\r
-CFLAGSLIB  = /DCURL_STATICLIB\r
-LNKDLL     = link.exe /DLL\r
-LNKLIB     = link.exe /lib\r
-LFLAGS     = /nologo /machine:$(MACHINE)\r
-SSLLIBS    = libeay32.lib ssleay32.lib\r
-ZLIBLIBSDLL= zdll.lib\r
-ZLIBLIBS   = zlib.lib\r
-WINLIBS    = ws2_32.lib bufferoverflowu.lib wldap32.lib\r
-CFLAGS     = $(CFLAGS)\r
-\r
-CFGSET     = FALSE\r
+CCNODBG      = cl.exe /O2 /DNDEBUG\r
+CCDEBUG      = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
+CFLAGSSSL    = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
+CFLAGSWINSSL = /DUSE_SCHANNEL\r
+CFLAGSSSH2   = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"\r
+CFLAGSZLIB   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
+CFLAGS       = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
+CFLAGSLIB    = /DCURL_STATICLIB\r
+LNKDLL       = link.exe /DLL\r
+LNKLIB       = link.exe /lib\r
+LFLAGS       = /nologo /machine:$(MACHINE)\r
+SSLLIBS      = libeay32.lib ssleay32.lib\r
+ZLIBLIBSDLL  = zdll.lib\r
+ZLIBLIBS     = zlib.lib\r
+WINLIBS      = ws2_32.lib bufferoverflowu.lib wldap32.lib advapi32.lib\r
+CFLAGS       = $(CFLAGS)\r
+\r
+CFGSET       = FALSE\r
 \r
 !IFDEF WINDOWS_SSPI\r
 CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include\r
@@ -129,7 +146,7 @@ RTLIBD = /MTd
 # release\r
 \r
 !IF "$(CFG)" == "release"\r
-TARGET = $(LIB_NAME).lib\r
+TARGET = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)\r
@@ -137,10 +154,22 @@ CFGSET = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-ssl\r
+\r
+!IF "$(CFG)" == "release-ssl"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
 # release-zlib\r
 \r
 !IF "$(CFG)" == "release-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -149,72 +178,61 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# release-dll\r
-\r
-!IF "$(CFG)" == "release-dll"\r
-TARGET = $(LIB_NAME).dll\r
-DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC     = $(CCNODBG) $(RTLIB)\r
-CFGSET = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
-!ENDIF\r
-\r
-######################\r
-# release-ssl\r
+# release-ssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-dll\r
+# release-winssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-zlib\r
+# release-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-dll-ssl-dll\r
+# release-ssl-dll\r
 \r
-!IF "$(CFG)" == "release-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+!IF "$(CFG)" == "release-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
 !ENDIF\r
 \r
 ######################\r
 # release-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -226,7 +244,7 @@ CFGSET   = TRUE
 # release-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -236,13 +254,38 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-dll\r
+\r
+!IF "$(CFG)" == "release-dll"\r
+TARGET = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ = $(CFG)\r
+LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC     = $(CCNODBG) $(RTLIB)\r
+CFGSET = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
+# release-dll-ssl-dll\r
+\r
+!IF "$(CFG)" == "release-dll-ssl-dll"\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+CFGSET   = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
 # release-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -252,11 +295,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # release-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -266,7 +309,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug\r
 \r
 !IF "$(CFG)" == "debug"\r
-TARGET = $(LIB_NAME_DEBUG).lib\r
+TARGET = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)\r
@@ -277,7 +320,7 @@ CFGSET = TRUE
 # debug-ssl\r
 \r
 !IF "$(CFG)" == "debug-ssl"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
 LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
@@ -289,7 +332,7 @@ CFGSET   = TRUE
 # debug-zlib\r
 \r
 !IF "$(CFG)" == "debug-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -298,27 +341,41 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-dll\r
+# debug-ssl-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-zlib\r
+# debug-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
+# debug-ssl-dll\r
+\r
+!IF "$(CFG)" == "debug-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
@@ -326,7 +383,7 @@ CFGSET   = TRUE
 # debug-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -338,7 +395,7 @@ CFGSET   = TRUE
 # debug-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -351,9 +408,9 @@ CFGSET   = TRUE
 # debug-dll\r
 \r
 !IF "$(CFG)" == "debug-dll"\r
-TARGET = $(LIB_NAME_DEBUG).dll\r
+TARGET = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC     = $(CCDEBUG) $(RTLIBD) \r
 CFGSET = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -363,10 +420,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -376,10 +433,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -389,11 +446,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -409,6 +466,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   release-ssl                  - release static library with ssl\r
 !MESSAGE   release-zlib                 - release static library with zlib\r
 !MESSAGE   release-ssl-zlib             - release static library with ssl and zlib\r
+!MESSAGE   release-ssl-ssh2-zlib        - release static library with ssl, ssh2 and zlib\r
 !MESSAGE   release-ssl-dll              - release static library with dynamic ssl\r
 !MESSAGE   release-zlib-dll             - release static library with dynamic zlib\r
 !MESSAGE   release-ssl-dll-zlib-dll     - release static library with dynamic ssl and dynamic zlib\r
@@ -420,6 +478,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   debug-ssl                    - debug static library with ssl\r
 !MESSAGE   debug-zlib                   - debug static library with zlib\r
 !MESSAGE   debug-ssl-zlib               - debug static library with ssl and zlib\r
+!MESSAGE   debug-ssl-ssh2-zlib          - debug static library with ssl, ssh2 and zlib\r
 !MESSAGE   debug-ssl-dll                - debug static library with dynamic ssl\r
 !MESSAGE   debug-zlib-dll               - debug static library with dynamic zlib\r
 !MESSAGE   debug-ssl-dll-zlib-dll       - debug static library with dynamic ssl and dynamic zlib\r
@@ -448,48 +507,67 @@ clean:
 # A config was provided, so the library can be built.\r
 #\r
 X_OBJS= \\r
+       $(DIROBJ)\amigaos.obj \\r
+       $(DIROBJ)\asyn-ares.obj \\r
+       $(DIROBJ)\asyn-thread.obj \\r
+       $(DIROBJ)\axtls.obj \\r
        $(DIROBJ)\base64.obj \\r
+       $(DIROBJ)\bundles.obj \\r
+       $(DIROBJ)\conncache.obj \\r
        $(DIROBJ)\connect.obj \\r
        $(DIROBJ)\content_encoding.obj \\r
        $(DIROBJ)\cookie.obj \\r
        $(DIROBJ)\curl_addrinfo.obj \\r
+       $(DIROBJ)\curl_darwinssl.obj \\r
        $(DIROBJ)\curl_fnmatch.obj \\r
        $(DIROBJ)\curl_gethostname.obj \\r
+       $(DIROBJ)\curl_gssapi.obj \\r
        $(DIROBJ)\curl_memrchr.obj \\r
-       $(DIROBJ)\curl_rand.obj \\r
+       $(DIROBJ)\curl_multibyte.obj \\r
+       $(DIROBJ)\curl_ntlm.obj \\r
+       $(DIROBJ)\curl_ntlm_core.obj \\r
+       $(DIROBJ)\curl_ntlm_msgs.obj \\r
+       $(DIROBJ)\curl_ntlm_wb.obj \\r
        $(DIROBJ)\curl_rtmp.obj \\r
+       $(DIROBJ)\curl_sasl.obj \\r
+       $(DIROBJ)\curl_schannel.obj \\r
        $(DIROBJ)\curl_sspi.obj \\r
        $(DIROBJ)\curl_threads.obj \\r
+       $(DIROBJ)\cyassl.obj \\r
        $(DIROBJ)\dict.obj \\r
+       $(DIROBJ)\dotdot.obj \\r
        $(DIROBJ)\easy.obj \\r
        $(DIROBJ)\escape.obj \\r
-       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\file.obj \\r
+       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\formdata.obj \\r
-       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\ftp.obj \\r
+       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\getenv.obj \\r
        $(DIROBJ)\getinfo.obj \\r
-       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\gopher.obj \\r
+       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\hash.obj \\r
        $(DIROBJ)\hmac.obj \\r
-       $(DIROBJ)\hostares.obj \\r
        $(DIROBJ)\hostasyn.obj \\r
+       $(DIROBJ)\hostcheck.obj \\r
+       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostip4.obj \\r
        $(DIROBJ)\hostip6.obj \\r
-       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostsyn.obj \\r
-       $(DIROBJ)\hostthre.obj \\r
+       $(DIROBJ)\http.obj \\r
        $(DIROBJ)\http_chunks.obj \\r
        $(DIROBJ)\http_digest.obj \\r
        $(DIROBJ)\http_negotiate.obj \\r
-       $(DIROBJ)\http_ntlm.obj \\r
-       $(DIROBJ)\http.obj \\r
+       $(DIROBJ)\http_negotiate_sspi.obj \\r
+       $(DIROBJ)\http_proxy.obj \\r
+       $(DIROBJ)\idn_win32.obj \\r
        $(DIROBJ)\if2ip.obj \\r
        $(DIROBJ)\imap.obj \\r
        $(DIROBJ)\inet_ntop.obj \\r
        $(DIROBJ)\inet_pton.obj \\r
+       $(DIROBJ)\krb4.obj \\r
+       $(DIROBJ)\krb5.obj \\r
        $(DIROBJ)\ldap.obj \\r
        $(DIROBJ)\llist.obj \\r
        $(DIROBJ)\md4.obj \\r
@@ -498,28 +576,35 @@ X_OBJS= \
        $(DIROBJ)\mprintf.obj \\r
        $(DIROBJ)\multi.obj \\r
        $(DIROBJ)\netrc.obj \\r
-        $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\non-ascii.obj \\r
+       $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\nss.obj \\r
        $(DIROBJ)\openldap.obj \\r
        $(DIROBJ)\parsedate.obj \\r
        $(DIROBJ)\pingpong.obj \\r
+       $(DIROBJ)\pipeline.obj \\r
        $(DIROBJ)\polarssl.obj \\r
+       $(DIROBJ)\polarssl_threadlock.obj \\r
        $(DIROBJ)\pop3.obj \\r
        $(DIROBJ)\progress.obj \\r
+       $(DIROBJ)\qssl.obj \\r
        $(DIROBJ)\rawstr.obj \\r
        $(DIROBJ)\rtsp.obj \\r
+       $(DIROBJ)\security.obj \\r
        $(DIROBJ)\select.obj \\r
        $(DIROBJ)\sendf.obj \\r
        $(DIROBJ)\share.obj \\r
        $(DIROBJ)\slist.obj \\r
        $(DIROBJ)\smtp.obj \\r
-       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks.obj \\r
+       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks_sspi.obj \\r
        $(DIROBJ)\speedcheck.obj \\r
        $(DIROBJ)\splay.obj \\r
        $(DIROBJ)\ssh.obj \\r
        $(DIROBJ)\sslgen.obj \\r
        $(DIROBJ)\ssluse.obj \\r
+       $(DIROBJ)\strdup.obj \\r
        $(DIROBJ)\strequal.obj \\r
        $(DIROBJ)\strerror.obj \\r
        $(DIROBJ)\strtok.obj \\r
@@ -538,14 +623,14 @@ all : $(TARGET)
 \r
 $(TARGET): $(X_OBJS)\r
        $(LNK) $(LFLAGS) $(X_OBJS)\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).dll       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).lib       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib    . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\*.exp                 . /y\r
-       -xcopy $(DIROBJ)\*.pdb                 . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\*.exp                  . /y\r
+       -xcopy $(DIROBJ)\*.pdb                  . /y\r
 \r
 $(X_OBJS): $(DIROBJ)\r
 \r
index 7d5eb2f..7b6e0ca 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___\r
 #                             \___|\___/|_| \_\_____|\r
 #\r
-# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
 #\r
 # This software is licensed as described in the file COPYING, which\r
 # you should have received as part of this distribution. The terms\r
 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
 # KIND, either express or implied.\r
 #\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-library.\r
+\r
 ###########################################################################\r
 #\r
 # Makefile for building libcurl with MSVC9\r
 #\r
 ##############################################################\r
 \r
-#\r
-# Stem for static libs and DLLs\r
-#\r
-LIB_NAME       = libcurl\r
-LIB_NAME_DEBUG = libcurld\r
+# ----------------------------------------------\r
+# Verify that current subdir is libcurl's 'lib'\r
+# ----------------------------------------------\r
 \r
-#\r
-# Stem for DLL import libs\r
-#\r
-IMPLIB_NAME       = libcurl_imp\r
-IMPLIB_NAME_DEBUG = libcurld_imp\r
+!IF ! EXIST(.\curl_addrinfo.c)\r
+!  MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.\r
+!  MESSAGE Change to libcurl's 'lib' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
 \r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH   = ../../openssl-0.9.8o\r
+OPENSSL_PATH   = ../../openssl-0.9.8y\r
+!ENDIF\r
+\r
+!IFNDEF LIBSSH2_PATH\r
+LIBSSH2_PATH   = ../../libssh2-1.4.3\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH  = ../../zlib-1.2.5\r
+ZLIB_PATH  = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -81,29 +96,31 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 #############################################################\r
 ## Nothing more to do below this line!\r
 \r
-CCNODBG    = cl.exe /O2 /DNDEBUG\r
-CCDEBUG    = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
-CFLAGSSSL  = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
-CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
-CFLAGS     = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL\r
-CFLAGSLIB  = /DCURL_STATICLIB\r
-LNKDLL     = link.exe /DLL\r
-LNKLIB     = link.exe /lib\r
-LFLAGS     = /nologo /machine:$(MACHINE)\r
-SSLLIBS    = libeay32.lib ssleay32.lib\r
-ZLIBLIBSDLL= zdll.lib\r
-ZLIBLIBS   = zlib.lib\r
-WINLIBS    = ws2_32.lib wldap32.lib\r
-CFLAGS     = $(CFLAGS)\r
-\r
-CFGSET     = FALSE\r
+CCNODBG      = cl.exe /O2 /DNDEBUG\r
+CCDEBUG      = cl.exe /Od /Gm /Zi /D_DEBUG /RTC1\r
+CFLAGSSSL    = /DUSE_SSLEAY /DUSE_OPENSSL /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"\r
+CFLAGSWINSSL = /DUSE_SCHANNEL\r
+CFLAGSSSH2   = /DUSE_LIBSSH2 /DCURL_DISABLE_LDAP /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /I "$(LIBSSH2_PATH)/include"\r
+CFLAGSZLIB   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
+CFLAGS       = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
+CFLAGSLIB    = /DCURL_STATICLIB\r
+LNKDLL       = link.exe /DLL\r
+LNKLIB       = link.exe /lib\r
+LFLAGS       = /nologo /machine:$(MACHINE)\r
+SSLLIBS      = libeay32.lib ssleay32.lib\r
+ZLIBLIBSDLL  = zdll.lib\r
+ZLIBLIBS     = zlib.lib\r
+WINLIBS      = ws2_32.lib wldap32.lib advapi32.lib\r
+CFLAGS       = $(CFLAGS)\r
+\r
+CFGSET       = FALSE\r
 \r
 !IFDEF WINDOWS_SSPI\r
 CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include\r
@@ -129,7 +146,7 @@ RTLIBD = /MTd
 # release\r
 \r
 !IF "$(CFG)" == "release"\r
-TARGET = $(LIB_NAME).lib\r
+TARGET = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)\r
@@ -137,10 +154,22 @@ CFGSET = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-ssl\r
+\r
+!IF "$(CFG)" == "release-ssl"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
 # release-zlib\r
 \r
 !IF "$(CFG)" == "release-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -149,72 +178,61 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# release-dll\r
-\r
-!IF "$(CFG)" == "release-dll"\r
-TARGET = $(LIB_NAME).dll\r
-DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC     = $(CCNODBG) $(RTLIB)\r
-CFGSET = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
-!ENDIF\r
-\r
-######################\r
-# release-ssl\r
+# release-ssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-dll\r
+# release-winssl-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LNK      = $(LNKLIB) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSWINSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-ssl-zlib\r
+# release-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "release-ssl-zlib"\r
-TARGET   = $(LIB_NAME).lib\r
+!IF "$(CFG)" == "release-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# release-dll-ssl-dll\r
+# release-ssl-dll\r
 \r
-!IF "$(CFG)" == "release-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+!IF "$(CFG)" == "release-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
-CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
-RESOURCE = $(DIROBJ)\libcurl.res\r
 !ENDIF\r
 \r
 ######################\r
 # release-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -226,7 +244,7 @@ CFGSET   = TRUE
 # release-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).lib\r
+TARGET   = $(LIBCURL_STA_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -236,13 +254,38 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
+# release-dll\r
+\r
+!IF "$(CFG)" == "release-dll"\r
+TARGET = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ = $(CFG)\r
+LNK    = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC     = $(CCNODBG) $(RTLIB)\r
+CFGSET = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
+# release-dll-ssl-dll\r
+\r
+!IF "$(CFG)" == "release-dll-ssl-dll"\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
+CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)\r
+CFGSET   = TRUE\r
+RESOURCE = $(DIROBJ)\libcurl.res\r
+!ENDIF\r
+\r
+######################\r
 # release-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -252,11 +295,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # release-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_REL)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)\r
 CC       = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -266,7 +309,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug\r
 \r
 !IF "$(CFG)" == "debug"\r
-TARGET = $(LIB_NAME_DEBUG).lib\r
+TARGET = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ = $(CFG)\r
 LNK    = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)\r
 CC     = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)\r
@@ -277,7 +320,7 @@ CFGSET = TRUE
 # debug-ssl\r
 \r
 !IF "$(CFG)" == "debug-ssl"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
 LNK      = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
@@ -289,7 +332,7 @@ CFGSET   = TRUE
 # debug-zlib\r
 \r
 !IF "$(CFG)" == "debug-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -298,27 +341,41 @@ CFGSET   = TRUE
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-dll\r
+# debug-ssl-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
-LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
-LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
+LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
 ######################\r
-# debug-ssl-zlib\r
+# debug-ssl-ssh2-zlib\r
 \r
-!IF "$(CFG)" == "debug-ssl-zlib"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+!IF "$(CFG)" == "debug-ssl-ssh2-zlib"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
+LFLAGSSSH2 = "/LIBPATH:$(LIBSSH2_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"\r
-LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
-CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+LNK      = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSSSL) $(LFLAGSSSH2) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSSSH2) $(CFLAGSZLIB) $(CFLAGSLIB)\r
+CFGSET   = TRUE\r
+!ENDIF\r
+\r
+######################\r
+# debug-ssl-dll\r
+\r
+!IF "$(CFG)" == "debug-ssl-dll"\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
+DIROBJ   = $(CFG)\r
+LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll\r
+LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)\r
+CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)\r
 CFGSET   = TRUE\r
 !ENDIF\r
 \r
@@ -326,7 +383,7 @@ CFGSET   = TRUE
 # debug-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LNK      = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)\r
@@ -338,7 +395,7 @@ CFGSET   = TRUE
 # debug-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).lib\r
+TARGET   = $(LIBCURL_STA_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
@@ -351,9 +408,9 @@ CFGSET   = TRUE
 # debug-dll\r
 \r
 !IF "$(CFG)" == "debug-dll"\r
-TARGET = $(LIB_NAME_DEBUG).dll\r
+TARGET = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ = $(CFG)\r
-LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK    = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC     = $(CCDEBUG) $(RTLIBD) \r
 CFGSET = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -363,10 +420,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -376,10 +433,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -389,11 +446,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
 # debug-dll-ssl-dll-zlib-dll\r
 \r
 !IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"\r
-TARGET   = $(LIB_NAME_DEBUG).dll\r
+TARGET   = $(LIBCURL_DYN_LIB_DBG)\r
 DIROBJ   = $(CFG)\r
 LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"\r
 LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"\r
-LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb\r
+LNK      = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)\r
 CC       = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)\r
 CFGSET   = TRUE\r
 RESOURCE = $(DIROBJ)\libcurl.res\r
@@ -409,6 +466,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   release-ssl                  - release static library with ssl\r
 !MESSAGE   release-zlib                 - release static library with zlib\r
 !MESSAGE   release-ssl-zlib             - release static library with ssl and zlib\r
+!MESSAGE   release-ssl-ssh2-zlib        - release static library with ssl, ssh2 and zlib\r
 !MESSAGE   release-ssl-dll              - release static library with dynamic ssl\r
 !MESSAGE   release-zlib-dll             - release static library with dynamic zlib\r
 !MESSAGE   release-ssl-dll-zlib-dll     - release static library with dynamic ssl and dynamic zlib\r
@@ -420,6 +478,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
 !MESSAGE   debug-ssl                    - debug static library with ssl\r
 !MESSAGE   debug-zlib                   - debug static library with zlib\r
 !MESSAGE   debug-ssl-zlib               - debug static library with ssl and zlib\r
+!MESSAGE   debug-ssl-ssh2-zlib          - debug static library with ssl, ssh2 and zlib\r
 !MESSAGE   debug-ssl-dll                - debug static library with dynamic ssl\r
 !MESSAGE   debug-zlib-dll               - debug static library with dynamic zlib\r
 !MESSAGE   debug-ssl-dll-zlib-dll       - debug static library with dynamic ssl and dynamic zlib\r
@@ -448,48 +507,67 @@ clean:
 # A config was provided, so the library can be built.\r
 #\r
 X_OBJS= \\r
+       $(DIROBJ)\amigaos.obj \\r
+       $(DIROBJ)\asyn-ares.obj \\r
+       $(DIROBJ)\asyn-thread.obj \\r
+       $(DIROBJ)\axtls.obj \\r
        $(DIROBJ)\base64.obj \\r
+       $(DIROBJ)\bundles.obj \\r
+       $(DIROBJ)\conncache.obj \\r
        $(DIROBJ)\connect.obj \\r
        $(DIROBJ)\content_encoding.obj \\r
        $(DIROBJ)\cookie.obj \\r
        $(DIROBJ)\curl_addrinfo.obj \\r
+       $(DIROBJ)\curl_darwinssl.obj \\r
        $(DIROBJ)\curl_fnmatch.obj \\r
        $(DIROBJ)\curl_gethostname.obj \\r
+       $(DIROBJ)\curl_gssapi.obj \\r
        $(DIROBJ)\curl_memrchr.obj \\r
-       $(DIROBJ)\curl_rand.obj \\r
+       $(DIROBJ)\curl_multibyte.obj \\r
+       $(DIROBJ)\curl_ntlm.obj \\r
+       $(DIROBJ)\curl_ntlm_core.obj \\r
+       $(DIROBJ)\curl_ntlm_msgs.obj \\r
+       $(DIROBJ)\curl_ntlm_wb.obj \\r
        $(DIROBJ)\curl_rtmp.obj \\r
+       $(DIROBJ)\curl_sasl.obj \\r
+       $(DIROBJ)\curl_schannel.obj \\r
        $(DIROBJ)\curl_sspi.obj \\r
        $(DIROBJ)\curl_threads.obj \\r
+       $(DIROBJ)\cyassl.obj \\r
        $(DIROBJ)\dict.obj \\r
+       $(DIROBJ)\dotdot.obj \\r
        $(DIROBJ)\easy.obj \\r
        $(DIROBJ)\escape.obj \\r
-       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\file.obj \\r
+       $(DIROBJ)\fileinfo.obj \\r
        $(DIROBJ)\formdata.obj \\r
-       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\ftp.obj \\r
+       $(DIROBJ)\ftplistparser.obj \\r
        $(DIROBJ)\getenv.obj \\r
        $(DIROBJ)\getinfo.obj \\r
-       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\gopher.obj \\r
+       $(DIROBJ)\gtls.obj \\r
        $(DIROBJ)\hash.obj \\r
        $(DIROBJ)\hmac.obj \\r
-       $(DIROBJ)\hostares.obj \\r
        $(DIROBJ)\hostasyn.obj \\r
+       $(DIROBJ)\hostcheck.obj \\r
+       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostip4.obj \\r
        $(DIROBJ)\hostip6.obj \\r
-       $(DIROBJ)\hostip.obj \\r
        $(DIROBJ)\hostsyn.obj \\r
-       $(DIROBJ)\hostthre.obj \\r
+       $(DIROBJ)\http.obj \\r
        $(DIROBJ)\http_chunks.obj \\r
        $(DIROBJ)\http_digest.obj \\r
        $(DIROBJ)\http_negotiate.obj \\r
-       $(DIROBJ)\http_ntlm.obj \\r
-       $(DIROBJ)\http.obj \\r
+       $(DIROBJ)\http_negotiate_sspi.obj \\r
+       $(DIROBJ)\http_proxy.obj \\r
+       $(DIROBJ)\idn_win32.obj \\r
        $(DIROBJ)\if2ip.obj \\r
        $(DIROBJ)\imap.obj \\r
        $(DIROBJ)\inet_ntop.obj \\r
        $(DIROBJ)\inet_pton.obj \\r
+       $(DIROBJ)\krb4.obj \\r
+       $(DIROBJ)\krb5.obj \\r
        $(DIROBJ)\ldap.obj \\r
        $(DIROBJ)\llist.obj \\r
        $(DIROBJ)\md4.obj \\r
@@ -498,28 +576,35 @@ X_OBJS= \
        $(DIROBJ)\mprintf.obj \\r
        $(DIROBJ)\multi.obj \\r
        $(DIROBJ)\netrc.obj \\r
-        $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\non-ascii.obj \\r
+       $(DIROBJ)\nonblock.obj \\r
+       $(DIROBJ)\nss.obj \\r
        $(DIROBJ)\openldap.obj \\r
        $(DIROBJ)\parsedate.obj \\r
        $(DIROBJ)\pingpong.obj \\r
+       $(DIROBJ)\pipeline.obj \\r
        $(DIROBJ)\polarssl.obj \\r
+       $(DIROBJ)\polarssl_threadlock.obj \\r
        $(DIROBJ)\pop3.obj \\r
        $(DIROBJ)\progress.obj \\r
+       $(DIROBJ)\qssl.obj \\r
        $(DIROBJ)\rawstr.obj \\r
        $(DIROBJ)\rtsp.obj \\r
+       $(DIROBJ)\security.obj \\r
        $(DIROBJ)\select.obj \\r
        $(DIROBJ)\sendf.obj \\r
        $(DIROBJ)\share.obj \\r
        $(DIROBJ)\slist.obj \\r
        $(DIROBJ)\smtp.obj \\r
-       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks.obj \\r
+       $(DIROBJ)\socks_gssapi.obj \\r
        $(DIROBJ)\socks_sspi.obj \\r
        $(DIROBJ)\speedcheck.obj \\r
        $(DIROBJ)\splay.obj \\r
        $(DIROBJ)\ssh.obj \\r
        $(DIROBJ)\sslgen.obj \\r
        $(DIROBJ)\ssluse.obj \\r
+       $(DIROBJ)\strdup.obj \\r
        $(DIROBJ)\strequal.obj \\r
        $(DIROBJ)\strerror.obj \\r
        $(DIROBJ)\strtok.obj \\r
@@ -538,14 +623,14 @@ all : $(TARGET)
 \r
 $(TARGET): $(X_OBJS)\r
        $(LNK) $(LFLAGS) $(X_OBJS)\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).dll       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME).lib       . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y\r
-       -xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME).lib    . /y\r
-       -xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y\r
-       -xcopy $(DIROBJ)\*.exp                 . /y\r
-       -xcopy $(DIROBJ)\*.pdb                 . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y\r
+       -xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y\r
+       -xcopy $(DIROBJ)\*.exp                  . /y\r
+       -xcopy $(DIROBJ)\*.pdb                  . /y\r
 \r
 $(X_OBJS): $(DIROBJ)\r
 \r
index 796d160..0f9de51 100644 (file)
@@ -5,7 +5,7 @@
 #Description: makefile to be used in order to compile libcurl for VxWoorks 6.3.
 #
 #How to use:
-#             1. Adjust environment variables at the file begining
+#             1. Adjust environment variables at the file beginning
 #             2. Open the Command Prompt window and change directory ('cd')
 #                into the 'lib' folder
 #             3. Add <CYGWIN>/bin folder to the PATH environment variable
@@ -33,10 +33,10 @@ BUILD_TYPE := debug
 USER_CFLAGS:=
 
 # directories where to seek for includes and libraries
-OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3/include
-OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3
-ZLIB_INC    := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/zlib-1.2.3
-ZLIB_LIB    := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib
+OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8y-vxWorks6.3/include
+OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8y-vxWorks6.3
+ZLIB_INC    := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/zlib-1.2.8
+ZLIB_LIB    := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib
 ARES_INC    :=
 ARES_LIB    :=
 
index 0d31b36..1012bb9 100644 (file)
@@ -33,21 +33,21 @@ Gallagher, and support for the 'gzip' encoding was added by Dan Fandrich.
 
 To cause libcurl to request a content encoding use:
 
-    curl_easy_setopt(curl, CURLOPT_ENCODING, <string>)
+    curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, <string>)
 
 where <string> is the intended value of the Accept-Encoding header.
 
 Currently, libcurl only understands how to process responses that use the
-"deflate" or "gzip" Content-Encoding, so the only values for CURLOPT_ENCODING
-that will work (besides "identity," which does nothing) are "deflate" and
-"gzip" If a response is encoded using the "compress" or methods, libcurl will
-return an error indicating that the response could not be decoded.  If
-<string> is NULL no Accept-Encoding header is generated.  If <string> is a
-zero-length string, then an Accept-Encoding header containing all supported
-encodings will be generated.
-
-The CURLOPT_ENCODING must be set to any non-NULL value for content to be
-automatically decoded.  If it is not set and the server still sends encoded
+"deflate" or "gzip" Content-Encoding, so the only values for
+CURLOPT_ACCEPT_ENCODING that will work (besides "identity," which does
+nothing) are "deflate" and "gzip" If a response is encoded using the
+"compress" or methods, libcurl will return an error indicating that the
+response could not be decoded.  If <string> is NULL no Accept-Encoding header
+is generated.  If <string> is a zero-length string, then an Accept-Encoding
+header containing all supported encodings will be generated.
+
+The CURLOPT_ACCEPT_ENCODING must be set to any non-NULL value for content to
+be automatically decoded.  If it is not set and the server still sends encoded
 content (despite not having been asked), the data is returned in its raw form
 and the Content-Encoding type is not checked.
 
index 9723b93..2e30bc7 100644 (file)
@@ -32,4 +32,4 @@
  hostip6.c  - ipv6-specific functions
 
  The hostip.h is the single united header file for all this. It defines the
- CURLRES_* defines based on the config*.h and setup.h defines.
+ CURLRES_* defines based on the config*.h and curl_setup.h defines.
index c7b4622..e5bf6ec 100644 (file)
@@ -42,10 +42,3 @@ Details
   still resolve the second one properly to make sure that they actually _can_
   be considered for pipelining. Also, asking for explicit pipelining on handle
   X may be tricky when handle X get a closed connection.
-
-- We need options to control max pipeline length, and probably how to behave
-  if we reach that limit. As was discussed on the list, it can probably be
-  made very complicated, so perhaps we can think of a way to pass all
-  variables involved to a callback and let the application decide how to act
-  in specific situations. Either way, these fancy options are only interesting
-  to work on when everything is working and we have working apps to test with.
index 2055126..34f95e9 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#include "curl_setup.h"
+
+#if defined(__AMIGA__) && !defined(__ixemul__)
 
-#include "amigaos.h"
 #include <amitcp/socketbasetags.h>
 
+#include "amigaos.h"
+
 struct Library *SocketBase = NULL;
 extern int errno, h_errno;
 
@@ -35,7 +38,7 @@ void __request(const char *msg);
 # define __request( msg )       Printf( msg "\n\a")
 #endif
 
-void amiga_cleanup()
+void Curl_amiga_cleanup()
 {
   if(SocketBase) {
     CloseLibrary(SocketBase);
@@ -43,7 +46,7 @@ void amiga_cleanup()
   }
 }
 
-BOOL amiga_init()
+bool Curl_amiga_init()
 {
   if(!SocketBase)
     SocketBase = OpenLibrary("bsdsocket.library", 4);
@@ -61,20 +64,14 @@ BOOL amiga_init()
   }
 
 #ifndef __libnix__
-  atexit(amiga_cleanup);
+  atexit(Curl_amiga_cleanup);
 #endif
 
   return TRUE;
 }
 
 #ifdef __libnix__
-ADD2EXIT(amiga_cleanup,-50);
-#endif
-
-#else /* __AMIGA__ */
-
-#ifdef __POCC__
-#  pragma warn(disable:2024)  /* Disable warning #2024: Empty input file */
+ADD2EXIT(Curl_amiga_cleanup,-50);
 #endif
 
-#endif /* __AMIGA__ */
+#endif /* __AMIGA__ && ! __ixemul__ */
index d6ff064..76578be 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LIBCURL_AMIGAOS_H
-#define LIBCURL_AMIGAOS_H
+#ifndef HEADER_CURL_AMIGAOS_H
+#define HEADER_CURL_AMIGAOS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
+#if defined(__AMIGA__) && !defined(__ixemul__)
 
-#ifndef __ixemul__
+bool Curl_amiga_init();
+void Curl_amiga_cleanup();
 
-#include <exec/types.h>
-#include <exec/execbase.h>
+#else
 
-#include <proto/exec.h>
-#include <proto/dos.h>
+#define Curl_amiga_init() 1
+#define Curl_amiga_cleanup() Curl_nop_stmt
 
-#include <sys/socket.h>
-
-#include "config-amigaos.h"
-
-#ifndef select
-# define select(args...) WaitSelect( args, NULL)
-#endif
-#ifndef ioctl
-# define ioctl(a,b,c,d)  IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
 #endif
-#define _AMIGASF        1
-
-extern void amiga_cleanup();
-extern BOOL amiga_init();
-
-#else /* __ixemul__ */
-
-#warning compiling with ixemul...
 
-#endif /* __ixemul__ */
-#endif /* __AMIGA__ */
-#endif /* LIBCURL_AMIGAOS_H */
+#endif /* HEADER_CURL_AMIGAOS_H */
 
index ddb14f6..098d9a9 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  * Telnet option defines. Add more here if in need.
  */
 #define CURL_TELOPT_BINARY   0  /* binary 8bit data */
-#define CURL_TELOPT_SGA      3  /* Supress Go Ahead */
+#define CURL_TELOPT_ECHO     1  /* just echo! */
+#define CURL_TELOPT_SGA      3  /* Suppress Go Ahead */
 #define CURL_TELOPT_EXOPL  255  /* EXtended OPtions List */
 #define CURL_TELOPT_TTYPE   24  /* Terminal TYPE */
+#define CURL_TELOPT_NAWS    31  /* Negotiate About Window Size */
 #define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
 
 #define CURL_TELOPT_NEW_ENVIRON 39  /* NEW ENVIRONment variables */
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
new file mode 100644 (file)
index 0000000..081667d
--- /dev/null
@@ -0,0 +1,626 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef __VMS
+#include <in.h>
+#include <inet.h>
+#endif
+
+#ifdef HAVE_PROCESS_H
+#include <process.h>
+#endif
+
+#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
+#undef in_addr_t
+#define in_addr_t unsigned long
+#endif
+
+/***********************************************************************
+ * Only for ares-enabled builds
+ * And only for functions that fulfill the asynch resolver backend API
+ * as defined in asyn.h, nothing else belongs in this file!
+ **********************************************************************/
+
+#ifdef CURLRES_ARES
+
+#include "urldata.h"
+#include "sendf.h"
+#include "hostip.h"
+#include "hash.h"
+#include "share.h"
+#include "strerror.h"
+#include "url.h"
+#include "multiif.h"
+#include "inet_pton.h"
+#include "connect.h"
+#include "select.h"
+#include "progress.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#  if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
+     (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+#    define CARES_STATICLIB
+#  endif
+#  include <ares.h>
+#  include <ares_version.h> /* really old c-ares didn't include this by
+                               itself */
+
+#if ARES_VERSION >= 0x010500
+/* c-ares 1.5.0 or later, the callback proto is modified */
+#define HAVE_CARES_CALLBACK_TIMEOUTS 1
+#endif
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+struct ResolverResults {
+  int num_pending; /* number of ares_gethostbyname() requests */
+  Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares parts */
+  int last_status;
+};
+
+/*
+ * Curl_resolver_global_init() - the generic low-level asynchronous name
+ * resolve API.  Called from curl_global_init() to initialize global resolver
+ * environment.  Initializes ares library.
+ */
+int Curl_resolver_global_init(void)
+{
+#ifdef CARES_HAVE_ARES_LIBRARY_INIT
+  if(ares_library_init(ARES_LIB_INIT_ALL)) {
+    return CURLE_FAILED_INIT;
+  }
+#endif
+  return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_global_cleanup()
+ *
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ * Deinitializes ares library.
+ */
+void Curl_resolver_global_cleanup(void)
+{
+#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP
+  ares_library_cleanup();
+#endif
+}
+
+/*
+ * Curl_resolver_init()
+ *
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Fills the passed pointer by the initialized ares_channel.
+ */
+CURLcode Curl_resolver_init(void **resolver)
+{
+  int status = ares_init((ares_channel*)resolver);
+  if(status != ARES_SUCCESS) {
+    if(status == ARES_ENOMEM)
+      return CURLE_OUT_OF_MEMORY;
+    else
+      return CURLE_FAILED_INIT;
+  }
+  return CURLE_OK;
+  /* make sure that all other returns from this function should destroy the
+     ares channel before returning error! */
+}
+
+/*
+ * Curl_resolver_cleanup()
+ *
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Destroys the ares channel.
+ */
+void Curl_resolver_cleanup(void *resolver)
+{
+  ares_destroy((ares_channel)resolver);
+}
+
+/*
+ * Curl_resolver_duphandle()
+ *
+ * Called from curl_easy_duphandle() to duplicate resolver URL-state specific
+ * environment ('resolver' member of the UrlState structure).  Duplicates the
+ * 'from' ares channel and passes the resulting channel to the 'to' pointer.
+ */
+int Curl_resolver_duphandle(void **to, void *from)
+{
+  /* Clone the ares channel for the new handle */
+  if(ARES_SUCCESS != ares_dup((ares_channel*)to,(ares_channel)from))
+    return CURLE_FAILED_INIT;
+  return CURLE_OK;
+}
+
+static void destroy_async_data (struct Curl_async *async);
+
+/*
+ * Cancel all possibly still on-going resolves for this connection.
+ */
+void Curl_resolver_cancel(struct connectdata *conn)
+{
+  if(conn && conn->data && conn->data->state.resolver)
+    ares_cancel((ares_channel)conn->data->state.resolver);
+  destroy_async_data(&conn->async);
+}
+
+/*
+ * destroy_async_data() cleans up async resolver data.
+ */
+static void destroy_async_data (struct Curl_async *async)
+{
+  if(async->hostname)
+    free(async->hostname);
+
+  if(async->os_specific) {
+    struct ResolverResults *res = (struct ResolverResults *)async->os_specific;
+    if(res) {
+      if(res->temp_ai) {
+        Curl_freeaddrinfo(res->temp_ai);
+        res->temp_ai = NULL;
+      }
+      free(res);
+    }
+    async->os_specific = NULL;
+  }
+
+  async->hostname = NULL;
+}
+
+/*
+ * Curl_resolver_getsock() is called when someone from the outside world
+ * (using curl_multi_fdset()) wants to get our fd_set setup and we're talking
+ * with ares. The caller must make sure that this function is only called when
+ * we have a working ares channel.
+ *
+ * Returns: sockets-in-use-bitmap
+ */
+
+int Curl_resolver_getsock(struct connectdata *conn,
+                          curl_socket_t *socks,
+                          int numsocks)
+
+{
+  struct timeval maxtime;
+  struct timeval timebuf;
+  struct timeval *timeout;
+  long milli;
+  int max = ares_getsock((ares_channel)conn->data->state.resolver,
+                         (ares_socket_t *)socks, numsocks);
+
+  maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
+  maxtime.tv_usec = 0;
+
+  timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime,
+                         &timebuf);
+  milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
+  if(milli == 0)
+    milli += 10;
+  Curl_expire(conn->data, milli);
+
+  return max;
+}
+
+/*
+ * waitperform()
+ *
+ * 1) Ask ares what sockets it currently plays with, then
+ * 2) wait for the timeout period to check for action on ares' sockets.
+ * 3) tell ares to act on all the sockets marked as "with action"
+ *
+ * return number of sockets it worked on
+ */
+
+static int waitperform(struct connectdata *conn, int timeout_ms)
+{
+  struct SessionHandle *data = conn->data;
+  int nfds;
+  int bitmask;
+  ares_socket_t socks[ARES_GETSOCK_MAXNUM];
+  struct pollfd pfd[ARES_GETSOCK_MAXNUM];
+  int i;
+  int num = 0;
+
+  bitmask = ares_getsock((ares_channel)data->state.resolver, socks,
+                         ARES_GETSOCK_MAXNUM);
+
+  for(i=0; i < ARES_GETSOCK_MAXNUM; i++) {
+    pfd[i].events = 0;
+    pfd[i].revents = 0;
+    if(ARES_GETSOCK_READABLE(bitmask, i)) {
+      pfd[i].fd = socks[i];
+      pfd[i].events |= POLLRDNORM|POLLIN;
+    }
+    if(ARES_GETSOCK_WRITABLE(bitmask, i)) {
+      pfd[i].fd = socks[i];
+      pfd[i].events |= POLLWRNORM|POLLOUT;
+    }
+    if(pfd[i].events != 0)
+      num++;
+    else
+      break;
+  }
+
+  if(num)
+    nfds = Curl_poll(pfd, num, timeout_ms);
+  else
+    nfds = 0;
+
+  if(!nfds)
+    /* Call ares_process() unconditonally here, even if we simply timed out
+       above, as otherwise the ares name resolve won't timeout! */
+    ares_process_fd((ares_channel)data->state.resolver, ARES_SOCKET_BAD,
+                    ARES_SOCKET_BAD);
+  else {
+    /* move through the descriptors and ask for processing on them */
+    for(i=0; i < num; i++)
+      ares_process_fd((ares_channel)data->state.resolver,
+                      pfd[i].revents & (POLLRDNORM|POLLIN)?
+                      pfd[i].fd:ARES_SOCKET_BAD,
+                      pfd[i].revents & (POLLWRNORM|POLLOUT)?
+                      pfd[i].fd:ARES_SOCKET_BAD);
+  }
+  return nfds;
+}
+
+/*
+ * Curl_resolver_is_resolved() is called repeatedly to check if a previous
+ * name resolve request has completed. It should also make sure to time-out if
+ * the operation seems to take too long.
+ *
+ * Returns normal CURLcode errors.
+ */
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+                                   struct Curl_dns_entry **dns)
+{
+  struct SessionHandle *data = conn->data;
+  struct ResolverResults *res = (struct ResolverResults *)
+    conn->async.os_specific;
+  CURLcode rc = CURLE_OK;
+
+  *dns = NULL;
+
+  waitperform(conn, 0);
+
+  if(res && !res->num_pending) {
+    (void)Curl_addrinfo_callback(conn, res->last_status, res->temp_ai);
+    /* temp_ai ownership is moved to the connection, so we need not free-up
+       them */
+    res->temp_ai = NULL;
+    if(!conn->async.dns) {
+      failf(data, "Could not resolve: %s (%s)",
+            conn->async.hostname, ares_strerror(conn->async.status));
+      rc = conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY:
+        CURLE_COULDNT_RESOLVE_HOST;
+    }
+    else
+      *dns = conn->async.dns;
+
+    destroy_async_data(&conn->async);
+  }
+
+  return rc;
+}
+
+/*
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
+ *
+ * If 'entry' is non-NULL, make it point to the resolved dns entry
+ *
+ * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
+ * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
+ */
+CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+                                   struct Curl_dns_entry **entry)
+{
+  CURLcode rc=CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  long timeout;
+  struct timeval now = Curl_tvnow();
+  struct Curl_dns_entry *temp_entry;
+
+  timeout = Curl_timeleft(data, &now, TRUE);
+  if(!timeout)
+    timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
+
+  /* Wait for the name resolve query to complete. */
+  for(;;) {
+    struct timeval *tvp, tv, store;
+    long timediff;
+    int itimeout;
+    int timeout_ms;
+
+    itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+
+    store.tv_sec = itimeout/1000;
+    store.tv_usec = (itimeout%1000)*1000;
+
+    tvp = ares_timeout((ares_channel)data->state.resolver, &store, &tv);
+
+    /* use the timeout period ares returned to us above if less than one
+       second is left, otherwise just use 1000ms to make sure the progress
+       callback gets called frequent enough */
+    if(!tvp->tv_sec)
+      timeout_ms = (int)(tvp->tv_usec/1000);
+    else
+      timeout_ms = 1000;
+
+    waitperform(conn, timeout_ms);
+    Curl_resolver_is_resolved(conn,&temp_entry);
+
+    if(conn->async.done)
+      break;
+
+    if(Curl_pgrsUpdate(conn)) {
+      rc = CURLE_ABORTED_BY_CALLBACK;
+      timeout = -1; /* trigger the cancel below */
+    }
+    else {
+      struct timeval now2 = Curl_tvnow();
+      timediff = Curl_tvdiff(now2, now); /* spent time */
+      timeout -= timediff?timediff:1; /* always deduct at least 1 */
+      now = now2; /* for next loop */
+    }
+    if(timeout < 0) {
+      /* our timeout, so we cancel the ares operation */
+      ares_cancel((ares_channel)data->state.resolver);
+      break;
+    }
+  }
+
+  /* Operation complete, if the lookup was successful we now have the entry
+     in the cache. */
+
+  if(entry)
+    *entry = conn->async.dns;
+
+  if(rc)
+    /* close the connection, since we can't return failure here without
+       cleaning up this connection properly.
+       TODO: remove this action from here, it is not a name resolver decision.
+    */
+    conn->bits.close = TRUE;
+
+  return rc;
+}
+
+/* Connects results to the list */
+static void compound_results(struct ResolverResults *res,
+                             Curl_addrinfo *ai)
+{
+  Curl_addrinfo *ai_tail;
+  if(!ai)
+    return;
+  ai_tail = ai;
+
+  while(ai_tail->ai_next)
+    ai_tail = ai_tail->ai_next;
+
+  /* Add the new results to the list of old results. */
+  ai_tail->ai_next = res->temp_ai;
+  res->temp_ai = ai;
+}
+
+/*
+ * ares_query_completed_cb() is the callback that ares will call when
+ * the host query initiated by ares_gethostbyname() from Curl_getaddrinfo(),
+ * when using ares, is completed either successfully or with failure.
+ */
+static void query_completed_cb(void *arg,  /* (struct connectdata *) */
+                               int status,
+#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
+                               int timeouts,
+#endif
+                               struct hostent *hostent)
+{
+  struct connectdata *conn = (struct connectdata *)arg;
+  struct ResolverResults *res;
+
+#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
+  (void)timeouts; /* ignored */
+#endif
+
+  if(ARES_EDESTRUCTION == status)
+    /* when this ares handle is getting destroyed, the 'arg' pointer may not
+       be valid so only defer it when we know the 'status' says its fine! */
+    return;
+
+  res = (struct ResolverResults *)conn->async.os_specific;
+  res->num_pending--;
+
+  if(CURL_ASYNC_SUCCESS == status) {
+    Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port);
+    if(ai) {
+      compound_results(res, ai);
+    }
+  }
+  /* A successful result overwrites any previous error */
+  if(res->last_status != ARES_SUCCESS)
+    res->last_status = status;
+}
+
+/*
+ * Curl_resolver_getaddrinfo() - when using ares
+ *
+ * Returns name information about the given hostname and port number. If
+ * successful, the 'hostent' is returned and the forth argument will point to
+ * memory we need to free after use. That memory *MUST* be freed with
+ * Curl_freeaddrinfo(), nothing else.
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+                                         const char *hostname,
+                                         int port,
+                                         int *waitp)
+{
+  char *bufp;
+  struct SessionHandle *data = conn->data;
+  struct in_addr in;
+  int family = PF_INET;
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+  struct in6_addr in6;
+#endif /* CURLRES_IPV6 */
+
+  *waitp = 0; /* default to synchronous response */
+
+  /* First check if this is an IPv4 address string */
+  if(Curl_inet_pton(AF_INET, hostname, &in) > 0) {
+    /* This is a dotted IP address 123.123.123.123-style */
+    return Curl_ip2addr(AF_INET, &in, hostname, port);
+  }
+
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+  /* Otherwise, check if this is an IPv6 address string */
+  if(Curl_inet_pton (AF_INET6, hostname, &in6) > 0)
+    /* This must be an IPv6 address literal.  */
+    return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+
+  switch(conn->ip_version) {
+  default:
+#if ARES_VERSION >= 0x010601
+    family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
+                           c-ares versions this just falls through and defaults
+                           to PF_INET */
+    break;
+#endif
+  case CURL_IPRESOLVE_V4:
+    family = PF_INET;
+    break;
+  case CURL_IPRESOLVE_V6:
+    family = PF_INET6;
+    break;
+  }
+#endif /* CURLRES_IPV6 */
+
+  bufp = strdup(hostname);
+  if(bufp) {
+    struct ResolverResults *res = NULL;
+    Curl_safefree(conn->async.hostname);
+    conn->async.hostname = bufp;
+    conn->async.port = port;
+    conn->async.done = FALSE;   /* not done */
+    conn->async.status = 0;     /* clear */
+    conn->async.dns = NULL;     /* clear */
+    res = calloc(sizeof(struct ResolverResults),1);
+    if(!res) {
+      Curl_safefree(conn->async.hostname);
+      conn->async.hostname = NULL;
+      return NULL;
+    }
+    conn->async.os_specific = res;
+
+    /* initial status - failed */
+    res->last_status = ARES_ENOTFOUND;
+#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
+    if(family == PF_UNSPEC) {
+      if(Curl_ipv6works()) {
+        res->num_pending = 2;
+
+        /* areschannel is already setup in the Curl_open() function */
+        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+                            PF_INET, query_completed_cb, conn);
+        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+                            PF_INET6, query_completed_cb, conn);
+      }
+      else {
+        res->num_pending = 1;
+
+        /* areschannel is already setup in the Curl_open() function */
+        ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+                            PF_INET, query_completed_cb, conn);
+      }
+    }
+    else
+#endif /* CURLRES_IPV6 */
+    {
+      res->num_pending = 1;
+
+      /* areschannel is already setup in the Curl_open() function */
+      ares_gethostbyname((ares_channel)data->state.resolver, hostname, family,
+                         query_completed_cb, conn);
+    }
+
+    *waitp = 1; /* expect asynchronous response */
+  }
+  return NULL; /* no struct yet */
+}
+
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+                              char *servers)
+{
+  CURLcode result = CURLE_NOT_BUILT_IN;
+  int ares_result;
+
+  /* If server is NULL or empty, this would purge all DNS servers
+   * from ares library, which will cause any and all queries to fail.
+   * So, just return OK if none are configured and don't actually make
+   * any changes to c-ares.  This lets c-ares use it's defaults, which
+   * it gets from the OS (for instance from /etc/resolv.conf on Linux).
+   */
+  if(!(servers && servers[0]))
+    return CURLE_OK;
+
+#if (ARES_VERSION >= 0x010704)
+  ares_result = ares_set_servers_csv(data->state.resolver, servers);
+  switch(ares_result) {
+  case ARES_SUCCESS:
+    result = CURLE_OK;
+    break;
+  case ARES_ENOMEM:
+    result = CURLE_OUT_OF_MEMORY;
+    break;
+  case ARES_ENOTINITIALIZED:
+  case ARES_ENODATA:
+  case ARES_EBADSTR:
+  default:
+    result = CURLE_BAD_FUNCTION_ARGUMENT;
+    break;
+  }
+#else /* too old c-ares version! */
+  (void)data;
+  (void)(ares_result);
+#endif
+  return result;
+}
+#endif /* CURLRES_ARES */
similarity index 63%
rename from lib/hostthre.c
rename to lib/asyn-thread.c
index d45a899..66fb510 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #if defined(USE_THREADS_POSIX)
 #define in_addr_t unsigned long
 #endif
 
+#ifdef HAVE_GETADDRINFO
+#  define RESOLVER_ENOMEM  EAI_MEMORY
+#else
+#  define RESOLVER_ENOMEM  ENOMEM
+#endif
+
 #include "urldata.h"
 #include "sendf.h"
 #include "hostip.h"
  **********************************************************************/
 #ifdef CURLRES_THREADED
 
+/*
+ * Curl_resolver_global_init()
+ * Called from curl_global_init() to initialize global resolver environment.
+ * Does nothing here.
+ */
+int Curl_resolver_global_init(void)
+{
+  return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_global_cleanup()
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ * Does nothing here.
+ */
+void Curl_resolver_global_cleanup(void)
+{
+}
+
+/*
+ * Curl_resolver_init()
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Does nothing here.
+ */
+CURLcode Curl_resolver_init(void **resolver)
+{
+  (void)resolver;
+  return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_cleanup()
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Does nothing here.
+ */
+void Curl_resolver_cleanup(void *resolver)
+{
+  (void)resolver;
+}
+
+/*
+ * Curl_resolver_duphandle()
+ * Called from curl_easy_duphandle() to duplicate resolver URL state-specific
+ * environment ('resolver' member of the UrlState structure).  Does nothing
+ * here.
+ */
+int Curl_resolver_duphandle(void **to, void *from)
+{
+  (void)to;
+  (void)from;
+  return CURLE_OK;
+}
+
+static void destroy_async_data(struct Curl_async *);
+
+/*
+ * Cancel all possibly still on-going resolves for this connection.
+ */
+void Curl_resolver_cancel(struct connectdata *conn)
+{
+  destroy_async_data(&conn->async);
+}
+
 /* This function is used to init a threaded resolve */
 static bool init_resolve_thread(struct connectdata *conn,
                                 const char *hostname, int port,
@@ -111,13 +169,12 @@ struct thread_sync_data {
 
 struct thread_data {
   curl_thread_t thread_hnd;
-  curl_socket_t dummy_sock;
   unsigned int poll_interval;
-  int interval_end;
+  long interval_end;
   struct thread_sync_data tsd;
 };
 
-static struct thread_sync_data * conn_thread_sync_data(struct connectdata *conn)
+static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn)
 {
   return &(((struct thread_data *)conn->async.os_specific)->tsd);
 }
@@ -128,7 +185,7 @@ static struct thread_sync_data * conn_thread_sync_data(struct connectdata *conn)
 static
 void destroy_thread_sync_data(struct thread_sync_data * tsd)
 {
-  if (tsd->mtx) {
+  if(tsd->mtx) {
     Curl_mutex_destroy(tsd->mtx);
     free(tsd->mtx);
   }
@@ -136,7 +193,7 @@ void destroy_thread_sync_data(struct thread_sync_data * tsd)
   if(tsd->hostname)
     free(tsd->hostname);
 
-  if (tsd->res)
+  if(tsd->res)
     Curl_freeaddrinfo(tsd->res);
 
   memset(tsd,0,sizeof(*tsd));
@@ -160,7 +217,8 @@ int init_thread_sync_data(struct thread_sync_data * tsd,
 #endif
 
   tsd->mtx = malloc(sizeof(curl_mutex_t));
-  if (tsd->mtx == NULL) goto err_exit;
+  if(tsd->mtx == NULL)
+    goto err_exit;
 
   Curl_mutex_init(tsd->mtx);
 
@@ -170,7 +228,8 @@ int init_thread_sync_data(struct thread_sync_data * tsd,
    * thread during gethostbyname execution.
    */
   tsd->hostname = strdup(hostname);
-  if (!tsd->hostname) goto err_exit;
+  if(!tsd->hostname)
+    goto err_exit;
 
   return 1;
 
@@ -186,9 +245,9 @@ static int getaddrinfo_complete(struct connectdata *conn)
   int rc;
 
   rc = Curl_addrinfo_callback(conn, tsd->sock_error, tsd->res);
-  /* The tsd->res structure has been copied to async.dns and perhaps the DNS cache.
-     Set our copy to NULL so destroy_thread_sync_data doesn't free it.
-   */
+  /* The tsd->res structure has been copied to async.dns and perhaps the DNS
+     cache.  Set our copy to NULL so destroy_thread_sync_data doesn't free it.
+  */
   tsd->res = NULL;
 
   return rc;
@@ -213,10 +272,10 @@ static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg)
 
   rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res);
 
-  if (rc != 0) {
-    tsd->sock_error = SOCKERRNO;
-    if (tsd->sock_error == 0)
-      tsd->sock_error = ENOMEM;
+  if(rc != 0) {
+    tsd->sock_error = SOCKERRNO?SOCKERRNO:rc;
+    if(tsd->sock_error == 0)
+      tsd->sock_error = RESOLVER_ENOMEM;
   }
 
   Curl_mutex_acquire(tsd->mtx);
@@ -237,10 +296,10 @@ static unsigned int CURL_STDCALL gethostbyname_thread (void *arg)
 
   tsd->res = Curl_ipv4_resolve_r(tsd->hostname, tsd->port);
 
-  if (!tsd->res) {
+  if(!tsd->res) {
     tsd->sock_error = SOCKERRNO;
-    if (tsd->sock_error == 0)
-      tsd->sock_error = ENOMEM;
+    if(tsd->sock_error == 0)
+      tsd->sock_error = RESOLVER_ENOMEM;
   }
 
   Curl_mutex_acquire(tsd->mtx);
@@ -253,10 +312,9 @@ static unsigned int CURL_STDCALL gethostbyname_thread (void *arg)
 #endif /* HAVE_GETADDRINFO */
 
 /*
- * Curl_destroy_thread_data() cleans up async resolver data and thread handle.
- * Complementary of ares_destroy.
+ * destroy_async_data() cleans up async resolver data and thread handle.
  */
-void Curl_destroy_thread_data (struct Curl_async *async)
+static void destroy_async_data (struct Curl_async *async)
 {
   if(async->hostname)
     free(async->hostname);
@@ -264,10 +322,7 @@ void Curl_destroy_thread_data (struct Curl_async *async)
   if(async->os_specific) {
     struct thread_data *td = (struct thread_data*) async->os_specific;
 
-    if (td->dummy_sock != CURL_SOCKET_BAD)
-      sclose(td->dummy_sock);
-
-    if (td->thread_hnd != curl_thread_t_null)
+    if(td->thread_hnd != curl_thread_t_null)
       Curl_thread_join(&td->thread_hnd);
 
     destroy_thread_sync_data(&td->tsd);
@@ -289,7 +344,7 @@ static bool init_resolve_thread (struct connectdata *conn,
                                  const struct addrinfo *hints)
 {
   struct thread_data *td = calloc(1, sizeof(struct thread_data));
-  int err = ENOMEM;
+  int err = RESOLVER_ENOMEM;
 
   conn->async.os_specific = (void*) td;
   if(!td)
@@ -299,10 +354,9 @@ static bool init_resolve_thread (struct connectdata *conn,
   conn->async.done = FALSE;
   conn->async.status = 0;
   conn->async.dns = NULL;
-  td->dummy_sock = CURL_SOCKET_BAD;
   td->thread_hnd = curl_thread_t_null;
 
-  if (!init_thread_sync_data(&td->tsd, hostname, port, hints))
+  if(!init_thread_sync_data(&td->tsd, hostname, port, hints))
     goto err_exit;
 
   Curl_safefree(conn->async.hostname);
@@ -310,16 +364,6 @@ static bool init_resolve_thread (struct connectdata *conn,
   if(!conn->async.hostname)
     goto err_exit;
 
-#ifdef WIN32
-  /* This socket is only to keep Curl_resolv_fdset() and select() happy;
-   * should never become signalled for read since it's unbound but
-   * Windows needs at least 1 socket in select().
-   */
-  td->dummy_sock = socket(AF_INET, SOCK_DGRAM, 0);
-  if (td->dummy_sock == CURL_SOCKET_BAD)
-    goto err_exit;
-#endif
-
 #ifdef HAVE_GETADDRINFO
   td->thread_hnd = Curl_thread_create(getaddrinfo_thread, &td->tsd);
 #else
@@ -336,57 +380,70 @@ static bool init_resolve_thread (struct connectdata *conn,
   return TRUE;
 
  err_exit:
-  Curl_destroy_thread_data(&conn->async);
+  destroy_async_data(&conn->async);
 
   SET_ERRNO(err);
 
   return FALSE;
 }
 
+/*
+ * resolver_error() calls failf() with the appropriate message after a resolve
+ * error
+ */
+
+static CURLcode resolver_error(struct connectdata *conn)
+{
+  const char *host_or_proxy;
+  CURLcode rc;
+  if(conn->bits.httpproxy) {
+    host_or_proxy = "proxy";
+    rc = CURLE_COULDNT_RESOLVE_PROXY;
+  }
+  else {
+    host_or_proxy = "host";
+    rc = CURLE_COULDNT_RESOLVE_HOST;
+  }
+
+  failf(conn->data, "Could not resolve %s: %s", host_or_proxy,
+        conn->async.hostname);
+  return rc;
+}
 
 /*
- * Curl_wait_for_resolv() waits for a resolve to finish. This function should
- * be avoided since using this risk getting the multi interface to "hang".
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
  *
  * If 'entry' is non-NULL, make it point to the resolved dns entry
  *
  * This is the version for resolves-in-a-thread.
  */
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
-                              struct Curl_dns_entry **entry)
+CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+                                   struct Curl_dns_entry **entry)
 {
   struct thread_data   *td = (struct thread_data*) conn->async.os_specific;
-  struct SessionHandle *data = conn->data;
   CURLcode rc = CURLE_OK;
 
   DEBUGASSERT(conn && td);
 
   /* wait for the thread to resolve the name */
-  if (Curl_thread_join(&td->thread_hnd)) {
+  if(Curl_thread_join(&td->thread_hnd))
     rc = getaddrinfo_complete(conn);
-  } else {
+  else
     DEBUGASSERT(0);
-  }
 
   conn->async.done = TRUE;
 
   if(entry)
     *entry = conn->async.dns;
 
-  if(!conn->async.dns) {
-    /* a name was not resolved */
-    if (conn->bits.httpproxy) {
-      failf(data, "Could not resolve proxy: %s; %s",
-            conn->async.hostname, Curl_strerror(conn, conn->async.status));
-      rc = CURLE_COULDNT_RESOLVE_PROXY;
-    } else {
-      failf(data, "Could not resolve host: %s; %s",
-            conn->async.hostname, Curl_strerror(conn, conn->async.status));
-      rc = CURLE_COULDNT_RESOLVE_HOST;
-    }
-  }
+  if(!conn->async.dns)
+    /* a name was not resolved, report error */
+    rc = resolver_error(conn);
 
-  Curl_destroy_thread_data(&conn->async);
+  destroy_async_data(&conn->async);
 
   if(!conn->async.dns)
     conn->bits.close = TRUE;
@@ -395,12 +452,12 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
 }
 
 /*
- * Curl_is_resolved() is called repeatedly to check if a previous name resolve
- * request has completed. It should also make sure to time-out if the
- * operation seems to take too long.
+ * Curl_resolver_is_resolved() is called repeatedly to check if a previous
+ * name resolve request has completed. It should also make sure to time-out if
+ * the operation seems to take too long.
  */
-CURLcode Curl_is_resolved(struct connectdata *conn,
-                          struct Curl_dns_entry **entry)
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+                                   struct Curl_dns_entry **entry)
 {
   struct SessionHandle *data = conn->data;
   struct thread_data   *td = (struct thread_data*) conn->async.os_specific;
@@ -408,7 +465,7 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
 
   *entry = NULL;
 
-  if (!td) {
+  if(!td) {
     DEBUGASSERT(td);
     return CURLE_COULDNT_RESOLVE_HOST;
   }
@@ -417,30 +474,31 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
   done = td->tsd.done;
   Curl_mutex_release(td->tsd.mtx);
 
-  if (done) {
+  if(done) {
     getaddrinfo_complete(conn);
-    Curl_destroy_thread_data(&conn->async);
 
     if(!conn->async.dns) {
-      failf(data, "Could not resolve host: %s; %s",
-            conn->host.name, Curl_strerror(conn, conn->async.status));
-      return CURLE_COULDNT_RESOLVE_HOST;
+      CURLcode rc = resolver_error(conn);
+      destroy_async_data(&conn->async);
+      return rc;
     }
+    destroy_async_data(&conn->async);
     *entry = conn->async.dns;
-  } else {
+  }
+  else {
     /* poll for name lookup done with exponential backoff up to 250ms */
-    int elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle);
-    if (elapsed < 0)
+    long elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle);
+    if(elapsed < 0)
       elapsed = 0;
 
-    if (td->poll_interval == 0)
+    if(td->poll_interval == 0)
       /* Start at 1ms poll interval */
       td->poll_interval = 1;
-    else if (elapsed >= td->interval_end)
+    else if(elapsed >= td->interval_end)
       /* Back-off exponentially if last interval expired  */
       td->poll_interval *= 2;
 
-    if (td->poll_interval > 250)
+    if(td->poll_interval > 250)
       td->poll_interval = 250;
 
     td->interval_end = elapsed + td->poll_interval;
@@ -450,21 +508,13 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
   return CURLE_OK;
 }
 
-int Curl_resolv_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
-                        int numsocks)
+int Curl_resolver_getsock(struct connectdata *conn,
+                          curl_socket_t *socks,
+                          int numsocks)
 {
-  const struct thread_data *td =
-    (const struct thread_data *) conn->async.os_specific;
-
-  if(td && td->dummy_sock != CURL_SOCKET_BAD) {
-    if(numsocks) {
-      /* return one socket waiting for readable, even though this is just
-         a dummy */
-      socks[0] = td->dummy_sock;
-      return GETSOCK_READSOCK(0);
-    }
-  }
+  (void)conn;
+  (void)socks;
+  (void)numsocks;
   return 0;
 }
 
@@ -472,10 +522,10 @@ int Curl_resolv_getsock(struct connectdata *conn,
 /*
  * Curl_getaddrinfo() - for platforms without getaddrinfo
  */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
-                                const char *hostname,
-                                int port,
-                                int *waitp)
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+                                         const char *hostname,
+                                         int port,
+                                         int *waitp)
 {
   struct in_addr in;
 
@@ -498,23 +548,36 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
 #else /* !HAVE_GETADDRINFO */
 
 /*
- * Curl_getaddrinfo() - for getaddrinfo
+ * Curl_resolver_getaddrinfo() - for getaddrinfo
  */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
-                                const char *hostname,
-                                int port,
-                                int *waitp)
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+                                         const char *hostname,
+                                         int port,
+                                         int *waitp)
 {
   struct addrinfo hints;
+  struct in_addr in;
   Curl_addrinfo *res;
   int error;
   char sbuf[NI_MAXSERV];
   int pf = PF_INET;
-  struct SessionHandle *data = conn->data;
+#ifdef CURLRES_IPV6
+  struct in6_addr in6;
+#endif /* CURLRES_IPV6 */
 
   *waitp = 0; /* default to synchronous response */
 
-#ifndef CURLRES_IPV4
+  /* First check if this is an IPv4 address string */
+  if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
+    /* This is a dotted IP address 123.123.123.123-style */
+    return Curl_ip2addr(AF_INET, &in, hostname, port);
+
+#ifdef CURLRES_IPV6
+  /* check if this is an IPv6 address string */
+  if(Curl_inet_pton (AF_INET6, hostname, &in6) > 0)
+    /* This is an IPv6 address literal */
+    return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+
   /*
    * Check if a limited name resolve has been requested.
    */
@@ -530,24 +593,11 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
     break;
   }
 
-  if (pf != PF_INET) {
-    /* see if we have an IPv6 stack */
-    curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
-    if(s == CURL_SOCKET_BAD) {
-      /* Some non-IPv6 stacks have been found to make very slow name resolves
-       * when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
-       * the stack seems to be a non-ipv6 one. */
+  if((pf != PF_INET) && !Curl_ipv6works())
+    /* the stack seems to be a non-ipv6 one */
+    pf = PF_INET;
 
-      pf = PF_INET;
-    }
-    else {
-      /* This seems to be an IPv6-capable stack, use PF_UNSPEC for the widest
-       * possible checks. And close the socket again.
-       */
-      sclose(s);
-    }
-  }
-#endif /* !CURLRES_IPV4 */
+#endif /* CURLRES_IPV6 */
 
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = pf;
@@ -562,12 +612,12 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
   }
 
   /* fall-back to blocking version */
-  infof(data, "init_resolve_thread() failed for %s; %s\n",
+  infof(conn->data, "init_resolve_thread() failed for %s; %s\n",
         hostname, Curl_strerror(conn, ERRNO));
 
   error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res);
   if(error) {
-    infof(data, "getaddrinfo() failed for %s:%d; %s\n",
+    infof(conn->data, "getaddrinfo() failed for %s:%d; %s\n",
           hostname, port, Curl_strerror(conn, SOCKERRNO));
     return NULL;
   }
@@ -576,4 +626,13 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
 
 #endif /* !HAVE_GETADDRINFO */
 
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+                              char *servers)
+{
+  (void)data;
+  (void)servers;
+  return CURLE_NOT_BUILT_IN;
+
+}
+
 #endif /* CURLRES_THREADED */
diff --git a/lib/asyn.h b/lib/asyn.h
new file mode 100644 (file)
index 0000000..1b681ea
--- /dev/null
@@ -0,0 +1,168 @@
+#ifndef HEADER_CURL_ASYN_H
+#define HEADER_CURL_ASYN_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+#include "curl_addrinfo.h"
+
+struct addrinfo;
+struct hostent;
+struct SessionHandle;
+struct connectdata;
+struct Curl_dns_entry;
+
+/*
+ * This header defines all functions in the internal asynch resolver interface.
+ * All asynch resolvers need to provide these functions.
+ * asyn-ares.c and asyn-thread.c are the current implementations of asynch
+ * resolver backends.
+ */
+
+/*
+ * Curl_resolver_global_init()
+ *
+ * Called from curl_global_init() to initialize global resolver environment.
+ * Returning anything else than CURLE_OK fails curl_global_init().
+ */
+int Curl_resolver_global_init(void);
+
+/*
+ * Curl_resolver_global_cleanup()
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ */
+void Curl_resolver_global_cleanup(void);
+
+/*
+ * Curl_resolver_init()
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Should fill the passed pointer by the initialized handler.
+ * Returning anything else than CURLE_OK fails curl_easy_init() with the
+ * correspondent code.
+ */
+CURLcode Curl_resolver_init(void **resolver);
+
+/*
+ * Curl_resolver_cleanup()
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure).  Should destroy the handler and free all resources connected to
+ * it.
+ */
+void Curl_resolver_cleanup(void *resolver);
+
+/*
+ * Curl_resolver_duphandle()
+ * Called from curl_easy_duphandle() to duplicate resolver URL-state specific
+ * environment ('resolver' member of the UrlState structure).  Should
+ * duplicate the 'from' handle and pass the resulting handle to the 'to'
+ * pointer.  Returning anything else than CURLE_OK causes failed
+ * curl_easy_duphandle() call.
+ */
+int Curl_resolver_duphandle(void **to, void *from);
+
+/*
+ * Curl_resolver_cancel().
+ *
+ * It is called from inside other functions to cancel currently performing
+ * resolver request. Should also free any temporary resources allocated to
+ * perform a request.
+ */
+void Curl_resolver_cancel(struct connectdata *conn);
+
+/* Curl_resolver_getsock()
+ *
+ * This function is called from the multi_getsock() function.  'sock' is a
+ * pointer to an array to hold the file descriptors, with 'numsock' being the
+ * size of that array (in number of entries). This function is supposed to
+ * return bitmask indicating what file descriptors (referring to array indexes
+ * in the 'sock' array) to wait for, read/write.
+ */
+int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *sock,
+                          int numsocks);
+
+/*
+ * Curl_resolver_is_resolved()
+ *
+ * Called repeatedly to check if a previous name resolve request has
+ * completed. It should also make sure to time-out if the operation seems to
+ * take too long.
+ *
+ * Returns normal CURLcode errors.
+ */
+CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
+                                   struct Curl_dns_entry **dns);
+
+/*
+ * Curl_resolver_wait_resolv()
+ *
+ * waits for a resolve to finish. This function should be avoided since using
+ * this risk getting the multi interface to "hang".
+ *
+ * If 'entry' is non-NULL, make it point to the resolved dns entry
+ *
+ * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
+ * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
+
+ */
+CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+                                   struct Curl_dns_entry **dnsentry);
+
+/*
+ * Curl_resolver_getaddrinfo() - when using this resolver
+ *
+ * Returns name information about the given hostname and port number. If
+ * successful, the 'hostent' is returned and the forth argument will point to
+ * memory we need to free after use. That memory *MUST* be freed with
+ * Curl_freeaddrinfo(), nothing else.
+ *
+ * Each resolver backend must of course make sure to return data in the
+ * correct format to comply with this.
+ */
+Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
+                                         const char *hostname,
+                                         int port,
+                                         int *waitp);
+
+#ifndef CURLRES_ASYNCH
+/* convert these functions if an asynch resolver isn't used */
+#define Curl_resolver_cancel(x) Curl_nop_stmt
+#define Curl_resolver_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST
+#define Curl_resolver_wait_resolv(x,y) CURLE_COULDNT_RESOLVE_HOST
+#define Curl_resolver_getsock(x,y,z) 0
+#define Curl_resolver_duphandle(x,y) CURLE_OK
+#define Curl_resolver_init(x) CURLE_OK
+#define Curl_resolver_global_init() CURLE_OK
+#define Curl_resolver_global_cleanup() Curl_nop_stmt
+#define Curl_resolver_cleanup(x) Curl_nop_stmt
+#endif
+
+#ifdef CURLRES_ASYNCH
+#define Curl_resolver_asynch() 1
+#else
+#define Curl_resolver_asynch() 0
+#endif
+
+
+/********** end of generic resolver interface functions *****************/
+#endif /* HEADER_CURL_ASYN_H */
diff --git a/lib/axtls.c b/lib/axtls.c
new file mode 100644 (file)
index 0000000..44e6b93
--- /dev/null
@@ -0,0 +1,661 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, DirecTV
+ * contact: Eric Hu <ehu@directv.com>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all axTLS-specific code for the TLS/SSL layer. No code
+ * but sslgen.c should ever call or use these functions.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_AXTLS
+#include <axTLS/ssl.h>
+#include "axtls.h"
+
+#include "sendf.h"
+#include "inet_pton.h"
+#include "sslgen.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+#include "curl_memory.h"
+#include <unistd.h>
+/* The last #include file should be: */
+#include "memdebug.h"
+#include "hostcheck.h"
+
+
+/* Global axTLS init, called from Curl_ssl_init() */
+int Curl_axtls_init(void)
+{
+/* axTLS has no global init.  Everything is done through SSL and SSL_CTX
+ * structs stored in connectdata structure.  Perhaps can move to axtls.h.
+ */
+  return 1;
+}
+
+int Curl_axtls_cleanup(void)
+{
+  /* axTLS has no global cleanup.  Perhaps can move this to axtls.h. */
+  return 1;
+}
+
+static CURLcode map_error_to_curl(int axtls_err)
+{
+  switch (axtls_err) {
+  case SSL_ERROR_NOT_SUPPORTED:
+  case SSL_ERROR_INVALID_VERSION:
+  case -70:                       /* protocol version alert from server */
+    return CURLE_UNSUPPORTED_PROTOCOL;
+    break;
+  case SSL_ERROR_NO_CIPHER:
+    return CURLE_SSL_CIPHER;
+    break;
+  case SSL_ERROR_BAD_CERTIFICATE: /* this may be bad server cert too */
+  case SSL_ERROR_NO_CERT_DEFINED:
+  case -42:                       /* bad certificate alert from server */
+  case -43:                       /* unsupported cert alert from server */
+  case -44:                       /* cert revoked alert from server */
+  case -45:                       /* cert expired alert from server */
+  case -46:                       /* cert unknown alert from server */
+    return CURLE_SSL_CERTPROBLEM;
+    break;
+  case SSL_X509_ERROR(X509_NOT_OK):
+  case SSL_X509_ERROR(X509_VFY_ERROR_NO_TRUSTED_CERT):
+  case SSL_X509_ERROR(X509_VFY_ERROR_BAD_SIGNATURE):
+  case SSL_X509_ERROR(X509_VFY_ERROR_NOT_YET_VALID):
+  case SSL_X509_ERROR(X509_VFY_ERROR_EXPIRED):
+  case SSL_X509_ERROR(X509_VFY_ERROR_SELF_SIGNED):
+  case SSL_X509_ERROR(X509_VFY_ERROR_INVALID_CHAIN):
+  case SSL_X509_ERROR(X509_VFY_ERROR_UNSUPPORTED_DIGEST):
+  case SSL_X509_ERROR(X509_INVALID_PRIV_KEY):
+    return CURLE_PEER_FAILED_VERIFICATION;
+    break;
+  case -48:                       /* unknown ca alert from server */
+    return CURLE_SSL_CACERT;
+    break;
+  case -49:                       /* access denied alert from server */
+    return CURLE_REMOTE_ACCESS_DENIED;
+    break;
+  case SSL_ERROR_CONN_LOST:
+  case SSL_ERROR_SOCK_SETUP_FAILURE:
+  case SSL_ERROR_INVALID_HANDSHAKE:
+  case SSL_ERROR_INVALID_PROT_MSG:
+  case SSL_ERROR_INVALID_HMAC:
+  case SSL_ERROR_INVALID_SESSION:
+  case SSL_ERROR_INVALID_KEY:     /* it's too bad this doesn't map better */
+  case SSL_ERROR_FINISHED_INVALID:
+  case SSL_ERROR_NO_CLIENT_RENOG:
+  default:
+    return CURLE_SSL_CONNECT_ERROR;
+    break;
+  }
+}
+
+static Curl_recv axtls_recv;
+static Curl_send axtls_send;
+
+static void free_ssl_structs(struct ssl_connect_data *connssl)
+{
+  if(connssl->ssl) {
+    ssl_free (connssl->ssl);
+    connssl->ssl = NULL;
+  }
+  if(connssl->ssl_ctx) {
+    ssl_ctx_free(connssl->ssl_ctx);
+    connssl->ssl_ctx = NULL;
+  }
+}
+
+/*
+ * For both blocking and non-blocking connects, this function sets up the
+ * ssl context and state.  This function is called after the TCP connect
+ * has completed.
+ */
+static CURLcode connect_prep(struct connectdata *conn, int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  SSL_CTX *ssl_ctx;
+  SSL *ssl = NULL;
+  int cert_types[] = {SSL_OBJ_X509_CERT, SSL_OBJ_PKCS12, 0};
+  int key_types[] = {SSL_OBJ_RSA_KEY, SSL_OBJ_PKCS8, SSL_OBJ_PKCS12, 0};
+  int i, ssl_fcn_return;
+  const uint8_t *ssl_sessionid;
+  size_t ssl_idsize;
+
+  /* Assuming users will not compile in custom key/cert to axTLS.
+  *  Also, even for blocking connects, use axTLS non-blocking feature.
+  */
+  uint32_t client_option = SSL_NO_DEFAULT_KEY |
+    SSL_SERVER_VERIFY_LATER |
+    SSL_CONNECT_IN_PARTS;
+
+  if(conn->ssl[sockindex].state == ssl_connection_complete)
+    /* to make us tolerant against being called more than once for the
+       same connection */
+    return CURLE_OK;
+
+  /* axTLS only supports TLSv1 */
+  /* check to see if we've been told to use an explicit SSL/TLS version */
+  switch(data->set.ssl.version) {
+  case CURL_SSLVERSION_DEFAULT:
+  case CURL_SSLVERSION_TLSv1:
+    break;
+  default:
+    failf(data, "axTLS only supports TLSv1");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+#ifdef  AXTLSDEBUG
+  client_option |= SSL_DISPLAY_STATES | SSL_DISPLAY_RSA | SSL_DISPLAY_CERTS;
+#endif /* AXTLSDEBUG */
+
+  /* Allocate an SSL_CTX struct */
+  ssl_ctx = ssl_ctx_new(client_option, SSL_DEFAULT_CLNT_SESS);
+  if(ssl_ctx == NULL) {
+    failf(data, "unable to create client SSL context");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  conn->ssl[sockindex].ssl_ctx = ssl_ctx;
+  conn->ssl[sockindex].ssl = NULL;
+
+  /* Load the trusted CA cert bundle file */
+  if(data->set.ssl.CAfile) {
+    if(ssl_obj_load(ssl_ctx, SSL_OBJ_X509_CACERT, data->set.ssl.CAfile, NULL)
+       != SSL_OK) {
+      infof(data, "error reading ca cert file %s \n",
+            data->set.ssl.CAfile);
+      if(data->set.ssl.verifypeer) {
+        return CURLE_SSL_CACERT_BADFILE;
+      }
+    }
+    else
+      infof(data, "found certificates in %s\n", data->set.ssl.CAfile);
+  }
+
+  /* gtls.c tasks we're skipping for now:
+   * 1) certificate revocation list checking
+   * 2) dns name assignment to host
+   * 3) set protocol priority.  axTLS is TLSv1 only, so can probably ignore
+   * 4) set certificate priority.  axTLS ignores type and sends certs in
+   *  order added.  can probably ignore this.
+   */
+
+  /* Load client certificate */
+  if(data->set.str[STRING_CERT]) {
+    i=0;
+    /* Instead of trying to analyze cert type here, let axTLS try them all. */
+    while(cert_types[i] != 0) {
+      ssl_fcn_return = ssl_obj_load(ssl_ctx, cert_types[i],
+                                    data->set.str[STRING_CERT], NULL);
+      if(ssl_fcn_return == SSL_OK) {
+        infof(data, "successfully read cert file %s \n",
+              data->set.str[STRING_CERT]);
+        break;
+      }
+      i++;
+    }
+    /* Tried all cert types, none worked. */
+    if(cert_types[i] == 0) {
+      failf(data, "%s is not x509 or pkcs12 format",
+            data->set.str[STRING_CERT]);
+      return CURLE_SSL_CERTPROBLEM;
+    }
+  }
+
+  /* Load client key.
+     If a pkcs12 file successfully loaded a cert, then there's nothing to do
+     because the key has already been loaded. */
+  if(data->set.str[STRING_KEY] && cert_types[i] != SSL_OBJ_PKCS12) {
+    i=0;
+    /* Instead of trying to analyze key type here, let axTLS try them all. */
+    while(key_types[i] != 0) {
+      ssl_fcn_return = ssl_obj_load(ssl_ctx, key_types[i],
+                                    data->set.str[STRING_KEY], NULL);
+      if(ssl_fcn_return == SSL_OK) {
+        infof(data, "successfully read key file %s \n",
+              data->set.str[STRING_KEY]);
+        break;
+      }
+      i++;
+    }
+    /* Tried all key types, none worked. */
+    if(key_types[i] == 0) {
+      failf(data, "Failure: %s is not a supported key file",
+            data->set.str[STRING_KEY]);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+
+  /* gtls.c does more here that is being left out for now
+   * 1) set session credentials.  can probably ignore since axtls puts this
+   *    info in the ssl_ctx struct
+   * 2) setting up callbacks.  these seem gnutls specific
+   */
+
+  /* In axTLS, handshaking happens inside ssl_client_new. */
+  if(!Curl_ssl_getsessionid(conn, (void **) &ssl_sessionid, &ssl_idsize)) {
+    /* we got a session id, use it! */
+    infof (data, "SSL re-using session ID\n");
+    ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex],
+                         ssl_sessionid, (uint8_t)ssl_idsize);
+  }
+  else
+    ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], NULL, 0);
+
+  conn->ssl[sockindex].ssl = ssl;
+  return CURLE_OK;
+}
+
+/*
+ * For both blocking and non-blocking connects, this function finalizes the
+ * SSL connection.
+ */
+static CURLcode connect_finish(struct connectdata *conn, int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  SSL *ssl = conn->ssl[sockindex].ssl;
+  const uint8_t *ssl_sessionid;
+  size_t ssl_idsize;
+  const char *peer_CN;
+  uint32_t dns_altname_index;
+  const char *dns_altname;
+  int8_t found_subject_alt_names = 0;
+  int8_t found_subject_alt_name_matching_conn = 0;
+
+  /* Here, gtls.c gets the peer certificates and fails out depending on
+   * settings in "data."  axTLS api doesn't have get cert chain fcn, so omit?
+   */
+
+  /* Verify server's certificate */
+  if(data->set.ssl.verifypeer) {
+    if(ssl_verify_cert(ssl) != SSL_OK) {
+      Curl_axtls_close(conn, sockindex);
+      failf(data, "server cert verify failed");
+      return CURLE_PEER_FAILED_VERIFICATION;
+    }
+  }
+  else
+    infof(data, "\t server certificate verification SKIPPED\n");
+
+  /* Here, gtls.c does issuer verification. axTLS has no straightforward
+   * equivalent, so omitting for now.*/
+
+  /* Here, gtls.c does the following
+   * 1) x509 hostname checking per RFC2818.  axTLS doesn't support this, but
+   *    it seems useful. This is now implemented, by Oscar Koeroo
+   * 2) checks cert validity based on time.  axTLS does this in ssl_verify_cert
+   * 3) displays a bunch of cert information.  axTLS doesn't support most of
+   *    this, but a couple fields are available.
+   */
+
+  /* There is no (DNS) Altnames count in the version 1.4.8 API. There is a
+     risk of an inifite loop */
+  for(dns_altname_index = 0; ; dns_altname_index++) {
+    dns_altname = ssl_get_cert_subject_alt_dnsname(ssl, dns_altname_index);
+    if(dns_altname == NULL) {
+      break;
+    }
+    found_subject_alt_names = 1;
+
+    infof(data, "\tComparing subject alt name DNS with hostname: %s <-> %s\n",
+          dns_altname, conn->host.name);
+    if(Curl_cert_hostcheck(dns_altname, conn->host.name)) {
+      found_subject_alt_name_matching_conn = 1;
+      break;
+    }
+  }
+
+  /* RFC2818 checks */
+  if(found_subject_alt_names && !found_subject_alt_name_matching_conn) {
+    if(data->set.ssl.verifyhost) {
+      /* Break connection ! */
+      Curl_axtls_close(conn, sockindex);
+      failf(data, "\tsubjectAltName(s) do not match %s\n",
+            conn->host.dispname);
+      return CURLE_PEER_FAILED_VERIFICATION;
+    }
+    else
+      infof(data, "\tsubjectAltName(s) do not match %s\n",
+            conn->host.dispname);
+  }
+  else if(found_subject_alt_names == 0) {
+    /* Per RFC2818, when no Subject Alt Names were available, examine the peer
+       CN as a legacy fallback */
+    peer_CN = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME);
+    if(peer_CN == NULL) {
+      if(data->set.ssl.verifyhost) {
+        Curl_axtls_close(conn, sockindex);
+        failf(data, "unable to obtain common name from peer certificate");
+        return CURLE_PEER_FAILED_VERIFICATION;
+      }
+      else
+        infof(data, "unable to obtain common name from peer certificate");
+    }
+    else {
+      if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) {
+        if(data->set.ssl.verifyhost) {
+          /* Break connection ! */
+          Curl_axtls_close(conn, sockindex);
+          failf(data, "\tcommon name \"%s\" does not match \"%s\"\n",
+                peer_CN, conn->host.dispname);
+          return CURLE_PEER_FAILED_VERIFICATION;
+        }
+        else
+          infof(data, "\tcommon name \"%s\" does not match \"%s\"\n",
+                peer_CN, conn->host.dispname);
+      }
+    }
+  }
+
+  /* General housekeeping */
+  conn->ssl[sockindex].state = ssl_connection_complete;
+  conn->recv[sockindex] = axtls_recv;
+  conn->send[sockindex] = axtls_send;
+
+  /* Put our freshly minted SSL session in cache */
+  ssl_idsize = ssl_get_session_id_size(ssl);
+  ssl_sessionid = ssl_get_session_id(ssl);
+  if(Curl_ssl_addsessionid(conn, (void *) ssl_sessionid, ssl_idsize)
+     != CURLE_OK)
+    infof (data, "failed to add session to cache\n");
+
+  return CURLE_OK;
+}
+
+/*
+ * Use axTLS's non-blocking connection feature to open an SSL connection.
+ * This is called after a TCP connection is already established.
+*/
+CURLcode Curl_axtls_connect_nonblocking(
+    struct connectdata *conn,
+    int sockindex,
+    bool *done)
+{
+  CURLcode conn_step;
+  int ssl_fcn_return;
+
+ *done = FALSE;
+  /* connectdata is calloc'd and connecting_state is only changed in this
+     function, so this is safe, as the state is effectively initialized. */
+  if(conn->ssl[sockindex].connecting_state == ssl_connect_1) {
+    conn_step = connect_prep(conn, sockindex);
+    if(conn_step != CURLE_OK) {
+      Curl_axtls_close(conn, sockindex);
+      return conn_step;
+    }
+    conn->ssl[sockindex].connecting_state = ssl_connect_2;
+  }
+
+  if(conn->ssl[sockindex].connecting_state == ssl_connect_2) {
+    /* Check to make sure handshake was ok. */
+    if(ssl_handshake_status(conn->ssl[sockindex].ssl) != SSL_OK) {
+      ssl_fcn_return = ssl_read(conn->ssl[sockindex].ssl, NULL);
+      if(ssl_fcn_return < 0) {
+        Curl_axtls_close(conn, sockindex);
+        ssl_display_error(ssl_fcn_return); /* goes to stdout. */
+        return map_error_to_curl(ssl_fcn_return);
+      }
+      else {
+        return CURLE_OK; /* Return control to caller for retries */
+      }
+    }
+    infof (conn->data, "handshake completed successfully\n");
+    conn->ssl[sockindex].connecting_state = ssl_connect_3;
+  }
+
+  if(conn->ssl[sockindex].connecting_state == ssl_connect_3) {
+    conn_step = connect_finish(conn, sockindex);
+    if(conn_step != CURLE_OK) {
+      Curl_axtls_close(conn, sockindex);
+      return conn_step;
+    }
+
+    /* Reset connect state */
+    conn->ssl[sockindex].connecting_state = ssl_connect_1;
+
+    *done = TRUE;
+    return CURLE_OK;
+  }
+
+  /* Unrecognized state.  Things are very bad. */
+  conn->ssl[sockindex].state  = ssl_connection_none;
+  conn->ssl[sockindex].connecting_state = ssl_connect_1;
+  /* Return value perhaps not strictly correct, but distinguishes the issue.*/
+  return CURLE_BAD_FUNCTION_ARGUMENT;
+}
+
+
+/*
+ * This function is called after the TCP connect has completed. Setup the TLS
+ * layer and do all necessary magic for a blocking connect.
+ */
+CURLcode
+Curl_axtls_connect(struct connectdata *conn,
+                  int sockindex)
+
+{
+  CURLcode conn_step = connect_prep(conn, sockindex);
+  int ssl_fcn_return;
+  SSL *ssl = conn->ssl[sockindex].ssl;
+
+  if(conn_step != CURLE_OK) {
+    Curl_axtls_close(conn, sockindex);
+    return conn_step;
+  }
+
+  /* Check to make sure handshake was ok. */
+  while(ssl_handshake_status(ssl) != SSL_OK) {
+    ssl_fcn_return = ssl_read(ssl, NULL);
+    if(ssl_fcn_return < 0) {
+      Curl_axtls_close(conn, sockindex);
+      ssl_display_error(ssl_fcn_return); /* goes to stdout. */
+      return map_error_to_curl(ssl_fcn_return);
+    }
+    usleep(10000);
+  }
+  infof (conn->data, "handshake completed successfully\n");
+
+  conn_step = connect_finish(conn, sockindex);
+  if(conn_step != CURLE_OK) {
+    Curl_axtls_close(conn, sockindex);
+    return conn_step;
+  }
+
+  return CURLE_OK;
+}
+
+/* return number of sent (non-SSL) bytes */
+static ssize_t axtls_send(struct connectdata *conn,
+                          int sockindex,
+                          const void *mem,
+                          size_t len,
+                          CURLcode *err)
+{
+  /* ssl_write() returns 'int' while write() and send() returns 'size_t' */
+  int rc = ssl_write(conn->ssl[sockindex].ssl, mem, (int)len);
+
+  infof(conn->data, "  axtls_send\n");
+
+  if(rc < 0 ) {
+    *err = map_error_to_curl(rc);
+    rc = -1; /* generic error code for send failure */
+  }
+
+  *err = CURLE_OK;
+  return rc;
+}
+
+void Curl_axtls_close_all(struct SessionHandle *data)
+{
+  (void)data;
+  infof(data, "  Curl_axtls_close_all\n");
+}
+
+void Curl_axtls_close(struct connectdata *conn, int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+  infof(conn->data, "  Curl_axtls_close\n");
+
+    /* line from ssluse.c: (void)SSL_shutdown(connssl->ssl);
+       axTLS compat layer does nothing for SSL_shutdown */
+
+    /* The following line is from ssluse.c.  There seems to be no axTLS
+       equivalent.  ssl_free and ssl_ctx_free close things.
+       SSL_set_connect_state(connssl->handle); */
+
+  free_ssl_structs(connssl);
+}
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_axtls_shutdown(struct connectdata *conn, int sockindex)
+{
+  /* Outline taken from ssluse.c since functions are in axTLS compat layer.
+     axTLS's error set is much smaller, so a lot of error-handling was removed.
+   */
+  int retval = 0;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct SessionHandle *data = conn->data;
+  uint8_t *buf;
+  ssize_t nread;
+
+  infof(conn->data, "  Curl_axtls_shutdown\n");
+
+  /* This has only been tested on the proftpd server, and the mod_tls code
+     sends a close notify alert without waiting for a close notify alert in
+     response. Thus we wait for a close notify alert from the server, but
+     we do not send one. Let's hope other servers do the same... */
+
+  /* axTLS compat layer does nothing for SSL_shutdown, so we do nothing too
+  if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
+      (void)SSL_shutdown(connssl->ssl);
+  */
+
+  if(connssl->ssl) {
+    int what = Curl_socket_ready(conn->sock[sockindex],
+                                 CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+    if(what > 0) {
+      /* Something to read, let's do it and hope that it is the close
+         notify alert from the server.  buf is managed internally by
+         axTLS and will be released upon calling ssl_free via
+         free_ssl_structs. */
+      nread = (ssize_t)ssl_read(connssl->ssl, &buf);
+
+      if(nread < SSL_OK) {
+        failf(data, "close notify alert not received during shutdown");
+        retval = -1;
+      }
+    }
+    else if(0 == what) {
+      /* timeout */
+      failf(data, "SSL shutdown timeout");
+    }
+    else {
+      /* anything that gets here is fatally bad */
+      failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+      retval = -1;
+    }
+
+    free_ssl_structs(connssl);
+  }
+  return retval;
+}
+
+static ssize_t axtls_recv(struct connectdata *conn, /* connection data */
+                          int num,                  /* socketindex */
+                          char *buf,                /* store read data here */
+                          size_t buffersize,        /* max amount to read */
+                          CURLcode *err)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[num];
+  ssize_t ret = 0;
+  uint8_t *read_buf;
+
+  infof(conn->data, "  axtls_recv\n");
+
+  *err = CURLE_OK;
+  if(connssl) {
+    ret = ssl_read(connssl->ssl, &read_buf);
+    if(ret > SSL_OK) {
+      /* ssl_read returns SSL_OK if there is more data to read, so if it is
+         larger, then all data has been read already.  */
+      memcpy(buf, read_buf,
+             (size_t)ret > buffersize ? buffersize : (size_t)ret);
+    }
+    else if(ret == SSL_OK) {
+      /* more data to be read, signal caller to call again */
+      *err = CURLE_AGAIN;
+      ret = -1;
+    }
+    else if(ret == -3) {
+      /* With patched axTLS, SSL_CLOSE_NOTIFY=-3.  Hard-coding until axTLS
+         team approves proposed fix. */
+      Curl_axtls_close(conn, num);
+    }
+    else {
+      failf(conn->data, "axTLS recv error (%d)", ret);
+      *err = map_error_to_curl(ret);
+      ret = -1;
+    }
+  }
+
+  return ret;
+}
+
+/*
+ * Return codes:
+ *     1 means the connection is still in place
+ *     0 means the connection has been closed
+ *    -1 means the connection status is unknown
+ */
+int Curl_axtls_check_cxn(struct connectdata *conn)
+{
+  /* ssluse.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1);
+     axTLS compat layer always returns the last argument, so connection is
+     always alive? */
+
+  infof(conn->data, "  Curl_axtls_check_cxn\n");
+   return 1; /* connection still in place */
+}
+
+void Curl_axtls_session_free(void *ptr)
+{
+  (void)ptr;
+  /* free the ID */
+  /* both ssluse.c and gtls.c do something here, but axTLS's OpenSSL
+     compatibility layer does nothing, so we do nothing too. */
+}
+
+size_t Curl_axtls_version(char *buffer, size_t size)
+{
+  return snprintf(buffer, size, "axTLS/%s", ssl_version());
+}
+
+#endif /* USE_AXTLS */
diff --git a/lib/axtls.h b/lib/axtls.h
new file mode 100644 (file)
index 0000000..db91365
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef HEADER_CURL_AXTLS_H
+#define HEADER_CURL_AXTLS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, DirecTV
+ * contact: Eric Hu <ehu@directv.com>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+#ifdef USE_AXTLS
+#include "curl/curl.h"
+#include "urldata.h"
+
+int Curl_axtls_init(void);
+int Curl_axtls_cleanup(void);
+CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex);
+CURLcode Curl_axtls_connect_nonblocking(
+    struct connectdata *conn,
+    int sockindex,
+    bool *done);
+
+/* tell axTLS to close down all open information regarding connections (and
+   thus session ID caching etc) */
+void Curl_axtls_close_all(struct SessionHandle *data);
+
+ /* close a SSL connection */
+void Curl_axtls_close(struct connectdata *conn, int sockindex);
+
+void Curl_axtls_session_free(void *ptr);
+size_t Curl_axtls_version(char *buffer, size_t size);
+int Curl_axtls_shutdown(struct connectdata *conn, int sockindex);
+int Curl_axtls_check_cxn(struct connectdata *conn);
+
+/* API setup for axTLS */
+#define curlssl_init Curl_axtls_init
+#define curlssl_cleanup Curl_axtls_cleanup
+#define curlssl_connect Curl_axtls_connect
+#define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking
+#define curlssl_session_free(x)  Curl_axtls_session_free(x)
+#define curlssl_close_all Curl_axtls_close_all
+#define curlssl_close Curl_axtls_close
+#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_axtls_version
+#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
+#define curlssl_data_pending(x,y) (x=x, y=y, 0)
+
+#endif /* USE_AXTLS */
+#endif /* HEADER_CURL_AXTLS_H */
+
index edccf54..3f3f0f9 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-/* Base64 encoding/decoding
- *
- * Test harnesses down the bottom - compile with -DTEST_ENCODE for
- * a program that will read in raw data from stdin and write out
- * a base64-encoded version to stdout, and the length returned by the
- * encoding function to stderr. Compile with -DTEST_DECODE for a program that
- * will go the other way.
- *
- * This code will break if int is smaller than 32 bits
- */
+/* Base64 encoding/decoding */
 
-#include "setup.h"
-
-#include <stdlib.h>
-#include <string.h>
+#include "curl_setup.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
 #include "urldata.h" /* for the SessionHandle definition */
-#include "easyif.h"  /* for Curl_convert_... prototypes */
 #include "warnless.h"
 #include "curl_base64.h"
 #include "curl_memory.h"
+#include "non-ascii.h"
 
 /* include memdebug.h last */
 #include "memdebug.h"
@@ -70,20 +58,29 @@ static void decodeQuantum(unsigned char *dest, const char *src)
       x = (x << 6);
   }
 
-  dest[2] = curlx_ultouc(x);
+  dest[2] = curlx_ultouc(x & 0xFFUL);
   x >>= 8;
-  dest[1] = curlx_ultouc(x);
+  dest[1] = curlx_ultouc(x & 0xFFUL);
   x >>= 8;
-  dest[0] = curlx_ultouc(x);
+  dest[0] = curlx_ultouc(x & 0xFFUL);
 }
 
 /*
  * Curl_base64_decode()
  *
- * Given a base64 string at src, decode it and return an allocated memory in
- * the *outptr. Returns the length of the decoded data.
+ * Given a base64 NUL-terminated string at src, decode it and return a
+ * pointer in *outptr to a newly allocated memory area holding decoded
+ * data. Size of decoded data is returned in variable pointed by outlen.
+ *
+ * Returns CURLE_OK on success, otherwise specific error code. Function
+ * output shall not be considered valid unless CURLE_OK is returned.
+ *
+ * When decoded data length is 0, returns NULL in *outptr.
+ *
+ * @unittest: 1302
  */
-size_t Curl_base64_decode(const char *src, unsigned char **outptr)
+CURLcode Curl_base64_decode(const char *src,
+                            unsigned char **outptr, size_t *outlen)
 {
   size_t length = 0;
   size_t equalsTerm = 0;
@@ -94,6 +91,7 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
   unsigned char *newstr;
 
   *outptr = NULL;
+  *outlen = 0;
 
   while((src[length] != '=') && src[length])
     length++;
@@ -107,7 +105,7 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
 
   /* Don't allocate a buffer if the decoded length is 0 */
   if(numQuantums == 0)
-    return 0;
+    return CURLE_OK;
 
   rawlen = (numQuantums * 3) - equalsTerm;
 
@@ -115,7 +113,7 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
   (which may be partially thrown out) and the zero terminator. */
   newstr = malloc(rawlen+4);
   if(!newstr)
-    return 0;
+    return CURLE_OUT_OF_MEMORY;
 
   *outptr = newstr;
 
@@ -134,68 +132,70 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
     newstr[i] = lastQuantum[i];
 
   newstr[i] = '\0'; /* zero terminate */
-  return rawlen;
+
+  *outlen = rawlen; /* return size of decoded data */
+
+  return CURLE_OK;
 }
 
 /*
  * Curl_base64_encode()
  *
- * Returns the length of the newly created base64 string. The third argument
- * is a pointer to an allocated area holding the base64 data. If something
- * went wrong, 0 is returned.
+ * Given a pointer to an input buffer and an input size, encode it and
+ * return a pointer in *outptr to a newly allocated memory area holding
+ * encoded data. Size of encoded data is returned in variable pointed by
+ * outlen.
  *
+ * Input length of 0 indicates input buffer holds a NUL-terminated string.
+ *
+ * Returns CURLE_OK on success, otherwise specific error code. Function
+ * output shall not be considered valid unless CURLE_OK is returned.
+ *
+ * When encoded data length is 0, returns NULL in *outptr.
+ *
+ * @unittest: 1302
  */
-size_t Curl_base64_encode(struct SessionHandle *data,
-                          const char *inputbuff, size_t insize,
-                          char **outptr)
+CURLcode Curl_base64_encode(struct SessionHandle *data,
+                            const char *inputbuff, size_t insize,
+                            char **outptr, size_t *outlen)
 {
+  CURLcode error;
   unsigned char ibuf[3];
   unsigned char obuf[4];
   int i;
   int inputparts;
   char *output;
   char *base64data;
-#ifdef CURL_DOES_CONVERSIONS
   char *convbuf = NULL;
-#endif
 
   const char *indata = inputbuff;
 
-  *outptr = NULL; /* set to NULL in case of failure before we reach the end */
+  *outptr = NULL;
+  *outlen = 0;
 
   if(0 == insize)
     insize = strlen(indata);
 
   base64data = output = malloc(insize*4/3+4);
   if(NULL == output)
-    return 0;
+    return CURLE_OUT_OF_MEMORY;
 
-#ifdef CURL_DOES_CONVERSIONS
   /*
    * The base64 data needs to be created using the network encoding
    * not the host encoding.  And we can't change the actual input
    * so we copy it to a buffer, translate it, and use that instead.
    */
-  if(data) {
-    convbuf = malloc(insize);
-    if(!convbuf) {
-      free(output);
-      return 0;
-    }
-    memcpy(convbuf, indata, insize);
-    if(CURLE_OK != Curl_convert_to_network(data, convbuf, insize)) {
-      free(convbuf);
-      free(output);
-      return 0;
-    }
-    indata = convbuf; /* switch to the converted buffer */
+  error = Curl_convert_clone(data, indata, insize, &convbuf);
+  if(error) {
+    free(output);
+    return error;
   }
-#else
-  (void)data;
-#endif
+
+  if(convbuf)
+    indata = (char *)convbuf;
 
   while(insize > 0) {
-    for (i = inputparts = 0; i < 3; i++) {
+    for(i = inputparts = 0; i < 3; i++) {
       if(insize > 0) {
         inputparts++;
         ibuf[i] = (unsigned char) *indata;
@@ -235,13 +235,14 @@ size_t Curl_base64_encode(struct SessionHandle *data,
     }
     output += 4;
   }
-  *output=0;
-  *outptr = base64data; /* make it return the actual data memory */
+  *output = '\0';
+  *outptr = base64data; /* return pointer to new data, allocated memory */
 
-#ifdef CURL_DOES_CONVERSIONS
-  if(data)
+  if(convbuf)
     free(convbuf);
-#endif
-  return strlen(base64data); /* return the length of the new data */
+
+  *outlen = strlen(base64data); /* return the length of the new data */
+
+  return CURLE_OK;
 }
 /* ---- End of Base64 Encoding ---- */
diff --git a/lib/bundles.c b/lib/bundles.c
new file mode 100644 (file)
index 0000000..aadf026
--- /dev/null
@@ -0,0 +1,110 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012, 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_setup.h"
+
+#include <curl/curl.h>
+
+#include "urldata.h"
+#include "url.h"
+#include "progress.h"
+#include "multiif.h"
+#include "bundles.h"
+#include "sendf.h"
+#include "rawstr.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+static void conn_llist_dtor(void *user, void *element)
+{
+  struct connectdata *data = element;
+  (void)user;
+
+  data->bundle = NULL;
+}
+
+CURLcode Curl_bundle_create(struct SessionHandle *data,
+                            struct connectbundle **cb_ptr)
+{
+  (void)data;
+  DEBUGASSERT(*cb_ptr == NULL);
+  *cb_ptr = malloc(sizeof(struct connectbundle));
+  if(!*cb_ptr)
+    return CURLE_OUT_OF_MEMORY;
+
+  (*cb_ptr)->num_connections = 0;
+  (*cb_ptr)->server_supports_pipelining = FALSE;
+
+  (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor);
+  if(!(*cb_ptr)->conn_list) {
+    Curl_safefree(*cb_ptr);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  return CURLE_OK;
+}
+
+void Curl_bundle_destroy(struct connectbundle *cb_ptr)
+{
+  if(!cb_ptr)
+    return;
+
+  if(cb_ptr->conn_list) {
+    Curl_llist_destroy(cb_ptr->conn_list, NULL);
+    cb_ptr->conn_list = NULL;
+  }
+  Curl_safefree(cb_ptr);
+}
+
+/* Add a connection to a bundle */
+CURLcode Curl_bundle_add_conn(struct connectbundle *cb_ptr,
+                              struct connectdata *conn)
+{
+  if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn))
+    return CURLE_OUT_OF_MEMORY;
+
+  conn->bundle = cb_ptr;
+
+  cb_ptr->num_connections++;
+  return CURLE_OK;
+}
+
+/* Remove a connection from a bundle */
+int Curl_bundle_remove_conn(struct connectbundle *cb_ptr,
+                            struct connectdata *conn)
+{
+  struct curl_llist_element *curr;
+
+  curr = cb_ptr->conn_list->head;
+  while(curr) {
+    if(curr->ptr == conn) {
+      Curl_llist_remove(cb_ptr->conn_list, curr, NULL);
+      cb_ptr->num_connections--;
+      conn->bundle = NULL;
+      return 1; /* we removed a handle */
+    }
+    curr = curr->next;
+  }
+  return 0;
+}
diff --git a/lib/bundles.h b/lib/bundles.h
new file mode 100644 (file)
index 0000000..3816c40
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef HEADER_CURL_BUNDLES_H
+#define HEADER_CURL_BUNDLES_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+struct connectbundle {
+  bool server_supports_pipelining; /* TRUE if server supports pipelining,
+                                      set after first response */
+  size_t num_connections;       /* Number of connections in the bundle */
+  struct curl_llist *conn_list; /* The connectdata members of the bundle */
+};
+
+CURLcode Curl_bundle_create(struct SessionHandle *data,
+                            struct connectbundle **cb_ptr);
+
+void Curl_bundle_destroy(struct connectbundle *cb_ptr);
+
+CURLcode Curl_bundle_add_conn(struct connectbundle *cb_ptr,
+                              struct connectdata *conn);
+
+int Curl_bundle_remove_conn(struct connectbundle *cb_ptr,
+                            struct connectdata *conn);
+
+
+#endif /* HEADER_CURL_BUNDLES_H */
+
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
new file mode 100755 (executable)
index 0000000..f561492
--- /dev/null
@@ -0,0 +1,204 @@
+#!/usr/bin/perl
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2011 - 2013, 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.
+#
+###########################################################################
+
+my $max_column = 79;
+my $indent = 2;
+
+my $warnings;
+my $errors;
+my $file;
+my $dir=".";
+my $wlist;
+
+sub checkwarn {
+    my ($num, $col, $file, $line, $msg, $error) = @_;
+
+    my $w=$error?"error":"warning";
+
+    if($w) {
+        $warnings++;
+    }
+    else {
+        $errors++;
+    }
+
+    $col++;
+    print "$file:$num:$col: $w: $msg\n";
+    print " $line\n";
+
+    if($col < 80) {
+        my $pref = (' ' x $col);
+        print "${pref}^\n";
+    }
+}
+
+$file = shift @ARGV;
+
+while(1) {
+
+    if($file =~ /-D(.*)/) {
+        $dir = $1;
+        $file = shift @ARGV;
+        next;
+    }
+    elsif($file =~ /-W(.*)/) {
+        $wlist .= " $1 ";
+        $file = shift @ARGV;
+        next;
+    }
+
+    last;
+}
+
+if(!$file) {
+    print "checksrc.pl [option] <file1> [file2] ...\n";
+    print " Options:\n";
+    print "  -D[DIR]   Directory to prepend file names\n";
+    print "  -W[file]  Whitelist the given file - ignore all its flaws\n";
+    exit;
+}
+
+do {
+    if("$wlist" !~ / $file /) {
+        my $fullname = $file;
+        $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
+        scanfile($fullname);
+    }
+    $file = shift @ARGV;
+
+} while($file);
+
+
+sub scanfile {
+    my ($file) = @_;
+
+    my $line = 1;
+    my $prevl;
+    my $l;
+    open(R, "<$file") || die "failed to open $file";
+
+    my $copyright=0;
+
+    while(<R>) {
+        chomp;
+        my $l = $_;
+        my $column = 0;
+
+        # check for a copyright statement
+        if(!$copyright && ($l =~ /copyright .* \d\d\d\d/i)) {
+            $copyright=1;
+        }
+
+        # detect long lines
+        if(length($l) > $max_column) {
+            checkwarn($line, length($l), $file, $l, "Longer than $max_column columns");
+        }
+        # detect TAB characters
+        if($l =~ /^(.*)\t/) {
+            checkwarn($line, length($1), $file, $l, "Contains TAB character", 1);
+        }
+        # detect trailing white space
+        if($l =~ /^(.*)[ \t]+\z/) {
+            checkwarn($line, length($1), $file, $l, "Trailing whitespace");
+        }
+
+        # check spaces after for/if/while
+        if($l =~ /^(.*)(for|if|while) \(/) {
+            if($1 =~ / *\#/) {
+                # this is a #if, treat it differently
+            }
+            else {
+                checkwarn($line, length($1)+length($2), $file, $l,
+                          "$2 with space");
+            }
+        }
+
+        # check spaces after open paren after for/if/while
+        if($l =~ /^(.*)(for|if|while)\( /) {
+            if($1 =~ / *\#/) {
+                # this is a #if, treat it differently
+            }
+            else {
+                checkwarn($line, length($1)+length($2)+1, $file, $l,
+                          "$2 with space first in condition");
+            }
+        }
+
+        # check for "} else"
+        if($l =~ /^(.*)\} *else/) {
+            checkwarn($line, length($1), $file, $l, "else after closing brace on same line");
+        }
+        # check for "){"
+        if($l =~ /^(.*)\)\{/) {
+            checkwarn($line, length($1)+1, $file, $l, "missing space after close paren");
+        }
+
+        # scan for use of banned functions
+        if($l =~ /^(.*\W)(sprintf|vsprintf|strcat|strncat|gets)\s*\(/) {
+            checkwarn($line, length($1), $file, $l,
+                      "use of $2 is banned");
+        }
+
+        # check for open brace first on line but not first column
+        # only alert if previous line ended with a close paren and wasn't a cpp
+        # line
+        if((($prevl =~ /\)\z/) && ($prevl !~ /^ *#/)) && ($l =~ /^( +)\{/)) {
+            checkwarn($line, length($1), $file, $l, "badly placed open brace");
+        }
+
+        # if the previous line starts with if/while/for AND ends with an open
+        # brace, check that this line is indented $indent more steps, if not
+        # a cpp line
+        if($prevl =~ /^( *)(if|while|for)\(.*\{\z/) {
+            my $first = length($1);
+
+            # this line has some character besides spaces
+            if(($l !~ /^ *#/) && ($l =~ /^( *)[^ ]/)) {
+                my $second = length($1);
+                my $expect = $first+$indent;
+                if($expect != $second) {
+                    my $diff = $second - $first;
+                    checkwarn($line, length($1), $file, $l,
+                              "not indented $indent steps, uses $diff)");
+
+                }
+            }
+        }
+
+        $line++;
+        $prevl = $l;
+    }
+
+    if(!$copyright) {
+        checkwarn(1, 0, $file, "", "Missing copyright statement", 1);
+    }
+
+    close(R);
+
+}
+
+
+if($errors || $warnings) {
+    printf "checksrc: %d errors and %d warnings\n", $errors, $warnings;
+    exit 5; # return failure
+}
index 99b96d6..76d8877 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef LIBCURL_CONFIG_AMIGAOS_H
-#define LIBCURL_CONFIG_AMIGAOS_H
+#ifndef HEADER_CURL_CONFIG_AMIGAOS_H
+#define HEADER_CURL_CONFIG_AMIGAOS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
+/* ================================================================ */
+/*               Hand crafted config file for AmigaOS               */
+/* ================================================================ */
+
 #ifdef __AMIGA__ /* Any AmigaOS flavour */
 
 #define HAVE_ARPA_INET_H 1
 #define HAVE_CLOSESOCKET_CAMEL 1
+#define HAVE_ERRNO_H 1
 #define HAVE_GETHOSTBYADDR 1
 #define HAVE_INET_ADDR 1
 #define HAVE_INTTYPES_H 1
@@ -71,8 +76,6 @@
 #define HAVE_SYS_STAT_H 1
 #define HAVE_SYS_TIME_H 1
 #define HAVE_SYS_TYPES_H 1
-#define HAVE_TERMIOS_H 1
-#define HAVE_TERMIO_H 1
 #define HAVE_TIME_H 1
 #define HAVE_UNAME 1
 #define HAVE_UNISTD_H 1
 #define SIZEOF_SHORT 2
 #define SIZEOF_SIZE_T 4
 
+#define USE_MANUAL 1
 #define USE_OPENSSL 1
 #define USE_SSLEAY 1
 #define CURL_DISABLE_LDAP 1
 
-
 #define OS "AmigaOS"
 
 #define PACKAGE "curl"
 
 #define in_addr_t int
 
+#ifndef F_OK
+#  define F_OK 0
+#endif
+
 #ifndef O_RDONLY
-# define O_RDONLY 0x0000
+#  define O_RDONLY 0x0000
+#endif
+
+#ifndef LONG_MAX
+#  define LONG_MAX 0x7fffffffL
+#endif
+
+#ifndef LONG_MIN
+#  define LONG_MIN (-0x7fffffffL-1)
 #endif
 
 #define HAVE_GETNAMEINFO 1
 #define SEND_TYPE_RETV int
 
 #endif /* __AMIGA__ */
-#endif /* LIBCURL_CONFIG_AMIGAOS_H */
+#endif /* HEADER_CURL_CONFIG_AMIGAOS_H */
index bb0315e..cce5e81 100644 (file)
@@ -1,5 +1,26 @@
-#ifndef HEADER_CONFIG_DOS_H
-#define HEADER_CONFIG_DOS_H
+#ifndef HEADER_CURL_CONFIG_DOS_H
+#define HEADER_CURL_CONFIG_DOS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
 
 
 /* ================================================================ */
@@ -19,6 +40,7 @@
 #define PACKAGE  "curl"
 
 #define HAVE_ARPA_INET_H       1
+#define HAVE_ERRNO_H           1
 #define HAVE_FCNTL_H           1
 #define HAVE_GETADDRINFO       1
 #define HAVE_GETNAMEINFO       1
@@ -57,7 +79,6 @@
 #define HAVE_SYS_SOCKET_H      1
 #define HAVE_SYS_STAT_H        1
 #define HAVE_SYS_TYPES_H       1
-#define HAVE_TERMIOS_H         1
 #define HAVE_TIME_H            1
 #define HAVE_UNISTD_H          1
 
 
 #if defined(__HIGHC__) || \
     (defined(__GNUC__) && (__GNUC__ < 4))
-#define ssize_t    int
+  #define ssize_t  int
 #endif
 
 #define CURL_CA_BUNDLE  getenv("CURL_CA_BUNDLE")
   #define HAVE_SIGACTION  1
   #define HAVE_SIGSETJMP  1
   #define HAVE_SYS_TIME_H 1
+  #define HAVE_TERMIOS_H  1
   #define HAVE_VARIADIC_MACROS_GCC 1
 
-  #if (DJGPP_MINOR >= 4)
-    #define HAVE_STRLCAT  1
-  #endif
-
   /* Because djgpp <= 2.03 doesn't have snprintf() etc. */
   #if (DJGPP_MINOR < 4)
     #define _MPRINTF_REPLACE
 
 #elif defined(__HIGHC__)
   #define HAVE_SYS_TIME_H 1
+  #define strerror(e) strerror_s_((e))
 #endif
 
 #ifdef MSDOS  /* Watt-32 */
-  #define HAVE_CLOSESOCKET_CAMEL  1
-  #define CloseSocket(s)          close_s((s))
+  #define HAVE_CLOSE_S    1
 #endif
 
 #undef word
 #undef byte
 
-#endif /* HEADER_CONFIG_DOS_H */
+#endif /* HEADER_CURL_CONFIG_DOS_H */
 
index 1f7950a..d89c385 100644 (file)
@@ -1,14 +1,39 @@
-#ifndef __LIB_CONFIG_MAC_H
-#define __LIB_CONFIG_MAC_H
+#ifndef HEADER_CURL_CONFIG_MAC_H
+#define HEADER_CURL_CONFIG_MAC_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
 
 /* =================================================================== */
-/*   lib/config-mac.h - Hand crafted config file for Mac OS 9          */
+/*                Hand crafted config file for Mac OS 9                */
 /* =================================================================== */
 /*  On Mac OS X you must run configure to generate curl_config.h file  */
 /* =================================================================== */
 
 #define OS "mac"
 
+/* Define if you want the built-in manual */
+#define USE_MANUAL              1
+
+#define HAVE_ERRNO_H            1
 #define HAVE_NETINET_IN_H       1
 #define HAVE_SYS_SOCKET_H       1
 #define HAVE_SYS_SELECT_H       1
 #define HAVE_FCNTL_H            1
 #define HAVE_SYS_STAT_H         1
 #define HAVE_ALLOCA_H           1
-#define HAVE_TIME_H             1
 #define HAVE_STDLIB_H           1
+#define HAVE_TIME_H             1
 #define HAVE_UTIME_H            1
 #define HAVE_SYS_TIME_H         1
+#define HAVE_SYS_UTIME_H        1
 
 #define TIME_WITH_SYS_TIME      1
 
 #define HAVE_ALARM              1
-#define HAVE_STRDUP             1
+#define HAVE_FTRUNCATE          1
 #define HAVE_UTIME              1
 #define HAVE_SETVBUF            1
 #define HAVE_STRFTIME           1
 #define HAVE_SOCKET             1
 #define HAVE_STRUCT_TIMEVAL     1
 
-//#define HAVE_STRICMP          1
 #define HAVE_SIGACTION          1
 #define HAVE_SIGNAL_H           1
 #define HAVE_SIG_ATOMIC_T       1
 
 #ifdef MACOS_SSL_SUPPORT
-#       define USE_SSLEAY       1
-#       define USE_OPENSSL      1
+#  define USE_SSLEAY            1
+#  define USE_OPENSSL           1
 #endif
 
 #define CURL_DISABLE_LDAP       1
 #define HAVE_EXTRA_STRICMP_H 1
 #define HAVE_EXTRA_STRDUP_H  1
 
-#endif /* __LIB_CONFIG_MAC_H */
+#endif /* HEADER_CURL_CONFIG_MAC_H */
index 370fc11..a290fe4 100644 (file)
@@ -1,5 +1,29 @@
+#ifndef HEADER_CURL_CONFIG_OS400_H
+#define HEADER_CURL_CONFIG_OS400_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
 /* ================================================================ */
-/*    lib/config-os400.h - Hand crafted config file for OS/400      */
+/*                Hand crafted config file for OS/400               */
 /* ================================================================ */
 
 #pragma enum(int)
 /* Define if you have the <des.h> header file. */
 #undef HAVE_DES_H
 
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H
+
 /* Define if you have the <err.h> header file. */
 #undef HAVE_ERR_H
 
 /* Define if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H
 
+
+/* The following define is needed on OS400 to enable strcmpi(), stricmp() and
+   strdup(). */
+#define __cplusplus__strings__
+
 /* Define if you have the `strcasecmp' function. */
 #undef HAVE_STRCASECMP
 
 /* Define if you have the `strcmpi' function. */
-#undef HAVE_STRCMPI
+#define HAVE_STRCMPI
+
+/* Define if you have the `stricmp' function. */
+#define HAVE_STRICMP
 
 /* Define if you have the `strdup' function. */
-#undef HAVE_STRDUP
+#define HAVE_STRDUP
+
 
 /* Define if you have the `strftime' function. */
 #define HAVE_STRFTIME
 
-/* Define if you have the `stricmp' function. */
-#undef HAVE_STRICMP
-
 /* Define if you have the <strings.h> header file. */
 #define HAVE_STRINGS_H
 
 /* Define if you have the <string.h> header file. */
 #define HAVE_STRING_H
 
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
 /* Define if you have the `strlcpy' function. */
 #undef HAVE_STRLCPY
 
 /* To disable LDAP */
 #undef CURL_DISABLE_LDAP
 
-/* To avoid external use of library hidden symbols */
-#define CURL_HIDDEN_SYMBOLS
-
-/* External symbols need no special keyword. */
+/* Definition to make a library symbol externally visible. */
 #define CURL_EXTERN_SYMBOL
 
 /* Define if you have the ldap_url_parse procedure. */
 /* Define to use the QsoSSL package. */
 #define USE_QSOSSL
 
+/* Define to use the GSKit package. */
+#undef USE_GSKIT
+
 /* Use the system keyring as the default CA bundle. */
 #define CURL_CA_BUNDLE  "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB"
 
 #define qadrt_use_fread_inline         /* Generate fread() wrapper inline. */
 #define qadrt_use_fwrite_inline        /* Generate fwrite() wrapper inline. */
 
+#endif /* HEADER_CURL_CONFIG_OS400_H */
index 84683aa..e400577 100644 (file)
@@ -1,4 +1,31 @@
-/* curl_config.h.in.  Generated automatically from configure.in by autoheader.  */
+#ifndef HEADER_CURL_CONFIG_RISCOS_H
+#define HEADER_CURL_CONFIG_RISCOS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/*               Hand crafted config file for RISC OS               */
+/* ================================================================ */
+
 /* Name of this package! */
 #undef PACKAGE
 
@@ -11,6 +38,9 @@
 /* Define cpu-machine-OS */
 #define OS "ARM-RISC OS"
 
+/* Define if you want the built-in manual */
+#define USE_MANUAL
+
 /* Define if you have the gethostbyaddr_r() function with 5 arguments */
 #undef HAVE_GETHOSTBYADDR_R_5
 
@@ -53,8 +83,8 @@
 /* Define if you want to enable IPv6 support */
 #undef ENABLE_IPV6
 
-/* Define to 1 if you have the alarm function. */
-#define HAVE_ALARM 1
+/* Define if you have the alarm function. */
+#define HAVE_ALARM
 
 /* Define if you have the <alloca.h> header file. */
 #define HAVE_ALLOCA_H
 /* Define if you have the <des.h> header file. */
 #undef HAVE_DES_H
 
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H
+
 /* Define if you have the <err.h> header file. */
 #undef HAVE_ERR_H
 
 /* Define if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H
 
+/* Define if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE
+
 /* Define if getaddrinfo exists and works */
 #define HAVE_GETADDRINFO
 
 #define HAVE_INTTYPES_H
 
 /* Define if you have the <io.h> header file. */
-#define HAVE_IO_H
+#undef HAVE_IO_H
 
 /* Define if you have the `krb_get_our_ip_for_realm' function. */
 #undef HAVE_KRB_GET_OUR_IP_FOR_REALM
 /* Define if you have the <string.h> header file. */
 #define HAVE_STRING_H
 
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
 /* Define if you have the `strlcpy' function. */
 #undef HAVE_STRLCPY
 
 /* Define to the type pointed by arg 2 for recvfrom. */
 #define RECVFROM_TYPE_ARG2 void
 
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
+/* Define if the type pointed by arg 2 for recvfrom is void. */
+#define RECVFROM_TYPE_ARG2_IS_VOID
 
 /* Define to the type of arg 3 for recvfrom. */
 #define RECVFROM_TYPE_ARG3 size_t
 
 /* Define to the function return type for send. */
 #define SEND_TYPE_RETV ssize_t
+
+#endif /* HEADER_CURL_CONFIG_RISCOS_H */
index 9f8b74a..17d92b0 100644 (file)
@@ -1,7 +1,30 @@
-/* config-symbian.h.  Manually generated.  */
-
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
+#ifndef HEADER_CURL_CONFIG_SYMBIAN_H
+#define HEADER_CURL_CONFIG_SYMBIAN_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/*               Hand crafted config file for Symbian               */
+/* ================================================================ */
 
 /* Location of default ca bundle */
 /* #define CURL_CA_BUNDLE "/etc/pki/tls/certs/ca-bundle.crt"*/
 /* to disable verbose strings */
 /* #define CURL_DISABLE_VERBOSE_STRINGS 1*/
 
-/* to make a symbol visible */
-/*#define CURL_EXTERN_SYMBOL  __declspec(dllexport)*/
-
-/* to enable hidden symbols */
-/*#define CURL_HIDDEN_SYMBOLS 1*/
+/* Definition to make a library symbol externally visible. */
+/* #undef CURL_EXTERN_SYMBOL */
 
 /* Use Windows LDAP implementation */
 /* #undef CURL_LDAP_WIN */
 
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
-
 /* your Entropy Gathering Daemon socket pathname */
 /* #undef EGD_SOCKET */
 
 /* Define to 1 if you have the `pipe' function. */
 #define HAVE_PIPE 1
 
-/* if you have the function PK11_CreateGenericObject */
-/* #undef HAVE_PK11_CREATEGENERICOBJECT */
-
 /* Define to 1 if you have the `poll' function. */
 /*#define HAVE_POLL 1*/
 
 /* Define to 1 if you have the `strcasecmp' function. */
 #define HAVE_STRCASECMP 1
 
-/* Define to 1 if you have the `strcasestr' function. */
-#define HAVE_STRCASESTR 1
-
 /* Define to 1 if you have the `strcmpi' function. */
 /* #undef HAVE_STRCMPI */
 
 /* 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 <x509.h> header file. */
 /* #undef HAVE_X509_H */
 
-/* Define to 1 if you are building a native Windows target. */
-/* #undef NATIVE_WINDOWS */
-
 /* Define to 1 if you need the lber.h header file even with ldap.h */
 /* #undef NEED_LBER_H */
 
 /* if OpenSSL is in use */
 #define USE_OPENSSL
 #endif
+
+#endif /* HEADER_CURL_CONFIG_SYMBIAN_H */
index 3e494f7..ddb8f77 100644 (file)
@@ -1,8 +1,29 @@
-#ifndef __LIBCONFIGTPF_H
-#define __LIBCONFIGTPF_H
+#ifndef HEADER_CURL_CONFIG_TPF_H
+#define HEADER_CURL_CONFIG_TPF_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
 
 /* ================================================================ */
-/*    lib/config-tpf.h - Hand crafted config file for TPF           */
+/*                 Hand crafted config file for TPF                 */
 /* ================================================================ */
 
 /* ---------------------------------------------------------------- */
@@ -11,9 +32,6 @@
 
 /* NOTE: Refer also to the .mak file for some of the flags below */
 
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
-
 /* to disable cookies support */
 /* #undef CURL_DISABLE_COOKIES */
 
@@ -44,9 +62,6 @@
 /* to disable verbose strings */
 /* #undef CURL_DISABLE_VERBOSE_STRINGS */
 
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
-
 /* lber dynamic library file */
 /* #undef DL_LBER_FILE */
 
 /* 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. */
-/* #undef HAVE_STRLCAT */
-
 /* Define to 1 if you have the `strlcpy' function. */
 /* #undef HAVE_STRLCPY */
 
 #endif
 
 
-#endif /* __LIBCONFIGTPF_H */
+#endif /* HEADER_CURL_CONFIG_TPF_H */
diff --git a/lib/config-vms.h b/lib/config-vms.h
deleted file mode 100644 (file)
index 73ef5c0..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-#ifndef HEADER_CONFIG_VMS_H
-#define HEADER_CONFIG_VMS_H
-
-/*                                                                         */
-/* MSK, 02/05/04, Hand edited for trail build on Alpha V7.3, DEC C 6.5-003 */
-/* MSK, 03/09/04, Seems to work for all platforms I've built on so far.    */
-/*      Added HAVE_SYS_IOCTL_H define                                      */
-/* TES, 10/06/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME               */
-/* MSK, 02/02/05, Changed HAVE_TERMIOS_H to an undef since the change in   */
-/*                getpass.c no longer undef'd it during compile.           */
-/* MSK, 02/08/05, turned two config-vms files into one by using USE_SSLEAY */
-/* MPZ, 12/28/05, changed HAVE_STRTOK_R define to use CRTL_VER             */
-/* MSK, 01/27/07, needed to add HAVE_STRUCT_TIMEVAL define                 */
-
-/* Define cpu-machine-OS */
-#if defined(__alpha)
-#  define OS "ALPHA-HP-VMS"
-#elif defined(__vax)
-#  define OS "VAX-HP-VMS"
-#elif defined(__ia64)
-#  define OS "IA64-HP-VMS"
-#else
-#  define OS "UNKNOWN-HP-VMS"
-#endif
-
-/* Define if you have the ANSI C header files.  */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#define TIME_WITH_SYS_TIME 1
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 4
-
-/* Define if you have the alarm function.  */
-#define HAVE_ALARM 1
-
-/* Define if you have the geteuid function.  */
-#define HAVE_GETEUID 1
-
-/* Define if you have the basename function. */
-#define HAVE_BASENAME 1
-
-/* Define if you have the gethostbyaddr function.  */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define if you have the gethostname function.  */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getpwuid function.  */
-#define HAVE_GETPWUID 1
-
-/* Define if you have the getservbyname function.  */
-#define HAVE_GETSERVBYNAME 1
-
-/* Define if you have the gettimeofday function.  */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the inet_addr function.  */
-#define HAVE_INET_ADDR 1
-
-/* Define if you have the ioctl function. */
-#define HAVE_IOCTL 1
-
-/* Define if you have a working ioctl FIONBIO function. */
-#define HAVE_IOCTL_FIONBIO 1
-
-/* Define if you have a working ioctl SIOCGIFADDR function. */
-#define HAVE_IOCTL_SIOCGIFADDR 1
-
-/* Define if you have the perror function.  */
-#define HAVE_PERROR 1
-
-/* Define if you have the select function.  */
-#define HAVE_SELECT 1
-
-/* Define if you have the setvbuf function.  */
-#define HAVE_SETVBUF 1
-
-/* Define if you have the sigaction function.  */
-#define HAVE_SIGACTION 1
-
-/* Define if you have the signal function.  */
-#define HAVE_SIGNAL 1
-
-/* Define if you have the socket function.  */
-#define HAVE_SOCKET 1
-
-/* Define if you have the strcasecmp function.  */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strcmpi function.  */
-/* #define HAVE_STRCMPI 1 */
-
-/* Define if you have the strdup function.  */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strftime function.  */
-#define HAVE_STRFTIME 1
-
-/* Define if you have the stricmp function.  */
-/* #define HAVE_STRICMP 1 */
-
-/* Define if you have the strstr function.  */
-#define HAVE_STRSTR 1
-
-/* Define if you have the ftruncate function. */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the uname function.  */
-#define HAVE_UNAME 1
-
-/* Define if you have the <err.h> header file.  */
-#define HAVE_ERR_H 1
-
-/* Define if you have the <fcntl.h> header file.  */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <getopt.h> header file.  */
-#define HAVE_GETOPT_H 1
-
-/* Define if you have the <malloc.h> header file.  */
-#define HAVE_MALLOC_H 1
-
-/* Define if you need the malloc.h header header file even with stdlib.h  */
-/* #define NEED_MALLOC_H 1 */
-
-/* Define if you have the <net/if.h> header file.  */
-#define HAVE_NET_IF_H 1
-
-/* Define if you have the <netdb.h> header file.  */
-#define HAVE_NETDB_H 1
-
-/* Define if you have the <netinet/if_ether.h> header file.  */
-#define HAVE_NETINET_IF_ETHER_H 1
-
-/* Define if you have the <netinet/in.h> header file.  */
-#define HAVE_NETINET_IN_H 1
-
-/* OpenSSL section starts here */
-
-/* Define if you have a working OpenSSL installation */
-#ifdef USE_SSLEAY
-
-/* if OpenSSL is in use */
-#define USE_OPENSSL 1
-
-/* Define if you have the crypto library (-lcrypto).  */
-#define HAVE_LIBCRYPTO 1
-
-/* Define if you have the ssl library (-lssl).  */
-#define HAVE_LIBSSL 1
-
-/* Define if you have the <openssl/crypto.h> header file.  */
-#define HAVE_OPENSSL_CRYPTO_H 1
-
-/* Define if you have the <openssl/err.h> header file.  */
-#define HAVE_OPENSSL_ERR_H 1
-
-/* Define if you have the <openssl/pem.h> header file.  */
-#define HAVE_OPENSSL_PEM_H 1
-
-/* Define if you have the <openssl/rsa.h> header file.  */
-#define HAVE_OPENSSL_RSA_H 1
-
-/* Define if you have the <openssl/ssl.h> header file.  */
-#define HAVE_OPENSSL_SSL_H 1
-
-/* Define if you have the <openssl/x509.h> header file.  */
-#define HAVE_OPENSSL_X509_H 1
-
-/*
- * This needs to be defined for OpenSSL 0.9.7 and other versions that have the
- * ENGINE stuff supported. If an include of "openssl/engine.h" fails, then
- * undefine the define below.
-*/
-#define HAVE_OPENSSL_ENGINE_H 1
-
-#endif /* USE_SSLEAY */
-/* OpenSSL section ends here */
-
-/* Define if you have the <pwd.h> header file.  */
-#define HAVE_PWD_H 1
-
-/* Define if you have the <sgtty.h> header file.  */
-#define HAVE_SGTTY_H 1
-
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <sys/socket.h> header file.  */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define if you have the <sys/stat.h> header file.  */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/time.h> header file.  */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <sys/types.h> header file.  */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <termios.h> header file.  */
-#undef HAVE_TERMIOS_H
-
-/* Define if you have the <time.h> header file.  */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file.  */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the resolv library (-lresolv).  */
-#define HAVE_LIBRESOLV 1
-
-/* Define if you have the socket library (-lsocket).  */
-#define HAVE_LIBSOCKET 1
-
-/* Define if getaddrinfo exists and works */
-#define HAVE_GETADDRINFO 1
-
-/* Define if you have the <timeval.h> header file.  */
-#define HAVE_TIMEVAL_H 1
-
-/* Define if you have the timeval struct.  */
-#define HAVE_STRUCT_TIMEVAL 1
-
-/* Name of this package! */
-#define PACKAGE "not-used"
-
-/* Version number of this archive. */
-#define VERSION "not-used"
-
-/* Define if you have the getpass function.  */
-#undef HAVE_GETPASS
-
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the `strtok_r' function.  */
-/* Condition lifted from <string.h>             */
-#if __CRTL_VER >= 70301000
-#  define HAVE_STRTOK_R 1
-#endif
-
-/* Define if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#define NEED_MEMORY_H 1
-
-/* Define if you have the `sigsetjmp' function. */
-#define HAVE_SIGSETJMP 1
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#define HAVE_STROPTS_H 1
-
-/* Define if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 size_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 size_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
-/* Define if you have the recv function. */
-#define HAVE_RECV 1
-
-/* Define to the type of arg 1 for recv. */
-#define RECV_TYPE_ARG1 int
-
-/* Define to the type of arg 2 for recv. */
-#define RECV_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for recv. */
-#define RECV_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recv. */
-#define RECV_TYPE_ARG4 int
-
-/* Define to the function return type for recv. */
-#define RECV_TYPE_RETV int
-
-/* Define if you have the recvfrom function. */
-#define HAVE_RECVFROM 1
-
-/* Define to the type of arg 1 for recvfrom. */
-#define RECVFROM_TYPE_ARG1 int
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#define RECVFROM_TYPE_ARG2 void
-
-/* Define if the type pointed by arg 2 for recvfrom is void. */
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-
-/* Define to the type of arg 3 for recvfrom. */
-#define RECVFROM_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recvfrom. */
-#define RECVFROM_TYPE_ARG4 int
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#define RECVFROM_TYPE_ARG6 int
-
-/* Define to the function return type for recvfrom. */
-#define RECVFROM_TYPE_RETV int
-
-/* Define if you have the send function. */
-#define HAVE_SEND 1
-
-/* Define to the type of arg 1 for send. */
-#define SEND_TYPE_ARG1 int
-
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
-/* Define to the type of arg 2 for send. */
-#define SEND_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for send. */
-#define SEND_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for send. */
-#define SEND_TYPE_ARG4 int
-
-/* Define to the function return type for send. */
-#define SEND_TYPE_RETV int
-
-/* Define to hide dollar sign from compilers in strict ansi mode. */
-#define decc_translate_vms(__s) decc$translate_vms(__s)
-
-#endif /* HEADER_CONFIG_VMS_H */
index f7797fd..c94534a 100644 (file)
@@ -1,13 +1,31 @@
-#ifndef __LIB_CONFIG_VXWORKS_H
-#define __LIB_CONFIG_VXWORKS_H
+#ifndef HEADER_CURL_CONFIG_VXWORKS_H
+#define HEADER_CURL_CONFIG_VXWORKS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
 
 /* =============================================================== */
-/*   lib/config-vxworks.h - Hand crafted config file for VxWorks   */
+/*               Hand crafted config file for VxWorks              */
 /* =============================================================== */
 
-/* when building libcurl itself */
-/* #undef BUILDING_LIBCURL */
-
 /* Location of default ca bundle */
 /* #undef CURL_CA_BUNDLE */
 
 /* to disable verbose strings */
 /* #undef CURL_DISABLE_VERBOSE_STRINGS */
 
-/* to make a symbol visible */
+/* Definition to make a library symbol externally visible. */
 /* #undef CURL_EXTERN_SYMBOL */
 
-/* to enable hidden symbols */
-/* #undef CURL_HIDDEN_SYMBOLS */
-
 /* Use Windows LDAP implementation */
 /* #undef CURL_LDAP_WIN */
 
-/* when not building a shared library */
-/* #undef CURL_STATICLIB */
-
 /* your Entropy Gathering Daemon socket pathname */
 /* #undef EGD_SOCKET */
 
 /* Define to 1 if you have the `pipe' function. */
 #define HAVE_PIPE 1
 
-/* if you have the function PK11_CreateGenericObject */
-/* #undef HAVE_PK11_CREATEGENERICOBJECT */
-
 /* Define to 1 if you have a working poll function. */
 /* #undef HAVE_POLL */
 
 /* Define to 1 if you have the strcasecmp function. */
 #define HAVE_STRCASECMP 1
 
-/* Define to 1 if you have the strcasestr function. */
-/* #undef HAVE_STRCASESTR */
-
 /* Define to 1 if you have the strcmpi function. */
 /* #undef HAVE_STRCMPI */
 
 /* 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. */
-/* #undef HAVE_STRLCAT */
-
 /* Define to 1 if you have the `strlcpy' function. */
 /* #undef HAVE_STRLCPY */
 
 /* if you have the zlib.h header file */
 #define HAVE_ZLIB_H 1
 
-/* Define to 1 if you are building a native Windows target. */
-/* #undef NATIVE_WINDOWS */
-
 /* Define to 1 if you need the lber.h header file even with ldap.h */
 /* #undef NEED_LBER_H */
 
 /* the signed version of size_t */
 /* #undef ssize_t */
 
-#endif /* __LIB_CONFIG_VXWORKS_H */
+#endif /* HEADER_CURL_CONFIG_VXWORKS_H */
index 67bfec3..9ce6ad2 100644 (file)
@@ -1,50 +1,79 @@
-#ifndef __LIB_CONFIG_WIN32_H
-#define __LIB_CONFIG_WIN32_H
+#ifndef HEADER_CURL_CONFIG_WIN32_H
+#define HEADER_CURL_CONFIG_WIN32_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 
 /* ================================================================ */
-/*    lib/config-win32.h - Hand crafted config file for Windows     */
+/*               Hand crafted config file for Windows               */
 /* ================================================================ */
 
 /* ---------------------------------------------------------------- */
 /*                          HEADER FILES                            */
 /* ---------------------------------------------------------------- */
 
-/* Define if you have the <arpa/inet.h> header file.  */
+/* Define if you have the <arpa/inet.h> header file. */
 /* #define HAVE_ARPA_INET_H 1 */
 
-/* Define if you have the <assert.h> header file.  */
+/* Define if you have the <assert.h> header file. */
 #define HAVE_ASSERT_H 1
 
-/* Define if you have the <crypto.h> header file.  */
+/* Define if you have the <crypto.h> header file. */
 /* #define HAVE_CRYPTO_H 1 */
 
-/* Define if you have the <err.h> header file.  */
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the <err.h> header file. */
 /* #define HAVE_ERR_H 1 */
 
-/* Define if you have the <fcntl.h> header file.  */
+/* Define if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
-/* Define if you have the <getopt.h> header file.  */
-/* #define HAVE_GETOPT_H 1 */
+/* Define if you have the <getopt.h> header file. */
+#if defined(__MINGW32__) || defined(__POCC__)
+#define HAVE_GETOPT_H 1
+#endif
 
-/* Define if you have the <io.h> header file.  */
+/* Define if you have the <io.h> header file. */
 #define HAVE_IO_H 1
 
-/* Define if you have the <limits.h> header file.  */
+/* Define if you have the <limits.h> header file. */
 #define HAVE_LIMITS_H 1
 
-/* Define if you need the malloc.h header file even with stdlib.h  */
+/* Define if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define if you need <malloc.h> header even with <stdlib.h> header file. */
 #if !defined(__SALFORDC__) && !defined(__POCC__)
 #define NEED_MALLOC_H 1
 #endif
 
-/* Define if you have the <netdb.h> header file.  */
+/* Define if you have the <netdb.h> header file. */
 /* #define HAVE_NETDB_H 1 */
 
-/* Define if you have the <netinet/in.h> header file.  */
+/* Define if you have the <netinet/in.h> header file. */
 /* #define HAVE_NETINET_IN_H 1 */
 
-/* Define if you have the <process.h> header file.  */
+/* Define if you have the <process.h> header file. */
 #ifndef __SALFORDC__
 #define HAVE_PROCESS_H 1
 #endif
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define if you have the <sgtty.h> header file.  */
+/* Define if you have the <sgtty.h> header file. */
 /* #define HAVE_SGTTY_H 1 */
 
-/* Define if you have the <ssl.h> header file.  */
+/* Define if you have the <ssl.h> header file. */
 /* #define HAVE_SSL_H 1 */
 
-/* Define if you have the <stdlib.h> header file.  */
+/* Define if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H 1
 
-/* Define if you have the <sys/param.h> header file.  */
+/* Define if you have the <sys/param.h> header file. */
 /* #define HAVE_SYS_PARAM_H 1 */
 
-/* Define if you have the <sys/select.h> header file.  */
+/* Define if you have the <sys/select.h> header file. */
 /* #define HAVE_SYS_SELECT_H 1 */
 
-/* Define if you have the <sys/socket.h> header file.  */
+/* Define if you have the <sys/socket.h> header file. */
 /* #define HAVE_SYS_SOCKET_H 1 */
 
-/* Define if you have the <sys/sockio.h> header file.  */
+/* Define if you have the <sys/sockio.h> header file. */
 /* #define HAVE_SYS_SOCKIO_H 1 */
 
-/* Define if you have the <sys/stat.h> header file.  */
+/* Define if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
-/* Define if you have the <sys/time.h> header file */
+/* Define if you have the <sys/time.h> header file. */
 /* #define HAVE_SYS_TIME_H 1 */
 
-/* Define if you have the <sys/types.h> header file.  */
+/* Define if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H 1
 
-/* Define if you have the <sys/utime.h> header file.  */
+/* Define if you have the <sys/utime.h> header file. */
 #ifndef __BORLANDC__
 #define HAVE_SYS_UTIME_H 1
 #endif
 
-/* Define if you have the <termio.h> header file.  */
+/* Define if you have the <termio.h> header file. */
 /* #define HAVE_TERMIO_H 1 */
 
-/* Define if you have the <termios.h> header file.  */
+/* Define if you have the <termios.h> header file. */
 /* #define HAVE_TERMIOS_H 1 */
 
-/* Define if you have the <time.h> header file.  */
+/* Define if you have the <time.h> header file. */
 #define HAVE_TIME_H 1
 
-/* Define if you have the <unistd.h> header file.  */
+/* Define if you have the <unistd.h> header file. */
 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
     defined(__POCC__)
 #define HAVE_UNISTD_H 1
 #endif
 
-/* Define if you have the <windows.h> header file.  */
+/* Define if you have the <windows.h> header file. */
 #define HAVE_WINDOWS_H 1
 
-/* Define if you have the <winsock.h> header file.  */
+/* Define if you have the <winsock.h> header file. */
 #define HAVE_WINSOCK_H 1
 
-/* Define if you have the <winsock2.h> header file.  */
+/* Define if you have the <winsock2.h> header file. */
 #ifndef __SALFORDC__
 #define HAVE_WINSOCK2_H 1
 #endif
 
-/* Define if you have the <ws2tcpip.h> header file.  */
+/* Define if you have the <ws2tcpip.h> header file. */
 #ifndef __SALFORDC__
 #define HAVE_WS2TCPIP_H 1
 #endif
 /* Define if sig_atomic_t is an available typedef. */
 #define HAVE_SIG_ATOMIC_T 1
 
-/* Define if you have the ANSI C header files.  */
+/* Define if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
 /* #define TIME_WITH_SYS_TIME 1 */
 
 /* ---------------------------------------------------------------- */
 /*                             FUNCTIONS                            */
 /* ---------------------------------------------------------------- */
 
-/* Define if you have the closesocket function.  */
+/* Define if you have the closesocket function. */
 #define HAVE_CLOSESOCKET 1
 
-/* Define if you don't have vprintf but do have _doprnt.  */
+/* Define if you don't have vprintf but do have _doprnt. */
 /* #define HAVE_DOPRNT 1 */
 
-/* Define if you have the gethostbyaddr function.  */
+/* Define if you have the ftruncate function. */
+#define HAVE_FTRUNCATE 1
+
+/* Define if you have the gethostbyaddr function. */
 #define HAVE_GETHOSTBYADDR 1
 
-/* Define if you have the gethostname function.  */
+/* Define if you have the gethostname function. */
 #define HAVE_GETHOSTNAME 1
 
-/* Define if you have the getpass function.  */
+/* Define if you have the getpass function. */
 /* #define HAVE_GETPASS 1 */
 
-/* Define if you have the getservbyname function.  */
+/* Define if you have the getservbyname function. */
 #define HAVE_GETSERVBYNAME 1
 
-/* Define if you have the getprotobyname function.  */
+/* Define if you have the getprotobyname function. */
 #define HAVE_GETPROTOBYNAME
 
-/* Define if you have the gettimeofday function.  */
+/* Define if you have the gettimeofday function. */
 /* #define HAVE_GETTIMEOFDAY 1 */
 
-/* Define if you have the inet_addr function.  */
+/* Define if you have the inet_addr function. */
 #define HAVE_INET_ADDR 1
 
 /* Define if you have the ioctlsocket function. */
 /* Define if you have a working ioctlsocket FIONBIO function. */
 #define HAVE_IOCTLSOCKET_FIONBIO 1
 
-/* Define if you have the perror function.  */
+/* Define if you have the perror function. */
 #define HAVE_PERROR 1
 
-/* Define if you have the RAND_screen function when using SSL  */
+/* Define if you have the RAND_screen function when using SSL. */
 #define HAVE_RAND_SCREEN 1
 
 /* Define if you have the `RAND_status' function when using SSL. */
 #define HAVE_RAND_STATUS 1
 
-/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
+/* Define if you have the `CRYPTO_cleanup_all_ex_data' function.
    This is present in OpenSSL versions after 0.9.6b */
 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
 
-/* Define if you have the select function.  */
+/* Define if you have the select function. */
 #define HAVE_SELECT 1
 
-/* Define if you have the setvbuf function.  */
+/* Define if you have the setlocale function. */
+#define HAVE_SETLOCALE 1
+
+/* Define if you have the setmode function. */
+#define HAVE_SETMODE 1
+
+/* Define if you have the setvbuf function. */
 #define HAVE_SETVBUF 1
 
-/* Define if you have the socket function.  */
+/* Define if you have the socket function. */
 #define HAVE_SOCKET 1
 
-/* Define if you have the strcasecmp function.  */
+/* Define if you have the strcasecmp function. */
 /* #define HAVE_STRCASECMP 1 */
 
-/* Define if you have the strdup function.  */
+/* Define if you have the strdup function. */
 #define HAVE_STRDUP 1
 
-/* Define if you have the strftime function.  */
+/* Define if you have the strftime function. */
 #define HAVE_STRFTIME 1
 
 /* Define if you have the stricmp function. */
 /* Define if you have the strnicmp function. */
 #define HAVE_STRNICMP 1
 
-/* Define if you have the strstr function.  */
+/* Define if you have the strstr function. */
 #define HAVE_STRSTR 1
 
-/* Define if you have the strtoll function.  */
+/* Define if you have the strtoll function. */
 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
 #define HAVE_STRTOLL 1
 #endif
 
-/* Define if you have the tcgetattr function.  */
+/* Define if you have the tcgetattr function. */
 /* #define HAVE_TCGETATTR 1 */
 
-/* Define if you have the tcsetattr function.  */
+/* Define if you have the tcsetattr function. */
 /* #define HAVE_TCSETATTR 1 */
 
-/* Define if you have the utime function */
+/* Define if you have the utime function. */
 #ifndef __BORLANDC__
 #define HAVE_UTIME 1
 #endif
 /*                       TYPEDEF REPLACEMENTS                       */
 /* ---------------------------------------------------------------- */
 
-/* Define this if in_addr_t is not an available 'typedefed' type */
+/* Define if in_addr_t is not an available 'typedefed' type. */
 #define in_addr_t unsigned long
 
-/* Define as the return type of signal handlers (int or void).  */
+/* Define to the return type of signal handlers (int or void). */
 #define RETSIGTYPE void
 
-/* Define ssize_t if it is not an available 'typedefed' type */
+/* Define if ssize_t is not an available 'typedefed' type. */
 #ifndef _SSIZE_T_DEFINED
 #  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
       defined(__POCC__) || \
 /*                            TYPE SIZES                            */
 /* ---------------------------------------------------------------- */
 
-/* The size of `int', as computed by sizeof. */
+/* Define to the size of `int', as computed by sizeof. */
 #define SIZEOF_INT 4
 
-/* The size of `long double', as computed by sizeof. */
+/* Define to the size of `long double', as computed by sizeof. */
 #define SIZEOF_LONG_DOUBLE 16
 
-/* The size of `long long', as computed by sizeof. */
+/* Define to the size of `long long', as computed by sizeof. */
 /* #define SIZEOF_LONG_LONG 8 */
 
-/* The size of `short', as computed by sizeof. */
+/* Define to the size of `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2
 
-/* The size of `size_t', as computed by sizeof. */
+/* Define to the size of `size_t', as computed by sizeof. */
 #if defined(_WIN64)
 #  define SIZEOF_SIZE_T 8
 #else
 /*                          STRUCT RELATED                          */
 /* ---------------------------------------------------------------- */
 
-/* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
+/* Define if you have struct sockaddr_storage. */
+#if !defined(__SALFORDC__) && !defined(__BORLANDC__)
 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
 #endif
 
-/* Define this if you have struct timeval */
+/* Define if you have struct timeval. */
 #define HAVE_STRUCT_TIMEVAL 1
 
+/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
+
+/* ---------------------------------------------------------------- */
+/*               BSD-style lwIP TCP/IP stack SPECIFIC               */
+/* ---------------------------------------------------------------- */
+
+/* Define to use BSD-style lwIP TCP/IP stack. */
+/* #define USE_LWIPSOCK 1 */
+
+#ifdef USE_LWIPSOCK
+#  undef USE_WINSOCK
+#  undef HAVE_WINSOCK_H
+#  undef HAVE_WINSOCK2_H
+#  undef HAVE_WS2TCPIP_H
+#  undef HAVE_ERRNO_H
+#  undef HAVE_GETHOSTNAME
+#  undef HAVE_GETNAMEINFO
+#  undef LWIP_POSIX_SOCKETS_IO_NAMES
+#  undef RECV_TYPE_ARG1
+#  undef RECV_TYPE_ARG3
+#  undef SEND_TYPE_ARG1
+#  undef SEND_TYPE_ARG3
+#  define HAVE_FREEADDRINFO
+#  define HAVE_GETADDRINFO
+#  define HAVE_GETHOSTBYNAME
+#  define HAVE_GETHOSTBYNAME_R
+#  define HAVE_GETHOSTBYNAME_R_6
+#  define LWIP_POSIX_SOCKETS_IO_NAMES 0
+#  define RECV_TYPE_ARG1 int
+#  define RECV_TYPE_ARG3 size_t
+#  define SEND_TYPE_ARG1 int
+#  define SEND_TYPE_ARG3 size_t
+#endif
+
 /* ---------------------------------------------------------------- */
 /*                        Watt-32 tcp/ip SPECIFIC                   */
 /* ---------------------------------------------------------------- */
 /*                        COMPILER SPECIFIC                         */
 /* ---------------------------------------------------------------- */
 
-/* Undef keyword 'const' if it does not work.  */
-/* #undef const */
+/* Define to nothing if compiler does not support 'const' qualifier. */
+/* #define const */
+
+/* Define to nothing if compiler does not support 'volatile' qualifier. */
+/* #define volatile */
 
 /* Windows should not have HAVE_GMTIME_R defined */
 /* #undef HAVE_GMTIME_R */
 #define HAVE_LONGLONG 1
 #endif
 
-/* Define to avoid VS2005 complaining about portable C functions */
+/* Define to avoid VS2005 complaining about portable C functions. */
 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
 #define _CRT_SECURE_NO_DEPRECATE 1
 #define _CRT_NONSTDC_NO_DEPRECATE 1
 #endif
 
-/* VS2005 and later dafault size for time_t is 64-bit, unless */
-/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
+/* VS2005 and later dafault size for time_t is 64-bit, unless
+   _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
 #  ifndef _USE_32BIT_TIME_T
 #    define SIZEOF_TIME_T 8
 #endif
 
 /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
-   2000 as a supported build target. VS2008 default installations provide an
-   embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
-   valid build target for VS2008. Popular belief is that binaries built using
-   Windows SDK versions 6.X and Windows 2000 as a build target are functional */
+   2000 as a supported build target. VS2008 default installations provide
+   an embedded Windows SDK v6.0A along with the claim that Windows 2000 is
+   a valid build target for VS2008. Popular belief is that binaries built
+   with VS2008 using Windows SDK versions 6.X and Windows 2000 as a build
+   target are functional. */
 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#  define VS2008_MINIMUM_TARGET 0x0500
+#  define VS2008_MIN_TARGET 0x0500
 #endif
 
 /* When no build target is specified VS2008 default build target is Windows
    for VS2008 we will target the minimum Officially supported build target,
    which happens to be Windows XP. */
 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#  define VS2008_DEFAULT_TARGET  0x0501
+#  define VS2008_DEF_TARGET  0x0501
 #endif
 
-/* VS2008 default target settings and minimum build target check */
+/* VS2008 default target settings and minimum build target check. */
 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
 #  ifndef _WIN32_WINNT
-#    define _WIN32_WINNT VS2008_DEFAULT_TARGET
+#    define _WIN32_WINNT VS2008_DEF_TARGET
 #  endif
 #  ifndef WINVER
-#    define WINVER VS2008_DEFAULT_TARGET
+#    define WINVER VS2008_DEF_TARGET
 #  endif
-#  if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
+#  if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)
 #    error VS2008 does not support Windows build targets prior to Windows 2000
 #  endif
 #endif
 /* ---------------------------------------------------------------- */
 
 /*
- * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
+ * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.
  */
 
-/* Define USE_ARES to enable c-ares asynchronous DNS lookups */
+/* Define to enable c-ares asynchronous DNS lookups. */
 /* #define USE_ARES 1 */
 
-/* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
-#define USE_THREADS_WIN32 1
+/* Default define to enable threaded asynchronous DNS lookups. */
+#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \
+    !defined(USE_THREADS_WIN32)
+#  define USE_THREADS_WIN32 1
+#endif
 
 #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
 #  error "Only one DNS lookup specialty may be defined at most"
 #undef OS
 #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
 #define OS "i386-pc-win32"
+#elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (MSVC >=2005 or gcc) */
+#define OS "x86_64-pc-win32"
 #elif defined(_M_IA64) /* Itanium */
 #define OS "ia64-pc-win32"
-#elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
-#define OS "amd64-pc-win32"
 #else
 #define OS "unknown-pc-win32"
 #endif
 /* Name of package */
 #define PACKAGE "curl"
 
+/* If you want to build curl with the built-in manual */
+#define USE_MANUAL 1
+
 #if defined(__POCC__) || (USE_IPV6)
 #  define ENABLE_IPV6 1
 #endif
 
-#endif /* __LIB_CONFIG_WIN32_H */
+#endif /* HEADER_CURL_CONFIG_WIN32_H */
index 3a5913e..a8ab0d3 100644 (file)
@@ -1,5 +1,26 @@
-#ifndef __LIB_CONFIG_WIN32CE_H
-#define __LIB_CONFIG_WIN32CE_H
+#ifndef HEADER_CURL_CONFIG_WIN32CE_H
+#define HEADER_CURL_CONFIG_WIN32CE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
 
 /* ================================================================ */
 /*  lib/config-win32ce.h - Hand crafted config file for windows ce  */
@@ -18,6 +39,9 @@
 /* Define if you have the <crypto.h> header file.  */
 /* #define HAVE_CRYPTO_H 1 */
 
+/* Define if you have the <errno.h> header file.  */
+/* #define HAVE_ERRNO_H 1 */
+
 /* Define if you have the <err.h> header file.  */
 /* #define HAVE_ERR_H 1 */
 
@@ -55,7 +79,7 @@
 #define HAVE_STDLIB_H 1
 
 /* Define if you have the <process.h> header file.  */
-#define HAVE_PROCESS_H 1
+/* #define HAVE_PROCESS_H 1 */
 
 /* Define if you have the <sys/param.h> header file.  */
 /* #define HAVE_SYS_PARAM_H 1 */
 /*                       WinCE                                      */
 /* ---------------------------------------------------------------- */
 
+#ifndef UNICODE
+#  define UNICODE
+#endif
+
+#ifndef _UNICODE
+#  define _UNICODE
+#endif
+
 #define CURL_DISABLE_FILE 1
 #define CURL_DISABLE_TELNET 1
 #define CURL_DISABLE_LDAP 1
 
 extern int stat(const char *path,struct stat *buffer );
 
-#endif /* __LIB_CONFIG_WIN32CE_H */
+#endif /* HEADER_CURL_CONFIG_WIN32CE_H */
diff --git a/lib/conncache.c b/lib/conncache.c
new file mode 100644 (file)
index 0000000..48271f7
--- /dev/null
@@ -0,0 +1,280 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012 - 2013, 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_setup.h"
+
+#include <curl/curl.h>
+
+#include "urldata.h"
+#include "url.h"
+#include "progress.h"
+#include "multiif.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "bundles.h"
+#include "conncache.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+static void free_bundle_hash_entry(void *freethis)
+{
+  struct connectbundle *b = (struct connectbundle *) freethis;
+
+  Curl_bundle_destroy(b);
+}
+
+struct conncache *Curl_conncache_init(int size)
+{
+  struct conncache *connc;
+
+  connc = calloc(1, sizeof(struct conncache));
+  if(!connc)
+    return NULL;
+
+  connc->hash = Curl_hash_alloc(size, Curl_hash_str,
+                                Curl_str_key_compare, free_bundle_hash_entry);
+
+  if(!connc->hash) {
+    free(connc);
+    return NULL;
+  }
+
+  return connc;
+}
+
+void Curl_conncache_destroy(struct conncache *connc)
+{
+  if(connc) {
+    Curl_hash_destroy(connc->hash);
+    connc->hash = NULL;
+    free(connc);
+  }
+}
+
+struct connectbundle *Curl_conncache_find_bundle(struct conncache *connc,
+                                                 char *hostname)
+{
+  struct connectbundle *bundle = NULL;
+
+  if(connc)
+    bundle = Curl_hash_pick(connc->hash, hostname, strlen(hostname)+1);
+
+  return bundle;
+}
+
+static bool conncache_add_bundle(struct conncache *connc,
+                                 char *hostname,
+                                 struct connectbundle *bundle)
+{
+  void *p;
+
+  p = Curl_hash_add(connc->hash, hostname, strlen(hostname)+1, bundle);
+
+  return p?TRUE:FALSE;
+}
+
+static void conncache_remove_bundle(struct conncache *connc,
+                                    struct connectbundle *bundle)
+{
+  struct curl_hash_iterator iter;
+  struct curl_hash_element *he;
+
+  if(!connc)
+    return;
+
+  Curl_hash_start_iterate(connc->hash, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    if(he->ptr == bundle) {
+      /* The bundle is destroyed by the hash destructor function,
+         free_bundle_hash_entry() */
+      Curl_hash_delete(connc->hash, he->key, he->key_len);
+      return;
+    }
+
+    he = Curl_hash_next_element(&iter);
+  }
+}
+
+CURLcode Curl_conncache_add_conn(struct conncache *connc,
+                                 struct connectdata *conn)
+{
+  CURLcode result;
+  struct connectbundle *bundle;
+  struct connectbundle *new_bundle = NULL;
+  struct SessionHandle *data = conn->data;
+
+  bundle = Curl_conncache_find_bundle(data->state.conn_cache,
+                                      conn->host.name);
+  if(!bundle) {
+    result = Curl_bundle_create(data, &new_bundle);
+    if(result != CURLE_OK)
+      return result;
+
+    if(!conncache_add_bundle(data->state.conn_cache,
+                             conn->host.name, new_bundle)) {
+      Curl_bundle_destroy(new_bundle);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    bundle = new_bundle;
+  }
+
+  result = Curl_bundle_add_conn(bundle, conn);
+  if(result != CURLE_OK) {
+    if(new_bundle)
+      conncache_remove_bundle(data->state.conn_cache, new_bundle);
+    return result;
+  }
+
+  connc->num_connections++;
+
+  return CURLE_OK;
+}
+
+void Curl_conncache_remove_conn(struct conncache *connc,
+                                struct connectdata *conn)
+{
+  struct connectbundle *bundle = conn->bundle;
+
+  /* The bundle pointer can be NULL, since this function can be called
+     due to a failed connection attempt, before being added to a bundle */
+  if(bundle) {
+    Curl_bundle_remove_conn(bundle, conn);
+    if(bundle->num_connections == 0) {
+      conncache_remove_bundle(connc, bundle);
+    }
+    connc->num_connections--;
+
+    DEBUGF(infof(conn->data, "The cache now contains %d members\n",
+                 connc->num_connections));
+  }
+}
+
+/* This function iterates the entire connection cache and calls the
+   function func() with the connection pointer as the first argument
+   and the supplied 'param' argument as the other,
+
+   Return 0 from func() to continue the loop, return 1 to abort it.
+ */
+void Curl_conncache_foreach(struct conncache *connc,
+                            void *param,
+                            int (*func)(struct connectdata *conn, void *param))
+{
+  struct curl_hash_iterator iter;
+  struct curl_llist_element *curr;
+  struct curl_hash_element *he;
+
+  if(!connc)
+    return;
+
+  Curl_hash_start_iterate(connc->hash, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    struct connectbundle *bundle;
+    struct connectdata *conn;
+
+    bundle = he->ptr;
+
+    curr = bundle->conn_list->head;
+    while(curr) {
+      /* Yes, we need to update curr before calling func(), because func()
+         might decide to remove the connection */
+      conn = curr->ptr;
+      curr = curr->next;
+
+      if(1 == func(conn, param))
+        return;
+    }
+
+    he = Curl_hash_next_element(&iter);
+  }
+}
+
+/* Return the first connection found in the cache. Used when closing all
+   connections */
+struct connectdata *
+Curl_conncache_find_first_connection(struct conncache *connc)
+{
+  struct curl_hash_iterator iter;
+  struct curl_llist_element *curr;
+  struct curl_hash_element *he;
+  struct connectbundle *bundle;
+
+  Curl_hash_start_iterate(connc->hash, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    bundle = he->ptr;
+
+    curr = bundle->conn_list->head;
+    if(curr) {
+      return curr->ptr;
+    }
+
+    he = Curl_hash_next_element(&iter);
+  }
+
+  return NULL;
+}
+
+
+#if 0
+/* Useful for debugging the connection cache */
+void Curl_conncache_print(struct conncache *connc)
+{
+  struct curl_hash_iterator iter;
+  struct curl_llist_element *curr;
+  struct curl_hash_element *he;
+
+  if(!connc)
+    return;
+
+  fprintf(stderr, "=Bundle cache=\n");
+
+  Curl_hash_start_iterate(connc->hash, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    struct connectbundle *bundle;
+    struct connectdata *conn;
+
+    bundle = he->ptr;
+
+    fprintf(stderr, "%s -", he->key);
+    curr = bundle->conn_list->head;
+    while(curr) {
+      conn = curr->ptr;
+
+      fprintf(stderr, " [%p %d]", (void *)conn, conn->inuse);
+      curr = curr->next;
+    }
+    fprintf(stderr, "\n");
+
+    he = Curl_hash_next_element(&iter);
+  }
+}
+#endif
diff --git a/lib/conncache.h b/lib/conncache.h
new file mode 100644 (file)
index 0000000..f5e41f1
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef HEADER_CURL_CONNCACHE_H
+#define HEADER_CURL_CONNCACHE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+struct conncache {
+  struct curl_hash *hash;
+  size_t num_connections;
+};
+
+struct conncache *Curl_conncache_init(int size);
+
+void Curl_conncache_destroy(struct conncache *connc);
+
+struct connectbundle *Curl_conncache_find_bundle(struct conncache *connc,
+                                                 char *hostname);
+
+CURLcode Curl_conncache_add_conn(struct conncache *connc,
+                                 struct connectdata *conn);
+
+void Curl_conncache_remove_conn(struct conncache *connc,
+                                struct connectdata *conn);
+
+void Curl_conncache_foreach(struct conncache *connc,
+                            void *param,
+                            int (*func)(struct connectdata *conn,
+                                        void *param));
+
+struct connectdata *
+Curl_conncache_find_first_connection(struct conncache *connc);
+
+void Curl_conncache_print(struct conncache *connc);
+
+#endif /* HEADER_CURL_CONNCACHE_H */
index 7638854..2b5719d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h> /* <netinet/tcp.h> may need it */
 #endif
@@ -40,9 +34,6 @@
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -52,9 +43,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
 #include <sys/filio.h>
 #include <inet.h>
 #endif
 
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
@@ -89,6 +73,9 @@
 #include "inet_pton.h"
 #include "sslgen.h" /* for Curl_ssl_check_cxn() */
 #include "progress.h"
+#include "warnless.h"
+#include "conncache.h"
+#include "multihandle.h"
 
 /* The last #include file should be: */
 #include "memdebug.h"
 #undef SO_NOSIGPIPE
 #endif
 
-struct Curl_sockaddr_ex {
-  int family;
-  int socktype;
-  int protocol;
-  unsigned int addrlen;
-  union {
-    struct sockaddr addr;
-    struct Curl_sockaddr_storage buff;
-  } _sa_ex_u;
+static bool verifyconnect(curl_socket_t sockfd, int *error);
+
+#if defined(__DragonFly__) || defined(HAVE_WINSOCK_H)
+/* DragonFlyBSD and Windows use millisecond units */
+#define KEEPALIVE_FACTOR(x) (x *= 1000)
+#else
+#define KEEPALIVE_FACTOR(x)
+#endif
+
+#if defined(HAVE_WINSOCK_H) && !defined(SIO_KEEPALIVE_VALS)
+#define SIO_KEEPALIVE_VALS    _WSAIOW(IOC_VENDOR,4)
+
+struct tcp_keepalive {
+  u_long onoff;
+  u_long keepalivetime;
+  u_long keepaliveinterval;
 };
-#define sa_addr _sa_ex_u.addr
+#endif
 
-static bool verifyconnect(curl_socket_t sockfd, int *error);
+static void
+tcpkeepalive(struct SessionHandle *data,
+             curl_socket_t sockfd)
+{
+  int optval = data->set.tcp_keepalive?1:0;
+
+  /* only set IDLE and INTVL if setting KEEPALIVE is successful */
+  if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
+        (void *)&optval, sizeof(optval)) < 0) {
+    infof(data, "Failed to set SO_KEEPALIVE on fd %d\n", sockfd);
+  }
+  else {
+#if defined(SIO_KEEPALIVE_VALS)
+    struct tcp_keepalive vals;
+    DWORD dummy;
+    vals.onoff = 1;
+    optval = curlx_sltosi(data->set.tcp_keepidle);
+    KEEPALIVE_FACTOR(optval);
+    vals.keepalivetime = optval;
+    optval = curlx_sltosi(data->set.tcp_keepintvl);
+    KEEPALIVE_FACTOR(optval);
+    vals.keepaliveinterval = optval;
+    if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals),
+                NULL, 0, &dummy, NULL, NULL) != 0) {
+      infof(data, "Failed to set SIO_KEEPALIVE_VALS on fd %d: %d\n",
+            (int)sockfd, WSAGetLastError());
+    }
+#else
+#ifdef TCP_KEEPIDLE
+    optval = curlx_sltosi(data->set.tcp_keepidle);
+    KEEPALIVE_FACTOR(optval);
+    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
+          (void *)&optval, sizeof(optval)) < 0) {
+      infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd);
+    }
+#endif
+#ifdef TCP_KEEPINTVL
+    optval = curlx_sltosi(data->set.tcp_keepintvl);
+    KEEPALIVE_FACTOR(optval);
+    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
+          (void *)&optval, sizeof(optval)) < 0) {
+      infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd);
+    }
+#endif
+#ifdef TCP_KEEPALIVE
+    /* Mac OS X style */
+    optval = curlx_sltosi(data->set.tcp_keepidle);
+    KEEPALIVE_FACTOR(optval);
+    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
+          (void *)&optval, sizeof(optval)) < 0) {
+      infof(data, "Failed to set TCP_KEEPALIVE on fd %d\n", sockfd);
+    }
+#endif
+#endif
+  }
+}
 
 static CURLcode
 singleipconnect(struct connectdata *conn,
                 const Curl_addrinfo *ai, /* start connecting to this */
-                long timeout_ms,
                 curl_socket_t *sock,
                 bool *connected);
 
@@ -124,15 +172,19 @@ singleipconnect(struct connectdata *conn,
  * transfer/connection. If the value is negative, the timeout time has already
  * elapsed.
  *
+ * The start time is stored in progress.t_startsingle - as set with
+ * Curl_pgrsTime(..., TIMER_STARTSINGLE);
+ *
  * If 'nowp' is non-NULL, it points to the current time.
  * 'duringconnect' is FALSE if not during a connect, as then of course the
  * connect timeout is not taken into account!
+ *
+ * @unittest: 1303
  */
-long Curl_timeleft(struct connectdata *conn,
+long Curl_timeleft(struct SessionHandle *data,
                    struct timeval *nowp,
                    bool duringconnect)
 {
-  struct SessionHandle *data = conn->data;
   int timeout_set = 0;
   long timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0;
   struct timeval now;
@@ -172,7 +224,7 @@ long Curl_timeleft(struct connectdata *conn,
     nowp = &now;
   }
 
-  /* substract elapsed time */
+  /* subtract elapsed time */
   timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
   if(!timeout_ms)
     /* avoid returning 0 as that means no timeout! */
@@ -182,20 +234,19 @@ long Curl_timeleft(struct connectdata *conn,
 }
 
 /*
- * waitconnect() waits for a TCP connect on the given socket for the specified
- * number if milliseconds. It returns:
+ * checkconnect() checks for a TCP connect on the given socket.
+ * It returns:
  */
 
-#define WAITCONN_CONNECTED     0
-#define WAITCONN_SELECT_ERROR -1
-#define WAITCONN_TIMEOUT       1
-#define WAITCONN_FDSET_ERROR   2
-#define WAITCONN_ABORTED       3
+enum chkconn_t {
+  CHKCONN_SELECT_ERROR = -1,
+  CHKCONN_CONNECTED    = 0,
+  CHKCONN_IDLE         = 1,
+  CHKCONN_FDSET_ERROR  = 2
+};
 
-static
-int waitconnect(struct connectdata *conn,
-                curl_socket_t sockfd, /* socket */
-                long timeout_msec)
+static enum chkconn_t
+checkconnect(curl_socket_t sockfd)
 {
   int rc;
 #ifdef mpeix
@@ -205,34 +256,20 @@ int waitconnect(struct connectdata *conn,
   (void)verifyconnect(sockfd, NULL);
 #endif
 
-  for(;;) {
+  rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, 0);
 
-    /* now select() until we get connect or timeout */
-    rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
-                                                          1000:timeout_msec));
-    if(Curl_pgrsUpdate(conn))
-      return WAITCONN_ABORTED;
+  if(-1 == rc)
+    /* error, no connect here, try next */
+    return CHKCONN_SELECT_ERROR;
 
-    if(-1 == rc)
-      /* error, no connect here, try next */
-      return WAITCONN_SELECT_ERROR;
+  else if(rc & CURL_CSELECT_ERR)
+    /* error condition caught */
+    return CHKCONN_FDSET_ERROR;
 
-    else if(0 == rc) {
-      /* timeout */
-      timeout_msec -= 1000;
-      if(timeout_msec <= 0)
-        return WAITCONN_TIMEOUT;
+  else if(rc)
+    return CHKCONN_CONNECTED;
 
-      continue;
-    }
-
-    if(rc & CURL_CSELECT_ERR)
-      /* error condition caught */
-      return WAITCONN_FDSET_ERROR;
-
-    break;
-  }
-  return WAITCONN_CONNECTED;
+  return CHKCONN_IDLE;
 }
 
 static CURLcode bindlocal(struct connectdata *conn,
@@ -257,51 +294,79 @@ static CURLcode bindlocal(struct connectdata *conn,
   int error;
   char myhost[256] = "";
   int done = 0; /* -1 for error, 1 for address found */
+  bool is_interface = FALSE;
+  bool is_host = FALSE;
+  static const char *if_prefix = "if!";
+  static const char *host_prefix = "host!";
 
   /*************************************************************
    * Select device to bind socket to
    *************************************************************/
-  if ( !dev && !port )
+  if(!dev && !port)
     /* no local kind of binding was requested */
     return CURLE_OK;
 
   memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
 
   if(dev && (strlen(dev)<255) ) {
+    if(strncmp(if_prefix, dev, strlen(if_prefix)) == 0) {
+      dev += strlen(if_prefix);
+      is_interface = TRUE;
+    }
+    else if(strncmp(host_prefix, dev, strlen(host_prefix)) == 0) {
+      dev += strlen(host_prefix);
+      is_host = TRUE;
+    }
 
     /* interface */
-    if(Curl_if2ip(af, dev, myhost, sizeof(myhost))) {
-      /*
-       * We now have the numerical IP address in the 'myhost' buffer
-       */
-      infof(data, "Local Interface %s is ip %s using address family %i\n",
-            dev, myhost, af);
-      done = 1;
+    if(!is_host) {
+      switch(Curl_if2ip(af, conn->scope, dev, myhost, sizeof(myhost))) {
+        case IF2IP_NOT_FOUND:
+          if(is_interface) {
+            /* Do not fall back to treating it as a host name */
+            failf(data, "Couldn't bind to interface '%s'", dev);
+            return CURLE_INTERFACE_FAILED;
+          }
+          break;
+        case IF2IP_AF_NOT_SUPPORTED:
+          /* Signal the caller to try another address family if available */
+          return CURLE_UNSUPPORTED_PROTOCOL;
+        case IF2IP_FOUND:
+          is_interface = TRUE;
+          /*
+           * We now have the numerical IP address in the 'myhost' buffer
+           */
+          infof(data, "Local Interface %s is ip %s using address family %i\n",
+                dev, myhost, af);
+          done = 1;
 
 #ifdef SO_BINDTODEVICE
-      /* I am not sure any other OSs than Linux that provide this feature, and
-       * at the least I cannot test. --Ben
-       *
-       * This feature allows one to tightly bind the local socket to a
-       * particular interface.  This will force even requests to other local
-       * interfaces to go out the external interface.
-       *
-       *
-       * Only bind to the interface when specified as interface, not just as a
-       * hostname or ip address.
-       */
-      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
-                    dev, (curl_socklen_t)strlen(dev)+1) != 0) {
-        error = SOCKERRNO;
-        infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;"
-              " will do regular bind\n",
-              dev, error, Curl_strerror(conn, error));
-        /* This is typically "errno 1, error: Operation not permitted" if
-           you're not running as root or another suitable privileged user */
-      }
+          /* I am not sure any other OSs than Linux that provide this feature,
+           * and at the least I cannot test. --Ben
+           *
+           * This feature allows one to tightly bind the local socket to a
+           * particular interface.  This will force even requests to other
+           * local interfaces to go out the external interface.
+           *
+           *
+           * Only bind to the interface when specified as interface, not just
+           * as a hostname or ip address.
+           */
+          if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
+                        dev, (curl_socklen_t)strlen(dev)+1) != 0) {
+            error = SOCKERRNO;
+            infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;"
+                  " will do regular bind\n",
+                  dev, error, Curl_strerror(conn, error));
+            /* This is typically "errno 1, error: Operation not permitted" if
+               you're not running as root or another suitable privileged
+               user */
+          }
 #endif
+          break;
+      }
     }
-    else {
+    if(!is_interface) {
       /*
        * This was not an interface, resolve the name as a host name
        * or IP number
@@ -313,16 +378,16 @@ static CURLcode bindlocal(struct connectdata *conn,
       long ipver = conn->ip_version;
       int rc;
 
-      if (af == AF_INET)
+      if(af == AF_INET)
         conn->ip_version = CURL_IPRESOLVE_V4;
 #ifdef ENABLE_IPV6
-      else if (af == AF_INET6)
+      else if(af == AF_INET6)
         conn->ip_version = CURL_IPRESOLVE_V6;
 #endif
 
       rc = Curl_resolv(conn, dev, 0, &h);
       if(rc == CURLRESOLV_PENDING)
-        (void)Curl_wait_for_resolv(conn, &h);
+        (void)Curl_resolver_wait_resolv(conn, &h);
       conn->ip_version = ipver;
 
       if(h) {
@@ -345,10 +410,24 @@ static CURLcode bindlocal(struct connectdata *conn,
     if(done > 0) {
 #ifdef ENABLE_IPV6
       /* ipv6 address */
-      if((af == AF_INET6) &&
-         (Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0)) {
-        si6->sin6_family = AF_INET6;
-        si6->sin6_port = htons(port);
+      if(af == AF_INET6) {
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
+        char *scope_ptr = strchr(myhost, '%');
+        if(scope_ptr)
+          *(scope_ptr++) = 0;
+#endif
+        if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
+          si6->sin6_family = AF_INET6;
+          si6->sin6_port = htons(port);
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
+          if(scope_ptr)
+            /* The "myhost" string either comes from Curl_if2ip or from
+               Curl_printable_address. The latter returns only numeric scope
+               IDs and the former returns none at all.  So the scope ID, if
+               present, is known to be numeric */
+            si6->sin6_scope_id = atoi(scope_ptr);
+#endif
+        }
         sizeof_sa = sizeof(struct sockaddr_in6);
       }
       else
@@ -370,14 +449,14 @@ static CURLcode bindlocal(struct connectdata *conn,
   else {
     /* no device was given, prepare sa to match af's needs */
 #ifdef ENABLE_IPV6
-    if ( af == AF_INET6 ) {
+    if(af == AF_INET6) {
       si6->sin6_family = AF_INET6;
       si6->sin6_port = htons(port);
       sizeof_sa = sizeof(struct sockaddr_in6);
     }
     else
 #endif
-    if ( af == AF_INET ) {
+    if(af == AF_INET) {
       si4->sin_family = AF_INET;
       si4->sin_port = htons(port);
       sizeof_sa = sizeof(struct sockaddr_in);
@@ -385,8 +464,8 @@ static CURLcode bindlocal(struct connectdata *conn,
   }
 
   for(;;) {
-    if( bind(sockfd, sock, sizeof_sa) >= 0) {
-    /* we succeeded to bind */
+    if(bind(sockfd, sock, sizeof_sa) >= 0) {
+      /* we succeeded to bind */
       struct Curl_sockaddr_storage add;
       curl_socklen_t size = sizeof(add);
       memset(&add, 0, sizeof(struct Curl_sockaddr_storage));
@@ -508,7 +587,7 @@ static CURLcode trynextip(struct connectdata *conn,
   *connected = FALSE;
 
   if(sockindex != FIRSTSOCKET) {
-    sclose(fd_to_close);
+    Curl_closesocket(conn, fd_to_close);
     return CURLE_COULDNT_CONNECT; /* no next */
   }
 
@@ -516,19 +595,19 @@ static CURLcode trynextip(struct connectdata *conn,
   ai = conn->ip_addr->ai_next;
 
   while(ai) {
-    CURLcode res = singleipconnect(conn, ai, 0L, &sockfd, connected);
+    CURLcode res = singleipconnect(conn, ai, &sockfd, connected);
     if(res)
       return res;
     if(sockfd != CURL_SOCKET_BAD) {
       /* store the new socket descriptor */
       conn->sock[sockindex] = sockfd;
       conn->ip_addr = ai;
-      sclose(fd_to_close);
+      Curl_closesocket(conn, fd_to_close);
       return CURLE_OK;
     }
     ai = ai->ai_next;
   }
-  sclose(fd_to_close);
+  Curl_closesocket(conn, fd_to_close);
   return CURLE_COULDNT_CONNECT;
 }
 
@@ -644,33 +723,35 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd)
 }
 
 /*
- * Curl_is_connected() is used from the multi interface to check if the
- * firstsocket has connected.
+ * Curl_is_connected() checks if the socket has connected.
  */
 
 CURLcode Curl_is_connected(struct connectdata *conn,
                            int sockindex,
                            bool *connected)
 {
-  int rc;
   struct SessionHandle *data = conn->data;
   CURLcode code = CURLE_OK;
   curl_socket_t sockfd = conn->sock[sockindex];
   long allow = DEFAULT_CONNECT_TIMEOUT;
   int error = 0;
+  struct timeval now;
+  enum chkconn_t chk;
 
   DEBUGASSERT(sockindex >= FIRSTSOCKET && sockindex <= SECONDARYSOCKET);
 
   *connected = FALSE; /* a very negative world view is best */
 
-  if(conn->bits.tcpconnect) {
+  if(conn->bits.tcpconnect[sockindex]) {
     /* we are connected already! */
     *connected = TRUE;
     return CURLE_OK;
   }
 
+  now = Curl_tvnow();
+
   /* figure out how long time we have left to connect */
-  allow = Curl_timeleft(conn, NULL, TRUE);
+  allow = Curl_timeleft(data, &now, TRUE);
 
   if(allow < 0) {
     /* time-out, bail out, go home */
@@ -678,18 +759,33 @@ CURLcode Curl_is_connected(struct connectdata *conn,
     return CURLE_OPERATION_TIMEDOUT;
   }
 
-  /* check for connect without timeout as we want to return immediately */
-  rc = waitconnect(conn, sockfd, 0);
-  if(WAITCONN_TIMEOUT == rc)
+  /* check socket for connect */
+  chk = checkconnect(sockfd);
+  if(CHKCONN_IDLE == chk) {
+    if(curlx_tvdiff(now, conn->connecttime) >= conn->timeoutms_per_addr) {
+      infof(data, "After %ldms connect time, move on!\n",
+            conn->timeoutms_per_addr);
+      goto next;
+    }
+
     /* not an error, but also no connection yet */
     return code;
+  }
 
-  if(WAITCONN_CONNECTED == rc) {
+  if(CHKCONN_CONNECTED == chk) {
     if(verifyconnect(sockfd, &error)) {
-      /* we are connected, awesome! */
-      conn->bits.tcpconnect = TRUE;
+      /* we are connected with TCP, awesome! */
+
+      /* see if we need to do any proxy magic first once we connected */
+      code = Curl_connected_proxy(conn);
+      if(code)
+        return code;
+
+      conn->bits.tcpconnect[sockindex] = TRUE;
+
       *connected = TRUE;
-      Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
+      if(sockindex == FIRSTSOCKET)
+        Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
       Curl_verboseconnect(conn);
       Curl_updateconninfo(conn, sockfd);
 
@@ -699,7 +795,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
   }
   else {
     /* nope, not connected  */
-    if(WAITCONN_FDSET_ERROR == rc) {
+    if(CHKCONN_FDSET_ERROR == chk) {
       (void)verifyconnect(sockfd, &error);
       infof(data, "%s\n",Curl_strerror(conn, error));
     }
@@ -715,7 +811,10 @@ CURLcode Curl_is_connected(struct connectdata *conn,
     data->state.os_errno = error;
     SET_SOCKERRNO(error);
   }
+  next:
 
+  conn->timeoutms_per_addr = conn->ip_addr->ai_next == NULL ?
+                             allow : allow / 2;
   code = trynextip(conn, sockindex, connected);
 
   if(code) {
@@ -734,7 +833,7 @@ static void tcpnodelay(struct connectdata *conn,
 #ifdef TCP_NODELAY
   struct SessionHandle *data= conn->data;
   curl_socklen_t onoff = (curl_socklen_t) data->set.tcp_nodelay;
-  int proto = IPPROTO_TCP;
+  int level = IPPROTO_TCP;
 
 #if 0
   /* The use of getprotobyname() is disabled since it isn't thread-safe on
@@ -746,10 +845,10 @@ static void tcpnodelay(struct connectdata *conn,
      detected. */
   struct protoent *pe = getprotobyname("tcp");
   if(pe)
-    proto = pe->p_proto;
+    level = pe->p_proto;
 #endif
 
-  if(setsockopt(sockfd, proto, TCP_NODELAY, (void *)&onoff,
+  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff,
                 sizeof(onoff)) < 0)
     infof(data, "Could not set TCP_NODELAY: %s\n",
           Curl_strerror(conn, SOCKERRNO));
@@ -777,10 +876,10 @@ static void nosigpipe(struct connectdata *conn,
           Curl_strerror(conn, SOCKERRNO));
 }
 #else
-#define nosigpipe(x,y)
+#define nosigpipe(x,y) Curl_nop_stmt
 #endif
 
-#ifdef WIN32
+#ifdef USE_WINSOCK
 /* When you run a program that uses the Windows Sockets API, you may
    experience slow performance when you copy data to a TCP server.
 
@@ -789,15 +888,37 @@ static void nosigpipe(struct connectdata *conn,
    Work-around: Make the Socket Send Buffer Size Larger Than the Program Send
    Buffer Size
 
+   The problem described in this knowledge-base is applied only to pre-Vista
+   Windows.  Following function trying to detect OS version and skips
+   SO_SNDBUF adjustment for Windows Vista and above.
 */
+#define DETECT_OS_NONE 0
+#define DETECT_OS_PREVISTA 1
+#define DETECT_OS_VISTA_OR_LATER 2
+
 void Curl_sndbufset(curl_socket_t sockfd)
 {
   int val = CURL_MAX_WRITE_SIZE + 32;
   int curval = 0;
   int curlen = sizeof(curval);
 
-  if (getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0)
-    if (curval > val)
+  OSVERSIONINFO osver;
+  static int detectOsState = DETECT_OS_NONE;
+
+  if(detectOsState == DETECT_OS_NONE) {
+    memset(&osver, 0, sizeof(osver));
+    osver.dwOSVersionInfoSize = sizeof(osver);
+    detectOsState = DETECT_OS_PREVISTA;
+    if(GetVersionEx(&osver)) {
+      if(osver.dwMajorVersion >= 6)
+        detectOsState = DETECT_OS_VISTA_OR_LATER;
+    }
+  }
+  if(detectOsState == DETECT_OS_VISTA_OR_LATER)
+    return;
+
+  if(getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0)
+    if(curval > val)
       return;
 
   setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&val, sizeof(val));
@@ -812,73 +933,32 @@ void Curl_sndbufset(curl_socket_t sockfd)
  * CURL_SOCKET_BAD. Other errors will however return proper errors.
  *
  * singleipconnect() connects to the given IP only, and it may return without
- * having connected if used from the multi interface.
+ * having connected.
  */
 static CURLcode
 singleipconnect(struct connectdata *conn,
                 const Curl_addrinfo *ai,
-                long timeout_ms,
                 curl_socket_t *sockp,
                 bool *connected)
 {
   struct Curl_sockaddr_ex addr;
   int rc;
-  int error;
-  bool isconnected;
+  int error = 0;
+  bool isconnected = FALSE;
   struct SessionHandle *data = conn->data;
   curl_socket_t sockfd;
   CURLcode res = CURLE_OK;
-#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
-  struct sockaddr_in6 * const sa6 = (void *)&addr.sa_addr;
-#endif
 
   *sockp = CURL_SOCKET_BAD;
-
-  /*
-   * The Curl_sockaddr_ex structure is basically libcurl's external API
-   * curl_sockaddr structure with enough space available to directly hold
-   * any protocol-specific address structures. The variable declared here
-   * will be used to pass / receive data to/from the fopensocket callback
-   * if this has been set, before that, it is initialized from parameters.
-   */
-
-  addr.family = ai->ai_family;
-  addr.socktype = conn->socktype;
-  addr.protocol = ai->ai_protocol;
-  addr.addrlen = ai->ai_addrlen;
-
-  if(addr.addrlen > sizeof(struct Curl_sockaddr_storage))
-     addr.addrlen = sizeof(struct Curl_sockaddr_storage);
-  memcpy(&addr.sa_addr, ai->ai_addr, addr.addrlen);
-
   *connected = FALSE; /* default is not connected */
 
-  if(data->set.fopensocket)
-   /*
-    * If the opensocket callback is set, all the destination address
-    * information is passed to the callback. Depending on this information the
-    * callback may opt to abort the connection, this is indicated returning
-    * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
-    * the callback returns a valid socket the destination address information
-    * might have been changed and this 'new' address will actually be used
-    * here to connect.
-    */
-    sockfd = data->set.fopensocket(data->set.opensocket_client,
-                                   CURLSOCKTYPE_IPCXN,
-                                   (struct curl_sockaddr *)&addr);
-  else
-    /* opensocket callback not set, so simply create the socket now */
-    sockfd = socket(addr.family, addr.socktype, addr.protocol);
-
-  if(sockfd == CURL_SOCKET_BAD)
-    /* no socket, no connection */
+  res = Curl_socket(conn, ai, &addr, &sockfd);
+  if(res)
+    /* Failed to create the socket, but still return OK since we signal the
+       lack of socket as well. This allows the parent function to keep looping
+       over alternative addresses/socket families etc. */
     return CURLE_OK;
 
-#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
-  if (conn->scope && (addr.family == AF_INET6))
-    sa6->sin6_scope_id = conn->scope;
-#endif
-
   /* store remote address and port used in this connection attempt */
   if(!getaddressinfo((struct sockaddr*)&addr.sa_addr,
                      conn->primary_ip, &conn->primary_port)) {
@@ -886,19 +966,14 @@ singleipconnect(struct connectdata *conn,
     error = ERRNO;
     failf(data, "sa_addr inet_ntop() failed with errno %d: %s",
           error, Curl_strerror(conn, error));
-    sclose(sockfd);
+    Curl_closesocket(conn, sockfd);
     return CURLE_OK;
   }
   memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
-  infof(data, "  Trying %s... ", conn->ip_addr_str);
+  infof(data, "  Trying %s...\n", conn->ip_addr_str);
 
   Curl_persistconninfo(conn);
 
-#ifdef ENABLE_IPV6
-  if(addr.family == AF_INET6)
-    conn->bits.ipv6 = TRUE;
-#endif
-
   if(data->set.tcp_nodelay)
     tcpnodelay(conn, sockfd);
 
@@ -906,36 +981,58 @@ singleipconnect(struct connectdata *conn,
 
   Curl_sndbufset(sockfd);
 
+  if(data->set.tcp_keepalive)
+    tcpkeepalive(data, sockfd);
+
   if(data->set.fsockopt) {
     /* activate callback for setting socket options */
     error = data->set.fsockopt(data->set.sockopt_client,
                                sockfd,
                                CURLSOCKTYPE_IPCXN);
-    if(error) {
-      sclose(sockfd); /* close the socket and bail out */
-      return res;
+
+    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
+      isconnected = TRUE;
+    else if(error) {
+      Curl_closesocket(conn, sockfd); /* close the socket and bail out */
+      return CURLE_ABORTED_BY_CALLBACK;
     }
   }
 
   /* possibly bind the local end to an IP, interface or port */
   res = bindlocal(conn, sockfd, addr.family);
   if(res) {
-    sclose(sockfd); /* close socket and bail out */
+    Curl_closesocket(conn, sockfd); /* close socket and bail out */
+    if(res == CURLE_UNSUPPORTED_PROTOCOL) {
+      /* The address family is not supported on this interface.
+         We can continue trying addresses */
+      return CURLE_OK;
+    }
     return res;
   }
 
   /* set socket non-blocking */
   curlx_nonblock(sockfd, TRUE);
 
+  conn->connecttime = Curl_tvnow();
+  if(conn->num_addr > 1)
+    Curl_expire(data, conn->timeoutms_per_addr);
+
   /* Connect TCP sockets, bind UDP */
-  if(conn->socktype == SOCK_STREAM)
+  if(!isconnected && (conn->socktype == SOCK_STREAM)) {
     rc = connect(sockfd, &addr.sa_addr, addr.addrlen);
-  else
-    rc = 0;
+    if(-1 == rc)
+      error = SOCKERRNO;
+  }
+  else {
+    *sockp = sockfd;
+    return CURLE_OK;
+  }
 
-  if(-1 == rc) {
-    error = SOCKERRNO;
+#ifdef ENABLE_IPV6
+  conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE;
+#endif
 
+  if(-1 == rc) {
     switch (error) {
     case EINPROGRESS:
     case EWOULDBLOCK:
@@ -948,49 +1045,23 @@ singleipconnect(struct connectdata *conn,
     case EAGAIN:
 #endif
 #endif
-      rc = waitconnect(conn, sockfd, timeout_ms);
-      if(WAITCONN_ABORTED == rc) {
-        sclose(sockfd);
-        return CURLE_ABORTED_BY_CALLBACK;
-      }
-      break;
+      *sockp = sockfd;
+      return CURLE_OK;
+
     default:
       /* unknown error, fallthrough and try another address! */
       failf(data, "Failed to connect to %s: %s",
             conn->ip_addr_str, Curl_strerror(conn,error));
       data->state.os_errno = error;
+
+      /* connect failed */
+      Curl_closesocket(conn, sockfd);
+
       break;
     }
   }
-
-  /* The 'WAITCONN_TIMEOUT == rc' comes from the waitconnect(), and not from
-     connect(). We can be sure of this since connect() cannot return 1. */
-  if((WAITCONN_TIMEOUT == rc) &&
-     (data->state.used_interface == Curl_if_multi)) {
-    /* Timeout when running the multi interface */
-    *sockp = sockfd;
-    return CURLE_OK;
-  }
-
-  isconnected = verifyconnect(sockfd, &error);
-
-  if(!rc && isconnected) {
-    /* we are connected, awesome! */
-    *connected = TRUE; /* this is a true connect */
-    infof(data, "connected\n");
-    Curl_updateconninfo(conn, sockfd);
+  else
     *sockp = sockfd;
-    return CURLE_OK;
-  }
-  else if(WAITCONN_TIMEOUT == rc)
-    infof(data, "Timeout\n");
-  else {
-    data->state.os_errno = error;
-    infof(data, "%s\n", Curl_strerror(conn, error));
-  }
-
-  /* connect failed or timed out */
-  sclose(sockfd);
 
   return CURLE_OK;
 }
@@ -1009,8 +1080,6 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
 {
   struct SessionHandle *data = conn->data;
   curl_socket_t sockfd = CURL_SOCKET_BAD;
-  int aliasindex;
-  int num_addr;
   Curl_addrinfo *ai;
   Curl_addrinfo *curr_addr;
 
@@ -1021,13 +1090,12 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
    * Figure out what maximum time we have left
    *************************************************************/
   long timeout_ms;
-  long timeout_per_addr;
 
   DEBUGASSERT(sockconn);
   *connected = FALSE; /* default to not connected */
 
   /* get the timeout left */
-  timeout_ms = Curl_timeleft(conn, &before, TRUE);
+  timeout_ms = Curl_timeleft(data, &before, TRUE);
 
   if(timeout_ms < 0) {
     /* a precaution, no need to continue if time already is up */
@@ -1035,9 +1103,7 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
     return CURLE_OPERATION_TIMEDOUT;
   }
 
-  /* Max time for each address */
-  num_addr = Curl_num_addresses(remotehost->addr);
-  timeout_per_addr = timeout_ms / num_addr;
+  conn->num_addr = Curl_num_addresses(remotehost->addr);
 
   ai = remotehost->addr;
 
@@ -1045,20 +1111,19 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
    * know for the given host. One by one until one IP succeeds.
    */
 
-  if(data->state.used_interface == Curl_if_multi)
-    /* don't hang when doing multi */
-    timeout_per_addr = 0;
-
   /*
    * Connecting with a Curl_addrinfo chain
    */
-  for (curr_addr = ai, aliasindex=0; curr_addr;
-       curr_addr = curr_addr->ai_next, aliasindex++) {
+  for(curr_addr = ai; curr_addr; curr_addr = curr_addr->ai_next) {
+    CURLcode res;
 
-    /* start connecting to the IP curr_addr points to */
-    CURLcode res =
-      singleipconnect(conn, curr_addr, timeout_per_addr, &sockfd, connected);
+    /* Max time for the next address */
+    conn->timeoutms_per_addr = curr_addr->ai_next == NULL ?
+                               timeout_ms : timeout_ms / 2;
 
+    /* start connecting to the IP curr_addr points to */
+    res = singleipconnect(conn, curr_addr,
+                          &sockfd, connected);
     if(res)
       return res;
 
@@ -1079,7 +1144,9 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
 
   if(sockfd == CURL_SOCKET_BAD) {
     /* no good connect was made */
-    failf(data, "couldn't connect to host");
+    failf(data, "couldn't connect to %s at %s:%ld",
+          conn->bits.proxy?"proxy":"host",
+          conn->bits.proxy?conn->proxy.name:conn->host.name, conn->port);
     return CURLE_COULDNT_CONNECT;
   }
 
@@ -1094,6 +1161,21 @@ CURLcode Curl_connecthost(struct connectdata *conn,  /* context */
   return CURLE_OK;
 }
 
+struct connfind {
+  struct connectdata *tofind;
+  bool found;
+};
+
+static int conn_is_conn(struct connectdata *conn, void *param)
+{
+  struct connfind *f = (struct connfind *)param;
+  if(conn == f->tofind) {
+    f->found = TRUE;
+    return 1;
+  }
+  return 0;
+}
+
 /*
  * Used to extract socket and connectdata struct for the most recent
  * transfer on the given SessionHandle.
@@ -1104,10 +1186,24 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
                                   struct connectdata **connp)
 {
   curl_socket_t sockfd;
-  if((data->state.lastconnect != -1) &&
-     (data->state.connc->connects[data->state.lastconnect] != NULL)) {
-    struct connectdata *c =
-      data->state.connc->connects[data->state.lastconnect];
+
+  DEBUGASSERT(data);
+
+  /* this only works for an easy handle that has been used for
+     curl_easy_perform()! */
+  if(data->state.lastconnect && data->multi_easy) {
+    struct connectdata *c = data->state.lastconnect;
+    struct connfind find;
+    find.tofind = data->state.lastconnect;
+    find.found = FALSE;
+
+    Curl_conncache_foreach(data->multi_easy->conn_cache, &find, conn_is_conn);
+
+    if(!find.found) {
+      data->state.lastconnect = NULL;
+      return CURL_SOCKET_BAD;
+    }
+
     if(connp)
       /* only store this if the caller cares for it */
       *connp = c;
@@ -1136,3 +1232,100 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
 
   return sockfd;
 }
+
+/*
+ * Close a socket.
+ *
+ * 'conn' can be NULL, beware!
+ */
+int Curl_closesocket(struct connectdata *conn,
+                      curl_socket_t sock)
+{
+  if(conn && conn->fclosesocket) {
+    if((sock == conn->sock[SECONDARYSOCKET]) &&
+       conn->sock_accepted[SECONDARYSOCKET])
+      /* if this socket matches the second socket, and that was created with
+         accept, then we MUST NOT call the callback but clear the accepted
+         status */
+      conn->sock_accepted[SECONDARYSOCKET] = FALSE;
+    else
+      return conn->fclosesocket(conn->closesocket_client, sock);
+  }
+  sclose(sock);
+
+  if(conn)
+    /* tell the multi-socket code about this */
+    Curl_multi_closed(conn, sock);
+
+  return 0;
+}
+
+/*
+ * Create a socket based on info from 'conn' and 'ai'.
+ *
+ * 'addr' should be a pointer to the correct struct to get data back, or NULL.
+ * 'sockfd' must be a pointer to a socket descriptor.
+ *
+ * If the open socket callback is set, used that!
+ *
+ */
+CURLcode Curl_socket(struct connectdata *conn,
+                     const Curl_addrinfo *ai,
+                     struct Curl_sockaddr_ex *addr,
+                     curl_socket_t *sockfd)
+{
+  struct SessionHandle *data = conn->data;
+  struct Curl_sockaddr_ex dummy;
+
+  if(!addr)
+    /* if the caller doesn't want info back, use a local temp copy */
+    addr = &dummy;
+
+  /*
+   * The Curl_sockaddr_ex structure is basically libcurl's external API
+   * curl_sockaddr structure with enough space available to directly hold
+   * any protocol-specific address structures. The variable declared here
+   * will be used to pass / receive data to/from the fopensocket callback
+   * if this has been set, before that, it is initialized from parameters.
+   */
+
+  addr->family = ai->ai_family;
+  addr->socktype = conn->socktype;
+  addr->protocol = conn->socktype==SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol;
+  addr->addrlen = ai->ai_addrlen;
+
+  if(addr->addrlen > sizeof(struct Curl_sockaddr_storage))
+     addr->addrlen = sizeof(struct Curl_sockaddr_storage);
+  memcpy(&addr->sa_addr, ai->ai_addr, addr->addrlen);
+
+  if(data->set.fopensocket)
+   /*
+    * If the opensocket callback is set, all the destination address
+    * information is passed to the callback. Depending on this information the
+    * callback may opt to abort the connection, this is indicated returning
+    * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
+    * the callback returns a valid socket the destination address information
+    * might have been changed and this 'new' address will actually be used
+    * here to connect.
+    */
+    *sockfd = data->set.fopensocket(data->set.opensocket_client,
+                                    CURLSOCKTYPE_IPCXN,
+                                    (struct curl_sockaddr *)addr);
+  else
+    /* opensocket callback not set, so simply create the socket now */
+    *sockfd = socket(addr->family, addr->socktype, addr->protocol);
+
+  if(*sockfd == CURL_SOCKET_BAD)
+    /* no socket, no connection */
+    return CURLE_COULDNT_CONNECT;
+
+#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
+  if(conn->scope && (addr->family == AF_INET6)) {
+    struct sockaddr_in6 * const sa6 = (void *)&addr->sa_addr;
+    sa6->sin6_scope_id = conn->scope;
+  }
+#endif
+
+  return CURLE_OK;
+
+}
index 6cc403d..ab98002 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CONNECT_H
-#define __CONNECT_H
+#ifndef HEADER_CURL_CONNECT_H
+#define HEADER_CURL_CONNECT_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
 #include "nonblock.h" /* for curlx_nonblock(), formerly Curl_nonblock() */
+#include "sockaddr.h"
 
 CURLcode Curl_is_connected(struct connectdata *conn,
                            int sockindex,
@@ -37,7 +39,7 @@ CURLcode Curl_connecthost(struct connectdata *conn,
 
 /* generic function that returns how much time there's left to run, according
    to the timeouts set */
-long Curl_timeleft(struct connectdata *conn,
+long Curl_timeleft(struct SessionHandle *data,
                    struct timeval *nowp,
                    bool duringconnect);
 
@@ -52,7 +54,7 @@ long Curl_timeleft(struct connectdata *conn,
 curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
                                   struct connectdata **connp);
 
-#ifdef WIN32
+#ifdef USE_WINSOCK
 /* When you run a program that uses the Windows Sockets API, you may
    experience slow performance when you copy data to a TCP server.
 
@@ -64,11 +66,42 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
 */
 void Curl_sndbufset(curl_socket_t sockfd);
 #else
-#define Curl_sndbufset(y)
+#define Curl_sndbufset(y) Curl_nop_stmt
 #endif
 
 void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd);
-
 void Curl_persistconninfo(struct connectdata *conn);
+int Curl_closesocket(struct connectdata *conn, curl_socket_t sock);
 
-#endif
+/*
+ * The Curl_sockaddr_ex structure is basically libcurl's external API
+ * curl_sockaddr structure with enough space available to directly hold any
+ * protocol-specific address structures. The variable declared here will be
+ * used to pass / receive data to/from the fopensocket callback if this has
+ * been set, before that, it is initialized from parameters.
+ */
+struct Curl_sockaddr_ex {
+  int family;
+  int socktype;
+  int protocol;
+  unsigned int addrlen;
+  union {
+    struct sockaddr addr;
+    struct Curl_sockaddr_storage buff;
+  } _sa_ex_u;
+};
+#define sa_addr _sa_ex_u.addr
+
+/*
+ * Create a socket based on info from 'conn' and 'ai'.
+ *
+ * Fill in 'addr' and 'sockfd' accordingly if OK is returned. If the open
+ * socket callback is set, used that!
+ *
+ */
+CURLcode Curl_socket(struct connectdata *conn,
+                     const Curl_addrinfo *ai,
+                     struct Curl_sockaddr_ex *addr,
+                     curl_socket_t *sockfd);
+
+#endif /* HEADER_CURL_CONNECT_H */
index 6fb7c8d..c68e6e5 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_LIBZ
 
-#include <stdlib.h>
-#include <string.h>
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "sendf.h"
 #define COMMENT      0x10 /* bit 4 set: file comment present */
 #define RESERVED     0xE0 /* bits 5..7: reserved */
 
+static voidpf
+zalloc_cb(voidpf opaque, unsigned int items, unsigned int size)
+{
+  (void) opaque;
+  /* not a typo, keep it calloc() */
+  return (voidpf) calloc(items, size);
+}
+
+static void
+zfree_cb(voidpf opaque, voidpf ptr)
+{
+  (void) opaque;
+  free(ptr);
+}
+
 static CURLcode
 process_zlib_error(struct connectdata *conn, z_stream *z)
 {
@@ -95,7 +107,7 @@ inflate_stream(struct connectdata *conn,
 
   /* because the buffer size is fixed, iteratively decompress and transfer to
      the client via client_write. */
-  for (;;) {
+  for(;;) {
     /* (re)set buffer for decompressed output for every iteration */
     z->next_out = (Bytef *)decomp;
     z->avail_out = DSIZ;
@@ -161,11 +173,10 @@ Curl_unencode_deflate_write(struct connectdata *conn,
 
   /* Initialize zlib? */
   if(k->zlib_init == ZLIB_UNINIT) {
-    z->zalloc = (alloc_func)Z_NULL;
-    z->zfree = (free_func)Z_NULL;
-    z->opaque = 0;
-    z->next_in = NULL;
-    z->avail_in = 0;
+    memset(z, 0, sizeof(z_stream));
+    z->zalloc = (alloc_func)zalloc_cb;
+    z->zfree = (free_func)zfree_cb;
+
     if(inflateInit(z) != Z_OK)
       return process_zlib_error(conn, z);
     k->zlib_init = ZLIB_INIT;
@@ -272,11 +283,9 @@ Curl_unencode_gzip_write(struct connectdata *conn,
 
   /* Initialize zlib? */
   if(k->zlib_init == ZLIB_UNINIT) {
-    z->zalloc = (alloc_func)Z_NULL;
-    z->zfree = (free_func)Z_NULL;
-    z->opaque = 0;
-    z->next_in = NULL;
-    z->avail_in = 0;
+    memset(z, 0, sizeof(z_stream));
+    z->zalloc = (alloc_func)zalloc_cb;
+    z->zfree = (free_func)zfree_cb;
 
     if(strcmp(zlibVersion(), "1.2.0.4") >= 0) {
       /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */
index 3aff9d3..501f6c8 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CURL_CONTENT_ENCODING_H
-#define __CURL_CONTENT_ENCODING_H
+#ifndef HEADER_CURL_CONTENT_ENCODING_H
+#define HEADER_CURL_CONTENT_ENCODING_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
 
 /*
  * Comma-separated list all supported Content-Encodings ('identity' is implied)
@@ -32,7 +32,7 @@
 void Curl_unencode_cleanup(struct connectdata *conn);
 #else
 #define ALL_CONTENT_ENCODINGS "identity"
-#define Curl_unencode_cleanup(x)
+#define Curl_unencode_cleanup(x) Curl_nop_stmt
 #endif
 
 CURLcode Curl_unencode_deflate_write(struct connectdata *conn,
@@ -45,4 +45,4 @@ Curl_unencode_gzip_write(struct connectdata *conn,
                          ssize_t nread);
 
 
-#endif
+#endif /* HEADER_CURL_CONTENT_ENCODING_H */
index c6460a1..b679067 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -77,14 +77,11 @@ Example set of cookies:
 ****/
 
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
 
-#include <stdlib.h>
-#include <string.h>
-
-#define _MPRINTF_REPLACE /* without this on windows OS we get undefined reference to snprintf */
+#define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
 
 #include "urldata.h"
@@ -92,6 +89,7 @@ Example set of cookies:
 #include "strequal.h"
 #include "strtok.h"
 #include "sendf.h"
+#include "slist.h"
 #include "curl_memory.h"
 #include "share.h"
 #include "strtoofft.h"
@@ -101,7 +99,6 @@ Example set of cookies:
 /* The last #include file should be: */
 #include "memdebug.h"
 
-
 static void freecookie(struct Cookie *co)
 {
   if(co->expirestr)
@@ -110,6 +107,8 @@ static void freecookie(struct Cookie *co)
     free(co->domain);
   if(co->path)
     free(co->path);
+  if(co->spath)
+    free(co->spath);
   if(co->name)
     free(co->name);
   if(co->value)
@@ -122,15 +121,139 @@ static void freecookie(struct Cookie *co)
   free(co);
 }
 
-static bool tailmatch(const char *little, const char *bigone)
+static bool tailmatch(const char *cooke_domain, const char *hostname)
+{
+  size_t cookie_domain_len = strlen(cooke_domain);
+  size_t hostname_len = strlen(hostname);
+
+  if(hostname_len < cookie_domain_len)
+    return FALSE;
+
+  if(!Curl_raw_equal(cooke_domain, hostname+hostname_len-cookie_domain_len))
+    return FALSE;
+
+  /* A lead char of cookie_domain is not '.'.
+     RFC6265 4.1.2.3. The Domain Attribute says:
+       For example, if the value of the Domain attribute is
+       "example.com", the user agent will include the cookie in the Cookie
+       header when making HTTP requests to example.com, www.example.com, and
+       www.corp.example.com.
+   */
+  if(hostname_len == cookie_domain_len)
+    return TRUE;
+  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
+    return TRUE;
+  return FALSE;
+}
+
+/*
+ * matching cookie path and url path
+ * RFC6265 5.1.4 Paths and Path-Match
+ */
+static bool pathmatch(const char* cookie_path, const char* request_uri)
 {
-  size_t littlelen = strlen(little);
-  size_t biglen = strlen(bigone);
+  size_t cookie_path_len;
+  size_t uri_path_len;
+  char* uri_path = NULL;
+  char* pos;
+  bool ret = FALSE;
+
+  /* cookie_path must not have last '/' separator. ex: /sample */
+  cookie_path_len = strlen(cookie_path);
+  if(1 == cookie_path_len) {
+    /* cookie_path must be '/' */
+    return TRUE;
+  }
 
-  if(littlelen > biglen)
+  uri_path = strdup(request_uri);
+  if(!uri_path)
     return FALSE;
+  pos = strchr(uri_path, '?');
+  if(pos)
+    *pos = 0x0;
+
+  /* #-fragments are already cut off! */
+  if(0 == strlen(uri_path) || uri_path[0] != '/') {
+    free(uri_path);
+    uri_path = strdup("/");
+    if(!uri_path)
+      return FALSE;
+  }
+
+  /* here, RFC6265 5.1.4 says
+     4. Output the characters of the uri-path from the first character up
+        to, but not including, the right-most %x2F ("/").
+     but URL path /hoge?fuga=xxx means /hoge/index.cgi?fuga=xxx in some site
+     without redirect.
+     Ignore this algorithm because /hoge is uri path for this case
+     (uri path is not /).
+   */
+
+  uri_path_len = strlen(uri_path);
+
+  if(uri_path_len < cookie_path_len) {
+    ret = FALSE;
+    goto pathmatched;
+  }
+
+  /* not using checkprefix() because matching should be case-sensitive */
+  if(strncmp(cookie_path, uri_path, cookie_path_len)) {
+    ret = FALSE;
+    goto pathmatched;
+  }
+
+  /* The cookie-path and the uri-path are identical. */
+  if(cookie_path_len == uri_path_len) {
+    ret = TRUE;
+    goto pathmatched;
+  }
+
+  /* here, cookie_path_len < url_path_len */
+  if(uri_path[cookie_path_len] == '/') {
+    ret = TRUE;
+    goto pathmatched;
+  }
+
+  ret = FALSE;
+
+pathmatched:
+  free(uri_path);
+  return ret;
+}
+
+/*
+ * cookie path sanitize
+ */
+static char *sanitize_cookie_path(const char *cookie_path)
+{
+  size_t len;
+  char *new_path = strdup(cookie_path);
+  if(!new_path)
+    return NULL;
+
+  /* some stupid site sends path attribute with '"'. */
+  if(new_path[0] == '\"') {
+    memmove((void *)new_path, (const void *)(new_path + 1), strlen(new_path));
+  }
+  if(new_path[strlen(new_path) - 1] == '\"') {
+    new_path[strlen(new_path) - 1] = 0x0;
+  }
 
-  return (bool)Curl_raw_equal(little, bigone+biglen-littlelen);
+  /* RFC6265 5.2.4 The Path Attribute */
+  if(new_path[0] != '/') {
+    /* Let cookie-path be the default-path. */
+    free(new_path);
+    new_path = strdup("/");
+    return new_path;
+  }
+
+  /* convert /hoge/ to /hoge */
+  len = strlen(new_path);
+  if(1 < len && new_path[len - 1] == '/') {
+    new_path[len - 1] = 0x0;
+  }
+
+  return new_path;
 }
 
 /*
@@ -148,9 +271,9 @@ void Curl_cookie_loadfiles(struct SessionHandle *data)
                                        data->set.cookiesession);
       list = list->next;
     }
-    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
     curl_slist_free_all(data->change.cookielist); /* clean up list */
     data->change.cookielist = NULL; /* don't do this again! */
+    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
   }
 }
 
@@ -174,6 +297,9 @@ static void strstore(char **str, const char *newstr)
  *
  * Add a single cookie line to the cookie keeping object.
  *
+ * Be aware that sometimes we get an IP-only host name, and that might also be
+ * a numerical IPv6 address.
+ *
  ***************************************************************************/
 
 struct Cookie *
@@ -210,7 +336,6 @@ Curl_cookie_add(struct SessionHandle *data,
   if(httpheader) {
     /* This line was read off a HTTP-header */
     const char *ptr;
-    const char *sep;
     const char *semiptr;
     char *what;
 
@@ -227,183 +352,153 @@ Curl_cookie_add(struct SessionHandle *data,
 
     ptr = lineptr;
     do {
-      /* we have a <what>=<this> pair or a 'secure' word here */
-      sep = strchr(ptr, '=');
-      if(sep && (!semiptr || (semiptr>sep)) ) {
-        /*
-         * There is a = sign and if there was a semicolon too, which make sure
-         * that the semicolon comes _after_ the equal sign.
-         */
-
-        name[0]=what[0]=0; /* init the buffers */
-        if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;=]=%"
-                       MAX_COOKIE_LINE_TXT "[^;\r\n]",
-                       name, what)) {
-          /* this is a <name>=<what> pair. We use strstore() below to properly
-             deal with received cookie headers that have the same string
-             property set more than once, and then we use the last one. */
-
-          const char *whatptr;
-
-          /* Strip off trailing whitespace from the 'what' */
-          size_t len=strlen(what);
-          while(len && ISBLANK(what[len-1])) {
-            what[len-1]=0;
-            len--;
-          }
+      /* we have a <what>=<this> pair or a stand-alone word here */
+      name[0]=what[0]=0; /* init the buffers */
+      if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n =]=%"
+                     MAX_COOKIE_LINE_TXT "[^;\r\n]",
+                     name, what)) {
+        /* Use strstore() below to properly deal with received cookie
+           headers that have the same string property set more than once,
+           and then we use the last one. */
+        const char *whatptr;
+        bool done = FALSE;
+        bool sep;
+        size_t len=strlen(what);
+        const char *endofn = &ptr[ strlen(name) ];
+
+        /* skip trailing spaces in name */
+        while(*endofn && ISBLANK(*endofn))
+          endofn++;
+
+        /* name ends with a '=' ? */
+        sep = (*endofn == '=')?TRUE:FALSE;
+
+        /* Strip off trailing whitespace from the 'what' */
+        while(len && ISBLANK(what[len-1])) {
+          what[len-1]=0;
+          len--;
+        }
 
-          /* Skip leading whitespace from the 'what' */
-          whatptr=what;
-          while(*whatptr && ISBLANK(*whatptr)) {
-            whatptr++;
-          }
+        /* Skip leading whitespace from the 'what' */
+        whatptr=what;
+        while(*whatptr && ISBLANK(*whatptr))
+          whatptr++;
 
-          if(Curl_raw_equal("path", name)) {
-            strstore(&co->path, whatptr);
-            if(!co->path) {
-              badcookie = TRUE; /* out of memory bad */
-              break;
-            }
-          }
-          else if(Curl_raw_equal("domain", name)) {
-            /* note that this name may or may not have a preceeding dot, but
-               we don't care about that, we treat the names the same anyway */
-
-            const char *domptr=whatptr;
-            int dotcount=1;
-
-            /* Count the dots, we need to make sure that there are enough
-               of them. */
-
-            if('.' == whatptr[0])
-              /* don't count the initial dot, assume it */
-              domptr++;
-
-            do {
-              domptr = strchr(domptr, '.');
-              if(domptr) {
-                domptr++;
-                dotcount++;
-              }
-            } while(domptr);
-
-            /* The original Netscape cookie spec defined that this domain name
-               MUST have three dots (or two if one of the seven holy TLDs),
-               but it seems that these kinds of cookies are in use "out there"
-               so we cannot be that strict. I've therefore lowered the check
-               to not allow less than two dots. */
-
-            if(dotcount < 2) {
-              /* Received and skipped a cookie with a domain using too few
-                 dots. */
-              badcookie=TRUE; /* mark this as a bad cookie */
-              infof(data, "skipped cookie with illegal dotcount domain: %s\n",
-                    whatptr);
-            }
-            else {
-              /* Now, we make sure that our host is within the given domain,
-                 or the given domain is not valid and thus cannot be set. */
-
-              if('.' == whatptr[0])
-                whatptr++; /* ignore preceeding dot */
-
-              if(!domain || tailmatch(whatptr, domain)) {
-                const char *tailptr=whatptr;
-                if(tailptr[0] == '.')
-                  tailptr++;
-                strstore(&co->domain, tailptr); /* don't prefix w/dots
-                                                   internally */
-                if(!co->domain) {
-                  badcookie = TRUE;
-                  break;
-                }
-                co->tailmatch=TRUE; /* we always do that if the domain name was
-                                       given */
-              }
-              else {
-                /* we did not get a tailmatch and then the attempted set domain
-                   is not a domain to which the current host belongs. Mark as
-                   bad. */
-                badcookie=TRUE;
-                infof(data, "skipped cookie with bad tailmatch domain: %s\n",
-                      whatptr);
-              }
-            }
+        if(!len) {
+          /* this was a "<name>=" with no content, and we must allow
+             'secure' and 'httponly' specified this weirdly */
+          done = TRUE;
+          if(Curl_raw_equal("secure", name))
+            co->secure = TRUE;
+          else if(Curl_raw_equal("httponly", name))
+            co->httponly = TRUE;
+          else if(sep)
+            /* there was a '=' so we're not done parsing this field */
+            done = FALSE;
+        }
+        if(done)
+          ;
+        else if(Curl_raw_equal("path", name)) {
+          strstore(&co->path, whatptr);
+          if(!co->path) {
+            badcookie = TRUE; /* out of memory bad */
+            break;
           }
-          else if(Curl_raw_equal("version", name)) {
-            strstore(&co->version, whatptr);
-            if(!co->version) {
-              badcookie = TRUE;
-              break;
-            }
+          co->spath = sanitize_cookie_path(co->path);
+          if(!co->spath) {
+            badcookie = TRUE; /* out of memory bad */
+            break;
           }
-          else if(Curl_raw_equal("max-age", name)) {
-            /* Defined in RFC2109:
-
-               Optional.  The Max-Age attribute defines the lifetime of the
-               cookie, in seconds.  The delta-seconds value is a decimal non-
-               negative integer.  After delta-seconds seconds elapse, the
-               client should discard the cookie.  A value of zero means the
-               cookie should be discarded immediately.
-
-             */
-            strstore(&co->maxage, whatptr);
-            if(!co->maxage) {
+        }
+        else if(Curl_raw_equal("domain", name)) {
+          /* Now, we make sure that our host is within the given domain,
+             or the given domain is not valid and thus cannot be set. */
+
+          if('.' == whatptr[0])
+            whatptr++; /* ignore preceding dot */
+
+          if(!domain || tailmatch(whatptr, domain)) {
+            const char *tailptr=whatptr;
+            if(tailptr[0] == '.')
+              tailptr++;
+            strstore(&co->domain, tailptr); /* don't prefix w/dots
+                                               internally */
+            if(!co->domain) {
               badcookie = TRUE;
               break;
             }
-            co->expires =
-              strtol((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0],NULL,10)
-                + (long)now;
+            co->tailmatch=TRUE; /* we always do that if the domain name was
+                                   given */
           }
-          else if(Curl_raw_equal("expires", name)) {
-            strstore(&co->expirestr, whatptr);
-            if(!co->expirestr) {
-              badcookie = TRUE;
-              break;
-            }
-            /* Note that if the date couldn't get parsed for whatever reason,
-               the cookie will be treated as a session cookie */
-            co->expires = curl_getdate(what, &now);
-
-            /* Session cookies have expires set to 0 so if we get that back
-               from the date parser let's add a second to make it a
-               non-session cookie */
-            if (co->expires == 0)
-              co->expires = 1;
-            else if( co->expires < 0 )
-                co->expires = 0;
+          else {
+            /* we did not get a tailmatch and then the attempted set domain
+               is not a domain to which the current host belongs. Mark as
+               bad. */
+            badcookie=TRUE;
+            infof(data, "skipped cookie with bad tailmatch domain: %s\n",
+                  whatptr);
           }
-          else if(!co->name) {
-            co->name = strdup(name);
-            co->value = strdup(whatptr);
-            if(!co->name || !co->value) {
-              badcookie = TRUE;
-              break;
-            }
+        }
+        else if(Curl_raw_equal("version", name)) {
+          strstore(&co->version, whatptr);
+          if(!co->version) {
+            badcookie = TRUE;
+            break;
           }
-          /*
-            else this is the second (or more) name we don't know
-            about! */
         }
-        else {
-          /* this is an "illegal" <what>=<this> pair */
+        else if(Curl_raw_equal("max-age", name)) {
+          /* Defined in RFC2109:
+
+             Optional.  The Max-Age attribute defines the lifetime of the
+             cookie, in seconds.  The delta-seconds value is a decimal non-
+             negative integer.  After delta-seconds seconds elapse, the
+             client should discard the cookie.  A value of zero means the
+             cookie should be discarded immediately.
+
+          */
+          strstore(&co->maxage, whatptr);
+          if(!co->maxage) {
+            badcookie = TRUE;
+            break;
+          }
+          co->expires =
+            strtol((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0],NULL,10)
+            + (long)now;
         }
-      }
-      else {
-        if(sscanf(ptr, "%" MAX_COOKIE_LINE_TXT "[^;\r\n]",
-                  what)) {
-          if(Curl_raw_equal("secure", what)) {
-            co->secure = TRUE;
+        else if(Curl_raw_equal("expires", name)) {
+          strstore(&co->expirestr, whatptr);
+          if(!co->expirestr) {
+            badcookie = TRUE;
+            break;
           }
-          else if (Curl_raw_equal("httponly", what)) {
-            co->httponly = TRUE;
+          /* Note that if the date couldn't get parsed for whatever reason,
+             the cookie will be treated as a session cookie */
+          co->expires = curl_getdate(what, &now);
+
+          /* Session cookies have expires set to 0 so if we get that back
+             from the date parser let's add a second to make it a
+             non-session cookie */
+          if(co->expires == 0)
+            co->expires = 1;
+          else if(co->expires < 0)
+            co->expires = 0;
+        }
+        else if(!co->name) {
+          co->name = strdup(name);
+          co->value = strdup(whatptr);
+          if(!co->name || !co->value) {
+            badcookie = TRUE;
+            break;
           }
-          /* else,
-             unsupported keyword without assign! */
-
         }
+        /*
+          else this is the second (or more) name we don't know
+          about! */
       }
+      else {
+        /* this is an "illegal" <what>=<this> pair */
+      }
+
       if(!semiptr || !*semiptr) {
         /* we already know there are no more cookies */
         semiptr = NULL;
@@ -449,6 +544,9 @@ Curl_cookie_add(struct SessionHandle *data,
         if(co->path) {
           memcpy(co->path, path, pathlen);
           co->path[pathlen]=0; /* zero terminate */
+          co->spath = sanitize_cookie_path(co->path);
+          if(!co->spath)
+            badcookie = TRUE; /* out of memory bad */
         }
         else
           badcookie = TRUE;
@@ -477,10 +575,10 @@ Curl_cookie_add(struct SessionHandle *data,
        marked with httpOnly after the domain name are not accessible
        from javascripts, but since curl does not operate at javascript
        level, we include them anyway. In Firefox's cookie files, these
-       lines are preceeded with #HttpOnly_ and then everything is
+       lines are preceded with #HttpOnly_ and then everything is
        as usual, so we skip 10 characters of the line..
     */
-    if (strncmp(lineptr, "#HttpOnly_", 10) == 0) {
+    if(strncmp(lineptr, "#HttpOnly_", 10) == 0) {
       lineptr += 10;
       co->httponly = TRUE;
     }
@@ -500,19 +598,13 @@ Curl_cookie_add(struct SessionHandle *data,
 
     firstptr=strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */
 
-    /* Here's a quick check to eliminate normal HTTP-headers from this */
-    if(!firstptr || strchr(firstptr, ':')) {
-      free(co);
-      return NULL;
-    }
-
     /* Now loop through the fields and init the struct we already have
        allocated */
     for(ptr=firstptr, fields=0; ptr && !badcookie;
         ptr=strtok_r(NULL, "\t", &tok_buf), fields++) {
       switch(fields) {
       case 0:
-        if(ptr[0]=='.') /* skip preceeding dots */
+        if(ptr[0]=='.') /* skip preceding dots */
           ptr++;
         co->domain = strdup(ptr);
         if(!co->domain)
@@ -529,7 +621,7 @@ Curl_cookie_add(struct SessionHandle *data,
            As far as I can see, it is set to true when the cookie says
            .domain.com and to false when the domain is complete www.domain.com
         */
-        co->tailmatch=(bool)Curl_raw_equal(ptr, "TRUE"); /* store information */
+        co->tailmatch = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
         break;
       case 2:
         /* It turns out, that sometimes the file format allows the path
@@ -540,16 +632,25 @@ Curl_cookie_add(struct SessionHandle *data,
           co->path = strdup(ptr);
           if(!co->path)
             badcookie = TRUE;
+          else {
+            co->spath = sanitize_cookie_path(co->path);
+            if(!co->spath) {
+              badcookie = TRUE; /* out of memory bad */
+            }
+          }
           break;
         }
         /* this doesn't look like a path, make one up! */
         co->path = strdup("/");
         if(!co->path)
           badcookie = TRUE;
+        co->spath = strdup("/");
+        if(!co->spath)
+          badcookie = TRUE;
         fields++; /* add a field and fall down to secure */
         /* FALLTHROUGH */
       case 3:
-        co->secure = (bool)Curl_raw_equal(ptr, "TRUE");
+        co->secure = Curl_raw_equal(ptr, "TRUE")?TRUE:FALSE;
         break;
       case 4:
         co->expires = curlx_strtoofft(ptr, NULL, 10);
@@ -616,14 +717,14 @@ Curl_cookie_add(struct SessionHandle *data,
       if(replace_old) {
         /* the domains were identical */
 
-        if(clist->path && co->path) {
-          if(Curl_raw_equal(clist->path, co->path)) {
+        if(clist->spath && co->spath) {
+          if(Curl_raw_equal(clist->spath, co->spath)) {
             replace_old = TRUE;
           }
           else
             replace_old = FALSE;
         }
-        else if(!clist->path && !co->path)
+        else if(!clist->spath && !co->spath)
           replace_old = TRUE;
         else
           replace_old = FALSE;
@@ -652,6 +753,8 @@ Curl_cookie_add(struct SessionHandle *data,
           free(clist->domain);
         if(clist->path)
           free(clist->path);
+        if(clist->spath)
+          free(clist->spath);
         if(clist->expirestr)
           free(clist->expirestr);
 
@@ -691,9 +794,9 @@ Curl_cookie_add(struct SessionHandle *data,
       lastc->next = co;
     else
       c->cookies = co;
+    c->numcookies++; /* one more cookie in the jar */
   }
 
-  c->numcookies++; /* one more cookie in the jar */
   return co;
 }
 
@@ -779,11 +882,28 @@ static int cookie_sort(const void *p1, const void *p2)
 {
   struct Cookie *c1 = *(struct Cookie **)p1;
   struct Cookie *c2 = *(struct Cookie **)p2;
+  size_t l1, l2;
+
+  /* 1 - compare cookie path lengths */
+  l1 = c1->path ? strlen(c1->path) : 0;
+  l2 = c2->path ? strlen(c2->path) : 0;
+
+  if(l1 != l2)
+    return (l2 > l1) ? 1 : -1 ; /* avoid size_t <=> int conversions */
+
+  /* 2 - compare cookie domain lengths */
+  l1 = c1->domain ? strlen(c1->domain) : 0;
+  l2 = c2->domain ? strlen(c2->domain) : 0;
 
-  size_t l1 = c1->path?strlen(c1->path):0;
-  size_t l2 = c2->path?strlen(c2->path):0;
+  if(l1 != l2)
+    return (l2 > l1) ? 1 : -1 ;  /* avoid size_t <=> int conversions */
 
-  return (l2 > l1) ? 1 : (l2 < l1) ? -1 : 0 ;
+  /* 3 - compare cookie names */
+  if(c1->name && c2->name)
+    return strcmp(c1->name, c2->name);
+
+  /* sorry, can't be more deterministic */
+  return 0;
 }
 
 /*****************************************************************************
@@ -817,8 +937,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
     /* only process this cookie if it is not expired or had no expire
        date AND that if the cookie requires we're secure we must only
        continue if we are! */
-    if( (!co->expires || (co->expires > now)) &&
-        (co->secure?secure:TRUE) ) {
+    if((!co->expires || (co->expires > now)) &&
+       (co->secure?secure:TRUE)) {
 
       /* now check if the domain is correct */
       if(!co->domain ||
@@ -829,10 +949,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
 
         /* now check the left part of the path with the cookies path
            requirement */
-        if(!co->path ||
-           /* not using checkprefix() because matching should be
-              case-sensitive */
-           !strncmp(co->path, path, strlen(co->path)) ) {
+        if(!co->spath || pathmatch(co->spath, path) ) {
 
           /* and now, we know this is a match and we should create an
              entry for the return-linked-list */
@@ -875,7 +992,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
     size_t i;
 
     /* alloc an array and store all cookie pointers */
-    array = (struct Cookie **)malloc(sizeof(struct Cookie *) * matches);
+    array = malloc(sizeof(struct Cookie *) * matches);
     if(!array)
       goto fail;
 
@@ -884,7 +1001,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
     for(i=0; co; co = co->next)
       array[i++] = co;
 
-    /* now sort the cookie pointers in path lenth order */
+    /* now sort the cookie pointers in path length order */
     qsort(array, matches, sizeof(struct Cookie *), cookie_sort);
 
     /* remake the linked list order according to the new order */
@@ -1038,14 +1155,14 @@ static char *get_netscape_format(const struct Cookie *co)
 }
 
 /*
- * Curl_cookie_output()
+ * cookie_output()
  *
  * Writes all internally known cookies to the specified file. Specify
  * "-" as file name to write to stdout.
  *
  * The function returns non-zero on write failure.
  */
-int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
+static int cookie_output(struct CookieInfo *c, const char *dumphere)
 {
   struct Cookie *co;
   FILE *out;
@@ -1071,7 +1188,7 @@ int Curl_cookie_output(struct CookieInfo *c, const char *dumphere)
     char *format_ptr;
 
     fputs("# Netscape HTTP Cookie File\n"
-          "# http://curl.haxx.se/rfc/cookie_spec.html\n"
+          "# http://curl.haxx.se/docs/http-cookies.html\n"
           "# This file was generated by libcurl! Edit at your own risk.\n\n",
           out);
     co = c->cookies;
@@ -1109,27 +1226,57 @@ struct curl_slist *Curl_cookie_list(struct SessionHandle *data)
 
   c = data->cookies->cookies;
 
-  beg = list;
   while(c) {
     /* fill the list with _all_ the cookies we know */
     line = get_netscape_format(c);
-    if(line == NULL) {
-      curl_slist_free_all(beg);
+    if(!line) {
+      curl_slist_free_all(list);
       return NULL;
     }
-    list = curl_slist_append(list, line);
-    free(line);
-    if(list == NULL) {
-      curl_slist_free_all(beg);
+    beg = Curl_slist_append_nodup(list, line);
+    if(!beg) {
+      free(line);
+      curl_slist_free_all(list);
       return NULL;
     }
-    else if(beg == NULL) {
-      beg = list;
-    }
+    list = beg;
     c = c->next;
   }
 
   return list;
 }
 
+void Curl_flush_cookies(struct SessionHandle *data, int cleanup)
+{
+  if(data->set.str[STRING_COOKIEJAR]) {
+    if(data->change.cookielist) {
+      /* If there is a list of cookie files to read, do it first so that
+         we have all the told files read before we write the new jar.
+         Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */
+      Curl_cookie_loadfiles(data);
+    }
+
+    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+
+    /* if we have a destination file for all the cookies to get dumped to */
+    if(cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR]))
+      infof(data, "WARNING: failed to save cookies in %s\n",
+            data->set.str[STRING_COOKIEJAR]);
+  }
+  else {
+    if(cleanup && data->change.cookielist) {
+      /* since nothing is written, we can just free the list of cookie file
+         names */
+      curl_slist_free_all(data->change.cookielist); /* clean up list */
+      data->change.cookielist = NULL;
+    }
+    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+  }
+
+  if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
+    Curl_cookie_cleanup(data->cookies);
+  }
+  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
+}
+
 #endif /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
index e8c005f..bd89082 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __COOKIE_H
-#define __COOKIE_H
+#ifndef HEADER_CURL_COOKIE_H
+#define HEADER_CURL_COOKIE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include <stdio.h>
-#if defined(WIN32)
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#endif
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 
@@ -37,7 +29,8 @@ struct Cookie {
   struct Cookie *next; /* next in the chain */
   char *name;        /* <this> = value */
   char *value;       /* name = <this> */
-  char *path;         /* path = <this> */
+  char *path;         /* path = <this> which is in Set-Cookie: */
+  char *spath;        /* sanitized cookie path */
   char *domain;      /* domain = <this> */
   curl_off_t expires;  /* expires = <this> */
   char *expirestr;   /* the plain text version */
@@ -87,22 +80,25 @@ struct Cookie *Curl_cookie_add(struct SessionHandle *data,
                                struct CookieInfo *, bool header, char *lineptr,
                                const char *domain, const char *path);
 
-struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
-                                    const char *, struct CookieInfo *, bool);
 struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
                                    const char *, bool);
 void Curl_cookie_freelist(struct Cookie *cookies, bool cookiestoo);
 void Curl_cookie_clearall(struct CookieInfo *cookies);
 void Curl_cookie_clearsess(struct CookieInfo *cookies);
-void Curl_cookie_cleanup(struct CookieInfo *);
-int Curl_cookie_output(struct CookieInfo *, const char *);
 
 #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES)
 #define Curl_cookie_list(x) NULL
-#define Curl_cookie_loadfiles(x) do { } while (0)
+#define Curl_cookie_loadfiles(x) Curl_nop_stmt
+#define Curl_cookie_init(x,y,z,w) NULL
+#define Curl_cookie_cleanup(x) Curl_nop_stmt
+#define Curl_flush_cookies(x,y) Curl_nop_stmt
 #else
+void Curl_flush_cookies(struct SessionHandle *data, int cleanup);
+void Curl_cookie_cleanup(struct CookieInfo *);
+struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
+                                    const char *, struct CookieInfo *, bool);
 struct curl_slist *Curl_cookie_list(struct SessionHandle *data);
 void Curl_cookie_loadfiles(struct SessionHandle *data);
 #endif
 
-#endif
+#endif /* HEADER_CURL_COOKIE_H */
index 6feccf2..10652c6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
@@ -40,7 +37,6 @@
 #ifdef __VMS
 #  include <in.h>
 #  include <inet.h>
-#  include <stdlib.h>
 #endif
 
 #if defined(NETWARE) && defined(__NOVELL_LIBC__)
@@ -50,6 +46,7 @@
 
 #include "curl_addrinfo.h"
 #include "inet_pton.h"
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -294,7 +291,7 @@ Curl_he2ai(const struct hostent *he, int port)
 
     size_t ss_size;
 #ifdef ENABLE_IPV6
-    if (he->h_addrtype == AF_INET6)
+    if(he->h_addrtype == AF_INET6)
       ss_size = sizeof (struct sockaddr_in6);
     else
 #endif
@@ -486,7 +483,7 @@ Curl_addrinfo *Curl_str2addr(char *address, int port)
  *
  * This is strictly for memory tracing and are using the same style as the
  * family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
  */
 
 void
@@ -506,7 +503,7 @@ curl_dofreeaddrinfo(struct addrinfo *freethis,
  *
  * This is strictly for memory tracing and are using the same style as the
  * family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
  */
 
 int
index 11c3394..6d2b753 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
index 2498a0a..6e200d2 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
-size_t Curl_base64_encode(struct SessionHandle *data,
-                          const char *inputbuff, size_t insize,
-                          char **outptr);
+CURLcode Curl_base64_encode(struct SessionHandle *data,
+                            const char *inputbuff, size_t insize,
+                            char **outptr, size_t *outlen);
 
-size_t Curl_base64_decode(const char *src, unsigned char **outptr);
+CURLcode Curl_base64_decode(const char *src,
+                            unsigned char **outptr, size_t *outlen);
 
 #endif /* HEADER_CURL_BASE64_H */
index deebe71..454c9e6 100644 (file)
@@ -1,7 +1,4 @@
-/* lib/curl_config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the $func function. */
-#cmakedefine AS_TR_CPP ${AS_TR_CPP}
+/* lib/curl_config.h.in.  Generated somehow by cmake.  */
 
 /* when building libcurl itself */
 #cmakedefine BUILDING_LIBCURL ${BUILDING_LIBCURL}
@@ -55,9 +52,6 @@
 #define CURL_EXTERN_SYMBOL
 #endif
 
-/* to enable hidden symbols */
-#cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
-
 /* Use Windows LDAP implementation */
 #cmakedefine CURL_LDAP_WIN ${CURL_LDAP_WIN}
 
 /* Define to 1 if you have the `pipe' function. */
 #cmakedefine HAVE_PIPE ${HAVE_PIPE}
 
-/* if you have the function PK11_CreateGenericObject */
-#cmakedefine HAVE_PK11_CREATEGENERICOBJECT ${HAVE_PK11_CREATEGENERICOBJECT}
-
 /* Define to 1 if you have a working poll function. */
 #cmakedefine HAVE_POLL ${HAVE_POLL}
 
    */
 #cmakedefine LT_OBJDIR ${LT_OBJDIR}
 
-/* Define to 1 if you are building a native Windows target. */
-#cmakedefine NATIVE_WINDOWS ${NATIVE_WINDOWS}
-
 /* If you lack a fine basename() prototype */
 #cmakedefine NEED_BASENAME_PROTO ${NEED_BASENAME_PROTO}
 
index aaea103..539f030 100644 (file)
@@ -1,8 +1,5 @@
 /* lib/curl_config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* when building libcurl itself */
-#undef BUILDING_LIBCURL
-
 /* Location of default ca bundle */
 #undef CURL_CA_BUNDLE
 
@@ -39,6 +36,9 @@
 /* to disable LDAPS */
 #undef CURL_DISABLE_LDAPS
 
+/* to disable --libcurl C code generation option */
+#undef CURL_DISABLE_LIBCURL_OPTION
+
 /* to disable POP3 */
 #undef CURL_DISABLE_POP3
 
 /* to disable TFTP */
 #undef CURL_DISABLE_TFTP
 
+/* to disable TLS-SRP authentication */
+#undef CURL_DISABLE_TLS_SRP
+
 /* to disable verbose strings */
 #undef CURL_DISABLE_VERBOSE_STRINGS
 
-/* to make a symbol visible */
+/* Definition to make a library symbol externally visible. */
 #undef CURL_EXTERN_SYMBOL
 
-/* to enable hidden symbols */
-#undef CURL_HIDDEN_SYMBOLS
-
 /* Use Windows LDAP implementation */
 #undef CURL_LDAP_WIN
 
-/* when not building a shared library */
-#undef CURL_STATICLIB
-
 /* your Entropy Gathering Daemon socket pathname */
 #undef EGD_SOCKET
 
 /* Define if you want to enable IPv6 support */
 #undef ENABLE_IPV6
 
+/* Define to the type of arg 2 for gethostname. */
+#undef GETHOSTNAME_TYPE_ARG2
+
 /* Define to the type qualifier of arg 1 for getnameinfo. */
 #undef GETNAMEINFO_QUAL_ARG1
 
 /* Define to 1 if you have the ftruncate function. */
 #undef HAVE_FTRUNCATE
 
+/* Define to 1 if you have the gai_strerror function. */
+#undef HAVE_GAI_STRERROR
+
 /* Define to 1 if you have a working getaddrinfo function. */
 #undef HAVE_GETADDRINFO
 
 /* Define to 1 if you have a working gmtime_r function. */
 #undef HAVE_GMTIME_R
 
+/* if you have the function gnutls_srp_verifier */
+#undef HAVE_GNUTLS_SRP
+
 /* if you have the gssapi libraries */
 #undef HAVE_GSSAPI
 
 /* Define to 1 if you have the `ldap_url_parse' function. */
 #undef HAVE_LDAP_URL_PARSE
 
-/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
-#undef HAVE_LIBGCRYPT
-
 /* Define to 1 if you have the <libgen.h> header file. */
 #undef HAVE_LIBGEN_H
 
 /* Define to 1 if NI_WITHSCOPEID exists and works. */
 #undef HAVE_NI_WITHSCOPEID
 
+/* if you have the NSS_InitContext function */
+#undef HAVE_NSS_INITCONTEXT
+
 /* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
    */
 #undef HAVE_OLD_GSSMIT
 /* Define to 1 if you have the `pipe' function. */
 #undef HAVE_PIPE
 
-/* if you have the function PK11_CreateGenericObject */
-#undef HAVE_PK11_CREATEGENERICOBJECT
-
 /* Define to 1 if you have a working poll function. */
 #undef HAVE_POLL
 
 /* Define to 1 if you have the recv function. */
 #undef HAVE_RECV
 
-/* Define to 1 if you have the recvfrom function. */
-#undef HAVE_RECVFROM
-
 /* Define to 1 if you have the <rsa.h> header file. */
 #undef HAVE_RSA_H
 
 /* Define to 1 if you have the socket function. */
 #undef HAVE_SOCKET
 
+/* Define to 1 if you have the socketpair function. */
+#undef HAVE_SOCKETPAIR
+
 /* Define to 1 if you have the <socket.h> header file. */
 #undef HAVE_SOCKET_H
 
 /* Define this if you have the SPNEGO library fbopenssl */
 #undef HAVE_SPNEGO
 
+/* if you have the function SRP_Calc_client_key */
+#undef HAVE_SSLEAY_SRP
+
+/* Define to 1 if you have the `SSLv2_client_method' function. */
+#undef HAVE_SSLV2_CLIENT_METHOD
+
 /* Define to 1 if you have the `SSL_get_shutdown' function. */
 #undef HAVE_SSL_GET_SHUTDOWN
 
 /* Define to 1 if you have the strcasecmp function. */
 #undef HAVE_STRCASECMP
 
-/* Define to 1 if you have the strcasestr function. */
-#undef HAVE_STRCASESTR
-
 /* Define to 1 if you have the strcmpi function. */
 #undef HAVE_STRCMPI
 
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define to 1 if you have the strlcat function. */
-#undef HAVE_STRLCAT
-
 /* Define to 1 if you have the `strlcpy' function. */
 #undef HAVE_STRLCPY
 
 /* Define to 1 if you have the <sys/utime.h> header file. */
 #undef HAVE_SYS_UTIME_H
 
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
 /* Define to 1 if you have the <sys/xattr.h> header file. */
 #undef HAVE_SYS_XATTR_H
 
    */
 #undef LT_OBJDIR
 
-/* Define to 1 if you are building a native Windows target. */
-#undef NATIVE_WINDOWS
-
 /* Define to 1 if you need the lber.h header file even with ldap.h */
 #undef NEED_LBER_H
 
 /* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
 #undef NEED_THREAD_SAFE
 
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to enable NTLM delegation to winbind's ntlm_auth helper. */
+#undef NTLM_WB_ENABLED
+
+/* Define absolute filename for winbind's ntlm_auth helper. */
+#undef NTLM_WB_FILE
+
 /* cpu-machine-OS */
 #undef OS
 
 /* a suitable file to read random data from */
 #undef RANDOM_FILE
 
-/* Define to the type of arg 1 for recvfrom. */
-#undef RECVFROM_TYPE_ARG1
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#undef RECVFROM_TYPE_ARG2
-
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG2_IS_VOID
-
-/* Define to the type of arg 3 for recvfrom. */
-#undef RECVFROM_TYPE_ARG3
-
-/* Define to the type of arg 4 for recvfrom. */
-#undef RECVFROM_TYPE_ARG4
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#undef RECVFROM_TYPE_ARG5
-
-/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG5_IS_VOID
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#undef RECVFROM_TYPE_ARG6
-
-/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG6_IS_VOID
-
-/* Define to the function return type for recvfrom. */
-#undef RECVFROM_TYPE_RETV
-
 /* Define to the type of arg 1 for recv. */
 #undef RECV_TYPE_ARG1
 
 /* Define to enable c-ares support */
 #undef USE_ARES
 
-/* Define to disable non-blocking sockets. */
-#undef USE_BLOCKING_SOCKETS
+/* if axTLS is enabled */
+#undef USE_AXTLS
+
+/* if CyaSSL is enabled */
+#undef USE_CYASSL
+
+/* to enable iOS/Mac OS X native SSL/TLS support */
+#undef USE_DARWINSSL
 
 /* if GnuTLS is enabled */
 #undef USE_GNUTLS
 
+/* if GnuTLS uses nettle as crypto backend */
+#undef USE_GNUTLS_NETTLE
+
 /* if librtmp is in use */
 #undef USE_LIBRTMP
 
 /* If you want to build curl with the built-in manual */
 #undef USE_MANUAL
 
+/* Define to enable metalink support */
+#undef USE_METALINK
+
 /* if NSS is enabled */
 #undef USE_NSS
 
 /* if PolarSSL is enabled */
 #undef USE_POLARSSL
 
+/* to enable Windows native SSL/TLS support */
+#undef USE_SCHANNEL
+
 /* if SSL is enabled */
 #undef USE_SSLEAY
 
 /* if you want POSIX threaded DNS lookup */
 #undef USE_THREADS_POSIX
 
+/* Use TLS-SRP authentication */
+#undef USE_TLS_SRP
+
+/* Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz). */
+#undef USE_WIN32_IDN
+
+/* Define to 1 if you are building a Windows target with large file support.
+   */
+#undef USE_WIN32_LARGE_FILES
+
 /* Define to 1 if you are building a Windows target without large file
    support. */
-#undef USE_WIN32_LARGE_FILES
+#undef USE_WIN32_SMALL_FILES
 
 /* to enable SSPI support */
 #undef USE_WINDOWS_SSPI
 /* Version number of package */
 #undef VERSION
 
+/* Define to 1 to provide own prototypes. */
+#undef WANT_IDN_PROTOTYPES
+
 /* Define to avoid automatic inclusion of winsock.h */
 #undef WIN32_LEAN_AND_MEAN
 
 #  undef _ALL_SOURCE
 #endif
 
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c
new file mode 100644 (file)
index 0000000..4ecf2d9
--- /dev/null
@@ -0,0 +1,1899 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012-2013, Nick Zitzmann, <nickzman@gmail.com>.
+ * Copyright (C) 2012-2013, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all iOS and Mac OS X SecureTransport-specific code for the
+ * TLS/SSL layer. No code but sslgen.c should ever call or use these functions.
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_DARWINSSL
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <Security/Security.h>
+#include <Security/SecureTransport.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CommonCrypto/CommonDigest.h>
+
+/* The Security framework has changed greatly between iOS and different OS X
+   versions, and we will try to support as many of them as we can (back to
+   Leopard and iOS 5) by using macros and weak-linking.
+
+   IMPORTANT: If TLS 1.1 and 1.2 support are important for you on OS X, then
+   you must build this project against the 10.8 SDK or later. */
+#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE))
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
+#error "The darwinssl back-end requires Leopard or later."
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1050 */
+
+#define CURL_BUILD_IOS 0
+#define CURL_BUILD_MAC 1
+/* This is the maximum API level we are allowed to use when building: */
+#define CURL_BUILD_MAC_10_5 MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#define CURL_BUILD_MAC_10_6 MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+#define CURL_BUILD_MAC_10_7 MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+#define CURL_BUILD_MAC_10_8 MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+/* These macros mean "the following code is present to allow runtime backward
+   compatibility with at least this cat or earlier":
+   (You set this at build-time by setting the MACOSX_DEPLOYMENT_TARGET
+   environmental variable.) */
+#define CURL_SUPPORT_MAC_10_5 MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
+#define CURL_SUPPORT_MAC_10_6 MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#define CURL_SUPPORT_MAC_10_7 MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
+#define CURL_SUPPORT_MAC_10_8 MAC_OS_X_VERSION_MIN_REQUIRED <= 1080
+
+#elif TARGET_OS_EMBEDDED || TARGET_OS_IPHONE
+#define CURL_BUILD_IOS 1
+#define CURL_BUILD_MAC 0
+#define CURL_BUILD_MAC_10_5 0
+#define CURL_BUILD_MAC_10_6 0
+#define CURL_BUILD_MAC_10_7 0
+#define CURL_BUILD_MAC_10_8 0
+#define CURL_SUPPORT_MAC_10_5 0
+#define CURL_SUPPORT_MAC_10_6 0
+#define CURL_SUPPORT_MAC_10_7 0
+#define CURL_SUPPORT_MAC_10_8 0
+
+#else
+#error "The darwinssl back-end requires iOS or OS X."
+#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */
+
+#if CURL_BUILD_MAC
+#include <sys/sysctl.h>
+#endif /* CURL_BUILD_MAC */
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "connect.h"
+#include "select.h"
+#include "sslgen.h"
+#include "curl_darwinssl.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* From MacTypes.h (which we can't include because it isn't present in iOS: */
+#define ioErr -36
+#define paramErr -50
+
+/* The following two functions were ripped from Apple sample code,
+ * with some modifications: */
+static OSStatus SocketRead(SSLConnectionRef connection,
+                           void *data,          /* owned by
+                                                 * caller, data
+                                                 * RETURNED */
+                           size_t *dataLength)  /* IN/OUT */
+{
+  size_t bytesToGo = *dataLength;
+  size_t initLen = bytesToGo;
+  UInt8 *currData = (UInt8 *)data;
+  /*int sock = *(int *)connection;*/
+  struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection;
+  int sock = connssl->ssl_sockfd;
+  OSStatus rtn = noErr;
+  size_t bytesRead;
+  ssize_t rrtn;
+  int theErr;
+
+  *dataLength = 0;
+
+  for(;;) {
+    bytesRead = 0;
+    rrtn = read(sock, currData, bytesToGo);
+    if(rrtn <= 0) {
+      /* this is guesswork... */
+      theErr = errno;
+      if(rrtn == 0) { /* EOF = server hung up */
+        /* the framework will turn this into errSSLClosedNoNotify */
+        rtn = errSSLClosedGraceful;
+      }
+      else /* do the switch */
+        switch(theErr) {
+          case ENOENT:
+            /* connection closed */
+            rtn = errSSLClosedGraceful;
+            break;
+          case ECONNRESET:
+            rtn = errSSLClosedAbort;
+            break;
+          case EAGAIN:
+            rtn = errSSLWouldBlock;
+            connssl->ssl_direction = false;
+            break;
+          default:
+            rtn = ioErr;
+            break;
+        }
+      break;
+    }
+    else {
+      bytesRead = rrtn;
+    }
+    bytesToGo -= bytesRead;
+    currData  += bytesRead;
+
+    if(bytesToGo == 0) {
+      /* filled buffer with incoming data, done */
+      break;
+    }
+  }
+  *dataLength = initLen - bytesToGo;
+
+  return rtn;
+}
+
+static OSStatus SocketWrite(SSLConnectionRef connection,
+                            const void *data,
+                            size_t *dataLength)  /* IN/OUT */
+{
+  size_t bytesSent = 0;
+  /*int sock = *(int *)connection;*/
+  struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection;
+  int sock = connssl->ssl_sockfd;
+  ssize_t length;
+  size_t dataLen = *dataLength;
+  const UInt8 *dataPtr = (UInt8 *)data;
+  OSStatus ortn;
+  int theErr;
+
+  *dataLength = 0;
+
+  do {
+    length = write(sock,
+                   (char*)dataPtr + bytesSent,
+                   dataLen - bytesSent);
+  } while((length > 0) &&
+           ( (bytesSent += length) < dataLen) );
+
+  if(length <= 0) {
+    theErr = errno;
+    if(theErr == EAGAIN) {
+      ortn = errSSLWouldBlock;
+      connssl->ssl_direction = true;
+    }
+    else {
+      ortn = ioErr;
+    }
+  }
+  else {
+    ortn = noErr;
+  }
+  *dataLength = bytesSent;
+  return ortn;
+}
+
+CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) {
+  switch (cipher) {
+    /* SSL version 3.0 */
+    case SSL_RSA_WITH_NULL_MD5:
+      return "SSL_RSA_WITH_NULL_MD5";
+      break;
+    case SSL_RSA_WITH_NULL_SHA:
+      return "SSL_RSA_WITH_NULL_SHA";
+      break;
+    case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
+      return "SSL_RSA_EXPORT_WITH_RC4_40_MD5";
+      break;
+    case SSL_RSA_WITH_RC4_128_MD5:
+      return "SSL_RSA_WITH_RC4_128_MD5";
+      break;
+    case SSL_RSA_WITH_RC4_128_SHA:
+      return "SSL_RSA_WITH_RC4_128_SHA";
+      break;
+    case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
+      return "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5";
+      break;
+    case SSL_RSA_WITH_IDEA_CBC_SHA:
+      return "SSL_RSA_WITH_IDEA_CBC_SHA";
+      break;
+    case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_RSA_WITH_DES_CBC_SHA:
+      return "SSL_RSA_WITH_DES_CBC_SHA";
+      break;
+    case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_DH_DSS_WITH_DES_CBC_SHA:
+      return "SSL_DH_DSS_WITH_DES_CBC_SHA";
+      break;
+    case SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_DH_RSA_WITH_DES_CBC_SHA:
+      return "SSL_DH_RSA_WITH_DES_CBC_SHA";
+      break;
+    case SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_DHE_DSS_WITH_DES_CBC_SHA:
+      return "SSL_DHE_DSS_WITH_DES_CBC_SHA";
+      break;
+    case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_DHE_RSA_WITH_DES_CBC_SHA:
+      return "SSL_DHE_RSA_WITH_DES_CBC_SHA";
+      break;
+    case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
+      return "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5";
+      break;
+    case SSL_DH_anon_WITH_RC4_128_MD5:
+      return "SSL_DH_anon_WITH_RC4_128_MD5";
+      break;
+    case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
+      return "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA";
+      break;
+    case SSL_DH_anon_WITH_DES_CBC_SHA:
+      return "SSL_DH_anon_WITH_DES_CBC_SHA";
+      break;
+    case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+      return "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
+      return "SSL_FORTEZZA_DMS_WITH_NULL_SHA";
+      break;
+    case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA:
+      return "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA";
+      break;
+    /* TLS 1.0 with AES (RFC 3268)
+       (Apparently these are used in SSLv3 implementations as well.) */
+    case TLS_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
+      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
+      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
+      break;
+    /* SSL version 2.0 */
+    case SSL_RSA_WITH_RC2_CBC_MD5:
+      return "SSL_RSA_WITH_RC2_CBC_MD5";
+      break;
+    case SSL_RSA_WITH_IDEA_CBC_MD5:
+      return "SSL_RSA_WITH_IDEA_CBC_MD5";
+      break;
+    case SSL_RSA_WITH_DES_CBC_MD5:
+      return "SSL_RSA_WITH_DES_CBC_MD5";
+      break;
+    case SSL_RSA_WITH_3DES_EDE_CBC_MD5:
+      return "SSL_RSA_WITH_3DES_EDE_CBC_MD5";
+      break;
+  }
+  return "SSL_NULL_WITH_NULL_NULL";
+}
+
+CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher) {
+  switch(cipher) {
+    /* TLS 1.0 with AES (RFC 3268) */
+    case TLS_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
+      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+      return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
+      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+      return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
+      break;
+#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+    /* TLS 1.0 with ECDSA (RFC 4492) */
+    case TLS_ECDH_ECDSA_WITH_NULL_SHA:
+      return "TLS_ECDH_ECDSA_WITH_NULL_SHA";
+      break;
+    case TLS_ECDH_ECDSA_WITH_RC4_128_SHA:
+      return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
+      break;
+    case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:
+      return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:
+      return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_NULL_SHA:
+      return "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
+      return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
+      return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
+      return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_ECDH_RSA_WITH_NULL_SHA:
+      return "TLS_ECDH_RSA_WITH_NULL_SHA";
+      break;
+    case TLS_ECDH_RSA_WITH_RC4_128_SHA:
+      return "TLS_ECDH_RSA_WITH_RC4_128_SHA";
+      break;
+    case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_ECDHE_RSA_WITH_NULL_SHA:
+      return "TLS_ECDHE_RSA_WITH_NULL_SHA";
+      break;
+    case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
+      return "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
+      break;
+    case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
+      return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
+      return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
+      break;
+    case TLS_ECDH_anon_WITH_NULL_SHA:
+      return "TLS_ECDH_anon_WITH_NULL_SHA";
+      break;
+    case TLS_ECDH_anon_WITH_RC4_128_SHA:
+      return "TLS_ECDH_anon_WITH_RC4_128_SHA";
+      break;
+    case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
+      return "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
+      break;
+    case TLS_ECDH_anon_WITH_AES_256_CBC_SHA:
+      return "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
+      break;
+#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+    /* TLS 1.2 (RFC 5246) */
+    case TLS_RSA_WITH_NULL_MD5:
+      return "TLS_RSA_WITH_NULL_MD5";
+      break;
+    case TLS_RSA_WITH_NULL_SHA:
+      return "TLS_RSA_WITH_NULL_SHA";
+      break;
+    case TLS_RSA_WITH_RC4_128_MD5:
+      return "TLS_RSA_WITH_RC4_128_MD5";
+      break;
+    case TLS_RSA_WITH_RC4_128_SHA:
+      return "TLS_RSA_WITH_RC4_128_SHA";
+      break;
+    case TLS_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_RSA_WITH_NULL_SHA256:
+      return "TLS_RSA_WITH_NULL_SHA256";
+      break;
+    case TLS_RSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_RSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_RSA_WITH_AES_256_CBC_SHA256:
+      return "TLS_RSA_WITH_AES_256_CBC_SHA256";
+      break;
+    case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_DH_DSS_WITH_AES_128_CBC_SHA256:
+      return "TLS_DH_DSS_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_DH_RSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_DH_RSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
+      return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_DH_DSS_WITH_AES_256_CBC_SHA256:
+      return "TLS_DH_DSS_WITH_AES_256_CBC_SHA256";
+      break;
+    case TLS_DH_RSA_WITH_AES_256_CBC_SHA256:
+      return "TLS_DH_RSA_WITH_AES_256_CBC_SHA256";
+      break;
+    case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
+      return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
+      break;
+    case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
+      return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
+      break;
+    case TLS_DH_anon_WITH_RC4_128_MD5:
+      return "TLS_DH_anon_WITH_RC4_128_MD5";
+      break;
+    case TLS_DH_anon_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case TLS_DH_anon_WITH_AES_128_CBC_SHA256:
+      return "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_DH_anon_WITH_AES_256_CBC_SHA256:
+      return "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
+      break;
+    /* TLS 1.2 with AES GCM (RFC 5288) */
+    case TLS_RSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_RSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_RSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_RSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_DH_RSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_DH_RSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_DH_RSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_DH_RSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:
+      return "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:
+      return "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_DH_DSS_WITH_AES_128_GCM_SHA256:
+      return "TLS_DH_DSS_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_DH_DSS_WITH_AES_256_GCM_SHA384:
+      return "TLS_DH_DSS_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_DH_anon_WITH_AES_128_GCM_SHA256:
+      return "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
+      return "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
+      break;
+    /* TLS 1.2 with elliptic curve ciphers (RFC 5289) */
+    case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:
+      return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384:
+      return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:
+      return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256:
+      return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384:
+      return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256:
+      return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
+      break;
+    case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384:
+      return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
+      break;
+    case TLS_EMPTY_RENEGOTIATION_INFO_SCSV:
+      return "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
+      break;
+#else
+    case SSL_RSA_WITH_NULL_MD5:
+      return "TLS_RSA_WITH_NULL_MD5";
+      break;
+    case SSL_RSA_WITH_NULL_SHA:
+      return "TLS_RSA_WITH_NULL_SHA";
+      break;
+    case SSL_RSA_WITH_RC4_128_MD5:
+      return "TLS_RSA_WITH_RC4_128_MD5";
+      break;
+    case SSL_RSA_WITH_RC4_128_SHA:
+      return "TLS_RSA_WITH_RC4_128_SHA";
+      break;
+    case SSL_RSA_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
+      break;
+    case SSL_DH_anon_WITH_RC4_128_MD5:
+      return "TLS_DH_anon_WITH_RC4_128_MD5";
+      break;
+    case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+      return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
+      break;
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+  }
+  return "TLS_NULL_WITH_NULL_NULL";
+}
+
+#if CURL_BUILD_MAC
+CF_INLINE void GetDarwinVersionNumber(int *major, int *minor)
+{
+  int mib[2];
+  char *os_version;
+  size_t os_version_len;
+  char *os_version_major, *os_version_minor/*, *os_version_point*/;
+
+  /* Get the Darwin kernel version from the kernel using sysctl(): */
+  mib[0] = CTL_KERN;
+  mib[1] = KERN_OSRELEASE;
+  if(sysctl(mib, 2, NULL, &os_version_len, NULL, 0) == -1)
+    return;
+  os_version = malloc(os_version_len*sizeof(char));
+  if(!os_version)
+    return;
+  if(sysctl(mib, 2, os_version, &os_version_len, NULL, 0) == -1) {
+    free(os_version);
+    return;
+  }
+
+  /* Parse the version: */
+  os_version_major = strtok(os_version, ".");
+  os_version_minor = strtok(NULL, ".");
+  /*os_version_point = strtok(NULL, ".");*/
+  *major = atoi(os_version_major);
+  *minor = atoi(os_version_minor);
+  free(os_version);
+}
+#endif /* CURL_BUILD_MAC */
+
+/* Apple provides a myriad of ways of getting information about a certificate
+   into a string. Some aren't available under iOS or newer cats. So here's
+   a unified function for getting a string describing the certificate that
+   ought to work in all cats starting with Leopard. */
+CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert)
+{
+  CFStringRef server_cert_summary = CFSTR("(null)");
+
+#if CURL_BUILD_IOS
+  /* iOS: There's only one way to do this. */
+  server_cert_summary = SecCertificateCopySubjectSummary(cert);
+#else
+#if CURL_BUILD_MAC_10_7
+  /* Lion & later: Get the long description if we can. */
+  if(SecCertificateCopyLongDescription != NULL)
+    server_cert_summary =
+      SecCertificateCopyLongDescription(NULL, cert, NULL);
+  else
+#endif /* CURL_BUILD_MAC_10_7 */
+#if CURL_BUILD_MAC_10_6
+  /* Snow Leopard: Get the certificate summary. */
+  if(SecCertificateCopySubjectSummary != NULL)
+    server_cert_summary = SecCertificateCopySubjectSummary(cert);
+  else
+#endif /* CURL_BUILD_MAC_10_6 */
+  /* Leopard is as far back as we go... */
+  (void)SecCertificateCopyCommonName(cert, &server_cert_summary);
+#endif /* CURL_BUILD_IOS */
+  return server_cert_summary;
+}
+
+#if CURL_SUPPORT_MAC_10_7
+/* The SecKeychainSearch API was deprecated in Lion, and using it will raise
+   deprecation warnings, so let's not compile this unless it's necessary: */
+static OSStatus CopyIdentityWithLabelOldSchool(char *label,
+                                               SecIdentityRef *out_c_a_k)
+{
+  OSStatus status = errSecItemNotFound;
+  SecKeychainAttributeList attr_list;
+  SecKeychainAttribute attr;
+  SecKeychainSearchRef search = NULL;
+  SecCertificateRef cert = NULL;
+
+  /* Set up the attribute list: */
+  attr_list.count = 1L;
+  attr_list.attr = &attr;
+
+  /* Set up our lone search criterion: */
+  attr.tag = kSecLabelItemAttr;
+  attr.data = label;
+  attr.length = (UInt32)strlen(label);
+
+  /* Start searching: */
+  status = SecKeychainSearchCreateFromAttributes(NULL,
+                                                 kSecCertificateItemClass,
+                                                 &attr_list,
+                                                 &search);
+  if(status == noErr) {
+    status = SecKeychainSearchCopyNext(search,
+                                       (SecKeychainItemRef *)&cert);
+    if(status == noErr && cert) {
+      /* If we found a certificate, does it have a private key? */
+      status = SecIdentityCreateWithCertificate(NULL, cert, out_c_a_k);
+      CFRelease(cert);
+    }
+  }
+
+  if(search)
+    CFRelease(search);
+  return status;
+}
+#endif /* CURL_SUPPORT_MAC_10_7 */
+
+static OSStatus CopyIdentityWithLabel(char *label,
+                                      SecIdentityRef *out_cert_and_key)
+{
+  OSStatus status = errSecItemNotFound;
+
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
+  /* SecItemCopyMatching() was introduced in iOS and Snow Leopard.
+     kSecClassIdentity was introduced in Lion. If both exist, let's use them
+     to find the certificate. */
+  if(SecItemCopyMatching != NULL && kSecClassIdentity != NULL) {
+    CFTypeRef keys[4];
+    CFTypeRef values[4];
+    CFDictionaryRef query_dict;
+    CFStringRef label_cf = CFStringCreateWithCString(NULL, label,
+      kCFStringEncodingUTF8);
+
+    /* Set up our search criteria and expected results: */
+    values[0] = kSecClassIdentity; /* we want a certificate and a key */
+    keys[0] = kSecClass;
+    values[1] = kCFBooleanTrue;    /* we want a reference */
+    keys[1] = kSecReturnRef;
+    values[2] = kSecMatchLimitOne; /* one is enough, thanks */
+    keys[2] = kSecMatchLimit;
+    /* identity searches need a SecPolicyRef in order to work */
+    values[3] = SecPolicyCreateSSL(false, label_cf);
+    keys[3] = kSecMatchPolicy;
+    query_dict = CFDictionaryCreate(NULL, (const void **)keys,
+                                   (const void **)values, 4L,
+                                   &kCFCopyStringDictionaryKeyCallBacks,
+                                   &kCFTypeDictionaryValueCallBacks);
+    CFRelease(values[3]);
+    CFRelease(label_cf);
+
+    /* Do we have a match? */
+    status = SecItemCopyMatching(query_dict, (CFTypeRef *)out_cert_and_key);
+    CFRelease(query_dict);
+  }
+  else {
+#if CURL_SUPPORT_MAC_10_7
+    /* On Leopard and Snow Leopard, fall back to SecKeychainSearch. */
+    status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key);
+#endif /* CURL_SUPPORT_MAC_10_7 */
+  }
+#elif CURL_SUPPORT_MAC_10_7
+  /* For developers building on older cats, we have no choice but to fall back
+     to SecKeychainSearch. */
+  status = CopyIdentityWithLabelOldSchool(label, out_cert_and_key);
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
+  return status;
+}
+
+static CURLcode darwinssl_connect_step1(struct connectdata *conn,
+                                        int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  curl_socket_t sockfd = conn->sock[sockindex];
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+#ifdef ENABLE_IPV6
+  struct in6_addr addr;
+#else
+  struct in_addr addr;
+#endif /* ENABLE_IPV6 */
+  size_t all_ciphers_count = 0UL, allowed_ciphers_count = 0UL, i;
+  SSLCipherSuite *all_ciphers = NULL, *allowed_ciphers = NULL;
+  char *ssl_sessionid;
+  size_t ssl_sessionid_len;
+  OSStatus err = noErr;
+#if CURL_BUILD_MAC
+  int darwinver_maj = 0, darwinver_min = 0;
+
+  GetDarwinVersionNumber(&darwinver_maj, &darwinver_min);
+#endif /* CURL_BUILD_MAC */
+
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+  if(SSLCreateContext != NULL) {  /* use the newer API if avaialble */
+    if(connssl->ssl_ctx)
+      CFRelease(connssl->ssl_ctx);
+    connssl->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
+    if(!connssl->ssl_ctx) {
+      failf(data, "SSL: couldn't create a context!");
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+  else {
+  /* The old ST API does not exist under iOS, so don't compile it: */
+#if CURL_SUPPORT_MAC_10_8
+    if(connssl->ssl_ctx)
+      (void)SSLDisposeContext(connssl->ssl_ctx);
+    err = SSLNewContext(false, &(connssl->ssl_ctx));
+    if(err != noErr) {
+      failf(data, "SSL: couldn't create a context: OSStatus %d", err);
+      return CURLE_OUT_OF_MEMORY;
+    }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+  }
+#else
+  if(connssl->ssl_ctx)
+    (void)SSLDisposeContext(connssl->ssl_ctx);
+  err = SSLNewContext(false, &(connssl->ssl_ctx));
+  if(err != noErr) {
+    failf(data, "SSL: couldn't create a context: OSStatus %d", err);
+    return CURLE_OUT_OF_MEMORY;
+  }
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+  connssl->ssl_write_buffered_length = 0UL; /* reset buffered write length */
+
+  /* check to see if we've been told to use an explicit SSL/TLS version */
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+  if(SSLSetProtocolVersionMax != NULL) {
+    switch(data->set.ssl.version) {
+      case CURL_SSLVERSION_DEFAULT: default:
+        (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3);
+        (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12);
+        break;
+      case CURL_SSLVERSION_TLSv1:
+        (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1);
+        (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12);
+        break;
+      case CURL_SSLVERSION_SSLv3:
+        (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3);
+        (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol3);
+        break;
+      case CURL_SSLVERSION_SSLv2:
+        err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol2);
+        if(err != noErr) {
+          failf(data, "Your version of the OS does not support SSLv2");
+          return CURLE_SSL_CONNECT_ERROR;
+        }
+        (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol2);
+    }
+  }
+  else {
+#if CURL_SUPPORT_MAC_10_8
+    (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                       kSSLProtocolAll,
+                                       false);
+    switch (data->set.ssl.version) {
+      case CURL_SSLVERSION_DEFAULT: default:
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kSSLProtocol3,
+                                           true);
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol1,
+                                           true);
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol11,
+                                           true);
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol12,
+                                           true);
+        break;
+      case CURL_SSLVERSION_TLSv1:
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol1,
+                                           true);
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol11,
+                                           true);
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kTLSProtocol12,
+                                           true);
+        break;
+      case CURL_SSLVERSION_SSLv3:
+        (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kSSLProtocol3,
+                                           true);
+        break;
+      case CURL_SSLVERSION_SSLv2:
+        err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                           kSSLProtocol2,
+                                           true);
+        if(err != noErr) {
+          failf(data, "Your version of the OS does not support SSLv2");
+          return CURLE_SSL_CONNECT_ERROR;
+        }
+        break;
+    }
+#endif  /* CURL_SUPPORT_MAC_10_8 */
+  }
+#else
+  (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false);
+  switch(data->set.ssl.version) {
+    default:
+    case CURL_SSLVERSION_DEFAULT:
+      (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                         kSSLProtocol3,
+                                         true);
+      (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                         kTLSProtocol1,
+                                         true);
+      break;
+    case CURL_SSLVERSION_TLSv1:
+      (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                         kTLSProtocol1,
+                                         true);
+      break;
+    case CURL_SSLVERSION_SSLv2:
+      err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                         kSSLProtocol2,
+                                         true);
+      if(err != noErr) {
+        failf(data, "Your version of the OS does not support SSLv2");
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      break;
+    case CURL_SSLVERSION_SSLv3:
+      (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx,
+                                         kSSLProtocol3,
+                                         true);
+      break;
+  }
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+
+  if(data->set.str[STRING_KEY]) {
+    infof(data, "WARNING: SSL: CURLOPT_SSLKEY is ignored by Secure "
+                "Transport. The private key must be in the Keychain.\n");
+  }
+
+  if(data->set.str[STRING_CERT]) {
+    SecIdentityRef cert_and_key = NULL;
+
+    /* User wants to authenticate with a client cert. Look for it: */
+    err = CopyIdentityWithLabel(data->set.str[STRING_CERT], &cert_and_key);
+    if(err == noErr) {
+      SecCertificateRef cert = NULL;
+      CFTypeRef certs_c[1];
+      CFArrayRef certs;
+
+      /* If we found one, print it out: */
+      err = SecIdentityCopyCertificate(cert_and_key, &cert);
+      if(err == noErr) {
+        CFStringRef cert_summary = CopyCertSubject(cert);
+        char cert_summary_c[128];
+
+        if(cert_summary) {
+          memset(cert_summary_c, 0, 128);
+          if(CFStringGetCString(cert_summary,
+                                cert_summary_c,
+                                128,
+                                kCFStringEncodingUTF8)) {
+            infof(data, "Client certificate: %s\n", cert_summary_c);
+          }
+          CFRelease(cert_summary);
+          CFRelease(cert);
+        }
+      }
+      certs_c[0] = cert_and_key;
+      certs = CFArrayCreate(NULL, (const void **)certs_c, 1L,
+                            &kCFTypeArrayCallBacks);
+      err = SSLSetCertificate(connssl->ssl_ctx, certs);
+      if(certs)
+        CFRelease(certs);
+      if(err != noErr) {
+        failf(data, "SSL: SSLSetCertificate() failed: OSStatus %d", err);
+        return CURLE_SSL_CERTPROBLEM;
+      }
+      CFRelease(cert_and_key);
+    }
+    else {
+      failf(data, "SSL: Can't find the certificate \"%s\" and its private key "
+                  "in the Keychain.", data->set.str[STRING_CERT]);
+      return CURLE_SSL_CERTPROBLEM;
+    }
+  }
+
+  /* SSL always tries to verify the peer, this only says whether it should
+   * fail to connect if the verification fails, or if it should continue
+   * anyway. In the latter case the result of the verification is checked with
+   * SSL_get_verify_result() below. */
+#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS
+  /* Snow Leopard introduced the SSLSetSessionOption() function, but due to
+     a library bug with the way the kSSLSessionOptionBreakOnServerAuth flag
+     works, it doesn't work as expected under Snow Leopard or Lion.
+     So we need to call SSLSetEnableCertVerify() on those older cats in order
+     to disable certificate validation if the user turned that off.
+     (SecureTransport will always validate the certificate chain by
+     default.) */
+  /* (Note: Darwin 12.x.x is Mountain Lion.) */
+#if CURL_BUILD_MAC
+  if(SSLSetSessionOption != NULL && darwinver_maj >= 12) {
+#else
+  if(SSLSetSessionOption != NULL) {
+#endif /* CURL_BUILD_MAC */
+    err = SSLSetSessionOption(connssl->ssl_ctx,
+                              kSSLSessionOptionBreakOnServerAuth,
+                              data->set.ssl.verifypeer?false:true);
+    if(err != noErr) {
+      failf(data, "SSL: SSLSetSessionOption() failed: OSStatus %d", err);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+  else {
+#if CURL_SUPPORT_MAC_10_8
+    err = SSLSetEnableCertVerify(connssl->ssl_ctx,
+                                 data->set.ssl.verifypeer?true:false);
+    if(err != noErr) {
+      failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+  }
+#else
+  err = SSLSetEnableCertVerify(connssl->ssl_ctx,
+                               data->set.ssl.verifypeer?true:false);
+  if(err != noErr) {
+    failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
+
+  /* If this is a domain name and not an IP address, then configure SNI.
+   * Also: the verifyhost setting influences SNI usage */
+  /* If this is a domain name and not an IP address, then configure SNI: */
+  if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
+#ifdef ENABLE_IPV6
+     (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
+#endif
+     data->set.ssl.verifyhost) {
+    err = SSLSetPeerDomainName(connssl->ssl_ctx, conn->host.name,
+                               strlen(conn->host.name));
+    if(err != noErr) {
+      infof(data, "WARNING: SSL: SSLSetPeerDomainName() failed: OSStatus %d\n",
+            err);
+    }
+  }
+
+  /* Disable cipher suites that ST supports but are not safe. These ciphers
+     are unlikely to be used in any case since ST gives other ciphers a much
+     higher priority, but it's probably better that we not connect at all than
+     to give the user a false sense of security if the server only supports
+     insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */
+  (void)SSLGetNumberSupportedCiphers(connssl->ssl_ctx, &all_ciphers_count);
+  all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+  allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite));
+  if(all_ciphers && allowed_ciphers &&
+     SSLGetSupportedCiphers(connssl->ssl_ctx, all_ciphers,
+       &all_ciphers_count) == noErr) {
+    for(i = 0UL ; i < all_ciphers_count ; i++) {
+#if CURL_BUILD_MAC
+     /* There's a known bug in early versions of Mountain Lion where ST's ECC
+        ciphers (cipher suite 0xC001 through 0xC032) simply do not work.
+        Work around the problem here by disabling those ciphers if we are
+        running in an affected version of OS X. */
+      if(darwinver_maj == 12 && darwinver_min <= 3 &&
+         all_ciphers[i] >= 0xC001 && all_ciphers[i] <= 0xC032) {
+           continue;
+      }
+#endif /* CURL_BUILD_MAC */
+      switch(all_ciphers[i]) {
+        /* Disable NULL ciphersuites: */
+        case SSL_NULL_WITH_NULL_NULL:
+        case SSL_RSA_WITH_NULL_MD5:
+        case SSL_RSA_WITH_NULL_SHA:
+        case SSL_FORTEZZA_DMS_WITH_NULL_SHA:
+        case 0xC001: /* TLS_ECDH_ECDSA_WITH_NULL_SHA */
+        case 0xC006: /* TLS_ECDHE_ECDSA_WITH_NULL_SHA */
+        case 0xC00B: /* TLS_ECDH_RSA_WITH_NULL_SHA */
+        case 0xC010: /* TLS_ECDHE_RSA_WITH_NULL_SHA */
+        /* Disable anonymous ciphersuites: */
+        case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5:
+        case SSL_DH_anon_WITH_RC4_128_MD5:
+        case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_DH_anon_WITH_DES_CBC_SHA:
+        case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA:
+        case TLS_DH_anon_WITH_AES_128_CBC_SHA:
+        case TLS_DH_anon_WITH_AES_256_CBC_SHA:
+        case 0xC015: /* TLS_ECDH_anon_WITH_NULL_SHA */
+        case 0xC016: /* TLS_ECDH_anon_WITH_RC4_128_SHA */
+        case 0xC017: /* TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA */
+        case 0xC018: /* TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
+        case 0xC019: /* TLS_ECDH_anon_WITH_AES_256_CBC_SHA */
+        case 0x006C: /* TLS_DH_anon_WITH_AES_128_CBC_SHA256 */
+        case 0x006D: /* TLS_DH_anon_WITH_AES_256_CBC_SHA256 */
+        case 0x00A6: /* TLS_DH_anon_WITH_AES_128_GCM_SHA256 */
+        case 0x00A7: /* TLS_DH_anon_WITH_AES_256_GCM_SHA384 */
+        /* Disable weak key ciphersuites: */
+        case SSL_RSA_EXPORT_WITH_RC4_40_MD5:
+        case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5:
+        case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA:
+        case SSL_RSA_WITH_DES_CBC_SHA:
+        case SSL_DH_DSS_WITH_DES_CBC_SHA:
+        case SSL_DH_RSA_WITH_DES_CBC_SHA:
+        case SSL_DHE_DSS_WITH_DES_CBC_SHA:
+        case SSL_DHE_RSA_WITH_DES_CBC_SHA:
+        /* Disable IDEA: */
+        case SSL_RSA_WITH_IDEA_CBC_SHA:
+        case SSL_RSA_WITH_IDEA_CBC_MD5:
+          break;
+        default: /* enable everything else */
+          allowed_ciphers[allowed_ciphers_count++] = all_ciphers[i];
+          break;
+      }
+    }
+    err = SSLSetEnabledCiphers(connssl->ssl_ctx, allowed_ciphers,
+                               allowed_ciphers_count);
+    if(err != noErr) {
+      failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+  else {
+    Curl_safefree(all_ciphers);
+    Curl_safefree(allowed_ciphers);
+    failf(data, "SSL: Failed to allocate memory for allowed ciphers");
+    return CURLE_OUT_OF_MEMORY;
+  }
+  Curl_safefree(all_ciphers);
+  Curl_safefree(allowed_ciphers);
+
+  /* Check if there's a cached ID we can/should use here! */
+  if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid,
+    &ssl_sessionid_len)) {
+    /* we got a session id, use it! */
+    err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
+    if(err != noErr) {
+      failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+    /* Informational message */
+    infof(data, "SSL re-using session ID\n");
+  }
+  /* If there isn't one, then let's make one up! This has to be done prior
+     to starting the handshake. */
+  else {
+    CURLcode retcode;
+
+    ssl_sessionid = malloc(256*sizeof(char));
+    ssl_sessionid_len = snprintf(ssl_sessionid, 256, "curl:%s:%hu",
+      conn->host.name, conn->remote_port);
+    err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len);
+    if(err != noErr) {
+      failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+    retcode = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len);
+    if(retcode!= CURLE_OK) {
+      failf(data, "failed to store ssl session");
+      return retcode;
+    }
+  }
+
+  err = SSLSetIOFuncs(connssl->ssl_ctx, SocketRead, SocketWrite);
+  if(err != noErr) {
+    failf(data, "SSL: SSLSetIOFuncs() failed: OSStatus %d", err);
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  /* pass the raw socket into the SSL layers */
+  /* We need to store the FD in a constant memory address, because
+   * SSLSetConnection() will not copy that address. I've found that
+   * conn->sock[sockindex] may change on its own. */
+  connssl->ssl_sockfd = sockfd;
+  err = SSLSetConnection(connssl->ssl_ctx, connssl);
+  if(err != noErr) {
+    failf(data, "SSL: SSLSetConnection() failed: %d", err);
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  connssl->connecting_state = ssl_connect_2;
+  return CURLE_OK;
+}
+
+static CURLcode
+darwinssl_connect_step2(struct connectdata *conn, int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  OSStatus err;
+  SSLCipherSuite cipher;
+  SSLProtocol protocol = 0;
+
+  DEBUGASSERT(ssl_connect_2 == connssl->connecting_state
+              || ssl_connect_2_reading == connssl->connecting_state
+              || ssl_connect_2_writing == connssl->connecting_state);
+
+  /* Here goes nothing: */
+  err = SSLHandshake(connssl->ssl_ctx);
+
+  if(err != noErr) {
+    switch (err) {
+      case errSSLWouldBlock:  /* they're not done with us yet */
+        connssl->connecting_state = connssl->ssl_direction ?
+            ssl_connect_2_writing : ssl_connect_2_reading;
+        return CURLE_OK;
+
+      /* The below is errSSLServerAuthCompleted; it's not defined in
+        Leopard's headers */
+      case -9841:
+        /* the documentation says we need to call SSLHandshake() again */
+        return darwinssl_connect_step2(conn, sockindex);
+
+      /* These are all certificate problems with the server: */
+      case errSSLXCertChainInvalid:
+        failf(data, "SSL certificate problem: Invalid certificate chain");
+        return CURLE_SSL_CACERT;
+      case errSSLUnknownRootCert:
+        failf(data, "SSL certificate problem: Untrusted root certificate");
+        return CURLE_SSL_CACERT;
+      case errSSLNoRootCert:
+        failf(data, "SSL certificate problem: No root certificate");
+        return CURLE_SSL_CACERT;
+      case errSSLCertExpired:
+        failf(data, "SSL certificate problem: Certificate chain had an "
+              "expired certificate");
+        return CURLE_SSL_CACERT;
+      case errSSLBadCert:
+        failf(data, "SSL certificate problem: Couldn't understand the server "
+              "certificate format");
+        return CURLE_SSL_CONNECT_ERROR;
+
+      /* These are all certificate problems with the client: */
+      case errSecAuthFailed:
+        failf(data, "SSL authentication failed");
+        return CURLE_SSL_CONNECT_ERROR;
+      case errSSLPeerHandshakeFail:
+        failf(data, "SSL peer handshake failed, the server most likely "
+              "requires a client certificate to connect");
+        return CURLE_SSL_CONNECT_ERROR;
+      case errSSLPeerUnknownCA:
+        failf(data, "SSL server rejected the client certificate due to "
+              "the certificate being signed by an unknown certificate "
+              "authority");
+        return CURLE_SSL_CONNECT_ERROR;
+
+      /* This error is raised if the server's cert didn't match the server's
+         host name: */
+      case errSSLHostNameMismatch:
+        failf(data, "SSL certificate peer verification failed, the "
+              "certificate did not match \"%s\"\n", conn->host.dispname);
+        return CURLE_PEER_FAILED_VERIFICATION;
+
+      /* Generic handshake errors: */
+      case errSSLConnectionRefused:
+        failf(data, "Server dropped the connection during the SSL handshake");
+        return CURLE_SSL_CONNECT_ERROR;
+      case errSSLClosedAbort:
+        failf(data, "Server aborted the SSL handshake");
+        return CURLE_SSL_CONNECT_ERROR;
+      case errSSLNegotiation:
+        failf(data, "Could not negotiate an SSL cipher suite with the server");
+        return CURLE_SSL_CONNECT_ERROR;
+      /* Sometimes paramErr happens with buggy ciphers: */
+      case paramErr: case errSSLInternal:
+        failf(data, "Internal SSL engine error encountered during the "
+              "SSL handshake");
+        return CURLE_SSL_CONNECT_ERROR;
+      case errSSLFatalAlert:
+        failf(data, "Fatal SSL engine error encountered during the SSL "
+              "handshake");
+        return CURLE_SSL_CONNECT_ERROR;
+      default:
+        failf(data, "Unknown SSL protocol error in connection to %s:%d",
+              conn->host.name, err);
+        return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+  else {
+    /* we have been connected fine, we're not waiting for anything else. */
+    connssl->connecting_state = ssl_connect_3;
+
+    /* Informational message */
+    (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher);
+    (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol);
+    switch (protocol) {
+      case kSSLProtocol2:
+        infof(data, "SSL 2.0 connection using %s\n",
+              SSLCipherNameForNumber(cipher));
+        break;
+      case kSSLProtocol3:
+        infof(data, "SSL 3.0 connection using %s\n",
+              SSLCipherNameForNumber(cipher));
+        break;
+      case kTLSProtocol1:
+        infof(data, "TLS 1.0 connection using %s\n",
+              TLSCipherNameForNumber(cipher));
+        break;
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+      case kTLSProtocol11:
+        infof(data, "TLS 1.1 connection using %s\n",
+              TLSCipherNameForNumber(cipher));
+        break;
+      case kTLSProtocol12:
+        infof(data, "TLS 1.2 connection using %s\n",
+              TLSCipherNameForNumber(cipher));
+        break;
+#endif
+      default:
+        infof(data, "Unknown protocol connection\n");
+        break;
+    }
+
+    return CURLE_OK;
+  }
+}
+
+static CURLcode
+darwinssl_connect_step3(struct connectdata *conn,
+                        int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  CFStringRef server_cert_summary;
+  char server_cert_summary_c[128];
+  CFArrayRef server_certs = NULL;
+  SecCertificateRef server_cert;
+  OSStatus err;
+  CFIndex i, count;
+  SecTrustRef trust = NULL;
+
+  /* There is no step 3!
+   * Well, okay, if verbose mode is on, let's print the details of the
+   * server certificates. */
+#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS
+#if CURL_BUILD_IOS
+#pragma unused(server_certs)
+  err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust);
+  /* For some reason, SSLCopyPeerTrust() can return noErr and yet return
+     a null trust, so be on guard for that: */
+  if(err == noErr && trust) {
+    count = SecTrustGetCertificateCount(trust);
+    for(i = 0L ; i < count ; i++) {
+      server_cert = SecTrustGetCertificateAtIndex(trust, i);
+      server_cert_summary = CopyCertSubject(server_cert);
+      memset(server_cert_summary_c, 0, 128);
+      if(CFStringGetCString(server_cert_summary,
+                            server_cert_summary_c,
+                            128,
+                            kCFStringEncodingUTF8)) {
+        infof(data, "Server certificate: %s\n", server_cert_summary_c);
+      }
+      CFRelease(server_cert_summary);
+    }
+    CFRelease(trust);
+  }
+#else
+  /* SSLCopyPeerCertificates() is deprecated as of Mountain Lion.
+     The function SecTrustGetCertificateAtIndex() is officially present
+     in Lion, but it is unfortunately also present in Snow Leopard as
+     private API and doesn't work as expected. So we have to look for
+     a different symbol to make sure this code is only executed under
+     Lion or later. */
+  if(SecTrustEvaluateAsync != NULL) {
+#pragma unused(server_certs)
+    err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust);
+    /* For some reason, SSLCopyPeerTrust() can return noErr and yet return
+       a null trust, so be on guard for that: */
+    if(err == noErr && trust) {
+      count = SecTrustGetCertificateCount(trust);
+      for(i = 0L ; i < count ; i++) {
+        server_cert = SecTrustGetCertificateAtIndex(trust, i);
+        server_cert_summary = CopyCertSubject(server_cert);
+        memset(server_cert_summary_c, 0, 128);
+        if(CFStringGetCString(server_cert_summary,
+                              server_cert_summary_c,
+                              128,
+                              kCFStringEncodingUTF8)) {
+          infof(data, "Server certificate: %s\n", server_cert_summary_c);
+        }
+        CFRelease(server_cert_summary);
+      }
+      CFRelease(trust);
+    }
+  }
+  else {
+#if CURL_SUPPORT_MAC_10_8
+    err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs);
+    /* Just in case SSLCopyPeerCertificates() returns null too... */
+    if(err == noErr && server_certs) {
+      count = CFArrayGetCount(server_certs);
+      for(i = 0L ; i < count ; i++) {
+        server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs,
+                                                                i);
+
+        server_cert_summary = CopyCertSubject(server_cert);
+        memset(server_cert_summary_c, 0, 128);
+        if(CFStringGetCString(server_cert_summary,
+                              server_cert_summary_c,
+                              128,
+                              kCFStringEncodingUTF8)) {
+          infof(data, "Server certificate: %s\n", server_cert_summary_c);
+        }
+        CFRelease(server_cert_summary);
+      }
+      CFRelease(server_certs);
+    }
+#endif /* CURL_SUPPORT_MAC_10_8 */
+  }
+#endif /* CURL_BUILD_IOS */
+#else
+#pragma unused(trust)
+  err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs);
+  if(err == noErr) {
+    count = CFArrayGetCount(server_certs);
+    for(i = 0L ; i < count ; i++) {
+      server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i);
+      server_cert_summary = CopyCertSubject(server_cert);
+      memset(server_cert_summary_c, 0, 128);
+      if(CFStringGetCString(server_cert_summary,
+                            server_cert_summary_c,
+                            128,
+                            kCFStringEncodingUTF8)) {
+        infof(data, "Server certificate: %s\n", server_cert_summary_c);
+      }
+      CFRelease(server_cert_summary);
+    }
+    CFRelease(server_certs);
+  }
+#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */
+
+  connssl->connecting_state = ssl_connect_done;
+  return CURLE_OK;
+}
+
+static Curl_recv darwinssl_recv;
+static Curl_send darwinssl_send;
+
+static CURLcode
+darwinssl_connect_common(struct connectdata *conn,
+                         int sockindex,
+                         bool nonblocking,
+                         bool *done)
+{
+  CURLcode retcode;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  curl_socket_t sockfd = conn->sock[sockindex];
+  long timeout_ms;
+  int what;
+
+  /* check if the connection has already been established */
+  if(ssl_connection_complete == connssl->state) {
+    *done = TRUE;
+    return CURLE_OK;
+  }
+
+  if(ssl_connect_1==connssl->connecting_state) {
+    /* Find out how much more time we're allowed */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+    retcode = darwinssl_connect_step1(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  while(ssl_connect_2 == connssl->connecting_state ||
+        ssl_connect_2_reading == connssl->connecting_state ||
+        ssl_connect_2_writing == connssl->connecting_state) {
+
+    /* check allowed time left */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+
+    /* if ssl is expecting something, check if it's available. */
+    if(connssl->connecting_state == ssl_connect_2_reading
+       || connssl->connecting_state == ssl_connect_2_writing) {
+
+      curl_socket_t writefd = ssl_connect_2_writing ==
+      connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+      curl_socket_t readfd = ssl_connect_2_reading ==
+      connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+      what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+      if(what < 0) {
+        /* fatal error */
+        failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      else if(0 == what) {
+        if(nonblocking) {
+          *done = FALSE;
+          return CURLE_OK;
+        }
+        else {
+          /* timeout */
+          failf(data, "SSL connection timeout");
+          return CURLE_OPERATION_TIMEDOUT;
+        }
+      }
+      /* socket is readable or writable */
+    }
+
+    /* Run transaction, and return to the caller if it failed or if this
+     * connection is done nonblocking and this loop would execute again. This
+     * permits the owner of a multi handle to abort a connection attempt
+     * before step2 has completed while ensuring that a client using select()
+     * or epoll() will always have a valid fdset to wait on.
+     */
+    retcode = darwinssl_connect_step2(conn, sockindex);
+    if(retcode || (nonblocking &&
+                   (ssl_connect_2 == connssl->connecting_state ||
+                    ssl_connect_2_reading == connssl->connecting_state ||
+                    ssl_connect_2_writing == connssl->connecting_state)))
+      return retcode;
+
+  } /* repeat step2 until all transactions are done. */
+
+
+  if(ssl_connect_3==connssl->connecting_state) {
+    retcode = darwinssl_connect_step3(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  if(ssl_connect_done==connssl->connecting_state) {
+    connssl->state = ssl_connection_complete;
+    conn->recv[sockindex] = darwinssl_recv;
+    conn->send[sockindex] = darwinssl_send;
+    *done = TRUE;
+  }
+  else
+    *done = FALSE;
+
+  /* Reset our connect state machine */
+  connssl->connecting_state = ssl_connect_1;
+
+  return CURLE_OK;
+}
+
+CURLcode
+Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
+                                   int sockindex,
+                                   bool *done)
+{
+  return darwinssl_connect_common(conn, sockindex, TRUE, done);
+}
+
+CURLcode
+Curl_darwinssl_connect(struct connectdata *conn,
+                       int sockindex)
+{
+  CURLcode retcode;
+  bool done = FALSE;
+
+  retcode = darwinssl_connect_common(conn, sockindex, FALSE, &done);
+
+  if(retcode)
+    return retcode;
+
+  DEBUGASSERT(done);
+
+  return CURLE_OK;
+}
+
+void Curl_darwinssl_close(struct connectdata *conn, int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+  if(connssl->ssl_ctx) {
+    (void)SSLClose(connssl->ssl_ctx);
+#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
+    if(SSLCreateContext != NULL)
+      CFRelease(connssl->ssl_ctx);
+#if CURL_SUPPORT_MAC_10_8
+    else
+      (void)SSLDisposeContext(connssl->ssl_ctx);
+#endif  /* CURL_SUPPORT_MAC_10_8 */
+#else
+    (void)SSLDisposeContext(connssl->ssl_ctx);
+#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */
+    connssl->ssl_ctx = NULL;
+  }
+  connssl->ssl_sockfd = 0;
+}
+
+void Curl_darwinssl_close_all(struct SessionHandle *data)
+{
+  /* SecureTransport doesn't separate sessions from contexts, so... */
+  (void)data;
+}
+
+int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct SessionHandle *data = conn->data;
+  ssize_t nread;
+  int what;
+  int rc;
+  char buf[120];
+
+  if(!connssl->ssl_ctx)
+    return 0;
+
+  if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE)
+    return 0;
+
+  Curl_darwinssl_close(conn, sockindex);
+
+  rc = 0;
+
+  what = Curl_socket_ready(conn->sock[sockindex],
+                           CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+
+  for(;;) {
+    if(what < 0) {
+      /* anything that gets here is fatally bad */
+      failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+      rc = -1;
+      break;
+    }
+
+    if(!what) {                                /* timeout */
+      failf(data, "SSL shutdown timeout");
+      break;
+    }
+
+    /* Something to read, let's do it and hope that it is the close
+     notify alert from the server. No way to SSL_Read now, so use read(). */
+
+    nread = read(conn->sock[sockindex], buf, sizeof(buf));
+
+    if(nread < 0) {
+      failf(data, "read: %s", strerror(errno));
+      rc = -1;
+    }
+
+    if(nread <= 0)
+      break;
+
+    what = Curl_socket_ready(conn->sock[sockindex], CURL_SOCKET_BAD, 0);
+  }
+
+  return rc;
+}
+
+void Curl_darwinssl_session_free(void *ptr)
+{
+  /* ST, as of iOS 5 and Mountain Lion, has no public method of deleting a
+     cached session ID inside the Security framework. There is a private
+     function that does this, but I don't want to have to explain to you why I
+     got your application rejected from the App Store due to the use of a
+     private API, so the best we can do is free up our own char array that we
+     created way back in darwinssl_connect_step1... */
+  Curl_safefree(ptr);
+}
+
+size_t Curl_darwinssl_version(char *buffer, size_t size)
+{
+  return snprintf(buffer, size, "SecureTransport");
+}
+
+/*
+ * This function uses SSLGetSessionState to determine connection status.
+ *
+ * Return codes:
+ *     1 means the connection is still in place
+ *     0 means the connection has been closed
+ *    -1 means the connection status is unknown
+ */
+int Curl_darwinssl_check_cxn(struct connectdata *conn)
+{
+  struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
+  OSStatus err;
+  SSLSessionState state;
+
+  if(connssl->ssl_ctx) {
+    err = SSLGetSessionState(connssl->ssl_ctx, &state);
+    if(err == noErr)
+      return state == kSSLConnected || state == kSSLHandshake;
+    return -1;
+  }
+  return 0;
+}
+
+bool Curl_darwinssl_data_pending(const struct connectdata *conn,
+                                 int connindex)
+{
+  const struct ssl_connect_data *connssl = &conn->ssl[connindex];
+  OSStatus err;
+  size_t buffer;
+
+  if(connssl->ssl_ctx) {  /* SSL is in use */
+    err = SSLGetBufferedReadSize(connssl->ssl_ctx, &buffer);
+    if(err == noErr)
+      return buffer > 0UL;
+    return false;
+  }
+  else
+    return false;
+}
+
+void Curl_darwinssl_random(struct SessionHandle *data,
+                           unsigned char *entropy,
+                           size_t length)
+{
+  /* arc4random_buf() isn't available on cats older than Lion, so let's
+     do this manually for the benefit of the older cats. */
+  size_t i;
+  u_int32_t random_number = 0;
+
+  for(i = 0 ; i < length ; i++) {
+    if(i % sizeof(u_int32_t) == 0)
+      random_number = arc4random();
+    entropy[i] = random_number & 0xFF;
+    random_number >>= 8;
+  }
+  i = random_number = 0;
+  (void)data;
+}
+
+void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
+                           size_t tmplen,
+                           unsigned char *md5sum, /* output */
+                           size_t md5len)
+{
+  (void)md5len;
+  (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
+}
+
+static ssize_t darwinssl_send(struct connectdata *conn,
+                              int sockindex,
+                              const void *mem,
+                              size_t len,
+                              CURLcode *curlcode)
+{
+  /*struct SessionHandle *data = conn->data;*/
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  size_t processed = 0UL;
+  OSStatus err;
+
+  /* The SSLWrite() function works a little differently than expected. The
+     fourth argument (processed) is currently documented in Apple's
+     documentation as: "On return, the length, in bytes, of the data actually
+     written."
+
+     Now, one could interpret that as "written to the socket," but actually,
+     it returns the amount of data that was written to a buffer internal to
+     the SSLContextRef instead. So it's possible for SSLWrite() to return
+     errSSLWouldBlock and a number of bytes "written" because those bytes were
+     encrypted and written to a buffer, not to the socket.
+
+     So if this happens, then we need to keep calling SSLWrite() over and
+     over again with no new data until it quits returning errSSLWouldBlock. */
+
+  /* Do we have buffered data to write from the last time we were called? */
+  if(connssl->ssl_write_buffered_length) {
+    /* Write the buffered data: */
+    err = SSLWrite(connssl->ssl_ctx, NULL, 0UL, &processed);
+    switch (err) {
+      case noErr:
+        /* processed is always going to be 0 because we didn't write to
+           the buffer, so return how much was written to the socket */
+        processed = connssl->ssl_write_buffered_length;
+        connssl->ssl_write_buffered_length = 0UL;
+        break;
+      case errSSLWouldBlock: /* argh, try again */
+        *curlcode = CURLE_AGAIN;
+        return -1L;
+      default:
+        failf(conn->data, "SSLWrite() returned error %d", err);
+        *curlcode = CURLE_SEND_ERROR;
+        return -1L;
+    }
+  }
+  else {
+    /* We've got new data to write: */
+    err = SSLWrite(connssl->ssl_ctx, mem, len, &processed);
+    if(err != noErr) {
+      switch (err) {
+        case errSSLWouldBlock:
+          /* Data was buffered but not sent, we have to tell the caller
+             to try sending again, and remember how much was buffered */
+          connssl->ssl_write_buffered_length = len;
+          *curlcode = CURLE_AGAIN;
+          return -1L;
+        default:
+          failf(conn->data, "SSLWrite() returned error %d", err);
+          *curlcode = CURLE_SEND_ERROR;
+          return -1L;
+      }
+    }
+  }
+  return (ssize_t)processed;
+}
+
+static ssize_t darwinssl_recv(struct connectdata *conn,
+                              int num,
+                              char *buf,
+                              size_t buffersize,
+                              CURLcode *curlcode)
+{
+  /*struct SessionHandle *data = conn->data;*/
+  struct ssl_connect_data *connssl = &conn->ssl[num];
+  size_t processed = 0UL;
+  OSStatus err = SSLRead(connssl->ssl_ctx, buf, buffersize, &processed);
+
+  if(err != noErr) {
+    switch (err) {
+      case errSSLWouldBlock:  /* return how much we read (if anything) */
+        if(processed)
+          return (ssize_t)processed;
+        *curlcode = CURLE_AGAIN;
+        return -1L;
+        break;
+
+      /* errSSLClosedGraceful - server gracefully shut down the SSL session
+         errSSLClosedNoNotify - server hung up on us instead of sending a
+           closure alert notice, read() is returning 0
+         Either way, inform the caller that the server disconnected. */
+      case errSSLClosedGraceful:
+      case errSSLClosedNoNotify:
+        *curlcode = CURLE_OK;
+        return -1L;
+        break;
+
+      default:
+        failf(conn->data, "SSLRead() return error %d", err);
+        *curlcode = CURLE_RECV_ERROR;
+        return -1L;
+        break;
+    }
+  }
+  return (ssize_t)processed;
+}
+
+#endif /* USE_DARWINSSL */
diff --git a/lib/curl_darwinssl.h b/lib/curl_darwinssl.h
new file mode 100644 (file)
index 0000000..432d3d7
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef HEADER_CURL_DARWINSSL_H
+#define HEADER_CURL_DARWINSSL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, Nick Zitzmann, <nickzman@gmail.com>.
+ *
+ * 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_setup.h"
+
+#ifdef USE_DARWINSSL
+
+CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex);
+
+CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
+                                            int sockindex,
+                                            bool *done);
+
+/* this function doesn't actually do anything */
+void Curl_darwinssl_close_all(struct SessionHandle *data);
+
+/* close a SSL connection */
+void Curl_darwinssl_close(struct connectdata *conn, int sockindex);
+
+void Curl_darwinssl_session_free(void *ptr);
+size_t Curl_darwinssl_version(char *buffer, size_t size);
+int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex);
+int Curl_darwinssl_check_cxn(struct connectdata *conn);
+bool Curl_darwinssl_data_pending(const struct connectdata *conn,
+                                 int connindex);
+
+void Curl_darwinssl_random(struct SessionHandle *data,
+                           unsigned char *entropy,
+                           size_t length);
+void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
+                           size_t tmplen,
+                           unsigned char *md5sum, /* output */
+                           size_t md5len);
+
+/* this backend provides these functions: */
+#define have_curlssl_random 1
+#define have_curlssl_md5sum 1
+
+/* API setup for SecureTransport */
+#define curlssl_init() (1)
+#define curlssl_cleanup() Curl_nop_stmt
+#define curlssl_connect Curl_darwinssl_connect
+#define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking
+#define curlssl_session_free(x) Curl_darwinssl_session_free(x)
+#define curlssl_close_all Curl_darwinssl_close_all
+#define curlssl_close Curl_darwinssl_close
+#define curlssl_shutdown(x,y) 0
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_darwinssl_version
+#define curlssl_check_cxn Curl_darwinssl_check_cxn
+#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
+#define curlssl_random(x,y,z) Curl_darwinssl_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
+
+#endif /* USE_DARWINSSL */
+#endif /* HEADER_CURL_DARWINSSL_H */
index ad4ec18..63f67b9 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "curl_fnmatch.h"
 
@@ -317,7 +317,7 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
   unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 };
   int rc = 0;
 
-  for (;;) {
+  for(;;) {
     switch(state) {
     case CURLFNM_LOOP_DEFAULT:
       if(*p == '*') {
@@ -413,6 +413,9 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
   }
 }
 
+/*
+ * @unittest: 1307
+ */
 int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
 {
   (void)ptr; /* the argument is specified by the curl_fnmatch_callback
index 7f0bfed..ded1e6f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
+#include "curl_setup.h"
 
 #include "curl_gethostname.h"
 
  * Curl_gethostname() is a wrapper around gethostname() which allows
  * overriding the host name that the function would normally return.
  * This capability is used by the test suite to verify exact matching
- * of NTLM authentication, which exercises libcurl's MD4 and DES code.
+ * of NTLM authentication, which exercises libcurl's MD4 and DES code
+ * as well as by the SMTP module when a hostname is not provided.
  *
  * For libcurl debug enabled builds host name overriding takes place
  * when environment variable CURL_GETHOSTNAME is set, using the value
  * held by the variable to override returned host name.
  *
+ * Note: The function always returns the un-qualified hostname rather
+ * than being provider dependent.
+ *
  * For libcurl shared library release builds the test suite preloads
  * another shared library named libhostname using the LD_PRELOAD
  * mechanism which intercepts, and might override, the gethostname()
@@ -58,6 +58,8 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
   return -1;
 
 #else
+  int err;
+  char* dot;
 
 #ifdef DEBUGBUILD
 
@@ -65,17 +67,34 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
   const char *force_hostname = getenv("CURL_GETHOSTNAME");
   if(force_hostname) {
     strncpy(name, force_hostname, namelen);
-    name[namelen-1] = '\0';
-    return 0;
+    err = 0;
+  }
+  else {
+    name[0] = '\0';
+    err = gethostname(name, namelen);
   }
 
-#endif /* DEBUGBUILD */
+#else /* DEBUGBUILD */
 
   /* The call to system's gethostname() might get intercepted by the
      libhostname library when libcurl is built as a non-debug shared
      library when running the test suite. */
-  return gethostname(name, namelen);
+  name[0] = '\0';
+  err = gethostname(name, namelen);
+
+#endif
+
+  name[namelen - 1] = '\0';
+
+  if(err)
+    return err;
+
+  /* Truncate domain, leave only machine name */
+  dot = strchr(name, '.');
+  if(dot)
+    *dot = '\0';
 
+  return 0;
 #endif
 
 }
index b8ecf88..48740f6 100644 (file)
  *
  ***************************************************************************/
 
+/* Hostname buffer size */
+#define HOSTNAME_MAX 1024
+
+/* This returns the local machine's un-qualified hostname */
 int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
 
 #endif /* HEADER_CURL_GETHOSTNAME_H */
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c
new file mode 100644 (file)
index 0000000..fabbe35
--- /dev/null
@@ -0,0 +1,69 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2011, 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_setup.h"
+
+#ifdef HAVE_GSSAPI
+
+#include "curl_gssapi.h"
+#include "sendf.h"
+
+OM_uint32 Curl_gss_init_sec_context(
+    struct SessionHandle *data,
+    OM_uint32 * minor_status,
+    gss_ctx_id_t * context,
+    gss_name_t target_name,
+    gss_channel_bindings_t input_chan_bindings,
+    gss_buffer_t input_token,
+    gss_buffer_t output_token,
+    OM_uint32 * ret_flags)
+{
+  OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG;
+
+  if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
+#ifdef GSS_C_DELEG_POLICY_FLAG
+    req_flags |= GSS_C_DELEG_POLICY_FLAG;
+#else
+    infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not "
+        "compiled in\n");
+#endif
+  }
+
+  if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG)
+    req_flags |= GSS_C_DELEG_FLAG;
+
+  return gss_init_sec_context(minor_status,
+                              GSS_C_NO_CREDENTIAL, /* cred_handle */
+                              context,
+                              target_name,
+                              GSS_C_NO_OID, /* mech_type */
+                              req_flags,
+                              0, /* time_req */
+                              input_chan_bindings,
+                              input_token,
+                              NULL, /* actual_mech_type */
+                              output_token,
+                              ret_flags,
+                              NULL /* time_rec */);
+}
+
+#endif /* HAVE_GSSAPI */
diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h
new file mode 100644 (file)
index 0000000..ed33b51
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef HEADER_CURL_GSSAPI_H
+#define HEADER_CURL_GSSAPI_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2011, 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_setup.h"
+#include "urldata.h"
+
+#ifdef HAVE_GSSAPI
+
+#ifdef HAVE_GSSGNU
+#  include <gss.h>
+#elif defined HAVE_GSSMIT
+   /* MIT style */
+#  include <gssapi/gssapi.h>
+#  include <gssapi/gssapi_generic.h>
+#  include <gssapi/gssapi_krb5.h>
+#else
+   /* Heimdal-style */
+#  include <gssapi.h>
+#endif
+
+
+/* Common method for using gss api */
+
+OM_uint32 Curl_gss_init_sec_context(
+    struct SessionHandle *data,
+    OM_uint32 * minor_status,
+    gss_ctx_id_t * context,
+    gss_name_t target_name,
+    gss_channel_bindings_t input_chan_bindings,
+    gss_buffer_t input_token,
+    gss_buffer_t output_token,
+    OM_uint32 * ret_flags);
+
+#endif /* HAVE_GSSAPI */
+
+#endif /* HEADER_CURL_GSSAPI_H */
index 3cce4bf..93fb4b0 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __CURL_LDAP_H
-#define __CURL_LDAP_H
-
+#ifndef HEADER_CURL_LDAP_H
+#define HEADER_CURL_LDAP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
 #ifndef CURL_DISABLE_LDAP
 extern const struct Curl_handler Curl_handler_ldap;
 
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
-   (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+    ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+     (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
 extern const struct Curl_handler Curl_handler_ldaps;
 #endif
 
 #endif
-#endif /* __CURL_LDAP_H */
+#endif /* HEADER_CURL_LDAP_H */
+
index 6b6c16e..b0be9cf 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 /* NSS crypto library does not provide the MD4 hash algorithm, so that we have
  * a local implementation of it */
index ddc61e3..9c0e0b5 100644 (file)
 #ifndef CURL_DISABLE_CRYPTO_AUTH
 #include "curl_hmac.h"
 
+#define MD5_DIGEST_LEN  16
+
+typedef void (* Curl_MD5_init_func)(void *context);
+typedef void (* Curl_MD5_update_func)(void *context,
+                                      const unsigned char *data,
+                                      unsigned int len);
+typedef void (* Curl_MD5_final_func)(unsigned char *result, void *context);
+
+typedef struct {
+  Curl_MD5_init_func     md5_init_func;   /* Initialize context procedure */
+  Curl_MD5_update_func   md5_update_func; /* Update context with data */
+  Curl_MD5_final_func    md5_final_func;  /* Get final result procedure */
+  unsigned int           md5_ctxtsize;  /* Context structure size */
+  unsigned int           md5_resultlen; /* Result length (bytes) */
+} MD5_params;
+
+typedef struct {
+  const MD5_params      *md5_hash;      /* Hash function definition */
+  void                  *md5_hashctx;   /* Hash function context */
+} MD5_context;
+
+extern const MD5_params Curl_DIGEST_MD5[1];
 extern const HMAC_params Curl_HMAC_MD5[1];
 
 void Curl_md5it(unsigned char *output,
                 const unsigned char *input);
+
+MD5_context * Curl_MD5_init(const MD5_params *md5params);
+int Curl_MD5_update(MD5_context *context,
+                    const unsigned char *data,
+                    unsigned int len);
+int Curl_MD5_final(MD5_context *context, unsigned char *result);
+
 #endif
 
 #endif /* HEADER_CURL_MD5_H */
index e119458..e3cdc72 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include <curl/curl.h> /* for the typedefs */
+/*
+ * Nasty internal details ahead...
+ *
+ * File curl_memory.h must be included by _all_ *.c source files
+ * that use memory related functions strdup, malloc, calloc, realloc
+ * or free, and given source file is used to build libcurl library.
+ *
+ * There is nearly no exception to above rule. All libcurl source
+ * files in 'lib' subdirectory as well as those living deep inside
+ * 'packages' subdirectories and linked together in order to build
+ * libcurl library shall follow it.
+ *
+ * File lib/strdup.c is an exception, given that it provides a strdup
+ * clone implementation while using malloc. Extra care needed inside
+ * this one. TODO: revisit this paragraph and related code.
+ *
+ * The need for curl_memory.h inclusion is due to libcurl's feature
+ * of allowing library user to provide memory replacement functions,
+ * memory callbacks, at runtime with curl_global_init_mem()
+ *
+ * Any *.c source file used to build libcurl library that does not
+ * include curl_memory.h and uses any memory function of the five
+ * mentioned above will compile without any indication, but it will
+ * trigger weird memory related issues at runtime.
+ *
+ * OTOH some source files from 'lib' subdirectory may additionally be
+ * used directly as source code when using some curlx_ functions by
+ * third party programs that don't even use libcurl at all. When using
+ * these source files in this way it is necessary these are compiled
+ * with CURLX_NO_MEMORY_CALLBACKS defined, in order to ensure that no
+ * attempt of calling libcurl's memory callbacks is done from code
+ * which can not use this machinery.
+ *
+ * Notice that libcurl's 'memory tracking' system works chaining into
+ * the memory callback machinery. This implies that when compiling
+ * 'lib' source files with CURLX_NO_MEMORY_CALLBACKS defined this file
+ * disengages usage of libcurl's 'memory tracking' system, defining
+ * MEMDEBUG_NODEFINES and overriding CURLDEBUG purpose.
+ *
+ * CURLX_NO_MEMORY_CALLBACKS takes precedence over CURLDEBUG. This is
+ * done in order to allow building a 'memory tracking' enabled libcurl
+ * and at the same time allow building programs which do not use it.
+ *
+ * Programs and libraries in 'tests' subdirectories have specific
+ * purposes and needs, and as such each one will use whatever fits
+ * best, depending additionally wether it links with libcurl or not.
+ *
+ * Caveat emptor. Proper curlx_* separation is a work in progress
+ * the same as CURLX_NO_MEMORY_CALLBACKS usage, some adjustments may
+ * still be required. IOW don't use them yet, there are sharp edges.
+ */
+
+#ifdef HEADER_CURL_MEMDEBUG_H
+#error "Header memdebug.h shall not be included before curl_memory.h"
+#endif
+
+#ifndef CURLX_NO_MEMORY_CALLBACKS
+
+#include <curl/curl.h> /* for the callback typedefs */
 
 extern curl_malloc_callback Curl_cmalloc;
 extern curl_free_callback Curl_cfree;
 extern curl_realloc_callback Curl_crealloc;
 extern curl_strdup_callback Curl_cstrdup;
 extern curl_calloc_callback Curl_ccalloc;
+#if defined(WIN32) && defined(UNICODE)
+extern curl_wcsdup_callback Curl_cwcsdup;
+#endif
 
 #ifndef CURLDEBUG
-/* Only do this define-mania if we're not using the memdebug system, as that
-   has preference on this magic. */
+
+/*
+ * libcurl's 'memory tracking' system defines strdup, malloc, calloc,
+ * realloc and free, along with others, in memdebug.h in a different
+ * way although still using memory callbacks forward declared above.
+ * When using the 'memory tracking' system (CURLDEBUG defined) we do
+ * not define here the five memory functions given that definitions
+ * from memdebug.h are the ones that shall be used.
+ */
+
 #undef strdup
 #define strdup(ptr) Curl_cstrdup(ptr)
 #undef malloc
@@ -44,6 +113,28 @@ extern curl_calloc_callback Curl_ccalloc;
 #undef free
 #define free(ptr) Curl_cfree(ptr)
 
+#ifdef WIN32
+#  ifdef UNICODE
+#    undef wcsdup
+#    define wcsdup(ptr) Curl_cwcsdup(ptr)
+#    undef _wcsdup
+#    define _wcsdup(ptr) Curl_cwcsdup(ptr)
+#    undef _tcsdup
+#    define _tcsdup(ptr) Curl_cwcsdup(ptr)
+#  else
+#    undef _tcsdup
+#    define _tcsdup(ptr) Curl_cstrdup(ptr)
+#  endif
 #endif
 
+#endif /* CURLDEBUG */
+
+#else /* CURLX_NO_MEMORY_CALLBACKS */
+
+#ifndef MEMDEBUG_NODEFINES
+#define MEMDEBUG_NODEFINES
+#endif
+
+#endif /* CURLX_NO_MEMORY_CALLBACKS */
+
 #endif /* HEADER_CURL_MEMORY_H */
index a1e2bf0..a71c2bb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "curl_memrchr.h"
 
@@ -50,8 +50,8 @@ Curl_memrchr(const void *s, int c, size_t n)
 
   p += n - 1;
 
-  while (p >= q) {
-    if (*p == (unsigned char)c)
+  while(p >= q) {
+    if(*p == (unsigned char)c)
       return (void *)p;
     p--;
   }
index 37061b6..324c73a 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_MEMRCHR
 
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
new file mode 100644 (file)
index 0000000..6c02239
--- /dev/null
@@ -0,0 +1,82 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE))
+
+ /*
+  * MultiByte conversions using Windows kernel32 library.
+  */
+
+#include "curl_multibyte.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8)
+{
+  wchar_t *str_w = NULL;
+
+  if(str_utf8) {
+    int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
+                                        str_utf8, -1, NULL, 0);
+    if(str_w_len > 0) {
+      str_w = malloc(str_w_len * sizeof(wchar_t));
+      if(str_w) {
+        if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w,
+                               str_w_len) == 0) {
+          Curl_safefree(str_w);
+        }
+      }
+    }
+  }
+
+  return str_w;
+}
+
+char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
+{
+  char *str_utf8 = NULL;
+
+  if(str_w) {
+    int str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL,
+                                           0, NULL, NULL);
+    if(str_utf8_len > 0) {
+      str_utf8 = malloc(str_utf8_len * sizeof(wchar_t));
+      if(str_utf8) {
+        if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len,
+                               NULL, FALSE) == 0) {
+          Curl_safefree(str_utf8);
+        }
+      }
+    }
+  }
+
+  return str_utf8;
+}
+
+#endif /* USE_WIN32_IDN || (USE_WINDOWS_SSPI && UNICODE) */
diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h
new file mode 100644 (file)
index 0000000..7ee5eae
--- /dev/null
@@ -0,0 +1,90 @@
+#ifndef HEADER_CURL_MULTIBYTE_H
+#define HEADER_CURL_MULTIBYTE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE))
+
+ /*
+  * MultiByte conversions using Windows kernel32 library.
+  */
+
+wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8);
+char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w);
+
+#endif /* USE_WIN32_IDN || (USE_WINDOWS_SSPI && UNICODE) */
+
+
+#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI)
+
+/*
+ * Macros Curl_convert_UTF8_to_tchar(), Curl_convert_tchar_to_UTF8()
+ * and Curl_unicodefree() main purpose is to minimize the number of
+ * preprocessor conditional directives needed by code using these
+ * to differentiate UNICODE from non-UNICODE builds.
+ *
+ * When building with UNICODE defined, this two macros
+ * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8()
+ * return a pointer to a newly allocated memory area holding result.
+ * When the result is no longer needed, allocated memory is intended
+ * to be free'ed with Curl_unicodefree().
+ *
+ * When building without UNICODE defined, this macros
+ * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8()
+ * return the pointer received as argument. Curl_unicodefree() does
+ * no actual free'ing of this pointer it is simply set to NULL.
+ */
+
+#ifdef UNICODE
+
+#define Curl_convert_UTF8_to_tchar(ptr) Curl_convert_UTF8_to_wchar((ptr))
+#define Curl_convert_tchar_to_UTF8(ptr) Curl_convert_wchar_to_UTF8((ptr))
+#define Curl_unicodefree(ptr) \
+  do {if((ptr)) {free((ptr)); (ptr) = NULL;}} WHILE_FALSE
+
+typedef union {
+  unsigned short       *tchar_ptr;
+  const unsigned short *const_tchar_ptr;
+  unsigned short       *tbyte_ptr;
+  const unsigned short *const_tbyte_ptr;
+} xcharp_u;
+
+#else
+
+#define Curl_convert_UTF8_to_tchar(ptr) (ptr)
+#define Curl_convert_tchar_to_UTF8(ptr) (ptr)
+#define Curl_unicodefree(ptr) \
+  do {(ptr) = NULL;} WHILE_FALSE
+
+typedef union {
+  char                *tchar_ptr;
+  const char          *const_tchar_ptr;
+  unsigned char       *tbyte_ptr;
+  const unsigned char *const_tbyte_ptr;
+} xcharp_u;
+
+#endif /* UNICODE */
+
+#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI */
+
+#endif /* HEADER_CURL_MULTIBYTE_H */
diff --git a/lib/curl_ntlm.c b/lib/curl_ntlm.c
new file mode 100644 (file)
index 0000000..4d126a5
--- /dev/null
@@ -0,0 +1,244 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#ifdef USE_NTLM
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#include "urldata.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_msgs.h"
+#include "curl_ntlm_wb.h"
+#include "url.h"
+#include "curl_memory.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#if defined(USE_NSS)
+#include "nssg.h"
+#elif defined(USE_WINDOWS_SSPI)
+#include "curl_sspi.h"
+#endif
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+CURLcode Curl_input_ntlm(struct connectdata *conn,
+                         bool proxy,         /* if proxy or not */
+                         const char *header) /* rest of the www-authenticate:
+                                                header */
+{
+  /* point to the correct struct with this */
+  struct ntlmdata *ntlm;
+  CURLcode result = CURLE_OK;
+
+#ifdef USE_NSS
+  result = Curl_nss_force_init(conn->data);
+  if(result)
+    return result;
+#endif
+
+  ntlm = proxy ? &conn->proxyntlm : &conn->ntlm;
+
+  /* skip initial whitespaces */
+  while(*header && ISSPACE(*header))
+    header++;
+
+  if(checkprefix("NTLM", header)) {
+    header += strlen("NTLM");
+
+    while(*header && ISSPACE(*header))
+      header++;
+
+    if(*header) {
+      result = Curl_ntlm_decode_type2_message(conn->data, header, ntlm);
+      if(CURLE_OK != result)
+        return result;
+
+      ntlm->state = NTLMSTATE_TYPE2; /* We got a type-2 message */
+    }
+    else {
+      if(ntlm->state == NTLMSTATE_TYPE3) {
+        infof(conn->data, "NTLM handshake rejected\n");
+        Curl_http_ntlm_cleanup(conn);
+        ntlm->state = NTLMSTATE_NONE;
+        return CURLE_REMOTE_ACCESS_DENIED;
+      }
+      else if(ntlm->state >= NTLMSTATE_TYPE1) {
+        infof(conn->data, "NTLM handshake failure (internal error)\n");
+        return CURLE_REMOTE_ACCESS_DENIED;
+      }
+
+      ntlm->state = NTLMSTATE_TYPE1; /* We should send away a type-1 */
+    }
+  }
+
+  return result;
+}
+
+/*
+ * This is for creating ntlm header output
+ */
+CURLcode Curl_output_ntlm(struct connectdata *conn,
+                          bool proxy)
+{
+  char *base64 = NULL;
+  size_t len = 0;
+  CURLcode error;
+
+  /* point to the address of the pointer that holds the string to send to the
+     server, which is for a plain host or for a HTTP proxy */
+  char **allocuserpwd;
+
+  /* point to the name and password for this */
+  const char *userp;
+  const char *passwdp;
+
+  /* point to the correct struct with this */
+  struct ntlmdata *ntlm;
+  struct auth *authp;
+
+  DEBUGASSERT(conn);
+  DEBUGASSERT(conn->data);
+
+#ifdef USE_NSS
+  if(CURLE_OK != Curl_nss_force_init(conn->data))
+    return CURLE_OUT_OF_MEMORY;
+#endif
+
+  if(proxy) {
+    allocuserpwd = &conn->allocptr.proxyuserpwd;
+    userp = conn->proxyuser;
+    passwdp = conn->proxypasswd;
+    ntlm = &conn->proxyntlm;
+    authp = &conn->data->state.authproxy;
+  }
+  else {
+    allocuserpwd = &conn->allocptr.userpwd;
+    userp = conn->user;
+    passwdp = conn->passwd;
+    ntlm = &conn->ntlm;
+    authp = &conn->data->state.authhost;
+  }
+  authp->done = FALSE;
+
+  /* not set means empty */
+  if(!userp)
+    userp = "";
+
+  if(!passwdp)
+    passwdp = "";
+
+#ifdef USE_WINDOWS_SSPI
+  if(s_hSecDll == NULL) {
+    /* not thread safe and leaks - use curl_global_init() to avoid */
+    CURLcode err = Curl_sspi_global_init();
+    if(s_hSecDll == NULL)
+      return err;
+  }
+#endif
+
+  switch(ntlm->state) {
+  case NTLMSTATE_TYPE1:
+  default: /* for the weird cases we (re)start here */
+    /* Create a type-1 message */
+    error = Curl_ntlm_create_type1_message(userp, passwdp, ntlm, &base64,
+                                           &len);
+    if(error)
+      return error;
+
+    if(base64) {
+      Curl_safefree(*allocuserpwd);
+      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+                              proxy ? "Proxy-" : "",
+                              base64);
+      free(base64);
+      if(!*allocuserpwd)
+        return CURLE_OUT_OF_MEMORY;
+      DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
+    }
+    break;
+
+  case NTLMSTATE_TYPE2:
+    /* We already received the type-2 message, create a type-3 message */
+    error = Curl_ntlm_create_type3_message(conn->data, userp, passwdp,
+                                           ntlm, &base64, &len);
+    if(error)
+      return error;
+
+    if(base64) {
+      Curl_safefree(*allocuserpwd);
+      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
+                              proxy ? "Proxy-" : "",
+                              base64);
+      free(base64);
+      if(!*allocuserpwd)
+        return CURLE_OUT_OF_MEMORY;
+      DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
+
+      ntlm->state = NTLMSTATE_TYPE3; /* we send a type-3 */
+      authp->done = TRUE;
+    }
+    break;
+
+  case NTLMSTATE_TYPE3:
+    /* connection is already authenticated,
+     * don't send a header in future requests */
+    Curl_safefree(*allocuserpwd);
+    authp->done = TRUE;
+    break;
+  }
+
+  return CURLE_OK;
+}
+
+void Curl_http_ntlm_cleanup(struct connectdata *conn)
+{
+#ifdef USE_WINDOWS_SSPI
+  Curl_ntlm_sspi_cleanup(&conn->ntlm);
+  Curl_ntlm_sspi_cleanup(&conn->proxyntlm);
+#elif defined(NTLM_WB_ENABLED)
+  Curl_ntlm_wb_cleanup(conn);
+#else
+  (void)conn;
+#endif
+}
+
+#endif /* USE_NTLM */
diff --git a/lib/curl_ntlm.h b/lib/curl_ntlm.h
new file mode 100644 (file)
index 0000000..21a9e9e
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef HEADER_CURL_NTLM_H
+#define HEADER_CURL_NTLM_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+
+#ifdef USE_NTLM
+
+/* this is for ntlm header input */
+CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy,
+                         const char *header);
+
+/* this is for creating ntlm header output */
+CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);
+
+void Curl_http_ntlm_cleanup(struct connectdata *conn);
+
+#else
+
+#define Curl_http_ntlm_cleanup(a) Curl_nop_stmt
+
+#endif
+
+#endif /* HEADER_CURL_NTLM_H */
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
new file mode 100644 (file)
index 0000000..79aeb08
--- /dev/null
@@ -0,0 +1,436 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#ifdef USE_SSLEAY
+
+#  ifdef USE_OPENSSL
+#    include <openssl/des.h>
+#    ifndef OPENSSL_NO_MD4
+#      include <openssl/md4.h>
+#    endif
+#    include <openssl/md5.h>
+#    include <openssl/ssl.h>
+#    include <openssl/rand.h>
+#  else
+#    include <des.h>
+#    ifndef OPENSSL_NO_MD4
+#      include <md4.h>
+#    endif
+#    include <md5.h>
+#    include <ssl.h>
+#    include <rand.h>
+#  endif
+#  if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+#    define DES_key_schedule des_key_schedule
+#    define DES_cblock des_cblock
+#    define DES_set_odd_parity des_set_odd_parity
+#    define DES_set_key des_set_key
+#    define DES_ecb_encrypt des_ecb_encrypt
+#    define DESKEY(x) x
+#    define DESKEYARG(x) x
+#  else
+#    define DESKEYARG(x) *x
+#    define DESKEY(x) &x
+#  endif
+
+#elif defined(USE_GNUTLS_NETTLE)
+
+#  include <nettle/des.h>
+#  include <nettle/md4.h>
+
+#elif defined(USE_GNUTLS)
+
+#  include <gcrypt.h>
+#  define MD5_DIGEST_LENGTH 16
+#  define MD4_DIGEST_LENGTH 16
+
+#elif defined(USE_NSS)
+
+#  include <nss.h>
+#  include <pk11pub.h>
+#  include <hasht.h>
+#  include "curl_md4.h"
+#  define MD5_DIGEST_LENGTH MD5_LENGTH
+
+#elif defined(USE_DARWINSSL)
+
+#  include <CommonCrypto/CommonCryptor.h>
+#  include <CommonCrypto/CommonDigest.h>
+
+#else
+#  error "Can't compile NTLM support without a crypto library."
+#endif
+
+#include "urldata.h"
+#include "non-ascii.h"
+#include "rawstr.h"
+#include "curl_memory.h"
+#include "curl_ntlm_core.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#ifdef USE_SSLEAY
+/*
+ * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.  The
+ * key schedule ks is also set.
+ */
+static void setup_des_key(const unsigned char *key_56,
+                          DES_key_schedule DESKEYARG(ks))
+{
+  DES_cblock key;
+
+  key[0] = key_56[0];
+  key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
+  key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
+  key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3));
+  key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4));
+  key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
+  key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
+  key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
+
+  DES_set_odd_parity(&key);
+  DES_set_key(&key, ks);
+}
+
+#else /* defined(USE_SSLEAY) */
+
+/*
+ * Turns a 56 bit key into the 64 bit, odd parity key.  Used by GnuTLS and NSS.
+ */
+static void extend_key_56_to_64(const unsigned char *key_56, char *key)
+{
+  key[0] = key_56[0];
+  key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
+  key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
+  key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3));
+  key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4));
+  key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
+  key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
+  key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
+}
+
+#if defined(USE_GNUTLS_NETTLE)
+
+static void setup_des_key(const unsigned char *key_56,
+                          struct des_ctx *des)
+{
+  char key[8];
+  extend_key_56_to_64(key_56, key);
+  des_set_key(des, (const uint8_t*)key);
+}
+
+#elif defined(USE_GNUTLS)
+
+/*
+ * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
+ */
+static void setup_des_key(const unsigned char *key_56,
+                          gcry_cipher_hd_t *des)
+{
+  char key[8];
+  extend_key_56_to_64(key_56, key);
+  gcry_cipher_setkey(*des, key, 8);
+}
+
+#elif defined(USE_NSS)
+
+/*
+ * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using
+ * the expanded key.  The caller is responsible for giving 64 bit of valid
+ * data is IN and (at least) 64 bit large buffer as OUT.
+ */
+static bool encrypt_des(const unsigned char *in, unsigned char *out,
+                        const unsigned char *key_56)
+{
+  const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */
+  PK11SlotInfo *slot = NULL;
+  char key[8];                                /* expanded 64 bit key */
+  SECItem key_item;
+  PK11SymKey *symkey = NULL;
+  SECItem *param = NULL;
+  PK11Context *ctx = NULL;
+  int out_len;                                /* not used, required by NSS */
+  bool rv = FALSE;
+
+  /* use internal slot for DES encryption (requires NSS to be initialized) */
+  slot = PK11_GetInternalKeySlot();
+  if(!slot)
+    return FALSE;
+
+  /* expand the 56 bit key to 64 bit and wrap by NSS */
+  extend_key_56_to_64(key_56, key);
+  key_item.data = (unsigned char *)key;
+  key_item.len = /* hard-wired */ 8;
+  symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
+                             &key_item, NULL);
+  if(!symkey)
+    goto fail;
+
+  /* create DES encryption context */
+  param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL);
+  if(!param)
+    goto fail;
+  ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param);
+  if(!ctx)
+    goto fail;
+
+  /* perform the encryption */
+  if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8,
+                                 (unsigned char *)in, /* inbuflen */ 8)
+      && SECSuccess == PK11_Finalize(ctx))
+    rv = /* all OK */ TRUE;
+
+fail:
+  /* cleanup */
+  if(ctx)
+    PK11_DestroyContext(ctx, PR_TRUE);
+  if(symkey)
+    PK11_FreeSymKey(symkey);
+  if(param)
+    SECITEM_FreeItem(param, PR_TRUE);
+  PK11_FreeSlot(slot);
+  return rv;
+}
+
+#elif defined(USE_DARWINSSL)
+
+static bool encrypt_des(const unsigned char *in, unsigned char *out,
+                        const unsigned char *key_56)
+{
+  char key[8];
+  size_t out_len;
+  CCCryptorStatus err;
+
+  extend_key_56_to_64(key_56, key);
+  err = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode, key,
+                kCCKeySizeDES, NULL, in, 8 /* inbuflen */, out,
+                8 /* outbuflen */, &out_len);
+  return err == kCCSuccess;
+}
+
+#endif /* defined(USE_DARWINSSL) */
+
+#endif /* defined(USE_SSLEAY) */
+
+ /*
+  * takes a 21 byte array and treats it as 3 56-bit DES keys. The
+  * 8 byte plaintext is encrypted with each key and the resulting 24
+  * bytes are stored in the results array.
+  */
+void Curl_ntlm_core_lm_resp(const unsigned char *keys,
+                            const unsigned char *plaintext,
+                            unsigned char *results)
+{
+#ifdef USE_SSLEAY
+  DES_key_schedule ks;
+
+  setup_des_key(keys, DESKEY(ks));
+  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results,
+                  DESKEY(ks), DES_ENCRYPT);
+
+  setup_des_key(keys + 7, DESKEY(ks));
+  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 8),
+                  DESKEY(ks), DES_ENCRYPT);
+
+  setup_des_key(keys + 14, DESKEY(ks));
+  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16),
+                  DESKEY(ks), DES_ENCRYPT);
+#elif defined(USE_GNUTLS_NETTLE)
+  struct des_ctx des;
+  setup_des_key(keys, &des);
+  des_encrypt(&des, 8, results, plaintext);
+  setup_des_key(keys + 7, &des);
+  des_encrypt(&des, 8, results + 8, plaintext);
+  setup_des_key(keys + 14, &des);
+  des_encrypt(&des, 8, results + 16, plaintext);
+#elif defined(USE_GNUTLS)
+  gcry_cipher_hd_t des;
+
+  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+  setup_des_key(keys, &des);
+  gcry_cipher_encrypt(des, results, 8, plaintext, 8);
+  gcry_cipher_close(des);
+
+  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+  setup_des_key(keys + 7, &des);
+  gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8);
+  gcry_cipher_close(des);
+
+  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+  setup_des_key(keys + 14, &des);
+  gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8);
+  gcry_cipher_close(des);
+#elif defined(USE_NSS) || defined(USE_DARWINSSL)
+  encrypt_des(plaintext, results, keys);
+  encrypt_des(plaintext, results + 8, keys + 7);
+  encrypt_des(plaintext, results + 16, keys + 14);
+#endif
+}
+
+/*
+ * Set up lanmanager hashed password
+ */
+void Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data,
+                               const char *password,
+                               unsigned char *lmbuffer /* 21 bytes */)
+{
+  CURLcode res;
+  unsigned char pw[14];
+  static const unsigned char magic[] = {
+    0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
+  };
+  size_t len = CURLMIN(strlen(password), 14);
+
+  Curl_strntoupper((char *)pw, password, len);
+  memset(&pw[len], 0, 14 - len);
+
+  /*
+   * The LanManager hashed password needs to be created using the
+   * password in the network encoding not the host encoding.
+   */
+  res = Curl_convert_to_network(data, (char *)pw, 14);
+  if(res)
+    return;
+
+  {
+    /* Create LanManager hashed password. */
+
+#ifdef USE_SSLEAY
+    DES_key_schedule ks;
+
+    setup_des_key(pw, DESKEY(ks));
+    DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
+                    DESKEY(ks), DES_ENCRYPT);
+
+    setup_des_key(pw + 7, DESKEY(ks));
+    DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer + 8),
+                    DESKEY(ks), DES_ENCRYPT);
+#elif defined(USE_GNUTLS_NETTLE)
+    struct des_ctx des;
+    setup_des_key(pw, &des);
+    des_encrypt(&des, 8, lmbuffer, magic);
+    setup_des_key(pw + 7, &des);
+    des_encrypt(&des, 8, lmbuffer + 8, magic);
+#elif defined(USE_GNUTLS)
+    gcry_cipher_hd_t des;
+
+    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+    setup_des_key(pw, &des);
+    gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8);
+    gcry_cipher_close(des);
+
+    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
+    setup_des_key(pw + 7, &des);
+    gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8);
+    gcry_cipher_close(des);
+#elif defined(USE_NSS) || defined(USE_DARWINSSL)
+    encrypt_des(magic, lmbuffer, pw);
+    encrypt_des(magic, lmbuffer + 8, pw + 7);
+#endif
+
+    memset(lmbuffer + 16, 0, 21 - 16);
+  }
+}
+
+#if USE_NTRESPONSES
+static void ascii_to_unicode_le(unsigned char *dest, const char *src,
+                                size_t srclen)
+{
+  size_t i;
+  for(i = 0; i < srclen; i++) {
+    dest[2 * i] = (unsigned char)src[i];
+    dest[2 * i + 1] = '\0';
+  }
+}
+
+/*
+ * Set up nt hashed passwords
+ */
+CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
+                                   const char *password,
+                                   unsigned char *ntbuffer /* 21 bytes */)
+{
+  size_t len = strlen(password);
+  unsigned char *pw = malloc(len * 2);
+  CURLcode result;
+  if(!pw)
+    return CURLE_OUT_OF_MEMORY;
+
+  ascii_to_unicode_le(pw, password, len);
+
+  /*
+   * The NT hashed password needs to be created using the password in the
+   * network encoding not the host encoding.
+   */
+  result = Curl_convert_to_network(data, (char *)pw, len * 2);
+  if(result)
+    return result;
+
+  {
+    /* Create NT hashed password. */
+#ifdef USE_SSLEAY
+    MD4_CTX MD4pw;
+    MD4_Init(&MD4pw);
+    MD4_Update(&MD4pw, pw, 2 * len);
+    MD4_Final(ntbuffer, &MD4pw);
+#elif defined(USE_GNUTLS_NETTLE)
+    struct md4_ctx MD4pw;
+    md4_init(&MD4pw);
+    md4_update(&MD4pw, (unsigned int)(2 * len), pw);
+    md4_digest(&MD4pw, MD4_DIGEST_SIZE, ntbuffer);
+#elif defined(USE_GNUTLS)
+    gcry_md_hd_t MD4pw;
+    gcry_md_open(&MD4pw, GCRY_MD_MD4, 0);
+    gcry_md_write(MD4pw, pw, 2 * len);
+    memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH);
+    gcry_md_close(MD4pw);
+#elif defined(USE_NSS)
+    Curl_md4it(ntbuffer, pw, 2 * len);
+#elif defined(USE_DARWINSSL)
+    (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer);
+#endif
+
+    memset(ntbuffer + 16, 0, 21 - 16);
+  }
+
+  free(pw);
+
+  return CURLE_OK;
+}
+#endif /* USE_NTRESPONSES */
+
+#endif /* USE_NTLM && !USE_WINDOWS_SSPI */
diff --git a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
new file mode 100644 (file)
index 0000000..9aa126b
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef HEADER_CURL_NTLM_CORE_H
+#define HEADER_CURL_NTLM_CORE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+
+#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
+
+#ifdef USE_SSLEAY
+#  if !defined(OPENSSL_VERSION_NUMBER) && \
+      !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H)
+#    error "curl_ntlm_core.h shall not be included before OpenSSL headers."
+#  endif
+#  ifdef OPENSSL_NO_MD4
+#    define USE_NTRESPONSES 0
+#    define USE_NTLM2SESSION 0
+#  endif
+#endif
+
+/*
+ * Define USE_NTRESPONSES to 1 in order to make the type-3 message include
+ * the NT response message. Define USE_NTLM2SESSION to 1 in order to make
+ * the type-3 message include the NTLM2Session response message, requires
+ * USE_NTRESPONSES defined to 1.
+ */
+
+#ifndef USE_NTRESPONSES
+#  define USE_NTRESPONSES 1
+#  define USE_NTLM2SESSION 1
+#endif
+
+void Curl_ntlm_core_lm_resp(const unsigned char *keys,
+                            const unsigned char *plaintext,
+                            unsigned char *results);
+
+void Curl_ntlm_core_mk_lm_hash(struct SessionHandle *data,
+                               const char *password,
+                               unsigned char *lmbuffer /* 21 bytes */);
+
+#if USE_NTRESPONSES
+CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
+                                   const char *password,
+                                   unsigned char *ntbuffer /* 21 bytes */);
+#endif
+
+#endif /* USE_NTLM && !USE_WINDOWS_SSPI */
+
+#endif /* HEADER_CURL_NTLM_CORE_H */
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c
new file mode 100644 (file)
index 0000000..125ce6e
--- /dev/null
@@ -0,0 +1,920 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#ifdef USE_NTLM
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#include "urldata.h"
+#include "non-ascii.h"
+#include "sendf.h"
+#include "curl_base64.h"
+#include "curl_ntlm_core.h"
+#include "curl_gethostname.h"
+#include "curl_multibyte.h"
+#include "warnless.h"
+#include "curl_memory.h"
+
+#ifdef USE_WINDOWS_SSPI
+#  include "curl_sspi.h"
+#endif
+
+#include "sslgen.h"
+
+#define BUILDING_CURL_NTLM_MSGS_C
+#include "curl_ntlm_msgs.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* "NTLMSSP" signature is always in ASCII regardless of the platform */
+#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
+
+#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff)
+#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8) & 0xff), \
+  (((x) >> 16) & 0xff), (((x) >> 24) & 0xff)
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+static void ntlm_print_flags(FILE *handle, unsigned long flags)
+{
+  if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");
+  if(flags & NTLMFLAG_NEGOTIATE_OEM)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM ");
+  if(flags & NTLMFLAG_REQUEST_TARGET)
+    fprintf(handle, "NTLMFLAG_REQUEST_TARGET ");
+  if(flags & (1<<3))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_3 ");
+  if(flags & NTLMFLAG_NEGOTIATE_SIGN)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_SIGN ");
+  if(flags & NTLMFLAG_NEGOTIATE_SEAL)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_SEAL ");
+  if(flags & NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE ");
+  if(flags & NTLMFLAG_NEGOTIATE_LM_KEY)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_LM_KEY ");
+  if(flags & NTLMFLAG_NEGOTIATE_NETWARE)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_NETWARE ");
+  if(flags & NTLMFLAG_NEGOTIATE_NTLM_KEY)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM_KEY ");
+  if(flags & (1<<10))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_10 ");
+  if(flags & NTLMFLAG_NEGOTIATE_ANONYMOUS)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_ANONYMOUS ");
+  if(flags & NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED ");
+  if(flags & NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED ");
+  if(flags & NTLMFLAG_NEGOTIATE_LOCAL_CALL)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_LOCAL_CALL ");
+  if(flags & NTLMFLAG_NEGOTIATE_ALWAYS_SIGN)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_ALWAYS_SIGN ");
+  if(flags & NTLMFLAG_TARGET_TYPE_DOMAIN)
+    fprintf(handle, "NTLMFLAG_TARGET_TYPE_DOMAIN ");
+  if(flags & NTLMFLAG_TARGET_TYPE_SERVER)
+    fprintf(handle, "NTLMFLAG_TARGET_TYPE_SERVER ");
+  if(flags & NTLMFLAG_TARGET_TYPE_SHARE)
+    fprintf(handle, "NTLMFLAG_TARGET_TYPE_SHARE ");
+  if(flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM2_KEY ");
+  if(flags & NTLMFLAG_REQUEST_INIT_RESPONSE)
+    fprintf(handle, "NTLMFLAG_REQUEST_INIT_RESPONSE ");
+  if(flags & NTLMFLAG_REQUEST_ACCEPT_RESPONSE)
+    fprintf(handle, "NTLMFLAG_REQUEST_ACCEPT_RESPONSE ");
+  if(flags & NTLMFLAG_REQUEST_NONNT_SESSION_KEY)
+    fprintf(handle, "NTLMFLAG_REQUEST_NONNT_SESSION_KEY ");
+  if(flags & NTLMFLAG_NEGOTIATE_TARGET_INFO)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_TARGET_INFO ");
+  if(flags & (1<<24))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_24 ");
+  if(flags & (1<<25))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_25 ");
+  if(flags & (1<<26))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_26 ");
+  if(flags & (1<<27))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_27 ");
+  if(flags & (1<<28))
+    fprintf(handle, "NTLMFLAG_UNKNOWN_28 ");
+  if(flags & NTLMFLAG_NEGOTIATE_128)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_128 ");
+  if(flags & NTLMFLAG_NEGOTIATE_KEY_EXCHANGE)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_KEY_EXCHANGE ");
+  if(flags & NTLMFLAG_NEGOTIATE_56)
+    fprintf(handle, "NTLMFLAG_NEGOTIATE_56 ");
+}
+
+static void ntlm_print_hex(FILE *handle, const char *buf, size_t len)
+{
+  const char *p = buf;
+  (void)handle;
+  fprintf(stderr, "0x");
+  while(len-- > 0)
+    fprintf(stderr, "%02.2x", (unsigned int)*p++);
+}
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+#ifndef USE_WINDOWS_SSPI
+/*
+ * This function converts from the little endian format used in the
+ * incoming package to whatever endian format we're using natively.
+ * Argument is a pointer to a 4 byte buffer.
+ */
+static unsigned int readint_le(unsigned char *buf)
+{
+  return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) |
+    ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24);
+}
+#endif
+
+/*
+  NTLM message structure notes:
+
+  A 'short' is a 'network short', a little-endian 16-bit unsigned value.
+
+  A 'long' is a 'network long', a little-endian, 32-bit unsigned value.
+
+  A 'security buffer' represents a triplet used to point to a buffer,
+  consisting of two shorts and one long:
+
+    1. A 'short' containing the length of the buffer content in bytes.
+    2. A 'short' containing the allocated space for the buffer in bytes.
+    3. A 'long' containing the offset to the start of the buffer in bytes,
+       from the beginning of the NTLM message.
+*/
+
+/*
+ * Curl_ntlm_decode_type2_message()
+ *
+ * This is used to decode a ntlm type-2 message received from a HTTP or SASL
+ * based (such as SMTP, POP3 or IMAP) server. The message is first decoded
+ * from a base64 string into a raw ntlm message and checked for validity
+ * before the appropriate data for creating a type-3 message is written to
+ * the given ntlm data structure.
+ *
+ * Parameters:
+ *
+ * data    [in]     - Pointer to session handle.
+ * header  [in]     - Pointer to the input buffer.
+ * ntlm    [in]     - Pointer to ntlm data struct being used and modified.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
+                                        const char* header,
+                                        struct ntlmdata* ntlm)
+{
+#ifndef USE_WINDOWS_SSPI
+  static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
+#endif
+
+  /* NTLM type-2 message structure:
+
+          Index  Description            Content
+            0    NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"
+                                        (0x4e544c4d53535000)
+            8    NTLM Message Type      long (0x02000000)
+           12    Target Name            security buffer
+           20    Flags                  long
+           24    Challenge              8 bytes
+          (32)   Context                8 bytes (two consecutive longs) (*)
+          (40)   Target Information     security buffer (*)
+          (48)   OS Version Structure   8 bytes (*)
+  32 (48) (56)   Start of data block    (*)
+                                        (*) -> Optional
+  */
+
+  size_t size = 0;
+  unsigned char *buffer = NULL;
+  CURLcode error;
+
+#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI)
+  (void)data;
+#endif
+
+  error = Curl_base64_decode(header, &buffer, &size);
+  if(error)
+    return error;
+
+  if(!buffer) {
+    infof(data, "NTLM handshake failure (unhandled condition)\n");
+    return CURLE_REMOTE_ACCESS_DENIED;
+  }
+
+#ifdef USE_WINDOWS_SSPI
+  ntlm->type_2 = malloc(size + 1);
+  if(ntlm->type_2 == NULL) {
+    free(buffer);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  ntlm->n_type_2 = curlx_uztoul(size);
+  memcpy(ntlm->type_2, buffer, size);
+#else
+  ntlm->flags = 0;
+
+  if((size < 32) ||
+     (memcmp(buffer, NTLMSSP_SIGNATURE, 8) != 0) ||
+     (memcmp(buffer + 8, type2_marker, sizeof(type2_marker)) != 0)) {
+    /* This was not a good enough type-2 message */
+    free(buffer);
+    infof(data, "NTLM handshake failure (bad type-2 message)\n");
+    return CURLE_REMOTE_ACCESS_DENIED;
+  }
+
+  ntlm->flags = readint_le(&buffer[20]);
+  memcpy(ntlm->nonce, &buffer[24], 8);
+
+  DEBUG_OUT({
+    fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags);
+    ntlm_print_flags(stderr, ntlm->flags);
+    fprintf(stderr, "\n                  nonce=");
+    ntlm_print_hex(stderr, (char *)ntlm->nonce, 8);
+    fprintf(stderr, "\n****\n");
+    fprintf(stderr, "**** Header %s\n ", header);
+  });
+#endif
+  free(buffer);
+
+  return CURLE_OK;
+}
+
+#ifdef USE_WINDOWS_SSPI
+void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm)
+{
+  Curl_safefree(ntlm->type_2);
+  if(ntlm->has_handles) {
+    s_pSecFn->DeleteSecurityContext(&ntlm->c_handle);
+    s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
+    ntlm->has_handles = 0;
+  }
+  if(ntlm->p_identity) {
+    Curl_safefree(ntlm->identity.User);
+    Curl_safefree(ntlm->identity.Password);
+    Curl_safefree(ntlm->identity.Domain);
+    ntlm->p_identity = NULL;
+  }
+}
+#endif
+
+#ifndef USE_WINDOWS_SSPI
+/* copy the source to the destination and fill in zeroes in every
+   other destination byte! */
+static void unicodecpy(unsigned char *dest,
+                       const char *src, size_t length)
+{
+  size_t i;
+  for(i = 0; i < length; i++) {
+    dest[2 * i] = (unsigned char)src[i];
+    dest[2 * i + 1] = '\0';
+  }
+}
+#endif
+
+/*
+ * Curl_ntlm_create_type1_message()
+ *
+ * This is used to generate an already encoded NTLM type-1 message ready for
+ * sending to the recipient, be it a HTTP or SASL based (such as SMTP, POP3
+ * or IMAP) server, using the appropriate compile time crypo API.
+ *
+ * Parameters:
+ *
+ * userp   [in]     - The user name in the format User or Domain\User.
+ * passdwp [in]     - The user's password.
+ * ntlm    [in/out] - The ntlm data struct being used and modified.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_ntlm_create_type1_message(const char *userp,
+                                        const char *passwdp,
+                                        struct ntlmdata *ntlm,
+                                        char **outptr,
+                                        size_t *outlen)
+{
+  /* NTLM type-1 message structure:
+
+       Index  Description            Content
+         0    NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"
+                                     (0x4e544c4d53535000)
+         8    NTLM Message Type      long (0x01000000)
+        12    Flags                  long
+       (16)   Supplied Domain        security buffer (*)
+       (24)   Supplied Workstation   security buffer (*)
+       (32)   OS Version Structure   8 bytes (*)
+  (32) (40)   Start of data block    (*)
+                                     (*) -> Optional
+  */
+
+  unsigned char ntlmbuf[NTLM_BUFSIZE];
+  size_t size;
+
+#ifdef USE_WINDOWS_SSPI
+
+  SecBuffer buf;
+  SecBufferDesc desc;
+  SECURITY_STATUS status;
+  unsigned long attrs;
+  xcharp_u useranddomain;
+  xcharp_u user, dup_user;
+  xcharp_u domain, dup_domain;
+  xcharp_u passwd, dup_passwd;
+  size_t domlen = 0;
+  TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */
+
+  domain.const_tchar_ptr = TEXT("");
+
+  Curl_ntlm_sspi_cleanup(ntlm);
+
+  if(userp && *userp) {
+
+    /* null initialize ntlm identity's data to allow proper cleanup */
+    ntlm->p_identity = &ntlm->identity;
+    memset(ntlm->p_identity, 0, sizeof(*ntlm->p_identity));
+
+    useranddomain.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)userp);
+    if(!useranddomain.tchar_ptr)
+      return CURLE_OUT_OF_MEMORY;
+
+    user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('\\'));
+    if(!user.const_tchar_ptr)
+      user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('/'));
+
+    if(user.tchar_ptr) {
+      domain.tchar_ptr = useranddomain.tchar_ptr;
+      domlen = user.tchar_ptr - useranddomain.tchar_ptr;
+      user.tchar_ptr++;
+    }
+    else {
+      user.tchar_ptr = useranddomain.tchar_ptr;
+      domain.const_tchar_ptr = TEXT("");
+      domlen = 0;
+    }
+
+    /* setup ntlm identity's user and length */
+    dup_user.tchar_ptr = _tcsdup(user.tchar_ptr);
+    if(!dup_user.tchar_ptr) {
+      Curl_unicodefree(useranddomain.tchar_ptr);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    ntlm->identity.User = dup_user.tbyte_ptr;
+    ntlm->identity.UserLength = curlx_uztoul(_tcslen(dup_user.tchar_ptr));
+    dup_user.tchar_ptr = NULL;
+
+    /* setup ntlm identity's domain and length */
+    dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1));
+    if(!dup_domain.tchar_ptr) {
+      Curl_unicodefree(useranddomain.tchar_ptr);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    _tcsncpy(dup_domain.tchar_ptr, domain.tchar_ptr, domlen);
+    *(dup_domain.tchar_ptr + domlen) = TEXT('\0');
+    ntlm->identity.Domain = dup_domain.tbyte_ptr;
+    ntlm->identity.DomainLength = curlx_uztoul(domlen);
+    dup_domain.tchar_ptr = NULL;
+
+    Curl_unicodefree(useranddomain.tchar_ptr);
+
+    /* setup ntlm identity's password and length */
+    passwd.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)passwdp);
+    if(!passwd.tchar_ptr)
+      return CURLE_OUT_OF_MEMORY;
+    dup_passwd.tchar_ptr = _tcsdup(passwd.tchar_ptr);
+    if(!dup_passwd.tchar_ptr) {
+      Curl_unicodefree(passwd.tchar_ptr);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    ntlm->identity.Password = dup_passwd.tbyte_ptr;
+    ntlm->identity.PasswordLength =
+      curlx_uztoul(_tcslen(dup_passwd.tchar_ptr));
+    dup_passwd.tchar_ptr = NULL;
+
+    Curl_unicodefree(passwd.tchar_ptr);
+
+    /* setup ntlm identity's flags */
+    ntlm->identity.Flags = SECFLAG_WINNT_AUTH_IDENTITY;
+  }
+  else
+    ntlm->p_identity = NULL;
+
+  status = s_pSecFn->AcquireCredentialsHandle(NULL,
+                                              (TCHAR *) TEXT("NTLM"),
+                                              SECPKG_CRED_OUTBOUND, NULL,
+                                              ntlm->p_identity, NULL, NULL,
+                                              &ntlm->handle, &tsDummy);
+  if(status != SEC_E_OK)
+    return CURLE_OUT_OF_MEMORY;
+
+  desc.ulVersion = SECBUFFER_VERSION;
+  desc.cBuffers  = 1;
+  desc.pBuffers  = &buf;
+  buf.cbBuffer   = NTLM_BUFSIZE;
+  buf.BufferType = SECBUFFER_TOKEN;
+  buf.pvBuffer   = ntlmbuf;
+
+  status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL,
+                                               (TCHAR *) TEXT(""),
+                                               ISC_REQ_CONFIDENTIALITY |
+                                               ISC_REQ_REPLAY_DETECT |
+                                               ISC_REQ_CONNECTION,
+                                               0, SECURITY_NETWORK_DREP,
+                                               NULL, 0,
+                                               &ntlm->c_handle, &desc,
+                                               &attrs, &tsDummy);
+
+  if(status == SEC_I_COMPLETE_AND_CONTINUE ||
+     status == SEC_I_CONTINUE_NEEDED)
+    s_pSecFn->CompleteAuthToken(&ntlm->c_handle, &desc);
+  else if(status != SEC_E_OK) {
+    s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
+    return CURLE_RECV_ERROR;
+  }
+
+  ntlm->has_handles = 1;
+  size = buf.cbBuffer;
+
+#else
+
+  const char *host = "";              /* empty */
+  const char *domain = "";            /* empty */
+  size_t hostlen = 0;
+  size_t domlen = 0;
+  size_t hostoff = 0;
+  size_t domoff = hostoff + hostlen;  /* This is 0: remember that host and
+                                         domain are empty */
+  (void)userp;
+  (void)passwdp;
+  (void)ntlm;
+
+#if USE_NTLM2SESSION
+#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
+#else
+#define NTLM2FLAG 0
+#endif
+  snprintf((char *)ntlmbuf, NTLM_BUFSIZE,
+           NTLMSSP_SIGNATURE "%c"
+           "\x01%c%c%c" /* 32-bit type = 1 */
+           "%c%c%c%c"   /* 32-bit NTLM flag field */
+           "%c%c"       /* domain length */
+           "%c%c"       /* domain allocated space */
+           "%c%c"       /* domain name offset */
+           "%c%c"       /* 2 zeroes */
+           "%c%c"       /* host length */
+           "%c%c"       /* host allocated space */
+           "%c%c"       /* host name offset */
+           "%c%c"       /* 2 zeroes */
+           "%s"         /* host name */
+           "%s",        /* domain string */
+           0,           /* trailing zero */
+           0, 0, 0,     /* part of type-1 long */
+
+           LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
+                       NTLMFLAG_REQUEST_TARGET |
+                       NTLMFLAG_NEGOTIATE_NTLM_KEY |
+                       NTLM2FLAG |
+                       NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
+           SHORTPAIR(domlen),
+           SHORTPAIR(domlen),
+           SHORTPAIR(domoff),
+           0, 0,
+           SHORTPAIR(hostlen),
+           SHORTPAIR(hostlen),
+           SHORTPAIR(hostoff),
+           0, 0,
+           host,  /* this is empty */
+           domain /* this is empty */);
+
+  /* Initial packet length */
+  size = 32 + hostlen + domlen;
+
+#endif
+
+  DEBUG_OUT({
+    fprintf(stderr, "* TYPE1 header flags=0x%02.2x%02.2x%02.2x%02.2x "
+            "0x%08.8x ",
+            LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM |
+                        NTLMFLAG_REQUEST_TARGET |
+                        NTLMFLAG_NEGOTIATE_NTLM_KEY |
+                        NTLM2FLAG |
+                        NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
+            NTLMFLAG_NEGOTIATE_OEM |
+            NTLMFLAG_REQUEST_TARGET |
+            NTLMFLAG_NEGOTIATE_NTLM_KEY |
+            NTLM2FLAG |
+            NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
+    ntlm_print_flags(stderr,
+                     NTLMFLAG_NEGOTIATE_OEM |
+                     NTLMFLAG_REQUEST_TARGET |
+                     NTLMFLAG_NEGOTIATE_NTLM_KEY |
+                     NTLM2FLAG |
+                     NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
+    fprintf(stderr, "\n****\n");
+  });
+
+  /* Return with binary blob encoded into base64 */
+  return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen);
+}
+
+/*
+ * Curl_ntlm_create_type3_message()
+ *
+ * This is used to generate an already encoded NTLM type-3 message ready for
+ * sending to the recipient, be it a HTTP or SASL based (such as SMTP, POP3
+ * or IMAP) server, using the appropriate compile time crypo API.
+ *
+ * Parameters:
+ *
+ * data    [in]     - The session handle.
+ * userp   [in]     - The user name in the format User or Domain\User.
+ * passdwp [in]     - The user's password.
+ * ntlm    [in/out] - The ntlm data struct being used and modified.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        struct ntlmdata *ntlm,
+                                        char **outptr,
+                                        size_t *outlen)
+{
+  /* NTLM type-3 message structure:
+
+          Index  Description            Content
+            0    NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"
+                                        (0x4e544c4d53535000)
+            8    NTLM Message Type      long (0x03000000)
+           12    LM/LMv2 Response       security buffer
+           20    NTLM/NTLMv2 Response   security buffer
+           28    Target Name            security buffer
+           36    User Name              security buffer
+           44    Workstation Name       security buffer
+          (52)   Session Key            security buffer (*)
+          (60)   Flags                  long (*)
+          (64)   OS Version Structure   8 bytes (*)
+  52 (64) (72)   Start of data block
+                                          (*) -> Optional
+  */
+
+  unsigned char ntlmbuf[NTLM_BUFSIZE];
+  size_t size;
+
+#ifdef USE_WINDOWS_SSPI
+  SecBuffer type_2;
+  SecBuffer type_3;
+  SecBufferDesc type_2_desc;
+  SecBufferDesc type_3_desc;
+  SECURITY_STATUS status;
+  unsigned long attrs;
+  TimeStamp tsDummy; /* For Windows 9x compatibility of SSPI calls */
+
+  (void)passwdp;
+  (void)userp;
+  (void)data;
+
+  type_2_desc.ulVersion = type_3_desc.ulVersion  = SECBUFFER_VERSION;
+  type_2_desc.cBuffers  = type_3_desc.cBuffers   = 1;
+  type_2_desc.pBuffers  = &type_2;
+  type_3_desc.pBuffers  = &type_3;
+
+  type_2.BufferType = SECBUFFER_TOKEN;
+  type_2.pvBuffer   = ntlm->type_2;
+  type_2.cbBuffer   = ntlm->n_type_2;
+  type_3.BufferType = SECBUFFER_TOKEN;
+  type_3.pvBuffer   = ntlmbuf;
+  type_3.cbBuffer   = NTLM_BUFSIZE;
+
+  status = s_pSecFn->InitializeSecurityContext(&ntlm->handle,
+                                               &ntlm->c_handle,
+                                               (TCHAR *) TEXT(""),
+                                               ISC_REQ_CONFIDENTIALITY |
+                                               ISC_REQ_REPLAY_DETECT |
+                                               ISC_REQ_CONNECTION,
+                                               0, SECURITY_NETWORK_DREP,
+                                               &type_2_desc,
+                                               0, &ntlm->c_handle,
+                                               &type_3_desc,
+                                               &attrs, &tsDummy);
+  if(status != SEC_E_OK)
+    return CURLE_RECV_ERROR;
+
+  size = type_3.cbBuffer;
+
+  Curl_ntlm_sspi_cleanup(ntlm);
+
+#else
+  int lmrespoff;
+  unsigned char lmresp[24]; /* fixed-size */
+#if USE_NTRESPONSES
+  int ntrespoff;
+  unsigned char ntresp[24]; /* fixed-size */
+#endif
+  bool unicode = (ntlm->flags & NTLMFLAG_NEGOTIATE_UNICODE) ? TRUE : FALSE;
+  char host[HOSTNAME_MAX + 1] = "";
+  const char *user;
+  const char *domain = "";
+  size_t hostoff = 0;
+  size_t useroff = 0;
+  size_t domoff = 0;
+  size_t hostlen = 0;
+  size_t userlen = 0;
+  size_t domlen = 0;
+  CURLcode res;
+
+  user = strchr(userp, '\\');
+  if(!user)
+    user = strchr(userp, '/');
+
+  if(user) {
+    domain = userp;
+    domlen = (user - domain);
+    user++;
+  }
+  else
+    user = userp;
+
+  if(user)
+    userlen = strlen(user);
+
+  /* Get the machine's un-qualified host name as NTLM doesn't like the fully
+     qualified domain name */
+  if(Curl_gethostname(host, sizeof(host))) {
+    infof(data, "gethostname() failed, continuing without!\n");
+    hostlen = 0;
+  }
+  else {
+    hostlen = strlen(host);
+  }
+
+  if(unicode) {
+    domlen = domlen * 2;
+    userlen = userlen * 2;
+    hostlen = hostlen * 2;
+  }
+
+#if USE_NTLM2SESSION
+  /* We don't support NTLM2 if we don't have USE_NTRESPONSES */
+  if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
+    unsigned char ntbuffer[0x18];
+    unsigned char tmp[0x18];
+    unsigned char md5sum[MD5_DIGEST_LENGTH];
+    unsigned char entropy[8];
+
+    /* Need to create 8 bytes random data */
+    Curl_ssl_random(data, entropy, sizeof(entropy));
+
+    /* 8 bytes random data as challenge in lmresp */
+    memcpy(lmresp, entropy, 8);
+
+    /* Pad with zeros */
+    memset(lmresp + 8, 0, 0x10);
+
+    /* Fill tmp with challenge(nonce?) + entropy */
+    memcpy(tmp, &ntlm->nonce[0], 8);
+    memcpy(tmp + 8, entropy, 8);
+
+    Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH);
+
+    /* We shall only use the first 8 bytes of md5sum, but the des
+       code in Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */
+    if(CURLE_OUT_OF_MEMORY ==
+       Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer))
+      return CURLE_OUT_OF_MEMORY;
+    Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp);
+
+    /* End of NTLM2 Session code */
+  }
+  else
+#endif
+  {
+
+#if USE_NTRESPONSES
+    unsigned char ntbuffer[0x18];
+#endif
+    unsigned char lmbuffer[0x18];
+
+#if USE_NTRESPONSES
+    if(CURLE_OUT_OF_MEMORY ==
+       Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer))
+      return CURLE_OUT_OF_MEMORY;
+    Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], ntresp);
+#endif
+
+    Curl_ntlm_core_mk_lm_hash(data, passwdp, lmbuffer);
+    Curl_ntlm_core_lm_resp(lmbuffer, &ntlm->nonce[0], lmresp);
+    /* A safer but less compatible alternative is:
+     *   Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], lmresp);
+     * See http://davenport.sourceforge.net/ntlm.html#ntlmVersion2 */
+  }
+
+  lmrespoff = 64; /* size of the message header */
+#if USE_NTRESPONSES
+  ntrespoff = lmrespoff + 0x18;
+  domoff = ntrespoff + 0x18;
+#else
+  domoff = lmrespoff + 0x18;
+#endif
+  useroff = domoff + domlen;
+  hostoff = useroff + userlen;
+
+  /* Create the big type-3 message binary blob */
+  size = snprintf((char *)ntlmbuf, NTLM_BUFSIZE,
+                  NTLMSSP_SIGNATURE "%c"
+                  "\x03%c%c%c"  /* 32-bit type = 3 */
+
+                  "%c%c"  /* LanManager length */
+                  "%c%c"  /* LanManager allocated space */
+                  "%c%c"  /* LanManager offset */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c"  /* NT-response length */
+                  "%c%c"  /* NT-response allocated space */
+                  "%c%c"  /* NT-response offset */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c"  /* domain length */
+                  "%c%c"  /* domain allocated space */
+                  "%c%c"  /* domain name offset */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c"  /* user length */
+                  "%c%c"  /* user allocated space */
+                  "%c%c"  /* user offset */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c"  /* host length */
+                  "%c%c"  /* host allocated space */
+                  "%c%c"  /* host offset */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c"  /* session key length (unknown purpose) */
+                  "%c%c"  /* session key allocated space (unknown purpose) */
+                  "%c%c"  /* session key offset (unknown purpose) */
+                  "%c%c"  /* 2 zeroes */
+
+                  "%c%c%c%c",  /* flags */
+
+                  /* domain string */
+                  /* user string */
+                  /* host string */
+                  /* LanManager response */
+                  /* NT response */
+
+                  0,                /* zero termination */
+                  0, 0, 0,          /* type-3 long, the 24 upper bits */
+
+                  SHORTPAIR(0x18),  /* LanManager response length, twice */
+                  SHORTPAIR(0x18),
+                  SHORTPAIR(lmrespoff),
+                  0x0, 0x0,
+
+#if USE_NTRESPONSES
+                  SHORTPAIR(0x18),  /* NT-response length, twice */
+                  SHORTPAIR(0x18),
+                  SHORTPAIR(ntrespoff),
+                  0x0, 0x0,
+#else
+                  0x0, 0x0,
+                  0x0, 0x0,
+                  0x0, 0x0,
+                  0x0, 0x0,
+#endif
+                  SHORTPAIR(domlen),
+                  SHORTPAIR(domlen),
+                  SHORTPAIR(domoff),
+                  0x0, 0x0,
+
+                  SHORTPAIR(userlen),
+                  SHORTPAIR(userlen),
+                  SHORTPAIR(useroff),
+                  0x0, 0x0,
+
+                  SHORTPAIR(hostlen),
+                  SHORTPAIR(hostlen),
+                  SHORTPAIR(hostoff),
+                  0x0, 0x0,
+
+                  0x0, 0x0,
+                  0x0, 0x0,
+                  0x0, 0x0,
+                  0x0, 0x0,
+
+                  LONGQUARTET(ntlm->flags));
+
+  DEBUGASSERT(size == 64);
+  DEBUGASSERT(size == (size_t)lmrespoff);
+
+  /* We append the binary hashes */
+  if(size < (NTLM_BUFSIZE - 0x18)) {
+    memcpy(&ntlmbuf[size], lmresp, 0x18);
+    size += 0x18;
+  }
+
+  DEBUG_OUT({
+    fprintf(stderr, "**** TYPE3 header lmresp=");
+    ntlm_print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18);
+  });
+
+#if USE_NTRESPONSES
+  if(size < (NTLM_BUFSIZE - 0x18)) {
+    DEBUGASSERT(size == (size_t)ntrespoff);
+    memcpy(&ntlmbuf[size], ntresp, 0x18);
+    size += 0x18;
+  }
+
+  DEBUG_OUT({
+    fprintf(stderr, "\n   ntresp=");
+    ntlm_print_hex(stderr, (char *)&ntlmbuf[ntrespoff], 0x18);
+  });
+
+#endif
+
+  DEBUG_OUT({
+    fprintf(stderr, "\n   flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ",
+            LONGQUARTET(ntlm->flags), ntlm->flags);
+    ntlm_print_flags(stderr, ntlm->flags);
+    fprintf(stderr, "\n****\n");
+  });
+
+  /* Make sure that the domain, user and host strings fit in the
+     buffer before we copy them there. */
+  if(size + userlen + domlen + hostlen >= NTLM_BUFSIZE) {
+    failf(data, "user + domain + host name too big");
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  DEBUGASSERT(size == domoff);
+  if(unicode)
+    unicodecpy(&ntlmbuf[size], domain, domlen / 2);
+  else
+    memcpy(&ntlmbuf[size], domain, domlen);
+
+  size += domlen;
+
+  DEBUGASSERT(size == useroff);
+  if(unicode)
+    unicodecpy(&ntlmbuf[size], user, userlen / 2);
+  else
+    memcpy(&ntlmbuf[size], user, userlen);
+
+  size += userlen;
+
+  DEBUGASSERT(size == hostoff);
+  if(unicode)
+    unicodecpy(&ntlmbuf[size], host, hostlen / 2);
+  else
+    memcpy(&ntlmbuf[size], host, hostlen);
+
+  size += hostlen;
+
+  /* Convert domain, user, and host to ASCII but leave the rest as-is */
+  res = Curl_convert_to_network(data, (char *)&ntlmbuf[domoff],
+                                size - domoff);
+  if(res)
+    return CURLE_CONV_FAILED;
+
+#endif
+
+  /* Return with binary blob encoded into base64 */
+  return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen);
+}
+
+#endif /* USE_NTLM */
similarity index 73%
rename from lib/http_ntlm.h
rename to lib/curl_ntlm_msgs.h
index c7422d7..e7d185d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __HTTP_NTLM_H
-#define __HTTP_NTLM_H
+#ifndef HEADER_CURL_NTLM_MSGS_H
+#define HEADER_CURL_NTLM_MSGS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-typedef enum {
-  CURLNTLM_NONE, /* not a ntlm */
-  CURLNTLM_BAD,  /* an ntlm, but one we don't like */
-  CURLNTLM_FIRST, /* the first 401-reply we got with NTLM */
-  CURLNTLM_FINE, /* an ntlm we act on */
-
-  CURLNTLM_LAST  /* last entry in this enum, don't use */
-} CURLntlm;
-
-/* this is for ntlm header input */
-CURLntlm Curl_input_ntlm(struct connectdata *conn, bool proxy,
-                         const char *header);
+#include "curl_setup.h"
+
+#ifdef USE_NTLM
+
+/* This is to generate a base64 encoded NTLM type-1 message */
+CURLcode Curl_ntlm_create_type1_message(const char *userp,
+                                        const char *passwdp,
+                                        struct ntlmdata *ntlm,
+                                        char **outptr,
+                                        size_t *outlen);
+
+/* This is to generate a base64 encoded NTLM type-3 message */
+CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        struct ntlmdata *ntlm,
+                                        char **outptr,
+                                        size_t *outlen);
+
+/* This is to decode a NTLM type-2 message */
+CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
+                                        const char* header,
+                                        struct ntlmdata* ntlm);
+
+/* This is to clean up the ntlm data structure */
+#ifdef USE_WINDOWS_SSPI
+void Curl_ntlm_sspi_cleanup(struct ntlmdata *ntlm);
+#else
+#define Curl_ntlm_sspi_cleanup(x)
+#endif
 
-/* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy);
+/* NTLM buffer fixed size, large enough for long user + host + domain */
+#define NTLM_BUFSIZE 1024
 
-void Curl_ntlm_cleanup(struct connectdata *conn);
-#ifndef USE_NTLM
-#define Curl_ntlm_cleanup(x)
-#endif
+/* Stuff only required for curl_ntlm_msgs.c */
+#ifdef BUILDING_CURL_NTLM_MSGS_C
 
 /* Flag bits definitions based on http://davenport.sourceforge.net/ntlm.html */
 
@@ -146,4 +162,17 @@ void Curl_ntlm_cleanup(struct connectdata *conn);
 
 #define NTLMFLAG_NEGOTIATE_56                    (1<<31)
 /* Indicates that 56-bit encryption is supported. */
+
+#ifdef UNICODE
+#  define SECFLAG_WINNT_AUTH_IDENTITY \
+     (unsigned long)SEC_WINNT_AUTH_IDENTITY_UNICODE
+#else
+#  define SECFLAG_WINNT_AUTH_IDENTITY \
+     (unsigned long)SEC_WINNT_AUTH_IDENTITY_ANSI
 #endif
+
+#endif /* BUILDING_CURL_NTLM_MSGS_C */
+
+#endif /* USE_NTLM */
+
+#endif /* HEADER_CURL_NTLM_MSGS_H */
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
new file mode 100644 (file)
index 0000000..b1c20e1
--- /dev/null
@@ -0,0 +1,391 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+
+/*
+ * NTLM details:
+ *
+ * http://davenport.sourceforge.net/ntlm.html
+ * http://www.innovation.ch/java/ntlm.html
+ */
+
+#define DEBUG_ME 0
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "select.h"
+#include "curl_ntlm_wb.h"
+#include "url.h"
+#include "strerror.h"
+#include "curl_memory.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#if DEBUG_ME
+# define DEBUG_OUT(x) x
+#else
+# define DEBUG_OUT(x) Curl_nop_stmt
+#endif
+
+/* Portable 'sclose_nolog' used only in child process instead of 'sclose'
+   to avoid fooling the socket leak detector */
+#if defined(HAVE_CLOSESOCKET)
+#  define sclose_nolog(x)  closesocket((x))
+#elif defined(HAVE_CLOSESOCKET_CAMEL)
+#  define sclose_nolog(x)  CloseSocket((x))
+#else
+#  define sclose_nolog(x)  close((x))
+#endif
+
+void Curl_ntlm_wb_cleanup(struct connectdata *conn)
+{
+  if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD) {
+    sclose(conn->ntlm_auth_hlpr_socket);
+    conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD;
+  }
+
+  if(conn->ntlm_auth_hlpr_pid) {
+    int i;
+    for(i = 0; i < 4; i++) {
+      pid_t ret = waitpid(conn->ntlm_auth_hlpr_pid, NULL, WNOHANG);
+      if(ret == conn->ntlm_auth_hlpr_pid || errno == ECHILD)
+        break;
+      switch(i) {
+      case 0:
+        kill(conn->ntlm_auth_hlpr_pid, SIGTERM);
+        break;
+      case 1:
+        /* Give the process another moment to shut down cleanly before
+           bringing down the axe */
+        Curl_wait_ms(1);
+        break;
+      case 2:
+        kill(conn->ntlm_auth_hlpr_pid, SIGKILL);
+        break;
+      case 3:
+        break;
+      }
+    }
+    conn->ntlm_auth_hlpr_pid = 0;
+  }
+
+  Curl_safefree(conn->challenge_header);
+  conn->challenge_header = NULL;
+  Curl_safefree(conn->response_header);
+  conn->response_header = NULL;
+}
+
+static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp)
+{
+  curl_socket_t sockfds[2];
+  pid_t child_pid;
+  const char *username;
+  char *slash, *domain = NULL;
+  const char *ntlm_auth = NULL;
+  char *ntlm_auth_alloc = NULL;
+  int error;
+
+  /* Return if communication with ntlm_auth already set up */
+  if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD ||
+     conn->ntlm_auth_hlpr_pid)
+    return CURLE_OK;
+
+  username = userp;
+  slash = strpbrk(username, "\\/");
+  if(slash) {
+    if((domain = strdup(username)) == NULL)
+      return CURLE_OUT_OF_MEMORY;
+    slash = domain + (slash - username);
+    *slash = '\0';
+    username = username + (slash - domain) + 1;
+  }
+
+  /* For testing purposes, when DEBUGBUILD is defined and environment
+     variable CURL_NTLM_WB_FILE is set a fake_ntlm is used to perform
+     NTLM challenge/response which only accepts commands and output
+     strings pre-written in test case definitions */
+#ifdef DEBUGBUILD
+  ntlm_auth_alloc = curl_getenv("CURL_NTLM_WB_FILE");
+  if(ntlm_auth_alloc)
+    ntlm_auth = ntlm_auth_alloc;
+  else
+#endif
+    ntlm_auth = NTLM_WB_FILE;
+
+  if(access(ntlm_auth, X_OK) != 0) {
+    error = ERRNO;
+    failf(conn->data, "Could not access ntlm_auth: %s errno %d: %s",
+          ntlm_auth, error, Curl_strerror(conn, error));
+    goto done;
+  }
+
+  if(socketpair(AF_UNIX, SOCK_STREAM, 0, sockfds)) {
+    error = ERRNO;
+    failf(conn->data, "Could not open socket pair. errno %d: %s",
+          error, Curl_strerror(conn, error));
+    goto done;
+  }
+
+  child_pid = fork();
+  if(child_pid == -1) {
+    error = ERRNO;
+    sclose(sockfds[0]);
+    sclose(sockfds[1]);
+    failf(conn->data, "Could not fork. errno %d: %s",
+          error, Curl_strerror(conn, error));
+    goto done;
+  }
+  else if(!child_pid) {
+    /*
+     * child process
+     */
+
+    /* Don't use sclose in the child since it fools the socket leak detector */
+    sclose_nolog(sockfds[0]);
+    if(dup2(sockfds[1], STDIN_FILENO) == -1) {
+      error = ERRNO;
+      failf(conn->data, "Could not redirect child stdin. errno %d: %s",
+            error, Curl_strerror(conn, error));
+      exit(1);
+    }
+
+    if(dup2(sockfds[1], STDOUT_FILENO) == -1) {
+      error = ERRNO;
+      failf(conn->data, "Could not redirect child stdout. errno %d: %s",
+            error, Curl_strerror(conn, error));
+      exit(1);
+    }
+
+    if(domain)
+      execl(ntlm_auth, ntlm_auth,
+            "--helper-protocol", "ntlmssp-client-1",
+            "--use-cached-creds",
+            "--username", username,
+            "--domain", domain,
+            NULL);
+    else
+      execl(ntlm_auth, ntlm_auth,
+            "--helper-protocol", "ntlmssp-client-1",
+            "--use-cached-creds",
+            "--username", username,
+            NULL);
+
+    error = ERRNO;
+    sclose_nolog(sockfds[1]);
+    failf(conn->data, "Could not execl(). errno %d: %s",
+          error, Curl_strerror(conn, error));
+    exit(1);
+  }
+
+  sclose(sockfds[1]);
+  conn->ntlm_auth_hlpr_socket = sockfds[0];
+  conn->ntlm_auth_hlpr_pid = child_pid;
+  Curl_safefree(domain);
+  Curl_safefree(ntlm_auth_alloc);
+  return CURLE_OK;
+
+done:
+  Curl_safefree(domain);
+  Curl_safefree(ntlm_auth_alloc);
+  return CURLE_REMOTE_ACCESS_DENIED;
+}
+
+static CURLcode ntlm_wb_response(struct connectdata *conn,
+                                 const char *input, curlntlm state)
+{
+  ssize_t size;
+  char buf[200]; /* enough, type 1, 3 message length is less then 200 */
+  char *tmpbuf = buf;
+  size_t len_in = strlen(input), len_out = sizeof(buf);
+
+  while(len_in > 0) {
+    ssize_t written = swrite(conn->ntlm_auth_hlpr_socket, input, len_in);
+    if(written == -1) {
+      /* Interrupted by a signal, retry it */
+      if(errno == EINTR)
+        continue;
+      /* write failed if other errors happen */
+      goto done;
+    }
+    input += written;
+    len_in -= written;
+  }
+  /* Read one line */
+  while(len_out > 0) {
+    size = sread(conn->ntlm_auth_hlpr_socket, tmpbuf, len_out);
+    if(size == -1) {
+      if(errno == EINTR)
+        continue;
+      goto done;
+    }
+    else if(size == 0)
+      goto done;
+    else if(tmpbuf[size - 1] == '\n') {
+      tmpbuf[size - 1] = '\0';
+      goto wrfinish;
+    }
+    tmpbuf += size;
+    len_out -= size;
+  }
+  goto done;
+wrfinish:
+  /* Samba/winbind installed but not configured */
+  if(state == NTLMSTATE_TYPE1 &&
+     size == 3 &&
+     buf[0] == 'P' && buf[1] == 'W')
+    return CURLE_REMOTE_ACCESS_DENIED;
+  /* invalid response */
+  if(size < 4)
+    goto done;
+  if(state == NTLMSTATE_TYPE1 &&
+     (buf[0]!='Y' || buf[1]!='R' || buf[2]!=' '))
+    goto done;
+  if(state == NTLMSTATE_TYPE2 &&
+     (buf[0]!='K' || buf[1]!='K' || buf[2]!=' ') &&
+     (buf[0]!='A' || buf[1]!='F' || buf[2]!=' '))
+    goto done;
+
+  conn->response_header = aprintf("NTLM %.*s", size - 4, buf + 3);
+  return CURLE_OK;
+done:
+  return CURLE_REMOTE_ACCESS_DENIED;
+}
+
+/*
+ * This is for creating ntlm header output by delegating challenge/response
+ * to Samba's winbind daemon helper ntlm_auth.
+ */
+CURLcode Curl_output_ntlm_wb(struct connectdata *conn,
+                              bool proxy)
+{
+  /* point to the address of the pointer that holds the string to send to the
+     server, which is for a plain host or for a HTTP proxy */
+  char **allocuserpwd;
+  /* point to the name and password for this */
+  const char *userp;
+  /* point to the correct struct with this */
+  struct ntlmdata *ntlm;
+  struct auth *authp;
+
+  CURLcode res = CURLE_OK;
+  char *input;
+
+  DEBUGASSERT(conn);
+  DEBUGASSERT(conn->data);
+
+  if(proxy) {
+    allocuserpwd = &conn->allocptr.proxyuserpwd;
+    userp = conn->proxyuser;
+    ntlm = &conn->proxyntlm;
+    authp = &conn->data->state.authproxy;
+  }
+  else {
+    allocuserpwd = &conn->allocptr.userpwd;
+    userp = conn->user;
+    ntlm = &conn->ntlm;
+    authp = &conn->data->state.authhost;
+  }
+  authp->done = FALSE;
+
+  /* not set means empty */
+  if(!userp)
+    userp="";
+
+  switch(ntlm->state) {
+  case NTLMSTATE_TYPE1:
+  default:
+    /* Use Samba's 'winbind' daemon to support NTLM authentication,
+     * by delegating the NTLM challenge/response protocal to a helper
+     * in ntlm_auth.
+     * http://devel.squid-cache.org/ntlm/squid_helper_protocol.html
+     * http://www.samba.org/samba/docs/man/manpages-3/winbindd.8.html
+     * http://www.samba.org/samba/docs/man/manpages-3/ntlm_auth.1.html
+     * Preprocessor symbol 'NTLM_WB_ENABLED' is defined when this
+     * feature is enabled and 'NTLM_WB_FILE' symbol holds absolute
+     * filename of ntlm_auth helper.
+     * If NTLM authentication using winbind fails, go back to original
+     * request handling process.
+     */
+    /* Create communication with ntlm_auth */
+    res = ntlm_wb_init(conn, userp);
+    if(res)
+      return res;
+    res = ntlm_wb_response(conn, "YR\n", ntlm->state);
+    if(res)
+      return res;
+
+    Curl_safefree(*allocuserpwd);
+    *allocuserpwd = aprintf("%sAuthorization: %s\r\n",
+                            proxy ? "Proxy-" : "",
+                            conn->response_header);
+    DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
+    Curl_safefree(conn->response_header);
+    conn->response_header = NULL;
+    break;
+  case NTLMSTATE_TYPE2:
+    input = aprintf("TT %s", conn->challenge_header);
+    if(!input)
+      return CURLE_OUT_OF_MEMORY;
+    res = ntlm_wb_response(conn, input, ntlm->state);
+    free(input);
+    input = NULL;
+    if(res)
+      return res;
+
+    Curl_safefree(*allocuserpwd);
+    *allocuserpwd = aprintf("%sAuthorization: %s\r\n",
+                            proxy ? "Proxy-" : "",
+                            conn->response_header);
+    DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
+    ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */
+    authp->done = TRUE;
+    Curl_ntlm_wb_cleanup(conn);
+    break;
+  case NTLMSTATE_TYPE3:
+    /* connection is already authenticated,
+     * don't send a header in future requests */
+    if(*allocuserpwd) {
+      free(*allocuserpwd);
+      *allocuserpwd=NULL;
+    }
+    authp->done = TRUE;
+    break;
+  }
+
+  return CURLE_OK;
+}
+
+#endif /* USE_NTLM && NTLM_WB_ENABLED */
diff --git a/lib/curl_ntlm_wb.h b/lib/curl_ntlm_wb.h
new file mode 100644 (file)
index 0000000..db6bc16
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef HEADER_CURL_NTLM_WB_H
+#define HEADER_CURL_NTLM_WB_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+
+/* this is for creating ntlm header output by delegating challenge/response
+   to Samba's winbind daemon helper ntlm_auth */
+CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy);
+
+void Curl_ntlm_wb_cleanup(struct connectdata *conn);
+
+#endif /* USE_NTLM && NTLM_WB_ENABLED */
+
+#endif /* HEADER_CURL_NTLM_WB_H */
diff --git a/lib/curl_rand.c b/lib/curl_rand.c
deleted file mode 100644 (file)
index 047b7f3..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * 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 "setup.h"
-
-#include <curl/curl.h>
-
-#include "curl_rand.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/* Private pseudo-random number seed. Unsigned integer >= 32bit. Threads
-   mutual exclusion is not implemented to acess it since we do not require
-   high quality random numbers (only used in form boudary generation). */
-
-static unsigned int randseed;
-
-/* Pseudo-random number support. */
-
-unsigned int Curl_rand(void)
-{
-  unsigned int r;
-  /* Return an unsigned 32-bit pseudo-random number. */
-  r = randseed = randseed * 1103515245 + 12345;
-  return (r << 16) | ((r >> 16) & 0xFFFF);
-}
-
-void Curl_srand(void)
-{
-  /* Randomize pseudo-random number sequence. */
-
-  randseed = (unsigned int) time(NULL);
-  Curl_rand();
-  Curl_rand();
-  Curl_rand();
-}
-
index bc1769e..45da35c 100644 (file)
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef USE_LIBRTMP
 
@@ -28,6 +28,7 @@
 #include "nonblock.h" /* for curlx_nonblock */
 #include "progress.h" /* for Curl_pgrsSetUploadSize */
 #include "transfer.h"
+#include "warnless.h"
 #include <curl/curl.h>
 #include <librtmp/rtmp.h>
 
@@ -51,7 +52,7 @@ static CURLcode rtmp_setup(struct connectdata *conn);
 static CURLcode rtmp_do(struct connectdata *conn, bool *done);
 static CURLcode rtmp_done(struct connectdata *conn, CURLcode, bool premature);
 static CURLcode rtmp_connect(struct connectdata *conn, bool *done);
-static CURLcode rtmp_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode rtmp_disconnect(struct connectdata *conn, bool dead);
 
 static Curl_recv rtmp_recv;
 static Curl_send rtmp_send;
@@ -71,10 +72,13 @@ const struct Curl_handler Curl_handler_rtmp = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMP,                            /* defport */
-  PROT_RTMP                             /* protocol */
+  CURLPROTO_RTMP,                       /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
 
 const struct Curl_handler Curl_handler_rtmpt = {
@@ -88,10 +92,13 @@ const struct Curl_handler Curl_handler_rtmpt = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMPT,                           /* defport */
-  PROT_RTMPT                            /* protocol */
+  CURLPROTO_RTMPT,                      /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
 
 const struct Curl_handler Curl_handler_rtmpe = {
@@ -105,10 +112,13 @@ const struct Curl_handler Curl_handler_rtmpe = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMP,                            /* defport */
-  PROT_RTMPE                            /* protocol */
+  CURLPROTO_RTMPE,                      /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
 
 const struct Curl_handler Curl_handler_rtmpte = {
@@ -122,10 +132,13 @@ const struct Curl_handler Curl_handler_rtmpte = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMPT,                           /* defport */
-  PROT_RTMPTE                           /* protocol */
+  CURLPROTO_RTMPTE,                     /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
 
 const struct Curl_handler Curl_handler_rtmps = {
@@ -139,11 +152,15 @@ const struct Curl_handler Curl_handler_rtmps = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMPS,                           /* defport */
-  PROT_RTMPS                            /* protocol */
+  CURLPROTO_RTMPS,                      /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
+
 const struct Curl_handler Curl_handler_rtmpts = {
   "RTMPTS",                             /* scheme */
   rtmp_setup,                           /* setup_connection */
@@ -155,22 +172,25 @@ const struct Curl_handler Curl_handler_rtmpts = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   rtmp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_RTMPS,                           /* defport */
-  PROT_RTMPTS                           /* protocol */
+  CURLPROTO_RTMPTS,                     /* protocol */
+  PROTOPT_NONE                          /* flags*/
 };
 
 static CURLcode rtmp_setup(struct connectdata *conn)
 {
   RTMP *r = RTMP_Alloc();
 
-  if (!r)
+  if(!r)
     return CURLE_OUT_OF_MEMORY;
 
   RTMP_Init(r);
   RTMP_SetBufferMS(r, DEF_BUFTIME);
-  if (!RTMP_SetupURL(r, conn->data->change.url)) {
+  if(!RTMP_SetupURL(r, conn->data->change.url)) {
     RTMP_Free(r);
     return CURLE_URL_MALFORMAT;
   }
@@ -188,17 +208,19 @@ static CURLcode rtmp_connect(struct connectdata *conn, bool *done)
   /* We have to know if it's a write before we send the
    * connect request packet
    */
-  if (conn->data->set.upload)
+  if(conn->data->set.upload)
     r->Link.protocol |= RTMP_FEATURE_WRITE;
 
   /* For plain streams, use the buffer toggle trick to keep data flowing */
-  if (!(r->Link.lFlags & RTMP_LF_LIVE) && !(r->Link.protocol & RTMP_FEATURE_HTTP))
+  if(!(r->Link.lFlags & RTMP_LF_LIVE) &&
+     !(r->Link.protocol & RTMP_FEATURE_HTTP))
     r->Link.lFlags |= RTMP_LF_BUFX;
 
   curlx_nonblock(r->m_sb.sb_socket, FALSE);
-  setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(tv));
+  setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO,
+             (char *)&tv, sizeof(tv));
 
-  if (!RTMP_Connect1(r, NULL))
+  if(!RTMP_Connect1(r, NULL))
     return CURLE_FAILED_INIT;
 
   /* Clients must send a periodic BytesReceived report to the server */
@@ -214,13 +236,14 @@ static CURLcode rtmp_do(struct connectdata *conn, bool *done)
 {
   RTMP *r = conn->proto.generic;
 
-  if (!RTMP_ConnectStream(r, 0))
+  if(!RTMP_ConnectStream(r, 0))
     return CURLE_FAILED_INIT;
 
-  if (conn->data->set.upload) {
+  if(conn->data->set.upload) {
     Curl_pgrsSetUploadSize(conn->data, conn->data->set.infilesize);
     Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
-  } else
+  }
+  else
     Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
   *done = TRUE;
   return CURLE_OK;
@@ -241,7 +264,7 @@ static CURLcode rtmp_disconnect(struct connectdata *conn,
 {
   RTMP *r = conn->proto.generic;
   (void)dead_connection;
-  if (r) {
+  if(r) {
     conn->proto.generic = NULL;
     RTMP_Close(r);
     RTMP_Free(r);
@@ -257,13 +280,14 @@ static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf,
 
   (void)sockindex; /* unused */
 
-  nread = RTMP_Read(r, buf, len);
-  if (nread < 0) {
-    if (r->m_read.status == RTMP_READ_COMPLETE ||
+  nread = RTMP_Read(r, buf, curlx_uztosi(len));
+  if(nread < 0) {
+    if(r->m_read.status == RTMP_READ_COMPLETE ||
         r->m_read.status == RTMP_READ_EOF) {
       conn->data->req.size = conn->data->req.bytecount;
       nread = 0;
-    } else
+    }
+    else
       *err = CURLE_RECV_ERROR;
   }
   return nread;
@@ -277,10 +301,10 @@ static ssize_t rtmp_send(struct connectdata *conn, int sockindex,
 
   (void)sockindex; /* unused */
 
-  num = RTMP_Write(r, (char *)buf, len);
-  if (num < 0) {
+  num = RTMP_Write(r, (char *)buf, curlx_uztosi(len));
+  if(num < 0)
     *err = CURLE_SEND_ERROR;
-  }
+
   return num;
 }
 #endif  /* USE_LIBRTMP */
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
new file mode 100644 (file)
index 0000000..fcb0019
--- /dev/null
@@ -0,0 +1,497 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, 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.
+ *
+ * RFC2195 CRAM-MD5 authentication
+ * RFC2831 DIGEST-MD5 authentication
+ * RFC4422 Simple Authentication and Security Layer (SASL)
+ * RFC4616 PLAIN authentication
+ *
+ ***************************************************************************/
+
+#include "curl_setup.h"
+
+#include <curl/curl.h>
+#include "urldata.h"
+
+#include "curl_base64.h"
+#include "curl_md5.h"
+#include "sslgen.h"
+#include "curl_hmac.h"
+#include "curl_ntlm_msgs.h"
+#include "curl_sasl.h"
+#include "warnless.h"
+#include "curl_memory.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* Retrieves the value for a corresponding key from the challenge string
+ * returns TRUE if the key could be found, FALSE if it does not exists
+ */
+static bool sasl_digest_get_key_value(const unsigned char *chlg,
+                                      const char *key,
+                                      char *value,
+                                      size_t max_val_len,
+                                      char end_char)
+{
+  char *find_pos;
+  size_t i;
+
+  find_pos = strstr((const char *) chlg, key);
+  if(!find_pos)
+    return FALSE;
+
+  find_pos += strlen(key);
+
+  for(i = 0; *find_pos && *find_pos != end_char && i < max_val_len - 1; ++i)
+    value[i] = *find_pos++;
+  value[i] = '\0';
+
+  return TRUE;
+}
+#endif
+
+/*
+ * Curl_sasl_create_plain_message()
+ *
+ * This is used to generate an already encoded PLAIN message ready
+ * for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data    [in]     - The session handle.
+ * userp   [in]     - The user name.
+ * passdwp [in]     - The user's password.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        char **outptr, size_t *outlen)
+{
+  char plainauth[2 * MAX_CURL_USER_LENGTH + MAX_CURL_PASSWORD_LENGTH];
+  size_t ulen;
+  size_t plen;
+
+  ulen = strlen(userp);
+  plen = strlen(passwdp);
+
+  if(2 * ulen + plen + 2 > sizeof(plainauth)) {
+    *outlen = 0;
+    *outptr = NULL;
+
+    /* Plainauth too small */
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  /* Calculate the reply */
+  memcpy(plainauth, userp, ulen);
+  plainauth[ulen] = '\0';
+  memcpy(plainauth + ulen + 1, userp, ulen);
+  plainauth[2 * ulen + 1] = '\0';
+  memcpy(plainauth + 2 * ulen + 2, passwdp, plen);
+
+  /* Base64 encode the reply */
+  return Curl_base64_encode(data, plainauth, 2 * ulen + plen + 2, outptr,
+                            outlen);
+}
+
+/*
+ * Curl_sasl_create_login_message()
+ *
+ * This is used to generate an already encoded LOGIN message containing the
+ * user name or password ready for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data    [in]     - The session handle.
+ * valuep  [in]     - The user name or user's password.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_login_message(struct SessionHandle *data,
+                                        const char *valuep, char **outptr,
+                                        size_t *outlen)
+{
+  size_t vlen = strlen(valuep);
+
+  if(!vlen) {
+    /* Calculate an empty reply */
+    *outptr = strdup("=");
+    if(*outptr) {
+      *outlen = (size_t) 1;
+      return CURLE_OK;
+    }
+
+    *outlen = 0;
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  /* Base64 encode the value */
+  return Curl_base64_encode(data, valuep, vlen, outptr, outlen);
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/*
+ * Curl_sasl_create_cram_md5_message()
+ *
+ * This is used to generate an already encoded CRAM-MD5 response message ready
+ * for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data    [in]     - The session handle.
+ * chlg64  [in]     - Pointer to the base64 encoded challenge buffer.
+ * userp   [in]     - The user name.
+ * passdwp [in]     - The user's password.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_cram_md5_message(struct SessionHandle *data,
+                                           const char *chlg64,
+                                           const char *userp,
+                                           const char *passwdp,
+                                           char **outptr, size_t *outlen)
+{
+  CURLcode result = CURLE_OK;
+  size_t chlg64len = strlen(chlg64);
+  unsigned char *chlg = (unsigned char *) NULL;
+  size_t chlglen = 0;
+  HMAC_context *ctxt;
+  unsigned char digest[MD5_DIGEST_LEN];
+  char response[MAX_CURL_USER_LENGTH + 2 * MD5_DIGEST_LEN + 1];
+
+  /* Decode the challenge if necessary */
+  if(chlg64len && *chlg64 != '=') {
+    result = Curl_base64_decode(chlg64, &chlg, &chlglen);
+
+    if(result)
+      return result;
+  }
+
+  /* Compute the digest using the password as the key */
+  ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
+                        (const unsigned char *) passwdp,
+                        curlx_uztoui(strlen(passwdp)));
+
+  if(!ctxt) {
+    Curl_safefree(chlg);
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  /* Update the digest with the given challenge */
+  if(chlglen > 0)
+    Curl_HMAC_update(ctxt, chlg, curlx_uztoui(chlglen));
+
+  Curl_safefree(chlg);
+
+  /* Finalise the digest */
+  Curl_HMAC_final(ctxt, digest);
+
+  /* Prepare the response */
+  snprintf(response, sizeof(response),
+      "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+           userp, digest[0], digest[1], digest[2], digest[3], digest[4],
+           digest[5], digest[6], digest[7], digest[8], digest[9], digest[10],
+           digest[11], digest[12], digest[13], digest[14], digest[15]);
+
+  /* Base64 encode the reply */
+  return Curl_base64_encode(data, response, 0, outptr, outlen);
+}
+
+/*
+ * Curl_sasl_create_digest_md5_message()
+ *
+ * This is used to generate an already encoded DIGEST-MD5 response message
+ * ready for sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data    [in]     - The session handle.
+ * chlg64  [in]     - Pointer to the base64 encoded challenge buffer.
+ * userp   [in]     - The user name.
+ * passdwp [in]     - The user's password.
+ * service [in]     - The service type such as www, smtp or pop
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+                                             const char *chlg64,
+                                             const char *userp,
+                                             const char *passwdp,
+                                             const char *service,
+                                             char **outptr, size_t *outlen)
+{
+  static const char table16[] = "0123456789abcdef";
+
+  CURLcode result = CURLE_OK;
+  unsigned char *chlg = (unsigned char *) NULL;
+  size_t chlglen = 0;
+  size_t i;
+  MD5_context *ctxt;
+  unsigned char digest[MD5_DIGEST_LEN];
+  char HA1_hex[2 * MD5_DIGEST_LEN + 1];
+  char HA2_hex[2 * MD5_DIGEST_LEN + 1];
+  char resp_hash_hex[2 * MD5_DIGEST_LEN + 1];
+
+  char nonce[64];
+  char realm[128];
+  char alg[64];
+  char nonceCount[] = "00000001";
+  char cnonce[]     = "12345678"; /* will be changed */
+  char method[]     = "AUTHENTICATE";
+  char qop[]        = "auth";
+  char uri[128];
+  char response[512];
+
+  result = Curl_base64_decode(chlg64, &chlg, &chlglen);
+
+  if(result)
+    return result;
+
+  if(!chlg)
+    return CURLE_LOGIN_DENIED;
+
+  /* Retrieve nonce string from the challenge */
+  if(!sasl_digest_get_key_value(chlg, "nonce=\"", nonce,
+                                sizeof(nonce), '\"')) {
+    Curl_safefree(chlg);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  /* Retrieve realm string from the challenge */
+  if(!sasl_digest_get_key_value(chlg, "realm=\"", realm,
+                                sizeof(realm), '\"')) {
+    /* Challenge does not have a realm, set empty string [RFC2831] page 6 */
+    strcpy(realm, "");
+  }
+
+  /* Retrieve algorithm string from the challenge */
+  if(!sasl_digest_get_key_value(chlg, "algorithm=", alg, sizeof(alg), ',')) {
+    Curl_safefree(chlg);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  Curl_safefree(chlg);
+
+  /* We do not support other algorithms */
+  if(strcmp(alg, "md5-sess") != 0)
+    return CURLE_LOGIN_DENIED;
+
+  /* Generate 64 bits of random data */
+  for(i = 0; i < 8; i++)
+    cnonce[i] = table16[Curl_rand(data)%16];
+
+  /* So far so good, now calculate A1 and H(A1) according to RFC 2831 */
+  ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+  if(!ctxt)
+    return CURLE_OUT_OF_MEMORY;
+
+  Curl_MD5_update(ctxt, (const unsigned char *) userp,
+                  curlx_uztoui(strlen(userp)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) realm,
+                  curlx_uztoui(strlen(realm)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) passwdp,
+                  curlx_uztoui(strlen(passwdp)));
+  Curl_MD5_final(ctxt, digest);
+
+  ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+  if(!ctxt)
+    return CURLE_OUT_OF_MEMORY;
+
+  Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN);
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) nonce,
+                  curlx_uztoui(strlen(nonce)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) cnonce,
+                  curlx_uztoui(strlen(cnonce)));
+  Curl_MD5_final(ctxt, digest);
+
+  /* Convert calculated 16 octet hex into 32 bytes string */
+  for(i = 0; i < MD5_DIGEST_LEN; i++)
+    snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
+
+  /* Prepare the URL string */
+  snprintf(uri, sizeof(uri), "%s/%s", service, realm);
+
+  /* Calculate H(A2) */
+  ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+  if(!ctxt)
+    return CURLE_OUT_OF_MEMORY;
+
+  Curl_MD5_update(ctxt, (const unsigned char *) method,
+                  curlx_uztoui(strlen(method)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) uri,
+                  curlx_uztoui(strlen(uri)));
+  Curl_MD5_final(ctxt, digest);
+
+  for(i = 0; i < MD5_DIGEST_LEN; i++)
+    snprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]);
+
+  /* Now calculate the response hash */
+  ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+  if(!ctxt)
+    return CURLE_OUT_OF_MEMORY;
+
+  Curl_MD5_update(ctxt, (const unsigned char *) HA1_hex, 2 * MD5_DIGEST_LEN);
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) nonce,
+                  curlx_uztoui(strlen(nonce)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+
+  Curl_MD5_update(ctxt, (const unsigned char *) nonceCount,
+                  curlx_uztoui(strlen(nonceCount)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) cnonce,
+                  curlx_uztoui(strlen(cnonce)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+  Curl_MD5_update(ctxt, (const unsigned char *) qop,
+                  curlx_uztoui(strlen(qop)));
+  Curl_MD5_update(ctxt, (const unsigned char *) ":", 1);
+
+  Curl_MD5_update(ctxt, (const unsigned char *) HA2_hex, 2 * MD5_DIGEST_LEN);
+  Curl_MD5_final(ctxt, digest);
+
+  for(i = 0; i < MD5_DIGEST_LEN; i++)
+    snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]);
+
+  snprintf(response, sizeof(response),
+           "username=\"%s\",realm=\"%s\",nonce=\"%s\","
+           "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s",
+           userp, realm, nonce,
+           cnonce, nonceCount, uri, resp_hash_hex);
+
+  /* Base64 encode the reply */
+  return Curl_base64_encode(data, response, 0, outptr, outlen);
+}
+#endif
+
+#ifdef USE_NTLM
+/*
+ * Curl_sasl_create_ntlm_type1_message()
+ *
+ * This is used to generate an already encoded NTLM type-1 message ready for
+ * sending to the recipient.
+ *
+ * Note: This is a simple wrapper of the NTLM function which means that any
+ * SASL based protocols don't have to include the NTLM functions directly.
+ *
+ * Parameters:
+ *
+ * userp   [in]     - The user name in the format User or Domain\User.
+ * passdwp [in]     - The user's password.
+ * ntlm    [in/out] - The ntlm data struct being used and modified.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+                                             const char *passwdp,
+                                             struct ntlmdata *ntlm,
+                                             char **outptr, size_t *outlen)
+{
+  return Curl_ntlm_create_type1_message(userp, passwdp, ntlm, outptr,
+                                        outlen);
+}
+
+/*
+ * Curl_sasl_create_ntlm_type3_message()
+ *
+ * This is used to generate an already encoded NTLM type-3 message ready for
+ * sending to the recipient.
+ *
+ * Parameters:
+ *
+ * data    [in]     - Pointer to session handle.
+ * header  [in]     - Pointer to the base64 encoded type-2 message buffer.
+ * userp   [in]     - The user name in the format User or Domain\User.
+ * passdwp [in]     - The user's password.
+ * ntlm    [in/out] - The ntlm data struct being used and modified.
+ * outptr  [in/out] - The address where a pointer to newly allocated memory
+ *                    holding the result will be stored upon completion.
+ * outlen  [out]    - The length of the output message.
+ *
+ * Returns CURLE_OK on success.
+ */
+CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+                                             const char *header,
+                                             const char *userp,
+                                             const char *passwdp,
+                                             struct ntlmdata *ntlm,
+                                             char **outptr, size_t *outlen)
+{
+  CURLcode result = Curl_ntlm_decode_type2_message(data, header, ntlm);
+
+  if(!result)
+    result = Curl_ntlm_create_type3_message(data, userp, passwdp, ntlm,
+                                            outptr, outlen);
+
+  return result;
+}
+#endif /* USE_NTLM */
+
+/*
+ * Curl_sasl_cleanup()
+ *
+ * This is used to cleanup any libraries or curl modules used by the sasl
+ * functions.
+ *
+ * Parameters:
+ *
+ * conn     [in]     - Pointer to the connection data.
+ * authused [in]     - The authentication mechanism used.
+ */
+void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused)
+{
+#ifdef USE_NTLM
+  /* Cleanup the ntlm structure */
+  if(authused == SASL_MECH_NTLM) {
+    Curl_ntlm_sspi_cleanup(&conn->ntlm);
+  }
+  (void)conn;
+#else
+  /* Reserved for future use */
+  (void)conn;
+  (void)authused;
+#endif
+}
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
new file mode 100644 (file)
index 0000000..22dcf80
--- /dev/null
@@ -0,0 +1,92 @@
+#ifndef HEADER_CURL_SASL_H
+#define HEADER_CURL_SASL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, 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 "pingpong.h"
+
+/* Authentication mechanism flags */
+#define SASL_MECH_LOGIN         (1 << 0)
+#define SASL_MECH_PLAIN         (1 << 1)
+#define SASL_MECH_CRAM_MD5      (1 << 2)
+#define SASL_MECH_DIGEST_MD5    (1 << 3)
+#define SASL_MECH_GSSAPI        (1 << 4)
+#define SASL_MECH_EXTERNAL      (1 << 5)
+#define SASL_MECH_NTLM          (1 << 6)
+
+/* Authentication mechanism values */
+#define SASL_AUTH_NONE          0
+#define SASL_AUTH_ANY           ~0
+
+/* This is used to generate a base64 encoded PLAIN authentication message */
+CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data,
+                                        const char *userp,
+                                        const char *passwdp,
+                                        char **outptr, size_t *outlen);
+
+/* This is used to generate a base64 encoded LOGIN authentication message
+   containing either the user name or password details */
+CURLcode Curl_sasl_create_login_message(struct SessionHandle *data,
+                                        const char *valuep, char **outptr,
+                                        size_t *outlen);
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* This is used to generate a base64 encoded CRAM-MD5 response message */
+CURLcode Curl_sasl_create_cram_md5_message(struct SessionHandle *data,
+                                           const char *chlg64,
+                                           const char *user,
+                                           const char *passwdp,
+                                           char **outptr, size_t *outlen);
+
+/* This is used to generate a base64 encoded DIGEST-MD5 response message */
+CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
+                                             const char *chlg64,
+                                             const char *user,
+                                             const char *passwdp,
+                                             const char *service,
+                                             char **outptr, size_t *outlen);
+#endif
+
+#ifdef USE_NTLM
+/* This is used to generate a base64 encoded NTLM type-1 message */
+CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp,
+                                             const char *passwdp,
+                                             struct ntlmdata *ntlm,
+                                             char **outptr,
+                                             size_t *outlen);
+
+/* This is used to decode an incoming NTLM type-2 message and generate a
+   base64 encoded type-3 response */
+CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
+                                             const char *header,
+                                             const char *userp,
+                                             const char *passwdp,
+                                             struct ntlmdata *ntlm,
+                                             char **outptr, size_t *outlen);
+
+#endif /* USE_NTLM */
+
+/* This is used to cleanup any libraries or curl modules used by the sasl
+   functions */
+void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused);
+
+#endif /* HEADER_CURL_SASL_H */
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c
new file mode 100644 (file)
index 0000000..68139db
--- /dev/null
@@ -0,0 +1,1308 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, Marc Hoersken, <info@marc-hoersken.de>
+ * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
+ * Copyright (C) 2012 - 2013, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all SChannel-specific code for the TLS/SSL layer. No code
+ * but sslgen.c should ever call or use these functions.
+ *
+ */
+
+/*
+ * Based upon the PolarSSL implementation in polarssl.c and polarssl.h:
+ *   Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ *
+ * Based upon the CyaSSL implementation in cyassl.c and cyassl.h:
+ *   Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * Thanks for code and inspiration!
+ */
+
+/*
+ * TODO list for TLS/SSL implementation:
+ * - implement client certificate authentication
+ * - implement custom server certificate validation
+ * - implement cipher/algorithm option
+ *
+ * Related articles on MSDN:
+ * - Getting a Certificate for Schannel
+ *   http://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
+ * - Specifying Schannel Ciphers and Cipher Strengths
+ *   http://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_SCHANNEL
+
+#ifndef USE_WINDOWS_SSPI
+#  error "Can't compile SCHANNEL support without SSPI."
+#endif
+
+#include "curl_sspi.h"
+#include "curl_schannel.h"
+#include "sslgen.h"
+#include "sendf.h"
+#include "connect.h" /* for the connect timeout */
+#include "strerror.h"
+#include "select.h" /* for the socket readyness */
+#include "inet_pton.h" /* for IP addr SNI check */
+#include "curl_multibyte.h"
+#include "warnless.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* Uncomment to force verbose output
+ * #define infof(x, y, ...) printf(y, __VA_ARGS__)
+ * #define failf(x, y, ...) printf(y, __VA_ARGS__)
+ */
+
+static Curl_recv schannel_recv;
+static Curl_send schannel_send;
+
+#ifdef _WIN32_WCE
+static CURLcode verify_certificate(struct connectdata *conn, int sockindex);
+#endif
+
+static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType,
+                          void *BufDataPtr, unsigned long BufByteSize)
+{
+  buffer->cbBuffer = BufByteSize;
+  buffer->BufferType = BufType;
+  buffer->pvBuffer = BufDataPtr;
+}
+
+static void InitSecBufferDesc(SecBufferDesc *desc, SecBuffer *BufArr,
+                              unsigned long NumArrElem)
+{
+  desc->ulVersion = SECBUFFER_VERSION;
+  desc->pBuffers = BufArr;
+  desc->cBuffers = NumArrElem;
+}
+
+static CURLcode
+schannel_connect_step1(struct connectdata *conn, int sockindex)
+{
+  ssize_t written = -1;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  SecBuffer outbuf;
+  SecBufferDesc outbuf_desc;
+  SCHANNEL_CRED schannel_cred;
+  SECURITY_STATUS sspi_status = SEC_E_OK;
+  struct curl_schannel_cred *old_cred = NULL;
+  struct in_addr addr;
+#ifdef ENABLE_IPV6
+  struct in6_addr addr6;
+#endif
+  TCHAR *host_name;
+  CURLcode code;
+
+  infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
+        conn->host.name, conn->remote_port);
+
+  /* check for an existing re-usable credential handle */
+  if(!Curl_ssl_getsessionid(conn, (void**)&old_cred, NULL)) {
+    connssl->cred = old_cred;
+    infof(data, "schannel: re-using existing credential handle\n");
+  }
+  else {
+    /* setup Schannel API options */
+    memset(&schannel_cred, 0, sizeof(schannel_cred));
+    schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;
+
+    if(data->set.ssl.verifypeer) {
+#ifdef _WIN32_WCE
+      /* certificate validation on CE doesn't seem to work right; we'll
+         do it following a more manual process. */
+      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
+                              SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+                              SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+#else
+      schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION |
+                              SCH_CRED_REVOCATION_CHECK_CHAIN;
+#endif
+      infof(data, "schannel: checking server certificate revocation\n");
+    }
+    else {
+      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
+                              SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
+                              SCH_CRED_IGNORE_REVOCATION_OFFLINE;
+      infof(data, "schannel: disable server certificate revocation checks\n");
+    }
+
+    if(Curl_inet_pton(AF_INET, conn->host.name, &addr)
+#ifdef ENABLE_IPV6
+       || Curl_inet_pton(AF_INET6, conn->host.name, &addr6)
+#endif
+      ) {
+      schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
+      infof(data, "schannel: using IP address, SNI is being disabled by "
+                  "disabling the servername check against the "
+                  "subject names in server certificates.\n");
+    }
+
+    if(!data->set.ssl.verifyhost) {
+      schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
+      infof(data, "schannel: verifyhost setting prevents Schannel from "
+                  "comparing the supplied target name with the subject "
+                  "names in server certificates. Also disables SNI.\n");
+    }
+
+    switch(data->set.ssl.version) {
+      case CURL_SSLVERSION_TLSv1:
+        schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT |
+                                              SP_PROT_TLS1_1_CLIENT |
+                                              SP_PROT_TLS1_2_CLIENT;
+        break;
+      case CURL_SSLVERSION_SSLv3:
+        schannel_cred.grbitEnabledProtocols = SP_PROT_SSL3_CLIENT;
+        break;
+      case CURL_SSLVERSION_SSLv2:
+        schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT;
+        break;
+    }
+
+    /* allocate memory for the re-usable credential handle */
+    connssl->cred = malloc(sizeof(struct curl_schannel_cred));
+    if(!connssl->cred) {
+      failf(data, "schannel: unable to allocate memory");
+      return CURLE_OUT_OF_MEMORY;
+    }
+    memset(connssl->cred, 0, sizeof(struct curl_schannel_cred));
+
+    /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx */
+    sspi_status = s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
+      SECPKG_CRED_OUTBOUND, NULL, &schannel_cred, NULL, NULL,
+      &connssl->cred->cred_handle, &connssl->cred->time_stamp);
+
+    if(sspi_status != SEC_E_OK) {
+      if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+        failf(data, "schannel: SNI or certificate check failed: %s",
+              Curl_sspi_strerror(conn, sspi_status));
+      else
+        failf(data, "schannel: AcquireCredentialsHandle failed: %s",
+              Curl_sspi_strerror(conn, sspi_status));
+      Curl_safefree(connssl->cred);
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+
+  /* setup output buffer */
+  InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
+  InitSecBufferDesc(&outbuf_desc, &outbuf, 1);
+
+  /* setup request flags */
+  connssl->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
+                       ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY |
+                       ISC_REQ_STREAM;
+
+  /* allocate memory for the security context handle */
+  connssl->ctxt = malloc(sizeof(struct curl_schannel_ctxt));
+  if(!connssl->ctxt) {
+    failf(data, "schannel: unable to allocate memory");
+    return CURLE_OUT_OF_MEMORY;
+  }
+  memset(connssl->ctxt, 0, sizeof(struct curl_schannel_ctxt));
+
+  host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+  if(!host_name)
+    return CURLE_OUT_OF_MEMORY;
+
+  /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx */
+
+  sspi_status = s_pSecFn->InitializeSecurityContext(
+    &connssl->cred->cred_handle, NULL, host_name,
+    connssl->req_flags, 0, 0, NULL, 0, &connssl->ctxt->ctxt_handle,
+    &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp);
+
+  Curl_unicodefree(host_name);
+
+  if(sspi_status != SEC_I_CONTINUE_NEEDED) {
+    if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+      failf(data, "schannel: SNI or certificate check failed: %s",
+            Curl_sspi_strerror(conn, sspi_status));
+    else
+      failf(data, "schannel: initial InitializeSecurityContext failed: %s",
+            Curl_sspi_strerror(conn, sspi_status));
+    Curl_safefree(connssl->ctxt);
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  infof(data, "schannel: sending initial handshake data: "
+        "sending %lu bytes...\n", outbuf.cbBuffer);
+
+  /* send initial handshake data which is now stored in output buffer */
+  code = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+                          outbuf.cbBuffer, &written);
+  s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
+  if((code != CURLE_OK) || (outbuf.cbBuffer != (size_t)written)) {
+    failf(data, "schannel: failed to send initial handshake data: "
+          "sent %zd of %lu bytes", written, outbuf.cbBuffer);
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  infof(data, "schannel: sent initial handshake data: "
+        "sent %zd bytes\n", written);
+
+  /* continue to second handshake step */
+  connssl->connecting_state = ssl_connect_2;
+
+  return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_step2(struct connectdata *conn, int sockindex)
+{
+  int i;
+  ssize_t nread = -1, written = -1;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  SecBuffer outbuf[2];
+  SecBufferDesc outbuf_desc;
+  SecBuffer inbuf[2];
+  SecBufferDesc inbuf_desc;
+  SECURITY_STATUS sspi_status = SEC_E_OK;
+  TCHAR *host_name;
+  CURLcode code;
+  bool doread;
+
+  doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE;
+
+  infof(data, "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n",
+        conn->host.name, conn->remote_port);
+
+  /* buffer to store previously received and encrypted data */
+  if(connssl->encdata_buffer == NULL) {
+    connssl->encdata_offset = 0;
+    connssl->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
+    connssl->encdata_buffer = malloc(connssl->encdata_length);
+    if(connssl->encdata_buffer == NULL) {
+      failf(data, "schannel: unable to allocate memory");
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  /* if we need a bigger buffer to read a full message, increase buffer now */
+  if(connssl->encdata_length - connssl->encdata_offset <
+     CURL_SCHANNEL_BUFFER_FREE_SIZE) {
+    /* increase internal encrypted data buffer */
+    connssl->encdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR;
+    connssl->encdata_buffer = realloc(connssl->encdata_buffer,
+                                      connssl->encdata_length);
+
+    if(connssl->encdata_buffer == NULL) {
+      failf(data, "schannel: unable to re-allocate memory");
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  for(;;) {
+    if(doread) {
+      /* read encrypted handshake data from socket */
+      code = Curl_read_plain(conn->sock[sockindex],
+                (char *) (connssl->encdata_buffer + connssl->encdata_offset),
+                          connssl->encdata_length - connssl->encdata_offset,
+                          &nread);
+      if(code == CURLE_AGAIN) {
+        if(connssl->connecting_state != ssl_connect_2_writing)
+          connssl->connecting_state = ssl_connect_2_reading;
+        infof(data, "schannel: failed to receive handshake, "
+              "need more data\n");
+        return CURLE_OK;
+      }
+      else if((code != CURLE_OK) || (nread == 0)) {
+        failf(data, "schannel: failed to receive handshake, "
+              "SSL/TLS connection failed");
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+
+      /* increase encrypted data buffer offset */
+      connssl->encdata_offset += nread;
+    }
+
+    infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+        connssl->encdata_offset, connssl->encdata_length);
+
+    /* setup input buffers */
+    InitSecBuffer(&inbuf[0], SECBUFFER_TOKEN, malloc(connssl->encdata_offset),
+                  curlx_uztoul(connssl->encdata_offset));
+    InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0);
+    InitSecBufferDesc(&inbuf_desc, inbuf, 2);
+
+    /* setup output buffers */
+    InitSecBuffer(&outbuf[0], SECBUFFER_TOKEN, NULL, 0);
+    InitSecBuffer(&outbuf[1], SECBUFFER_ALERT, NULL, 0);
+    InitSecBufferDesc(&outbuf_desc, outbuf, 2);
+
+    if(inbuf[0].pvBuffer == NULL) {
+      failf(data, "schannel: unable to allocate memory");
+      return CURLE_OUT_OF_MEMORY;
+    }
+
+    /* copy received handshake data into input buffer */
+    memcpy(inbuf[0].pvBuffer, connssl->encdata_buffer,
+           connssl->encdata_offset);
+
+    host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+    if(!host_name)
+      return CURLE_OUT_OF_MEMORY;
+
+    /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx */
+
+    sspi_status = s_pSecFn->InitializeSecurityContext(
+      &connssl->cred->cred_handle, &connssl->ctxt->ctxt_handle,
+      host_name, connssl->req_flags, 0, 0, &inbuf_desc, 0, NULL,
+      &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp);
+
+    Curl_unicodefree(host_name);
+
+    /* free buffer for received handshake data */
+    Curl_safefree(inbuf[0].pvBuffer);
+
+    /* check if the handshake was incomplete */
+    if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
+      connssl->connecting_state = ssl_connect_2_reading;
+      infof(data, "schannel: received incomplete message, need more data\n");
+      return CURLE_OK;
+    }
+
+    /* check if the handshake needs to be continued */
+    if(sspi_status == SEC_I_CONTINUE_NEEDED || sspi_status == SEC_E_OK) {
+      for(i = 0; i < 2; i++) {
+        /* search for handshake tokens that need to be send */
+        if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) {
+          infof(data, "schannel: sending next handshake data: "
+                "sending %lu bytes...\n", outbuf[i].cbBuffer);
+
+          /* send handshake token to server */
+          code = Curl_write_plain(conn, conn->sock[sockindex],
+                                  outbuf[i].pvBuffer, outbuf[i].cbBuffer,
+                                  &written);
+          if((code != CURLE_OK) || (outbuf[i].cbBuffer != (size_t)written)) {
+            failf(data, "schannel: failed to send next handshake data: "
+                  "sent %zd of %lu bytes", written, outbuf[i].cbBuffer);
+            return CURLE_SSL_CONNECT_ERROR;
+          }
+        }
+
+        /* free obsolete buffer */
+        if(outbuf[i].pvBuffer != NULL) {
+          s_pSecFn->FreeContextBuffer(outbuf[i].pvBuffer);
+        }
+      }
+    }
+    else {
+      if(sspi_status == SEC_E_WRONG_PRINCIPAL)
+        failf(data, "schannel: SNI or certificate check failed: %s",
+              Curl_sspi_strerror(conn, sspi_status));
+      else
+        failf(data, "schannel: next InitializeSecurityContext failed: %s",
+              Curl_sspi_strerror(conn, sspi_status));
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+
+    /* check if there was additional remaining encrypted data */
+    if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) {
+      infof(data, "schannel: encrypted data length: %lu\n", inbuf[1].cbBuffer);
+      /*
+         There are two cases where we could be getting extra data here:
+         1) If we're renegotiating a connection and the handshake is already
+            complete (from the server perspective), it can encrypted app data
+            (not handshake data) in an extra buffer at this point.
+         2) (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
+            connection and this extra data is part of the handshake.
+            We should process the data immediately; waiting for the socket to
+            be ready may fail since the server is done sending handshake data.
+       */
+      /* check if the remaining data is less than the total amount
+         and therefore begins after the already processed data */
+      if(connssl->encdata_offset > inbuf[1].cbBuffer) {
+        memmove(connssl->encdata_buffer,
+                (connssl->encdata_buffer + connssl->encdata_offset) -
+                  inbuf[1].cbBuffer, inbuf[1].cbBuffer);
+        connssl->encdata_offset = inbuf[1].cbBuffer;
+        if(sspi_status == SEC_I_CONTINUE_NEEDED) {
+          doread = FALSE;
+          continue;
+        }
+      }
+    }
+    else {
+      connssl->encdata_offset = 0;
+    }
+    break;
+  }
+
+  /* check if the handshake needs to be continued */
+  if(sspi_status == SEC_I_CONTINUE_NEEDED) {
+    connssl->connecting_state = ssl_connect_2_reading;
+    return CURLE_OK;
+  }
+
+  /* check if the handshake is complete */
+  if(sspi_status == SEC_E_OK) {
+    connssl->connecting_state = ssl_connect_3;
+    infof(data, "schannel: SSL/TLS handshake complete\n");
+  }
+
+#ifdef _WIN32_WCE
+  /* Windows CE doesn't do any server certificate validation.
+     We have to do it manually. */
+  if(data->set.ssl.verifypeer)
+    return verify_certificate(conn, sockindex);
+#endif
+
+  return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_step3(struct connectdata *conn, int sockindex)
+{
+  CURLcode retcode = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct curl_schannel_cred *old_cred = NULL;
+  int incache;
+
+  DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+  infof(data, "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n",
+        conn->host.name, conn->remote_port);
+
+  /* check if the required context attributes are met */
+  if(connssl->ret_flags != connssl->req_flags) {
+    if(!(connssl->ret_flags & ISC_RET_SEQUENCE_DETECT))
+      failf(data, "schannel: failed to setup sequence detection");
+    if(!(connssl->ret_flags & ISC_RET_REPLAY_DETECT))
+      failf(data, "schannel: failed to setup replay detection");
+    if(!(connssl->ret_flags & ISC_RET_CONFIDENTIALITY))
+      failf(data, "schannel: failed to setup confidentiality");
+    if(!(connssl->ret_flags & ISC_RET_ALLOCATED_MEMORY))
+      failf(data, "schannel: failed to setup memory allocation");
+    if(!(connssl->ret_flags & ISC_RET_STREAM))
+      failf(data, "schannel: failed to setup stream orientation");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  /* increment the reference counter of the credential/session handle */
+  if(connssl->cred && connssl->ctxt) {
+    connssl->cred->refcount++;
+    infof(data, "schannel: incremented credential handle refcount = %d\n",
+          connssl->cred->refcount);
+  }
+
+  /* save the current session data for possible re-use */
+  incache = !(Curl_ssl_getsessionid(conn, (void**)&old_cred, NULL));
+  if(incache) {
+    if(old_cred != connssl->cred) {
+      infof(data, "schannel: old credential handle is stale, removing\n");
+      Curl_ssl_delsessionid(conn, (void*)old_cred);
+      incache = FALSE;
+    }
+  }
+  if(!incache) {
+    retcode = Curl_ssl_addsessionid(conn, (void*)connssl->cred,
+                                    sizeof(struct curl_schannel_cred));
+    if(retcode) {
+      failf(data, "schannel: failed to store credential handle");
+      return retcode;
+    }
+    else {
+      connssl->cred->cached = TRUE;
+      infof(data, "schannel: stored credential handle in session cache\n");
+    }
+  }
+
+  connssl->connecting_state = ssl_connect_done;
+
+  return CURLE_OK;
+}
+
+static CURLcode
+schannel_connect_common(struct connectdata *conn, int sockindex,
+                        bool nonblocking, bool *done)
+{
+  CURLcode retcode;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  curl_socket_t sockfd = conn->sock[sockindex];
+  long timeout_ms;
+  int what;
+
+  /* check if the connection has already been established */
+  if(ssl_connection_complete == connssl->state) {
+    *done = TRUE;
+    return CURLE_OK;
+  }
+
+  if(ssl_connect_1 == connssl->connecting_state) {
+    /* check out how much more time we're allowed */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL/TLS connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+
+    retcode = schannel_connect_step1(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  while(ssl_connect_2 == connssl->connecting_state ||
+        ssl_connect_2_reading == connssl->connecting_state ||
+        ssl_connect_2_writing == connssl->connecting_state) {
+
+    /* check out how much more time we're allowed */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL/TLS connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+
+    /* if ssl is expecting something, check if it's available. */
+    if(connssl->connecting_state == ssl_connect_2_reading
+       || connssl->connecting_state == ssl_connect_2_writing) {
+
+      curl_socket_t writefd = ssl_connect_2_writing ==
+        connssl->connecting_state ? sockfd : CURL_SOCKET_BAD;
+      curl_socket_t readfd = ssl_connect_2_reading ==
+        connssl->connecting_state ? sockfd : CURL_SOCKET_BAD;
+
+      what = Curl_socket_ready(readfd, writefd, nonblocking ? 0 : timeout_ms);
+      if(what < 0) {
+        /* fatal error */
+        failf(data, "select/poll on SSL/TLS socket, errno: %d", SOCKERRNO);
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      else if(0 == what) {
+        if(nonblocking) {
+          *done = FALSE;
+          return CURLE_OK;
+        }
+        else {
+          /* timeout */
+          failf(data, "SSL/TLS connection timeout");
+          return CURLE_OPERATION_TIMEDOUT;
+        }
+      }
+      /* socket is readable or writable */
+    }
+
+    /* Run transaction, and return to the caller if it failed or if
+     * this connection is part of a multi handle and this loop would
+     * execute again. This permits the owner of a multi handle to
+     * abort a connection attempt before step2 has completed while
+     * ensuring that a client using select() or epoll() will always
+     * have a valid fdset to wait on.
+     */
+    retcode = schannel_connect_step2(conn, sockindex);
+    if(retcode || (nonblocking &&
+                   (ssl_connect_2 == connssl->connecting_state ||
+                    ssl_connect_2_reading == connssl->connecting_state ||
+                    ssl_connect_2_writing == connssl->connecting_state)))
+      return retcode;
+
+  } /* repeat step2 until all transactions are done. */
+
+  if(ssl_connect_3 == connssl->connecting_state) {
+    retcode = schannel_connect_step3(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  if(ssl_connect_done == connssl->connecting_state) {
+    connssl->state = ssl_connection_complete;
+    conn->recv[sockindex] = schannel_recv;
+    conn->send[sockindex] = schannel_send;
+    *done = TRUE;
+  }
+  else
+    *done = FALSE;
+
+  /* reset our connection state machine */
+  connssl->connecting_state = ssl_connect_1;
+
+  return CURLE_OK;
+}
+
+static ssize_t
+schannel_send(struct connectdata *conn, int sockindex,
+              const void *buf, size_t len, CURLcode *err)
+{
+  ssize_t written = -1;
+  size_t data_len = 0;
+  unsigned char *data = NULL;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  SecBuffer outbuf[4];
+  SecBufferDesc outbuf_desc;
+  SECURITY_STATUS sspi_status = SEC_E_OK;
+  CURLcode code;
+
+  /* check if the maximum stream sizes were queried */
+  if(connssl->stream_sizes.cbMaximumMessage == 0) {
+    sspi_status = s_pSecFn->QueryContextAttributes(
+                              &connssl->ctxt->ctxt_handle,
+                              SECPKG_ATTR_STREAM_SIZES,
+                              &connssl->stream_sizes);
+    if(sspi_status != SEC_E_OK) {
+      *err = CURLE_SEND_ERROR;
+      return -1;
+    }
+  }
+
+  /* check if the buffer is longer than the maximum message length */
+  if(len > connssl->stream_sizes.cbMaximumMessage) {
+    *err = CURLE_SEND_ERROR;
+    return -1;
+  }
+
+  /* calculate the complete message length and allocate a buffer for it */
+  data_len = connssl->stream_sizes.cbHeader + len +
+              connssl->stream_sizes.cbTrailer;
+  data = (unsigned char*) malloc(data_len);
+  if(data == NULL) {
+    *err = CURLE_OUT_OF_MEMORY;
+    return -1;
+  }
+
+  /* setup output buffers (header, data, trailer, empty) */
+  InitSecBuffer(&outbuf[0], SECBUFFER_STREAM_HEADER,
+                data, connssl->stream_sizes.cbHeader);
+  InitSecBuffer(&outbuf[1], SECBUFFER_DATA,
+                data + connssl->stream_sizes.cbHeader, curlx_uztoul(len));
+  InitSecBuffer(&outbuf[2], SECBUFFER_STREAM_TRAILER,
+                data + connssl->stream_sizes.cbHeader + len,
+                connssl->stream_sizes.cbTrailer);
+  InitSecBuffer(&outbuf[3], SECBUFFER_EMPTY, NULL, 0);
+  InitSecBufferDesc(&outbuf_desc, outbuf, 4);
+
+  /* copy data into output buffer */
+  memcpy(outbuf[1].pvBuffer, buf, len);
+
+  /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375390.aspx */
+  sspi_status = s_pSecFn->EncryptMessage(&connssl->ctxt->ctxt_handle, 0,
+                                         &outbuf_desc, 0);
+
+  /* check if the message was encrypted */
+  if(sspi_status == SEC_E_OK) {
+    written = 0;
+
+    /* send the encrypted message including header, data and trailer */
+    len = outbuf[0].cbBuffer + outbuf[1].cbBuffer + outbuf[2].cbBuffer;
+
+    /*
+       It's important to send the full message which includes the header,
+       encrypted payload, and trailer.  Until the client receives all the
+       data a coherent message has not been delivered and the client
+       can't read any of it.
+
+       If we wanted to buffer the unwritten encrypted bytes, we would
+       tell the client that all data it has requested to be sent has been
+       sent. The unwritten encrypted bytes would be the first bytes to
+       send on the next invocation.
+       Here's the catch with this - if we tell the client that all the
+       bytes have been sent, will the client call this method again to
+       send the buffered data?  Looking at who calls this function, it
+       seems the answer is NO.
+    */
+
+    /* send entire message or fail */
+    while(len > (size_t)written) {
+      ssize_t this_write;
+      long timeleft;
+      int what;
+
+      this_write = 0;
+
+      timeleft = Curl_timeleft(conn->data, NULL, TRUE);
+      if(timeleft < 0) {
+        /* we already got the timeout */
+        failf(conn->data, "schannel: timed out sending data "
+              "(bytes sent: %zd)", written);
+        *err = CURLE_OPERATION_TIMEDOUT;
+        written = -1;
+        break;
+      }
+
+      what = Curl_socket_ready(CURL_SOCKET_BAD, conn->sock[sockindex],
+                               timeleft);
+      if(what < 0) {
+        /* fatal error */
+        failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+        *err = CURLE_SEND_ERROR;
+        written = -1;
+        break;
+      }
+      else if(0 == what) {
+        failf(conn->data, "schannel: timed out sending data "
+              "(bytes sent: %zd)", written);
+        *err = CURLE_OPERATION_TIMEDOUT;
+        written = -1;
+        break;
+      }
+      /* socket is writable */
+
+      code = Curl_write_plain(conn, conn->sock[sockindex], data + written,
+                              len - written, &this_write);
+      if(code == CURLE_AGAIN)
+        continue;
+      else if(code != CURLE_OK) {
+        *err = code;
+        written = -1;
+        break;
+      }
+
+      written += this_write;
+    }
+  }
+  else if(sspi_status == SEC_E_INSUFFICIENT_MEMORY) {
+    *err = CURLE_OUT_OF_MEMORY;
+  }
+  else{
+    *err = CURLE_SEND_ERROR;
+  }
+
+  Curl_safefree(data);
+
+  if(len == (size_t)written)
+    /* Encrypted message including header, data and trailer entirely sent.
+       The return value is the number of unencrypted bytes that were sent. */
+    written = outbuf[1].cbBuffer;
+
+  return written;
+}
+
+static ssize_t
+schannel_recv(struct connectdata *conn, int sockindex,
+              char *buf, size_t len, CURLcode *err)
+{
+  size_t size = 0;
+  ssize_t nread = 0, ret = -1;
+  CURLcode retcode;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  bool done = FALSE;
+  SecBuffer inbuf[4];
+  SecBufferDesc inbuf_desc;
+  SECURITY_STATUS sspi_status = SEC_E_OK;
+
+  infof(data, "schannel: client wants to read %zu bytes\n", len);
+  *err = CURLE_OK;
+
+  /* buffer to store previously received and decrypted data */
+  if(connssl->decdata_buffer == NULL) {
+    connssl->decdata_offset = 0;
+    connssl->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
+    connssl->decdata_buffer = malloc(connssl->decdata_length);
+    if(connssl->decdata_buffer == NULL) {
+      failf(data, "schannel: unable to allocate memory");
+      *err = CURLE_OUT_OF_MEMORY;
+      return -1;
+    }
+  }
+
+  /* increase buffer in order to fit the requested amount of data */
+  while(connssl->encdata_length - connssl->encdata_offset <
+        CURL_SCHANNEL_BUFFER_FREE_SIZE || connssl->encdata_length < len) {
+    /* increase internal encrypted data buffer */
+    connssl->encdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR;
+    connssl->encdata_buffer = realloc(connssl->encdata_buffer,
+                                      connssl->encdata_length);
+
+    if(connssl->encdata_buffer == NULL) {
+      failf(data, "schannel: unable to re-allocate memory");
+      *err = CURLE_OUT_OF_MEMORY;
+      return -1;
+    }
+  }
+
+  /* read encrypted data from socket */
+  infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+        connssl->encdata_offset, connssl->encdata_length);
+  size = connssl->encdata_length - connssl->encdata_offset;
+  if(size > 0) {
+    *err = Curl_read_plain(conn->sock[sockindex],
+                  (char *) (connssl->encdata_buffer + connssl->encdata_offset),
+                           size, &nread);
+    /* check for received data */
+    if(*err != CURLE_OK)
+      ret = -1;
+    else {
+      if(nread > 0)
+        /* increase encrypted data buffer offset */
+        connssl->encdata_offset += nread;
+      ret = nread;
+    }
+    infof(data, "schannel: encrypted data got %zd\n", ret);
+  }
+
+  infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n",
+        connssl->encdata_offset, connssl->encdata_length);
+
+  /* check if we still have some data in our buffers */
+  while(connssl->encdata_offset > 0 && sspi_status == SEC_E_OK &&
+        connssl->decdata_offset < len) {
+    /* prepare data buffer for DecryptMessage call */
+    InitSecBuffer(&inbuf[0], SECBUFFER_DATA, connssl->encdata_buffer,
+                  curlx_uztoul(connssl->encdata_offset));
+
+    /* we need 3 more empty input buffers for possible output */
+    InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0);
+    InitSecBuffer(&inbuf[2], SECBUFFER_EMPTY, NULL, 0);
+    InitSecBuffer(&inbuf[3], SECBUFFER_EMPTY, NULL, 0);
+
+    InitSecBufferDesc(&inbuf_desc, inbuf, 4);
+
+    /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa375348.aspx */
+    sspi_status = s_pSecFn->DecryptMessage(&connssl->ctxt->ctxt_handle,
+                                           &inbuf_desc, 0, NULL);
+
+    /* check if we need more data */
+    if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
+      infof(data, "schannel: failed to decrypt data, need more data\n");
+      *err = CURLE_AGAIN;
+      return -1;
+    }
+
+    /* check if everything went fine (server may want to renegotiate
+       context) */
+    if(sspi_status == SEC_E_OK || sspi_status == SEC_I_RENEGOTIATE ||
+                                  sspi_status == SEC_I_CONTEXT_EXPIRED) {
+      /* check for successfully decrypted data */
+      if(inbuf[1].BufferType == SECBUFFER_DATA) {
+        infof(data, "schannel: decrypted data length: %lu\n",
+              inbuf[1].cbBuffer);
+
+        /* increase buffer in order to fit the received amount of data */
+        size = inbuf[1].cbBuffer > CURL_SCHANNEL_BUFFER_FREE_SIZE ?
+               inbuf[1].cbBuffer : CURL_SCHANNEL_BUFFER_FREE_SIZE;
+        while(connssl->decdata_length - connssl->decdata_offset < size ||
+              connssl->decdata_length < len) {
+          /* increase internal decrypted data buffer */
+          connssl->decdata_length *= CURL_SCHANNEL_BUFFER_STEP_FACTOR;
+          connssl->decdata_buffer = realloc(connssl->decdata_buffer,
+                                            connssl->decdata_length);
+
+          if(connssl->decdata_buffer == NULL) {
+            failf(data, "schannel: unable to re-allocate memory");
+            *err = CURLE_OUT_OF_MEMORY;
+            return -1;
+          }
+        }
+
+        /* copy decrypted data to internal buffer */
+        size = inbuf[1].cbBuffer;
+        if(size > 0) {
+          memcpy(connssl->decdata_buffer + connssl->decdata_offset,
+                 inbuf[1].pvBuffer, size);
+          connssl->decdata_offset += size;
+        }
+
+        infof(data, "schannel: decrypted data added: %zu\n", size);
+        infof(data, "schannel: decrypted data cached: offset %zu length %zu\n",
+              connssl->decdata_offset, connssl->decdata_length);
+      }
+
+      /* check for remaining encrypted data */
+      if(inbuf[3].BufferType == SECBUFFER_EXTRA && inbuf[3].cbBuffer > 0) {
+        infof(data, "schannel: encrypted data length: %lu\n",
+              inbuf[3].cbBuffer);
+
+        /* check if the remaining data is less than the total amount
+         * and therefore begins after the already processed data
+        */
+        if(connssl->encdata_offset > inbuf[3].cbBuffer) {
+          /* move remaining encrypted data forward to the beginning of
+             buffer */
+          memmove(connssl->encdata_buffer,
+                  (connssl->encdata_buffer + connssl->encdata_offset) -
+                    inbuf[3].cbBuffer, inbuf[3].cbBuffer);
+          connssl->encdata_offset = inbuf[3].cbBuffer;
+        }
+
+        infof(data, "schannel: encrypted data cached: offset %zu length %zu\n",
+              connssl->encdata_offset, connssl->encdata_length);
+      }
+      else{
+        /* reset encrypted buffer offset, because there is no data remaining */
+        connssl->encdata_offset = 0;
+      }
+    }
+
+    /* check if server wants to renegotiate the connection context */
+    if(sspi_status == SEC_I_RENEGOTIATE) {
+      infof(data, "schannel: remote party requests SSL/TLS renegotiation\n");
+
+      /* begin renegotiation */
+      infof(data, "schannel: renegotiating SSL/TLS connection\n");
+      connssl->state = ssl_connection_negotiating;
+      connssl->connecting_state = ssl_connect_2_writing;
+      retcode = schannel_connect_common(conn, sockindex, FALSE, &done);
+      if(retcode)
+        *err = retcode;
+      else {
+        infof(data, "schannel: SSL/TLS connection renegotiated\n");
+        /* now retry receiving data */
+        return schannel_recv(conn, sockindex, buf, len, err);
+      }
+    }
+  }
+
+  infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n",
+        connssl->decdata_offset, connssl->decdata_length);
+
+  /* copy requested decrypted data to supplied buffer */
+  size = len < connssl->decdata_offset ? len : connssl->decdata_offset;
+  if(size > 0) {
+    memcpy(buf, connssl->decdata_buffer, size);
+    ret = size;
+
+    /* move remaining decrypted data forward to the beginning of buffer */
+    memmove(connssl->decdata_buffer, connssl->decdata_buffer + size,
+            connssl->decdata_offset - size);
+    connssl->decdata_offset -= size;
+
+    infof(data, "schannel: decrypted data returned %zd\n", size);
+    infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n",
+          connssl->decdata_offset, connssl->decdata_length);
+  }
+
+  /* check if the server closed the connection */
+  if(ret <= 0 && ( /* special check for Windows 2000 Professional */
+      sspi_status == SEC_I_CONTEXT_EXPIRED || (sspi_status == SEC_E_OK &&
+        connssl->encdata_offset > 0 && connssl->encdata_buffer[0] == 0x15))) {
+    infof(data, "schannel: server closed the connection\n");
+    *err = CURLE_OK;
+    return 0;
+  }
+
+  /* check if something went wrong and we need to return an error */
+  if(ret < 0 && sspi_status != SEC_E_OK) {
+    infof(data, "schannel: failed to read data from server: %s\n",
+          Curl_sspi_strerror(conn, sspi_status));
+    *err = CURLE_RECV_ERROR;
+    return -1;
+  }
+
+  return ret;
+}
+
+CURLcode
+Curl_schannel_connect_nonblocking(struct connectdata *conn, int sockindex,
+                                  bool *done)
+{
+  return schannel_connect_common(conn, sockindex, TRUE, done);
+}
+
+CURLcode
+Curl_schannel_connect(struct connectdata *conn, int sockindex)
+{
+  CURLcode retcode;
+  bool done = FALSE;
+
+  retcode = schannel_connect_common(conn, sockindex, FALSE, &done);
+  if(retcode)
+    return retcode;
+
+  DEBUGASSERT(done);
+
+  return CURLE_OK;
+}
+
+bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex)
+{
+  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+  if(connssl->use) /* SSL/TLS is in use */
+    return (connssl->encdata_offset > 0 ||
+            connssl->decdata_offset > 0 ) ? TRUE : FALSE;
+  else
+    return FALSE;
+}
+
+void Curl_schannel_close(struct connectdata *conn, int sockindex)
+{
+  if(conn->ssl[sockindex].use)
+    /* if the SSL/TLS channel hasn't been shut down yet, do that now. */
+    Curl_ssl_shutdown(conn, sockindex);
+}
+
+int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
+{
+  /* See http://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx
+   * Shutting Down an Schannel Connection
+   */
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+  infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n",
+        conn->host.name, conn->remote_port);
+
+  if(connssl->cred && connssl->ctxt) {
+    SecBufferDesc BuffDesc;
+    SecBuffer Buffer;
+    SECURITY_STATUS sspi_status;
+    SecBuffer outbuf;
+    SecBufferDesc outbuf_desc;
+    CURLcode code;
+    TCHAR *host_name;
+    DWORD dwshut = SCHANNEL_SHUTDOWN;
+
+    InitSecBuffer(&Buffer, SECBUFFER_TOKEN, &dwshut, sizeof(dwshut));
+    InitSecBufferDesc(&BuffDesc, &Buffer, 1);
+
+    sspi_status = s_pSecFn->ApplyControlToken(&connssl->ctxt->ctxt_handle,
+                                              &BuffDesc);
+
+    if(sspi_status != SEC_E_OK)
+      failf(data, "schannel: ApplyControlToken failure: %s",
+            Curl_sspi_strerror(conn, sspi_status));
+
+    host_name = Curl_convert_UTF8_to_tchar(conn->host.name);
+    if(!host_name)
+      return CURLE_OUT_OF_MEMORY;
+
+    /* setup output buffer */
+    InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
+    InitSecBufferDesc(&outbuf_desc, &outbuf, 1);
+
+    sspi_status = s_pSecFn->InitializeSecurityContext(
+         &connssl->cred->cred_handle,
+         &connssl->ctxt->ctxt_handle,
+         host_name,
+         connssl->req_flags,
+         0,
+         0,
+         NULL,
+         0,
+         &connssl->ctxt->ctxt_handle,
+         &outbuf_desc,
+         &connssl->ret_flags,
+         &connssl->ctxt->time_stamp);
+
+    Curl_unicodefree(host_name);
+
+    if((sspi_status == SEC_E_OK) || (sspi_status == SEC_I_CONTEXT_EXPIRED)) {
+      /* send close message which is in output buffer */
+      ssize_t written;
+      code = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer,
+                              outbuf.cbBuffer, &written);
+
+      s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
+      if((code != CURLE_OK) || (outbuf.cbBuffer != (size_t)written)) {
+        infof(data, "schannel: failed to send close msg: %s"
+              " (bytes written: %zd)\n", curl_easy_strerror(code), written);
+      }
+    }
+
+    /* free SSPI Schannel API security context handle */
+    if(connssl->ctxt) {
+      infof(data, "schannel: clear security context handle\n");
+      s_pSecFn->DeleteSecurityContext(&connssl->ctxt->ctxt_handle);
+      Curl_safefree(connssl->ctxt);
+    }
+
+    /* free SSPI Schannel API credential handle */
+    if(connssl->cred) {
+      /* decrement the reference counter of the credential/session handle */
+      if(connssl->cred->refcount > 0) {
+        connssl->cred->refcount--;
+        infof(data, "schannel: decremented credential handle refcount = %d\n",
+              connssl->cred->refcount);
+      }
+
+      /* if the handle was not cached and the refcount is zero */
+      if(!connssl->cred->cached && connssl->cred->refcount == 0) {
+        infof(data, "schannel: clear credential handle\n");
+        s_pSecFn->FreeCredentialsHandle(&connssl->cred->cred_handle);
+        Curl_safefree(connssl->cred);
+      }
+    }
+  }
+
+  /* free internal buffer for received encrypted data */
+  if(connssl->encdata_buffer != NULL) {
+    Curl_safefree(connssl->encdata_buffer);
+    connssl->encdata_length = 0;
+    connssl->encdata_offset = 0;
+  }
+
+  /* free internal buffer for received decrypted data */
+  if(connssl->decdata_buffer != NULL) {
+    Curl_safefree(connssl->decdata_buffer);
+    connssl->decdata_length = 0;
+    connssl->decdata_offset = 0;
+  }
+
+  return CURLE_OK;
+}
+
+void Curl_schannel_session_free(void *ptr)
+{
+  struct curl_schannel_cred *cred = ptr;
+
+  if(cred && cred->cached && cred->refcount == 0) {
+    s_pSecFn->FreeCredentialsHandle(&cred->cred_handle);
+    Curl_safefree(cred);
+  }
+}
+
+int Curl_schannel_init(void)
+{
+  return (Curl_sspi_global_init() == CURLE_OK ? 1 : 0);
+}
+
+void Curl_schannel_cleanup(void)
+{
+  Curl_sspi_global_cleanup();
+}
+
+size_t Curl_schannel_version(char *buffer, size_t size)
+{
+  size = snprintf(buffer, size, "WinSSL");
+
+  return size;
+}
+
+#ifdef _WIN32_WCE
+static CURLcode verify_certificate(struct connectdata *conn, int sockindex)
+{
+  SECURITY_STATUS status;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  CURLcode result = CURLE_OK;
+  CERT_CONTEXT *pCertContextServer = NULL;
+  const CERT_CHAIN_CONTEXT *pChainContext = NULL;
+
+  status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle,
+                                            SECPKG_ATTR_REMOTE_CERT_CONTEXT,
+                                            &pCertContextServer);
+
+  if((status != SEC_E_OK) || (pCertContextServer == NULL)) {
+    failf(data, "schannel: Failed to read remote certificate context: %s",
+          Curl_sspi_strerror(conn, status));
+    result = CURLE_PEER_FAILED_VERIFICATION;
+  }
+
+  if(result == CURLE_OK) {
+    CERT_CHAIN_PARA ChainPara;
+    memset(&ChainPara, 0, sizeof(ChainPara));
+    ChainPara.cbSize = sizeof(ChainPara);
+
+    if(!CertGetCertificateChain(NULL,
+                                pCertContextServer,
+                                NULL,
+                                pCertContextServer->hCertStore,
+                                &ChainPara,
+                                0,
+                                NULL,
+                                &pChainContext)) {
+      failf(data, "schannel: CertGetCertificateChain failed: %s",
+            Curl_sspi_strerror(conn, GetLastError()));
+      pChainContext = NULL;
+      result = CURLE_PEER_FAILED_VERIFICATION;
+    }
+
+    if(result == CURLE_OK) {
+      CERT_SIMPLE_CHAIN *pSimpleChain = pChainContext->rgpChain[0];
+      DWORD dwTrustErrorMask = ~(DWORD)(CERT_TRUST_IS_NOT_TIME_NESTED|
+                                 CERT_TRUST_REVOCATION_STATUS_UNKNOWN);
+      dwTrustErrorMask &= pSimpleChain->TrustStatus.dwErrorStatus;
+      if(dwTrustErrorMask) {
+        if(dwTrustErrorMask & CERT_TRUST_IS_PARTIAL_CHAIN)
+          failf(data, "schannel: CertGetCertificateChain trust error"
+                      " CERT_TRUST_IS_PARTIAL_CHAIN");
+        if(dwTrustErrorMask & CERT_TRUST_IS_UNTRUSTED_ROOT)
+          failf(data, "schannel: CertGetCertificateChain trust error"
+                      " CERT_TRUST_IS_UNTRUSTED_ROOT");
+        if(dwTrustErrorMask & CERT_TRUST_IS_NOT_TIME_VALID)
+          failf(data, "schannel: CertGetCertificateChain trust error"
+                      " CERT_TRUST_IS_NOT_TIME_VALID");
+        failf(data, "schannel: CertGetCertificateChain error mask: 0x%08x",
+              dwTrustErrorMask);
+        result = CURLE_PEER_FAILED_VERIFICATION;
+      }
+    }
+  }
+
+  if(result == CURLE_OK) {
+    if(data->set.ssl.verifyhost) {
+      TCHAR cert_hostname_buff[128];
+      xcharp_u hostname;
+      xcharp_u cert_hostname;
+      DWORD len;
+
+      cert_hostname.const_tchar_ptr = cert_hostname_buff;
+      hostname.tchar_ptr = Curl_convert_UTF8_to_tchar(conn->host.name);
+
+      len = CertGetNameString(pCertContextServer,
+                              CERT_NAME_DNS_TYPE,
+                              0,
+                              NULL,
+                              cert_hostname.tchar_ptr,
+                              128);
+      if(len > 0 && *cert_hostname.tchar_ptr == '*') {
+        /* this is a wildcard cert.  try matching the last len - 1 chars */
+        int hostname_len = strlen(conn->host.name);
+        cert_hostname.tchar_ptr++;
+        if(_tcsicmp(cert_hostname.const_tchar_ptr,
+                    hostname.const_tchar_ptr + hostname_len - len + 2) != 0)
+          result = CURLE_PEER_FAILED_VERIFICATION;
+      }
+      else if(len == 0 || _tcsicmp(hostname.const_tchar_ptr,
+                                   cert_hostname.const_tchar_ptr) != 0) {
+        result = CURLE_PEER_FAILED_VERIFICATION;
+      }
+      if(result == CURLE_PEER_FAILED_VERIFICATION) {
+        char *_cert_hostname;
+        _cert_hostname = Curl_convert_tchar_to_UTF8(cert_hostname.tchar_ptr);
+        failf(data, "schannel: CertGetNameString() certificate hostname "
+              "(%s) did not match connection (%s)",
+              _cert_hostname, conn->host.name);
+        Curl_unicodefree(_cert_hostname);
+      }
+      Curl_unicodefree(hostname.tchar_ptr);
+    }
+  }
+
+  if(pChainContext)
+    CertFreeCertificateChain(pChainContext);
+
+  if(pCertContextServer)
+    CertFreeCertificateContext(pCertContextServer);
+
+  return result;
+}
+#endif /* _WIN32_WCE */
+
+#endif /* USE_SCHANNEL */
diff --git a/lib/curl_schannel.h b/lib/curl_schannel.h
new file mode 100644 (file)
index 0000000..b82c734
--- /dev/null
@@ -0,0 +1,132 @@
+#ifndef HEADER_CURL_SCHANNEL_H
+#define HEADER_CURL_SCHANNEL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Marc Hoersken, <info@marc-hoersken.de>, et al.
+ * Copyright (C) 2012, 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_setup.h"
+
+#ifdef USE_SCHANNEL
+
+#include "urldata.h"
+
+#ifndef UNISP_NAME_A
+#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider"
+#endif
+
+#ifndef UNISP_NAME_W
+#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider"
+#endif
+
+#ifndef UNISP_NAME
+#ifdef UNICODE
+#define UNISP_NAME  UNISP_NAME_W
+#else
+#define UNISP_NAME  UNISP_NAME_A
+#endif
+#endif
+
+#ifndef SP_PROT_SSL2_CLIENT
+#define SP_PROT_SSL2_CLIENT             0x00000008
+#endif
+
+#ifndef SP_PROT_SSL3_CLIENT
+#define SP_PROT_SSL3_CLIENT             0x00000008
+#endif
+
+#ifndef SP_PROT_TLS1_CLIENT
+#define SP_PROT_TLS1_CLIENT             0x00000080
+#endif
+
+#ifndef SP_PROT_TLS1_0_CLIENT
+#define SP_PROT_TLS1_0_CLIENT           SP_PROT_TLS1_CLIENT
+#endif
+
+#ifndef SP_PROT_TLS1_1_CLIENT
+#define SP_PROT_TLS1_1_CLIENT           0x00000200
+#endif
+
+#ifndef SP_PROT_TLS1_2_CLIENT
+#define SP_PROT_TLS1_2_CLIENT           0x00000800
+#endif
+
+#ifndef SECBUFFER_ALERT
+#define SECBUFFER_ALERT                 17
+#endif
+
+#ifndef ISC_RET_REPLAY_DETECT
+#define ISC_RET_REPLAY_DETECT           0x00000004
+#endif
+
+#ifndef ISC_RET_SEQUENCE_DETECT
+#define ISC_RET_SEQUENCE_DETECT         0x00000008
+#endif
+
+#ifndef ISC_RET_CONFIDENTIALITY
+#define ISC_RET_CONFIDENTIALITY         0x00000010
+#endif
+
+#ifndef ISC_RET_ALLOCATED_MEMORY
+#define ISC_RET_ALLOCATED_MEMORY        0x00000100
+#endif
+
+#ifndef ISC_RET_STREAM
+#define ISC_RET_STREAM                  0x00008000
+#endif
+
+
+#define CURL_SCHANNEL_BUFFER_INIT_SIZE   4096
+#define CURL_SCHANNEL_BUFFER_FREE_SIZE   1024
+#define CURL_SCHANNEL_BUFFER_STEP_FACTOR 2
+
+
+CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex);
+
+CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn,
+                                           int sockindex,
+                                           bool *done);
+
+bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex);
+void Curl_schannel_close(struct connectdata *conn, int sockindex);
+int Curl_schannel_shutdown(struct connectdata *conn, int sockindex);
+void Curl_schannel_session_free(void *ptr);
+
+int Curl_schannel_init(void);
+void Curl_schannel_cleanup(void);
+size_t Curl_schannel_version(char *buffer, size_t size);
+
+/* API setup for Schannel */
+#define curlssl_init Curl_schannel_init
+#define curlssl_cleanup Curl_schannel_cleanup
+#define curlssl_connect Curl_schannel_connect
+#define curlssl_connect_nonblocking Curl_schannel_connect_nonblocking
+#define curlssl_session_free Curl_schannel_session_free
+#define curlssl_close_all(x) (x=x, CURLE_NOT_BUILT_IN)
+#define curlssl_close Curl_schannel_close
+#define curlssl_shutdown Curl_schannel_shutdown
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_schannel_version
+#define curlssl_check_cxn(x) (x=x, -1)
+#define curlssl_data_pending Curl_schannel_data_pending
+#endif /* USE_SCHANNEL */
+#endif /* HEADER_CURL_SCHANNEL_H */
similarity index 77%
rename from lib/setup.h
rename to lib/curl_setup.h
index cc016c9..7edeca2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_LIB_SETUP_H
-#define HEADER_CURL_LIB_SETUP_H
+#ifndef HEADER_CURL_SETUP_H
+#define HEADER_CURL_SETUP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -26,7 +26,8 @@
  * Define WIN32 when build target is Win32 API
  */
 
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
+    !defined(__SYMBIAN32__)
 #define WIN32
 #endif
 
 #  include "config-mac.h"
 #endif
 
+#ifdef __riscos__
+#  include "config-riscos.h"
+#endif
+
 #ifdef __AMIGA__
-#  include "amigaos.h"
+#  include "config-amigaos.h"
 #endif
 
 #ifdef __SYMBIAN32__
  */
 
 #ifdef HTTP_ONLY
-#  define CURL_DISABLE_TFTP
-#  define CURL_DISABLE_FTP
-#  define CURL_DISABLE_LDAP
-#  define CURL_DISABLE_TELNET
-#  define CURL_DISABLE_DICT
-#  define CURL_DISABLE_FILE
-#  define CURL_DISABLE_RTSP
+#  ifndef CURL_DISABLE_TFTP
+#    define CURL_DISABLE_TFTP
+#  endif
+#  ifndef CURL_DISABLE_FTP
+#    define CURL_DISABLE_FTP
+#  endif
+#  ifndef CURL_DISABLE_LDAP
+#    define CURL_DISABLE_LDAP
+#  endif
+#  ifndef CURL_DISABLE_TELNET
+#    define CURL_DISABLE_TELNET
+#  endif
+#  ifndef CURL_DISABLE_DICT
+#    define CURL_DISABLE_DICT
+#  endif
+#  ifndef CURL_DISABLE_FILE
+#    define CURL_DISABLE_FILE
+#  endif
+#  ifndef CURL_DISABLE_RTSP
+#    define CURL_DISABLE_RTSP
+#  endif
+#  ifndef CURL_DISABLE_POP3
+#    define CURL_DISABLE_POP3
+#  endif
+#  ifndef CURL_DISABLE_IMAP
+#    define CURL_DISABLE_IMAP
+#  endif
+#  ifndef CURL_DISABLE_SMTP
+#    define CURL_DISABLE_SMTP
+#  endif
+#  ifndef CURL_DISABLE_RTSP
+#    define CURL_DISABLE_RTSP
+#  endif
+#  ifndef CURL_DISABLE_RTMP
+#    define CURL_DISABLE_RTMP
+#  endif
+#  ifndef CURL_DISABLE_GOPHER
+#    define CURL_DISABLE_GOPHER
+#  endif
 #endif
 
 /*
 #endif
 
 /*
+ * VMS setup file includes some system headers.
+ */
+
+#ifdef __VMS
+#  include "setup-vms.h"
+#endif
+
+/*
  * Include header files for windows builds before redefining anything.
  * Use this preprocessor block only to include or exclude windows.h,
  * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
  */
 
 #ifdef HAVE_WINDOWS_H
+#  if defined(UNICODE) && !defined(_UNICODE)
+#    define _UNICODE
+#  endif
+#  if defined(_UNICODE) && !defined(UNICODE)
+#    define UNICODE
+#  endif
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
 #  endif
 #      include <winsock.h>
 #    endif
 #  endif
+#  include <tchar.h>
+#  ifdef UNICODE
+     typedef wchar_t *(*curl_wcsdup_callback)(const wchar_t *str);
+#  endif
 #endif
 
 /*
 #  endif
 #endif
 
+#ifdef USE_LWIPSOCK
+#  include <lwip/init.h>
+#  include <lwip/sockets.h>
+#  include <lwip/netdb.h>
+#endif
+
 #ifdef HAVE_EXTRA_STRICMP_H
 #  include <extra/stricmp.h>
 #endif
 #  include <ioLib.h>      /* for basic I/O interface functions */
 #endif
 
+#ifdef __AMIGA__
+#  ifndef __ixemul__
+#    include <exec/types.h>
+#    include <exec/execbase.h>
+#    include <proto/exec.h>
+#    include <proto/dos.h>
+#    define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#  endif
+#endif
+
 #include <stdio.h>
 #ifdef HAVE_ASSERT_H
 #include <assert.h>
 #endif
-#include <errno.h>
 
 #ifdef __TANDEM /* for nsr-tandem-nsk systems */
 #include <floss.h>
 #  include <io.h>
 #  include <sys/types.h>
 #  include <sys/stat.h>
+#  undef  lseek
 #  define lseek(fdes,offset,whence)  _lseeki64(fdes, offset, whence)
+#  undef  fstat
 #  define fstat(fdes,stp)            _fstati64(fdes, stp)
+#  undef  stat
 #  define stat(fname,stp)            _stati64(fname, stp)
 #  define struct_stat                struct _stati64
 #  define LSEEK_ERROR                (__int64)-1
 #  include <io.h>
 #  include <sys/types.h>
 #  include <sys/stat.h>
-#  define lseek(fdes,offset,whence)  _lseek(fdes, (long)offset, whence)
-#  define fstat(fdes,stp)            _fstat(fdes, stp)
-#  define stat(fname,stp)            _stat(fname, stp)
-#  define struct_stat                struct _stat
+#  ifndef _WIN32_WCE
+#    undef  lseek
+#    define lseek(fdes,offset,whence)  _lseek(fdes, (long)offset, whence)
+#    define fstat(fdes,stp)            _fstat(fdes, stp)
+#    define stat(fname,stp)            _stat(fname, stp)
+#    define struct_stat                struct _stat
+#  endif
 #  define LSEEK_ERROR                (long)-1
 #endif
 
 #ifdef USE_ARES
 #  define CURLRES_ASYNCH
 #  define CURLRES_ARES
+/* now undef the stock libc functions just to avoid them being used */
+#  undef HAVE_GETADDRINFO
+#  undef HAVE_GETHOSTBYNAME
 #elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
 #  define CURLRES_ASYNCH
 #  define CURLRES_THREADED
 #if defined(_MSC_VER) && !defined(__POCC__)
 #  if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
 #    if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
-#      error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. "Windows Server 2003 PSDK"
+#      error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \
+             "Windows Server 2003 PSDK"
 #    else
 #      define CURL_DISABLE_LDAP 1
 #    endif
@@ -537,12 +617,21 @@ int netware_init(void);
 
 #define LIBIDN_REQUIRED_VERSION "0.4.1"
 
-#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || defined(USE_QSOSSL) || defined(USE_POLARSSL)
+#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \
+    defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || \
+    defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
+    defined(USE_DARWINSSL) || defined(USE_GSKIT)
 #define USE_SSL    /* SSL support has been enabled */
 #endif
 
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+#define USE_HTTP_NEGOTIATE
+#endif
+
+/* Single point where USE_NTLM definition might be done */
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
-#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || defined(USE_GNUTLS) || defined(USE_NSS)
+#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
+    defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL)
 #define USE_NTLM
 #endif
 #endif
@@ -552,17 +641,67 @@ int netware_init(void);
 #define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
 #endif
 
-/* Define S_ISREG if not defined by system headers, f.e. MSVC */
-#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+/*
+ * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
+ * Parameters should of course normally not be unused, but for example when
+ * we have multiple implementations of the same interface it may happen.
+ */
+
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+  ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+#  define UNUSED_PARAM __attribute__((__unused__))
+#else
+#  define UNUSED_PARAM /*NOTHING*/
 #endif
 
 /*
  * Include macros and defines that should only be processed once.
  */
 
-#ifndef __SETUP_ONCE_H
-#include "setup_once.h"
+#ifndef HEADER_CURL_SETUP_ONCE_H
+#include "curl_setup_once.h"
+#endif
+
+/*
+ * Definition of our NOP statement Object-like macro
+ */
+
+#ifndef Curl_nop_stmt
+#  define Curl_nop_stmt do { } WHILE_FALSE
+#endif
+
+/*
+ * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
+ */
+
+#if defined(__LWIP_OPT_H__)
+#  if defined(SOCKET) || \
+     defined(USE_WINSOCK) || \
+     defined(HAVE_WINSOCK_H) || \
+     defined(HAVE_WINSOCK2_H) || \
+     defined(HAVE_WS2TCPIP_H)
+#    error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+#  endif
+#endif
+
+/*
+ * Portable symbolic names for Winsock shutdown() mode flags.
+ */
+
+#ifdef USE_WINSOCK
+#  define SHUT_RD   0x00
+#  define SHUT_WR   0x01
+#  define SHUT_RDWR 0x02
+#endif
+
+/* Define S_ISREG if not defined by system headers, f.e. MSVC */
+#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
+/* Define S_ISDIR if not defined by system headers, f.e. MSVC */
+#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
 #endif
 
-#endif /* HEADER_CURL_LIB_SETUP_H */
+#endif /* HEADER_CURL_SETUP_H */
similarity index 87%
rename from lib/setup_once.h
rename to lib/curl_setup_once.h
index 85e78e8..6f3240a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SETUP_ONCE_H
-#define __SETUP_ONCE_H
+#ifndef HEADER_CURL_SETUP_ONCE_H
+#define HEADER_CURL_SETUP_ONCE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  ***************************************************************************/
 
 
-/********************************************************************
- *                              NOTICE                              *
- *                             ========                             *
- *                                                                  *
- *  Content of header files lib/setup_once.h and ares/setup_once.h  *
- *  must be kept in sync. Modify the other one if you change this.  *
- *                                                                  *
- ********************************************************************/
-
-
 /*
  * Inclusion of common header files.
  */
 #include <string.h>
 #include <stdarg.h>
 #include <ctype.h>
+
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_STDBOOL_H
+#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
 #include <stdbool.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef __hpux
+#  if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
+#    ifdef _APP32_64BIT_OFF_T
+#      define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T
+#      undef _APP32_64BIT_OFF_T
+#    else
+#      undef OLD_APP32_64BIT_OFF_T
+#    endif
+#  endif
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef __hpux
+#  if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
+#    ifdef OLD_APP32_64BIT_OFF_T
+#      define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T
+#      undef OLD_APP32_64BIT_OFF_T
+#    endif
+#  endif
+#endif
+
 
 /*
  * Definition of timeval struct for platforms that don't have it.
@@ -236,10 +257,22 @@ struct timeval {
 #  define sclose(x)  closesocket((x))
 #elif defined(HAVE_CLOSESOCKET_CAMEL)
 #  define sclose(x)  CloseSocket((x))
+#elif defined(HAVE_CLOSE_S)
+#  define sclose(x)  close_s((x))
+#elif defined(USE_LWIPSOCK)
+#  define sclose(x)  lwip_close((x))
 #else
 #  define sclose(x)  close((x))
 #endif
 
+/*
+ * Stack-independent version of fcntl() on sockets:
+ */
+#if defined(USE_LWIPSOCK)
+#  define sfcntl  lwip_fcntl
+#else
+#  define sfcntl  fcntl
+#endif
 
 /*
  * Uppercase macro versions of ANSI/ISO is*() functions/macros which
@@ -255,10 +288,25 @@ struct timeval {
 #define ISPRINT(x)  (isprint((int)  ((unsigned char)x)))
 #define ISUPPER(x)  (isupper((int)  ((unsigned char)x)))
 #define ISLOWER(x)  (islower((int)  ((unsigned char)x)))
+#define ISASCII(x)  (isascii((int)  ((unsigned char)x)))
 
 #define ISBLANK(x)  (int)((((unsigned char)x) == ' ') || \
                           (((unsigned char)x) == '\t'))
 
+#define TOLOWER(x)  (tolower((int)  ((unsigned char)x)))
+
+
+/*
+ * 'bool' stuff compatible with HP-UX headers.
+ */
+
+#if defined(__hpux) && !defined(HAVE_BOOL_T)
+   typedef int bool;
+#  define false 0
+#  define true 1
+#  define HAVE_BOOL_T
+#endif
+
 
 /*
  * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
@@ -301,6 +349,27 @@ struct timeval {
 
 
 /*
+ * Macro WHILE_FALSE may be used to build single-iteration do-while loops,
+ * avoiding compiler warnings. Mostly intended for other macro definitions.
+ */
+
+#define WHILE_FALSE  while(0)
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+#  undef WHILE_FALSE
+#  if (_MSC_VER < 1500)
+#    define WHILE_FALSE  while(1, 0)
+#  else
+#    define WHILE_FALSE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+while(0) \
+__pragma(warning(pop))
+#  endif
+#endif
+
+
+/*
  * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
  */
 
@@ -337,7 +406,7 @@ typedef int sig_atomic_t;
 #ifdef DEBUGBUILD
 #define DEBUGF(x) x
 #else
-#define DEBUGF(x) do { } while (0)
+#define DEBUGF(x) do { } WHILE_FALSE
 #endif
 
 
@@ -348,7 +417,7 @@ typedef int sig_atomic_t;
 #if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
 #define DEBUGASSERT(x) assert(x)
 #else
-#define DEBUGASSERT(x) do { } while (0)
+#define DEBUGASSERT(x) do { } WHILE_FALSE
 #endif
 
 
@@ -459,17 +528,6 @@ typedef int sig_atomic_t;
 #define EREMOTE          WSAEREMOTE
 #endif
 
-
-/*
- *  Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
- */
-
-#if defined(__VMS) && \
-    defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
-#define getpwuid __32_getpwuid
-#endif
-
-
 /*
  * Macro argv_item_t hides platform details to code using it.
  */
@@ -489,5 +547,5 @@ typedef int sig_atomic_t;
 #define ZERO_NULL 0
 
 
-#endif /* __SETUP_ONCE_H */
+#endif /* HEADER_CURL_SETUP_ONCE_H */
 
index b985dbc..e747d86 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
 
 /* The last #include file should be: */
 #include "memdebug.h"
 
-
 /* We use our own typedef here since some headers might lack these */
-typedef PSecurityFunctionTableA (APIENTRY *INITSECURITYINTERFACE_FN_A)(VOID);
+typedef PSecurityFunctionTable (APIENTRY *INITSECURITYINTERFACE_FN)(VOID);
+
+/* See definition of SECURITY_ENTRYPOINT in sspi.h */
+#ifdef UNICODE
+#  ifdef _WIN32_WCE
+#    define SECURITYENTRYPOINT L"InitSecurityInterfaceW"
+#  else
+#    define SECURITYENTRYPOINT "InitSecurityInterfaceW"
+#  endif
+#else
+#  define SECURITYENTRYPOINT "InitSecurityInterfaceA"
+#endif
 
 /* Handle of security.dll or secur32.dll, depending on Windows version */
 HMODULE s_hSecDll = NULL;
 
 /* Pointer to SSPI dispatch table */
-PSecurityFunctionTableA s_pSecFn = NULL;
-
+PSecurityFunctionTable s_pSecFn = NULL;
 
 /*
  * Curl_sspi_global_init()
@@ -57,20 +66,18 @@ PSecurityFunctionTableA s_pSecFn = NULL;
  * Once this function has been executed, Windows SSPI functions can be
  * called through the Security Service Provider Interface dispatch table.
  */
-
-CURLcode
-Curl_sspi_global_init(void)
+CURLcode Curl_sspi_global_init(void)
 {
   OSVERSIONINFO osver;
-  INITSECURITYINTERFACE_FN_A pInitSecurityInterface;
+  INITSECURITYINTERFACE_FN pInitSecurityInterface;
 
   /* If security interface is not yet initialized try to do this */
-  if(s_hSecDll == NULL) {
+  if(!s_hSecDll) {
 
     /* Find out Windows version */
     memset(&osver, 0, sizeof(osver));
     osver.dwOSVersionInfoSize = sizeof(osver);
-    if(! GetVersionEx(&osver))
+    if(!GetVersionEx(&osver))
       return CURLE_FAILED_INIT;
 
     /* Security Service Provider Interface (SSPI) functions are located in
@@ -80,36 +87,34 @@ Curl_sspi_global_init(void)
     /* Load SSPI dll into the address space of the calling process */
     if(osver.dwPlatformId == VER_PLATFORM_WIN32_NT
       && osver.dwMajorVersion == 4)
-      s_hSecDll = LoadLibrary("security.dll");
+      s_hSecDll = LoadLibrary(TEXT("security.dll"));
     else
-      s_hSecDll = LoadLibrary("secur32.dll");
-    if(! s_hSecDll)
+      s_hSecDll = LoadLibrary(TEXT("secur32.dll"));
+    if(!s_hSecDll)
       return CURLE_FAILED_INIT;
 
     /* Get address of the InitSecurityInterfaceA function from the SSPI dll */
-    pInitSecurityInterface = (INITSECURITYINTERFACE_FN_A)
-      GetProcAddress(s_hSecDll, "InitSecurityInterfaceA");
-    if(! pInitSecurityInterface)
+    pInitSecurityInterface = (INITSECURITYINTERFACE_FN)
+      GetProcAddress(s_hSecDll, SECURITYENTRYPOINT);
+    if(!pInitSecurityInterface)
       return CURLE_FAILED_INIT;
 
     /* Get pointer to Security Service Provider Interface dispatch table */
     s_pSecFn = pInitSecurityInterface();
-    if(! s_pSecFn)
+    if(!s_pSecFn)
       return CURLE_FAILED_INIT;
-
   }
+
   return CURLE_OK;
 }
 
-
 /*
  * Curl_sspi_global_cleanup()
  *
  * This deinitializes the Security Service Provider Interface from libcurl.
  */
 
-void
-Curl_sspi_global_cleanup(void)
+void Curl_sspi_global_cleanup(void)
 {
   if(s_hSecDll) {
     FreeLibrary(s_hSecDll);
index 221bce1..d525828 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
 
 #include <curl/curl.h>
 
 /*
- * When including the folowing three headers, it is mandatory to define either
+ * When including the following three headers, it is mandatory to define either
  * SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
  */
 
 #include <sspi.h>
 #include <rpc.h>
 
-/* Provide some definitions missing in MinGW's headers */
+CURLcode Curl_sspi_global_init(void);
+void Curl_sspi_global_cleanup(void);
 
-#ifndef SEC_I_CONTEXT_EXPIRED
-# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
+/* Forward-declaration of global variables defined in curl_sspi.c */
+
+extern HMODULE s_hSecDll;
+extern PSecurityFunctionTable s_pSecFn;
+
+/* Provide some definitions missing in old headers */
+
+#ifndef SEC_E_INSUFFICIENT_MEMORY
+# define SEC_E_INSUFFICIENT_MEMORY             ((HRESULT)0x80090300L)
 #endif
-#ifndef SEC_E_BUFFER_TOO_SMALL
-# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
+#ifndef SEC_E_INVALID_HANDLE
+# define SEC_E_INVALID_HANDLE                  ((HRESULT)0x80090301L)
 #endif
-#ifndef SEC_E_CONTEXT_EXPIRED
-# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
+#ifndef SEC_E_UNSUPPORTED_FUNCTION
+# define SEC_E_UNSUPPORTED_FUNCTION            ((HRESULT)0x80090302L)
 #endif
-#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
-# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
+#ifndef SEC_E_TARGET_UNKNOWN
+# define SEC_E_TARGET_UNKNOWN                  ((HRESULT)0x80090303L)
+#endif
+#ifndef SEC_E_INTERNAL_ERROR
+# define SEC_E_INTERNAL_ERROR                  ((HRESULT)0x80090304L)
+#endif
+#ifndef SEC_E_SECPKG_NOT_FOUND
+# define SEC_E_SECPKG_NOT_FOUND                ((HRESULT)0x80090305L)
+#endif
+#ifndef SEC_E_NOT_OWNER
+# define SEC_E_NOT_OWNER                       ((HRESULT)0x80090306L)
+#endif
+#ifndef SEC_E_CANNOT_INSTALL
+# define SEC_E_CANNOT_INSTALL                  ((HRESULT)0x80090307L)
+#endif
+#ifndef SEC_E_INVALID_TOKEN
+# define SEC_E_INVALID_TOKEN                   ((HRESULT)0x80090308L)
+#endif
+#ifndef SEC_E_CANNOT_PACK
+# define SEC_E_CANNOT_PACK                     ((HRESULT)0x80090309L)
+#endif
+#ifndef SEC_E_QOP_NOT_SUPPORTED
+# define SEC_E_QOP_NOT_SUPPORTED               ((HRESULT)0x8009030AL)
+#endif
+#ifndef SEC_E_NO_IMPERSONATION
+# define SEC_E_NO_IMPERSONATION                ((HRESULT)0x8009030BL)
+#endif
+#ifndef SEC_E_LOGON_DENIED
+# define SEC_E_LOGON_DENIED                    ((HRESULT)0x8009030CL)
+#endif
+#ifndef SEC_E_UNKNOWN_CREDENTIALS
+# define SEC_E_UNKNOWN_CREDENTIALS             ((HRESULT)0x8009030DL)
+#endif
+#ifndef SEC_E_NO_CREDENTIALS
+# define SEC_E_NO_CREDENTIALS                  ((HRESULT)0x8009030EL)
 #endif
 #ifndef SEC_E_MESSAGE_ALTERED
-# define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL)
+# define SEC_E_MESSAGE_ALTERED                 ((HRESULT)0x8009030FL)
 #endif
 #ifndef SEC_E_OUT_OF_SEQUENCE
-# define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L)
+# define SEC_E_OUT_OF_SEQUENCE                 ((HRESULT)0x80090310L)
+#endif
+#ifndef SEC_E_NO_AUTHENTICATING_AUTHORITY
+# define SEC_E_NO_AUTHENTICATING_AUTHORITY     ((HRESULT)0x80090311L)
+#endif
+#ifndef SEC_E_BAD_PKGID
+# define SEC_E_BAD_PKGID                       ((HRESULT)0x80090316L)
+#endif
+#ifndef SEC_E_CONTEXT_EXPIRED
+# define SEC_E_CONTEXT_EXPIRED                 ((HRESULT)0x80090317L)
+#endif
+#ifndef SEC_E_INCOMPLETE_MESSAGE
+# define SEC_E_INCOMPLETE_MESSAGE              ((HRESULT)0x80090318L)
+#endif
+#ifndef SEC_E_INCOMPLETE_CREDENTIALS
+# define SEC_E_INCOMPLETE_CREDENTIALS          ((HRESULT)0x80090320L)
+#endif
+#ifndef SEC_E_BUFFER_TOO_SMALL
+# define SEC_E_BUFFER_TOO_SMALL                ((HRESULT)0x80090321L)
+#endif
+#ifndef SEC_E_WRONG_PRINCIPAL
+# define SEC_E_WRONG_PRINCIPAL                 ((HRESULT)0x80090322L)
+#endif
+#ifndef SEC_E_TIME_SKEW
+# define SEC_E_TIME_SKEW                       ((HRESULT)0x80090324L)
+#endif
+#ifndef SEC_E_UNTRUSTED_ROOT
+# define SEC_E_UNTRUSTED_ROOT                  ((HRESULT)0x80090325L)
+#endif
+#ifndef SEC_E_ILLEGAL_MESSAGE
+# define SEC_E_ILLEGAL_MESSAGE                 ((HRESULT)0x80090326L)
+#endif
+#ifndef SEC_E_CERT_UNKNOWN
+# define SEC_E_CERT_UNKNOWN                    ((HRESULT)0x80090327L)
+#endif
+#ifndef SEC_E_CERT_EXPIRED
+# define SEC_E_CERT_EXPIRED                    ((HRESULT)0x80090328L)
+#endif
+#ifndef SEC_E_ENCRYPT_FAILURE
+# define SEC_E_ENCRYPT_FAILURE                 ((HRESULT)0x80090329L)
+#endif
+#ifndef SEC_E_DECRYPT_FAILURE
+# define SEC_E_DECRYPT_FAILURE                 ((HRESULT)0x80090330L)
+#endif
+#ifndef SEC_E_ALGORITHM_MISMATCH
+# define SEC_E_ALGORITHM_MISMATCH              ((HRESULT)0x80090331L)
+#endif
+#ifndef SEC_E_SECURITY_QOS_FAILED
+# define SEC_E_SECURITY_QOS_FAILED             ((HRESULT)0x80090332L)
+#endif
+#ifndef SEC_E_UNFINISHED_CONTEXT_DELETED
+# define SEC_E_UNFINISHED_CONTEXT_DELETED      ((HRESULT)0x80090333L)
+#endif
+#ifndef SEC_E_NO_TGT_REPLY
+# define SEC_E_NO_TGT_REPLY                    ((HRESULT)0x80090334L)
+#endif
+#ifndef SEC_E_NO_IP_ADDRESSES
+# define SEC_E_NO_IP_ADDRESSES                 ((HRESULT)0x80090335L)
+#endif
+#ifndef SEC_E_WRONG_CREDENTIAL_HANDLE
+# define SEC_E_WRONG_CREDENTIAL_HANDLE         ((HRESULT)0x80090336L)
+#endif
+#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
+# define SEC_E_CRYPTO_SYSTEM_INVALID           ((HRESULT)0x80090337L)
+#endif
+#ifndef SEC_E_MAX_REFERRALS_EXCEEDED
+# define SEC_E_MAX_REFERRALS_EXCEEDED          ((HRESULT)0x80090338L)
+#endif
+#ifndef SEC_E_MUST_BE_KDC
+# define SEC_E_MUST_BE_KDC                     ((HRESULT)0x80090339L)
+#endif
+#ifndef SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
+# define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED     ((HRESULT)0x8009033AL)
+#endif
+#ifndef SEC_E_TOO_MANY_PRINCIPALS
+# define SEC_E_TOO_MANY_PRINCIPALS             ((HRESULT)0x8009033BL)
+#endif
+#ifndef SEC_E_NO_PA_DATA
+# define SEC_E_NO_PA_DATA                      ((HRESULT)0x8009033CL)
+#endif
+#ifndef SEC_E_PKINIT_NAME_MISMATCH
+# define SEC_E_PKINIT_NAME_MISMATCH            ((HRESULT)0x8009033DL)
+#endif
+#ifndef SEC_E_SMARTCARD_LOGON_REQUIRED
+# define SEC_E_SMARTCARD_LOGON_REQUIRED        ((HRESULT)0x8009033EL)
+#endif
+#ifndef SEC_E_SHUTDOWN_IN_PROGRESS
+# define SEC_E_SHUTDOWN_IN_PROGRESS            ((HRESULT)0x8009033FL)
+#endif
+#ifndef SEC_E_KDC_INVALID_REQUEST
+# define SEC_E_KDC_INVALID_REQUEST             ((HRESULT)0x80090340L)
+#endif
+#ifndef SEC_E_KDC_UNABLE_TO_REFER
+# define SEC_E_KDC_UNABLE_TO_REFER             ((HRESULT)0x80090341L)
+#endif
+#ifndef SEC_E_KDC_UNKNOWN_ETYPE
+# define SEC_E_KDC_UNKNOWN_ETYPE               ((HRESULT)0x80090342L)
+#endif
+#ifndef SEC_E_UNSUPPORTED_PREAUTH
+# define SEC_E_UNSUPPORTED_PREAUTH             ((HRESULT)0x80090343L)
+#endif
+#ifndef SEC_E_DELEGATION_REQUIRED
+# define SEC_E_DELEGATION_REQUIRED             ((HRESULT)0x80090345L)
+#endif
+#ifndef SEC_E_BAD_BINDINGS
+# define SEC_E_BAD_BINDINGS                    ((HRESULT)0x80090346L)
+#endif
+#ifndef SEC_E_MULTIPLE_ACCOUNTS
+# define SEC_E_MULTIPLE_ACCOUNTS               ((HRESULT)0x80090347L)
+#endif
+#ifndef SEC_E_NO_KERB_KEY
+# define SEC_E_NO_KERB_KEY                     ((HRESULT)0x80090348L)
+#endif
+#ifndef SEC_E_CERT_WRONG_USAGE
+# define SEC_E_CERT_WRONG_USAGE                ((HRESULT)0x80090349L)
+#endif
+#ifndef SEC_E_DOWNGRADE_DETECTED
+# define SEC_E_DOWNGRADE_DETECTED              ((HRESULT)0x80090350L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_REVOKED
+# define SEC_E_SMARTCARD_CERT_REVOKED          ((HRESULT)0x80090351L)
+#endif
+#ifndef SEC_E_ISSUING_CA_UNTRUSTED
+# define SEC_E_ISSUING_CA_UNTRUSTED            ((HRESULT)0x80090352L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_C
+# define SEC_E_REVOCATION_OFFLINE_C            ((HRESULT)0x80090353L)
+#endif
+#ifndef SEC_E_PKINIT_CLIENT_FAILURE
+# define SEC_E_PKINIT_CLIENT_FAILURE           ((HRESULT)0x80090354L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_EXPIRED
+# define SEC_E_SMARTCARD_CERT_EXPIRED          ((HRESULT)0x80090355L)
+#endif
+#ifndef SEC_E_NO_S4U_PROT_SUPPORT
+# define SEC_E_NO_S4U_PROT_SUPPORT             ((HRESULT)0x80090356L)
+#endif
+#ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE
+# define SEC_E_CROSSREALM_DELEGATION_FAILURE   ((HRESULT)0x80090357L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_KDC
+# define SEC_E_REVOCATION_OFFLINE_KDC          ((HRESULT)0x80090358L)
+#endif
+#ifndef SEC_E_ISSUING_CA_UNTRUSTED_KDC
+# define SEC_E_ISSUING_CA_UNTRUSTED_KDC        ((HRESULT)0x80090359L)
+#endif
+#ifndef SEC_E_KDC_CERT_EXPIRED
+# define SEC_E_KDC_CERT_EXPIRED                ((HRESULT)0x8009035AL)
+#endif
+#ifndef SEC_E_KDC_CERT_REVOKED
+# define SEC_E_KDC_CERT_REVOKED                ((HRESULT)0x8009035BL)
+#endif
+#ifndef SEC_E_INVALID_PARAMETER
+# define SEC_E_INVALID_PARAMETER               ((HRESULT)0x8009035DL)
+#endif
+#ifndef SEC_E_DELEGATION_POLICY
+# define SEC_E_DELEGATION_POLICY               ((HRESULT)0x8009035EL)
+#endif
+#ifndef SEC_E_POLICY_NLTM_ONLY
+# define SEC_E_POLICY_NLTM_ONLY                ((HRESULT)0x8009035FL)
 #endif
 
-CURLcode Curl_sspi_global_init(void);
-void Curl_sspi_global_cleanup(void);
-
-/* Forward-declaration of global variables defined in curl_sspi.c */
-
-extern HMODULE s_hSecDll;
-extern PSecurityFunctionTableA s_pSecFn;
+#ifndef SEC_I_CONTINUE_NEEDED
+# define SEC_I_CONTINUE_NEEDED                 ((HRESULT)0x00090312L)
+#endif
+#ifndef SEC_I_COMPLETE_NEEDED
+# define SEC_I_COMPLETE_NEEDED                 ((HRESULT)0x00090313L)
+#endif
+#ifndef SEC_I_COMPLETE_AND_CONTINUE
+# define SEC_I_COMPLETE_AND_CONTINUE           ((HRESULT)0x00090314L)
+#endif
+#ifndef SEC_I_LOCAL_LOGON
+# define SEC_I_LOCAL_LOGON                     ((HRESULT)0x00090315L)
+#endif
+#ifndef SEC_I_CONTEXT_EXPIRED
+# define SEC_I_CONTEXT_EXPIRED                 ((HRESULT)0x00090317L)
+#endif
+#ifndef SEC_I_INCOMPLETE_CREDENTIALS
+# define SEC_I_INCOMPLETE_CREDENTIALS          ((HRESULT)0x00090320L)
+#endif
+#ifndef SEC_I_RENEGOTIATE
+# define SEC_I_RENEGOTIATE                     ((HRESULT)0x00090321L)
+#endif
+#ifndef SEC_I_NO_LSA_CONTEXT
+# define SEC_I_NO_LSA_CONTEXT                  ((HRESULT)0x00090323L)
+#endif
+#ifndef SEC_I_SIGNATURE_NEEDED
+# define SEC_I_SIGNATURE_NEEDED                ((HRESULT)0x0009035CL)
+#endif
 
 #endif /* USE_WINDOWS_SSPI */
 #endif /* HEADER_CURL_SSPI_H */
index fd10bd4..c9e91f6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -19,7 +19,8 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
 
 #if defined(USE_THREADS_POSIX)
 #  ifdef HAVE_PTHREAD_H
@@ -95,7 +96,8 @@ int Curl_thread_join(curl_thread_t *hnd)
 
 #elif defined(USE_THREADS_WIN32)
 
-curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void*), void *arg)
+curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void*),
+                                 void *arg)
 {
 #ifdef _WIN32_WCE
   return CreateThread(NULL, 0, func, arg, 0, NULL);
index ba81054..d9cec6b 100644 (file)
@@ -21,7 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
 
 #if defined(USE_THREADS_POSIX)
 #  define CURL_STDCALL
index 2b7fec5..9dc90a0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CURLX_H
-#define __CURLX_H
+#ifndef HEADER_CURL_CURLX_H
+#define HEADER_CURL_CURLX_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -89,7 +89,7 @@
 
 #ifdef ENABLE_CURLX_PRINTF
 /* If this define is set, we define all "standard" printf() functions to use
-   the curlx_* version instead. It makes the source code transparant and
+   the curlx_* version instead. It makes the source code transparent and
    easier to understand/patch. Undefine them first in case _MPRINTF_REPLACE
    is set. */
 # undef printf
 # define vaprintf curlx_mvaprintf
 #endif /* ENABLE_CURLX_PRINTF */
 
-#endif /* __CURLX_H */
+#endif /* HEADER_CURL_CURLX_H */
+
diff --git a/lib/cyassl.c b/lib/cyassl.c
new file mode 100644 (file)
index 0000000..7c78464
--- /dev/null
@@ -0,0 +1,611 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Source file for all CyaSSL-specific code for the TLS/SSL layer. No code
+ * but sslgen.c should ever call or use these functions.
+ *
+ */
+
+#include "curl_setup.h"
+
+#ifdef USE_CYASSL
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "urldata.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "cyassl.h"
+#include "sslgen.h"
+#include "parsedate.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "rawstr.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+#include <cyassl/ssl.h>
+#include <cyassl/error.h>
+
+
+static Curl_recv cyassl_recv;
+static Curl_send cyassl_send;
+
+
+static int do_file_type(const char *type)
+{
+  if(!type || !type[0])
+    return SSL_FILETYPE_PEM;
+  if(Curl_raw_equal(type, "PEM"))
+    return SSL_FILETYPE_PEM;
+  if(Curl_raw_equal(type, "DER"))
+    return SSL_FILETYPE_ASN1;
+  return -1;
+}
+
+/*
+ * This function loads all the client/CA certificates and CRLs. Setup the TLS
+ * layer and do all necessary magic.
+ */
+static CURLcode
+cyassl_connect_step1(struct connectdata *conn,
+                     int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data* conssl = &conn->ssl[sockindex];
+  SSL_METHOD* req_method = NULL;
+  void* ssl_sessionid = NULL;
+  curl_socket_t sockfd = conn->sock[sockindex];
+
+  if(conssl->state == ssl_connection_complete)
+    return CURLE_OK;
+
+  /* CyaSSL doesn't support SSLv2 */
+  if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
+    failf(data, "CyaSSL does not support SSLv2");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  /* check to see if we've been told to use an explicit SSL/TLS version */
+  switch(data->set.ssl.version) {
+  case CURL_SSLVERSION_DEFAULT:
+    /* we try to figure out version */
+    req_method = SSLv23_client_method();
+    break;
+  case CURL_SSLVERSION_TLSv1:
+    req_method = TLSv1_client_method();
+    break;
+  case CURL_SSLVERSION_SSLv3:
+    req_method = SSLv3_client_method();
+    break;
+  default:
+    req_method = TLSv1_client_method();
+  }
+
+  if(!req_method) {
+    failf(data, "SSL: couldn't create a method!");
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  if(conssl->ctx)
+    SSL_CTX_free(conssl->ctx);
+  conssl->ctx = SSL_CTX_new(req_method);
+
+  if(!conssl->ctx) {
+    failf(data, "SSL: couldn't create a context!");
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+#ifndef NO_FILESYSTEM
+  /* load trusted cacert */
+  if(data->set.str[STRING_SSL_CAFILE]) {
+    if(!SSL_CTX_load_verify_locations(conssl->ctx,
+                                      data->set.str[STRING_SSL_CAFILE],
+                                      data->set.str[STRING_SSL_CAPATH])) {
+      if(data->set.ssl.verifypeer) {
+        /* Fail if we insiste on successfully verifying the server. */
+        failf(data,"error setting certificate verify locations:\n"
+              "  CAfile: %s\n  CApath: %s",
+              data->set.str[STRING_SSL_CAFILE]?
+              data->set.str[STRING_SSL_CAFILE]: "none",
+              data->set.str[STRING_SSL_CAPATH]?
+              data->set.str[STRING_SSL_CAPATH] : "none");
+        return CURLE_SSL_CACERT_BADFILE;
+      }
+      else {
+        /* Just continue with a warning if no strict  certificate
+           verification is required. */
+        infof(data, "error setting certificate verify locations,"
+              " continuing anyway:\n");
+      }
+    }
+    else {
+      /* Everything is fine. */
+      infof(data, "successfully set certificate verify locations:\n");
+    }
+    infof(data,
+          "  CAfile: %s\n"
+          "  CApath: %s\n",
+          data->set.str[STRING_SSL_CAFILE] ? data->set.str[STRING_SSL_CAFILE]:
+          "none",
+          data->set.str[STRING_SSL_CAPATH] ? data->set.str[STRING_SSL_CAPATH]:
+          "none");
+  }
+
+  /* Load the client certificate, and private key */
+  if(data->set.str[STRING_CERT] && data->set.str[STRING_KEY]) {
+    int file_type = do_file_type(data->set.str[STRING_CERT_TYPE]);
+
+    if(SSL_CTX_use_certificate_file(conssl->ctx, data->set.str[STRING_CERT],
+                                     file_type) != 1) {
+      failf(data, "unable to use client certificate (no key or wrong pass"
+            " phrase?)");
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+
+    file_type = do_file_type(data->set.str[STRING_KEY_TYPE]);
+    if(SSL_CTX_use_PrivateKey_file(conssl->ctx, data->set.str[STRING_KEY],
+                                    file_type) != 1) {
+      failf(data, "unable to set private key");
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+#else
+  if(CyaSSL_no_filesystem_verify(conssl->ctx)!= SSL_SUCCESS) {
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+#endif /* NO_FILESYSTEM */
+
+  /* SSL always tries to verify the peer, this only says whether it should
+   * fail to connect if the verification fails, or if it should continue
+   * anyway. In the latter case the result of the verification is checked with
+   * SSL_get_verify_result() below. */
+  SSL_CTX_set_verify(conssl->ctx,
+                     data->set.ssl.verifypeer?SSL_VERIFY_PEER:SSL_VERIFY_NONE,
+                     NULL);
+
+  /* Let's make an SSL structure */
+  if(conssl->handle)
+    SSL_free(conssl->handle);
+  conssl->handle = SSL_new(conssl->ctx);
+  if(!conssl->handle) {
+    failf(data, "SSL: couldn't create a context (handle)!");
+    return CURLE_OUT_OF_MEMORY;
+  }
+
+  /* Check if there's a cached ID we can/should use here! */
+  if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL)) {
+    /* we got a session id, use it! */
+    if(!SSL_set_session(conssl->handle, ssl_sessionid)) {
+      failf(data, "SSL: SSL_set_session failed: %s",
+            ERR_error_string(SSL_get_error(conssl->handle, 0),NULL));
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+    /* Informational message */
+    infof (data, "SSL re-using session ID\n");
+  }
+
+  /* pass the raw socket into the SSL layer */
+  if(!SSL_set_fd(conssl->handle, (int)sockfd)) {
+    failf(data, "SSL: SSL_set_fd failed");
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  conssl->connecting_state = ssl_connect_2;
+  return CURLE_OK;
+}
+
+
+static CURLcode
+cyassl_connect_step2(struct connectdata *conn,
+                     int sockindex)
+{
+  int ret = -1;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data* conssl = &conn->ssl[sockindex];
+
+  infof(data, "CyaSSL: Connecting to %s:%d\n",
+        conn->host.name, conn->remote_port);
+
+  conn->recv[sockindex] = cyassl_recv;
+  conn->send[sockindex] = cyassl_send;
+
+  /* Enable RFC2818 checks */
+  if(data->set.ssl.verifyhost) {
+    ret = CyaSSL_check_domain_name(conssl->handle, conn->host.name);
+    if(ret == SSL_FAILURE)
+      return CURLE_OUT_OF_MEMORY;
+  }
+
+  ret = SSL_connect(conssl->handle);
+  if(ret != 1) {
+    char error_buffer[80];
+    int  detail = SSL_get_error(conssl->handle, ret);
+
+    if(SSL_ERROR_WANT_READ == detail) {
+      conssl->connecting_state = ssl_connect_2_reading;
+      return CURLE_OK;
+    }
+    else if(SSL_ERROR_WANT_WRITE == detail) {
+      conssl->connecting_state = ssl_connect_2_writing;
+      return CURLE_OK;
+    }
+    /* There is no easy way to override only the CN matching.
+     * This will enable the override of both mismatching SubjectAltNames
+     * as also mismatching CN fields */
+    else if(DOMAIN_NAME_MISMATCH == detail) {
+#if 1
+      failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n",
+            conn->host.dispname);
+      return CURLE_PEER_FAILED_VERIFICATION;
+#else
+      /* When the CyaSSL_check_domain_name() is used and you desire to continue
+       * on a DOMAIN_NAME_MISMATCH, i.e. 'data->set.ssl.verifyhost == 0',
+       * CyaSSL version 2.4.0 will fail with an INCOMPLETE_DATA error. The only
+       * way to do this is currently to switch the CyaSSL_check_domain_name()
+       * in and out based on the 'data->set.ssl.verifyhost' value. */
+      if(data->set.ssl.verifyhost) {
+        failf(data,
+              "\tsubject alt name(s) or common name do not match \"%s\"\n",
+              conn->host.dispname);
+        return CURLE_PEER_FAILED_VERIFICATION;
+      }
+      else {
+        infof(data,
+              "\tsubject alt name(s) and/or common name do not match \"%s\"\n",
+              conn->host.dispname);
+        return CURLE_OK;
+      }
+#endif
+    }
+    else {
+      failf(data, "SSL_connect failed with error %d: %s", detail,
+          ERR_error_string(detail, error_buffer));
+      return CURLE_SSL_CONNECT_ERROR;
+    }
+  }
+
+  conssl->connecting_state = ssl_connect_3;
+  infof(data, "SSL connected\n");
+
+  return CURLE_OK;
+}
+
+
+static CURLcode
+cyassl_connect_step3(struct connectdata *conn,
+                     int sockindex)
+{
+  CURLcode retcode = CURLE_OK;
+  void *old_ssl_sessionid=NULL;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  int incache;
+  SSL_SESSION *our_ssl_sessionid;
+
+  DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
+
+  our_ssl_sessionid = SSL_get_session(connssl->handle);
+
+  incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
+  if(incache) {
+    if(old_ssl_sessionid != our_ssl_sessionid) {
+      infof(data, "old SSL session ID is stale, removing\n");
+      Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+      incache = FALSE;
+    }
+  }
+  if(!incache) {
+    retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
+                                    0 /* unknown size */);
+    if(retcode) {
+      failf(data, "failed to store ssl session");
+      return retcode;
+    }
+  }
+
+  connssl->connecting_state = ssl_connect_done;
+
+  return retcode;
+}
+
+
+static ssize_t cyassl_send(struct connectdata *conn,
+                           int sockindex,
+                           const void *mem,
+                           size_t len,
+                           CURLcode *curlcode)
+{
+  char error_buffer[80];
+  int  memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
+  int  rc     = SSL_write(conn->ssl[sockindex].handle, mem, memlen);
+
+  if(rc < 0) {
+    int err = SSL_get_error(conn->ssl[sockindex].handle, rc);
+
+    switch(err) {
+    case SSL_ERROR_WANT_READ:
+    case SSL_ERROR_WANT_WRITE:
+      /* there's data pending, re-invoke SSL_write() */
+      *curlcode = CURLE_AGAIN;
+      return -1;
+    default:
+      failf(conn->data, "SSL write: %s, errno %d",
+            ERR_error_string(err, error_buffer),
+            SOCKERRNO);
+      *curlcode = CURLE_SEND_ERROR;
+      return -1;
+    }
+  }
+  return rc;
+}
+
+void Curl_cyassl_close_all(struct SessionHandle *data)
+{
+  (void)data;
+}
+
+void Curl_cyassl_close(struct connectdata *conn, int sockindex)
+{
+  struct ssl_connect_data *conssl = &conn->ssl[sockindex];
+
+  if(conssl->handle) {
+    (void)SSL_shutdown(conssl->handle);
+    SSL_free (conssl->handle);
+    conssl->handle = NULL;
+  }
+  if(conssl->ctx) {
+    SSL_CTX_free (conssl->ctx);
+    conssl->ctx = NULL;
+  }
+}
+
+static ssize_t cyassl_recv(struct connectdata *conn,
+                           int num,
+                           char *buf,
+                           size_t buffersize,
+                           CURLcode *curlcode)
+{
+  char error_buffer[80];
+  int  buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
+  int  nread    = SSL_read(conn->ssl[num].handle, buf, buffsize);
+
+  if(nread < 0) {
+    int err = SSL_get_error(conn->ssl[num].handle, nread);
+
+    switch(err) {
+    case SSL_ERROR_ZERO_RETURN: /* no more data */
+      break;
+    case SSL_ERROR_WANT_READ:
+    case SSL_ERROR_WANT_WRITE:
+      /* there's data pending, re-invoke SSL_read() */
+      *curlcode = CURLE_AGAIN;
+      return -1;
+    default:
+      failf(conn->data, "SSL read: %s, errno %d",
+            ERR_error_string(err, error_buffer),
+            SOCKERRNO);
+      *curlcode = CURLE_RECV_ERROR;
+      return -1;
+    }
+  }
+  return nread;
+}
+
+
+void Curl_cyassl_session_free(void *ptr)
+{
+  (void)ptr;
+  /* CyaSSL reuses sessions on own, no free */
+}
+
+
+size_t Curl_cyassl_version(char *buffer, size_t size)
+{
+#ifdef CYASSL_VERSION
+  return snprintf(buffer, size, "CyaSSL/%s", CYASSL_VERSION);
+#else
+  return snprintf(buffer, size, "CyaSSL/%s", "<1.8.8");
+#endif
+}
+
+
+int Curl_cyassl_init(void)
+{
+  if(CyaSSL_Init() == 0)
+    return 1;
+
+  return -1;
+}
+
+
+bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex)
+{
+  if(conn->ssl[connindex].handle)   /* SSL is in use */
+    return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE;
+  else
+    return FALSE;
+}
+
+
+/*
+ * This function is called to shut down the SSL layer but keep the
+ * socket open (CCC - Clear Command Channel)
+ */
+int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex)
+{
+  int retval = 0;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+  if(connssl->handle) {
+    SSL_free (connssl->handle);
+    connssl->handle = NULL;
+  }
+  return retval;
+}
+
+
+static CURLcode
+cyassl_connect_common(struct connectdata *conn,
+                      int sockindex,
+                      bool nonblocking,
+                      bool *done)
+{
+  CURLcode retcode;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  curl_socket_t sockfd = conn->sock[sockindex];
+  long timeout_ms;
+  int what;
+
+  /* check if the connection has already been established */
+  if(ssl_connection_complete == connssl->state) {
+    *done = TRUE;
+    return CURLE_OK;
+  }
+
+  if(ssl_connect_1==connssl->connecting_state) {
+    /* Find out how much more time we're allowed */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+    retcode = cyassl_connect_step1(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  while(ssl_connect_2 == connssl->connecting_state ||
+        ssl_connect_2_reading == connssl->connecting_state ||
+        ssl_connect_2_writing == connssl->connecting_state) {
+
+    /* check allowed time left */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+
+    /* if ssl is expecting something, check if it's available. */
+    if(connssl->connecting_state == ssl_connect_2_reading
+       || connssl->connecting_state == ssl_connect_2_writing) {
+
+      curl_socket_t writefd = ssl_connect_2_writing==
+        connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+      curl_socket_t readfd = ssl_connect_2_reading==
+        connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+      what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+      if(what < 0) {
+        /* fatal error */
+        failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      else if(0 == what) {
+        if(nonblocking) {
+          *done = FALSE;
+          return CURLE_OK;
+        }
+        else {
+          /* timeout */
+          failf(data, "SSL connection timeout");
+          return CURLE_OPERATION_TIMEDOUT;
+        }
+      }
+      /* socket is readable or writable */
+    }
+
+    /* Run transaction, and return to the caller if it failed or if
+     * this connection is part of a multi handle and this loop would
+     * execute again. This permits the owner of a multi handle to
+     * abort a connection attempt before step2 has completed while
+     * ensuring that a client using select() or epoll() will always
+     * have a valid fdset to wait on.
+     */
+    retcode = cyassl_connect_step2(conn, sockindex);
+    if(retcode || (nonblocking &&
+                   (ssl_connect_2 == connssl->connecting_state ||
+                    ssl_connect_2_reading == connssl->connecting_state ||
+                    ssl_connect_2_writing == connssl->connecting_state)))
+      return retcode;
+
+  } /* repeat step2 until all transactions are done. */
+
+  if(ssl_connect_3==connssl->connecting_state) {
+    retcode = cyassl_connect_step3(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  if(ssl_connect_done==connssl->connecting_state) {
+    connssl->state = ssl_connection_complete;
+    conn->recv[sockindex] = cyassl_recv;
+    conn->send[sockindex] = cyassl_send;
+    *done = TRUE;
+  }
+  else
+    *done = FALSE;
+
+  /* Reset our connect state machine */
+  connssl->connecting_state = ssl_connect_1;
+
+  return CURLE_OK;
+}
+
+
+CURLcode
+Curl_cyassl_connect_nonblocking(struct connectdata *conn,
+                                int sockindex,
+                                bool *done)
+{
+  return cyassl_connect_common(conn, sockindex, TRUE, done);
+}
+
+
+CURLcode
+Curl_cyassl_connect(struct connectdata *conn,
+                    int sockindex)
+{
+  CURLcode retcode;
+  bool done = FALSE;
+
+  retcode = cyassl_connect_common(conn, sockindex, FALSE, &done);
+  if(retcode)
+    return retcode;
+
+  DEBUGASSERT(done);
+
+  return CURLE_OK;
+}
+
+#endif
diff --git a/lib/cyassl.h b/lib/cyassl.h
new file mode 100644 (file)
index 0000000..7728a0c
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef HEADER_CURL_CYASSL_H
+#define HEADER_CURL_CYASSL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+
+#ifdef USE_CYASSL
+
+CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex);
+bool Curl_cyassl_data_pending(const struct connectdata* conn,int connindex);
+int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex);
+
+/* tell CyaSSL to close down all open information regarding connections (and
+   thus session ID caching etc) */
+void Curl_cyassl_close_all(struct SessionHandle *data);
+
+ /* close a SSL connection */
+void Curl_cyassl_close(struct connectdata *conn, int sockindex);
+
+void Curl_cyassl_session_free(void *ptr);
+size_t Curl_cyassl_version(char *buffer, size_t size);
+int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex);
+int Curl_cyassl_init(void);
+CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn,
+                                         int sockindex,
+                                         bool *done);
+
+/* API setup for CyaSSL */
+#define curlssl_init Curl_cyassl_init
+#define curlssl_cleanup() Curl_nop_stmt
+#define curlssl_connect Curl_cyassl_connect
+#define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking
+#define curlssl_session_free(x)  Curl_cyassl_session_free(x)
+#define curlssl_close_all Curl_cyassl_close_all
+#define curlssl_close Curl_cyassl_close
+#define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y)
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
+#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
+#define curlssl_version Curl_cyassl_version
+#define curlssl_check_cxn(x) (x=x, -1)
+#define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y)
+
+#endif /* USE_CYASSL */
+#endif /* HEADER_CURL_CYASSL_H */
index d86923a..f5c8921 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_DICT
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
 #endif
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
@@ -64,9 +48,6 @@
 #include <sys/select.h>
 #endif
 
-
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
+#include "curl_memory.h"
 /* The last #include file should be: */
 #include "memdebug.h"
 
-
 /*
  * Forward declarations.
  */
@@ -105,10 +86,13 @@ const struct Curl_handler Curl_handler_dict = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_DICT,                            /* defport */
-  PROT_DICT                             /* protocol */
+  CURLPROTO_DICT,                       /* protocol */
+  PROTOPT_NONE | PROTOPT_NOURLQUERY      /* flags */
 };
 
 static char *unescape_word(struct SessionHandle *data, const char *inputbuff)
@@ -188,7 +172,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
     }
 
     if((word == NULL) || (*word == (char)0)) {
-      infof(data, "lookup word is missing");
+      infof(data, "lookup word is missing\n");
       word=(char *)"default";
     }
     if((database == NULL) || (*database == (char)0)) {
@@ -242,7 +226,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
     }
 
     if((word == NULL) || (*word == (char)0)) {
-      infof(data, "lookup word is missing");
+      infof(data, "lookup word is missing\n");
       word=(char *)"default";
     }
     if((database == NULL) || (*database == (char)0)) {
@@ -278,7 +262,7 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
       int i;
 
       ppath++;
-      for (i = 0; ppath[i]; i++) {
+      for(i = 0; ppath[i]; i++) {
         if(ppath[i] == ':')
           ppath[i] = ' ';
       }
diff --git a/lib/dotdot.c b/lib/dotdot.c
new file mode 100644 (file)
index 0000000..41b73be
--- /dev/null
@@ -0,0 +1,170 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#include "dotdot.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/*
+ * "Remove Dot Segments"
+ * http://tools.ietf.org/html/rfc3986#section-5.2.4
+ */
+
+/*
+ * Curl_dedotdotify()
+ *
+ * This function gets a zero-terminated path with dot and dotdot sequences
+ * passed in and strips them off according to the rules in RFC 3986 section
+ * 5.2.4.
+ *
+ * The function handles a query part ('?' + stuff) appended but it expects
+ * that fragments ('#' + stuff) have already been cut off.
+ *
+ * RETURNS
+ *
+ * an allocated dedotdotified output string
+ */
+char *Curl_dedotdotify(char *input)
+{
+  size_t inlen = strlen(input);
+  char *clone;
+  size_t clen = inlen; /* the length of the cloned input */
+  char *out = malloc(inlen+1);
+  char *outptr;
+  char *orgclone;
+  char *queryp;
+  if(!out)
+    return NULL; /* out of memory */
+
+  /* get a cloned copy of the input */
+  clone = strdup(input);
+  if(!clone) {
+    free(out);
+    return NULL;
+  }
+  orgclone = clone;
+  outptr = out;
+
+  /*
+   * To handle query-parts properly, we must find it and remove it during the
+   * dotdot-operation and then append it again at the end to the output
+   * string.
+   */
+  queryp = strchr(clone, '?');
+  if(queryp)
+    *queryp = 0;
+
+  do {
+
+    /*  A.  If the input buffer begins with a prefix of "../" or "./", then
+        remove that prefix from the input buffer; otherwise, */
+
+    if(!strncmp("./", clone, 2)) {
+      clone+=2;
+      clen-=2;
+    }
+    else if(!strncmp("../", clone, 3)) {
+      clone+=3;
+      clen-=3;
+    }
+
+    /*  B.  if the input buffer begins with a prefix of "/./" or "/.", where
+        "."  is a complete path segment, then replace that prefix with "/" in
+        the input buffer; otherwise, */
+    else if(!strncmp("/./", clone, 3)) {
+      clone+=2;
+      clen-=2;
+    }
+    else if(!strcmp("/.", clone)) {
+      clone[1]='/';
+      clone++;
+      clen-=1;
+    }
+
+    /*  C.  if the input buffer begins with a prefix of "/../" or "/..", where
+        ".." is a complete path segment, then replace that prefix with "/" in
+        the input buffer and remove the last segment and its preceding "/" (if
+        any) from the output buffer; otherwise, */
+
+    else if(!strncmp("/../", clone, 4)) {
+      clone+=3;
+      clen-=3;
+      /* remove the last segment from the output buffer */
+      while(outptr > out) {
+        outptr--;
+        if(*outptr == '/')
+          break;
+      }
+      *outptr = 0; /* zero-terminate where it stops */
+    }
+    else if(!strcmp("/..", clone)) {
+      clone[2]='/';
+      clone+=2;
+      clen-=2;
+      /* remove the last segment from the output buffer */
+      while(outptr > out) {
+        outptr--;
+        if(*outptr == '/')
+          break;
+      }
+      *outptr = 0; /* zero-terminate where it stops */
+    }
+
+    /*  D.  if the input buffer consists only of "." or "..", then remove
+        that from the input buffer; otherwise, */
+
+    else if(!strcmp(".", clone) || !strcmp("..", clone)) {
+      *clone=0;
+    }
+
+    else {
+      /*  E.  move the first path segment in the input buffer to the end of
+          the output buffer, including the initial "/" character (if any) and
+          any subsequent characters up to, but not including, the next "/"
+          character or the end of the input buffer. */
+
+      do {
+        *outptr++ = *clone++;
+        clen--;
+      } while(*clone && (*clone != '/'));
+      *outptr = 0;
+    }
+
+  } while(*clone);
+
+  if(queryp) {
+    size_t qlen;
+    /* There was a query part, append that to the output. The 'clone' string
+       may now have been altered so we copy from the original input string
+       from the correct index. */
+    size_t oindex = queryp - orgclone;
+    qlen = strlen(&input[oindex]);
+    memcpy(outptr, &input[oindex], qlen+1); /* include the ending zero byte */
+  }
+
+  free(orgclone);
+  return out;
+}
similarity index 85%
rename from src/xattr.h
rename to lib/dotdot.h
index fea98f1..c3487c1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __XATTR_H
-#define __XATTR_H
+#ifndef HEADER_CURL_DOTDOT_H
+#define HEADER_CURL_DOTDOT_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,5 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-int fwrite_xattr(CURL *curl, int fd);
-
+char *Curl_dedotdotify(char *input);
 #endif
index 6f55347..041a831 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "strequal.h"
+/*
+ * See comment in curl_memory.h for the explanation of this sanity check.
+ */
 
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#ifdef CURLX_NO_MEMORY_CALLBACKS
+#error "libcurl shall not ever be built with CURLX_NO_MEMORY_CALLBACKS defined"
 #endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #include <sys/param.h>
 #endif
 
-#endif  /* WIN32 ... */
+#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && defined(USE_OPENSSL)
+#define SIGPIPE_IGNORE 1
+#include <signal.h>
+#endif
 
+#include "strequal.h"
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
 #include "easyif.h"
 #include "select.h"
 #include "sendf.h" /* for failf function prototype */
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
 #include "connect.h" /* for Curl_getconnectinfo */
 #include "slist.h"
-#include "curl_rand.h"
+#include "amigaos.h"
+#include "non-ascii.h"
+#include "warnless.h"
+#include "conncache.h"
+#include "multiif.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-#include <iconv.h>
-/* set default codesets for iconv */
-#ifndef CURL_ICONV_CODESET_OF_NETWORK
-#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-#endif
-#ifndef CURL_ICONV_CODESET_FOR_UTF8
-#define CURL_ICONV_CODESET_FOR_UTF8   "UTF-8"
-#endif
-#define ICONV_ERROR  (size_t)-1
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-
 /* The last #include file should be: */
 #include "memdebug.h"
 
+#ifdef SIGPIPE_IGNORE
+struct sigpipe_ignore {
+  struct sigaction old_pipe_act;
+  bool no_signal;
+};
+
+#define SIGPIPE_VARIABLE(x) struct sigpipe_ignore x
+
+/*
+ * sigpipe_ignore() makes sure we ignore SIGPIPE while running libcurl
+ * internals, and then sigpipe_restore() will restore the situation when we
+ * return from libcurl again.
+ */
+static void sigpipe_ignore(struct SessionHandle *data,
+                           struct sigpipe_ignore *ig)
+{
+  /* get a local copy of no_signal because the SessionHandle might not be
+     around when we restore */
+  ig->no_signal = data->set.no_signal;
+  if(!data->set.no_signal) {
+    struct sigaction action;
+    /* first, extract the existing situation */
+    memset(&ig->old_pipe_act, 0, sizeof(struct sigaction));
+    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
+    action = ig->old_pipe_act;
+    /* ignore this signal */
+    action.sa_handler = SIG_IGN;
+    sigaction(SIGPIPE, &action, NULL);
+  }
+}
+
+/*
+ * sigpipe_restore() puts back the outside world's opinion of signal handler
+ * and SIGPIPE handling. It MUST only be called after a corresponding
+ * sigpipe_ignore() was used.
+ */
+static void sigpipe_restore(struct sigpipe_ignore *ig)
+{
+  if(!ig->no_signal)
+    /* restore the outside state */
+    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
+}
+
+#else
+/* for systems without sigaction */
+#define sigpipe_ignore(x,y) Curl_nop_stmt
+#define sigpipe_restore(x)  Curl_nop_stmt
+#define SIGPIPE_VARIABLE(x)
+#endif
+
 /* win32_cleanup() is for win32 socket cleanup functionality, the opposite
    of win32_init() */
 static void win32_cleanup(void)
@@ -144,8 +175,8 @@ static CURLcode win32_init(void)
   /* wVersionRequested in wVersion. wHighVersion contains the */
   /* highest supported version. */
 
-  if( LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
-       HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
+  if(LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
+     HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
     /* Tell the user that we couldn't find a useable */
 
     /* winsock.dll. */
@@ -153,12 +184,14 @@ static CURLcode win32_init(void)
     return CURLE_FAILED_INIT;
   }
   /* The Windows Sockets DLL is acceptable. Proceed. */
+#elif defined(USE_LWIPSOCK)
+  lwip_init();
 #endif
 
 #ifdef USE_WINDOWS_SSPI
   {
     CURLcode err = Curl_sspi_global_init();
-    if (err != CURLE_OK)
+    if(err != CURLE_OK)
       return err;
   }
 #endif
@@ -219,6 +252,9 @@ curl_free_callback Curl_cfree = (curl_free_callback)free;
 curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
 curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup;
 curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
 #else
 /*
  * Symbian OS doesn't support initialization to code in writeable static data.
@@ -250,6 +286,9 @@ CURLcode curl_global_init(long flags)
   Curl_crealloc = (curl_realloc_callback)realloc;
   Curl_cstrdup = (curl_strdup_callback)system_strdup;
   Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+  Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
 
   if(flags & CURL_GLOBAL_SSL)
     if(!Curl_ssl_init()) {
@@ -264,8 +303,8 @@ CURLcode curl_global_init(long flags)
     }
 
 #ifdef __AMIGA__
-  if(!amiga_init()) {
-    DEBUGF(fprintf(stderr, "Error: amiga_init failed\n"));
+  if(!Curl_amiga_init()) {
+    DEBUGF(fprintf(stderr, "Error: Curl_amiga_init failed\n"));
     return CURLE_FAILED_INIT;
   }
 #endif
@@ -280,12 +319,10 @@ CURLcode curl_global_init(long flags)
   idna_init();
 #endif
 
-#ifdef CARES_HAVE_ARES_LIBRARY_INIT
-  if(ares_library_init(ARES_LIB_INIT_ALL)) {
-    DEBUGF(fprintf(stderr, "Error: ares_library_init failed\n"));
+  if(Curl_resolver_global_init() != CURLE_OK) {
+    DEBUGF(fprintf(stderr, "Error: resolver_global_init failed\n"));
     return CURLE_FAILED_INIT;
   }
-#endif
 
 #if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT)
   if(libssh2_init(0)) {
@@ -294,11 +331,10 @@ CURLcode curl_global_init(long flags)
   }
 #endif
 
-  init_flags  = flags;
-
-  /* Preset pseudo-random number sequence. */
+  if(flags & CURL_GLOBAL_ACK_EINTR)
+    Curl_ack_eintr = 1;
 
-  Curl_srand();
+  init_flags  = flags;
 
   return CURLE_OK;
 }
@@ -318,7 +354,7 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m,
     return CURLE_FAILED_INIT;
 
   /* Already initialized, don't do it again */
-  if( initialized )
+  if(initialized)
     return CURLE_OK;
 
   /* Call the actual init function first */
@@ -351,16 +387,12 @@ void curl_global_cleanup(void)
   if(init_flags & CURL_GLOBAL_SSL)
     Curl_ssl_cleanup();
 
-#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP
-  ares_library_cleanup();
-#endif
+  Curl_resolver_global_cleanup();
 
   if(init_flags & CURL_GLOBAL_WIN32)
     win32_cleanup();
 
-#ifdef __AMIGA__
-  amiga_cleanup();
-#endif
+  Curl_amiga_cleanup();
 
 #if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_EXIT)
   (void)libssh2_exit();
@@ -421,40 +453,55 @@ CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
   return ret;
 }
 
-#ifdef CURL_MULTIEASY
-/***************************************************************************
- * This function is still only for testing purposes. It makes a great way
- * to run the full test suite on the multi interface instead of the easy one.
- ***************************************************************************
- *
- * The *new* curl_easy_perform() is the external interface that performs a
- * transfer previously setup.
+/*
+ * curl_easy_perform() is the external interface that performs a blocking
+ * transfer as previously setup.
  *
- * Wrapper-function that: creates a multi handle, adds the easy handle to it,
+ * CONCEPT: This function creates a multi handle, adds the easy handle to it,
  * runs curl_multi_perform() until the transfer is done, then detaches the
  * easy handle, destroys the multi handle and returns the easy handle's return
- * code. This will make everything internally use and assume multi interface.
+ * code.
+ *
+ * REALITY: it can't just create and destroy the multi handle that easily. It
+ * needs to keep it around since if this easy handle is used again by this
+ * function, the same multi handle must be re-used so that the same pools and
+ * caches can be used.
  */
 CURLcode curl_easy_perform(CURL *easy)
 {
   CURLM *multi;
   CURLMcode mcode;
   CURLcode code = CURLE_OK;
-  int still_running;
-  struct timeval timeout;
-  int rc;
   CURLMsg *msg;
-  fd_set fdread;
-  fd_set fdwrite;
-  fd_set fdexcep;
-  int maxfd;
+  bool done = FALSE;
+  int rc;
+  struct SessionHandle *data = easy;
+  int without_fds = 0;  /* count number of consecutive returns from
+                           curl_multi_wait() without any filedescriptors */
+  struct timeval before;
+  SIGPIPE_VARIABLE(pipe_st);
 
   if(!easy)
     return CURLE_BAD_FUNCTION_ARGUMENT;
 
-  multi = curl_multi_init();
-  if(!multi)
-    return CURLE_OUT_OF_MEMORY;
+  if(data->multi) {
+    failf(data, "easy handled already used in multi handle");
+    return CURLE_FAILED_INIT;
+  }
+
+  if(data->multi_easy)
+    multi = data->multi_easy;
+  else {
+    /* this multi handle will only ever have a single easy handled attached
+       to it, so make it use minimal hashes */
+    multi = Curl_multi_handle(1, 3);
+    if(!multi)
+      return CURLE_OUT_OF_MEMORY;
+    data->multi_easy = multi;
+  }
+
+  /* Copy the MAXCONNECTS option to the multi handle */
+  curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects);
 
   mcode = curl_multi_add_handle(multi, easy);
   if(mcode) {
@@ -465,108 +512,67 @@ CURLcode curl_easy_perform(CURL *easy)
       return CURLE_FAILED_INIT;
   }
 
-  /* we start some action by calling perform right away */
-
-  do {
-    while(CURLM_CALL_MULTI_PERFORM ==
-          curl_multi_perform(multi, &still_running));
-
-    if(!still_running)
-      break;
-
-    FD_ZERO(&fdread);
-    FD_ZERO(&fdwrite);
-    FD_ZERO(&fdexcep);
-
-    /* timeout once per second */
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
-
-    /* Old deprecated style: get file descriptors from the transfers */
-    curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
-    rc = Curl_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-
-    /* The way is to extract the sockets and wait for them without using
-       select. This whole alternative version should probably rather use the
-       curl_multi_socket() approach. */
-
-    if(rc == -1)
-      /* select error */
-      break;
-
-    /* timeout or data to send/receive => loop! */
-  } while(still_running);
-
-  msg = curl_multi_info_read(multi, &rc);
-  if(msg)
-    code = msg->data.result;
-
-  mcode = curl_multi_remove_handle(multi, easy);
-  /* what to do if it fails? */
-
-  mcode = curl_multi_cleanup(multi);
-  /* what to do if it fails? */
-
-  return code;
-}
-#else
-/*
- * curl_easy_perform() is the external interface that performs a transfer
- * previously setup.
- */
-CURLcode curl_easy_perform(CURL *curl)
-{
-  struct SessionHandle *data = (struct SessionHandle *)curl;
+  sigpipe_ignore(data, &pipe_st);
 
-  if(!data)
-    return CURLE_BAD_FUNCTION_ARGUMENT;
+  /* assign this after curl_multi_add_handle() since that function checks for
+     it and rejects this handle otherwise */
+  data->multi = multi;
 
-  if( ! (data->share && data->share->hostcache) ) {
-    /* this handle is not using a shared dns cache */
+  while(!done && !mcode) {
+    int still_running;
+    int ret;
 
-    if(data->set.global_dns_cache &&
-       (data->dns.hostcachetype != HCACHE_GLOBAL)) {
-      /* global dns cache was requested but still isn't */
-      struct curl_hash *ptr;
+    before = curlx_tvnow();
+    mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
 
-      if(data->dns.hostcachetype == HCACHE_PRIVATE) {
-        /* if the current cache is private, kill it first */
-        Curl_hash_destroy(data->dns.hostcache);
-        data->dns.hostcachetype = HCACHE_NONE;
-        data->dns.hostcache = NULL;
+    if(mcode == CURLM_OK) {
+      if(ret == -1) {
+        /* poll() failed not on EINTR, indicate a network problem */
+        code = CURLE_RECV_ERROR;
+        break;
       }
-
-      ptr = Curl_global_host_cache_init();
-      if(ptr) {
-        /* only do this if the global cache init works */
-        data->dns.hostcache = ptr;
-        data->dns.hostcachetype = HCACHE_GLOBAL;
+      else if(ret == 0) {
+        struct timeval after = curlx_tvnow();
+        /* If it returns without any filedescriptor instantly, we need to
+           avoid busy-looping during periods where it has nothing particular
+           to wait for */
+        if(curlx_tvdiff(after, before) <= 10) {
+          without_fds++;
+          if(without_fds > 2) {
+            int sleep_ms = without_fds < 10 ? (1 << (without_fds-1)): 1000;
+            Curl_wait_ms(sleep_ms);
+          }
+        }
+        else
+          /* it wasn't "instant", restart counter */
+          without_fds = 0;
       }
-    }
+      else
+        /* got file descriptor, restart counter */
+        without_fds = 0;
 
-    if(!data->dns.hostcache) {
-      data->dns.hostcachetype = HCACHE_PRIVATE;
-      data->dns.hostcache = Curl_mk_dnscache();
-
-      if(!data->dns.hostcache)
-        /* While we possibly could survive and do good without a host cache,
-           the fact that creating it failed indicates that things are truly
-           screwed up and we should bail out! */
-        return CURLE_OUT_OF_MEMORY;
+      mcode = curl_multi_perform(multi, &still_running);
     }
 
+    /* only read 'still_running' if curl_multi_perform() return OK */
+    if((mcode == CURLM_OK) && !still_running) {
+      msg = curl_multi_info_read(multi, &rc);
+      if(msg) {
+        code = msg->data.result;
+        done = TRUE;
+      }
+    }
   }
 
-  if(!data->state.connc) {
-    /* oops, no connection cache, make one up */
-    data->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, -1L);
-    if(!data->state.connc)
-      return CURLE_OUT_OF_MEMORY;
-  }
+  /* ignoring the return code isn't nice, but atm we can't really handle
+     a failure here, room for future improvement! */
+  (void)curl_multi_remove_handle(multi, easy);
 
-  return Curl_perform(data);
+  sigpipe_restore(&pipe_st);
+
+  /* The multi handle is kept alive, owned by the easy handle */
+  return code;
 }
-#endif
 
 /*
  * curl_easy_cleanup() is the external interface to cleaning/freeing the given
@@ -575,11 +581,14 @@ CURLcode curl_easy_perform(CURL *curl)
 void curl_easy_cleanup(CURL *curl)
 {
   struct SessionHandle *data = (struct SessionHandle *)curl;
+  SIGPIPE_VARIABLE(pipe_st);
 
   if(!data)
     return;
 
+  sigpipe_ignore(data, &pipe_st);
   Curl_close(data);
+  sigpipe_restore(&pipe_st);
 }
 
 /*
@@ -589,10 +598,6 @@ void Curl_easy_addmulti(struct SessionHandle *data,
                         void *multi)
 {
   data->multi = multi;
-  if(multi == NULL)
-    /* the association is cleared, mark the easy handle as not used by an
-       interface */
-    data->state.used_interface = Curl_if_none;
 }
 
 void Curl_easy_initHandleData(struct SessionHandle *data)
@@ -611,12 +616,16 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
 {
   va_list arg;
   void *paramp;
+  CURLcode ret;
   struct SessionHandle *data = (struct SessionHandle *)curl;
 
   va_start(arg, info);
   paramp = va_arg(arg, void *);
 
-  return Curl_getinfo(data, info, paramp);
+  ret = Curl_getinfo(data, info, paramp);
+
+  va_end(arg);
+  return ret;
 }
 
 /*
@@ -647,14 +656,13 @@ CURL *curl_easy_duphandle(CURL *incurl)
     goto fail;
 
   /* the connection cache is setup on demand */
-  outcurl->state.connc = NULL;
+  outcurl->state.conn_cache = NULL;
 
-  outcurl->state.lastconnect = -1;
+  outcurl->state.lastconnect = NULL;
 
   outcurl->progress.flags    = data->progress.flags;
   outcurl->progress.callback = data->progress.callback;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
   if(data->cookies) {
     /* If cookies are enabled in the parent handle, we enable them
        in the clone as well! */
@@ -665,18 +673,14 @@ CURL *curl_easy_duphandle(CURL *incurl)
     if(!outcurl->cookies)
       goto fail;
   }
-#endif   /* CURL_DISABLE_HTTP */
 
   /* duplicate all values in 'change' */
-
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
   if(data->change.cookielist) {
     outcurl->change.cookielist =
       Curl_slist_duplicate(data->change.cookielist);
     if(!outcurl->change.cookielist)
       goto fail;
   }
-#endif   /* CURL_DISABLE_HTTP */
 
   if(data->change.url) {
     outcurl->change.url = strdup(data->change.url);
@@ -692,21 +696,12 @@ CURL *curl_easy_duphandle(CURL *incurl)
     outcurl->change.referer_alloc = TRUE;
   }
 
-#ifdef USE_ARES
-  /* If we use ares, we clone the ares channel for the new handle */
-  if(ARES_SUCCESS != ares_dup(&outcurl->state.areschannel,
-                              data->state.areschannel))
+  /* Clone the resolver handle, if present, for the new handle */
+  if(Curl_resolver_duphandle(&outcurl->state.resolver,
+                             data->state.resolver) != CURLE_OK)
     goto fail;
-#endif
 
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-  outcurl->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
-                                   CURL_ICONV_CODESET_OF_NETWORK);
-  outcurl->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
-                                    CURL_ICONV_CODESET_OF_HOST);
-  outcurl->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
-                                CURL_ICONV_CODESET_FOR_UTF8);
-#endif
+  Curl_convert_setup(outcurl);
 
   Curl_easy_initHandleData(outcurl);
 
@@ -719,19 +714,11 @@ CURL *curl_easy_duphandle(CURL *incurl)
   fail:
 
   if(outcurl) {
-    if(outcurl->state.connc &&
-       (outcurl->state.connc->type == CONNCACHE_PRIVATE))
-      Curl_rm_connc(outcurl->state.connc);
-    if(outcurl->state.headerbuff)
-      free(outcurl->state.headerbuff);
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-    if(outcurl->change.cookielist)
-      curl_slist_free_all(outcurl->change.cookielist);
-#endif
-    if(outcurl->change.url)
-      free(outcurl->change.url);
-    if(outcurl->change.referer)
-      free(outcurl->change.referer);
+    curl_slist_free_all(outcurl->change.cookielist);
+    outcurl->change.cookielist = NULL;
+    Curl_safefree(outcurl->state.headerbuff);
+    Curl_safefree(outcurl->change.url);
+    Curl_safefree(outcurl->change.referer);
     Curl_freeset(outcurl);
     free(outcurl);
   }
@@ -748,10 +735,10 @@ void curl_easy_reset(CURL *curl)
   struct SessionHandle *data = (struct SessionHandle *)curl;
 
   Curl_safefree(data->state.pathbuffer);
-  data->state.pathbuffer=NULL;
+
+  data->state.path = NULL;
 
   Curl_safefree(data->state.proto.generic);
-  data->state.proto.generic=NULL;
 
   /* zero out UserDefined data: */
   Curl_freeset(data);
@@ -795,8 +782,8 @@ CURLcode curl_easy_pause(CURL *curl, int action)
   k->keepon = newstate;
 
   if(!(newstate & KEEP_RECV_PAUSE) && data->state.tempwrite) {
-    /* we have a buffer for sending that we now seem to be able to deliver since
-       the receive pausing is lifted! */
+    /* we have a buffer for sending that we now seem to be able to deliver
+       since the receive pausing is lifted! */
 
     /* get the pointer, type and length in local copies since the function may
        return PAUSE again and then we'll get a new copy allocted and stored in
@@ -825,7 +812,7 @@ CURLcode curl_easy_pause(CURL *curl, int action)
     do {
       chunklen = (tempsize > CURL_MAX_WRITE_SIZE)?CURL_MAX_WRITE_SIZE:tempsize;
 
-      result = Curl_client_write(data->state.current_conn,
+      result = Curl_client_write(data->easy_conn,
                                  temptype, tempwrite, chunklen);
       if(result)
         /* failures abort the loop at once */
@@ -867,199 +854,16 @@ CURLcode curl_easy_pause(CURL *curl, int action)
     free(freewrite); /* this is unconditionally no longer used */
   }
 
-  return result;
-}
+  /* if there's no error and we're not pausing both directions, we want
+     to have this handle checked soon */
+  if(!result &&
+     ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
+      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
+    Curl_expire(data, 1); /* get this handle going again */
 
-#ifdef CURL_DOES_CONVERSIONS
-/*
- * Curl_convert_to_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_to_network(struct SessionHandle *data,
-                                 char *buffer, size_t length)
-{
-  CURLcode rc;
-
-  if(data->set.convtonetwork) {
-    /* use translation callback */
-    rc = data->set.convtonetwork(buffer, length);
-    if(rc != CURLE_OK) {
-      failf(data,
-            "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s",
-            (int)rc, curl_easy_strerror(rc));
-    }
-    return(rc);
-  }
-  else {
-#ifdef HAVE_ICONV
-    /* do the translation ourselves */
-    char *input_ptr, *output_ptr;
-    size_t in_bytes, out_bytes, rc;
-    int error;
-
-    /* open an iconv conversion descriptor if necessary */
-    if(data->outbound_cd == (iconv_t)-1) {
-      data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
-                                     CURL_ICONV_CODESET_OF_HOST);
-      if(data->outbound_cd == (iconv_t)-1) {
-        error = ERRNO;
-        failf(data,
-              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
-               CURL_ICONV_CODESET_OF_NETWORK,
-               CURL_ICONV_CODESET_OF_HOST,
-               error, strerror(error));
-        return CURLE_CONV_FAILED;
-      }
-    }
-    /* call iconv */
-    input_ptr = output_ptr = buffer;
-    in_bytes = out_bytes = length;
-    rc = iconv(data->outbound_cd, (const char**)&input_ptr, &in_bytes,
-               &output_ptr, &out_bytes);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
-      error = ERRNO;
-      failf(data,
-        "The Curl_convert_to_network iconv call failed with errno %i: %s",
-             error, strerror(error));
-      return CURLE_CONV_FAILED;
-    }
-#else
-    failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback required");
-    return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
-  }
-
-  return CURLE_OK;
-}
-
-/*
- * Curl_convert_from_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_from_network(struct SessionHandle *data,
-                                      char *buffer, size_t length)
-{
-  CURLcode rc;
-
-  if(data->set.convfromnetwork) {
-    /* use translation callback */
-    rc = data->set.convfromnetwork(buffer, length);
-    if(rc != CURLE_OK) {
-      failf(data,
-            "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s",
-            (int)rc, curl_easy_strerror(rc));
-    }
-    return(rc);
-  }
-  else {
-#ifdef HAVE_ICONV
-    /* do the translation ourselves */
-    char *input_ptr, *output_ptr;
-    size_t in_bytes, out_bytes, rc;
-    int error;
-
-    /* open an iconv conversion descriptor if necessary */
-    if(data->inbound_cd == (iconv_t)-1) {
-      data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
-                                    CURL_ICONV_CODESET_OF_NETWORK);
-      if(data->inbound_cd == (iconv_t)-1) {
-        error = ERRNO;
-        failf(data,
-              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
-              CURL_ICONV_CODESET_OF_HOST,
-              CURL_ICONV_CODESET_OF_NETWORK,
-              error, strerror(error));
-        return CURLE_CONV_FAILED;
-      }
-    }
-    /* call iconv */
-    input_ptr = output_ptr = buffer;
-    in_bytes = out_bytes = length;
-    rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes,
-               &output_ptr, &out_bytes);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
-      error = ERRNO;
-      failf(data,
-            "The Curl_convert_from_network iconv call failed with errno %i: %s",
-            error, strerror(error));
-      return CURLE_CONV_FAILED;
-    }
-#else
-    failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback required");
-    return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
-  }
-
-  return CURLE_OK;
-}
-
-/*
- * Curl_convert_from_utf8() is an internal function
- * for performing UTF-8 conversions on non-ASCII platforms.
- */
-CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
-                                     char *buffer, size_t length)
-{
-  CURLcode rc;
-
-  if(data->set.convfromutf8) {
-    /* use translation callback */
-    rc = data->set.convfromutf8(buffer, length);
-    if(rc != CURLE_OK) {
-      failf(data,
-            "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s",
-            (int)rc, curl_easy_strerror(rc));
-    }
-    return(rc);
-  }
-  else {
-#ifdef HAVE_ICONV
-    /* do the translation ourselves */
-    const char *input_ptr;
-    char *output_ptr;
-    size_t in_bytes, out_bytes, rc;
-    int error;
-
-    /* open an iconv conversion descriptor if necessary */
-    if(data->utf8_cd == (iconv_t)-1) {
-      data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
-                                 CURL_ICONV_CODESET_FOR_UTF8);
-      if(data->utf8_cd == (iconv_t)-1) {
-        error = ERRNO;
-        failf(data,
-              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
-              CURL_ICONV_CODESET_OF_HOST,
-              CURL_ICONV_CODESET_FOR_UTF8,
-              error, strerror(error));
-        return CURLE_CONV_FAILED;
-      }
-    }
-    /* call iconv */
-    input_ptr = output_ptr = buffer;
-    in_bytes = out_bytes = length;
-    rc = iconv(data->utf8_cd, &input_ptr, &in_bytes,
-               &output_ptr, &out_bytes);
-    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
-      error = ERRNO;
-      failf(data,
-            "The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
-            error, strerror(error));
-      return CURLE_CONV_FAILED;
-    }
-    if(output_ptr < input_ptr) {
-      /* null terminate the now shorter output string */
-      *output_ptr = 0x00;
-    }
-#else
-    failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback required");
-    return CURLE_CONV_REQD;
-#endif /* HAVE_ICONV */
-  }
-
-  return CURLE_OK;
+  return result;
 }
 
-#endif /* CURL_DOES_CONVERSIONS */
 
 static CURLcode easy_connection(struct SessionHandle *data,
                                 curl_socket_t *sfd,
index 8a0a51c..1f52168 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __EASYIF_H
-#define __EASYIF_H
+#ifndef HEADER_CURL_EASYIF_H
+#define HEADER_CURL_EASYIF_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -29,11 +29,5 @@ void Curl_easy_addmulti(struct SessionHandle *data, void *multi);
 
 void Curl_easy_initHandleData(struct SessionHandle *data);
 
-CURLcode Curl_convert_to_network(struct SessionHandle *data,
-                                 char *buffer, size_t length);
-CURLcode Curl_convert_from_network(struct SessionHandle *data,
-                                 char *buffer, size_t length);
-CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
-                                 char *buffer, size_t length);
+#endif /* HEADER_CURL_EASYIF_H */
 
-#endif /* __EASYIF_H */
index 735e1d8..aa7db2c 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
 /* Escape and unescape URL encoding in strings. The functions return a new
  * allocated string or NULL if an error occurred.  */
 
-#include "setup.h"
-#include <ctype.h>
+#include "curl_setup.h"
+
 #include <curl/curl.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "curl_memory.h"
-/* urldata.h and easyif.h are included for Curl_convert_... prototypes */
 #include "urldata.h"
-#include "easyif.h"
 #include "warnless.h"
+#include "non-ascii.h"
+#include "escape.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -88,13 +85,10 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
   char *testing_ptr = NULL;
   unsigned char in; /* we need to treat the characters unsigned */
   size_t newlen = alloc;
-  int strindex=0;
+  size_t strindex=0;
   size_t length;
+  CURLcode res;
 
-#ifndef CURL_DOES_CONVERSIONS
-  /* avoid compiler warnings */
-  (void)handle;
-#endif
   ns = malloc(alloc);
   if(!ns)
     return NULL;
@@ -103,10 +97,9 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
   while(length--) {
     in = *string;
 
-    if (Curl_isunreserved(in)) {
+    if(Curl_isunreserved(in))
       /* just copy this */
       ns[strindex++]=in;
-    }
     else {
       /* encode it */
       newlen += 2; /* the size grows with two, since this'll become a %XX */
@@ -122,15 +115,12 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
         }
       }
 
-#ifdef CURL_DOES_CONVERSIONS
-/* escape sequences are always in ASCII so convert them on non-ASCII hosts */
-      if(!handle ||
-          (Curl_convert_to_network(handle, &in, 1) != CURLE_OK)) {
+      res = Curl_convert_to_network(handle, &in, 1);
+      if(res) {
         /* Curl_convert_to_network calls failf if unsuccessful */
         free(ns);
         return NULL;
       }
-#endif /* CURL_DOES_CONVERSIONS */
 
       snprintf(&ns[strindex], 4, "%%%02X", in);
 
@@ -143,30 +133,34 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
 }
 
 /*
- * Unescapes the given URL escaped string of given length. Returns a
- * pointer to a malloced string with length given in *olen.
- * If length == 0, the length is assumed to be strlen(string).
- * If olen == NULL, no output length is stored.
+ * Curl_urldecode() URL decodes the given string.
+ *
+ * Optionally detects control characters (byte codes lower than 32) in the
+ * data and rejects such data.
+ *
+ * Returns a pointer to a malloced string in *ostring with length given in
+ * *olen. If length == 0, the length is assumed to be strlen(string).
+ *
  */
-char *curl_easy_unescape(CURL *handle, const char *string, int length,
-                         int *olen)
+CURLcode Curl_urldecode(struct SessionHandle *data,
+                        const char *string, size_t length,
+                        char **ostring, size_t *olen,
+                        bool reject_ctrl)
 {
-  int alloc = (length?length:(int)strlen(string))+1;
+  size_t alloc = (length?length:strlen(string))+1;
   char *ns = malloc(alloc);
   unsigned char in;
-  int strindex=0;
+  size_t strindex=0;
   unsigned long hex;
+  CURLcode res;
 
-#ifndef CURL_DOES_CONVERSIONS
-  /* avoid compiler warnings */
-  (void)handle;
-#endif
-  if( !ns )
-    return NULL;
+  if(!ns)
+    return CURLE_OUT_OF_MEMORY;
 
   while(--alloc > 0) {
     in = *string;
-    if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
+    if(('%' == in) && (alloc > 2) &&
+       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
       /* this is two hexadecimal digits following a '%' */
       char hexstr[3];
       char *ptr;
@@ -178,19 +172,20 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
 
       in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */
 
-#ifdef CURL_DOES_CONVERSIONS
-/* escape sequences are always in ASCII so convert them on non-ASCII hosts */
-      if(!handle ||
-          (Curl_convert_from_network(handle, &in, 1) != CURLE_OK)) {
+      res = Curl_convert_from_network(data, &in, 1);
+      if(res) {
         /* Curl_convert_from_network calls failf if unsuccessful */
         free(ns);
-        return NULL;
+        return res;
       }
-#endif /* CURL_DOES_CONVERSIONS */
 
       string+=2;
       alloc-=2;
     }
+    if(reject_ctrl && (in < 0x20)) {
+      free(ns);
+      return CURLE_URL_MALFORMAT;
+    }
 
     ns[strindex++] = in;
     string++;
@@ -200,7 +195,33 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
   if(olen)
     /* store output size */
     *olen = strindex;
-  return ns;
+
+  if(ostring)
+    /* store output string */
+    *ostring = ns;
+
+  return CURLE_OK;
+}
+
+/*
+ * Unescapes the given URL escaped string of given length. Returns a
+ * pointer to a malloced string with length given in *olen.
+ * If length == 0, the length is assumed to be strlen(string).
+ * If olen == NULL, no output length is stored.
+ */
+char *curl_easy_unescape(CURL *handle, const char *string, int length,
+                         int *olen)
+{
+  char *str = NULL;
+  size_t inputlen = length;
+  size_t outputlen;
+  CURLcode res = Curl_urldecode(handle, string, inputlen, &str, &outputlen,
+                                FALSE);
+  if(res)
+    return NULL;
+  if(olen)
+    *olen = curlx_uztosi(outputlen);
+  return str;
 }
 
 /* For operating systems/environments that use different malloc/free
index 04b06a9..731b136 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __ESCAPE_H
-#define __ESCAPE_H
-
+#ifndef HEADER_CURL_ESCAPE_H
+#define HEADER_CURL_ESCAPE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -8,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
 /* Escape and unescape URL encoding in strings. The functions return a new
  * allocated string or NULL if an error occurred.  */
 
+CURLcode Curl_urldecode(struct SessionHandle *data,
+                        const char *string, size_t length,
+                        char **ostring, size_t *olen,
+                        bool reject_crlf);
+
+#endif /* HEADER_CURL_ESCAPE_H */
 
-#endif
index 8e4ee07..038bf42 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FILE
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#include <fcntl.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -68,8 +48,6 @@
 #include <fcntl.h>
 #endif
 
-#endif /* WIN32 */
-
 #include "strtoofft.h"
 #include "urldata.h"
 #include <curl/curl.h>
@@ -83,6 +61,7 @@
 #include "url.h"
 #include "curl_memory.h"
 #include "parsedate.h" /* for the week day and month names */
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -90,7 +69,8 @@
 /* The last #include file should be: */
 #include "memdebug.h"
 
-#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || defined(__SYMBIAN32__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || \
+  defined(__SYMBIAN32__)
 #define DOS_FILESYSTEM 1
 #endif
 
@@ -108,6 +88,9 @@ static CURLcode file_do(struct connectdata *, bool *done);
 static CURLcode file_done(struct connectdata *conn,
                           CURLcode status, bool premature);
 static CURLcode file_connect(struct connectdata *conn, bool *done);
+static CURLcode file_disconnect(struct connectdata *conn,
+                                bool dead_connection);
+
 
 /*
  * FILE scheme handler.
@@ -124,10 +107,13 @@ const struct Curl_handler Curl_handler_file = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
-  ZERO_NULL,                            /* disconnect */
+  file_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   0,                                    /* defport */
-  PROT_FILE                             /* protocol */
+  CURLPROTO_FILE,                       /* protocol */
+  PROTOPT_NONETWORK | PROTOPT_NOURLQUERY /* flags */
 };
 
 
@@ -192,7 +178,7 @@ static CURLcode file_range(struct connectdata *conn)
 static CURLcode file_connect(struct connectdata *conn, bool *done)
 {
   struct SessionHandle *data = conn->data;
-  char *real_path = curl_easy_unescape(data, data->state.path, 0, NULL);
+  char *real_path;
   struct FILEPROTO *file;
   int fd;
 #ifdef DOS_FILESYSTEM
@@ -200,13 +186,14 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
   char *actual_path;
 #endif
 
-  if(!real_path)
-    return CURLE_OUT_OF_MEMORY;
-
   /* If there already is a protocol-specific struct allocated for this
      sessionhandle, deal with it */
   Curl_reset_reqproto(conn);
 
+  real_path = curl_easy_unescape(data, data->state.path, 0, NULL);
+  if(!real_path)
+    return CURLE_OUT_OF_MEMORY;
+
   if(!data->state.proto.file) {
     file = calloc(1, sizeof(struct FILEPROTO));
     if(!file) {
@@ -219,10 +206,9 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
     /* file is not a protocol that can deal with "persistancy" */
     file = data->state.proto.file;
     Curl_safefree(file->freepath);
+    file->path = NULL;
     if(file->fd != -1)
       close(file->fd);
-    file->path = NULL;
-    file->freepath = NULL;
     file->fd = -1;
   }
 
@@ -244,18 +230,17 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
   actual_path = real_path;
   if((actual_path[0] == '/') &&
       actual_path[1] &&
-      (actual_path[2] == ':' || actual_path[2] == '|'))
-  {
+     (actual_path[2] == ':' || actual_path[2] == '|')) {
     actual_path[2] = ':';
     actual_path++;
   }
 
   /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */
-  for (i=0; actual_path[i] != '\0'; ++i)
+  for(i=0; actual_path[i] != '\0'; ++i)
     if(actual_path[i] == '/')
       actual_path[i] = '\\';
 
-  fd = open_readonly(actual_path, O_RDONLY|O_BINARY); /* no CR/LF translation */
+  fd = open_readonly(actual_path, O_RDONLY|O_BINARY);
   file->path = actual_path;
 #else
   fd = open_readonly(real_path, O_RDONLY);
@@ -280,10 +265,31 @@ static CURLcode file_done(struct connectdata *conn,
   struct FILEPROTO *file = conn->data->state.proto.file;
   (void)status; /* not used */
   (void)premature; /* not used */
-  Curl_safefree(file->freepath);
 
-  if(file->fd != -1)
-    close(file->fd);
+  if(file) {
+    Curl_safefree(file->freepath);
+    file->path = NULL;
+    if(file->fd != -1)
+      close(file->fd);
+    file->fd = -1;
+  }
+
+  return CURLE_OK;
+}
+
+static CURLcode file_disconnect(struct connectdata *conn,
+                                bool dead_connection)
+{
+  struct FILEPROTO *file = conn->data->state.proto.file;
+  (void)dead_connection; /* not used */
+
+  if(file) {
+    Curl_safefree(file->freepath);
+    file->path = NULL;
+    if(file->fd != -1)
+      close(file->fd);
+    file->fd = -1;
+  }
 
   return CURLE_OK;
 }
@@ -298,7 +304,8 @@ static CURLcode file_upload(struct connectdata *conn)
 {
   struct FILEPROTO *file = conn->data->state.proto.file;
   const char *dir = strchr(file->path, DIRSEP);
-  FILE *fp;
+  int fd;
+  int mode;
   CURLcode res=CURLE_OK;
   struct SessionHandle *data = conn->data;
   char *buf = data->state.buffer;
@@ -321,29 +328,21 @@ static CURLcode file_upload(struct connectdata *conn)
     return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
 
   if(!dir[1])
-     return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
-
-  if(data->state.resume_from)
-    fp = fopen( file->path, "ab" );
-  else {
-    int fd;
+    return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */
 
-#ifdef DOS_FILESYSTEM
-    fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,
-              conn->data->set.new_file_perms);
+#ifdef O_BINARY
+#define MODE_DEFAULT O_WRONLY|O_CREAT|O_BINARY
 #else
-    fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC,
-              conn->data->set.new_file_perms);
+#define MODE_DEFAULT O_WRONLY|O_CREAT
 #endif
-    if(fd < 0) {
-      failf(data, "Can't open %s for writing", file->path);
-      return CURLE_WRITE_ERROR;
-    }
-    close(fd);
-    fp = fopen(file->path, "wb");
-  }
 
-  if(!fp) {
+  if(data->state.resume_from)
+    mode = MODE_DEFAULT|O_APPEND;
+  else
+    mode = MODE_DEFAULT|O_TRUNC;
+
+  fd = open(file->path, mode, conn->data->set.new_file_perms);
+  if(fd < 0) {
     failf(data, "Can't open %s for writing", file->path);
     return CURLE_WRITE_ERROR;
   }
@@ -354,8 +353,8 @@ static CURLcode file_upload(struct connectdata *conn)
 
   /* treat the negative resume offset value as the case of "-" */
   if(data->state.resume_from < 0) {
-    if(fstat(fileno(fp), &file_stat)) {
-      fclose(fp);
+    if(fstat(fd, &file_stat)) {
+      close(fd);
       failf(data, "Can't get the size of %s", file->path);
       return CURLE_WRITE_ERROR;
     }
@@ -376,7 +375,7 @@ static CURLcode file_upload(struct connectdata *conn)
 
     /*skip bytes before resume point*/
     if(data->state.resume_from) {
-      if( (curl_off_t)nread <= data->state.resume_from ) {
+      if((curl_off_t)nread <= data->state.resume_from ) {
         data->state.resume_from -= nread;
         nread = 0;
         buf2 = buf;
@@ -391,7 +390,7 @@ static CURLcode file_upload(struct connectdata *conn)
       buf2 = buf;
 
     /* write the data to the target */
-    nwrite = fwrite(buf2, 1, nread, fp);
+    nwrite = write(fd, buf2, nread);
     if(nwrite != nread) {
       res = CURLE_SEND_ERROR;
       break;
@@ -409,7 +408,7 @@ static CURLcode file_upload(struct connectdata *conn)
   if(!res && Curl_pgrsUpdate(conn))
     res = CURLE_ABORTED_BY_CALLBACK;
 
-  fclose(fp);
+  close(fd);
 
   return res;
 }
@@ -436,7 +435,6 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
   curl_off_t expected_size=0;
   bool fstated=FALSE;
   ssize_t nread;
-  size_t bytestoread;
   struct SessionHandle *data = conn->data;
   char *buf = data->state.buffer;
   curl_off_t bytecount = 0;
@@ -455,7 +453,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
   fd = conn->data->state.proto.file->fd;
 
   /* VMS: This only works reliable for STREAMLF files */
-  if( -1 != fstat(fd, &statbuf)) {
+  if(-1 != fstat(fd, &statbuf)) {
     /* we could stat it, then read out the size */
     expected_size = statbuf.st_size;
     /* and store the modification time */
@@ -463,6 +461,13 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
     fstated = TRUE;
   }
 
+  if(fstated && !data->state.range && data->set.timecondition) {
+    if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) {
+      *done = TRUE;
+      return CURLE_OK;
+    }
+  }
+
   /* If we have selected NOBODY and HEADER, it means that we only want file
      information. Which for FILE can't be much more than the file size and
      date. */
@@ -480,14 +485,13 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
       return result;
 
     if(fstated) {
-      const struct tm *tm;
       time_t filetime = (time_t)statbuf.st_mtime;
-#ifdef HAVE_GMTIME_R
       struct tm buffer;
-      tm = (const struct tm *)gmtime_r(&filetime, &buffer);
-#else
-      tm = gmtime(&filetime);
-#endif
+      const struct tm *tm = &buffer;
+      result = Curl_gmtime(filetime, &buffer);
+      if(result)
+        return result;
+
       /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
       snprintf(buf, BUFSIZE-1,
                "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
@@ -529,7 +533,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
   }
 
   /* A high water mark has been specified so we obey... */
-  if (data->req.maxdownload > 0)
+  if(data->req.maxdownload > 0)
     expected_size = data->req.maxdownload;
 
   if(fstated && (expected_size == 0))
@@ -552,13 +556,16 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
 
   while(res == CURLE_OK) {
     /* Don't fill a whole buffer if we want less than all data */
-    bytestoread = (expected_size < BUFSIZE-1)?(size_t)expected_size:BUFSIZE-1;
+    size_t bytestoread =
+      (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ?
+      curlx_sotouz(expected_size) : BUFSIZE - 1;
+
     nread = read(fd, buf, bytestoread);
 
-    if( nread > 0)
+    if(nread > 0)
       buf[nread] = 0;
 
-    if (nread <= 0 || expected_size == 0)
+    if(nread <= 0 || expected_size == 0)
       break;
 
     bytecount += nread;
index 5e3bd75..997474b 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __FILE_H
-#define __FILE_H
-
+#ifndef HEADER_CURL_FILE_H
+#define HEADER_CURL_FILE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -37,4 +36,6 @@ struct FILEPROTO {
 #ifndef CURL_DISABLE_FILE
 extern const struct Curl_handler Curl_handler_file;
 #endif
-#endif
+
+#endif /* HEADER_CURL_FILE_H */
+
index f5dbfce..8c8ee98 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010-2011, 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
@@ -20,9 +20,8 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <stdlib.h>
 #include "strdup.h"
 #include "fileinfo.h"
 
@@ -49,27 +48,7 @@ void Curl_fileinfo_dtor(void *user, void *element)
   if(!finfo)
     return;
 
-  if(finfo->b_data){
-    free(finfo->b_data);
-  }
+  Curl_safefree(finfo->b_data);
 
   free(finfo);
 }
-
-struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src)
-{
-  struct curl_fileinfo *ptr = malloc(sizeof(struct curl_fileinfo));
-  if(!ptr)
-    return NULL;
-  *ptr = *src;
-
-  ptr->b_data = malloc(src->b_size);
-  if(!ptr->b_data) {
-    free(ptr);
-    return NULL;
-  }
-  else {
-    memcpy(ptr->b_data, src->b_data, src->b_size);
-    return ptr;
-  }
-}
index 5ec3e38..f718a3e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-/*
-  Debug the form generator stand-alone by compiling this source file with:
-
-  gcc -DHAVE_CONFIG_H -I../ -g -D_FORM_DEBUG -DCURLDEBUG -o formdata \
-    -I../include formdata.c strequal.c memdebug.c mprintf.c strerror.c
-
-  (depending on circumstances you may need further externals added)
-
-  run the 'formdata' executable the output should end with:
-  All Tests seem to have worked ...
-  and the following parts should be there:
-
-Content-Disposition: form-data; name="simple_COPYCONTENTS"
-value for simple COPYCONTENTS
-
-Content-Disposition: form-data; name="COPYCONTENTS_+_CONTENTTYPE"
-Content-Type: image/gif
-value for COPYCONTENTS + CONTENTTYPE
-
-Content-Disposition: form-data; name="PRNAME_+_NAMELENGTH_+_COPYNAME_+_CONTENTSLENGTH"
-vlue for PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH
-(or you might see P^@RNAME and v^@lue at the start)
-
-Content-Disposition: form-data; name="simple_PTRCONTENTS"
-value for simple PTRCONTENTS
-
-Content-Disposition: form-data; name="PTRCONTENTS_+_CONTENTSLENGTH"
-vlue for PTRCONTENTS + CONTENTSLENGTH
-(or you might see v^@lue at the start)
-
-Content-Disposition: form-data; name="PTRCONTENTS_+_CONTENTSLENGTH_+_CONTENTTYPE"
-Content-Type: application/octet-stream
-vlue for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE
-(or you might see v^@lue at the start)
-
-Content-Disposition: form-data; name="FILE1_+_CONTENTTYPE"; filename="formdata.h"
-Content-Type: text/html
-...
-
-Content-Disposition: form-data; name="FILE1_+_FILE2"
-Content-Type: multipart/mixed, boundary=curlz1s0dkticx49MV1KGcYP5cvfSsz
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-
-Content-Disposition: form-data; name="FILE1_+_FILE2_+_FILE3"
-Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-
-
-Content-Disposition: form-data; name="ARRAY: FILE1_+_FILE2_+_FILE3"
-Content-Type: multipart/mixed, boundary=curlirkYPmPwu6FrJ1vJ1u1BmtIufh1
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="Makefile.b32"
-Content-Type: application/octet-stream
-...
-Content-Disposition: attachment; filename="formdata.h"
-Content-Type: application/octet-stream
-...
-
-Content-Disposition: form-data; name="FILECONTENT"
-...
-
- */
+#include "curl_setup.h"
 
-#include "setup.h"
 #include <curl/curl.h>
 
-/* Length of the random boundary string. */
-#define BOUNDARY_LENGTH 40
-
 #if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <time.h>
 #if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
 #include <libgen.h>
 #endif
+
 #include "urldata.h" /* for struct SessionHandle */
-#include "easyif.h" /* for Curl_convert_... prototypes */
 #include "formdata.h"
-#include "curl_rand.h"
+#include "sslgen.h"
 #include "strequal.h"
 #include "curl_memory.h"
 #include "sendf.h"
@@ -141,6 +53,7 @@ static char *Curl_basename(char *path);
 #endif
 
 static size_t readfromfile(struct Form *form, char *buffer, size_t size);
+static char *formboundary(struct SessionHandle *data);
 
 /* What kind of Content-Type to use on un-specified files with unrecognized
    extensions. */
@@ -241,8 +154,6 @@ static FormInfo * AddFormInfo(char *value,
     /* then move the original 'more' to point to ourselves */
     parent_form_info->more = form_info;
   }
-  else
-    return NULL;
 
   return form_info;
 }
@@ -257,8 +168,8 @@ static FormInfo * AddFormInfo(char *value,
  * Returns some valid contenttype for filename.
  *
  ***************************************************************************/
-static const char * ContentTypeForFilename (const char *filename,
-                                            const char *prevtype)
+static const char *ContentTypeForFilename(const char *filename,
+                                          const char *prevtype)
 {
   const char *contenttype = NULL;
   unsigned int i;
@@ -267,7 +178,7 @@ static const char * ContentTypeForFilename (const char *filename,
    * extensions and pick the first we match!
    */
   struct ContentType {
-    char extension[6];
+    const char *extension;
     const char *type;
   };
   static const struct ContentType ctts[]={
@@ -383,7 +294,7 @@ static char *memdup(const char *src, size_t buffer_length)
  * CURL_FORMADD_NULL           if a null pointer was given for a char
  * CURL_FORMADD_MEMORY         if the allocation of a FormInfo struct failed
  * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
- * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or an error)
+ * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or error)
  * CURL_FORMADD_MEMORY         if a HttpPost struct cannot be allocated
  * CURL_FORMADD_MEMORY         if some allocation for string copying failed.
  * CURL_FORMADD_ILLEGAL_ARRAY  if an illegal option is used in an array
@@ -423,7 +334,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
   while(return_value == CURL_FORMADD_OK) {
 
     /* first see if we have more parts of the array param */
-    if( array_state && forms ) {
+    if(array_state && forms) {
       /* get the upcoming option from the given array */
       option = forms->option;
       array_value = (char *)forms->value;
@@ -461,8 +372,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
        */
     case CURLFORM_PTRNAME:
 #ifdef CURL_DOES_CONVERSIONS
-      /* treat CURLFORM_PTR like CURLFORM_COPYNAME so we'll
-         have safe memory for the eventual conversion */
+      /* Treat CURLFORM_PTR like CURLFORM_COPYNAME so that libcurl will copy
+       * the data in all cases so that we'll have safe memory for the eventual
+       * conversion.
+       */
 #else
       current_form->flags |= HTTPPOST_PTRNAME; /* fall through */
 #endif
@@ -513,7 +426,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
 
       /* Get contents from a given file name */
     case CURLFORM_FILECONTENT:
-      if(current_form->flags != 0)
+      if(current_form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_READFILE))
         return_value = CURL_FORMADD_OPTION_TWICE;
       else {
         const char *filename = array_state?
@@ -541,9 +454,21 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
         if(current_form->value) {
           if(current_form->flags & HTTPPOST_FILENAME) {
             if(filename) {
-              if((current_form = AddFormInfo(strdup(filename),
-                                              NULL, current_form)) == NULL)
+              char *fname = strdup(filename);
+              if(!fname)
                 return_value = CURL_FORMADD_MEMORY;
+              else {
+                form = AddFormInfo(fname, NULL, current_form);
+                if(!form) {
+                  Curl_safefree(fname);
+                  return_value = CURL_FORMADD_MEMORY;
+                }
+                else {
+                  form->value_alloc = TRUE;
+                  current_form = form;
+                  form = NULL;
+                }
+              }
             }
             else
               return_value = CURL_FORMADD_NULL;
@@ -567,46 +492,18 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
         break;
       }
 
-    case CURLFORM_BUFFER:
-      {
-        const char *filename = array_state?array_value:
-          va_arg(params, char *);
-
-        if(current_form->value) {
-          if(current_form->flags & HTTPPOST_BUFFER) {
-            if(filename) {
-              if((current_form = AddFormInfo(strdup(filename),
-                                              NULL, current_form)) == NULL)
-                return_value = CURL_FORMADD_MEMORY;
-            }
-            else
-              return_value = CURL_FORMADD_NULL;
-          }
-          else
-            return_value = CURL_FORMADD_OPTION_TWICE;
-        }
-        else {
-          if(filename) {
-            current_form->value = strdup(filename);
-            if(!current_form->value)
-              return_value = CURL_FORMADD_MEMORY;
-          }
-          else
-            return_value = CURL_FORMADD_NULL;
-          current_form->flags |= HTTPPOST_BUFFER;
-        }
-        break;
-      }
-
     case CURLFORM_BUFFERPTR:
-      current_form->flags |= HTTPPOST_PTRBUFFER;
+      current_form->flags |= HTTPPOST_PTRBUFFER|HTTPPOST_BUFFER;
       if(current_form->buffer)
         return_value = CURL_FORMADD_OPTION_TWICE;
       else {
         char *buffer =
           array_state?array_value:va_arg(params, char *);
-        if(buffer)
+        if(buffer) {
           current_form->buffer = buffer; /* store for the moment */
+          current_form->value = buffer; /* make it non-NULL to be accepted
+                                           as fine */
+        }
         else
           return_value = CURL_FORMADD_NULL;
       }
@@ -646,10 +543,21 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
         if(current_form->contenttype) {
           if(current_form->flags & HTTPPOST_FILENAME) {
             if(contenttype) {
-              if((current_form = AddFormInfo(NULL,
-                                              strdup(contenttype),
-                                              current_form)) == NULL)
+              char *type = strdup(contenttype);
+              if(!type)
                 return_value = CURL_FORMADD_MEMORY;
+              else {
+                form = AddFormInfo(NULL, type, current_form);
+                if(!form) {
+                  Curl_safefree(type);
+                  return_value = CURL_FORMADD_MEMORY;
+                }
+                else {
+                  form->contenttype_alloc = TRUE;
+                  current_form = form;
+                  form = NULL;
+                }
+              }
             }
             else
               return_value = CURL_FORMADD_NULL;
@@ -678,7 +586,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           (struct curl_slist*)array_value:
           va_arg(params, struct curl_slist*);
 
-        if( current_form->contentheader )
+        if(current_form->contentheader)
           return_value = CURL_FORMADD_OPTION_TWICE;
         else
           current_form->contentheader = list;
@@ -686,10 +594,11 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
         break;
       }
     case CURLFORM_FILENAME:
+    case CURLFORM_BUFFER:
       {
         const char *filename = array_state?array_value:
           va_arg(params, char *);
-        if( current_form->showfilename )
+        if(current_form->showfilename)
           return_value = CURL_FORMADD_OPTION_TWICE;
         else {
           current_form->showfilename = strdup(filename);
@@ -702,6 +611,31 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
       }
     default:
       return_value = CURL_FORMADD_UNKNOWN_OPTION;
+      break;
+    }
+  }
+
+  if(CURL_FORMADD_OK != return_value) {
+    /* On error, free allocated fields for all nodes of the FormInfo linked
+       list without deallocating nodes. List nodes are deallocated later on */
+    FormInfo *ptr;
+    for(ptr = first_form; ptr != NULL; ptr = ptr->more) {
+      if(ptr->name_alloc) {
+        Curl_safefree(ptr->name);
+        ptr->name_alloc = FALSE;
+      }
+      if(ptr->value_alloc) {
+        Curl_safefree(ptr->value);
+        ptr->value_alloc = FALSE;
+      }
+      if(ptr->contenttype_alloc) {
+        Curl_safefree(ptr->contenttype);
+        ptr->contenttype_alloc = FALSE;
+      }
+      if(ptr->showfilename_alloc) {
+        Curl_safefree(ptr->showfilename);
+        ptr->showfilename_alloc = FALSE;
+      }
     }
   }
 
@@ -713,37 +647,39 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
     for(form = first_form;
         form != NULL;
         form = form->more) {
-      if( ((!form->name || !form->value) && !post) ||
-          ( (form->contentslength) &&
-            (form->flags & HTTPPOST_FILENAME) ) ||
-          ( (form->flags & HTTPPOST_FILENAME) &&
-            (form->flags & HTTPPOST_PTRCONTENTS) ) ||
-
-          ( (!form->buffer) &&
-            (form->flags & HTTPPOST_BUFFER) &&
-            (form->flags & HTTPPOST_PTRBUFFER) ) ||
-
-          ( (form->flags & HTTPPOST_READFILE) &&
-            (form->flags & HTTPPOST_PTRCONTENTS) )
+      if(((!form->name || !form->value) && !post) ||
+         ( (form->contentslength) &&
+           (form->flags & HTTPPOST_FILENAME) ) ||
+         ( (form->flags & HTTPPOST_FILENAME) &&
+           (form->flags & HTTPPOST_PTRCONTENTS) ) ||
+
+         ( (!form->buffer) &&
+           (form->flags & HTTPPOST_BUFFER) &&
+           (form->flags & HTTPPOST_PTRBUFFER) ) ||
+
+         ( (form->flags & HTTPPOST_READFILE) &&
+           (form->flags & HTTPPOST_PTRCONTENTS) )
         ) {
         return_value = CURL_FORMADD_INCOMPLETE;
         break;
       }
       else {
-        if( ((form->flags & HTTPPOST_FILENAME) ||
-              (form->flags & HTTPPOST_BUFFER)) &&
-             !form->contenttype ) {
+        if(((form->flags & HTTPPOST_FILENAME) ||
+            (form->flags & HTTPPOST_BUFFER)) &&
+           !form->contenttype ) {
+          char *f = form->flags & HTTPPOST_BUFFER?
+            form->showfilename : form->value;
+
           /* our contenttype is missing */
-          form->contenttype
-            = strdup(ContentTypeForFilename(form->value, prevtype));
+          form->contenttype = strdup(ContentTypeForFilename(f, prevtype));
           if(!form->contenttype) {
             return_value = CURL_FORMADD_MEMORY;
             break;
           }
           form->contenttype_alloc = TRUE;
         }
-        if( !(form->flags & HTTPPOST_PTRNAME) &&
-             (form == first_form) ) {
+        if(!(form->flags & HTTPPOST_PTRNAME) &&
+           (form == first_form) ) {
           /* Note that there's small risk that form->name is NULL here if the
              app passed in a bad combo, so we better check for that first. */
           if(form->name)
@@ -755,9 +691,9 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           }
           form->name_alloc = TRUE;
         }
-        if( !(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
-                             HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
-                             HTTPPOST_CALLBACK)) ) {
+        if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
+                            HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
+                            HTTPPOST_CALLBACK)) ) {
           /* copy value (without strdup; possibly contains null characters) */
           form->value = memdup(form->value, form->contentslength);
           if(!form->value) {
@@ -784,32 +720,39 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           prevtype = form->contenttype;
       }
     }
-  }
-
-  if(return_value) {
-    /* we return on error, free possibly allocated fields */
-    if(!form)
-      form = current_form;
-    if(form) {
-      if(form->name_alloc)
-        free(form->name);
-      if(form->value_alloc)
-        free(form->value);
-      if(form->contenttype_alloc)
-        free(form->contenttype);
-      if(form->showfilename_alloc)
-        free(form->showfilename);
+    if(CURL_FORMADD_OK != return_value) {
+      /* On error, free allocated fields for nodes of the FormInfo linked
+         list which are not already owned by the httppost linked list
+         without deallocating nodes. List nodes are deallocated later on */
+      FormInfo *ptr;
+      for(ptr = form; ptr != NULL; ptr = ptr->more) {
+        if(ptr->name_alloc) {
+          Curl_safefree(ptr->name);
+          ptr->name_alloc = FALSE;
+        }
+        if(ptr->value_alloc) {
+          Curl_safefree(ptr->value);
+          ptr->value_alloc = FALSE;
+        }
+        if(ptr->contenttype_alloc) {
+          Curl_safefree(ptr->contenttype);
+          ptr->contenttype_alloc = FALSE;
+        }
+        if(ptr->showfilename_alloc) {
+          Curl_safefree(ptr->showfilename);
+          ptr->showfilename_alloc = FALSE;
+        }
+      }
     }
   }
 
-  /* always delete the allocated memory before returning */
-  form = first_form;
-  while(form != NULL) {
-    FormInfo *delete_form;
-
-    delete_form = form;
-    form = form->more;
-    free (delete_form);
+  /* Always deallocate FormInfo linked list nodes without touching node
+     fields given that these have either been deallocated or are owned
+     now by the httppost linked list */
+  while(first_form) {
+    FormInfo *ptr = first_form->more;
+    Curl_safefree(first_form);
+    first_form = ptr;
   }
 
   return return_value;
@@ -817,6 +760,8 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
 
 /*
  * curl_formadd() is a public API to add a section to the multipart formpost.
+ *
+ * @unittest: 1308
  */
 
 CURLFORMcode curl_formadd(struct curl_httppost **httppost,
@@ -831,6 +776,70 @@ CURLFORMcode curl_formadd(struct curl_httppost **httppost,
   return result;
 }
 
+#ifdef __VMS
+#include <fabdef.h>
+/*
+ * get_vms_file_size does what it takes to get the real size of the file
+ *
+ * For fixed files, find out the size of the EOF block and adjust.
+ *
+ * For all others, have to read the entire file in, discarding the contents.
+ * Most posted text files will be small, and binary files like zlib archives
+ * and CD/DVD images should be either a STREAM_LF format or a fixed format.
+ *
+ */
+curl_off_t VmsRealFileSize(const char * name,
+                           const struct_stat * stat_buf)
+{
+  char buffer[8192];
+  curl_off_t count;
+  int ret_stat;
+  FILE * file;
+
+  file = fopen(name, "r");
+  if(file == NULL)
+    return 0;
+
+  count = 0;
+  ret_stat = 1;
+  while(ret_stat > 0) {
+    ret_stat = fread(buffer, 1, sizeof(buffer), file);
+    if(ret_stat != 0)
+      count += ret_stat;
+  }
+  fclose(file);
+
+  return count;
+}
+
+/*
+ *
+ *  VmsSpecialSize checks to see if the stat st_size can be trusted and
+ *  if not to call a routine to get the correct size.
+ *
+ */
+static curl_off_t VmsSpecialSize(const char * name,
+                                 const struct_stat * stat_buf)
+{
+  switch(stat_buf->st_fab_rfm) {
+  case FAB$C_VAR:
+  case FAB$C_VFC:
+    return VmsRealFileSize(name, stat_buf);
+    break;
+  default:
+    return stat_buf->st_size;
+  }
+}
+
+#endif
+
+#ifndef __VMS
+#define filesize(name, stat_data) (stat_data.st_size)
+#else
+    /* Getting the expected file size needs help on VMS */
+#define filesize(name, stat_data) VmsSpecialSize(name, &stat_data)
+#endif
+
 /*
  * AddFormData() adds a chunk of data to the FormData linked list.
  *
@@ -885,9 +894,10 @@ static CURLcode AddFormData(struct FormData **formp,
          file */
       if(!strequal("-", newform->line)) {
         struct_stat file;
-        if(!stat(newform->line, &file)) {
-          *size += file.st_size;
-        }
+        if(!stat(newform->line, &file) && !S_ISDIR(file.st_mode))
+          *size += filesize(newform->line, file);
+        else
+          return CURLE_BAD_FUNCTION_ARGUMENT;
       }
     }
   }
@@ -934,40 +944,12 @@ void Curl_formclean(struct FormData **form_ptr)
   *form_ptr = NULL;
 }
 
-#ifdef CURL_DOES_CONVERSIONS
-/*
- * Curl_formcovert() is used from http.c, this converts any
-   form items that need to be sent in the network encoding.
-   Returns CURLE_OK on success.
- */
-CURLcode Curl_formconvert(struct SessionHandle *data, struct FormData *form)
-{
-  struct FormData *next;
-  CURLcode rc;
-
-  if(!form)
-    return CURLE_OK;
-
-  if(!data)
-    return CURLE_BAD_FUNCTION_ARGUMENT;
-
-  do {
-    next=form->next;  /* the following form line */
-    if(form->type == FORM_DATA) {
-      rc = Curl_convert_to_network(data, form->line, form->length);
-      /* Curl_convert_to_network calls failf if unsuccessful */
-      if(rc != CURLE_OK)
-        return rc;
-    }
-  } while((form = next) != NULL); /* continue */
-  return CURLE_OK;
-}
-#endif /* CURL_DOES_CONVERSIONS */
-
 /*
  * curl_formget()
  * Serialize a curl_httppost struct.
  * Returns 0 on success.
+ *
+ * @unittest: 1308
  */
 int curl_formget(struct curl_httppost *form, void *arg,
                  curl_formget_callback append)
@@ -980,8 +962,8 @@ int curl_formget(struct curl_httppost *form, void *arg,
   if(rc != CURLE_OK)
     return (int)rc;
 
-  for (ptr = data; ptr; ptr = ptr->next) {
-    if(ptr->type == FORM_FILE) {
+  for(ptr = data; ptr; ptr = ptr->next) {
+    if((ptr->type == FORM_FILE) || (ptr->type == FORM_CALLBACK)) {
       char buffer[8192];
       size_t nread;
       struct Form temp;
@@ -990,14 +972,15 @@ int curl_formget(struct curl_httppost *form, void *arg,
 
       do {
         nread = readfromfile(&temp, buffer, sizeof(buffer));
-        if((nread == (size_t) -1) || (nread != append(arg, buffer, nread))) {
-          if(temp.fp) {
+        if((nread == (size_t) -1) ||
+           (nread > sizeof(buffer)) ||
+           (nread != append(arg, buffer, nread))) {
+          if(temp.fp)
             fclose(temp.fp);
-          }
           Curl_formclean(&data);
           return -1;
         }
-      } while(nread == sizeof(buffer));
+      } while(nread);
     }
     else {
       if(ptr->length != append(arg, ptr->line, ptr->length)) {
@@ -1029,10 +1012,11 @@ void curl_formfree(struct curl_httppost *form)
     if(form->more)
       curl_formfree(form->more);
 
-    if( !(form->flags & HTTPPOST_PTRNAME) && form->name)
+    if(!(form->flags & HTTPPOST_PTRNAME) && form->name)
       free(form->name); /* free the name */
-    if( !(form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_CALLBACK)) &&
-        form->contents)
+    if(!(form->flags &
+         (HTTPPOST_PTRCONTENTS|HTTPPOST_BUFFER|HTTPPOST_CALLBACK)) &&
+       form->contents)
       free(form->contents); /* free the contents */
     if(form->contenttype)
       free(form->contenttype); /* free the content type */
@@ -1105,6 +1089,47 @@ static char *strippath(const char *fullfile)
   return base; /* returns an allocated string or NULL ! */
 }
 
+static CURLcode formdata_add_filename(const struct curl_httppost *file,
+                                      struct FormData **form,
+                                      curl_off_t *size)
+{
+  CURLcode result = CURLE_OK;
+  char *filename = file->showfilename;
+  char *filebasename = NULL;
+  char *filename_escaped = NULL;
+
+  if(!filename) {
+    filebasename = strippath(file->contents);
+    if(!filebasename)
+      return CURLE_OUT_OF_MEMORY;
+    filename = filebasename;
+  }
+
+  if(strchr(filename, '\\') || strchr(filename, '"')) {
+    char *p0, *p1;
+
+    /* filename need be escaped */
+    filename_escaped = malloc(strlen(filename)*2+1);
+    if(!filename_escaped)
+      return CURLE_OUT_OF_MEMORY;
+    p0 = filename_escaped;
+    p1 = filename;
+    while(*p1) {
+      if(*p1 == '\\' || *p1 == '"')
+        *p0++ = '\\';
+      *p0++ = *p1++;
+    }
+    *p0 = '\0';
+    filename = filename_escaped;
+  }
+  result = AddFormDataf(form, size,
+                        "; filename=\"%s\"",
+                        filename);
+  Curl_safefree(filename_escaped);
+  Curl_safefree(filebasename);
+  return result;
+}
+
 /*
  * Curl_getformdata() converts a linked list of "meta data" into a complete
  * (possibly huge) multipart formdata. The input list is in 'post', while the
@@ -1129,17 +1154,17 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
   struct curl_httppost *file;
   CURLcode result = CURLE_OK;
 
-  curl_off_t size=0; /* support potentially ENORMOUS formposts */
+  curl_off_t size = 0; /* support potentially ENORMOUS formposts */
   char *boundary;
-  char *fileboundary=NULL;
+  char *fileboundary = NULL;
   struct curl_slist* curList;
 
-  *finalform=NULL; /* default form is empty */
+  *finalform = NULL; /* default form is empty */
 
   if(!post)
     return result; /* no input => no output! */
 
-  boundary = Curl_FormBoundary();
+  boundary = formboundary(data);
   if(!boundary)
     return CURLE_OUT_OF_MEMORY;
 
@@ -1151,7 +1176,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
                         boundary);
 
   if(result) {
-    free(boundary);
+    Curl_safefree(boundary);
     return result;
   }
   /* we DO NOT include that line in the total size of the POST, since it'll be
@@ -1194,7 +1219,12 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       /* If used, this is a link to more file names, we must then do
          the magic to include several files with the same field name */
 
-      fileboundary = Curl_FormBoundary();
+      Curl_safefree(fileboundary);
+      fileboundary = formboundary(data);
+      if(!fileboundary) {
+        result = CURLE_OUT_OF_MEMORY;
+        break;
+      }
 
       result = AddFormDataf(&form, &size,
                             "\r\nContent-Type: multipart/mixed,"
@@ -1214,24 +1244,13 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
 
       if(post->more) {
         /* if multiple-file */
-        char *filebasename= NULL;
-        if(!file->showfilename) {
-          filebasename = strippath(file->contents);
-          if(!filebasename) {
-            Curl_formclean(&firstform);
-            free(boundary);
-            return CURLE_OUT_OF_MEMORY;
-          }
-        }
-
         result = AddFormDataf(&form, &size,
                               "\r\n--%s\r\nContent-Disposition: "
-                              "attachment; filename=\"%s\"",
-                              fileboundary,
-                              (file->showfilename?file->showfilename:
-                               filebasename));
-        if(filebasename)
-          free(filebasename);
+                              "attachment",
+                              fileboundary);
+        if(result)
+          break;
+        result = formdata_add_filename(file, &form, &size);
         if(result)
           break;
       }
@@ -1240,15 +1259,9 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
         /* it should be noted that for the HTTPPOST_FILENAME and
            HTTPPOST_CALLBACK cases the ->showfilename struct member is always
            assigned at this point */
-        char *filebasename=
-          (!post->showfilename)?strippath(post->contents):NULL;
-
-        result = AddFormDataf(&form, &size,
-                              "; filename=\"%s\"",
-                              (post->showfilename?post->showfilename:
-                               filebasename));
-        if(filebasename)
-          free(filebasename);
+        if(post->showfilename || (post->flags & HTTPPOST_FILENAME)) {
+          result = formdata_add_filename(post, &form, &size);
+        }
 
         if(result)
           break;
@@ -1264,18 +1277,15 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       }
 
       curList = file->contentheader;
-      while( curList ) {
+      while(curList) {
         /* Process the additional headers specified for this form */
         result = AddFormDataf( &form, &size, "\r\n%s", curList->data );
         if(result)
           break;
         curList = curList->next;
       }
-      if(result) {
-        Curl_formclean(&firstform);
-        free(boundary);
-        return result;
-      }
+      if(result)
+        break;
 
       result = AddFormDataf(&form, &size, "\r\n\r\n");
       if(result)
@@ -1297,7 +1307,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
 
         if(fileread) {
           if(fileread != stdin) {
-            /* close the file again */
+            /* close the file */
             fclose(fileread);
             /* add the file name only - for later reading from this */
             result = AddFormData(&form, FORM_FILE, file->contents, 0, &size);
@@ -1319,7 +1329,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
         }
         else {
           if(data)
-            failf(data, "couldn't open file \"%s\"\n", file->contents);
+            failf(data, "couldn't open file \"%s\"", file->contents);
           *finalform = NULL;
           result = CURLE_READ_ERROR;
         }
@@ -1341,11 +1351,8 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       file = file->more;
     } while(file && !result); /* for each specified file for this field */
 
-    if(result) {
-      Curl_formclean(&firstform);
-      free(boundary);
-      return result;
-    }
+    if(result)
+      break;
 
     if(post->more) {
       /* this was a multiple-file inclusion, make a termination file
@@ -1353,33 +1360,31 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       result = AddFormDataf(&form, &size,
                            "\r\n--%s--",
                            fileboundary);
-      free(fileboundary);
       if(result)
         break;
     }
 
   } while((post = post->next) != NULL); /* for each field */
-  if(result) {
-    Curl_formclean(&firstform);
-    free(boundary);
-    return result;
-  }
 
   /* end-boundary for everything */
-  result = AddFormDataf(&form, &size,
-                       "\r\n--%s--\r\n",
-                       boundary);
+  if(CURLE_OK == result)
+    result = AddFormDataf(&form, &size,
+                          "\r\n--%s--\r\n",
+                          boundary);
+
   if(result) {
     Curl_formclean(&firstform);
-    free(boundary);
+    Curl_safefree(fileboundary);
+    Curl_safefree(boundary);
     return result;
   }
 
   *sizep = size;
 
-  free(boundary);
+  Curl_safefree(fileboundary);
+  Curl_safefree(boundary);
 
-  *finalform=firstform;
+  *finalform = firstform;
 
   return result;
 }
@@ -1401,26 +1406,67 @@ int Curl_FormInit(struct Form *form, struct FormData *formdata )
   return 0;
 }
 
+#ifndef __VMS
+# define fopen_read fopen
+#else
+  /*
+   * vmsfopenread
+   *
+   * For upload to work as expected on VMS, different optional
+   * parameters must be added to the fopen command based on
+   * record format of the file.
+   *
+   */
+# define fopen_read vmsfopenread
+static FILE * vmsfopenread(const char *file, const char *mode) {
+  struct_stat statbuf;
+  int result;
+
+  result = stat(file, &statbuf);
+
+  switch (statbuf.st_fab_rfm) {
+  case FAB$C_VAR:
+  case FAB$C_VFC:
+  case FAB$C_STMCR:
+    return fopen(file, "r");
+    break;
+  default:
+    return fopen(file, "r", "rfm=stmlf", "ctx=stm");
+  }
+}
+#endif
+
+/*
+ * readfromfile()
+ *
+ * The read callback that this function may use can return a value larger than
+ * 'size' (which then this function returns) that indicates a problem and it
+ * must be properly dealt with
+ */
 static size_t readfromfile(struct Form *form, char *buffer,
                            size_t size)
 {
   size_t nread;
-  bool callback = (bool)(form->data->type == FORM_CALLBACK);
+  bool callback = (form->data->type == FORM_CALLBACK)?TRUE:FALSE;
 
-  if(callback)
-    nread = form->fread_func(buffer, 1, size, form->data->line);
+  if(callback) {
+    if(form->fread_func == ZERO_NULL)
+      return 0;
+    else
+      nread = form->fread_func(buffer, 1, size, form->data->line);
+  }
   else {
     if(!form->fp) {
       /* this file hasn't yet been opened */
-      form->fp = fopen(form->data->line, "rb"); /* b is for binary */
+      form->fp = fopen_read(form->data->line, "rb"); /* b is for binary */
       if(!form->fp)
         return (size_t)-1; /* failure */
     }
     nread = fread(buffer, 1, size, form->fp);
   }
-  if(!nread || nread > size) {
+  if(!nread) {
     /* this is the last chunk from the file, move on */
-    if(!callback) {
+    if(form->fp) {
       fclose(form->fp);
       form->fp = NULL;
     }
@@ -1460,7 +1506,7 @@ size_t Curl_FormReader(char *buffer,
   }
   do {
 
-    if( (form->data->length - form->sent ) > wantedsize - gotsize) {
+    if((form->data->length - form->sent ) > wantedsize - gotsize) {
 
       memcpy(buffer + gotsize , form->data->line + form->sent,
              wantedsize - gotsize);
@@ -1507,168 +1553,18 @@ char *Curl_formpostheader(void *formp, size_t *len)
   return header;
 }
 
-
-#ifdef _FORM_DEBUG
-int FormAddTest(const char * errormsg,
-                 struct curl_httppost **httppost,
-                 struct curl_httppost **last_post,
-                 ...)
-{
-  int result;
-  va_list arg;
-  va_start(arg, last_post);
-  if((result = FormAdd(httppost, last_post, arg)))
-    fprintf (stderr, "ERROR doing FormAdd ret: %d action: %s\n", result,
-             errormsg);
-  va_end(arg);
-  return result;
-}
-
-
-int main(int argc, argv_item_t argv[])
+/*
+ * formboundary() creates a suitable boundary string and returns an allocated
+ * one.
+ */
+static char *formboundary(struct SessionHandle *data)
 {
-  char name1[] = "simple_COPYCONTENTS";
-  char name2[] = "COPYCONTENTS_+_CONTENTTYPE";
-  char name3[] = "PTRNAME_+_NAMELENGTH_+_COPYNAME_+_CONTENTSLENGTH";
-  char name4[] = "simple_PTRCONTENTS";
-  char name5[] = "PTRCONTENTS_+_CONTENTSLENGTH";
-  char name6[] = "PTRCONTENTS_+_CONTENTSLENGTH_+_CONTENTTYPE";
-  char name7[] = "FILE1_+_CONTENTTYPE";
-  char name8[] = "FILE1_+_FILE2";
-  char name9[] = "FILE1_+_FILE2_+_FILE3";
-  char name10[] = "ARRAY: FILE1_+_FILE2_+_FILE3";
-  char name11[] = "FILECONTENT";
-  char value1[] = "value for simple COPYCONTENTS";
-  char value2[] = "value for COPYCONTENTS + CONTENTTYPE";
-  char value3[] = "value for PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH";
-  char value4[] = "value for simple PTRCONTENTS";
-  char value5[] = "value for PTRCONTENTS + CONTENTSLENGTH";
-  char value6[] = "value for PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE";
-  char value7[] = "formdata.h";
-  char value8[] = "Makefile.b32";
-  char type2[] = "image/gif";
-  char type6[] = "text/plain";
-  char type7[] = "text/html";
-  int name3length = strlen(name3);
-  int value3length = strlen(value3);
-  int value5length = strlen(value5);
-  int value6length = strlen(value6);
-  int errors = 0;
-  CURLcode rc;
-  curl_off_t size;
-  size_t nread;
-  char buffer[4096];
-  struct curl_httppost *httppost=NULL;
-  struct curl_httppost *last_post=NULL;
-  struct curl_forms forms[4];
-
-  struct FormData *form;
-  struct Form formread;
-
-  (void) argc;
-  (void) argv;
-
-  Curl_srand();         /* Because we do not call curl_global_init() here. */
-
-  if(FormAddTest("simple COPYCONTENTS test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name1, CURLFORM_COPYCONTENTS, value1,
-                  CURLFORM_END))
-    ++errors;
-  if(FormAddTest("COPYCONTENTS  + CONTENTTYPE test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name2, CURLFORM_COPYCONTENTS, value2,
-                  CURLFORM_CONTENTTYPE, type2, CURLFORM_END))
-    ++errors;
-  /* make null character at start to check that contentslength works
-     correctly */
-  name3[1] = '\0';
-  value3[1] = '\0';
-  if(FormAddTest("PTRNAME + NAMELENGTH + COPYNAME + CONTENTSLENGTH test",
-                  &httppost, &last_post,
-                  CURLFORM_PTRNAME, name3, CURLFORM_COPYCONTENTS, value3,
-                  CURLFORM_CONTENTSLENGTH, value3length,
-                  CURLFORM_NAMELENGTH, name3length, CURLFORM_END))
-    ++errors;
-  if(FormAddTest("simple PTRCONTENTS test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name4, CURLFORM_PTRCONTENTS, value4,
-                  CURLFORM_END))
-    ++errors;
-  /* make null character at start to check that contentslength works
-     correctly */
-  value5[1] = '\0';
-  if(FormAddTest("PTRCONTENTS + CONTENTSLENGTH test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name5, CURLFORM_PTRCONTENTS, value5,
-                  CURLFORM_CONTENTSLENGTH, value5length, CURLFORM_END))
-    ++errors;
-  /* make null character at start to check that contentslength works
-     correctly */
-  value6[1] = '\0';
-  if(FormAddTest("PTRCONTENTS + CONTENTSLENGTH + CONTENTTYPE test",
-                  &httppost, &last_post,
-                  CURLFORM_COPYNAME, name6, CURLFORM_PTRCONTENTS, value6,
-                  CURLFORM_CONTENTSLENGTH, value6length,
-                  CURLFORM_CONTENTTYPE, type6, CURLFORM_END))
-    ++errors;
-  if(FormAddTest("FILE + CONTENTTYPE test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name7, CURLFORM_FILE, value7,
-                  CURLFORM_CONTENTTYPE, type7, CURLFORM_END))
-    ++errors;
-  if(FormAddTest("FILE1 + FILE2 test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name8, CURLFORM_FILE, value7,
-                  CURLFORM_FILE, value8, CURLFORM_END))
-    ++errors;
-  if(FormAddTest("FILE1 + FILE2 + FILE3 test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name9, CURLFORM_FILE, value7,
-                  CURLFORM_FILE, value8, CURLFORM_FILE, value7, CURLFORM_END))
-    ++errors;
-  forms[0].option = CURLFORM_FILE;
-  forms[0].value  = value7;
-  forms[1].option = CURLFORM_FILE;
-  forms[1].value  = value8;
-  forms[2].option = CURLFORM_FILE;
-  forms[2].value  = value7;
-  forms[3].option  = CURLFORM_END;
-  if(FormAddTest("FILE1 + FILE2 + FILE3 ARRAY test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name10, CURLFORM_ARRAY, forms,
-                  CURLFORM_END))
-    ++errors;
-  if(FormAddTest("FILECONTENT test", &httppost, &last_post,
-                  CURLFORM_COPYNAME, name11, CURLFORM_FILECONTENT, value7,
-                  CURLFORM_END))
-    ++errors;
-
-  rc = Curl_getformdata(NULL, &form, httppost, NULL, &size);
-  if(rc != CURLE_OK) {
-    if(rc != CURLE_READ_ERROR) {
-      const char *errortext = curl_easy_strerror(rc);
-      fprintf(stdout, "\n==> Curl_getformdata error: %s\n", errortext);
-    }
-    return 0;
-  }
-
-  Curl_FormInit(&formread, form);
-
-  for(;;) {
-    nread = Curl_FormReader(buffer, 1, sizeof(buffer),
-                            (FILE *)&formread);
-
-    if(nread < 1)
-      break;
-    fwrite(buffer, nread, 1, stdout);
-  }
-
-  fprintf(stdout, "size: ");
-  fprintf(stdout, "%" FORMAT_OFF_T, size);
-  fprintf(stdout, "\n");
-  if(errors)
-    fprintf(stdout, "\n==> %d Test(s) failed!\n", errors);
-  else
-    fprintf(stdout, "\nAll Tests seem to have worked (please check output)\n");
-
-  return 0;
+  /* 24 dashes and 16 hexadecimal digits makes 64 bit (18446744073709551615)
+     combinations */
+  return aprintf("------------------------%08x%08x",
+                 Curl_rand(data), Curl_rand(data));
 }
 
-#endif  /* _FORM_DEBUG */
-
 #else  /* CURL_DISABLE_HTTP */
 CURLFORMcode curl_formadd(struct curl_httppost **httppost,
                           struct curl_httppost **last_post,
@@ -1694,37 +1590,5 @@ void curl_formfree(struct curl_httppost *form)
   /* does nothing HTTP is disabled */
 }
 
-#endif  /* CURL_DISABLE_HTTP */
-
-#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
-
-/*
- * Curl_FormBoundary() creates a suitable boundary string and returns an
- * allocated one. This is also used by SSL-code so it must be present even
- * if HTTP is disabled!
- */
-char *Curl_FormBoundary(void)
-{
-  char *retstring;
-  size_t i;
-
-  static const char table16[]="0123456789abcdef";
-
-  retstring = malloc(BOUNDARY_LENGTH+1);
-
-  if(!retstring)
-    return NULL; /* failed */
-
-  strcpy(retstring, "----------------------------");
 
-  for(i=strlen(retstring); i<BOUNDARY_LENGTH; i++)
-    retstring[i] = table16[Curl_rand()%16];
-
-  /* 28 dashes and 12 hexadecimal digits makes 12^16 (184884258895036416)
-     combinations */
-  retstring[BOUNDARY_LENGTH]=0; /* zero terminate */
-
-  return retstring;
-}
-
-#endif  /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */
+#endif  /* !defined(CURL_DISABLE_HTTP) */
index 8e370c5..c9b97dd 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -61,8 +49,6 @@
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
 #include "if2ip.h"
 #include "hostip.h"
 #include "progress.h"
@@ -93,6 +79,8 @@
 #include "rawstr.h"
 #include "speedcheck.h"
 #include "warnless.h"
+#include "http_proxy.h"
+#include "non-ascii.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #endif
 
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define ftp_pasv_verbose(a,b,c,d)  do { } while(0)
+#define ftp_pasv_verbose(a,b,c,d)  Curl_nop_stmt
 #endif
 
 /* Local API functions */
+#ifndef DEBUGBUILD
+static void _state(struct connectdata *conn,
+                   ftpstate newstate);
+#define state(x,y) _state(x,y)
+#else
+static void _state(struct connectdata *conn,
+                   ftpstate newstate,
+                   int lineno);
+#define state(x,y) _state(x,y,__LINE__)
+#endif
+
 static CURLcode ftp_sendquote(struct connectdata *conn,
                               struct curl_slist *quote);
 static CURLcode ftp_quit(struct connectdata *conn);
@@ -124,8 +123,8 @@ static void ftp_pasv_verbose(struct connectdata *conn,
                              char *newhost, /* ascii version */
                              int port);
 #endif
-static CURLcode ftp_state_post_rest(struct connectdata *conn);
-static CURLcode ftp_state_post_cwd(struct connectdata *conn);
+static CURLcode ftp_state_prepare_transfer(struct connectdata *conn);
+static CURLcode ftp_state_mdtm(struct connectdata *conn);
 static CURLcode ftp_state_quote(struct connectdata *conn,
                                 bool init, ftpstate instate);
 static CURLcode ftp_nb_type(struct connectdata *conn,
@@ -137,11 +136,12 @@ static CURLcode ftp_done(struct connectdata *conn,
                          CURLcode, bool premature);
 static CURLcode ftp_connect(struct connectdata *conn, bool *done);
 static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection);
-static CURLcode ftp_nextconnect(struct connectdata *conn);
+static CURLcode ftp_do_more(struct connectdata *conn, int *completed);
 static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done);
-static int ftp_getsock(struct connectdata *conn,
-                       curl_socket_t *socks,
+static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks,
                        int numsocks);
+static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks,
+                              int numsocks);
 static CURLcode ftp_doing(struct connectdata *conn,
                           bool *dophase_done);
 static CURLcode ftp_setup_connection(struct connectdata * conn);
@@ -151,12 +151,16 @@ static CURLcode wc_statemach(struct connectdata *conn);
 
 static void wc_data_dtor(void *ptr);
 
-static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
-                                         curl_off_t filesize);
+static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize);
+
+static CURLcode ftp_readresp(curl_socket_t sockfd,
+                             struct pingpong *pp,
+                             int *ftpcode,
+                             size_t *size);
+static CURLcode ftp_dophase_done(struct connectdata *conn,
+                                 bool connected);
 
 /* easy-to-use macro: */
-#define FTPSENDF(x,y,z)    if((result = Curl_ftpsendf(x,y,z)) != CURLE_OK) \
-                              return result
 #define PPSENDF(x,y,z)  if((result = Curl_pp_sendf(x,y,z)) != CURLE_OK) \
                               return result
 
@@ -170,16 +174,20 @@ const struct Curl_handler Curl_handler_ftp = {
   ftp_setup_connection,            /* setup_connection */
   ftp_do,                          /* do_it */
   ftp_done,                        /* done */
-  ftp_nextconnect,                 /* do_more */
+  ftp_do_more,                     /* do_more */
   ftp_connect,                     /* connect_it */
   ftp_multi_statemach,             /* connecting */
   ftp_doing,                       /* doing */
   ftp_getsock,                     /* proto_getsock */
   ftp_getsock,                     /* doing_getsock */
+  ftp_domore_getsock,              /* domore_getsock */
   ZERO_NULL,                       /* perform_getsock */
   ftp_disconnect,                  /* disconnect */
+  ZERO_NULL,                       /* readwrite */
   PORT_FTP,                        /* defport */
-  PROT_FTP                         /* protocol */
+  CURLPROTO_FTP,                   /* protocol */
+  PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD
+  | PROTOPT_NOURLQUERY /* flags */
 };
 
 
@@ -193,16 +201,20 @@ const struct Curl_handler Curl_handler_ftps = {
   ftp_setup_connection,            /* setup_connection */
   ftp_do,                          /* do_it */
   ftp_done,                        /* done */
-  ftp_nextconnect,                 /* do_more */
+  ftp_do_more,                     /* do_more */
   ftp_connect,                     /* connect_it */
   ftp_multi_statemach,             /* connecting */
   ftp_doing,                       /* doing */
   ftp_getsock,                     /* proto_getsock */
   ftp_getsock,                     /* doing_getsock */
+  ftp_domore_getsock,              /* domore_getsock */
   ZERO_NULL,                       /* perform_getsock */
   ftp_disconnect,                  /* disconnect */
+  ZERO_NULL,                       /* readwrite */
   PORT_FTPS,                       /* defport */
-  PROT_FTP | PROT_FTPS | PROT_SSL  /* protocol */
+  CURLPROTO_FTP | CURLPROTO_FTPS,  /* protocol */
+  PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION |
+  PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */
 };
 #endif
 
@@ -222,10 +234,13 @@ static const struct Curl_handler Curl_handler_ftp_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_FTP,                             /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
 
@@ -245,10 +260,13 @@ static const struct Curl_handler Curl_handler_ftps_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_FTPS,                            /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 #endif
 #endif
@@ -270,7 +288,7 @@ static void freedirs(struct ftp_conn *ftpc)
 {
   int i;
   if(ftpc->dirs) {
-    for (i=0; i < ftpc->dirdepth; i++){
+    for(i=0; i < ftpc->dirdepth; i++) {
       if(ftpc->dirs[i]) {
         free(ftpc->dirs[i]);
         ftpc->dirs[i]=NULL;
@@ -294,25 +312,22 @@ static void freedirs(struct ftp_conn *ftpc)
 */
 static bool isBadFtpString(const char *string)
 {
-  return (bool)((NULL != strchr(string, '\r')) ||
-                (NULL != strchr(string, '\n')));
+  return ((NULL != strchr(string, '\r')) ||
+          (NULL != strchr(string, '\n'))) ? TRUE : FALSE;
 }
 
 /***********************************************************************
  *
- * AllowServerConnect()
+ * AcceptServerConnect()
  *
- * When we've issue the PORT command, we have told the server to connect
- * to us. This function will sit and wait here until the server has
- * connected.
+ * After connection request is received from the server this function is
+ * called to accept the connection and close the listening socket
  *
  */
-static CURLcode AllowServerConnect(struct connectdata *conn)
+static CURLcode AcceptServerConnect(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
   curl_socket_t sock = conn->sock[SECONDARYSOCKET];
-  long timeout_ms;
-  long interval_ms;
   curl_socket_t s = CURL_SOCKET_BAD;
 #ifdef ENABLE_IPV6
   struct Curl_sockaddr_storage add;
@@ -321,47 +336,255 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
 #endif
   curl_socklen_t size = (curl_socklen_t) sizeof(add);
 
-  for(;;) {
-    timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+  if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) {
+    size = sizeof(add);
+
+    s=accept(sock, (struct sockaddr *) &add, &size);
+  }
+  Curl_closesocket(conn, sock); /* close the first socket */
+
+  if(CURL_SOCKET_BAD == s) {
+    failf(data, "Error accept()ing server connect");
+    return CURLE_FTP_PORT_FAILED;
+  }
+  infof(data, "Connection accepted from server\n");
+
+  conn->sock[SECONDARYSOCKET] = s;
+  curlx_nonblock(s, TRUE); /* enable non-blocking */
+  conn->sock_accepted[SECONDARYSOCKET] = TRUE;
+
+  if(data->set.fsockopt) {
+    int error = 0;
 
-    if(timeout_ms < 0) {
-      /* if a timeout was already reached, bail out */
-      failf(data, "Timeout while waiting for server connect");
-      return CURLE_OPERATION_TIMEDOUT;
+    /* activate callback for setting socket options */
+    error = data->set.fsockopt(data->set.sockopt_client,
+                               s,
+                               CURLSOCKTYPE_ACCEPT);
+
+    if(error) {
+      Curl_closesocket(conn, s); /* close the socket and bail out */
+      conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+      return CURLE_ABORTED_BY_CALLBACK;
     }
+  }
 
-    interval_ms = 1000;  /* use 1 second timeout intervals */
-    if(timeout_ms < interval_ms)
-      interval_ms = timeout_ms;
+  return CURLE_OK;
 
-    switch (Curl_socket_ready(sock, CURL_SOCKET_BAD, (int)interval_ms)) {
-    case -1: /* error */
-      /* let's die here */
-      failf(data, "Error while waiting for server connect");
-      return CURLE_FTP_PORT_FAILED;
-    case 0:  /* timeout */
-      break; /* loop */
-    default:
-      /* we have received data here */
-      if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) {
-        size = sizeof(add);
+}
 
-        s=accept(sock, (struct sockaddr *) &add, &size);
-      }
-      sclose(sock); /* close the first socket */
+/*
+ * ftp_timeleft_accept() returns the amount of milliseconds left allowed for
+ * waiting server to connect. If the value is negative, the timeout time has
+ * already elapsed.
+ *
+ * The start time is stored in progress.t_acceptdata - as set with
+ * Curl_pgrsTime(..., TIMER_STARTACCEPT);
+ *
+ */
+static long ftp_timeleft_accept(struct SessionHandle *data)
+{
+  long timeout_ms = DEFAULT_ACCEPT_TIMEOUT;
+  long other;
+  struct timeval now;
 
-      if(CURL_SOCKET_BAD == s) {
-        failf(data, "Error accept()ing server connect");
-        return CURLE_FTP_PORT_FAILED;
-      }
-      infof(data, "Connection accepted from server\n");
+  if(data->set.accepttimeout > 0)
+    timeout_ms = data->set.accepttimeout;
 
-      conn->sock[SECONDARYSOCKET] = s;
-      curlx_nonblock(s, TRUE); /* enable non-blocking */
-      return CURLE_OK;
-    } /* switch() */
+  now = Curl_tvnow();
+
+  /* check if the generic timeout possibly is set shorter */
+  other =  Curl_timeleft(data, &now, FALSE);
+  if(other && (other < timeout_ms))
+    /* note that this also works fine for when other happens to be negative
+       due to it already having elapsed */
+    timeout_ms = other;
+  else {
+    /* subtract elapsed time */
+    timeout_ms -= Curl_tvdiff(now, data->progress.t_acceptdata);
+    if(!timeout_ms)
+      /* avoid returning 0 as that means no timeout! */
+      return -1;
   }
-  /* never reaches this point */
+
+  return timeout_ms;
+}
+
+
+/***********************************************************************
+ *
+ * ReceivedServerConnect()
+ *
+ * After allowing server to connect to us from data port, this function
+ * checks both data connection for connection establishment and ctrl
+ * connection for a negative response regarding a failure in connecting
+ *
+ */
+static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received)
+{
+  struct SessionHandle *data = conn->data;
+  curl_socket_t ctrl_sock = conn->sock[FIRSTSOCKET];
+  curl_socket_t data_sock = conn->sock[SECONDARYSOCKET];
+  struct ftp_conn *ftpc = &conn->proto.ftpc;
+  struct pingpong *pp = &ftpc->pp;
+  int result;
+  long timeout_ms;
+  ssize_t nread;
+  int ftpcode;
+
+  *received = FALSE;
+
+  timeout_ms = ftp_timeleft_accept(data);
+  infof(data, "Checking for server connect\n");
+  if(timeout_ms < 0) {
+    /* if a timeout was already reached, bail out */
+    failf(data, "Accept timeout occurred while waiting server connect");
+    return CURLE_FTP_ACCEPT_TIMEOUT;
+  }
+
+  /* First check whether there is a cached response from server */
+  if(pp->cache_size && pp->cache && pp->cache[0] > '3') {
+    /* Data connection could not be established, let's return */
+    infof(data, "There is negative response in cache while serv connect\n");
+    Curl_GetFTPResponse(&nread, conn, &ftpcode);
+    return CURLE_FTP_ACCEPT_FAILED;
+  }
+
+  result = Curl_socket_check(ctrl_sock, data_sock, CURL_SOCKET_BAD, 0);
+
+  /* see if the connection request is already here */
+  switch (result) {
+  case -1: /* error */
+    /* let's die here */
+    failf(data, "Error while waiting for server connect");
+    return CURLE_FTP_ACCEPT_FAILED;
+  case 0:  /* Server connect is not received yet */
+    break; /* loop */
+  default:
+
+    if(result & CURL_CSELECT_IN2) {
+      infof(data, "Ready to accept data connection from server\n");
+      *received = TRUE;
+    }
+    else if(result & CURL_CSELECT_IN) {
+      infof(data, "Ctrl conn has data while waiting for data conn\n");
+      Curl_GetFTPResponse(&nread, conn, &ftpcode);
+
+      if(ftpcode/100 > 3)
+        return CURLE_FTP_ACCEPT_FAILED;
+
+      return CURLE_FTP_WEIRD_SERVER_REPLY;
+    }
+
+    break;
+  } /* switch() */
+
+  return CURLE_OK;
+}
+
+
+/***********************************************************************
+ *
+ * InitiateTransfer()
+ *
+ * After connection from server is accepted this function is called to
+ * setup transfer parameters and initiate the data transfer.
+ *
+ */
+static CURLcode InitiateTransfer(struct connectdata *conn)
+{
+  struct SessionHandle *data = conn->data;
+  struct FTP *ftp = data->state.proto.ftp;
+  CURLcode result = CURLE_OK;
+
+  if(conn->ssl[SECONDARYSOCKET].use) {
+    /* since we only have a plaintext TCP connection here, we must now
+     * do the TLS stuff */
+    infof(data, "Doing the SSL/TLS handshake on the data stream\n");
+    result = Curl_ssl_connect(conn, SECONDARYSOCKET);
+    if(result)
+      return result;
+  }
+
+  if(conn->proto.ftpc.state_saved == FTP_STOR) {
+    *(ftp->bytecountp)=0;
+
+    /* When we know we're uploading a specified file, we can get the file
+       size prior to the actual upload. */
+
+    Curl_pgrsSetUploadSize(data, data->set.infilesize);
+
+    /* set the SO_SNDBUF for the secondary socket for those who need it */
+    Curl_sndbufset(conn->sock[SECONDARYSOCKET]);
+
+    Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
+                        SECONDARYSOCKET, ftp->bytecountp);
+  }
+  else {
+    /* FTP download: */
+    Curl_setup_transfer(conn, SECONDARYSOCKET,
+                        conn->proto.ftpc.retr_size_saved, FALSE,
+                        ftp->bytecountp, -1, NULL); /* no upload here */
+  }
+
+  conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */
+  state(conn, FTP_STOP);
+
+  return CURLE_OK;
+}
+
+/***********************************************************************
+ *
+ * AllowServerConnect()
+ *
+ * When we've issue the PORT command, we have told the server to connect to
+ * us. This function checks whether data connection is established if so it is
+ * accepted.
+ *
+ */
+static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected)
+{
+  struct SessionHandle *data = conn->data;
+  long timeout_ms;
+  CURLcode ret = CURLE_OK;
+
+  *connected = FALSE;
+  infof(data, "Preparing for accepting server on data port\n");
+
+  /* Save the time we start accepting server connect */
+  Curl_pgrsTime(data, TIMER_STARTACCEPT);
+
+  timeout_ms = ftp_timeleft_accept(data);
+  if(timeout_ms < 0) {
+    /* if a timeout was already reached, bail out */
+    failf(data, "Accept timeout occurred while waiting server connect");
+    return CURLE_FTP_ACCEPT_TIMEOUT;
+  }
+
+  /* see if the connection request is already here */
+  ret = ReceivedServerConnect(conn, connected);
+  if(ret)
+    return ret;
+
+  if(*connected) {
+    ret = AcceptServerConnect(conn);
+    if(ret)
+      return ret;
+
+    ret = InitiateTransfer(conn);
+    if(ret)
+      return ret;
+  }
+  else {
+    /* Add timeout to multi handle and break out of the loop */
+    if(ret == CURLE_OK && *connected == FALSE) {
+      if(data->set.accepttimeout > 0)
+        Curl_expire(data, data->set.accepttimeout);
+      else
+        Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT);
+    }
+  }
+
+  return ret;
 }
 
 /* macro to check for a three-digit ftp status code at the start of the
@@ -372,17 +595,17 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
 /* macro to check for the last line in an FTP server response */
 #define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3]))
 
-static int ftp_endofresp(struct pingpong *pp,
-                         int *code)
+static bool ftp_endofresp(struct connectdata *conn, char *line, size_t len,
+                          int *code)
 {
-  char *line = pp->linestart_resp;
-  size_t len = pp->nread_resp;
+  (void)conn;
 
   if((len > 3) && LASTLINE(line)) {
     *code = curlx_sltosi(strtol(line, NULL, 10));
-    return 1;
+    return TRUE;
   }
-  return 0;
+
+  return FALSE;
 }
 
 static CURLcode ftp_readresp(curl_socket_t sockfd,
@@ -391,8 +614,8 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
                              size_t *size) /* size of the response */
 {
   struct connectdata *conn = pp->conn;
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
   struct SessionHandle *data = conn->data;
+#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
   char * const buf = data->state.buffer;
 #endif
   CURLcode result = CURLE_OK;
@@ -420,16 +643,23 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
 #endif
 
   /* store the latest code for later retrieval */
-  conn->data->info.httpcode=code;
+  data->info.httpcode=code;
 
   if(ftpcode)
     *ftpcode = code;
 
-  if(421 == code)
+  if(421 == code) {
     /* 421 means "Service not available, closing control connection." and FTP
      * servers use it to signal that idle session timeout has been exceeded.
-     * If we ignored the response, it could end up hanging in some cases. */
+     * If we ignored the response, it could end up hanging in some cases.
+     *
+     * This response code can come at any point so having it treated
+     * generically is a good idea.
+     */
+    infof(data, "We got a 421 - timeout!\n");
+    state(conn, FTP_STOP);
     return CURLE_OPERATION_TIMEDOUT;
+  }
 
   return result;
 }
@@ -508,7 +738,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
        */
     }
     else {
-      switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, (int)interval_ms)) {
+      switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
       case -1: /* select() error, stop reading */
         failf(data, "FTP response aborted due to select/poll error: %d",
               SOCKERRNO);
@@ -546,8 +776,12 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
 }
 
 /* This is the ONLY way to change FTP state! */
-static void state(struct connectdata *conn,
-                  ftpstate newstate)
+static void _state(struct connectdata *conn,
+                   ftpstate newstate
+#ifdef DEBUGBUILD
+                   , int lineno
+#endif
+  )
 {
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
@@ -592,8 +826,8 @@ static void state(struct connectdata *conn,
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   if(ftpc->state != newstate)
-    infof(conn->data, "FTP %p state change from %s to %s\n",
-          ftpc, names[ftpc->state], names[newstate]);
+    infof(conn->data, "FTP %p (line %d) state change from %s to %s\n",
+          (void *)ftpc, lineno, names[ftpc->state], names[newstate]);
 #endif
   ftpc->state = newstate;
 }
@@ -616,7 +850,7 @@ static CURLcode ftp_state_pwd(struct connectdata *conn)
   CURLcode result;
 
   /* send PWD to discover our entry point */
-  PPSENDF(&conn->proto.ftpc.pp, "PWD", NULL);
+  PPSENDF(&conn->proto.ftpc.pp, "%s", "PWD");
   state(conn, FTP_PWD);
 
   return CURLE_OK;
@@ -630,6 +864,43 @@ static int ftp_getsock(struct connectdata *conn,
   return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks);
 }
 
+/* For the FTP "DO_MORE" phase only */
+static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks,
+                              int numsocks)
+{
+  struct ftp_conn *ftpc = &conn->proto.ftpc;
+
+  if(!numsocks)
+    return GETSOCK_BLANK;
+
+  /* When in DO_MORE state, we could be either waiting for us to connect to a
+     remote site, or we could wait for that site to connect to us. Or just
+     handle ordinary commands.
+
+     When waiting for a connect, we can be in FTP_STOP state (or we're in
+     FTP_STOR when we do an upload) and then we wait for the secondary socket
+     to become writeable. . If we're in another state, we're still handling
+     commands on the control (primary) connection.
+
+  */
+
+  switch(ftpc->state) {
+  case FTP_STOP:
+  case FTP_STOR:
+    break;
+  default:
+    return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks);
+  }
+
+  socks[0] = conn->sock[SECONDARYSOCKET];
+  if(ftpc->wait_data_conn) {
+    socks[1] = conn->sock[FIRSTSOCKET];
+    return GETSOCK_READSOCK(0) | GETSOCK_READSOCK(1);
+  }
+
+  return GETSOCK_READSOCK(0);
+}
+
 /* This is called after the FTP_QUOTE state is passed.
 
    ftp_state_cwd() sends the range of CWD commands to the server to change to
@@ -643,7 +914,7 @@ static CURLcode ftp_state_cwd(struct connectdata *conn)
 
   if(ftpc->cwddone)
     /* already done and fine */
-    result = ftp_state_post_cwd(conn);
+    result = ftp_state_mdtm(conn);
   else {
     ftpc->count2 = 0; /* count2 counts failed CWDs */
 
@@ -671,7 +942,7 @@ static CURLcode ftp_state_cwd(struct connectdata *conn)
       }
       else {
         /* No CWD necessary */
-        result = ftp_state_post_cwd(conn);
+        result = ftp_state_mdtm(conn);
       }
     }
   }
@@ -707,12 +978,13 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   static const char mode[][5] = { "EPRT", "PORT" };
   int rc;
   int error;
-  char *host=NULL;
+  char *host = NULL;
   char *string_ftpport = data->set.str[STRING_FTPPORT];
   struct Curl_dns_entry *h=NULL;
   unsigned short port_min = 0;
   unsigned short port_max = 0;
   unsigned short port;
+  bool possibly_non_local = TRUE;
 
   char *addr = NULL;
 
@@ -737,7 +1009,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     char *port_sep = NULL;
 
     addr = calloc(addrlen+1, 1);
-    if (!addr)
+    if(!addr)
       return CURLE_OUT_OF_MEMORY;
 
 #ifdef ENABLE_IPV6
@@ -749,11 +1021,11 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     }
     else
 #endif
-      if( *string_ftpport == ':') {
+      if(*string_ftpport == ':') {
         /* :port */
         ip_end = string_ftpport;
     }
-    else if( (ip_end = strchr(string_ftpport, ':')) != NULL) {
+    else if((ip_end = strchr(string_ftpport, ':')) != NULL) {
         /* either ipv6 or (ipv4|domain|interface):port(-range) */
 #ifdef ENABLE_IPV6
       if(Curl_inet_pton(AF_INET6, string_ftpport, sa6) == 1) {
@@ -761,19 +1033,18 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
         port_min = port_max = 0;
         strcpy(addr, string_ftpport);
         ip_end = NULL; /* this got no port ! */
-      } else
+      }
+      else
 #endif
-      {
         /* (ipv4|domain|interface):port(-range) */
         strncpy(addr, string_ftpport, ip_end - ip_start );
-      }
     }
     else
       /* ipv4|interface */
       strcpy(addr, string_ftpport);
 
     /* parse the port */
-    if( ip_end != NULL ) {
+    if(ip_end != NULL) {
       if((port_start = strchr(ip_end, ':')) != NULL) {
         port_min = curlx_ultous(strtoul(port_start+1, NULL, 10));
         if((port_sep = strchr(port_start, '-')) != NULL) {
@@ -796,13 +1067,19 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
 
     if(*addr != '\0') {
       /* attempt to get the address of the given interface name */
-      if(!Curl_if2ip(conn->ip_addr->ai_family, addr,
-                     hbuf, sizeof(hbuf)))
-        /* not an interface, use the given string as host name instead */
-        host = addr;
-      else
-        host = hbuf; /* use the hbuf for host name */
-    }else
+      switch(Curl_if2ip(conn->ip_addr->ai_family, conn->scope, addr,
+                     hbuf, sizeof(hbuf))) {
+        case IF2IP_NOT_FOUND:
+          /* not an interface, use the given string as host name instead */
+          host = addr;
+          break;
+        case IF2IP_AF_NOT_SUPPORTED:
+          return CURLE_FTP_PORT_FAILED;
+        case IF2IP_FOUND:
+          host = hbuf; /* use the hbuf for host name */
+      }
+    }
+    else
       /* there was only a port(-range) given, default the host */
       host = NULL;
   } /* data->set.ftpport */
@@ -815,28 +1092,27 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) {
       failf(data, "getsockname() failed: %s",
           Curl_strerror(conn, SOCKERRNO) );
-      if (addr)
-        free(addr);
+      Curl_safefree(addr);
       return CURLE_FTP_PORT_FAILED;
     }
-    switch(sa->sa_family)
-    {
+    switch(sa->sa_family) {
 #ifdef ENABLE_IPV6
-      case AF_INET6:
-        Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf));
-        break;
+    case AF_INET6:
+      Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf));
+      break;
 #endif
-      default:
-        Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf));
-        break;
+    default:
+      Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf));
+      break;
     }
     host = hbuf; /* use this host name */
+    possibly_non_local = FALSE; /* we know it is local now */
   }
 
   /* resolv ip/host to ip */
   rc = Curl_resolv(conn, host, 0, &h);
   if(rc == CURLRESOLV_PENDING)
-    (void)Curl_wait_for_resolv(conn, &h);
+    (void)Curl_resolver_wait_resolv(conn, &h);
   if(h) {
     res = h->addr;
     /* when we return from this function, we can forget about this entry
@@ -846,27 +1122,22 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   else
     res = NULL; /* failure! */
 
-  if (addr)
-    free(addr);
-
-  if (res == NULL) {
-    failf(data, "Curl_resolv failed, we can not recover!");
+  if(res == NULL) {
+    failf(data, "failed to resolve the address provided to PORT: %s", host);
+    Curl_safefree(addr);
     return CURLE_FTP_PORT_FAILED;
   }
 
+  Curl_safefree(addr);
+  host = NULL;
+
   /* step 2, create a socket for the requested address */
 
   portsock = CURL_SOCKET_BAD;
   error = 0;
-  for (ai = res; ai; ai = ai->ai_next) {
-    /*
-     * Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype):
-     */
-    if(ai->ai_socktype == 0)
-      ai->ai_socktype = conn->socktype;
-
-    portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-    if(portsock == CURL_SOCKET_BAD) {
+  for(ai = res; ai; ai = ai->ai_next) {
+    result = Curl_socket(conn, ai, NULL, &portsock);
+    if(result) {
       error = SOCKERRNO;
       continue;
     }
@@ -882,8 +1153,8 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   memcpy(sa, ai->ai_addr, ai->ai_addrlen);
   sslen = ai->ai_addrlen;
 
-  for( port = port_min; port <= port_max; ) {
-    if( sa->sa_family == AF_INET )
+  for(port = port_min; port <= port_max;) {
+    if(sa->sa_family == AF_INET)
       sa4->sin_port = htons(port);
 #ifdef ENABLE_IPV6
     else
@@ -893,28 +1164,29 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     if(bind(portsock, sa, sslen) ) {
       /* It failed. */
       error = SOCKERRNO;
-      if(error == EADDRNOTAVAIL) {
-
+      if(possibly_non_local && (error == EADDRNOTAVAIL)) {
         /* The requested bind address is not local.  Use the address used for
          * the control connection instead and restart the port loop
          */
-        failf(data, "bind(port=%hu) failed: %s", port,
+
+        infof(data, "bind(port=%hu) on non-local address failed: %s\n", port,
               Curl_strerror(conn, error) );
 
         sslen = sizeof(ss);
         if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) {
           failf(data, "getsockname() failed: %s",
                 Curl_strerror(conn, SOCKERRNO) );
-          sclose(portsock);
+          Curl_closesocket(conn, portsock);
           return CURLE_FTP_PORT_FAILED;
         }
         port = port_min;
+        possibly_non_local = FALSE; /* don't try this again */
         continue;
       }
       else if(error != EADDRINUSE && error != EACCES) {
         failf(data, "bind(port=%hu) failed: %s", port,
               Curl_strerror(conn, error) );
-        sclose(portsock);
+        Curl_closesocket(conn, portsock);
         return CURLE_FTP_PORT_FAILED;
       }
     }
@@ -925,9 +1197,9 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   }
 
   /* maybe all ports were in use already*/
-  if (port > port_max) {
+  if(port > port_max) {
     failf(data, "bind() failed, we ran out of ports!");
-    sclose(portsock);
+    Curl_closesocket(conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -937,7 +1209,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   if(getsockname(portsock, (struct sockaddr *)sa, &sslen)) {
     failf(data, "getsockname() failed: %s",
           Curl_strerror(conn, SOCKERRNO) );
-    sclose(portsock);
+    Curl_closesocket(conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -945,7 +1217,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
 
   if(listen(portsock, 1)) {
     failf(data, "socket failure: %s", Curl_strerror(conn, SOCKERRNO));
-    sclose(portsock);
+    Curl_closesocket(conn, portsock);
     return CURLE_FTP_PORT_FAILED;
   }
 
@@ -962,7 +1234,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     conn->bits.ftp_use_eprt = TRUE;
 #endif
 
-  for (; fcmd != DONE; fcmd++) {
+  for(; fcmd != DONE; fcmd++) {
 
     if(!conn->bits.ftp_use_eprt && (EPRT == fcmd))
       /* if disabled, goto next */
@@ -997,8 +1269,16 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
       result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd],
                              sa->sa_family == AF_INET?1:2,
                              myhost, port);
-      if(result)
+      if(result) {
+        failf(data, "Failure sending EPRT command: %s",
+              curl_easy_strerror(result));
+        Curl_closesocket(conn, portsock);
+        /* don't retry using PORT */
+        ftpc->count1 = PORT;
+        /* bail out */
+        state(conn, FTP_STOP);
         return result;
+      }
       break;
     }
     else if(PORT == fcmd) {
@@ -1018,8 +1298,14 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
       snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff));
 
       result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp);
-      if(result)
+      if(result) {
+        failf(data, "Failure sending PORT command: %s",
+              curl_easy_strerror(result));
+        Curl_closesocket(conn, portsock);
+        /* bail out */
+        state(conn, FTP_STOP);
         return result;
+      }
       break;
     }
   }
@@ -1031,7 +1317,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
      the cleanup function will close it in case we fail before the true
      secondary stuff is made */
   if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
-    sclose(conn->sock[SECONDARYSOCKET]);
+    Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
   conn->sock[SECONDARYSOCKET] = portsock;
 
   /* this tcpconnect assignment below is a hackish work-around to make the
@@ -1041,7 +1327,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
      The *proper* fix is to make sure that the active connection from the
      server is done in a non-blocking way. Currently, it is still BLOCKING.
   */
-  conn->bits.tcpconnect = TRUE;
+  conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE;
 
   state(conn, FTP_PORT);
   return result;
@@ -1086,10 +1372,14 @@ static CURLcode ftp_state_use_pasv(struct connectdata *conn)
   return result;
 }
 
-/* REST is the last command in the chain of commands when a "head"-like
-   request is made. Thus, if an actual transfer is to be made this is where
-   we take off for real. */
-static CURLcode ftp_state_post_rest(struct connectdata *conn)
+/*
+ * ftp_state_prepare_transfer() starts PORT, PASV or PRET etc.
+ *
+ * REST is the last command in the chain of commands when a "head"-like
+ * request is made. Thus, if an actual transfer is to be made this is where we
+ * take off for real.
+ */
+static CURLcode ftp_state_prepare_transfer(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct FTP *ftp = conn->data->state.proto.ftp;
@@ -1132,7 +1422,7 @@ static CURLcode ftp_state_post_rest(struct connectdata *conn)
   return result;
 }
 
-static CURLcode ftp_state_post_size(struct connectdata *conn)
+static CURLcode ftp_state_rest(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct FTP *ftp = conn->data->state.proto.ftp;
@@ -1148,12 +1438,12 @@ static CURLcode ftp_state_post_size(struct connectdata *conn)
     state(conn, FTP_REST);
   }
   else
-    result = ftp_state_post_rest(conn);
+    result = ftp_state_prepare_transfer(conn);
 
   return result;
 }
 
-static CURLcode ftp_state_post_type(struct connectdata *conn)
+static CURLcode ftp_state_size(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct FTP *ftp = conn->data->state.proto.ftp;
@@ -1168,12 +1458,12 @@ static CURLcode ftp_state_post_type(struct connectdata *conn)
     state(conn, FTP_SIZE);
   }
   else
-    result = ftp_state_post_size(conn);
+    result = ftp_state_rest(conn);
 
   return result;
 }
 
-static CURLcode ftp_state_post_listtype(struct connectdata *conn)
+static CURLcode ftp_state_list(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
@@ -1227,19 +1517,22 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn)
     return CURLE_OUT_OF_MEMORY;
   }
 
-  PPSENDF(&conn->proto.ftpc.pp, "%s",cmd);
+  result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", cmd);
 
   if(lstArg)
     free(lstArg);
 
   free(cmd);
 
+  if(result != CURLE_OK)
+    return result;
+
   state(conn, FTP_LIST);
 
   return result;
 }
 
-static CURLcode ftp_state_post_retrtype(struct connectdata *conn)
+static CURLcode ftp_state_retr_prequote(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
@@ -1250,7 +1543,7 @@ static CURLcode ftp_state_post_retrtype(struct connectdata *conn)
   return result;
 }
 
-static CURLcode ftp_state_post_stortype(struct connectdata *conn)
+static CURLcode ftp_state_stor_prequote(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
 
@@ -1261,7 +1554,7 @@ static CURLcode ftp_state_post_stortype(struct connectdata *conn)
   return result;
 }
 
-static CURLcode ftp_state_post_mdtm(struct connectdata *conn)
+static CURLcode ftp_state_type(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct FTP *ftp = conn->data->state.proto.ftp;
@@ -1287,14 +1580,14 @@ static CURLcode ftp_state_post_mdtm(struct connectdata *conn)
       return result;
   }
   else
-    result = ftp_state_post_type(conn);
+    result = ftp_state_size(conn);
 
   return result;
 }
 
 /* This is called after the CWD commands have been done in the beginning of
    the DO phase */
-static CURLcode ftp_state_post_cwd(struct connectdata *conn)
+static CURLcode ftp_state_mdtm(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
@@ -1310,7 +1603,7 @@ static CURLcode ftp_state_post_cwd(struct connectdata *conn)
     state(conn, FTP_MDTM);
   }
   else
-    result = ftp_state_post_mdtm(conn);
+    result = ftp_state_type(conn);
 
   return result;
 }
@@ -1485,7 +1778,7 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
       else {
         if(ftpc->known_filesize != -1) {
           Curl_pgrsSetDownloadSize(data, ftpc->known_filesize);
-          result = ftp_state_post_retr_size(conn, ftpc->known_filesize);
+          result = ftp_state_retr(conn, ftpc->known_filesize);
         }
         else {
           PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file);
@@ -1504,6 +1797,23 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
   return result;
 }
 
+/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV
+   problems */
+static CURLcode ftp_epsv_disable(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
+  /* disable it for next transfer */
+  conn->bits.ftp_use_epsv = FALSE;
+  conn->data->state.errorbuf = FALSE; /* allow error message to get
+                                         rewritten */
+  PPSENDF(&conn->proto.ftpc.pp, "%s", "PASV");
+  conn->proto.ftpc.count1++;
+  /* remain in/go to the FTP_PASV state */
+  state(conn, FTP_PASV);
+  return result;
+}
+
 static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
                                     int ftpcode)
 {
@@ -1548,14 +1858,18 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
             break;
           }
         }
+        if(num > 0xffff) {
+          failf(data, "Illegal port number in EPSV reply");
+          return CURLE_FTP_WEIRD_PASV_REPLY;
+        }
         if(ptr) {
           newport = (unsigned short)(num & 0xffff);
 
           if(conn->bits.tunnel_proxy ||
-             data->set.proxytype == CURLPROXY_SOCKS5 ||
-             data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
-             data->set.proxytype == CURLPROXY_SOCKS4 ||
-             data->set.proxytype == CURLPROXY_SOCKS4A)
+             conn->proxytype == CURLPROXY_SOCKS5 ||
+             conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
+             conn->proxytype == CURLPROXY_SOCKS4 ||
+             conn->proxytype == CURLPROXY_SOCKS4A)
             /* proxy tunnel -> use other host info because ip_addr_str is the
                proxy address not the ftp host */
             snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
@@ -1608,10 +1922,10 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
             ip[0], ip[1], ip[2], ip[3],
             conn->ip_addr_str);
       if(conn->bits.tunnel_proxy ||
-          data->set.proxytype == CURLPROXY_SOCKS5 ||
-          data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
-          data->set.proxytype == CURLPROXY_SOCKS4 ||
-          data->set.proxytype == CURLPROXY_SOCKS4A)
+         conn->proxytype == CURLPROXY_SOCKS5 ||
+         conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
+         conn->proxytype == CURLPROXY_SOCKS4 ||
+         conn->proxytype == CURLPROXY_SOCKS4A)
         /* proxy tunnel -> use other host info because ip_addr_str is the
            proxy address not the ftp host */
         snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
@@ -1625,34 +1939,24 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
   }
   else if(ftpc->count1 == 0) {
     /* EPSV failed, move on to PASV */
-
-    /* disable it for next transfer */
-    conn->bits.ftp_use_epsv = FALSE;
-    infof(data, "disabling EPSV usage\n");
-
-    PPSENDF(&ftpc->pp, "PASV", NULL);
-    ftpc->count1++;
-    /* remain in the FTP_PASV state */
-    return result;
+    return ftp_epsv_disable(conn);
   }
   else {
     failf(data, "Bad PASV/EPSV response: %03d", ftpcode);
     return CURLE_FTP_WEIRD_PASV_REPLY;
   }
 
-  if(data->set.str[STRING_PROXY] && *data->set.str[STRING_PROXY]) {
+  if(conn->bits.proxy) {
     /*
-     * This is a tunnel through a http proxy and we need to connect to the
-     * proxy again here.
-     *
-     * We don't want to rely on a former host lookup that might've expired
-     * now, instead we remake the lookup here and now!
+     * This connection uses a proxy and we need to connect to the proxy again
+     * here. We don't want to rely on a former host lookup that might've
+     * expired now, instead we remake the lookup here and now!
      */
     rc = Curl_resolv(conn, conn->proxy.name, (int)conn->port, &addr);
     if(rc == CURLRESOLV_PENDING)
       /* BLOCKING, ignores the return code but 'addr' will be NULL in
          case of failure */
-      (void)Curl_wait_for_resolv(conn, &addr);
+      (void)Curl_resolver_wait_resolv(conn, &addr);
 
     connectport =
       (unsigned short)conn->port; /* we connect to the proxy's port */
@@ -1668,7 +1972,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
     rc = Curl_resolv(conn, newhost, newport, &addr);
     if(rc == CURLRESOLV_PENDING)
       /* BLOCKING */
-      (void)Curl_wait_for_resolv(conn, &addr);
+      (void)Curl_resolver_wait_resolv(conn, &addr);
 
     connectport = newport; /* we connect to the remote port */
 
@@ -1686,22 +1990,14 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
 
   Curl_resolv_unlock(data, addr); /* we're done using this address */
 
-  if(result && ftpc->count1 == 0 && ftpcode == 229) {
-    infof(data, "got positive EPSV response, but can't connect. "
-          "Disabling EPSV\n");
-    /* disable it for next transfer */
-    conn->bits.ftp_use_epsv = FALSE;
-    data->state.errorbuf = FALSE; /* allow error message to get rewritten */
-    PPSENDF(&ftpc->pp, "PASV", NULL);
-    ftpc->count1++;
-    /* remain in the FTP_PASV state */
-    return result;
- }
+  if(result) {
+    if(ftpc->count1 == 0 && ftpcode == 229)
+      return ftp_epsv_disable(conn);
 
-  if(result)
     return result;
+  }
 
-  conn->bits.tcpconnect = connected; /* simply TRUE or FALSE */
+  conn->bits.tcpconnect[SECONDARYSOCKET] = connected;
 
   /*
    * When this is used from the multi interface, this might've returned with
@@ -1713,24 +2009,25 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
     /* this just dumps information about this second connection */
     ftp_pasv_verbose(conn, conninfo, newhost, connectport);
 
-  switch(data->set.proxytype) {
-#ifndef CURL_DISABLE_PROXY
+  switch(conn->proxytype) {
     /* FIX: this MUST wait for a proper connect first if 'connected' is
      * FALSE */
   case CURLPROXY_SOCKS5:
   case CURLPROXY_SOCKS5_HOSTNAME:
     result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
                          SECONDARYSOCKET, conn);
+    connected = TRUE;
     break;
   case CURLPROXY_SOCKS4:
     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
                          SECONDARYSOCKET, conn, FALSE);
+    connected = TRUE;
     break;
   case CURLPROXY_SOCKS4A:
     result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
                          SECONDARYSOCKET, conn, TRUE);
+    connected = TRUE;
     break;
-#endif /* CURL_DISABLE_PROXY */
   case CURLPROXY_HTTP:
   case CURLPROXY_HTTP_1_0:
     /* do nothing here. handled later. */
@@ -1740,7 +2037,13 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
     result = CURLE_COULDNT_CONNECT;
     break;
   }
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
+
+  if(result) {
+    if(ftpc->count1 == 0 && ftpcode == 229)
+      return ftp_epsv_disable(conn);
+    return result;
+  }
+
   if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
     /* FIX: this MUST wait for a proper connect first if 'connected' is
      * FALSE */
@@ -1763,11 +2066,20 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
 
     data->state.proto.ftp = ftp_save;
 
-    if(CURLE_OK != result)
+    if(result)
+      return result;
+
+    if(conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) {
+      /* the CONNECT procedure is not complete, the tunnel is not yet up */
+      state(conn, FTP_STOP); /* this phase is completed */
+      conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
+
       return result;
+    }
   }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
 
+  conn->bits.tcpconnect[SECONDARYSOCKET] = connected;
+  conn->bits.do_more = TRUE;
   state(conn, FTP_STOP); /* this phase is completed */
 
   return result;
@@ -1801,6 +2113,7 @@ static CURLcode ftp_state_port_resp(struct connectdata *conn,
   else {
     infof(data, "Connect data stream actively\n");
     state(conn, FTP_STOP); /* end of DO phase */
+    result = ftp_dophase_done(conn, FALSE);
   }
 
   return result;
@@ -1841,14 +2154,14 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
          ftpc->file &&
          data->set.get_filetime &&
          (data->info.filetime>=0) ) {
-        struct tm *tm;
         time_t filetime = (time_t)data->info.filetime;
-#ifdef HAVE_GMTIME_R
         struct tm buffer;
-        tm = (struct tm *)gmtime_r(&filetime, &buffer);
-#else
-        tm = gmtime(&filetime);
-#endif
+        const struct tm *tm = &buffer;
+
+        result = Curl_gmtime(filetime, &buffer);
+        if(result)
+          return result;
+
         /* format: "Tue, 15 Nov 1994 12:45:26" */
         snprintf(buf, BUFSIZE-1,
                  "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
@@ -1905,7 +2218,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
   }
 
   if(!result)
-    result = ftp_state_post_mdtm(conn);
+    result = ftp_state_type(conn);
 
   return result;
 }
@@ -1929,18 +2242,18 @@ static CURLcode ftp_state_type_resp(struct connectdata *conn,
           ftpcode);
 
   if(instate == FTP_TYPE)
-    result = ftp_state_post_type(conn);
+    result = ftp_state_size(conn);
   else if(instate == FTP_LIST_TYPE)
-    result = ftp_state_post_listtype(conn);
+    result = ftp_state_list(conn);
   else if(instate == FTP_RETR_TYPE)
-    result = ftp_state_post_retrtype(conn);
+    result = ftp_state_retr_prequote(conn);
   else if(instate == FTP_STOR_TYPE)
-    result = ftp_state_post_stortype(conn);
+    result = ftp_state_stor_prequote(conn);
 
   return result;
 }
 
-static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
+static CURLcode ftp_state_retr(struct connectdata *conn,
                                          curl_off_t filesize)
 {
   CURLcode result = CURLE_OK;
@@ -2045,11 +2358,11 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn,
     }
 #endif
     Curl_pgrsSetDownloadSize(data, filesize);
-    result = ftp_state_post_size(conn);
+    result = ftp_state_rest(conn);
   }
   else if(instate == FTP_RETR_SIZE) {
     Curl_pgrsSetDownloadSize(data, filesize);
-    result = ftp_state_post_retr_size(conn, filesize);
+    result = ftp_state_retr(conn, filesize);
   }
   else if(instate == FTP_STOR_SIZE) {
     data->state.resume_from = filesize;
@@ -2077,7 +2390,7 @@ static CURLcode ftp_state_rest_resp(struct connectdata *conn,
         return result;
     }
 #endif
-    result = ftp_state_post_rest(conn);
+    result = ftp_state_prepare_transfer(conn);
     break;
 
   case FTP_RETR_REST:
@@ -2096,53 +2409,38 @@ static CURLcode ftp_state_rest_resp(struct connectdata *conn,
 }
 
 static CURLcode ftp_state_stor_resp(struct connectdata *conn,
-                                    int ftpcode)
+                                    int ftpcode, ftpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *ftp = data->state.proto.ftp;
 
   if(ftpcode>=400) {
     failf(data, "Failed FTP upload: %0d", ftpcode);
+    state(conn, FTP_STOP);
     /* oops, we never close the sockets! */
     return CURLE_UPLOAD_FAILED;
   }
 
+  conn->proto.ftpc.state_saved = instate;
+
+  /* PORT means we are now awaiting the server to connect to us. */
   if(data->set.ftp_use_port) {
-    /* BLOCKING */
-    /* PORT means we are now awaiting the server to connect to us. */
-    result = AllowServerConnect(conn);
-    if( result )
-      return result;
-  }
+    bool connected;
 
-  if(conn->ssl[SECONDARYSOCKET].use) {
-    /* since we only have a plaintext TCP connection here, we must now
-       do the TLS stuff */
-    infof(data, "Doing the SSL/TLS handshake on the data stream\n");
-    /* BLOCKING */
-    result = Curl_ssl_connect(conn, SECONDARYSOCKET);
+    result = AllowServerConnect(conn, &connected);
     if(result)
       return result;
-  }
-
-  *(ftp->bytecountp)=0;
-
-  /* When we know we're uploading a specified file, we can get the file
-     size prior to the actual upload. */
-
-  Curl_pgrsSetUploadSize(data, data->set.infilesize);
 
-  /* set the SO_SNDBUF for the secondary socket for those who need it */
-  Curl_sndbufset(conn->sock[SECONDARYSOCKET]);
-
-  Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
-                      SECONDARYSOCKET, ftp->bytecountp);
-  state(conn, FTP_STOP);
-
-  conn->proto.ftpc.pp.pending_resp = TRUE; /* expect a server response */
+    if(!connected) {
+      struct ftp_conn *ftpc = &conn->proto.ftpc;
+      infof(data, "Data conn was not available immediately\n");
+      ftpc->wait_data_conn = TRUE;
+    }
 
-  return result;
+    return CURLE_OK;
+  }
+  else
+    return InitiateTransfer(conn);
 }
 
 /* for LIST and RETR responses */
@@ -2160,7 +2458,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
     /*
       A;
       150 Opening BINARY mode data connection for /etc/passwd (2241
-      bytes).  (ok, the file is being transfered)
+      bytes).  (ok, the file is being transferred)
 
       B:
       150 Opening ASCII mode data connection for /bin/ls
@@ -2169,7 +2467,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
       150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes).
 
       D:
-      150 Opening ASCII mode data connection for /linux/fisk/kpanelrc (0.0.0.0,0) (545 bytes).
+      150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes)
 
       E:
       125 Data connection already open; Transfer starting. */
@@ -2192,7 +2490,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
       /*
        * It seems directory listings either don't show the size or very
        * often uses size 0 anyway. ASCII transfers may very well turn out
-       * that the transfered amount of data is not the same as this line
+       * that the transferred amount of data is not the same as this line
        * tells, why using this number in those cases only confuses us.
        *
        * Example D above makes this parsing a little tricky */
@@ -2223,22 +2521,6 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
     else if(ftp->downloadsize > -1)
       size = ftp->downloadsize;
 
-    if(data->set.ftp_use_port) {
-      /* BLOCKING */
-      result = AllowServerConnect(conn);
-      if( result )
-        return result;
-    }
-
-    if(conn->ssl[SECONDARYSOCKET].use) {
-      /* since we only have a plaintext TCP connection here, we must now
-         do the TLS stuff */
-      infof(data, "Doing the SSL/TLS handshake on the data stream\n");
-      result = Curl_ssl_connect(conn, SECONDARYSOCKET);
-      if(result)
-        return result;
-    }
-
     if(size > data->req.maxdownload && data->req.maxdownload > 0)
       size = data->req.size = data->req.maxdownload;
     else if((instate != FTP_LIST) && (data->set.prefer_ascii))
@@ -2250,11 +2532,25 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
       infof(data, "Getting file with size: %" FORMAT_OFF_T "\n", size);
 
     /* FTP download: */
-    Curl_setup_transfer(conn, SECONDARYSOCKET, size, FALSE,
-                        ftp->bytecountp, -1, NULL); /* no upload here */
+    conn->proto.ftpc.state_saved = instate;
+    conn->proto.ftpc.retr_size_saved = size;
 
-    conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */
-    state(conn, FTP_STOP);
+    if(data->set.ftp_use_port) {
+      bool connected;
+
+      result = AllowServerConnect(conn, &connected);
+      if(result)
+        return result;
+
+      if(!connected) {
+        struct ftp_conn *ftpc = &conn->proto.ftpc;
+        infof(data, "Data conn was not available immediately\n");
+        state(conn, FTP_STOP);
+        ftpc->wait_data_conn = TRUE;
+      }
+    }
+    else
+      return InitiateTransfer(conn);
   }
   else {
     if((instate == FTP_LIST) && (ftpcode == 450)) {
@@ -2402,7 +2698,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
   if(pp->sendleft)
     return Curl_pp_flushsend(pp);
 
-  /* we read a piece of response */
   result = ftp_readresp(sock, pp, &ftpcode, &nread);
   if(result)
     return result;
@@ -2411,7 +2706,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
     /* we have now received a full FTP server response */
     switch(ftpc->state) {
     case FTP_WAIT220:
-      if(ftpcode != 220) {
+      if(ftpcode == 230)
+        /* 230 User logged in - already! */
+        return ftp_state_user_resp(conn, ftpcode, ftpc->state);
+      else if(ftpcode != 220) {
         failf(data, "Got a %03d ftp-server response when 220 was expected",
               ftpcode);
         return CURLE_FTP_WEIRD_SERVER_REPLY;
@@ -2435,7 +2733,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
       }
 #endif
 
-      if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
+      if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
         /* We don't have a SSL/TLS connection yet, but FTPS is
            requested. Try a FTPS connection now */
 
@@ -2453,7 +2751,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
         default:
           failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %d",
                 (int)data->set.ftpsslauth);
-          return CURLE_FAILED_INIT; /* we don't know what to do */
+          return CURLE_UNKNOWN_OPTION; /* we don't know what to do */
         }
         PPSENDF(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]);
         state(conn, FTP_AUTH);
@@ -2480,7 +2778,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
         /* Curl_ssl_connect is BLOCKING */
         result = Curl_ssl_connect(conn, FIRSTSOCKET);
         if(CURLE_OK == result) {
-          conn->protocol |= PROT_FTPS;
           conn->ssl[SECONDARYSOCKET].use = FALSE; /* clear-text data */
           result = ftp_state_user(conn);
         }
@@ -2492,7 +2789,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
         /* remain in this same state */
       }
       else {
-        if(data->set.ftp_ssl > CURLUSESSL_TRY)
+        if(data->set.use_ssl > CURLUSESSL_TRY)
           /* we failed and CURLUSESSL_CONTROL or CURLUSESSL_ALL is set */
           result = CURLE_USE_SSL_FAILED;
         else
@@ -2515,7 +2812,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
 
     case FTP_PBSZ:
       PPSENDF(&ftpc->pp, "PROT %c",
-              data->set.ftp_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
+              data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P');
       state(conn, FTP_PROT);
 
       break;
@@ -2524,17 +2821,17 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
       if(ftpcode/100 == 2)
         /* We have enabled SSL for the data connection! */
         conn->ssl[SECONDARYSOCKET].use =
-          (bool)(data->set.ftp_ssl != CURLUSESSL_CONTROL);
+          (data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE;
       /* FTP servers typically responds with 500 if they decide to reject
          our 'P' request */
-      else if(data->set.ftp_ssl > CURLUSESSL_CONTROL)
+      else if(data->set.use_ssl > CURLUSESSL_CONTROL)
         /* we failed and bails out */
         return CURLE_USE_SSL_FAILED;
 
       if(data->set.ftp_ccc) {
         /* CCC - Clear Command Channel
          */
-        PPSENDF(&ftpc->pp, "CCC", NULL);
+        PPSENDF(&ftpc->pp, "%s", "CCC");
         state(conn, FTP_CCC);
       }
       else {
@@ -2572,17 +2869,23 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
           return CURLE_OUT_OF_MEMORY;
 
         /* Reply format is like
-           257<space>"<directory-name>"<space><commentary> and the RFC959
-           says
+           257<space>[rubbish]"<directory-name>"<space><commentary> and the
+           RFC959 says
 
            The directory name can contain any character; embedded
            double-quotes should be escaped by double-quotes (the
            "quote-doubling" convention).
         */
+
+        /* scan for the first double-quote for non-standard responses */
+        while(ptr < &data->state.buffer[sizeof(data->state.buffer)]
+              && *ptr != '\n' && *ptr != '\0' && *ptr != '"')
+          ptr++;
+
         if('\"' == *ptr) {
           /* it started good */
           ptr++;
-          for (store = dir; *ptr;) {
+          for(store = dir; *ptr;) {
             if('\"' == *ptr) {
               if('\"' == ptr[1]) {
                 /* "quote-doubling" */
@@ -2600,12 +2903,6 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
             store++;
             ptr++;
           }
-          if(ftpc->entrypath)
-            free(ftpc->entrypath);
-          ftpc->entrypath =dir; /* remember this */
-          infof(data, "Entry path is '%s'\n", ftpc->entrypath);
-          /* also save it where getinfo can access it: */
-          data->state.most_recent_ftp_entrypath = ftpc->entrypath;
 
           /* If the path name does not look like an absolute path (i.e.: it
              does not start with a '/'), we probably need some server-dependent
@@ -2619,11 +2916,27 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
              if the path name looks strange to minimize overhead on other
              systems. */
 
-          if(!ftpc->server_os && ftpc->entrypath[0] != '/') {
-            PPSENDF(&ftpc->pp, "SYST", NULL);
+          if(!ftpc->server_os && dir[0] != '/') {
+
+            result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST");
+            if(result != CURLE_OK) {
+              free(dir);
+              return result;
+            }
+            Curl_safefree(ftpc->entrypath);
+            ftpc->entrypath = dir; /* remember this */
+            infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+            /* also save it where getinfo can access it: */
+            data->state.most_recent_ftp_entrypath = ftpc->entrypath;
             state(conn, FTP_SYST);
             break;
           }
+
+          Curl_safefree(ftpc->entrypath);
+          ftpc->entrypath = dir; /* remember this */
+          infof(data, "Entry path is '%s'\n", ftpc->entrypath);
+          /* also save it where getinfo can access it: */
+          data->state.most_recent_ftp_entrypath = ftpc->entrypath;
         }
         else {
           /* couldn't get the path */
@@ -2648,24 +2961,33 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
         /* Reply format is like
            215<space><OS-name><space><commentary>
         */
-        while (*ptr == ' ')
+        while(*ptr == ' ')
           ptr++;
-        for (store = os; *ptr && *ptr != ' ';)
+        for(store = os; *ptr && *ptr != ' ';)
           *store++ = *ptr++;
         *store = '\0'; /* zero terminate */
-        ftpc->server_os = os;
 
         /* Check for special servers here. */
 
-        if(strequal(ftpc->server_os, "OS/400")) {
+        if(strequal(os, "OS/400")) {
           /* Force OS400 name format 1. */
-          PPSENDF(&ftpc->pp, "SITE NAMEFMT 1", NULL);
+          result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1");
+          if(result != CURLE_OK) {
+            free(os);
+            return result;
+          }
+          /* remember target server OS */
+          Curl_safefree(ftpc->server_os);
+          ftpc->server_os = os;
           state(conn, FTP_NAMEFMT);
           break;
         }
-      else {
-        /* Nothing special for the target server. */
-       }
+        else {
+          /* Nothing special for the target server. */
+          /* remember target server OS */
+          Curl_safefree(ftpc->server_os);
+          ftpc->server_os = os;
+        }
       }
       else {
         /* Cannot identify server OS. Continue anyway and cross fingers. */
@@ -2691,7 +3013,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
     case FTP_RETR_PREQUOTE:
     case FTP_STOR_PREQUOTE:
       if((ftpcode >= 400) && !ftpc->count2) {
-        /* failure reponse code, and not allowed to fail */
+        /* failure response code, and not allowed to fail */
         failf(conn->data, "QUOT command failed with %03d", ftpcode);
         return CURLE_QUOTE_ERROR;
       }
@@ -2727,7 +3049,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
           PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]);
         }
         else {
-          result = ftp_state_post_cwd(conn);
+          result = ftp_state_mdtm(conn);
           if(result)
             return result;
         }
@@ -2769,7 +3091,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
 
     case FTP_PRET:
       if(ftpcode != 200) {
-       /* there only is this one standard OK return code. */
+        /* there only is this one standard OK return code. */
         failf(data, "PRET command not accepted: %03d", ftpcode);
         return CURLE_FTP_PRET_FAILED;
       }
@@ -2790,7 +3112,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
       break;
 
     case FTP_STOR:
-      result = ftp_state_stor_resp(conn, ftpcode);
+      result = ftp_state_stor_resp(conn, ftpcode, ftpc->state);
       break;
 
     case FTP_QUIT:
@@ -2811,24 +3133,24 @@ static CURLcode ftp_multi_statemach(struct connectdata *conn,
                                     bool *done)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
-  CURLcode result = Curl_pp_multi_statemach(&ftpc->pp);
+  CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE);
 
   /* Check for the state outside of the Curl_socket_ready() return code checks
      since at times we are in fact already in this state when this function
      gets called. */
-  *done = (bool)(ftpc->state == FTP_STOP);
+  *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode ftp_easy_statemach(struct connectdata *conn)
+static CURLcode ftp_block_statemach(struct connectdata *conn)
 {
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   struct pingpong *pp = &ftpc->pp;
   CURLcode result = CURLE_OK;
 
   while(ftpc->state != FTP_STOP) {
-    result = Curl_pp_easy_statemach(pp);
+    result = Curl_pp_statemach(pp, TRUE);
     if(result)
       break;
   }
@@ -2870,9 +3192,9 @@ static CURLcode ftp_init(struct connectdata *conn)
   */
   ftp->user = conn->user;
   ftp->passwd = conn->passwd;
-  if(TRUE == isBadFtpString(ftp->user))
+  if(isBadFtpString(ftp->user))
     return CURLE_URL_MALFORMAT;
-  if(TRUE == isBadFtpString(ftp->passwd))
+  if(isBadFtpString(ftp->passwd))
     return CURLE_URL_MALFORMAT;
 
   conn->proto.ftpc.known_filesize = -1; /* unknown size for now */
@@ -2891,15 +3213,14 @@ static CURLcode ftp_init(struct connectdata *conn)
  * the connection phase.
  *
  * The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
+ *
  */
 static CURLcode ftp_connect(struct connectdata *conn,
                                  bool *done) /* see description above */
 {
   CURLcode result;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
-  struct SessionHandle *data=conn->data;
   struct pingpong *pp = &ftpc->pp;
 
   *done = FALSE; /* default to not done yet */
@@ -2912,7 +3233,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
   if(CURLE_OK != result)
     return result;
 
-  /* We always support persistant connections on ftp */
+  /* We always support persistent connections on ftp */
   conn->bits.close = FALSE;
 
   pp->response_time = RESP_TIMEOUT; /* set default response time-out */
@@ -2920,39 +3241,8 @@ static CURLcode ftp_connect(struct connectdata *conn,
   pp->endofresp = ftp_endofresp;
   pp->conn = conn;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-    /* for FTP over HTTP proxy */
-    struct HTTP http_proxy;
-    struct FTP *ftp_save;
-
+  if(conn->handler->flags & PROTOPT_SSL) {
     /* BLOCKING */
-    /* We want "seamless" FTP operations through HTTP proxy tunnel */
-
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
-     * conn->proto.http; we want FTP through HTTP and we have to change the
-     * member temporarily for connecting to the HTTP proxy. After
-     * Curl_proxyCONNECT we have to set back the member to the original struct
-     * FTP pointer
-     */
-    ftp_save = data->state.proto.ftp;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    data->state.proto.http = &http_proxy;
-
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name, conn->remote_port);
-
-    data->state.proto.ftp = ftp_save;
-
-    if(CURLE_OK != result)
-      return result;
-  }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
-  if(conn->protocol & PROT_FTPS) {
-    /* BLOCKING */
-    /* FTPS is simply ftp with SSL for the control channel */
-    /* now, perform the SSL initialization for this socket */
     result = Curl_ssl_connect(conn, FIRSTSOCKET);
     if(result)
       return result;
@@ -2964,13 +3254,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
      response */
   state(conn, FTP_WAIT220);
 
-  if(data->state.used_interface == Curl_if_multi)
-    result = ftp_multi_statemach(conn, done);
-  else {
-    result = ftp_easy_statemach(conn);
-    if(!result)
-      *done = TRUE;
-  }
+  result = ftp_multi_statemach(conn, done);
 
   return result;
 }
@@ -2993,7 +3277,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
   struct pingpong *pp = &ftpc->pp;
   ssize_t nread;
   int ftpcode;
-  CURLcode result=CURLE_OK;
+  CURLcode result = CURLE_OK;
   bool was_ctl_valid = ftpc->ctl_valid;
   char *path;
   const char *path_to_use = data->state.path;
@@ -3010,8 +3294,11 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
   case CURLE_BAD_DOWNLOAD_RESUME:
   case CURLE_FTP_WEIRD_PASV_REPLY:
   case CURLE_FTP_PORT_FAILED:
+  case CURLE_FTP_ACCEPT_FAILED:
+  case CURLE_FTP_ACCEPT_TIMEOUT:
   case CURLE_FTP_COULDNT_SET_TYPE:
   case CURLE_FTP_COULDNT_RETR_FILE:
+  case CURLE_PARTIAL_FILE:
   case CURLE_UPLOAD_FAILED:
   case CURLE_REMOTE_ACCESS_DENIED:
   case CURLE_FILESIZE_EXCEEDED:
@@ -3051,8 +3338,12 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
   path = curl_easy_unescape(data, path_to_use, 0, NULL);
   if(!path) {
     /* out of memory, but we can limp along anyway (and should try to
-     * since we're in the out of memory cleanup path) */
-    ftpc->prevpath = NULL; /* no path */
+     * since we may already be in the out of memory cleanup path) */
+    if(!result)
+      result = CURLE_OUT_OF_MEMORY;
+    ftpc->ctl_valid = FALSE; /* mark control connection as bad */
+    conn->bits.close = TRUE; /* mark for connection closure */
+    ftpc->prevpath = NULL; /* no path remembering */
   }
   else {
     size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */
@@ -3087,9 +3378,16 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
 #endif
 
   if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
-    if(!result && ftpc->dont_check && data->req.maxdownload > 0)
+    if(!result && ftpc->dont_check && data->req.maxdownload > 0) {
       /* partial download completed */
-      result = Curl_pp_sendf(pp, "ABOR");
+      result = Curl_pp_sendf(pp, "%s", "ABOR");
+      if(result) {
+        failf(data, "Failure sending ABOR command: %s",
+              curl_easy_strerror(result));
+        ftpc->ctl_valid = FALSE; /* mark control connection as bad */
+        conn->bits.close = TRUE; /* mark for connection closure */
+      }
+    }
 
     if(conn->ssl[SECONDARYSOCKET].use) {
       /* The secondary socket is using SSL so we must close down that part
@@ -3100,8 +3398,9 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
          still requested to use SSL */
     }
     if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
-      sclose(conn->sock[SECONDARYSOCKET]);
+      Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
       conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+      conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE;
     }
   }
 
@@ -3110,7 +3409,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
     /*
      * Let's see what the server says about the transfer we just performed,
      * but lower the timeout as sometimes this connection has died while the
-     * data has been transfered. This happens when doing through NATs etc that
+     * data has been transferred. This happens when doing through NATs etc that
      * abandon old silent connections.
      */
     long old_time = pp->response_time;
@@ -3234,7 +3533,7 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
         acceptfail = TRUE;
       }
 
-      FTPSENDF(conn, "%s", cmd);
+      PPSENDF(&conn->proto.ftpc.pp, "%s", cmd);
 
       pp->response = Curl_tvnow(); /* timeout relative now */
 
@@ -3371,31 +3670,104 @@ static CURLcode ftp_range(struct connectdata *conn)
 
 
 /*
- * ftp_nextconnect()
+ * ftp_do_more()
  *
  * This function shall be called when the second FTP (data) connection is
  * connected.
+ *
+ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back
+ * (which basically is only for when PASV is being sent to retry a failed
+ * EPSV).
  */
 
-static CURLcode ftp_nextconnect(struct connectdata *conn)
+static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
 {
   struct SessionHandle *data=conn->data;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
   CURLcode result = CURLE_OK;
+  bool connected = FALSE;
+  bool complete = FALSE;
 
   /* the ftp struct is inited in ftp_connect() */
   struct FTP *ftp = data->state.proto.ftp;
 
-  DEBUGF(infof(data, "DO-MORE phase starts\n"));
+  /* if the second connection isn't done yet, wait for it */
+  if(!conn->bits.tcpconnect[SECONDARYSOCKET]) {
+    if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
+      /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
+         aren't used so we blank their arguments. TODO: make this nicer */
+      result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0);
+
+      return result;
+    }
+
+    result = Curl_is_connected(conn, SECONDARYSOCKET, &connected);
+
+    /* Ready to do more? */
+    if(connected) {
+      DEBUGF(infof(data, "DO-MORE connected phase starts\n"));
+    }
+    else {
+      if(result && (ftpc->count1 == 0)) {
+        *completep = -1; /* go back to DOING please */
+        /* this is a EPSV connect failing, try PASV instead */
+        return ftp_epsv_disable(conn);
+      }
+      return result;
+    }
+  }
+
+  if(ftpc->state) {
+    /* already in a state so skip the intial commands.
+       They are only done to kickstart the do_more state */
+    result = ftp_multi_statemach(conn, &complete);
+
+    *completep = (int)complete;
+
+    /* if we got an error or if we don't wait for a data connection return
+       immediately */
+    if(result || (ftpc->wait_data_conn != TRUE))
+      return result;
+
+    if(ftpc->wait_data_conn)
+      /* if we reach the end of the FTP state machine here, *complete will be
+         TRUE but so is ftpc->wait_data_conn, which says we need to wait for
+         the data connection and therefore we're not actually complete */
+      *completep = 0;
+  }
 
   if(ftp->transfer <= FTPTRANSFER_INFO) {
     /* a transfer is about to take place, or if not a file name was given
        so we'll do a SIZE on it later and then we need the right TYPE first */
 
-    if(data->set.upload) {
+    if(ftpc->wait_data_conn == TRUE) {
+      bool serv_conned;
+
+      result = ReceivedServerConnect(conn, &serv_conned);
+      if(result)
+        return result; /* Failed to accept data connection */
+
+      if(serv_conned) {
+        /* It looks data connection is established */
+        result = AcceptServerConnect(conn);
+        ftpc->wait_data_conn = FALSE;
+        if(!result)
+          result = InitiateTransfer(conn);
+
+        if(result)
+          return result;
+
+        *completep = 1; /* this state is now complete when the server has
+                           connected back to us */
+      }
+    }
+    else if(data->set.upload) {
       result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE);
       if(result)
         return result;
+
+      result = ftp_multi_statemach(conn, &complete);
+      *completep = (int)complete;
     }
     else {
       /* download */
@@ -3422,8 +3794,11 @@ static CURLcode ftp_nextconnect(struct connectdata *conn)
         if(result)
           return result;
       }
+
+      result = ftp_multi_statemach(conn, &complete);
+      *completep = (int)complete;
     }
-    result = ftp_easy_statemach(conn);
+    return result;
   }
 
   if((result == CURLE_OK) && (ftp->transfer != FTPTRANSFER_BODY))
@@ -3431,8 +3806,11 @@ static CURLcode ftp_nextconnect(struct connectdata *conn)
        too! */
     Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
 
-  /* end of transfer */
-  DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+  if(!ftpc->wait_data_conn) {
+    /* no waiting for the data connection so this is now complete */
+    *completep = 1;
+    DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
+  }
 
   return result;
 }
@@ -3463,7 +3841,6 @@ CURLcode ftp_perform(struct connectdata *conn,
     ftp->transfer = FTPTRANSFER_INFO;
   }
 
-
   *dophase_done = FALSE; /* not done yet */
 
   /* start the first command in the DO phase */
@@ -3472,16 +3849,14 @@ CURLcode ftp_perform(struct connectdata *conn,
     return result;
 
   /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi)
-    result = ftp_multi_statemach(conn, dophase_done);
-  else {
-    result = ftp_easy_statemach(conn);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  result = ftp_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[SECONDARYSOCKET];
+
+  infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected);
 
   if(*dophase_done)
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(conn->data, "DO phase is complete1\n"));
 
   return result;
 }
@@ -3512,7 +3887,7 @@ static CURLcode init_wc_data(struct connectdata *conn)
     }
     else {
       wildcard->pattern = strdup(last_slash);
-      if (!wildcard->pattern)
+      if(!wildcard->pattern)
         return CURLE_OUT_OF_MEMORY;
       last_slash[0] = '\0'; /* cut file from path */
     }
@@ -3520,7 +3895,7 @@ static CURLcode init_wc_data(struct connectdata *conn)
   else { /* there is only 'wildcard pattern' or nothing */
     if(path[0]) {
       wildcard->pattern = strdup(path);
-      if (!wildcard->pattern)
+      if(!wildcard->pattern)
         return CURLE_OUT_OF_MEMORY;
       path[0] = '\0';
     }
@@ -3535,15 +3910,17 @@ static CURLcode init_wc_data(struct connectdata *conn)
      resources for wildcard transfer */
 
   /* allocate ftp protocol specific temporary wildcard data */
-  ftp_tmp = malloc(sizeof(struct ftp_wc_tmpdata));
+  ftp_tmp = calloc(1, sizeof(struct ftp_wc_tmpdata));
   if(!ftp_tmp) {
+    Curl_safefree(wildcard->pattern);
     return CURLE_OUT_OF_MEMORY;
   }
 
   /* INITIALIZE parselist structure */
   ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
   if(!ftp_tmp->parser) {
-    free(ftp_tmp);
+    Curl_safefree(wildcard->pattern);
+    Curl_safefree(ftp_tmp);
     return CURLE_OUT_OF_MEMORY;
   }
 
@@ -3557,23 +3934,31 @@ static CURLcode init_wc_data(struct connectdata *conn)
   /* try to parse ftp url */
   ret = ftp_parse_url_path(conn);
   if(ret) {
+    Curl_safefree(wildcard->pattern);
+    wildcard->tmp_dtor(wildcard->tmp);
+    wildcard->tmp_dtor = ZERO_NULL;
+    wildcard->tmp = NULL;
     return ret;
   }
 
+  wildcard->path = strdup(conn->data->state.path);
+  if(!wildcard->path) {
+    Curl_safefree(wildcard->pattern);
+    wildcard->tmp_dtor(wildcard->tmp);
+    wildcard->tmp_dtor = ZERO_NULL;
+    wildcard->tmp = NULL;
+    return CURLE_OUT_OF_MEMORY;
+  }
+
   /* backup old write_function */
   ftp_tmp->backup.write_function = conn->data->set.fwrite_func;
-  /* parsing write function (callback included directly from ftplistparser.c) */
+  /* parsing write function */
   conn->data->set.fwrite_func = Curl_ftp_parselist;
   /* backup old file descriptor */
   ftp_tmp->backup.file_descriptor = conn->data->set.out;
   /* let the writefunc callback know what curl pointer is working with */
   conn->data->set.out = conn;
 
-  wildcard->path = strdup(conn->data->state.path);
-  if(!wildcard->path) {
-    return CURLE_OUT_OF_MEMORY;
-  }
-
   infof(conn->data, "Wildcard - Parsing started\n");
   return CURLE_OK;
 }
@@ -3600,6 +3985,8 @@ static CURLcode wc_statemach(struct connectdata *conn)
     struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp;
     conn->data->set.fwrite_func = ftp_tmp->backup.write_function;
     conn->data->set.out = ftp_tmp->backup.file_descriptor;
+    ftp_tmp->backup.write_function = ZERO_NULL;
+    ftp_tmp->backup.file_descriptor = NULL;
     wildcard->state = CURLWC_DOWNLOADING;
 
     if(Curl_ftp_parselist_geterror(ftp_tmp->parser)) {
@@ -3619,20 +4006,14 @@ static CURLcode wc_statemach(struct connectdata *conn)
     /* filelist has at least one file, lets get first one */
     struct ftp_conn *ftpc = &conn->proto.ftpc;
     struct curl_fileinfo *finfo = wildcard->filelist->head->ptr;
-    char *tmp_path = malloc(strlen(conn->data->state.path) +
-                      strlen(finfo->filename) + 1);
-    if(!tmp_path) {
+
+    char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename);
+    if(!tmp_path)
       return CURLE_OUT_OF_MEMORY;
-    }
 
-    tmp_path[0] = 0;
-    /* make full path to matched file */
-    strcat(tmp_path, wildcard->path);
-    strcat(tmp_path, finfo->filename);
     /* switch default "state.pathbuffer" and tmp_path, good to see
        ftp_parse_url_path function to understand this trick */
-    if(conn->data->state.pathbuffer)
-      free(conn->data->state.pathbuffer);
+    Curl_safefree(conn->data->state.pathbuffer);
     conn->data->state.pathbuffer = tmp_path;
     conn->data->state.path = tmp_path;
 
@@ -3713,8 +4094,10 @@ static CURLcode wc_statemach(struct connectdata *conn)
 static CURLcode ftp_do(struct connectdata *conn, bool *done)
 {
   CURLcode retcode = CURLE_OK;
+  struct ftp_conn *ftpc = &conn->proto.ftpc;
 
   *done = FALSE; /* default to false */
+  ftpc->wait_data_conn = FALSE; /* default to no such wait */
 
   /*
     Since connections can be re-used between SessionHandles, this might be a
@@ -3764,21 +4147,18 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
 
   va_list ap;
   va_start(ap, fmt);
-  vsnprintf(s, SBUF_SIZE-3, fmt, ap);
+  write_len = vsnprintf(s, SBUF_SIZE-3, fmt, ap);
   va_end(ap);
 
-  strcat(s, "\r\n"); /* append a trailing CRLF */
+  strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */
+  write_len +=2;
 
   bytes_written=0;
-  write_len = strlen(s);
 
-#ifdef CURL_DOES_CONVERSIONS
   res = Curl_convert_to_network(conn->data, s, write_len);
   /* Curl_convert_to_network calls failf if unsuccessful */
-  if(res != CURLE_OK) {
+  if(res)
     return(res);
-  }
-#endif /* CURL_DOES_CONVERSIONS */
 
   for(;;) {
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
@@ -3824,10 +4204,19 @@ static CURLcode ftp_quit(struct connectdata *conn)
   CURLcode result = CURLE_OK;
 
   if(conn->proto.ftpc.ctl_valid) {
-    PPSENDF(&conn->proto.ftpc.pp, "QUIT", NULL);
+    result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "QUIT");
+    if(result) {
+      failf(conn->data, "Failure sending QUIT command: %s",
+            curl_easy_strerror(result));
+      conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */
+      conn->bits.close = TRUE; /* mark for connection closure */
+      state(conn, FTP_STOP);
+      return result;
+    }
+
     state(conn, FTP_QUIT);
 
-    result = ftp_easy_statemach(conn);
+    result = ftp_block_statemach(conn);
   }
 
   return result;
@@ -3943,12 +4332,17 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
     }
     slash_pos=strrchr(cur_pos, '/');
     if(slash_pos || !*cur_pos) {
+      size_t dirlen = slash_pos-cur_pos;
+
       ftpc->dirs = calloc(1, sizeof(ftpc->dirs[0]));
       if(!ftpc->dirs)
         return CURLE_OUT_OF_MEMORY;
 
+      if(!dirlen)
+        dirlen++;
+
       ftpc->dirs[0] = curl_easy_unescape(conn->data, slash_pos ? cur_pos : "/",
-                                         slash_pos?(int)(slash_pos-cur_pos):1,
+                                         slash_pos ? curlx_sztosi(dirlen) : 1,
                                          NULL);
       if(!ftpc->dirs[0]) {
         freedirs(ftpc);
@@ -3985,9 +4379,9 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
         /* seek out the next path component */
         if(slash_pos-cur_pos) {
           /* we skip empty path components, like "x//y" since the FTP command
-             CWD requires a parameter and a non-existant parameter a) doesn't
+             CWD requires a parameter and a non-existent parameter a) doesn't
              work on many servers and b) has no effect on the others. */
-          int len = (int)(slash_pos - cur_pos + absolute_dir);
+          int len = curlx_sztosi(slash_pos - cur_pos + absolute_dir);
           ftpc->dirs[ftpc->dirdepth] =
             curl_easy_unescape(conn->data, cur_pos - absolute_dir, len, NULL);
           if(!ftpc->dirs[ftpc->dirdepth]) { /* run out of memory ... */
@@ -4003,20 +4397,29 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
         }
         else {
           cur_pos = slash_pos + 1; /* jump to the rest of the string */
+          if(!ftpc->dirdepth) {
+            /* path starts with a slash, add that as a directory */
+            ftpc->dirs[ftpc->dirdepth] = strdup("/");
+            if(!ftpc->dirs[ftpc->dirdepth++]) { /* run out of memory ... */
+              failf(data, "no memory");
+              freedirs(ftpc);
+              return CURLE_OUT_OF_MEMORY;
+            }
+          }
           continue;
         }
 
         cur_pos = slash_pos + 1; /* jump to the rest of the string */
         if(++ftpc->dirdepth >= ftpc->diralloc) {
           /* enlarge array */
-          char *bigger;
+          char **bigger;
           ftpc->diralloc *= 2; /* double the size each time */
           bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0]));
           if(!bigger) {
             freedirs(ftpc);
             return CURLE_OUT_OF_MEMORY;
           }
-          ftpc->dirs = (char **)bigger;
+          ftpc->dirs = bigger;
         }
       }
     }
@@ -4058,8 +4461,8 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
       return CURLE_OUT_OF_MEMORY;
     }
 
-    dlen -= ftpc->file?(int)strlen(ftpc->file):0;
-    if((dlen == (int)strlen(ftpc->prevpath)) &&
+    dlen -= ftpc->file?curlx_uztosi(strlen(ftpc->file)):0;
+    if((dlen == curlx_uztosi(strlen(ftpc->prevpath))) &&
        strnequal(path, ftpc->prevpath, dlen)) {
       infof(data, "Request has same path as previous transfer\n");
       ftpc->cwddone = TRUE;
@@ -4074,18 +4477,21 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
 static CURLcode ftp_dophase_done(struct connectdata *conn,
                                  bool connected)
 {
-  CURLcode result = CURLE_OK;
   struct FTP *ftp = conn->data->state.proto.ftp;
   struct ftp_conn *ftpc = &conn->proto.ftpc;
 
-  if(connected)
-    result = ftp_nextconnect(conn);
+  if(connected) {
+    int completed;
+    CURLcode result = ftp_do_more(conn, &completed);
 
-  if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) {
-    /* Failure detected, close the second socket if it was created already */
-    sclose(conn->sock[SECONDARYSOCKET]);
-    conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
-    return result;
+    if(result) {
+      if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) {
+        /* close the second socket if it was created already */
+        Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
+        conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
+      }
+      return result;
+    }
   }
 
   if(ftp->transfer != FTPTRANSFER_BODY)
@@ -4097,20 +4503,21 @@ static CURLcode ftp_dophase_done(struct connectdata *conn,
 
   ftpc->ctl_valid = TRUE; /* seems good */
 
-  return result;
+  return CURLE_OK;
 }
 
 /* called from multi.c while DOing */
 static CURLcode ftp_doing(struct connectdata *conn,
-                               bool *dophase_done)
+                          bool *dophase_done)
 {
-  CURLcode result;
-  result = ftp_multi_statemach(conn, dophase_done);
+  CURLcode result = ftp_multi_statemach(conn, dophase_done);
 
-  if(*dophase_done) {
+  if(result)
+    DEBUGF(infof(conn->data, "DO phase failed\n"));
+  else if(*dophase_done) {
     result = ftp_dophase_done(conn, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    DEBUGF(infof(conn->data, "DO phase is complete2\n"));
   }
   return result;
 }
@@ -4155,6 +4562,7 @@ CURLcode ftp_regular_transfer(struct connectdata *conn,
       return CURLE_OK;
 
     result = ftp_dophase_done(conn, connected);
+
     if(result)
       return result;
   }
index d8ef348..bdd59c9 100644 (file)
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -66,7 +66,7 @@ typedef enum {
   FTP_STOR_TYPE, /* set type when about to STOR a file */
   FTP_SIZE, /* get the remote file's size for head-like request */
   FTP_RETR_SIZE, /* get the remote file's size for RETR */
-  FTP_STOR_SIZE, /* get the size for (resumed) STOR */
+  FTP_STOR_SIZE, /* get the size for STOR */
   FTP_REST, /* when used to check if the server supports it in head-like */
   FTP_RETR_REST, /* when asking for "resume" in for RETR */
   FTP_PORT, /* generic state for PORT, LPRT and EPRT, check count1 */
@@ -93,16 +93,10 @@ struct ftp_wc_tmpdata {
 typedef enum {
   FTPFILE_MULTICWD  = 1, /* as defined by RFC1738 */
   FTPFILE_NOCWD     = 2, /* use SIZE / RETR / STOR on the full path */
-  FTPFILE_SINGLECWD = 3  /* make one CWD, then SIZE / RETR / STOR on the file */
+  FTPFILE_SINGLECWD = 3  /* make one CWD, then SIZE / RETR / STOR on the
+                            file */
 } curl_ftpfile;
 
-typedef enum {
-  FTPTRANSFER_BODY, /* yes do transfer a body */
-  FTPTRANSFER_INFO, /* do still go through to get info/headers */
-  FTPTRANSFER_NONE, /* don't get anything and don't get info */
-  FTPTRANSFER_LAST  /* end of list marker, never used */
-} curl_ftptransfer;
-
 /* This FTP struct is used in the SessionHandle. All FTP data that is
    connection-oriented must be in FTP_conn to properly deal with the fact that
    perhaps the SessionHandle is changed between the times the connection is
@@ -114,7 +108,7 @@ struct FTP {
 
   /* transfer a file/body or not, done as a typedefed enum just to make
      debuggers display the full symbol and not just the numerical value */
-  curl_ftptransfer transfer;
+  curl_pp_transfer transfer;
   curl_off_t downloadsize;
 };
 
@@ -138,6 +132,7 @@ struct ftp_conn {
                        already has been done */
   bool cwdfail;     /* set TRUE if a CWD command fails, as then we must prevent
                        caching the current directory */
+  bool wait_data_conn; /* this is set TRUE if data connection is waited */
   char *prevpath;   /* conn->path from the previous transfer */
   char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a
                         and others (A/I or zero) */
@@ -145,9 +140,15 @@ struct ftp_conn {
   int count2; /* general purpose counter for the state machine */
   int count3; /* general purpose counter for the state machine */
   ftpstate state; /* always use ftp.c:state() to change state! */
+  ftpstate state_saved; /* transfer type saved to be reloaded after
+                           data connection is established */
+  curl_off_t retr_size_saved; /* Size of retrieved file saved */
   char * server_os;     /* The target server operating system. */
   curl_off_t known_filesize; /* file size is different from -1, if wildcard
-                                LIST parsing was done and wc_statemach set it */
+                                LIST parsing was done and wc_statemach set
+                                it */
 };
 
+#define DEFAULT_ACCEPT_TIMEOUT   60000 /* milliseconds == one minute */
+
 #endif /* HEADER_CURL_FTP_H */
index c59ea7e..cb3601f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * 01-29-97 11:32PM <DIR> prog
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <time.h>
+#ifndef CURL_DISABLE_FTP
 
-#include "ftplistparser.h"
-#include "curl_fnmatch.h"
+#include <curl/curl.h>
 
 #include "urldata.h"
-#include "ftp.h"
 #include "fileinfo.h"
 #include "llist.h"
 #include "strtoofft.h"
 #include "rawstr.h"
 #include "ftp.h"
+#include "ftplistparser.h"
+#include "curl_fnmatch.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -329,7 +329,8 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
     compare = Curl_fnmatch;
 
   /* filter pattern-corresponding filenames */
-  if(compare(conn->data->set.fnmatch_data, wc->pattern, finfo->filename) == 0) {
+  if(compare(conn->data->set.fnmatch_data, wc->pattern,
+             finfo->filename) == 0) {
     /* discard symlink which is containing multiple " -> " */
     if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target &&
        (strstr(finfo->strings.target, " -> "))) {
@@ -447,9 +448,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
           else if(c == '\n') {
             finfo->b_data[parser->item_length - 1] = 0;
             if(strncmp("total ", finfo->b_data, 6) == 0) {
-              char *endptr = NULL;
+              char *endptr = finfo->b_data+6;
               /* here we can deal with directory size */
-              curlx_strtoofft(finfo->b_data+6, &endptr, 10);
+              while(ISSPACE(*endptr))
+                endptr++;
               if(*endptr != 0) {
                 PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
                 return bufflen;
@@ -644,7 +646,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
             parser->state.UNIX.main = PL_UNIX_TIME;
             parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART1;
           }
-          else if (!ISDIGIT(c)) {
+          else if(!ISDIGIT(c)) {
             PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
             return bufflen;
           }
@@ -959,7 +961,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
             }
             else {
               char *endptr;
-              finfo->size = curlx_strtoofft(finfo->b_data + parser->item_offset,
+              finfo->size = curlx_strtoofft(finfo->b_data +
+                                            parser->item_offset,
                                             &endptr, 10);
               if(!*endptr) {
                 if(finfo->size == CURL_OFF_T_MAX ||
@@ -1043,3 +1046,5 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
 
   return bufflen;
 }
+
+#endif /* CURL_DISABLE_FTP */
index 67a06c2..96764e2 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,8 +21,9 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
-#include <curl/curl.h>
+#ifndef CURL_DISABLE_FTP
 
 /* WRITEFUNCTION callback for parsing LIST responses */
 size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
@@ -36,4 +37,5 @@ struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void);
 
 void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data);
 
+#endif /* CURL_DISABLE_FTP */
 #endif /* HEADER_CURL_FTPLISTPARSER_H */
index 36fbb75..36215aa 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __VMS
-#include <unixlib.h>
-#endif
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 #include "curl_memory.h"
@@ -46,14 +38,10 @@ char *GetEnv(const char *variable)
   char *temp = getenv(variable);
   env[0] = '\0';
   if(temp != NULL)
-    ExpandEnvironmentStrings(temp, env, sizeof(env));
+    ExpandEnvironmentStringsA(temp, env, sizeof(env));
   return (env[0] != '\0')?strdup(env):NULL;
 #else
   char *env = getenv(variable);
-#ifdef __VMS
-  if(env && strcmp("HOME",variable) == 0)
-    env = decc_translate_vms(env);
-#endif
   return (env && env[0])?strdup(env):NULL;
 #endif
 #endif
index 9466862..3d09dc6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 
 #include "urldata.h"
 #include "getinfo.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
 #include "curl_memory.h"
 #include "sslgen.h"
 #include "connect.h" /* Curl_getconnectinfo() */
@@ -50,14 +46,16 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
 
   pro->t_nslookup = 0;
   pro->t_connect = 0;
+  pro->t_appconnect = 0;
   pro->t_pretransfer = 0;
   pro->t_starttransfer = 0;
   pro->timespent = 0;
   pro->t_redirect = 0;
 
   info->httpcode = 0;
-  info->httpversion=0;
-  info->filetime=-1; /* -1 is an illegal time and thus means unknown */
+  info->httpversion = 0;
+  info->filetime = -1; /* -1 is an illegal time and thus means unknown */
+  info->timecond = FALSE;
 
   if(info->contenttype)
     free(info->contenttype);
@@ -75,56 +73,62 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
   return CURLE_OK;
 }
 
-CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
+static CURLcode getinfo_char(struct SessionHandle *data, CURLINFO info,
+                             char **param_charp)
 {
-  va_list arg;
-  long *param_longp=NULL;
-  double *param_doublep=NULL;
-  char **param_charp=NULL;
-  struct curl_slist **param_slistp=NULL;
-  int type;
-  curl_socket_t sockfd;
-
-  union {
-    struct curl_certinfo * to_certinfo;
-    struct curl_slist    * to_slist;
-  } ptr;
-
-  if(!data)
-    return CURLE_BAD_FUNCTION_ARGUMENT;
-
-  va_start(arg, info);
-
-  type = CURLINFO_TYPEMASK & (int)info;
-  switch(type) {
-  case CURLINFO_STRING:
-    param_charp = va_arg(arg, char **);
-    if(NULL == param_charp)
-      return CURLE_BAD_FUNCTION_ARGUMENT;
+  switch(info) {
+  case CURLINFO_EFFECTIVE_URL:
+    *param_charp = data->change.url?data->change.url:(char *)"";
     break;
-  case CURLINFO_LONG:
-    param_longp = va_arg(arg, long *);
-    if(NULL == param_longp)
-      return CURLE_BAD_FUNCTION_ARGUMENT;
+  case CURLINFO_CONTENT_TYPE:
+    *param_charp = data->info.contenttype;
     break;
-  case CURLINFO_DOUBLE:
-    param_doublep = va_arg(arg, double *);
-    if(NULL == param_doublep)
-      return CURLE_BAD_FUNCTION_ARGUMENT;
+  case CURLINFO_PRIVATE:
+    *param_charp = (char *) data->set.private_data;
     break;
-  case CURLINFO_SLIST:
-    param_slistp = va_arg(arg, struct curl_slist **);
-    if(NULL == param_slistp)
-      return CURLE_BAD_FUNCTION_ARGUMENT;
+  case CURLINFO_FTP_ENTRY_PATH:
+    /* Return the entrypath string from the most recent connection.
+       This pointer was copied from the connectdata structure by FTP.
+       The actual string may be free()ed by subsequent libcurl calls so
+       it must be copied to a safer area before the next libcurl call.
+       Callers must never free it themselves. */
+    *param_charp = data->state.most_recent_ftp_entrypath;
+    break;
+  case CURLINFO_REDIRECT_URL:
+    /* Return the URL this request would have been redirected to if that
+       option had been enabled! */
+    *param_charp = data->info.wouldredirect;
     break;
+  case CURLINFO_PRIMARY_IP:
+    /* Return the ip address of the most recent (primary) connection */
+    *param_charp = data->info.conn_primary_ip;
+    break;
+  case CURLINFO_LOCAL_IP:
+    /* Return the source/local ip address of the most recent (primary)
+       connection */
+    *param_charp = data->info.conn_local_ip;
+    break;
+  case CURLINFO_RTSP_SESSION_ID:
+    *param_charp = data->set.str[STRING_RTSP_SESSION_ID];
+    break;
+
   default:
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }
+  return CURLE_OK;
+}
+
+static CURLcode getinfo_long(struct SessionHandle *data, CURLINFO info,
+                             long *param_longp)
+{
+  curl_socket_t sockfd;
+
+  union {
+    unsigned long *to_ulong;
+    long          *to_long;
+  } lptr;
 
   switch(info) {
-  case CURLINFO_EFFECTIVE_URL:
-    *param_charp = data->change.url?data->change.url:(char *)"";
-    break;
   case CURLINFO_RESPONSE_CODE:
     *param_longp = data->info.httpcode;
     break;
@@ -140,6 +144,70 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
   case CURLINFO_REQUEST_SIZE:
     *param_longp = data->info.request_size;
     break;
+  case CURLINFO_SSL_VERIFYRESULT:
+    *param_longp = data->set.ssl.certverifyresult;
+    break;
+  case CURLINFO_REDIRECT_COUNT:
+    *param_longp = data->set.followlocation;
+    break;
+  case CURLINFO_HTTPAUTH_AVAIL:
+    lptr.to_long = param_longp;
+    *lptr.to_ulong = data->info.httpauthavail;
+    break;
+  case CURLINFO_PROXYAUTH_AVAIL:
+    lptr.to_long = param_longp;
+    *lptr.to_ulong = data->info.proxyauthavail;
+    break;
+  case CURLINFO_OS_ERRNO:
+    *param_longp = data->state.os_errno;
+    break;
+  case CURLINFO_NUM_CONNECTS:
+    *param_longp = data->info.numconnects;
+    break;
+  case CURLINFO_LASTSOCKET:
+    sockfd = Curl_getconnectinfo(data, NULL);
+
+    /* note: this is not a good conversion for systems with 64 bit sockets and
+       32 bit longs */
+    if(sockfd != CURL_SOCKET_BAD)
+      *param_longp = (long)sockfd;
+    else
+      /* this interface is documented to return -1 in case of badness, which
+         may not be the same as the CURL_SOCKET_BAD value */
+      *param_longp = -1;
+    break;
+  case CURLINFO_PRIMARY_PORT:
+    /* Return the (remote) port of the most recent (primary) connection */
+    *param_longp = data->info.conn_primary_port;
+    break;
+  case CURLINFO_LOCAL_PORT:
+    /* Return the local port of the most recent (primary) connection */
+    *param_longp = data->info.conn_local_port;
+    break;
+  case CURLINFO_CONDITION_UNMET:
+    /* return if the condition prevented the document to get transferred */
+    *param_longp = data->info.timecond ? 1L : 0L;
+    break;
+  case CURLINFO_RTSP_CLIENT_CSEQ:
+    *param_longp = data->state.rtsp_next_client_CSeq;
+    break;
+  case CURLINFO_RTSP_SERVER_CSEQ:
+    *param_longp = data->state.rtsp_next_server_CSeq;
+    break;
+  case CURLINFO_RTSP_CSEQ_RECV:
+    *param_longp = data->state.rtsp_CSeq_recv;
+    break;
+
+  default:
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+  }
+  return CURLE_OK;
+}
+
+static CURLcode getinfo_double(struct SessionHandle *data, CURLINFO info,
+                               double *param_doublep)
+{
+  switch(info) {
   case CURLINFO_TOTAL_TIME:
     *param_doublep = data->progress.timespent;
     break;
@@ -170,9 +238,6 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
   case CURLINFO_SPEED_UPLOAD:
     *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.flags & PGRS_DL_SIZE_KNOWN)?
       (double)data->progress.size_dl:-1;
@@ -184,100 +249,83 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
   case CURLINFO_REDIRECT_TIME:
     *param_doublep =  data->progress.t_redirect;
     break;
-  case CURLINFO_REDIRECT_COUNT:
-    *param_longp = data->set.followlocation;
-    break;
-  case CURLINFO_CONTENT_TYPE:
-    *param_charp = data->info.contenttype;
-    break;
-  case CURLINFO_PRIVATE:
-    *param_charp = (char *) data->set.private_data;
-    break;
-  case CURLINFO_HTTPAUTH_AVAIL:
-    *param_longp = data->info.httpauthavail;
-    break;
-  case CURLINFO_PROXYAUTH_AVAIL:
-    *param_longp = data->info.proxyauthavail;
-    break;
-  case CURLINFO_OS_ERRNO:
-    *param_longp = data->state.os_errno;
-    break;
-  case CURLINFO_NUM_CONNECTS:
-    *param_longp = data->info.numconnects;
-    break;
+
+  default:
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+  }
+  return CURLE_OK;
+}
+
+static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
+                              struct curl_slist **param_slistp)
+{
+  union {
+    struct curl_certinfo * to_certinfo;
+    struct curl_slist    * to_slist;
+  } ptr;
+
+  switch(info) {
   case CURLINFO_SSL_ENGINES:
     *param_slistp = Curl_ssl_engines_list(data);
     break;
   case CURLINFO_COOKIELIST:
     *param_slistp = Curl_cookie_list(data);
     break;
-  case CURLINFO_FTP_ENTRY_PATH:
-    /* Return the entrypath string from the most recent connection.
-       This pointer was copied from the connectdata structure by FTP.
-       The actual string may be free()ed by subsequent libcurl calls so
-       it must be copied to a safer area before the next libcurl call.
-       Callers must never free it themselves. */
-    *param_charp = data->state.most_recent_ftp_entrypath;
-    break;
-  case CURLINFO_LASTSOCKET:
-    sockfd = Curl_getconnectinfo(data, NULL);
-
-    /* note: this is not a good conversion for systems with 64 bit sockets and
-       32 bit longs */
-    if(sockfd != CURL_SOCKET_BAD)
-      *param_longp = (long)sockfd;
-    else
-      /* this interface is documented to return -1 in case of badness, which
-         may not be the same as the CURL_SOCKET_BAD value */
-      *param_longp = -1;
-    break;
-  case CURLINFO_REDIRECT_URL:
-    /* Return the URL this request would have been redirected to if that
-       option had been enabled! */
-    *param_charp = data->info.wouldredirect;
-    break;
-  case CURLINFO_PRIMARY_IP:
-    /* Return the ip address of the most recent (primary) connection */
-    *param_charp = data->info.conn_primary_ip;
-    break;
-  case CURLINFO_PRIMARY_PORT:
-    /* Return the (remote) port of the most recent (primary) connection */
-    *param_longp = data->info.conn_primary_port;
-    break;
-  case CURLINFO_LOCAL_IP:
-    /* Return the source/local ip address of the most recent (primary)
-       connection */
-    *param_charp = data->info.conn_local_ip;
-    break;
-  case CURLINFO_LOCAL_PORT:
-    /* Return the local port of the most recent (primary) connection */
-    *param_longp = data->info.conn_local_port;
-    break;
   case CURLINFO_CERTINFO:
     /* Return the a pointer to the certinfo struct. Not really an slist
        pointer but we can pretend it is here */
     ptr.to_certinfo = &data->info.certs;
     *param_slistp = ptr.to_slist;
     break;
-  case CURLINFO_CONDITION_UNMET:
-    /* return if the condition prevented the document to get transfered */
-    *param_longp = data->info.timecond;
-    break;
-  case CURLINFO_RTSP_SESSION_ID:
-    *param_charp = data->set.str[STRING_RTSP_SESSION_ID];
+
+  default:
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+  }
+  return CURLE_OK;
+}
+
+CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
+{
+  va_list arg;
+  long *param_longp=NULL;
+  double *param_doublep=NULL;
+  char **param_charp=NULL;
+  struct curl_slist **param_slistp=NULL;
+  int type;
+  /* default return code is to error out! */
+  CURLcode ret = CURLE_BAD_FUNCTION_ARGUMENT;
+
+  if(!data)
+    return ret;
+
+  va_start(arg, info);
+
+  type = CURLINFO_TYPEMASK & (int)info;
+  switch(type) {
+  case CURLINFO_STRING:
+    param_charp = va_arg(arg, char **);
+    if(NULL != param_charp)
+      ret = getinfo_char(data, info, param_charp);
     break;
-  case CURLINFO_RTSP_CLIENT_CSEQ:
-    *param_longp = data->state.rtsp_next_client_CSeq;
+  case CURLINFO_LONG:
+    param_longp = va_arg(arg, long *);
+    if(NULL != param_longp)
+      ret = getinfo_long(data, info, param_longp);
     break;
-  case CURLINFO_RTSP_SERVER_CSEQ:
-    *param_longp = data->state.rtsp_next_server_CSeq;
+  case CURLINFO_DOUBLE:
+    param_doublep = va_arg(arg, double *);
+    if(NULL != param_doublep)
+      ret = getinfo_double(data, info, param_doublep);
     break;
-  case CURLINFO_RTSP_CSEQ_RECV:
-    *param_longp = data->state.rtsp_CSeq_recv;
+  case CURLINFO_SLIST:
+    param_slistp = va_arg(arg, struct curl_slist **);
+    if(NULL != param_slistp)
+      ret = getinfo_slist(data, info, param_slistp);
     break;
-
   default:
-    return CURLE_BAD_FUNCTION_ARGUMENT;
+    break;
   }
-  return CURLE_OK;
+
+  va_end(arg);
+  return ret;
 }
index 3d8fcff..b1dd65f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_GOPHER
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <netdb.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
+#include "curl_memory.h"
 /* The last #include file should be: */
 #include "memdebug.h"
 
-
 /*
  * Forward declarations.
  */
@@ -110,10 +67,13 @@ const struct Curl_handler Curl_handler_gopher = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_GOPHER,                          /* defport */
-  PROT_GOPHER                           /* protocol */
+  CURLPROTO_GOPHER,                     /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
 static CURLcode gopher_do(struct connectdata *conn, bool *done)
@@ -131,7 +91,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
   *done = TRUE; /* unconditionally */
 
   /* Create selector. Degenerate cases: / and /1 => convert to "" */
-  if (strlen(path) <= 2)
+  if(strlen(path) <= 2)
     sel = (char *)"";
   else {
     char *newp;
@@ -150,7 +110,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
 
     /* ... and finally unescape */
     sel = curl_easy_unescape(data, newp, 0, &len);
-    if (!sel)
+    if(!sel)
       return CURLE_OUT_OF_MEMORY;
     sel_org = sel;
   }
@@ -161,7 +121,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
 
   for(;;) {
     result = Curl_write(conn, sockfd, sel, k, &amount);
-    if (CURLE_OK == result) { /* Which may not have written it all! */
+    if(CURLE_OK == result) { /* Which may not have written it all! */
       result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount);
       if(result) {
         Curl_safefree(sel_org);
@@ -169,7 +129,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
       }
       k -= amount;
       sel += amount;
-      if (k < 1)
+      if(k < 1)
         break; /* but it did write it all */
     }
     else {
@@ -194,7 +154,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
   /* We can use Curl_sendf to send the terminal \r\n relatively safely and
      save allocing another string/doing another _write loop. */
   result = Curl_sendf(sockfd, conn, "\r\n");
-  if (result != CURLE_OK) {
+  if(result != CURLE_OK) {
     failf(data, "Failed sending Gopher request");
     return result;
   }
diff --git a/lib/gskit.c b/lib/gskit.c
new file mode 100644 (file)
index 0000000..5cda85b
--- /dev/null
@@ -0,0 +1,906 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#ifdef USE_GSKIT
+
+#include <gskssl.h>
+#include <qsoasync.h>
+
+/* Some symbols are undefined/unsupported on OS400 versions < V7R1. */
+#ifndef GSK_SSL_EXTN_SERVERNAME_REQUEST
+#define GSK_SSL_EXTN_SERVERNAME_REQUEST                 230
+#endif
+
+#ifdef HAVE_LIMITS_H
+#  include <limits.h>
+#endif
+
+#include <curl/curl.h>
+#include "urldata.h"
+#include "sendf.h"
+#include "gskit.h"
+#include "sslgen.h"
+#include "connect.h" /* for the connect timeout */
+#include "select.h"
+#include "strequal.h"
+#include "x509asn1.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+
+/* Supported ciphers. */
+typedef struct {
+  const char *  name;           /* Cipher name. */
+  const char *  gsktoken;       /* Corresponding token for GSKit String. */
+  int           sslver;         /* SSL version. */
+}  gskit_cipher;
+
+static const gskit_cipher  ciphertable[] = {
+  { "null-md5",         "01",   CURL_SSLVERSION_SSLv3 },
+  { "null-sha",         "02",   CURL_SSLVERSION_SSLv3 },
+  { "exp-rc4-md5",      "03",   CURL_SSLVERSION_SSLv3 },
+  { "rc4-md5",          "04",   CURL_SSLVERSION_SSLv3 },
+  { "rc4-sha",          "05",   CURL_SSLVERSION_SSLv3 },
+  { "exp-rc2-cbc-md5",  "06",   CURL_SSLVERSION_SSLv3 },
+  { "exp-des-cbc-sha",  "09",   CURL_SSLVERSION_SSLv3 },
+  { "des-cbc3-sha",     "0A",   CURL_SSLVERSION_SSLv3 },
+  { "aes128-sha",       "2F",   CURL_SSLVERSION_TLSv1 },
+  { "aes256-sha",       "35",   CURL_SSLVERSION_TLSv1 },
+  { "rc4-md5",          "1",    CURL_SSLVERSION_SSLv2 },
+  { "exp-rc4-md5",      "2",    CURL_SSLVERSION_SSLv2 },
+  { "rc2-md5",          "3",    CURL_SSLVERSION_SSLv2 },
+  { "exp-rc2-md5",      "4",    CURL_SSLVERSION_SSLv2 },
+  { "des-cbc-md5",      "6",    CURL_SSLVERSION_SSLv2 },
+  { "des-cbc3-md5",     "7",    CURL_SSLVERSION_SSLv2 },
+  { (const char *) NULL, (const char *) NULL, 0       }
+};
+
+
+static bool is_separator(char c)
+{
+  /* Return whether character is a cipher list separator. */
+  switch (c) {
+  case ' ':
+  case '\t':
+  case ':':
+  case ',':
+  case ';':
+    return true;
+  }
+  return false;
+}
+
+
+static CURLcode gskit_status(struct SessionHandle * data, int rc,
+                             const char * procname, CURLcode defcode)
+{
+  CURLcode cc;
+
+  /* Process GSKit status and map it to a CURLcode. */
+  switch (rc) {
+  case GSK_OK:
+  case GSK_OS400_ASYNCHRONOUS_SOC_INIT:
+    return CURLE_OK;
+  case GSK_KEYRING_OPEN_ERROR:
+  case GSK_OS400_ERROR_NO_ACCESS:
+    return CURLE_SSL_CACERT_BADFILE;
+  case GSK_INSUFFICIENT_STORAGE:
+    return CURLE_OUT_OF_MEMORY;
+  case GSK_ERROR_BAD_V2_CIPHER:
+  case GSK_ERROR_BAD_V3_CIPHER:
+  case GSK_ERROR_NO_CIPHERS:
+    return CURLE_SSL_CIPHER;
+  case GSK_OS400_ERROR_NOT_TRUSTED_ROOT:
+  case GSK_ERROR_CERT_VALIDATION:
+    return CURLE_PEER_FAILED_VERIFICATION;
+  case GSK_OS400_ERROR_TIMED_OUT:
+    return CURLE_OPERATION_TIMEDOUT;
+  case GSK_WOULD_BLOCK:
+    return CURLE_AGAIN;
+  case GSK_OS400_ERROR_NOT_REGISTERED:
+    break;
+  case GSK_ERROR_IO:
+    switch (errno) {
+    case ENOMEM:
+      return CURLE_OUT_OF_MEMORY;
+    default:
+      failf(data, "%s I/O error: %s", procname, strerror(errno));
+      break;
+    }
+    break;
+  default:
+    failf(data, "%s: %s", procname, gsk_strerror(rc));
+    break;
+    }
+  return defcode;
+}
+
+
+static CURLcode set_enum(struct SessionHandle * data,
+                         gsk_handle h, GSK_ENUM_ID id, GSK_ENUM_VALUE value)
+{
+  int rc = gsk_attribute_set_enum(h, id, value);
+
+  switch (rc) {
+  case GSK_OK:
+    return CURLE_OK;
+  case GSK_ERROR_IO:
+    failf(data, "gsk_attribute_set_enum() I/O error: %s", strerror(errno));
+    break;
+  default:
+    failf(data, "gsk_attribute_set_enum(): %s", gsk_strerror(rc));
+    break;
+  }
+  return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_buffer(struct SessionHandle * data,
+                           gsk_handle h, GSK_BUF_ID id, const char * buffer)
+{
+  int rc = gsk_attribute_set_buffer(h, id, buffer, 0);
+
+  switch (rc) {
+  case GSK_OK:
+    return CURLE_OK;
+  case GSK_ERROR_IO:
+    failf(data, "gsk_attribute_set_buffer() I/O error: %s", strerror(errno));
+    break;
+  default:
+    failf(data, "gsk_attribute_set_buffer(): %s", gsk_strerror(rc));
+    break;
+  }
+  return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_numeric(struct SessionHandle * data,
+                            gsk_handle h, GSK_NUM_ID id, int value)
+{
+  int rc = gsk_attribute_set_numeric_value(h, id, value);
+
+  switch (rc) {
+  case GSK_OK:
+    return CURLE_OK;
+  case GSK_ERROR_IO:
+    failf(data, "gsk_attribute_set_numeric_value() I/O error: %s",
+          strerror(errno));
+    break;
+  default:
+    failf(data, "gsk_attribute_set_numeric_value(): %s", gsk_strerror(rc));
+    break;
+  }
+  return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_callback(struct SessionHandle * data,
+                             gsk_handle h, GSK_CALLBACK_ID id, void * info)
+{
+  int rc = gsk_attribute_set_callback(h, id, info);
+
+  switch (rc) {
+  case GSK_OK:
+    return CURLE_OK;
+  case GSK_ERROR_IO:
+    failf(data, "gsk_attribute_set_callback() I/O error: %s", strerror(errno));
+    break;
+  default:
+    failf(data, "gsk_attribute_set_callback(): %s", gsk_strerror(rc));
+    break;
+  }
+  return CURLE_SSL_CONNECT_ERROR;
+}
+
+
+static CURLcode set_ciphers(struct SessionHandle * data, gsk_handle h)
+{
+  const char * cipherlist = data->set.str[STRING_SSL_CIPHER_LIST];
+  char * sslv2ciphers;
+  char * sslv3ciphers;
+  const char * clp;
+  const gskit_cipher * ctp;
+  char * v2p;
+  char * v3p;
+  int i;
+  CURLcode cc;
+
+  /* Compile cipher list into GSKit-compatible cipher lists. */
+
+  if(!cipherlist)
+    return CURLE_OK;
+  while(is_separator(*cipherlist))     /* Skip initial separators. */
+    cipherlist++;
+  if(!*cipherlist)
+    return CURLE_OK;
+
+  /* We allocate GSKit buffers of the same size as the input string: since
+     GSKit tokens are always shorter than their cipher names, allocated buffers
+     will always be large enough to accomodate the result. */
+  i = strlen(cipherlist) + 1;
+  v2p = malloc(i);
+  if(!v2p)
+    return CURLE_OUT_OF_MEMORY;
+  v3p = malloc(i);
+  if(!v3p) {
+    free(v2p);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  sslv2ciphers = v2p;
+  sslv3ciphers = v3p;
+
+  /* Process each cipher in input string. */
+  for(;;) {
+    for(clp = cipherlist; *cipherlist && !is_separator(*cipherlist);)
+      cipherlist++;
+    i = cipherlist - clp;
+    if(!i)
+      break;
+    /* Search the cipher in our table. */
+    for(ctp = ciphertable; ctp->name; ctp++)
+      if(strnequal(ctp->name, clp, i) && !ctp->name[i])
+        break;
+    if(!ctp->name)
+      failf(data, "Unknown cipher %.*s: ignored", i, clp);
+    else {
+      switch (ctp->sslver) {
+      case CURL_SSLVERSION_SSLv2:
+        strcpy(v2p, ctp->gsktoken);
+        v2p += strlen(v2p);
+        break;
+      default:
+        /* GSKit wants TLSv1 ciphers with SSLv3 ciphers. */
+        strcpy(v3p, ctp->gsktoken);
+        v3p += strlen(v3p);
+        break;
+      }
+    }
+
+   /* Advance to next cipher name or end of string. */
+    while(is_separator(*cipherlist))
+      cipherlist++;
+  }
+  *v2p = '\0';
+  *v3p = '\0';
+  cc = set_buffer(data, h, GSK_V2_CIPHER_SPECS, sslv2ciphers);
+  if(cc == CURLE_OK)
+    cc = set_buffer(data, h, GSK_V3_CIPHER_SPECS, sslv3ciphers);
+  free(sslv2ciphers);
+  free(sslv3ciphers);
+  return cc;
+}
+
+
+int Curl_gskit_init(void)
+{
+  /* No initialisation needed. */
+
+  return 1;
+}
+
+
+void Curl_gskit_cleanup(void)
+{
+  /* Nothing to do. */
+}
+
+
+static CURLcode init_environment(struct SessionHandle * data,
+                                 gsk_handle * envir, const char * appid,
+                                 const char * file, const char * label,
+                                 const char * password)
+{
+  int rc;
+  CURLcode c;
+  gsk_handle h;
+
+  /* Creates the GSKit environment. */
+
+  rc = gsk_environment_open(&h);
+  switch (rc) {
+  case GSK_OK:
+    break;
+  case GSK_INSUFFICIENT_STORAGE:
+    return CURLE_OUT_OF_MEMORY;
+  default:
+    failf(data, "gsk_environment_open(): %s", gsk_strerror(rc));
+    return CURLE_SSL_CONNECT_ERROR;
+  }
+
+  c = set_enum(data, h, GSK_SESSION_TYPE, GSK_CLIENT_SESSION);
+  if(c == CURLE_OK && appid)
+    c = set_buffer(data, h, GSK_OS400_APPLICATION_ID, appid);
+  if(c == CURLE_OK && file)
+    c = set_buffer(data, h, GSK_KEYRING_FILE, file);
+  if(c == CURLE_OK && label)
+    c = set_buffer(data, h, GSK_KEYRING_LABEL, label);
+  if(c == CURLE_OK && password)
+    c = set_buffer(data, h, GSK_KEYRING_PW, password);
+
+  if(c == CURLE_OK) {
+    /* Locate CAs, Client certificate and key according to our settings.
+       Note: this call may be blocking for some tenths of seconds. */
+    c = gskit_status(data, gsk_environment_init(h),
+                     "gsk_environment_init()", CURLE_SSL_CERTPROBLEM);
+    if(c == CURLE_OK) {
+      *envir = h;
+      return c;
+    }
+  }
+  /* Error: rollback. */
+  gsk_environment_close(&h);
+  return c;
+}
+
+
+static void cancel_async_handshake(struct connectdata * conn, int sockindex)
+{
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  Qso_OverlappedIO_t cstat;
+
+  if(QsoCancelOperation(conn->sock[sockindex], 0) > 0)
+    QsoWaitForIOCompletion(connssl->iocport, &cstat, (struct timeval *) NULL);
+}
+
+
+static void close_async_handshake(struct ssl_connect_data * connssl)
+{
+  QsoDestroyIOCompletionPort(connssl->iocport);
+  connssl->iocport = -1;
+}
+
+
+static void close_one(struct ssl_connect_data * conn,
+                      struct SessionHandle * data)
+{
+  if(conn->handle) {
+    gskit_status(data, gsk_secure_soc_close(&conn->handle),
+              "gsk_secure_soc_close()", 0);
+    conn->handle = (gsk_handle) NULL;
+  }
+  if(conn->iocport >= 0)
+    close_async_handshake(conn);
+}
+
+
+static ssize_t gskit_send(struct connectdata * conn, int sockindex,
+                           const void * mem, size_t len, CURLcode * curlcode)
+{
+  struct SessionHandle * data = conn->data;
+  CURLcode cc;
+  int written;
+
+  cc = gskit_status(data,
+                    gsk_secure_soc_write(conn->ssl[sockindex].handle,
+                                         (char *) mem, (int) len, &written),
+                    "gsk_secure_soc_write()", CURLE_SEND_ERROR);
+  if(cc != CURLE_OK) {
+    *curlcode = cc;
+    written = -1;
+  }
+  return (ssize_t) written; /* number of bytes */
+}
+
+
+static ssize_t gskit_recv(struct connectdata * conn, int num, char * buf,
+                           size_t buffersize, CURLcode * curlcode)
+{
+  struct SessionHandle * data = conn->data;
+  int buffsize;
+  int nread;
+  CURLcode cc;
+
+  buffsize = buffersize > (size_t) INT_MAX? INT_MAX: (int) buffersize;
+  cc = gskit_status(data, gsk_secure_soc_read(conn->ssl[num].handle,
+                                              buf, buffsize, &nread),
+                    "gsk_secure_soc_read()", CURLE_RECV_ERROR);
+  if(cc != CURLE_OK) {
+    *curlcode = cc;
+    nread = -1;
+  }
+  return (ssize_t) nread;
+}
+
+
+static CURLcode gskit_connect_step1(struct connectdata * conn, int sockindex)
+{
+  struct SessionHandle * data = conn->data;
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  gsk_handle envir;
+  CURLcode cc;
+  int rc;
+  char * keyringfile;
+  char * keyringpwd;
+  char * keyringlabel;
+  char * v2ciphers;
+  char * v3ciphers;
+  char * sni;
+  bool sslv2enable, sslv3enable, tlsv1enable;
+  long timeout;
+  Qso_OverlappedIO_t commarea;
+
+  /* Create SSL environment, start (preferably asynchronous) handshake. */
+
+  connssl->handle = (gsk_handle) NULL;
+  connssl->iocport = -1;
+
+  /* GSKit supports two ways of specifying an SSL context: either by
+   *  application identifier (that should have been defined at the system
+   *  level) or by keyring file, password and certificate label.
+   * Local certificate name (CURLOPT_SSLCERT) is used to hold either the
+   *  application identifier of the certificate label.
+   * Key password (CURLOPT_KEYPASSWD) holds the keyring password.
+   * It is not possible to have different keyrings for the CAs and the
+   *  local certificate. We thus use the CA file (CURLOPT_CAINFO) to identify
+   *  the keyring file.
+   * If no key password is given and the keyring is the system keyring,
+   *  application identifier mode is tried first, as recommended in IBM doc.
+   */
+
+  keyringfile = data->set.str[STRING_SSL_CAFILE];
+  keyringpwd = data->set.str[STRING_KEY_PASSWD];
+  keyringlabel = data->set.str[STRING_CERT];
+  envir = (gsk_handle) NULL;
+
+  if(keyringlabel && *keyringlabel && !keyringpwd &&
+      !strcmp(keyringfile, CURL_CA_BUNDLE)) {
+    /* Try application identifier mode. */
+    init_environment(data, &envir, keyringlabel, (const char *) NULL,
+                     (const char *) NULL, (const char *) NULL);
+  }
+
+  if(!envir) {
+    /* Use keyring mode. */
+    cc = init_environment(data, &envir, (const char *) NULL,
+                          keyringfile, keyringlabel, keyringpwd);
+    if(cc != CURLE_OK)
+      return cc;
+  }
+
+  /* Create secure session. */
+  cc = gskit_status(data, gsk_secure_soc_open(envir, &connssl->handle),
+                    "gsk_secure_soc_open()", CURLE_SSL_CONNECT_ERROR);
+  gsk_environment_close(&envir);
+  if(cc != CURLE_OK)
+    return cc;
+
+  /* Determine which SSL/TLS version should be enabled. */
+  sslv2enable = sslv3enable = tlsv1enable = false;
+  sni = conn->host.name;
+  switch (data->set.ssl.version) {
+  case CURL_SSLVERSION_SSLv2:
+    sslv2enable = true;
+    sni = (char *) NULL;
+    break;
+  case CURL_SSLVERSION_SSLv3:
+    sslv3enable = true;
+    sni = (char *) NULL;
+    break;
+  case CURL_SSLVERSION_TLSv1:
+    tlsv1enable = true;
+    break;
+  default:              /* CURL_SSLVERSION_DEFAULT. */
+    sslv3enable = true;
+    tlsv1enable = true;
+    break;
+  }
+
+  /* Process SNI. Ignore if not supported (on OS400 < V7R1). */
+  if(sni) {
+    rc = gsk_attribute_set_buffer(connssl->handle,
+                                  GSK_SSL_EXTN_SERVERNAME_REQUEST, sni, 0);
+    switch (rc) {
+    case GSK_OK:
+    case GSK_ATTRIBUTE_INVALID_ID:
+      break;
+    case GSK_ERROR_IO:
+      failf(data, "gsk_attribute_set_buffer() I/O error: %s", strerror(errno));
+      cc = CURLE_SSL_CONNECT_ERROR;
+      break;
+    default:
+      failf(data, "gsk_attribute_set_buffer(): %s", gsk_strerror(rc));
+      cc = CURLE_SSL_CONNECT_ERROR;
+      break;
+    }
+  }
+
+  /* Set session parameters. */
+  if(cc == CURLE_OK) {
+    /* Compute the handshake timeout. Since GSKit granularity is 1 second,
+       we round up the required value. */
+    timeout = Curl_timeleft(data, NULL, TRUE);
+    if(timeout < 0)
+      cc = CURLE_OPERATION_TIMEDOUT;
+    else
+      cc = set_numeric(data, connssl->handle, GSK_HANDSHAKE_TIMEOUT,
+                       (timeout + 999) / 1000);
+  }
+  if(cc == CURLE_OK)
+    cc = set_numeric(data, connssl->handle, GSK_FD, conn->sock[sockindex]);
+  if(cc == CURLE_OK)
+    cc = set_ciphers(data, connssl->handle);
+  if(cc == CURLE_OK)
+      cc = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV2,
+                    sslv2enable? GSK_PROTOCOL_SSLV2_ON:
+                    GSK_PROTOCOL_SSLV2_OFF);
+  if(cc == CURLE_OK)
+    cc = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV3,
+                  sslv3enable? GSK_PROTOCOL_SSLV3_ON:
+                  GSK_PROTOCOL_SSLV3_OFF);
+  if(cc == CURLE_OK)
+    cc = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV1,
+                  sslv3enable?  GSK_PROTOCOL_TLSV1_ON:
+                  GSK_PROTOCOL_TLSV1_OFF);
+  if(cc == CURLE_OK)
+    cc = set_enum(data, connssl->handle, GSK_SERVER_AUTH_TYPE,
+                  data->set.ssl.verifypeer? GSK_SERVER_AUTH_FULL:
+                  GSK_SERVER_AUTH_PASSTHRU);
+
+  if(cc == CURLE_OK) {
+    /* Start handshake. Try asynchronous first. */
+    memset(&commarea, 0, sizeof commarea);
+    connssl->iocport = QsoCreateIOCompletionPort();
+    if(connssl->iocport != -1) {
+      cc = gskit_status(data, gsk_secure_soc_startInit(connssl->handle,
+                        connssl->iocport, &commarea),
+                        "gsk_secure_soc_startInit()", CURLE_SSL_CONNECT_ERROR);
+      if(cc == CURLE_OK) {
+        connssl->connecting_state = ssl_connect_2;
+        return CURLE_OK;
+      }
+      else
+        close_async_handshake(connssl);
+    }
+    else if(errno != ENOBUFS)
+      cc = gskit_status(data, GSK_ERROR_IO, "QsoCreateIOCompletionPort()", 0);
+    else {
+      /* No more completion port available. Use synchronous IO. */
+      cc = gskit_status(data, gsk_secure_soc_init(connssl->handle),
+                       "gsk_secure_soc_init()", CURLE_SSL_CONNECT_ERROR);
+      if(cc == CURLE_OK) {
+        connssl->connecting_state = ssl_connect_3;
+        return CURLE_OK;
+      }
+    }
+  }
+
+  /* Error: rollback. */
+  close_one(connssl, data);
+  return cc;
+}
+
+
+static CURLcode gskit_connect_step2(struct connectdata * conn, int sockindex,
+                                    bool nonblocking)
+{
+  struct SessionHandle * data = conn->data;
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  Qso_OverlappedIO_t cstat;
+  long timeout_ms;
+  struct timeval stmv;
+  CURLcode cc;
+
+  /* Poll or wait for end of SSL asynchronous handshake. */
+
+  for(;;) {
+    timeout_ms = nonblocking? 0: Curl_timeleft(data, NULL, TRUE);
+    if(timeout_ms < 0)
+      timeout_ms = 0;
+    stmv.tv_sec = timeout_ms / 1000;
+    stmv.tv_usec = (timeout_ms - stmv.tv_sec * 1000) * 1000;
+    switch (QsoWaitForIOCompletion(connssl->iocport, &cstat, &stmv)) {
+    case 1:             /* Operation complete. */
+      break;
+    case -1:            /* An error occurred: handshake still in progress. */
+      if(errno == EINTR) {
+        if(nonblocking)
+          return CURLE_OK;
+        continue;       /* Retry. */
+      }
+      if(errno != ETIME) {
+        failf(data, "QsoWaitForIOCompletion() I/O error: %s", strerror(errno));
+        cancel_async_handshake(conn, sockindex);
+        close_async_handshake(connssl);
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      /* FALL INTO... */
+    case 0:             /* Handshake in progress, timeout occurred. */
+      if(nonblocking)
+        return CURLE_OK;
+      cancel_async_handshake(conn, sockindex);
+      close_async_handshake(connssl);
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+    break;
+  }
+  cc = gskit_status(data, cstat.returnValue, "SSL handshake",
+                    CURLE_SSL_CONNECT_ERROR);
+  if(cc == CURLE_OK)
+    connssl->connecting_state = ssl_connect_3;
+  close_async_handshake(connssl);
+  return cc;
+}
+
+
+static CURLcode gskit_connect_step3(struct connectdata * conn, int sockindex)
+{
+  struct SessionHandle * data = conn->data;
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  const gsk_cert_data_elem * cdev;
+  int cdec;
+  const gsk_cert_data_elem * p;
+  const char * cert = (const char *) NULL;
+  const char * certend;
+  int i;
+  CURLcode cc;
+
+  /* SSL handshake done: gather certificate info and verify host. */
+
+  if(gskit_status(data, gsk_attribute_get_cert_info(connssl->handle,
+                                                    GSK_PARTNER_CERT_INFO,
+                                                    &cdev, &cdec),
+                  "gsk_attribute_get_cert_info()", CURLE_SSL_CONNECT_ERROR) ==
+     CURLE_OK) {
+    infof(data, "Server certificate:\n");
+    p = cdev;
+    for(i = 0; i++ < cdec; p++)
+      switch (p->cert_data_id) {
+      case CERT_BODY_DER:
+        cert = p->cert_data_p;
+        certend = cert + cdev->cert_data_l;
+        break;
+      case CERT_DN_PRINTABLE:
+        infof(data, "\t subject: %.*s\n", p->cert_data_l, p->cert_data_p);
+        break;
+      case CERT_ISSUER_DN_PRINTABLE:
+        infof(data, "\t issuer: %.*s\n", p->cert_data_l, p->cert_data_p);
+        break;
+      case CERT_VALID_FROM:
+        infof(data, "\t start date: %.*s\n", p->cert_data_l, p->cert_data_p);
+        break;
+      case CERT_VALID_TO:
+        infof(data, "\t expire date: %.*s\n", p->cert_data_l, p->cert_data_p);
+        break;
+    }
+  }
+
+  /* Verify host. */
+  cc = Curl_verifyhost(conn, cert, certend);
+  if(cc != CURLE_OK)
+    return cc;
+
+  /* The only place GSKit can get the whole CA chain is a validation
+     callback where no user data pointer is available. Therefore it's not
+     possible to copy this chain into our structures for CAINFO.
+     However the server certificate may be available, thus we can return
+     info about it. */
+  if(data->set.ssl.certinfo) {
+    if(Curl_ssl_init_certinfo(data, 1))
+      return CURLE_OUT_OF_MEMORY;
+    if(cert) {
+      cc = Curl_extract_certinfo(conn, 0, cert, certend);
+      if(cc != CURLE_OK)
+        return cc;
+    }
+  }
+
+  connssl->connecting_state = ssl_connect_done;
+  return CURLE_OK;
+}
+
+
+static CURLcode gskit_connect_common(struct connectdata * conn, int sockindex,
+                                     bool nonblocking, bool * done)
+{
+  struct SessionHandle * data = conn->data;
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  long timeout_ms;
+  Qso_OverlappedIO_t cstat;
+  CURLcode cc = CURLE_OK;
+
+  *done = connssl->state == ssl_connection_complete;
+  if(*done)
+    return CURLE_OK;
+
+  /* Step 1: create session, start handshake. */
+  if(connssl->connecting_state == ssl_connect_1) {
+    /* check allowed time left */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      cc = CURLE_OPERATION_TIMEDOUT;
+    }
+    else
+      cc = gskit_connect_step1(conn, sockindex);
+  }
+
+  /* Step 2: check if handshake is over. */
+  if(cc == CURLE_OK && connssl->connecting_state == ssl_connect_2) {
+    /* check allowed time left */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      cc = CURLE_OPERATION_TIMEDOUT;
+    }
+    else
+      cc = gskit_connect_step2(conn, sockindex, nonblocking);
+  }
+
+  /* Step 3: gather certificate info, verify host. */
+  if(cc == CURLE_OK && connssl->connecting_state == ssl_connect_3)
+    cc = gskit_connect_step3(conn, sockindex);
+
+  if(cc != CURLE_OK)
+    close_one(connssl, data);
+  else if(connssl->connecting_state == ssl_connect_done) {
+    connssl->state = ssl_connection_complete;
+    connssl->connecting_state = ssl_connect_1;
+    conn->recv[sockindex] = gskit_recv;
+    conn->send[sockindex] = gskit_send;
+    *done = TRUE;
+  }
+
+  return cc;
+}
+
+
+CURLcode Curl_gskit_connect_nonblocking(struct connectdata * conn,
+                                        int sockindex,
+                                        bool * done)
+{
+  CURLcode cc;
+
+  cc = gskit_connect_common(conn, sockindex, TRUE, done);
+  if(*done || cc != CURLE_OK)
+    conn->ssl[sockindex].connecting_state = ssl_connect_1;
+  return cc;
+}
+
+
+CURLcode Curl_gskit_connect(struct connectdata * conn, int sockindex)
+{
+  CURLcode retcode;
+  bool done;
+
+  conn->ssl[sockindex].connecting_state = ssl_connect_1;
+  retcode = gskit_connect_common(conn, sockindex, FALSE, &done);
+  if(retcode)
+    return retcode;
+
+  DEBUGASSERT(done);
+
+  return CURLE_OK;
+}
+
+
+void Curl_gskit_close(struct connectdata * conn, int sockindex)
+{
+  struct SessionHandle * data = conn->data;
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+
+  if(connssl->use)
+    close_one(connssl, data);
+}
+
+
+int Curl_gskit_close_all(struct SessionHandle * data)
+{
+  /* Unimplemented. */
+  (void) data;
+  return 0;
+}
+
+
+int Curl_gskit_shutdown(struct connectdata * conn, int sockindex)
+{
+  struct ssl_connect_data * connssl = &conn->ssl[sockindex];
+  struct SessionHandle * data = conn->data;
+  ssize_t nread;
+  int what;
+  int rc;
+  char buf[120];
+
+  if(!connssl->handle)
+    return 0;
+
+  if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE)
+    return 0;
+
+  close_one(connssl, data);
+  rc = 0;
+  what = Curl_socket_ready(conn->sock[sockindex],
+                           CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+
+  for(;;) {
+    if(what < 0) {
+      /* anything that gets here is fatally bad */
+      failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+      rc = -1;
+      break;
+    }
+
+    if(!what) {                                /* timeout */
+      failf(data, "SSL shutdown timeout");
+      break;
+    }
+
+    /* Something to read, let's do it and hope that it is the close
+       notify alert from the server. No way to gsk_secure_soc_read() now, so
+       use read(). */
+
+    nread = read(conn->sock[sockindex], buf, sizeof(buf));
+
+    if(nread < 0) {
+      failf(data, "read: %s", strerror(errno));
+      rc = -1;
+    }
+
+    if(nread <= 0)
+      break;
+
+    what = Curl_socket_ready(conn->sock[sockindex], CURL_SOCKET_BAD, 0);
+  }
+
+  return rc;
+}
+
+
+size_t Curl_gskit_version(char * buffer, size_t size)
+{
+  strncpy(buffer, "GSKit", size);
+  return strlen(buffer);
+}
+
+
+int Curl_gskit_check_cxn(struct connectdata * cxn)
+{
+  int err;
+  int errlen;
+
+  /* The only thing that can be tested here is at the socket level. */
+
+  if(!cxn->ssl[FIRSTSOCKET].handle)
+    return 0; /* connection has been closed */
+
+  err = 0;
+  errlen = sizeof err;
+
+  if(getsockopt(cxn->sock[FIRSTSOCKET], SOL_SOCKET, SO_ERROR,
+                 (unsigned char *) &err, &errlen) ||
+     errlen != sizeof err || err)
+    return 0; /* connection has been closed */
+
+  return -1;  /* connection status unknown */
+}
+
+#endif /* USE_GSKIT */
diff --git a/lib/gskit.h b/lib/gskit.h
new file mode 100644 (file)
index 0000000..0d59aa7
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef HEADER_CURL_GSKIT_H
+#define HEADER_CURL_GSKIT_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+/*
+ * This header should only be needed to get included by sslgen.c and gskit.c
+ */
+
+#include "urldata.h"
+
+#ifdef USE_GSKIT
+int Curl_gskit_init(void);
+void Curl_gskit_cleanup(void);
+CURLcode Curl_gskit_connect(struct connectdata * conn, int sockindex);
+CURLcode Curl_gskit_connect_nonblocking(struct connectdata * conn,
+                                        int sockindex, bool * done);
+void Curl_gskit_close(struct connectdata *conn, int sockindex);
+int Curl_gskit_close_all(struct SessionHandle * data);
+int Curl_gskit_shutdown(struct connectdata * conn, int sockindex);
+
+size_t Curl_gskit_version(char * buffer, size_t size);
+int Curl_gskit_check_cxn(struct connectdata * cxn);
+
+/* API setup for GSKit */
+#define curlssl_init Curl_gskit_init
+#define curlssl_cleanup Curl_gskit_cleanup
+#define curlssl_connect Curl_gskit_connect
+#define curlssl_connect_nonblocking Curl_gskit_connect_nonblocking
+
+/*  No session handling for GSKit */
+#define curlssl_session_free(x) Curl_nop_stmt
+#define curlssl_close_all Curl_gskit_close_all
+#define curlssl_close Curl_gskit_close
+#define curlssl_shutdown(x,y) Curl_gskit_shutdown(x,y)
+#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN
+#define curlssl_set_engine_default(x) CURLE_NOT_BUILT_IN
+#define curlssl_engines_list(x) NULL
+#define curlssl_version Curl_gskit_version
+#define curlssl_check_cxn(x) Curl_gskit_check_cxn(x)
+#define curlssl_data_pending(x,y) 0
+#endif /* USE_GSKIT */
+
+#endif /* HEADER_CURL_GSKIT_H */
index 845dbbb..700e46a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * since they were not present in 1.0.X.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
+
 #ifdef USE_GNUTLS
+
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
-#include <gcrypt.h>
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#ifdef USE_GNUTLS_NETTLE
+#include <gnutls/crypto.h>
+#include <nettle/md5.h>
+#else
+#include <gcrypt.h>
 #endif
 
 #include "urldata.h"
@@ -79,10 +80,22 @@ static void tls_log_func(int level, const char *str)
 #endif
 static bool gtls_inited = FALSE;
 
+#if defined(GNUTLS_VERSION_NUMBER)
+#  if (GNUTLS_VERSION_NUMBER >= 0x020c00)
+#    undef gnutls_transport_set_lowat
+#    define gnutls_transport_set_lowat(A,B) Curl_nop_stmt
+#    define USE_GNUTLS_PRIORITY_SET_DIRECT 1
+#  endif
+#  if (GNUTLS_VERSION_NUMBER >= 0x020c03)
+#    define GNUTLS_MAPS_WINSOCK_ERRORS 1
+#  endif
+#endif
+
 /*
  * Custom push and pull callback functions used by GNU TLS to read and write
  * to the socket.  These functions are simple wrappers to send() and recv()
- * (although here using the sread/swrite macros as defined by setup_once.h).
+ * (although here using the sread/swrite macros as defined by
+ * curl_setup_once.h).
  * We use custom functions rather than the GNU TLS defaults because it allows
  * us to get specific about the fourth "flags" argument, and to use arbitrary
  * private data with gnutls_transport_set_ptr if we wish.
@@ -96,9 +109,13 @@ static bool gtls_inited = FALSE;
  * resort global errno variable using gnutls_transport_set_global_errno,
  * with a transport agnostic error value. This implies that some winsock
  * error translation must take place in these callbacks.
+ *
+ * Paragraph above applies to GNU TLS versions older than 2.12.3, since
+ * this version GNU TLS does its own internal winsock error translation
+ * using system_errno() function.
  */
 
-#ifdef USE_WINSOCK
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
 #  define gtls_EINTR  4
 #  define gtls_EIO    5
 #  define gtls_EAGAIN 11
@@ -119,7 +136,7 @@ static int gtls_mapped_sockerrno(void)
 static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
 {
   ssize_t ret = swrite(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
-#ifdef USE_WINSOCK
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
   if(ret < 0)
     gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
 #endif
@@ -129,7 +146,7 @@ static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
 static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
 {
   ssize_t ret = sread(GNUTLS_POINTER_TO_INT_CAST(s), buf, len);
-#ifdef USE_WINSOCK
+#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
   if(ret < 0)
     gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
 #endif
@@ -170,13 +187,12 @@ static void showtime(struct SessionHandle *data,
                      const char *text,
                      time_t stamp)
 {
-  struct tm *tm;
-#ifdef HAVE_GMTIME_R
   struct tm buffer;
-  tm = (struct tm *)gmtime_r(&stamp, &buffer);
-#else
-  tm = gmtime(&stamp);
-#endif
+  const struct tm *tm = &buffer;
+  CURLcode result = Curl_gmtime(stamp, &buffer);
+  if(result)
+    return;
+
   snprintf(data->state.buffer,
            BUFSIZE,
            "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT\n",
@@ -188,7 +204,7 @@ static void showtime(struct SessionHandle *data,
            tm->tm_hour,
            tm->tm_min,
            tm->tm_sec);
-  infof(data, "%s", data->state.buffer);
+  infof(data, "%s\n", data->state.buffer);
 }
 
 static gnutls_datum load_file (const char *file)
@@ -198,14 +214,14 @@ static gnutls_datum load_file (const char *file)
   long filelen;
   void *ptr;
 
-  if (!(f = fopen(file, "r")))
+  if(!(f = fopen(file, "r")))
     return loaded_file;
-  if (fseek(f, 0, SEEK_END) != 0
-      || (filelen = ftell(f)) < 0
-      || fseek(f, 0, SEEK_SET) != 0
-      || !(ptr = malloc((size_t)filelen)))
+  if(fseek(f, 0, SEEK_END) != 0
+     || (filelen = ftell(f)) < 0
+     || fseek(f, 0, SEEK_SET) != 0
+     || !(ptr = malloc((size_t)filelen)))
     goto out;
-  if (fread(ptr, 1, (size_t)filelen, f) < (size_t)filelen) {
+  if(fread(ptr, 1, (size_t)filelen, f) < (size_t)filelen) {
     free(ptr);
     goto out;
   }
@@ -238,7 +254,7 @@ static CURLcode handshake(struct connectdata *conn,
 
   for(;;) {
     /* check allowed time left */
-    timeout_ms = Curl_timeleft(conn, NULL, duringconnect);
+    timeout_ms = Curl_timeleft(data, NULL, duringconnect);
 
     if(timeout_ms < 0) {
       /* no need to continue if time already is up */
@@ -256,7 +272,8 @@ static CURLcode handshake(struct connectdata *conn,
         connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
 
       what = Curl_socket_ready(readfd, writefd,
-                               nonblocking?0:(int)timeout_ms?1000:timeout_ms);
+                               nonblocking?0:
+                               timeout_ms?timeout_ms:1000);
       if(what < 0) {
         /* fatal error */
         failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
@@ -280,18 +297,41 @@ static CURLcode handshake(struct connectdata *conn,
       connssl->connecting_state =
         gnutls_record_get_direction(session)?
         ssl_connect_2_writing:ssl_connect_2_reading;
+      continue;
       if(nonblocking)
         return CURLE_OK;
     }
-    else if (rc < 0) {
-      failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc));
-      return CURLE_SSL_CONNECT_ERROR;
+    else if((rc < 0) && !gnutls_error_is_fatal(rc)) {
+      const char *strerr = NULL;
+
+      if(rc == GNUTLS_E_WARNING_ALERT_RECEIVED) {
+        int alert = gnutls_alert_get(session);
+        strerr = gnutls_alert_get_name(alert);
+      }
+
+      if(strerr == NULL)
+        strerr = gnutls_strerror(rc);
+
+      failf(data, "gnutls_handshake() warning: %s", strerr);
     }
-    else {
-      /* Reset our connect state machine */
-      connssl->connecting_state = ssl_connect_1;
-      return CURLE_OK;
+    else if(rc < 0) {
+      const char *strerr = NULL;
+
+      if(rc == GNUTLS_E_FATAL_ALERT_RECEIVED) {
+        int alert = gnutls_alert_get(session);
+        strerr = gnutls_alert_get_name(alert);
+      }
+
+      if(strerr == NULL)
+        strerr = gnutls_strerror(rc);
+
+      failf(data, "gnutls_handshake() failed: %s", strerr);
+      return CURLE_SSL_CONNECT_ERROR;
     }
+
+    /* Reset our connect state machine */
+    connssl->connecting_state = ssl_connect_1;
+    return CURLE_OK;
   }
 }
 
@@ -310,7 +350,9 @@ static CURLcode
 gtls_connect_step1(struct connectdata *conn,
                    int sockindex)
 {
+#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT
   static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
+#endif
   struct SessionHandle *data = conn->data;
   gnutls_session session;
   int rc;
@@ -346,6 +388,30 @@ gtls_connect_step1(struct connectdata *conn,
     return CURLE_SSL_CONNECT_ERROR;
   }
 
+#ifdef USE_TLS_SRP
+  if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+    infof(data, "Using TLS-SRP username: %s\n", data->set.ssl.username);
+
+    rc = gnutls_srp_allocate_client_credentials(
+           &conn->ssl[sockindex].srp_client_cred);
+    if(rc != GNUTLS_E_SUCCESS) {
+      failf(data, "gnutls_srp_allocate_client_cred() failed: %s",
+            gnutls_strerror(rc));
+      return CURLE_OUT_OF_MEMORY;
+    }
+
+    rc = gnutls_srp_set_client_credentials(conn->ssl[sockindex].
+                                           srp_client_cred,
+                                           data->set.ssl.username,
+                                           data->set.ssl.password);
+    if(rc != GNUTLS_E_SUCCESS) {
+      failf(data, "gnutls_srp_set_client_cred() failed: %s",
+            gnutls_strerror(rc));
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    }
+  }
+#endif
+
   if(data->set.ssl.CAfile) {
     /* set the trusted CA cert bundle file */
     gnutls_certificate_set_verify_flags(conn->ssl[sockindex].cred,
@@ -371,7 +437,7 @@ gtls_connect_step1(struct connectdata *conn,
                                               data->set.ssl.CRLfile,
                                               GNUTLS_X509_FMT_PEM);
     if(rc < 0) {
-      failf(data, "error reading crl file %s (%s)\n",
+      failf(data, "error reading crl file %s (%s)",
             data->set.ssl.CRLfile, gnutls_strerror(rc));
       return CURLE_SSL_CRL_BADFILE;
     }
@@ -390,13 +456,13 @@ gtls_connect_step1(struct connectdata *conn,
   /* convenient assign */
   session = conn->ssl[sockindex].session;
 
-  if ((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
+  if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
 #ifdef ENABLE_IPV6
-      (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
+     (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
 #endif
-      sni &&
-      (gnutls_server_name_set(session, GNUTLS_NAME_DNS, conn->host.name,
-                              strlen(conn->host.name)) < 0))
+     sni &&
+     (gnutls_server_name_set(session, GNUTLS_NAME_DNS, conn->host.name,
+                             strlen(conn->host.name)) < 0))
     infof(data, "WARNING: failed to configure server name indication (SNI) "
           "TLS extension\n");
 
@@ -406,34 +472,58 @@ gtls_connect_step1(struct connectdata *conn,
     return CURLE_SSL_CONNECT_ERROR;
 
   if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
+#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT
     static const int protocol_priority[] = { GNUTLS_SSL3, 0 };
-    gnutls_protocol_set_priority(session, protocol_priority);
+    rc = gnutls_protocol_set_priority(session, protocol_priority);
+#else
+    const char *err;
+    /* the combination of the cipher ARCFOUR with SSL 3.0 and TLS 1.0 is not
+       vulnerable to attacks such as the BEAST, why this code now explicitly
+       asks for that
+    */
+    rc = gnutls_priority_set_direct(session,
+                                    "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0:"
+                                    "-CIPHER-ALL:+ARCFOUR-128",
+                                    &err);
+#endif
     if(rc != GNUTLS_E_SUCCESS)
       return CURLE_SSL_CONNECT_ERROR;
   }
 
+#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT
   /* Sets the priority on the certificate types supported by gnutls. Priority
      is higher for types specified before others. After specifying the types
      you want, you must append a 0. */
   rc = gnutls_certificate_type_set_priority(session, cert_type_priority);
   if(rc != GNUTLS_E_SUCCESS)
     return CURLE_SSL_CONNECT_ERROR;
+#endif
 
   if(data->set.str[STRING_CERT]) {
-    if( gnutls_certificate_set_x509_key_file(
-          conn->ssl[sockindex].cred,
-          data->set.str[STRING_CERT],
-          data->set.str[STRING_KEY] ?
-          data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
-          do_file_type(data->set.str[STRING_CERT_TYPE]) ) != GNUTLS_E_SUCCESS) {
+    if(gnutls_certificate_set_x509_key_file(
+         conn->ssl[sockindex].cred,
+         data->set.str[STRING_CERT],
+         data->set.str[STRING_KEY] ?
+         data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
+         do_file_type(data->set.str[STRING_CERT_TYPE]) ) !=
+       GNUTLS_E_SUCCESS) {
       failf(data, "error reading X.509 key or certificate file");
       return CURLE_SSL_CONNECT_ERROR;
     }
   }
 
+#ifdef USE_TLS_SRP
   /* put the credentials to the current session */
-  rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
-                              conn->ssl[sockindex].cred);
+  if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+    rc = gnutls_credentials_set(session, GNUTLS_CRD_SRP,
+                                conn->ssl[sockindex].srp_client_cred);
+    if(rc != GNUTLS_E_SUCCESS)
+      failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc));
+  }
+  else
+#endif
+    rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
+                                conn->ssl[sockindex].cred);
 
   /* set the connection handle (file descriptor for the socket) */
   gnutls_transport_set_ptr(session,
@@ -483,6 +573,7 @@ gtls_connect_step3(struct connectdata *conn,
   int rc;
   int incache;
   void *ssl_sessionid;
+  CURLcode result = CURLE_OK;
 
   /* This function will return the peer's raw certificate (chain) as sent by
      the peer. These certificates are in raw format (DER encoded for
@@ -495,8 +586,21 @@ gtls_connect_step3(struct connectdata *conn,
     if(data->set.ssl.verifypeer ||
        data->set.ssl.verifyhost ||
        data->set.ssl.issuercert) {
-      failf(data, "failed to get server cert");
-      return CURLE_PEER_FAILED_VERIFICATION;
+#ifdef USE_TLS_SRP
+      if(data->set.ssl.authtype == CURL_TLSAUTH_SRP
+         && data->set.ssl.username != NULL
+         && !data->set.ssl.verifypeer
+         && gnutls_cipher_get(session)) {
+        /* no peer cert, but auth is ok if we have SRP user and cipher and no
+           peer verify */
+      }
+      else {
+#endif
+        failf(data, "failed to get server cert");
+        return CURLE_PEER_FAILED_VERIFICATION;
+#ifdef USE_TLS_SRP
+      }
+#endif
     }
     infof(data, "\t common name: WARNING couldn't obtain\n");
   }
@@ -529,8 +633,10 @@ gtls_connect_step3(struct connectdata *conn,
     else
       infof(data, "\t server certificate verification OK\n");
   }
-  else
+  else {
     infof(data, "\t server certificate verification SKIPPED\n");
+    goto after_server_cert_verification;
+  }
 
   /* initialize an X.509 certificate structure. */
   gnutls_x509_crt_init(&x509_cert);
@@ -539,13 +645,13 @@ gtls_connect_step3(struct connectdata *conn,
      gnutls_x509_crt_t format */
   gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER);
 
-  if (data->set.ssl.issuercert) {
+  if(data->set.ssl.issuercert) {
     gnutls_x509_crt_init(&x509_issuer);
     issuerp = load_file(data->set.ssl.issuercert);
     gnutls_x509_crt_import(x509_issuer, &issuerp, GNUTLS_X509_FMT_PEM);
     rc = gnutls_x509_crt_check_issuer(x509_cert,x509_issuer);
     unload_file(issuerp);
-    if (rc <= 0) {
+    if(rc <= 0) {
       failf(data, "server certificate issuer check failed (IssuerCert: %s)",
             data->set.ssl.issuercert?data->set.ssl.issuercert:"none");
       return CURLE_SSL_ISSUER_ERROR;
@@ -573,7 +679,7 @@ gtls_connect_step3(struct connectdata *conn,
   rc = gnutls_x509_crt_check_hostname(x509_cert, conn->host.name);
 
   if(!rc) {
-    if(data->set.ssl.verifyhost > 1) {
+    if(data->set.ssl.verifyhost) {
       failf(data, "SSL: certificate subject name (%s) does not match "
             "target host name '%s'", certbuf, conn->host.dispname);
       gnutls_x509_crt_deinit(x509_cert);
@@ -660,6 +766,8 @@ gtls_connect_step3(struct connectdata *conn,
 
   gnutls_x509_crt_deinit(x509_cert);
 
+after_server_cert_verification:
+
   /* compression algorithm (if any) */
   ptr = gnutls_compression_get_name(gnutls_compression_get(session));
   /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
@@ -694,18 +802,24 @@ gtls_connect_step3(struct connectdata *conn,
       gnutls_session_get_data(session, connect_sessionid, &connect_idsize);
 
       incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL));
-      if (incache) {
+      if(incache) {
         /* there was one before in the cache, so instead of risking that the
            previous one was rejected, we just kill that and store the new */
         Curl_ssl_delsessionid(conn, ssl_sessionid);
       }
 
       /* store this session id */
-      return Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize);
+      result = Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize);
+      if(result) {
+        free(connect_sessionid);
+        result = CURLE_OUT_OF_MEMORY;
+      }
     }
+    else
+      result = CURLE_OUT_OF_MEMORY;
   }
 
-  return CURLE_OK;
+  return result;
 }
 
 
@@ -813,6 +927,12 @@ static void close_one(struct connectdata *conn,
     gnutls_certificate_free_credentials(conn->ssl[idx].cred);
     conn->ssl[idx].cred = NULL;
   }
+#ifdef USE_TLS_SRP
+  if(conn->ssl[idx].srp_client_cred) {
+    gnutls_srp_free_client_credentials(conn->ssl[idx].srp_client_cred);
+    conn->ssl[idx].srp_client_cred = NULL;
+  }
+#endif
 }
 
 void Curl_gtls_close(struct connectdata *conn, int sockindex)
@@ -843,7 +963,7 @@ int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
   if(conn->ssl[sockindex].session) {
     while(!done) {
       int what = Curl_socket_ready(conn->sock[sockindex],
-                             CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+                                   CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
       if(what > 0) {
         /* Something to read, let's do it and hope that it is the close
            notify alert from the server */
@@ -882,6 +1002,12 @@ int Curl_gtls_shutdown(struct connectdata *conn, int sockindex)
   }
   gnutls_certificate_free_credentials(conn->ssl[sockindex].cred);
 
+#ifdef USE_TLS_SRP
+  if(data->set.ssl.authtype == CURL_TLSAUTH_SRP
+     && data->set.ssl.username != NULL)
+    gnutls_srp_free_client_credentials(conn->ssl[sockindex].srp_client_cred);
+#endif
+
   conn->ssl[sockindex].cred = NULL;
   conn->ssl[sockindex].session = NULL;
 
@@ -941,7 +1067,9 @@ int Curl_gtls_seed(struct SessionHandle *data)
   static bool ssl_seeded = FALSE;
 
   /* Quickly add a bit of entropy */
+#ifndef USE_GNUTLS_NETTLE
   gcry_fast_random_poll();
+#endif
 
   if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] ||
      data->set.str[STRING_SSL_EGDSOCKET]) {
@@ -956,4 +1084,36 @@ int Curl_gtls_seed(struct SessionHandle *data)
   return 0;
 }
 
+void Curl_gtls_random(struct SessionHandle *data,
+                      unsigned char *entropy,
+                      size_t length)
+{
+#if defined(USE_GNUTLS_NETTLE)
+  (void)data;
+  gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length);
+#elif defined(USE_GNUTLS)
+  Curl_gtls_seed(data); /* Initiate the seed if not already done */
+  gcry_randomize(entropy, length, GCRY_STRONG_RANDOM);
+#endif
+}
+
+void Curl_gtls_md5sum(unsigned char *tmp, /* input */
+                      size_t tmplen,
+                      unsigned char *md5sum, /* output */
+                      size_t md5len)
+{
+#if defined(USE_GNUTLS_NETTLE)
+  struct md5_ctx MD5pw;
+  md5_init(&MD5pw);
+  md5_update(&MD5pw, tmplen, tmp);
+  md5_digest(&MD5pw, md5len, md5sum);
+#elif defined(USE_GNUTLS)
+  gcry_md_hd_t MD5pw;
+  gcry_md_open(&MD5pw, GCRY_MD_MD5, 0);
+  gcry_md_write(MD5pw, tmp, tmplen);
+  memcpy(md5sum, gcry_md_read (MD5pw, 0), md5len);
+  gcry_md_close(MD5pw);
+#endif
+}
+
 #endif /* USE_GNUTLS */
index 51e0af1..453542e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __GTLS_H
-#define __GTLS_H
+#ifndef HEADER_CURL_GTLS_H
+#define HEADER_CURL_GTLS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
+#include "curl_setup.h"
+
 #ifdef USE_GNUTLS
 
+#include "urldata.h"
+
 int Curl_gtls_init(void);
 int Curl_gtls_cleanup(void);
 CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex);
@@ -43,6 +47,18 @@ size_t Curl_gtls_version(char *buffer, size_t size);
 int Curl_gtls_shutdown(struct connectdata *conn, int sockindex);
 int Curl_gtls_seed(struct SessionHandle *data);
 
+void Curl_gtls_random(struct SessionHandle *data,
+                      unsigned char *entropy,
+                      size_t length);
+void Curl_gtls_md5sum(unsigned char *tmp, /* input */
+                      size_t tmplen,
+                      unsigned char *md5sum, /* output */
+                      size_t md5len);
+
+/* this backend provides these functions: */
+#define have_curlssl_random 1
+#define have_curlssl_md5sum 1
+
 /* API setup for GnuTLS */
 #define curlssl_init Curl_gtls_init
 #define curlssl_cleanup Curl_gtls_cleanup
@@ -52,12 +68,14 @@ int Curl_gtls_seed(struct SessionHandle *data);
 #define curlssl_close_all Curl_gtls_close_all
 #define curlssl_close Curl_gtls_close
 #define curlssl_shutdown(x,y) Curl_gtls_shutdown(x,y)
-#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
 #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
 #define curlssl_version Curl_gtls_version
 #define curlssl_check_cxn(x) (x=x, -1)
 #define curlssl_data_pending(x,y) (x=x, y=y, 0)
+#define curlssl_random(x,y,z) Curl_gtls_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_gtls_md5sum(a,b,c,d)
 
 #endif /* USE_GNUTLS */
-#endif
+#endif /* HEADER_CURL_GTLS_H */
index cdcd260..4a12e1a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
+#include "curl_setup.h"
 
 #include "hash.h"
 #include "llist.h"
@@ -41,11 +38,14 @@ hash_element_dtor(void *user, void *element)
   struct curl_hash *h = (struct curl_hash *) user;
   struct curl_hash_element *e = (struct curl_hash_element *) element;
 
-  if(e->key)
-    free(e->key);
+  Curl_safefree(e->key);
 
-  if(e->ptr)
+  if(e->ptr) {
     h->dtor(e->ptr);
+    e->ptr = NULL;
+  }
+
+  e->key_len = 0;
 
   free(e);
 }
@@ -72,19 +72,25 @@ Curl_hash_init(struct curl_hash *h,
 
   h->table = malloc(slots * sizeof(struct curl_llist *));
   if(h->table) {
-    for (i = 0; i < slots; ++i) {
+    for(i = 0; i < slots; ++i) {
       h->table[i] = Curl_llist_alloc((curl_llist_dtor) hash_element_dtor);
       if(!h->table[i]) {
-        while(i--)
+        while(i--) {
           Curl_llist_destroy(h->table[i], NULL);
+          h->table[i] = NULL;
+        }
         free(h->table);
+        h->table = NULL;
+        h->slots = 0;
         return 1; /* failure */
       }
     }
     return 0; /* fine */
   }
-  else
+  else {
+    h->slots = 0;
     return 1; /* failure */
+  }
 }
 
 struct curl_hash *
@@ -140,7 +146,10 @@ mk_hash_element(const void *key, size_t key_len, const void *p)
 #define FETCH_LIST(x,y,z) x->table[x->hash_func(y, z, x->slots)]
 
 /* Insert the data in the hash. If there already was a match in the hash,
-   that data is replaced. */
+ * that data is replaced.
+ *
+ * @unittest: 1305
+ */
 void *
 Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p)
 {
@@ -148,7 +157,7 @@ Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p)
   struct curl_llist_element *le;
   struct curl_llist *l = FETCH_LIST (h, key, key_len);
 
-  for (le = l->head; le; le = le->next) {
+  for(le = l->head; le; le = le->next) {
     he = (struct curl_hash_element *) le->ptr;
     if(h->comp_func(he->key, he->key_len, key, key_len)) {
       Curl_llist_remove(l, le, (void *)h);
@@ -183,10 +192,11 @@ int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len)
   struct curl_hash_element  *he;
   struct curl_llist *l = FETCH_LIST(h, key, key_len);
 
-  for (le = l->head; le; le = le->next) {
+  for(le = l->head; le; le = le->next) {
     he = le->ptr;
     if(h->comp_func(he->key, he->key_len, key, key_len)) {
       Curl_llist_remove(l, le, (void *) h);
+      --h->size;
       return 0;
     }
   }
@@ -198,12 +208,15 @@ Curl_hash_pick(struct curl_hash *h, void *key, size_t key_len)
 {
   struct curl_llist_element *le;
   struct curl_hash_element  *he;
-  struct curl_llist *l = FETCH_LIST(h, key, key_len);
+  struct curl_llist *l;
 
-  for (le = l->head; le; le = le->next) {
-    he = le->ptr;
-    if(h->comp_func(he->key, he->key_len, key, key_len)) {
-      return he->ptr;
+  if(h) {
+    l = FETCH_LIST(h, key, key_len);
+    for(le = l->head; le; le = le->next) {
+      he = le->ptr;
+      if(h->comp_func(he->key, he->key_len, key, key_len)) {
+        return he->ptr;
+      }
     }
   }
 
@@ -218,10 +231,10 @@ Curl_hash_apply(curl_hash *h, void *user,
   struct curl_llist_element  *le;
   int                  i;
 
-  for (i = 0; i < h->slots; ++i) {
-    for (le = (h->table[i])->head;
-         le;
-         le = le->next) {
+  for(i = 0; i < h->slots; ++i) {
+    for(le = (h->table[i])->head;
+        le;
+        le = le->next) {
       curl_hash_element *el = le->ptr;
       cb(user, el->ptr);
     }
@@ -234,12 +247,14 @@ Curl_hash_clean(struct curl_hash *h)
 {
   int i;
 
-  for (i = 0; i < h->slots; ++i) {
+  for(i = 0; i < h->slots; ++i) {
     Curl_llist_destroy(h->table[i], (void *) h);
     h->table[i] = NULL;
   }
 
-  free(h->table);
+  Curl_safefree(h->table);
+  h->size = 0;
+  h->slots = 0;
 }
 
 void
@@ -251,7 +266,10 @@ Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
   struct curl_llist *list;
   int i;
 
-  for (i = 0; i < h->slots; ++i) {
+  if(!h)
+    return;
+
+  for(i = 0; i < h->slots; ++i) {
     list = h->table[i];
     le = list->head; /* get first list entry */
     while(le) {
@@ -306,34 +324,77 @@ size_t Curl_str_key_compare(void*k1, size_t key1_len, void*k2, size_t key2_len)
   return 0;
 }
 
+void Curl_hash_start_iterate(struct curl_hash *hash,
+                             struct curl_hash_iterator *iter)
+{
+  iter->hash = hash;
+  iter->slot_index = 0;
+  iter->current_element = NULL;
+}
+
+struct curl_hash_element *
+Curl_hash_next_element(struct curl_hash_iterator *iter)
+{
+  int i;
+  struct curl_hash *h = iter->hash;
+
+  /* Get the next element in the current list, if any */
+  if(iter->current_element)
+    iter->current_element = iter->current_element->next;
+
+  /* If we have reached the end of the list, find the next one */
+  if(!iter->current_element) {
+    for(i = iter->slot_index;i < h->slots;i++) {
+      if(h->table[i]->head) {
+        iter->current_element = h->table[i]->head;
+        iter->slot_index = i+1;
+        break;
+      }
+    }
+  }
+
+  if(iter->current_element) {
+    struct curl_hash_element *he = iter->current_element->ptr;
+    return he;
+  }
+  else {
+    iter->current_element = NULL;
+    return NULL;
+  }
+}
+
 #if 0 /* useful function for debugging hashes and their contents */
 void Curl_hash_print(struct curl_hash *h,
                      void (*func)(void *))
 {
-  int i;
-  struct curl_llist_element *le;
-  struct curl_llist *list;
-  struct curl_hash_element  *he;
+  struct curl_hash_iterator iter;
+  struct curl_hash_element *he;
+  int last_index = -1;
+
   if(!h)
     return;
 
   fprintf(stderr, "=Hash dump=\n");
 
-  for (i = 0; i < h->slots; i++) {
-    list = h->table[i];
-    le = list->head; /* get first list entry */
-    if(le) {
-      fprintf(stderr, "index %d:", i);
-      while(le) {
-        he = le->ptr;
-        if(func)
-          func(he->ptr);
-        else
-          fprintf(stderr, " [%p]", he->ptr);
-        le = le->next;
+  Curl_hash_start_iterate(h, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    if(iter.slot_index != last_index) {
+      fprintf(stderr, "index %d:", iter.slot_index);
+      if(last_index >= 0) {
+        fprintf(stderr, "\n");
       }
-      fprintf(stderr, "\n");
+      last_index = iter.slot_index;
     }
+
+    if(func)
+      func(he->ptr);
+    else
+      fprintf(stderr, " [%p]", (void *)he->ptr);
+
+    he = Curl_hash_next_element(&iter);
   }
+  fprintf(stderr, "\n");
 }
 #endif
index 993aaed..aa935d4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __HASH_H
-#define __HASH_H
+#ifndef HEADER_CURL_HASH_H
+#define HEADER_CURL_HASH_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <stddef.h>
 
@@ -62,6 +62,11 @@ struct curl_hash_element {
   size_t key_len;
 };
 
+struct curl_hash_iterator {
+  struct curl_hash *hash;
+  int slot_index;
+  struct curl_llist_element *current_element;
+};
 
 int Curl_hash_init(struct curl_hash *h,
                    int slots,
@@ -89,4 +94,13 @@ size_t Curl_hash_str(void* key, size_t key_length, size_t slots_num);
 size_t Curl_str_key_compare(void*k1, size_t key1_len, void*k2,
                             size_t key2_len);
 
-#endif
+void Curl_hash_start_iterate(struct curl_hash *hash,
+                             struct curl_hash_iterator *iter);
+struct curl_hash_element *
+Curl_hash_next_element(struct curl_hash_iterator *iter);
+
+void Curl_hash_print(struct curl_hash *h,
+                     void (*func)(void *));
+
+
+#endif /* HEADER_CURL_HASH_H */
index 8cb5f2e..dace820 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
 
@@ -59,7 +59,8 @@ Curl_HMAC_init(const HMAC_params * hashparams,
   unsigned char b;
 
   /* Create HMAC context. */
-  i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + hashparams->hmac_resultlen;
+  i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize +
+    hashparams->hmac_resultlen;
   ctxt = malloc(i);
 
   if(!ctxt)
@@ -84,14 +85,14 @@ Curl_HMAC_init(const HMAC_params * hashparams,
   (*hashparams->hmac_hinit)(ctxt->hmac_hashctxt1);
   (*hashparams->hmac_hinit)(ctxt->hmac_hashctxt2);
 
-  for (i = 0; i < keylen; i++) {
+  for(i = 0; i < keylen; i++) {
     b = (unsigned char)(*key ^ hmac_ipad);
     (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &b, 1);
     b = (unsigned char)(*key++ ^ hmac_opad);
     (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &b, 1);
   }
 
-  for (; i < hashparams->hmac_maxkeylen; i++) {
+  for(; i < hashparams->hmac_maxkeylen; i++) {
     (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &hmac_ipad, 1);
     (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &hmac_opad, 1);
   }
@@ -114,7 +115,8 @@ int Curl_HMAC_final(HMAC_context * ctxt, unsigned char * result)
 {
   const HMAC_params * hashparams = ctxt->hmac_hash;
 
-  /* Do not get result if called with a null parameter: only release storage. */
+  /* Do not get result if called with a null parameter: only release
+     storage. */
 
   if(!result)
     result = (unsigned char *) ctxt->hmac_hashctxt2 +
diff --git a/lib/hostares.c b/lib/hostares.c
deleted file mode 100644 (file)
index 97cb27a..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, 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 "setup.h"
-
-#include <string.h>
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
-#ifdef __VMS
-#include <in.h>
-#include <inet.h>
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_PROCESS_H
-#include <process.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"
-#include "hash.h"
-#include "share.h"
-#include "strerror.h"
-#include "url.h"
-#include "multiif.h"
-#include "inet_pton.h"
-#include "connect.h"
-#include "select.h"
-#include "progress.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
-
-/***********************************************************************
- * Only for ares-enabled builds
- **********************************************************************/
-
-#ifdef CURLRES_ARES
-
-/*
- * Curl_resolv_fdset() is called when someone from the outside world (using
- * curl_multi_fdset()) wants to get our fd_set setup and we're talking with
- * ares. The caller must make sure that this function is only called when we
- * have a working ares channel.
- *
- * Returns: CURLE_OK always!
- */
-
-int Curl_resolv_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
-                        int numsocks)
-
-{
-  struct timeval maxtime;
-  struct timeval timebuf;
-  struct timeval *timeout;
-  int max = ares_getsock(conn->data->state.areschannel,
-                         (ares_socket_t *)socks, numsocks);
-
-
-  maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
-  maxtime.tv_usec = 0;
-
-  timeout = ares_timeout(conn->data->state.areschannel, &maxtime, &timebuf);
-
-  Curl_expire(conn->data,
-              (timeout->tv_sec * 1000) + (timeout->tv_usec/1000));
-
-  return max;
-}
-
-/*
- * waitperform()
- *
- * 1) Ask ares what sockets it currently plays with, then
- * 2) wait for the timeout period to check for action on ares' sockets.
- * 3) tell ares to act on all the sockets marked as "with action"
- *
- * return number of sockets it worked on
- */
-
-static int waitperform(struct connectdata *conn, int timeout_ms)
-{
-  struct SessionHandle *data = conn->data;
-  int nfds;
-  int bitmask;
-  ares_socket_t socks[ARES_GETSOCK_MAXNUM];
-  struct pollfd pfd[ARES_GETSOCK_MAXNUM];
-  int i;
-  int num = 0;
-
-  bitmask = ares_getsock(data->state.areschannel, socks, ARES_GETSOCK_MAXNUM);
-
-  for(i=0; i < ARES_GETSOCK_MAXNUM; i++) {
-    pfd[i].events = 0;
-    pfd[i].revents = 0;
-    if(ARES_GETSOCK_READABLE(bitmask, i)) {
-      pfd[i].fd = socks[i];
-      pfd[i].events |= POLLRDNORM|POLLIN;
-    }
-    if(ARES_GETSOCK_WRITABLE(bitmask, i)) {
-      pfd[i].fd = socks[i];
-      pfd[i].events |= POLLWRNORM|POLLOUT;
-    }
-    if(pfd[i].events != 0)
-      num++;
-    else
-      break;
-  }
-
-  if(num)
-    nfds = Curl_poll(pfd, num, timeout_ms);
-  else
-    nfds = 0;
-
-  if(!nfds)
-    /* Call ares_process() unconditonally here, even if we simply timed out
-       above, as otherwise the ares name resolve won't timeout! */
-    ares_process_fd(data->state.areschannel, ARES_SOCKET_BAD, ARES_SOCKET_BAD);
-  else {
-    /* move through the descriptors and ask for processing on them */
-    for(i=0; i < num; i++)
-      ares_process_fd(data->state.areschannel,
-                      pfd[i].revents & (POLLRDNORM|POLLIN)?
-                      pfd[i].fd:ARES_SOCKET_BAD,
-                      pfd[i].revents & (POLLWRNORM|POLLOUT)?
-                      pfd[i].fd:ARES_SOCKET_BAD);
-  }
-  return nfds;
-}
-
-/*
- * Curl_is_resolved() is called repeatedly to check if a previous name resolve
- * request has completed. It should also make sure to time-out if the
- * operation seems to take too long.
- *
- * Returns normal CURLcode errors.
- */
-CURLcode Curl_is_resolved(struct connectdata *conn,
-                          struct Curl_dns_entry **dns)
-{
-  struct SessionHandle *data = conn->data;
-
-  *dns = NULL;
-
-  waitperform(conn, 0);
-
-  if(conn->async.done) {
-    /* we're done, kill the ares handle */
-    if(!conn->async.dns) {
-      failf(data, "Could not resolve host: %s (%s)", conn->host.dispname,
-            ares_strerror(conn->async.status));
-      return CURLE_COULDNT_RESOLVE_HOST;
-    }
-    *dns = conn->async.dns;
-  }
-
-  return CURLE_OK;
-}
-
-/*
- * Curl_wait_for_resolv() waits for a resolve to finish. This function should
- * be avoided since using this risk getting the multi interface to "hang".
- *
- * If 'entry' is non-NULL, make it point to the resolved dns entry
- *
- * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and
- * CURLE_OPERATION_TIMEDOUT if a time-out occurred.
- */
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
-                              struct Curl_dns_entry **entry)
-{
-  CURLcode rc=CURLE_OK;
-  struct SessionHandle *data = conn->data;
-  long timeout;
-  struct timeval now = Curl_tvnow();
-
-  timeout = Curl_timeleft(conn, &now, TRUE);
-  if(!timeout)
-    timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
-
-  /* Wait for the name resolve query to complete. */
-  for(;;) {
-    struct timeval *tvp, tv, store;
-    long timediff;
-    int itimeout;
-    int timeout_ms;
-
-    itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
-
-    store.tv_sec = itimeout/1000;
-    store.tv_usec = (itimeout%1000)*1000;
-
-    tvp = ares_timeout(data->state.areschannel, &store, &tv);
-
-    /* use the timeout period ares returned to us above if less than one
-       second is left, otherwise just use 1000ms to make sure the progress
-       callback gets called frequent enough */
-    if(!tvp->tv_sec)
-      timeout_ms = (int)(tvp->tv_usec/1000);
-    else
-      timeout_ms = 1000;
-
-    waitperform(conn, timeout_ms);
-
-    if(conn->async.done)
-      break;
-
-    if(Curl_pgrsUpdate(conn)) {
-      rc = CURLE_ABORTED_BY_CALLBACK;
-      timeout = -1; /* trigger the cancel below */
-    }
-    else {
-      struct timeval now2 = Curl_tvnow();
-      timediff = Curl_tvdiff(now2, now); /* spent time */
-      timeout -= timediff?timediff:1; /* always deduct at least 1 */
-      now = now2; /* for next loop */
-    }
-    if(timeout < 0) {
-      /* our timeout, so we cancel the ares operation */
-      ares_cancel(data->state.areschannel);
-      break;
-    }
-  }
-
-  /* Operation complete, if the lookup was successful we now have the entry
-     in the cache. */
-
-  if(entry)
-    *entry = conn->async.dns;
-
-  if(!conn->async.dns) {
-    /* a name was not resolved */
-    if((timeout < 0) || (conn->async.status == ARES_ETIMEOUT)) {
-      if (conn->bits.httpproxy) {
-        failf(data, "Resolving proxy timed out: %s", conn->proxy.dispname);
-        rc = CURLE_COULDNT_RESOLVE_PROXY;
-      }
-      else {
-        failf(data, "Resolving host timed out: %s", conn->host.dispname);
-        rc = CURLE_COULDNT_RESOLVE_HOST;
-      }
-    }
-    else if(conn->async.done) {
-      if (conn->bits.httpproxy) {
-        failf(data, "Could not resolve proxy: %s (%s)", conn->proxy.dispname,
-              ares_strerror(conn->async.status));
-        rc = CURLE_COULDNT_RESOLVE_PROXY;
-      }
-      else {
-        failf(data, "Could not resolve host: %s (%s)", conn->host.dispname,
-              ares_strerror(conn->async.status));
-        rc = CURLE_COULDNT_RESOLVE_HOST;
-      }
-    }
-    else
-      rc = CURLE_OPERATION_TIMEDOUT;
-
-    /* close the connection, since we can't return failure here without
-       cleaning up this connection properly */
-    conn->bits.close = TRUE;
-  }
-
-  return rc;
-}
-
-/*
- * ares_query_completed_cb() is the callback that ares will call when
- * the host query initiated by ares_gethostbyname() from Curl_getaddrinfo(),
- * when using ares, is completed either successfully or with failure.
- */
-static void ares_query_completed_cb(void *arg,  /* (struct connectdata *) */
-                                    int status,
-#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
-                                    int timeouts,
-#endif
-                                    struct hostent *hostent)
-{
-  struct connectdata *conn = (struct connectdata *)arg;
-  struct Curl_addrinfo * ai = NULL;
-
-#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
-  (void)timeouts; /* ignored */
-#endif
-
-  if (status == CURL_ASYNC_SUCCESS) {
-    ai = Curl_he2ai(hostent, conn->async.port);
-  }
-
-  (void)Curl_addrinfo_callback(arg, status, ai);
-}
-
-/*
- * Curl_getaddrinfo() - when using ares
- *
- * Returns name information about the given hostname and port number. If
- * successful, the 'hostent' is returned and the forth argument will point to
- * memory we need to free after use. That memory *MUST* be freed with
- * Curl_freeaddrinfo(), nothing else.
- */
-Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
-                                const char *hostname,
-                                int port,
-                                int *waitp)
-{
-  char *bufp;
-  struct SessionHandle *data = conn->data;
-  struct in_addr in;
-  int family = PF_INET;
-#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
-  struct in6_addr in6;
-#endif /* CURLRES_IPV6 */
-
-  *waitp = 0; /* default to synchronous response */
-
-  /* First check if this is an IPv4 address string */
-  if(Curl_inet_pton(AF_INET, hostname, &in) > 0) {
-    /* This is a dotted IP address 123.123.123.123-style */
-    return Curl_ip2addr(AF_INET, &in, hostname, port);
-  }
-
-#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
-  /* Otherwise, check if this is an IPv6 address string */
-  if (Curl_inet_pton (AF_INET6, hostname, &in6) > 0) {
-    /* This must be an IPv6 address literal.  */
-    return Curl_ip2addr(AF_INET6, &in6, hostname, port);
-  }
-
-  switch(conn->ip_version) {
-  default:
-#if ARES_VERSION >= 0x010601
-    family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
-                           c-ares versions this just falls through and defaults
-                           to PF_INET */
-    break;
-#endif
-  case CURL_IPRESOLVE_V4:
-    family = PF_INET;
-    break;
-  case CURL_IPRESOLVE_V6:
-    family = PF_INET6;
-    break;
-  }
-#endif /* CURLRES_IPV6 */
-
-  bufp = strdup(hostname);
-
-  if(bufp) {
-    Curl_safefree(conn->async.hostname);
-    conn->async.hostname = bufp;
-    conn->async.port = port;
-    conn->async.done = FALSE; /* not done */
-    conn->async.status = 0;   /* clear */
-    conn->async.dns = NULL;   /* clear */
-
-    /* areschannel is already setup in the Curl_open() function */
-    ares_gethostbyname(data->state.areschannel, hostname, family,
-                       (ares_host_callback)ares_query_completed_cb, conn);
-
-    *waitp = 1; /* expect asynchronous response */
-  }
-  return NULL; /* no struct yet */
-}
-#endif /* CURLRES_ARES */
index 127b8d3..8151b67 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H
@@ -82,7 +70,7 @@
  *
  * The storage operation locks and unlocks the DNS cache.
  */
-CURLcode Curl_addrinfo_callback(struct connectdata * conn,
+CURLcode Curl_addrinfo_callback(struct connectdata *conn,
                                 int status,
                                 struct Curl_addrinfo *ai)
 {
@@ -110,8 +98,9 @@ CURLcode Curl_addrinfo_callback(struct connectdata * conn,
       if(data->share)
         Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
     }
-    else
+    else {
       rc = CURLE_OUT_OF_MEMORY;
+    }
   }
 
   conn->async.dns = dns;
@@ -126,4 +115,43 @@ CURLcode Curl_addrinfo_callback(struct connectdata * conn,
   return rc;
 }
 
+/* Call this function after Curl_connect() has returned async=TRUE and
+   then a successful name resolve has been received.
+
+   Note: this function disconnects and frees the conn data in case of
+   resolve failure */
+CURLcode Curl_async_resolved(struct connectdata *conn,
+                             bool *protocol_done)
+{
+  CURLcode code;
+
+  if(conn->async.dns) {
+    conn->dns_entry = conn->async.dns;
+    conn->async.dns = NULL;
+  }
+
+  code = Curl_setup_conn(conn, protocol_done);
+
+  if(code)
+    /* We're not allowed to return failure with memory left allocated
+       in the connectdata struct, free those here */
+    Curl_disconnect(conn, FALSE); /* close the connection */
+
+  return code;
+}
+
+/*
+ * Curl_getaddrinfo() is the generic low-level name resolve API within this
+ * source file. There are several versions of this function - for different
+ * name resolve layers (selected at build-time). They all take this same set
+ * of arguments
+ */
+Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
+                                const char *hostname,
+                                int port,
+                                int *waitp)
+{
+  return Curl_resolver_getaddrinfo(conn, hostname, port, waitp);
+}
+
 #endif /* CURLRES_ASYNCH */
diff --git a/lib/hostcheck.c b/lib/hostcheck.c
new file mode 100644 (file)
index 0000000..abd1fa0
--- /dev/null
@@ -0,0 +1,97 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#if defined(USE_SSLEAY) || defined(USE_AXTLS) || defined(USE_QSOSSL) || \
+    defined(USE_GSKIT)
+/* these backends use functions from this file */
+
+#include "hostcheck.h"
+#include "rawstr.h"
+
+/*
+ * Match a hostname against a wildcard pattern.
+ * E.g.
+ *  "foo.host.com" matches "*.host.com".
+ *
+ * We use the matching rule described in RFC6125, section 6.4.3.
+ * http://tools.ietf.org/html/rfc6125#section-6.4.3
+ */
+
+static int hostmatch(const char *hostname, const char *pattern)
+{
+  const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
+  int wildcard_enabled;
+  size_t prefixlen, suffixlen;
+  pattern_wildcard = strchr(pattern, '*');
+  if(pattern_wildcard == NULL)
+    return Curl_raw_equal(pattern, hostname) ?
+      CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+  /* We require at least 2 dots in pattern to avoid too wide wildcard
+     match. */
+  wildcard_enabled = 1;
+  pattern_label_end = strchr(pattern, '.');
+  if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL ||
+     pattern_wildcard > pattern_label_end ||
+     Curl_raw_nequal(pattern, "xn--", 4)) {
+    wildcard_enabled = 0;
+  }
+  if(!wildcard_enabled)
+    return Curl_raw_equal(pattern, hostname) ?
+      CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+  hostname_label_end = strchr(hostname, '.');
+  if(hostname_label_end == NULL ||
+     !Curl_raw_equal(pattern_label_end, hostname_label_end))
+    return CURL_HOST_NOMATCH;
+
+  /* The wildcard must match at least one character, so the left-most
+     label of the hostname is at least as large as the left-most label
+     of the pattern. */
+  if(hostname_label_end - hostname < pattern_label_end - pattern)
+    return CURL_HOST_NOMATCH;
+
+  prefixlen = pattern_wildcard - pattern;
+  suffixlen = pattern_label_end - (pattern_wildcard+1);
+  return Curl_raw_nequal(pattern, hostname, prefixlen) &&
+    Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen,
+                    suffixlen) ?
+    CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+}
+
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
+{
+  if(!match_pattern || !*match_pattern ||
+      !hostname || !*hostname) /* sanity check */
+    return 0;
+
+  if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
+    return 1;
+
+  if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH)
+    return 1;
+  return 0;
+}
+
+#endif /* SSLEAY or AXTLS or QSOSSL or GSKIT */
diff --git a/lib/hostcheck.h b/lib/hostcheck.h
new file mode 100644 (file)
index 0000000..f4a517a
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef HEADER_CURL_HOSTCHECK_H
+#define HEADER_CURL_HOSTCHECK_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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>
+
+#define CURL_HOST_NOMATCH 0
+#define CURL_HOST_MATCH   1
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname);
+
+#endif /* HEADER_CURL_HOSTCHECK_H */
+
index 3db5b49..f37b492 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_SETJMP_H
  * hostip.c   - method-independent resolver functions and utility functions
  * hostasyn.c - functions for asynchronous name resolves
  * hostsyn.c  - functions for synchronous name resolves
- * hostares.c - functions for ares-using name resolves
- * hostthre.c - functions for threaded name resolves
  * hostip4.c  - ipv4-specific functions
  * hostip6.c  - ipv6-specific functions
  *
+ * The two asynchronous name resolver backends are implemented in:
+ * asyn-ares.c   - functions for ares-using name resolves
+ * asyn-thread.c - functions for threaded name resolves
+
  * The hostip.h is the united header file for all this. It defines the
- * CURLRES_* defines based on the config*.h and setup.h defines.
+ * CURLRES_* defines based on the config*.h and curl_setup.h defines.
  */
 
 /* These two symbols are for the global DNS cache */
@@ -150,6 +140,10 @@ struct curl_hash *Curl_global_host_cache_init(void)
 void Curl_global_host_cache_dtor(void)
 {
   if(host_cache_initialized) {
+    /* first make sure that any custom "CURLOPT_RESOLVE" names are
+       cleared off */
+    Curl_hostcache_clean(NULL, &hostname_cache);
+    /* then free the remaining hash completely */
     Curl_hash_clean(&hostname_cache);
     host_cache_initialized = 0;
   }
@@ -205,14 +199,23 @@ Curl_printable_address(const Curl_addrinfo *ai, char *buf, size_t bufsize)
 }
 
 /*
- * Return a hostcache id string for the providing host + port, to be used by
+ * Return a hostcache id string for the provided host + port, to be used by
  * the DNS caching.
  */
 static char *
-create_hostcache_id(const char *server, int port)
+create_hostcache_id(const char *name, int port)
 {
   /* create and return the new allocated entry */
-  return aprintf("%s:%d", server, port);
+  char *id = aprintf("%s:%d", name, port);
+  char *ptr = id;
+  if(ptr) {
+    /* lower case the name part */
+    while(*ptr && (*ptr != ':')) {
+      *ptr = (char)TOLOWER(*ptr);
+      ptr++;
+    }
+  }
+  return id;
 }
 
 struct hostcache_prune_data {
@@ -288,7 +291,7 @@ remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
 {
   struct hostcache_prune_data user;
 
-  if( !dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
+  if(!dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
     /* cache forever means never prune, and NULL hostcache means
        we can't do it */
     return 0;
@@ -296,7 +299,7 @@ remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
   time(&user.now);
   user.cache_timeout = data->set.dns_cache_timeout;
 
-  if( !hostcache_timestamp_remove(&user,dns) )
+  if(!hostcache_timestamp_remove(&user,dns) )
     return 0;
 
   Curl_hash_clean_with_criterium(data->dns.hostcache,
@@ -426,7 +429,7 @@ int Curl_resolv(struct connectdata *conn,
   free(entry_id);
 
   /* See whether the returned entry is stale. Done before we release lock */
-  if( remove_entry_if_stale(data, dns) )
+  if(remove_entry_if_stale(data, dns))
     dns = NULL; /* the memory deallocation is being handled by the hash */
 
   if(dns) {
@@ -464,7 +467,7 @@ int Curl_resolv(struct connectdata *conn,
         /* the response to our resolve call will come asynchronously at
            a later time, good or bad */
         /* First, check that we haven't received the info by now */
-        result = Curl_is_resolved(conn, &dns);
+        result = Curl_resolver_is_resolved(conn, &dns);
         if(result) /* error detected */
           return CURLRESOLV_ERROR;
         if(dns)
@@ -558,8 +561,12 @@ int Curl_resolv_timeout(struct connectdata *conn,
 
   *entry = NULL;
 
+  if(timeoutms < 0)
+    /* got an already expired timeout */
+    return CURLRESOLV_TIMEDOUT;
+
 #ifdef USE_ALARM_TIMEOUT
-  if (data->set.no_signal)
+  if(data->set.no_signal)
     /* Ignore the timeout when signals are disabled */
     timeout = 0;
   else
@@ -678,23 +685,25 @@ clean_up:
  * Curl_resolv_unlock() unlocks the given cached DNS entry. When this has been
  * made, the struct may be destroyed due to pruning. It is important that only
  * one unlock is made for each Curl_resolv() call.
+ *
+ * May be called with 'data' == NULL for global cache.
  */
 void Curl_resolv_unlock(struct SessionHandle *data, struct Curl_dns_entry *dns)
 {
   DEBUGASSERT(dns && (dns->inuse>0));
 
-  if(data->share)
+  if(data && data->share)
     Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
 
   dns->inuse--;
   /* only free if nobody is using AND it is not in hostcache (timestamp ==
      0) */
-  if (dns->inuse == 0 && dns->timestamp == 0) {
+  if(dns->inuse == 0 && dns->timestamp == 0) {
     Curl_freeaddrinfo(dns->addr);
     free(dns);
   }
 
-  if(data->share)
+  if(data && data->share)
     Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
 }
 
@@ -707,7 +716,7 @@ static void freednsentry(void *freethis)
 
   /* mark the entry as not in hostcache */
   p->timestamp = 0;
-  if (p->inuse == 0) {
+  if(p->inuse == 0) {
     Curl_freeaddrinfo(p->addr);
     free(p);
   }
@@ -721,4 +730,98 @@ struct curl_hash *Curl_mk_dnscache(void)
   return Curl_hash_alloc(7, Curl_hash_str, Curl_str_key_compare, freednsentry);
 }
 
+static int hostcache_inuse(void *data, void *hc)
+{
+  struct Curl_dns_entry *c = (struct Curl_dns_entry *) hc;
+
+  if(c->inuse == 1)
+    Curl_resolv_unlock(data, c);
+
+  return 1; /* free all entries */
+}
+
+/*
+ * Curl_hostcache_clean()
+ *
+ * This _can_ be called with 'data' == NULL but then of course no locking
+ * can be done!
+ */
+
+void Curl_hostcache_clean(struct SessionHandle *data,
+                          struct curl_hash *hash)
+{
+  /* Entries added to the hostcache with the CURLOPT_RESOLVE function are
+   * still present in the cache with the inuse counter set to 1. Detect them
+   * and cleanup!
+   */
+  Curl_hash_clean_with_criterium(hash, data, hostcache_inuse);
+}
+
 
+CURLcode Curl_loadhostpairs(struct SessionHandle *data)
+{
+  struct curl_slist *hostp;
+  char hostname[256];
+  char address[256];
+  int port;
+
+  for(hostp = data->change.resolve; hostp; hostp = hostp->next ) {
+    if(!hostp->data)
+      continue;
+    if(hostp->data[0] == '-') {
+      /* TODO: mark an entry for removal */
+    }
+    else if(3 == sscanf(hostp->data, "%255[^:]:%d:%255s", hostname, &port,
+                        address)) {
+      struct Curl_dns_entry *dns;
+      Curl_addrinfo *addr;
+      char *entry_id;
+      size_t entry_len;
+
+      addr = Curl_str2addr(address, port);
+      if(!addr) {
+        infof(data, "Resolve %s found illegal!\n", hostp->data);
+        continue;
+      }
+
+      /* Create an entry id, based upon the hostname and port */
+      entry_id = create_hostcache_id(hostname, port);
+      /* If we can't create the entry id, fail */
+      if(!entry_id) {
+        Curl_freeaddrinfo(addr);
+        return CURLE_OUT_OF_MEMORY;
+      }
+
+      entry_len = strlen(entry_id);
+
+      if(data->share)
+        Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
+
+      /* See if its already in our dns cache */
+      dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1);
+
+      /* free the allocated entry_id again */
+      free(entry_id);
+
+      if(!dns)
+        /* if not in the cache already, put this host in the cache */
+        dns = Curl_cache_addr(data, addr, hostname, port);
+      else
+        /* this is a duplicate, free it again */
+        Curl_freeaddrinfo(addr);
+
+      if(data->share)
+        Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
+
+      if(!dns) {
+        Curl_freeaddrinfo(addr);
+        return CURLE_OUT_OF_MEMORY;
+      }
+      infof(data, "Added %s:%d:%s to DNS cache\n",
+            hostname, port, address);
+    }
+  }
+  data->change.resolve = NULL; /* dealt with now */
+
+  return CURLE_OK;
+}
index 2f8d4b5..a38f732 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 #include "hash.h"
 #include "curl_addrinfo.h"
+#include "asyn.h"
 
 #ifdef HAVE_SETJMP_H
 #include <setjmp.h>
 #define in_addr_t unsigned long
 #endif
 
-/*
- * Comfortable CURLRES_* definitions are included from setup.h
- */
-
-#ifdef USE_ARES
-#include <ares_version.h>
-#endif
-
 /* Allocate enough memory to hold the full name information structs and
  * everything. OSF1 is known to require at least 8872 bytes. The buffer
  * required for storing all possible aliases and IP numbers is according to
 #define CURL_TIMEOUT_RESOLVE 300 /* when using asynch methods, we allow this
                                     many seconds for a name resolve */
 
-#ifdef CURLRES_ARES
-#define CURL_ASYNC_SUCCESS ARES_SUCCESS
-#if ARES_VERSION >= 0x010500
-/* c-ares 1.5.0 or later, the callback proto is modified */
-#define HAVE_CARES_CALLBACK_TIMEOUTS 1
-#endif
-#else
 #define CURL_ASYNC_SUCCESS CURLE_OK
-#define ares_cancel(x) do {} while(0)
-#define ares_destroy(x) do {} while(0)
-#endif
 
 struct addrinfo;
 struct hostent;
@@ -107,12 +90,22 @@ int Curl_resolv_timeout(struct connectdata *conn, const char *hostname,
                         int port, struct Curl_dns_entry **dnsentry,
                         long timeoutms);
 
+#ifdef CURLRES_IPV6
+/*
+ * Curl_ipv6works() returns TRUE if ipv6 seems to work.
+ */
+bool Curl_ipv6works(void);
+#else
+#define Curl_ipv6works() FALSE
+#endif
+
 /*
  * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
  * been set and returns TRUE if they are OK.
  */
 bool Curl_ipvalid(struct connectdata *conn);
 
+
 /*
  * Curl_getaddrinfo() is the generic low-level name resolve API within this
  * source file. There are several versions of this function - for different
@@ -124,20 +117,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
                                 int port,
                                 int *waitp);
 
-CURLcode Curl_is_resolved(struct connectdata *conn,
-                          struct Curl_dns_entry **dns);
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
-                              struct Curl_dns_entry **dnsentry);
-
-/* Curl_resolv_getsock() is a generic function that exists in multiple
-   versions depending on what name resolve technology we've built to use. The
-   function is called from the multi_getsock() function.  'sock' is a pointer
-   to an array to hold the file descriptors, with 'numsock' being the size of
-   that array (in number of entries). This function is supposed to return
-   bitmask indicating what file descriptors (referring to array indexes in the
-   'sock' array) to wait for, read/write. */
-int Curl_resolv_getsock(struct connectdata *conn, curl_socket_t *sock,
-                        int numsocks);
 
 /* unlock a previously resolved dns entry */
 void Curl_resolv_unlock(struct SessionHandle *data,
@@ -167,11 +146,18 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
 /* IPv4 threadsafe resolve function used for synch and asynch builds */
 Curl_addrinfo *Curl_ipv4_resolve_r(const char * hostname, int port);
 
+CURLcode Curl_async_resolved(struct connectdata *conn,
+                             bool *protocol_connect);
+
+#ifndef CURLRES_ASYNCH
+#define Curl_async_resolved(x,y) CURLE_OK
+#endif
+
 /*
  * Curl_addrinfo_callback() is used when we build with any asynch specialty.
  * Handles end of async request processing. Inserts ai into hostcache when
  * status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async
- * request completed wether successfull or failed.
+ * request completed whether successful or failed.
  */
 CURLcode Curl_addrinfo_callback(struct connectdata *conn,
                                 int status,
@@ -194,13 +180,6 @@ struct Curl_dns_entry *
 Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr,
                 const char *hostname, int port);
 
-/*
- * Curl_destroy_thread_data() cleans up async resolver data.
- * Complementary of ares_destroy.
- */
-struct Curl_async; /* forward-declaration */
-void Curl_destroy_thread_data(struct Curl_async *async);
-
 #ifndef INADDR_NONE
 #define CURL_INADDR_NONE (in_addr_t) ~0
 #else
@@ -216,4 +195,24 @@ void Curl_destroy_thread_data(struct Curl_async *async);
 extern sigjmp_buf curl_jmpenv;
 #endif
 
+/*
+ * Function provided by the resolver backend to set DNS servers to use.
+ */
+CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers);
+
+/*
+ * Clean off entries from the cache
+ */
+void Curl_hostcache_clean(struct SessionHandle *data, struct curl_hash *hash);
+
+/*
+ * Destroy the hostcache of this handle.
+ */
+void Curl_hostcache_destroy(struct SessionHandle *data);
+
+/*
+ * Populate the cache with specified entries from CURLOPT_RESOLVE.
+ */
+CURLcode Curl_loadhostpairs(struct SessionHandle *data);
+
 #endif /* HEADER_CURL_HOSTIP_H */
index 6dc5257..3a38b32 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H
@@ -87,6 +74,7 @@ bool Curl_ipvalid(struct connectdata *conn)
 }
 
 #ifdef CURLRES_SYNCH
+
 /*
  * Curl_getaddrinfo() - the ipv4 synchronous version.
  *
@@ -125,6 +113,8 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
 #endif /* CURLRES_SYNCH */
 #endif /* CURLRES_IPV4 */
 
+#if defined(CURLRES_IPV4) && !defined(CURLRES_ARES)
+
 /*
  * Curl_ipv4_resolve_r() - ipv4 threadsafe resolver function.
  *
@@ -317,3 +307,4 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname,
 
   return ai;
 }
+#endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */
index ca02807..c42760a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H
@@ -78,7 +66,7 @@
 #if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO)
 /* These are strictly for memory tracing and are using the same style as the
  * family otherwise present in memdebug.c. I put these ones here since they
- * require a bunch of structs I didn't wanna include in memdebug.c
+ * require a bunch of structs I didn't want to include in memdebug.c
  */
 
 /*
@@ -109,19 +97,36 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
 #endif /* defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) */
 
 /*
- * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
- * been set and returns TRUE if they are OK.
+ * Curl_ipv6works() returns TRUE if ipv6 seems to work.
  */
-bool Curl_ipvalid(struct connectdata *conn)
+bool Curl_ipv6works(void)
 {
-  if(conn->ip_version == CURL_IPRESOLVE_V6) {
-    /* see if we have an IPv6 stack */
+  /* the nature of most system is that IPv6 status doesn't come and go
+     during a program's lifetime so we only probe the first time and then we
+     have the info kept for fast re-use */
+  static int ipv6_works = -1;
+  if(-1 == ipv6_works) {
+    /* probe to see if we have a working IPv6 stack */
     curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
     if(s == CURL_SOCKET_BAD)
-      /* an ipv6 address was requested and we can't get/use one */
-      return FALSE;
-    sclose(s);
+      /* an ipv6 address was requested but we can't get/use one */
+      ipv6_works = 0;
+    else {
+      ipv6_works = 1;
+      Curl_closesocket(NULL, s);
+    }
   }
+  return (ipv6_works>0)?TRUE:FALSE;
+}
+
+/*
+ * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
+ * been set and returns TRUE if they are OK.
+ */
+bool Curl_ipvalid(struct connectdata *conn)
+{
+  if(conn->ip_version == CURL_IPRESOLVE_V6)
+    return Curl_ipv6works();
   return TRUE;
 }
 
@@ -131,7 +136,7 @@ bool Curl_ipvalid(struct connectdata *conn)
 static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai)
 {
   printf("dump_addrinfo:\n");
-  for ( ; ai; ai = ai->ai_next) {
+  for(; ai; ai = ai->ai_next) {
     char  buf[INET6_ADDRSTRLEN];
 
     printf("    fam %2d, CNAME %s, ",
@@ -143,7 +148,7 @@ static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai)
   }
 }
 #else
-#define dump_addrinfo(x,y)
+#define dump_addrinfo(x,y) Curl_nop_stmt
 #endif
 
 /*
@@ -186,23 +191,9 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
     break;
   }
 
-  if (pf != PF_INET) {
-    /* see if we have an IPv6 stack */
-    curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
-    if(s == CURL_SOCKET_BAD) {
-      /* Some non-IPv6 stacks have been found to make very slow name resolves
-       * when PF_UNSPEC is used, so thus we switch to a mere PF_INET lookup if
-       * the stack seems to be a non-ipv6 one. */
-
-      pf = PF_INET;
-    }
-    else {
-      /* This seems to be an IPv6-capable stack, use PF_UNSPEC for the widest
-       * possible checks. And close the socket again.
-       */
-      sclose(s);
-    }
-  }
+  if((pf != PF_INET) && !Curl_ipv6works())
+    /* the stack seems to be a non-ipv6 one */
+    pf = PF_INET;
 
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = pf;
index b68e470..65a4035 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>     /* for the close() proto */
-#endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H
 #ifdef CURLRES_SYNCH
 
 /*
- * Curl_wait_for_resolv() for synch-builds.  Curl_resolv() can never return
- * wait==TRUE, so this function will never be called. If it still gets called,
- * we return failure at once.
- *
- * We provide this function only to allow multi.c to remain unaware if we are
- * doing asynch resolves or not.
- */
-CURLcode Curl_wait_for_resolv(struct connectdata *conn,
-                              struct Curl_dns_entry **entry)
-{
-  (void)conn;
-  *entry=NULL;
-  return CURLE_COULDNT_RESOLVE_HOST;
-}
-
-/*
- * This function will never be called when synch-built. If it still gets
- * called, we return failure at once.
- *
- * We provide this function only to allow multi.c to remain unaware if we are
- * doing asynch resolves or not.
+ * Function provided by the resolver backend to set DNS servers to use.
  */
-CURLcode Curl_is_resolved(struct connectdata *conn,
-                          struct Curl_dns_entry **dns)
-{
-  (void)conn;
-  *dns = NULL;
-
-  return CURLE_COULDNT_RESOLVE_HOST;
-}
-
-/*
- * We just return OK, this function is never actually used for synch builds.
- * It is present here to keep #ifdefs out from multi.c
- */
-
-int Curl_resolv_getsock(struct connectdata *conn,
-                        curl_socket_t *sock,
-                        int numsocks)
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
+                              char *servers)
 {
-  (void)conn;
-  (void)sock;
-  (void)numsocks;
+  (void)data;
+  (void)servers;
+  return CURLE_NOT_BUILT_IN;
 
-  return 0; /* no bits since we don't use any socks */
 }
 
 #endif /* truly sync */
index e35437f..f4b7a48 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
 
-#ifdef HAVE_TIME_H
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #include <sys/param.h>
 #endif
 
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
 #include "formdata.h"
 #include "progress.h"
 #include "curl_base64.h"
@@ -84,7 +56,8 @@
 #include "strequal.h"
 #include "sslgen.h"
 #include "http_digest.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_wb.h"
 #include "http_negotiate.h"
 #include "url.h"
 #include "share.h"
 #include "multiif.h"
 #include "rawstr.h"
 #include "content_encoding.h"
-#include "rtsp.h"
+#include "http_proxy.h"
 #include "warnless.h"
+#include "non-ascii.h"
+#include "bundles.h"
+#include "pipeline.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 /* The last #include file should be: */
 #include "memdebug.h"
 
-/* Default proxy timeout in milliseconds */
-#define PROXY_TIMEOUT (3600*1000)
-
 /*
  * Forward declarations.
  */
 static int http_getsock_do(struct connectdata *conn,
                            curl_socket_t *socks,
                            int numsocks);
+static int http_should_fail(struct connectdata *conn);
+
 #ifdef USE_SSL
 static CURLcode https_connecting(struct connectdata *conn, bool *done);
 static int https_getsock(struct connectdata *conn,
@@ -139,10 +114,13 @@ const struct Curl_handler Curl_handler_http = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   http_getsock_do,                      /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_HTTP,                            /* defport */
-  PROT_HTTP,                            /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
 #ifdef USE_SSL
@@ -160,10 +138,13 @@ const struct Curl_handler Curl_handler_https = {
   ZERO_NULL,                            /* doing */
   https_getsock,                        /* proto_getsock */
   http_getsock_do,                      /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_HTTPS,                           /* defport */
-  PROT_HTTP | PROT_HTTPS | PROT_SSL     /* protocol */
+  CURLPROTO_HTTP | CURLPROTO_HTTPS,     /* protocol */
+  PROTOPT_SSL                           /* flags */
 };
 #endif
 
@@ -192,7 +173,7 @@ char *Curl_checkheaders(struct SessionHandle *data, const char *thisheader)
  * case of allocation failure. Returns an empty string if the header value
  * consists entirely of whitespace.
  */
-char *Curl_copy_header_value(const char *h)
+static char *copy_header_value(const char *h)
 {
   const char *start;
   const char *end;
@@ -202,10 +183,10 @@ char *Curl_copy_header_value(const char *h)
   DEBUGASSERT(h);
 
   /* Find the end of the header name */
-  while (*h && (*h != ':'))
+  while(*h && (*h != ':'))
     ++h;
 
-  if (*h)
+  if(*h)
     /* Skip over colon */
     ++h;
 
@@ -249,11 +230,13 @@ char *Curl_copy_header_value(const char *h)
  */
 static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
 {
-  char *authorization;
-  struct SessionHandle *data=conn->data;
+  size_t size = 0;
+  char *authorization = NULL;
+  struct SessionHandle *data = conn->data;
   char **userp;
   const char *user;
   const char *pwd;
+  CURLcode error;
 
   if(proxy) {
     userp = &conn->allocptr.proxyuserpwd;
@@ -267,20 +250,24 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy)
   }
 
   snprintf(data->state.buffer, sizeof(data->state.buffer), "%s:%s", user, pwd);
-  if(Curl_base64_encode(data, data->state.buffer,
-                        strlen(data->state.buffer),
-                        &authorization) > 0) {
-    if(*userp)
-      free(*userp);
-    *userp = aprintf( "%sAuthorization: Basic %s\r\n",
-                      proxy?"Proxy-":"",
-                      authorization);
-    free(authorization);
-    if(!*userp)
-      return CURLE_OUT_OF_MEMORY;
-  }
-  else
+
+  error = Curl_base64_encode(data,
+                             data->state.buffer, strlen(data->state.buffer),
+                             &authorization, &size);
+  if(error)
+    return error;
+
+  if(!authorization)
+    return CURLE_REMOTE_ACCESS_DENIED;
+
+  Curl_safefree(*userp);
+  *userp = aprintf("%sAuthorization: Basic %s\r\n",
+                   proxy?"Proxy-":"",
+                   authorization);
+  free(authorization);
+  if(!*userp)
     return CURLE_OUT_OF_MEMORY;
+
   return CURLE_OK;
 }
 
@@ -293,7 +280,7 @@ static bool pickoneauth(struct auth *pick)
 {
   bool picked;
   /* only deal with authentication we want */
-  long avail = pick->avail & pick->want;
+  unsigned long avail = pick->avail & pick->want;
   picked = TRUE;
 
   /* The order of these checks is highly relevant, as this will be the order
@@ -304,6 +291,8 @@ static bool pickoneauth(struct auth *pick)
     pick->picked = CURLAUTH_DIGEST;
   else if(avail & CURLAUTH_NTLM)
     pick->picked = CURLAUTH_NTLM;
+  else if(avail & CURLAUTH_NTLM_WB)
+    pick->picked = CURLAUTH_NTLM_WB;
   else if(avail & CURLAUTH_BASIC)
     pick->picked = CURLAUTH_BASIC;
   else {
@@ -338,17 +327,16 @@ static bool pickoneauth(struct auth *pick)
  *   }
  * }
  */
-CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
+static CURLcode http_perhapsrewind(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
   struct HTTP *http = data->state.proto.http;
   curl_off_t bytessent;
   curl_off_t expectsend = -1; /* default is unknown */
 
-  if(!http || !(conn->protocol & PROT_HTTP))
-    /* If this is still NULL, we have not reach very far and we can
-       safely skip this rewinding stuff, or this is attempted to get used
-       when HTTP isn't activated */
+  if(!http)
+    /* If this is still NULL, we have not reach very far and we can safely
+       skip this rewinding stuff */
     return CURLE_OK;
 
   switch(data->set.httpreq) {
@@ -391,15 +379,20 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
   if((expectsend == -1) || (expectsend > bytessent)) {
     /* There is still data left to send */
     if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
-       (data->state.authhost.picked == CURLAUTH_NTLM)) {
+       (data->state.authhost.picked == CURLAUTH_NTLM) ||
+       (data->state.authproxy.picked == CURLAUTH_NTLM_WB) ||
+       (data->state.authhost.picked == CURLAUTH_NTLM_WB)) {
       if(((expectsend - bytessent) < 2000) ||
-         (conn->ntlm.state != NTLMSTATE_NONE)) {
+         (conn->ntlm.state != NTLMSTATE_NONE) ||
+         (conn->proxyntlm.state != NTLMSTATE_NONE)) {
         /* The NTLM-negotiation has started *OR* there is just a little (<2K)
            data left to send, keep on sending. */
 
         /* rewind data when completely done sending! */
-        if(!conn->bits.authneg)
+        if(!conn->bits.authneg) {
           conn->bits.rewindaftersend = TRUE;
+          infof(data, "Rewind stream after send\n");
+        }
 
         return CURLE_OK;
       }
@@ -411,7 +404,7 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
             " bytes\n", (curl_off_t)(expectsend - bytessent));
     }
 
-    /* This is not NTLM or NTLM with many bytes left to send: close
+    /* This is not NTLM or many bytes left to send: close
      */
     conn->bits.close = TRUE;
     data->req.size = 0; /* don't download any more than 0 bytes */
@@ -475,7 +468,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
     if((data->set.httpreq != HTTPREQ_GET) &&
        (data->set.httpreq != HTTPREQ_HEAD) &&
        !conn->bits.rewindaftersend) {
-      code = Curl_http_perhapsrewind(conn);
+      code = http_perhapsrewind(conn);
       if(code)
         return code;
     }
@@ -496,7 +489,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
       data->state.authhost.done = TRUE;
     }
   }
-  if(Curl_http_should_fail(conn)) {
+  if(http_should_fail(conn)) {
     failf (data, "The requested URL returned error: %d",
            data->req.httpcode);
     code = CURLE_HTTP_RETURNED_ERROR;
@@ -520,7 +513,7 @@ output_auth_headers(struct connectdata *conn,
   struct SessionHandle *data = conn->data;
   const char *auth=NULL;
   CURLcode result = CURLE_OK;
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
   struct negotiatedata *negdata = proxy?
     &data->state.proxyneg:&data->state.negotiate;
 #endif
@@ -530,7 +523,8 @@ output_auth_headers(struct connectdata *conn,
   (void)path;
 #endif
 
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
+  negdata->state = GSS_AUTHNONE;
   if((authstatus->picked == CURLAUTH_GSSNEGOTIATE) &&
      negdata->context && !GSS_ERROR(negdata->status)) {
     auth="GSS-Negotiate";
@@ -551,6 +545,15 @@ output_auth_headers(struct connectdata *conn,
   }
   else
 #endif
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+  if(authstatus->picked == CURLAUTH_NTLM_WB) {
+    auth="NTLM_WB";
+    result = Curl_output_ntlm_wb(conn, proxy);
+    if(result)
+      return result;
+  }
+  else
+#endif
 #ifndef CURL_DISABLE_CRYPTO_AUTH
   if(authstatus->picked == CURLAUTH_DIGEST) {
     auth="Digest";
@@ -584,7 +587,7 @@ output_auth_headers(struct connectdata *conn,
           proxy?"Proxy":"Server", auth,
           proxy?(conn->proxyuser?conn->proxyuser:""):
                 (conn->user?conn->user:""));
-    authstatus->multi = (bool)(!authstatus->done);
+    authstatus->multi = (!authstatus->done) ? TRUE : FALSE;
   }
   else
     authstatus->multi = FALSE;
@@ -606,12 +609,12 @@ output_auth_headers(struct connectdata *conn,
  *
  * @returns CURLcode
  */
-static CURLcode
-http_output_auth(struct connectdata *conn,
-                 const char *request,
-                 const char *path,
-                 bool proxytunnel) /* TRUE if this is the request setting
-                                      up the proxy tunnel */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+                      const char *request,
+                      const char *path,
+                      bool proxytunnel) /* TRUE if this is the request setting
+                                           up the proxy tunnel */
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
@@ -691,7 +694,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
    */
   struct SessionHandle *data = conn->data;
 
-  long *availp;
+  unsigned long *availp;
   const char *start;
   struct auth *authp;
 
@@ -727,73 +730,74 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
    *
    */
 
-#ifdef HAVE_GSSAPI
-  if(checkprefix("GSS-Negotiate", start) ||
-      checkprefix("Negotiate", start)) {
-    int neg;
-    *availp |= CURLAUTH_GSSNEGOTIATE;
-    authp->avail |= CURLAUTH_GSSNEGOTIATE;
-
-    if(data->state.negotiate.state == GSS_AUTHSENT) {
-      /* if we sent GSS authentication in the outgoing request and we get this
-         back, we're in trouble */
-      infof(data, "Authentication problem. Ignoring this.\n");
-      data->state.authproblem = TRUE;
-    }
-    else {
-      neg = Curl_input_negotiate(conn, (bool)(httpcode == 407), start);
-      if(neg == 0) {
-        DEBUGASSERT(!data->req.newurl);
-        data->req.newurl = strdup(data->change.url);
-        if(!data->req.newurl)
-          return CURLE_OUT_OF_MEMORY;
-        data->state.authproblem = FALSE;
-        /* we received GSS auth info and we dealt with it fine */
-        data->state.negotiate.state = GSS_AUTHRECV;
-      }
-      else {
-        data->state.authproblem = TRUE;
-      }
-    }
-  }
-  else
-#endif
-#ifdef USE_NTLM
-    /* NTLM support requires the SSL crypto libs */
-    if(checkprefix("NTLM", start)) {
-      *availp |= CURLAUTH_NTLM;
-      authp->avail |= CURLAUTH_NTLM;
-      if(authp->picked == CURLAUTH_NTLM) {
-        /* NTLM authentication is picked and activated */
-        CURLntlm ntlm =
-          Curl_input_ntlm(conn, (bool)(httpcode == 407), start);
-
-        if(CURLNTLM_BAD != ntlm)
-          data->state.authproblem = FALSE;
-        else {
+  while(*start) {
+#ifdef USE_HTTP_NEGOTIATE
+    if(checkprefix("GSS-Negotiate", start) ||
+       checkprefix("Negotiate", start)) {
+      int neg;
+      *availp |= CURLAUTH_GSSNEGOTIATE;
+      authp->avail |= CURLAUTH_GSSNEGOTIATE;
+
+      if(authp->picked == CURLAUTH_GSSNEGOTIATE) {
+        if(data->state.negotiate.state == GSS_AUTHSENT) {
+          /* if we sent GSS authentication in the outgoing request and we get
+             this back, we're in trouble */
           infof(data, "Authentication problem. Ignoring this.\n");
           data->state.authproblem = TRUE;
         }
+        else {
+          neg = Curl_input_negotiate(conn, (bool)(httpcode == 407), start);
+          if(neg == 0) {
+            DEBUGASSERT(!data->req.newurl);
+            data->req.newurl = strdup(data->change.url);
+            if(!data->req.newurl)
+              return CURLE_OUT_OF_MEMORY;
+            data->state.authproblem = FALSE;
+            /* we received GSS auth info and we dealt with it fine */
+            data->state.negotiate.state = GSS_AUTHRECV;
+          }
+          else
+            data->state.authproblem = TRUE;
+        }
       }
     }
     else
 #endif
-#ifndef CURL_DISABLE_CRYPTO_AUTH
-      if(checkprefix("Digest", start)) {
-        if((authp->avail & CURLAUTH_DIGEST) != 0) {
-          infof(data, "Ignoring duplicate digest auth header.\n");
-        }
-        else {
-          CURLdigest dig;
-          *availp |= CURLAUTH_DIGEST;
-          authp->avail |= CURLAUTH_DIGEST;
-
-          /* We call this function on input Digest headers even if Digest
-           * authentication isn't activated yet, as we need to store the
-           * incoming data from this header in case we are gonna use Digest. */
-          dig = Curl_input_digest(conn, (bool)(httpcode == 407), start);
-
-          if(CURLDIGEST_FINE != dig) {
+#ifdef USE_NTLM
+      /* NTLM support requires the SSL crypto libs */
+      if(checkprefix("NTLM", start)) {
+        *availp |= CURLAUTH_NTLM;
+        authp->avail |= CURLAUTH_NTLM;
+        if(authp->picked == CURLAUTH_NTLM ||
+           authp->picked == CURLAUTH_NTLM_WB) {
+          /* NTLM authentication is picked and activated */
+          CURLcode ntlm =
+            Curl_input_ntlm(conn, (httpcode == 407)?TRUE:FALSE, start);
+          if(CURLE_OK == ntlm) {
+            data->state.authproblem = FALSE;
+#ifdef NTLM_WB_ENABLED
+            if(authp->picked == CURLAUTH_NTLM_WB) {
+              *availp &= ~CURLAUTH_NTLM;
+              authp->avail &= ~CURLAUTH_NTLM;
+              *availp |= CURLAUTH_NTLM_WB;
+              authp->avail |= CURLAUTH_NTLM_WB;
+
+              /* Get the challenge-message which will be passed to
+               * ntlm_auth for generating the type 3 message later */
+              while(*start && ISSPACE(*start))
+                start++;
+              if(checkprefix("NTLM", start)) {
+                start += strlen("NTLM");
+                while(*start && ISSPACE(*start))
+                  start++;
+                if(*start)
+                  if((conn->challenge_header = strdup(start)) == NULL)
+                    return CURLE_OUT_OF_MEMORY;
+              }
+            }
+#endif
+          }
+          else {
             infof(data, "Authentication problem. Ignoring this.\n");
             data->state.authproblem = TRUE;
           }
@@ -801,24 +805,56 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
       }
       else
 #endif
-      if(checkprefix("Basic", start)) {
-        *availp |= CURLAUTH_BASIC;
-        authp->avail |= CURLAUTH_BASIC;
-        if(authp->picked == CURLAUTH_BASIC) {
-          /* We asked for Basic authentication but got a 40X back
-             anyway, which basically means our name+password isn't
-             valid. */
-          authp->avail = CURLAUTH_NONE;
-          infof(data, "Authentication problem. Ignoring this.\n");
-          data->state.authproblem = TRUE;
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+        if(checkprefix("Digest", start)) {
+          if((authp->avail & CURLAUTH_DIGEST) != 0) {
+            infof(data, "Ignoring duplicate digest auth header.\n");
+          }
+          else {
+            CURLdigest dig;
+            *availp |= CURLAUTH_DIGEST;
+            authp->avail |= CURLAUTH_DIGEST;
+
+            /* We call this function on input Digest headers even if Digest
+             * authentication isn't activated yet, as we need to store the
+             * incoming data from this header in case we are gonna use
+             * Digest. */
+            dig = Curl_input_digest(conn, (httpcode == 407)?TRUE:FALSE, start);
+
+            if(CURLDIGEST_FINE != dig) {
+              infof(data, "Authentication problem. Ignoring this.\n");
+              data->state.authproblem = TRUE;
+            }
+          }
         }
-      }
+        else
+#endif
+          if(checkprefix("Basic", start)) {
+            *availp |= CURLAUTH_BASIC;
+            authp->avail |= CURLAUTH_BASIC;
+            if(authp->picked == CURLAUTH_BASIC) {
+              /* We asked for Basic authentication but got a 40X back
+                 anyway, which basically means our name+password isn't
+                 valid. */
+              authp->avail = CURLAUTH_NONE;
+              infof(data, "Authentication problem. Ignoring this.\n");
+              data->state.authproblem = TRUE;
+            }
+          }
 
+    /* there may be multiple methods on one line, so keep reading */
+    while(*start && *start != ',') /* read up to the next comma */
+      start++;
+    if(*start == ',') /* if we're on a comma, skip it */
+      start++;
+    while(*start && ISSPACE(*start))
+      start++;
+  }
   return CURLE_OK;
 }
 
 /**
- * Curl_http_should_fail() determines whether an HTTP response has gotten us
+ * http_should_fail() determines whether an HTTP response has gotten us
  * into an error state or not.
  *
  * @param conn all information about the current connection
@@ -827,7 +863,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
  *
  * @retval 1 communications should not continue
  */
-int Curl_http_should_fail(struct connectdata *conn)
+static int http_should_fail(struct connectdata *conn)
 {
   struct SessionHandle *data;
   int httpcode;
@@ -885,16 +921,6 @@ int Curl_http_should_fail(struct connectdata *conn)
   ** the client needs to reauthenticate.  Once that info is
   ** available, use it here.
   */
-#if 0 /* set to 1 when debugging this functionality */
-  infof(data,"%s: authstage = %d\n",__FUNCTION__,data->state.authstage);
-  infof(data,"%s: authwant = 0x%08x\n",__FUNCTION__,data->state.authwant);
-  infof(data,"%s: authavail = 0x%08x\n",__FUNCTION__,data->state.authavail);
-  infof(data,"%s: httpcode = %d\n",__FUNCTION__,k->httpcode);
-  infof(data,"%s: authdone = %d\n",__FUNCTION__,data->state.authdone);
-  infof(data,"%s: newurl = %s\n",__FUNCTION__,data->req.newurl ?
-        data->req.newurl : "(null)");
-  infof(data,"%s: authproblem = %d\n",__FUNCTION__,data->state.authproblem);
-#endif
 
   /*
   ** Either we're not authenticating, or we're supposed to
@@ -930,7 +956,7 @@ static size_t readmoredata(char *buffer,
     return 0;
 
   /* make sure that a HTTP request is never sent away chunked! */
-  conn->data->req.forbidchunk = (bool)(http->sending == HTTPSEND_REQUEST);
+  conn->data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
 
   if(http->postsize <= (curl_off_t)fullsize) {
     memcpy(buffer, http->postdata, (size_t)http->postsize);
@@ -1013,19 +1039,17 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
 
   DEBUGASSERT(size > included_body_bytes);
 
-#ifdef CURL_DOES_CONVERSIONS
   res = Curl_convert_to_network(conn->data, ptr, headersize);
   /* Curl_convert_to_network calls failf if unsuccessful */
-  if(res != CURLE_OK) {
+  if(res) {
     /* conversion failed, free memory and return to the caller */
     if(in->buffer)
       free(in->buffer);
     free(in);
     return res;
   }
-#endif /* CURL_DOES_CONVERSIONS */
 
-  if(conn->protocol & PROT_HTTPS) {
+  if(conn->handler->flags & PROTOPT_SSL) {
     /* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
        when we speak HTTPS, as if only a fraction of it is sent now, this data
        needs to fit into the normal read-callback buffer later on and that
@@ -1061,7 +1085,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
     if(conn->data->set.verbose) {
       /* this data _may_ contain binary stuff */
       Curl_debug(conn->data, CURLINFO_HEADER_OUT, ptr, headlen, conn);
-      if((size_t)amount > headlen) {
+      if(bodylen) {
         /* there was body data sent beyond the initial header part, pass that
            on to the debug callback too */
         Curl_debug(conn->data, CURLINFO_DATA_OUT,
@@ -1267,529 +1291,35 @@ Curl_compareheader(const char *headerline, /* line to check */
   return FALSE; /* no match */
 }
 
-#ifndef CURL_DISABLE_PROXY
-/*
- * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This
- * function will issue the necessary commands to get a seamless tunnel through
- * this proxy. After that, the socket can be used just as a normal socket.
- *
- * This badly needs to be rewritten. CONNECT should be sent and dealt with
- * like any ordinary HTTP request, and not specially crafted like this. This
- * function only remains here like this for now since the rewrite is a bit too
- * much work to do at the moment.
- *
- * This function is BLOCKING which is nasty for all multi interface using apps.
- */
-
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
-                           int sockindex,
-                           const char *hostname,
-                           unsigned short remote_port)
-{
-  int subversion=0;
-  struct SessionHandle *data=conn->data;
-  struct SingleRequest *k = &data->req;
-  CURLcode result;
-  long timeout =
-    data->set.timeout?data->set.timeout:PROXY_TIMEOUT; /* in milliseconds */
-  curl_socket_t tunnelsocket = conn->sock[sockindex];
-  curl_off_t cl=0;
-  bool closeConnection = FALSE;
-  bool chunked_encoding = FALSE;
-  long check;
-
-#define SELECT_OK      0
-#define SELECT_ERROR   1
-#define SELECT_TIMEOUT 2
-  int error = SELECT_OK;
-
-  conn->bits.proxy_connect_closed = FALSE;
-
-  do {
-    if(!conn->bits.tunnel_connecting) { /* BEGIN CONNECT PHASE */
-      char *host_port;
-      Curl_send_buffer *req_buffer;
-
-      infof(data, "Establish HTTP proxy tunnel to %s:%hu\n",
-            hostname, remote_port);
-
-      if(data->req.newurl) {
-        /* This only happens if we've looped here due to authentication
-           reasons, and we don't really use the newly cloned URL here
-           then. Just free() it. */
-        free(data->req.newurl);
-        data->req.newurl = NULL;
-      }
-
-      /* initialize a dynamic send-buffer */
-      req_buffer = Curl_add_buffer_init();
-
-      if(!req_buffer)
-        return CURLE_OUT_OF_MEMORY;
-
-      host_port = aprintf("%s:%hu", hostname, remote_port);
-      if(!host_port) {
-        free(req_buffer);
-        return CURLE_OUT_OF_MEMORY;
-      }
-
-      /* Setup the proxy-authorization header, if any */
-      result = http_output_auth(conn, "CONNECT", host_port, TRUE);
-
-      if(CURLE_OK == result) {
-        char *host=(char *)"";
-        const char *proxyconn="";
-        const char *useragent="";
-        const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ?
-          "1.0" : "1.1";
-
-        if(!Curl_checkheaders(data, "Host:")) {
-          host = aprintf("Host: %s\r\n", host_port);
-          if(!host) {
-            free(req_buffer);
-            free(host_port);
-            return CURLE_OUT_OF_MEMORY;
-          }
-        }
-        if(!Curl_checkheaders(data, "Proxy-Connection:"))
-          proxyconn = "Proxy-Connection: Keep-Alive\r\n";
-
-        if(!Curl_checkheaders(data, "User-Agent:") &&
-           data->set.str[STRING_USERAGENT])
-          useragent = conn->allocptr.uagent;
-
-        /* Send the connect request to the proxy */
-        /* BLOCKING */
-        result =
-          Curl_add_bufferf(req_buffer,
-                      "CONNECT %s:%hu HTTP/%s\r\n"
-                      "%s"  /* Host: */
-                      "%s"  /* Proxy-Authorization */
-                      "%s"  /* User-Agent */
-                      "%s", /* Proxy-Connection */
-                      hostname, remote_port, http,
-                      host,
-                      conn->allocptr.proxyuserpwd?
-                      conn->allocptr.proxyuserpwd:"",
-                      useragent,
-                      proxyconn);
-
-        if(host && *host)
-          free(host);
-
-        if(CURLE_OK == result)
-          result = Curl_add_custom_headers(conn, req_buffer);
-
-        if(CURLE_OK == result)
-          /* CRLF terminate the request */
-          result = Curl_add_bufferf(req_buffer, "\r\n");
-
-        if(CURLE_OK == result) {
-          /* Now send off the request */
-          result = Curl_add_buffer_send(req_buffer, conn,
-                                        &data->info.request_size, 0, sockindex);
-        }
-        req_buffer = NULL;
-        if(result)
-          failf(data, "Failed sending CONNECT to proxy");
-      }
-      free(host_port);
-      Curl_safefree(req_buffer);
-      if(result)
-        return result;
-
-      conn->bits.tunnel_connecting = TRUE;
-    } /* END CONNECT PHASE */
-
-    /* now we've issued the CONNECT and we're waiting to hear back -
-       we try not to block here in multi-mode because that might be a LONG
-       wait if the proxy cannot connect-through to the remote host. */
-
-    /* if timeout is requested, find out how much remaining time we have */
-    check = timeout - /* timeout time */
-      Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
-    if(check <= 0) {
-      failf(data, "Proxy CONNECT aborted due to timeout");
-      return CURLE_RECV_ERROR;
-    }
-
-    /* if we're in multi-mode and we would block, return instead for a retry */
-    if(Curl_if_multi == data->state.used_interface) {
-      if(0 == Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD, 0))
-        /* return so we'll be called again polling-style */
-        return CURLE_OK;
-      else {
-        DEBUGF(infof(data,
-                     "Multi mode finished polling for response from "
-                     "proxy CONNECT."));
-      }
-    }
-    else {
-      DEBUGF(infof(data, "Easy mode waiting response from proxy CONNECT."));
-    }
-
-    /* at this point, either:
-       1) we're in easy-mode and so it's okay to block waiting for a CONNECT
-       response
-       2) we're in multi-mode and we didn't block - it's either an error or we
-       now have some data waiting.
-       In any case, the tunnel_connecting phase is over. */
-    conn->bits.tunnel_connecting = FALSE;
-
-    { /* BEGIN NEGOTIATION PHASE */
-      size_t nread;   /* total size read */
-      int perline; /* count bytes per line */
-      int keepon=TRUE;
-      ssize_t gotbytes;
-      char *ptr;
-      char *line_start;
-
-      ptr=data->state.buffer;
-      line_start = ptr;
-
-      nread=0;
-      perline=0;
-      keepon=TRUE;
-
-      while((nread<BUFSIZE) && (keepon && !error)) {
-
-        /* if timeout is requested, find out how much remaining time we have */
-        check = timeout - /* timeout time */
-          Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
-        if(check <= 0) {
-          failf(data, "Proxy CONNECT aborted due to timeout");
-          error = SELECT_TIMEOUT; /* already too little time */
-          break;
-        }
-
-        /* loop every second at least, less if the timeout is near */
-        switch (Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD,
-                            check<1000L?(int)check:1000)) {
-        case -1: /* select() error, stop reading */
-          error = SELECT_ERROR;
-          failf(data, "Proxy CONNECT aborted due to select/poll error");
-          break;
-        case 0: /* timeout */
-          break;
-        default:
-          DEBUGASSERT(ptr+BUFSIZE-nread <= data->state.buffer+BUFSIZE+1);
-          result = Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread, &gotbytes);
-          if(result==CURLE_AGAIN)
-            continue; /* go loop yourself */
-          else if(result)
-            keepon = FALSE;
-          else if(gotbytes <= 0) {
-            keepon = FALSE;
-            if(data->set.proxyauth && data->state.authproxy.avail) {
-              /* proxy auth was requested and there was proxy auth available,
-                 then deem this as "mere" proxy disconnect */
-              conn->bits.proxy_connect_closed = TRUE;
-            }
-            else {
-              error = SELECT_ERROR;
-              failf(data, "Proxy CONNECT aborted");
-            }
-          }
-          else {
-            /*
-             * We got a whole chunk of data, which can be anything from one
-             * byte to a set of lines and possibly just a piece of the last
-             * line.
-             */
-            int i;
-
-            nread += gotbytes;
-
-            if(keepon > TRUE) {
-              /* This means we are currently ignoring a response-body */
-
-              nread = 0; /* make next read start over in the read buffer */
-              ptr=data->state.buffer;
-              if(cl) {
-                /* A Content-Length based body: simply count down the counter
-                   and make sure to break out of the loop when we're done! */
-                cl -= gotbytes;
-                if(cl<=0) {
-                  keepon = FALSE;
-                  break;
-                }
-              }
-              else {
-                /* chunked-encoded body, so we need to do the chunked dance
-                   properly to know when the end of the body is reached */
-                CHUNKcode r;
-                ssize_t tookcareof=0;
-
-                /* now parse the chunked piece of data so that we can
-                   properly tell when the stream ends */
-                r = Curl_httpchunk_read(conn, ptr, gotbytes, &tookcareof);
-                if(r == CHUNKE_STOP) {
-                  /* we're done reading chunks! */
-                  infof(data, "chunk reading DONE\n");
-                  keepon = FALSE;
-                }
-                else
-                  infof(data, "Read %zd bytes of chunk, continue\n",
-                        tookcareof);
-              }
-            }
-            else
-              for(i = 0; i < gotbytes; ptr++, i++) {
-                perline++; /* amount of bytes in this line so far */
-                if(*ptr == 0x0a) {
-                  char letter;
-                  int writetype;
-
-#ifdef CURL_DOES_CONVERSIONS
-                  /* convert from the network encoding */
-                  result = Curl_convert_from_network(data, line_start,
-                                                     perline);
-                  /* Curl_convert_from_network calls failf if unsuccessful */
-                  if(result)
-                    return result;
-#endif /* CURL_DOES_CONVERSIONS */
-
-                  /* output debug if that is requested */
-                  if(data->set.verbose)
-                    Curl_debug(data, CURLINFO_HEADER_IN,
-                               line_start, (size_t)perline, conn);
-
-                  /* send the header to the callback */
-                  writetype = CLIENTWRITE_HEADER;
-                  if(data->set.include_header)
-                    writetype |= CLIENTWRITE_BODY;
-
-                  result = Curl_client_write(conn, writetype, line_start,
-                                             perline);
-                  if(result)
-                    return result;
-
-                  /* Newlines are CRLF, so the CR is ignored as the line isn't
-                     really terminated until the LF comes. Treat a following CR
-                     as end-of-headers as well.*/
-
-                  if(('\r' == line_start[0]) ||
-                     ('\n' == line_start[0])) {
-                    /* end of response-headers from the proxy */
-                    nread = 0; /* make next read start over in the read
-                                  buffer */
-                    ptr=data->state.buffer;
-                    if((407 == k->httpcode) && !data->state.authproblem) {
-                      /* If we get a 407 response code with content length
-                         when we have no auth problem, we must ignore the
-                         whole response-body */
-                      keepon = 2;
-
-                      if(cl) {
-
-                        infof(data, "Ignore %" FORMAT_OFF_T
-                              " bytes of response-body\n", cl);
-                        /* remove the remaining chunk of what we already
-                           read */
-                        cl -= (gotbytes - i);
-
-                        if(cl<=0)
-                          /* if the whole thing was already read, we are done!
-                           */
-                          keepon=FALSE;
-                      }
-                      else if(chunked_encoding) {
-                        CHUNKcode r;
-                        /* We set ignorebody true here since the chunked
-                           decoder function will acknowledge that. Pay
-                           attention so that this is cleared again when this
-                           function returns! */
-                        k->ignorebody = TRUE;
-                        infof(data, "%zd bytes of chunk left\n", gotbytes-i);
-
-                        if(line_start[1] == '\n') {
-                          /* this can only be a LF if the letter at index 0
-                             was a CR */
-                          line_start++;
-                          i++;
-                        }
-
-                        /* now parse the chunked piece of data so that we can
-                           properly tell when the stream ends */
-                        r = Curl_httpchunk_read(conn, line_start+1,
-                                                  gotbytes -i, &gotbytes);
-                        if(r == CHUNKE_STOP) {
-                          /* we're done reading chunks! */
-                          infof(data, "chunk reading DONE\n");
-                          keepon = FALSE;
-                        }
-                        else
-                          infof(data, "Read %zd bytes of chunk, continue\n",
-                                gotbytes);
-                      }
-                      else {
-                        /* without content-length or chunked encoding, we
-                           can't keep the connection alive since the close is
-                           the end signal so we bail out at once instead */
-                        keepon=FALSE;
-                      }
-                    }
-                    else
-                      keepon = FALSE;
-                    break; /* breaks out of for-loop, not switch() */
-                  }
-
-                  /* keep a backup of the position we are about to blank */
-                  letter = line_start[perline];
-                  line_start[perline]=0; /* zero terminate the buffer */
-                  if((checkprefix("WWW-Authenticate:", line_start) &&
-                      (401 == k->httpcode)) ||
-                     (checkprefix("Proxy-authenticate:", line_start) &&
-                      (407 == k->httpcode))) {
-                    result = Curl_http_input_auth(conn, k->httpcode,
-                                                  line_start);
-                    if(result)
-                      return result;
-                  }
-                  else if(checkprefix("Content-Length:", line_start)) {
-                    cl = curlx_strtoofft(line_start +
-                                         strlen("Content-Length:"), NULL, 10);
-                  }
-                  else if(Curl_compareheader(line_start,
-                                             "Connection:", "close"))
-                    closeConnection = TRUE;
-                  else if(Curl_compareheader(line_start,
-                                             "Transfer-Encoding:",
-                                             "chunked")) {
-                    infof(data, "CONNECT responded chunked\n");
-                    chunked_encoding = TRUE;
-                    /* init our chunky engine */
-                    Curl_httpchunk_init(conn);
-                  }
-                  else if(Curl_compareheader(line_start,
-                                             "Proxy-Connection:", "close"))
-                    closeConnection = TRUE;
-                  else if(2 == sscanf(line_start, "HTTP/1.%d %d",
-                                      &subversion,
-                                      &k->httpcode)) {
-                    /* store the HTTP code from the proxy */
-                    data->info.httpproxycode = k->httpcode;
-                  }
-                  /* put back the letter we blanked out before */
-                  line_start[perline]= letter;
-
-                  perline=0; /* line starts over here */
-                  line_start = ptr+1; /* this skips the zero byte we wrote */
-                }
-              }
-          }
-          break;
-        } /* switch */
-        if(Curl_pgrsUpdate(conn))
-          return CURLE_ABORTED_BY_CALLBACK;
-      } /* while there's buffer left and loop is requested */
-
-      if(error)
-        return CURLE_RECV_ERROR;
-
-      if(data->info.httpproxycode != 200) {
-        /* Deal with the possibly already received authenticate
-           headers. 'newurl' is set to a new URL if we must loop. */
-        result = Curl_http_auth_act(conn);
-        if(result)
-          return result;
-
-        if(conn->bits.close)
-          /* the connection has been marked for closure, most likely in the
-             Curl_http_auth_act() function and thus we can kill it at once
-             below
-          */
-          closeConnection = TRUE;
-      }
-
-      if(closeConnection && data->req.newurl) {
-        /* Connection closed by server. Don't use it anymore */
-        sclose(conn->sock[sockindex]);
-        conn->sock[sockindex] = CURL_SOCKET_BAD;
-        break;
-      }
-    } /* END NEGOTIATION PHASE */
-  } while(data->req.newurl);
-
-  if(200 != data->req.httpcode) {
-    failf(data, "Received HTTP code %d from proxy after CONNECT",
-          data->req.httpcode);
-
-    if(closeConnection && data->req.newurl)
-      conn->bits.proxy_connect_closed = TRUE;
-
-    return CURLE_RECV_ERROR;
-  }
-
-  /* If a proxy-authorization header was used for the proxy, then we should
-     make sure that it isn't accidentally used for the document request
-     after we've connected. So let's free and clear it here. */
-  Curl_safefree(conn->allocptr.proxyuserpwd);
-  conn->allocptr.proxyuserpwd = NULL;
-
-  data->state.authproxy.done = TRUE;
-
-  infof (data, "Proxy replied OK to CONNECT request\n");
-  data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
-  return CURLE_OK;
-}
-#endif /* CURL_DISABLE_PROXY */
-
 /*
  * Curl_http_connect() performs HTTP stuff to do at connect-time, called from
  * the generic Curl_connect().
  */
 CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
 {
-  struct SessionHandle *data;
   CURLcode result;
 
-  data=conn->data;
-
   /* We default to persistent connections. We set this already in this connect
      function to make the re-use checks properly be able to check this bit. */
   conn->bits.close = FALSE;
 
-#ifndef CURL_DISABLE_PROXY
-  /* If we are not using a proxy and we want a secure connection, perform SSL
-   * initialization & connection now.  If using a proxy with https, then we
-   * must tell the proxy to CONNECT to the host we want to talk to.  Only
-   * after the connect has occurred, can we start talking SSL
-   */
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-
-    /* either SSL over proxy, or explicitly asked for */
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name,
-                               conn->remote_port);
-    if(CURLE_OK != result)
-      return result;
-  }
+  /* the CONNECT procedure might not have been completed */
+  result = Curl_proxy_connect(conn);
+  if(result)
+    return result;
 
-  if(conn->bits.tunnel_connecting) {
+  if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
     /* nothing else to do except wait right now - we're not done here. */
     return CURLE_OK;
-  }
-#endif /* CURL_DISABLE_PROXY */
 
-  if(conn->protocol & PROT_HTTPS) {
+  if(conn->given->flags & PROTOPT_SSL) {
     /* perform SSL initialization */
-    if(data->state.used_interface == Curl_if_multi) {
-      result = https_connecting(conn, done);
-      if(result)
-        return result;
-    }
-    else {
-      /* BLOCKING */
-      result = Curl_ssl_connect(conn, FIRSTSOCKET);
-      if(result)
-        return result;
-      *done = TRUE;
-    }
+    result = https_connecting(conn, done);
+    if(result)
+      return result;
   }
-  else {
+  else
     *done = TRUE;
-  }
 
   return CURLE_OK;
 }
@@ -1811,7 +1341,7 @@ static int http_getsock_do(struct connectdata *conn,
 static CURLcode https_connecting(struct connectdata *conn, bool *done)
 {
   CURLcode result;
-  DEBUGASSERT((conn) && (conn->protocol & PROT_HTTPS));
+  DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));
 
   /* perform SSL initialization for this socket */
   result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
@@ -1822,14 +1352,15 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done)
 }
 #endif
 
-#if defined(USE_SSLEAY) || defined(USE_GNUTLS)
-/* This function is for OpenSSL and GnuTLS only. It should be made to query
-   the generic SSL layer instead. */
+#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+    defined(USE_DARWINSSL)
+/* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only.
+   It should be made to query the generic SSL layer instead. */
 static int https_getsock(struct connectdata *conn,
                          curl_socket_t *socks,
                          int numsocks)
 {
-  if(conn->protocol & PROT_HTTPS) {
+  if(conn->handler->flags & PROTOPT_SSL) {
     struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
 
     if(!numsocks)
@@ -1849,29 +1380,7 @@ static int https_getsock(struct connectdata *conn,
   return CURLE_OK;
 }
 #else
-#ifdef USE_NSS
-static int https_getsock(struct connectdata *conn,
-                         curl_socket_t *socks,
-                         int numsocks)
-{
-  (void)conn;
-  (void)socks;
-  (void)numsocks;
-  return GETSOCK_BLANK;
-}
-#else
-#ifdef USE_QSOSSL
-static int https_getsock(struct connectdata *conn,
-                         curl_socket_t *socks,
-                         int numsocks)
-{
-  (void)conn;
-  (void)socks;
-  (void)numsocks;
-  return GETSOCK_BLANK;
-}
-#else
-#ifdef USE_POLARSSL
+#ifdef USE_SSL
 static int https_getsock(struct connectdata *conn,
                          curl_socket_t *socks,
                          int numsocks)
@@ -1881,10 +1390,8 @@ static int https_getsock(struct connectdata *conn,
   (void)numsocks;
   return GETSOCK_BLANK;
 }
-#endif
-#endif
-#endif
-#endif
+#endif /* USE_SSL */
+#endif /* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL */
 
 /*
  * Curl_http_done() gets called from Curl_done() after a single HTTP request
@@ -1896,7 +1403,6 @@ CURLcode Curl_http_done(struct connectdata *conn,
 {
   struct SessionHandle *data = conn->data;
   struct HTTP *http =data->state.proto.http;
-  (void)premature; /* not used */
 
   Curl_unencode_cleanup(conn);
 
@@ -1957,11 +1463,11 @@ CURLcode Curl_http_done(struct connectdata *conn,
 static bool use_http_1_1(const struct SessionHandle *data,
                          const struct connectdata *conn)
 {
-  return (bool)((data->set.httpversion == CURL_HTTP_VERSION_1_1) ||
+  return ((data->set.httpversion == CURL_HTTP_VERSION_1_1) ||
          ((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
           ((conn->httpversion == 11) ||
            ((conn->httpversion != 10) &&
-            (data->state.httpversion != 10)))));
+            (data->state.httpversion != 10))))) ? TRUE : FALSE;
 }
 
 /* check and possibly add an Expect: header */
@@ -1978,7 +1484,7 @@ static CURLcode expect100(struct SessionHandle *data,
        100-continue to the headers which actually speeds up post operations
        (as there is one packet coming back from the web server) */
     ptr = Curl_checkheaders(data, "Expect:");
-    if (ptr) {
+    if(ptr) {
       data->state.expect100header =
         Curl_compareheader(ptr, "Expect:", "100-continue");
     }
@@ -2024,6 +1530,11 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
                    we will force length zero then */
                 checkprefix("Content-Length", headers->data))
           ;
+        else if(conn->allocptr.te &&
+                /* when asking for Transfer-Encoding, don't pass on a custom
+                   Connection: */
+                checkprefix("Connection", headers->data))
+          ;
         else {
           CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n",
                                              headers->data);
@@ -2032,6 +1543,31 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
         }
       }
     }
+    else {
+      ptr = strchr(headers->data, ';');
+      if(ptr) {
+
+        ptr++; /* pass the semicolon */
+        while(*ptr && ISSPACE(*ptr))
+          ptr++;
+
+        if(*ptr) {
+          /* this may be used for something else in the future */
+        }
+        else {
+          if(*(--ptr) == ';') {
+            CURLcode result;
+
+            /* send no-value custom header if terminated by semicolon */
+            *ptr = ':';
+            result = Curl_add_bufferf(req_buffer, "%s\r\n",
+                                             headers->data);
+            if(result)
+              return result;
+          }
+        }
+      }
+    }
     headers = headers->next;
   }
   return CURLE_OK;
@@ -2040,9 +1576,17 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
 CURLcode Curl_add_timecondition(struct SessionHandle *data,
                                 Curl_send_buffer *req_buffer)
 {
-  struct tm *tm;
+  const struct tm *tm;
   char *buf = data->state.buffer;
   CURLcode result = CURLE_OK;
+  struct tm keeptime;
+
+  result = Curl_gmtime(data->set.timevalue, &keeptime);
+  if(result) {
+    failf(data, "Invalid TIMEVALUE");
+    return result;
+  }
+  tm = &keeptime;
 
   /* The If-Modified-Since header family should have their times set in
    * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be
@@ -2051,14 +1595,6 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data,
    * Time)." (see page 20 of RFC2616).
    */
 
-#ifdef HAVE_GMTIME_R
-  /* thread-safe version */
-  struct tm keeptime;
-  tm = (struct tm *)gmtime_r(&data->set.timevalue, &keeptime);
-#else
-  tm = gmtime(&data->set.timevalue);
-#endif
-
   /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
   snprintf(buf, BUFSIZE-1,
            "%s, %02d %s %4d %02d:%02d:%02d GMT",
@@ -2111,7 +1647,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   curl_off_t included_body = 0;
   const char *httpstring;
   Curl_send_buffer *req_buffer;
-  curl_off_t postsize; /* off_t type to be able to hold a large file size */
+  curl_off_t postsize = 0; /* curl_off_t to handle large file sizes */
   int seekerr = CURL_SEEKFUNC_OK;
 
   /* Always consider the DO phase done after this function call, even if there
@@ -2144,9 +1680,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     if(!data->state.first_host)
       return CURLE_OUT_OF_MEMORY;
   }
+  http->writebytecount = http->readbytecount = 0;
 
-  if( (conn->protocol&(PROT_HTTP|PROT_FTP)) &&
-       data->set.upload) {
+  if((conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_FTP)) &&
+     data->set.upload) {
     httpreq = HTTPREQ_PUT;
   }
 
@@ -2187,7 +1724,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   }
 
   /* setup the authentication headers */
-  result = http_output_auth(conn, request, ppath, FALSE);
+  result = Curl_http_output_auth(conn, request, ppath, FALSE);
   if(result)
     return result;
 
@@ -2202,8 +1739,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     conn->bits.authneg = FALSE;
 
   Curl_safefree(conn->allocptr.ref);
-  if(data->change.referer && !Curl_checkheaders(data, "Referer:"))
+  if(data->change.referer && !Curl_checkheaders(data, "Referer:")) {
     conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer);
+    if(!conn->allocptr.ref)
+      return CURLE_OUT_OF_MEMORY;
+  }
   else
     conn->allocptr.ref = NULL;
 
@@ -2219,6 +1759,29 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
       return CURLE_OUT_OF_MEMORY;
   }
 
+#ifdef HAVE_LIBZ
+  /* we only consider transfer-encoding magic if libz support is built-in */
+
+  if(!Curl_checkheaders(data, "TE:") && data->set.http_transfer_encoding) {
+    /* When we are to insert a TE: header in the request, we must also insert
+       TE in a Connection: header, so we need to merge the custom provided
+       Connection: header and prevent the original to get sent. Note that if
+       the user has inserted his/hers own TE: header we don't do this magic
+       but then assume that the user will handle it all! */
+    char *cptr = Curl_checkheaders(data, "Connection:");
+#define TE_HEADER "TE: gzip\r\n"
+
+    Curl_safefree(conn->allocptr.te);
+
+    /* Create the (updated) Connection: header */
+    conn->allocptr.te = cptr? aprintf("%s, TE\r\n" TE_HEADER, cptr):
+      strdup("Connection: TE\r\n" TE_HEADER);
+
+    if(!conn->allocptr.te)
+      return CURLE_OUT_OF_MEMORY;
+  }
+#endif
+
   ptr = Curl_checkheaders(data, "Transfer-Encoding:");
   if(ptr) {
     /* Some kind of TE is requested, check if 'chunked' is chosen */
@@ -2226,9 +1789,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
       Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
   }
   else {
-    if((conn->protocol&PROT_HTTP) &&
-        data->set.upload &&
-        (data->set.infilesize == -1)) {
+    if((conn->handler->protocol&CURLPROTO_HTTP) &&
+       data->set.upload &&
+       (data->set.infilesize == -1)) {
       if(conn->bits.authneg)
         /* don't enable chunked during auth neg */
         ;
@@ -2261,16 +1824,30 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
        custom Host: header if this is NOT a redirect, as setting Host: in the
        redirected request is being out on thin ice. Except if the host name
        is the same as the first one! */
-    char *cookiehost = Curl_copy_header_value(ptr);
-    if (!cookiehost)
+    char *cookiehost = copy_header_value(ptr);
+    if(!cookiehost)
       return CURLE_OUT_OF_MEMORY;
-    if (!*cookiehost)
+    if(!*cookiehost)
       /* ignore empty data */
       free(cookiehost);
     else {
-      char *colon = strchr(cookiehost, ':');
-      if (colon)
-        *colon = 0; /* The host must not include an embedded port number */
+      /* If the host begins with '[', we start searching for the port after
+         the bracket has been closed */
+      int startsearch = 0;
+      if(*cookiehost == '[') {
+        char *closingbracket;
+        /* since the 'cookiehost' is an allocated memory area that will be
+           freed later we cannot simply increment the pointer */
+        memmove(cookiehost, cookiehost + 1, strlen(cookiehost) - 1);
+        closingbracket = strchr(cookiehost, ']');
+        if(closingbracket)
+          *closingbracket = 0;
+      }
+      else {
+        char *colon = strchr(cookiehost + startsearch, ':');
+        if(colon)
+          *colon = 0; /* The host must not include an embedded port number */
+      }
       Curl_safefree(conn->allocptr.cookiehost);
       conn->allocptr.cookiehost = cookiehost;
     }
@@ -2282,9 +1859,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     /* When building Host: headers, we must put the host name within
        [brackets] if the host name is a plain IPv6-address. RFC2732-style. */
 
-    if(((conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTPS)) ||
-       (!(conn->protocol&PROT_HTTPS) && (conn->remote_port == PORT_HTTP)) )
-      /* if(HTTPS on port 443) OR (non-HTTPS on port 80) then don't include
+    if(((conn->given->protocol&CURLPROTO_HTTPS) &&
+        (conn->remote_port == PORT_HTTPS)) ||
+       ((conn->given->protocol&CURLPROTO_HTTP) &&
+        (conn->remote_port == PORT_HTTP)) )
+      /* if(HTTPS on port 443) OR (HTTP on port 80) then don't include
          the port number in the host string */
       conn->allocptr.host = aprintf("Host: %s%s%s\r\n",
                                     conn->bits.ipv6_ip?"[":"",
@@ -2334,8 +1913,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
           memcpy(newurl + newlen + (ptr - url),
                  ptr + currlen, /* copy the trailing zero byte too */
                  urllen - (ptr-url) - currlen + 1);
-          if(data->change.url_alloc)
-            free(data->change.url);
+          if(data->change.url_alloc) {
+            Curl_safefree(data->change.url);
+            data->change.url_alloc = FALSE;
+          }
           data->change.url = newurl;
           data->change.url_alloc = TRUE;
         }
@@ -2345,7 +1926,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     }
     ppath = data->change.url;
     if(checkprefix("ftp://", ppath)) {
-      if (data->set.proxy_transfer_mode) {
+      if(data->set.proxy_transfer_mode) {
         /* when doing ftp, append ;type=<a|i> if not present */
         char *type = strstr(ppath, ";type=");
         if(type && type[6] && type[7] == 0) {
@@ -2362,14 +1943,14 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
           char *p = ftp_typecode;
           /* avoid sending invalid URLs like ftp://example.com;type=i if the
            * user specified ftp://example.com without the slash */
-          if (!*data->state.path && ppath[strlen(ppath) - 1] != '/') {
+          if(!*data->state.path && ppath[strlen(ppath) - 1] != '/') {
             *p++ = '/';
           }
           snprintf(p, sizeof(ftp_typecode) - 1, ";type=%c",
                    data->set.prefer_ascii ? 'a' : 'i');
         }
       }
-      if (conn->bits.user_passwd && !conn->bits.userpwd_in_url)
+      if(conn->bits.user_passwd && !conn->bits.userpwd_in_url)
         paste_ftp_userpwd = TRUE;
     }
   }
@@ -2404,7 +1985,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
        * This is meant to get the size of the present remote-file by itself.
        * We don't support this now. Bail out!
        */
-       data->state.resume_from = 0;
+      data->state.resume_from = 0;
     }
 
     if(data->state.resume_from && !data->state.this_is_a_follow) {
@@ -2495,17 +2076,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
         curl_off_t total_expected_size=
           data->state.resume_from + data->set.infilesize;
         conn->allocptr.rangeline =
-            aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
-                    "/%" FORMAT_OFF_T "\r\n",
-                    data->state.range, total_expected_size-1,
-                    total_expected_size);
+          aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
+                  "/%" FORMAT_OFF_T "\r\n",
+                  data->state.range, total_expected_size-1,
+                  total_expected_size);
       }
       else {
         /* Range was selected and then we just pass the incoming range and
            append total size */
         conn->allocptr.rangeline =
-            aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
-                    data->state.range, data->set.infilesize);
+          aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
+                  data->state.range, data->set.infilesize);
       }
       if(!conn->allocptr.rangeline)
         return CURLE_OUT_OF_MEMORY;
@@ -2525,56 +2106,60 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   /* add the main request stuff */
   /* GET/HEAD/POST/PUT */
   result = Curl_add_bufferf(req_buffer, "%s ", request);
-  if (result)
+  if(result)
     return result;
 
   /* url */
-  if (paste_ftp_userpwd)
+  if(paste_ftp_userpwd)
     result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s",
                               conn->user, conn->passwd,
                               ppath + sizeof("ftp://") - 1);
   else
     result = Curl_add_buffer(req_buffer, ppath, strlen(ppath));
-  if (result)
+  if(result)
     return result;
 
-  result = Curl_add_bufferf(req_buffer,
-                "%s" /* ftp typecode (;type=x) */
-                " HTTP/%s\r\n" /* HTTP version */
-                "%s" /* proxyuserpwd */
-                "%s" /* userpwd */
-                "%s" /* range */
-                "%s" /* user agent */
-                "%s" /* host */
-                "%s" /* accept */
-                "%s" /* accept-encoding */
-                "%s" /* referer */
-                "%s" /* Proxy-Connection */
-                "%s",/* transfer-encoding */
-
-                ftp_typecode,
-                httpstring,
-                conn->allocptr.proxyuserpwd?
-                conn->allocptr.proxyuserpwd:"",
-                conn->allocptr.userpwd?conn->allocptr.userpwd:"",
-                (data->state.use_range && conn->allocptr.rangeline)?
-                conn->allocptr.rangeline:"",
-                (data->set.str[STRING_USERAGENT] &&
-                 *data->set.str[STRING_USERAGENT] && conn->allocptr.uagent)?
-                conn->allocptr.uagent:"",
-                (conn->allocptr.host?conn->allocptr.host:""), /* Host: host */
-                http->p_accept?http->p_accept:"",
-                (data->set.str[STRING_ENCODING] &&
-                 *data->set.str[STRING_ENCODING] &&
-                 conn->allocptr.accept_encoding)?
-                conn->allocptr.accept_encoding:"",
-                (data->change.referer && conn->allocptr.ref)?
-                conn->allocptr.ref:"" /* Referer: <data> */,
-                (conn->bits.httpproxy &&
-                 !conn->bits.tunnel_proxy &&
-                 !Curl_checkheaders(data, "Proxy-Connection:"))?
-                "Proxy-Connection: Keep-Alive\r\n":"",
-                te
+  result =
+    Curl_add_bufferf(req_buffer,
+                     "%s" /* ftp typecode (;type=x) */
+                     " HTTP/%s\r\n" /* HTTP version */
+                     "%s" /* proxyuserpwd */
+                     "%s" /* userpwd */
+                     "%s" /* range */
+                     "%s" /* user agent */
+                     "%s" /* host */
+                     "%s" /* accept */
+                     "%s" /* TE: */
+                     "%s" /* accept-encoding */
+                     "%s" /* referer */
+                     "%s" /* Proxy-Connection */
+                     "%s",/* transfer-encoding */
+
+                     ftp_typecode,
+                     httpstring,
+                     conn->allocptr.proxyuserpwd?
+                     conn->allocptr.proxyuserpwd:"",
+                     conn->allocptr.userpwd?conn->allocptr.userpwd:"",
+                     (data->state.use_range && conn->allocptr.rangeline)?
+                     conn->allocptr.rangeline:"",
+                     (data->set.str[STRING_USERAGENT] &&
+                      *data->set.str[STRING_USERAGENT] &&
+                      conn->allocptr.uagent)?
+                     conn->allocptr.uagent:"",
+                     (conn->allocptr.host?conn->allocptr.host:""),
+                     http->p_accept?http->p_accept:"",
+                     conn->allocptr.te?conn->allocptr.te:"",
+                     (data->set.str[STRING_ENCODING] &&
+                      *data->set.str[STRING_ENCODING] &&
+                      conn->allocptr.accept_encoding)?
+                     conn->allocptr.accept_encoding:"",
+                     (data->change.referer && conn->allocptr.ref)?
+                     conn->allocptr.ref:"" /* Referer: <data> */,
+                     (conn->bits.httpproxy &&
+                      !conn->bits.tunnel_proxy &&
+                      !Curl_checkheaders(data, "Proxy-Connection:"))?
+                     "Proxy-Connection: Keep-Alive\r\n":"",
+                     te
       );
 
   /*
@@ -2599,7 +2184,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
                                conn->allocptr.cookiehost?
                                conn->allocptr.cookiehost:host,
                                data->state.path,
-                               (bool)(conn->protocol&PROT_HTTPS?TRUE:FALSE));
+                               (conn->handler->protocol&CURLPROTO_HTTPS)?
+                               TRUE:FALSE);
       Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
     }
     if(co) {
@@ -2613,8 +2199,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
               break;
           }
           result = Curl_add_bufferf(req_buffer,
-                               "%s%s=%s", count?"; ":"",
-                               co->name, co->value);
+                                    "%s%s=%s", count?"; ":"",
+                                    co->name, co->value);
           if(result)
             break;
           count++;
@@ -2628,8 +2214,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
         result = Curl_add_bufferf(req_buffer, "Cookie: ");
       if(CURLE_OK == result) {
         result = Curl_add_bufferf(req_buffer, "%s%s",
-                             count?"; ":"",
-                             addcookies);
+                                  count?"; ":"",
+                                  addcookies);
         count++;
       }
     }
@@ -2642,7 +2228,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
 #endif
 
   if(data->set.timecondition) {
-      result = Curl_add_timecondition(data, req_buffer);
+    result = Curl_add_timecondition(data, req_buffer);
     if(result)
       return result;
   }
@@ -2696,11 +2282,12 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
 
     http->sending = HTTPSEND_BODY;
 
-    if(!data->req.upload_chunky) {
+    if(!data->req.upload_chunky &&
+       !Curl_checkheaders(data, "Content-Length:")) {
       /* only add Content-Length if not uploading chunked */
       result = Curl_add_bufferf(req_buffer,
-                           "Content-Length: %" FORMAT_OFF_T "\r\n",
-                           http->postsize);
+                                "Content-Length: %" FORMAT_OFF_T "\r\n",
+                                http->postsize);
       if(result)
         return result;
     }
@@ -2750,14 +2337,14 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
       Curl_formclean(&http->sendit); /* free that whole lot */
       return result;
     }
-#ifdef CURL_DOES_CONVERSIONS
-/* time to convert the form data... */
-    result = Curl_formconvert(data, http->sendit);
+
+    /* convert the form data */
+    result = Curl_convert_form(data, http->sendit);
     if(result) {
       Curl_formclean(&http->sendit); /* free that whole lot */
       return result;
     }
-#endif /* CURL_DOES_CONVERSIONS */
+
     break;
 
   case HTTPREQ_PUT: /* Let's PUT the data to the server! */
@@ -2767,11 +2354,12 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     else
       postsize = data->set.infilesize;
 
-    if((postsize != -1) && !data->req.upload_chunky) {
+    if((postsize != -1) && !data->req.upload_chunky &&
+       !Curl_checkheaders(data, "Content-Length:")) {
       /* only add Content-Length if not uploading chunked */
       result = Curl_add_bufferf(req_buffer,
-                           "Content-Length: %" FORMAT_OFF_T "\r\n",
-                           postsize );
+                                "Content-Length: %" FORMAT_OFF_T "\r\n",
+                                postsize );
       if(result)
         return result;
     }
@@ -2821,8 +2409,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
         /* we allow replacing this header if not during auth negotiation,
            although it isn't very wise to actually set your own */
         result = Curl_add_bufferf(req_buffer,
-                             "Content-Length: %" FORMAT_OFF_T"\r\n",
-                             postsize);
+                                  "Content-Length: %" FORMAT_OFF_T"\r\n",
+                                  postsize);
         if(result)
           return result;
       }
@@ -2872,20 +2460,26 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
           /* We're not sending it 'chunked', append it to the request
              already now to reduce the number if send() calls */
           result = Curl_add_buffer(req_buffer, data->set.postfields,
-                              (size_t)postsize);
+                                   (size_t)postsize);
           included_body = postsize;
         }
         else {
-          /* Append the POST data chunky-style */
-          result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize);
-          if(CURLE_OK == result)
-            result = Curl_add_buffer(req_buffer, data->set.postfields,
-                                (size_t)postsize);
+          if(postsize) {
+            /* Append the POST data chunky-style */
+            result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize);
+            if(CURLE_OK == result) {
+              result = Curl_add_buffer(req_buffer, data->set.postfields,
+                                       (size_t)postsize);
+              if(CURLE_OK == result)
+                 result = Curl_add_buffer(req_buffer, "\r\n", 2);
+              included_body = postsize + 2;
+            }
+          }
           if(CURLE_OK == result)
             result = Curl_add_buffer(req_buffer,
-                                "\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
-          /* CR  LF   0  CR  LF  CR  LF */
-          included_body = postsize + 7;
+                                     "\x30\x0d\x0a\x0d\x0a", 5);
+          /* 0  CR  LF  CR  LF */
+          included_body += 5;
         }
         if(result)
           return result;
@@ -2919,8 +2513,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
         /* Chunky upload is selected and we're negotiating auth still, send
            end-of-data only */
         result = Curl_add_buffer(req_buffer,
-                            "\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
-        /* CR  LF   0  CR  LF  CR  LF */
+                                 "\x30\x0d\x0a\x0d\x0a", 5);
+        /* 0  CR  LF  CR  LF */
         if(result)
           return result;
       }
@@ -2976,6 +2570,17 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
     Curl_pgrsSetUploadCounter(data, http->writebytecount);
     if(Curl_pgrsUpdate(conn))
       result = CURLE_ABORTED_BY_CALLBACK;
+
+    if(http->writebytecount >= postsize) {
+      /* already sent the entire request body, mark the "upload" as
+         complete */
+      infof(data, "upload completely sent off: %" FORMAT_OFF_T " out of "
+            "%" FORMAT_OFF_T " bytes\n",
+            http->writebytecount, postsize);
+      data->req.upload_done = TRUE;
+      data->req.keepon &= ~KEEP_SEND; /* we're done writing */
+      data->req.exp100 = EXP100_SEND_DATA; /* already sent */
+    }
   }
 
   return result;
@@ -2996,13 +2601,13 @@ checkhttpprefix(struct SessionHandle *data,
   /* convert from the network encoding using a scratch area */
   char *scratch = strdup(s);
   if(NULL == scratch) {
-     failf (data, "Failed to allocate memory for conversion!");
-     return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */
+    failf (data, "Failed to allocate memory for conversion!");
+    return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */
   }
   if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) {
     /* Curl_convert_from_network calls failf if unsuccessful */
-     free(scratch);
-     return FALSE; /* can't return CURLE_foobar so return FALSE */
+    free(scratch);
+    return FALSE; /* can't return CURLE_foobar so return FALSE */
   }
   s = scratch;
 #endif /* CURL_DOES_CONVERSIONS */
@@ -3015,9 +2620,8 @@ checkhttpprefix(struct SessionHandle *data,
     head = head->next;
   }
 
-  if((rc != TRUE) && (checkprefix("HTTP/", s))) {
+  if(!rc && (checkprefix("HTTP/", s)))
     rc = TRUE;
-  }
 
 #ifdef CURL_DOES_CONVERSIONS
   free(scratch);
@@ -3059,7 +2663,7 @@ checkprotoprefix(struct SessionHandle *data, struct connectdata *conn,
                  const char *s)
 {
 #ifndef CURL_DISABLE_RTSP
-  if(conn->protocol & PROT_RTSP)
+  if(conn->handler->protocol & CURLPROTO_RTSP)
     return checkrtspprefix(data, s);
 #else
   (void)conn;
@@ -3111,6 +2715,42 @@ static CURLcode header_append(struct SessionHandle *data,
   return CURLE_OK;
 }
 
+static void print_http_error(struct SessionHandle *data)
+{
+  struct SingleRequest *k = &data->req;
+  char *beg = k->p;
+
+  /* make sure that data->req.p points to the HTTP status line */
+  if(!strncmp(beg, "HTTP", 4)) {
+
+    /* skip to HTTP status code */
+    beg = strchr(beg, ' ');
+    if(beg && *++beg) {
+
+      /* find trailing CR */
+      char end_char = '\r';
+      char *end = strchr(beg, end_char);
+      if(!end) {
+        /* try to find LF (workaround for non-compliant HTTP servers) */
+        end_char = '\n';
+        end = strchr(beg, end_char);
+      }
+
+      if(end) {
+        /* temporarily replace CR or LF by NUL and print the error message */
+        *end = '\0';
+        failf(data, "The requested URL returned error: %s", beg);
+
+        /* restore the previously replaced CR or LF */
+        *end = end_char;
+        return;
+      }
+    }
+  }
+
+  /* fall-back to printing the HTTP status code only */
+  failf(data, "The requested URL returned error: %d", k->httpcode);
+}
 
 /*
  * Read any HTTP header lines from the server and pass them to the client app.
@@ -3235,7 +2875,9 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         k->header = FALSE; /* no more header to parse! */
 
         if((k->size == -1) && !k->chunk && !conn->bits.close &&
-           (conn->httpversion >= 11) && !(conn->protocol & PROT_RTSP)) {
+           (conn->httpversion >= 11) &&
+           !(conn->handler->protocol & CURLPROTO_RTSP) &&
+           data->set.httpreq != HTTPREQ_HEAD) {
           /* On HTTP 1.1, when connection is not to get closed, but no
              Content-Length nor Content-Encoding chunked have been
              received, according to RFC2616 section 4.4 point 5, we
@@ -3247,22 +2889,11 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         }
       }
 
-      if(417 == k->httpcode) {
-        /*
-         * we got: "417 Expectation Failed" this means:
-         * we have made a HTTP call and our Expect Header
-         * seems to cause a problem => abort the write operations
-         * (or prevent them from starting).
-         */
-        k->exp100 = EXP100_FAILED;
-        k->keepon &= ~KEEP_SEND;
-      }
-
       /*
        * When all the headers have been parsed, see if we should give
        * up and return an error.
        */
-      if(Curl_http_should_fail(conn)) {
+      if(http_should_fail(conn)) {
         failf (data, "The requested URL returned error: %d",
                k->httpcode);
         return CURLE_HTTP_RETURNED_ERROR;
@@ -3297,6 +2928,46 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         if(result)
           return result;
 
+        if(k->httpcode >= 300) {
+          if((!conn->bits.authneg) && !conn->bits.close &&
+             !conn->bits.rewindaftersend) {
+            /*
+             * General treatment of errors when about to send data. Including :
+             * "417 Expectation Failed", while waiting for 100-continue.
+             *
+             * The check for close above is done simply because of something
+             * else has already deemed the connection to get closed then
+             * something else should've considered the big picture and we
+             * avoid this check.
+             *
+             * rewindaftersend indicates that something has told libcurl to
+             * continue sending even if it gets discarded
+             */
+
+            switch(data->set.httpreq) {
+            case HTTPREQ_PUT:
+            case HTTPREQ_POST:
+            case HTTPREQ_POST_FORM:
+              /* We got an error response. If this happened before the whole
+               * request body has been sent we stop sending and mark the
+               * connection for closure after we've read the entire response.
+               */
+              if(!k->upload_done) {
+                infof(data, "HTTP error before end of send, stop sending\n");
+                conn->bits.close = TRUE; /* close after this */
+                k->upload_done = TRUE;
+                k->keepon &= ~KEEP_SEND; /* don't send */
+                if(data->state.expect100header)
+                  k->exp100 = EXP100_FAILED;
+              }
+              break;
+
+            default: /* default label present to avoid compiler warnings */
+              break;
+            }
+          }
+        }
+
         if(conn->bits.rewindaftersend) {
           /* We rewind after a complete send, so thus we continue
              sending now */
@@ -3388,33 +3059,32 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
       res = Curl_convert_from_network(data,
                                       &scratch[0],
                                       SCRATCHSIZE);
-      if(CURLE_OK != res) {
+      if(res)
         /* Curl_convert_from_network calls failf if unsuccessful */
         return res;
-      }
 #else
 #define HEADER1 k->p /* no conversion needed, just use k->p */
 #endif /* CURL_DOES_CONVERSIONS */
 
-      if(conn->protocol & PROT_HTTP) {
+      if(conn->handler->protocol & CURLPROTO_HTTP) {
         nc = sscanf(HEADER1,
-            " HTTP/%d.%d %3d",
-            &httpversion_major,
-            &conn->httpversion,
-            &k->httpcode);
+                    " HTTP/%d.%d %3d",
+                    &httpversion_major,
+                    &conn->httpversion,
+                    &k->httpcode);
         if(nc==3) {
           conn->httpversion += 10 * httpversion_major;
         }
         else {
           /* this is the real world, not a Nirvana
              NCSA 1.5.x returns this crap when asked for HTTP/1.1
-             */
+          */
           nc=sscanf(HEADER1, " HTTP %3d", &k->httpcode);
           conn->httpversion = 10;
 
           /* If user has set option HTTP200ALIASES,
              compare header line against list of aliases
-             */
+          */
           if(!nc) {
             if(checkhttpprefix(data, k->p)) {
               nc = 1;
@@ -3424,7 +3094,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
           }
         }
       }
-      else if(conn->protocol & PROT_RTSP) {
+      else if(conn->handler->protocol & CURLPROTO_RTSP) {
         nc = sscanf(HEADER1,
                     " RTSP/%d.%d %3d",
                     &rtspversion_major,
@@ -3444,8 +3114,8 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         data->info.httpcode = k->httpcode;
 
         data->info.httpversion = conn->httpversion;
-        if (!data->state.httpversion ||
-            data->state.httpversion > conn->httpversion)
+        if(!data->state.httpversion ||
+           data->state.httpversion > conn->httpversion)
           /* store the lowest server version we encounter */
           data->state.httpversion = conn->httpversion;
 
@@ -3469,8 +3139,7 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
           }
           else {
             /* serious error, go home! */
-            failf (data, "The requested URL returned error: %d",
-                   k->httpcode);
+            print_http_error(data);
             return CURLE_HTTP_RETURNED_ERROR;
           }
         }
@@ -3484,12 +3153,19 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         }
         else if(conn->httpversion >= 11 &&
                 !conn->bits.close) {
+          struct connectbundle *cb_ptr;
+
           /* If HTTP version is >= 1.1 and connection is persistent
              server supports pipelining. */
           DEBUGF(infof(data,
                        "HTTP 1.1 or later with persistent connection, "
                        "pipelining supported\n"));
-          conn->server_supports_pipelining = TRUE;
+          /* Activate pipelining if needed */
+          cb_ptr = conn->bundle;
+          if(cb_ptr) {
+            if(!Curl_pipeline_site_blacklisted(data, conn))
+              cb_ptr->server_supports_pipelining = TRUE;
+          }
         }
 
         switch(k->httpcode) {
@@ -3522,14 +3198,10 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
       }
     }
 
-#ifdef CURL_DOES_CONVERSIONS
-    /* convert from the network encoding */
     result = Curl_convert_from_network(data, k->p, strlen(k->p));
-    if(CURLE_OK != result) {
-      return(result);
-    }
     /* Curl_convert_from_network calls failf if unsuccessful */
-#endif /* CURL_DOES_CONVERSIONS */
+    if(result)
+      return result;
 
     /* Check for Content-Length: header lines to get size */
     if(!k->ignorecl && !data->set.ignorecl &&
@@ -3559,10 +3231,10 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
     }
     /* check for Content-Type: header lines to get the MIME-type */
     else if(checkprefix("Content-Type:", k->p)) {
-      char *contenttype = Curl_copy_header_value(k->p);
-      if (!contenttype)
+      char *contenttype = copy_header_value(k->p);
+      if(!contenttype)
         return CURLE_OUT_OF_MEMORY;
-      if (!*contenttype)
+      if(!*contenttype)
         /* ignore empty data */
         free(contenttype);
       else {
@@ -3570,6 +3242,16 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         data->info.contenttype = contenttype;
       }
     }
+    else if(checkprefix("Server:", k->p)) {
+      char *server_name = copy_header_value(k->p);
+
+      /* Turn off pipelining if the server version is blacklisted */
+      if(conn->bundle && conn->bundle->server_supports_pipelining) {
+        if(Curl_pipeline_server_blacklisted(data, server_name))
+          conn->bundle->server_supports_pipelining = FALSE;
+      }
+      Curl_safefree(server_name);
+    }
     else if((conn->httpversion == 10) &&
             conn->bits.httpproxy &&
             Curl_compareheader(k->p,
@@ -3614,8 +3296,9 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
        */
       conn->bits.close = TRUE; /* close when done */
     }
-    else if(Curl_compareheader(k->p, "Transfer-Encoding:", "chunked") &&
-            !(conn->protocol & PROT_RTSP)) {
+    else if(checkprefix("Transfer-Encoding:", k->p)) {
+      /* One or more encodings. We check for chunked and/or a compression
+         algorithm. */
       /*
        * [RFC 2616, section 3.6.1] A 'chunked' transfer encoding
        * means that the server will send a series of "chunks". Each
@@ -3624,10 +3307,60 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
        * with the previously mentioned size. There can be any amount
        * of chunks, and a chunk-data set to zero signals the
        * end-of-chunks. */
-      k->chunk = TRUE; /* chunks coming our way */
 
-      /* init our chunky engine */
-      Curl_httpchunk_init(conn);
+      char *start;
+
+      /* Find the first non-space letter */
+      start = k->p + 18;
+
+      for(;;) {
+        /* skip whitespaces and commas */
+        while(*start && (ISSPACE(*start) || (*start == ',')))
+          start++;
+
+        if(checkprefix("chunked", start)) {
+          k->chunk = TRUE; /* chunks coming our way */
+
+          /* init our chunky engine */
+          Curl_httpchunk_init(conn);
+
+          start += 7;
+        }
+
+        if(k->auto_decoding)
+          /* TODO: we only support the first mentioned compression for now */
+          break;
+
+        if(checkprefix("identity", start)) {
+          k->auto_decoding = IDENTITY;
+          start += 8;
+        }
+        else if(checkprefix("deflate", start)) {
+          k->auto_decoding = DEFLATE;
+          start += 7;
+        }
+        else if(checkprefix("gzip", start)) {
+          k->auto_decoding = GZIP;
+          start += 4;
+        }
+        else if(checkprefix("x-gzip", start)) {
+          k->auto_decoding = GZIP;
+          start += 6;
+        }
+        else if(checkprefix("compress", start)) {
+          k->auto_decoding = COMPRESS;
+          start += 8;
+        }
+        else if(checkprefix("x-compress", start)) {
+          k->auto_decoding = COMPRESS;
+          start += 10;
+        }
+        else
+          /* unknown! */
+          break;
+
+      }
+
     }
     else if(checkprefix("Content-Encoding:", k->p) &&
             data->set.str[STRING_ENCODING]) {
@@ -3647,15 +3380,15 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
 
       /* Record the content-encoding for later use */
       if(checkprefix("identity", start))
-        k->content_encoding = IDENTITY;
+        k->auto_decoding = IDENTITY;
       else if(checkprefix("deflate", start))
-        k->content_encoding = DEFLATE;
+        k->auto_decoding = DEFLATE;
       else if(checkprefix("gzip", start)
               || checkprefix("x-gzip", start))
-        k->content_encoding = GZIP;
+        k->auto_decoding = GZIP;
       else if(checkprefix("compress", start)
               || checkprefix("x-compress", start))
-        k->content_encoding = COMPRESS;
+        k->auto_decoding = COMPRESS;
     }
     else if(checkprefix("Content-Range:", k->p)) {
       /* Content-Range: bytes [num]-
@@ -3711,16 +3444,16 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
         return result;
     }
     else if((k->httpcode >= 300 && k->httpcode < 400) &&
-            checkprefix("Location:", k->p)) {
+            checkprefix("Location:", k->p) &&
+            !data->req.location) {
       /* this is the URL that the server advises us to use instead */
-      char *location = Curl_copy_header_value(k->p);
-      if (!location)
+      char *location = copy_header_value(k->p);
+      if(!location)
         return CURLE_OUT_OF_MEMORY;
-      if (!*location)
+      if(!*location)
         /* ignore empty data */
         free(location);
       else {
-        DEBUGASSERT(!data->req.location);
         data->req.location = location;
 
         if(data->set.http_follow_location) {
@@ -3731,19 +3464,18 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
 
           /* some cases of POST and PUT etc needs to rewind the data
              stream at this point */
-          result = Curl_http_perhapsrewind(conn);
+          result = http_perhapsrewind(conn);
           if(result)
             return result;
         }
       }
     }
-#ifndef CURL_DISABLE_RTSP
-    else if(conn->protocol & PROT_RTSP) {
+    else if(conn->handler->protocol & CURLPROTO_RTSP) {
       result = Curl_rtsp_parseheader(conn, k->p);
       if(result)
         return result;
     }
-#endif
+
     /*
      * End of header-checks. Write them to the client.
      */
index 3007c31..7236dd8 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __HTTP_H
-#define __HTTP_H
-
+#ifndef HEADER_CURL_HTTP_H
+#define HEADER_CURL_HTTP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -8,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -36,9 +35,6 @@ bool Curl_compareheader(const char *headerline,  /* line to check */
 
 char *Curl_checkheaders(struct SessionHandle *data, const char *thisheader);
 
-char *Curl_copy_header_value(const char *h);
-
-
 /* ------------------------------------------------------------------------- */
 /*
  * The add_buffer series of functions are used to build one large memory chunk
@@ -66,12 +62,6 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data,
 CURLcode Curl_add_custom_headers(struct connectdata *conn,
                                    Curl_send_buffer *req_buffer);
 
-
-/* ftp can use this as well */
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
-                           int tunnelsocket,
-                           const char *hostname, unsigned short remote_port);
-
 /* protocol-specific functions set up to be called by the main engine */
 CURLcode Curl_http(struct connectdata *conn, bool *done);
 CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
@@ -89,8 +79,6 @@ CURLcode Curl_http_input_auth(struct connectdata *conn,
 CURLcode Curl_http_auth_act(struct connectdata *conn);
 CURLcode Curl_http_perhapsrewind(struct connectdata *conn);
 
-int Curl_http_should_fail(struct connectdata *conn);
-
 /* If only the PICKNONE bit is set, there has been a round-trip and we
    selected to use no auth at all. Ie, we actively select no auth, as opposed
    to not having one selected. The other CURLAUTH_* defines are present in the
@@ -158,4 +146,26 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
                                      ssize_t *nread,
                                      bool *stop_reading);
 
-#endif
+/**
+ * Curl_http_output_auth() setups the authentication headers for the
+ * host/proxy and the correct authentication
+ * method. conn->data->state.authdone is set to TRUE when authentication is
+ * done.
+ *
+ * @param conn all information about the current connection
+ * @param request pointer to the request keyword
+ * @param path pointer to the requested path
+ * @param proxytunnel boolean if this is the request setting up a "proxy
+ * tunnel"
+ *
+ * @returns CURLcode
+ */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+                      const char *request,
+                      const char *path,
+                      bool proxytunnel); /* TRUE if this is the request setting
+                                            up the proxy tunnel */
+
+#endif /* HEADER_CURL_HTTP_H */
+
index 56d8248..e9fddf5 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h" /* it includes http_chunks.h */
 #include "sendf.h"   /* for the client write stuff */
@@ -35,7 +30,7 @@
 #include "content_encoding.h"
 #include "http.h"
 #include "curl_memory.h"
-#include "easyif.h" /* for Curl_convert_to_network prototype */
+#include "non-ascii.h" /* for Curl_convert_to_network prototype */
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -84,9 +79,9 @@
  We avoid the use of isxdigit to accommodate non-ASCII hosts. */
 static bool Curl_isxdigit(char digit)
 {
-  return (bool)( (digit >= 0x30 && digit <= 0x39)    /* 0-9 */
-              || (digit >= 0x41 && digit <= 0x46)    /* A-F */
-              || (digit >= 0x61 && digit <= 0x66) ); /* a-f */
+  return ( (digit >= 0x30 && digit <= 0x39) /* 0-9 */
+        || (digit >= 0x41 && digit <= 0x46) /* A-F */
+        || (digit >= 0x61 && digit <= 0x66) /* a-f */ ) ? TRUE : FALSE;
 }
 
 void Curl_httpchunk_init(struct connectdata *conn)
@@ -153,17 +148,16 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
         }
         /* length and datap are unmodified */
         ch->hexbuffer[ch->hexindex]=0;
-#ifdef CURL_DOES_CONVERSIONS
+
         /* convert to host encoding before calling strtoul */
-        result = Curl_convert_from_network(conn->data,
-                                           ch->hexbuffer,
+        result = Curl_convert_from_network(conn->data, ch->hexbuffer,
                                            ch->hexindex);
-        if(result != CURLE_OK) {
+        if(result) {
           /* Curl_convert_from_network calls failf if unsuccessful */
           /* Treat it as a bad hex character */
           return(CHUNKE_ILLEGAL_HEX);
         }
-#endif /* CURL_DOES_CONVERSIONS */
+
         ch->datasize=strtoul(ch->hexbuffer, NULL, 16);
         ch->state = CHUNK_POSTHEX;
       }
@@ -209,11 +203,11 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
       /* Write the data portion available */
 #ifdef HAVE_LIBZ
       switch (conn->data->set.http_ce_skip?
-              IDENTITY : data->req.content_encoding) {
+              IDENTITY : data->req.auto_decoding) {
       case IDENTITY:
 #endif
         if(!k->ignorebody) {
-          if( !data->set.http_te_skip )
+          if(!data->set.http_te_skip)
             result = Curl_client_write(conn, CLIENTWRITE_BODY, datap,
                                        piece);
           else
@@ -297,17 +291,14 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
           conn->trailer[conn->trlPos++]=0x0a;
           conn->trailer[conn->trlPos]=0;
 
-#ifdef CURL_DOES_CONVERSIONS
           /* Convert to host encoding before calling Curl_client_write */
-          result = Curl_convert_from_network(conn->data,
-                                             conn->trailer,
+          result = Curl_convert_from_network(conn->data, conn->trailer,
                                              conn->trlPos);
-          if(result != CURLE_OK)
+          if(result)
             /* Curl_convert_from_network calls failf if unsuccessful */
             /* Treat it as a bad chunk */
             return CHUNKE_BAD_CHUNK;
 
-#endif /* CURL_DOES_CONVERSIONS */
           if(!data->set.http_te_skip) {
             result = Curl_client_write(conn, CLIENTWRITE_HEADER,
                                        conn->trailer, conn->trlPos);
index 6056e18..b999ab5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __HTTP_CHUNKS_H
-#define __HTTP_CHUNKS_H
+#ifndef HEADER_CURL_HTTP_CHUNKS_H
+#define HEADER_CURL_HTTP_CHUNKS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -104,4 +104,5 @@ struct Curl_chunker {
   size_t dataleft; /* untouched data amount at the end of the last buffer */
 };
 
-#endif
+#endif /* HEADER_CURL_HTTP_CHUNKS_H */
+
index 45d8aeb..f50f803 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h"
-#include "sendf.h"
 #include "rawstr.h"
 #include "curl_base64.h"
 #include "curl_md5.h"
 #include "http_digest.h"
 #include "strtok.h"
-#include "url.h" /* for Curl_safefree() */
 #include "curl_memory.h"
-#include "easyif.h" /* included for Curl_convert_... prototypes */
+#include "sslgen.h" /* for Curl_rand() */
+#include "non-ascii.h" /* included for Curl_convert_... prototypes */
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -49,6 +44,8 @@
 #define MAX_VALUE_LENGTH 256
 #define MAX_CONTENT_LENGTH 1024
 
+static void digest_cleanup_one(struct digestdata *dig);
+
 /*
  * Return 0 on success and then the buffers are filled in fine.
  *
@@ -88,8 +85,8 @@ static int get_pair(const char *str, char *value, char *content,
       break;
     case ',':
       if(!starts_with_quote) {
-        /* this signals the end of the content if we didn't get a starting quote
-           and then we do "sloppy" parsing */
+        /* this signals the end of the content if we didn't get a starting
+           quote and then we do "sloppy" parsing */
         c=0; /* the end */
         continue;
       }
@@ -156,7 +153,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
       before = TRUE;
 
     /* clear off any former leftovers and init to defaults */
-    Curl_digest_cleanup_one(d);
+    digest_cleanup_one(d);
 
     for(;;) {
       char value[MAX_VALUE_LENGTH];
@@ -269,6 +266,38 @@ static void md5_to_ascii(unsigned char *source, /* 16 bytes */
     snprintf((char *)&dest[i*2], 3, "%02x", source[i]);
 }
 
+/* Perform quoted-string escaping as described in RFC2616 and its errata */
+static char *string_quoted(const char *source)
+{
+  char *dest, *d;
+  const char *s = source;
+  size_t n = 1; /* null terminator */
+
+  /* Calculate size needed */
+  while(*s) {
+    ++n;
+    if(*s == '"' || *s == '\\') {
+      ++n;
+    }
+    ++s;
+  }
+
+  dest = malloc(n);
+  if(dest) {
+    s = source;
+    d = dest;
+    while(*s) {
+      if(*s == '"' || *s == '\\') {
+        *d++ = '\\';
+      }
+      *d++ = *s++;
+    }
+    *d = 0;
+  }
+
+  return dest;
+}
+
 CURLcode Curl_output_digest(struct connectdata *conn,
                             bool proxy,
                             const unsigned char *request,
@@ -280,21 +309,21 @@ CURLcode Curl_output_digest(struct connectdata *conn,
   unsigned char md5buf[16]; /* 16 bytes/128 bits */
   unsigned char request_digest[33];
   unsigned char *md5this;
-  unsigned char *ha1;
+  unsigned char ha1[33];/* 32 digits and 1 zero byte */
   unsigned char ha2[33];/* 32 digits and 1 zero byte */
-  char cnoncebuf[7];
-  char *cnonce;
+  char cnoncebuf[33];
+  char *cnonce = NULL;
+  size_t cnonce_sz = 0;
   char *tmp = NULL;
-  struct timeval now;
-
   char **allocuserpwd;
+  size_t userlen;
   const char *userp;
+  char *userp_quoted;
   const char *passwdp;
   struct auth *authp;
 
   struct SessionHandle *data = conn->data;
   struct digestdata *d;
-#ifdef CURL_DOES_CONVERSIONS
   CURLcode rc;
 /* The CURL_OUTPUT_DIGEST_CONV macro below is for non-ASCII machines.
    It converts digest text to ASCII so the MD5 will be correct for
@@ -306,9 +335,6 @@ CURLcode Curl_output_digest(struct connectdata *conn,
     free(b); \
     return rc; \
   }
-#else
-#define CURL_OUTPUT_DIGEST_CONV(a, b)
-#endif /* CURL_DOES_CONVERSIONS */
 
   if(proxy) {
     d = &data->state.proxydigest;
@@ -325,10 +351,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
     authp = &data->state.authhost;
   }
 
-  if(*allocuserpwd) {
-    Curl_safefree(*allocuserpwd);
-    *allocuserpwd = NULL;
-  }
+  Curl_safefree(*allocuserpwd);
 
   /* not set means empty */
   if(!userp)
@@ -347,13 +370,17 @@ CURLcode Curl_output_digest(struct connectdata *conn,
     d->nc = 1;
 
   if(!d->cnonce) {
-    /* Generate a cnonce */
-    now = Curl_tvnow();
-    snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", (long)now.tv_sec);
-    if(Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce))
-      d->cnonce = cnonce;
-    else
-      return CURLE_OUT_OF_MEMORY;
+    struct timeval now = Curl_tvnow();
+    snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x",
+             Curl_rand(data), Curl_rand(data),
+             (unsigned int)now.tv_sec,
+             (unsigned int)now.tv_usec);
+
+    rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf),
+                            &cnonce, &cnonce_sz);
+    if(rc)
+      return rc;
+    d->cnonce = cnonce;
   }
 
   /*
@@ -374,12 +401,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
 
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
-  free(md5this); /* free this again */
-
-  ha1 = malloc(33); /* 32 digits and 1 zero byte */
-  if(!ha1)
-    return CURLE_OUT_OF_MEMORY;
-
+  Curl_safefree(md5this);
   md5_to_ascii(md5buf, ha1);
 
   if(d->algo == CURLDIGESTALGO_MD5SESS) {
@@ -389,7 +411,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
       return CURLE_OUT_OF_MEMORY;
     CURL_OUTPUT_DIGEST_CONV(data, tmp); /* convert on non-ASCII machines */
     Curl_md5it(md5buf, (unsigned char *)tmp);
-    free(tmp); /* free this again */
+    Curl_safefree(tmp);
     md5_to_ascii(md5buf, ha1);
   }
 
@@ -420,24 +442,27 @@ CURLcode Curl_output_digest(struct connectdata *conn,
   */
   if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) {
     md5this = (unsigned char *)aprintf("%s:%.*s", request,
-                                       (int)(tmp - (char *)uripath), uripath);
+                                       curlx_sztosi(tmp - (char *)uripath),
+                                       uripath);
   }
   else
     md5this = (unsigned char *)aprintf("%s:%s", request, uripath);
 
-  if(!md5this) {
-    free(ha1);
-    return CURLE_OUT_OF_MEMORY;
-  }
-
   if(d->qop && Curl_raw_equal(d->qop, "auth-int")) {
-    /* We don't support auth-int at the moment. I can't see a easy way to get
-       entity-body here */
-    /* TODO: Append H(entity-body)*/
+    /* We don't support auth-int for PUT or POST at the moment.
+       TODO: replace md5 of empty string with entity-body for PUT/POST */
+    unsigned char *md5this2 = (unsigned char *)
+      aprintf("%s:%s", md5this, "d41d8cd98f00b204e9800998ecf8427e");
+    Curl_safefree(md5this);
+    md5this = md5this2;
   }
+
+  if(!md5this)
+    return CURLE_OUT_OF_MEMORY;
+
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
-  free(md5this); /* free this again */
+  Curl_safefree(md5this);
   md5_to_ascii(md5buf, ha2);
 
   if(d->qop) {
@@ -455,20 +480,30 @@ CURLcode Curl_output_digest(struct connectdata *conn,
                                        d->nonce,
                                        ha2);
   }
-  free(ha1);
   if(!md5this)
     return CURLE_OUT_OF_MEMORY;
 
   CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */
   Curl_md5it(md5buf, md5this);
-  free(md5this); /* free this again */
+  Curl_safefree(md5this);
   md5_to_ascii(md5buf, request_digest);
 
   /* for test case 64 (snooped from a Mozilla 1.3a request)
 
     Authorization: Digest username="testuser", realm="testrealm", \
     nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
+
+    Digest parameters are all quoted strings.  Username which is provided by
+    the user will need double quotes and backslashes within it escaped.  For
+    the other fields, this shouldn't be an issue.  realm, nonce, and opaque
+    are copied as is from the server, escapes and all.  cnonce is generated
+    with web-safe characters.  uri is already percent encoded.  nc is 8 hex
+    characters.  algorithm and qop with standard values only contain web-safe
+    chracters.
   */
+  userp_quoted = string_quoted(userp);
+  if(!userp_quoted)
+    return CURLE_OUT_OF_MEMORY;
 
   if(d->qop) {
     *allocuserpwd =
@@ -479,10 +514,10 @@ CURLcode Curl_output_digest(struct connectdata *conn,
                "uri=\"%s\", "
                "cnonce=\"%s\", "
                "nc=%08x, "
-               "qop=\"%s\", "
+               "qop=%s, "
                "response=\"%s\"",
                proxy?"Proxy-":"",
-               userp,
+               userp_quoted,
                d->realm,
                d->nonce,
                uripath, /* this is the PATH part of the URL */
@@ -505,12 +540,13 @@ CURLcode Curl_output_digest(struct connectdata *conn,
                "uri=\"%s\", "
                "response=\"%s\"",
                proxy?"Proxy-":"",
-               userp,
+               userp_quoted,
                d->realm,
                d->nonce,
                uripath, /* this is the PATH part of the URL */
                request_digest);
   }
+  Curl_safefree(userp_quoted);
   if(!*allocuserpwd)
     return CURLE_OUT_OF_MEMORY;
 
@@ -534,40 +570,24 @@ CURLcode Curl_output_digest(struct connectdata *conn,
   }
 
   /* append CRLF + zero (3 bytes) to the userpwd header */
-  tmp = realloc(*allocuserpwd, strlen(*allocuserpwd) + 3);
+  userlen = strlen(*allocuserpwd);
+  tmp = realloc(*allocuserpwd, userlen + 3);
   if(!tmp)
     return CURLE_OUT_OF_MEMORY;
-  strcat(tmp, "\r\n");
+  strcpy(&tmp[userlen], "\r\n"); /* append the data */
   *allocuserpwd = tmp;
 
   return CURLE_OK;
 }
 
-void Curl_digest_cleanup_one(struct digestdata *d)
+static void digest_cleanup_one(struct digestdata *d)
 {
-  if(d->nonce)
-    free(d->nonce);
-  d->nonce = NULL;
-
-  if(d->cnonce)
-    free(d->cnonce);
-  d->cnonce = NULL;
-
-  if(d->realm)
-    free(d->realm);
-  d->realm = NULL;
-
-  if(d->opaque)
-    free(d->opaque);
-  d->opaque = NULL;
-
-  if(d->qop)
-    free(d->qop);
-  d->qop = NULL;
-
-  if(d->algorithm)
-    free(d->algorithm);
-  d->algorithm = NULL;
+  Curl_safefree(d->nonce);
+  Curl_safefree(d->cnonce);
+  Curl_safefree(d->realm);
+  Curl_safefree(d->opaque);
+  Curl_safefree(d->qop);
+  Curl_safefree(d->algorithm);
 
   d->nc = 0;
   d->algo = CURLDIGESTALGO_MD5; /* default algorithm */
@@ -577,8 +597,8 @@ void Curl_digest_cleanup_one(struct digestdata *d)
 
 void Curl_digest_cleanup(struct SessionHandle *data)
 {
-  Curl_digest_cleanup_one(&data->state.digest);
-  Curl_digest_cleanup_one(&data->state.proxydigest);
+  digest_cleanup_one(&data->state.digest);
+  digest_cleanup_one(&data->state.proxydigest);
 }
 
 #endif
index 8c96378..c6a4e91 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __HTTP_DIGEST_H
-#define __HTTP_DIGEST_H
+#ifndef HEADER_CURL_HTTP_DIGEST_H
+#define HEADER_CURL_HTTP_DIGEST_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
 typedef enum {
   CURLDIGEST_NONE, /* not a digest */
@@ -46,12 +47,11 @@ CURLcode Curl_output_digest(struct connectdata *conn,
                             bool proxy,
                             const unsigned char *request,
                             const unsigned char *uripath);
-void Curl_digest_cleanup_one(struct digestdata *dig);
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
 void Curl_digest_cleanup(struct SessionHandle *data);
 #else
-#define Curl_digest_cleanup(x) do {} while(0)
+#define Curl_digest_cleanup(x) Curl_nop_stmt
 #endif
 
-#endif
+#endif /* HEADER_CURL_HTTP_DIGEST_H */
index 80b0b50..9b981b3 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+
+#include "curl_setup.h"
 
 #ifdef HAVE_GSSAPI
 #ifdef HAVE_OLD_GSSMIT
 #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#define NCOMPAT 1
 #endif
 
 #ifndef CURL_DISABLE_HTTP
- /* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h"
 #include "sendf.h"
+#include "curl_gssapi.h"
 #include "rawstr.h"
 #include "curl_base64.h"
 #include "http_negotiate.h"
 #include "curl_memory.h"
+#include "url.h"
 
 #ifdef HAVE_SPNEGO
 #  include <spnegohelp.h>
@@ -100,7 +98,8 @@ get_gss_name(struct connectdata *conn, bool proxy, gss_name_t *server)
 }
 
 static void
-log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *prefix)
+log_gss_error(struct connectdata *conn, OM_uint32 error_status,
+              const char *prefix)
 {
   OM_uint32 maj_stat, min_stat;
   OM_uint32 msg_ctx = 0;
@@ -125,7 +124,7 @@ log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *pref
     gss_release_buffer(&min_stat, &status_string);
   } while(!GSS_ERROR(maj_stat) && msg_ctx != 0);
 
-  infof(conn->data, "%s", buf);
+  infof(conn->data, "%s\n", buf);
 }
 
 /* returning zero (0) means success, everything else is treated as "failure"
@@ -133,15 +132,18 @@ log_gss_error(struct connectdata *conn, OM_uint32 error_status, const char *pref
 int Curl_input_negotiate(struct connectdata *conn, bool proxy,
                          const char *header)
 {
-  struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
-    &conn->data->state.negotiate;
-  OM_uint32 major_status, minor_status, minor_status2;
+  struct SessionHandle *data = conn->data;
+  struct negotiatedata *neg_ctx = proxy?&data->state.proxyneg:
+    &data->state.negotiate;
+  OM_uint32 major_status, minor_status, discard_st;
   gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
   gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
   int ret;
-  size_t len, rawlen;
+  size_t len;
+  size_t rawlen = 0;
   bool gss;
   const char* protocol;
+  CURLcode error;
 
   while(*header && ISSPACE(*header))
     header++;
@@ -167,10 +169,10 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
   }
 
   if(neg_ctx->context && neg_ctx->status == GSS_S_COMPLETE) {
-    /* We finished succesfully our part of authentication, but server
+    /* We finished successfully our part of authentication, but server
      * rejected it (since we're again here). Exit with an error since we
      * can't invent anything better */
-    Curl_cleanup_negotiate(conn->data);
+    Curl_cleanup_negotiate(data);
     return -1;
   }
 
@@ -184,89 +186,87 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
 
   len = strlen(header);
   if(len > 0) {
-    rawlen = Curl_base64_decode(header,
-                                (unsigned char **)&input_token.value);
-    if(rawlen == 0)
+    error = Curl_base64_decode(header,
+                               (unsigned char **)&input_token.value, &rawlen);
+    if(error || rawlen == 0)
       return -1;
     input_token.length = rawlen;
 
+    DEBUGASSERT(input_token.value != NULL);
+
 #ifdef HAVE_SPNEGO /* Handle SPNEGO */
     if(checkprefix("Negotiate", header)) {
-        ASN1_OBJECT *   object            = NULL;
-        int             rc                = 1;
-        unsigned char * spnegoToken       = NULL;
-        size_t          spnegoTokenLength = 0;
-        unsigned char * mechToken         = NULL;
-        size_t          mechTokenLength   = 0;
-
-        if(input_token.value == NULL)
-          return CURLE_OUT_OF_MEMORY;
+      unsigned char  *spnegoToken       = NULL;
+      size_t          spnegoTokenLength = 0;
+      gss_buffer_desc mechToken         = GSS_C_EMPTY_BUFFER;
 
-        spnegoToken = malloc(input_token.length);
-        if(spnegoToken == NULL)
+      spnegoToken = malloc(input_token.length);
+      if(spnegoToken == NULL) {
+        Curl_safefree(input_token.value);
+        return CURLE_OUT_OF_MEMORY;
+      }
+      memcpy(spnegoToken, input_token.value, input_token.length);
+      spnegoTokenLength = input_token.length;
+
+      if(!parseSpnegoTargetToken(spnegoToken,
+                                 spnegoTokenLength,
+                                 NULL,
+                                 NULL,
+                                 (unsigned char**)&mechToken.value,
+                                 &mechToken.length,
+                                 NULL,
+                                 NULL)) {
+        Curl_safefree(spnegoToken);
+        infof(data, "Parse SPNEGO Target Token failed\n");
+      }
+      else if(!mechToken.value || !mechToken.length) {
+        Curl_safefree(spnegoToken);
+        if(mechToken.value)
+          gss_release_buffer(&discard_st, &mechToken);
+        infof(data, "Parse SPNEGO Target Token succeeded (NULL token)\n");
+      }
+      else {
+        Curl_safefree(spnegoToken);
+        Curl_safefree(input_token.value);
+        input_token.value = malloc(mechToken.length);
+        if(input_token.value == NULL) {
+          gss_release_buffer(&discard_st, &mechToken);
           return CURLE_OUT_OF_MEMORY;
-
-        spnegoTokenLength = input_token.length;
-
-        object = OBJ_txt2obj ("1.2.840.113554.1.2.2", 1);
-        if(!parseSpnegoTargetToken(spnegoToken,
-                                    spnegoTokenLength,
-                                    NULL,
-                                    NULL,
-                                    &mechToken,
-                                    &mechTokenLength,
-                                    NULL,
-                                    NULL)) {
-          free(spnegoToken);
-          spnegoToken = NULL;
-          infof(conn->data, "Parse SPNEGO Target Token failed\n");
-        }
-        else {
-          free(input_token.value);
-          input_token.value = malloc(mechTokenLength);
-          if (input_token.value == NULL)
-            return CURLE_OUT_OF_MEMORY;
-
-          memcpy(input_token.value, mechToken,mechTokenLength);
-          input_token.length = mechTokenLength;
-          free(mechToken);
-          mechToken = NULL;
-          infof(conn->data, "Parse SPNEGO Target Token succeeded\n");
         }
+        memcpy(input_token.value, mechToken.value, mechToken.length);
+        input_token.length = mechToken.length;
+        gss_release_buffer(&discard_st, &mechToken);
+        infof(data, "Parse SPNEGO Target Token succeeded\n");
+      }
     }
 #endif
   }
 
-  major_status = gss_init_sec_context(&minor_status,
-                                      GSS_C_NO_CREDENTIAL,
-                                      &neg_ctx->context,
-                                      neg_ctx->server_name,
-                                      GSS_C_NO_OID,
-                                      GSS_C_DELEG_FLAG,
-                                      0,
-                                      GSS_C_NO_CHANNEL_BINDINGS,
-                                      &input_token,
-                                      NULL,
-                                      &output_token,
-                                      NULL,
-                                      NULL);
-  if(input_token.length > 0)
-    gss_release_buffer(&minor_status2, &input_token);
+  major_status = Curl_gss_init_sec_context(data,
+                                           &minor_status,
+                                           &neg_ctx->context,
+                                           neg_ctx->server_name,
+                                           GSS_C_NO_CHANNEL_BINDINGS,
+                                           &input_token,
+                                           &output_token,
+                                           NULL);
+  Curl_safefree(input_token.value);
+
   neg_ctx->status = major_status;
   if(GSS_ERROR(major_status)) {
-    /* Curl_cleanup_negotiate(conn->data) ??? */
-    log_gss_error(conn, minor_status,
-                  "gss_init_sec_context() failed: ");
+    if(output_token.value)
+      gss_release_buffer(&discard_st, &output_token);
+    log_gss_error(conn, minor_status, "gss_init_sec_context() failed: ");
     return -1;
   }
 
-  if(output_token.length == 0) {
+  if(!output_token.value || !output_token.length) {
+    if(output_token.value)
+      gss_release_buffer(&discard_st, &output_token);
     return -1;
   }
 
   neg_ctx->output_token = output_token;
-  /* conn->bits.close = FALSE; */
-
   return 0;
 }
 
@@ -276,70 +276,89 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
   struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
     &conn->data->state.negotiate;
   char *encoded = NULL;
-  size_t len;
+  size_t len = 0;
   char *userp;
+  CURLcode error;
+  OM_uint32 discard_st;
 
 #ifdef HAVE_SPNEGO /* Handle SPNEGO */
   if(checkprefix("Negotiate", neg_ctx->protocol)) {
-    ASN1_OBJECT *   object            = NULL;
-    int             rc                = 1;
-    unsigned char * spnegoToken       = NULL;
-    size_t          spnegoTokenLength = 0;
-    unsigned char * responseToken       = NULL;
+    ASN1_OBJECT    *object              = NULL;
+    unsigned char  *responseToken       = NULL;
     size_t          responseTokenLength = 0;
+    gss_buffer_desc spnegoToken         = GSS_C_EMPTY_BUFFER;
 
     responseToken = malloc(neg_ctx->output_token.length);
-    if( responseToken == NULL)
+    if(responseToken == NULL)
       return CURLE_OUT_OF_MEMORY;
     memcpy(responseToken, neg_ctx->output_token.value,
            neg_ctx->output_token.length);
     responseTokenLength = neg_ctx->output_token.length;
 
-    object=OBJ_txt2obj ("1.2.840.113554.1.2.2", 1);
-    if(!makeSpnegoInitialToken (object,
-                                 responseToken,
-                                 responseTokenLength,
-                                 &spnegoToken,
-                                 &spnegoTokenLength)) {
-      free(responseToken);
-      responseToken = NULL;
+    object = OBJ_txt2obj("1.2.840.113554.1.2.2", 1);
+    if(!object) {
+      Curl_safefree(responseToken);
+      return CURLE_OUT_OF_MEMORY;
+    }
+
+    if(!makeSpnegoInitialToken(object,
+                               responseToken,
+                               responseTokenLength,
+                               (unsigned char**)&spnegoToken.value,
+                               &spnegoToken.length)) {
+      Curl_safefree(responseToken);
+      ASN1_OBJECT_free(object);
       infof(conn->data, "Make SPNEGO Initial Token failed\n");
     }
+    else if(!spnegoToken.value || !spnegoToken.length) {
+      Curl_safefree(responseToken);
+      ASN1_OBJECT_free(object);
+      if(spnegoToken.value)
+        gss_release_buffer(&discard_st, &spnegoToken);
+      infof(conn->data, "Make SPNEGO Initial Token succeeded (NULL token)\n");
+    }
     else {
-      free(responseToken);
-      responseToken = NULL;
-      free(neg_ctx->output_token.value);
-      neg_ctx->output_token.value = malloc(spnegoTokenLength);
-      if(neg_ctx->output_token.value == NULL) {
-        free(spnegoToken);
-        spnegoToken = NULL;
-        return CURLE_OUT_OF_MEMORY;
-      }
-      memcpy(neg_ctx->output_token.value, spnegoToken,spnegoTokenLength);
-      neg_ctx->output_token.length = spnegoTokenLength;
-      free(spnegoToken);
-      spnegoToken = NULL;
+      Curl_safefree(responseToken);
+      ASN1_OBJECT_free(object);
+      gss_release_buffer(&discard_st, &neg_ctx->output_token);
+      neg_ctx->output_token.value = spnegoToken.value;
+      neg_ctx->output_token.length = spnegoToken.length;
       infof(conn->data, "Make SPNEGO Initial Token succeeded\n");
     }
   }
 #endif
-  len = Curl_base64_encode(conn->data,
-                           neg_ctx->output_token.value,
-                           neg_ctx->output_token.length,
-                           &encoded);
+  error = Curl_base64_encode(conn->data,
+                             neg_ctx->output_token.value,
+                             neg_ctx->output_token.length,
+                             &encoded, &len);
+  if(error) {
+    gss_release_buffer(&discard_st, &neg_ctx->output_token);
+    neg_ctx->output_token.value = NULL;
+    neg_ctx->output_token.length = 0;
+    return error;
+  }
 
-  if(len == 0)
-    return CURLE_OUT_OF_MEMORY;
+  if(!encoded || !len) {
+    gss_release_buffer(&discard_st, &neg_ctx->output_token);
+    neg_ctx->output_token.value = NULL;
+    neg_ctx->output_token.length = 0;
+    return CURLE_REMOTE_ACCESS_DENIED;
+  }
 
   userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "",
                   neg_ctx->protocol, encoded);
-
-  if(proxy)
+  if(proxy) {
+    Curl_safefree(conn->allocptr.proxyuserpwd);
     conn->allocptr.proxyuserpwd = userp;
-  else
+  }
+  else {
+    Curl_safefree(conn->allocptr.userpwd);
     conn->allocptr.userpwd = userp;
-  free(encoded);
-  Curl_cleanup_negotiate (conn->data);
+  }
+
+  Curl_safefree(encoded);
+  Curl_cleanup_negotiate(conn->data);
+
   return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
 }
 
@@ -349,7 +368,7 @@ static void cleanup(struct negotiatedata *neg_ctx)
   if(neg_ctx->context != GSS_C_NO_CONTEXT)
     gss_delete_sec_context(&minor_status, &neg_ctx->context, GSS_C_NO_BUFFER);
 
-  if(neg_ctx->output_token.length != 0)
+  if(neg_ctx->output_token.value)
     gss_release_buffer(&minor_status, &neg_ctx->output_token);
 
   if(neg_ctx->server_name != GSS_C_NO_NAME)
index 35501f0..e584d76 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
 
 /* this is for Negotiate header input */
 int Curl_input_negotiate(struct connectdata *conn, bool proxy,
@@ -33,6 +33,10 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy);
 
 void Curl_cleanup_negotiate(struct SessionHandle *data);
 
-#endif /* HAVE_GSSAPI */
+#ifdef USE_WINDOWS_SSPI
+#define GSS_ERROR(status) (status & 0x80000000)
+#endif
+
+#endif /* USE_HTTP_NEGOTIATE */
 
 #endif /* HEADER_CURL_HTTP_NEGOTIATE_H */
diff --git a/lib/http_negotiate_sspi.c b/lib/http_negotiate_sspi.c
new file mode 100644 (file)
index 0000000..1381d52
--- /dev/null
@@ -0,0 +1,308 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#ifdef USE_WINDOWS_SSPI
+
+#ifndef CURL_DISABLE_HTTP
+
+#include "urldata.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "warnless.h"
+#include "curl_base64.h"
+#include "http_negotiate.h"
+#include "curl_memory.h"
+#include "curl_multibyte.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+/* The last #include file should be: */
+#include "memdebug.h"
+
+static int
+get_gss_name(struct connectdata *conn, bool proxy,
+             struct negotiatedata *neg_ctx)
+{
+  const char* service;
+  size_t length;
+
+  if(proxy && !conn->proxy.name)
+    /* proxy auth requested but no given proxy name, error out! */
+    return -1;
+
+  /* GSSAPI implementation by Globus (known as GSI) requires the name to be
+     of form "<service>/<fqdn>" instead of <service>@<fqdn> (ie. slash instead
+     of at-sign). Also GSI servers are often identified as 'host' not 'khttp'.
+     Change following lines if you want to use GSI */
+
+  /* IIS uses the <service>@<fqdn> form but uses 'http' as the service name,
+     and SSPI then generates an NTLM token. When using <service>/<fqdn> a
+     Kerberos token is generated. */
+
+  if(neg_ctx->gss)
+    service = "KHTTP";
+  else
+    service = "HTTP";
+
+  length = strlen(service) + 1 + strlen(proxy ? conn->proxy.name :
+                                        conn->host.name) + 1;
+  if(length + 1 > sizeof(neg_ctx->server_name))
+    return EMSGSIZE;
+
+  snprintf(neg_ctx->server_name, sizeof(neg_ctx->server_name), "%s/%s",
+           service, proxy ? conn->proxy.name : conn->host.name);
+
+  return 0;
+}
+
+/* returning zero (0) means success, everything else is treated as "failure"
+   with no care exactly what the failure was */
+int Curl_input_negotiate(struct connectdata *conn, bool proxy,
+                         const char *header)
+{
+  struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
+    &conn->data->state.negotiate;
+  BYTE              *input_token = 0;
+  SecBufferDesc     out_buff_desc;
+  SecBuffer         out_sec_buff;
+  SecBufferDesc     in_buff_desc;
+  SecBuffer         in_sec_buff;
+  unsigned long     context_attributes;
+  TimeStamp         lifetime;
+  TCHAR             *sname;
+  int ret;
+  size_t len = 0, input_token_len = 0;
+  bool gss = FALSE;
+  const char* protocol;
+  CURLcode error;
+
+  while(*header && ISSPACE(*header))
+    header++;
+
+  if(checkprefix("GSS-Negotiate", header)) {
+    protocol = "GSS-Negotiate";
+    gss = TRUE;
+  }
+  else if(checkprefix("Negotiate", header)) {
+    protocol = "Negotiate";
+    gss = FALSE;
+  }
+  else
+    return -1;
+
+  if(neg_ctx->context) {
+    if(neg_ctx->gss != gss) {
+      return -1;
+    }
+  }
+  else {
+    neg_ctx->protocol = protocol;
+    neg_ctx->gss = gss;
+  }
+
+  if(neg_ctx->context && neg_ctx->status == SEC_E_OK) {
+    /* We finished successfully our part of authentication, but server
+     * rejected it (since we're again here). Exit with an error since we
+     * can't invent anything better */
+    Curl_cleanup_negotiate(conn->data);
+    return -1;
+  }
+
+  if(0 == strlen(neg_ctx->server_name)) {
+    ret = get_gss_name(conn, proxy, neg_ctx);
+    if(ret)
+      return ret;
+  }
+
+  if(!neg_ctx->output_token) {
+    PSecPkgInfo SecurityPackage;
+    ret = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("Negotiate"),
+                                             &SecurityPackage);
+    if(ret != SEC_E_OK)
+      return -1;
+
+    /* Allocate input and output buffers according to the max token size
+       as indicated by the security package */
+    neg_ctx->max_token_length = SecurityPackage->cbMaxToken;
+    neg_ctx->output_token = malloc(neg_ctx->max_token_length);
+    s_pSecFn->FreeContextBuffer(SecurityPackage);
+  }
+
+  /* Obtain the input token, if any */
+  header += strlen(neg_ctx->protocol);
+  while(*header && ISSPACE(*header))
+    header++;
+
+  len = strlen(header);
+  if(!len) {
+    /* first call in a new negotation, we have to acquire credentials,
+       and allocate memory for the context */
+
+    neg_ctx->credentials = malloc(sizeof(CredHandle));
+    neg_ctx->context = malloc(sizeof(CtxtHandle));
+
+    if(!neg_ctx->credentials || !neg_ctx->context)
+      return -1;
+
+    neg_ctx->status =
+      s_pSecFn->AcquireCredentialsHandle(NULL,
+                                         (TCHAR *) TEXT("Negotiate"),
+                                         SECPKG_CRED_OUTBOUND, NULL, NULL,
+                                         NULL, NULL, neg_ctx->credentials,
+                                         &lifetime);
+    if(neg_ctx->status != SEC_E_OK)
+      return -1;
+  }
+  else {
+    input_token = malloc(neg_ctx->max_token_length);
+    if(!input_token)
+      return -1;
+
+    error = Curl_base64_decode(header,
+                               (unsigned char **)&input_token,
+                               &input_token_len);
+    if(error || input_token_len == 0)
+      return -1;
+  }
+
+  /* prepare the output buffers, and input buffers if present */
+  out_buff_desc.ulVersion = 0;
+  out_buff_desc.cBuffers  = 1;
+  out_buff_desc.pBuffers  = &out_sec_buff;
+
+  out_sec_buff.cbBuffer   = curlx_uztoul(neg_ctx->max_token_length);
+  out_sec_buff.BufferType = SECBUFFER_TOKEN;
+  out_sec_buff.pvBuffer   = neg_ctx->output_token;
+
+
+  if(input_token) {
+    in_buff_desc.ulVersion = 0;
+    in_buff_desc.cBuffers  = 1;
+    in_buff_desc.pBuffers  = &in_sec_buff;
+
+    in_sec_buff.cbBuffer   = curlx_uztoul(input_token_len);
+    in_sec_buff.BufferType = SECBUFFER_TOKEN;
+    in_sec_buff.pvBuffer   = input_token;
+  }
+
+  sname = Curl_convert_UTF8_to_tchar(neg_ctx->server_name);
+  if(!sname)
+    return CURLE_OUT_OF_MEMORY;
+
+  neg_ctx->status = s_pSecFn->InitializeSecurityContext(
+    neg_ctx->credentials,
+    input_token ? neg_ctx->context : 0,
+    sname,
+    ISC_REQ_CONFIDENTIALITY,
+    0,
+    SECURITY_NATIVE_DREP,
+    input_token ? &in_buff_desc : 0,
+    0,
+    neg_ctx->context,
+    &out_buff_desc,
+    &context_attributes,
+    &lifetime);
+
+  Curl_unicodefree(sname);
+
+  if(GSS_ERROR(neg_ctx->status))
+    return -1;
+
+  if(neg_ctx->status == SEC_I_COMPLETE_NEEDED ||
+     neg_ctx->status == SEC_I_COMPLETE_AND_CONTINUE) {
+    neg_ctx->status = s_pSecFn->CompleteAuthToken(neg_ctx->context,
+                                                  &out_buff_desc);
+    if(GSS_ERROR(neg_ctx->status))
+      return -1;
+  }
+
+  neg_ctx->output_token_length = out_sec_buff.cbBuffer;
+
+  return 0;
+}
+
+
+CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+{
+  struct negotiatedata *neg_ctx = proxy?&conn->data->state.proxyneg:
+    &conn->data->state.negotiate;
+  char *encoded = NULL;
+  size_t len = 0;
+  char *userp;
+  CURLcode error;
+
+  error = Curl_base64_encode(conn->data,
+                             (const char*)neg_ctx->output_token,
+                             neg_ctx->output_token_length,
+                             &encoded, &len);
+  if(error)
+    return error;
+
+  if(len == 0)
+    return CURLE_REMOTE_ACCESS_DENIED;
+
+  userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "",
+                  neg_ctx->protocol, encoded);
+
+  if(proxy)
+    conn->allocptr.proxyuserpwd = userp;
+  else
+    conn->allocptr.userpwd = userp;
+  free(encoded);
+  Curl_cleanup_negotiate (conn->data);
+  return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
+}
+
+static void cleanup(struct negotiatedata *neg_ctx)
+{
+  if(neg_ctx->context) {
+    s_pSecFn->DeleteSecurityContext(neg_ctx->context);
+    free(neg_ctx->context);
+    neg_ctx->context = 0;
+  }
+
+  if(neg_ctx->credentials) {
+    s_pSecFn->FreeCredentialsHandle(neg_ctx->credentials);
+    free(neg_ctx->credentials);
+    neg_ctx->credentials = 0;
+  }
+
+  if(neg_ctx->output_token) {
+    free(neg_ctx->output_token);
+    neg_ctx->output_token = 0;
+  }
+
+  neg_ctx->max_token_length = 0;
+}
+
+void Curl_cleanup_negotiate(struct SessionHandle *data)
+{
+  cleanup(&data->state.negotiate);
+  cleanup(&data->state.proxyneg);
+}
+
+
+#endif
+#endif
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
deleted file mode 100644 (file)
index f5b696a..0000000
+++ /dev/null
@@ -1,1305 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * 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 "setup.h"
-
-/* NTLM details:
-
-   http://davenport.sourceforge.net/ntlm.html
-   http://www.innovation.ch/java/ntlm.html
-
-   Another implementation:
-   http://lxr.mozilla.org/mozilla/source/security/manager/ssl/src/nsNTLMAuthModule.cpp
-
-*/
-
-#ifndef CURL_DISABLE_HTTP
-#ifdef USE_NTLM
-
-#define DEBUG_ME 0
-
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
-#include <netdb.h>
-#endif
-
-#include "urldata.h"
-#include "easyif.h"  /* for Curl_convert_... prototypes */
-#include "sendf.h"
-#include "rawstr.h"
-#include "curl_base64.h"
-#include "http_ntlm.h"
-#include "url.h"
-#include "curl_gethostname.h"
-#include "curl_memory.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
-/* "NTLMSSP" signature is always in ASCII regardless of the platform */
-#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"
-
-#ifdef USE_SSLEAY
-#include "ssluse.h"
-#    ifdef USE_OPENSSL
-#      include <openssl/des.h>
-#      ifndef OPENSSL_NO_MD4
-#        include <openssl/md4.h>
-#      endif
-#      include <openssl/md5.h>
-#      include <openssl/ssl.h>
-#      include <openssl/rand.h>
-#    else
-#      include <des.h>
-#      ifndef OPENSSL_NO_MD4
-#        include <md4.h>
-#      endif
-#      include <md5.h>
-#      include <ssl.h>
-#      include <rand.h>
-#    endif
-
-#if OPENSSL_VERSION_NUMBER < 0x00907001L
-#define DES_key_schedule des_key_schedule
-#define DES_cblock des_cblock
-#define DES_set_odd_parity des_set_odd_parity
-#define DES_set_key des_set_key
-#define DES_ecb_encrypt des_ecb_encrypt
-
-/* This is how things were done in the old days */
-#define DESKEY(x) x
-#define DESKEYARG(x) x
-#else
-/* Modern version */
-#define DESKEYARG(x) *x
-#define DESKEY(x) &x
-#endif
-
-#ifdef OPENSSL_NO_MD4
-/* This requires MD4, but OpenSSL was compiled without it */
-#define USE_NTRESPONSES 0
-#define USE_NTLM2SESSION 0
-#endif
-
-#elif defined(USE_GNUTLS)
-
-#include "gtls.h"
-#include <gcrypt.h>
-
-#define MD5_DIGEST_LENGTH 16
-#define MD4_DIGEST_LENGTH 16
-
-#elif defined(USE_NSS)
-
-#include "curl_md4.h"
-#include "nssg.h"
-#include <nss.h>
-#include <pk11pub.h>
-#include <hasht.h>
-#define MD5_DIGEST_LENGTH MD5_LENGTH
-
-#elif defined(USE_WINDOWS_SSPI)
-
-#include "curl_sspi.h"
-
-#else
-#    error "Can't compile NTLM support without a crypto library."
-#endif
-
-/* The last #include file should be: */
-#include "memdebug.h"
-
-#ifndef USE_NTRESPONSES 
-/* Define this to make the type-3 message include the NT response message */
-#define USE_NTRESPONSES 1
-
-/* Define this to make the type-3 message include the NTLM2Session response
-   message, requires USE_NTRESPONSES. */
-#define USE_NTLM2SESSION 1
-#endif
-
-#ifndef USE_WINDOWS_SSPI
-/* this function converts from the little endian format used in the incoming
-   package to whatever endian format we're using natively */
-static unsigned int readint_le(unsigned char *buf) /* must point to a
-                                                      4 bytes buffer*/
-{
-  return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) |
-    ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24);
-}
-#endif
-
-#if DEBUG_ME
-# define DEBUG_OUT(x) x
-static void print_flags(FILE *handle, unsigned long flags)
-{
-  if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");
-  if(flags & NTLMFLAG_NEGOTIATE_OEM)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM ");
-  if(flags & NTLMFLAG_REQUEST_TARGET)
-    fprintf(handle, "NTLMFLAG_REQUEST_TARGET ");
-  if(flags & (1<<3))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_3 ");
-  if(flags & NTLMFLAG_NEGOTIATE_SIGN)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_SIGN ");
-  if(flags & NTLMFLAG_NEGOTIATE_SEAL)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_SEAL ");
-  if(flags & NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE ");
-  if(flags & NTLMFLAG_NEGOTIATE_LM_KEY)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_LM_KEY ");
-  if(flags & NTLMFLAG_NEGOTIATE_NETWARE)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_NETWARE ");
-  if(flags & NTLMFLAG_NEGOTIATE_NTLM_KEY)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM_KEY ");
-  if(flags & (1<<10))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_10 ");
-  if(flags & NTLMFLAG_NEGOTIATE_ANONYMOUS)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_ANONYMOUS ");
-  if(flags & NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED ");
-  if(flags & NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED ");
-  if(flags & NTLMFLAG_NEGOTIATE_LOCAL_CALL)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_LOCAL_CALL ");
-  if(flags & NTLMFLAG_NEGOTIATE_ALWAYS_SIGN)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_ALWAYS_SIGN ");
-  if(flags & NTLMFLAG_TARGET_TYPE_DOMAIN)
-    fprintf(handle, "NTLMFLAG_TARGET_TYPE_DOMAIN ");
-  if(flags & NTLMFLAG_TARGET_TYPE_SERVER)
-    fprintf(handle, "NTLMFLAG_TARGET_TYPE_SERVER ");
-  if(flags & NTLMFLAG_TARGET_TYPE_SHARE)
-    fprintf(handle, "NTLMFLAG_TARGET_TYPE_SHARE ");
-  if(flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM2_KEY ");
-  if(flags & NTLMFLAG_REQUEST_INIT_RESPONSE)
-    fprintf(handle, "NTLMFLAG_REQUEST_INIT_RESPONSE ");
-  if(flags & NTLMFLAG_REQUEST_ACCEPT_RESPONSE)
-    fprintf(handle, "NTLMFLAG_REQUEST_ACCEPT_RESPONSE ");
-  if(flags & NTLMFLAG_REQUEST_NONNT_SESSION_KEY)
-    fprintf(handle, "NTLMFLAG_REQUEST_NONNT_SESSION_KEY ");
-  if(flags & NTLMFLAG_NEGOTIATE_TARGET_INFO)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_TARGET_INFO ");
-  if(flags & (1<<24))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_24 ");
-  if(flags & (1<<25))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_25 ");
-  if(flags & (1<<26))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_26 ");
-  if(flags & (1<<27))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_27 ");
-  if(flags & (1<<28))
-    fprintf(handle, "NTLMFLAG_UNKNOWN_28 ");
-  if(flags & NTLMFLAG_NEGOTIATE_128)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_128 ");
-  if(flags & NTLMFLAG_NEGOTIATE_KEY_EXCHANGE)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_KEY_EXCHANGE ");
-  if(flags & NTLMFLAG_NEGOTIATE_56)
-    fprintf(handle, "NTLMFLAG_NEGOTIATE_56 ");
-}
-
-static void print_hex(FILE *handle, const char *buf, size_t len)
-{
-  const char *p = buf;
-  fprintf(stderr, "0x");
-  while(len-- > 0)
-    fprintf(stderr, "%02.2x", (unsigned int)*p++);
-}
-#else
-# define DEBUG_OUT(x)
-#endif
-
-/*
-  (*) = A "security buffer" is a triplet consisting of two shorts and one
-  long:
-
-  1. a 'short' containing the length of the buffer in bytes
-  2. a 'short' containing the allocated space for the buffer in bytes
-  3. a 'long' containing the offset to the start of the buffer from the
-     beginning of the NTLM message, in bytes.
-*/
-
-
-CURLntlm Curl_input_ntlm(struct connectdata *conn,
-                         bool proxy,   /* if proxy or not */
-                         const char *header) /* rest of the www-authenticate:
-                                                header */
-{
-  /* point to the correct struct with this */
-  struct ntlmdata *ntlm;
-#ifndef USE_WINDOWS_SSPI
-  static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
-#endif
-
-#ifdef USE_NSS
-  if(CURLE_OK != Curl_nss_force_init(conn->data))
-    return CURLNTLM_BAD;
-#endif
-
-  ntlm = proxy?&conn->proxyntlm:&conn->ntlm;
-
-  /* skip initial whitespaces */
-  while(*header && ISSPACE(*header))
-    header++;
-
-  if(checkprefix("NTLM", header)) {
-    header += strlen("NTLM");
-
-    while(*header && ISSPACE(*header))
-      header++;
-
-    if(*header) {
-      /* We got a type-2 message here:
-
-         Index   Description         Content
-         0       NTLMSSP Signature   Null-terminated ASCII "NTLMSSP"
-                                     (0x4e544c4d53535000)
-         8       NTLM Message Type   long (0x02000000)
-         12      Target Name         security buffer(*)
-         20      Flags               long
-         24      Challenge           8 bytes
-         (32)    Context (optional)  8 bytes (two consecutive longs)
-         (40)    Target Information  (optional) security buffer(*)
-         32 (48) start of data block
-      */
-      size_t size;
-      unsigned char *buffer;
-      size = Curl_base64_decode(header, &buffer);
-      if(!buffer)
-        return CURLNTLM_BAD;
-
-      ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */
-
-#ifdef USE_WINDOWS_SSPI
-      ntlm->type_2 = malloc(size+1);
-      if(ntlm->type_2 == NULL) {
-        free(buffer);
-        return CURLE_OUT_OF_MEMORY;
-      }
-      ntlm->n_type_2 = size;
-      memcpy(ntlm->type_2, buffer, size);
-#else
-      ntlm->flags = 0;
-
-      if((size < 32) ||
-         (memcmp(buffer, NTLMSSP_SIGNATURE, 8) != 0) ||
-         (memcmp(buffer+8, type2_marker, sizeof(type2_marker)) != 0)) {
-        /* This was not a good enough type-2 message */
-        free(buffer);
-        return CURLNTLM_BAD;
-      }
-
-      ntlm->flags = readint_le(&buffer[20]);
-      memcpy(ntlm->nonce, &buffer[24], 8);
-
-      DEBUG_OUT({
-        fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags);
-        print_flags(stderr, ntlm->flags);
-        fprintf(stderr, "\n                  nonce=");
-        print_hex(stderr, (char *)ntlm->nonce, 8);
-        fprintf(stderr, "\n****\n");
-        fprintf(stderr, "**** Header %s\n ", header);
-      });
-#endif
-      free(buffer);
-    }
-    else {
-      if(ntlm->state >= NTLMSTATE_TYPE1)
-        return CURLNTLM_BAD;
-
-      ntlm->state = NTLMSTATE_TYPE1; /* we should sent away a type-1 */
-    }
-  }
-  return CURLNTLM_FINE;
-}
-
-#ifndef USE_WINDOWS_SSPI
-
-#ifdef USE_SSLEAY
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.  The
- * key schedule ks is also set.
- */
-static void setup_des_key(const unsigned char *key_56,
-                          DES_key_schedule DESKEYARG(ks))
-{
-  DES_cblock key;
-
-  key[0] = key_56[0];
-  key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
-  key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
-  key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3));
-  key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4));
-  key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
-  key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
-  key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
-
-  DES_set_odd_parity(&key);
-  DES_set_key(&key, ks);
-}
-
-#else /* defined(USE_SSLEAY) */
-
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key.  Used by GnuTLS and NSS.
- */
-static void extend_key_56_to_64(const unsigned char *key_56, char *key)
-{
-  key[0] = key_56[0];
-  key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
-  key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
-  key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3));
-  key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4));
-  key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
-  key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
-  key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
-}
-
-#if defined(USE_GNUTLS)
-
-/*
- * Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
- */
-static void setup_des_key(const unsigned char *key_56,
-                          gcry_cipher_hd_t *des)
-{
-  char key[8];
-  extend_key_56_to_64(key_56, key);
-  gcry_cipher_setkey(*des, key, 8);
-}
-
-#elif defined(USE_NSS)
-
-/*
- * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using
- * the expanded key.  The caller is responsible for giving 64 bit of valid
- * data is IN and (at least) 64 bit large buffer as OUT.
- */
-static bool encrypt_des(const unsigned char *in, unsigned char *out,
-                        const unsigned char *key_56)
-{
-  const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */
-  PK11SlotInfo *slot = NULL;
-  char key[8];                                /* expanded 64 bit key */
-  SECItem key_item;
-  PK11SymKey *symkey = NULL;
-  SECItem *param = NULL;
-  PK11Context *ctx = NULL;
-  int out_len;                                /* not used, required by NSS */
-  bool rv = FALSE;
-
-  /* use internal slot for DES encryption (requires NSS to be initialized) */
-  slot = PK11_GetInternalKeySlot();
-  if(!slot)
-    return FALSE;
-
-  /* expand the 56 bit key to 64 bit and wrap by NSS */
-  extend_key_56_to_64(key_56, key);
-  key_item.data = (unsigned char *)key;
-  key_item.len = /* hard-wired */ 8;
-  symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
-                             &key_item, NULL);
-  if(!symkey)
-    goto fail;
-
-  /* create DES encryption context */
-  param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL);
-  if(!param)
-    goto fail;
-  ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param);
-  if(!ctx)
-    goto fail;
-
-  /* perform the encryption */
-  if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8,
-                                 (unsigned char *)in, /* inbuflen */ 8)
-      && SECSuccess == PK11_Finalize(ctx))
-    rv = /* all OK */ TRUE;
-
-fail:
-  /* cleanup */
-  if(ctx)
-    PK11_DestroyContext(ctx, PR_TRUE);
-  if(symkey)
-    PK11_FreeSymKey(symkey);
-  if(param)
-    SECITEM_FreeItem(param, PR_TRUE);
-  PK11_FreeSlot(slot);
-  return rv;
-}
-
-#endif /* defined(USE_NSS) */
-
-#endif /* defined(USE_SSLEAY) */
-
- /*
-  * takes a 21 byte array and treats it as 3 56-bit DES keys. The
-  * 8 byte plaintext is encrypted with each key and the resulting 24
-  * bytes are stored in the results array.
-  */
-static void lm_resp(const unsigned char *keys,
-                    const unsigned char *plaintext,
-                    unsigned char *results)
-{
-#ifdef USE_SSLEAY
-  DES_key_schedule ks;
-
-  setup_des_key(keys, DESKEY(ks));
-  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results,
-                  DESKEY(ks), DES_ENCRYPT);
-
-  setup_des_key(keys+7, DESKEY(ks));
-  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results+8),
-                  DESKEY(ks), DES_ENCRYPT);
-
-  setup_des_key(keys+14, DESKEY(ks));
-  DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results+16),
-                  DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS)
-  gcry_cipher_hd_t des;
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys, &des);
-  gcry_cipher_encrypt(des, results, 8, plaintext, 8);
-  gcry_cipher_close(des);
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys+7, &des);
-  gcry_cipher_encrypt(des, results+8, 8, plaintext, 8);
-  gcry_cipher_close(des);
-
-  gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-  setup_des_key(keys+14, &des);
-  gcry_cipher_encrypt(des, results+16, 8, plaintext, 8);
-  gcry_cipher_close(des);
-#elif defined(USE_NSS)
-  encrypt_des(plaintext, results,    keys);
-  encrypt_des(plaintext, results+8,  keys+7);
-  encrypt_des(plaintext, results+16, keys+14);
-#endif
-}
-
-
-/*
- * Set up lanmanager hashed password
- */
-static void mk_lm_hash(struct SessionHandle *data,
-                       const char *password,
-                       unsigned char *lmbuffer /* 21 bytes */)
-{
-  unsigned char pw[14];
-  static const unsigned char magic[] = {
-    0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */
-  };
-  size_t len = CURLMIN(strlen(password), 14);
-
-  Curl_strntoupper((char *)pw, password, len);
-  memset(&pw[len], 0, 14-len);
-
-#ifdef CURL_DOES_CONVERSIONS
-  /*
-   * The LanManager hashed password needs to be created using the
-   * password in the network encoding not the host encoding.
-   */
-  if(data)
-    Curl_convert_to_network(data, (char *)pw, 14);
-#else
-  (void)data;
-#endif
-
-  {
-    /* Create LanManager hashed password. */
-
-#ifdef USE_SSLEAY
-    DES_key_schedule ks;
-
-    setup_des_key(pw, DESKEY(ks));
-    DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer,
-                    DESKEY(ks), DES_ENCRYPT);
-
-    setup_des_key(pw+7, DESKEY(ks));
-    DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer+8),
-                    DESKEY(ks), DES_ENCRYPT);
-#elif defined(USE_GNUTLS)
-    gcry_cipher_hd_t des;
-
-    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-    setup_des_key(pw, &des);
-    gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8);
-    gcry_cipher_close(des);
-
-    gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0);
-    setup_des_key(pw+7, &des);
-    gcry_cipher_encrypt(des, lmbuffer+8, 8, magic, 8);
-    gcry_cipher_close(des);
-#elif defined(USE_NSS)
-    encrypt_des(magic, lmbuffer,   pw);
-    encrypt_des(magic, lmbuffer+8, pw+7);
-#endif
-
-    memset(lmbuffer + 16, 0, 21 - 16);
-  }
-}
-
-#if USE_NTRESPONSES
-static void ascii_to_unicode_le(unsigned char *dest, const char *src,
-                               size_t srclen)
-{
-  size_t i;
-  for (i=0; i<srclen; i++) {
-    dest[2*i]   = (unsigned char)src[i];
-    dest[2*i+1] =   '\0';
-  }
-}
-
-/*
- * Set up nt hashed passwords
- */
-static CURLcode mk_nt_hash(struct SessionHandle *data,
-                           const char *password,
-                           unsigned char *ntbuffer /* 21 bytes */)
-{
-  size_t len = strlen(password);
-  unsigned char *pw = malloc(len*2);
-  if(!pw)
-    return CURLE_OUT_OF_MEMORY;
-
-  ascii_to_unicode_le(pw, password, len);
-
-#ifdef CURL_DOES_CONVERSIONS
-  /*
-   * The NT hashed password needs to be created using the
-   * password in the network encoding not the host encoding.
-   */
-  if(data)
-    Curl_convert_to_network(data, (char *)pw, len*2);
-#else
-  (void)data;
-#endif
-
-  {
-    /* Create NT hashed password. */
-#ifdef USE_SSLEAY
-    MD4_CTX MD4pw;
-    MD4_Init(&MD4pw);
-    MD4_Update(&MD4pw, pw, 2*len);
-    MD4_Final(ntbuffer, &MD4pw);
-#elif defined(USE_GNUTLS)
-    gcry_md_hd_t MD4pw;
-    gcry_md_open(&MD4pw, GCRY_MD_MD4, 0);
-    gcry_md_write(MD4pw, pw, 2*len);
-    memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH);
-    gcry_md_close(MD4pw);
-#elif defined(USE_NSS)
-    Curl_md4it(ntbuffer, pw, 2*len);
-#endif
-
-    memset(ntbuffer + 16, 0, 21 - 16);
-  }
-
-  free(pw);
-  return CURLE_OK;
-}
-#endif
-
-
-#endif
-
-#ifdef USE_WINDOWS_SSPI
-
-static void
-ntlm_sspi_cleanup(struct ntlmdata *ntlm)
-{
-  if(ntlm->type_2) {
-    free(ntlm->type_2);
-    ntlm->type_2 = NULL;
-  }
-  if(ntlm->has_handles) {
-    s_pSecFn->DeleteSecurityContext(&ntlm->c_handle);
-    s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
-    ntlm->has_handles = 0;
-  }
-  if(ntlm->p_identity) {
-    if(ntlm->identity.User) free(ntlm->identity.User);
-    if(ntlm->identity.Password) free(ntlm->identity.Password);
-    if(ntlm->identity.Domain) free(ntlm->identity.Domain);
-    ntlm->p_identity = NULL;
-  }
-}
-
-#endif
-
-#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff)
-#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8)&0xff), \
-  (((x) >>16)&0xff), (((x)>>24) & 0xff)
-
-#define HOSTNAME_MAX 1024
-
-/* this is for creating ntlm header output */
-CURLcode Curl_output_ntlm(struct connectdata *conn,
-                          bool proxy)
-{
-  const char *domain=""; /* empty */
-  char host [HOSTNAME_MAX+ 1] = ""; /* empty */
-#ifndef USE_WINDOWS_SSPI
-  size_t domlen = strlen(domain);
-  size_t hostlen = strlen(host);
-  size_t hostoff; /* host name offset */
-  size_t domoff;  /* domain name offset */
-#endif
-  size_t size;
-  char *base64=NULL;
-  unsigned char ntlmbuf[1024]; /* enough, unless the user+host+domain is very
-                                  long */
-
-  /* point to the address of the pointer that holds the string to sent to the
-     server, which is for a plain host or for a HTTP proxy */
-  char **allocuserpwd;
-
-  /* point to the name and password for this */
-  const char *userp;
-  const char *passwdp;
-  /* point to the correct struct with this */
-  struct ntlmdata *ntlm;
-  struct auth *authp;
-
-  DEBUGASSERT(conn);
-  DEBUGASSERT(conn->data);
-
-#ifdef USE_NSS
-  if(CURLE_OK != Curl_nss_force_init(conn->data))
-    return CURLE_OUT_OF_MEMORY;
-#endif
-
-  if(proxy) {
-    allocuserpwd = &conn->allocptr.proxyuserpwd;
-    userp = conn->proxyuser;
-    passwdp = conn->proxypasswd;
-    ntlm = &conn->proxyntlm;
-    authp = &conn->data->state.authproxy;
-  }
-  else {
-    allocuserpwd = &conn->allocptr.userpwd;
-    userp = conn->user;
-    passwdp = conn->passwd;
-    ntlm = &conn->ntlm;
-    authp = &conn->data->state.authhost;
-  }
-  authp->done = FALSE;
-
-  /* not set means empty */
-  if(!userp)
-    userp="";
-
-  if(!passwdp)
-    passwdp="";
-
-#ifdef USE_WINDOWS_SSPI
-  if (s_hSecDll == NULL) {
-    /* not thread safe and leaks - use curl_global_init() to avoid */
-    CURLcode err = Curl_sspi_global_init();
-    if (s_hSecDll == NULL)
-      return err;
-  }
-#endif
-
-  switch(ntlm->state) {
-  case NTLMSTATE_TYPE1:
-  default: /* for the weird cases we (re)start here */
-#ifdef USE_WINDOWS_SSPI
-  {
-    SecBuffer buf;
-    SecBufferDesc desc;
-    SECURITY_STATUS status;
-    ULONG attrs;
-    const char *user;
-    int domlen;
-    TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
-
-    ntlm_sspi_cleanup(ntlm);
-
-    user = strchr(userp, '\\');
-    if(!user)
-      user = strchr(userp, '/');
-
-    if(user) {
-      domain = userp;
-      domlen = user - userp;
-      user++;
-    }
-    else {
-      user = userp;
-      domain = "";
-      domlen = 0;
-    }
-
-    if(user && *user) {
-      /* note: initialize all of this before doing the mallocs so that
-       * it can be cleaned up later without leaking memory.
-       */
-      ntlm->p_identity = &ntlm->identity;
-      memset(ntlm->p_identity, 0, sizeof(*ntlm->p_identity));
-      if((ntlm->identity.User = (unsigned char *)strdup(user)) == NULL)
-        return CURLE_OUT_OF_MEMORY;
-      ntlm->identity.UserLength = strlen(user);
-      if((ntlm->identity.Password = (unsigned char *)strdup(passwdp)) == NULL)
-        return CURLE_OUT_OF_MEMORY;
-      ntlm->identity.PasswordLength = strlen(passwdp);
-      if((ntlm->identity.Domain = malloc(domlen+1)) == NULL)
-        return CURLE_OUT_OF_MEMORY;
-      strncpy((char *)ntlm->identity.Domain, domain, domlen);
-      ntlm->identity.Domain[domlen] = '\0';
-      ntlm->identity.DomainLength = domlen;
-      ntlm->identity.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
-    }
-    else {
-      ntlm->p_identity = NULL;
-    }
-
-    if(s_pSecFn->AcquireCredentialsHandleA(
-          NULL, (char *)"NTLM", SECPKG_CRED_OUTBOUND, NULL, ntlm->p_identity,
-          NULL, NULL, &ntlm->handle, &tsDummy
-          ) != SEC_E_OK) {
-      return CURLE_OUT_OF_MEMORY;
-    }
-
-    desc.ulVersion = SECBUFFER_VERSION;
-    desc.cBuffers  = 1;
-    desc.pBuffers  = &buf;
-    buf.cbBuffer   = sizeof(ntlmbuf);
-    buf.BufferType = SECBUFFER_TOKEN;
-    buf.pvBuffer   = ntlmbuf;
-
-    status = s_pSecFn->InitializeSecurityContextA(&ntlm->handle, NULL,
-                                                 (char *) host,
-                                                 ISC_REQ_CONFIDENTIALITY |
-                                                 ISC_REQ_REPLAY_DETECT |
-                                                 ISC_REQ_CONNECTION,
-                                                 0, SECURITY_NETWORK_DREP,
-                                                 NULL, 0,
-                                                 &ntlm->c_handle, &desc,
-                                                 &attrs, &tsDummy);
-
-    if(status == SEC_I_COMPLETE_AND_CONTINUE ||
-        status == SEC_I_CONTINUE_NEEDED) {
-      s_pSecFn->CompleteAuthToken(&ntlm->c_handle, &desc);
-    }
-    else if(status != SEC_E_OK) {
-      s_pSecFn->FreeCredentialsHandle(&ntlm->handle);
-      return CURLE_RECV_ERROR;
-    }
-
-    ntlm->has_handles = 1;
-    size = buf.cbBuffer;
-  }
-#else
-    hostoff = 0;
-    domoff = hostoff + hostlen; /* This is 0: remember that host and domain
-                                   are empty */
-
-    /* Create and send a type-1 message:
-
-    Index Description          Content
-    0     NTLMSSP Signature    Null-terminated ASCII "NTLMSSP"
-                               (0x4e544c4d53535000)
-    8     NTLM Message Type    long (0x01000000)
-    12    Flags                long
-    16    Supplied Domain      security buffer(*)
-    24    Supplied Workstation security buffer(*)
-    32    start of data block
-
-    */
-#if USE_NTLM2SESSION
-#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
-#else
-#define NTLM2FLAG 0
-#endif
-    snprintf((char *)ntlmbuf, sizeof(ntlmbuf), NTLMSSP_SIGNATURE "%c"
-             "\x01%c%c%c" /* 32-bit type = 1 */
-             "%c%c%c%c"   /* 32-bit NTLM flag field */
-             "%c%c"  /* domain length */
-             "%c%c"  /* domain allocated space */
-             "%c%c"  /* domain name offset */
-             "%c%c"  /* 2 zeroes */
-             "%c%c"  /* host length */
-             "%c%c"  /* host allocated space */
-             "%c%c"  /* host name offset */
-             "%c%c"  /* 2 zeroes */
-             "%s"   /* host name */
-             "%s",  /* domain string */
-             0,     /* trailing zero */
-             0,0,0, /* part of type-1 long */
-
-             LONGQUARTET(
-               NTLMFLAG_NEGOTIATE_OEM|
-               NTLMFLAG_REQUEST_TARGET|
-               NTLMFLAG_NEGOTIATE_NTLM_KEY|
-               NTLM2FLAG|
-               NTLMFLAG_NEGOTIATE_ALWAYS_SIGN
-               ),
-             SHORTPAIR(domlen),
-             SHORTPAIR(domlen),
-             SHORTPAIR(domoff),
-             0,0,
-             SHORTPAIR(hostlen),
-             SHORTPAIR(hostlen),
-             SHORTPAIR(hostoff),
-             0,0,
-             host /* this is empty */, domain /* this is empty */);
-
-    /* initial packet length */
-    size = 32 + hostlen + domlen;
-#endif
-
-    DEBUG_OUT({
-      fprintf(stderr, "**** TYPE1 header flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ",
-              LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM|
-                          NTLMFLAG_REQUEST_TARGET|
-                          NTLMFLAG_NEGOTIATE_NTLM_KEY|
-                          NTLM2FLAG|
-                          NTLMFLAG_NEGOTIATE_ALWAYS_SIGN),
-              NTLMFLAG_NEGOTIATE_OEM|
-              NTLMFLAG_REQUEST_TARGET|
-              NTLMFLAG_NEGOTIATE_NTLM_KEY|
-              NTLM2FLAG|
-              NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
-      print_flags(stderr,
-                  NTLMFLAG_NEGOTIATE_OEM|
-                  NTLMFLAG_REQUEST_TARGET|
-                  NTLMFLAG_NEGOTIATE_NTLM_KEY|
-                  NTLM2FLAG|
-                  NTLMFLAG_NEGOTIATE_ALWAYS_SIGN);
-      fprintf(stderr, "\n****\n");
-    });
-
-    /* now size is the size of the base64 encoded package size */
-    size = Curl_base64_encode(NULL, (char *)ntlmbuf, size, &base64);
-
-    if(size >0 ) {
-      Curl_safefree(*allocuserpwd);
-      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
-                              proxy?"Proxy-":"",
-                              base64);
-      DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd));
-      free(base64);
-    }
-    else
-      return CURLE_OUT_OF_MEMORY; /* FIX TODO */
-
-    break;
-
-  case NTLMSTATE_TYPE2:
-    /* We received the type-2 message already, create a type-3 message:
-
-    Index   Description            Content
-    0       NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"
-                                   (0x4e544c4d53535000)
-    8       NTLM Message Type      long (0x03000000)
-    12      LM/LMv2 Response       security buffer(*)
-    20      NTLM/NTLMv2 Response   security buffer(*)
-    28      Domain Name            security buffer(*)
-    36      User Name              security buffer(*)
-    44      Workstation Name       security buffer(*)
-    (52)    Session Key (optional) security buffer(*)
-    (60)    Flags (optional)       long
-    52 (64) start of data block
-
-    */
-
-  {
-#ifdef USE_WINDOWS_SSPI
-    SecBuffer type_2, type_3;
-    SecBufferDesc type_2_desc, type_3_desc;
-    SECURITY_STATUS status;
-    ULONG attrs;
-    TimeStamp tsDummy; /* For Windows 9x compatibility of SPPI calls */
-
-    type_2_desc.ulVersion  = type_3_desc.ulVersion  = SECBUFFER_VERSION;
-    type_2_desc.cBuffers   = type_3_desc.cBuffers   = 1;
-    type_2_desc.pBuffers   = &type_2;
-    type_3_desc.pBuffers   = &type_3;
-
-    type_2.BufferType = SECBUFFER_TOKEN;
-    type_2.pvBuffer   = ntlm->type_2;
-    type_2.cbBuffer   = ntlm->n_type_2;
-    type_3.BufferType = SECBUFFER_TOKEN;
-    type_3.pvBuffer   = ntlmbuf;
-    type_3.cbBuffer   = sizeof(ntlmbuf);
-
-    status = s_pSecFn->InitializeSecurityContextA(&ntlm->handle, &ntlm->c_handle,
-                                       (char *) host,
-                                       ISC_REQ_CONFIDENTIALITY |
-                                       ISC_REQ_REPLAY_DETECT |
-                                       ISC_REQ_CONNECTION,
-                                       0, SECURITY_NETWORK_DREP, &type_2_desc,
-                                       0, &ntlm->c_handle, &type_3_desc,
-                                       &attrs, &tsDummy);
-
-    if(status != SEC_E_OK)
-      return CURLE_RECV_ERROR;
-
-    size = type_3.cbBuffer;
-
-    ntlm_sspi_cleanup(ntlm);
-
-#else
-    int lmrespoff;
-    unsigned char lmresp[24]; /* fixed-size */
-#if USE_NTRESPONSES
-    int ntrespoff;
-    unsigned char ntresp[24]; /* fixed-size */
-#endif
-    size_t useroff;
-    const char *user;
-    size_t userlen;
-
-    user = strchr(userp, '\\');
-    if(!user)
-      user = strchr(userp, '/');
-
-    if(user) {
-      domain = userp;
-      domlen = (user - domain);
-      user++;
-    }
-    else
-      user = userp;
-    userlen = strlen(user);
-
-    if(Curl_gethostname(host, HOSTNAME_MAX)) {
-      infof(conn->data, "gethostname() failed, continuing without!");
-      hostlen = 0;
-    }
-    else {
-      /* If the workstation if configured with a full DNS name (i.e.
-       * workstation.somewhere.net) gethostname() returns the fully qualified
-       * name, which NTLM doesn't like.
-       */
-      char *dot = strchr(host, '.');
-      if(dot)
-        *dot = '\0';
-      hostlen = strlen(host);
-    }
-
-#if USE_NTLM2SESSION
-    /* We don't support NTLM2 if we don't have USE_NTRESPONSES */
-    if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
-      unsigned char ntbuffer[0x18];
-      unsigned char tmp[0x18];
-      unsigned char md5sum[MD5_DIGEST_LENGTH];
-      unsigned char entropy[8];
-
-      /* Need to create 8 bytes random data */
-#ifdef USE_SSLEAY
-      MD5_CTX MD5pw;
-      Curl_ossl_seed(conn->data); /* Initiate the seed if not already done */
-      RAND_bytes(entropy,8);
-#elif defined(USE_GNUTLS)
-      gcry_md_hd_t MD5pw;
-      Curl_gtls_seed(conn->data); /* Initiate the seed if not already done */
-      gcry_randomize(entropy, 8, GCRY_STRONG_RANDOM);
-#elif defined(USE_NSS)
-      PK11Context *MD5pw;
-      unsigned int outlen;
-      Curl_nss_seed(conn->data);  /* Initiate the seed if not already done */
-      PK11_GenerateRandom(entropy, 8);
-#endif
-
-      /* 8 bytes random data as challenge in lmresp */
-      memcpy(lmresp,entropy,8);
-      /* Pad with zeros */
-      memset(lmresp+8,0,0x10);
-
-      /* Fill tmp with challenge(nonce?) + entropy */
-      memcpy(tmp,&ntlm->nonce[0],8);
-      memcpy(tmp+8,entropy,8);
-
-#ifdef USE_SSLEAY
-      MD5_Init(&MD5pw);
-      MD5_Update(&MD5pw, tmp, 16);
-      MD5_Final(md5sum, &MD5pw);
-#elif defined(USE_GNUTLS)
-      gcry_md_open(&MD5pw, GCRY_MD_MD5, 0);
-      gcry_md_write(MD5pw, tmp, MD5_DIGEST_LENGTH);
-      memcpy(md5sum, gcry_md_read (MD5pw, 0), MD5_DIGEST_LENGTH);
-      gcry_md_close(MD5pw);
-#elif defined(USE_NSS)
-      MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
-      PK11_DigestOp(MD5pw, tmp, 16);
-      PK11_DigestFinal(MD5pw, md5sum, &outlen, MD5_DIGEST_LENGTH);
-      PK11_DestroyContext(MD5pw, PR_TRUE);
-#endif
-
-      /* We shall only use the first 8 bytes of md5sum,
-         but the des code in lm_resp only encrypt the first 8 bytes */
-      if(mk_nt_hash(conn->data, passwdp, ntbuffer) == CURLE_OUT_OF_MEMORY)
-        return CURLE_OUT_OF_MEMORY;
-      lm_resp(ntbuffer, md5sum, ntresp);
-
-      /* End of NTLM2 Session code */
-    }
-    else
-#endif
-       {
-
-#if USE_NTRESPONSES
-      unsigned char ntbuffer[0x18];
-#endif
-      unsigned char lmbuffer[0x18];
-
-#if USE_NTRESPONSES
-      if(mk_nt_hash(conn->data, passwdp, ntbuffer) == CURLE_OUT_OF_MEMORY)
-        return CURLE_OUT_OF_MEMORY;
-      lm_resp(ntbuffer, &ntlm->nonce[0], ntresp);
-#endif
-
-      mk_lm_hash(conn->data, passwdp, lmbuffer);
-      lm_resp(lmbuffer, &ntlm->nonce[0], lmresp);
-      /* A safer but less compatible alternative is:
-       *   lm_resp(ntbuffer, &ntlm->nonce[0], lmresp);
-       * See http://davenport.sourceforge.net/ntlm.html#ntlmVersion2 */
-    }
-
-    lmrespoff = 64; /* size of the message header */
-#if USE_NTRESPONSES
-    ntrespoff = lmrespoff + 0x18;
-    domoff = ntrespoff + 0x18;
-#else
-    domoff = lmrespoff + 0x18;
-#endif
-    useroff = domoff + domlen;
-    hostoff = useroff + userlen;
-
-    /*
-     * In the case the server sets the flag NTLMFLAG_NEGOTIATE_UNICODE, we
-     * need to filter it off because libcurl doesn't UNICODE encode the
-     * strings it packs into the NTLM authenticate packet.
-     */
-    ntlm->flags &= ~NTLMFLAG_NEGOTIATE_UNICODE;
-
-    /* Create the big type-3 message binary blob */
-    size = snprintf((char *)ntlmbuf, sizeof(ntlmbuf),
-                    NTLMSSP_SIGNATURE "%c"
-                    "\x03%c%c%c" /* type-3, 32 bits */
-
-                    "%c%c" /* LanManager length */
-                    "%c%c" /* LanManager allocated space */
-                    "%c%c" /* LanManager offset */
-                    "%c%c" /* 2 zeroes */
-
-                    "%c%c" /* NT-response length */
-                    "%c%c" /* NT-response allocated space */
-                    "%c%c" /* NT-response offset */
-                    "%c%c" /* 2 zeroes */
-
-                    "%c%c"  /* domain length */
-                    "%c%c"  /* domain allocated space */
-                    "%c%c"  /* domain name offset */
-                    "%c%c"  /* 2 zeroes */
-
-                    "%c%c"  /* user length */
-                    "%c%c"  /* user allocated space */
-                    "%c%c"  /* user offset */
-                    "%c%c"  /* 2 zeroes */
-
-                    "%c%c"  /* host length */
-                    "%c%c"  /* host allocated space */
-                    "%c%c"  /* host offset */
-                    "%c%c"  /* 2 zeroes */
-
-                    "%c%c"  /* session key length (unknown purpose) */
-                    "%c%c"  /* session key allocated space (unknown purpose) */
-                    "%c%c"  /* session key offset (unknown purpose) */
-                    "%c%c"  /* 2 zeroes */
-
-                    "%c%c%c%c" /* flags */
-
-                    /* domain string */
-                    /* user string */
-                    /* host string */
-                    /* LanManager response */
-                    /* NT response */
-                    ,
-                    0, /* zero termination */
-                    0,0,0, /* type-3 long, the 24 upper bits */
-
-                    SHORTPAIR(0x18),  /* LanManager response length, twice */
-                    SHORTPAIR(0x18),
-                    SHORTPAIR(lmrespoff),
-                    0x0, 0x0,
-
-#if USE_NTRESPONSES
-                    SHORTPAIR(0x18),  /* NT-response length, twice */
-                    SHORTPAIR(0x18),
-                    SHORTPAIR(ntrespoff),
-                    0x0, 0x0,
-#else
-                    0x0, 0x0,
-                    0x0, 0x0,
-                    0x0, 0x0,
-                    0x0, 0x0,
-#endif
-                    SHORTPAIR(domlen),
-                    SHORTPAIR(domlen),
-                    SHORTPAIR(domoff),
-                    0x0, 0x0,
-
-                    SHORTPAIR(userlen),
-                    SHORTPAIR(userlen),
-                    SHORTPAIR(useroff),
-                    0x0, 0x0,
-
-                    SHORTPAIR(hostlen),
-                    SHORTPAIR(hostlen),
-                    SHORTPAIR(hostoff),
-                    0x0, 0x0,
-
-                    0x0, 0x0,
-                    0x0, 0x0,
-                    0x0, 0x0,
-                    0x0, 0x0,
-
-                    LONGQUARTET(ntlm->flags));
-    DEBUGASSERT(size==64);
-
-    DEBUGASSERT(size == (size_t)lmrespoff);
-    /* We append the binary hashes */
-    if(size < (sizeof(ntlmbuf) - 0x18)) {
-      memcpy(&ntlmbuf[size], lmresp, 0x18);
-      size += 0x18;
-    }
-
-    DEBUG_OUT({
-        fprintf(stderr, "**** TYPE3 header lmresp=");
-        print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18);
-    });
-
-#if USE_NTRESPONSES
-    if(size < (sizeof(ntlmbuf) - 0x18)) {
-      DEBUGASSERT(size == (size_t)ntrespoff);
-      memcpy(&ntlmbuf[size], ntresp, 0x18);
-      size += 0x18;
-    }
-
-    DEBUG_OUT({
-        fprintf(stderr, "\n                  ntresp=");
-        print_hex(stderr, (char *)&ntlmbuf[ntrespoff], 0x18);
-    });
-
-#endif
-
-    DEBUG_OUT({
-        fprintf(stderr, "\n                  flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ",
-                LONGQUARTET(ntlm->flags), ntlm->flags);
-        print_flags(stderr, ntlm->flags);
-        fprintf(stderr, "\n****\n");
-    });
-
-
-    /* Make sure that the domain, user and host strings fit in the target
-       buffer before we copy them there. */
-    if(size + userlen + domlen + hostlen >= sizeof(ntlmbuf)) {
-      failf(conn->data, "user + domain + host name too big");
-      return CURLE_OUT_OF_MEMORY;
-    }
-
-    DEBUGASSERT(size == domoff);
-    memcpy(&ntlmbuf[size], domain, domlen);
-    size += domlen;
-
-    DEBUGASSERT(size == useroff);
-    memcpy(&ntlmbuf[size], user, userlen);
-    size += userlen;
-
-    DEBUGASSERT(size == hostoff);
-    memcpy(&ntlmbuf[size], host, hostlen);
-    size += hostlen;
-
-#ifdef CURL_DOES_CONVERSIONS
-    /* convert domain, user, and host to ASCII but leave the rest as-is */
-    if(CURLE_OK != Curl_convert_to_network(conn->data,
-                                           (char *)&ntlmbuf[domoff],
-                                           size-domoff)) {
-      return CURLE_CONV_FAILED;
-    }
-#endif /* CURL_DOES_CONVERSIONS */
-
-#endif
-
-    /* convert the binary blob into base64 */
-    size = Curl_base64_encode(NULL, (char *)ntlmbuf, size, &base64);
-
-    if(size >0 ) {
-      Curl_safefree(*allocuserpwd);
-      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
-                              proxy?"Proxy-":"",
-                              base64);
-      DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd));
-      free(base64);
-    }
-    else
-      return CURLE_OUT_OF_MEMORY; /* FIX TODO */
-
-    ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */
-    authp->done = TRUE;
-  }
-  break;
-
-  case NTLMSTATE_TYPE3:
-    /* connection is already authenticated,
-     * don't send a header in future requests */
-    if(*allocuserpwd) {
-      free(*allocuserpwd);
-      *allocuserpwd=NULL;
-    }
-    authp->done = TRUE;
-    break;
-  }
-
-  return CURLE_OK;
-}
-
-
-void
-Curl_ntlm_cleanup(struct connectdata *conn)
-{
-#ifdef USE_WINDOWS_SSPI
-  ntlm_sspi_cleanup(&conn->ntlm);
-  ntlm_sspi_cleanup(&conn->proxyntlm);
-#else
-  (void)conn;
-#endif
-}
-
-
-#endif /* USE_NTLM */
-#endif /* !CURL_DISABLE_HTTP */
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
new file mode 100644 (file)
index 0000000..7c60e95
--- /dev/null
@@ -0,0 +1,571 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
+
+#include "urldata.h"
+#include <curl/curl.h>
+#include "http_proxy.h"
+#include "sendf.h"
+#include "http.h"
+#include "url.h"
+#include "select.h"
+#include "rawstr.h"
+#include "progress.h"
+#include "non-ascii.h"
+#include "connect.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curlx.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+CURLcode Curl_proxy_connect(struct connectdata *conn)
+{
+  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
+#ifndef CURL_DISABLE_PROXY
+    /* for [protocol] tunneled through HTTP proxy */
+    struct HTTP http_proxy;
+    void *prot_save;
+    CURLcode result;
+
+    /* BLOCKING */
+    /* We want "seamless" operations through HTTP proxy tunnel */
+
+    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the
+     * member conn->proto.http; we want [protocol] through HTTP and we have
+     * to change the member temporarily for connecting to the HTTP
+     * proxy. After Curl_proxyCONNECT we have to set back the member to the
+     * original pointer
+     *
+     * This function might be called several times in the multi interface case
+     * if the proxy's CONNTECT response is not instant.
+     */
+    prot_save = conn->data->state.proto.generic;
+    memset(&http_proxy, 0, sizeof(http_proxy));
+    conn->data->state.proto.http = &http_proxy;
+    conn->bits.close = FALSE;
+    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
+                               conn->host.name, conn->remote_port);
+    conn->data->state.proto.generic = prot_save;
+    if(CURLE_OK != result)
+      return result;
+#else
+    return CURLE_NOT_BUILT_IN;
+#endif
+  }
+  /* no HTTP tunnel proxy, just return */
+  return CURLE_OK;
+}
+
+/*
+ * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This
+ * function will issue the necessary commands to get a seamless tunnel through
+ * this proxy. After that, the socket can be used just as a normal socket.
+ */
+
+CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+                           int sockindex,
+                           const char *hostname,
+                           unsigned short remote_port)
+{
+  int subversion=0;
+  struct SessionHandle *data=conn->data;
+  struct SingleRequest *k = &data->req;
+  CURLcode result;
+  long timeout =
+    data->set.timeout?data->set.timeout:PROXY_TIMEOUT; /* in milliseconds */
+  curl_socket_t tunnelsocket = conn->sock[sockindex];
+  curl_off_t cl=0;
+  bool closeConnection = FALSE;
+  bool chunked_encoding = FALSE;
+  long check;
+
+#define SELECT_OK      0
+#define SELECT_ERROR   1
+#define SELECT_TIMEOUT 2
+  int error = SELECT_OK;
+
+  if(conn->tunnel_state[sockindex] == TUNNEL_COMPLETE)
+    return CURLE_OK; /* CONNECT is already completed */
+
+  conn->bits.proxy_connect_closed = FALSE;
+
+  do {
+    if(TUNNEL_INIT == conn->tunnel_state[sockindex]) {
+      /* BEGIN CONNECT PHASE */
+      char *host_port;
+      Curl_send_buffer *req_buffer;
+
+      infof(data, "Establish HTTP proxy tunnel to %s:%hu\n",
+            hostname, remote_port);
+
+      if(data->req.newurl) {
+        /* This only happens if we've looped here due to authentication
+           reasons, and we don't really use the newly cloned URL here
+           then. Just free() it. */
+        free(data->req.newurl);
+        data->req.newurl = NULL;
+      }
+
+      /* initialize a dynamic send-buffer */
+      req_buffer = Curl_add_buffer_init();
+
+      if(!req_buffer)
+        return CURLE_OUT_OF_MEMORY;
+
+      host_port = aprintf("%s:%hu", hostname, remote_port);
+      if(!host_port) {
+        free(req_buffer);
+        return CURLE_OUT_OF_MEMORY;
+      }
+
+      /* Setup the proxy-authorization header, if any */
+      result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE);
+
+      free(host_port);
+
+      if(CURLE_OK == result) {
+        char *host=(char *)"";
+        const char *proxyconn="";
+        const char *useragent="";
+        const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ?
+          "1.0" : "1.1";
+        char *hostheader= /* host:port with IPv6 support */
+          aprintf("%s%s%s:%hu", conn->bits.ipv6_ip?"[":"",
+                  hostname, conn->bits.ipv6_ip?"]":"",
+                  remote_port);
+        if(!hostheader) {
+          free(req_buffer);
+          return CURLE_OUT_OF_MEMORY;
+        }
+
+        if(!Curl_checkheaders(data, "Host:")) {
+          host = aprintf("Host: %s\r\n", hostheader);
+          if(!host) {
+            free(hostheader);
+            free(req_buffer);
+            return CURLE_OUT_OF_MEMORY;
+          }
+        }
+        if(!Curl_checkheaders(data, "Proxy-Connection:"))
+          proxyconn = "Proxy-Connection: Keep-Alive\r\n";
+
+        if(!Curl_checkheaders(data, "User-Agent:") &&
+           data->set.str[STRING_USERAGENT])
+          useragent = conn->allocptr.uagent;
+
+        result =
+          Curl_add_bufferf(req_buffer,
+                           "CONNECT %s HTTP/%s\r\n"
+                           "%s"  /* Host: */
+                           "%s"  /* Proxy-Authorization */
+                           "%s"  /* User-Agent */
+                           "%s", /* Proxy-Connection */
+                           hostheader,
+                           http,
+                           host,
+                           conn->allocptr.proxyuserpwd?
+                           conn->allocptr.proxyuserpwd:"",
+                           useragent,
+                           proxyconn);
+
+        if(host && *host)
+          free(host);
+        free(hostheader);
+
+        if(CURLE_OK == result)
+          result = Curl_add_custom_headers(conn, req_buffer);
+
+        if(CURLE_OK == result)
+          /* CRLF terminate the request */
+          result = Curl_add_bufferf(req_buffer, "\r\n");
+
+        if(CURLE_OK == result) {
+          /* Send the connect request to the proxy */
+          /* BLOCKING */
+          result =
+            Curl_add_buffer_send(req_buffer, conn,
+                                 &data->info.request_size, 0, sockindex);
+        }
+        req_buffer = NULL;
+        if(result)
+          failf(data, "Failed sending CONNECT to proxy");
+      }
+
+      Curl_safefree(req_buffer);
+      if(result)
+        return result;
+
+      conn->tunnel_state[sockindex] = TUNNEL_CONNECT;
+
+      /* now we've issued the CONNECT and we're waiting to hear back, return
+         and get called again polling-style */
+      return CURLE_OK;
+
+    } /* END CONNECT PHASE */
+
+    { /* BEGIN NEGOTIATION PHASE */
+      size_t nread;   /* total size read */
+      int perline; /* count bytes per line */
+      int keepon=TRUE;
+      ssize_t gotbytes;
+      char *ptr;
+      char *line_start;
+
+      ptr=data->state.buffer;
+      line_start = ptr;
+
+      nread=0;
+      perline=0;
+      keepon=TRUE;
+
+      while((nread<BUFSIZE) && (keepon && !error)) {
+
+        /* if timeout is requested, find out how much remaining time we have */
+        check = timeout - /* timeout time */
+          Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */
+        if(check <= 0) {
+          failf(data, "Proxy CONNECT aborted due to timeout");
+          error = SELECT_TIMEOUT; /* already too little time */
+          break;
+        }
+
+        /* loop every second at least, less if the timeout is near */
+        switch (Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD,
+                                  check<1000L?check:1000)) {
+        case -1: /* select() error, stop reading */
+          error = SELECT_ERROR;
+          failf(data, "Proxy CONNECT aborted due to select/poll error");
+          break;
+        case 0: /* timeout */
+          break;
+        default:
+          DEBUGASSERT(ptr+BUFSIZE-nread <= data->state.buffer+BUFSIZE+1);
+          result = Curl_read(conn, tunnelsocket, ptr, BUFSIZE-nread,
+                             &gotbytes);
+          if(result==CURLE_AGAIN)
+            continue; /* go loop yourself */
+          else if(result)
+            keepon = FALSE;
+          else if(gotbytes <= 0) {
+            keepon = FALSE;
+            if(data->set.proxyauth && data->state.authproxy.avail) {
+              /* proxy auth was requested and there was proxy auth available,
+                 then deem this as "mere" proxy disconnect */
+              conn->bits.proxy_connect_closed = TRUE;
+            }
+            else {
+              error = SELECT_ERROR;
+              failf(data, "Proxy CONNECT aborted");
+            }
+          }
+          else {
+            /*
+             * We got a whole chunk of data, which can be anything from one
+             * byte to a set of lines and possibly just a piece of the last
+             * line.
+             */
+            int i;
+
+            nread += gotbytes;
+
+            if(keepon > TRUE) {
+              /* This means we are currently ignoring a response-body */
+
+              nread = 0; /* make next read start over in the read buffer */
+              ptr=data->state.buffer;
+              if(cl) {
+                /* A Content-Length based body: simply count down the counter
+                   and make sure to break out of the loop when we're done! */
+                cl -= gotbytes;
+                if(cl<=0) {
+                  keepon = FALSE;
+                  break;
+                }
+              }
+              else {
+                /* chunked-encoded body, so we need to do the chunked dance
+                   properly to know when the end of the body is reached */
+                CHUNKcode r;
+                ssize_t tookcareof=0;
+
+                /* now parse the chunked piece of data so that we can
+                   properly tell when the stream ends */
+                r = Curl_httpchunk_read(conn, ptr, gotbytes, &tookcareof);
+                if(r == CHUNKE_STOP) {
+                  /* we're done reading chunks! */
+                  infof(data, "chunk reading DONE\n");
+                  keepon = FALSE;
+                  /* we did the full CONNECT treatment, go COMPLETE */
+                  conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+                }
+                else
+                  infof(data, "Read %zd bytes of chunk, continue\n",
+                        tookcareof);
+              }
+            }
+            else
+              for(i = 0; i < gotbytes; ptr++, i++) {
+                perline++; /* amount of bytes in this line so far */
+                if(*ptr == 0x0a) {
+                  char letter;
+                  int writetype;
+
+                  /* convert from the network encoding */
+                  result = Curl_convert_from_network(data, line_start,
+                                                     perline);
+                  /* Curl_convert_from_network calls failf if unsuccessful */
+                  if(result)
+                    return result;
+
+                  /* output debug if that is requested */
+                  if(data->set.verbose)
+                    Curl_debug(data, CURLINFO_HEADER_IN,
+                               line_start, (size_t)perline, conn);
+
+                  /* send the header to the callback */
+                  writetype = CLIENTWRITE_HEADER;
+                  if(data->set.include_header)
+                    writetype |= CLIENTWRITE_BODY;
+
+                  result = Curl_client_write(conn, writetype, line_start,
+                                             perline);
+
+                  data->info.header_size += (long)perline;
+                  data->req.headerbytecount += (long)perline;
+
+                  if(result)
+                    return result;
+
+                  /* Newlines are CRLF, so the CR is ignored as the line isn't
+                     really terminated until the LF comes. Treat a following CR
+                     as end-of-headers as well.*/
+
+                  if(('\r' == line_start[0]) ||
+                     ('\n' == line_start[0])) {
+                    /* end of response-headers from the proxy */
+                    nread = 0; /* make next read start over in the read
+                                  buffer */
+                    ptr=data->state.buffer;
+                    if((407 == k->httpcode) && !data->state.authproblem) {
+                      /* If we get a 407 response code with content length
+                         when we have no auth problem, we must ignore the
+                         whole response-body */
+                      keepon = 2;
+
+                      if(cl) {
+
+                        infof(data, "Ignore %" FORMAT_OFF_T
+                              " bytes of response-body\n", cl);
+                        /* remove the remaining chunk of what we already
+                           read */
+                        cl -= (gotbytes - i);
+
+                        if(cl<=0)
+                          /* if the whole thing was already read, we are done!
+                           */
+                          keepon=FALSE;
+                      }
+                      else if(chunked_encoding) {
+                        CHUNKcode r;
+                        /* We set ignorebody true here since the chunked
+                           decoder function will acknowledge that. Pay
+                           attention so that this is cleared again when this
+                           function returns! */
+                        k->ignorebody = TRUE;
+                        infof(data, "%zd bytes of chunk left\n", gotbytes-i);
+
+                        if(line_start[1] == '\n') {
+                          /* this can only be a LF if the letter at index 0
+                             was a CR */
+                          line_start++;
+                          i++;
+                        }
+
+                        /* now parse the chunked piece of data so that we can
+                           properly tell when the stream ends */
+                        r = Curl_httpchunk_read(conn, line_start+1,
+                                                  gotbytes -i, &gotbytes);
+                        if(r == CHUNKE_STOP) {
+                          /* we're done reading chunks! */
+                          infof(data, "chunk reading DONE\n");
+                          keepon = FALSE;
+                          /* we did the full CONNECT treatment, go to
+                             COMPLETE */
+                          conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+                        }
+                        else
+                          infof(data, "Read %zd bytes of chunk, continue\n",
+                                gotbytes);
+                      }
+                      else {
+                        /* without content-length or chunked encoding, we
+                           can't keep the connection alive since the close is
+                           the end signal so we bail out at once instead */
+                        keepon=FALSE;
+                      }
+                    }
+                    else {
+                      keepon = FALSE;
+                      if(200 == data->info.httpproxycode) {
+                        if(gotbytes - (i+1))
+                          failf(data, "Proxy CONNECT followed by %zd bytes "
+                                "of opaque data. Data ignored (known bug #39)",
+                                gotbytes - (i+1));
+                      }
+                    }
+                    /* we did the full CONNECT treatment, go to COMPLETE */
+                    conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+                    break; /* breaks out of for-loop, not switch() */
+                  }
+
+                  /* keep a backup of the position we are about to blank */
+                  letter = line_start[perline];
+                  line_start[perline]=0; /* zero terminate the buffer */
+                  if((checkprefix("WWW-Authenticate:", line_start) &&
+                      (401 == k->httpcode)) ||
+                     (checkprefix("Proxy-authenticate:", line_start) &&
+                      (407 == k->httpcode))) {
+                    result = Curl_http_input_auth(conn, k->httpcode,
+                                                  line_start);
+                    if(result)
+                      return result;
+                  }
+                  else if(checkprefix("Content-Length:", line_start)) {
+                    cl = curlx_strtoofft(line_start +
+                                         strlen("Content-Length:"), NULL, 10);
+                  }
+                  else if(Curl_compareheader(line_start,
+                                             "Connection:", "close"))
+                    closeConnection = TRUE;
+                  else if(Curl_compareheader(line_start,
+                                             "Transfer-Encoding:",
+                                             "chunked")) {
+                    infof(data, "CONNECT responded chunked\n");
+                    chunked_encoding = TRUE;
+                    /* init our chunky engine */
+                    Curl_httpchunk_init(conn);
+                  }
+                  else if(Curl_compareheader(line_start,
+                                             "Proxy-Connection:", "close"))
+                    closeConnection = TRUE;
+                  else if(2 == sscanf(line_start, "HTTP/1.%d %d",
+                                      &subversion,
+                                      &k->httpcode)) {
+                    /* store the HTTP code from the proxy */
+                    data->info.httpproxycode = k->httpcode;
+                  }
+                  /* put back the letter we blanked out before */
+                  line_start[perline]= letter;
+
+                  perline=0; /* line starts over here */
+                  line_start = ptr+1; /* this skips the zero byte we wrote */
+                }
+              }
+          }
+          break;
+        } /* switch */
+        if(Curl_pgrsUpdate(conn))
+          return CURLE_ABORTED_BY_CALLBACK;
+      } /* while there's buffer left and loop is requested */
+
+      if(error)
+        return CURLE_RECV_ERROR;
+
+      if(data->info.httpproxycode != 200) {
+        /* Deal with the possibly already received authenticate
+           headers. 'newurl' is set to a new URL if we must loop. */
+        result = Curl_http_auth_act(conn);
+        if(result)
+          return result;
+
+        if(conn->bits.close)
+          /* the connection has been marked for closure, most likely in the
+             Curl_http_auth_act() function and thus we can kill it at once
+             below
+          */
+          closeConnection = TRUE;
+      }
+
+      if(closeConnection && data->req.newurl) {
+        /* Connection closed by server. Don't use it anymore */
+        Curl_closesocket(conn, conn->sock[sockindex]);
+        conn->sock[sockindex] = CURL_SOCKET_BAD;
+        break;
+      }
+    } /* END NEGOTIATION PHASE */
+
+    /* If we are supposed to continue and request a new URL, which basically
+     * means the HTTP authentication is still going on so if the tunnel
+     * is complete we start over in INIT state */
+    if(data->req.newurl &&
+       (TUNNEL_COMPLETE == conn->tunnel_state[sockindex])) {
+      conn->tunnel_state[sockindex] = TUNNEL_INIT;
+      infof(data, "TUNNEL_STATE switched to: %d\n",
+            conn->tunnel_state[sockindex]);
+    }
+
+  } while(data->req.newurl);
+
+  if(200 != data->req.httpcode) {
+    failf(data, "Received HTTP code %d from proxy after CONNECT",
+          data->req.httpcode);
+
+    if(closeConnection && data->req.newurl)
+      conn->bits.proxy_connect_closed = TRUE;
+
+    if(data->req.newurl) {
+      /* this won't be used anymore for the CONNECT so free it now */
+      free(data->req.newurl);
+      data->req.newurl = NULL;
+    }
+
+    /* to back to init state */
+    conn->tunnel_state[sockindex] = TUNNEL_INIT;
+
+    return CURLE_RECV_ERROR;
+  }
+
+  conn->tunnel_state[sockindex] = TUNNEL_COMPLETE;
+
+  /* If a proxy-authorization header was used for the proxy, then we should
+     make sure that it isn't accidentally used for the document request
+     after we've connected. So let's free and clear it here. */
+  Curl_safefree(conn->allocptr.proxyuserpwd);
+  conn->allocptr.proxyuserpwd = NULL;
+
+  data->state.authproxy.done = TRUE;
+
+  infof (data, "Proxy replied OK to CONNECT request\n");
+  data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
+  conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the
+                                         document request  */
+  return CURLE_OK;
+}
+#endif /* CURL_DISABLE_PROXY */
diff --git a/lib/http_proxy.h b/lib/http_proxy.h
new file mode 100644 (file)
index 0000000..518c093
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef HEADER_CURL_HTTP_PROXY_H
+#define HEADER_CURL_HTTP_PROXY_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
+/* ftp can use this as well */
+CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+                           int tunnelsocket,
+                           const char *hostname, unsigned short remote_port);
+
+/* Default proxy timeout in milliseconds */
+#define PROXY_TIMEOUT (3600*1000)
+
+CURLcode Curl_proxy_connect(struct connectdata *conn);
+
+#else
+#define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN
+#define Curl_proxy_connect(x) CURLE_OK
+#endif
+
+#endif /* HEADER_CURL_HTTP_PROXY_H */
diff --git a/lib/idn_win32.c b/lib/idn_win32.c
new file mode 100644 (file)
index 0000000..464964b
--- /dev/null
@@ -0,0 +1,85 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+ /*
+  * IDN conversions using Windows kernel32 and normaliz libraries.
+  */
+
+#include "curl_setup.h"
+
+#ifdef USE_WIN32_IDN
+
+#include "curl_multibyte.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#ifdef WANT_IDN_PROTOTYPES
+WINBASEAPI int WINAPI IdnToAscii(DWORD, const WCHAR *, int, WCHAR *, int);
+WINBASEAPI int WINAPI IdnToUnicode(DWORD, const WCHAR *, int, WCHAR *, int);
+#endif
+
+#define IDN_MAX_LENGTH 255
+
+int curl_win32_idn_to_ascii(const char *in, char **out);
+int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8);
+
+int curl_win32_idn_to_ascii(const char *in, char **out)
+{
+  wchar_t *in_w = Curl_convert_UTF8_to_wchar(in);
+  if(in_w) {
+    wchar_t punycode[IDN_MAX_LENGTH];
+    if(IdnToAscii(0, in_w, -1, punycode, IDN_MAX_LENGTH) == 0) {
+      wprintf(L"ERROR %d converting to Punycode\n", GetLastError());
+      free(in_w);
+      return 0;
+    }
+    free(in_w);
+
+    *out = Curl_convert_wchar_to_UTF8(punycode);
+    if(!*out)
+      return 0;
+  }
+  return 1;
+}
+
+int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8)
+{
+  (void)in_len; /* unused */
+  if(in) {
+    WCHAR unicode[IDN_MAX_LENGTH];
+
+    if(IdnToUnicode(0, (wchar_t *)in, -1, unicode, IDN_MAX_LENGTH) == 0) {
+      wprintf(L"ERROR %d converting to Punycode\n", GetLastError());
+      return 0;
+    }
+    else {
+      *out_utf8 = Curl_convert_wchar_to_UTF8(unicode);
+      if(!*out_utf8)
+        return 0;
+    }
+  }
+  return 1;
+}
+
+#endif /* USE_WIN32_IDN */
index 19504d1..05ae7d6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
 
 #if defined(HAVE_GETIFADDRS)
 
-char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
+bool Curl_if_is_interface_name(const char *interf)
 {
+  bool result = FALSE;
+
   struct ifaddrs *iface, *head;
-  char *ip=NULL;
-
-  if (getifaddrs(&head) >= 0) {
-    for (iface=head; iface != NULL; iface=iface->ifa_next) {
-      if ((iface->ifa_addr != NULL) &&
-          (iface->ifa_addr->sa_family == af) &&
-          curl_strequal(iface->ifa_name, interface)) {
-        void *addr;
-        char scope[12]="";
+
+  if(getifaddrs(&head) >= 0) {
+    for(iface=head; iface != NULL; iface=iface->ifa_next) {
+      if(curl_strequal(iface->ifa_name, interf)) {
+        result = TRUE;
+        break;
+      }
+    }
+    freeifaddrs(head);
+  }
+  return result;
+}
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+                          const char *interf, char *buf, int buf_size)
+{
+  struct ifaddrs *iface, *head;
+  if2ip_result_t res = IF2IP_NOT_FOUND;
+
+#ifndef ENABLE_IPV6
+  (void) remote_scope;
+#endif
+
+  if(getifaddrs(&head) >= 0) {
+    for(iface=head; iface != NULL; iface=iface->ifa_next) {
+      if(iface->ifa_addr != NULL) {
+        if(iface->ifa_addr->sa_family == af) {
+          if(curl_strequal(iface->ifa_name, interf)) {
+            void *addr;
+            char *ip;
+            char scope[12]="";
+            char ipstr[64];
 #ifdef ENABLE_IPV6
-        if (af == AF_INET6) {
-          unsigned int scopeid = 0;
-          addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr;
+            if(af == AF_INET6) {
+              unsigned int scopeid = 0;
+              addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr;
 #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-          /* Include the scope of this interface as part of the address */
-          scopeid = ((struct sockaddr_in6 *)iface->ifa_addr)->sin6_scope_id;
+              /* Include the scope of this interface as part of the address */
+              scopeid =
+                ((struct sockaddr_in6 *)iface->ifa_addr)->sin6_scope_id;
 #endif
-          if (scopeid)
-            snprintf(scope, sizeof(scope), "%%%u", scopeid);
-        }
-        else
+              if(scopeid != remote_scope) {
+                /* We are interested only in interface addresses whose
+                   scope ID matches the remote address we want to
+                   connect to: global (0) for global, link-local for
+                   link-local, etc... */
+                if(res == IF2IP_NOT_FOUND) res = IF2IP_AF_NOT_SUPPORTED;
+                continue;
+              }
+              if(scopeid)
+                snprintf(scope, sizeof(scope), "%%%u", scopeid);
+            }
+            else
 #endif
-          addr = &((struct sockaddr_in *)iface->ifa_addr)->sin_addr;
-        ip = (char *) Curl_inet_ntop(af, addr, buf, buf_size);
-        strlcat(buf, scope, buf_size);
-        break;
+              addr = &((struct sockaddr_in *)iface->ifa_addr)->sin_addr;
+            res = IF2IP_FOUND;
+            ip = (char *) Curl_inet_ntop(af, addr, ipstr, sizeof(ipstr));
+            snprintf(buf, buf_size, "%s%s", ip, scope);
+            break;
+          }
+        }
+        else if((res == IF2IP_NOT_FOUND) &&
+                curl_strequal(iface->ifa_name, interf)) {
+          res = IF2IP_AF_NOT_SUPPORTED;
+        }
       }
     }
     freeifaddrs(head);
   }
-  return ip;
+  return res;
 }
 
 #elif defined(HAVE_IOCTL_SIOCGIFADDR)
 
-char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
+bool Curl_if_is_interface_name(const char *interf)
+{
+  /* This is here just to support the old interfaces */
+  char buf[256];
+
+  return (Curl_if2ip(AF_INET, 0, interf, buf, sizeof(buf)) ==
+          IF2IP_NOT_FOUND) ? FALSE : TRUE;
+}
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+                          const char *interf, char *buf, int buf_size)
 {
   struct ifreq req;
   struct in_addr in;
   struct sockaddr_in *s;
   curl_socket_t dummy;
   size_t len;
-  char *ip;
 
-  if(!interface || (af != AF_INET))
-    return NULL;
+  (void)remote_scope;
 
-  len = strlen(interface);
+  if(!interf || (af != AF_INET))
+    return IF2IP_NOT_FOUND;
+
+  len = strlen(interf);
   if(len >= sizeof(req.ifr_name))
-    return NULL;
+    return IF2IP_NOT_FOUND;
 
   dummy = socket(AF_INET, SOCK_STREAM, 0);
   if(CURL_SOCKET_BAD == dummy)
-    return NULL;
+    return IF2IP_NOT_FOUND;
 
   memset(&req, 0, sizeof(req));
-  memcpy(req.ifr_name, interface, len+1);
+  memcpy(req.ifr_name, interf, len+1);
   req.ifr_addr.sa_family = AF_INET;
 
   if(ioctl(dummy, SIOCGIFADDR, &req) < 0) {
     sclose(dummy);
-    return NULL;
+    /* With SIOCGIFADDR, we cannot tell the difference between an interface
+       that does not exist and an interface that has no address of the
+       correct family. Assume the interface does not exist */
+    return IF2IP_NOT_FOUND;
   }
 
   s = (struct sockaddr_in *)&req.ifr_addr;
   memcpy(&in, &s->sin_addr, sizeof(in));
-  ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
+  Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
 
   sclose(dummy);
-  return ip;
+  return IF2IP_FOUND;
 }
 
 #else
 
-char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size)
+bool Curl_if_is_interface_name(const char *interf)
+{
+  (void) interf;
+
+  return FALSE;
+}
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+                          const char *interf, char *buf, int buf_size)
 {
     (void) af;
+    (void) remote_scope;
     (void) interf;
     (void) buf;
     (void) buf_size;
-    return NULL;
+    return IF2IP_NOT_FOUND;
 }
 
 #endif
index cdf2638..ac58752 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __IF2IP_H
-#define __IF2IP_H
+#ifndef HEADER_CURL_IF2IP_H
+#define HEADER_CURL_IF2IP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
 
-extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size);
+bool Curl_if_is_interface_name(const char *interf);
+
+typedef enum {
+  IF2IP_NOT_FOUND = 0, /* Interface not found */
+  IF2IP_AF_NOT_SUPPORTED = 1, /* Int. exists but has no address for this af */
+  IF2IP_FOUND = 2 /* The address has been stored in "buf" */
+} if2ip_result_t;
+
+if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
+                          const char *interf, char *buf, int buf_size);
 
 #ifdef __INTERIX
-#include <sys/socket.h>
 
 /* Nedelcho Stanev's work-around for SFU 3.0 */
 struct ifreq {
@@ -60,6 +68,7 @@ struct ifreq {
 #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
 
 #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
-#endif /* interix */
 
-#endif
+#endif /* __INTERIX */
+
+#endif /* HEADER_CURL_IF2IP_H */
index 9c39625..13e9784 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  * KIND, either express or implied.
  *
+ * RFC2195 CRAM-MD5 authentication
+ * RFC2595 Using TLS with IMAP, POP3 and ACAP
+ * RFC2831 DIGEST-MD5 authentication
  * RFC3501 IMAPv4 protocol
+ * RFC4422 Simple Authentication and Security Layer (SASL)
+ * RFC4616 PLAIN authentication
+ * RFC4959 IMAP Extension for SASL Initial Client Response
  * RFC5092 IMAP URL Scheme
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_IMAP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -64,8 +58,6 @@
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
 #include "if2ip.h"
 #include "hostip.h"
 #include "progress.h"
@@ -84,7 +76,8 @@
 #include "multiif.h"
 #include "url.h"
 #include "rawstr.h"
-#include "strtoofft.h"
+#include "curl_sasl.h"
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode imap_parse_url_path(struct connectdata *conn);
 static CURLcode imap_regular_transfer(struct connectdata *conn, bool *done);
 static CURLcode imap_do(struct connectdata *conn, bool *done);
-static CURLcode imap_done(struct connectdata *conn,
-                          CURLcode, bool premature);
+static CURLcode imap_done(struct connectdata *conn, CURLcode status,
+                          bool premature);
 static CURLcode imap_connect(struct connectdata *conn, bool *done);
-static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode imap_disconnect(struct connectdata *conn, bool dead);
 static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done);
-static int imap_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
+static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
                         int numsocks);
-static CURLcode imap_doing(struct connectdata *conn,
-                           bool *dophase_done);
-static CURLcode imap_setup_connection(struct connectdata * conn);
+static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode imap_setup_connection(struct connectdata *conn);
+static char *imap_atom(const char *str);
+static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...);
+static CURLcode imap_parse_url_options(struct connectdata *conn);
+static CURLcode imap_parse_url_path(struct connectdata *conn);
+static CURLcode imap_parse_custom_request(struct connectdata *conn);
 
 /*
  * IMAP protocol handler.
@@ -124,13 +119,16 @@ const struct Curl_handler Curl_handler_imap = {
   imap_doing,                       /* doing */
   imap_getsock,                     /* proto_getsock */
   imap_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   imap_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_IMAP,                        /* defport */
-  PROT_IMAP                         /* protocol */
+  CURLPROTO_IMAP,                   /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD
+  | PROTOPT_NOURLQUERY              /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * IMAPS protocol handler.
@@ -147,10 +145,14 @@ const struct Curl_handler Curl_handler_imaps = {
   imap_doing,                       /* doing */
   imap_getsock,                     /* proto_getsock */
   imap_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   imap_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_IMAPS,                       /* defport */
-  PROT_IMAP | PROT_IMAPS | PROT_SSL  /* protocol */
+  CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD
+  | PROTOPT_NOURLQUERY              /* flags */
 };
 #endif
 
@@ -170,13 +172,15 @@ static const struct Curl_handler Curl_handler_imap_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_IMAP,                            /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * HTTP-proxyed IMAPS protocol handler.
@@ -193,464 +197,1510 @@ static const struct Curl_handler Curl_handler_imaps_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_IMAPS,                           /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 #endif
 #endif
 
+#ifdef USE_SSL
+static void imap_to_imaps(struct connectdata *conn)
+{
+  conn->handler = &Curl_handler_imaps;
+}
+#else
+#define imap_to_imaps(x) Curl_nop_stmt
+#endif
+
 /***********************************************************************
  *
- * imapsendf()
- *
- * Sends the formated string as an IMAP command to a server
+ * imap_matchresp()
  *
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
+ * Determines whether the untagged response is related to the specified
+ * command by checking if it is in format "* <command-name> ..." or
+ * "* <number> <command-name> ...".
  *
- * Designed to never block.
+ * The "* " marker is assumed to have already been checked by the caller.
  */
-static CURLcode imapsendf(struct connectdata *conn,
-                          const char *idstr, /* id to wait for at the
-                                                completion of this command */
-                          const char *fmt, ...)
+static bool imap_matchresp(const char *line, size_t len, const char *cmd)
 {
-  CURLcode res;
-  struct imap_conn *imapc = &conn->proto.imapc;
-  va_list ap;
-  va_start(ap, fmt);
+  const char *end = line + len;
+  size_t cmd_len = strlen(cmd);
 
-  imapc->idstr = idstr; /* this is the thing */
+  /* Skip the untagged response marker */
+  line += 2;
 
-  res = Curl_pp_vsendf(&imapc->pp, fmt, ap);
+  /* Do we have a number after the marker? */
+  if(line < end && ISDIGIT(*line)) {
+    /* Skip the number */
+    do
+      line++;
+    while(line < end && ISDIGIT(*line));
 
-  va_end(ap);
+    /* Do we have the space character? */
+    if(line == end || *line != ' ')
+      return FALSE;
+
+    line++;
+  }
+
+  /* Does the command name match and is it followed by a space character or at
+     the end of line? */
+  if(line + cmd_len <= end && Curl_raw_nequal(line, cmd, cmd_len) &&
+     (line[cmd_len] == ' ' || line + cmd_len == end))
+    return TRUE;
 
-  return res;
+  return FALSE;
 }
 
-static const char *getcmdid(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_endofresp()
+ *
+ * Checks whether the given string is a valid tagged, untagged or continuation
+ * response which can be processed by the response handler.
+ */
+static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
+                           int *resp)
 {
-  static const char * const ids[]= {
-    "A",
-    "B",
-    "C",
-    "D"
-  };
-
+  struct IMAP *imap = conn->data->state.proto.imap;
   struct imap_conn *imapc = &conn->proto.imapc;
+  const char *id = imapc->resptag;
+  size_t id_len = strlen(id);
 
-  /* get the next id, but wrap at end of table */
-  imapc->cmdid = (int)((imapc->cmdid+1) % (sizeof(ids)/sizeof(ids[0])));
+  /* Do we have a tagged command response? */
+  if(len >= id_len + 1 && !memcmp(id, line, id_len) && line[id_len] == ' ') {
+    line += id_len + 1;
+    len -= id_len + 1;
+
+    if(len >= 2 && !memcmp(line, "OK", 2))
+      *resp = 'O';
+    else if(len >= 2 && !memcmp(line, "NO", 2))
+      *resp = 'N';
+    else if(len >= 3 && !memcmp(line, "BAD", 3))
+      *resp = 'B';
+    else {
+      failf(conn->data, "Bad tagged response");
+      *resp = -1;
+    }
 
-  return ids[imapc->cmdid];
-}
+    return TRUE;
+  }
 
-/* For the IMAP "protocol connect" and "doing" phases only */
-static int imap_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
-                        int numsocks)
-{
-  return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
-}
+  /* Do we have an untagged command response? */
+  if(len >= 2 && !memcmp("* ", line, 2)) {
+    switch(imapc->state) {
+      /* States which are interested in untagged responses */
+      case IMAP_CAPABILITY:
+        if(!imap_matchresp(line, len, "CAPABILITY"))
+          return FALSE;
+        break;
+
+      case IMAP_LIST:
+        if((!imap->custom && !imap_matchresp(line, len, "LIST")) ||
+          (imap->custom && !imap_matchresp(line, len, imap->custom) &&
+           (strcmp(imap->custom, "STORE") ||
+            !imap_matchresp(line, len, "FETCH")) &&
+           strcmp(imap->custom, "SELECT") &&
+           strcmp(imap->custom, "EXAMINE")))
+          return FALSE;
+        break;
+
+      case IMAP_SELECT:
+        /* SELECT is special in that its untagged responses do not have a
+           common prefix so accept anything! */
+        break;
+
+      case IMAP_FETCH:
+        if(!imap_matchresp(line, len, "FETCH"))
+          return FALSE;
+        break;
+
+      /* Ignore other untagged responses */
+      default:
+        return FALSE;
+    }
 
-/* fucntion that checks for an imap status code at the start of the
-   given string */
-static int imap_endofresp(struct pingpong *pp, int *resp)
-{
-  char *line = pp->linestart_resp;
-  size_t len = pp->nread_resp;
-  struct imap_conn *imapc = &pp->conn->proto.imapc;
-  const char *id = imapc->idstr;
-  size_t id_len = strlen(id);
+    *resp = '*';
+    return TRUE;
+  }
 
-  if(len >= id_len + 3) {
-    if(!memcmp(id, line, id_len) && (line[id_len] == ' ') ) {
-      /* end of response */
-      *resp = line[id_len+1]; /* O, N or B */
-      return TRUE;
-    }
-    else if((imapc->state == IMAP_FETCH) &&
-            !memcmp("* ", line, 2) ) {
-      /* FETCH response we're interested in */
-      *resp = '*';
-      return TRUE;
+  /* Do we have a continuation response? */
+  if((len == 3 && !memcmp("+", line, 1)) ||
+     (len >= 2 && !memcmp("+ ", line, 2))) {
+    switch(imapc->state) {
+      /* States which are interested in continuation responses */
+      case IMAP_AUTHENTICATE_PLAIN:
+      case IMAP_AUTHENTICATE_LOGIN:
+      case IMAP_AUTHENTICATE_LOGIN_PASSWD:
+      case IMAP_AUTHENTICATE_CRAMMD5:
+      case IMAP_AUTHENTICATE_DIGESTMD5:
+      case IMAP_AUTHENTICATE_DIGESTMD5_RESP:
+      case IMAP_AUTHENTICATE_NTLM:
+      case IMAP_AUTHENTICATE_NTLM_TYPE2MSG:
+      case IMAP_AUTHENTICATE_FINAL:
+      case IMAP_APPEND:
+        *resp = '+';
+        break;
+
+      default:
+        failf(conn->data, "Unexpected continuation response");
+        *resp = -1;
+        break;
     }
+
+    return TRUE;
   }
-  return FALSE; /* nothing for us */
+
+  return FALSE; /* Nothing for us */
 }
 
-/* This is the ONLY way to change IMAP state! */
-static void state(struct connectdata *conn,
-                  imapstate newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change IMAP state!
+ */
+static void state(struct connectdata *conn, imapstate newstate)
 {
+  struct imap_conn *imapc = &conn->proto.imapc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
   static const char * const names[]={
     "STOP",
     "SERVERGREET",
-    "LOGIN",
+    "CAPABILITY",
     "STARTTLS",
+    "UPGRADETLS",
+    "AUTHENTICATE_PLAIN",
+    "AUTHENTICATE_LOGIN",
+    "AUTHENTICATE_LOGIN_PASSWD",
+    "AUTHENTICATE_CRAMMD5",
+    "AUTHENTICATE_DIGESTMD5",
+    "AUTHENTICATE_DIGESTMD5_RESP",
+    "AUTHENTICATE_NTLM",
+    "AUTHENTICATE_NTLM_TYPE2MSG",
+    "AUTHENTICATE_FINAL",
+    "LOGIN",
+    "LIST",
     "SELECT",
     "FETCH",
+    "FETCH_FINAL",
+    "APPEND",
+    "APPEND_FINAL",
     "LOGOUT",
     /* LAST */
   };
-#endif
-  struct imap_conn *imapc = &conn->proto.imapc;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+
   if(imapc->state != newstate)
     infof(conn->data, "IMAP %p state change from %s to %s\n",
-          imapc, names[imapc->state], names[newstate]);
+          (void *)imapc, names[imapc->state], names[newstate]);
 #endif
+
   imapc->state = newstate;
 }
 
-static CURLcode imap_state_login(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_perform_capability()
+ *
+ * Sends the CAPABILITY command in order to obtain a list of server side
+ * supported capabilities.
+ */
+static CURLcode imap_perform_capability(struct connectdata *conn)
 {
-  CURLcode result;
-  struct FTP *imap = conn->data->state.proto.imap;
-  const char *str;
+  CURLcode result = CURLE_OK;
+  struct imap_conn *imapc = &conn->proto.imapc;
 
-  str = getcmdid(conn);
+  imapc->authmechs = 0;         /* No known authentication mechanisms yet */
+  imapc->authused = 0;          /* Clear the authentication mechanism used */
+  imapc->tls_supported = FALSE; /* Clear the TLS capability */
 
-  /* send USER and password */
-  result = imapsendf(conn, str, "%s LOGIN %s %s", str,
-                     imap->user?imap->user:"",
-                     imap->passwd?imap->passwd:"");
-  if(result)
-    return result;
+  /* Send the CAPABILITY command */
+  result = imap_sendf(conn, "CAPABILITY");
 
-  state(conn, IMAP_LOGIN);
+  if(!result)
+    state(conn, IMAP_CAPABILITY);
 
-  return CURLE_OK;
+  return result;
 }
 
-/* for STARTTLS responses */
-static CURLcode imap_state_starttls_resp(struct connectdata *conn,
-                                         int imapcode,
-                                         imapstate instate)
+/***********************************************************************
+ *
+ * imap_perform_starttls()
+ *
+ * Sends the STARTTLS command to start the upgrade to TLS.
+ */
+static CURLcode imap_perform_starttls(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct SessionHandle *data = conn->data;
-  (void)instate; /* no use for this yet */
 
-  if(imapcode != 'O') {
-    failf(data, "STARTTLS denied. %c", imapcode);
-    result = CURLE_LOGIN_DENIED;
-  }
-  else {
-    /* Curl_ssl_connect is BLOCKING */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(CURLE_OK == result) {
-      conn->protocol |= PROT_IMAPS;
-      result = imap_state_login(conn);
-    }
-  }
-  state(conn, IMAP_STOP);
+  /* Send the STARTTLS command */
+  result = imap_sendf(conn, "STARTTLS");
+
+  if(!result)
+    state(conn, IMAP_STARTTLS);
+
   return result;
 }
 
-/* for LOGIN responses */
-static CURLcode imap_state_login_resp(struct connectdata *conn,
-                                      int imapcode,
-                                      imapstate instate)
+/***********************************************************************
+ *
+ * imap_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode imap_perform_upgrade_tls(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct SessionHandle *data = conn->data;
-  (void)instate; /* no use for this yet */
+  struct imap_conn *imapc = &conn->proto.imapc;
 
-  if(imapcode != 'O') {
-    failf(data, "Access denied. %c", imapcode);
-    result = CURLE_LOGIN_DENIED;
+  /* Start the SSL connection */
+  result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
+
+  if(!result) {
+    if(imapc->state != IMAP_UPGRADETLS)
+      state(conn, IMAP_UPGRADETLS);
+
+    if(imapc->ssldone) {
+      imap_to_imaps(conn);
+      result = imap_perform_capability(conn);
+    }
   }
 
-  state(conn, IMAP_STOP);
   return result;
 }
 
-/* for the (first line of) FETCH BODY[TEXT] response */
-static CURLcode imap_state_fetch_resp(struct connectdata *conn,
-                                      int imapcode,
-                                      imapstate instate)
+/***********************************************************************
+ *
+ * imap_perform_login()
+ *
+ * Sends a clear text LOGIN command to authenticate with.
+ */
+static CURLcode imap_perform_login(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct SessionHandle *data = conn->data;
-  struct imap_conn *imapc = &conn->proto.imapc;
-  struct FTP *imap = data->state.proto.imap;
-  struct pingpong *pp = &imapc->pp;
-  const char *ptr = data->state.buffer;
-  (void)instate; /* no use for this yet */
+  char *user;
+  char *passwd;
 
-  if('*' != imapcode) {
-    Curl_pgrsSetDownloadSize(data, 0);
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
     state(conn, IMAP_STOP);
-    return CURLE_OK;
+
+    return result;
   }
 
-  /* Something like this comes "* 1 FETCH (BODY[TEXT] {2021}\r" */
-  while(*ptr && (*ptr != '{'))
-    ptr++;
+  /* Make sure the username and password are in the correct atom format */
+  user = imap_atom(conn->user);
+  passwd = imap_atom(conn->passwd);
 
-  if(*ptr == '{') {
-    curl_off_t filesize = curlx_strtoofft(ptr+1, NULL, 10);
-    if(filesize)
-      Curl_pgrsSetDownloadSize(data, filesize);
+  /* Send the LOGIN command */
+  result = imap_sendf(conn, "LOGIN %s %s", user ? user : "",
+                      passwd ? passwd : "");
 
-    infof(data, "Found %" FORMAT_OFF_TU " bytes to download\n", filesize);
+  Curl_safefree(user);
+  Curl_safefree(passwd);
 
-    if(pp->cache) {
-      /* At this point there is a bunch of data in the header "cache" that is
-         actually body content, send it as body and then skip it. Do note
-         that there may even be additional "headers" after the body. */
-      size_t chunk = pp->cache_size;
+  if(!result)
+    state(conn, IMAP_LOGIN);
+
+  return result;
+}
 
-      if(chunk > (size_t)filesize)
-        /* the conversion from curl_off_t to size_t is always fine here */
-        chunk = (size_t)filesize;
+/***********************************************************************
+ *
+ * imap_perform_authenticate()
+ *
+ * Sends an AUTHENTICATE command allowing the client to login with the
+ * appropriate SASL authentication mechanism.
+ *
+ * Additionally, the function will perform fallback to the LOGIN command
+ * should a common mechanism not be available between the client and server.
+ */
+static CURLcode imap_perform_authenticate(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  const char *mech = NULL;
+  char *initresp = NULL;
+  size_t len = 0;
+  imapstate state1 = IMAP_STOP;
+  imapstate state2 = IMAP_STOP;
+
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
+    state(conn, IMAP_STOP);
 
-      result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
-      if(result)
-        return result;
+    return result;
+  }
+
+  /* Calculate the supported authentication mechanism by decreasing order of
+     security */
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+  if((imapc->authmechs & SASL_MECH_DIGEST_MD5) &&
+     (imapc->prefmech & SASL_MECH_DIGEST_MD5)) {
+    mech = "DIGEST-MD5";
+    state1 = IMAP_AUTHENTICATE_DIGESTMD5;
+    imapc->authused = SASL_MECH_DIGEST_MD5;
+  }
+  else if((imapc->authmechs & SASL_MECH_CRAM_MD5) &&
+          (imapc->prefmech & SASL_MECH_CRAM_MD5)) {
+    mech = "CRAM-MD5";
+    state1 = IMAP_AUTHENTICATE_CRAMMD5;
+    imapc->authused = SASL_MECH_CRAM_MD5;
+  }
+  else
+#endif
+#ifdef USE_NTLM
+    if((imapc->authmechs & SASL_MECH_NTLM) &&
+       (imapc->prefmech & SASL_MECH_NTLM)) {
+    mech = "NTLM";
+    state1 = IMAP_AUTHENTICATE_NTLM;
+    state2 = IMAP_AUTHENTICATE_NTLM_TYPE2MSG;
+    imapc->authused = SASL_MECH_NTLM;
+
+    if(imapc->ir_supported || data->set.sasl_ir)
+      result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                   &conn->ntlm,
+                                                   &initresp, &len);
+  }
+  else
+#endif
+  if((imapc->authmechs & SASL_MECH_LOGIN) &&
+     (imapc->prefmech & SASL_MECH_LOGIN)) {
+    mech = "LOGIN";
+    state1 = IMAP_AUTHENTICATE_LOGIN;
+    state2 = IMAP_AUTHENTICATE_LOGIN_PASSWD;
+    imapc->authused = SASL_MECH_LOGIN;
+
+    if(imapc->ir_supported || data->set.sasl_ir)
+      result = Curl_sasl_create_login_message(conn->data, conn->user,
+                                              &initresp, &len);
+  }
+  else if((imapc->authmechs & SASL_MECH_PLAIN) &&
+          (imapc->prefmech & SASL_MECH_PLAIN)) {
+    mech = "PLAIN";
+    state1 = IMAP_AUTHENTICATE_PLAIN;
+    state2 = IMAP_AUTHENTICATE_FINAL;
+    imapc->authused = SASL_MECH_PLAIN;
+
+    if(imapc->ir_supported || data->set.sasl_ir)
+      result = Curl_sasl_create_plain_message(conn->data, conn->user,
+                                              conn->passwd, &initresp, &len);
+  }
 
-      filesize -= chunk;
+  if(!result) {
+    if(mech) {
+      /* Perform SASL based authentication */
+      if(initresp) {
+        result = imap_sendf(conn, "AUTHENTICATE %s %s", mech, initresp);
 
-      /* we've now used parts of or the entire cache */
-      if(pp->cache_size > chunk) {
-        /* part of, move the trailing data to the start and reduce the size */
-        memmove(pp->cache, pp->cache+chunk,
-                pp->cache_size - chunk);
-        pp->cache_size -= chunk;
+        if(!result)
+          state(conn, state2);
       }
       else {
-        /* cache is drained */
-        free(pp->cache);
-        pp->cache = NULL;
-        pp->cache_size = 0;
-      }
-    }
+        result = imap_sendf(conn, "AUTHENTICATE %s", mech);
 
-    infof(data, "Filesize left: %" FORMAT_OFF_T "\n", filesize);
-
-    if(!filesize)
-      /* the entire data is already transfered! */
-      Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
-    else
-      /* IMAP download */
-      Curl_setup_transfer(conn, FIRSTSOCKET, filesize, FALSE,
-                          imap->bytecountp, -1, NULL); /* no upload here */
+        if(!result)
+          state(conn, state1);
+      }
 
-    data->req.maxdownload = filesize;
+      Curl_safefree(initresp);
+    }
+    else if(!imapc->login_disabled)
+      /* Perform clear text authentication */
+      result = imap_perform_login(conn);
+    else {
+      /* Other mechanisms not supported */
+      infof(conn->data, "No known authentication mechanisms supported!\n");
+      result = CURLE_LOGIN_DENIED;
+    }
   }
-  else
-    /* We don't know how to parse this line */
-    result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: fix this code */
 
-  state(conn, IMAP_STOP);
   return result;
 }
 
-/* start the DO phase */
-static CURLcode imap_select(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_perform_list()
+ *
+ * Sends a LIST command or an alternative custom request.
+ */
+static CURLcode imap_perform_list(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct imap_conn *imapc = &conn->proto.imapc;
-  const char *str;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = data->state.proto.imap;
+  char *mailbox;
+
+  if(imap->custom)
+    /* Send the custom request */
+    result = imap_sendf(conn, "%s%s", imap->custom,
+                        imap->custom_params ? imap->custom_params : "");
+  else {
+    /* Make sure the mailbox is in the correct atom format */
+    mailbox = imap_atom(imap->mailbox ? imap->mailbox : "");
+    if(!mailbox)
+      return CURLE_OUT_OF_MEMORY;
 
-  str = getcmdid(conn);
+    /* Send the LIST command */
+    result = imap_sendf(conn, "LIST \"%s\" *", mailbox);
 
-  result = imapsendf(conn, str, "%s SELECT %s", str,
-                     imapc->mailbox?imapc->mailbox:"");
-  if(result)
-    return result;
+    Curl_safefree(mailbox);
+  }
+
+  if(!result)
+    state(conn, IMAP_LIST);
 
-  state(conn, IMAP_SELECT);
   return result;
 }
 
-static CURLcode imap_fetch(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_perform_select()
+ *
+ * Sends a SELECT command to ask the server to change the selected mailbox.
+ */
+static CURLcode imap_perform_select(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  const char *str;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = data->state.proto.imap;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  char *mailbox;
+
+  /* Invalidate old information as we are switching mailboxes */
+  Curl_safefree(imapc->mailbox);
+  Curl_safefree(imapc->mailbox_uidvalidity);
 
-  str = getcmdid(conn);
+  /* Check we have a mailbox */
+  if(!imap->mailbox) {
+    failf(conn->data, "Cannot SELECT without a mailbox.");
+    return CURLE_URL_MALFORMAT;
+  }
 
-  /* TODO: make this select the correct mail
-   * Use "1 body[text]" to get the full mail body of mail 1
-   */
-  result = imapsendf(conn, str, "%s FETCH 1 BODY[TEXT]", str);
-  if(result)
-    return result;
+  /* Make sure the mailbox is in the correct atom format */
+  mailbox = imap_atom(imap->mailbox);
+  if(!mailbox)
+    return CURLE_OUT_OF_MEMORY;
+
+  /* Send the SELECT command */
+  result = imap_sendf(conn, "SELECT %s", mailbox);
 
-  /*
-   * When issued, the server will respond with a single line similar to
-   * '* 1 FETCH (BODY[TEXT] {2021}'
-   *
-   * Identifying the fetch and how many bytes of contents we can expect. We
-   * must extract that number before continuing to "download as usual".
-   */
+  Curl_safefree(mailbox);
+
+  if(!result)
+    state(conn, IMAP_SELECT);
 
-  state(conn, IMAP_FETCH);
   return result;
 }
 
-/* for SELECT responses */
-static CURLcode imap_state_select_resp(struct connectdata *conn,
-                                       int imapcode,
-                                       imapstate instate)
+/***********************************************************************
+ *
+ * imap_perform_fetch()
+ *
+ * Sends a FETCH command to initiate the download of a message.
+ */
+static CURLcode imap_perform_fetch(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
-  struct SessionHandle *data = conn->data;
-  (void)instate; /* no use for this yet */
+  struct IMAP *imap = conn->data->state.proto.imap;
 
-  if(imapcode != 'O') {
-    failf(data, "Select failed");
-    result = CURLE_LOGIN_DENIED;
+  /* Check we have a UID */
+  if(!imap->uid) {
+    failf(conn->data, "Cannot FETCH without a UID.");
+    return CURLE_URL_MALFORMAT;
   }
-  else
-    result = imap_fetch(conn);
+
+  /* Send the FETCH command */
+  result = imap_sendf(conn, "FETCH %s BODY[%s]",
+                      imap->uid,
+                      imap->section ? imap->section : "");
+
+  if(!result)
+    state(conn, IMAP_FETCH);
+
   return result;
 }
 
-static CURLcode imap_statemach_act(struct connectdata *conn)
+/***********************************************************************
+ *
+ * imap_perform_append()
+ *
+ * Sends an APPEND command to initiate the upload of a message.
+ */
+static CURLcode imap_perform_append(struct connectdata *conn)
 {
-  CURLcode result;
-  curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct SessionHandle *data=conn->data;
-  int imapcode;
-  struct imap_conn *imapc = &conn->proto.imapc;
-  struct pingpong *pp = &imapc->pp;
-  size_t nread = 0;
+  CURLcode result = CURLE_OK;
+  struct IMAP *imap = conn->data->state.proto.imap;
+  char *mailbox;
 
-  if(pp->sendleft)
-    return Curl_pp_flushsend(pp);
+  /* Check we have a mailbox */
+  if(!imap->mailbox) {
+    failf(conn->data, "Cannot APPEND without a mailbox.");
+    return CURLE_URL_MALFORMAT;
+  }
 
-  /* we read a piece of response */
-  result = Curl_pp_readresp(sock, pp, &imapcode, &nread);
-  if(result)
-    return result;
+  /* Check we know the size of the upload */
+  if(conn->data->set.infilesize < 0) {
+    failf(conn->data, "Cannot APPEND with unknown input file size\n");
+    return CURLE_UPLOAD_FAILED;
+  }
 
-  if(imapcode)
-  /* we have now received a full IMAP server response */
-  switch(imapc->state) {
-  case IMAP_SERVERGREET:
-    if(imapcode != 'O') {
-      failf(data, "Got unexpected imap-server response");
-      return CURLE_FTP_WEIRD_SERVER_REPLY;
-    }
+  /* Make sure the mailbox is in the correct atom format */
+  mailbox = imap_atom(imap->mailbox);
+  if(!mailbox)
+    return CURLE_OUT_OF_MEMORY;
 
-    if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
-      /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
-         to TLS connection now */
-      const char *str;
+  /* Send the APPEND command */
+  result = imap_sendf(conn, "APPEND %s (\\Seen) {%" FORMAT_OFF_T "}",
+                      mailbox, conn->data->set.infilesize);
 
-      str = getcmdid(conn);
-      result = imapsendf(conn, str, "%s STARTTLS", str);
-      state(conn, IMAP_STARTTLS);
-    }
-    else
-      result = imap_state_login(conn);
-    if(result)
-      return result;
-    break;
+  Curl_safefree(mailbox);
 
-  case IMAP_LOGIN:
-    result = imap_state_login_resp(conn, imapcode, imapc->state);
-    break;
+  if(!result)
+    state(conn, IMAP_APPEND);
 
-  case IMAP_STARTTLS:
-    result = imap_state_starttls_resp(conn, imapcode, imapc->state);
-    break;
+  return result;
+}
 
-  case IMAP_FETCH:
-    result = imap_state_fetch_resp(conn, imapcode, imapc->state);
-    break;
+/***********************************************************************
+ *
+ * imap_perform_logout()
+ *
+ * Performs the logout action prior to sclose() being called.
+ */
+static CURLcode imap_perform_logout(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
 
-  case IMAP_SELECT:
-    result = imap_state_select_resp(conn, imapcode, imapc->state);
-    break;
+  /* Send the LOGOUT command */
+  result = imap_sendf(conn, "LOGOUT");
 
-  case IMAP_LOGOUT:
-    /* fallthrough, just stop! */
-  default:
-    /* internal error */
-    state(conn, IMAP_STOP);
-    break;
-  }
+  if(!result)
+    state(conn, IMAP_LOGOUT);
 
   return result;
 }
 
-/* called repeatedly until done from multi.c */
-static CURLcode imap_multi_statemach(struct connectdata *conn,
-                                         bool *done)
+/* For the initial server greeting */
+static CURLcode imap_state_servergreet_resp(struct connectdata *conn,
+                                            int imapcode,
+                                            imapstate instate)
 {
-  struct imap_conn *imapc = &conn->proto.imapc;
-  CURLcode result = Curl_pp_multi_statemach(&imapc->pp);
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
 
-  *done = (bool)(imapc->state == IMAP_STOP);
+  if(imapcode != 'O') {
+    failf(data, "Got unexpected imap-server response");
+    result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: fix this code */
+  }
+  else
+    result = imap_perform_capability(conn);
 
   return result;
 }
 
-static CURLcode imap_easy_statemach(struct connectdata *conn)
+/* For CAPABILITY responses */
+static CURLcode imap_state_capability_resp(struct connectdata *conn,
+                                           int imapcode,
+                                           imapstate instate)
 {
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  const char *line = data->state.buffer;
+  size_t wordlen;
+
+  (void)instate; /* no use for this yet */
+
+  /* Do we have a untagged response? */
+  if(imapcode == '*') {
+    line += 2;
+
+    /* Loop through the data line */
+    for(;;) {
+      while(*line &&
+            (*line == ' ' || *line == '\t' ||
+              *line == '\r' || *line == '\n')) {
+
+        line++;
+      }
+
+      if(!*line)
+        break;
+
+      /* Extract the word */
+      for(wordlen = 0; line[wordlen] && line[wordlen] != ' ' &&
+            line[wordlen] != '\t' && line[wordlen] != '\r' &&
+            line[wordlen] != '\n';)
+        wordlen++;
+
+      /* Does the server support the STARTTLS capability? */
+      if(wordlen == 8 && !memcmp(line, "STARTTLS", 8))
+        imapc->tls_supported = TRUE;
+
+      /* Has the server explicitly disabled clear text authentication? */
+      else if(wordlen == 13 && !memcmp(line, "LOGINDISABLED", 13))
+        imapc->login_disabled = TRUE;
+
+      /* Does the server support the SASL-IR capability? */
+      else if(wordlen == 7 && !memcmp(line, "SASL-IR", 7))
+        imapc->ir_supported = TRUE;
+
+      /* Do we have a SASL based authentication mechanism? */
+      else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) {
+        line += 5;
+        wordlen -= 5;
+
+        /* Test the word for a matching authentication mechanism */
+        if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
+          imapc->authmechs |= SASL_MECH_LOGIN;
+        if(wordlen == 5 && !memcmp(line, "PLAIN", 5))
+          imapc->authmechs |= SASL_MECH_PLAIN;
+        else if(wordlen == 8 && !memcmp(line, "CRAM-MD5", 8))
+          imapc->authmechs |= SASL_MECH_CRAM_MD5;
+        else if(wordlen == 10 && !memcmp(line, "DIGEST-MD5", 10))
+          imapc->authmechs |= SASL_MECH_DIGEST_MD5;
+        else if(wordlen == 6 && !memcmp(line, "GSSAPI", 6))
+          imapc->authmechs |= SASL_MECH_GSSAPI;
+        else if(wordlen == 8 && !memcmp(line, "EXTERNAL", 8))
+          imapc->authmechs |= SASL_MECH_EXTERNAL;
+        else if(wordlen == 4 && !memcmp(line, "NTLM", 4))
+          imapc->authmechs |= SASL_MECH_NTLM;
+      }
+
+      line += wordlen;
+    }
+  }
+  else if(imapcode == 'O') {
+    if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+      /* We don't have a SSL/TLS connection yet, but SSL is requested */
+      if(imapc->tls_supported)
+        /* Switch to TLS connection now */
+        result = imap_perform_starttls(conn);
+      else if(data->set.use_ssl == CURLUSESSL_TRY)
+        /* Fallback and carry on with authentication */
+        result = imap_perform_authenticate(conn);
+      else {
+        failf(data, "STARTTLS not supported.");
+        result = CURLE_USE_SSL_FAILED;
+      }
+    }
+    else
+      result = imap_perform_authenticate(conn);
+  }
+  else
+    result = imap_perform_login(conn);
+
+  return result;
+}
+
+/* For STARTTLS responses */
+static CURLcode imap_state_starttls_resp(struct connectdata *conn,
+                                         int imapcode,
+                                         imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != 'O') {
+    if(data->set.use_ssl != CURLUSESSL_TRY) {
+      failf(data, "STARTTLS denied. %c", imapcode);
+      result = CURLE_USE_SSL_FAILED;
+    }
+    else
+      result = imap_perform_authenticate(conn);
+  }
+  else
+    result = imap_perform_upgrade_tls(conn);
+
+  return result;
+}
+
+/* For AUTHENTICATE PLAIN (without initial response) responses */
+static CURLcode imap_state_auth_plain_resp(struct connectdata *conn,
+                                           int imapcode,
+                                           imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *plainauth = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied. %c", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the authorisation message */
+    result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd,
+                                            &plainauth, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(plainauth) {
+        result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", plainauth);
+
+        if(!result)
+          state(conn, IMAP_AUTHENTICATE_FINAL);
+      }
+
+      Curl_safefree(plainauth);
+    }
+  }
+
+  return result;
+}
+
+/* For AUTHENTICATE LOGIN (without initial response) responses */
+static CURLcode imap_state_auth_login_resp(struct connectdata *conn,
+                                           int imapcode,
+                                           imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *authuser = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the user message */
+    result = Curl_sasl_create_login_message(data, conn->user,
+                                            &authuser, &len);
+
+    /* Send the user */
+    if(!result) {
+      if(authuser) {
+        result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authuser);
+
+        if(!result)
+          state(conn, IMAP_AUTHENTICATE_LOGIN_PASSWD);
+      }
+
+      Curl_safefree(authuser);
+    }
+  }
+
+  return result;
+}
+
+/* For AUTHENTICATE LOGIN user entry responses */
+static CURLcode imap_state_auth_login_password_resp(struct connectdata *conn,
+                                                    int imapcode,
+                                                    imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *authpasswd = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the password message */
+    result = Curl_sasl_create_login_message(data, conn->passwd,
+                                            &authpasswd, &len);
+
+    /* Send the password */
+    if(!result) {
+      if(authpasswd) {
+        result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authpasswd);
+
+        if(!result)
+          state(conn, IMAP_AUTHENTICATE_FINAL);
+      }
+
+      Curl_safefree(authpasswd);
+    }
+  }
+
+  return result;
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* For AUTHENTICATE CRAM-MD5 responses */
+static CURLcode imap_state_auth_cram_resp(struct connectdata *conn,
+                                          int imapcode,
+                                          imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  /* Get the challenge */
+  for(chlg64 += 2; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+    ;
+
+  /* Terminate the challenge */
+  if(*chlg64 != '=') {
+    for(len = strlen(chlg64); len--;)
+      if(chlg64[len] != '\r' && chlg64[len] != '\n' && chlg64[len] != ' ' &&
+         chlg64[len] != '\t')
+        break;
+
+    if(++len) {
+      chlg64[len] = '\0';
+    }
+  }
+
+  /* Create the response message */
+  result = Curl_sasl_create_cram_md5_message(data, chlg64, conn->user,
+                                             conn->passwd, &rplyb64, &len);
+
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", rplyb64);
+
+      if(!result)
+        state(conn, IMAP_AUTHENTICATE_FINAL);
+    }
+
+    Curl_safefree(rplyb64);
+  }
+
+  return result;
+}
+
+/* For AUTHENTICATE DIGEST-MD5 challenge responses */
+static CURLcode imap_state_auth_digest_resp(struct connectdata *conn,
+                                            int imapcode,
+                                            imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  /* Get the challenge */
+  for(chlg64 += 2; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+    ;
+
+  /* Create the response message */
+  result = Curl_sasl_create_digest_md5_message(data, chlg64, conn->user,
+                                               conn->passwd, "imap",
+                                               &rplyb64, &len);
+
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", rplyb64);
+
+      if(!result)
+        state(conn, IMAP_AUTHENTICATE_DIGESTMD5_RESP);
+    }
+
+    Curl_safefree(rplyb64);
+  }
+
+  return result;
+}
+
+/* For AUTHENTICATE DIGEST-MD5 challenge-response responses */
+static CURLcode imap_state_auth_digest_resp_resp(struct connectdata *conn,
+                                                 int imapcode,
+                                                 imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Authentication failed: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Send an empty response */
+    result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
+
+    if(!result)
+      state(conn, IMAP_AUTHENTICATE_FINAL);
+  }
+
+  return result;
+}
+#endif
+
+#ifdef USE_NTLM
+/* For AUTHENTICATE NTLM (without initial response) responses */
+static CURLcode imap_state_auth_ntlm_resp(struct connectdata *conn,
+                                          int imapcode,
+                                          imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *type1msg = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the type-1 message */
+    result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type1msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type1msg) {
+        result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type1msg);
+
+        if(!result)
+          state(conn, IMAP_AUTHENTICATE_NTLM_TYPE2MSG);
+      }
+
+      Curl_safefree(type1msg);
+    }
+  }
+
+  return result;
+}
+
+/* For NTLM type-2 responses (sent in reponse to our type-1 message) */
+static CURLcode imap_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
+                                                   int imapcode,
+                                                   imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *type3msg = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '+') {
+    failf(data, "Access denied: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the type-3 message */
+    result = Curl_sasl_create_ntlm_type3_message(data,
+                                                 data->state.buffer + 2,
+                                                 conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type3msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type3msg) {
+        result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type3msg);
+
+        if(!result)
+          state(conn, IMAP_AUTHENTICATE_FINAL);
+      }
+
+      Curl_safefree(type3msg);
+    }
+  }
+
+  return result;
+}
+#endif
+
+/* For final responses to the AUTHENTICATE sequence */
+static CURLcode imap_state_auth_final_resp(struct connectdata *conn,
+                                           int imapcode,
+                                           imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != 'O') {
+    failf(data, "Authentication failed: %d", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else
+    /* End of connect phase */
+    state(conn, IMAP_STOP);
+
+  return result;
+}
+
+/* For LOGIN responses */
+static CURLcode imap_state_login_resp(struct connectdata *conn,
+                                      int imapcode,
+                                      imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != 'O') {
+    failf(data, "Access denied. %c", imapcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else
+    /* End of connect phase */
+    state(conn, IMAP_STOP);
+
+  return result;
+}
+
+/* For LIST responses */
+static CURLcode imap_state_list_resp(struct connectdata *conn, int imapcode,
+                                     imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  char *line = conn->data->state.buffer;
+  size_t len = strlen(line);
+
+  (void)instate; /* No use for this yet */
+
+  if(imapcode == '*') {
+    /* Temporarily add the LF character back and send as body to the client */
+    line[len] = '\n';
+    result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
+    line[len] = '\0';
+  }
+  else if(imapcode != 'O')
+    result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */
+  else
+    /* End of DO phase */
+    state(conn, IMAP_STOP);
+
+  return result;
+}
+
+/* For SELECT responses */
+static CURLcode imap_state_select_resp(struct connectdata *conn, int imapcode,
+                                       imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = conn->data->state.proto.imap;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  const char *line = data->state.buffer;
+  char tmp[20];
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode == '*') {
+    /* See if this is an UIDVALIDITY response */
+    if(sscanf(line + 2, "OK [UIDVALIDITY %19[0123456789]]", tmp) == 1) {
+      Curl_safefree(imapc->mailbox_uidvalidity);
+      imapc->mailbox_uidvalidity = strdup(tmp);
+    }
+  }
+  else if(imapcode == 'O') {
+    /* Check if the UIDVALIDITY has been specified and matches */
+    if(imap->uidvalidity && imapc->mailbox_uidvalidity &&
+       strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) {
+      failf(conn->data, "Mailbox UIDVALIDITY has changed");
+      result = CURLE_REMOTE_FILE_NOT_FOUND;
+    }
+    else {
+      /* Note the currently opened mailbox on this connection */
+      imapc->mailbox = strdup(imap->mailbox);
+
+      if(imap->custom)
+        result = imap_perform_list(conn);
+      else
+        result = imap_perform_fetch(conn);
+    }
+  }
+  else {
+    failf(data, "Select failed");
+    result = CURLE_LOGIN_DENIED;
+  }
+
+  return result;
+}
+
+/* For the (first line of the) FETCH responses */
+static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
+                                      imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  struct pingpong *pp = &imapc->pp;
+  const char *ptr = data->state.buffer;
+  bool parsed = FALSE;
+  curl_off_t size;
+
+  (void)instate; /* no use for this yet */
+
+  if(imapcode != '*') {
+    Curl_pgrsSetDownloadSize(data, 0);
+    state(conn, IMAP_STOP);
+    return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */
+  }
+
+  /* Something like this is received "* 1 FETCH (BODY[TEXT] {2021}\r" so parse
+     the continuation data contained within the curly brackets */
+  while(*ptr && (*ptr != '{'))
+    ptr++;
+
+  if(*ptr == '{') {
+    char *endptr;
+    size = curlx_strtoofft(ptr + 1, &endptr, 10);
+    if(endptr - ptr > 1 && endptr[0] == '}' &&
+       endptr[1] == '\r' && endptr[2] == '\0')
+      parsed = TRUE;
+  }
+
+  if(parsed) {
+    infof(data, "Found %" FORMAT_OFF_TU " bytes to download\n", size);
+    Curl_pgrsSetDownloadSize(data, size);
+
+    if(pp->cache) {
+      /* At this point there is a bunch of data in the header "cache" that is
+         actually body content, send it as body and then skip it. Do note
+         that there may even be additional "headers" after the body. */
+      size_t chunk = pp->cache_size;
+
+      if(chunk > (size_t)size)
+        /* The conversion from curl_off_t to size_t is always fine here */
+        chunk = (size_t)size;
+
+      result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
+      if(result)
+        return result;
+
+      data->req.bytecount += chunk;
+      size -= chunk;
+
+      infof(data, "Written %" FORMAT_OFF_TU " bytes, %" FORMAT_OFF_TU
+            " bytes are left for transfer\n", (curl_off_t)chunk, size);
+
+      /* Have we used the entire cache or just part of it?*/
+      if(pp->cache_size > chunk) {
+        /* Only part of it so shrink the cache to fit the trailing data */
+        memmove(pp->cache, pp->cache + chunk, pp->cache_size - chunk);
+        pp->cache_size -= chunk;
+      }
+      else {
+        /* Free the cache */
+        Curl_safefree(pp->cache);
+
+        /* Reset the cache size */
+        pp->cache_size = 0;
+      }
+    }
+
+    if(!size)
+      /* The entire data is already transferred! */
+      Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
+    else {
+      /* IMAP download */
+      data->req.maxdownload = size;
+      Curl_setup_transfer(conn, FIRSTSOCKET, size, FALSE, NULL, -1, NULL);
+    }
+  }
+  else {
+    /* We don't know how to parse this line */
+    failf(pp->conn->data, "Failed to parse FETCH response.");
+    result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: fix this code */
+  }
+
+  /* End of DO phase */
+  state(conn, IMAP_STOP);
+
+  return result;
+}
+
+/* For final FETCH responses performed after the download */
+static CURLcode imap_state_fetch_final_resp(struct connectdata *conn,
+                                            int imapcode,
+                                            imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+
+  (void)instate; /* No use for this yet */
+
+  if(imapcode != 'O')
+    result = CURLE_FTP_WEIRD_SERVER_REPLY; /* TODO: Fix error code */
+  else
+    /* End of DONE phase */
+    state(conn, IMAP_STOP);
+
+  return result;
+}
+
+/* For APPEND responses */
+static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode,
+                                       imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* No use for this yet */
+
+  if(imapcode != '+') {
+    result = CURLE_UPLOAD_FAILED;
+  }
+  else {
+    /* Set the progress upload size */
+    Curl_pgrsSetUploadSize(data, data->set.infilesize);
+
+    /* IMAP upload */
+    Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
+
+    /* End of DO phase */
+    state(conn, IMAP_STOP);
+  }
+
+  return result;
+}
+
+/* For final APPEND responses performed after the upload */
+static CURLcode imap_state_append_final_resp(struct connectdata *conn,
+                                             int imapcode,
+                                             imapstate instate)
+{
+  CURLcode result = CURLE_OK;
+
+  (void)instate; /* No use for this yet */
+
+  if(imapcode != 'O')
+    result = CURLE_UPLOAD_FAILED;
+  else
+    /* End of DONE phase */
+    state(conn, IMAP_STOP);
+
+  return result;
+}
+
+static CURLcode imap_statemach_act(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  curl_socket_t sock = conn->sock[FIRSTSOCKET];
+  int imapcode;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  struct pingpong *pp = &imapc->pp;
+  size_t nread = 0;
+
+  /* Busy upgrading the connection; right now all I/O is SSL/TLS, not IMAP */
+  if(imapc->state == IMAP_UPGRADETLS)
+    return imap_perform_upgrade_tls(conn);
+
+  /* Flush any data that needs to be sent */
+  if(pp->sendleft)
+    return Curl_pp_flushsend(pp);
+
+  do {
+    /* Read the response from the server */
+    result = Curl_pp_readresp(sock, pp, &imapcode, &nread);
+    if(result)
+      return result;
+
+    /* Was there an error parsing the response line? */
+    if(imapcode == -1)
+      return CURLE_FTP_WEIRD_SERVER_REPLY;
+
+    if(!imapcode)
+      break;
+
+    /* We have now received a full IMAP server response */
+    switch(imapc->state) {
+    case IMAP_SERVERGREET:
+      result = imap_state_servergreet_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_CAPABILITY:
+      result = imap_state_capability_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_STARTTLS:
+      result = imap_state_starttls_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_PLAIN:
+      result = imap_state_auth_plain_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_LOGIN:
+      result = imap_state_auth_login_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_LOGIN_PASSWD:
+      result = imap_state_auth_login_password_resp(conn, imapcode,
+                                                   imapc->state);
+      break;
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+    case IMAP_AUTHENTICATE_CRAMMD5:
+      result = imap_state_auth_cram_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_DIGESTMD5:
+      result = imap_state_auth_digest_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_DIGESTMD5_RESP:
+      result = imap_state_auth_digest_resp_resp(conn, imapcode, imapc->state);
+      break;
+#endif
+
+#ifdef USE_NTLM
+    case IMAP_AUTHENTICATE_NTLM:
+      result = imap_state_auth_ntlm_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_AUTHENTICATE_NTLM_TYPE2MSG:
+      result = imap_state_auth_ntlm_type2msg_resp(conn, imapcode,
+                                                  imapc->state);
+      break;
+#endif
+
+    case IMAP_AUTHENTICATE_FINAL:
+      result = imap_state_auth_final_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_LOGIN:
+      result = imap_state_login_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_LIST:
+      result = imap_state_list_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_SELECT:
+      result = imap_state_select_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_FETCH:
+      result = imap_state_fetch_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_FETCH_FINAL:
+      result = imap_state_fetch_final_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_APPEND:
+      result = imap_state_append_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_APPEND_FINAL:
+      result = imap_state_append_final_resp(conn, imapcode, imapc->state);
+      break;
+
+    case IMAP_LOGOUT:
+      /* fallthrough, just stop! */
+    default:
+      /* internal error */
+      state(conn, IMAP_STOP);
+      break;
+    }
+  } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp));
+
+  return result;
+}
+
+/* Called repeatedly until done from multi.c */
+static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done)
+{
+  CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
-  struct pingpong *pp = &imapc->pp;
+
+  if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone)
+    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
+  else
+    result = Curl_pp_statemach(&imapc->pp, FALSE);
+
+  *done = (imapc->state == IMAP_STOP) ? TRUE : FALSE;
+
+  return result;
+}
+
+static CURLcode imap_block_statemach(struct connectdata *conn)
+{
   CURLcode result = CURLE_OK;
+  struct imap_conn *imapc = &conn->proto.imapc;
 
-  while(imapc->state != IMAP_STOP) {
-    result = Curl_pp_easy_statemach(pp);
-    if(result)
-      break;
-  }
+  while(imapc->state != IMAP_STOP && !result)
+    result = Curl_pp_statemach(&imapc->pp, TRUE);
 
   return result;
 }
 
-/*
- * Allocate and initialize the struct IMAP for the current SessionHandle.  If
- * need be.
- */
+/* Allocate and initialize the struct IMAP for the current SessionHandle if
+   required */
 static CURLcode imap_init(struct connectdata *conn)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *imap = data->state.proto.imap;
+  struct IMAP *imap = data->state.proto.imap;
+
   if(!imap) {
-    imap = data->state.proto.imap = calloc(sizeof(struct FTP), 1);
+    imap = data->state.proto.imap = calloc(sizeof(struct IMAP), 1);
     if(!imap)
-      return CURLE_OUT_OF_MEMORY;
+      result = CURLE_OUT_OF_MEMORY;
   }
 
-  /* get some initial data into the imap struct */
-  imap->bytecountp = &data->req.bytecount;
-
-  /* No need to duplicate user+password, the connectdata struct won't change
-     during a session, but we re-init them here since on subsequent inits
-     since the conn struct may have changed or been replaced.
-  */
-  imap->user = conn->user;
-  imap->passwd = conn->passwd;
+  return result;
+}
 
-  return CURLE_OK;
+/* For the IMAP "protocol connect" and "doing" phases only */
+static int imap_getsock(struct connectdata *conn, curl_socket_t *socks,
+                        int numsocks)
+{
+  return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks);
 }
 
-/*
- * imap_connect() should do everything that is to be considered a part of
- * the connection phase.
+/***********************************************************************
+ *
+ * imap_connect()
+ *
+ * This function should do everything that is to be considered a part of the
+ * connection phase.
  *
  * The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
  */
-static CURLcode imap_connect(struct connectdata *conn,
-                                 bool *done) /* see description above */
+static CURLcode imap_connect(struct connectdata *conn, bool *done)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   struct imap_conn *imapc = &conn->proto.imapc;
-  struct SessionHandle *data=conn->data;
   struct pingpong *pp = &imapc->pp;
 
   *done = FALSE; /* default to not done yet */
@@ -659,70 +1709,38 @@ static CURLcode imap_connect(struct connectdata *conn,
      sessionhandle, deal with it */
   Curl_reset_reqproto(conn);
 
+  /* Initialise the IMAP layer */
   result = imap_init(conn);
-  if(CURLE_OK != result)
+  if(result)
     return result;
 
-  /* We always support persistant connections on imap */
+  /* We always support persistent connections in IMAP */
   conn->bits.close = FALSE;
 
-  pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+  /* Set the default response time-out */
+  pp->response_time = RESP_TIMEOUT;
   pp->statemach_act = imap_statemach_act;
   pp->endofresp = imap_endofresp;
   pp->conn = conn;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-    /* for IMAP over HTTP proxy */
-    struct HTTP http_proxy;
-    struct FTP *imap_save;
-
-    /* BLOCKING */
-    /* We want "seamless" IMAP operations through HTTP proxy tunnel */
-
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
-     * conn->proto.http; we want IMAP through HTTP and we have to change the
-     * member temporarily for connecting to the HTTP proxy. After
-     * Curl_proxyCONNECT we have to set back the member to the original struct
-     * IMAP pointer
-     */
-    imap_save = data->state.proto.imap;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    data->state.proto.http = &http_proxy;
-
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name, conn->remote_port);
+  /* Set the default preferred authentication mechanism */
+  imapc->prefmech = SASL_AUTH_ANY;
 
-    data->state.proto.imap = imap_save;
+  /* Initialise the pingpong layer */
+  Curl_pp_init(pp);
 
-    if(CURLE_OK != result)
-      return result;
-  }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
-  if(conn->protocol & PROT_IMAPS) {
-    /* BLOCKING */
-    /* IMAPS is simply imap with SSL for the control channel */
-    /* now, perform the SSL initialization for this socket */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(result)
-      return result;
-  }
-
-  Curl_pp_init(pp); /* init generic pingpong data */
+  /* Parse the URL options */
+  result = imap_parse_url_options(conn);
+  if(result)
+    return result;
 
-  /* When we connect, we start in the state where we await the server greeting
-     response */
+  /* Start off waiting for the server greeting response */
   state(conn, IMAP_SERVERGREET);
-  imapc->idstr = "*"; /* we start off waiting for a '*' response */
 
-  if(data->state.used_interface == Curl_if_multi)
-    result = imap_multi_statemach(conn, done);
-  else {
-    result = imap_easy_statemach(conn);
-    if(!result)
-      *done = TRUE;
-  }
+  /* Start off with an response id of '*' */
+  strcpy(imapc->resptag, "*");
+
+  result = imap_multi_statemach(conn, done);
 
   return result;
 }
@@ -739,25 +1757,55 @@ static CURLcode imap_connect(struct connectdata *conn,
 static CURLcode imap_done(struct connectdata *conn, CURLcode status,
                           bool premature)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *imap = data->state.proto.imap;
-  CURLcode result=CURLE_OK;
+  struct IMAP *imap = data->state.proto.imap;
+
   (void)premature;
 
   if(!imap)
-    /* When the easy handle is removed from the multi while libcurl is still
-     * trying to resolve the host name, it seems that the imap struct is not
-     * yet initialized, but the removal action calls Curl_done() which calls
-     * this function. So we simply return success if no imap pointer is set.
-     */
+    /* When the easy handle is removed from the multi interface while libcurl
+       is still trying to resolve the host name, the IMAP struct is not yet
+       initialized. However, the removal action calls Curl_done() which in
+       turn calls this function, so we simply return success. */
     return CURLE_OK;
 
   if(status) {
     conn->bits.close = TRUE; /* marked for closure */
-    result = status;      /* use the already set error code */
+    result = status;         /* use the already set error code */
+  }
+  else if(!data->set.connect_only && !imap->custom &&
+          (imap->uid || data->set.upload)) {
+    /* Handle responses after FETCH or APPEND transfer has finished */
+    if(!data->set.upload)
+      state(conn, IMAP_FETCH_FINAL);
+    else {
+      /* End the APPEND command first by sending an empty line */
+      result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", "");
+      if(!result)
+        state(conn, IMAP_APPEND_FINAL);
+    }
+
+    /* Run the state-machine
+
+       TODO: when the multi interface is used, this _really_ should be using
+       the imap_multi_statemach function but we have no general support for
+       non-blocking DONE operations, not in the multi state machine and with
+       Curl_done() invokes on several places in the code!
+    */
+    if(!result)
+      result = imap_block_statemach(conn);
   }
 
-  /* clear these for next connection */
+  /* Cleanup our per-request based variables */
+  Curl_safefree(imap->mailbox);
+  Curl_safefree(imap->uidvalidity);
+  Curl_safefree(imap->uid);
+  Curl_safefree(imap->section);
+  Curl_safefree(imap->custom);
+  Curl_safefree(imap->custom_params);
+
+  /* Clear the transfer mode for the next request */
   imap->transfer = FTPTRANSFER_BODY;
 
   return result;
@@ -767,41 +1815,60 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
  *
  * imap_perform()
  *
- * This is the actual DO function for IMAP. Get a file/directory according to
- * the options previously setup.
+ * This is the actual DO function for IMAP. Fetch or append a message, or do
+ * other things according to the options previously setup.
  */
-
-static
-CURLcode imap_perform(struct connectdata *conn,
-                     bool *connected,  /* connect status after PASV / PORT */
-                     bool *dophase_done)
+static CURLcode imap_perform(struct connectdata *conn, bool *connected,
+                             bool *dophase_done)
 {
-  /* this is IMAP and no proxy */
-  CURLcode result=CURLE_OK;
+  /* This is IMAP and no proxy */
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = data->state.proto.imap;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  bool selected = FALSE;
 
   DEBUGF(infof(conn->data, "DO phase starts\n"));
 
   if(conn->data->set.opt_no_body) {
-    /* requested no body means no transfer... */
-    struct FTP *imap = conn->data->state.proto.imap;
+    /* Requested no body means no transfer */
     imap->transfer = FTPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
 
-  /* start the first command in the DO phase */
-  result = imap_select(conn);
+  /* Determine if the requested mailbox (with the same UIDVALIDITY if set)
+     has already been selected on this connection */
+  if(imap->mailbox && imapc->mailbox &&
+     !strcmp(imap->mailbox, imapc->mailbox) &&
+     (!imap->uidvalidity || !imapc->mailbox_uidvalidity ||
+      !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)))
+    selected = TRUE;
+
+  /* Start the first command in the DO phase */
+  if(conn->data->set.upload)
+    /* APPEND can be executed directly */
+    result = imap_perform_append(conn);
+  else if(imap->custom && (selected || !imap->mailbox))
+    /* Custom command using the same mailbox or no mailbox */
+    result = imap_perform_list(conn);
+  else if(!imap->custom && selected && imap->uid)
+    /* FETCH from the same mailbox */
+    result = imap_perform_fetch(conn);
+  else if(imap->mailbox && !selected && (imap->custom || imap->uid))
+    /* SELECT the mailbox */
+    result = imap_perform_select(conn);
+  else
+    /* LIST */
+    result = imap_perform_list(conn);
+
   if(result)
     return result;
 
-  /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi)
-    result = imap_multi_statemach(conn, dophase_done);
-  else {
-    result = imap_easy_statemach(conn);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  /* Run the state-machine */
+  result = imap_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -820,52 +1887,30 @@ CURLcode imap_perform(struct connectdata *conn,
  */
 static CURLcode imap_do(struct connectdata *conn, bool *done)
 {
-  CURLcode retcode = CURLE_OK;
+  CURLcode result = CURLE_OK;
 
   *done = FALSE; /* default to false */
 
-  /*
-    Since connections can be re-used between SessionHandles, this might be a
-    connection already existing but on a fresh SessionHandle struct so we must
-    make sure we have a good 'struct IMAP' to play with. For new connections,
-    the struct IMAP is allocated and setup in the imap_connect() function.
-  */
+  /* Since connections can be re-used between SessionHandles, there might be a
+     connection already existing but on a fresh SessionHandle struct. As such
+     we make sure we have a good IMAP struct to play with. For new connections
+     the IMAP struct is allocated and setup in the imap_connect() function. */
   Curl_reset_reqproto(conn);
-  retcode = imap_init(conn);
-  if(retcode)
-    return retcode;
-
-  retcode = imap_parse_url_path(conn);
-  if(retcode)
-    return retcode;
-
-  retcode = imap_regular_transfer(conn, done);
-
-  return retcode;
-}
-
-/***********************************************************************
- *
- * imap_logout()
- *
- * This should be called before calling sclose().  We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode imap_logout(struct connectdata *conn)
-{
-  CURLcode result = CURLE_OK;
-  const char *str;
+  result = imap_init(conn);
+  if(result)
+    return result;
 
-  str = getcmdid(conn);
+  /* Parse the URL path */
+  result = imap_parse_url_path(conn);
+  if(result)
+    return result;
 
-  result = imapsendf(conn, str, "%s LOGOUT", str, NULL);
+  /* Parse the custom request */
+  result = imap_parse_custom_request(conn);
   if(result)
     return result;
-  state(conn, IMAP_LOGOUT);
 
-  result = imap_easy_statemach(conn);
+  result = imap_regular_transfer(conn, done);
 
   return result;
 }
@@ -879,51 +1924,36 @@ static CURLcode imap_logout(struct connectdata *conn)
  */
 static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
 {
-  struct imap_conn *imapc= &conn->proto.imapc;
+  struct imap_conn *imapc = &conn->proto.imapc;
+
+  /* We cannot send quit unconditionally. If this connection is stale or
+     bad in any way, sending quit and waiting around here will make the
+     disconnect wait in vain and cause more problems than we need to. */
 
   /* The IMAP session may or may not have been allocated/setup at this
      point! */
   if(!dead_connection && imapc->pp.conn)
-    (void)imap_logout(conn); /* ignore errors on the LOGOUT */
+    if(!imap_perform_logout(conn))
+      (void)imap_block_statemach(conn); /* ignore errors on LOGOUT */
 
+  /* Disconnect from the server */
   Curl_pp_disconnect(&imapc->pp);
 
+  /* Cleanup the SASL module */
+  Curl_sasl_cleanup(conn, imapc->authused);
+
+  /* Cleanup our connection based variables */
   Curl_safefree(imapc->mailbox);
+  Curl_safefree(imapc->mailbox_uidvalidity);
 
   return CURLE_OK;
 }
 
-/***********************************************************************
- *
- * imap_parse_url_path()
- *
- * Parse the URL path into separate path components.
- *
- */
-static CURLcode imap_parse_url_path(struct connectdata *conn)
+/* Call this when the DO phase has completed */
+static CURLcode imap_dophase_done(struct connectdata *conn, bool connected)
 {
-  /* the imap struct is already inited in imap_connect() */
-  struct imap_conn *imapc = &conn->proto.imapc;
-  struct SessionHandle *data = conn->data;
-  const char *path = data->state.path;
-  int len;
-
-  if(!*path)
-    path = "INBOX";
+  struct IMAP *imap = conn->data->state.proto.imap;
 
-  /* url decode the path and use this mailbox */
-  imapc->mailbox = curl_easy_unescape(data, path, 0, &len);
-  if(!imapc->mailbox)
-    return CURLE_OUT_OF_MEMORY;
-
-  return CURLE_OK;
-}
-
-/* call this when the DO phase has completed */
-static CURLcode imap_dophase_done(struct connectdata *conn,
-                                  bool connected)
-{
-  struct FTP *imap = conn->data->state.proto.imap;
   (void)connected;
 
   if(imap->transfer != FTPTRANSFER_BODY)
@@ -933,18 +1963,19 @@ static CURLcode imap_dophase_done(struct connectdata *conn,
   return CURLE_OK;
 }
 
-/* called from multi.c while DOing */
-static CURLcode imap_doing(struct connectdata *conn,
-                               bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done)
 {
-  CURLcode result;
-  result = imap_multi_statemach(conn, dophase_done);
+  CURLcode result = imap_multi_statemach(conn, dophase_done);
 
-  if(*dophase_done) {
+  if(result)
+    DEBUGF(infof(conn->data, "DO phase failed\n"));
+  else if(*dophase_done) {
     result = imap_dophase_done(conn, FALSE /* not connected */);
 
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
   }
+
   return result;
 }
 
@@ -956,46 +1987,39 @@ static CURLcode imap_doing(struct connectdata *conn,
  *
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
- *
  */
-static
-CURLcode imap_regular_transfer(struct connectdata *conn,
-                              bool *dophase_done)
+static CURLcode imap_regular_transfer(struct connectdata *conn,
+                                      bool *dophase_done)
 {
-  CURLcode result=CURLE_OK;
-  bool connected=FALSE;
+  CURLcode result = CURLE_OK;
+  bool connected = FALSE;
   struct SessionHandle *data = conn->data;
-  data->req.size = -1; /* make sure this is unknown at this point */
 
+  /* Make sure size is unknown at this point */
+  data->req.size = -1;
+
+  /* Set the progress data */
   Curl_pgrsSetUploadCounter(data, 0);
   Curl_pgrsSetDownloadCounter(data, 0);
   Curl_pgrsSetUploadSize(data, 0);
   Curl_pgrsSetDownloadSize(data, 0);
 
-  result = imap_perform(conn,
-                        &connected, /* have we connected after PASV/PORT */
-                        dophase_done); /* all commands in the DO-phase done? */
-
-  if(CURLE_OK == result) {
-
-    if(!*dophase_done)
-      /* the DO phase has not completed yet */
-      return CURLE_OK;
+  /* Carry out the perform */
+  result = imap_perform(conn, &connected, dophase_done);
 
+  /* Perform post DO phase operations if necessary */
+  if(!result && *dophase_done)
     result = imap_dophase_done(conn, connected);
-    if(result)
-      return result;
-  }
 
   return result;
 }
 
-static CURLcode imap_setup_connection(struct connectdata * conn)
+static CURLcode imap_setup_connection(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
 
   if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
-    /* Unless we have asked to tunnel imap operations through the proxy, we
+    /* Unless we have asked to tunnel IMAP operations through the proxy, we
        switch and use HTTP operations only */
 #ifndef CURL_DISABLE_HTTP
     if(conn->handler == &Curl_handler_imap)
@@ -1008,11 +2032,10 @@ static CURLcode imap_setup_connection(struct connectdata * conn)
       return CURLE_UNSUPPORTED_PROTOCOL;
 #endif
     }
-    /*
-     * We explicitly mark this connection as persistent here as we're doing
-     * IMAP over HTTP and thus we accidentally avoid setting this value
-     * otherwise.
-     */
+
+    /* We explicitly mark this connection as persistent here as we're doing
+       IMAP over HTTP and thus we accidentally avoid setting this value
+       otherwise */
     conn->bits.close = FALSE;
 #else
     failf(data, "IMAP over http proxy requires HTTP support built-in!");
@@ -1025,4 +2048,350 @@ static CURLcode imap_setup_connection(struct connectdata * conn)
   return CURLE_OK;
 }
 
+/***********************************************************************
+ *
+ * imap_sendf()
+ *
+ * Sends the formated string as an IMAP command to the server.
+ *
+ * Designed to never block.
+ */
+static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...)
+{
+  CURLcode result = CURLE_OK;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  char *taggedfmt;
+  va_list ap;
+
+  DEBUGASSERT(fmt);
+
+  /* Calculate the next command ID wrapping at 3 digits */
+  imapc->cmdid = (imapc->cmdid + 1) % 1000;
+
+  /* Calculate the tag based on the connection ID and command ID */
+  snprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d",
+           'A' + curlx_sltosi(conn->connection_id % 26), imapc->cmdid);
+
+  /* Prefix the format with the tag */
+  taggedfmt = aprintf("%s %s", imapc->resptag, fmt);
+  if(!taggedfmt)
+    return CURLE_OUT_OF_MEMORY;
+
+  /* Send the data with the tag */
+  va_start(ap, fmt);
+  result = Curl_pp_vsendf(&imapc->pp, taggedfmt, ap);
+  va_end(ap);
+
+  Curl_safefree(taggedfmt);
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * imap_atom()
+ *
+ * Checks the input string for characters that need escaping and returns an
+ * atom ready for sending to the server.
+ *
+ * The returned string needs to be freed.
+ *
+ */
+static char *imap_atom(const char *str)
+{
+  const char *p1;
+  char *p2;
+  size_t backsp_count = 0;
+  size_t quote_count = 0;
+  bool space_exists = FALSE;
+  size_t newlen = 0;
+  char *newstr = NULL;
+
+  if(!str)
+    return NULL;
+
+  /* Count any unescapped characters */
+  p1 = str;
+  while(*p1) {
+    if(*p1 == '\\')
+      backsp_count++;
+    else if(*p1 == '"')
+      quote_count++;
+    else if(*p1 == ' ')
+      space_exists = TRUE;
+
+    p1++;
+  }
+
+  /* Does the input contain any unescapped characters? */
+  if(!backsp_count && !quote_count && !space_exists)
+    return strdup(str);
+
+  /* Calculate the new string length */
+  newlen = strlen(str) + backsp_count + quote_count + (space_exists ? 2 : 0);
+
+  /* Allocate the new string */
+  newstr = (char *) malloc((newlen + 1) * sizeof(char));
+  if(!newstr)
+    return NULL;
+
+  /* Surround the string in quotes if necessary */
+  p2 = newstr;
+  if(space_exists) {
+    newstr[0] = '"';
+    newstr[newlen - 1] = '"';
+    p2++;
+  }
+
+  /* Copy the string, escaping backslash and quote characters along the way */
+  p1 = str;
+  while(*p1) {
+    if(*p1 == '\\' || *p1 == '"') {
+      *p2 = '\\';
+      p2++;
+    }
+
+   *p2 = *p1;
+
+    p1++;
+    p2++;
+  }
+
+  /* Terminate the string */
+  newstr[newlen] = '\0';
+
+  return newstr;
+}
+
+/***********************************************************************
+ *
+ * imap_is_bchar()
+ *
+ * Portable test of whether the specified char is a "bchar" as defined in the
+ * grammar of RFC-5092.
+ */
+static bool imap_is_bchar(char ch)
+{
+  switch(ch) {
+    /* bchar */
+    case ':': case '@': case '/':
+    /* bchar -> achar */
+    case '&': case '=':
+    /* bchar -> achar -> uchar -> unreserved */
+    case '0': case '1': case '2': case '3': case '4': case '5': case '6':
+    case '7': case '8': case '9':
+    case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
+    case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
+    case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
+    case 'V': case 'W': case 'X': case 'Y': case 'Z':
+    case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
+    case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+    case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
+    case 'v': case 'w': case 'x': case 'y': case 'z':
+    case '-': case '.': case '_': case '~':
+    /* bchar -> achar -> uchar -> sub-delims-sh */
+    case '!': case '$': case '\'': case '(': case ')': case '*':
+    case '+': case ',':
+    /* bchar -> achar -> uchar -> pct-encoded */
+    case '%': /* HEXDIG chars are already included above */
+      return true;
+
+    default:
+      return false;
+  }
+}
+
+/***********************************************************************
+ *
+ * imap_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode imap_parse_url_options(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct imap_conn *imapc = &conn->proto.imapc;
+  const char *options = conn->options;
+  const char *ptr = options;
+
+  if(options) {
+    const char *key = ptr;
+
+    while(*ptr && *ptr != '=')
+        ptr++;
+
+    if(strnequal(key, "AUTH", 4)) {
+      const char *value = ptr + 1;
+
+      if(strequal(value, "*"))
+        imapc->prefmech = SASL_AUTH_ANY;
+      else if(strequal(value, "LOGIN"))
+        imapc->prefmech = SASL_MECH_LOGIN;
+      else if(strequal(value, "PLAIN"))
+        imapc->prefmech = SASL_MECH_PLAIN;
+      else if(strequal(value, "CRAM-MD5"))
+        imapc->prefmech = SASL_MECH_CRAM_MD5;
+      else if(strequal(value, "DIGEST-MD5"))
+        imapc->prefmech = SASL_MECH_DIGEST_MD5;
+      else if(strequal(value, "GSSAPI"))
+        imapc->prefmech = SASL_MECH_GSSAPI;
+      else if(strequal(value, "NTLM"))
+        imapc->prefmech = SASL_MECH_NTLM;
+      else
+        imapc->prefmech = SASL_AUTH_NONE;
+    }
+    else
+      result = CURLE_URL_MALFORMAT;
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * imap_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ *
+ */
+static CURLcode imap_parse_url_path(struct connectdata *conn)
+{
+  /* The imap struct is already initialised in imap_connect() */
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = data->state.proto.imap;
+  const char *begin = data->state.path;
+  const char *ptr = begin;
+
+  /* See how much of the URL is a valid path and decode it */
+  while(imap_is_bchar(*ptr))
+    ptr++;
+
+  if(ptr != begin) {
+    /* Remove the trailing slash if present */
+    const char *end = ptr;
+    if(end > begin && end[-1] == '/')
+      end--;
+
+    result = Curl_urldecode(data, begin, end - begin, &imap->mailbox, NULL,
+                            TRUE);
+    if(result)
+      return result;
+  }
+  else
+    imap->mailbox = NULL;
+
+  /* There can be any number of parameters in the form ";NAME=VALUE" */
+  while(*ptr == ';') {
+    char *name;
+    char *value;
+    size_t valuelen;
+
+    /* Find the length of the name parameter */
+    begin = ++ptr;
+    while(*ptr && *ptr != '=')
+      ptr++;
+
+    if(!*ptr)
+      return CURLE_URL_MALFORMAT;
+
+    /* Decode the name parameter */
+    result = Curl_urldecode(data, begin, ptr - begin, &name, NULL, TRUE);
+    if(result)
+      return result;
+
+    /* Find the length of the value parameter */
+    begin = ++ptr;
+    while(imap_is_bchar(*ptr))
+      ptr++;
+
+    /* Decode the value parameter */
+    result = Curl_urldecode(data, begin, ptr - begin, &value, &valuelen, TRUE);
+    if(result) {
+      Curl_safefree(name);
+      return result;
+    }
+
+    DEBUGF(infof(conn->data, "IMAP URL parameter '%s' = '%s'\n", name, value));
+
+    /* Process the known hierarchical parameters (UIDVALIDITY, UID and SECTION)
+       stripping of the trailing slash character if it is present.
+
+       Note: Unknown parameters trigger a URL_MALFORMAT error. */
+    if(Curl_raw_equal(name, "UIDVALIDITY") && !imap->uidvalidity) {
+      if(valuelen > 0 && value[valuelen - 1] == '/')
+        value[valuelen - 1] = '\0';
+
+      imap->uidvalidity = value;
+      value = NULL;
+    }
+    else if(Curl_raw_equal(name, "UID") && !imap->uid) {
+      if(valuelen > 0 && value[valuelen - 1] == '/')
+        value[valuelen - 1] = '\0';
+
+      imap->uid = value;
+      value = NULL;
+    }
+    else if(Curl_raw_equal(name, "SECTION") && !imap->section) {
+      if(valuelen > 0 && value[valuelen - 1] == '/')
+        value[valuelen - 1] = '\0';
+
+      imap->section = value;
+      value = NULL;
+    }
+    else {
+      Curl_safefree(name);
+      Curl_safefree(value);
+
+      return CURLE_URL_MALFORMAT;
+    }
+
+    Curl_safefree(name);
+    Curl_safefree(value);
+  }
+
+  /* Any extra stuff at the end of the URL is an error */
+  if(*ptr)
+    return CURLE_URL_MALFORMAT;
+
+  return CURLE_OK;
+}
+
+/***********************************************************************
+ *
+ * imap_parse_custom_request()
+ *
+ * Parse the custom request.
+ */
+static CURLcode imap_parse_custom_request(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct IMAP *imap = data->state.proto.imap;
+  const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+  if(custom) {
+    /* URL decode the custom request */
+    result = Curl_urldecode(data, custom, 0, &imap->custom, NULL, TRUE);
+
+    /* Extract the parameters if specified */
+    if(!result) {
+      const char *params = imap->custom;
+
+      while(*params && *params != ' ')
+        params++;
+
+      if(*params) {
+        imap->custom_params = strdup(params);
+        imap->custom[params - imap->custom] = '\0';
+
+        if(!imap->custom_params)
+          result = CURLE_OUT_OF_MEMORY;
+      }
+    }
+  }
+
+  return result;
+}
+
 #endif /* CURL_DISABLE_IMAP */
index 2f0b62a..bc0a83d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __IMAP_H
-#define __IMAP_H
+#ifndef HEADER_CURL_IMAP_H
+#define HEADER_CURL_IMAP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2013, 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
  * IMAP unique setup
  ***************************************************************************/
 typedef enum {
-  IMAP_STOP,    /* do nothing state, stops the state machine */
-  IMAP_SERVERGREET, /* waiting for the initial greeting immediately after
-                       a connect */
-  IMAP_LOGIN,
+  IMAP_STOP,         /* do nothing state, stops the state machine */
+  IMAP_SERVERGREET,  /* waiting for the initial greeting immediately after
+                        a connect */
+  IMAP_CAPABILITY,
   IMAP_STARTTLS,
+  IMAP_UPGRADETLS,   /* asynchronously upgrade the connection to SSL/TLS
+                       (multi mode only) */
+  IMAP_AUTHENTICATE_PLAIN,
+  IMAP_AUTHENTICATE_LOGIN,
+  IMAP_AUTHENTICATE_LOGIN_PASSWD,
+  IMAP_AUTHENTICATE_CRAMMD5,
+  IMAP_AUTHENTICATE_DIGESTMD5,
+  IMAP_AUTHENTICATE_DIGESTMD5_RESP,
+  IMAP_AUTHENTICATE_NTLM,
+  IMAP_AUTHENTICATE_NTLM_TYPE2MSG,
+  IMAP_AUTHENTICATE_FINAL,
+  IMAP_LOGIN,
+  IMAP_LIST,
   IMAP_SELECT,
   IMAP_FETCH,
+  IMAP_FETCH_FINAL,
+  IMAP_APPEND,
+  IMAP_APPEND_FINAL,
   IMAP_LOGOUT,
-  IMAP_LAST  /* never used */
+  IMAP_LAST          /* never used */
 } imapstate;
 
+/* This IMAP struct is used in the SessionHandle. All IMAP data that is
+   connection-oriented must be in imap_conn to properly deal with the fact that
+   perhaps the SessionHandle is changed between the times the connection is
+   used. */
+struct IMAP {
+  curl_pp_transfer transfer;
+  char *mailbox;          /* Mailbox to select */
+  char *uidvalidity;      /* UIDVALIDITY to check in select */
+  char *uid;              /* Message UID to fetch */
+  char *section;          /* Message SECTION to fetch */
+  char *custom;           /* Custom request */
+  char *custom_params;    /* Parameters for the custom request */
+};
+
 /* imap_conn is used for struct connection-oriented data in the connectdata
    struct */
 struct imap_conn {
   struct pingpong pp;
-  char *mailbox;     /* what to FETCH */
-  imapstate state; /* always use imap.c:state() to change state! */
-  int cmdid;       /* id number/index */
-  const char *idstr; /* pointer to a string for which to wait for as id */
+  imapstate state;            /* Always use imap.c:state() to change state! */
+  bool ssldone;               /* Is connect() over SSL done? */
+  unsigned int authmechs;     /* Accepted authentication mechanisms */
+  unsigned int prefmech;      /* Preferred authentication mechanism */
+  unsigned int authused;      /* Auth mechanism used for the connection */
+  int cmdid;                  /* Last used command ID */
+  char resptag[5];            /* Response tag to wait for */
+  bool tls_supported;         /* StartTLS capability supported by server */
+  bool login_disabled;        /* LOGIN command disabled by server */
+  bool ir_supported;          /* Initial response supported by server */
+  char *mailbox;              /* The last selected mailbox */
+  char *mailbox_uidvalidity;  /* UIDVALIDITY parsed from select response */
 };
 
 extern const struct Curl_handler Curl_handler_imap;
 extern const struct Curl_handler Curl_handler_imaps;
 
-#endif /* __IMAP_H */
+#endif /* HEADER_CURL_IMAP_H */
index 26867f4..c327150 100644 (file)
  * Original code by Paul Vixie. "curlified" by Gisle Vanem.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef HAVE_INET_NTOP
 
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include <string.h>
-#include <errno.h>
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -69,8 +64,7 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
           ((int)((unsigned char)src[3])) & 0xff);
 
   len = strlen(tmp);
-  if(len == 0 || len >= size)
-  {
+  if(len == 0 || len >= size) {
     SET_ERRNO(ENOSPC);
     return (NULL);
   }
@@ -105,61 +99,51 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
    *  Find the longest run of 0x00's in src[] for :: shorthanding.
    */
   memset(words, '\0', sizeof(words));
-  for (i = 0; i < IN6ADDRSZ; i++)
-      words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
+  for(i = 0; i < IN6ADDRSZ; i++)
+    words[i/2] |= (src[i] << ((1 - (i % 2)) << 3));
 
   best.base = -1;
   cur.base  = -1;
   best.len = 0;
   cur.len = 0;
 
-  for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
-  {
-    if(words[i] == 0)
-    {
+  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+    if(words[i] == 0) {
       if(cur.base == -1)
         cur.base = i, cur.len = 1;
       else
         cur.len++;
     }
-    else if(cur.base != -1)
-    {
+    else if(cur.base != -1) {
       if(best.base == -1 || cur.len > best.len)
-         best = cur;
+        best = cur;
       cur.base = -1;
     }
   }
   if((cur.base != -1) && (best.base == -1 || cur.len > best.len))
-     best = cur;
+    best = cur;
   if(best.base != -1 && best.len < 2)
-     best.base = -1;
-
-  /* Format the result.
-   */
+    best.base = -1;
+  /* Format the result. */
   tp = tmp;
-  for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
-  {
-    /* Are we inside the best run of 0x00's?
-     */
-    if(best.base != -1 && i >= best.base && i < (best.base + best.len))
-    {
+  for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+    /* Are we inside the best run of 0x00's? */
+    if(best.base != -1 && i >= best.base && i < (best.base + best.len)) {
       if(i == best.base)
-         *tp++ = ':';
+        *tp++ = ':';
       continue;
     }
 
     /* Are we following an initial run of 0x00s or any real hex?
      */
     if(i != 0)
-       *tp++ = ':';
+      *tp++ = ':';
 
     /* Is this address an encapsulated IPv4?
      */
     if(i == 6 && best.base == 0 &&
-        (best.len == 6 || (best.len == 5 && words[5] == 0xffff)))
-    {
-      if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp)))
-      {
+        (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+      if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp))) {
         SET_ERRNO(ENOSPC);
         return (NULL);
       }
@@ -177,8 +161,7 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
 
   /* Check for overflow, copy, and we're done.
    */
-  if((size_t)(tp - tmp) > size)
-  {
+  if((size_t)(tp - tmp) > size) {
     SET_ERRNO(ENOSPC);
     return (NULL);
   }
@@ -195,9 +178,9 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
  * error, EAFNOSUPPORT or ENOSPC.
  *
  * On Windows we store the error in the thread errno, not
- * in the winsock error code. This is to avoid loosing the
+ * in the winsock error code. This is to avoid losing the
  * actual last winsock error. So use macro ERRNO to fetch the
- * errno this funtion sets when returning NULL, not SOCKERRNO.
+ * errno this function sets when returning NULL, not SOCKERRNO.
  */
 char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
 {
index 8db9775..db28ed8 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __INET_NTOP_H
-#define __INET_NTOP_H
+#ifndef HEADER_CURL_INET_NTOP_H
+#define HEADER_CURL_INET_NTOP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
 
@@ -34,4 +34,5 @@ char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
         inet_ntop(af,addr,buf,(curl_socklen_t)size)
 #endif
 
-#endif /* __INET_NTOP_H */
+#endif /* HEADER_CURL_INET_NTOP_H */
+
index 967e30f..f50b365 100644 (file)
  * SOFTWARE.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef HAVE_INET_PTON
 
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include <string.h>
-#include <errno.h>
 
 #include "inet_pton.h"
 
@@ -61,9 +56,9 @@ static int      inet_pton6(const char *src, unsigned char *dst);
  *      -1 if some other error occurred (`dst' is untouched in this case, too)
  * notice:
  *      On Windows we store the error in the thread errno, not
- *      in the winsock error code. This is to avoid loosing the
+ *      in the winsock error code. This is to avoid losing the
  *      actual last winsock error. So use macro ERRNO to fetch the
- *      errno this funtion sets when returning (-1), not SOCKERRNO.
+ *      errno this function sets when returning (-1), not SOCKERRNO.
  * author:
  *      Paul Vixie, 1996.
  */
@@ -223,7 +218,7 @@ inet_pton6(const char *src, unsigned char *dst)
 
     if(tp == endp)
       return (0);
-    for (i = 1; i <= n; i++) {
+    for(i = 1; i <= n; i++) {
       *(endp - i) = *(colonp + n - i);
       *(colonp + n - i) = 0;
     }
index d53fddf..43c5491 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __INET_PTON_H
-#define __INET_PTON_H
+#ifndef HEADER_CURL_INET_PTON_H
+#define HEADER_CURL_INET_PTON_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 int Curl_inet_pton(int, const char *, void *);
 
@@ -33,4 +33,5 @@ int Curl_inet_pton(int, const char *, void *);
 #define Curl_inet_pton(x,y,z) inet_pton(x,y,z)
 #endif
 
-#endif /* __INET_PTON_H */
+#endif /* HEADER_CURL_INET_PTON_H */
+
index 2895ced..3d78962 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2010 Daniel Stenberg
+ * Copyright (c) 2004 - 2011 Daniel Stenberg
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  *
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
 #ifdef HAVE_KRB4
 
-#include <stdlib.h>
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#include <string.h>
 #include <krb.h>
 #include <des.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for getpid() */
-#endif
-
 #include "urldata.h"
 #include "curl_base64.h"
 #include "ftp.h"
@@ -88,9 +82,9 @@ strlcpy (char *dst, const char *src, size_t dst_sz)
   size_t n;
   char *p;
 
-  for (p = dst, n = 0;
-       n + 1 < dst_sz && *src != '\0';
-       ++p, ++src, ++n)
+  for(p = dst, n = 0;
+      n + 1 < dst_sz && *src != '\0';
+      ++p, ++src, ++n)
     *p = *src;
   *p = '\0';
   if(*src == '\0')
@@ -203,7 +197,7 @@ krb4_auth(void *app_data, struct connectdata *conn)
   int ret;
   char *p;
   unsigned char *ptr;
-  size_t len;
+  size_t len = 0;
   KTEXT_ST adat;
   MSG_DAT msg_data;
   int checksum;
@@ -214,6 +208,7 @@ krb4_auth(void *app_data, struct connectdata *conn)
   int l = sizeof(conn->local_addr);
   struct SessionHandle *data = conn->data;
   CURLcode result;
+  size_t base64_sz = 0;
 
   if(getsockname(conn->sock[FIRSTSOCKET],
                  (struct sockaddr *)LOCAL_ADDR, &l) < 0)
@@ -249,8 +244,10 @@ krb4_auth(void *app_data, struct connectdata *conn)
   }
 #endif
 
-  if(Curl_base64_encode(conn->data, (char *)adat.dat, adat.length, &p) < 1) {
-    Curl_failf(data, "Out of memory base64-encoding");
+  result = Curl_base64_encode(conn->data, (char *)adat.dat, adat.length,
+                              &p, &base64_sz);
+  if(result) {
+    Curl_failf(data, "base64-encoding: %s", curl_easy_strerror(result));
     return AUTH_CONTINUE;
   }
 
@@ -264,7 +261,7 @@ krb4_auth(void *app_data, struct connectdata *conn)
   if(Curl_GetFTPResponse(&nread, conn, NULL))
     return -1;
 
-  if(data->state.buffer[0] != '2'){
+  if(data->state.buffer[0] != '2') {
     Curl_failf(data, "Server didn't accept auth data");
     return AUTH_ERROR;
   }
@@ -275,10 +272,15 @@ krb4_auth(void *app_data, struct connectdata *conn)
     return AUTH_ERROR;
   }
   p += 5;
-  len = Curl_base64_decode(p, &ptr);
+  result = Curl_base64_decode(p, &ptr, &len);
+  if(result) {
+    Curl_failf(data, "base64-decoding: %s", curl_easy_strerror(result));
+    return AUTH_ERROR;
+  }
   if(len > sizeof(adat.dat)-1) {
     free(ptr);
-    len=0;
+    ptr = NULL;
+    len = 0;
   }
   if(!len || !ptr) {
     Curl_failf(data, "Failed to decode base64 from server");
@@ -332,11 +334,12 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
   char *name;
   char *p;
   char passwd[100];
-  size_t tmp;
+  size_t tmp = 0;
   ssize_t nread;
   enum protection_level save;
   CURLcode result;
   unsigned char *ptr;
+  size_t base64_sz = 0;
 
   save = krb4_set_command_prot(conn, PROT_PRIVATE);
 
@@ -349,7 +352,7 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
   if(result)
     return result;
 
-  if(conn->data->state.buffer[0] != '3'){
+  if(conn->data->state.buffer[0] != '3') {
     krb4_set_command_prot(conn, save);
     return CURLE_FTP_WEIRD_SERVER_REPLY;
   }
@@ -362,10 +365,15 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
   }
 
   p += 2;
-  tmp = Curl_base64_decode(p, &ptr);
+  result = Curl_base64_decode(p, &ptr, &tmp);
+  if(result) {
+    Curl_failf(conn->data, "base64-decoding: %s", curl_easy_strerror(result));
+    return result;
+  }
   if(tmp >= sizeof(tkt.dat)) {
     free(ptr);
-    tmp=0;
+    ptr = NULL;
+    tmp = 0;
   }
   if(!tmp || !ptr) {
     Curl_failf(conn->data, "Failed to decode base64 in reply");
@@ -406,11 +414,12 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
   memset(key, 0, sizeof(key));
   memset(schedule, 0, sizeof(schedule));
   memset(passwd, 0, sizeof(passwd));
-  if(Curl_base64_encode(conn->data, (char *)tktcopy.dat, tktcopy.length, &p)
-     < 1) {
-    failf(conn->data, "Out of memory base64-encoding.");
+  result = Curl_base64_encode(conn->data, (char *)tktcopy.dat, tktcopy.length,
+                              &p, &base64_sz);
+  if(result) {
+    Curl_failf(conn->data, "base64-encoding: %s", curl_easy_strerror(result));
     krb4_set_command_prot(conn, save);
-    return CURLE_OUT_OF_MEMORY;
+    return result;
   }
   memset (tktcopy.dat, 0, tktcopy.length);
 
index b3b5ea7..3e29b25 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __KRB4_H
-#define __KRB4_H
+#ifndef HEADER_CURL_KRB4_H
+#define HEADER_CURL_KRB4_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -47,9 +47,11 @@ extern struct Curl_sec_client_mech Curl_krb5_client_mech;
 #endif
 
 CURLcode Curl_krb_kauth(struct connectdata *conn);
-int Curl_sec_read_msg (struct connectdata *conn, char *, enum protection_level);
+int Curl_sec_read_msg (struct connectdata *conn, char *,
+                       enum protection_level);
 void Curl_sec_end (struct connectdata *);
 CURLcode Curl_sec_login (struct connectdata *);
 int Curl_sec_request_prot (struct connectdata *conn, const char *level);
 
-#endif
+#endif /* HEADER_CURL_KRB4_H */
+
index cedab16..1e99c70 100644 (file)
@@ -1,8 +1,8 @@
 /* GSSAPI/krb5 support for FTP - loosely based on old krb4.c
  *
- * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2010 Kungliga Tekniska Högskolan
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2009 Daniel Stenberg
+ * Copyright (c) 2004 - 2012 Daniel Stenberg
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
 #ifdef HAVE_GSSAPI
 
 #ifdef HAVE_OLD_GSSMIT
 #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#define NCOMPAT 1
 #endif
 
-#include <stdlib.h>
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#include <string.h>
-
-#ifdef HAVE_GSSGNU
-#  include <gss.h>
-#elif defined HAVE_GSSMIT
-   /* MIT style */
-#  include <gssapi/gssapi.h>
-#  include <gssapi/gssapi_generic.h>
-#  include <gssapi/gssapi_krb5.h>
-#else
-   /* Heimdal-style */
-#  include <gssapi.h>
-#endif
 
 #include "urldata.h"
 #include "curl_base64.h"
 #include "ftp.h"
+#include "curl_gssapi.h"
 #include "sendf.h"
 #include "krb4.h"
 #include "curl_memory.h"
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -94,16 +83,16 @@ krb5_check_prot(void *app_data, int level)
 }
 
 static int
-krb5_decode(void *app_data, void *buf, int len, int level,
-            struct connectdata *conn)
+krb5_decode(void *app_data, void *buf, int len,
+            int level UNUSED_PARAM,
+            struct connectdata *conn UNUSED_PARAM)
 {
   gss_ctx_id_t *context = app_data;
   OM_uint32 maj, min;
   gss_buffer_desc enc, dec;
 
-  /* shut gcc up */
-  level = 0;
-  conn = NULL;
+  (void)level;
+  (void)conn;
 
   enc.value = buf;
   enc.length = len;
@@ -115,7 +104,7 @@ krb5_decode(void *app_data, void *buf, int len, int level,
   }
 
   memcpy(buf, dec.value, dec.length);
-  len = dec.length;
+  len = curlx_uztosi(dec.length);
   gss_release_buffer(&min, &dec);
 
   return len;
@@ -124,16 +113,16 @@ krb5_decode(void *app_data, void *buf, int len, int level,
 static int
 krb5_overhead(void *app_data, int level, int len)
 {
-  /* no arguments are used, just init them to prevent compiler warnings */
-  app_data = NULL;
-  level = 0;
-  len = 0;
+  /* no arguments are used */
+  (void)app_data;
+  (void)level;
+  (void)len;
   return 0;
 }
 
 static int
 krb5_encode(void *app_data, const void *from, int length, int level, void **to,
-            struct connectdata *conn)
+            struct connectdata *conn UNUSED_PARAM)
 {
   gss_ctx_id_t *context = app_data;
   gss_buffer_desc dec, enc;
@@ -157,12 +146,13 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to,
   if(maj != GSS_S_COMPLETE)
     return -1;
 
-  /* malloc a new buffer, in case gss_release_buffer doesn't work as expected */
+  /* malloc a new buffer, in case gss_release_buffer doesn't work as
+     expected */
   *to = malloc(enc.length);
   if(!*to)
     return -1;
   memcpy(*to, enc.value, enc.length);
-  len = enc.length;
+  len = curlx_uztosi(enc.length);
   gss_release_buffer(&min, &enc);
   return len;
 }
@@ -183,6 +173,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
   gss_name_t gssname;
   gss_ctx_id_t *context = app_data;
   struct gss_channel_bindings_struct chan;
+  size_t base64_sz = 0;
 
   if(getsockname(conn->sock[FIRSTSOCKET],
                  (struct sockaddr *)LOCAL_ADDR, &l) < 0)
@@ -200,7 +191,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
   chan.application_data.value = NULL;
 
   /* this loop will execute twice (once for service, once for host) */
-  while(1) {
+  for(;;) {
     /* this really shouldn't be repeated here, but can't help it */
     if(service == srv_host) {
       result = Curl_ftpsendf(conn, "AUTH GSSAPI");
@@ -222,7 +213,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
     if(maj != GSS_S_COMPLETE) {
       gss_release_name(&min, &gssname);
       if(service == srv_host) {
-        Curl_failf(data, "Error importing service name %s", input_buffer.value);
+        Curl_failf(data, "Error importing service name %s",
+                   input_buffer.value);
         return AUTH_ERROR;
       }
       service = srv_host;
@@ -240,19 +232,14 @@ krb5_auth(void *app_data, struct connectdata *conn)
          taken care by a final gss_release_buffer. */
       gss_release_buffer(&min, &output_buffer);
       ret = AUTH_OK;
-      maj = gss_init_sec_context(&min,
-                                 GSS_C_NO_CREDENTIAL,
-                                 context,
-                                 gssname,
-                                 GSS_C_NO_OID,
-                                 GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
-                                 0,
-                                 &chan,
-                                 gssresp,
-                                 NULL,
-                                 &output_buffer,
-                                 NULL,
-                                 NULL);
+      maj = Curl_gss_init_sec_context(data,
+                                      &min,
+                                      context,
+                                      gssname,
+                                      &chan,
+                                      gssresp,
+                                      &output_buffer,
+                                      NULL);
 
       if(gssresp) {
         free(_gssresp.value);
@@ -266,9 +253,10 @@ krb5_auth(void *app_data, struct connectdata *conn)
       }
 
       if(output_buffer.length != 0) {
-        if(Curl_base64_encode(data, (char *)output_buffer.value,
-                              output_buffer.length, &p) < 1) {
-          Curl_infof(data, "Out of memory base64-encoding\n");
+        result = Curl_base64_encode(data, (char *)output_buffer.value,
+                                    output_buffer.length, &p, &base64_sz);
+        if(result) {
+          Curl_infof(data,"base64-encoding: %s\n", curl_easy_strerror(result));
           ret = AUTH_CONTINUE;
           break;
         }
@@ -287,7 +275,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
           break;
         }
 
-        if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3'){
+        if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3') {
           Curl_infof(data, "Server didn't accept auth data\n");
           ret = AUTH_ERROR;
           break;
@@ -296,10 +284,11 @@ krb5_auth(void *app_data, struct connectdata *conn)
         p = data->state.buffer + 4;
         p = strstr(p, "ADAT=");
         if(p) {
-          _gssresp.length = Curl_base64_decode(p + 5, (unsigned char **)
-                                               &_gssresp.value);
-          if(_gssresp.length < 1) {
-            Curl_failf(data, "Out of memory base64-encoding\n");
+          result = Curl_base64_decode(p + 5,
+                                      (unsigned char **)&_gssresp.value,
+                                      &_gssresp.length);
+          if(result) {
+            Curl_failf(data,"base64-decoding: %s", curl_easy_strerror(result));
             ret = AUTH_CONTINUE;
             break;
           }
@@ -325,10 +314,13 @@ krb5_auth(void *app_data, struct connectdata *conn)
 
 static void krb5_end(void *app_data)
 {
-    OM_uint32 maj, min;
+    OM_uint32 min;
     gss_ctx_id_t *context = app_data;
-    if (*context != GSS_C_NO_CONTEXT) {
-      maj = gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
+    if(*context != GSS_C_NO_CONTEXT) {
+#ifdef DEBUGBUILD
+      OM_uint32 maj =
+#endif
+      gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER);
       DEBUGASSERT(maj == GSS_S_COMPLETE);
     }
 }
index 529e452..2352715 100644 (file)
@@ -5,7 +5,7 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
 
  * OpenLDAP library versions, USE_OPENLDAP shall not be defined.
  */
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
 #ifdef CURL_LDAP_WIN            /* Use Windows LDAP implementation. */
 # include <winldap.h>
 # ifndef LDAP_VENDOR_NAME
-#  error Your Platform SDK is NOT sufficient for LDAP support! Update your Platform SDK, or disable LDAP support!
+#  error Your Platform SDK is NOT sufficient for LDAP support! \
+         Update your Platform SDK, or disable LDAP support!
 # else
 #  include <winber.h>
 # endif
 # endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
 #endif
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "sendf.h"
@@ -112,11 +101,11 @@ static void _ldap_free_urldesc (LDAPURLDesc *ludp);
   #define LDAP_TRACE(x)   do { \
                             _ldap_trace ("%u: ", __LINE__); \
                             _ldap_trace x; \
-                          } while(0)
+                          } WHILE_FALSE
 
   static void _ldap_trace (const char *fmt, ...);
 #else
-  #define LDAP_TRACE(x)   ((void)0)
+  #define LDAP_TRACE(x)   Curl_nop_stmt
 #endif
 
 
@@ -137,10 +126,13 @@ const struct Curl_handler Curl_handler_ldap = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_LDAP,                            /* defport */
-  PROT_LDAP                             /* protocol */
+  CURLPROTO_LDAP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
 #ifdef HAVE_LDAP_SSL
@@ -159,10 +151,13 @@ const struct Curl_handler Curl_handler_ldaps = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_LDAPS,                           /* defport */
-  PROT_LDAP | PROT_SSL                  /* protocol */
+  CURLPROTO_LDAP | CURLPROTO_LDAPS,     /* protocol */
+  PROTOPT_SSL                           /* flags */
 };
 #endif
 
@@ -179,9 +174,9 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
   struct SessionHandle *data=conn->data;
   int ldap_proto = LDAP_VERSION3;
   int ldap_ssl = 0;
-  char *val_b64;
-  size_t val_b64_sz;
-  curl_off_t dlsize=0;
+  char *val_b64 = NULL;
+  size_t val_b64_sz = 0;
+  curl_off_t dlsize = 0;
 #ifdef LDAP_OPT_NETWORK_TIMEOUT
   struct timeval ldap_timeout = {10,0}; /* 10 sec connection/search timeout */
 #endif
@@ -203,7 +198,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
   }
 
   /* Get the URL scheme ( either ldap or ldaps ) */
-  if(conn->protocol & PROT_SSL)
+  if(conn->given->flags & PROTOPT_SSL)
     ldap_ssl = 1;
   infof(data, "LDAP local: trying to establish %s connection\n",
           ldap_ssl ? "encrypted" : "cleartext");
@@ -216,7 +211,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
   if(ldap_ssl) {
 #ifdef HAVE_LDAP_SSL
 #ifdef CURL_LDAP_WIN
-    /* Win32 LDAP SDK doesnt support insecure mode without CA! */
+    /* Win32 LDAP SDK doesn't support insecure mode without CA! */
     server = ldap_sslinit(conn->host.name, (int)conn->port, 1);
     ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON);
 #else
@@ -253,9 +248,9 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
         goto quit;
       }
       ldap_option = LDAPSSL_VERIFY_SERVER;
-    } else {
-      ldap_option = LDAPSSL_VERIFY_NONE;
     }
+    else
+      ldap_option = LDAPSSL_VERIFY_NONE;
     rc = ldapssl_set_verify_mode(ldap_option);
     if(rc != LDAP_SUCCESS) {
       failf(data, "LDAP local: ERROR setting cert verify mode: %s",
@@ -265,7 +260,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
     }
     server = ldapssl_init(conn->host.name, (int)conn->port, 1);
     if(server == NULL) {
-      failf(data, "LDAP local: Cannot connect to %s:%hu",
+      failf(data, "LDAP local: Cannot connect to %s:%ld",
               conn->host.name, conn->port);
       status = CURLE_COULDNT_CONNECT;
       goto quit;
@@ -275,7 +270,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
       /* OpenLDAP SDK supports BASE64 files. */
       if((data->set.str[STRING_CERT_TYPE]) &&
          (!Curl_raw_equal(data->set.str[STRING_CERT_TYPE], "PEM"))) {
-        failf(data, "LDAP local: ERROR OpenLDAP does only support PEM cert-type!");
+        failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type!");
         status = CURLE_SSL_CERTPROBLEM;
         goto quit;
       }
@@ -293,9 +288,10 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
         goto quit;
       }
       ldap_option = LDAP_OPT_X_TLS_DEMAND;
-    } else {
-      ldap_option = LDAP_OPT_X_TLS_NEVER;
     }
+    else
+      ldap_option = LDAP_OPT_X_TLS_NEVER;
+
     rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &ldap_option);
     if(rc != LDAP_SUCCESS) {
       failf(data, "LDAP local: ERROR setting cert verify mode: %s",
@@ -305,7 +301,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
     }
     server = ldap_init(conn->host.name, (int)conn->port);
     if(server == NULL) {
-      failf(data, "LDAP local: Cannot connect to %s:%hu",
+      failf(data, "LDAP local: Cannot connect to %s:%ld",
               conn->host.name, conn->port);
       status = CURLE_COULDNT_CONNECT;
       goto quit;
@@ -337,10 +333,11 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
 #endif
 #endif
 #endif /* CURL_LDAP_USE_SSL */
-  } else {
+  }
+  else {
     server = ldap_init(conn->host.name, (int)conn->port);
     if(server == NULL) {
-      failf(data, "LDAP local: Cannot connect to %s:%hu",
+      failf(data, "LDAP local: Cannot connect to %s:%ld",
               conn->host.name, conn->port);
       status = CURLE_COULDNT_CONNECT;
       goto quit;
@@ -361,9 +358,9 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
                             conn->bits.user_passwd ? conn->passwd : NULL);
   }
   if(rc != 0) {
-     failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc));
-     status = CURLE_LDAP_CANNOT_BIND;
-     goto quit;
+    failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc));
+    status = CURLE_LDAP_CANNOT_BIND;
+    goto quit;
   }
 
   rc = ldap_search_s(server, ludp->lud_dn, ludp->lud_scope,
@@ -377,8 +374,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
 
   for(num = 0, entryIterator = ldap_first_entry(server, result);
       entryIterator;
-      entryIterator = ldap_next_entry(server, entryIterator), num++)
-  {
+      entryIterator = ldap_next_entry(server, entryIterator), num++) {
     BerElement *ber = NULL;
     char  *attribute;       /*! suspicious that this isn't 'const' */
     char  *dn = ldap_get_dn(server, entryIterator);
@@ -390,16 +386,13 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
 
     dlsize += strlen(dn)+5;
 
-    for (attribute = ldap_first_attribute(server, entryIterator, &ber);
-         attribute;
-         attribute = ldap_next_attribute(server, entryIterator, ber))
-    {
+    for(attribute = ldap_first_attribute(server, entryIterator, &ber);
+        attribute;
+        attribute = ldap_next_attribute(server, entryIterator, ber)) {
       BerValue **vals = ldap_get_values_len(server, entryIterator, attribute);
 
-      if(vals != NULL)
-      {
-        for (i = 0; (vals[i] != NULL); i++)
-        {
+      if(vals != NULL) {
+        for(i = 0; (vals[i] != NULL); i++) {
           Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
           Curl_client_write(conn, CLIENTWRITE_BODY, (char *) attribute, 0);
           Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
@@ -410,10 +403,20 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
                       (char *)attribute +
                       (strlen((char *)attribute) - 7)) == 0)) {
             /* Binary attribute, encode to base64. */
-            val_b64_sz = Curl_base64_encode(data,
-                                            vals[i]->bv_val,
-                                            vals[i]->bv_len,
-                                            &val_b64);
+            CURLcode error = Curl_base64_encode(data,
+                                                vals[i]->bv_val,
+                                                vals[i]->bv_len,
+                                                &val_b64,
+                                                &val_b64_sz);
+            if(error) {
+              ldap_value_free_len(vals);
+              ldap_memfree(attribute);
+              ldap_memfree(dn);
+              if(ber)
+                ber_free(ber, 0);
+              status = error;
+              goto quit;
+            }
             if(val_b64_sz > 0) {
               Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, val_b64_sz);
               free(val_b64);
@@ -513,15 +516,15 @@ static char **split_str (char *str)
   char **res, *lasts, *s;
   int  i;
 
-  for (i = 2, s = strchr(str,','); s; i++)
-     s = strchr(++s,',');
+  for(i = 2, s = strchr(str,','); s; i++)
+    s = strchr(++s,',');
 
   res = calloc(i, sizeof(char*));
   if(!res)
     return NULL;
 
-  for (i = 0, s = strtok_r(str, ",", &lasts); s;
-       s = strtok_r(NULL, ",", &lasts), i++)
+  for(i = 0, s = strtok_r(str, ",", &lasts); s;
+      s = strtok_r(NULL, ",", &lasts), i++)
     res[i] = s;
   return res;
 }
@@ -539,16 +542,16 @@ static bool unescape_elements (void *data, LDAPURLDesc *ludp)
        return (FALSE);
   }
 
-  for (i = 0; ludp->lud_attrs && ludp->lud_attrs[i]; i++) {
+  for(i = 0; ludp->lud_attrs && ludp->lud_attrs[i]; i++) {
     ludp->lud_attrs[i] = curl_easy_unescape(data, ludp->lud_attrs[i], 0, NULL);
     if(!ludp->lud_attrs[i])
-       return (FALSE);
+      return (FALSE);
   }
 
-  for (i = 0; ludp->lud_exts && ludp->lud_exts[i]; i++) {
+  for(i = 0; ludp->lud_exts && ludp->lud_exts[i]; i++) {
     ludp->lud_exts[i] = curl_easy_unescape(data, ludp->lud_exts[i], 0, NULL);
     if(!ludp->lud_exts[i])
-       return (FALSE);
+      return (FALSE);
   }
 
   if(ludp->lud_dn) {
@@ -618,7 +621,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
     if(!ludp->lud_attrs)
       return LDAP_NO_MEMORY;
 
-    for (i = 0; ludp->lud_attrs[i]; i++)
+    for(i = 0; ludp->lud_attrs[i]; i++)
       LDAP_TRACE (("attr[%d] '%s'\n", i, ludp->lud_attrs[i]));
   }
 
@@ -664,7 +667,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
   if(!ludp->lud_exts)
     return LDAP_NO_MEMORY;
 
-  for (i = 0; ludp->lud_exts[i]; i++)
+  for(i = 0; ludp->lud_exts[i]; i++)
     LDAP_TRACE (("exts[%d] '%s'\n", i, ludp->lud_exts[i]));
 
   success:
@@ -697,23 +700,23 @@ static void _ldap_free_urldesc (LDAPURLDesc *ludp)
   int i;
 
   if(!ludp)
-     return;
+    return;
 
   if(ludp->lud_dn)
-     free(ludp->lud_dn);
+    free(ludp->lud_dn);
 
   if(ludp->lud_filter)
-     free(ludp->lud_filter);
+    free(ludp->lud_filter);
 
   if(ludp->lud_attrs) {
-    for (i = 0; ludp->lud_attrs[i]; i++)
-       free(ludp->lud_attrs[i]);
+    for(i = 0; ludp->lud_attrs[i]; i++)
+      free(ludp->lud_attrs[i]);
     free(ludp->lud_attrs);
   }
 
   if(ludp->lud_exts) {
-    for (i = 0; ludp->lud_exts[i]; i++)
-       free(ludp->lud_exts[i]);
+    for(i = 0; ludp->lud_exts[i]; i++)
+      free(ludp->lud_exts[i]);
     free(ludp->lud_exts);
   }
   free (ludp);
diff --git a/lib/libcurl.imp b/lib/libcurl.imp
deleted file mode 100644 (file)
index 74943af..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Definition file for the NLM version of the LIBCURL library from curl
-#
-#      (LIBCURL)
-       curl_easy_cleanup,
-       curl_easy_escape,
-       curl_easy_unescape,
-       curl_easy_getinfo,
-       curl_easy_init,
-       curl_easy_pause,
-       curl_easy_perform,
-       curl_easy_setopt,
-       curl_escape,
-       curl_unescape,
-       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_mvsnprintf,
-       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,
-       curl_global_init_mem,
-       curl_easy_strerror,
-       curl_multi_strerror,
-       curl_share_strerror,
-       curl_easy_reset
-
index 7c3c355..da77c22 100644 (file)
@@ -3,33 +3,33 @@
 <plist version="0.9">
 <dict>
        <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>    
-       
+       <string>6.0</string>
+
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
-       
+
        <key>CFBundleExecutable</key>
        <string>curl</string>
-       
+
        <key>CFBundleIdentifier</key>
-       <string>com.libcurl.libcurl</string>
-       
+       <string>se.haxx.curl.libcurl</string>
+
        <key>CFBundleVersion</key>
-       <string>7.21.3</string>
+       <string>7.32.0</string>
 
        <key>CFBundleName</key>
        <string>libcurl</string>
 
        <key>CFBundlePackageType</key>
-       <string>FMWK</string>   
-        
+       <string>FMWK</string>
+
        <key>CFBundleSignature</key>
-       <string>????</string>   
-       
+       <string>????</string>
+
        <key>CFBundleShortVersionString</key>
-       <string>libcurl 7.21.3</string>
-       
+       <string>libcurl 7.32.0</string>
+
        <key>CFBundleGetInfoString</key>
-       <string>libcurl.plist 7.21.3</string>
+       <string>libcurl.plist 7.32.0</string>
 </dict>
-</plist>
\ No newline at end of file
+</plist>
diff --git a/lib/libcurl.vcproj b/lib/libcurl.vcproj
deleted file mode 100644 (file)
index d4cd99a..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="8.00"
-       Name="libcurl"
-       ProjectGUID="{87EE9DA4-DE1E-4448-8324-183C98DCA588}"
-       >
-       <Platforms>
-               <Platform
-                       Name="Win32"
-               />
-       </Platforms>
-       <ToolFiles>
-       </ToolFiles>
-       <Configurations>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory=".\Release"
-                       IntermediateDirectory=".\Release"
-                       ConfigurationType="4"
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
-                       UseOfMFC="0"
-                       ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
-                       >
-                       <Tool Name="VCPreBuildEventTool"
-                       />
-                       <Tool Name="VCCustomBuildTool"
-                       />
-                       <Tool Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Release/libcurl.tlb" HeaderFileName=""
-                       />
-                       <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" PrecompiledHeaderFile=".\Release/libcurl.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"
-                       />
-                       <Tool Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033"
-                       />
-                       <Tool Name="VCPreLinkEventTool"
-                       />
-                       <Tool Name="VCLibrarianTool"
-                       />
-                       <Tool Name="VCALinkTool"
-                       />
-                       <Tool Name="VCXDCMakeTool"
-                       />
-                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Release/libcurl.bsc"
-                       />
-                       <Tool Name="VCFxCopTool"
-                       />
-                       <Tool Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory=".\Debug"
-                       IntermediateDirectory=".\Debug"
-                       ConfigurationType="4"
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
-                       UseOfMFC="0"
-                       ATLMinimizesCRunTimeLibraryUsage="false"
-                       CharacterSet="2"
-                       >
-                       <Tool Name="VCPreBuildEventTool"
-                       />
-                       <Tool Name="VCCustomBuildTool"
-                       />
-                       <Tool Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Debug/libcurl.tlb" HeaderFileName=""
-                       />
-                       <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" PrecompiledHeaderFile=".\Debug/libcurl.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"
-                       />
-                       <Tool Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033"
-                       />
-                       <Tool Name="VCPreLinkEventTool"
-                       />
-                       <Tool Name="VCLibrarianTool"
-                       />
-                       <Tool Name="VCALinkTool"
-                       />
-                       <Tool Name="VCXDCMakeTool"
-                       />
-                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Debug/libcurl.bsc"
-                       />
-                       <Tool Name="VCFxCopTool"
-                       />
-                       <Tool Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter
-                       Name="Source Files"
-                       >
-
-<File RelativePath="base64.c"></File>\r
-<File RelativePath="connect.c"></File>\r
-<File RelativePath="content_encoding.c"></File>\r
-<File RelativePath="cookie.c"></File>\r
-<File RelativePath="curl_addrinfo.c"></File>\r
-<File RelativePath="curl_fnmatch.c"></File>\r
-<File RelativePath="curl_gethostname.c"></File>\r
-<File RelativePath="curl_memrchr.c"></File>\r
-<File RelativePath="curl_rand.c"></File>\r
-<File RelativePath="curl_rtmp.c"></File>\r
-<File RelativePath="curl_sspi.c"></File>\r
-<File RelativePath="curl_threads.c"></File>\r
-<File RelativePath="dict.c"></File>\r
-<File RelativePath="easy.c"></File>\r
-<File RelativePath="escape.c"></File>\r
-<File RelativePath="file.c"></File>\r
-<File RelativePath="fileinfo.c"></File>\r
-<File RelativePath="formdata.c"></File>\r
-<File RelativePath="ftp.c"></File>\r
-<File RelativePath="ftplistparser.c"></File>\r
-<File RelativePath="getenv.c"></File>\r
-<File RelativePath="getinfo.c"></File>\r
-<File RelativePath="gopher.c"></File>\r
-<File RelativePath="gtls.c"></File>\r
-<File RelativePath="hash.c"></File>\r
-<File RelativePath="hmac.c"></File>\r
-<File RelativePath="hostares.c"></File>\r
-<File RelativePath="hostasyn.c"></File>\r
-<File RelativePath="hostip4.c"></File>\r
-<File RelativePath="hostip6.c"></File>\r
-<File RelativePath="hostip.c"></File>\r
-<File RelativePath="hostsyn.c"></File>\r
-<File RelativePath="hostthre.c"></File>\r
-<File RelativePath="http.c"></File>\r
-<File RelativePath="http_chunks.c"></File>\r
-<File RelativePath="http_digest.c"></File>\r
-<File RelativePath="http_negotiate.c"></File>\r
-<File RelativePath="http_ntlm.c"></File>\r
-<File RelativePath="if2ip.c"></File>\r
-<File RelativePath="imap.c"></File>\r
-<File RelativePath="inet_ntop.c"></File>\r
-<File RelativePath="inet_pton.c"></File>\r
-<File RelativePath="krb4.c"></File>\r
-<File RelativePath="krb5.c"></File>\r
-<File RelativePath="ldap.c"></File>\r
-<File RelativePath="llist.c"></File>\r
-<File RelativePath="md4.c"></File>\r
-<File RelativePath="md5.c"></File>\r
-<File RelativePath="memdebug.c"></File>\r
-<File RelativePath="mprintf.c"></File>\r
-<File RelativePath="multi.c"></File>\r
-<File RelativePath="netrc.c"></File>\r
-<File RelativePath="nonblock.c"></File>\r
-<File RelativePath="nss.c"></File>\r
-<File RelativePath="openldap.c"></File>\r
-<File RelativePath="parsedate.c"></File>\r
-<File RelativePath="pingpong.c"></File>\r
-<File RelativePath="polarssl.c"></File>\r
-<File RelativePath="pop3.c"></File>\r
-<File RelativePath="progress.c"></File>\r
-<File RelativePath="qssl.c"></File>\r
-<File RelativePath="rawstr.c"></File>\r
-<File RelativePath="rtsp.c"></File>\r
-<File RelativePath="security.c"></File>\r
-<File RelativePath="select.c"></File>\r
-<File RelativePath="sendf.c"></File>\r
-<File RelativePath="share.c"></File>\r
-<File RelativePath="slist.c"></File>\r
-<File RelativePath="smtp.c"></File>\r
-<File RelativePath="socks.c"></File>\r
-<File RelativePath="socks_gssapi.c"></File>\r
-<File RelativePath="socks_sspi.c"></File>\r
-<File RelativePath="speedcheck.c"></File>\r
-<File RelativePath="splay.c"></File>\r
-<File RelativePath="ssh.c"></File>\r
-<File RelativePath="sslgen.c"></File>\r
-<File RelativePath="ssluse.c"></File>\r
-<File RelativePath="strdup.c"></File>\r
-<File RelativePath="strequal.c"></File>\r
-<File RelativePath="strerror.c"></File>\r
-<File RelativePath="strtok.c"></File>\r
-<File RelativePath="strtoofft.c"></File>\r
-<File RelativePath="telnet.c"></File>\r
-<File RelativePath="tftp.c"></File>\r
-<File RelativePath="timeval.c"></File>\r
-<File RelativePath="transfer.c"></File>\r
-<File RelativePath="url.c"></File>\r
-<File RelativePath="version.c"></File>\r
-<File RelativePath="warnless.c"></File>\r
-<File RelativePath="wildcard.c"></File>\r
-</Filter><Filter       Name="Header Files">\r
-<File RelativePath="arpa_telnet.h"></File>\r
-<File RelativePath="config-win32.h"></File>\r
-<File RelativePath="connect.h"></File>\r
-<File RelativePath="content_encoding.h"></File>\r
-<File RelativePath="cookie.h"></File>\r
-<File RelativePath="curl_addrinfo.h"></File>\r
-<File RelativePath="curl_base64.h"></File>\r
-<File RelativePath="curl_fnmatch.h"></File>\r
-<File RelativePath="curl_gethostname.h"></File>\r
-<File RelativePath="curl_hmac.h"></File>\r
-<File RelativePath="curl_ldap.h"></File>\r
-<File RelativePath="curl_md4.h"></File>\r
-<File RelativePath="curl_md5.h"></File>\r
-<File RelativePath="curl_memory.h"></File>\r
-<File RelativePath="curl_memrchr.h"></File>\r
-<File RelativePath="curl_rand.h"></File>\r
-<File RelativePath="curl_rtmp.h"></File>\r
-<File RelativePath="curl_sspi.h"></File>\r
-<File RelativePath="curl_threads.h"></File>\r
-<File RelativePath="curlx.h"></File>\r
-<File RelativePath="dict.h"></File>\r
-<File RelativePath="easyif.h"></File>\r
-<File RelativePath="escape.h"></File>\r
-<File RelativePath="file.h"></File>\r
-<File RelativePath="fileinfo.h"></File>\r
-<File RelativePath="formdata.h"></File>\r
-<File RelativePath="ftp.h"></File>\r
-<File RelativePath="ftplistparser.h"></File>\r
-<File RelativePath="getinfo.h"></File>\r
-<File RelativePath="gopher.h"></File>\r
-<File RelativePath="gtls.h"></File>\r
-<File RelativePath="hash.h"></File>\r
-<File RelativePath="hostip.h"></File>\r
-<File RelativePath="http_chunks.h"></File>\r
-<File RelativePath="http_digest.h"></File>\r
-<File RelativePath="http.h"></File>\r
-<File RelativePath="http_negotiate.h"></File>\r
-<File RelativePath="http_ntlm.h"></File>\r
-<File RelativePath="if2ip.h"></File>\r
-<File RelativePath="imap.h"></File>\r
-<File RelativePath="inet_ntop.h"></File>\r
-<File RelativePath="inet_pton.h"></File>\r
-<File RelativePath="krb4.h"></File>\r
-<File RelativePath="llist.h"></File>\r
-<File RelativePath="memdebug.h"></File>\r
-<File RelativePath="multiif.h"></File>\r
-<File RelativePath="netrc.h"></File>\r
-<File RelativePath="nonblock.h"></File>\r
-<File RelativePath="nssg.h"></File>\r
-<File RelativePath="parsedate.h"></File>\r
-<File RelativePath="pingpong.h"></File>\r
-<File RelativePath="polarssl.h"></File>\r
-<File RelativePath="pop3.h"></File>\r
-<File RelativePath="progress.h"></File>\r
-<File RelativePath="qssl.h"></File>\r
-<File RelativePath="rawstr.h"></File>\r
-<File RelativePath="rtsp.h"></File>\r
-<File RelativePath="select.h"></File>\r
-<File RelativePath="sendf.h"></File>\r
-<File RelativePath="setup.h"></File>\r
-<File RelativePath="setup_once.h"></File>\r
-<File RelativePath="share.h"></File>\r
-<File RelativePath="slist.h"></File>\r
-<File RelativePath="smtp.h"></File>\r
-<File RelativePath="sockaddr.h"></File>\r
-<File RelativePath="socks.h"></File>\r
-<File RelativePath="speedcheck.h"></File>\r
-<File RelativePath="splay.h"></File>\r
-<File RelativePath="ssh.h"></File>\r
-<File RelativePath="sslgen.h"></File>\r
-<File RelativePath="ssluse.h"></File>\r
-<File RelativePath="strdup.h"></File>\r
-<File RelativePath="strequal.h"></File>\r
-<File RelativePath="strerror.h"></File>\r
-<File RelativePath="strtok.h"></File>\r
-<File RelativePath="strtoofft.h"></File>\r
-<File RelativePath="telnet.h"></File>\r
-<File RelativePath="tftp.h"></File>\r
-<File RelativePath="timeval.h"></File>\r
-<File RelativePath="transfer.h"></File>\r
-<File RelativePath="urldata.h"></File>\r
-<File RelativePath="url.h"></File>\r
-<File RelativePath="warnless.h"></File>\r
-<File RelativePath="wildcard.h"></File>\r
-\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-                       >\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
index 43ae5de..ae978a4 100644 (file)
@@ -1,13 +1,13 @@
 HIDDEN
 {
-       local:
-               __*;
-               _rest*;
-               _save*;
+  local:
+    __*;
+    _rest*;
+    _save*;
 };
 
-CURL_@VERSIONED_FLAVOUR@3
+CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4
 {
-       global: curl_*; Curl_*;
-       local: *;
+  global: curl_*;
+  local: *;
 };
index 71238fa..40bb628 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <string.h>
-#include <stdlib.h>
+#include "curl_setup.h"
 
 #include "llist.h"
 #include "curl_memory.h"
@@ -31,6 +28,9 @@
 /* this must be the last include file */
 #include "memdebug.h"
 
+/*
+ * @unittest: 1300
+ */
 static void
 llist_init(struct curl_llist *l, curl_llist_dtor dtor)
 {
@@ -46,7 +46,7 @@ Curl_llist_alloc(curl_llist_dtor dtor)
   struct curl_llist *list;
 
   list = malloc(sizeof(struct curl_llist));
-  if(NULL == list)
+  if(!list)
     return NULL;
 
   llist_init(list, dtor);
@@ -62,6 +62,8 @@ Curl_llist_alloc(curl_llist_dtor dtor)
  * inserted first in the list.
  *
  * Returns: 1 on success and 0 on failure.
+ *
+ * @unittest: 1300
  */
 int
 Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
@@ -101,6 +103,9 @@ Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
   return 1;
 }
 
+/*
+ * @unittest: 1300
+ */
 int
 Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
                   void *user)
@@ -115,7 +120,8 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
       list->tail = NULL;
     else
       e->next->prev = NULL;
-  } else {
+  }
+  else {
     e->prev->next = e->next;
     if(!e->next)
       list->tail = e->prev;
@@ -125,6 +131,10 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
 
   list->dtor(user, e->ptr);
 
+  e->ptr  = NULL;
+  e->prev = NULL;
+  e->next = NULL;
+
   free(e);
   --list->size;
 
@@ -148,8 +158,12 @@ Curl_llist_count(struct curl_llist *list)
   return list->size;
 }
 
+/*
+ * @unittest: 1300
+ */
 int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e,
-                    struct curl_llist *to_list, struct curl_llist_element *to_e)
+                    struct curl_llist *to_list,
+                    struct curl_llist_element *to_e)
 {
   /* Remove element from list */
   if(e == NULL || list->size == 0)
index c33912a..27ddb71 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __LLIST_H
-#define __LLIST_H
+#ifndef HEADER_CURL_LLIST_H
+#define HEADER_CURL_LLIST_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 #include <stddef.h>
 
 typedef void (*curl_llist_dtor)(void *, void *);
@@ -53,4 +53,5 @@ void Curl_llist_destroy(struct curl_llist *, void *);
 int Curl_llist_move(struct curl_llist *, struct curl_llist_element *,
                     struct curl_llist *, struct curl_llist_element *);
 
-#endif
+#endif /* HEADER_CURL_LLIST_H */
+
index 7b7fa8f..c692e5e 100644 (file)
@@ -11,7 +11,6 @@ CC    =       m68k-amigaos-gcc
 CFLAGS =       -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall
 
 include Makefile.inc
-CSOURCES += amigaos.c
 OBJS = $(CSOURCES:.c=.o)
 
 all:   $(OBJS)
index d9f159d..7b2ca86 100644 (file)
@@ -1,6 +1,6 @@
 #
 #  Adapted for djgpp2 / Watt-32 / DOS by
-#  Gisle Vanem <giva@bgnett.no>
+#  Gisle Vanem <gvanem@broadpark.no>
 #
 
 DEPEND_PREREQ = curl_config.h
index ecf3bfc..6930e02 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
    documentation and/or software.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 /* NSS crypto library does not provide the MD4 hash algorithm, so that we have
  * a local implementation of it */
 #ifdef USE_NSS
 
 #include "curl_md4.h"
-#include <string.h>
+#include "warnless.h"
 
 typedef unsigned int UINT4;
 
@@ -113,19 +113,19 @@ static void MD4Update(MD4_CTX *context, const unsigned char *input,
   /* Compute number of bytes mod 64 */
   bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
   /* Update number of bits */
-  if ((context->count[0] += ((UINT4)inputLen << 3))
-      < ((UINT4)inputLen << 3))
+  if((context->count[0] += ((UINT4)inputLen << 3))
+     < ((UINT4)inputLen << 3))
     context->count[1]++;
   context->count[1] += ((UINT4)inputLen >> 29);
 
   partLen = 64 - bufindex;
   /* Transform as many times as possible.
    */
-  if (inputLen >= partLen) {
+  if(inputLen >= partLen) {
     memcpy(&context->buffer[bufindex], input, partLen);
     MD4Transform (context->state, context->buffer);
 
-    for (i = partLen; i + 63 < inputLen; i += 64)
+    for(i = partLen; i + 63 < inputLen; i += 64)
       MD4Transform (context->state, &input[i]);
 
     bufindex = 0;
@@ -251,7 +251,7 @@ static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
 {
   unsigned int i, j;
 
-  for (i = 0, j = 0; j < len; i++, j += 4) {
+  for(i = 0, j = 0; j < len; i++, j += 4) {
     output[j] = (unsigned char)(input[i] & 0xff);
     output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
     output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
@@ -262,11 +262,12 @@ static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
      a multiple of 4.
  */
-static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
+static void Decode (UINT4 *output, const unsigned char *input,
+                    unsigned int len)
 {
   unsigned int i, j;
 
-  for (i = 0, j = 0; j < len; i++, j += 4)
+  for(i = 0, j = 0; j < len; i++, j += 4)
     output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
       (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
 }
@@ -275,7 +276,7 @@ void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
 {
   MD4_CTX ctx;
   MD4Init(&ctx);
-  MD4Update(&ctx, input, (unsigned int)len);
+  MD4Update(&ctx, input, curlx_uztoui(len));
   MD4Final(output, &ctx);
 }
 #endif /* USE_NSS */
index b3912c5..d8344db 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
 
-#include <string.h>
-
 #include "curl_md5.h"
 #include "curl_hmac.h"
+#include "warnless.h"
+
+#include "curl_memory.h"
+
+#if defined(USE_GNUTLS_NETTLE)
+
+#include <nettle/md5.h>
+/* The last #include file should be: */
+#include "memdebug.h"
+
+typedef struct md5_ctx MD5_CTX;
+
+static void MD5_Init(MD5_CTX * ctx)
+{
+  md5_init(ctx);
+}
 
-#ifdef USE_GNUTLS
+static void MD5_Update(MD5_CTX * ctx,
+                       const unsigned char * input,
+                       unsigned int inputLen)
+{
+  md5_update(ctx, inputLen, input);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
+{
+  md5_digest(ctx, 16, digest);
+}
+
+#elif defined(USE_GNUTLS)
 
 #include <gcrypt.h>
+/* The last #include file should be: */
+#include "memdebug.h"
 
 typedef gcry_md_hd_t MD5_CTX;
 
@@ -53,9 +81,7 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
   gcry_md_close(*ctx);
 }
 
-#else
-
-#ifdef USE_SSLEAY
+#elif defined(USE_SSLEAY)
 /* When OpenSSL is available we use the MD5-function from OpenSSL */
 
 #  ifdef USE_OPENSSL
@@ -64,8 +90,75 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx)
 #    include <md5.h>
 #  endif
 
-#else /* USE_SSLEAY */
-/* When OpenSSL is not available we use this code segment */
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+              (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+      (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+              (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
+
+/* For Apple operating systems: CommonCrypto has the functions we need.
+   These functions are available on Tiger and later, as well as iOS 2.0
+   and later. If you're building for an older cat, well, sorry.
+
+   Declaring the functions as static like this seems to be a bit more
+   reliable than defining COMMON_DIGEST_FOR_OPENSSL on older cats. */
+#  include <CommonCrypto/CommonDigest.h>
+#  define MD5_CTX CC_MD5_CTX
+
+static void MD5_Init(MD5_CTX *ctx)
+{
+  CC_MD5_Init(ctx);
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+                       const unsigned char *input,
+                       unsigned int inputLen)
+{
+  CC_MD5_Update(ctx, input, inputLen);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+  CC_MD5_Final(digest, ctx);
+}
+
+#elif defined(_WIN32)
+
+#include <wincrypt.h>
+
+typedef struct {
+  HCRYPTPROV hCryptProv;
+  HCRYPTHASH hHash;
+} MD5_CTX;
+
+static void MD5_Init(MD5_CTX *ctx)
+{
+  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+                         PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+    CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash);
+  }
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+                       const unsigned char *input,
+                       unsigned int inputLen)
+{
+  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+  unsigned long length;
+  CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
+  if(length == 16)
+    CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
+  if(ctx->hHash)
+    CryptDestroyHash(ctx->hHash);
+  if(ctx->hCryptProv)
+    CryptReleaseContext(ctx->hCryptProv, 0);
+}
+
+#else
+/* When no other crypto library is available we use this code segment */
 
 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
 rights reserved.
@@ -208,7 +301,7 @@ static void MD5_Update (struct md5_ctx *context,    /* context */
     memcpy(&context->buffer[bufindex], input, partLen);
     MD5Transform(context->state, context->buffer);
 
-    for (i = partLen; i + 63 < inputLen; i += 64)
+    for(i = partLen; i + 63 < inputLen; i += 64)
       MD5Transform(context->state, &input[i]);
 
     bufindex = 0;
@@ -345,7 +438,7 @@ static void Encode (unsigned char *output,
 {
   unsigned int i, j;
 
-  for (i = 0, j = 0; j < len; i++, j += 4) {
+  for(i = 0, j = 0; j < len; i++, j += 4) {
     output[j] = (unsigned char)(input[i] & 0xff);
     output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
     output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
@@ -362,14 +455,15 @@ static void Decode (UINT4 *output,
 {
   unsigned int i, j;
 
-  for (i = 0, j = 0; j < len; i++, j += 4)
+  for(i = 0, j = 0; j < len; i++, j += 4)
     output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
       (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
 }
 
-#endif /* USE_SSLEAY */
+#endif /* CRYPTO LIBS */
 
-#endif /* USE_GNUTLS */
+/* The last #include file should be: */
+#include "memdebug.h"
 
 const HMAC_params Curl_HMAC_MD5[] = {
   {
@@ -382,14 +476,66 @@ const HMAC_params Curl_HMAC_MD5[] = {
   }
 };
 
+const MD5_params Curl_DIGEST_MD5[] = {
+  {
+    (Curl_MD5_init_func) MD5_Init,      /* Digest initialization function */
+    (Curl_MD5_update_func) MD5_Update,  /* Digest update function */
+    (Curl_MD5_final_func) MD5_Final,    /* Digest computation end function */
+    sizeof(MD5_CTX),                    /* Size of digest context struct */
+    16                                  /* Result size */
+  }
+};
 
 void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */
                 const unsigned char *input)
 {
   MD5_CTX ctx;
   MD5_Init(&ctx);
-  MD5_Update(&ctx, input, (unsigned int)strlen((char *)input));
+  MD5_Update(&ctx, input, curlx_uztoui(strlen((char *)input)));
   MD5_Final(outbuffer, &ctx);
 }
 
+MD5_context *Curl_MD5_init(const MD5_params *md5params)
+{
+  MD5_context *ctxt;
+
+  /* Create MD5 context */
+  ctxt = malloc(sizeof *ctxt);
+
+  if(!ctxt)
+    return ctxt;
+
+  ctxt->md5_hashctx = malloc(md5params->md5_ctxtsize);
+
+  if(!ctxt->md5_hashctx) {
+    free(ctxt);
+    return NULL;
+  }
+
+  ctxt->md5_hash = md5params;
+
+  (*md5params->md5_init_func)(ctxt->md5_hashctx);
+
+  return ctxt;
+}
+
+int Curl_MD5_update(MD5_context *context,
+                    const unsigned char *data,
+                    unsigned int len)
+{
+  (*context->md5_hash->md5_update_func)(context->md5_hashctx, data, len);
+
+  return 0;
+}
+
+int Curl_MD5_final(MD5_context *context, unsigned char *result)
+{
+  (*context->md5_hash->md5_final_func)(result, context->md5_hashctx);
+
+  free(context->md5_hashctx);
+  free(context);
+
+  return 0;
+}
+
 #endif /* CURL_DISABLE_CRYPTO_AUTH */
index 69e204b..7d68af8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef CURLDEBUG
-#include <curl/curl.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#include <curl/curl.h>
 
 #define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
 #include "urldata.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
 #define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
 #include "curl_memory.h"
 #include "memdebug.h"
 
 #ifndef HAVE_ASSERT_H
-#  define assert(x) do { } while (0)
+#  define assert(x) Curl_nop_stmt
+#endif
+
+/*
+ * Until 2011-08-17 libcurl's Memory Tracking feature also performed
+ * automatic malloc and free filling operations using 0xA5 and 0x13
+ * values. Our own preinitialization of dynamically allocated memory
+ * might be useful when not using third party memory debuggers, but
+ * on the other hand this would fool memory debuggers into thinking
+ * that all dynamically allocated memory is properly initialized.
+ *
+ * As a default setting, libcurl's Memory Tracking feature no longer
+ * performs preinitialization of dynamically allocated memory on its
+ * own. If you know what you are doing, and really want to retain old
+ * behavior, you can achieve this compiling with preprocessor symbols
+ * CURL_MT_MALLOC_FILL and CURL_MT_FREE_FILL defined with appropriate
+ * values.
+ */
+
+#ifdef CURL_MT_MALLOC_FILL
+# if (CURL_MT_MALLOC_FILL < 0) || (CURL_MT_MALLOC_FILL > 0xff)
+#   error "invalid CURL_MT_MALLOC_FILL or out of range"
+# endif
+#endif
+
+#ifdef CURL_MT_FREE_FILL
+# if (CURL_MT_FREE_FILL < 0) || (CURL_MT_FREE_FILL > 0xff)
+#   error "invalid CURL_MT_FREE_FILL or out of range"
+# endif
+#endif
+
+#if defined(CURL_MT_MALLOC_FILL) && defined(CURL_MT_FREE_FILL)
+# if (CURL_MT_MALLOC_FILL == CURL_MT_FREE_FILL)
+#   error "CURL_MT_MALLOC_FILL same as CURL_MT_FREE_FILL"
+# endif
+#endif
+
+#ifdef CURL_MT_MALLOC_FILL
+#  define mt_malloc_fill(buf,len) memset((buf), CURL_MT_MALLOC_FILL, (len))
+#else
+#  define mt_malloc_fill(buf,len) Curl_nop_stmt
+#endif
+
+#ifdef CURL_MT_FREE_FILL
+#  define mt_free_fill(buf,len) memset((buf), CURL_MT_FREE_FILL, (len))
+#else
+#  define mt_free_fill(buf,len) Curl_nop_stmt
 #endif
 
 struct memdebug {
   size_t size;
   union {
+    curl_off_t o;
     double d;
     void * p;
   } mem[1];
@@ -76,7 +112,7 @@ static long memsize = 0;  /* set number of mallocs allowed */
 void curl_memdebug(const char *logname)
 {
   if(!logfile) {
-    if(logname)
+    if(logname && *logname)
       logfile = fopen(logname, "w");
     else
       logfile = stderr;
@@ -144,13 +180,15 @@ void *curl_domalloc(size_t wantedsize, int line, const char *source)
   mem = (Curl_cmalloc)(size);
   if(mem) {
     /* fill memory with junk */
-    memset(mem->mem, 0xA5, wantedsize);
+    mt_malloc_fill(mem->mem, wantedsize);
     mem->size = wantedsize;
   }
 
   if(source)
-    curl_memlog("MEM %s:%d malloc(%zd) = %p\n",
-                source, line, wantedsize, mem ? mem->mem : 0);
+    curl_memlog("MEM %s:%d malloc(%zu) = %p\n",
+                source, line, wantedsize,
+                mem ? (void *)mem->mem : (void *)0);
+
   return (mem ? mem->mem : NULL);
 }
 
@@ -170,16 +208,15 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size,
   user_size = wanted_size * wanted_elements;
   size = sizeof(struct memdebug) + user_size;
 
-  mem = (Curl_cmalloc)(size);
-  if(mem) {
-    /* fill memory with zeroes */
-    memset(mem->mem, 0, user_size);
+  mem = (Curl_ccalloc)(1, size);
+  if(mem)
     mem->size = user_size;
-  }
 
   if(source)
     curl_memlog("MEM %s:%d calloc(%zu,%zu) = %p\n",
-                source, line, wanted_elements, wanted_size, mem?mem->mem:0);
+                source, line, wanted_elements, wanted_size,
+                mem ? (void *)mem->mem : (void *)0);
+
   return (mem ? mem->mem : NULL);
 }
 
@@ -201,10 +238,36 @@ char *curl_dostrdup(const char *str, int line, const char *source)
 
   if(source)
     curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n",
-                source, line, str, len, mem);
+                source, line, (void *)str, len, (void *)mem);
+
+  return mem;
+}
+
+#if defined(WIN32) && defined(UNICODE)
+wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source)
+{
+  wchar_t *mem;
+  size_t wsiz, bsiz;
+
+  assert(str != NULL);
+
+  if(countcheck("wcsdup", line, source))
+    return NULL;
+
+  wsiz = wcslen(str) + 1;
+  bsiz = wsiz * sizeof(wchar_t);
+
+  mem = curl_domalloc(bsiz, 0, NULL); /* NULL prevents logging */
+  if(mem)
+    memcpy(mem, str, bsiz);
+
+  if(source)
+    curl_memlog("MEM %s:%d wcsdup(%p) (%zu) = %p\n",
+                source, line, (void *)str, bsiz, (void *)mem);
 
   return mem;
 }
+#endif
 
 /* We provide a realloc() that accepts a NULL as pointer, which then
    performs a malloc(). In order to work with ares. */
@@ -236,7 +299,8 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,
   mem = (Curl_crealloc)(mem, size);
   if(source)
     curl_memlog("MEM %s:%d realloc(%p, %zu) = %p\n",
-                source, line, ptr, wantedsize, mem?mem->mem:NULL);
+                source, line, (void *)ptr, wantedsize,
+                mem ? (void *)mem->mem : (void *)0);
 
   if(mem) {
     mem->size = wantedsize;
@@ -264,14 +328,14 @@ void curl_dofree(void *ptr, int line, const char *source)
 #  pragma warning(pop)
 #endif
 
-  /* destroy  */
-  memset(mem->mem, 0x13, mem->size);
+  /* destroy */
+  mt_free_fill(mem->mem, mem->size);
 
   /* free for real */
   (Curl_cfree)(mem);
 
   if(source)
-    curl_memlog("MEM %s:%d free(%p)\n", source, line, ptr);
+    curl_memlog("MEM %s:%d free(%p)\n", source, line, (void *)ptr);
 }
 
 curl_socket_t curl_socket(int domain, int type, int protocol,
@@ -284,11 +348,33 @@ curl_socket_t curl_socket(int domain, int type, int protocol,
                     "FD %s:%d socket() = %zd\n" ;
 
   curl_socket_t sockfd = socket(domain, type, protocol);
+
   if(source && (sockfd != CURL_SOCKET_BAD))
     curl_memlog(fmt, source, line, sockfd);
+
   return sockfd;
 }
 
+#ifdef HAVE_SOCKETPAIR
+int curl_socketpair(int domain, int type, int protocol,
+                    curl_socket_t socket_vector[2],
+                    int line, const char *source)
+{
+  const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ?
+                    "FD %s:%d socketpair() = %d %d\n" :
+                    (sizeof(curl_socket_t) == sizeof(long)) ?
+                    "FD %s:%d socketpair() = %ld %ld\n" :
+                    "FD %s:%d socketpair() = %zd %zd\n" ;
+
+  int res = socketpair(domain, type, protocol, socket_vector);
+
+  if(source && (0 == res))
+    curl_memlog(fmt, source, line, socket_vector[0], socket_vector[1]);
+
+  return res;
+}
+#endif
+
 curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen,
                           int line, const char *source)
 {
@@ -300,9 +386,12 @@ curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen,
 
   struct sockaddr *addr = (struct sockaddr *)saddr;
   curl_socklen_t *addrlen = (curl_socklen_t *)saddrlen;
+
   curl_socket_t sockfd = accept(s, addr, addrlen);
+
   if(source && (sockfd != CURL_SOCKET_BAD))
     curl_memlog(fmt, source, line, sockfd);
+
   return sockfd;
 }
 
@@ -331,9 +420,11 @@ FILE *curl_fopen(const char *file, const char *mode,
                  int line, const char *source)
 {
   FILE *res=fopen(file, mode);
+
   if(source)
     curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
-                source, line, file, mode, res);
+                source, line, file, mode, (void *)res);
+
   return res;
 }
 
@@ -342,9 +433,11 @@ FILE *curl_fdopen(int filedes, const char *mode,
                   int line, const char *source)
 {
   FILE *res=fdopen(filedes, mode);
+
   if(source)
     curl_memlog("FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n",
-                source, line, filedes, mode, res);
+                source, line, filedes, mode, (void *)res);
+
   return res;
 }
 #endif
@@ -356,9 +449,11 @@ int curl_fclose(FILE *file, int line, const char *source)
   assert(file != NULL);
 
   res=fclose(file);
+
   if(source)
     curl_memlog("FILE %s:%d fclose(%p)\n",
-                source, line, file);
+                source, line, (void *)file);
+
   return res;
 }
 
index 56b9f12..bd565c8 100644 (file)
@@ -1,6 +1,6 @@
+#ifndef HEADER_CURL_MEMDEBUG_H
+#define HEADER_CURL_MEMDEBUG_H
 #ifdef CURLDEBUG
-#ifndef _CURL_MEMDEBUG_H
-#define _CURL_MEMDEBUG_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -8,7 +8,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * as well as the library. Do not mix with library internals!
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#include <stdio.h>
+#define CURL_MT_LOGFNAME_BUFSIZE 512
 
 #define logfile curl_debuglogfile
 
@@ -47,10 +40,17 @@ extern FILE *logfile;
 
 /* memory functions */
 CURL_EXTERN void *curl_domalloc(size_t size, int line, const char *source);
-CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line, const char *source);
-CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
+CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line,
+                                const char *source);
+CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line,
+                                 const char *source);
 CURL_EXTERN void curl_dofree(void *ptr, int line, const char *source);
 CURL_EXTERN char *curl_dostrdup(const char *str, int line, const char *source);
+#if defined(WIN32) && defined(UNICODE)
+CURL_EXTERN wchar_t *curl_dowcsdup(const wchar_t *str, int line,
+                                   const char *source);
+#endif
+
 CURL_EXTERN void curl_memdebug(const char *logname);
 CURL_EXTERN void curl_memlimit(long limit);
 CURL_EXTERN void curl_memlog(const char *format, ...);
@@ -64,6 +64,11 @@ CURL_EXTERN int curl_sclose(curl_socket_t sockfd,
                             int line , const char *source);
 CURL_EXTERN curl_socket_t curl_accept(curl_socket_t s, void *a, void *alen,
                                       int line, const char *source);
+#ifdef HAVE_SOCKETPAIR
+CURL_EXTERN int curl_socketpair(int domain, int type, int protocol,
+                                curl_socket_t socket_vector[2],
+                                int line , const char *source);
+#endif
 
 /* FILE functions */
 CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line,
@@ -84,11 +89,29 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
 #define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
 #define free(ptr) curl_dofree(ptr, __LINE__, __FILE__)
 
+#ifdef WIN32
+#  ifdef UNICODE
+#    undef wcsdup
+#    define wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+#    undef _wcsdup
+#    define _wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+#    undef _tcsdup
+#    define _tcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+#  else
+#    undef _tcsdup
+#    define _tcsdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
+#  endif
+#endif
+
 #define socket(domain,type,protocol)\
  curl_socket(domain,type,protocol,__LINE__,__FILE__)
 #undef accept /* for those with accept as a macro */
 #define accept(sock,addr,len)\
  curl_accept(sock,addr,len,__LINE__,__FILE__)
+#ifdef HAVE_SOCKETPAIR
+#define socketpair(domain,type,protocol,socket_vector)\
+ curl_socketpair(domain,type,protocol,socket_vector,__LINE__,__FILE__)
+#endif
 
 #ifdef HAVE_GETADDRINFO
 #if defined(getaddrinfo) && defined(__osf__)
@@ -131,9 +154,23 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
 
 #endif /* MEMDEBUG_NODEFINES */
 
-#endif /* _CURL_MEMDEBUG_H */
 #endif /* CURLDEBUG */
 
+/*
+** Following section applies even when CURLDEBUG is not defined.
+*/
+
 #ifndef fake_sclose
-#define fake_sclose(x)
+#define fake_sclose(x)  Curl_nop_stmt
 #endif
+
+/*
+ * Curl_safefree defined as a macro to allow MemoryTracking feature
+ * to log free() calls at same location where Curl_safefree is used.
+ * This macro also assigns NULL to given pointer when free'd.
+ */
+
+#define Curl_safefree(ptr) \
+  do {if((ptr)) {free((ptr)); (ptr) = NULL;}} WHILE_FALSE
+
+#endif /* HEADER_CURL_MEMDEBUG_H */
index 3586dc4..1a9c859 100755 (executable)
@@ -6,7 +6,7 @@
 # *                            | (__| |_| |  _ <| |___
 # *                             \___|\___/|_| \_\_____|
 # *
-# * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2013, 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
@@ -34,15 +34,19 @@ use Getopt::Std;
 use MIME::Base64;
 use LWP::UserAgent;
 use strict;
-use vars qw($opt_b $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v);
+use vars qw($opt_b $opt_f $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v $opt_w);
 
-my $url = 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
+my $url = 'http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
 # If the OpenSSL commandline is not in search path you can configure it here!
 my $openssl = 'openssl';
 
-my $version = '1.14';
+my $version = '1.19';
 
-getopts('bhilnqtuv');
+$opt_w = 76; # default base64 encoded lines length
+
+$0 =~ s@.*(/|\\)@@;
+$Getopt::Std::STANDARD_HELP_VERSION = 1;
+getopts('bfhilnqtuvw:');
 
 if ($opt_i) {
   print ("=" x 78 . "\n");
@@ -56,11 +60,10 @@ if ($opt_i) {
   print ("=" x 78 . "\n");
 }
 
-$0 =~ s/\\/\//g;
-$0 = substr($0, rindex($0, '/') + 1);
-if ($opt_h) {
-  printf("Usage:\t%s [-b] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [<outputfile>]\n", $0);
+sub HELP_MESSAGE() {
+  print "Usage:\t${0} [-b] [-f] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [-w<l>] [<outputfile>]\n";
   print "\t-b\tbackup an existing version of ca-bundle.crt\n";
+  print "\t-f\tforce rebuild even if certdata.txt is current\n";
   print "\t-i\tprint version info about used modules\n";
   print "\t-l\tprint license info about certdata.txt\n";
   print "\t-n\tno download of certdata.txt (to use existing)\n";
@@ -68,48 +71,60 @@ if ($opt_h) {
   print "\t-t\tinclude plain text listing of certificates\n";
   print "\t-u\tunlink (remove) certdata.txt after processing\n";
   print "\t-v\tbe verbose and print out processed CAs\n";
+  print "\t-w <l>\twrap base64 output lines after <l> chars (default: ${opt_w})\n";
   exit;
 }
 
+sub VERSION_MESSAGE() {
+  print "${0} version ${version} running Perl ${]} on ${^O}\n";
+}
+
+HELP_MESSAGE() if ($opt_h);
+
 my $crt = $ARGV[0] || 'ca-bundle.crt';
-my $txt = substr($url, rindex($url, '/') + 1);
-$txt =~ s/\?.*//;
+(my $txt = $url) =~ s@(.*/|\?.*)@@g;
+
+my $stdout = $crt eq '-';
+my $resp;
+my $fetched;
 
-if (!$opt_n || !-e $txt) {
-  print "Downloading '$txt' ...\n" if (!$opt_q);
+unless ($opt_n and -e $txt) {
+  print STDERR "Downloading '$txt' ...\n" if (!$opt_q);
   my $ua  = new LWP::UserAgent(agent => "$0/$version");
-  my $req = new HTTP::Request('GET', $url);
-  my $res = $ua->request($req);
-  if ($res->is_success) {
-    open(TXT,">$txt") or die "Couldn't open $txt: $!";
-    print TXT $res->content . "\n";
-    close(TXT) or die "Couldn't close $txt: $!";
+  $ua->env_proxy();
+  $resp = $ua->mirror($url, $txt);
+  if ($resp && $resp->code eq '304') {
+    print STDERR "Not modified\n" unless $opt_q;
+    exit 0 if -e $crt && !$opt_f;
   } else {
-    die $res->status_line;
+      $fetched = 1;
   }
-}
-
-if ($opt_b && -e $crt) {
-  my $bk = 1;
-  while (-e "$crt.~${bk}~") {
-    $bk++;
+  if( !$resp || $resp->code !~ /^(?:200|304)$/ ) {
+      print STDERR "Unable to download latest data: "
+        . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed") . "\n"
+        unless $opt_q;
+      exit 1 if -e $crt || ! -r $txt;
   }
-  rename $crt, "$crt.~${bk}~";
 }
 
+my $currentdate = scalar gmtime($fetched ? $resp->last_modified : (stat($txt))[9]);
+
 my $format = $opt_t ? "plain text and " : "";
-my $currentdate = scalar gmtime() . " UTC";
-open(CRT,">$crt") or die "Couldn't open $crt: $!";
+if( $stdout ) {
+    open(CRT, '> -') or die "Couldn't open STDOUT: $!\n";
+} else {
+    open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n";
+}
 print CRT <<EOT;
 ##
 ## $crt -- Bundle of CA Root Certificates
 ##
-## Converted at: ${currentdate}
+## Certificate data from Mozilla as of: ${currentdate}
 ##
 ## This is a bundle of X.509 certificates of public Certificate Authorities
 ## (CA). These were automatically extracted from Mozilla's root certificates
 ## file (certdata.txt).  This file can be found in the mozilla source tree:
-## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt'
+## ${url}
 ##
 ## It contains the certificates in ${format}PEM format and therefore
 ## can be directly used with curl / libcurl / php_curl, or with
@@ -119,15 +134,15 @@ print CRT <<EOT;
 
 EOT
 
-close(CRT) or die "Couldn't close $crt: $!";
-
-print "Processing  '$txt' ...\n" if (!$opt_q);
+print STDERR "Processing  '$txt' ...\n" if (!$opt_q);
 my $caname;
 my $certnum = 0;
-open(TXT,"$txt") or die "Couldn't open $txt: $!";
+my $skipnum = 0;
+my $start_of_cert = 0;
+
+open(TXT,"$txt") or die "Couldn't open $txt: $!\n";
 while (<TXT>) {
   if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
-    open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
     print CRT;
     print if ($opt_l);
     while (<TXT>) {
@@ -135,19 +150,22 @@ while (<TXT>) {
       print if ($opt_l);
       last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
     }
-    close(CRT) or die "Couldn't close $crt: $!";
   }
   next if /^#|^\s*$/;
   chomp;
   if (/^CVS_ID\s+\"(.*)\"/) {
-    open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
     print CRT "# $1\n";
-    close(CRT) or die "Couldn't close $crt: $!";
   }
-  if (/^CKA_LABEL\s+[A-Z0-9]+\s+\"(.*)\"/) {
+
+  # this is a match for the start of a certificate
+  if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) {
+    $start_of_cert = 1
+  }
+  if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) {
     $caname = $1;
   }
-  if (/^CKA_VALUE MULTILINE_OCTAL/) {
+  my $untrusted = 1;
+  if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) {
     my $data;
     while (<TXT>) {
       last if (/^END/);
@@ -158,28 +176,65 @@ while (<TXT>) {
         $data .= chr(oct);
       }
     }
-    my $pem = "-----BEGIN CERTIFICATE-----\n"
-            . MIME::Base64::encode($data)
-            . "-----END CERTIFICATE-----\n";
-    open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
-    print CRT "\n$caname\n";
-    print CRT ("=" x length($caname) . "\n");
-    if (!$opt_t) {
-      print CRT $pem;
+    # scan forwards until the trust part
+    while (<TXT>) {
+      last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/);
+      chomp;
+    }
+    # now scan the trust part for untrusted certs
+    while (<TXT>) {
+      last if (/^#/);
+      if (/^CKA_TRUST_SERVER_AUTH\s+CK_TRUST\s+CKT_NSS_TRUSTED_DELEGATOR$/) {
+          $untrusted = 0;
+      }
     }
-    close(CRT) or die "Couldn't close $crt: $!";
-    if ($opt_t) {
-      open(TMP, "|$openssl x509 -md5 -fingerprint -text -inform PEM >> $crt") or die "Couldn't open openssl pipe: $!";
-      print TMP $pem;
-      close(TMP) or die "Couldn't close openssl pipe: $!";
+    if ($untrusted) {
+      $skipnum ++;
+    } else {
+      my $encoded = MIME::Base64::encode_base64($data, '');
+      $encoded =~ s/(.{1,${opt_w}})/$1\n/g;
+      my $pem = "-----BEGIN CERTIFICATE-----\n"
+              . $encoded
+              . "-----END CERTIFICATE-----\n";
+      print CRT "\n$caname\n";
+      print CRT ("=" x length($caname) . "\n");
+      if (!$opt_t) {
+        print CRT $pem;
+      } else {
+        my $pipe = "|$openssl x509 -md5 -fingerprint -text -inform PEM";
+        if (!$stdout) {
+          $pipe .= " >> $crt.~";
+          close(CRT) or die "Couldn't close $crt.~: $!";
+        }
+        open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
+        print TMP $pem;
+        close(TMP) or die "Couldn't close openssl pipe: $!";
+        if (!$stdout) {
+          open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
+        }
+      }
+      print STDERR "Parsing: $caname\n" if ($opt_v);
+      $certnum ++;
+      $start_of_cert = 0;
     }
-    print "Parsing: $caname\n" if ($opt_v);
-    $certnum ++;
   }
 }
-close(TXT) or die "Couldn't close $txt: $!";
+close(TXT) or die "Couldn't close $txt: $!\n";
+close(CRT) or die "Couldn't close $crt.~: $!\n";
+unless( $stdout ) {
+    if ($opt_b && -e $crt) {
+        my $bk = 1;
+        while (-e "$crt.~${bk}~") {
+            $bk++;
+        }
+        rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n";
+    } elsif( -e $crt ) {
+        unlink( $crt ) or die "Failed to remove $crt: $!\n";
+    }
+    rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n";
+}
 unlink $txt if ($opt_u);
-print "Done ($certnum CA certs processed).\n" if (!$opt_q);
+print STDERR "Done ($certnum CA certs processed, $skipnum untrusted skipped).\n" if (!$opt_q);
 
 exit;
 
index 5a4b4ed..d868079 100755 (executable)
@@ -5,7 +5,7 @@
 '*                            | (__| |_| |  _ <| |___\r
 '*                             \___|\___/|_| \_\_____|\r
 '*\r
-'* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+'* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
 '*\r
 '* This software is licensed as described in the file COPYING, which\r
 '* you should have received as part of this distribution. The terms\r
@@ -26,9 +26,9 @@
 '* Hacked by Guenter Knauf\r
 '***************************************************************************\r
 Option Explicit\r
-Const myVersion = "0.3.5"\r
+Const myVersion = "0.3.8"\r
 \r
-Const myUrl = "http://mxr.mozilla.org/firefox/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1"\r
+Const myUrl = "http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1"\r
 \r
 Const myOpenssl = "openssl.exe"\r
 \r
@@ -36,6 +36,7 @@ Const myCdSavF = FALSE       ' Flag: save downloaded data to file certdata.txt
 Const myCaBakF = TRUE        ' Flag: backup existing ca-bundle certificate\r
 Const myAskLiF = TRUE        ' Flag: display certdata.txt license agreement\r
 Const myAskTiF = TRUE        ' Flag: ask to include certificate text info\r
+Const myWrapLe = 76          ' Default length of base64 output lines\r
 \r
 '******************* Nothing to configure below! *******************\r
 Dim objShell, objNetwork, objFSO, objHttp\r
@@ -96,8 +97,10 @@ If (myAskTiF = TRUE) Then
   End If\r
 End If\r
 ' Process the received data\r
-Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts\r
-Dim myLabel, myOctets, myData, myPem, myRev, j\r
+Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts, myNumSkipped\r
+Dim myLabel, myOctets, myData, myPem, myRev, myUntrusted, j\r
+myNumSkipped = 0\r
+myNumCerts = 0\r
 myData = ""\r
 myLines = Split(myCdData, vbLf, -1)\r
 Set myFh = objFSO.OpenTextFile(myCaFile, 2, TRUE)\r
@@ -109,7 +112,7 @@ myFh.Write "##" & vbLf
 myFh.Write "## This is a bundle of X.509 certificates of public Certificate Authorities" & vbLf\r
 myFh.Write "## (CA). These were automatically extracted from Mozilla's root certificates" & vbLf\r
 myFh.Write "## file (certdata.txt).  This file can be found in the mozilla source tree:" & vbLf\r
-myFh.Write "## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt'" & vbLf\r
+myFh.Write "## '/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt'" & vbLf\r
 myFh.Write "##" & vbLf\r
 myFh.Write "## It contains the certificates in PEM format and therefore" & vbLf\r
 myFh.Write "## can be directly used with curl / libcurl / php_curl, or with" & vbLf\r
@@ -125,36 +128,45 @@ For i = 0 To UBound(myLines)
   If (myInsideCert = TRUE) Then\r
     If InstrRev(myLines(i), "END") Then\r
       myInsideCert = FALSE\r
-      myFh.Write myLabel & vbLf\r
-      myFh.Write String(Len(myLabel), "=") & vbLf\r
-      myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _\r
-              Base64Encode(myData) & vbLf & _\r
-              "-----END CERTIFICATE-----" & vbLf\r
-      If (myOptTxt = FALSE) Then\r
-        myFh.Write myPem & vbLf\r
+      While (i < UBound(myLines)) And Not (myLines(i) = "#")\r
+        i = i + 1\r
+        If InstrRev(myLines(i), "CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR") Then\r
+          myUntrusted = FALSE\r
+        End If\r
+      Wend\r
+      If (myUntrusted = TRUE) Then\r
+        myNumSkipped = myNumSkipped + 1\r
       Else\r
-        Dim myCmd, myRval, myTmpIn, myTmpOut\r
-        myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName\r
-        myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName\r
-        Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE)\r
-        myTmpFh.Write myPem\r
-        myTmpFh.Close\r
-        myCmd = myOpenssl & " x509 -md5 -fingerprint -text -inform PEM" & _\r
-                " -in " & myTmpIn & " -out " & myTmpOut\r
-        myRval = objShell.Run (myCmd, 0, TRUE)\r
-        objFSO.DeleteFile myTmpIn, TRUE\r
-        If Not (myRval = 0) Then\r
-          MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf\r
+        myFh.Write myLabel & vbLf\r
+        myFh.Write String(Len(myLabel), "=") & vbLf\r
+        myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _\r
+                Base64Encode(myData) & vbLf & _\r
+                "-----END CERTIFICATE-----" & vbLf\r
+        If (myOptTxt = FALSE) Then\r
+          myFh.Write myPem & vbLf\r
+        Else\r
+          Dim myCmd, myRval, myTmpIn, myTmpOut\r
+          myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName\r
+          myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName\r
+          Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE)\r
+          myTmpFh.Write myPem\r
+          myTmpFh.Close\r
+          myCmd = myOpenssl & " x509 -md5 -fingerprint -text -inform PEM" & _\r
+                  " -in " & myTmpIn & " -out " & myTmpOut\r
+          myRval = objShell.Run (myCmd, 0, TRUE)\r
+          objFSO.DeleteFile myTmpIn, TRUE\r
+          If Not (myRval = 0) Then\r
+            MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf\r
+            objFSO.DeleteFile myTmpOut, TRUE\r
+            WScript.Quit 3\r
+          End If\r
+          Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1)\r
+          myFh.Write myTmpFh.ReadAll & vbLf\r
+          myTmpFh.Close\r
           objFSO.DeleteFile myTmpOut, TRUE\r
-          WScript.Quit 3\r
         End If\r
-        Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1)\r
-        myFh.Write myTmpFh.ReadAll & vbLf\r
-        myTmpFh.Close\r
-        objFSO.DeleteFile myTmpOut, TRUE\r
+        myNumCerts = myNumCerts + 1\r
       End If\r
-      myData = ""\r
-      myNumCerts = myNumCerts + 1\r
     Else\r
       myOctets = Split(myLines(i), "\")\r
       For j = 1 To UBound(myOctets)\r
@@ -169,6 +181,8 @@ For i = 0 To UBound(myLines)
   End If\r
   If InstrRev(myLines(i), "CKA_VALUE MULTILINE_OCTAL") Then\r
     myInsideCert = TRUE\r
+    myUntrusted = TRUE\r
+    myData = ""\r
   End If\r
   If InstrRev(myLines(i), "***** BEGIN LICENSE BLOCK *****") Then\r
     myInsideLicense = TRUE\r
@@ -191,7 +205,8 @@ For i = 0 To UBound(myLines)
   End If\r
 Next\r
 myFh.Close\r
-objShell.PopUp "Done (" & myNumCerts & " CA certs processed).", 20, mySelf, vbInformation\r
+objShell.PopUp "Done (" & myNumCerts & " CA certs processed, " & myNumSkipped & _\r
+               " untrusted skipped).", 20, mySelf, vbInformation\r
 WScript.Quit 0\r
 \r
 Function ConvertBinaryData(arrBytes)\r
@@ -224,7 +239,8 @@ End Function
 \r
 Function Base64Encode(inData)\r
   Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"\r
-  Dim cOut, sOut, I\r
+  Dim cOut, sOut, lWrap, I\r
+  lWrap = Int(myWrapLe * 3 / 4)\r
 \r
   'For each group of 3 bytes\r
   For I = 1 To Len(inData) Step 3\r
@@ -250,9 +266,9 @@ Function Base64Encode(inData)
     'Add the part To OutPut string\r
     sOut = sOut + pOut\r
 \r
-    'Add a new line For Each 76 chars In dest (76*3/4 = 57)\r
+    'Add a new line For Each myWrapLe chars In dest\r
     If (I < Len(inData) - 2) Then\r
-      If (I + 2) Mod 57 = 0 Then sOut = sOut & vbLf\r
+      If (I + 2) Mod lWrap = 0 Then sOut = sOut & vbLf\r
     End If\r
   Next\r
   Select Case Len(inData) Mod 3\r
index 536c0c2..8f392c7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1999 - 2013, 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
  * page at http://daniel.haxx.se/trio/
  */
 
-#include "setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <string.h>
+#include "curl_setup.h"
 
 #if defined(DJGPP) && (DJGPP_MINOR < 4)
 #undef _MPRINTF_REPLACE /* don't use x_was_used() here */
@@ -108,7 +103,7 @@ static const char upper_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
       done++; \
     else \
      return done; /* return immediately on failure */ \
-  } while(0)
+  } WHILE_FALSE
 
 /* Data type to read from the arglist */
 typedef enum  {
@@ -124,7 +119,7 @@ typedef enum  {
   FORMAT_WIDTH /* For internal use */
 } FormatType;
 
-/* convertion and display flags */
+/* conversion and display flags */
 enum {
   FLAGS_NEW        = 0,
   FLAGS_SPACE      = 1<<0,
@@ -208,101 +203,6 @@ static int dprintf_IsQualifierNoDollar(char c)
   }
 }
 
-#ifdef DPRINTF_DEBUG2
-static void dprintf_Pass1Report(va_stack_t *vto, int max)
-{
-  int i;
-  char buffer[256];
-  int bit;
-  int flags;
-
-  for(i=0; i<max; i++) {
-    char *type;
-    switch(vto[i].type) {
-    case FORMAT_UNKNOWN:
-      type = "unknown";
-      break;
-    case FORMAT_STRING:
-      type ="string";
-      break;
-    case FORMAT_PTR:
-      type ="pointer";
-      break;
-    case FORMAT_INT:
-      type = "int";
-      break;
-    case FORMAT_INTPTR:
-      type = "intptr";
-      break;
-    case FORMAT_LONG:
-      type = "long";
-      break;
-    case FORMAT_LONGLONG:
-      type = "long long";
-      break;
-    case FORMAT_DOUBLE:
-      type = "double";
-      break;
-    case FORMAT_LONGDOUBLE:
-      type = "long double";
-      break;
-    }
-
-
-    buffer[0]=0;
-
-    for(bit=0; bit<31; bit++) {
-      flags = vto[i].flags & (1<<bit);
-
-      if(flags & FLAGS_SPACE)
-        strcat(buffer, "space ");
-      else if(flags & FLAGS_SHOWSIGN)
-        strcat(buffer, "plus ");
-      else if(flags & FLAGS_LEFT)
-        strcat(buffer, "left ");
-      else if(flags & FLAGS_ALT)
-        strcat(buffer, "alt ");
-      else if(flags & FLAGS_SHORT)
-        strcat(buffer, "short ");
-      else if(flags & FLAGS_LONG)
-        strcat(buffer, "long ");
-      else if(flags & FLAGS_LONGLONG)
-        strcat(buffer, "longlong ");
-      else if(flags & FLAGS_LONGDOUBLE)
-        strcat(buffer, "longdouble ");
-      else if(flags & FLAGS_PAD_NIL)
-        strcat(buffer, "padnil ");
-      else if(flags & FLAGS_UNSIGNED)
-        strcat(buffer, "unsigned ");
-      else if(flags & FLAGS_OCTAL)
-        strcat(buffer, "octal ");
-      else if(flags & FLAGS_HEX)
-        strcat(buffer, "hex ");
-      else if(flags & FLAGS_UPPER)
-        strcat(buffer, "upper ");
-      else if(flags & FLAGS_WIDTH)
-        strcat(buffer, "width ");
-      else if(flags & FLAGS_WIDTHPARAM)
-        strcat(buffer, "widthparam ");
-      else if(flags & FLAGS_PREC)
-        strcat(buffer, "precision ");
-      else if(flags & FLAGS_PRECPARAM)
-        strcat(buffer, "precparam ");
-      else if(flags & FLAGS_CHAR)
-        strcat(buffer, "char ");
-      else if(flags & FLAGS_FLOATE)
-        strcat(buffer, "floate ");
-      else if(flags & FLAGS_FLOATG)
-        strcat(buffer, "floatg ");
-    }
-    printf("REPORT: %d. %s [%s]\n", i, type, buffer);
-
-  }
-
-
-}
-#endif
-
 /******************************************************************
  *
  * Pass 1:
@@ -480,11 +380,11 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
         break;
       case 'x':
         vto[i].type = FORMAT_INT;
-        flags |= FLAGS_HEX;
+        flags |= FLAGS_HEX|FLAGS_UNSIGNED;
         break;
       case 'X':
         vto[i].type = FORMAT_INT;
-        flags |= FLAGS_HEX|FLAGS_UPPER;
+        flags |= FLAGS_HEX|FLAGS_UPPER|FLAGS_UNSIGNED;
         break;
       case 'c':
         vto[i].type = FORMAT_INT;
@@ -542,72 +442,66 @@ static long dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos,
     }
   }
 
-#ifdef DPRINTF_DEBUG2
-  dprintf_Pass1Report(vto, max_param);
-#endif
-
   /* Read the arg list parameters into our data list */
-  for (i=0; i<max_param; i++) {
-    if((i + 1 < max_param) && (vto[i + 1].type == FORMAT_WIDTH))
-      {
-        /* Width/precision arguments must be read before the main argument
-         * they are attached to
-         */
-        vto[i + 1].data.num.as_signed = (mp_intmax_t)va_arg(arglist, int);
-      }
+  for(i=0; i<max_param; i++) {
+    if((i + 1 < max_param) && (vto[i + 1].type == FORMAT_WIDTH)) {
+      /* Width/precision arguments must be read before the main argument
+       * they are attached to
+       */
+      vto[i + 1].data.num.as_signed = (mp_intmax_t)va_arg(arglist, int);
+    }
 
-    switch (vto[i].type)
-      {
-      case FORMAT_STRING:
-        vto[i].data.str = va_arg(arglist, char *);
-        break;
+    switch (vto[i].type) {
+    case FORMAT_STRING:
+      vto[i].data.str = va_arg(arglist, char *);
+      break;
 
-      case FORMAT_INTPTR:
-      case FORMAT_UNKNOWN:
-      case FORMAT_PTR:
-        vto[i].data.ptr = va_arg(arglist, void *);
-        break;
+    case FORMAT_INTPTR:
+    case FORMAT_UNKNOWN:
+    case FORMAT_PTR:
+      vto[i].data.ptr = va_arg(arglist, void *);
+      break;
 
-      case FORMAT_INT:
+    case FORMAT_INT:
 #ifdef HAVE_LONG_LONG_TYPE
-        if((vto[i].flags & FLAGS_LONGLONG) && (vto[i].flags & FLAGS_UNSIGNED))
+      if((vto[i].flags & FLAGS_LONGLONG) && (vto[i].flags & FLAGS_UNSIGNED))
+        vto[i].data.num.as_unsigned =
+          (mp_uintmax_t)va_arg(arglist, mp_uintmax_t);
+      else if(vto[i].flags & FLAGS_LONGLONG)
+        vto[i].data.num.as_signed =
+          (mp_intmax_t)va_arg(arglist, mp_intmax_t);
+      else
+#endif
+      {
+        if((vto[i].flags & FLAGS_LONG) && (vto[i].flags & FLAGS_UNSIGNED))
           vto[i].data.num.as_unsigned =
-            (mp_uintmax_t)va_arg(arglist, mp_uintmax_t);
-        else if(vto[i].flags & FLAGS_LONGLONG)
+            (mp_uintmax_t)va_arg(arglist, unsigned long);
+        else if(vto[i].flags & FLAGS_LONG)
           vto[i].data.num.as_signed =
-            (mp_intmax_t)va_arg(arglist, mp_intmax_t);
+            (mp_intmax_t)va_arg(arglist, long);
+        else if(vto[i].flags & FLAGS_UNSIGNED)
+          vto[i].data.num.as_unsigned =
+            (mp_uintmax_t)va_arg(arglist, unsigned int);
         else
-#endif
-        {
-          if((vto[i].flags & FLAGS_LONG) && (vto[i].flags & FLAGS_UNSIGNED))
-            vto[i].data.num.as_unsigned =
-              (mp_uintmax_t)va_arg(arglist, unsigned long);
-          else if(vto[i].flags & FLAGS_LONG)
-            vto[i].data.num.as_signed =
-              (mp_intmax_t)va_arg(arglist, long);
-          else if(vto[i].flags & FLAGS_UNSIGNED)
-            vto[i].data.num.as_unsigned =
-              (mp_uintmax_t)va_arg(arglist, unsigned int);
-          else
-            vto[i].data.num.as_signed =
-              (mp_intmax_t)va_arg(arglist, int);
-        }
-        break;
+          vto[i].data.num.as_signed =
+            (mp_intmax_t)va_arg(arglist, int);
+      }
+      break;
 
-      case FORMAT_DOUBLE:
-        vto[i].data.dnum = va_arg(arglist, double);
-        break;
+    case FORMAT_DOUBLE:
+      vto[i].data.dnum = va_arg(arglist, double);
+      break;
 
-      case FORMAT_WIDTH:
-        /* Argument has been read. Silently convert it into an integer
-         * for later use
-         */
-        vto[i].type = FORMAT_INT;
-        break;
+    case FORMAT_WIDTH:
+      /* Argument has been read. Silently convert it into an integer
+       * for later use
+       */
+      vto[i].type = FORMAT_INT;
+      break;
 
-      default:
-        break;
-      }
+    default:
+      break;
+    }
   }
 
   return max_param;
@@ -692,7 +586,7 @@ static int dprintf_formatf(
       continue;
     }
 
-    /* If this is a positional parameter, the position must follow imediately
+    /* If this is a positional parameter, the position must follow immediately
        after the %, thus create a %<num>$ sequence */
     param=dprintf_DollarString(f, &f);
 
@@ -739,23 +633,23 @@ static int dprintf_formatf(
             OUTCHAR(' ');
         break;
       }
-      if(p->flags & FLAGS_UNSIGNED) {
-        /* Decimal unsigned integer.  */
-        base = 10;
-        goto unsigned_number;
-      }
       if(p->flags & FLAGS_OCTAL) {
         /* Octal unsigned integer.  */
         base = 8;
         goto unsigned_number;
       }
-      if(p->flags & FLAGS_HEX) {
+      else if(p->flags & FLAGS_HEX) {
         /* Hexadecimal unsigned integer.  */
 
         digits = (p->flags & FLAGS_UPPER)? upper_digits : lower_digits;
         base = 16;
         goto unsigned_number;
       }
+      else if(p->flags & FLAGS_UNSIGNED) {
+        /* Decimal unsigned integer.  */
+        base = 10;
+        goto unsigned_number;
+      }
 
       /* Decimal integer.  */
       base = 10;
@@ -853,7 +747,7 @@ static int dprintf_formatf(
         size_t len;
 
         str = (char *) p->data.str;
-        if( str == NULL) {
+        if(str == NULL) {
           /* Write null[] if there's space.  */
           if(prec == -1 || prec >= (long) sizeof(null) - 1) {
             str = null;
@@ -914,7 +808,7 @@ static int dprintf_formatf(
           if(p->flags & FLAGS_LEFT)
             while(width-- > 0)
               OUTCHAR(' ');
-          for (point = strnil; *point != '\0'; ++point)
+          for(point = strnil; *point != '\0'; ++point)
             OUTCHAR(*point);
           if(! (p->flags & FLAGS_LEFT))
             while(width-- > 0)
@@ -926,7 +820,7 @@ static int dprintf_formatf(
     case FORMAT_DOUBLE:
       {
         char formatbuf[32]="%";
-        char *fptr;
+        char *fptr = &formatbuf[1];
         size_t left = sizeof(formatbuf)-strlen(formatbuf);
         int len;
 
@@ -943,15 +837,15 @@ static int dprintf_formatf(
           prec = (long)vto[p->precision].data.num.as_signed;
 
         if(p->flags & FLAGS_LEFT)
-          strcat(formatbuf, "-");
+          *fptr++ = '-';
         if(p->flags & FLAGS_SHOWSIGN)
-          strcat(formatbuf, "+");
+          *fptr++ = '+';
         if(p->flags & FLAGS_SPACE)
-          strcat(formatbuf, " ");
+          *fptr++ = ' ';
         if(p->flags & FLAGS_ALT)
-          strcat(formatbuf, "#");
+          *fptr++ = '#';
 
-        fptr=&formatbuf[strlen(formatbuf)];
+        *fptr = 0;
 
         if(width >= 0) {
           /* RECURSIVE USAGE */
@@ -976,8 +870,8 @@ static int dprintf_formatf(
 
         *fptr = 0; /* and a final zero termination */
 
-        /* NOTE NOTE NOTE!! Not all sprintf() implementations returns number
-           of output characters */
+        /* NOTE NOTE NOTE!! Not all sprintf implementations return number of
+           output characters */
         (sprintf)(work, formatbuf, p->data.dnum);
 
         for(fptr=work; *fptr; fptr++)
@@ -1202,45 +1096,3 @@ int curl_mvfprintf(FILE *whereto, const char *format, va_list ap_save)
 {
   return dprintf_formatf(whereto, fputc, format, ap_save);
 }
-
-#ifdef DPRINTF_DEBUG
-int main()
-{
-  char buffer[129];
-  char *ptr;
-#ifdef HAVE_LONG_LONG_TYPE
-  LONG_LONG_TYPE one=99;
-  LONG_LONG_TYPE two=100;
-  LONG_LONG_TYPE test = 0x1000000000LL;
-  curl_mprintf("%lld %lld %lld\n", one, two, test);
-#endif
-
-  curl_mprintf("%3d %5d\n", 10, 1998);
-
-  ptr=curl_maprintf("test this then baby %s%s%s%s%s%s %d %d %d loser baby get a kiss in yer face now!", "", "pretty long string pretty long string pretty long string pretty long string pretty long string", "/", "/", "/", "pretty long string", 1998, 1999, 2001);
-
-  puts(ptr);
-
-  memset(ptr, 55, strlen(ptr)+1);
-
-  free(ptr);
-
-#if 1
-  curl_mprintf(buffer, "%s %s %d", "daniel", "stenberg", 19988);
-  puts(buffer);
-
-  curl_mfprintf(stderr, "%s %#08x\n", "dummy", 65);
-
-  printf("%s %#08x\n", "dummy", 65);
-  {
-    double tryout = 3.14156592;
-    curl_mprintf(buffer, "%.2g %G %f %e %E", tryout, tryout, tryout, tryout, tryout);
-    puts(buffer);
-    printf("%.2g %G %f %e %E\n", tryout, tryout, tryout, tryout, tryout);
-  }
-#endif
-
-  return 0;
-}
-
-#endif
diff --git a/lib/msvcproj.head b/lib/msvcproj.head
deleted file mode 100644 (file)
index 5714ef7..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
-# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
-\r
-CFG=libcurl - Win32 LIB Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "libcurl.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")\r
-!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-\r
-!IF  "$(CFG)" == "libcurl - Win32 DLL Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "DLL-Debug"\r
-# PROP BASE Intermediate_Dir "DLL-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "DLL-Debug"\r
-# PROP Intermediate_Dir "DLL-Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c\r
-MTL=midl.exe\r
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
-# ADD RSC /l 0x409 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept\r
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "DLL-Release"\r
-# PROP BASE Intermediate_Dir "DLL-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "DLL-Release"\r
-# PROP Intermediate_Dir "DLL-Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c\r
-MTL=midl.exe\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"\r
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "LIB-Debug"\r
-# PROP BASE Intermediate_Dir "LIB-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "LIB-Debug"\r
-# PROP Intermediate_Dir "LIB-Debug"\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
-# ADD RSC /l 0x409 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386\r
-# ADD LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "LIB-Release"\r
-# PROP BASE Intermediate_Dir "LIB-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "LIB-Release"\r
-# PROP Intermediate_Dir "LIB-Release"\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386\r
-# ADD LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "libcurl - Win32 DLL Debug"\r
-# Name "libcurl - Win32 DLL Release"\r
-# Name "libcurl - Win32 LIB Debug"\r
-# Name "libcurl - Win32 LIB Release"\r
index ff4bf86..476f058 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 
 #include "sendf.h"
 #include "timeval.h"
 #include "http.h"
+#include "select.h"
 #include "warnless.h"
+#include "speedcheck.h"
+#include "conncache.h"
+#include "bundles.h"
+#include "multihandle.h"
+#include "pipeline.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #define CURL_SOCKET_HASH_TABLE_SIZE 911
 #endif
 
-struct Curl_message {
-  /* the 'CURLMsg' is the part that is visible to the external user */
-  struct CURLMsg extmsg;
-};
-
-/* NOTE: if you add a state here, add the name to the statename[] array as
-   well!
-*/
-typedef enum {
-  CURLM_STATE_INIT,        /* 0 - start in this state */
-  CURLM_STATE_CONNECT,     /* 1 - resolve/connect has been sent off */
-  CURLM_STATE_WAITRESOLVE, /* 2 - awaiting the resolve to finalize */
-  CURLM_STATE_WAITCONNECT, /* 3 - awaiting the connect to finalize */
-  CURLM_STATE_WAITPROXYCONNECT, /* 4 - awaiting proxy CONNECT to finalize */
-  CURLM_STATE_PROTOCONNECT, /* 5 - completing the protocol-specific connect
-                               phase */
-  CURLM_STATE_WAITDO,      /* 6 - wait for our turn to send the request */
-  CURLM_STATE_DO,          /* 7 - start send off the request (part 1) */
-  CURLM_STATE_DOING,       /* 8 - sending off the request (part 1) */
-  CURLM_STATE_DO_MORE,     /* 9 - send off the request (part 2) */
-  CURLM_STATE_DO_DONE,     /* 10 - done sending off request */
-  CURLM_STATE_WAITPERFORM, /* 11 - wait for our turn to read the response */
-  CURLM_STATE_PERFORM,     /* 12 - transfer data */
-  CURLM_STATE_TOOFAST,     /* 13 - wait because limit-rate exceeded */
-  CURLM_STATE_DONE,        /* 14 - post data transfer operation */
-  CURLM_STATE_COMPLETED,   /* 15 - operation complete */
-  CURLM_STATE_MSGSENT,     /* 16 - the operation complete message is sent */
-  CURLM_STATE_LAST         /* 17 - not a true state, never use this */
-} CURLMstate;
-
-/* we support N sockets per easy handle. Set the corresponding bit to what
-   action we should wait for */
-#define MAX_SOCKSPEREASYHANDLE 5
-#define GETSOCK_READABLE (0x00ff)
-#define GETSOCK_WRITABLE (0xff00)
-
-struct closure {
-  struct closure *next; /* a simple one-way list of structs */
-  struct SessionHandle *easy_handle;
-};
-
-struct Curl_one_easy {
-  /* first, two fields for the linked list of these */
-  struct Curl_one_easy *next;
-  struct Curl_one_easy *prev;
-
-  struct SessionHandle *easy_handle; /* the easy handle for this unit */
-  struct connectdata *easy_conn;     /* the "unit's" connection */
-
-  CURLMstate state;  /* the handle's state */
-  CURLcode result;   /* previous result */
-
-  struct Curl_message msg; /* A single posted message. */
-
-  /* Array with the plain socket numbers this handle takes care of, in no
-     particular order. Note that all sockets are added to the sockhash, where
-     the state etc are also kept. This array is mostly used to detect when a
-     socket is to be removed from the hash. See singlesocket(). */
-  curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE];
-  int numsocks;
-};
+#define CURL_CONNECTION_HASH_SIZE 97
 
 #define CURL_MULTI_HANDLE 0x000bab1e
 
 #define GOOD_MULTI_HANDLE(x) \
-  ((x)&&(((struct Curl_multi *)(x))->type == CURL_MULTI_HANDLE))
+  ((x) && (((struct Curl_multi *)(x))->type == CURL_MULTI_HANDLE))
 #define GOOD_EASY_HANDLE(x) \
- (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER)
-
-/* This is the struct known as CURLM on the outside */
-struct Curl_multi {
-  /* First a simple identifier to easier detect if a user mix up
-     this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
-  long type;
-
-  /* We have a linked list with easy handles */
-  struct Curl_one_easy easy;
-
-  int num_easy; /* amount of entries in the linked list above. */
-  int num_alive; /* amount of easy handles that are added but have not yet
-                    reached COMPLETE state */
-
-  struct curl_llist *msglist; /* a list of messages from completed transfers */
-
-  /* callback function and user data pointer for the *socket() API */
-  curl_socket_callback socket_cb;
-  void *socket_userp;
-
-  /* Hostname cache */
-  struct curl_hash *hostcache;
-
-  /* timetree points to the splay-tree of time nodes to figure out expire
-     times of all currently set timers */
-  struct Curl_tree *timetree;
-
-  /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note
-     the pluralis form, there can be more than one easy handle waiting on the
-     same actual socket) */
-  struct curl_hash *sockhash;
-
-  /* Whether pipelining is enabled for this multi handle */
-  bool pipelining_enabled;
-
-  /* shared connection cache */
-  struct conncache *connc;
-  long maxconnects; /* if >0, a fixed limit of the maximum number of entries
-                       we're allowed to grow the connection cache to */
+  ((x) && (((struct SessionHandle *)(x))->magic == CURLEASY_MAGIC_NUMBER))
 
-  /* list of easy handles kept around for doing nice connection closures */
-  struct closure *closure;
-
-  /* timer callback and user data pointer for the *socket() API */
-  curl_multi_timer_callback timer_cb;
-  void *timer_userp;
-  struct timeval timer_lastcall; /* the fixed time for the timeout for the
-                                    previous callback */
-};
-
-static void multi_connc_remove_handle(struct Curl_multi *multi,
-                                      struct SessionHandle *data);
 static void singlesocket(struct Curl_multi *multi,
-                         struct Curl_one_easy *easy);
-static CURLMcode add_closure(struct Curl_multi *multi,
-                             struct SessionHandle *data);
+                         struct SessionHandle *easy);
 static int update_timer(struct Curl_multi *multi);
 
-static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
-                                              struct connectdata *conn);
-static int checkPendPipeline(struct connectdata *conn);
-static void moveHandleFromSendToRecvPipeline(struct SessionHandle *handle,
-                                             struct connectdata *conn);
-static void moveHandleFromRecvToDonePipeline(struct SessionHandle *handle,
-                                             struct connectdata *conn);
 static bool isHandleAtHead(struct SessionHandle *handle,
                            struct curl_llist *pipeline);
 static CURLMcode add_next_timeout(struct timeval now,
                                   struct Curl_multi *multi,
                                   struct SessionHandle *d);
+static CURLMcode multi_timeout(struct Curl_multi *multi,
+                               long *timeout_ms);
 
 #ifdef DEBUGBUILD
 static const char * const statename[]={
   "INIT",
+  "CONNECT_PEND",
   "CONNECT",
   "WAITRESOLVE",
   "WAITCONNECT",
@@ -223,36 +105,46 @@ static const char * const statename[]={
 static void multi_freetimeout(void *a, void *b);
 
 /* always use this function to change state, to make debugging easier */
-static void multistate(struct Curl_one_easy *easy, CURLMstate state)
+static void mstate(struct SessionHandle *easy, CURLMstate state
+#ifdef DEBUGBUILD
+                   , int lineno
+#endif
+)
 {
 #ifdef DEBUGBUILD
-  long connectindex = -5000;
+  long connection_id = -5000;
 #endif
-  CURLMstate oldstate = easy->state;
+  CURLMstate oldstate = easy->mstate;
 
   if(oldstate == state)
     /* don't bother when the new state is the same as the old state */
     return;
 
-  easy->state = state;
+  easy->mstate = state;
 
 #ifdef DEBUGBUILD
-  if(easy->easy_conn) {
-    if(easy->state > CURLM_STATE_CONNECT &&
-       easy->state < CURLM_STATE_COMPLETED)
-      connectindex = easy->easy_conn->connectindex;
-
-    infof(easy->easy_handle,
-          "STATE: %s => %s handle %p; (connection #%ld) \n",
-          statename[oldstate], statename[easy->state],
-          (char *)easy, connectindex);
+  if(easy->mstate >= CURLM_STATE_CONNECT_PEND &&
+     easy->mstate < CURLM_STATE_COMPLETED) {
+    if(easy->easy_conn)
+      connection_id = easy->easy_conn->connection_id;
+
+    infof(easy,
+          "STATE: %s => %s handle %p; line %d (connection #%ld) \n",
+          statename[oldstate], statename[easy->mstate],
+          (void *)easy, lineno, connection_id);
   }
 #endif
   if(state == CURLM_STATE_COMPLETED)
     /* changing to COMPLETED means there's one less easy handle 'alive' */
-    easy->easy_handle->multi->num_alive--;
+    easy->multi->num_alive--;
 }
 
+#ifndef DEBUGBUILD
+#define multistate(x,y) mstate(x,y)
+#else
+#define multistate(x,y) mstate(x,y, __LINE__)
+#endif
+
 /*
  * We add one of these structs to the sockhash for a particular socket
  */
@@ -324,16 +216,16 @@ static void sh_freeentry(void *freethis)
     free(p);
 }
 
-static size_t fd_key_compare(void*k1, size_t k1_len, void*k2, size_t k2_len)
+static size_t fd_key_compare(void *k1, size_t k1_len, void *k2, size_t k2_len)
 {
   (void) k1_len; (void) k2_len;
 
-  return (*((int* ) k1)) == (*((int* ) k2));
+  return (*((int *) k1)) == (*((int *) k2));
 }
 
-static size_t hash_fd(voidkey, size_t key_length, size_t slots_num)
+static size_t hash_fd(void *key, size_t key_length, size_t slots_num)
 {
-  int fd = * ((int* ) key);
+  int fd = *((int *) key);
   (void) key_length;
 
   return (fd % (int)slots_num);
@@ -357,9 +249,9 @@ static size_t hash_fd(void* key, size_t key_length, size_t slots_num)
  * per call."
  *
  */
-static struct curl_hash *sh_init(void)
+static struct curl_hash *sh_init(int hashsize)
 {
-  return Curl_hash_alloc(CURL_SOCKET_HASH_TABLE_SIZE, hash_fd, fd_key_compare,
+  return Curl_hash_alloc(hashsize, hash_fd, fd_key_compare,
                          sh_freeentry);
 }
 
@@ -389,8 +281,8 @@ static void multi_freeamsg(void *a, void *b)
   (void)b;
 }
 
-
-CURLM *curl_multi_init(void)
+struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
+                                     int chashsize) /* connection hash */
 {
   struct Curl_multi *multi = calloc(1, sizeof(struct Curl_multi));
 
@@ -403,46 +295,49 @@ CURLM *curl_multi_init(void)
   if(!multi->hostcache)
     goto error;
 
-  multi->sockhash = sh_init();
+  multi->sockhash = sh_init(hashsize);
   if(!multi->sockhash)
     goto error;
 
-  multi->connc = Curl_mk_connc(CONNCACHE_MULTI, -1L);
-  if(!multi->connc)
+  multi->conn_cache = Curl_conncache_init(chashsize);
+  if(!multi->conn_cache)
     goto error;
 
   multi->msglist = Curl_llist_alloc(multi_freeamsg);
   if(!multi->msglist)
     goto error;
 
-  /* Let's make the doubly-linked list a circular list.  This makes
-     the linked list code simpler and allows inserting at the end
-     with less work (we didn't keep a tail pointer before). */
-  multi->easy.next = &multi->easy;
-  multi->easy.prev = &multi->easy;
-
+  multi->max_pipeline_length = 5;
   return (CURLM *) multi;
 
   error:
-  if(multi->sockhash)
-    Curl_hash_destroy(multi->sockhash);
-  if(multi->hostcache)
-    Curl_hash_destroy(multi->hostcache);
-  if(multi->connc)
-    Curl_rm_connc(multi->connc);
+
+  Curl_hash_destroy(multi->sockhash);
+  multi->sockhash = NULL;
+  Curl_hash_destroy(multi->hostcache);
+  multi->hostcache = NULL;
+  Curl_conncache_destroy(multi->conn_cache);
+  multi->conn_cache = NULL;
 
   free(multi);
   return NULL;
 }
 
+CURLM *curl_multi_init(void)
+{
+  return Curl_multi_handle(CURL_SOCKET_HASH_TABLE_SIZE,
+                           CURL_CONNECTION_HASH_SIZE);
+}
+
+
 CURLMcode curl_multi_add_handle(CURLM *multi_handle,
                                 CURL *easy_handle)
 {
-  struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
-  struct closure *cl;
-  struct closure *prev=NULL;
-  struct SessionHandle *data = easy_handle;
+  struct curl_llist *timeoutlist;
+  struct Curl_multi *multi = (struct Curl_multi *)multi_handle;
+  struct SessionHandle *data = (struct SessionHandle *)easy_handle;
+  struct SessionHandle *new_closure = NULL;
+  struct curl_hash *hostcache = NULL;
 
   /* First, make some basic checks that the CURLM handle is a good handle */
   if(!GOOD_MULTI_HANDLE(multi))
@@ -452,95 +347,109 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
   if(!GOOD_EASY_HANDLE(easy_handle))
     return CURLM_BAD_EASY_HANDLE;
 
-  /* Prevent users to add the same handle more than once! */
-  if(((struct SessionHandle *)easy_handle)->multi)
+  /* Prevent users from adding same easy handle more than once and prevent
+     adding to more than one multi stack */
+  if(data->multi)
     /* possibly we should create a new unique error code for this condition */
     return CURLM_BAD_EASY_HANDLE;
 
-  data->state.timeoutlist = Curl_llist_alloc(multi_freetimeout);
-  if(!data->state.timeoutlist)
+  /* Allocate and initialize timeout list for easy handle */
+  timeoutlist = Curl_llist_alloc(multi_freetimeout);
+  if(!timeoutlist)
     return CURLM_OUT_OF_MEMORY;
 
-  /* Now, time to add an easy handle to the multi stack */
-  easy = calloc(1, sizeof(struct Curl_one_easy));
-  if(!easy)
-    return CURLM_OUT_OF_MEMORY;
-
-  cl = multi->closure;
-  while(cl) {
-    struct closure *next = cl->next;
-    if(cl->easy_handle == (struct SessionHandle *)easy_handle) {
-      /* remove this handle from the closure list */
-      free(cl);
-      if(prev)
-        prev->next = next;
-      else
-        multi->closure = next;
-      break; /* no need to continue since this handle can only be present once
-                in the list */
+  /* In case multi handle has no hostcache yet, allocate one */
+  if(!multi->hostcache) {
+    hostcache = Curl_mk_dnscache();
+    if(!hostcache) {
+      free(data);
+      Curl_llist_destroy(timeoutlist, NULL);
+      return CURLM_OUT_OF_MEMORY;
     }
-    prev = cl;
-    cl = next;
   }
 
-  /* set the easy handle */
-  easy->easy_handle = easy_handle;
-  multistate(easy, CURLM_STATE_INIT);
+  /* In case multi handle has no closure_handle yet, allocate
+     a new easy handle to use when closing cached connections */
+  if(!multi->closure_handle) {
+    new_closure = (struct SessionHandle *)curl_easy_init();
+    if(!new_closure) {
+      Curl_hash_destroy(hostcache);
+      free(data);
+      Curl_llist_destroy(timeoutlist, NULL);
+      return CURLM_OUT_OF_MEMORY;
+    }
+  }
 
-  /* set the back pointer to one_easy to assist in removal */
-  easy->easy_handle->multi_pos =  easy;
+  /*
+  ** No failure allowed in this function beyond this point. And
+  ** no modification of easy nor multi handle allowed before this
+  ** except for potential multi's connection cache growing which
+  ** won't be undone in this function no matter what.
+  */
 
-  /* for multi interface connections, we share DNS cache automatically if the
-     easy handle's one is currently private. */
-  if(easy->easy_handle->dns.hostcache &&
-     (easy->easy_handle->dns.hostcachetype == HCACHE_PRIVATE)) {
-    Curl_hash_destroy(easy->easy_handle->dns.hostcache);
-    easy->easy_handle->dns.hostcache = NULL;
-    easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
+  /* In case a new closure handle has been initialized above, it
+     is associated now with the multi handle which lacked one. */
+  if(new_closure) {
+    multi->closure_handle = new_closure;
+    Curl_easy_addmulti(multi->closure_handle, multi_handle);
+    multi->closure_handle->state.conn_cache = multi->conn_cache;
   }
 
-  if(!easy->easy_handle->dns.hostcache ||
-     (easy->easy_handle->dns.hostcachetype == HCACHE_NONE)) {
-    easy->easy_handle->dns.hostcache = multi->hostcache;
-    easy->easy_handle->dns.hostcachetype = HCACHE_MULTI;
-  }
+  /* In case hostcache has been allocated above,
+     it is associated now with the multi handle. */
+  if(hostcache)
+    multi->hostcache = hostcache;
 
-  if(easy->easy_handle->state.connc) {
-    if(easy->easy_handle->state.connc->type == CONNCACHE_PRIVATE) {
-      /* kill old private version */
-      Curl_rm_connc(easy->easy_handle->state.connc);
-      /* point out our shared one instead */
-      easy->easy_handle->state.connc = multi->connc;
+  /* Make easy handle use timeout list initialized above */
+  data->state.timeoutlist = timeoutlist;
+  timeoutlist = NULL;
+
+  /* set the easy handle */
+  multistate(data, CURLM_STATE_INIT);
+
+  if((data->set.global_dns_cache) &&
+     (data->dns.hostcachetype != HCACHE_GLOBAL)) {
+    /* global dns cache was requested but still isn't */
+    struct curl_hash *global = Curl_global_host_cache_init();
+    if(global) {
+      /* only do this if the global cache init works */
+      data->dns.hostcache = global;
+      data->dns.hostcachetype = HCACHE_GLOBAL;
     }
-    /* else it is already using multi? */
   }
-  else
-    /* point out our shared one */
-    easy->easy_handle->state.connc = multi->connc;
-
-  /* Make sure the type is setup correctly */
-  easy->easy_handle->state.connc->type = CONNCACHE_MULTI;
-
-  /* This adds the new entry at the back of the list
-     to try and maintain a FIFO queue so the pipelined
-     requests are in order. */
+  /* for multi interface connections, we share DNS cache automatically if the
+     easy handle's one is currently not set. */
+  else if(!data->dns.hostcache ||
+     (data->dns.hostcachetype == HCACHE_NONE)) {
+    data->dns.hostcache = multi->hostcache;
+    data->dns.hostcachetype = HCACHE_MULTI;
+  }
 
-  /* We add this new entry last in the list. We make our 'next' point to the
-     'first' struct and our 'prev' point to the previous 'prev' */
-  easy->next = &multi->easy;
-  easy->prev = multi->easy.prev;
+  /* Point to the multi's connection cache */
+  data->state.conn_cache = multi->conn_cache;
 
-  /* make 'easy' the last node in the chain */
-  multi->easy.prev = easy;
+  /* This adds the new entry at the 'end' of the doubly-linked circular
+     list of SessionHandle structs to try and maintain a FIFO queue so
+     the pipelined requests are in order. */
 
-  /* if there was a prev node, make sure its 'next' pointer links to
-     the new node */
-  easy->prev->next = easy;
+  /* We add this new entry last in the list. */
 
-  Curl_easy_addmulti(easy_handle, multi_handle);
+  data->next = NULL; /* end of the line */
+  if(multi->easyp) {
+    struct SessionHandle *last = multi->easylp;
+    last->next = data;
+    data->prev = last;
+    multi->easylp = data; /* the new last node */
+  }
+  else {
+    /* first node, make both prev and next be NULL! */
+    data->next = NULL;
+    data->prev = NULL;
+    multi->easylp = multi->easyp = data; /* both first and last */
+  }
 
-  /* make the SessionHandle struct refer back to this struct */
-  easy->easy_handle->set.one_easy = easy;
+  /* make the SessionHandle refer back to this multi handle */
+  Curl_easy_addmulti(data, multi_handle);
 
   /* Set the timeout for this handle to expire really soon so that it will
      be taken care of even when this handle is added in the midst of operation
@@ -548,32 +457,11 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
      sockets that time-out or have actions will be dealt with. Since this
      handle has no action yet, we make sure it times out to get things to
      happen. */
-  Curl_expire(easy->easy_handle, 1);
+  Curl_expire(data, 1);
 
   /* increase the node-counter */
   multi->num_easy++;
 
-  if((multi->num_easy * 4) > multi->connc->num) {
-    /* We want the connection cache to have plenty room. Before we supported
-       the shared cache every single easy handle had 5 entries in their cache
-       by default. */
-    long newmax = multi->num_easy * 4;
-
-    if(multi->maxconnects && (multi->maxconnects < newmax))
-      /* don't grow beyond the allowed size */
-      newmax = multi->maxconnects;
-
-    if(newmax > multi->connc->num) {
-      /* we only do this is we can in fact grow the cache */
-      CURLcode res = Curl_ch_connc(easy_handle, multi->connc, newmax);
-      if(res != CURLE_OK) {
-        /* FIXME: may need to do more cleanup here */
-        curl_multi_remove_handle(multi_handle, easy_handle);
-        return CURLM_OUT_OF_MEMORY;
-      }
-    }
-  }
-
   /* increase the alive-counter */
   multi->num_alive++;
 
@@ -613,8 +501,8 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
                                    CURL *curl_handle)
 {
   struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
-  struct SessionHandle *data = curl_handle;
+  struct SessionHandle *easy = curl_handle;
+  struct SessionHandle *data = easy;
 
   /* First, make some basic checks that the CURLM handle is a good handle */
   if(!GOOD_MULTI_HANDLE(multi))
@@ -624,13 +512,11 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
   if(!GOOD_EASY_HANDLE(curl_handle))
     return CURLM_BAD_EASY_HANDLE;
 
-  /* pick-up from the 'curl_handle' the kept position in the list */
-  easy = data->multi_pos;
-
   if(easy) {
-    bool premature = (bool)(easy->state < CURLM_STATE_COMPLETED);
-    bool easy_owns_conn = (bool)(easy->easy_conn &&
-                                 (easy->easy_conn->data == easy->easy_handle));
+    bool premature = (easy->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE;
+    bool easy_owns_conn = (easy->easy_conn &&
+                           (easy->easy_conn->data == easy)) ?
+                           TRUE : FALSE;
 
     /* If the 'state' is not INIT or COMPLETED, we might need to do something
        nice to put the easy_handle in a good known state when this returns. */
@@ -642,21 +528,21 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
     if(easy->easy_conn &&
        (easy->easy_conn->send_pipe->size +
         easy->easy_conn->recv_pipe->size > 1) &&
-       easy->state > CURLM_STATE_WAITDO &&
-       easy->state < CURLM_STATE_COMPLETED) {
+       easy->mstate > CURLM_STATE_WAITDO &&
+       easy->mstate < CURLM_STATE_COMPLETED) {
       /* If the handle is in a pipeline and has started sending off its
-         request but not received its reponse yet, we need to close
+         request but not received its response yet, we need to close
          connection. */
       easy->easy_conn->bits.close = TRUE;
       /* Set connection owner so that Curl_done() closes it.
          We can sefely do this here since connection is killed. */
-      easy->easy_conn->data = easy->easy_handle;
+      easy->easy_conn->data = easy;
     }
 
     /* The timer must be shut down before easy->multi is set to NULL,
        else the timenode will remain in the splay tree after
        curl_easy_cleanup is called. */
-    Curl_expire(easy->easy_handle, 0);
+    Curl_expire(easy, 0);
 
     /* destroy the timeout list that is held in the easy handle */
     if(data->state.timeoutlist) {
@@ -664,17 +550,17 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
       data->state.timeoutlist = NULL;
     }
 
-    if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
-      /* clear out the usage of the shared DNS cache */
-      easy->easy_handle->dns.hostcache = NULL;
-      easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
+    if(easy->dns.hostcachetype == HCACHE_MULTI) {
+      /* stop using the multi handle's DNS cache */
+      easy->dns.hostcache = NULL;
+      easy->dns.hostcachetype = HCACHE_NONE;
     }
 
     if(easy->easy_conn) {
 
       /* we must call Curl_done() here (if we still "own it") so that we don't
          leave a half-baked one around */
-      if (easy_owns_conn) {
+      if(easy_owns_conn) {
 
         /* Curl_done() clears the conn->data field to lose the association
            between the easy handle and the connection
@@ -682,51 +568,29 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
            Note that this ignores the return code simply because there's
            nothing really useful to do with it anyway! */
         (void)Curl_done(&easy->easy_conn, easy->result, premature);
-
-        if(easy->easy_conn)
-          /* the connection is still alive, set back the association to enable
-             the check below to trigger TRUE */
-          easy->easy_conn->data = easy->easy_handle;
       }
       else
         /* Clear connection pipelines, if Curl_done above was not called */
-        Curl_getoff_all_pipelines(easy->easy_handle, easy->easy_conn);
+        Curl_getoff_all_pipelines(easy, easy->easy_conn);
     }
 
-    /* figure out if the easy handle is used by one or more connections in the
-       cache */
-    multi_connc_remove_handle(multi, easy->easy_handle);
-
-    if(easy->easy_handle->state.connc->type == CONNCACHE_MULTI) {
-      /* if this was using the shared connection cache we clear the pointer
-         to that since we're not part of that handle anymore */
-      easy->easy_handle->state.connc = NULL;
-
-      /* Since we return the connection back to the communal connection pool
-         we mark the last connection as inaccessible */
-      easy->easy_handle->state.lastconnect = -1;
-
-      /* Modify the connectindex since this handle can't point to the
-         connection cache anymore.
-
-         TODO: consider if this is really what we want. The connection cache
-         is within the multi handle and that owns the connections so we should
-         not need to touch connections like this when we just remove an easy
-         handle...
-      */
-      if(easy->easy_conn && easy_owns_conn &&
-         (easy->easy_conn->send_pipe->size +
-          easy->easy_conn->recv_pipe->size == 0))
-        easy->easy_conn->connectindex = -1;
-    }
+    /* as this was using a shared connection cache we clear the pointer
+       to that since we're not part of that multi handle anymore */
+      easy->state.conn_cache = NULL;
 
     /* change state without using multistate(), only to make singlesocket() do
        what we want */
-    easy->state = CURLM_STATE_COMPLETED;
+    easy->mstate = CURLM_STATE_COMPLETED;
     singlesocket(multi, easy); /* to let the application know what sockets
                                   that vanish with this handle */
 
-    Curl_easy_addmulti(easy->easy_handle, NULL); /* clear the association
+    /* Remove the association between the connection and the handle */
+    if(easy->easy_conn) {
+      easy->easy_conn->data = NULL;
+      easy->easy_conn = NULL;
+    }
+
+    Curl_easy_addmulti(easy, NULL); /* clear the association
                                                     to this multi handle */
 
     {
@@ -737,7 +601,7 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
       for(e = multi->msglist->head; e; e = e->next) {
         struct Curl_message *msg = e->ptr;
 
-        if(msg->extmsg.easy_handle == easy->easy_handle) {
+        if(msg->extmsg.easy_handle == easy) {
           Curl_llist_remove(multi->msglist, e, NULL);
           /* there can only be one from this specific handle */
           break;
@@ -748,18 +612,17 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
     /* make the previous node point to our next */
     if(easy->prev)
       easy->prev->next = easy->next;
+    else
+      multi->easyp = easy->next; /* point to first node */
+
     /* make our next point to our previous node */
     if(easy->next)
       easy->next->prev = easy->prev;
-
-    easy->easy_handle->set.one_easy = NULL; /* detached */
-
-    /* Null the position in the controlling structure */
-    easy->easy_handle->multi_pos = NULL;
+    else
+      multi->easylp = easy->prev; /* point to last node */
 
     /* NOTE NOTE NOTE
        We do not touch the easy handle here! */
-    free(easy);
 
     multi->num_easy--; /* one less to care about now */
 
@@ -770,17 +633,14 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
     return CURLM_BAD_EASY_HANDLE; /* twasn't found */
 }
 
-bool Curl_multi_canPipeline(const struct Curl_multi* multi)
+bool Curl_multi_pipeline_enabled(const struct Curl_multi *multi)
 {
-  return multi->pipelining_enabled;
+  return (multi && multi->pipelining_enabled) ? TRUE : FALSE;
 }
 
 void Curl_multi_handlePipeBreak(struct SessionHandle *data)
 {
-  struct Curl_one_easy *one_easy = data->set.one_easy;
-
-  if(one_easy)
-    one_easy->easy_conn = NULL;
+  data->easy_conn = NULL;
 }
 
 static int waitconnect_getsock(struct connectdata *conn,
@@ -794,31 +654,23 @@ static int waitconnect_getsock(struct connectdata *conn,
 
   /* when we've sent a CONNECT to a proxy, we should rather wait for the
      socket to become readable to be able to get the response headers */
-  if(conn->bits.tunnel_connecting)
+  if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
     return GETSOCK_READSOCK(0);
 
   return GETSOCK_WRITESOCK(0);
 }
 
 static int domore_getsock(struct connectdata *conn,
-                          curl_socket_t *sock,
+                          curl_socket_t *socks,
                           int numsocks)
 {
-  if(!numsocks)
-    return GETSOCK_BLANK;
-
-  /* When in DO_MORE state, we could be either waiting for us
-     to connect to a remote site, or we could wait for that site
-     to connect to us. It makes a difference in the way: if we
-     connect to the site we wait for the socket to become writable, if
-     the site connects to us we wait for it to become readable */
-  sock[0] = conn->sock[SECONDARYSOCKET];
-
-  return GETSOCK_WRITESOCK(0);
+  if(conn && conn->handler->domore_getsock)
+    return conn->handler->domore_getsock(conn, socks, numsocks);
+  return GETSOCK_BLANK;
 }
 
 /* returns bitmapped flags for this handle and its sockets */
-static int multi_getsock(struct Curl_one_easy *easy,
+static int multi_getsock(struct SessionHandle *easy,
                          curl_socket_t *socks, /* points to numsocks number
                                                   of sockets */
                          int numsocks)
@@ -828,16 +680,16 @@ static int multi_getsock(struct Curl_one_easy *easy,
      happen when this is called from curl_multi_remove_handle() =>
      singlesocket() => multi_getsock().
   */
-  if(easy->easy_handle->state.pipe_broke || !easy->easy_conn)
+  if(easy->state.pipe_broke || !easy->easy_conn)
     return 0;
 
-  if(easy->state > CURLM_STATE_CONNECT &&
-     easy->state < CURLM_STATE_COMPLETED) {
+  if(easy->mstate > CURLM_STATE_CONNECT &&
+     easy->mstate < CURLM_STATE_COMPLETED) {
     /* Set up ownership correctly */
-    easy->easy_conn->data = easy->easy_handle;
+    easy->easy_conn->data = easy;
   }
 
-  switch(easy->state) {
+  switch(easy->mstate) {
   default:
 #if 0 /* switch back on these cases to get the compiler to check for all enums
          to be present */
@@ -855,7 +707,7 @@ static int multi_getsock(struct Curl_one_easy *easy,
     return 0;
 
   case CURLM_STATE_WAITRESOLVE:
-    return Curl_resolv_getsock(easy->easy_conn, socks, numsocks);
+    return Curl_resolver_getsock(easy->easy_conn, socks, numsocks);
 
   case CURLM_STATE_PROTOCONNECT:
     return Curl_protocol_getsock(easy->easy_conn, socks, numsocks);
@@ -872,7 +724,8 @@ static int multi_getsock(struct Curl_one_easy *easy,
     return domore_getsock(easy->easy_conn, socks, numsocks);
 
   case CURLM_STATE_DO_DONE: /* since is set after DO is completed, we switch
-                               to waiting for the same as the *PERFORM states */
+                               to waiting for the same as the *PERFORM
+                               states */
   case CURLM_STATE_PERFORM:
   case CURLM_STATE_WAITPERFORM:
     return Curl_single_getsock(easy->easy_conn, socks, numsocks);
@@ -888,7 +741,7 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
      Some easy handles may not have connected to the remote host yet,
      and then we must make sure that is done. */
   struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
+  struct SessionHandle *easy;
   int this_max_fd=-1;
   curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
   int bitmap;
@@ -898,18 +751,18 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
   if(!GOOD_MULTI_HANDLE(multi))
     return CURLM_BAD_HANDLE;
 
-  easy=multi->easy.next;
-  while(easy != &multi->easy) {
+  easy=multi->easyp;
+  while(easy) {
     bitmap = multi_getsock(easy, sockbunch, MAX_SOCKSPEREASYHANDLE);
 
     for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
       curl_socket_t s = CURL_SOCKET_BAD;
 
-      if(bitmap & GETSOCK_READSOCK(i)) {
+      if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) {
         FD_SET(sockbunch[i], read_fd_set);
         s = sockbunch[i];
       }
-      if(bitmap & GETSOCK_WRITESOCK(i)) {
+      if((bitmap & GETSOCK_WRITESOCK(i)) && VALID_SOCK((sockbunch[i]))) {
         FD_SET(sockbunch[i], write_fd_set);
         s = sockbunch[i];
       }
@@ -930,38 +783,178 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
   return CURLM_OK;
 }
 
+CURLMcode curl_multi_wait(CURLM *multi_handle,
+                          struct curl_waitfd extra_fds[],
+                          unsigned int extra_nfds,
+                          int timeout_ms,
+                          int *ret)
+{
+  struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
+  struct SessionHandle *easy;
+  curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
+  int bitmap;
+  unsigned int i;
+  unsigned int nfds = 0;
+  unsigned int curlfds;
+  struct pollfd *ufds = NULL;
+  long timeout_internal;
+
+  if(!GOOD_MULTI_HANDLE(multi))
+    return CURLM_BAD_HANDLE;
+
+  /* If the internally desired timeout is actually shorter than requested from
+     the outside, then use the shorter time! But only if the internal timer
+     is actually larger than 0! */
+  (void)multi_timeout(multi, &timeout_internal);
+  if((timeout_internal > 0) && (timeout_internal < (long)timeout_ms))
+    timeout_ms = (int)timeout_internal;
+
+  /* Count up how many fds we have from the multi handle */
+  easy=multi->easyp;
+  while(easy) {
+    bitmap = multi_getsock(easy, sockbunch, MAX_SOCKSPEREASYHANDLE);
+
+    for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
+      curl_socket_t s = CURL_SOCKET_BAD;
+
+      if(bitmap & GETSOCK_READSOCK(i)) {
+        ++nfds;
+        s = sockbunch[i];
+      }
+      if(bitmap & GETSOCK_WRITESOCK(i)) {
+        ++nfds;
+        s = sockbunch[i];
+      }
+      if(s == CURL_SOCKET_BAD) {
+        break;
+      }
+    }
+
+    easy = easy->next; /* check next handle */
+  }
+
+  curlfds = nfds; /* number of internal file descriptors */
+  nfds += extra_nfds; /* add the externally provided ones */
+
+  if(nfds) {
+    ufds = malloc(nfds * sizeof(struct pollfd));
+    if(!ufds)
+      return CURLM_OUT_OF_MEMORY;
+  }
+  nfds = 0;
+
+  /* only do the second loop if we found descriptors in the first stage run
+     above */
+
+  if(curlfds) {
+    /* Add the curl handles to our pollfds first */
+    easy=multi->easyp;
+    while(easy) {
+      bitmap = multi_getsock(easy, sockbunch, MAX_SOCKSPEREASYHANDLE);
+
+      for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
+        curl_socket_t s = CURL_SOCKET_BAD;
+
+        if(bitmap & GETSOCK_READSOCK(i)) {
+          ufds[nfds].fd = sockbunch[i];
+          ufds[nfds].events = POLLIN;
+          ++nfds;
+          s = sockbunch[i];
+        }
+        if(bitmap & GETSOCK_WRITESOCK(i)) {
+          ufds[nfds].fd = sockbunch[i];
+          ufds[nfds].events = POLLOUT;
+          ++nfds;
+          s = sockbunch[i];
+        }
+        if(s == CURL_SOCKET_BAD) {
+          break;
+        }
+      }
+
+      easy = easy->next; /* check next handle */
+    }
+  }
+
+  /* Add external file descriptions from poll-like struct curl_waitfd */
+  for(i = 0; i < extra_nfds; i++) {
+    ufds[nfds].fd = extra_fds[i].fd;
+    ufds[nfds].events = 0;
+    if(extra_fds[i].events & CURL_WAIT_POLLIN)
+      ufds[nfds].events |= POLLIN;
+    if(extra_fds[i].events & CURL_WAIT_POLLPRI)
+      ufds[nfds].events |= POLLPRI;
+    if(extra_fds[i].events & CURL_WAIT_POLLOUT)
+      ufds[nfds].events |= POLLOUT;
+    ++nfds;
+  }
+
+  if(nfds) {
+    /* wait... */
+    i = Curl_poll(ufds, nfds, timeout_ms);
+
+    if(i) {
+      unsigned int j;
+      /* copy revents results from the poll to the curl_multi_wait poll
+         struct, the bit values of the actual underlying poll() implementation
+         may not be the same as the ones in the public libcurl API! */
+      for(j = 0; j < extra_nfds; j++) {
+        unsigned short mask = 0;
+        unsigned r = ufds[curlfds + j].revents;
+
+        if(r & POLLIN)
+          mask |= CURL_WAIT_POLLIN;
+        if(r & POLLOUT)
+          mask |= CURL_WAIT_POLLOUT;
+        if(r & POLLPRI)
+          mask |= CURL_WAIT_POLLPRI;
+
+        extra_fds[j].revents = mask;
+      }
+    }
+  }
+  else
+    i = 0;
+
+  Curl_safefree(ufds);
+  if(ret)
+    *ret = i;
+  return CURLM_OK;
+}
+
 static CURLMcode multi_runsingle(struct Curl_multi *multi,
                                  struct timeval now,
-                                 struct Curl_one_easy *easy)
+                                 struct SessionHandle *easy)
 {
   struct Curl_message *msg = NULL;
   bool connected;
   bool async;
   bool protocol_connect = FALSE;
-  bool dophase_done;
+  bool dophase_done = FALSE;
   bool done = FALSE;
   CURLMcode result = CURLM_OK;
   struct SingleRequest *k;
   struct SessionHandle *data;
   long timeout_ms;
+  int control;
 
-  if(!GOOD_EASY_HANDLE(easy->easy_handle))
+  if(!GOOD_EASY_HANDLE(easy))
     return CURLM_BAD_EASY_HANDLE;
 
-  data = easy->easy_handle;
+  data = easy;
 
   do {
-    /* this is a do-while loop just to allow a break to skip to the end
-       of it */
+    /* this is a single-iteration do-while loop just to allow a
+       break to skip to the end of it */
     bool disconnect_conn = FALSE;
 
     /* Handle the case when the pipe breaks, i.e., the connection
        we're using gets cleaned up and we're left with nothing. */
     if(data->state.pipe_broke) {
       infof(data, "Pipe broke: handle 0x%p, url = %s\n",
-            easy, data->state.path);
+            (void *)easy, data->state.path);
 
-      if(easy->state < CURLM_STATE_COMPLETED) {
+      if(easy->mstate < CURLM_STATE_COMPLETED) {
         /* Head back to the CONNECT state */
         multistate(easy, CURLM_STATE_CONNECT);
         result = CURLM_CALL_MULTI_PERFORM;
@@ -973,27 +966,37 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       break;
     }
 
-    if(easy->easy_conn && easy->state > CURLM_STATE_CONNECT &&
-       easy->state < CURLM_STATE_COMPLETED)
+    if(!easy->easy_conn &&
+       easy->mstate > CURLM_STATE_CONNECT &&
+       easy->mstate < CURLM_STATE_DONE) {
+      /* In all these states, the code will blindly access 'easy->easy_conn'
+         so this is precaution that it isn't NULL. And it silences static
+         analyzers. */
+      failf(data, "In state %d with no easy_conn, bail out!\n", easy->mstate);
+      return CURLM_INTERNAL_ERROR;
+    }
+
+    if(easy->easy_conn && easy->mstate > CURLM_STATE_CONNECT &&
+       easy->mstate < CURLM_STATE_COMPLETED)
       /* Make sure we set the connection's current owner */
       easy->easy_conn->data = data;
 
     if(easy->easy_conn &&
-       (easy->state >= CURLM_STATE_CONNECT) &&
-       (easy->state < CURLM_STATE_COMPLETED)) {
+       (easy->mstate >= CURLM_STATE_CONNECT) &&
+       (easy->mstate < CURLM_STATE_COMPLETED)) {
       /* we need to wait for the connect state as only then is the start time
          stored, but we must not check already completed handles */
 
-      timeout_ms = Curl_timeleft(easy->easy_conn, &now,
-                                 (easy->state <= CURLM_STATE_WAITDO)?
+      timeout_ms = Curl_timeleft(data, &now,
+                                 (easy->mstate <= CURLM_STATE_WAITDO)?
                                  TRUE:FALSE);
 
       if(timeout_ms < 0) {
         /* Handle timed out */
-        if(easy->state == CURLM_STATE_WAITRESOLVE)
+        if(easy->mstate == CURLM_STATE_WAITRESOLVE)
           failf(data, "Resolving timed out after %ld milliseconds",
                 Curl_tvdiff(now, data->progress.t_startsingle));
-        else if(easy->state == CURLM_STATE_WAITCONNECT)
+        else if(easy->mstate == CURLM_STATE_WAITCONNECT)
           failf(data, "Connection timed out after %ld milliseconds",
                 Curl_tvdiff(now, data->progress.t_startsingle));
         else {
@@ -1003,13 +1006,18 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                 Curl_tvdiff(now, data->progress.t_startsingle), k->bytecount,
                 k->size);
         }
+
+        /* Force the connection closed because the server could continue to
+           send us stuff at any time. (The disconnect_conn logic used below
+           doesn't work at this point). */
+        easy->easy_conn->bits.close = TRUE;
         easy->result = CURLE_OPERATION_TIMEDOUT;
         multistate(easy, CURLM_STATE_COMPLETED);
         break;
       }
     }
 
-    switch(easy->state) {
+    switch(easy->mstate) {
     case CURLM_STATE_INIT:
       /* init this transfer. */
       easy->result=Curl_pretransfer(data);
@@ -1018,22 +1026,33 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         /* after init, go CONNECT */
         multistate(easy, CURLM_STATE_CONNECT);
         result = CURLM_CALL_MULTI_PERFORM;
-
-        data->state.used_interface = Curl_if_multi;
       }
       break;
 
+    case CURLM_STATE_CONNECT_PEND:
+      /* We will stay here until there is a connection available. Then
+         we try again in the CURLM_STATE_CONNECT state. */
+      break;
+
     case CURLM_STATE_CONNECT:
-      /* Connect. We get a connection identifier filled in. */
+      /* Connect. We want to get a connection identifier filled in. */
       Curl_pgrsTime(data, TIMER_STARTSINGLE);
       easy->result = Curl_connect(data, &easy->easy_conn,
                                   &async, &protocol_connect);
+      if(CURLE_NO_CONNECTION_AVAILABLE == easy->result) {
+        /* There was no connection available. We will go to the pending
+           state and wait for an available connection. */
+        multistate(easy, CURLM_STATE_CONNECT_PEND);
+        easy->result = CURLE_OK;
+        break;
+      }
 
       if(CURLE_OK == easy->result) {
         /* Add this handle to the send or pend pipeline */
-        easy->result = addHandleToSendOrPendPipeline(data,
-                                                     easy->easy_conn);
-        if(CURLE_OK == easy->result) {
+        easy->result = Curl_add_handle_to_pipeline(data, easy->easy_conn);
+        if(CURLE_OK != easy->result)
+          disconnect_conn = TRUE;
+        else {
           if(async)
             /* We're now waiting for an asynchronous name lookup */
             multistate(easy, CURLM_STATE_WAITRESOLVE);
@@ -1048,7 +1067,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                          CURLM_STATE_WAITDO:CURLM_STATE_DO);
             else {
 #ifndef CURL_DISABLE_HTTP
-              if(easy->easy_conn->bits.tunnel_connecting)
+              if(easy->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
                 multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
               else
 #endif
@@ -1065,14 +1084,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       struct Curl_dns_entry *dns = NULL;
 
       /* check if we have the name resolved by now */
-      easy->result = Curl_is_resolved(easy->easy_conn, &dns);
+      easy->result = Curl_resolver_is_resolved(easy->easy_conn, &dns);
 
-      if(dns) {
-        /* Update sockets here. Mainly because the socket(s) may have been
-           closed and the application thus needs to be told, even if it is
-           likely that the same socket(s) will again be used further down. */
-        singlesocket(multi, easy);
+      /* Update sockets here, because the socket(s) may have been
+         closed and the application thus needs to be told, even if it
+         is likely that the same socket(s) will again be used further
+         down.  If the name has not yet been resolved, it is likely
+         that new sockets have been opened in an attempt to contact
+         another resolver. */
+      singlesocket(multi, easy);
 
+      if(dns) {
         /* Perform the next step in the connection phase, and then move on
            to the WAITCONNECT state */
         easy->result = Curl_async_resolved(easy->easy_conn,
@@ -1090,7 +1112,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                        CURLM_STATE_WAITDO:CURLM_STATE_DO);
           else {
 #ifndef CURL_DISABLE_HTTP
-            if(easy->easy_conn->bits.tunnel_connecting)
+            if(easy->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
               multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
             else
 #endif
@@ -1122,8 +1144,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         result = CURLM_CALL_MULTI_PERFORM;
         multistate(easy, CURLM_STATE_CONNECT);
       }
-      else if (CURLE_OK == easy->result) {
-        if(!easy->easy_conn->bits.tunnel_connecting)
+      else if(CURLE_OK == easy->result) {
+        if(easy->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE)
           multistate(easy, CURLM_STATE_WAITCONNECT);
       }
       break;
@@ -1135,8 +1157,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                                        FIRSTSOCKET,
                                        &connected);
       if(connected) {
-        /* see if we need to do any proxy magic first once we connected */
-        easy->result = Curl_connected_proxy(easy->easy_conn);
 
         if(!easy->result)
           /* if everything is still fine we do the protocol-specific connect
@@ -1160,7 +1180,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
              BUT if we are using a proxy we must change to WAITPROXYCONNECT
           */
 #ifndef CURL_DISABLE_HTTP
-          if(easy->easy_conn->bits.tunnel_connecting)
+          if(easy->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
             multistate(easy, CURLM_STATE_WAITPROXYCONNECT);
           else
 #endif
@@ -1189,7 +1209,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       else if(easy->result) {
         /* failure detected */
         Curl_posttransfer(data);
-        Curl_done(&easy->easy_conn, easy->result, FALSE);
+        Curl_done(&easy->easy_conn, easy->result, TRUE);
         disconnect_conn = TRUE;
       }
       break;
@@ -1197,12 +1217,12 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
     case CURLM_STATE_WAITDO:
       /* Wait for our turn to DO when we're pipelining requests */
 #ifdef DEBUGBUILD
-      infof(data, "Conn %ld send pipe %zu inuse %d athead %d\n",
-            easy->easy_conn->connectindex,
+      infof(data, "WAITDO: Conn %ld send pipe %zu inuse %s athead %s\n",
+            easy->easy_conn->connection_id,
             easy->easy_conn->send_pipe->size,
-            easy->easy_conn->writechannel_inuse?1:0,
+            easy->easy_conn->writechannel_inuse?"TRUE":"FALSE",
             isHandleAtHead(data,
-                           easy->easy_conn->send_pipe)?1:0);
+                           easy->easy_conn->send_pipe)?"TRUE":"FALSE");
 #endif
       if(!easy->easy_conn->writechannel_inuse &&
          isHandleAtHead(data,
@@ -1220,12 +1240,13 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         easy->easy_conn->bits.close = FALSE;
         multistate(easy, CURLM_STATE_DONE);
         easy->result = CURLE_OK;
-        result = CURLM_OK;
+        result = CURLM_CALL_MULTI_PERFORM;
       }
       else {
         /* Perform the protocol's DO action */
-        easy->result = Curl_do(&easy->easy_conn,
-                               &dophase_done);
+        easy->result = Curl_do(&easy->easy_conn, &dophase_done);
+
+        /* When Curl_do() returns failure, easy->easy_conn might be NULL! */
 
         if(CURLE_OK == easy->result) {
           if(!dophase_done) {
@@ -1259,8 +1280,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
             result = CURLM_CALL_MULTI_PERFORM;
           }
         }
-        else if ((CURLE_SEND_ERROR == easy->result) &&
-                 easy->easy_conn->bits.reuse) {
+        else if((CURLE_SEND_ERROR == easy->result) &&
+                easy->easy_conn->bits.reuse) {
           /*
            * In this situation, a connection that we were trying to use
            * may have unexpectedly died.  If possible, send the connection
@@ -1278,7 +1299,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
             disconnect_conn = TRUE;
           }
           else
-            retry = (bool)(newurl?TRUE:FALSE);
+            retry = (newurl)?TRUE:FALSE;
 
           Curl_posttransfer(data);
           drc = Curl_done(&easy->easy_conn, easy->result, FALSE);
@@ -1286,7 +1307,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           /* When set to retry the connection, we must to go back to
            * the CONNECT state */
           if(retry) {
-            if ((drc == CURLE_OK) || (drc == CURLE_SEND_ERROR)) {
+            if((drc == CURLE_OK) || (drc == CURLE_SEND_ERROR)) {
               follow = FOLLOW_RETRY;
               drc = Curl_follow(data, newurl, follow);
               if(drc == CURLE_OK) {
@@ -1314,7 +1335,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         else {
           /* failure detected */
           Curl_posttransfer(data);
-          Curl_done(&easy->easy_conn, easy->result, FALSE);
+          if(easy->easy_conn)
+            Curl_done(&easy->easy_conn, easy->result, FALSE);
           disconnect_conn = TRUE;
         }
       }
@@ -1326,18 +1348,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                                          &dophase_done);
       if(CURLE_OK == easy->result) {
         if(dophase_done) {
-          /* after DO, go PERFORM... or DO_MORE */
-          if(easy->easy_conn->bits.do_more) {
-            /* we're supposed to do more, but we need to sit down, relax
-               and wait a little while first */
-            multistate(easy, CURLM_STATE_DO_MORE);
-            result = CURLM_OK;
-          }
-          else {
-            /* we're done with the DO, now DO_DONE */
-            multistate(easy, CURLM_STATE_DO_DONE);
-            result = CURLM_CALL_MULTI_PERFORM;
-          }
+          /* after DO, go DO_DONE or DO_MORE */
+          multistate(easy, easy->easy_conn->bits.do_more?
+                     CURLM_STATE_DO_MORE:
+                     CURLM_STATE_DO_DONE);
+          result = CURLM_CALL_MULTI_PERFORM;
         } /* dophase_done */
       }
       else {
@@ -1349,37 +1364,39 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       break;
 
     case CURLM_STATE_DO_MORE:
-      /* Ready to do more? */
-      easy->result = Curl_is_connected(easy->easy_conn,
-                                       SECONDARYSOCKET,
-                                       &connected);
-      if(connected) {
-        /*
-         * When we are connected, DO MORE and then go DO_DONE
-         */
-        easy->result = Curl_do_more(easy->easy_conn);
+      /*
+       * When we are connected, DO MORE and then go DO_DONE
+       */
+      easy->result = Curl_do_more(easy->easy_conn, &control);
 
-        /* No need to remove ourselves from the send pipeline here since that
-           is done for us in Curl_done() */
-
-        if(CURLE_OK == easy->result) {
-          multistate(easy, CURLM_STATE_DO_DONE);
+      /* No need to remove this handle from the send pipeline here since that
+         is done in Curl_done() */
+      if(CURLE_OK == easy->result) {
+        if(control) {
+          /* if positive, advance to DO_DONE
+             if negative, go back to DOING */
+          multistate(easy, control==1?
+                     CURLM_STATE_DO_DONE:
+                     CURLM_STATE_DOING);
           result = CURLM_CALL_MULTI_PERFORM;
         }
-        else {
-          /* failure detected */
-          Curl_posttransfer(data);
-          Curl_done(&easy->easy_conn, easy->result, FALSE);
-          disconnect_conn = TRUE;
-        }
+        else
+          /* stay in DO_MORE */
+          result = CURLM_OK;
+      }
+      else {
+        /* failure detected */
+        Curl_posttransfer(data);
+        Curl_done(&easy->easy_conn, easy->result, FALSE);
+        disconnect_conn = TRUE;
       }
       break;
 
     case CURLM_STATE_DO_DONE:
       /* Move ourselves from the send to recv pipeline */
-      moveHandleFromSendToRecvPipeline(data, easy->easy_conn);
+      Curl_move_handle_from_send_to_recv_pipe(data, easy->easy_conn);
       /* Check if we can move pending requests to send pipe */
-      checkPendPipeline(easy->easy_conn);
+      Curl_multi_process_pending_handles(multi);
       multistate(easy, CURLM_STATE_WAITPERFORM);
       result = CURLM_CALL_MULTI_PERFORM;
       break;
@@ -1396,29 +1413,38 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       }
 #ifdef DEBUGBUILD
       else {
-        infof(data, "Conn %ld recv pipe %zu inuse %d athead %d\n",
-              easy->easy_conn->connectindex,
+        infof(data, "WAITPERFORM: Conn %ld recv pipe %zu inuse %s athead %s\n",
+              easy->easy_conn->connection_id,
               easy->easy_conn->recv_pipe->size,
-              easy->easy_conn->readchannel_inuse?1:0,
+              easy->easy_conn->readchannel_inuse?"TRUE":"FALSE",
               isHandleAtHead(data,
-                             easy->easy_conn->recv_pipe)?1:0);
+                             easy->easy_conn->recv_pipe)?"TRUE":"FALSE");
       }
 #endif
       break;
 
     case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
       /* if both rates are within spec, resume transfer */
-      if( ( (data->set.max_send_speed == 0) ||
-            (data->progress.ulspeed < data->set.max_send_speed ))  &&
-          ( (data->set.max_recv_speed == 0) ||
-            (data->progress.dlspeed < data->set.max_recv_speed) ) )
+      if(Curl_pgrsUpdate(easy->easy_conn))
+        easy->result = CURLE_ABORTED_BY_CALLBACK;
+      else
+        easy->result = Curl_speedcheck(data, now);
+
+      if(( (data->set.max_send_speed == 0) ||
+           (data->progress.ulspeed < data->set.max_send_speed ))  &&
+         ( (data->set.max_recv_speed == 0) ||
+           (data->progress.dlspeed < data->set.max_recv_speed)))
         multistate(easy, CURLM_STATE_PERFORM);
       break;
 
     case CURLM_STATE_PERFORM:
+      {
+      char *newurl = NULL;
+      bool retry = FALSE;
+
       /* check if over send speed */
-      if( (data->set.max_send_speed > 0) &&
-          (data->progress.ulspeed > data->set.max_send_speed) ) {
+      if((data->set.max_send_speed > 0) &&
+         (data->progress.ulspeed > data->set.max_send_speed)) {
         int buffersize;
 
         multistate(easy, CURLM_STATE_TOOFAST);
@@ -1433,8 +1459,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       }
 
       /* check if over recv speed */
-      if( (data->set.max_recv_speed > 0) &&
-          (data->progress.dlspeed > data->set.max_recv_speed) ) {
+      if((data->set.max_recv_speed > 0) &&
+         (data->progress.dlspeed > data->set.max_recv_speed)) {
         int buffersize;
 
         multistate(easy, CURLM_STATE_TOOFAST);
@@ -1463,41 +1489,53 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         easy->easy_conn->writechannel_inuse = FALSE;
       }
 
+      if(done || (easy->result == CURLE_RECV_ERROR)) {
+        /* If CURLE_RECV_ERROR happens early enough, we assume it was a race
+         * condition and the server closed the re-used connection exactly when
+         * we wanted to use it, so figure out if that is indeed the case.
+         */
+        CURLcode ret = Curl_retry_request(easy->easy_conn, &newurl);
+        if(!ret)
+          retry = (newurl)?TRUE:FALSE;
+
+        if(retry) {
+          /* if we are to retry, set the result to OK and consider the
+             request as done */
+          easy->result = CURLE_OK;
+          done = TRUE;
+        }
+      }
+
       if(easy->result) {
-        /* The transfer phase returned error, we mark the connection to get
+        /*
+         * The transfer phase returned error, we mark the connection to get
          * closed to prevent being re-used. This is because we can't possibly
          * know if the connection is in a good shape or not now.  Unless it is
          * a protocol which uses two "channels" like FTP, as then the error
          * happened in the data connection.
          */
-        if(!(easy->easy_conn->protocol & PROT_DUALCHANNEL))
+
+        if(!(easy->easy_conn->handler->flags & PROTOPT_DUAL))
           easy->easy_conn->bits.close = TRUE;
 
         Curl_posttransfer(data);
         Curl_done(&easy->easy_conn, easy->result, FALSE);
       }
-      else if(TRUE == done) {
-        char *newurl = NULL;
-        bool retry = FALSE;
+      else if(done) {
         followtype follow=FOLLOW_NONE;
 
-        easy->result = Curl_retry_request(easy->easy_conn, &newurl);
-        if(!easy->result)
-          retry = (bool)(newurl?TRUE:FALSE);
-
         /* call this even if the readwrite function returned error */
         Curl_posttransfer(data);
 
-        /* we're no longer receving */
-        moveHandleFromRecvToDonePipeline(data,
-                                         easy->easy_conn);
+        /* we're no longer receiving */
+        Curl_removeHandleFromPipeline(data, easy->easy_conn->recv_pipe);
 
         /* expire the new receiving pipeline head */
         if(easy->easy_conn->recv_pipe->head)
           Curl_expire(easy->easy_conn->recv_pipe->head->ptr, 1);
 
         /* Check if we can move pending requests to send pipe */
-        checkPendPipeline(easy->easy_conn);
+        Curl_multi_process_pending_handles(multi);
 
         /* When we follow redirects or is set to retry the connection, we must
            to go back to the CONNECT state */
@@ -1512,28 +1550,32 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           else
             follow = FOLLOW_RETRY;
           easy->result = Curl_done(&easy->easy_conn, CURLE_OK, FALSE);
-          if(easy->result == CURLE_OK)
-            easy->result = Curl_follow(data, newurl, follow);
           if(CURLE_OK == easy->result) {
-            multistate(easy, CURLM_STATE_CONNECT);
-            result = CURLM_CALL_MULTI_PERFORM;
+            easy->result = Curl_follow(data, newurl, follow);
+            if(CURLE_OK == easy->result) {
+              multistate(easy, CURLM_STATE_CONNECT);
+              result = CURLM_CALL_MULTI_PERFORM;
+              newurl = NULL; /* handed over the memory ownership to
+                                Curl_follow(), make sure we don't free() it
+                                here */
+            }
           }
-          else if(newurl)
-            /* Since we "took it", we are in charge of freeing this on
-               failure */
-            free(newurl);
         }
         else {
           /* after the transfer is done, go DONE */
 
           /* but first check to see if we got a location info even though we're
              not following redirects */
-          if (data->req.location) {
+          if(data->req.location) {
+            if(newurl)
+              free(newurl);
             newurl = data->req.location;
             data->req.location = NULL;
             easy->result = Curl_follow(data, newurl, FOLLOW_FAKE);
-            if (easy->result)
-              free(newurl);
+            if(CURLE_OK == easy->result)
+              newurl = NULL; /* allocation was handed over Curl_follow() */
+            else
+              disconnect_conn = TRUE;
           }
 
           multistate(easy, CURLM_STATE_DONE);
@@ -1541,19 +1583,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         }
       }
 
+      if(newurl)
+        free(newurl);
       break;
+      }
 
     case CURLM_STATE_DONE:
 
       if(easy->easy_conn) {
-        /* Remove ourselves from the receive and done pipelines. Handle
-           should be on one of these lists, depending upon how we got here. */
+        /* Remove ourselves from the receive pipeline, if we are there. */
         Curl_removeHandleFromPipeline(data,
                                       easy->easy_conn->recv_pipe);
-        Curl_removeHandleFromPipeline(data,
-                                      easy->easy_conn->done_pipe);
         /* Check if we can move pending requests to send pipe */
-        checkPendPipeline(easy->easy_conn);
+        Curl_multi_process_pending_handles(multi);
 
         if(easy->easy_conn->bits.stream_was_rewound) {
           /* This request read past its response boundary so we quickly let
@@ -1570,7 +1612,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
          * access free'd data, if the connection is free'd and the handle
          * removed before we perform the processing in CURLM_STATE_COMPLETED
          */
-        if (easy->easy_conn)
+        if(easy->easy_conn)
           easy->easy_conn = NULL;
       }
 
@@ -1610,7 +1652,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       return CURLM_INTERNAL_ERROR;
     }
 
-    if(CURLM_STATE_COMPLETED > easy->state) {
+    if(easy->mstate < CURLM_STATE_COMPLETED) {
       if(CURLE_OK != easy->result) {
         /*
          * If an error was returned, and we aren't in completed state now,
@@ -1630,37 +1672,41 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
                                         easy->easy_conn->send_pipe);
           Curl_removeHandleFromPipeline(data,
                                         easy->easy_conn->recv_pipe);
-          Curl_removeHandleFromPipeline(data,
-                                        easy->easy_conn->done_pipe);
           /* Check if we can move pending requests to send pipe */
-          checkPendPipeline(easy->easy_conn);
-        }
+          Curl_multi_process_pending_handles(multi);
 
-        if(disconnect_conn) {
-          /* disconnect properly */
-          Curl_disconnect(easy->easy_conn, /* dead_connection */ FALSE);
+          if(disconnect_conn) {
+            /* disconnect properly */
+            Curl_disconnect(easy->easy_conn, /* dead_connection */ FALSE);
 
-          /* This is where we make sure that the easy_conn pointer is reset.
-             We don't have to do this in every case block above where a
-             failure is detected */
-          easy->easy_conn = NULL;
+            /* This is where we make sure that the easy_conn pointer is reset.
+               We don't have to do this in every case block above where a
+               failure is detected */
+            easy->easy_conn = NULL;
+          }
+        }
+        else if(easy->mstate == CURLM_STATE_CONNECT) {
+          /* Curl_connect() failed */
+          (void)Curl_posttransfer(data);
         }
 
         multistate(easy, CURLM_STATE_COMPLETED);
       }
       /* if there's still a connection to use, call the progress function */
-      else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn))
-        easy->result = CURLE_ABORTED_BY_CALLBACK;
-    }
-  } while(0);
-
-  if(CURLM_STATE_COMPLETED == easy->state) {
-    if(data->dns.hostcachetype == HCACHE_MULTI) {
-      /* clear out the usage of the shared DNS cache */
-      data->dns.hostcache = NULL;
-      data->dns.hostcachetype = HCACHE_NONE;
+      else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn)) {
+        /* aborted due to progress callback return code must close the
+           connection */
+        easy->easy_conn->bits.close = TRUE;
+
+        /* if not yet in DONE state, go there, otherwise COMPLETED */
+        multistate(easy, (easy->mstate < CURLM_STATE_DONE)?
+                   CURLM_STATE_DONE: CURLM_STATE_COMPLETED);
+        result = CURLM_CALL_MULTI_PERFORM;
+      }
     }
+  } WHILE_FALSE; /* just to break out from! */
 
+  if(CURLM_STATE_COMPLETED == easy->mstate) {
     /* now fill in the Curl_message with this info */
     msg = &easy->msg;
 
@@ -1680,7 +1726,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
 CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
 {
   struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
+  struct SessionHandle *easy;
   CURLMcode returncode=CURLM_OK;
   struct Curl_tree *t;
   struct timeval now = Curl_tvnow();
@@ -1688,12 +1734,12 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
   if(!GOOD_MULTI_HANDLE(multi))
     return CURLM_BAD_HANDLE;
 
-  easy=multi->easy.next;
-  while(easy != &multi->easy) {
+  easy=multi->easyp;
+  while(easy) {
     CURLMcode result;
-    struct WildcardData *wc = &easy->easy_handle->wildcard;
+    struct WildcardData *wc = &easy->wildcard;
 
-    if(easy->easy_handle->set.wildcardmatch) {
+    if(easy->set.wildcardmatch) {
       if(!wc->filelist) {
         CURLcode ret = Curl_wildcard_init(wc); /* init wildcard structures */
         if(ret)
@@ -1703,9 +1749,9 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
 
     do
       result = multi_runsingle(multi, now, easy);
-    while (CURLM_CALL_MULTI_PERFORM == result);
+    while(CURLM_CALL_MULTI_PERFORM == result);
 
-    if(easy->easy_handle->set.wildcardmatch) {
+    if(easy->set.wildcardmatch) {
       /* destruct wildcard structures if it is needed */
       if(wc->state == CURLWC_DONE || result)
         Curl_wildcard_dtor(wc);
@@ -1737,74 +1783,84 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
 
   *running_handles = multi->num_alive;
 
-  if( CURLM_OK >= returncode )
+  if(CURLM_OK >= returncode)
     update_timer(multi);
 
   return returncode;
 }
 
+static void close_all_connections(struct Curl_multi *multi)
+{
+  struct connectdata *conn;
+
+  conn = Curl_conncache_find_first_connection(multi->conn_cache);
+  while(conn) {
+    conn->data = multi->closure_handle;
+
+    /* This will remove the connection from the cache */
+    (void)Curl_disconnect(conn, FALSE);
+
+    conn = Curl_conncache_find_first_connection(multi->conn_cache);
+  }
+}
+
 CURLMcode curl_multi_cleanup(CURLM *multi_handle)
 {
   struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
-  struct Curl_one_easy *nexteasy;
-  int i;
-  struct closure *cl;
-  struct closure *n;
+  struct SessionHandle *easy;
+  struct SessionHandle *nexteasy;
 
   if(GOOD_MULTI_HANDLE(multi)) {
     multi->type = 0; /* not good anymore */
-    Curl_hash_destroy(multi->hostcache);
-    Curl_hash_destroy(multi->sockhash);
-    multi->hostcache = NULL;
-    multi->sockhash = NULL;
 
-    /* go over all connections that have close actions */
-    for(i=0; i< multi->connc->num; i++) {
-      if(multi->connc->connects[i] &&
-         multi->connc->connects[i]->protocol & PROT_CLOSEACTION) {
-        Curl_disconnect(multi->connc->connects[i], /* dead_connection */ FALSE);
-        multi->connc->connects[i] = NULL;
-      }
-    }
-    /* now walk through the list of handles we kept around only to be
-       able to close connections "properly" */
-    cl = multi->closure;
-    while(cl) {
-      cl->easy_handle->state.shared_conn = NULL; /* no more shared */
-      if(cl->easy_handle->state.closed)
-        /* close handle only if curl_easy_cleanup() already has been called
-           for this easy handle */
-        Curl_close(cl->easy_handle);
-      n = cl->next;
-      free(cl);
-      cl= n;
+    /* Close all the connections in the connection cache */
+    close_all_connections(multi);
+
+    if(multi->closure_handle) {
+      multi->closure_handle->dns.hostcache = multi->hostcache;
+      Curl_hostcache_clean(multi->closure_handle,
+                           multi->closure_handle->dns.hostcache);
+
+      Curl_close(multi->closure_handle);
+      multi->closure_handle = NULL;
     }
 
-    Curl_rm_connc(multi->connc);
+    Curl_hash_destroy(multi->sockhash);
+    multi->sockhash = NULL;
+
+    Curl_conncache_destroy(multi->conn_cache);
+    multi->conn_cache = NULL;
 
     /* remove the pending list of messages */
     Curl_llist_destroy(multi->msglist, NULL);
+    multi->msglist = NULL;
 
     /* remove all easy handles */
-    easy = multi->easy.next;
-    while(easy != &multi->easy) {
+    easy = multi->easyp;
+    while(easy) {
       nexteasy=easy->next;
-      if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
+      if(easy->dns.hostcachetype == HCACHE_MULTI) {
         /* clear out the usage of the shared DNS cache */
-        easy->easy_handle->dns.hostcache = NULL;
-        easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
+        Curl_hostcache_clean(easy, easy->dns.hostcache);
+        easy->dns.hostcache = NULL;
+        easy->dns.hostcachetype = HCACHE_NONE;
       }
 
       /* Clear the pointer to the connection cache */
-      easy->easy_handle->state.connc = NULL;
+      easy->state.conn_cache = NULL;
 
-      Curl_easy_addmulti(easy->easy_handle, NULL); /* clear the association */
+      Curl_easy_addmulti(easy, NULL); /* clear the association */
 
-      free(easy);
       easy = nexteasy;
     }
 
+    Curl_hash_destroy(multi->hostcache);
+    multi->hostcache = NULL;
+
+    /* Free the blacklists by setting them to NULL */
+    Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl);
+    Curl_pipeline_set_server_blacklist(NULL, &multi->pipelining_server_bl);
+
     free(multi);
 
     return CURLM_OK;
@@ -1856,7 +1912,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
  * call the callback accordingly.
  */
 static void singlesocket(struct Curl_multi *multi,
-                         struct Curl_one_easy *easy)
+                         struct SessionHandle *easy)
 {
   curl_socket_t socks[MAX_SOCKSPEREASYHANDLE];
   int i;
@@ -1864,7 +1920,6 @@ static void singlesocket(struct Curl_multi *multi,
   curl_socket_t s;
   int num;
   unsigned int curraction;
-  struct Curl_one_easy *easy_by_hash;
   bool remove_sock_from_hash;
 
   for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++)
@@ -1902,18 +1957,19 @@ static void singlesocket(struct Curl_multi *multi,
     }
     else {
       /* this is a socket we didn't have before, add it! */
-      entry = sh_addentry(multi->sockhash, s, easy->easy_handle);
+      entry = sh_addentry(multi->sockhash, s, easy);
       if(!entry)
         /* fatal */
         return;
     }
 
     /* we know (entry != NULL) at this point, see the logic above */
-    multi->socket_cb(easy->easy_handle,
-                     s,
-                     action,
-                     multi->socket_userp,
-                     entry->socketp);
+    if(multi->socket_cb)
+      multi->socket_cb(easy,
+                       s,
+                       action,
+                       multi->socket_userp,
+                       entry->socketp);
 
     entry->action = action; /* store the current action state */
   }
@@ -1942,34 +1998,31 @@ static void singlesocket(struct Curl_multi *multi,
         /* check if the socket to be removed serves a connection which has
            other easy-s in a pipeline. In this case the socket should not be
            removed. */
-        struct connectdata *easy_conn;
-
-        easy_by_hash = entry->easy->multi_pos;
-        easy_conn = easy_by_hash->easy_conn;
+        struct connectdata *easy_conn = easy->easy_conn;
         if(easy_conn) {
-          if (easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) {
+          if(easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) {
             /* the handle should not be removed from the pipe yet */
             remove_sock_from_hash = FALSE;
 
             /* Update the sockhash entry to instead point to the next in line
                for the recv_pipe, or the first (in case this particular easy
                isn't already) */
-            if (entry->easy == easy->easy_handle) {
-              if (isHandleAtHead(easy->easy_handle, easy_conn->recv_pipe))
+            if(entry->easy == easy) {
+              if(isHandleAtHead(easy, easy_conn->recv_pipe))
                 entry->easy = easy_conn->recv_pipe->head->next->ptr;
               else
                 entry->easy = easy_conn->recv_pipe->head->ptr;
             }
           }
-          if (easy_conn->send_pipe  && easy_conn->send_pipe->size > 1) {
+          if(easy_conn->send_pipe  && easy_conn->send_pipe->size > 1) {
             /* the handle should not be removed from the pipe yet */
             remove_sock_from_hash = FALSE;
 
             /* Update the sockhash entry to instead point to the next in line
                for the send_pipe, or the first (in case this particular easy
                isn't already) */
-            if (entry->easy == easy->easy_handle) {
-              if (isHandleAtHead(easy->easy_handle, easy_conn->send_pipe))
+            if(entry->easy == easy) {
+              if(isHandleAtHead(easy, easy_conn->send_pipe))
                 entry->easy = easy_conn->send_pipe->head->next->ptr;
               else
                 entry->easy = easy_conn->send_pipe->head->ptr;
@@ -1987,12 +2040,14 @@ static void singlesocket(struct Curl_multi *multi,
            either since it never got to know about it */
         remove_sock_from_hash = FALSE;
 
-      if (remove_sock_from_hash) {
-        multi->socket_cb(easy->easy_handle,
-                         s,
-                         CURL_POLL_REMOVE,
-                         multi->socket_userp,
-                         entry ? entry->socketp : NULL);
+      if(remove_sock_from_hash) {
+        /* in this case 'entry' is always non-NULL */
+        if(multi->socket_cb)
+          multi->socket_cb(easy,
+                           s,
+                           CURL_POLL_REMOVE,
+                           multi->socket_userp,
+                           entry->socketp);
         sh_delentry(multi->sockhash, s);
       }
 
@@ -2004,6 +2059,39 @@ static void singlesocket(struct Curl_multi *multi,
 }
 
 /*
+ * Curl_multi_closed()
+ *
+ * Used by the connect code to tell the multi_socket code that one of the
+ * sockets we were using have just been closed.  This function will then
+ * remove it from the sockethash for this handle to make the multi_socket API
+ * behave properly, especially for the case when libcurl will create another
+ * socket again and it gets the same file descriptor number.
+ */
+
+void Curl_multi_closed(struct connectdata *conn, curl_socket_t s)
+{
+  struct Curl_multi *multi = conn->data->multi;
+  if(multi) {
+    /* this is set if this connection is part of a handle that is added to
+       a multi handle, and only then this is necessary */
+    struct Curl_sh_entry *entry =
+      Curl_hash_pick(multi->sockhash, (char *)&s, sizeof(s));
+
+    if(entry) {
+      if(multi->socket_cb)
+        multi->socket_cb(conn->data, s, CURL_POLL_REMOVE,
+                         multi->socket_userp,
+                         entry->socketp);
+
+      /* now remove it from the socket hash */
+      sh_delentry(multi->sockhash, s);
+    }
+  }
+}
+
+
+
+/*
  * add_next_timeout()
  *
  * Each SessionHandle has a list of timeouts. The add_next_timeout() is called
@@ -2037,14 +2125,14 @@ static CURLMcode add_next_timeout(struct timeval now,
       break;
     e = n;
   }
-  if(!list->size)  {
+  e = list->head;
+  if(!e) {
     /* clear the expire times within the handles that we remove from the
        splay tree */
     tv->tv_sec = 0;
     tv->tv_usec = 0;
   }
   else {
-    e = list->head;
     /* copy the first entry to 'tv' */
     memcpy(tv, e->ptr, sizeof(*tv));
 
@@ -2058,6 +2146,11 @@ static CURLMcode add_next_timeout(struct timeval now,
   return CURLM_OK;
 }
 
+#ifdef WIN32
+#define TIMEOUT_INACCURACY 40000
+#else
+#define TIMEOUT_INACCURACY 3000
+#endif
 
 static CURLMcode multi_socket(struct Curl_multi *multi,
                               bool checkall,
@@ -2071,16 +2164,16 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
   struct timeval now = Curl_tvnow();
 
   if(checkall) {
-    struct Curl_one_easy *easyp;
+    struct SessionHandle *easy;
     /* *perform() deals with running_handles on its own */
     result = curl_multi_perform(multi, running_handles);
 
     /* walk through each easy handle and do the socket state change magic
        and callbacks */
-    easyp=multi->easy.next;
-    while(easyp != &multi->easy) {
-      singlesocket(multi, easyp);
-      easyp = easyp->next;
+    easy=multi->easyp;
+    while(easy) {
+      singlesocket(multi, easy);
+      easy = easy->next;
     }
 
     /* or should we fall-through and do the timer-based stuff? */
@@ -2108,31 +2201,35 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
       /* If the pipeline is enabled, take the handle which is in the head of
          the pipeline. If we should write into the socket, take the send_pipe
          head.  If we should read from the socket, take the recv_pipe head. */
-      if(data->set.one_easy->easy_conn) {
-        if ((ev_bitmask & CURL_POLL_OUT) &&
-            data->set.one_easy->easy_conn->send_pipe &&
-            data->set.one_easy->easy_conn->send_pipe->head)
-          data = data->set.one_easy->easy_conn->send_pipe->head->ptr;
-        else if ((ev_bitmask & CURL_POLL_IN) &&
-                 data->set.one_easy->easy_conn->recv_pipe &&
-                 data->set.one_easy->easy_conn->recv_pipe->head)
-          data = data->set.one_easy->easy_conn->recv_pipe->head->ptr;
+      if(data->easy_conn) {
+        if((ev_bitmask & CURL_POLL_OUT) &&
+           data->easy_conn->send_pipe &&
+           data->easy_conn->send_pipe->head)
+          data = data->easy_conn->send_pipe->head->ptr;
+        else if((ev_bitmask & CURL_POLL_IN) &&
+                data->easy_conn->recv_pipe &&
+                data->easy_conn->recv_pipe->head)
+          data = data->easy_conn->recv_pipe->head->ptr;
       }
 
-      if(data->set.one_easy->easy_conn)  /* set socket event bitmask */
-        data->set.one_easy->easy_conn->cselect_bits = ev_bitmask;
+      if(data->easy_conn &&
+         !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+        /* set socket event bitmask if they're not locked */
+        data->easy_conn->cselect_bits = ev_bitmask;
 
       do
-        result = multi_runsingle(multi, now, data->set.one_easy);
-      while (CURLM_CALL_MULTI_PERFORM == result);
+        result = multi_runsingle(multi, now, data);
+      while(CURLM_CALL_MULTI_PERFORM == result);
 
-      if(data->set.one_easy->easy_conn)
-        data->set.one_easy->easy_conn->cselect_bits = 0;
+      if(data->easy_conn &&
+         !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK))
+        /* clear the bitmask only if not locked */
+        data->easy_conn->cselect_bits = 0;
 
       if(CURLM_OK >= result)
         /* get the socket(s) and check if the state has been changed since
            last */
-        singlesocket(multi, data->set.one_easy);
+        singlesocket(multi, data);
 
       /* Now we fall-through and do the timer-based stuff, since we don't want
          to force the user to have to deal with timeouts as long as at least
@@ -2143,8 +2240,25 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
     }
   }
 
-  now.tv_usec += 40000; /* compensate for bad precision timers that might've
-                           triggered too early */
+  /* Compensate for bad precision timers that might've triggered too early.
+
+     This precaution was added in commit 2c72732ebf3da5e as a result of bad
+     resolution in the windows function use(d).
+
+     The problematic case here is when using the multi_socket API and libcurl
+     has told the application about a timeout, and that timeout is what fires
+     off a bit early. As we don't have any IDs associated with the timeout we
+     can't tell which timeout that fired off but we only have the times to use
+     to check what to do. If it fires off too early, we don't run the correct
+     actions and we don't tell the application again about the same timeout as
+     was already first in the queue...
+
+     Originally we made the timeouts run 40 milliseconds early on all systems,
+     but now we have an #ifdef setup to provide a decent precaution inaccuracy
+     margin.
+  */
+
+  now.tv_usec += TIMEOUT_INACCURACY;
   if(now.tv_usec >= 1000000) {
     now.tv_sec++;
     now.tv_usec -= 1000000;
@@ -2159,13 +2273,13 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
     /* the first loop lap 'data' can be NULL */
     if(data) {
       do
-        result = multi_runsingle(multi, now, data->set.one_easy);
-      while (CURLM_CALL_MULTI_PERFORM == result);
+        result = multi_runsingle(multi, now, data);
+      while(CURLM_CALL_MULTI_PERFORM == result);
 
       if(CURLM_OK >= result)
         /* get the socket(s) and check if the state has been changed since
            last */
-        singlesocket(multi, data->set.one_easy);
+        singlesocket(multi, data);
     }
 
     /* Check if there's one (more) expired timer to deal with! This function
@@ -2204,7 +2318,7 @@ CURLMcode curl_multi_setopt(CURLM *multi_handle,
     multi->socket_userp = va_arg(param, void *);
     break;
   case CURLMOPT_PIPELINING:
-    multi->pipelining_enabled = (bool)(0 != va_arg(param, long));
+    multi->pipelining_enabled = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
   case CURLMOPT_TIMERFUNCTION:
     multi->timer_cb = va_arg(param, curl_multi_timer_callback);
@@ -2215,6 +2329,29 @@ CURLMcode curl_multi_setopt(CURLM *multi_handle,
   case CURLMOPT_MAXCONNECTS:
     multi->maxconnects = va_arg(param, long);
     break;
+  case CURLMOPT_MAX_HOST_CONNECTIONS:
+    multi->max_host_connections = va_arg(param, long);
+    break;
+  case CURLMOPT_MAX_PIPELINE_LENGTH:
+    multi->max_pipeline_length = va_arg(param, long);
+    break;
+  case CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE:
+    multi->content_length_penalty_size = va_arg(param, long);
+    break;
+  case CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE:
+    multi->chunk_length_penalty_size = va_arg(param, long);
+    break;
+  case CURLMOPT_PIPELINING_SITE_BL:
+    res = Curl_pipeline_set_site_blacklist(va_arg(param, char **),
+                                           &multi->pipelining_site_bl);
+    break;
+  case CURLMOPT_PIPELINING_SERVER_BL:
+    res = Curl_pipeline_set_server_blacklist(va_arg(param, char **),
+                                             &multi->pipelining_server_bl);
+    break;
+  case CURLMOPT_MAX_TOTAL_CONNECTIONS:
+    multi->max_total_connections = va_arg(param, long);
+    break;
   default:
     res = CURLM_UNKNOWN_OPTION;
     break;
@@ -2316,7 +2453,7 @@ static int update_timer(struct Curl_multi *multi)
   if(multi_timeout(multi, &timeout_ms)) {
     return -1;
   }
-  if( timeout_ms < 0 ) {
+  if(timeout_ms < 0) {
     static const struct timeval none={0,0};
     if(Curl_splaycomparekeys(none, multi->timer_lastcall)) {
       multi->timer_lastcall = none;
@@ -2339,131 +2476,18 @@ static int update_timer(struct Curl_multi *multi)
   return multi->timer_cb((CURLM*)multi, timeout_ms, multi->timer_userp);
 }
 
-static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
-                                              struct connectdata *conn)
+void Curl_multi_set_easy_connection(struct SessionHandle *handle,
+                                    struct connectdata *conn)
 {
-  size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
-  struct curl_llist_element *sendhead = conn->send_pipe->head;
-  struct curl_llist *pipeline;
-  CURLcode rc;
-
-  if(!Curl_isPipeliningEnabled(handle) ||
-     pipeLen == 0)
-    pipeline = conn->send_pipe;
-  else {
-    if(conn->server_supports_pipelining &&
-       pipeLen < MAX_PIPELINE_LENGTH)
-      pipeline = conn->send_pipe;
-    else
-      pipeline = conn->pend_pipe;
-  }
-
-  rc = Curl_addHandleToPipeline(handle, pipeline);
-
-  if (pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
-      /* this is a new one as head, expire it */
-      conn->writechannel_inuse = FALSE; /* not in use yet */
-      infof(conn->data, "%p is at send pipe head!\n",
-            conn->send_pipe->head->ptr);
-      Curl_expire(conn->send_pipe->head->ptr, 1);
-  }
-
-  return rc;
-}
-
-static int checkPendPipeline(struct connectdata *conn)
-{
-  int result = 0;
-  struct curl_llist_element *sendhead = conn->send_pipe->head;
-
-  size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
-  if (conn->server_supports_pipelining || pipeLen == 0) {
-    struct curl_llist_element *curr = conn->pend_pipe->head;
-    const size_t maxPipeLen =
-      conn->server_supports_pipelining ? MAX_PIPELINE_LENGTH : 1;
-
-    while(pipeLen < maxPipeLen && curr) {
-      Curl_llist_move(conn->pend_pipe, curr,
-                      conn->send_pipe, conn->send_pipe->tail);
-      Curl_pgrsTime(curr->ptr, TIMER_PRETRANSFER);
-      ++result; /* count how many handles we moved */
-      curr = conn->pend_pipe->head;
-      ++pipeLen;
-    }
-  }
-
-  if (result) {
-    conn->now = Curl_tvnow();
-    /* something moved, check for a new send pipeline leader */
-    if(sendhead != conn->send_pipe->head) {
-      /* this is a new one as head, expire it */
-      conn->writechannel_inuse = FALSE; /* not in use yet */
-      infof(conn->data, "%p is at send pipe head!\n",
-            conn->send_pipe->head->ptr);
-      Curl_expire(conn->send_pipe->head->ptr, 1);
-    }
-  }
-
-  return result;
+  handle->easy_conn = conn;
 }
 
-/* Move this transfer from the sending list to the receiving list.
-
-   Pay special attention to the new sending list "leader" as it needs to get
-   checked to update what sockets it acts on.
-
-*/
-static void moveHandleFromSendToRecvPipeline(struct SessionHandle *handle,
-                                             struct connectdata *conn)
-{
-  struct curl_llist_element *curr;
-
-  curr = conn->send_pipe->head;
-  while(curr) {
-    if(curr->ptr == handle) {
-      Curl_llist_move(conn->send_pipe, curr,
-                      conn->recv_pipe, conn->recv_pipe->tail);
-
-      if(conn->send_pipe->head) {
-        /* Since there's a new easy handle at the start of the send pipeline,
-           set its timeout value to 1ms to make it trigger instantly */
-        conn->writechannel_inuse = FALSE; /* not used now */
-        infof(conn->data, "%p is at send pipe head B!\n",
-              conn->send_pipe->head->ptr);
-        Curl_expire(conn->send_pipe->head->ptr, 1);
-      }
-
-      /* The receiver's list is not really interesting here since either this
-         handle is now first in the list and we'll deal with it soon, or
-         another handle is already first and thus is already taken care of */
-
-      break; /* we're done! */
-    }
-    curr = curr->next;
-  }
-}
-
-static void moveHandleFromRecvToDonePipeline(struct SessionHandle *handle,
-                                            struct connectdata *conn)
-{
-  struct curl_llist_element *curr;
-
-  curr = conn->recv_pipe->head;
-  while(curr) {
-    if(curr->ptr == handle) {
-      Curl_llist_move(conn->recv_pipe, curr,
-                      conn->done_pipe, conn->done_pipe->tail);
-      break;
-    }
-    curr = curr->next;
-  }
-}
 static bool isHandleAtHead(struct SessionHandle *handle,
                            struct curl_llist *pipeline)
 {
   struct curl_llist_element *curr = pipeline->head;
   if(curr)
-    return (bool)(curr->ptr == handle);
+    return (curr->ptr == handle) ? TRUE : FALSE;
 
   return FALSE;
 }
@@ -2543,8 +2567,8 @@ void Curl_expire(struct SessionHandle *data, long milli)
   struct timeval *nowp = &data->state.expiretime;
   int rc;
 
-  /* this is only interesting for multi-interface using libcurl, and only
-     while there is still a multi interface struct remaining! */
+  /* this is only interesting while there is still an associated multi struct
+     remaining! */
   if(!multi)
     return;
 
@@ -2565,7 +2589,9 @@ void Curl_expire(struct SessionHandle *data, long milli)
       while(list->size > 0)
         Curl_llist_remove(list, list->tail, NULL);
 
+#ifdef DEBUGBUILD
       infof(data, "Expire cleared\n");
+#endif
       nowp->tv_sec = 0;
       nowp->tv_usec = 0;
     }
@@ -2635,135 +2661,70 @@ CURLMcode curl_multi_assign(CURLM *multi_handle,
   return CURLM_OK;
 }
 
-static void multi_connc_remove_handle(struct Curl_multi *multi,
-                                      struct SessionHandle *data)
+size_t Curl_multi_max_host_connections(struct Curl_multi *multi)
 {
-  /* a connection in the connection cache pointing to the given 'data' ? */
-  int i;
-
-  for(i=0; i< multi->connc->num; i++) {
-    struct connectdata * conn = multi->connc->connects[i];
-
-    if(conn && conn->data == data) {
-      /* If this easy_handle was the last one in charge for one or more
-         connections in the shared connection cache, we might need to keep
-         this handle around until either A) the connection is closed and
-         killed properly, or B) another easy_handle uses the connection.
-
-         The reason why we need to have a easy_handle associated with a live
-         connection is simply that some connections will need a handle to get
-         closed down properly. Currently, the only connections that need to
-         keep a easy_handle handle around are using FTP(S). Such connections
-         have the PROT_CLOSEACTION bit set.
-
-         Thus, we need to check for all connections in the shared cache that
-         points to this handle and are using PROT_CLOSEACTION. If there's any,
-         we need to add this handle to the list of "easy handles kept around
-         for nice connection closures".
-      */
-
-      if(conn->protocol & PROT_CLOSEACTION) {
-        /* this handle is still being used by a shared connection and
-           thus we leave it around for now */
-        if(add_closure(multi, data) == CURLM_OK)
-          data->state.shared_conn = multi;
-        else {
-          /* out of memory - so much for graceful shutdown */
-          Curl_disconnect(conn, /* dead_connection */ FALSE);
-          multi->connc->connects[i] = NULL;
-        }
-      }
-      else
-        /* disconect the easy handle from the connection since the connection
-           will now remain but this easy handle is going */
-        conn->data = NULL;
-    }
-  }
+  return multi ? multi->max_host_connections : 0;
 }
 
-/* Add the given data pointer to the list of 'closure handles' that are kept
-   around only to be able to close some connections nicely - just make sure
-   that this handle isn't already added, like for the cases when an easy
-   handle is removed, added and removed again... */
-static CURLMcode add_closure(struct Curl_multi *multi,
-                             struct SessionHandle *data)
+size_t Curl_multi_max_total_connections(struct Curl_multi *multi)
 {
-  struct closure *cl = multi->closure;
-  struct closure *p = NULL;
-  bool add = TRUE;
-
-  /* Before adding, scan through all the other currently kept handles and see
-     if there are any connections still referring to them and kill them if
-     not. */
-  while(cl) {
-    struct closure *n;
-    bool inuse = FALSE;
-    int i;
-
-    for(i=0; i< multi->connc->num; i++) {
-      if(multi->connc->connects[i] &&
-         (multi->connc->connects[i]->data == cl->easy_handle)) {
-        inuse = TRUE;
-        break;
-      }
-    }
-
-    n = cl->next;
+  return multi ? multi->max_total_connections : 0;
+}
 
-    if(!inuse) {
-      /* cl->easy_handle is now killable */
+size_t Curl_multi_max_pipeline_length(struct Curl_multi *multi)
+{
+  return multi ? multi->max_pipeline_length : 0;
+}
 
-      /* unmark it as not having a connection around that uses it anymore */
-      cl->easy_handle->state.shared_conn= NULL;
+curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi)
+{
+  return multi ? multi->content_length_penalty_size : 0;
+}
 
-      if(cl->easy_handle->state.closed) {
-        infof(data, "Delayed kill of easy handle %p\n", cl->easy_handle);
-        /* close handle only if curl_easy_cleanup() already has been called
-           for this easy handle */
-        Curl_close(cl->easy_handle);
-      }
-      if(p)
-        p->next = n;
-      else
-        multi->closure = n;
-      free(cl);
-    } else {
-      if(cl->easy_handle == data)
-        add = FALSE;
+curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi)
+{
+  return multi ? multi->chunk_length_penalty_size : 0;
+}
 
-      p = cl;
-    }
+struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi)
+{
+  return multi->pipelining_site_bl;
+}
 
-    cl = n;
-  }
+struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi)
+{
+  return multi->pipelining_server_bl;
+}
 
-  if (add) {
-    cl = calloc(1, sizeof(struct closure));
-    if(!cl)
-      return CURLM_OUT_OF_MEMORY;
+void Curl_multi_process_pending_handles(struct Curl_multi *multi)
+{
+  struct SessionHandle *easy;
 
-    cl->easy_handle = data;
-    cl->next = multi->closure;
-    multi->closure = cl;
+  easy=multi->easyp;
+  while(easy) {
+    if(easy->mstate == CURLM_STATE_CONNECT_PEND) {
+      multistate(easy, CURLM_STATE_CONNECT);
+      /* Make sure that the handle will be processed soonish. */
+      Curl_expire(easy, 1);
+    }
+    easy = easy->next; /* operate on next handle */
   }
-
-  return CURLM_OK;
 }
 
 #ifdef DEBUGBUILD
 void Curl_multi_dump(const struct Curl_multi *multi_handle)
 {
   struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
-  struct Curl_one_easy *easy;
+  struct SessionHandle *easy;
   int i;
   fprintf(stderr, "* Multi status: %d handles, %d alive\n",
           multi->num_easy, multi->num_alive);
-  for(easy=multi->easy.next; easy != &multi->easy; easy = easy->next) {
-    if(easy->state < CURLM_STATE_COMPLETED) {
+  for(easy=multi->easyp; easy; easy = easy->next) {
+    if(easy->mstate < CURLM_STATE_COMPLETED) {
       /* only display handles that are not completed */
       fprintf(stderr, "handle %p, state %s, %d sockets\n",
-              (void *)easy->easy_handle,
-              statename[easy->state], easy->numsocks);
+              (void *)easy,
+              statename[easy->mstate], easy->numsocks);
       for(i=0; i < easy->numsocks; i++) {
         curl_socket_t s = easy->sockets[i];
         struct Curl_sh_entry *entry =
diff --git a/lib/multihandle.h b/lib/multihandle.h
new file mode 100644 (file)
index 0000000..552aa93
--- /dev/null
@@ -0,0 +1,139 @@
+#ifndef HEADER_CURL_MULTIHANDLE_H
+#define HEADER_CURL_MULTIHANDLE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
+struct Curl_message {
+  /* the 'CURLMsg' is the part that is visible to the external user */
+  struct CURLMsg extmsg;
+};
+
+/* NOTE: if you add a state here, add the name to the statename[] array as
+   well!
+*/
+typedef enum {
+  CURLM_STATE_INIT,         /* 0 - start in this state */
+  CURLM_STATE_CONNECT_PEND, /* 1 - no connections, waiting for one */
+  CURLM_STATE_CONNECT,      /* 2 - resolve/connect has been sent off */
+  CURLM_STATE_WAITRESOLVE,  /* 3 - awaiting the resolve to finalize */
+  CURLM_STATE_WAITCONNECT,  /* 4 - awaiting the connect to finalize */
+  CURLM_STATE_WAITPROXYCONNECT, /* 5 - awaiting proxy CONNECT to finalize */
+  CURLM_STATE_PROTOCONNECT, /* 6 - completing the protocol-specific connect
+                                   phase */
+  CURLM_STATE_WAITDO,       /* 7 - wait for our turn to send the request */
+  CURLM_STATE_DO,           /* 8 - start send off the request (part 1) */
+  CURLM_STATE_DOING,        /* 9 - sending off the request (part 1) */
+  CURLM_STATE_DO_MORE,      /* 10 - send off the request (part 2) */
+  CURLM_STATE_DO_DONE,      /* 11 - done sending off request */
+  CURLM_STATE_WAITPERFORM,  /* 12 - wait for our turn to read the response */
+  CURLM_STATE_PERFORM,      /* 13 - transfer data */
+  CURLM_STATE_TOOFAST,      /* 14 - wait because limit-rate exceeded */
+  CURLM_STATE_DONE,         /* 15 - post data transfer operation */
+  CURLM_STATE_COMPLETED,    /* 16 - operation complete */
+  CURLM_STATE_MSGSENT,      /* 17 - the operation complete message is sent */
+  CURLM_STATE_LAST          /* 18 - not a true state, never use this */
+} CURLMstate;
+
+/* we support N sockets per easy handle. Set the corresponding bit to what
+   action we should wait for */
+#define MAX_SOCKSPEREASYHANDLE 5
+#define GETSOCK_READABLE (0x00ff)
+#define GETSOCK_WRITABLE (0xff00)
+
+/* This is the struct known as CURLM on the outside */
+struct Curl_multi {
+  /* First a simple identifier to easier detect if a user mix up
+     this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
+  long type;
+
+  /* We have a doubly-linked circular list with easy handles */
+  struct SessionHandle *easyp;
+  struct SessionHandle *easylp; /* last node */
+
+  int num_easy; /* amount of entries in the linked list above. */
+  int num_alive; /* amount of easy handles that are added but have not yet
+                    reached COMPLETE state */
+
+  struct curl_llist *msglist; /* a list of messages from completed transfers */
+
+  /* callback function and user data pointer for the *socket() API */
+  curl_socket_callback socket_cb;
+  void *socket_userp;
+
+  /* Hostname cache */
+  struct curl_hash *hostcache;
+
+  /* timetree points to the splay-tree of time nodes to figure out expire
+     times of all currently set timers */
+  struct Curl_tree *timetree;
+
+  /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note
+     the pluralis form, there can be more than one easy handle waiting on the
+     same actual socket) */
+  struct curl_hash *sockhash;
+
+  /* Whether pipelining is enabled for this multi handle */
+  bool pipelining_enabled;
+
+  /* Shared connection cache (bundles)*/
+  struct conncache *conn_cache;
+
+  /* This handle will be used for closing the cached connections in
+     curl_multi_cleanup() */
+  struct SessionHandle *closure_handle;
+
+  long maxconnects; /* if >0, a fixed limit of the maximum number of entries
+                       we're allowed to grow the connection cache to */
+
+  long max_host_connections; /* if >0, a fixed limit of the maximum number
+                                of connections per host */
+
+  long max_total_connections; /* if >0, a fixed limit of the maximum number
+                                 of connections in total */
+
+  long max_pipeline_length; /* if >0, maximum number of requests in a
+                               pipeline */
+
+  long content_length_penalty_size; /* a connection with a
+                                       content-length bigger than
+                                       this is not considered
+                                       for pipelining */
+
+  long chunk_length_penalty_size; /* a connection with a chunk length
+                                     bigger than this is not
+                                     considered for pipelining */
+
+  struct curl_llist *pipelining_site_bl; /* List of sites that are blacklisted
+                                            from pipelining */
+
+  struct curl_llist *pipelining_server_bl; /* List of server types that are
+                                              blacklisted from pipelining */
+
+  /* timer callback and user data pointer for the *socket() API */
+  curl_multi_timer_callback timer_cb;
+  void *timer_userp;
+  struct timeval timer_lastcall; /* the fixed time for the timeout for the
+                                    previous callback */
+};
+
+#endif /* HEADER_CURL_MULTIHANDLE_H */
+
index 7691818..d1b0e2f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __MULTIIF_H
-#define __MULTIIF_H
+#ifndef HEADER_CURL_MULTIIF_H
+#define HEADER_CURL_MULTIIF_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
+
+
 /*
  * Prototypes for library-wide functions provided by multi.c
  */
 void Curl_expire(struct SessionHandle *data, long milli);
 
-bool Curl_multi_canPipeline(const struct Curl_multi* multi);
+bool Curl_multi_pipeline_enabled(const struct Curl_multi* multi);
 void Curl_multi_handlePipeBreak(struct SessionHandle *data);
 
+/* Internal version of curl_multi_init() accepts size parameters for the
+   socket and connection hashes */
+struct Curl_multi *Curl_multi_handle(int hashsize, int chashsize);
+
 /* the write bits start at bit 16 for the *getsock() bitmap */
 #define GETSOCK_WRITEBITSTART 16
 
@@ -50,4 +56,43 @@ void Curl_multi_handlePipeBreak(struct SessionHandle *data);
 void Curl_multi_dump(const struct Curl_multi *multi_handle);
 #endif
 
-#endif /* __MULTIIF_H */
+/* Update the current connection of a One_Easy handle */
+void Curl_multi_set_easy_connection(struct SessionHandle *handle,
+                                    struct connectdata *conn);
+
+void Curl_multi_process_pending_handles(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */
+size_t Curl_multi_max_host_connections(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_MAX_PIPELINE_LENGTH option */
+size_t Curl_multi_max_pipeline_length(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE option */
+curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE option */
+curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_PIPELINING_SITE_BL option */
+struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_PIPELINING_SERVER_BL option */
+struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi);
+
+/* Return the value of the CURLMOPT_MAX_TOTAL_CONNECTIONS option */
+size_t Curl_multi_max_total_connections(struct Curl_multi *multi);
+
+/*
+ * Curl_multi_closed()
+ *
+ * Used by the connect code to tell the multi_socket code that one of the
+ * sockets we were using have just been closed.  This function will then
+ * remove it from the sockethash for this handle to make the multi_socket API
+ * behave properly, especially for the case when libcurl will create another
+ * socket again and it gets the same file descriptor number.
+ */
+
+void Curl_multi_closed(struct connectdata *conn, curl_socket_t s);
+
+#endif /* HEADER_CURL_MULTIIF_H */
index e944325..2c5942a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
-#ifdef __VMS
-#include <unixlib.h>
-#endif
 
 #include <curl/curl.h>
 #include "netrc.h"
 /* The last #include file should be: */
 #include "memdebug.h"
 
-/* Debug this single source file with:
-   'make netrc' then run './netrc'!
-
-   Oh, make sure you have a .netrc file too ;-)
- */
-
 /* Get user and password from .netrc when given a machine name */
 
-enum {
+enum host_lookup_state {
   NOTHING,
   HOSTFOUND,    /* the 'machine' keyword was found */
-  HOSTCOMPLETE, /* the machine name following the keyword was found too */
-  HOSTVALID,    /* this is "our" machine! */
-
-  HOSTEND /* LAST enum */
+  HOSTVALID     /* this is "our" machine! */
 };
 
-/* make sure we have room for at least this size: */
-#define LOGINSIZE 64
-#define PASSWORDSIZE 64
-
-/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
+/*
+ * @unittest: 1304
+ */
 int Curl_parsenetrc(const char *host,
                     char *login,
                     char *password,
@@ -83,7 +62,7 @@ int Curl_parsenetrc(const char *host,
   char *home = NULL;
   bool home_alloc = FALSE;
   bool netrc_alloc = FALSE;
-  int state=NOTHING;
+  enum host_lookup_state state=NOTHING;
 
   char state_login=0;      /* Found a login keyword */
   char state_password=0;   /* Found a password keyword */
@@ -91,21 +70,6 @@ int Curl_parsenetrc(const char *host,
 
 #define NETRC DOT_CHAR "netrc"
 
-#ifdef DEBUGBUILD
-  {
-    /* This is a hack to allow testing.
-     * If compiled with --enable-debug and CURL_DEBUG_NETRC is defined,
-     * then it's the path to a substitute .netrc for testing purposes *only* */
-
-    char *override = curl_getenv("CURL_DEBUG_NETRC");
-
-    if(override) {
-      fprintf(stderr, "NETRC: overridden " NETRC " file: %s\n", override);
-      netrcfile = override;
-      netrc_alloc = TRUE;
-    }
-  }
-#endif /* DEBUGBUILD */
   if(!netrcfile) {
     home = curl_getenv("HOME"); /* portable environment reader */
     if(home) {
@@ -116,11 +80,7 @@ int Curl_parsenetrc(const char *host,
       struct passwd *pw;
       pw= getpwuid(geteuid());
       if(pw) {
-#ifdef __VMS
-        home = decc_translate_vms(pw->pw_dir);
-#else
         home = pw->pw_dir;
-#endif
       }
 #endif
     }
@@ -168,9 +128,6 @@ int Curl_parsenetrc(const char *host,
           if(Curl_raw_equal(host, tok)) {
             /* and yes, this is our host! */
             state=HOSTVALID;
-#ifdef _NETRC_DEBUG
-            fprintf(stderr, "HOST: %s\n", tok);
-#endif
             retcode=0; /* we did find our host */
           }
           else
@@ -185,18 +142,12 @@ int Curl_parsenetrc(const char *host,
             }
             else {
               strncpy(login, tok, LOGINSIZE-1);
-#ifdef _NETRC_DEBUG
-              fprintf(stderr, "LOGIN: %s\n", login);
-#endif
             }
             state_login=0;
           }
           else if(state_password) {
             if(state_our_login || !specific_login) {
               strncpy(password, tok, PASSWORDSIZE-1);
-#ifdef _NETRC_DEBUG
-              fprintf(stderr, "PASSWORD: %s\n", password);
-#endif
             }
             state_password=0;
           }
@@ -226,20 +177,3 @@ int Curl_parsenetrc(const char *host,
 
   return retcode;
 }
-
-#ifdef _NETRC_DEBUG
-int main(int argc, argv_item_t argv[])
-{
-  char login[64]="";
-  char password[64]="";
-
-  if(argc<2)
-    return -1;
-
-  if(0 == ParseNetrc(argv[1], login, password)) {
-    printf("HOST: %s LOGIN: %s PASSWORD: %s\n",
-           argv[1], login, password);
-  }
-}
-
-#endif
index 5406d4c..4db764d 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
+/* Make sure we have room for at least this size: */
+#define LOGINSIZE 64
+#define PASSWORDSIZE 64
+
+/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
 int Curl_parsenetrc(const char *host,
                     char *login,
                     char *password,
diff --git a/lib/non-ascii.c b/lib/non-ascii.c
new file mode 100644 (file)
index 0000000..91d6a54
--- /dev/null
@@ -0,0 +1,343 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#include <curl/curl.h>
+
+#include "non-ascii.h"
+#include "formdata.h"
+#include "sendf.h"
+#include "urldata.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+#ifdef HAVE_ICONV
+#include <iconv.h>
+/* set default codesets for iconv */
+#ifndef CURL_ICONV_CODESET_OF_NETWORK
+#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+#endif
+#ifndef CURL_ICONV_CODESET_FOR_UTF8
+#define CURL_ICONV_CODESET_FOR_UTF8   "UTF-8"
+#endif
+#define ICONV_ERROR  (size_t)-1
+#endif /* HAVE_ICONV */
+
+/*
+ * Curl_convert_clone() returns a malloced copy of the source string (if
+ * returning CURLE_OK), with the data converted to network format.
+ */
+CURLcode Curl_convert_clone(struct SessionHandle *data,
+                           const char *indata,
+                           size_t insize,
+                           char **outbuf)
+{
+  char *convbuf;
+  CURLcode result;
+
+  convbuf = malloc(insize);
+  if(!convbuf)
+    return CURLE_OUT_OF_MEMORY;
+
+  memcpy(convbuf, indata, insize);
+  result = Curl_convert_to_network(data, convbuf, insize);
+  if(result) {
+    free(convbuf);
+    return result;
+  }
+
+  *outbuf = convbuf; /* return the converted buffer */
+
+  return CURLE_OK;
+}
+
+/*
+ * Curl_convert_to_network() is an internal function for performing ASCII
+ * conversions on non-ASCII platforms. It convers the buffer _in place_.
+ */
+CURLcode Curl_convert_to_network(struct SessionHandle *data,
+                                 char *buffer, size_t length)
+{
+  CURLcode rc;
+
+  if(data->set.convtonetwork) {
+    /* use translation callback */
+    rc = data->set.convtonetwork(buffer, length);
+    if(rc != CURLE_OK) {
+      failf(data,
+            "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s",
+            (int)rc, curl_easy_strerror(rc));
+    }
+    return rc;
+  }
+  else {
+#ifdef HAVE_ICONV
+    /* do the translation ourselves */
+    char *input_ptr, *output_ptr;
+    size_t in_bytes, out_bytes, rc;
+    int error;
+
+    /* open an iconv conversion descriptor if necessary */
+    if(data->outbound_cd == (iconv_t)-1) {
+      data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+                                     CURL_ICONV_CODESET_OF_HOST);
+      if(data->outbound_cd == (iconv_t)-1) {
+        error = ERRNO;
+        failf(data,
+              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+              CURL_ICONV_CODESET_OF_NETWORK,
+              CURL_ICONV_CODESET_OF_HOST,
+              error, strerror(error));
+        return CURLE_CONV_FAILED;
+      }
+    }
+    /* call iconv */
+    input_ptr = output_ptr = buffer;
+    in_bytes = out_bytes = length;
+    rc = iconv(data->outbound_cd, (const char**)&input_ptr, &in_bytes,
+               &output_ptr, &out_bytes);
+    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+      error = ERRNO;
+      failf(data,
+            "The Curl_convert_to_network iconv call failed with errno %i: %s",
+            error, strerror(error));
+      return CURLE_CONV_FAILED;
+    }
+#else
+    failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback required");
+    return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+  }
+
+  return CURLE_OK;
+}
+
+/*
+ * Curl_convert_from_network() is an internal function for performing ASCII
+ * conversions on non-ASCII platforms. It convers the buffer _in place_.
+ */
+CURLcode Curl_convert_from_network(struct SessionHandle *data,
+                                   char *buffer, size_t length)
+{
+  CURLcode rc;
+
+  if(data->set.convfromnetwork) {
+    /* use translation callback */
+    rc = data->set.convfromnetwork(buffer, length);
+    if(rc != CURLE_OK) {
+      failf(data,
+            "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s",
+            (int)rc, curl_easy_strerror(rc));
+    }
+    return rc;
+  }
+  else {
+#ifdef HAVE_ICONV
+    /* do the translation ourselves */
+    char *input_ptr, *output_ptr;
+    size_t in_bytes, out_bytes, rc;
+    int error;
+
+    /* open an iconv conversion descriptor if necessary */
+    if(data->inbound_cd == (iconv_t)-1) {
+      data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+                                    CURL_ICONV_CODESET_OF_NETWORK);
+      if(data->inbound_cd == (iconv_t)-1) {
+        error = ERRNO;
+        failf(data,
+              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+              CURL_ICONV_CODESET_OF_HOST,
+              CURL_ICONV_CODESET_OF_NETWORK,
+              error, strerror(error));
+        return CURLE_CONV_FAILED;
+      }
+    }
+    /* call iconv */
+    input_ptr = output_ptr = buffer;
+    in_bytes = out_bytes = length;
+    rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes,
+               &output_ptr, &out_bytes);
+    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+      error = ERRNO;
+      failf(data,
+            "Curl_convert_from_network iconv call failed with errno %i: %s",
+            error, strerror(error));
+      return CURLE_CONV_FAILED;
+    }
+#else
+    failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback required");
+    return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+  }
+
+  return CURLE_OK;
+}
+
+/*
+ * Curl_convert_from_utf8() is an internal function for performing UTF-8
+ * conversions on non-ASCII platforms.
+ */
+CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
+                                char *buffer, size_t length)
+{
+  CURLcode rc;
+
+  if(data->set.convfromutf8) {
+    /* use translation callback */
+    rc = data->set.convfromutf8(buffer, length);
+    if(rc != CURLE_OK) {
+      failf(data,
+            "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s",
+            (int)rc, curl_easy_strerror(rc));
+    }
+    return rc;
+  }
+  else {
+#ifdef HAVE_ICONV
+    /* do the translation ourselves */
+    const char *input_ptr;
+    char *output_ptr;
+    size_t in_bytes, out_bytes, rc;
+    int error;
+
+    /* open an iconv conversion descriptor if necessary */
+    if(data->utf8_cd == (iconv_t)-1) {
+      data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+                                 CURL_ICONV_CODESET_FOR_UTF8);
+      if(data->utf8_cd == (iconv_t)-1) {
+        error = ERRNO;
+        failf(data,
+              "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
+              CURL_ICONV_CODESET_OF_HOST,
+              CURL_ICONV_CODESET_FOR_UTF8,
+              error, strerror(error));
+        return CURLE_CONV_FAILED;
+      }
+    }
+    /* call iconv */
+    input_ptr = output_ptr = buffer;
+    in_bytes = out_bytes = length;
+    rc = iconv(data->utf8_cd, &input_ptr, &in_bytes,
+               &output_ptr, &out_bytes);
+    if((rc == ICONV_ERROR) || (in_bytes != 0)) {
+      error = ERRNO;
+      failf(data,
+            "The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
+            error, strerror(error));
+      return CURLE_CONV_FAILED;
+    }
+    if(output_ptr < input_ptr) {
+      /* null terminate the now shorter output string */
+      *output_ptr = 0x00;
+    }
+#else
+    failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback required");
+    return CURLE_CONV_REQD;
+#endif /* HAVE_ICONV */
+  }
+
+  return CURLE_OK;
+}
+
+/*
+ * Init conversion stuff for a SessionHandle
+ */
+void Curl_convert_init(struct SessionHandle *data)
+{
+#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
+  /* conversion descriptors for iconv calls */
+  data->outbound_cd = (iconv_t)-1;
+  data->inbound_cd  = (iconv_t)-1;
+  data->utf8_cd     = (iconv_t)-1;
+#else
+  (void)data;
+#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+}
+
+/*
+ * Setup conversion stuff for a SessionHandle
+ */
+void Curl_convert_setup(struct SessionHandle *data)
+{
+  data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+                                CURL_ICONV_CODESET_OF_NETWORK);
+  data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+                                 CURL_ICONV_CODESET_OF_HOST);
+  data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+                             CURL_ICONV_CODESET_FOR_UTF8);
+}
+
+/*
+ * Close conversion stuff for a SessionHandle
+ */
+
+void Curl_convert_close(struct SessionHandle *data)
+{
+#ifdef HAVE_ICONV
+  /* close iconv conversion descriptors */
+  if(data->inbound_cd != (iconv_t)-1) {
+    iconv_close(data->inbound_cd);
+  }
+  if(data->outbound_cd != (iconv_t)-1) {
+    iconv_close(data->outbound_cd);
+  }
+  if(data->utf8_cd != (iconv_t)-1) {
+    iconv_close(data->utf8_cd);
+  }
+#else
+  (void)data;
+#endif /* HAVE_ICONV */
+}
+
+/*
+ * Curl_convert_form() is used from http.c, this converts any form items that
+   need to be sent in the network encoding.  Returns CURLE_OK on success.
+ */
+CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form)
+{
+  struct FormData *next;
+  CURLcode rc;
+
+  if(!form)
+    return CURLE_OK;
+
+  if(!data)
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+
+  do {
+    next=form->next;  /* the following form line */
+    if(form->type == FORM_DATA) {
+      rc = Curl_convert_to_network(data, form->line, form->length);
+      /* Curl_convert_to_network calls failf if unsuccessful */
+      if(rc != CURLE_OK)
+        return rc;
+    }
+  } while((form = next) != NULL); /* continue */
+  return CURLE_OK;
+}
+
+#endif /* CURL_DOES_CONVERSIONS */
diff --git a/lib/non-ascii.h b/lib/non-ascii.h
new file mode 100644 (file)
index 0000000..8b4b7c2
--- /dev/null
@@ -0,0 +1,63 @@
+#ifndef HEADER_CURL_NON_ASCII_H
+#define HEADER_CURL_NON_ASCII_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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_setup.h"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#include "urldata.h"
+
+/*
+ * Curl_convert_clone() returns a malloced copy of the source string (if
+ * returning CURLE_OK), with the data converted to network format.
+ *
+ * If no conversion was needed *outbuf may be NULL.
+ */
+CURLcode Curl_convert_clone(struct SessionHandle *data,
+                            const char *indata,
+                            size_t insize,
+                            char **outbuf);
+
+void Curl_convert_init(struct SessionHandle *data);
+void Curl_convert_setup(struct SessionHandle *data);
+void Curl_convert_close(struct SessionHandle *data);
+
+CURLcode Curl_convert_to_network(struct SessionHandle *data,
+                                 char *buffer, size_t length);
+CURLcode Curl_convert_from_network(struct SessionHandle *data,
+                                 char *buffer, size_t length);
+CURLcode Curl_convert_from_utf8(struct SessionHandle *data,
+                                 char *buffer, size_t length);
+CURLcode Curl_convert_form(struct SessionHandle *data, struct FormData *form);
+#else
+#define Curl_convert_clone(a,b,c,d) ((void)a, CURLE_OK)
+#define Curl_convert_init(x) Curl_nop_stmt
+#define Curl_convert_setup(x) Curl_nop_stmt
+#define Curl_convert_close(x) Curl_nop_stmt
+#define Curl_convert_to_network(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_from_network(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_from_utf8(a,b,c) ((void)a, CURLE_OK)
+#define Curl_convert_form(a,b) CURLE_OK
+#endif
+
+#endif /* HEADER_CURL_NON_ASCII_H */
index cd81950..1447c87 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
 #include <sys/filio.h>
@@ -64,35 +55,34 @@ int curlx_nonblock(curl_socket_t sockfd,    /* operate on this */
 
   /* most recent unix versions */
   int flags;
-  flags = fcntl(sockfd, F_GETFL, 0);
-  if(FALSE != nonblock)
-    return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
+  flags = sfcntl(sockfd, F_GETFL, 0);
+  if(nonblock)
+    return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
   else
-    return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
+    return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
 
 #elif defined(HAVE_IOCTL_FIONBIO)
 
   /* older unix versions */
-  int flags;
-  flags = nonblock;
+  int flags = nonblock ? 1 : 0;
   return ioctl(sockfd, FIONBIO, &flags);
 
 #elif defined(HAVE_IOCTLSOCKET_FIONBIO)
 
   /* Windows */
-  unsigned long flags;
-  flags = nonblock;
+  unsigned long flags = nonblock ? 1UL : 0UL;
   return ioctlsocket(sockfd, FIONBIO, &flags);
 
 #elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
 
   /* Amiga */
-  return IoctlSocket(sockfd, FIONBIO, (long)nonblock);
+  long flags = nonblock ? 1L : 0L;
+  return IoctlSocket(sockfd, FIONBIO, flags);
 
 #elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK)
 
   /* BeOS */
-  long b = nonblock ? 1 : 0;
+  long b = nonblock ? 1L : 0L;
   return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
 
 #else
index adcd2c1..b540ae4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __NONBLOCK_H
-#define __NONBLOCK_H
+#ifndef HEADER_CURL_NONBLOCK_H
+#define HEADER_CURL_NONBLOCK_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -27,4 +27,5 @@
 int curlx_nonblock(curl_socket_t sockfd,    /* operate on this */
                    int nonblock   /* TRUE or FALSE */);
 
-#endif
+#endif /* HEADER_CURL_NONBLOCK_H */
+
index 6d3f12c..cc3d9c9 100644 (file)
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * but sslgen.c should ever call or use these functions.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#ifdef USE_NSS
 
 #include "urldata.h"
 #include "sendf.h"
 #include "strequal.h"
 #include "select.h"
 #include "sslgen.h"
+#include "llist.h"
 
 #define _MPRINTF_REPLACE /* use the internal *printf() functions */
 #include <curl/mprintf.h>
 
-#ifdef USE_NSS
-
 #include "nssg.h"
 #include <nspr.h>
 #include <nss.h>
 #include <certdb.h>
 #include <base64.h>
 #include <cert.h>
+#include <prerror.h>
 
 #include "curl_memory.h"
 #include "rawstr.h"
-#include "easyif.h" /* for Curl_convert_from_utf8 prototype */
+#include "warnless.h"
 
 /* The last #include file should be: */
 #include "memdebug.h"
@@ -81,79 +76,83 @@ PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
 
 PRLock * nss_initlock = NULL;
 PRLock * nss_crllock = NULL;
+#ifdef HAVE_NSS_INITCONTEXT
+NSSInitContext * nss_context = NULL;
+#endif
 
 volatile int initialized = 0;
 
 typedef struct {
   const char *name;
   int num;
-  PRInt32 version; /* protocol version valid for this cipher */
 } cipher_s;
 
-#define PK11_SETATTRS(x,id,v,l) (x)->type = (id);       \
-  (x)->pValue=(v); (x)->ulValueLen = (l)
+#define PK11_SETATTRS(_attr, _idx, _type, _val, _len) do {  \
+  CK_ATTRIBUTE *ptr = (_attr) + ((_idx)++);                 \
+  ptr->type = (_type);                                      \
+  ptr->pValue = (_val);                                     \
+  ptr->ulValueLen = (_len);                                 \
+} WHILE_FALSE
 
 #define CERT_NewTempCertificate __CERT_NewTempCertificate
 
-enum sslversion { SSL2 = 1, SSL3 = 2, TLS = 4 };
-
 #define NUM_OF_CIPHERS sizeof(cipherlist)/sizeof(cipherlist[0])
 static const cipher_s cipherlist[] = {
   /* SSL2 cipher suites */
-  {"rc4", SSL_EN_RC4_128_WITH_MD5, SSL2},
-  {"rc4-md5", SSL_EN_RC4_128_WITH_MD5, SSL2},
-  {"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5, SSL2},
-  {"rc2", SSL_EN_RC2_128_CBC_WITH_MD5, SSL2},
-  {"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5, SSL2},
-  {"des", SSL_EN_DES_64_CBC_WITH_MD5, SSL2},
-  {"desede3", SSL_EN_DES_192_EDE3_CBC_WITH_MD5, SSL2},
+  {"rc4",                        SSL_EN_RC4_128_WITH_MD5},
+  {"rc4-md5",                    SSL_EN_RC4_128_WITH_MD5},
+  {"rc4export",                  SSL_EN_RC4_128_EXPORT40_WITH_MD5},
+  {"rc2",                        SSL_EN_RC2_128_CBC_WITH_MD5},
+  {"rc2export",                  SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5},
+  {"des",                        SSL_EN_DES_64_CBC_WITH_MD5},
+  {"desede3",                    SSL_EN_DES_192_EDE3_CBC_WITH_MD5},
   /* SSL3/TLS cipher suites */
-  {"rsa_rc4_128_md5", SSL_RSA_WITH_RC4_128_MD5, SSL3 | TLS},
-  {"rsa_rc4_128_sha", SSL_RSA_WITH_RC4_128_SHA, SSL3 | TLS},
-  {"rsa_3des_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL3 | TLS},
-  {"rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA, SSL3 | TLS},
-  {"rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL3 | TLS},
-  {"rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5, SSL3 | TLS},
-  {"rsa_null_md5", SSL_RSA_WITH_NULL_MD5, SSL3 | TLS},
-  {"rsa_null_sha", SSL_RSA_WITH_NULL_SHA, SSL3 | TLS},
-  {"fips_3des_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA, SSL3 | TLS},
-  {"fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA, SSL3 | TLS},
-  {"fortezza", SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA, SSL3 | TLS},
-  {"fortezza_rc4_128_sha", SSL_FORTEZZA_DMS_WITH_RC4_128_SHA, SSL3 | TLS},
-  {"fortezza_null", SSL_FORTEZZA_DMS_WITH_NULL_SHA, SSL3 | TLS},
+  {"rsa_rc4_128_md5",            SSL_RSA_WITH_RC4_128_MD5},
+  {"rsa_rc4_128_sha",            SSL_RSA_WITH_RC4_128_SHA},
+  {"rsa_3des_sha",               SSL_RSA_WITH_3DES_EDE_CBC_SHA},
+  {"rsa_des_sha",                SSL_RSA_WITH_DES_CBC_SHA},
+  {"rsa_rc4_40_md5",             SSL_RSA_EXPORT_WITH_RC4_40_MD5},
+  {"rsa_rc2_40_md5",             SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5},
+  {"rsa_null_md5",               SSL_RSA_WITH_NULL_MD5},
+  {"rsa_null_sha",               SSL_RSA_WITH_NULL_SHA},
+  {"fips_3des_sha",              SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA},
+  {"fips_des_sha",               SSL_RSA_FIPS_WITH_DES_CBC_SHA},
+  {"fortezza",                   SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA},
+  {"fortezza_rc4_128_sha",       SSL_FORTEZZA_DMS_WITH_RC4_128_SHA},
+  {"fortezza_null",              SSL_FORTEZZA_DMS_WITH_NULL_SHA},
   /* TLS 1.0: Exportable 56-bit Cipher Suites. */
-  {"rsa_des_56_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL3 | TLS},
-  {"rsa_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA, SSL3 | TLS},
+  {"rsa_des_56_sha",             TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA},
+  {"rsa_rc4_56_sha",             TLS_RSA_EXPORT1024_WITH_RC4_56_SHA},
   /* AES ciphers. */
-  {"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA, SSL3 | TLS},
-  {"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA, SSL3 | TLS},
+  {"rsa_aes_128_sha",            TLS_RSA_WITH_AES_128_CBC_SHA},
+  {"rsa_aes_256_sha",            TLS_RSA_WITH_AES_256_CBC_SHA},
 #ifdef NSS_ENABLE_ECC
   /* ECC ciphers. */
-  {"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA, TLS},
-  {"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS},
-  {"ecdh_ecdsa_3des_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS},
-  {"ecdh_ecdsa_aes_128_sha", TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS},
-  {"ecdh_ecdsa_aes_256_sha", TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS},
-  {"ecdhe_ecdsa_null_sha", TLS_ECDHE_ECDSA_WITH_NULL_SHA, TLS},
-  {"ecdhe_ecdsa_rc4_128_sha", TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS},
-  {"ecdhe_ecdsa_3des_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS},
-  {"ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS},
-  {"ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS},
-  {"ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA, TLS},
-  {"ecdh_rsa_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS},
-  {"ecdh_rsa_3des_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, TLS},
-  {"ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS},
-  {"ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS},
-  {"echde_rsa_null", TLS_ECDHE_RSA_WITH_NULL_SHA, TLS},
-  {"ecdhe_rsa_rc4_128_sha", TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS},
-  {"ecdhe_rsa_3des_sha", TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, TLS},
-  {"ecdhe_rsa_aes_128_sha", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS},
-  {"ecdhe_rsa_aes_256_sha", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS},
-  {"ecdh_anon_null_sha", TLS_ECDH_anon_WITH_NULL_SHA, TLS},
-  {"ecdh_anon_rc4_128sha", TLS_ECDH_anon_WITH_RC4_128_SHA, TLS},
-  {"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, TLS},
-  {"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA, TLS},
-  {"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA, TLS},
+  {"ecdh_ecdsa_null_sha",        TLS_ECDH_ECDSA_WITH_NULL_SHA},
+  {"ecdh_ecdsa_rc4_128_sha",     TLS_ECDH_ECDSA_WITH_RC4_128_SHA},
+  {"ecdh_ecdsa_3des_sha",        TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA},
+  {"ecdh_ecdsa_aes_128_sha",     TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA},
+  {"ecdh_ecdsa_aes_256_sha",     TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA},
+  {"ecdhe_ecdsa_null_sha",       TLS_ECDHE_ECDSA_WITH_NULL_SHA},
+  {"ecdhe_ecdsa_rc4_128_sha",    TLS_ECDHE_ECDSA_WITH_RC4_128_SHA},
+  {"ecdhe_ecdsa_3des_sha",       TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA},
+  {"ecdhe_ecdsa_aes_128_sha",    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA},
+  {"ecdhe_ecdsa_aes_256_sha",    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA},
+  {"ecdh_rsa_null_sha",          TLS_ECDH_RSA_WITH_NULL_SHA},
+  {"ecdh_rsa_128_sha",           TLS_ECDH_RSA_WITH_RC4_128_SHA},
+  {"ecdh_rsa_3des_sha",          TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA},
+  {"ecdh_rsa_aes_128_sha",       TLS_ECDH_RSA_WITH_AES_128_CBC_SHA},
+  {"ecdh_rsa_aes_256_sha",       TLS_ECDH_RSA_WITH_AES_256_CBC_SHA},
+  {"echde_rsa_null",             TLS_ECDHE_RSA_WITH_NULL_SHA},
+  {"ecdhe_rsa_rc4_128_sha",      TLS_ECDHE_RSA_WITH_RC4_128_SHA},
+  {"ecdhe_rsa_3des_sha",         TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA},
+  {"ecdhe_rsa_aes_128_sha",      TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA},
+  {"ecdhe_rsa_aes_256_sha",      TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA},
+  {"ecdh_anon_null_sha",         TLS_ECDH_anon_WITH_NULL_SHA},
+  {"ecdh_anon_rc4_128sha",       TLS_ECDH_anon_WITH_RC4_128_SHA},
+  {"ecdh_anon_3des_sha",         TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA},
+  {"ecdh_anon_aes_128_sha",      TLS_ECDH_anon_WITH_AES_128_CBC_SHA},
+  {"ecdh_anon_aes_256_sha",      TLS_ECDH_anon_WITH_AES_256_CBC_SHA},
 #endif
 };
 
@@ -169,11 +168,23 @@ static const int enable_ciphers_by_default[] = {
   SSL_NULL_WITH_NULL_NULL
 };
 
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
 static const char* pem_library = "libnsspem.so";
-#endif
 SECMODModule* mod = NULL;
 
+static const char* nss_error_to_name(PRErrorCode code)
+{
+  const char *name = PR_ErrorToName(code);
+  if(name)
+    return name;
+
+  return "unknown error";
+}
+
+static void nss_print_error_message(struct SessionHandle *data, PRUint32 err)
+{
+  failf(data, "%s", PR_ErrorToString(err, PR_LANGUAGE_I_DEFAULT));
+}
+
 static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
                              char *cipher_list)
 {
@@ -230,7 +241,7 @@ static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model,
   for(i=0; i<NUM_OF_CIPHERS; i++) {
     rv = SSL_CipherPrefSet(model, cipherlist[i].num, cipher_state[i]);
     if(rv != SECSuccess) {
-      failf(data, "Unknown cipher in cipher list");
+      failf(data, "cipher-suite not supported by NSS: %s", cipherlist[i].name);
       return SECFailure;
     }
   }
@@ -277,140 +288,132 @@ static int is_file(const char *filename)
   return 0;
 }
 
-static char *fmt_nickname(char *str, bool *nickname_alloc)
+/* Check if the given string is filename or nickname of a certificate.  If the
+ * given string is recognized as filename, return NULL.  If the given string is
+ * recognized as nickname, return a duplicated string.  The returned string
+ * should be later deallocated using free().  If the OOM failure occurs, we
+ * return NULL, too.
+ */
+static char* dup_nickname(struct SessionHandle *data, enum dupstring cert_kind)
 {
-  char *nickname = NULL;
-  *nickname_alloc = FALSE;
-
-  if(is_file(str)) {
-    char *n = strrchr(str, '/');
-    if(n) {
-      *nickname_alloc = TRUE;
-      n++; /* skip last slash */
-      nickname = aprintf("PEM Token #%d:%s", 1, n);
-    }
-    return nickname;
+  const char *str = data->set.str[cert_kind];
+  const char *n;
+
+  if(!is_file(str))
+    /* no such file exists, use the string as nickname */
+    return strdup(str);
+
+  /* search the last slash; we require at least one slash in a file name */
+  n = strrchr(str, '/');
+  if(!n) {
+    infof(data, "warning: certificate file name \"%s\" handled as nickname; "
+          "please use \"./%s\" to force file name\n", str, str);
+    return strdup(str);
   }
 
-  return str;
+  /* we'll use the PEM reader to read the certificate from file */
+  return NULL;
 }
 
-static int nss_load_cert(struct ssl_connect_data *ssl,
-                         const char *filename, PRBool cacert)
+/* Call PK11_CreateGenericObject() with the given obj_class and filename.  If
+ * the call succeeds, append the object handle to the list of objects so that
+ * the object can be destroyed in Curl_nss_close(). */
+static CURLcode nss_create_object(struct ssl_connect_data *ssl,
+                                  CK_OBJECT_CLASS obj_class,
+                                  const char *filename, bool cacert)
 {
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-  CK_SLOT_ID slotID;
-  PK11SlotInfo * slot = NULL;
-  CK_ATTRIBUTE *attrs;
-  CK_ATTRIBUTE theTemplate[20];
+  PK11SlotInfo *slot;
+  PK11GenericObject *obj;
   CK_BBOOL cktrue = CK_TRUE;
   CK_BBOOL ckfalse = CK_FALSE;
-  CK_OBJECT_CLASS objClass = CKO_CERTIFICATE;
-  char slotname[SLOTSIZE];
-#endif
-  CERTCertificate *cert;
-  char *nickname = NULL;
-  char *n = NULL;
-
-  /* If there is no slash in the filename it is assumed to be a regular
-   * NSS nickname.
-   */
-  if(is_file(filename)) {
-    n = strrchr(filename, '/');
-    if(n)
-      n++;
-    if(!mod)
-      return 1;
-  }
-  else {
-    /* A nickname from the NSS internal database */
-    if(cacert)
-      return 0; /* You can't specify an NSS CA nickname this way */
-    nickname = strdup(filename);
-    if(!nickname)
-      return 0;
-    goto done;
-  }
-
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-  attrs = theTemplate;
+  CK_ATTRIBUTE attrs[/* max count of attributes */ 4];
+  int attr_cnt = 0;
+  CURLcode err = (cacert)
+    ? CURLE_SSL_CACERT_BADFILE
+    : CURLE_SSL_CERTPROBLEM;
+
+  const int slot_id = (cacert) ? 0 : 1;
+  char *slot_name = aprintf("PEM Token #%d", slot_id);
+  if(!slot_name)
+    return CURLE_OUT_OF_MEMORY;
 
-  /* All CA and trust objects go into slot 0. Other slots are used
-   * for storing certificates. With each new user certificate we increment
-   * the slot count. We only support 1 user certificate right now.
-   */
-  if(cacert)
-    slotID = 0;
-  else
-    slotID = 1;
+  slot = PK11_FindSlotByName(slot_name);
+  free(slot_name);
+  if(!slot)
+    return err;
 
-  snprintf(slotname, SLOTSIZE, "PEM Token #%ld", slotID);
+  PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class));
+  PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL));
+  PK11_SETATTRS(attrs, attr_cnt, CKA_LABEL, (unsigned char *)filename,
+                strlen(filename) + 1);
 
-  nickname = aprintf("PEM Token #%ld:%s", slotID, n);
-  if(!nickname)
-    return 0;
+  if(CKO_CERTIFICATE == obj_class) {
+    CK_BBOOL *pval = (cacert) ? (&cktrue) : (&ckfalse);
+    PK11_SETATTRS(attrs, attr_cnt, CKA_TRUST, pval, sizeof(*pval));
+  }
 
-  slot = PK11_FindSlotByName(slotname);
+  obj = PK11_CreateGenericObject(slot, attrs, attr_cnt, PR_FALSE);
+  PK11_FreeSlot(slot);
+  if(!obj)
+    return err;
 
-  if(!slot) {
-    free(nickname);
-    return 0;
+  if(!Curl_llist_insert_next(ssl->obj_list, ssl->obj_list->tail, obj)) {
+    PK11_DestroyGenericObject(obj);
+    return CURLE_OUT_OF_MEMORY;
   }
 
-  PK11_SETATTRS(attrs, CKA_CLASS, &objClass, sizeof(objClass) );
-  attrs++;
-  PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL) );
-  attrs++;
-  PK11_SETATTRS(attrs, CKA_LABEL, (unsigned char *)filename,
-                strlen(filename)+1);
-  attrs++;
-  if(cacert) {
-    PK11_SETATTRS(attrs, CKA_TRUST, &cktrue, sizeof(CK_BBOOL) );
-  }
-  else {
-    PK11_SETATTRS(attrs, CKA_TRUST, &ckfalse, sizeof(CK_BBOOL) );
-  }
-  attrs++;
+  if(!cacert && CKO_CERTIFICATE == obj_class)
+    /* store reference to a client certificate */
+    ssl->obj_clicert = obj;
 
-  /* This load the certificate in our PEM module into the appropriate
-   * slot.
-   */
-  ssl->cacert[slotID] = PK11_CreateGenericObject(slot, theTemplate, 4,
-                                                 PR_FALSE /* isPerm */);
+  return CURLE_OK;
+}
 
-  PK11_FreeSlot(slot);
+/* Destroy the NSS object whose handle is given by ptr.  This function is
+ * a callback of Curl_llist_alloc() used by Curl_llist_destroy() to destroy
+ * NSS objects in Curl_nss_close() */
+static void nss_destroy_object(void *user, void *ptr)
+{
+  PK11GenericObject *obj = (PK11GenericObject *)ptr;
+  (void) user;
+  PK11_DestroyGenericObject(obj);
+}
 
-  if(ssl->cacert[slotID] == NULL) {
-    free(nickname);
-    return 0;
-  }
-#else
-  /* We don't have PK11_CreateGenericObject but a file-based cert was passed
-   * in. We need to fail.
-   */
-  return 0;
-#endif
+static CURLcode nss_load_cert(struct ssl_connect_data *ssl,
+                              const char *filename, PRBool cacert)
+{
+  CURLcode err = (cacert)
+    ? CURLE_SSL_CACERT_BADFILE
+    : CURLE_SSL_CERTPROBLEM;
+
+  /* libnsspem.so leaks memory if the requested file does not exist.  For more
+   * details, go to <https://bugzilla.redhat.com/734760>. */
+  if(is_file(filename))
+    err = nss_create_object(ssl, CKO_CERTIFICATE, filename, cacert);
+
+  if(CURLE_OK == err && !cacert) {
+    /* we have successfully loaded a client certificate */
+    CERTCertificate *cert;
+    char *nickname = NULL;
+    char *n = strrchr(filename, '/');
+    if(n)
+      n++;
 
-  done:
-  /* Double-check that the certificate or nickname requested exists in
-   * either the token or the NSS certificate database.
-   */
-  if(!cacert) {
-    cert = PK11_FindCertFromNickname((char *)nickname, NULL);
+    /* The following undocumented magic helps to avoid a SIGSEGV on call
+     * of PK11_ReadRawAttribute() from SelectClientCert() when using an
+     * immature version of libnsspem.so.  For more details, go to
+     * <https://bugzilla.redhat.com/733685>. */
+    nickname = aprintf("PEM Token #1:%s", n);
+    if(nickname) {
+      cert = PK11_FindCertFromNickname(nickname, NULL);
+      if(cert)
+        CERT_DestroyCertificate(cert);
 
-    /* An invalid nickname was passed in */
-    if(cert == NULL) {
       free(nickname);
-      PR_SetError(SEC_ERROR_UNKNOWN_CERT, 0);
-      return 0;
     }
-
-    CERT_DestroyCertificate(cert);
   }
 
-  free(nickname);
-
-  return 1;
+  return err;
 }
 
 /* add given CRL to cache if it is not already there */
@@ -499,66 +502,35 @@ fail:
   return SECFailure;
 }
 
-static int nss_load_key(struct connectdata *conn, int sockindex,
-                        char *key_file)
+static CURLcode nss_load_key(struct connectdata *conn, int sockindex,
+                             char *key_file)
 {
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-  PK11SlotInfo * slot = NULL;
-  CK_ATTRIBUTE *attrs;
-  CK_ATTRIBUTE theTemplate[20];
-  CK_BBOOL cktrue = CK_TRUE;
-  CK_OBJECT_CLASS objClass = CKO_PRIVATE_KEY;
-  CK_SLOT_ID slotID;
-  char slotname[SLOTSIZE];
-  struct ssl_connect_data *sslconn = &conn->ssl[sockindex];
-
-  attrs = theTemplate;
-
-  /* FIXME: grok the various file types */
-
-  slotID = 1; /* hardcoded for now */
-
-  snprintf(slotname, sizeof(slotname), "PEM Token #%ld", slotID);
-  slot = PK11_FindSlotByName(slotname);
-
-  if(!slot)
-    return 0;
-
-  PK11_SETATTRS(attrs, CKA_CLASS, &objClass, sizeof(objClass) ); attrs++;
-  PK11_SETATTRS(attrs, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL) ); attrs++;
-  PK11_SETATTRS(attrs, CKA_LABEL, (unsigned char *)key_file,
-                strlen(key_file)+1); attrs++;
+  PK11SlotInfo *slot;
+  SECStatus status;
+  CURLcode rv;
+  struct ssl_connect_data *ssl = conn->ssl;
+  (void)sockindex; /* unused */
 
-  /* When adding an encrypted key the PKCS#11 will be set as removed */
-  sslconn->key = PK11_CreateGenericObject(slot, theTemplate, 3,
-                                          PR_FALSE /* isPerm */);
-  if(sslconn->key == NULL) {
+  rv = nss_create_object(ssl, CKO_PRIVATE_KEY, key_file, FALSE);
+  if(CURLE_OK != rv) {
     PR_SetError(SEC_ERROR_BAD_KEY, 0);
-    return 0;
+    return rv;
   }
 
+  slot = PK11_FindSlotByName("PEM Token #1");
+  if(!slot)
+    return CURLE_SSL_CERTPROBLEM;
+
   /* This will force the token to be seen as re-inserted */
   SECMOD_WaitForAnyTokenEvent(mod, 0, 0);
   PK11_IsPresent(slot);
 
-  /* parg is initialized in nss_Init_Tokens() */
-  if(PK11_Authenticate(slot, PR_TRUE,
-                       conn->data->set.str[STRING_KEY_PASSWD]) != SECSuccess) {
-
-    PK11_FreeSlot(slot);
-    return 0;
-  }
+  status = PK11_Authenticate(slot, PR_TRUE,
+                             conn->data->set.str[STRING_KEY_PASSWD]);
   PK11_FreeSlot(slot);
-
-  return 1;
-#else
-  /* If we don't have PK11_CreateGenericObject then we can't load a file-based
-   * key.
-   */
-  (void)conn; /* unused */
-  (void)key_file; /* unused */
-  return 0;
-#endif
+  return (SECSuccess == status)
+    ? CURLE_OK
+    : CURLE_SSL_CERTPROBLEM;
 }
 
 static int display_error(struct connectdata *conn, PRInt32 err,
@@ -577,34 +549,43 @@ static int display_error(struct connectdata *conn, PRInt32 err,
   return 0; /* The caller will print a generic error */
 }
 
-static int cert_stuff(struct connectdata *conn,
-                      int sockindex, char *cert_file, char *key_file)
+static CURLcode cert_stuff(struct connectdata *conn, int sockindex,
+                           char *cert_file, char *key_file)
 {
   struct SessionHandle *data = conn->data;
-  int rv = 0;
+  CURLcode rv;
 
   if(cert_file) {
     rv = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE);
-    if(!rv) {
-      if(!display_error(conn, PR_GetError(), cert_file))
-        failf(data, "Unable to load client cert %d.", PR_GetError());
-      return 0;
+    if(CURLE_OK != rv) {
+      const PRErrorCode err = PR_GetError();
+      if(!display_error(conn, err, cert_file)) {
+        const char *err_name = nss_error_to_name(err);
+        failf(data, "unable to load client cert: %d (%s)", err, err_name);
+      }
+
+      return rv;
     }
   }
+
   if(key_file || (is_file(cert_file))) {
     if(key_file)
       rv = nss_load_key(conn, sockindex, key_file);
     else
       /* In case the cert file also has the key */
       rv = nss_load_key(conn, sockindex, cert_file);
-    if(!rv) {
-      if(!display_error(conn, PR_GetError(), key_file))
-        failf(data, "Unable to load client key %d.", PR_GetError());
+    if(CURLE_OK != rv) {
+      const PRErrorCode err = PR_GetError();
+      if(!display_error(conn, err, key_file)) {
+        const char *err_name = nss_error_to_name(err);
+        failf(data, "unable to load client key: %d (%s)", err, err_name);
+      }
 
-      return 0;
+      return rv;
     }
   }
-  return 1;
+
+  return CURLE_OK;
 }
 
 static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
@@ -616,81 +597,27 @@ static char * nss_get_password(PK11SlotInfo * slot, PRBool retry, void *arg)
     return (char *)PORT_Strdup((char *)arg);
 }
 
-static SECStatus BadCertHandler(void *arg, PRFileDesc *sock)
+/* bypass the default SSL_AuthCertificate() hook in case we do not want to
+ * verify peer */
+static SECStatus nss_auth_cert_hook(void *arg, PRFileDesc *fd, PRBool checksig,
+                                    PRBool isServer)
 {
-  SECStatus success = SECSuccess;
   struct connectdata *conn = (struct connectdata *)arg;
-  PRErrorCode err = PR_GetError();
-  CERTCertificate *cert = NULL;
-  char *subject, *subject_cn, *issuer;
-
-  if(conn->data->set.ssl.certverifyresult!=0)
-    return success;
-
-  conn->data->set.ssl.certverifyresult=err;
-  cert = SSL_PeerCertificate(sock);
-  subject = CERT_NameToAscii(&cert->subject);
-  subject_cn = CERT_GetCommonName(&cert->subject);
-  issuer = CERT_NameToAscii(&cert->issuer);
-  CERT_DestroyCertificate(cert);
-
-  switch(err) {
-  case SEC_ERROR_CA_CERT_INVALID:
-    infof(conn->data, "Issuer certificate is invalid: '%s'\n", issuer);
-    if(conn->data->set.ssl.verifypeer)
-      success = SECFailure;
-    break;
-  case SEC_ERROR_UNTRUSTED_ISSUER:
-    if(conn->data->set.ssl.verifypeer)
-      success = SECFailure;
-    infof(conn->data, "Certificate is signed by an untrusted issuer: '%s'\n",
-          issuer);
-    break;
-  case SSL_ERROR_BAD_CERT_DOMAIN:
-    if(conn->data->set.ssl.verifyhost) {
-      failf(conn->data, "SSL: certificate subject name '%s' does not match "
-            "target host name '%s'", subject_cn, conn->host.dispname);
-      success = SECFailure;
-    } else {
-      infof(conn->data, "warning: SSL: certificate subject name '%s' does not "
-            "match target host name '%s'\n", subject_cn, conn->host.dispname);
-    }
-    break;
-  case SEC_ERROR_EXPIRED_CERTIFICATE:
-    if(conn->data->set.ssl.verifypeer)
-      success = SECFailure;
-    infof(conn->data, "Remote Certificate has expired.\n");
-    break;
-  case SEC_ERROR_UNKNOWN_ISSUER:
-    if(conn->data->set.ssl.verifypeer)
-      success = SECFailure;
-    infof(conn->data, "Peer's certificate issuer is not recognized: '%s'\n",
-          issuer);
-    break;
-  default:
-    if(conn->data->set.ssl.verifypeer)
-      success = SECFailure;
-    infof(conn->data, "Bad certificate received. Subject = '%s', "
-          "Issuer = '%s'\n", subject, issuer);
-    break;
+  if(!conn->data->set.ssl.verifypeer) {
+    infof(conn->data, "skipping SSL peer certificate verification\n");
+    return SECSuccess;
   }
-  if(success == SECSuccess)
-    infof(conn->data, "SSL certificate verify ok.\n");
-  PR_Free(subject);
-  PR_Free(subject_cn);
-  PR_Free(issuer);
 
-  return success;
+  return SSL_AuthCertificate(CERT_GetDefaultCertDB(), fd, checksig, isServer);
 }
 
 /**
  * Inform the application that the handshake is complete.
  */
-static SECStatus HandshakeCallback(PRFileDesc *sock, void *arg)
+static void HandshakeCallback(PRFileDesc *sock, void *arg)
 {
   (void)sock;
   (void)arg;
-  return SECSuccess;
 }
 
 static void display_cert_info(struct SessionHandle *data,
@@ -745,6 +672,31 @@ static void display_conn_info(struct connectdata *conn, PRFileDesc *sock)
   return;
 }
 
+static SECStatus BadCertHandler(void *arg, PRFileDesc *sock)
+{
+  struct connectdata *conn = (struct connectdata *)arg;
+  struct SessionHandle *data = conn->data;
+  PRErrorCode err = PR_GetError();
+  CERTCertificate *cert;
+
+  /* remember the cert verification result */
+  data->set.ssl.certverifyresult = err;
+
+  if(err == SSL_ERROR_BAD_CERT_DOMAIN && !data->set.ssl.verifyhost)
+    /* we are asked not to verify the host name */
+    return SECSuccess;
+
+  /* print only info about the cert, the error is printed off the callback */
+  cert = SSL_PeerCertificate(sock);
+  if(cert) {
+    infof(data, "Server certificate:\n");
+    display_cert_info(data, cert);
+    CERT_DestroyCertificate(cert);
+  }
+
+  return SECFailure;
+}
+
 /**
  *
  * Check that the Peer certificate's issuer certificate matches the one found
@@ -769,13 +721,12 @@ static SECStatus check_issuer_cert(PRFileDesc *sock,
   cert_issuer = CERT_FindCertIssuer(cert,PR_Now(),certUsageObjectSigner);
 
   proto_win = SSL_RevealPinArg(sock);
-  issuer = NULL;
   issuer = PK11_FindCertFromNickname(issuer_nickname, proto_win);
 
-  if ((!cert_issuer) || (!issuer))
+  if((!cert_issuer) || (!issuer))
     res = SECFailure;
-  else if (SECITEM_CompareItem(&cert_issuer->derCert,
-                               &issuer->derCert)!=SECEqual)
+  else if(SECITEM_CompareItem(&cert_issuer->derCert,
+                              &issuer->derCert)!=SECEqual)
     res = SECFailure;
 
   CERT_DestroyCertificate(cert);
@@ -793,51 +744,61 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
                                   struct CERTCertificateStr **pRetCert,
                                   struct SECKEYPrivateKeyStr **pRetKey)
 {
-  static const char pem_nickname[] = "PEM Token #1";
-  const char *pem_slotname = pem_nickname;
-
   struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg;
   struct SessionHandle *data = connssl->data;
   const char *nickname = connssl->client_nickname;
 
-  if (mod && nickname &&
-      0 == strncmp(nickname, pem_nickname, /* length of "PEM Token" */ 9)) {
-
+  if(connssl->obj_clicert) {
     /* use the cert/key provided by PEM reader */
-    PK11SlotInfo *slot;
+    static const char pem_slotname[] = "PEM Token #1";
+    SECItem cert_der = { 0, NULL, 0 };
     void *proto_win = SSL_RevealPinArg(sock);
-    *pRetKey = NULL;
+    struct CERTCertificateStr *cert;
+    struct SECKEYPrivateKeyStr *key;
 
-    *pRetCert = PK11_FindCertFromNickname(nickname, proto_win);
-    if (NULL == *pRetCert) {
-      failf(data, "NSS: client certificate not found: %s", nickname);
+    PK11SlotInfo *slot = PK11_FindSlotByName(pem_slotname);
+    if(NULL == slot) {
+      failf(data, "NSS: PK11 slot not found: %s", pem_slotname);
       return SECFailure;
     }
 
-    slot = PK11_FindSlotByName(pem_slotname);
-    if (NULL == slot) {
-      failf(data, "NSS: PK11 slot not found: %s", pem_slotname);
+    if(PK11_ReadRawAttribute(PK11_TypeGeneric, connssl->obj_clicert, CKA_VALUE,
+                             &cert_der) != SECSuccess) {
+      failf(data, "NSS: CKA_VALUE not found in PK11 generic object");
+      PK11_FreeSlot(slot);
+      return SECFailure;
+    }
+
+    cert = PK11_FindCertFromDERCertItem(slot, &cert_der, proto_win);
+    SECITEM_FreeItem(&cert_der, PR_FALSE);
+    if(NULL == cert) {
+      failf(data, "NSS: client certificate from file not found");
+      PK11_FreeSlot(slot);
       return SECFailure;
     }
 
-    *pRetKey = PK11_FindPrivateKeyFromCert(slot, *pRetCert, NULL);
+    key = PK11_FindPrivateKeyFromCert(slot, cert, NULL);
     PK11_FreeSlot(slot);
-    if (NULL == *pRetKey) {
-      failf(data, "NSS: private key not found for certificate: %s", nickname);
+    if(NULL == key) {
+      failf(data, "NSS: private key from file not found");
+      CERT_DestroyCertificate(cert);
       return SECFailure;
     }
 
-    infof(data, "NSS: client certificate: %s\n", nickname);
-    display_cert_info(data, *pRetCert);
+    infof(data, "NSS: client certificate from file\n");
+    display_cert_info(data, cert);
+
+    *pRetCert = cert;
+    *pRetKey = key;
     return SECSuccess;
   }
 
   /* use the default NSS hook */
-  if (SECSuccess != NSS_GetClientAuthData((void *)nickname, sock, caNames,
+  if(SECSuccess != NSS_GetClientAuthData((void *)nickname, sock, caNames,
                                           pRetCert, pRetKey)
       || NULL == *pRetCert) {
 
-    if (NULL == nickname)
+    if(NULL == nickname)
       failf(data, "NSS: client certificate not found (nickname not "
             "specified)");
     else
@@ -848,10 +809,10 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
 
   /* get certificate nickname if any */
   nickname = (*pRetCert)->nickname;
-  if (NULL == nickname)
+  if(NULL == nickname)
     nickname = "[unknown]";
 
-  if (NULL == *pRetKey) {
+  if(NULL == *pRetKey) {
     failf(data, "NSS: private key not found for certificate: %s", nickname);
     return SECFailure;
   }
@@ -891,10 +852,70 @@ isTLSIntoleranceError(PRInt32 err)
   }
 }
 
-static CURLcode init_nss(struct SessionHandle *data)
+static CURLcode nss_init_core(struct SessionHandle *data, const char *cert_dir)
+{
+#ifdef HAVE_NSS_INITCONTEXT
+  NSSInitParameters initparams;
+
+  if(nss_context != NULL)
+    return CURLE_OK;
+
+  memset((void *) &initparams, '\0', sizeof(initparams));
+  initparams.length = sizeof(initparams);
+#else /* HAVE_NSS_INITCONTEXT */
+  SECStatus rv;
+
+  if(NSS_IsInitialized())
+    return CURLE_OK;
+#endif
+
+  if(cert_dir) {
+    const bool use_sql = NSS_VersionCheck("3.12.0");
+    char *certpath = aprintf("%s%s", use_sql ? "sql:" : "", cert_dir);
+    if(!certpath)
+      return CURLE_OUT_OF_MEMORY;
+
+    infof(data, "Initializing NSS with certpath: %s\n", certpath);
+#ifdef HAVE_NSS_INITCONTEXT
+    nss_context = NSS_InitContext(certpath, "", "", "", &initparams,
+            NSS_INIT_READONLY | NSS_INIT_PK11RELOAD);
+    free(certpath);
+
+    if(nss_context != NULL)
+      return CURLE_OK;
+#else /* HAVE_NSS_INITCONTEXT */
+    rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
+    free(certpath);
+
+    if(rv == SECSuccess)
+      return CURLE_OK;
+#endif
+
+    infof(data, "Unable to initialize NSS database\n");
+  }
+
+  infof(data, "Initializing NSS with certpath: none\n");
+#ifdef HAVE_NSS_INITCONTEXT
+  nss_context = NSS_InitContext("", "", "", "", &initparams, NSS_INIT_READONLY
+         | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
+         | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
+  if(nss_context != NULL)
+    return CURLE_OK;
+#else /* HAVE_NSS_INITCONTEXT */
+  if(NSS_NoDB_Init(NULL) == SECSuccess)
+    return CURLE_OK;
+#endif
+
+  infof(data, "Unable to initialize NSS\n");
+  return CURLE_SSL_CACERT_BADFILE;
+}
+
+static CURLcode nss_init(struct SessionHandle *data)
 {
   char *cert_dir;
   struct_stat st;
+  CURLcode rv;
+
   if(initialized)
     return CURLE_OK;
 
@@ -915,30 +936,14 @@ static CURLcode init_nss(struct SessionHandle *data)
     }
   }
 
-  if(!NSS_IsInitialized()) {
-    SECStatus rv;
-    initialized = 1;
-    infof(data, "Initializing NSS with certpath: %s\n",
-          cert_dir ? cert_dir : "none");
-    if(!cert_dir) {
-      rv = NSS_NoDB_Init(NULL);
-    }
-    else {
-      char *certpath =
-        PR_smprintf("%s%s", NSS_VersionCheck("3.12.0") ? "sql:" : "", cert_dir);
-      rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
-      PR_smprintf_free(certpath);
-    }
-    if(rv != SECSuccess) {
-      infof(data, "Unable to initialize NSS database\n");
-      initialized = 0;
-      return CURLE_SSL_CACERT_BADFILE;
-    }
-  }
+  rv = nss_init_core(data, cert_dir);
+  if(rv)
+    return rv;
 
   if(num_enabled_ciphers() == 0)
     NSS_SetDomesticPolicy();
 
+  initialized = 1;
   return CURLE_OK;
 }
 
@@ -951,7 +956,7 @@ static CURLcode init_nss(struct SessionHandle *data)
 int Curl_nss_init(void)
 {
   /* curl_global_init() is not thread-safe so this test is ok */
-  if (nss_initlock == NULL) {
+  if(nss_initlock == NULL) {
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
     nss_initlock = PR_NewLock();
     nss_crllock = PR_NewLock();
@@ -966,13 +971,14 @@ CURLcode Curl_nss_force_init(struct SessionHandle *data)
 {
   CURLcode rv;
   if(!nss_initlock) {
-    failf(data, "unable to initialize NSS, curl_global_init() should have been "
-                "called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL");
-    return CURLE_OUT_OF_MEMORY;
+    failf(data,
+          "unable to initialize NSS, curl_global_init() should have been "
+          "called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL");
+    return CURLE_FAILED_INIT;
   }
 
   PR_Lock(nss_initlock);
-  rv = init_nss(data);
+  rv = nss_init(data);
   PR_Unlock(nss_initlock);
   return rv;
 }
@@ -984,7 +990,7 @@ void Curl_nss_cleanup(void)
    * as a safety feature.
    */
   PR_Lock(nss_initlock);
-  if (initialized) {
+  if(initialized) {
     /* Free references to client certificates held in the SSL session cache.
      * Omitting this hampers destruction of the security module owning
      * the certificates. */
@@ -994,7 +1000,12 @@ void Curl_nss_cleanup(void)
       SECMOD_DestroyModule(mod);
       mod = NULL;
     }
+#ifdef HAVE_NSS_INITCONTEXT
+    NSS_ShutdownContext(nss_context);
+    nss_context = NULL;
+#else /* HAVE_NSS_INITCONTEXT */
     NSS_Shutdown();
+#endif
   }
   PR_Unlock(nss_initlock);
 
@@ -1039,24 +1050,28 @@ void Curl_nss_close(struct connectdata *conn, int sockindex)
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
 
   if(connssl->handle) {
-    PR_Close(connssl->handle);
-
     /* NSS closes the socket we previously handed to it, so we must mark it
        as closed to avoid double close */
     fake_sclose(conn->sock[sockindex]);
     conn->sock[sockindex] = CURL_SOCKET_BAD;
+
+    if((connssl->client_nickname != NULL) || (connssl->obj_clicert != NULL))
+      /* A server might require different authentication based on the
+       * particular path being requested by the client.  To support this
+       * scenario, we must ensure that a connection will never reuse the
+       * authentication data from a previous connection. */
+      SSL_InvalidateSession(connssl->handle);
+
     if(connssl->client_nickname != NULL) {
       free(connssl->client_nickname);
       connssl->client_nickname = NULL;
     }
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-    if(connssl->key)
-      (void)PK11_DestroyGenericObject(connssl->key);
-    if(connssl->cacert[1])
-      (void)PK11_DestroyGenericObject(connssl->cacert[1]);
-    if(connssl->cacert[0])
-      (void)PK11_DestroyGenericObject(connssl->cacert[0]);
-#endif
+    /* destroy all NSS objects in order to avoid failure of NSS shutdown */
+    Curl_llist_destroy(connssl->obj_list, NULL);
+    connssl->obj_list = NULL;
+    connssl->obj_clicert = NULL;
+
+    PR_Close(connssl->handle);
     connssl->handle = NULL;
   }
 }
@@ -1071,20 +1086,30 @@ int Curl_nss_close_all(struct SessionHandle *data)
   return 0;
 }
 
-/* handle client certificate related errors if any; return false otherwise */
-static bool handle_cc_error(PRInt32 err, struct SessionHandle *data)
+/* return true if NSS can provide error code (and possibly msg) for the
+   error */
+static bool is_nss_error(CURLcode err)
 {
   switch(err) {
-  case SSL_ERROR_BAD_CERT_ALERT:
-    failf(data, "SSL error: SSL_ERROR_BAD_CERT_ALERT");
+  case CURLE_PEER_FAILED_VERIFICATION:
+  case CURLE_SSL_CACERT:
+  case CURLE_SSL_CERTPROBLEM:
+  case CURLE_SSL_CONNECT_ERROR:
+  case CURLE_SSL_ISSUER_ERROR:
     return true;
 
-  case SSL_ERROR_REVOKED_CERT_ALERT:
-    failf(data, "SSL error: SSL_ERROR_REVOKED_CERT_ALERT");
-    return true;
+  default:
+    return false;
+  }
+}
 
+/* return true if the given error code is related to a client certificate */
+static bool is_cc_error(PRInt32 err)
+{
+  switch(err) {
+  case SSL_ERROR_BAD_CERT_ALERT:
   case SSL_ERROR_EXPIRED_CERT_ALERT:
-    failf(data, "SSL error: SSL_ERROR_EXPIRED_CERT_ALERT");
+  case SSL_ERROR_REVOKED_CERT_ALERT:
     return true;
 
   default:
@@ -1095,36 +1120,89 @@ static bool handle_cc_error(PRInt32 err, struct SessionHandle *data)
 static Curl_recv nss_recv;
 static Curl_send nss_send;
 
+static CURLcode nss_load_ca_certificates(struct connectdata *conn,
+                                         int sockindex)
+{
+  struct SessionHandle *data = conn->data;
+  const char *cafile = data->set.ssl.CAfile;
+  const char *capath = data->set.ssl.CApath;
+
+  if(cafile) {
+    CURLcode rv = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE);
+    if(CURLE_OK != rv)
+      return rv;
+  }
+
+  if(capath) {
+    struct_stat st;
+    if(stat(capath, &st) == -1)
+      return CURLE_SSL_CACERT_BADFILE;
+
+    if(S_ISDIR(st.st_mode)) {
+      PRDirEntry *entry;
+      PRDir *dir = PR_OpenDir(capath);
+      if(!dir)
+        return CURLE_SSL_CACERT_BADFILE;
+
+      while((entry = PR_ReadDir(dir, PR_SKIP_BOTH | PR_SKIP_HIDDEN))) {
+        char *fullpath = aprintf("%s/%s", capath, entry->name);
+        if(!fullpath) {
+          PR_CloseDir(dir);
+          return CURLE_OUT_OF_MEMORY;
+        }
+
+        if(CURLE_OK != nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE))
+          /* This is purposefully tolerant of errors so non-PEM files can
+           * be in the same directory */
+          infof(data, "failed to load '%s' from CURLOPT_CAPATH\n", fullpath);
+
+        free(fullpath);
+      }
+
+      PR_CloseDir(dir);
+    }
+    else
+      infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath);
+  }
+
+  infof(data, "  CAfile: %s\n  CApath: %s\n",
+      cafile ? cafile : "none",
+      capath ? capath : "none");
+
+  return CURLE_OK;
+}
+
 CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
 {
-  PRInt32 err;
+  PRErrorCode err = 0;
   PRFileDesc *model = NULL;
   PRBool ssl2 = PR_FALSE;
   PRBool ssl3 = PR_FALSE;
   PRBool tlsv1 = PR_FALSE;
+  PRBool ssl_no_cache;
+  PRBool ssl_cbc_random_iv;
   struct SessionHandle *data = conn->data;
   curl_socket_t sockfd = conn->sock[sockindex];
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-  int curlerr;
+  CURLcode curlerr;
   const int *cipher_to_enable;
   PRSocketOptionData sock_opt;
   long time_left;
   PRUint32 timeout;
 
-  if (connssl->state == ssl_connection_complete)
+  if(connssl->state == ssl_connection_complete)
     return CURLE_OK;
 
   connssl->data = data;
 
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-  connssl->cacert[0] = NULL;
-  connssl->cacert[1] = NULL;
-  connssl->key = NULL;
-#endif
+  /* list of all NSS objects we need to destroy in Curl_nss_close() */
+  connssl->obj_list = Curl_llist_alloc(nss_destroy_object);
+  if(!connssl->obj_list)
+    return CURLE_OUT_OF_MEMORY;
 
   /* FIXME. NSS doesn't support multiple databases open at the same time. */
   PR_Lock(nss_initlock);
-  curlerr = init_nss(conn->data);
+  curlerr = nss_init(conn->data);
   if(CURLE_OK != curlerr) {
     PR_Unlock(nss_initlock);
     goto error;
@@ -1132,7 +1210,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
 
   curlerr = CURLE_SSL_CONNECT_ERROR;
 
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
   if(!mod) {
     char *configstring = aprintf("library=%s name=PEM", pem_library);
     if(!configstring) {
@@ -1151,7 +1228,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
             "OpenSSL PEM certificates will not work.\n", pem_library);
     }
   }
-#endif
 
   PK11_SetPasswordFunc(nss_get_password);
   PR_Unlock(nss_initlock);
@@ -1161,12 +1237,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
     goto error;
   model = SSL_ImportFD(NULL, model);
 
-  /* make the socket nonblocking */
-  sock_opt.option = PR_SockOpt_Nonblocking;
-  sock_opt.value.non_blocking = PR_TRUE;
-  if(PR_SetSocketOption(model, &sock_opt) != SECSuccess)
-    goto error;
-
   if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess)
     goto error;
   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess)
@@ -1174,11 +1244,16 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE) != SECSuccess)
     goto error;
 
+  /* do not use SSL cache if we are not going to verify peer */
+  ssl_no_cache = (data->set.ssl.verifypeer) ? PR_FALSE : PR_TRUE;
+  if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess)
+    goto error;
+
   switch (data->set.ssl.version) {
   default:
   case CURL_SSLVERSION_DEFAULT:
     ssl3 = PR_TRUE;
-    if (data->state.ssl_connect_retry)
+    if(data->state.ssl_connect_retry)
       infof(data, "TLS disabled due to previous handshake failure\n");
     else
       tlsv1 = PR_TRUE;
@@ -1204,13 +1279,25 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   if(SSL_OptionSet(model, SSL_V2_COMPATIBLE_HELLO, ssl2) != SECSuccess)
     goto error;
 
+  ssl_cbc_random_iv = !data->set.ssl_enable_beast;
+#ifdef SSL_CBC_RANDOM_IV
+  /* unless the user explicitly asks to allow the protocol vulnerability, we
+     use the work-around */
+  if(SSL_OptionSet(model, SSL_CBC_RANDOM_IV, ssl_cbc_random_iv) != SECSuccess)
+    infof(data, "warning: failed to set SSL_CBC_RANDOM_IV = %d\n",
+          ssl_cbc_random_iv);
+#else
+  if(ssl_cbc_random_iv)
+    infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in\n");
+#endif
+
   /* reset the flag to avoid an infinite loop */
   data->state.ssl_connect_retry = FALSE;
 
   /* enable all ciphers from enable_ciphers_by_default */
   cipher_to_enable = enable_ciphers_by_default;
-  while (SSL_NULL_WITH_NULL_NULL != *cipher_to_enable) {
-    if (SSL_CipherPrefSet(model, *cipher_to_enable, PR_TRUE) != SECSuccess) {
+  while(SSL_NULL_WITH_NULL_NULL != *cipher_to_enable) {
+    if(SSL_CipherPrefSet(model, *cipher_to_enable, PR_TRUE) != SECSuccess) {
       curlerr = CURLE_SSL_CIPHER;
       goto error;
     }
@@ -1224,67 +1311,30 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
     }
   }
 
-  if(data->set.ssl.verifyhost == 1)
-    infof(data, "warning: ignoring unsupported value (1) of ssl.verifyhost\n");
+  if(!data->set.ssl.verifypeer && data->set.ssl.verifyhost)
+    infof(data, "warning: ignoring value of ssl.verifyhost\n");
 
-  data->set.ssl.certverifyresult=0; /* not checked yet */
-  if(SSL_BadCertHook(model, (SSLBadCertHandler) BadCertHandler, conn)
-     != SECSuccess) {
+  /* bypass the default SSL_AuthCertificate() hook in case we do not want to
+   * verify peer */
+  if(SSL_AuthCertificateHook(model, nss_auth_cert_hook, conn) != SECSuccess)
     goto error;
-  }
-  if(SSL_HandshakeCallback(model, (SSLHandshakeCallback) HandshakeCallback,
-                           NULL) != SECSuccess)
+
+  data->set.ssl.certverifyresult=0; /* not checked yet */
+  if(SSL_BadCertHook(model, BadCertHandler, conn) != SECSuccess)
     goto error;
 
-  if(!data->set.ssl.verifypeer)
-    /* skip the verifying of the peer */
-    ;
-  else if(data->set.ssl.CAfile) {
-    int rc = nss_load_cert(&conn->ssl[sockindex], data->set.ssl.CAfile,
-                           PR_TRUE);
-    if(!rc) {
-      curlerr = CURLE_SSL_CACERT_BADFILE;
-      goto error;
-    }
-  }
-  else if(data->set.ssl.CApath) {
-    struct_stat st;
-    PRDir      *dir;
-    PRDirEntry *entry;
+  if(SSL_HandshakeCallback(model, HandshakeCallback, NULL) != SECSuccess)
+    goto error;
 
-    if(stat(data->set.ssl.CApath, &st) == -1) {
-      curlerr = CURLE_SSL_CACERT_BADFILE;
+  if(data->set.ssl.verifypeer) {
+    const CURLcode rv = nss_load_ca_certificates(conn, sockindex);
+    if(CURLE_OK != rv) {
+      curlerr = rv;
       goto error;
     }
-
-    if(S_ISDIR(st.st_mode)) {
-      int rc;
-
-      dir = PR_OpenDir(data->set.ssl.CApath);
-      do {
-        entry = PR_ReadDir(dir, PR_SKIP_BOTH | PR_SKIP_HIDDEN);
-
-        if(entry) {
-          char fullpath[PATH_MAX];
-
-          snprintf(fullpath, sizeof(fullpath), "%s/%s", data->set.ssl.CApath,
-                   entry->name);
-          rc = nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE);
-          /* FIXME: check this return value! */
-        }
-        /* This is purposefully tolerant of errors so non-PEM files
-         * can be in the same directory */
-      } while(entry != NULL);
-      PR_CloseDir(dir);
-    }
   }
-  infof(data,
-        "  CAfile: %s\n"
-        "  CApath: %s\n",
-        data->set.ssl.CAfile ? data->set.ssl.CAfile : "none",
-        data->set.ssl.CApath ? data->set.ssl.CApath : "none");
 
-  if (data->set.ssl.CRLfile) {
+  if(data->set.ssl.CRLfile) {
     if(SECSuccess != nss_load_crl(data->set.ssl.CRLfile)) {
       curlerr = CURLE_SSL_CRL_BADFILE;
       goto error;
@@ -1295,25 +1345,23 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   }
 
   if(data->set.str[STRING_CERT]) {
-    bool nickname_alloc = FALSE;
-    char *nickname = fmt_nickname(data->set.str[STRING_CERT], &nickname_alloc);
-    if(!nickname)
-      return CURLE_OUT_OF_MEMORY;
-
-    if(!cert_stuff(conn, sockindex, data->set.str[STRING_CERT],
-                   data->set.str[STRING_KEY])) {
-      /* failf() is already done in cert_stuff() */
-      if(nickname_alloc)
-        free(nickname);
-      return CURLE_SSL_CERTPROBLEM;
+    char *nickname = dup_nickname(data, STRING_CERT);
+    if(nickname) {
+      /* we are not going to use libnsspem.so to read the client cert */
+      connssl->obj_clicert = NULL;
+    }
+    else {
+      CURLcode rv = cert_stuff(conn, sockindex, data->set.str[STRING_CERT],
+                               data->set.str[STRING_KEY]);
+      if(CURLE_OK != rv) {
+        /* failf() is already done in cert_stuff() */
+        curlerr = rv;
+        goto error;
+      }
     }
 
-    /* this "takes over" the pointer to the allocated name or makes a
-       dup of it */
-    connssl->client_nickname = nickname_alloc?nickname:strdup(nickname);
-    if(!connssl->client_nickname)
-      return CURLE_OUT_OF_MEMORY;
-
+    /* store the nickname for SelectClientCert() called during handshake */
+    connssl->client_nickname = nickname;
   }
   else
     connssl->client_nickname = NULL;
@@ -1334,7 +1382,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   model = NULL;
 
   /* This is the password associated with the cert that we're using */
-  if (data->set.str[STRING_KEY_PASSWD]) {
+  if(data->set.str[STRING_KEY_PASSWD]) {
     SSL_SetPKCS11PinArg(connssl->handle, data->set.str[STRING_KEY_PASSWD]);
   }
 
@@ -1344,9 +1392,10 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   SSL_SetURL(connssl->handle, conn->host.name);
 
   /* check timeout situation */
-  time_left = Curl_timeleft(conn, NULL, TRUE);
+  time_left = Curl_timeleft(data, NULL, TRUE);
   if(time_left < 0L) {
     failf(data, "timed out before SSL handshake");
+    curlerr = CURLE_OPERATION_TIMEDOUT;
     goto error;
   }
   timeout = PR_MillisecondsToInterval((PRUint32) time_left);
@@ -1360,25 +1409,26 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
     goto error;
   }
 
+  /* switch the SSL socket into non-blocking mode */
+  sock_opt.option = PR_SockOpt_Nonblocking;
+  sock_opt.value.non_blocking = PR_TRUE;
+  if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS)
+    goto error;
+
   connssl->state = ssl_connection_complete;
   conn->recv[sockindex] = nss_recv;
   conn->send[sockindex] = nss_send;
 
   display_conn_info(conn, connssl->handle);
 
-  if (data->set.str[STRING_SSL_ISSUERCERT]) {
-    SECStatus ret;
-    bool nickname_alloc = FALSE;
-    char *nickname = fmt_nickname(data->set.str[STRING_SSL_ISSUERCERT],
-                                  &nickname_alloc);
-
-    if(!nickname)
-      return CURLE_OUT_OF_MEMORY;
-
-    ret = check_issuer_cert(connssl->handle, nickname);
-
-    if(nickname_alloc)
+  if(data->set.str[STRING_SSL_ISSUERCERT]) {
+    SECStatus ret = SECFailure;
+    char *nickname = dup_nickname(data, STRING_SSL_ISSUERCERT);
+    if(nickname) {
+      /* we support only nicknames in case of STRING_SSL_ISSUERCERT for now */
+      ret = check_issuer_cert(connssl->handle, nickname);
       free(nickname);
+    }
 
     if(SECFailure == ret) {
       infof(data,"SSL certificate issuer check failed\n");
@@ -1396,16 +1446,27 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
   /* reset the flag to avoid an infinite loop */
   data->state.ssl_connect_retry = FALSE;
 
-  err = PR_GetError();
-  if(handle_cc_error(err, data))
-    curlerr = CURLE_SSL_CERTPROBLEM;
-  else
-    infof(data, "NSS error %d\n", err);
+  if(is_nss_error(curlerr)) {
+    /* read NSPR error code */
+    err = PR_GetError();
+    if(is_cc_error(err))
+      curlerr = CURLE_SSL_CERTPROBLEM;
+
+    /* print the error number and error string */
+    infof(data, "NSS error %d (%s)\n", err, nss_error_to_name(err));
+
+    /* print a human-readable message describing the error if available */
+    nss_print_error_message(data, err);
+  }
 
   if(model)
     PR_Close(model);
 
-  if (ssl3 && tlsv1 && isTLSIntoleranceError(err)) {
+    /* cleanup on connection failure */
+    Curl_llist_destroy(connssl->obj_list, NULL);
+    connssl->obj_list = NULL;
+
+  if(ssl3 && tlsv1 && isTLSIntoleranceError(err)) {
     /* schedule reconnect through Curl_retry_request() */
     data->state.ssl_connect_retry = TRUE;
     infof(data, "Error in TLS handshake, trying SSLv3...\n");
@@ -1421,19 +1482,23 @@ static ssize_t nss_send(struct connectdata *conn,  /* connection data */
                         size_t len,                /* amount to write */
                         CURLcode *curlcode)
 {
-  int rc;
-
-  rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, -1);
-
+  ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0,
+                       PR_INTERVAL_NO_WAIT);
   if(rc < 0) {
     PRInt32 err = PR_GetError();
     if(err == PR_WOULD_BLOCK_ERROR)
       *curlcode = CURLE_AGAIN;
-    else if(handle_cc_error(err, conn->data))
-      *curlcode = CURLE_SSL_CERTPROBLEM;
     else {
-      failf(conn->data, "SSL write: error %d", err);
-      *curlcode = CURLE_SEND_ERROR;
+      /* print the error number and error string */
+      const char *err_name = nss_error_to_name(err);
+      infof(conn->data, "SSL write: error %d (%s)\n", err, err_name);
+
+      /* print a human-readable message describing the error if available */
+      nss_print_error_message(conn->data, err);
+
+      *curlcode = (is_cc_error(err))
+        ? CURLE_SSL_CERTPROBLEM
+        : CURLE_SEND_ERROR;
     }
     return -1;
   }
@@ -1446,20 +1511,25 @@ static ssize_t nss_recv(struct connectdata * conn, /* connection data */
                         size_t buffersize,         /* max amount to read */
                         CURLcode *curlcode)
 {
-  ssize_t nread;
-
-  nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0, -1);
+  ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0,
+                          PR_INTERVAL_NO_WAIT);
   if(nread < 0) {
     /* failed SSL read */
     PRInt32 err = PR_GetError();
 
     if(err == PR_WOULD_BLOCK_ERROR)
       *curlcode = CURLE_AGAIN;
-    else if(handle_cc_error(err, conn->data))
-      *curlcode = CURLE_SSL_CERTPROBLEM;
     else {
-      failf(conn->data, "SSL read: errno %d", err);
-      *curlcode = CURLE_RECV_ERROR;
+      /* print the error number and error string */
+      const char *err_name = nss_error_to_name(err);
+      infof(conn->data, "SSL read: errno %d (%s)\n", err, err_name);
+
+      /* print a human-readable message describing the error if available */
+      nss_print_error_message(conn->data, err);
+
+      *curlcode = (is_cc_error(err))
+        ? CURLE_SSL_CERTPROBLEM
+        : CURLE_RECV_ERROR;
     }
     return -1;
   }
@@ -1478,4 +1548,24 @@ int Curl_nss_seed(struct SessionHandle *data)
   return 0;
 }
 
+void Curl_nss_random(struct SessionHandle *data,
+                     unsigned char *entropy,
+                     size_t length)
+{
+  Curl_nss_seed(data);  /* Initiate the seed if not already done */
+  PK11_GenerateRandom(entropy, curlx_uztosi(length));
+}
+
+void Curl_nss_md5sum(unsigned char *tmp, /* input */
+                     size_t tmplen,
+                     unsigned char *md5sum, /* output */
+                     size_t md5len)
+{
+  PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
+  unsigned int MD5out;
+  PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen));
+  PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len));
+  PK11_DestroyContext(MD5pw, PR_TRUE);
+}
+
 #endif /* USE_NSS */
index f9cc46a..cd32706 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __NSSG_H
-#define __NSSG_H
+#ifndef HEADER_CURL_NSSG_H
+#define HEADER_CURL_NSSG_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
 #ifdef USE_NSS
 /*
@@ -28,6 +29,7 @@
  */
 
 #include "urldata.h"
+
 CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex);
 CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
                                       int sockindex,
@@ -49,23 +51,38 @@ int Curl_nss_seed(struct SessionHandle *data);
 /* initialize NSS library if not already */
 CURLcode Curl_nss_force_init(struct SessionHandle *data);
 
+void Curl_nss_random(struct SessionHandle *data,
+                     unsigned char *entropy,
+                     size_t length);
+
+void Curl_nss_md5sum(unsigned char *tmp, /* input */
+                     size_t tmplen,
+                     unsigned char *md5sum, /* output */
+                     size_t md5len);
+
+/* this backend provides these functions: */
+#define have_curlssl_random 1
+#define have_curlssl_md5sum 1
+
 /* API setup for NSS */
 #define curlssl_init Curl_nss_init
 #define curlssl_cleanup Curl_nss_cleanup
 #define curlssl_connect Curl_nss_connect
 
 /* NSS has its own session ID cache */
-#define curlssl_session_free(x)
+#define curlssl_session_free(x) Curl_nop_stmt
 #define curlssl_close_all Curl_nss_close_all
 #define curlssl_close Curl_nss_close
 /* NSS has no shutdown function provided and thus always fail */
 #define curlssl_shutdown(x,y) (x=x, y=y, 1)
-#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
 #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
 #define curlssl_version Curl_nss_version
 #define curlssl_check_cxn(x) Curl_nss_check_cxn(x)
 #define curlssl_data_pending(x,y) (x=x, y=y, 0)
+#define curlssl_random(x,y,z) Curl_nss_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_nss_md5sum(a,b,c,d)
 
 #endif /* USE_NSS */
-#endif
+#endif /* HEADER_CURL_NSSG_H */
index f9c8a42..252bf11 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#ifdef NETWARE /* Novell NetWare */
+#include "curl_setup.h"
 
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
 
 #ifdef __NOVELL_LIBC__
 /* For native LibC-based NLM we need to register as a real lib. */
-#include <errno.h>
-#include <string.h>
 #include <library.h>
 #include <netware.h>
 #include <screen.h>
 #include <nks/thread.h>
 #include <nks/synch.h>
 
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
 
 typedef struct
 {
@@ -57,9 +58,9 @@ 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  DisposeLibraryData( void * );
+void DisposeThreadData( void * );
+int  GetOrSetUpData( int id, libdata_t **data, libthreaddata_t **threaddata );
 
 
 int _NonAppStart( void        *NLMHandle,
@@ -92,12 +93,12 @@ int _NonAppStart( void        *NLMHandle,
 #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.
-*/
+  /*
+   * 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);
@@ -128,9 +129,9 @@ int _NonAppStart( void        *NLMHandle,
 }
 
 /*
-** 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.
-*/
+ * 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);
@@ -138,16 +139,16 @@ void _NonAppStop( void )
 }
 
 /*
-** 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.
-*/
+ * 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;
@@ -165,22 +166,22 @@ int GetOrSetUpData(int id, libdata_t **appData,
   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.
-*/
+  /*
+   * 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.
-*/
+    /*
+     * 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))) {
@@ -202,13 +203,14 @@ int GetOrSetUpData(int id, libdata_t **appData,
         }
 
         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.
-*/
+          /*
+           * 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) {
@@ -238,13 +240,13 @@ int GetOrSetUpData(int id, libdata_t **appData,
     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.
-*/
+      /*
+       * 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 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 = malloc(sizeof(libthreaddata_t));
 
       if(thread_data) {
@@ -307,13 +309,13 @@ void DisposeThreadData( void *data )
 
 int main ( void )
 {
-    /* initialize any globals here... */
+  /* initialize any globals here... */
 
-    /* do this if any global initializing was done
-    SynchronizeStart();
-    */
-    ExitThread (TSR_THREAD, 0);
-    return 0;
+  /* do this if any global initializing was done
+  SynchronizeStart();
+  */
+  ExitThread (TSR_THREAD, 0);
+  return 0;
 }
 
 #endif /* __NOVELL_LIBC__ */
index ac36512..23ff2a7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
-#ifdef NETWARE /* Novell NetWare */
+#include "curl_setup.h"
 
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
 
 #ifdef __NOVELL_LIBC__
 /* For native LibC-based NLM we need to do nothing. */
 int netware_init ( void )
 {
-    return 0;
+  return 0;
 }
 
 #else /* __NOVELL_LIBC__ */
 
 /* For native CLib-based NLM we need to initialize the LONG namespace. */
-#include <stdio.h>
 #include <nwnspace.h>
 #include <nwthread.h>
 #include <nwadv.h>
@@ -48,48 +47,42 @@ NETINET_DEFINE_CONTEXT
 
 int netware_init ( void )
 {
-    int rc = 0;
-    unsigned int myHandle = GetNLMHandle();
-    /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
-    void (*pUnAugmentAsterisk)(int) = (void(*)(int))
-            ImportSymbol(myHandle, "UnAugmentAsterisk");
-    /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
-    void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
-            ImportSymbol(myHandle, "UseAccurateCaseForPaths");
-    if(pUnAugmentAsterisk)
-        pUnAugmentAsterisk(1);
-    if(pUseAccurateCaseForPaths)
-        pUseAccurateCaseForPaths(1);
-    UnimportSymbol(myHandle, "UnAugmentAsterisk");
-    UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
-    /* set long name space */
-    if((SetCurrentNameSpace(4) == 255)) {
-        rc = 1;
-    }
-    if((SetTargetNameSpace(4) == 255)) {
-        rc = rc + 2;
-    }
-    return rc;
+  int rc = 0;
+  unsigned int myHandle = GetNLMHandle();
+  /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
+  void (*pUnAugmentAsterisk)(int) = (void(*)(int))
+          ImportSymbol(myHandle, "UnAugmentAsterisk");
+  /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
+  void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
+          ImportSymbol(myHandle, "UseAccurateCaseForPaths");
+  if(pUnAugmentAsterisk)
+    pUnAugmentAsterisk(1);
+  if(pUseAccurateCaseForPaths)
+    pUseAccurateCaseForPaths(1);
+  UnimportSymbol(myHandle, "UnAugmentAsterisk");
+  UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
+  /* set long name space */
+  if((SetCurrentNameSpace(4) == 255)) {
+    rc = 1;
+  }
+  if((SetTargetNameSpace(4) == 255)) {
+    rc = rc + 2;
+  }
+  return rc;
 }
 
 /* dummy function to satisfy newer prelude */
 int __init_environment ( void )
 {
-    return 0;
+  return 0;
 }
 
 /* dummy function to satisfy newer prelude */
 int __deinit_environment ( void )
 {
-    return 0;
+  return 0;
 }
 
 #endif /* __NOVELL_LIBC__ */
 
-#else /* NETWARE */
-
-#ifdef __POCC__
-#  pragma warn(disable:2024)  /* Disable warning #2024: Empty input file */
-#endif
-
 #endif /* NETWARE */
diff --git a/lib/objnames-test08.sh b/lib/objnames-test08.sh
new file mode 100755 (executable)
index 0000000..82bf4f9
--- /dev/null
@@ -0,0 +1,217 @@
+#!/bin/sh
+# ***************************************************************************
+# *                                  _   _ ____  _
+# *  Project                     ___| | | |  _ \| |
+# *                             / __| | | | |_) | |
+# *                            | (__| |_| |  _ <| |___
+# *                             \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2013, 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.
+# *
+# ***************************************************************************
+
+#
+# This Bourne shell script file is used by test case 1222 to do
+# unit testing of curl_8char_object_name() shell function which
+# is defined in file objnames.inc and sourced by this file and
+# any other shell script that may use it.
+#
+
+#
+# argument validation
+#
+
+if test $# -eq 1; then
+  :
+else
+  echo "Usage: ${0} srcdir"
+  exit 1
+fi
+
+if test -f "${1}/runtests.pl"; then
+  :
+else
+  echo "${0}: Wrong srcdir"
+  exit 1
+fi
+
+srcdir=${1}
+
+if test -f "$srcdir/../lib/objnames.inc"; then
+  :
+else
+  echo "$0: Missing objnames.inc"
+  exit 1
+fi
+
+#
+# Some variables
+#
+
+logdir=log
+tstnum=1222
+
+list_c=$logdir/${tstnum}_list_c
+list_obj=$logdir/${tstnum}_list_obj
+list_obj_c=$logdir/${tstnum}_list_obj_c
+list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
+
+
+#
+# Source curl_8char_object_name() function definition
+#
+
+. $srcdir/../lib/objnames.inc
+
+#
+# Some curl_8char_object_name() unit tests
+#
+
+echo 'Testing curl_8char_object_name...'
+echo ""
+
+argstr=123__678__ABC__FGH__KLM__PQRSTUV
+expect=16AFKPQR
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC__FGH__KLM__PQ.S.UV
+expect=16AFKPQ
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC..FGH..KLM..PQRSTUV
+expect=16ABC
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678_.ABC._FGH__KLM__PQRSTUV
+expect=16
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
+expect=123
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
+expect=1234567
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+expect=1470AB
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
+expect=159CGHIJ
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
+expect=159CDEFG
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
+expect=1590ABCD
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1567890A
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=12345678
+outstr=`curl_8char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+#
+# Verify that generated object name is distinct for
+# all *.c source files in lib and src subdirectories.
+#
+
+ls $srcdir/../lib/*.c > $list_c
+ls $srcdir/../src/*.c >> $list_c
+
+rm -f $list_obj
+
+for c_fname in `cat $list_c`; do
+  obj_name=`curl_8char_object_name $c_fname`
+  echo "$obj_name" >> $list_obj
+done
+
+sort -u $list_obj > $list_obj_uniq
+
+cnt_c=`cat $list_c | wc -l`
+cnt_u=`cat $list_obj_uniq | wc -l`
+
+echo ""
+echo ""
+echo ""
+if test $cnt_c -eq $cnt_u; then
+  echo "8-characters-or-less generated object names are unique."
+  obj_name_clash="no"
+else
+  echo "8-characters-or-less generated object names are clashing..."
+  obj_name_clash="yes"
+fi
+
+if test $obj_name_clash = "yes"; then
+  #
+  # Show clashing object names and respective source file names
+  #
+  echo ""
+  paste $list_obj $list_c | sort > $list_obj_c
+  prev_match="no"
+  prev_line="unknown"
+  prev_obj_name="unknown"
+  while read this_line; do
+    obj_name=`echo "$this_line" | cut -f1`
+    if test "x$obj_name" = "x$prev_obj_name"; then
+      if test "x$prev_match" != "xyes"; then
+        echo "$prev_line"
+        echo "$this_line"
+        prev_match="yes"
+      else
+        echo "$this_line"
+      fi
+    else
+      prev_match="no"
+    fi
+    prev_line=$this_line
+    prev_obj_name=$obj_name
+  done < $list_obj_c
+fi
+
+rm -f $list_c
+rm -f $list_obj
+rm -f $list_obj_c
+rm -f $list_obj_uniq
+
+# end of objnames-test.sh
diff --git a/lib/objnames-test10.sh b/lib/objnames-test10.sh
new file mode 100755 (executable)
index 0000000..2d85b8f
--- /dev/null
@@ -0,0 +1,217 @@
+#!/bin/sh
+# ***************************************************************************
+# *                                  _   _ ____  _
+# *  Project                     ___| | | |  _ \| |
+# *                             / __| | | | |_) | |
+# *                            | (__| |_| |  _ <| |___
+# *                             \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2013, 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.
+# *
+# ***************************************************************************
+
+#
+# This Bourne shell script file is used by test case 1221 to do
+# unit testing of curl_10char_object_name() shell function which
+# is defined in file objnames.inc and sourced by this file and
+# any other shell script that may use it.
+#
+
+#
+# argument validation
+#
+
+if test $# -eq 1; then
+  :
+else
+  echo "Usage: ${0} srcdir"
+  exit 1
+fi
+
+if test -f "${1}/runtests.pl"; then
+  :
+else
+  echo "${0}: Wrong srcdir"
+  exit 1
+fi
+
+srcdir=${1}
+
+if test -f "$srcdir/../lib/objnames.inc"; then
+  :
+else
+  echo "$0: Missing objnames.inc"
+  exit 1
+fi
+
+#
+# Some variables
+#
+
+logdir=log
+tstnum=1221
+
+list_c=$logdir/${tstnum}_list_c
+list_obj=$logdir/${tstnum}_list_obj
+list_obj_c=$logdir/${tstnum}_list_obj_c
+list_obj_uniq=$logdir/${tstnum}_list_obj_uniq
+
+
+#
+# Source curl_10char_object_name() function definition
+#
+
+. $srcdir/../lib/objnames.inc
+
+#
+# Some curl_10char_object_name() unit tests
+#
+
+echo 'Testing curl_10char_object_name...'
+echo ""
+
+argstr=123__678__ABC__FGH__KLM__PQRSTUV
+expect=16AFKPQRST
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC__FGH__KLM__PQ.S.UV
+expect=16AFKPQ
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678__ABC..FGH..KLM..PQRSTUV
+expect=16ABC
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123__678_.ABC._FGH__KLM__PQRSTUV
+expect=16
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV
+expect=123
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV
+expect=1234567
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+expect=1470AB
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV
+expect=159CGHIJKL
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV
+expect=159CDEFGHI
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV
+expect=1590ABCDEF
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1567890ABC
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV
+expect=1234567890
+outstr=`curl_10char_object_name $argstr`
+echo "result: $outstr expected: $expect input: $argstr"
+
+#
+# Verify that generated object name is distinct for
+# all *.c source files in lib and src subdirectories.
+#
+
+ls $srcdir/../lib/*.c > $list_c
+ls $srcdir/../src/*.c >> $list_c
+
+rm -f $list_obj
+
+for c_fname in `cat $list_c`; do
+  obj_name=`curl_10char_object_name $c_fname`
+  echo "$obj_name" >> $list_obj
+done
+
+sort -u $list_obj > $list_obj_uniq
+
+cnt_c=`cat $list_c | wc -l`
+cnt_u=`cat $list_obj_uniq | wc -l`
+
+echo ""
+echo ""
+echo ""
+if test $cnt_c -eq $cnt_u; then
+  echo "10-characters-or-less generated object names are unique."
+  obj_name_clash="no"
+else
+  echo "10-characters-or-less generated object names are clashing..."
+  obj_name_clash="yes"
+fi
+
+if test $obj_name_clash = "yes"; then
+  #
+  # Show clashing object names and respective source file names
+  #
+  echo ""
+  paste $list_obj $list_c | sort > $list_obj_c
+  prev_match="no"
+  prev_line="unknown"
+  prev_obj_name="unknown"
+  while read this_line; do
+    obj_name=`echo "$this_line" | cut -f1`
+    if test "x$obj_name" = "x$prev_obj_name"; then
+      if test "x$prev_match" != "xyes"; then
+        echo "$prev_line"
+        echo "$this_line"
+        prev_match="yes"
+      else
+        echo "$this_line"
+      fi
+    else
+      prev_match="no"
+    fi
+    prev_line=$this_line
+    prev_obj_name=$obj_name
+  done < $list_obj_c
+fi
+
+rm -f $list_c
+rm -f $list_obj
+rm -f $list_obj_c
+rm -f $list_obj_uniq
+
+# end of objnames-test10.sh
diff --git a/lib/objnames.inc b/lib/objnames.inc
new file mode 100644 (file)
index 0000000..8778492
--- /dev/null
@@ -0,0 +1,107 @@
+# ***************************************************************************
+# *                                  _   _ ____  _
+# *  Project                     ___| | | |  _ \| |
+# *                             / __| | | | |_) | |
+# *                            | (__| |_| |  _ <| |___
+# *                             \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2012, 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.
+# *
+# ***************************************************************************
+
+#
+# This file is sourced from curl/packages/OS400/initscript.sh and
+# other Bourne shell scripts. Keep it as portable as possible.
+#
+
+#
+# curl_10char_object_name
+#
+# This shell function accepts a single string argument with unspecified
+# length representing a (*.c) source file name and returns a string which
+# is a transformation of given argument.
+#
+# The intended purpose of this function is to transliterate a (*.c) source
+# file name that may be longer than 10 characters, or not, into a string
+# with at most 10 characters which may be used as an OS/400 object name.
+#
+# This function might not be universally usefull, nor we care about it.
+#
+# It is intended to be used with libcurl's (*.c) source file names, so
+# dependency on libcurl's source file naming scheme is acceptable and
+# good enough for its intended use. Specifically it makes use of the fact
+# that libcurl's (*.c) source file names which may be longer than 10 chars
+# are conformed with underscore '_' separated substrings, or separated by
+# other character which does not belong to the [0-9], [a-z] or [A-Z] sets.
+#
+# This allows repeatable and automatic short object name generation with
+# no need for a hardcoded mapping table.
+#
+# Transformation is done in the following way:
+#
+# 1) Leading directory components are removed.
+# 2) Leftmost dot character and any other char following it are removed.
+# 3) Lowercase characters are transliterated to uppercase.
+# 4) Characters not in [A-Z] or [0-9] are transliterated to underscore '_'.
+# 5) Every sequence of one or more underscores is replaced with a single one.
+# 6) Five leftmost substrings which end in an underscore character are
+#    replaced by the first character of each substring, while retaining
+#    the rest of the string.
+# 7) Finally the result is truncated to 10 characters.
+#
+# Resulting object name may be shorter than 10 characters.
+#
+# Test case 1221 does unit testng of this function and also verifies
+# that it is possible to generate distinct short object names for all
+# curl and libcurl *.c source file names.
+#
+
+curl_10char_object_name() {
+  echo "${1}" | \
+  sed -e 's:.*/::' \
+   -e 's:[.].*::' \
+   -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
+   -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
+   -e 's:__*:_:g' \
+   -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
+   -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
+   -e 's:^\(..........\).*:\1:'
+}
+
+#
+# curl_8char_object_name
+#
+# Same as curl_10char_object_name() description and details above, except
+# that object name is limited to 8 charcters maximum.
+#
+
+curl_8char_object_name() {
+  echo "${1}" | \
+  sed -e 's:.*/::' \
+   -e 's:[.].*::' \
+   -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \
+   -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \
+   -e 's:__*:_:g' \
+   -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \
+   -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \
+   -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \
+   -e 's:^\(........\).*:\1:'
+}
+
+# end of objectname.inc
index 7010da6..cb3b420 100644 (file)
@@ -6,6 +6,7 @@
  *                 \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
+ * Copyright (C) 2011 - 2013, 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
@@ -20,7 +21,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)
 
@@ -53,7 +54,8 @@
 
 #ifndef _LDAP_PVT_H
 extern int ldap_pvt_url_scheme2proto(const char *);
-extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url, LDAP **ld);
+extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url,
+                        LDAP **ld);
 #endif
 
 static CURLcode ldap_setup(struct connectdata *conn);
@@ -61,7 +63,7 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done);
 static CURLcode ldap_done(struct connectdata *conn, CURLcode, bool);
 static CURLcode ldap_connect(struct connectdata *conn, bool *done);
 static CURLcode ldap_connecting(struct connectdata *conn, bool *done);
-static CURLcode ldap_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode ldap_disconnect(struct connectdata *conn, bool dead);
 
 static Curl_recv ldap_recv;
 
@@ -80,10 +82,13 @@ const struct Curl_handler Curl_handler_ldap = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ldap_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_LDAP,                            /* defport */
-  PROT_LDAP                             /* protocol */
+  CURLPROTO_LDAP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
 #ifdef USE_SSL
@@ -102,10 +107,13 @@ const struct Curl_handler Curl_handler_ldaps = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ldap_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_LDAPS,                           /* defport */
-  PROT_LDAP | PROT_SSL                  /* protocol */
+  CURLPROTO_LDAP,                       /* protocol */
+  PROTOPT_SSL                           /* flags */
 };
 #endif
 
@@ -148,11 +156,11 @@ static CURLcode ldap_setup(struct connectdata *conn)
   CURLcode status;
 
   rc = ldap_url_parse(data->change.url, &lud);
-  if (rc != LDAP_URL_SUCCESS) {
+  if(rc != LDAP_URL_SUCCESS) {
     const char *msg = "url parsing problem";
     status = CURLE_URL_MALFORMAT;
-    if (rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
-      if (rc == LDAP_URL_ERR_MEM)
+    if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
+      if(rc == LDAP_URL_ERR_MEM)
         status = CURLE_OUT_OF_MEMORY;
       msg = url_errs[rc];
     }
@@ -163,6 +171,8 @@ static CURLcode ldap_setup(struct connectdata *conn)
   ldap_free_urldesc(lud);
 
   li = calloc(1, sizeof(ldapconninfo));
+  if(!li)
+    return CURLE_OUT_OF_MEMORY;
   li->proto = proto;
   conn->proto.generic = li;
   conn->bits.close = FALSE;
@@ -182,16 +192,17 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
   struct SessionHandle *data=conn->data;
   int rc, proto = LDAP_VERSION3;
   char hosturl[1024], *ptr;
+  (void)done;
 
   strcpy(hosturl, "ldap");
   ptr = hosturl+4;
-  if (conn->protocol & PROT_SSL)
+  if(conn->handler->flags & PROTOPT_SSL)
     *ptr++ = 's';
   snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d",
     conn->host.name, conn->remote_port);
 
   rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld);
-  if (rc) {
+  if(rc) {
     failf(data, "LDAP local: Cannot connect to %s, %s",
           hosturl, ldap_err2string(rc));
     return CURLE_COULDNT_CONNECT;
@@ -199,54 +210,15 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
 
   ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-    /* for LDAP over HTTP proxy */
-    struct HTTP http_proxy;
-    ldapconninfo *li_save;
-    CURLcode result;
-
-    /* BLOCKING */
-    /* We want "seamless" LDAP operations through HTTP proxy tunnel */
-
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
-     * conn->proto.http; we want LDAP through HTTP and we have to change the
-     * member temporarily for connecting to the HTTP proxy. After
-     * Curl_proxyCONNECT we have to set back the member to the original struct
-     * LDAP pointer
-     */
-    li_save = data->state.proto.generic;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    data->state.proto.http = &http_proxy;
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name, conn->remote_port);
-
-    data->state.proto.generic = li_save;
-
-    if(CURLE_OK != result)
-      return result;
-  }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
 #ifdef USE_SSL
-  if (conn->protocol & PROT_SSL) {
+  if(conn->handler->flags & PROTOPT_SSL) {
     CURLcode res;
-    if (data->state.used_interface == Curl_if_easy) {
-      res = Curl_ssl_connect(conn, FIRSTSOCKET);
-      if (res)
-        return res;
-      li->ssldone = TRUE;
-    } else {
-      res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
-      if (res)
-        return res;
-    }
+    res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
+    if(res)
+      return res;
   }
 #endif
 
-  if (data->state.used_interface == Curl_if_easy)
-    return ldap_connecting(conn, done);
-
   return CURLE_OK;
 }
 
@@ -260,15 +232,16 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
   char *info = NULL;
 
 #ifdef USE_SSL
-  if (conn->protocol & PROT_SSL) {
+  if(conn->handler->flags & PROTOPT_SSL) {
     /* Is the SSL handshake complete yet? */
-    if (!li->ssldone) {
-      CURLcode res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
-      if (res || !li->ssldone)
+    if(!li->ssldone) {
+      CURLcode res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET,
+                                                  &li->ssldone);
+      if(res || !li->ssldone)
         return res;
     }
     /* Have we installed the libcurl SSL handlers into the sockbuf yet? */
-    if (!li->sslinst) {
+    if(!li->sslinst) {
       Sockbuf *sb;
       ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
       ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, conn);
@@ -279,54 +252,55 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
   }
 #endif
 
-  if (data->state.used_interface == Curl_if_easy)
-    tvp = NULL;    /* let ldap_result block indefinitely */
-  else
-    tvp = &tv;
+  tvp = &tv;
 
 retry:
-  if (!li->didbind) {
+  if(!li->didbind) {
     char *binddn;
     struct berval passwd;
 
-    if (conn->bits.user_passwd) {
+    if(conn->bits.user_passwd) {
       binddn = conn->user;
       passwd.bv_val = conn->passwd;
       passwd.bv_len = strlen(passwd.bv_val);
-    } else {
+    }
+    else {
       binddn = NULL;
       passwd.bv_val = NULL;
       passwd.bv_len = 0;
     }
     rc = ldap_sasl_bind(li->ld, binddn, LDAP_SASL_SIMPLE, &passwd,
                         NULL, NULL, &li->msgid);
-    if (rc)
+    if(rc)
       return CURLE_LDAP_CANNOT_BIND;
     li->didbind = TRUE;
-    if (tvp)
+    if(tvp)
       return CURLE_OK;
   }
 
   rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &result);
-  if (rc < 0) {
+  if(rc < 0) {
     failf(data, "LDAP local: bind ldap_result %s", ldap_err2string(rc));
     return CURLE_LDAP_CANNOT_BIND;
   }
-  if (rc == 0) {
+  if(rc == 0) {
     /* timed out */
     return CURLE_OK;
   }
   rc = ldap_parse_result(li->ld, result, &err, NULL, &info, NULL, NULL, 1);
-  if (rc) {
+  if(rc) {
     failf(data, "LDAP local: bind ldap_parse_result %s", ldap_err2string(rc));
     return CURLE_LDAP_CANNOT_BIND;
   }
   /* Try to fallback to LDAPv2? */
-  if (err == LDAP_PROTOCOL_ERROR) {
+  if(err == LDAP_PROTOCOL_ERROR) {
     int proto;
     ldap_get_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
-    if (proto == LDAP_VERSION3) {
-      ldap_memfree(info);
+    if(proto == LDAP_VERSION3) {
+      if(info) {
+        ldap_memfree(info);
+        info = NULL;
+      }
       proto = LDAP_VERSION2;
       ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto);
       li->didbind = FALSE;
@@ -334,11 +308,16 @@ retry:
     }
   }
 
-  if (err) {
+  if(err) {
     failf(data, "LDAP remote: bind failed %s %s", ldap_err2string(rc),
           info ? info : "");
+    if(info)
+      ldap_memfree(info);
     return CURLE_LOGIN_DENIED;
   }
+
+  if(info)
+    ldap_memfree(info);
   conn->recv[FIRSTSOCKET] = ldap_recv;
   *done = TRUE;
   return CURLE_OK;
@@ -349,8 +328,8 @@ static CURLcode ldap_disconnect(struct connectdata *conn, bool dead_connection)
   ldapconninfo *li = conn->proto.generic;
   (void) dead_connection;
 
-  if (li) {
-    if (li->ld) {
+  if(li) {
+    if(li->ld) {
       ldap_unbind_ext(li->ld, NULL, NULL);
       li->ld = NULL;
     }
@@ -375,11 +354,11 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
   infof(data, "LDAP local: %s\n", data->change.url);
 
   rc = ldap_url_parse(data->change.url, &ludp);
-  if (rc != LDAP_URL_SUCCESS) {
+  if(rc != LDAP_URL_SUCCESS) {
     const char *msg = "url parsing problem";
     status = CURLE_URL_MALFORMAT;
-    if (rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
-      if (rc == LDAP_URL_ERR_MEM)
+    if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) {
+      if(rc == LDAP_URL_ERR_MEM)
         status = CURLE_OUT_OF_MEMORY;
       msg = url_errs[rc];
     }
@@ -391,11 +370,13 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
                        ludp->lud_filter, ludp->lud_attrs, 0,
                        NULL, NULL, NULL, 0, &msgid);
   ldap_free_urldesc(ludp);
-  if (rc != LDAP_SUCCESS) {
+  if(rc != LDAP_SUCCESS) {
     failf(data, "LDAP local: ldap_search_ext %s", ldap_err2string(rc));
     return CURLE_LDAP_SEARCH_FAILED;
   }
   lr = calloc(1,sizeof(ldapreqinfo));
+  if(!lr)
+    return CURLE_OUT_OF_MEMORY;
   lr->msgid = msgid;
   data->state.proto.generic = lr;
   Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
@@ -410,9 +391,9 @@ static CURLcode ldap_done(struct connectdata *conn, CURLcode res,
   (void)res;
   (void)premature;
 
-  if (lr) {
+  if(lr) {
     /* if there was a search in progress, abandon it */
-    if (lr->msgid) {
+    if(lr->msgid) {
       ldapconninfo *li = conn->proto.generic;
       ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL);
       lr->msgid = 0;
@@ -439,7 +420,7 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
   (void)sockindex;
 
   rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &result);
-  if (rc < 0) {
+  if(rc < 0) {
     failf(data, "LDAP local: search ldap_result %s", ldap_err2string(rc));
     *err = CURLE_RECV_ERROR;
     return -1;
@@ -449,29 +430,32 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
   ret = -1;
 
   /* timed out */
-  if (result == NULL)
+  if(result == NULL)
     return ret;
 
-  for (ent = ldap_first_message(li->ld, result); ent;
+  for(ent = ldap_first_message(li->ld, result); ent;
     ent = ldap_next_message(li->ld, ent)) {
     struct berval bv, *bvals, **bvp = &bvals;
     int binary = 0, msgtype;
 
     msgtype = ldap_msgtype(ent);
-    if (msgtype == LDAP_RES_SEARCH_RESULT) {
+    if(msgtype == LDAP_RES_SEARCH_RESULT) {
       int code;
       char *info = NULL;
       rc = ldap_parse_result(li->ld, ent, &code, NULL, &info, NULL, NULL, 0);
-      if (rc) {
-        failf(data, "LDAP local: search ldap_parse_result %s", ldap_err2string(rc));
+      if(rc) {
+        failf(data, "LDAP local: search ldap_parse_result %s",
+              ldap_err2string(rc));
         *err = CURLE_LDAP_SEARCH_FAILED;
-      } else if (code && code != LDAP_SIZELIMIT_EXCEEDED) {
+      }
+      else if(code && code != LDAP_SIZELIMIT_EXCEEDED) {
         failf(data, "LDAP remote: search failed %s %s", ldap_err2string(rc),
-          info ? info : "");
+              info ? info : "");
         *err = CURLE_LDAP_SEARCH_FAILED;
-      } else {
+      }
+      else {
         /* successful */
-        if (code == LDAP_SIZELIMIT_EXCEEDED)
+        if(code == LDAP_SIZELIMIT_EXCEEDED)
           infof(data, "There are more than %d entries\n", lr->nument);
         data->req.size = data->req.bytecount;
         *err = CURLE_OK;
@@ -480,58 +464,74 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
       lr->msgid = 0;
       ldap_memfree(info);
       break;
-    } else if (msgtype != LDAP_RES_SEARCH_ENTRY) {
-      continue;
     }
+    else if(msgtype != LDAP_RES_SEARCH_ENTRY)
+      continue;
 
     lr->nument++;
     rc = ldap_get_dn_ber(li->ld, ent, &ber, &bv);
+    if(rc < 0) {
+      /* TODO: verify that this is really how this return code should be
+         handled */
+      *err = CURLE_RECV_ERROR;
+      return -1;
+    }
     Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4);
     Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, bv.bv_len);
     Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
     data->req.bytecount += bv.bv_len + 5;
 
-    for (rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp);
+    for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp);
       rc == LDAP_SUCCESS;
       rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp)) {
       int i;
 
-      if (bv.bv_val == NULL) break;
+      if(bv.bv_val == NULL) break;
 
-      if (bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
+      if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
         binary = 1;
       else
         binary = 0;
 
-      for (i=0; bvals[i].bv_val != NULL; i++) {
+      for(i=0; bvals[i].bv_val != NULL; i++) {
         int binval = 0;
         Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
-        Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, bv.bv_len);
+        Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val,
+                          bv.bv_len);
         Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1);
         data->req.bytecount += bv.bv_len + 2;
 
-        if (!binary) {
+        if(!binary) {
           /* check for leading or trailing whitespace */
-          if (ISSPACE(bvals[i].bv_val[0]) ||
-              ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) {
+          if(ISSPACE(bvals[i].bv_val[0]) ||
+              ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1]))
             binval = 1;
-          else {
+          else {
             /* check for unprintable characters */
             unsigned int j;
-            for (j=0; j<bvals[i].bv_len; j++)
-              if (!ISPRINT(bvals[i].bv_val[j])) {
+            for(j=0; j<bvals[i].bv_len; j++)
+              if(!ISPRINT(bvals[i].bv_val[j])) {
                 binval = 1;
                 break;
               }
           }
         }
-        if (binary || binval) {
-          char *val_b64;
+        if(binary || binval) {
+          char *val_b64 = NULL;
+          size_t val_b64_sz = 0;
           /* Binary value, encode to base64. */
-          size_t val_b64_sz = Curl_base64_encode(data,
-                                            bvals[i].bv_val,
-                                            bvals[i].bv_len,
-                                            &val_b64);
+          CURLcode error = Curl_base64_encode(data,
+                                              bvals[i].bv_val,
+                                              bvals[i].bv_len,
+                                              &val_b64,
+                                              &val_b64_sz);
+          if(error) {
+            ber_memfree(bvals);
+            ber_free(ber, 0);
+            ldap_msgfree(result);
+            *err = error;
+            return -1;
+          }
           Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
           data->req.bytecount += 2;
           if(val_b64_sz > 0) {
@@ -539,7 +539,8 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
             free(val_b64);
             data->req.bytecount += val_b64_sz;
           }
-        } else {
+        }
+        else {
           Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1);
           Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val,
                             bvals[i].bv_len);
@@ -587,7 +588,7 @@ static int
 ldapsb_tls_ctrl(Sockbuf_IO_Desc *sbiod, int opt, void *arg)
 {
   (void)arg;
-  if (opt == LBER_SB_OPT_DATA_READY) {
+  if(opt == LBER_SB_OPT_DATA_READY) {
     struct connectdata *conn = sbiod->sbiod_pvt;
     return Curl_ssl_data_pending(conn, FIRSTSOCKET);
   }
@@ -603,7 +604,7 @@ ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
   CURLcode err = CURLE_RECV_ERROR;
 
   ret = li->recv(conn, FIRSTSOCKET, buf, len, &err);
-  if (ret < 0 && err == CURLE_AGAIN) {
+  if(ret < 0 && err == CURLE_AGAIN) {
     SET_SOCKERRNO(EWOULDBLOCK);
   }
   return ret;
@@ -618,7 +619,7 @@ ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
   CURLcode err = CURLE_SEND_ERROR;
 
   ret = li->send(conn, FIRSTSOCKET, buf, len, &err);
-  if (ret < 0 && err == CURLE_AGAIN) {
+  if(ret < 0 && err == CURLE_AGAIN) {
     SET_SOCKERRNO(EWOULDBLOCK);
   }
   return ret;
index 3e003db..1ddd008 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
   20040911 +0200
 
 */
-#include "setup.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
 
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* for strtol() */
+#include "curl_setup.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
 #endif
 
 #include <curl/curl.h>
@@ -100,6 +98,24 @@ struct tzinfo {
   int offset; /* +/- in minutes */
 };
 
+/*
+ * parsedate()
+ *
+ * Returns:
+ *
+ * PARSEDATE_OK     - a fine conversion
+ * PARSEDATE_FAIL   - failed to convert
+ * PARSEDATE_LATER  - time overflow at the far end of time_t
+ * PARSEDATE_SOONER - time underflow at the low end of time_t
+ */
+
+static int parsedate(const char *date, time_t *output);
+
+#define PARSEDATE_OK     0
+#define PARSEDATE_FAIL   -1
+#define PARSEDATE_LATER  1
+#define PARSEDATE_SOONER 2
+
 /* Here's a bunch of frequently used time zone names. These were supported
    by the old getdate parser. */
 #define tDAYZONE -60       /* offset for daylight savings time */
@@ -160,7 +176,8 @@ static const struct tzinfo tz[]= {
   {"G",  +7 * 60},         /* Golf */
   {"H",  +8 * 60},         /* Hotel */
   {"I",  +9 * 60},         /* India */
-  /* "J", Juliet is not used as a timezone, to indicate the observer's local time */
+  /* "J", Juliet is not used as a timezone, to indicate the observer's local
+     time */
   {"K", +10 * 60},         /* Kilo */
   {"L", +11 * 60},         /* Lima */
   {"M", +12 * 60},         /* Mike */
@@ -282,11 +299,11 @@ static time_t my_timegm(struct my_tm *tm)
 
   year = tm->tm_year + 1900;
   month = tm->tm_mon;
-  if (month < 0) {
+  if(month < 0) {
     year += (11 - month) / 12;
     month = 11 - (11 - month) % 12;
   }
-  else if (month >= 12) {
+  else if(month >= 12) {
     year -= month / 12;
     month = month % 12;
   }
@@ -301,7 +318,7 @@ static time_t my_timegm(struct my_tm *tm)
 }
 
 /*
- * Curl_parsedate()
+ * parsedate()
  *
  * Returns:
  *
@@ -311,7 +328,7 @@ static time_t my_timegm(struct my_tm *tm)
  * PARSEDATE_SOONER - time underflow at the low end of time_t
  */
 
-int Curl_parsedate(const char *date, time_t *output)
+static int parsedate(const char *date, time_t *output)
 {
   time_t t = 0;
   int wdaynum=-1;  /* day of the week number, 0-6 (mon-sun) */
@@ -379,7 +396,24 @@ int Curl_parsedate(const char *date, time_t *output)
         secnum = 0;
       }
       else {
-        val = curlx_sltosi(strtol(date, &end, 10));
+        long lval;
+        int error;
+        int old_errno;
+
+        old_errno = ERRNO;
+        SET_ERRNO(0);
+        lval = strtol(date, &end, 10);
+        error = ERRNO;
+        if(error != old_errno)
+          SET_ERRNO(old_errno);
+
+        if(error)
+          return PARSEDATE_FAIL;
+
+        if((lval > (long)INT_MAX) || (lval < (long)INT_MIN))
+          return PARSEDATE_FAIL;
+
+        val = curlx_sltosi(lval);
 
         if((tzoff == -1) &&
            ((end - date) == 4) &&
@@ -387,7 +421,7 @@ int Curl_parsedate(const char *date, time_t *output)
            (indate< date) &&
            ((date[-1] == '+' || date[-1] == '-'))) {
           /* four digits and a value less than or equal to 1400 (to take into
-             account all sorts of funny time zone diffs) and it is preceeded
+             account all sorts of funny time zone diffs) and it is preceded
              with a plus or minus. This is a time zone indication.  1400 is
              picked since +1300 is frequently used and +1400 is mentioned as
              an edge number in the document "ISO C 200X Proposal: Timezone
@@ -466,6 +500,10 @@ int Curl_parsedate(const char *date, time_t *output)
     return PARSEDATE_SOONER;
   }
 
+  if((mdaynum > 31) || (monnum > 11) ||
+     (hournum > 23) || (minnum > 59) || (secnum > 60))
+    return PARSEDATE_FAIL; /* clearly an illegal date */
+
   tm.tm_sec = secnum;
   tm.tm_min = minnum;
   tm.tm_hour = hournum;
@@ -502,7 +540,7 @@ int Curl_parsedate(const char *date, time_t *output)
 time_t curl_getdate(const char *p, const time_t *now)
 {
   time_t parsed;
-  int rc = Curl_parsedate(p, &parsed);
+  int rc = parsedate(p, &parsed);
   (void)now; /* legacy argument from the past that we ignore */
 
   switch(rc) {
@@ -514,3 +552,29 @@ time_t curl_getdate(const char *p, const time_t *now)
   /* everything else is fail */
   return -1;
 }
+
+/*
+ * Curl_gmtime() is a gmtime() replacement for portability. Do not use the
+ * gmtime_r() or gmtime() functions anywhere else but here.
+ *
+ * To make sure no such function calls slip in, we define them to cause build
+ * errors, which is why we use the name within parentheses in this function.
+ *
+ */
+
+CURLcode Curl_gmtime(time_t intime, struct tm *store)
+{
+  const struct tm *tm;
+#ifdef HAVE_GMTIME_R
+  /* thread-safe version */
+  tm = (struct tm *)gmtime_r(&intime, store);
+#else
+  tm = gmtime(&intime);
+  if(tm)
+    *store = *tm; /* copy the pointed struct to the local copy */
+#endif
+
+  if(!tm)
+    return CURLE_BAD_FUNCTION_ARGUMENT;
+  return CURLE_OK;
+}
index e1bf544..ade0f4f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CURL_PARSEDATE_H
-#define __CURL_PARSEDATE_H
+#ifndef HEADER_CURL_PARSEDATE_H
+#define HEADER_CURL_PARSEDATE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
 extern const char * const Curl_wkday[7];
 extern const char * const Curl_month[12];
 
-/*
- * Curl_parsedate()
- *
- * Returns:
- *
- * PARSEDATE_OK     - a fine conversion
- * PARSEDATE_FAIL   - failed to convert
- * PARSEDATE_LATER  - time overflow at the far end of time_t
- * PARSEDATE_SOONER - time underflow at the low end of time_t
- */
-
-int Curl_parsedate(const char *date, time_t *output);
+CURLcode Curl_gmtime(time_t intime, struct tm *store);
 
-#define PARSEDATE_OK     0
-#define PARSEDATE_FAIL   -1
-#define PARSEDATE_LATER  1
-#define PARSEDATE_SOONER 2
+#endif /* HEADER_CURL_PARSEDATE_H */
 
-#endif
index 81f804f..0040b3f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -23,7 +23,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "urldata.h"
 #include "sendf.h"
@@ -32,6 +32,7 @@
 #include "speedcheck.h"
 #include "pingpong.h"
 #include "multiif.h"
+#include "non-ascii.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -75,48 +76,10 @@ long Curl_pp_state_timeout(struct pingpong *pp)
   return timeout_ms;
 }
 
-
 /*
- * Curl_pp_multi_statemach()
- *
- * called repeatedly until done when the multi interface is used.
- */
-CURLcode Curl_pp_multi_statemach(struct pingpong *pp)
-{
-  struct connectdata *conn = pp->conn;
-  curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  int rc;
-  struct SessionHandle *data=conn->data;
-  CURLcode result = CURLE_OK;
-  long timeout_ms = Curl_pp_state_timeout(pp);
-
-  if(timeout_ms <= 0) {
-    failf(data, "server response timeout");
-    return CURLE_OPERATION_TIMEDOUT;
-  }
-
-  rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
-                         pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
-                         0);
-
-  if(rc == -1) {
-    failf(data, "select/poll error");
-    return CURLE_OUT_OF_MEMORY;
-  }
-  else if(rc != 0)
-    result = pp->statemach_act(conn);
-
-  /* if rc == 0, then select() timed out */
-
-  return result;
-}
-
-/*
- * Curl_pp_easy_statemach()
- *
- * called repeatedly until done when the easy interface is used.
+ * Curl_pp_statemach()
  */
-CURLcode Curl_pp_easy_statemach(struct pingpong *pp)
+CURLcode Curl_pp_statemach(struct pingpong *pp, bool block)
 {
   struct connectdata *conn = pp->conn;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -124,29 +87,41 @@ CURLcode Curl_pp_easy_statemach(struct pingpong *pp)
   long interval_ms;
   long timeout_ms = Curl_pp_state_timeout(pp);
   struct SessionHandle *data=conn->data;
-  CURLcode result;
+  CURLcode result = CURLE_OK;
 
   if(timeout_ms <=0 ) {
     failf(data, "server response timeout");
     return CURLE_OPERATION_TIMEDOUT; /* already too little time */
   }
 
-  interval_ms = 1000;  /* use 1 second timeout intervals */
-  if(timeout_ms < interval_ms)
-    interval_ms = timeout_ms;
-
-  rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
-                         pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
-                         (int)interval_ms);
+  if(block) {
+    interval_ms = 1000;  /* use 1 second timeout intervals */
+    if(timeout_ms < interval_ms)
+      interval_ms = timeout_ms;
+  }
+  else
+    interval_ms = 0; /* immediate */
 
-  if(Curl_pgrsUpdate(conn))
-    result = CURLE_ABORTED_BY_CALLBACK;
+  if(Curl_pp_moredata(pp))
+    /* We are receiving and there is data in the cache so just read it */
+    rc = 1;
   else
-    result = Curl_speedcheck(data, Curl_tvnow());
+    rc = Curl_socket_ready(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */
+                           pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */
+                           interval_ms);
+
+  if(block) {
+    /* if we didn't wait, we don't have to spend time on this now */
+    if(Curl_pgrsUpdate(conn))
+      result = CURLE_ABORTED_BY_CALLBACK;
+    else
+      result = Curl_speedcheck(data, Curl_tvnow());
+
+    if(result)
+      return result;
+  }
 
-  if(result)
-    ;
-  else if(rc == -1) {
+  if(rc == -1) {
     failf(data, "select/poll error");
     result = CURLE_OUT_OF_MEMORY;
   }
@@ -170,15 +145,12 @@ void Curl_pp_init(struct pingpong *pp)
 
 /***********************************************************************
  *
- * Curl_pp_sendfv()
+ * Curl_pp_vsendf()
  *
  * Send the formated string as a command to a pingpong server. Note that
  * the string should not have any CRLF appended, as this function will
  * append the necessary things itself.
  *
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
  * made to never block
  */
 CURLcode Curl_pp_vsendf(struct pingpong *pp,
@@ -186,12 +158,10 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
                         va_list args)
 {
   ssize_t bytes_written;
-/* may still not be big enough for some krb5 tokens */
-#define SBUF_SIZE 1024
-  char s[SBUF_SIZE];
   size_t write_len;
-  char *sptr=s;
-  CURLcode res = CURLE_OK;
+  char *fmt_crlf;
+  char *s;
+  CURLcode error;
   struct connectdata *conn = pp->conn;
   struct SessionHandle *data = conn->data;
 
@@ -199,58 +169,64 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
   enum protection_level data_sec = conn->data_prot;
 #endif
 
-  vsnprintf(s, SBUF_SIZE-3, fmt, args);
+  DEBUGASSERT(pp->sendleft == 0);
+  DEBUGASSERT(pp->sendsize == 0);
+  DEBUGASSERT(pp->sendthis == NULL);
+
+  fmt_crlf = aprintf("%s\r\n", fmt); /* append a trailing CRLF */
+  if(!fmt_crlf)
+    return CURLE_OUT_OF_MEMORY;
 
-  strcat(s, "\r\n"); /* append a trailing CRLF */
+  s = vaprintf(fmt_crlf, args); /* trailing CRLF appended */
+  free(fmt_crlf);
+  if(!s)
+    return CURLE_OUT_OF_MEMORY;
 
-  bytes_written=0;
+  bytes_written = 0;
   write_len = strlen(s);
 
   Curl_pp_init(pp);
 
-#ifdef CURL_DOES_CONVERSIONS
-  res = Curl_convert_to_network(data, s, write_len);
+  error = Curl_convert_to_network(data, s, write_len);
   /* Curl_convert_to_network calls failf if unsuccessful */
-  if(res != CURLE_OK) {
-    return res;
+  if(error) {
+    free(s);
+    return error;
   }
-#endif /* CURL_DOES_CONVERSIONS */
 
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
   conn->data_prot = PROT_CMD;
 #endif
-  res = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len,
-                   &bytes_written);
+  error = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len,
+                     &bytes_written);
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
   DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST);
   conn->data_prot = data_sec;
 #endif
 
-  if(CURLE_OK != res)
-    return res;
+  if(error) {
+    free(s);
+    return error;
+  }
 
   if(conn->data->set.verbose)
     Curl_debug(conn->data, CURLINFO_HEADER_OUT,
-               sptr, (size_t)bytes_written, conn);
+               s, (size_t)bytes_written, conn);
 
   if(bytes_written != (ssize_t)write_len) {
-    /* the whole chunk was not sent, store the rest of the data */
-    write_len -= bytes_written;
-    sptr += bytes_written;
-    pp->sendthis = malloc(write_len);
-    if(pp->sendthis) {
-      memcpy(pp->sendthis, sptr, write_len);
-      pp->sendsize = pp->sendleft = write_len;
-    }
-    else {
-      failf(data, "out of memory");
-      res = CURLE_OUT_OF_MEMORY;
-    }
+    /* the whole chunk was not sent, keep it around and adjust sizes */
+    pp->sendthis = s;
+    pp->sendsize = write_len;
+    pp->sendleft = write_len - bytes_written;
   }
-  else
+  else {
+    free(s);
+    pp->sendthis = NULL;
+    pp->sendleft = pp->sendsize = 0;
     pp->response = Curl_tvnow();
+  }
 
-  return res;
+  return CURLE_OK;
 }
 
 
@@ -262,9 +238,6 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
  * the string should not have any CRLF appended, as this function will
  * append the necessary things itself.
  *
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
  * made to never block
  */
 CURLcode Curl_pp_sendf(struct pingpong *pp,
@@ -316,10 +289,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
       /* we had data in the "cache", copy that instead of doing an actual
        * read
        *
-       * ftp->cache_size is cast to int here.  This should be safe,
-       * because it would have been populated with something of size
-       * int to begin with, even though its datatype may be larger
-       * than an int.
+       * pp->cache_size is cast to ssize_t here.  This should be safe, because
+       * it would have been populated with something of size int to begin
+       * with, even though its datatype may be larger than an int.
        */
       DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1));
       memcpy(ptr, pp->cache, pp->cache_size);
@@ -344,13 +316,10 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
       if(res == CURLE_AGAIN)
         return CURLE_OK; /* return */
 
-#ifdef CURL_DOES_CONVERSIONS
-      if((res == CURLE_OK) && (gotbytes > 0)) {
+      if((res == CURLE_OK) && (gotbytes > 0))
         /* convert from the network encoding */
         res = Curl_convert_from_network(data, ptr, gotbytes);
-        /* Curl_convert_from_network calls failf if unsuccessful */
-      }
-#endif /* CURL_DOES_CONVERSIONS */
+      /* Curl_convert_from_network calls failf if unsuccessful */
 
       if(CURLE_OK != res) {
         result = (CURLcode)res; /* Set outer result variable to this error. */
@@ -379,7 +348,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
       for(i = 0; i < gotbytes; ptr++, i++) {
         perline++;
         if(*ptr=='\n') {
-          /* a newline is CRLF in ftp-talk, so the CR is ignored as
+          /* a newline is CRLF in pp-talk, so the CR is ignored as
              the line isn't really terminated until the LF comes */
 
           /* output debug output if that is requested */
@@ -400,7 +369,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
           if(result)
             return result;
 
-          if(pp->endofresp(pp, code)) {
+          if(pp->endofresp(conn, pp->linestart_resp, perline, code)) {
             /* This is the end of the last line, copy the last line to the
                start of the buffer and zero terminate, for old times sake (and
                krb4)! */
@@ -429,6 +398,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
            it may actually contain another end of response already! */
         clipamount = gotbytes - i;
         restart = TRUE;
+        DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
+                     "server response left\n",
+                     (int)clipamount));
       }
       else if(keepon) {
 
@@ -436,8 +408,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
           /* We got an excessive line without newlines and we need to deal
              with it. We keep the first bytes of the line then we throw
              away the rest. */
-          infof(data, "Excessive server response line length received, %zd bytes."
-                " Stripping\n", gotbytes);
+          infof(data, "Excessive server response line length received, "
+                "%zd bytes. Stripping\n", gotbytes);
           restart = TRUE;
 
           /* we keep 40 bytes since all our pingpong protocols are only
@@ -445,9 +417,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
           clipamount = 40;
         }
         else if(pp->nread_resp > BUFSIZE/2) {
-          /* We got a large chunk of data and there's potentially still trailing
-             data to take care of, so we put any such part in the "cache", clear
-             the buffer to make space and restart. */
+          /* We got a large chunk of data and there's potentially still
+             trailing data to take care of, so we put any such part in the
+             "cache", clear the buffer to make space and restart. */
           clipamount = perline;
           restart = TRUE;
         }
@@ -535,6 +507,10 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp)
   return CURLE_OK;
 }
 
-
+bool Curl_pp_moredata(struct pingpong *pp)
+{
+  return (!pp->sendleft && pp->cache && pp->nread_resp < pp->cache_size) ?
+         TRUE : FALSE;
+}
 
 #endif
index cbbff8f..b925ab9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __PINGPONG_H
-#define __PINGPONG_H
+#ifndef HEADER_CURL_PINGPONG_H
+#define HEADER_CURL_PINGPONG_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -22,9 +22,7 @@
  *
  ***************************************************************************/
 
-#include <stdarg.h>
-
-#include "setup.h"
+#include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \
   !defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_SMTP)
 /* forward-declaration, this is defined in urldata.h */
 struct connectdata;
 
+typedef enum {
+  FTPTRANSFER_BODY, /* yes do transfer a body */
+  FTPTRANSFER_INFO, /* do still go through to get info/headers */
+  FTPTRANSFER_NONE, /* don't get anything and don't get info */
+  FTPTRANSFER_LAST  /* end of list marker, never used */
+} curl_pp_transfer;
+
 /*
  * 'pingpong' is the generic struct used for protocols doing server<->client
  * conversations in a back-and-forth style such as FTP, IMAP, POP3, SMTP etc.
@@ -66,23 +71,17 @@ struct pingpong {
 
   CURLcode (*statemach_act)(struct connectdata *conn);
 
-  int (*endofresp)(struct pingpong *pp, int *code);
+  bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len,
+                    int *code);
 };
 
 /*
- * Curl_pp_multi_statemach()
- *
- * called repeatedly until done when the multi interface is used.
- */
-CURLcode Curl_pp_multi_statemach(struct pingpong *pp);
-
-/*
- * Curl_pp_easy_statemach()
+ * Curl_pp_statemach()
  *
- * called repeatedly until done when the easy interface is used.
+ * called repeatedly until done. Set 'wait' to make it wait a while on the
+ * socket if there's no traffic.
  */
-CURLcode Curl_pp_easy_statemach(struct pingpong *pp);
-
+CURLcode Curl_pp_statemach(struct pingpong *pp, bool block);
 
 /* initialize stuff to prepare for reading a fresh new response */
 void Curl_pp_init(struct pingpong *pp);
@@ -100,9 +99,6 @@ long Curl_pp_state_timeout(struct pingpong *pp);
  * the string should not have any CRLF appended, as this function will
  * append the necessary things itself.
  *
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
  * made to never block
  */
 CURLcode Curl_pp_sendf(struct pingpong *pp,
@@ -116,9 +112,6 @@ CURLcode Curl_pp_sendf(struct pingpong *pp,
  * the string should not have any CRLF appended, as this function will
  * append the necessary things itself.
  *
- * NOTE: we build the command in a fixed-length buffer, which sets length
- * restrictions on the command!
- *
  * made to never block
  */
 CURLcode Curl_pp_vsendf(struct pingpong *pp,
@@ -144,4 +137,14 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp);
 int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks,
                     int numsocks);
 
-#endif /* __PINGPONG_H */
+
+/***********************************************************************
+ *
+ * Curl_pp_moredata()
+ *
+ * Returns whether there are still more data in the cache and so a call
+ * to Curl_pp_readresp() will not block.
+ */
+bool Curl_pp_moredata(struct pingpong *pp);
+
+#endif /* HEADER_CURL_PINGPONG_H */
diff --git a/lib/pipeline.c b/lib/pipeline.c
new file mode 100644 (file)
index 0000000..418058a
--- /dev/null
@@ -0,0 +1,333 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2013, 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_setup.h"
+
+#include <curl/curl.h>
+
+#include "urldata.h"
+#include "url.h"
+#include "progress.h"
+#include "multiif.h"
+#include "pipeline.h"
+#include "sendf.h"
+#include "rawstr.h"
+#include "bundles.h"
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+struct site_blacklist_entry {
+  char *hostname;
+  unsigned short port;
+};
+
+static void site_blacklist_llist_dtor(void *user, void *element)
+{
+  struct site_blacklist_entry *entry = element;
+  (void)user;
+
+  Curl_safefree(entry->hostname);
+  Curl_safefree(entry);
+}
+
+static void server_blacklist_llist_dtor(void *user, void *element)
+{
+  char *server_name = element;
+  (void)user;
+
+  Curl_safefree(server_name);
+}
+
+bool Curl_pipeline_penalized(struct SessionHandle *data,
+                             struct connectdata *conn)
+{
+  if(data) {
+    bool penalized = FALSE;
+    curl_off_t penalty_size =
+      Curl_multi_content_length_penalty_size(data->multi);
+    curl_off_t chunk_penalty_size =
+      Curl_multi_chunk_length_penalty_size(data->multi);
+    curl_off_t recv_size = -2; /* Make it easy to spot in the log */
+
+    /* Find the head of the recv pipe, if any */
+    if(conn->recv_pipe && conn->recv_pipe->head) {
+      struct SessionHandle *recv_handle = conn->recv_pipe->head->ptr;
+
+      recv_size = recv_handle->req.size;
+
+      if(penalty_size > 0 && recv_size > penalty_size)
+        penalized = TRUE;
+    }
+
+    if(chunk_penalty_size > 0 &&
+       (curl_off_t)conn->chunk.datasize > chunk_penalty_size)
+      penalized = TRUE;
+
+    infof(data, "Conn: %ld (%p) Receive pipe weight: (%" FORMAT_OFF_T
+          "/%zu), penalized: %s\n",
+          conn->connection_id, (void *)conn, recv_size,
+          conn->chunk.datasize, penalized?"TRUE":"FALSE");
+    return penalized;
+  }
+  return FALSE;
+}
+
+CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
+                                     struct connectdata *conn)
+{
+  struct curl_llist_element *sendhead = conn->send_pipe->head;
+  struct curl_llist *pipeline;
+  CURLcode rc;
+
+  pipeline = conn->send_pipe;
+
+  infof(conn->data, "Adding handle: conn: %p\n", (void *)conn);
+  infof(conn->data, "Adding handle: send: %d\n", conn->send_pipe->size);
+  infof(conn->data, "Adding handle: recv: %d\n", conn->recv_pipe->size);
+  rc = Curl_addHandleToPipeline(handle, pipeline);
+
+  if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
+    /* this is a new one as head, expire it */
+    conn->writechannel_inuse = FALSE; /* not in use yet */
+#ifdef DEBUGBUILD
+    infof(conn->data, "%p is at send pipe head!\n",
+          (void *)conn->send_pipe->head->ptr);
+#endif
+    Curl_expire(conn->send_pipe->head->ptr, 1);
+  }
+
+  print_pipeline(conn);
+
+  return rc;
+}
+
+/* Move this transfer from the sending list to the receiving list.
+
+   Pay special attention to the new sending list "leader" as it needs to get
+   checked to update what sockets it acts on.
+
+*/
+void Curl_move_handle_from_send_to_recv_pipe(struct SessionHandle *handle,
+                                             struct connectdata *conn)
+{
+  struct curl_llist_element *curr;
+
+  curr = conn->send_pipe->head;
+  while(curr) {
+    if(curr->ptr == handle) {
+      Curl_llist_move(conn->send_pipe, curr,
+                      conn->recv_pipe, conn->recv_pipe->tail);
+
+      if(conn->send_pipe->head) {
+        /* Since there's a new easy handle at the start of the send pipeline,
+           set its timeout value to 1ms to make it trigger instantly */
+        conn->writechannel_inuse = FALSE; /* not used now */
+#ifdef DEBUGBUILD
+        infof(conn->data, "%p is at send pipe head B!\n",
+              (void *)conn->send_pipe->head->ptr);
+#endif
+        Curl_expire(conn->send_pipe->head->ptr, 1);
+      }
+
+      /* The receiver's list is not really interesting here since either this
+         handle is now first in the list and we'll deal with it soon, or
+         another handle is already first and thus is already taken care of */
+
+      break; /* we're done! */
+    }
+    curr = curr->next;
+  }
+}
+
+bool Curl_pipeline_site_blacklisted(struct SessionHandle *handle,
+                                    struct connectdata *conn)
+{
+  if(handle->multi) {
+    struct curl_llist *blacklist =
+      Curl_multi_pipelining_site_bl(handle->multi);
+
+    if(blacklist) {
+      struct curl_llist_element *curr;
+
+      curr = blacklist->head;
+      while(curr) {
+        struct site_blacklist_entry *site;
+
+        site = curr->ptr;
+        if(Curl_raw_equal(site->hostname, conn->host.name) &&
+           site->port == conn->remote_port) {
+          infof(handle, "Site %s:%d is pipeline blacklisted\n",
+                conn->host.name, conn->remote_port);
+          return TRUE;
+        }
+        curr = curr->next;
+      }
+    }
+  }
+  return FALSE;
+}
+
+CURLMcode Curl_pipeline_set_site_blacklist(char **sites,
+                                           struct curl_llist **list_ptr)
+{
+  struct curl_llist *old_list = *list_ptr;
+  struct curl_llist *new_list = NULL;
+
+  if(sites) {
+    new_list = Curl_llist_alloc((curl_llist_dtor) site_blacklist_llist_dtor);
+    if(!new_list)
+      return CURLM_OUT_OF_MEMORY;
+
+    /* Parse the URLs and populate the list */
+    while(*sites) {
+      char *hostname;
+      char *port;
+      struct site_blacklist_entry *entry;
+
+      entry = malloc(sizeof(struct site_blacklist_entry));
+
+      hostname = strdup(*sites);
+      if(!hostname)
+        return CURLM_OUT_OF_MEMORY;
+
+      port = strchr(hostname, ':');
+      if(port) {
+        *port = '\0';
+        port++;
+        entry->port = (unsigned short)strtol(port, NULL, 10);
+      }
+      else {
+        /* Default port number for HTTP */
+        entry->port = 80;
+      }
+
+      entry->hostname = hostname;
+
+      if(!Curl_llist_insert_next(new_list, new_list->tail, entry))
+        return CURLM_OUT_OF_MEMORY;
+
+      sites++;
+    }
+  }
+
+  /* Free the old list */
+  if(old_list) {
+    Curl_llist_destroy(old_list, NULL);
+  }
+
+  /* This might be NULL if sites == NULL, i.e the blacklist is cleared */
+  *list_ptr = new_list;
+
+  return CURLM_OK;
+}
+
+bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle,
+                                      char *server_name)
+{
+  if(handle->multi) {
+    struct curl_llist *blacklist =
+      Curl_multi_pipelining_server_bl(handle->multi);
+
+    if(blacklist) {
+      struct curl_llist_element *curr;
+
+      curr = blacklist->head;
+      while(curr) {
+        char *bl_server_name;
+
+        bl_server_name = curr->ptr;
+        if(Curl_raw_nequal(bl_server_name, server_name,
+                           strlen(bl_server_name))) {
+          infof(handle, "Server %s is blacklisted\n", server_name);
+          return TRUE;
+        }
+        curr = curr->next;
+      }
+    }
+
+    infof(handle, "Server %s is not blacklisted\n", server_name);
+  }
+  return FALSE;
+}
+
+CURLMcode Curl_pipeline_set_server_blacklist(char **servers,
+                                             struct curl_llist **list_ptr)
+{
+  struct curl_llist *old_list = *list_ptr;
+  struct curl_llist *new_list = NULL;
+
+  if(servers) {
+    new_list = Curl_llist_alloc((curl_llist_dtor) server_blacklist_llist_dtor);
+    if(!new_list)
+      return CURLM_OUT_OF_MEMORY;
+
+    /* Parse the URLs and populate the list */
+    while(*servers) {
+      char *server_name;
+
+      server_name = strdup(*servers);
+      if(!server_name)
+        return CURLM_OUT_OF_MEMORY;
+
+      if(!Curl_llist_insert_next(new_list, new_list->tail, server_name))
+        return CURLM_OUT_OF_MEMORY;
+
+      servers++;
+    }
+  }
+
+  /* Free the old list */
+  if(old_list) {
+    Curl_llist_destroy(old_list, NULL);
+  }
+
+  /* This might be NULL if sites == NULL, i.e the blacklist is cleared */
+  *list_ptr = new_list;
+
+  return CURLM_OK;
+}
+
+
+void print_pipeline(struct connectdata *conn)
+{
+  struct curl_llist_element *curr;
+  struct connectbundle *cb_ptr;
+  struct SessionHandle *data = conn->data;
+
+  cb_ptr = conn->bundle;
+
+  if(cb_ptr) {
+    curr = cb_ptr->conn_list->head;
+    while(curr) {
+      conn = curr->ptr;
+      infof(data, "- Conn %ld (%p) send_pipe: %zu, recv_pipe: %zu\n",
+            conn->connection_id,
+            (void *)conn,
+            conn->send_pipe->size,
+            conn->recv_pipe->size);
+      curr = curr->next;
+    }
+  }
+}
diff --git a/lib/pipeline.h b/lib/pipeline.h
new file mode 100644 (file)
index 0000000..1df9589
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_PIPELINE_H
+#define HEADER_CURL_PIPELINE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
+                                     struct connectdata *conn);
+void Curl_move_handle_from_send_to_recv_pipe(struct SessionHandle *handle,
+                                             struct connectdata *conn);
+bool Curl_pipeline_penalized(struct SessionHandle *data,
+                             struct connectdata *conn);
+
+bool Curl_pipeline_site_blacklisted(struct SessionHandle *handle,
+                                    struct connectdata *conn);
+
+CURLMcode Curl_pipeline_set_site_blacklist(char **sites,
+                                           struct curl_llist **list_ptr);
+
+bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle,
+                                      char *server_name);
+
+CURLMcode Curl_pipeline_set_server_blacklist(char **servers,
+                                             struct curl_llist **list_ptr);
+
+void print_pipeline(struct connectdata *conn);
+
+#endif /* HEADER_CURL_PIPELINE_H */
index bed7635..808f54c 100644 (file)
@@ -5,7 +5,8 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2012 - 2013, 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
  *
  */
 
-#include "setup.h"
-#ifdef USE_POLARSSL
+#include "curl_setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+#ifdef USE_POLARSSL
 
 #include <polarssl/net.h>
 #include <polarssl/ssl.h>
-#include <polarssl/havege.h>
 #include <polarssl/certs.h>
 #include <polarssl/x509.h>
+#include <polarssl/version.h>
+
+#if POLARSSL_VERSION_NUMBER >= 0x01000000
+#include <polarssl/error.h>
+#endif /* POLARSSL_VERSION_NUMBER >= 0x01000000 */
+
+#if POLARSSL_VERSION_NUMBER>0x01010000
+#include <polarssl/entropy.h>
+#include <polarssl/ctr_drbg.h>
+#else
+#include <polarssl/havege.h>
+#endif /* POLARSSL_VERSION_NUMBER>0x01010000 */
+
+
+#if POLARSSL_VERSION_NUMBER<0x01000000
+/*
+  Earlier versions of polarssl had no WANT_READ or WANT_WRITE, only TRY_AGAIN
+*/
+#define POLARSSL_ERR_NET_WANT_READ  POLARSSL_ERR_NET_TRY_AGAIN
+#define POLARSSL_ERR_NET_WANT_WRITE POLARSSL_ERR_NET_TRY_AGAIN
+#endif
 
 #include "urldata.h"
 #include "sendf.h"
@@ -51,6 +66,7 @@
 #include "connect.h" /* for the connect timeout */
 #include "select.h"
 #include "rawstr.h"
+#include "polarssl_threadlock.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 /* The last #include file should be: */
 #include "memdebug.h"
 
+/* apply threading? */
+#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+#define THREADING_SUPPORT
+#endif
+
+#if defined(THREADING_SUPPORT) && POLARSSL_VERSION_NUMBER>0x01010000
+static entropy_context entropy;
+
+static int  entropy_init_initialized  = 0;
+
+/* start of entropy_init_mutex() */
+static void entropy_init_mutex(entropy_context *ctx)
+{
+  /* lock 0 = entropy_init_mutex() */
+  polarsslthreadlock_lock_function(0);
+  if(entropy_init_initialized == 0) {
+    entropy_init(ctx);
+    entropy_init_initialized = 1;
+  }
+  polarsslthreadlock_unlock_function(0);
+}
+/* end of entropy_init_mutex() */
+
+/* start of entropy_func_mutex() */
+static int entropy_func_mutex(void *data, unsigned char *output, size_t len)
+{
+    int ret;
+    /* lock 1 = entropy_func_mutex() */
+    polarsslthreadlock_lock_function(1);
+    ret = entropy_func(data, output, len);
+    polarsslthreadlock_unlock_function(1);
+
+    return ret;
+}
+/* end of entropy_func_mutex() */
+
+#endif /* THREADING_SUPPORT && POLARSSL_VERSION_NUMBER>0x01010000 */
+
 /* Define this to enable lots of debugging for PolarSSL */
 #undef POLARSSL_DEBUG
 
@@ -71,7 +125,7 @@ static void polarssl_debug(void *context, int level, char *line)
 
   data = (struct SessionHandle *)context;
 
-  infof(data, "%s", line);
+  infof(data, "%s\n", line);
 }
 #else
 #endif
@@ -79,15 +133,14 @@ static void polarssl_debug(void *context, int level, char *line)
 static Curl_recv polarssl_recv;
 static Curl_send polarssl_send;
 
-/*
- * This function loads all the client/CA certificates and CRLs. Setup the TLS
- * layer and do all necessary magic.
- */
-CURLcode
-Curl_polarssl_connect(struct connectdata *conn,
-                      int sockindex)
+
+static CURLcode
+polarssl_connect_step1(struct connectdata *conn,
+                     int sockindex)
 {
   struct SessionHandle *data = conn->data;
+  struct ssl_connect_data* connssl = &conn->ssl[sockindex];
+
   bool sni = TRUE; /* default is SNI enabled */
   int ret = -1;
 #ifdef ENABLE_IPV6
@@ -97,31 +150,60 @@ Curl_polarssl_connect(struct connectdata *conn,
 #endif
   void *old_session = NULL;
   size_t old_session_size = 0;
-  char buffer[1024];
 
-  if(conn->ssl[sockindex].state == ssl_connection_complete)
-    return CURLE_OK;
+  char errorbuf[128];
+  memset(errorbuf, 0, sizeof(errorbuf));
+
 
   /* PolarSSL only supports SSLv3 and TLSv1 */
   if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
     failf(data, "PolarSSL does not support SSLv2");
     return CURLE_SSL_CONNECT_ERROR;
-  } else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3) {
-    sni = FALSE; /* SSLv3 has no SNI */
   }
+  else if(data->set.ssl.version == CURL_SSLVERSION_SSLv3)
+    sni = FALSE; /* SSLv3 has no SNI */
 
-  havege_init(&conn->ssl[sockindex].hs);
+#if POLARSSL_VERSION_NUMBER<0x01010000
+  havege_init(&connssl->hs);
+#else
+#ifdef THREADING_SUPPORT
+  entropy_init_mutex(&entropy);
+
+  if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func_mutex, &entropy,
+                               connssl->ssn.id, connssl->ssn.length)) != 0) {
+#ifdef POLARSSL_ERROR_C
+     error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+     failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n",
+                                                            -ret, errorbuf);
+  }
+#else
+  entropy_init(&connssl->entropy);
+
+  if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func, &connssl->entropy,
+                                connssl->ssn.id, connssl->ssn.length)) != 0) {
+#ifdef POLARSSL_ERROR_C
+     error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+     failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n",
+                                                            -ret, errorbuf);
+  }
+#endif /* THREADING_SUPPORT */
+#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
 
   /* Load the trusted CA */
-  memset(&conn->ssl[sockindex].cacert, 0, sizeof(x509_cert));
+  memset(&connssl->cacert, 0, sizeof(x509_cert));
 
   if(data->set.str[STRING_SSL_CAFILE]) {
-    ret = x509parse_crtfile(&conn->ssl[sockindex].cacert,
+    ret = x509parse_crtfile(&connssl->cacert,
                             data->set.str[STRING_SSL_CAFILE]);
 
-    if(ret) {
-      failf(data, "Error reading ca cert file %s: -0x%04X",
-            data->set.str[STRING_SSL_CAFILE], -ret);
+    if(ret<0) {
+#ifdef POLARSSL_ERROR_C
+      error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+      failf(data, "Error reading ca cert file %s - PolarSSL: (-0x%04X) %s",
+            data->set.str[STRING_SSL_CAFILE], -ret, errorbuf);
 
       if(data->set.ssl.verifypeer)
         return CURLE_SSL_CACERT_BADFILE;
@@ -129,140 +211,190 @@ Curl_polarssl_connect(struct connectdata *conn,
   }
 
   /* Load the client certificate */
-  memset(&conn->ssl[sockindex].clicert, 0, sizeof(x509_cert));
+  memset(&connssl->clicert, 0, sizeof(x509_cert));
 
   if(data->set.str[STRING_CERT]) {
-    ret = x509parse_crtfile(&conn->ssl[sockindex].clicert,
+    ret = x509parse_crtfile(&connssl->clicert,
                             data->set.str[STRING_CERT]);
 
     if(ret) {
-      failf(data, "Error reading client cert file %s: -0x%04X",
-            data->set.str[STRING_CERT], -ret);
+#ifdef POLARSSL_ERROR_C
+      error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+      failf(data, "Error reading client cert file %s - PolarSSL: (-0x%04X) %s",
+            data->set.str[STRING_CERT], -ret, errorbuf);
+
       return CURLE_SSL_CERTPROBLEM;
     }
   }
 
   /* Load the client private key */
   if(data->set.str[STRING_KEY]) {
-    ret = x509parse_keyfile(&conn->ssl[sockindex].rsa,
+    ret = x509parse_keyfile(&connssl->rsa,
                             data->set.str[STRING_KEY],
                             data->set.str[STRING_KEY_PASSWD]);
 
     if(ret) {
-      failf(data, "Error reading private key %s: -0x%04X",
-            data->set.str[STRING_KEY], -ret);
+#ifdef POLARSSL_ERROR_C
+      error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+      failf(data, "Error reading private key %s - PolarSSL: (-0x%04X) %s",
+            data->set.str[STRING_KEY], -ret, errorbuf);
+
       return CURLE_SSL_CERTPROBLEM;
     }
   }
 
   /* Load the CRL */
-  memset(&conn->ssl[sockindex].crl, 0, sizeof(x509_crl));
+  memset(&connssl->crl, 0, sizeof(x509_crl));
 
   if(data->set.str[STRING_SSL_CRLFILE]) {
-    ret = x509parse_crlfile(&conn->ssl[sockindex].crl,
+    ret = x509parse_crlfile(&connssl->crl,
                             data->set.str[STRING_SSL_CRLFILE]);
 
     if(ret) {
-      failf(data, "Error reading CRL file %s: -0x%04X",
-            data->set.str[STRING_SSL_CRLFILE], -ret);
+#ifdef POLARSSL_ERROR_C
+      error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+      failf(data, "Error reading CRL file %s - PolarSSL: (-0x%04X) %s",
+            data->set.str[STRING_SSL_CRLFILE], -ret, errorbuf);
+
       return CURLE_SSL_CRL_BADFILE;
     }
   }
 
-  infof(data, "PolarSSL: Connected to %s:%d\n",
+  infof(data, "PolarSSL: Connecting to %s:%d\n",
         conn->host.name, conn->remote_port);
 
-  havege_init(&conn->ssl[sockindex].hs);
-
-  if(ssl_init(&conn->ssl[sockindex].ssl)) {
+  if(ssl_init(&connssl->ssl)) {
     failf(data, "PolarSSL: ssl_init failed");
     return CURLE_SSL_CONNECT_ERROR;
   }
 
-  ssl_set_endpoint(&conn->ssl[sockindex].ssl, SSL_IS_CLIENT);
-  ssl_set_authmode(&conn->ssl[sockindex].ssl, SSL_VERIFY_OPTIONAL);
+  ssl_set_endpoint(&connssl->ssl, SSL_IS_CLIENT);
+  ssl_set_authmode(&connssl->ssl, SSL_VERIFY_OPTIONAL);
 
-  ssl_set_rng(&conn->ssl[sockindex].ssl, havege_rand,
-              &conn->ssl[sockindex].hs);
-  ssl_set_bio(&conn->ssl[sockindex].ssl,
+#if POLARSSL_VERSION_NUMBER<0x01010000
+  ssl_set_rng(&connssl->ssl, havege_rand,
+              &connssl->hs);
+#else
+  ssl_set_rng(&connssl->ssl, ctr_drbg_random,
+              &connssl->ctr_drbg);
+#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
+  ssl_set_bio(&connssl->ssl,
               net_recv, &conn->sock[sockindex],
               net_send, &conn->sock[sockindex]);
 
-  ssl_set_ciphers(&conn->ssl[sockindex].ssl, ssl_default_ciphers);
 
+#if POLARSSL_VERSION_NUMBER<0x01000000
+  ssl_set_ciphers(&connssl->ssl, ssl_default_ciphers);
+#else
+  ssl_set_ciphersuites(&connssl->ssl, ssl_default_ciphersuites);
+#endif
   if(!Curl_ssl_getsessionid(conn, &old_session, &old_session_size)) {
-    memcpy(&conn->ssl[sockindex].ssn, old_session, old_session_size);
+    memcpy(&connssl->ssn, old_session, old_session_size);
     infof(data, "PolarSSL re-using session\n");
   }
 
-  ssl_set_session(&conn->ssl[sockindex].ssl, 1, 600,
-                  &conn->ssl[sockindex].ssn);
+/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's
+   1.1.4 version and the like */
+#if POLARSSL_VERSION_NUMBER<0x01020000
+  ssl_set_session(&connssl->ssl, 1, 600,
+                  &connssl->ssn);
+#else
+  ssl_set_session(&connssl->ssl,
+                  &connssl->ssn);
+#endif
 
-  ssl_set_ca_chain(&conn->ssl[sockindex].ssl,
-                   &conn->ssl[sockindex].cacert,
-                   &conn->ssl[sockindex].crl,
+  ssl_set_ca_chain(&connssl->ssl,
+                   &connssl->cacert,
+                   &connssl->crl,
                    conn->host.name);
 
-  ssl_set_own_cert(&conn->ssl[sockindex].ssl,
-                   &conn->ssl[sockindex].clicert, &conn->ssl[sockindex].rsa);
+  ssl_set_own_cert(&connssl->ssl,
+                   &connssl->clicert, &connssl->rsa);
 
   if(!Curl_inet_pton(AF_INET, conn->host.name, &addr) &&
 #ifdef ENABLE_IPV6
      !Curl_inet_pton(AF_INET6, conn->host.name, &addr) &&
 #endif
-     sni && ssl_set_hostname(&conn->ssl[sockindex].ssl, conn->host.name)) {
+     sni && ssl_set_hostname(&connssl->ssl, conn->host.name)) {
      infof(data, "WARNING: failed to configure "
                  "server name indication (SNI) TLS extension\n");
   }
 
-  infof(data, "PolarSSL: performing SSL/TLS handshake...\n");
-
 #ifdef POLARSSL_DEBUG
-  ssl_set_dbg(&conn->ssl[sockindex].ssl, polarssl_debug, data);
+  ssl_set_dbg(&connssl->ssl, polarssl_debug, data);
 #endif
 
+  connssl->connecting_state = ssl_connect_2;
+
+  return CURLE_OK;
+}
+
+static CURLcode
+polarssl_connect_step2(struct connectdata *conn,
+                     int sockindex)
+{
+  int ret;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data* connssl = &conn->ssl[sockindex];
+  char buffer[1024];
+
+  char errorbuf[128];
+  memset(errorbuf, 0, sizeof(errorbuf));
+
+  conn->recv[sockindex] = polarssl_recv;
+  conn->send[sockindex] = polarssl_send;
+
   for(;;) {
-    if (!(ret = ssl_handshake(&conn->ssl[sockindex].ssl))) {
+    if(!(ret = ssl_handshake(&connssl->ssl)))
       break;
-    } else if(ret != POLARSSL_ERR_NET_TRY_AGAIN) {
-      failf(data, "ssl_handshake returned -0x%04X", -ret);
-      return CURLE_SSL_CONNECT_ERROR;
-    } else {
-      /* wait for data from server... */
-      long timeout_ms = Curl_timeleft(conn, NULL, TRUE);
-
-      if(timeout_ms < 0) {
-        failf(data, "SSL connection timeout");
-        return CURLE_OPERATION_TIMEDOUT;
+    else if(ret != POLARSSL_ERR_NET_WANT_READ &&
+            ret != POLARSSL_ERR_NET_WANT_WRITE) {
+#ifdef POLARSSL_ERROR_C
+     error_strerror(ret, errorbuf, sizeof(errorbuf));
+#endif /* POLARSSL_ERROR_C */
+     failf(data, "ssl_handshake returned - PolarSSL: (-0x%04X) %s",
+                                                    -ret, errorbuf);
+
+     return CURLE_SSL_CONNECT_ERROR;
+    }
+    else {
+      if(ret == POLARSSL_ERR_NET_WANT_READ) {
+        connssl->connecting_state = ssl_connect_2_reading;
+        return CURLE_OK;
       }
-
-      switch(Curl_socket_ready(conn->sock[sockindex],
-                        CURL_SOCKET_BAD, timeout_ms)) {
-      case 0:
-        failf(data, "SSL handshake timeout");
-        return CURLE_OPERATION_TIMEDOUT;
-        break;
-      case CURL_CSELECT_IN:
-        continue;
-        break;
-      default:
-        return CURLE_SSL_CONNECT_ERROR;
-        break;
+      if(ret == POLARSSL_ERR_NET_WANT_WRITE) {
+        connssl->connecting_state = ssl_connect_2_writing;
+        return CURLE_OK;
       }
+      failf(data, "SSL_connect failed with error %d.", ret);
+      return CURLE_SSL_CONNECT_ERROR;
+
     }
   }
 
   infof(data, "PolarSSL: Handshake complete, cipher is %s\n",
-        ssl_get_cipher(&conn->ssl[sockindex].ssl));
+#if POLARSSL_VERSION_NUMBER<0x01000000
+        ssl_get_cipher(&conn->ssl[sockindex].ssl)
+#elif POLARSSL_VERSION_NUMBER >= 0x01010000
+        ssl_get_ciphersuite(&conn->ssl[sockindex].ssl)
+#else
+        ssl_get_ciphersuite_name(&conn->ssl[sockindex].ssl)
+#endif
+    );
 
   ret = ssl_get_verify_result(&conn->ssl[sockindex].ssl);
 
   if(ret && data->set.ssl.verifypeer) {
     if(ret & BADCERT_EXPIRED)
-      failf(data, "Cert verify failed: BADCERT_EXPIRED\n");
+      failf(data, "Cert verify failed: BADCERT_EXPIRED");
 
-    if(ret & BADCERT_REVOKED)
+    if(ret & BADCERT_REVOKED) {
       failf(data, "Cert verify failed: BADCERT_REVOKED");
+      return CURLE_SSL_CACERT;
+    }
 
     if(ret & BADCERT_CN_MISMATCH)
       failf(data, "Cert verify failed: BADCERT_CN_MISMATCH");
@@ -270,38 +402,81 @@ Curl_polarssl_connect(struct connectdata *conn,
     if(ret & BADCERT_NOT_TRUSTED)
       failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED");
 
-    return CURLE_SSL_CACERT;
+    return CURLE_PEER_FAILED_VERIFICATION;
   }
 
+/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's
+   1.1.4 version and the like */
+#if POLARSSL_VERSION_NUMBER<0x01020000
   if(conn->ssl[sockindex].ssl.peer_cert) {
+#else
+  if(ssl_get_peer_cert(&(connssl->ssl))) {
+#endif
     /* If the session was resumed, there will be no peer certs */
     memset(buffer, 0, sizeof(buffer));
 
+/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's
+   1.1.4 version and the like */
+#if POLARSSL_VERSION_NUMBER<0x01020000
     if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ",
                            conn->ssl[sockindex].ssl.peer_cert) != -1)
+#else
+    if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ",
+                           ssl_get_peer_cert(&(connssl->ssl))) != -1)
+#endif
       infof(data, "Dumping cert info:\n%s\n", buffer);
   }
 
-  conn->ssl[sockindex].state = ssl_connection_complete;
-  conn->recv[sockindex] = polarssl_recv;
-  conn->send[sockindex] = polarssl_send;
+  connssl->connecting_state = ssl_connect_3;
+  infof(data, "SSL connected\n");
+
+  return CURLE_OK;
+}
+
+static CURLcode
+polarssl_connect_step3(struct connectdata *conn,
+                     int sockindex)
+{
+  CURLcode retcode = CURLE_OK;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  struct SessionHandle *data = conn->data;
+  void *old_ssl_sessionid = NULL;
+  ssl_session *our_ssl_sessionid = &conn->ssl[sockindex].ssn ;
+  int incache;
+
+  DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
 
   /* Save the current session data for possible re-use */
-  {
-    void *new_session = malloc(sizeof(conn->ssl[sockindex].ssn));
+  incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
+  if(incache) {
+    if(old_ssl_sessionid != our_ssl_sessionid) {
+      infof(data, "old SSL session ID is stale, removing\n");
+      Curl_ssl_delsessionid(conn, old_ssl_sessionid);
+      incache = FALSE;
+    }
+  }
+  if(!incache) {
+    void *new_session = malloc(sizeof(ssl_session));
 
     if(new_session) {
-      memcpy(new_session, &conn->ssl[sockindex].ssn,
-             sizeof(conn->ssl[sockindex].ssn));
+      memcpy(new_session, our_ssl_sessionid,
+             sizeof(ssl_session));
 
-      if(old_session)
-        Curl_ssl_delsessionid(conn, old_session);
+      retcode = Curl_ssl_addsessionid(conn, new_session,
+                                   sizeof(ssl_session));
+    }
+    else {
+      retcode = CURLE_OUT_OF_MEMORY;
+    }
 
-      return Curl_ssl_addsessionid(conn, new_session,
-                                   sizeof(conn->ssl[sockindex].ssn));
+    if(retcode) {
+      failf(data, "failed to store ssl session");
+      return retcode;
     }
   }
 
+  connssl->connecting_state = ssl_connect_done;
+
   return CURLE_OK;
 }
 
@@ -317,7 +492,7 @@ static ssize_t polarssl_send(struct connectdata *conn,
                   (unsigned char *)mem, len);
 
   if(ret < 0) {
-    *curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
+    *curlcode = (ret == POLARSSL_ERR_NET_WANT_WRITE) ?
       CURLE_AGAIN : CURLE_SEND_ERROR;
     ret = -1;
   }
@@ -352,7 +527,10 @@ static ssize_t polarssl_recv(struct connectdata *conn,
   ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize);
 
   if(ret <= 0) {
-    *curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
+    if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY)
+      return 0;
+
+    *curlcode = (ret == POLARSSL_ERR_NET_WANT_READ) ?
       CURLE_AGAIN : CURLE_RECV_ERROR;
     return -1;
   }
@@ -369,7 +547,160 @@ void Curl_polarssl_session_free(void *ptr)
 
 size_t Curl_polarssl_version(char *buffer, size_t size)
 {
-  return snprintf(buffer, size, "PolarSSL");
+  unsigned int version = version_get_number();
+  return snprintf(buffer, size, "PolarSSL/%d.%d.%d", version>>24,
+                  (version>>16)&0xff, (version>>8)&0xff);
 }
 
-#endif
+static CURLcode
+polarssl_connect_common(struct connectdata *conn,
+                        int sockindex,
+                        bool nonblocking,
+                        bool *done)
+{
+  CURLcode retcode;
+  struct SessionHandle *data = conn->data;
+  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  curl_socket_t sockfd = conn->sock[sockindex];
+  long timeout_ms;
+  int what;
+
+  /* check if the connection has already been established */
+  if(ssl_connection_complete == connssl->state) {
+    *done = TRUE;
+    return CURLE_OK;
+  }
+
+  if(ssl_connect_1==connssl->connecting_state) {
+    /* Find out how much more time we're allowed */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+    retcode = polarssl_connect_step1(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  while(ssl_connect_2 == connssl->connecting_state ||
+        ssl_connect_2_reading == connssl->connecting_state ||
+        ssl_connect_2_writing == connssl->connecting_state) {
+
+    /* check allowed time left */
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
+
+    if(timeout_ms < 0) {
+      /* no need to continue if time already is up */
+      failf(data, "SSL connection timeout");
+      return CURLE_OPERATION_TIMEDOUT;
+    }
+
+    /* if ssl is expecting something, check if it's available. */
+    if(connssl->connecting_state == ssl_connect_2_reading
+       || connssl->connecting_state == ssl_connect_2_writing) {
+
+      curl_socket_t writefd = ssl_connect_2_writing==
+        connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+      curl_socket_t readfd = ssl_connect_2_reading==
+        connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
+
+      what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
+      if(what < 0) {
+        /* fatal error */
+        failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
+        return CURLE_SSL_CONNECT_ERROR;
+      }
+      else if(0 == what) {
+        if(nonblocking) {
+          *done = FALSE;
+          return CURLE_OK;
+        }
+        else {
+          /* timeout */
+          failf(data, "SSL connection timeout");
+          return CURLE_OPERATION_TIMEDOUT;
+        }
+      }
+      /* socket is readable or writable */
+    }
+
+    /* Run transaction, and return to the caller if it failed or if
+     * this connection is part of a multi handle and this loop would
+     * execute again. This permits the owner of a multi handle to
+     * abort a connection attempt before step2 has completed while
+     * ensuring that a client using select() or epoll() will always
+     * have a valid fdset to wait on.
+     */
+    retcode = polarssl_connect_step2(conn, sockindex);
+    if(retcode || (nonblocking &&
+                   (ssl_connect_2 == connssl->connecting_state ||
+                    ssl_connect_2_reading == connssl->connecting_state ||
+                    ssl_connect_2_writing == connssl->connecting_state)))
+      return retcode;
+
+  } /* repeat step2 until all transactions are done. */
+
+  if(ssl_connect_3==connssl->connecting_state) {
+    retcode = polarssl_connect_step3(conn, sockindex);
+    if(retcode)
+      return retcode;
+  }
+
+  if(ssl_connect_done==connssl->connecting_state) {
+    connssl->state = ssl_connection_complete;
+    conn->recv[sockindex] = polarssl_recv;
+    conn->send[sockindex] = polarssl_send;
+    *done = TRUE;
+  }
+  else
+    *done = FALSE;
+
+  /* Reset our connect state machine */
+  connssl->connecting_state = ssl_connect_1;
+
+  return CURLE_OK;
+}
+
+CURLcode
+Curl_polarssl_connect_nonblocking(struct connectdata *conn,
+                                int sockindex,
+                                bool *done)
+{
+  return polarssl_connect_common(conn, sockindex, TRUE, done);
+}
+
+
+CURLcode
+Curl_polarssl_connect(struct connectdata *conn,
+                    int sockindex)
+{
+  CURLcode retcode;
+  bool done = FALSE;
+
+  retcode = polarssl_connect_common(conn, sockindex, FALSE, &done);
+  if(retcode)
+    return retcode;
+
+  DEBUGASSERT(done);
+
+  return CURLE_OK;
+}
+
+/*
+ * return 0 error initializing SSL
+ * return 1 SSL initialized successfully
+ */
+int polarssl_init(void)
+{
+  return polarsslthreadlock_thread_setup();
+}
+
+void polarssl_cleanup(void)
+{
+  (void)polarsslthreadlock_thread_cleanup();
+}
+
+#endif /* USE_POLARSSL */
index 964af17..af3b28b 100644 (file)
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  * KIND, either express or implied.
  *
- * $Id: polarssl.h,v 1.10 2009-02-12 20:48:43 danf Exp $
  ***************************************************************************/
+#include "curl_setup.h"
 
 #ifdef USE_POLARSSL
 
+/* Called on first use PolarSSL, setup threading if supported */
+int  polarssl_init(void);
+void polarssl_cleanup(void);
+
+
 CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);
 
+CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn,
+                                           int sockindex,
+                                           bool *done);
+
 /* tell PolarSSL to close down all open information regarding connections (and
    thus session ID caching etc) */
 void Curl_polarssl_close_all(struct SessionHandle *data);
@@ -39,15 +48,16 @@ size_t Curl_polarssl_version(char *buffer, size_t size);
 int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
 
 /* API setup for PolarSSL */
-#define curlssl_init() (1)
-#define curlssl_cleanup()
+#define curlssl_init() polarssl_init()
+#define curlssl_cleanup() polarssl_cleanup()
 #define curlssl_connect Curl_polarssl_connect
+#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking
 #define curlssl_session_free(x)  Curl_polarssl_session_free(x)
 #define curlssl_close_all Curl_polarssl_close_all
 #define curlssl_close Curl_polarssl_close
 #define curlssl_shutdown(x,y) 0
-#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_FAILED_INIT)
-#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
+#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
+#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
 #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
 #define curlssl_version Curl_polarssl_version
 #define curlssl_check_cxn(x) (x=x, -1)
diff --git a/lib/polarssl_threadlock.c b/lib/polarssl_threadlock.c
new file mode 100644 (file)
index 0000000..ad18715
--- /dev/null
@@ -0,0 +1,156 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2013, 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_setup.h"
+
+#if defined(USE_POLARSSL) && \
+    (defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32))
+
+#if defined(USE_THREADS_POSIX)
+#  ifdef HAVE_PTHREAD_H
+#    include <pthread.h>
+#  endif
+#elif defined(USE_THREADS_WIN32)
+#  ifdef HAVE_PROCESS_H
+#    include <process.h>
+#  endif
+#endif
+
+#include "polarssl_threadlock.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+/* number of thread locks */
+#define NUMT                    2
+
+/* This array will store all of the mutexes available to PolarSSL. */
+static POLARSSL_MUTEX_T *mutex_buf = NULL;
+
+int polarsslthreadlock_thread_setup(void)
+{
+  int i;
+  int ret;
+
+  mutex_buf = malloc(NUMT * sizeof(POLARSSL_MUTEX_T));
+  if(!mutex_buf)
+    return 0;     /* error, no number of threads defined */
+
+#ifdef HAVE_PTHREAD_H
+  for(i = 0;  i < NUMT;  i++) {
+    ret = pthread_mutex_init(&mutex_buf[i], NULL);
+    if(ret)
+      return 0; /* pthread_mutex_init failed */
+  }
+#elif defined(HAVE_PROCESS_H)
+  for(i = 0;  i < NUMT;  i++) {
+    mutex_buf[i] = CreateMutex(0, FALSE, 0);
+    if(mutex_buf[i] == 0)
+      return 0;  /* CreateMutex failed */
+  }
+#endif /* HAVE_PTHREAD_H */
+
+  return 1; /* OK */
+}
+
+int polarsslthreadlock_thread_cleanup(void)
+{
+  int i;
+  int ret;
+
+  if(!mutex_buf)
+    return 0; /* error, no threads locks defined */
+
+#ifdef HAVE_PTHREAD_H
+  for(i = 0; i < NUMT; i++) {
+    ret = pthread_mutex_destroy(&mutex_buf[i]);
+    if(ret)
+      return 0; /* pthread_mutex_destroy failed */
+  }
+#elif defined(HAVE_PROCESS_H)
+  for(i = 0; i < NUMT; i++) {
+    ret = CloseHandle(mutex_buf[i]);
+    if(!ret)
+      return 0; /* CloseHandle failed */
+  }
+#endif /* HAVE_PTHREAD_H */
+  free(mutex_buf);
+  mutex_buf = NULL;
+
+  return 1; /* OK */
+}
+
+int polarsslthreadlock_lock_function(int n)
+{
+  int ret;
+#ifdef HAVE_PTHREAD_H
+  if(n < NUMT) {
+    ret = pthread_mutex_lock(&mutex_buf[n]);
+    if(ret) {
+      DEBUGF(fprintf(stderr,
+                     "Error: polarsslthreadlock_lock_function failed\n"));
+      return 0; /* pthread_mutex_lock failed */
+    }
+  }
+#elif defined(HAVE_PROCESS_H)
+  if(n < NUMT) {
+    ret = (WaitForSingleObject(mutex_buf[n], INFINITE)==WAIT_FAILED?1:0);
+    if(ret) {
+      DEBUGF(fprintf(stderr,
+                     "Error: polarsslthreadlock_lock_function failed\n"));
+      return 0; /* pthread_mutex_lock failed */
+    }
+  }
+#endif /* HAVE_PTHREAD_H */
+  return 1; /* OK */
+}
+
+int polarsslthreadlock_unlock_function(int n)
+{
+  int ret;
+#ifdef HAVE_PTHREAD_H
+  if(n < NUMT) {
+    ret = pthread_mutex_unlock(&mutex_buf[n]);
+    if(ret) {
+      DEBUGF(fprintf(stderr,
+                     "Error: polarsslthreadlock_unlock_function failed\n"));
+      return 0; /* pthread_mutex_unlock failed */
+    }
+  }
+#elif defined(HAVE_PROCESS_H)
+  if(n < NUMT) {
+    ret = ReleaseMutex(mutex_buf[n]);
+    if(!ret) {
+      DEBUGF(fprintf(stderr,
+                     "Error: polarsslthreadlock_unlock_function failed\n"));
+      return 0; /* pthread_mutex_lock failed */
+    }
+  }
+#endif /* HAVE_PTHREAD_H */
+  return 1; /* OK */
+}
+
+#endif /* USE_POLARSSL */
diff --git a/lib/polarssl_threadlock.h b/lib/polarssl_threadlock.h
new file mode 100644 (file)
index 0000000..b67b3f9
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef HEADER_CURL_POLARSSL_THREADLOCK_H
+#define HEADER_CURL_POLARSSL_THREADLOCK_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
+ * Copyright (C) 2013, 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_setup.h"
+
+#ifdef USE_POLARSSL
+
+#if defined(USE_THREADS_POSIX)
+#  define POLARSSL_MUTEX_T       pthread_mutex_t
+#elif defined(USE_THREADS_WIN32)
+#  define POLARSSL_MUTEX_T       HANDLE
+#endif
+
+#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+
+int polarsslthreadlock_thread_setup(void);
+int polarsslthreadlock_thread_cleanup(void);
+int polarsslthreadlock_lock_function(int n);
+int polarsslthreadlock_unlock_function(int n);
+
+#else
+
+#define polarsslthreadlock_thread_setup() 1
+#define polarsslthreadlock_thread_cleanup() 1
+#define polarsslthreadlock_lock_function(x) 1
+#define polarsslthreadlock_unlock_function(x) 1
+
+#endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */
+
+#endif /* USE_POLARSSL */
+
+#endif /* HEADER_CURL_POLARSSL_THREADLOCK_H */
index 9f67443..876987f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  * KIND, either express or implied.
  *
+ * RFC1734 POP3 Authentication
  * RFC1939 POP3 protocol
+ * RFC2195 CRAM-MD5 authentication
  * RFC2384 POP URL Scheme
+ * RFC2449 POP3 Extension Mechanism
  * RFC2595 Using TLS with IMAP, POP3 and ACAP
+ * RFC2831 DIGEST-MD5 authentication
+ * RFC4422 Simple Authentication and Security Layer (SASL)
+ * RFC4616 PLAIN authentication
+ * RFC5034 POP3 SASL Authentication Mechanism
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_POP3
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -65,8 +60,6 @@
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
 #include "if2ip.h"
 #include "hostip.h"
 #include "progress.h"
@@ -85,7 +78,9 @@
 #include "multiif.h"
 #include "url.h"
 #include "rawstr.h"
-#include "strtoofft.h"
+#include "curl_sasl.h"
+#include "curl_md5.h"
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #include "memdebug.h"
 
 /* Local API functions */
-static CURLcode pop3_parse_url_path(struct connectdata *conn);
 static CURLcode pop3_regular_transfer(struct connectdata *conn, bool *done);
 static CURLcode pop3_do(struct connectdata *conn, bool *done);
-static CURLcode pop3_done(struct connectdata *conn,
-                          CURLcode, bool premature);
+static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
+                          bool premature);
 static CURLcode pop3_connect(struct connectdata *conn, bool *done);
-static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode pop3_disconnect(struct connectdata *conn, bool dead);
 static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done);
-static int pop3_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
+static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
                         int numsocks);
-static CURLcode pop3_doing(struct connectdata *conn,
-                           bool *dophase_done);
-static CURLcode pop3_setup_connection(struct connectdata * conn);
+static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode pop3_setup_connection(struct connectdata *conn);
+static CURLcode pop3_parse_url_options(struct connectdata *conn);
+static CURLcode pop3_parse_url_path(struct connectdata *conn);
+static CURLcode pop3_parse_custom_request(struct connectdata *conn);
 
 /*
  * POP3 protocol handler.
@@ -125,13 +120,15 @@ const struct Curl_handler Curl_handler_pop3 = {
   pop3_doing,                       /* doing */
   pop3_getsock,                     /* proto_getsock */
   pop3_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   pop3_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_POP3,                        /* defport */
-  PROT_POP3                         /* protocol */
+  CURLPROTO_POP3,                   /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * POP3S protocol handler.
@@ -148,10 +145,14 @@ const struct Curl_handler Curl_handler_pop3s = {
   pop3_doing,                       /* doing */
   pop3_getsock,                     /* proto_getsock */
   pop3_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   pop3_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_POP3S,                       /* defport */
-  PROT_POP3 | PROT_POP3S | PROT_SSL  /* protocol */
+  CURLPROTO_POP3 | CURLPROTO_POP3S, /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_SSL
+  | PROTOPT_NOURLQUERY              /* flags */
 };
 #endif
 
@@ -171,13 +172,15 @@ static const struct Curl_handler Curl_handler_pop3_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_POP3,                            /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * HTTP-proxyed POP3S protocol handler.
@@ -194,320 +197,1157 @@ static const struct Curl_handler Curl_handler_pop3s_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_POP3S,                           /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 #endif
 #endif
 
+#ifdef USE_SSL
+static void pop3_to_pop3s(struct connectdata *conn)
+{
+  conn->handler = &Curl_handler_pop3s;
+}
+#else
+#define pop3_to_pop3s(x) Curl_nop_stmt
+#endif
 
-/* function that checks for a pop3 status code at the start of the given
-   string */
-static int pop3_endofresp(struct pingpong *pp,
-                          int *resp)
+/***********************************************************************
+ *
+ * pop3_endofresp()
+ *
+ * Checks for an ending POP3 status code at the start of the given string, but
+ * also detects the APOP timestamp from the server greeting and various
+ * capabilities from the CAPA response including the supported authentication
+ * types and allowed SASL mechanisms.
+ */
+static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len,
+                           int *resp)
 {
-  char *line = pp->linestart_resp;
-  size_t len = pp->nread_resp;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  size_t wordlen;
+  size_t i;
+
+  /* Do we have an error response? */
+  if(len >= 4 && !memcmp("-ERR", line, 4)) {
+    *resp = '-';
 
-  if( ((len >= 3) && !memcmp("+OK", line, 3)) ||
-      ((len >= 4) && !memcmp("-ERR", line, 4)) ) {
-    *resp=line[1]; /* O or E */
     return TRUE;
   }
 
-  return FALSE; /* nothing for us */
+  /* Are we processing servergreet responses? */
+  if(pop3c->state == POP3_SERVERGREET) {
+    /* Look for the APOP timestamp */
+    if(len >= 3 && line[len - 3] == '>') {
+      for(i = 0; i < len - 3; ++i) {
+        if(line[i] == '<') {
+          /* Calculate the length of the timestamp */
+          size_t timestamplen = len - 2 - i;
+
+          /* Allocate some memory for the timestamp */
+          pop3c->apoptimestamp = (char *)calloc(1, timestamplen + 1);
+
+          if(!pop3c->apoptimestamp)
+            break;
+
+          /* Copy the timestamp */
+          memcpy(pop3c->apoptimestamp, line + i, timestamplen);
+          pop3c->apoptimestamp[timestamplen] = '\0';
+          break;
+        }
+      }
+    }
+  }
+  /* Are we processing CAPA command responses? */
+  else if(pop3c->state == POP3_CAPA) {
+    /* Do we have the terminating line? */
+    if(len >= 1 && !memcmp(line, ".", 1)) {
+      *resp = '+';
+
+      return TRUE;
+    }
+
+    /* Does the server support the STLS capability? */
+    if(len >= 4 && !memcmp(line, "STLS", 4))
+      pop3c->tls_supported = TRUE;
+
+    /* Does the server support clear text authentication? */
+    else if(len >= 4 && !memcmp(line, "USER", 4))
+      pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
+
+    /* Does the server support APOP authentication? */
+    else if(len >= 4 && !memcmp(line, "APOP", 4))
+      pop3c->authtypes |= POP3_TYPE_APOP;
+
+    /* Does the server support SASL based authentication? */
+    else if(len >= 5 && !memcmp(line, "SASL ", 5)) {
+      pop3c->authtypes |= POP3_TYPE_SASL;
+
+      /* Advance past the SASL keyword */
+      line += 5;
+      len -= 5;
+
+      /* Loop through the data line */
+      for(;;) {
+        while(len &&
+              (*line == ' ' || *line == '\t' ||
+               *line == '\r' || *line == '\n')) {
+
+          line++;
+          len--;
+        }
+
+        if(!len)
+          break;
+
+        /* Extract the word */
+        for(wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
+              line[wordlen] != '\t' && line[wordlen] != '\r' &&
+              line[wordlen] != '\n';)
+          wordlen++;
+
+        /* Test the word for a matching authentication mechanism */
+        if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
+          pop3c->authmechs |= SASL_MECH_LOGIN;
+        else if(wordlen == 5 && !memcmp(line, "PLAIN", 5))
+          pop3c->authmechs |= SASL_MECH_PLAIN;
+        else if(wordlen == 8 && !memcmp(line, "CRAM-MD5", 8))
+          pop3c->authmechs |= SASL_MECH_CRAM_MD5;
+        else if(wordlen == 10 && !memcmp(line, "DIGEST-MD5", 10))
+          pop3c->authmechs |= SASL_MECH_DIGEST_MD5;
+        else if(wordlen == 6 && !memcmp(line, "GSSAPI", 6))
+          pop3c->authmechs |= SASL_MECH_GSSAPI;
+        else if(wordlen == 8 && !memcmp(line, "EXTERNAL", 8))
+          pop3c->authmechs |= SASL_MECH_EXTERNAL;
+        else if(wordlen == 4 && !memcmp(line, "NTLM", 4))
+          pop3c->authmechs |= SASL_MECH_NTLM;
+
+        line += wordlen;
+        len -= wordlen;
+      }
+    }
+
+    return FALSE;
+  }
+
+  /* Do we have a command or continuation response? */
+  if((len >= 3 && !memcmp("+OK", line, 3)) ||
+     (len >= 1 && !memcmp("+", line, 1))) {
+    *resp = '+';
+
+    return TRUE;
+  }
+
+  return FALSE; /* Nothing for us */
 }
 
-/* This is the ONLY way to change POP3 state! */
-static void state(struct connectdata *conn,
-                  pop3state newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change POP3 state!
+ */
+static void state(struct connectdata *conn, pop3state newstate)
 {
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
-  static const char * const names[]={
+  static const char * const names[] = {
     "STOP",
     "SERVERGREET",
+    "CAPA",
+    "STARTTLS",
+    "UPGRADETLS",
+    "AUTH_PLAIN",
+    "AUTH_LOGIN",
+    "AUTH_LOGIN_PASSWD",
+    "AUTH_CRAMMD5",
+    "AUTH_DIGESTMD5",
+    "AUTH_DIGESTMD5_RESP",
+    "AUTH_NTLM",
+    "AUTH_NTLM_TYPE2MSG",
+    "AUTH_FINAL",
+    "APOP",
     "USER",
     "PASS",
-    "STARTTLS",
-    "LIST",
-    "RETR",
+    "COMMAND",
     "QUIT",
     /* LAST */
   };
-#endif
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+
   if(pop3c->state != newstate)
     infof(conn->data, "POP3 %p state change from %s to %s\n",
-          pop3c, names[pop3c->state], names[newstate]);
+          (void *)pop3c, names[pop3c->state], names[newstate]);
 #endif
+
   pop3c->state = newstate;
 }
 
-static CURLcode pop3_state_user(struct connectdata *conn)
+/***********************************************************************
+ *
+ * pop3_perform_capa()
+ *
+ * Sends the CAPA command in order to obtain a list of server side supported
+ * capabilities.
+ */
+static CURLcode pop3_perform_capa(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+  pop3c->authmechs = 0;         /* No known authentication mechanisms yet */
+  pop3c->authused = 0;          /* Clear the authentication mechanism used */
+  pop3c->tls_supported = FALSE; /* Clear the TLS capability */
+
+  /* Send the CAPA command */
+  result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA");
+
+  if(!result)
+    state(conn, POP3_CAPA);
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_starttls()
+ *
+ * Sends the STLS command to start the upgrade to TLS.
+ */
+static CURLcode pop3_perform_starttls(struct connectdata *conn)
 {
-  CURLcode result;
-  struct FTP *pop3 = conn->data->state.proto.pop3;
+  CURLcode result = CURLE_OK;
+
+  /* Send the STLS command */
+  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS");
+
+  if(!result)
+    state(conn, POP3_STARTTLS);
 
-  /* send USER */
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode pop3_perform_upgrade_tls(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+  /* Start the SSL connection */
+  result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
+
+  if(!result) {
+    if(pop3c->state != POP3_UPGRADETLS)
+      state(conn, POP3_UPGRADETLS);
+
+    if(pop3c->ssldone) {
+      pop3_to_pop3s(conn);
+      result = pop3_perform_capa(conn);
+    }
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_user()
+ *
+ * Sends a clear text USER command to authenticate with.
+ */
+static CURLcode pop3_perform_user(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
+    state(conn, POP3_STOP);
+
+    return result;
+  }
+
+  /* Send the USER command */
   result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
-                         pop3->user?pop3->user:"");
-  if(result)
+                         conn->user ? conn->user : "");
+  if(!result)
+    state(conn, POP3_USER);
+
+  return result;
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/***********************************************************************
+ *
+ * pop3_perform_apop()
+ *
+ * Sends an APOP command to authenticate with.
+ */
+static CURLcode pop3_perform_apop(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  size_t i;
+  MD5_context *ctxt;
+  unsigned char digest[MD5_DIGEST_LEN];
+  char secret[2 * MD5_DIGEST_LEN + 1];
+
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
+    state(conn, POP3_STOP);
+
     return result;
+  }
 
-  state(conn, POP3_USER);
+  /* Create the digest */
+  ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+  if(!ctxt)
+    return CURLE_OUT_OF_MEMORY;
 
-  return CURLE_OK;
+  Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp,
+                  curlx_uztoui(strlen(pop3c->apoptimestamp)));
+
+  Curl_MD5_update(ctxt, (const unsigned char *) conn->passwd,
+                  curlx_uztoui(strlen(conn->passwd)));
+
+  /* Finalise the digest */
+  Curl_MD5_final(ctxt, digest);
+
+  /* Convert the calculated 16 octet digest into a 32 byte hex string */
+  for(i = 0; i < MD5_DIGEST_LEN; i++)
+    snprintf(&secret[2 * i], 3, "%02x", digest[i]);
+
+  result = Curl_pp_sendf(&pop3c->pp, "APOP %s %s", conn->user, secret);
+
+  if(!result)
+    state(conn, POP3_APOP);
+
+  return result;
 }
+#endif
 
-/* For the POP3 "protocol connect" and "doing" phases only */
-static int pop3_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
-                        int numsocks)
+/***********************************************************************
+ *
+ * pop3_perform_authenticate()
+ *
+ * Sends an AUTH command allowing the client to login with the appropriate
+ * SASL authentication mechanism.
+ *
+ * Additionally, the function will perform fallback to APOP and USER commands
+ * should a common mechanism not be available between the client and server.
+ */
+static CURLcode pop3_perform_authenticate(struct connectdata *conn)
 {
-  return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks);
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  const char *mech = NULL;
+  char *initresp = NULL;
+  size_t len = 0;
+  pop3state state1 = POP3_STOP;
+  pop3state state2 = POP3_STOP;
+
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
+    state(conn, POP3_STOP);
+
+    return result;
+  }
+
+  /* Calculate the supported authentication mechanism by decreasing order of
+     security */
+  if(pop3c->authtypes & POP3_TYPE_SASL) {
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+    if((pop3c->authmechs & SASL_MECH_DIGEST_MD5) &&
+       (pop3c->prefmech & SASL_MECH_DIGEST_MD5)) {
+      mech = "DIGEST-MD5";
+      state1 = POP3_AUTH_DIGESTMD5;
+      pop3c->authused = SASL_MECH_DIGEST_MD5;
+    }
+    else if((pop3c->authmechs & SASL_MECH_CRAM_MD5) &&
+            (pop3c->prefmech & SASL_MECH_CRAM_MD5)) {
+      mech = "CRAM-MD5";
+      state1 = POP3_AUTH_CRAMMD5;
+      pop3c->authused = SASL_MECH_CRAM_MD5;
+    }
+    else
+#endif
+#ifdef USE_NTLM
+    if((pop3c->authmechs & SASL_MECH_NTLM) &&
+       (pop3c->prefmech & SASL_MECH_NTLM)) {
+      mech = "NTLM";
+      state1 = POP3_AUTH_NTLM;
+      state2 = POP3_AUTH_NTLM_TYPE2MSG;
+      pop3c->authused = SASL_MECH_NTLM;
+
+      if(data->set.sasl_ir)
+        result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                     &conn->ntlm,
+                                                     &initresp, &len);
+    }
+    else
+#endif
+    if((pop3c->authmechs & SASL_MECH_LOGIN) &&
+       (pop3c->prefmech & SASL_MECH_LOGIN)) {
+      mech = "LOGIN";
+      state1 = POP3_AUTH_LOGIN;
+      state2 = POP3_AUTH_LOGIN_PASSWD;
+      pop3c->authused = SASL_MECH_LOGIN;
+
+      if(data->set.sasl_ir)
+        result = Curl_sasl_create_login_message(conn->data, conn->user,
+                                                &initresp, &len);
+    }
+    else if((pop3c->authmechs & SASL_MECH_PLAIN) &&
+            (pop3c->prefmech & SASL_MECH_PLAIN)) {
+      mech = "PLAIN";
+      state1 = POP3_AUTH_PLAIN;
+      state2 = POP3_AUTH_FINAL;
+      pop3c->authused = SASL_MECH_PLAIN;
+
+      if(data->set.sasl_ir)
+        result = Curl_sasl_create_plain_message(conn->data, conn->user,
+                                                conn->passwd, &initresp,
+                                                &len);
+    }
+  }
+
+  if(!result) {
+    if(mech && (pop3c->preftype & POP3_TYPE_SASL)) {
+      /* Perform SASL based authentication */
+      if(initresp &&
+         8 + strlen(mech) + len <= 255) { /* AUTH <mech> ...<crlf> */
+        result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp);
+
+        if(!result)
+          state(conn, state2);
+      }
+      else {
+        result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech);
+
+        if(!result)
+          state(conn, state1);
+      }
+
+      Curl_safefree(initresp);
+    }
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+    else if((pop3c->authtypes & POP3_TYPE_APOP) &&
+            (pop3c->preftype & POP3_TYPE_APOP))
+      /* Perform APOP authentication */
+      result = pop3_perform_apop(conn);
+#endif
+    else if((pop3c->authtypes & POP3_TYPE_CLEARTEXT) &&
+            (pop3c->preftype & POP3_TYPE_CLEARTEXT))
+      /* Perform clear text authentication */
+      result = pop3_perform_user(conn);
+    else {
+      /* Other mechanisms not supported */
+      infof(conn->data, "No known authentication mechanisms supported!\n");
+      result = CURLE_LOGIN_DENIED;
+    }
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_command()
+ *
+ * Sends a POP3 based command.
+ */
+static CURLcode pop3_perform_command(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct POP3 *pop3 = data->state.proto.pop3;
+  const char *command = NULL;
+
+  /* Calculate the default command */
+  if(pop3->id[0] == '\0' || conn->data->set.ftp_list_only) {
+    command = "LIST";
+
+    if(pop3->id[0] != '\0')
+      /* Message specific LIST so skip the BODY transfer */
+      pop3->transfer = FTPTRANSFER_INFO;
+  }
+  else
+    command = "RETR";
+
+  /* Send the command */
+  if(pop3->id[0] != '\0')
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s %s",
+                           (pop3->custom && pop3->custom[0] != '\0' ?
+                            pop3->custom : command), pop3->id);
+  else
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s",
+                           (pop3->custom && pop3->custom[0] != '\0' ?
+                            pop3->custom : command));
+
+  if(!result)
+    state(conn, POP3_COMMAND);
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_perform_quit()
+ *
+ * Performs the quit action prior to sclose() be called.
+ */
+static CURLcode pop3_perform_quit(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+
+  /* Send the QUIT command */
+  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT");
+
+  if(!result)
+    state(conn, POP3_QUIT);
+
+  return result;
 }
 
-/* for STARTTLS responses */
+/* For the initial server greeting */
+static CURLcode pop3_state_servergreet_resp(struct connectdata *conn,
+                                            int pop3code,
+                                            pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Got unexpected pop3-server response");
+    result = CURLE_FTP_WEIRD_SERVER_REPLY;
+  }
+  else
+    result = pop3_perform_capa(conn);
+
+  return result;
+}
+
+/* For CAPA responses */
+static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code,
+                                     pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+')
+    result = pop3_perform_user(conn);
+  else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+    /* We don't have a SSL/TLS connection yet, but SSL is requested */
+    if(pop3c->tls_supported)
+      /* Switch to TLS connection now */
+      result = pop3_perform_starttls(conn);
+    else if(data->set.use_ssl == CURLUSESSL_TRY)
+      /* Fallback and carry on with authentication */
+      result = pop3_perform_authenticate(conn);
+    else {
+      failf(data, "STLS not supported.");
+      result = CURLE_USE_SSL_FAILED;
+    }
+  }
+  else
+    result = pop3_perform_authenticate(conn);
+
+  return result;
+}
+
+/* For STARTTLS responses */
 static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
                                          int pop3code,
                                          pop3state instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+
   (void)instate; /* no use for this yet */
 
-  if(pop3code != 'O') {
-    failf(data, "STARTTLS denied. %c", pop3code);
+  if(pop3code != '+') {
+    if(data->set.use_ssl != CURLUSESSL_TRY) {
+      failf(data, "STARTTLS denied. %c", pop3code);
+      result = CURLE_USE_SSL_FAILED;
+    }
+    else
+      result = pop3_perform_authenticate(conn);
+  }
+  else
+    result = pop3_perform_upgrade_tls(conn);
+
+  return result;
+}
+
+/* For AUTH PLAIN (without initial response) responses */
+static CURLcode pop3_state_auth_plain_resp(struct connectdata *conn,
+                                           int pop3code,
+                                           pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *plainauth = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied. %c", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
   else {
-    /* Curl_ssl_connect is BLOCKING */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(CURLE_OK == result) {
-      conn->protocol |= PROT_POP3S;
-      result = pop3_state_user(conn);
+    /* Create the authorisation message */
+    result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd,
+                                            &plainauth, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(plainauth) {
+        result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", plainauth);
+
+        if(!result)
+          state(conn, POP3_AUTH_FINAL);
+      }
+
+      Curl_safefree(plainauth);
     }
   }
-  state(conn, POP3_STOP);
+
   return result;
 }
 
-/* for USER responses */
-static CURLcode pop3_state_user_resp(struct connectdata *conn,
-                                     int pop3code,
-                                     pop3state instate)
+/* For AUTH LOGIN (without initial response) responses */
+static CURLcode pop3_state_auth_login_resp(struct connectdata *conn,
+                                           int pop3code,
+                                           pop3state instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *pop3 = data->state.proto.pop3;
+  size_t len = 0;
+  char *authuser = NULL;
 
   (void)instate; /* no use for this yet */
 
-  if(pop3code != 'O') {
-    failf(data, "Access denied. %c", pop3code);
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the user message */
+    result = Curl_sasl_create_login_message(data, conn->user,
+                                            &authuser, &len);
+
+    /* Send the user */
+    if(!result) {
+      if(authuser) {
+        result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authuser);
+
+        if(!result)
+          state(conn, POP3_AUTH_LOGIN_PASSWD);
+      }
+
+      Curl_safefree(authuser);
+    }
+  }
+
+  return result;
+}
+
+/* For AUTH LOGIN user entry responses */
+static CURLcode pop3_state_auth_login_password_resp(struct connectdata *conn,
+                                                    int pop3code,
+                                                    pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *authpasswd = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the password message */
+    result = Curl_sasl_create_login_message(data, conn->passwd,
+                                            &authpasswd, &len);
+
+    /* Send the password */
+    if(!result) {
+      if(authpasswd) {
+        result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authpasswd);
+
+        if(!result)
+          state(conn, POP3_AUTH_FINAL);
+      }
+
+      Curl_safefree(authpasswd);
+    }
+  }
+
+  return result;
+}
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* For AUTH CRAM-MD5 responses */
+static CURLcode pop3_state_auth_cram_resp(struct connectdata *conn,
+                                          int pop3code,
+                                          pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  /* Get the challenge */
+  for(chlg64 += 2; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+    ;
+
+  /* Terminate the challenge */
+  if(*chlg64 != '=') {
+    for(len = strlen(chlg64); len--;)
+      if(chlg64[len] != '\r' && chlg64[len] != '\n' && chlg64[len] != ' ' &&
+         chlg64[len] != '\t')
+        break;
+
+    if(++len) {
+      chlg64[len] = '\0';
+    }
+  }
+
+  /* Create the response message */
+  result = Curl_sasl_create_cram_md5_message(data, chlg64, conn->user,
+                                             conn->passwd, &rplyb64, &len);
+
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", rplyb64);
+
+      if(!result)
+        state(conn, POP3_AUTH_FINAL);
+    }
+
+    Curl_safefree(rplyb64);
+  }
+
+  return result;
+}
+
+/* For AUTH DIGEST-MD5 challenge responses */
+static CURLcode pop3_state_auth_digest_resp(struct connectdata *conn,
+                                            int pop3code,
+                                            pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    return CURLE_LOGIN_DENIED;
+  }
+
+  /* Get the challenge */
+  for(chlg64 += 2; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+    ;
+
+  /* Create the response message */
+  result = Curl_sasl_create_digest_md5_message(data, chlg64, conn->user,
+                                               conn->passwd, "pop",
+                                               &rplyb64, &len);
+
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", rplyb64);
+
+      if(!result)
+        state(conn, POP3_AUTH_DIGESTMD5_RESP);
+    }
+
+    Curl_safefree(rplyb64);
+  }
+
+  return result;
+}
+
+/* For AUTH DIGEST-MD5 challenge-response responses */
+static CURLcode pop3_state_auth_digest_resp_resp(struct connectdata *conn,
+                                                 int pop3code,
+                                                 pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Authentication failed: %d", pop3code);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Send an empty response */
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "");
+
+    if(!result)
+      state(conn, POP3_AUTH_FINAL);
+  }
+
+  return result;
+}
+#endif
+
+#ifdef USE_NTLM
+/* For AUTH NTLM (without initial response) responses */
+static CURLcode pop3_state_auth_ntlm_resp(struct connectdata *conn,
+                                          int pop3code,
+                                          pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *type1msg = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the type-1 message */
+    result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type1msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type1msg) {
+        result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type1msg);
+
+        if(!result)
+          state(conn, POP3_AUTH_NTLM_TYPE2MSG);
+      }
+
+      Curl_safefree(type1msg);
+    }
+  }
+
+  return result;
+}
+
+/* For NTLM type-2 responses (sent in reponse to our type-1 message) */
+static CURLcode pop3_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
+                                                   int pop3code,
+                                                   pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  size_t len = 0;
+  char *type3msg = NULL;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Access denied: %d", pop3code);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the type-3 message */
+    result = Curl_sasl_create_ntlm_type3_message(data,
+                                                 data->state.buffer + 2,
+                                                 conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type3msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type3msg) {
+        result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type3msg);
+
+        if(!result)
+          state(conn, POP3_AUTH_FINAL);
+      }
+
+      Curl_safefree(type3msg);
+    }
+  }
+
+  return result;
+}
+#endif
+
+/* For final responses to the AUTH sequence */
+static CURLcode pop3_state_auth_final_resp(struct connectdata *conn,
+                                           int pop3code,
+                                           pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(pop3code != '+') {
+    failf(data, "Authentication failed: %d", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
   else
-    /* send PASS */
-    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
-                           pop3->passwd?pop3->passwd:"");
-  if(result)
-    return result;
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
-  state(conn, POP3_PASS);
   return result;
 }
 
-/* for PASS responses */
-static CURLcode pop3_state_pass_resp(struct connectdata *conn,
-                                     int pop3code,
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+/* For APOP responses */
+static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+
   (void)instate; /* no use for this yet */
 
-  if(pop3code != 'O') {
-    failf(data, "Access denied. %c", pop3code);
+  if(pop3code != '+') {
+    failf(data, "Authentication failed: %d", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
+  else
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
-  state(conn, POP3_STOP);
   return result;
 }
+#endif
 
-/* for the retr response */
-static CURLcode pop3_state_retr_resp(struct connectdata *conn,
-                                     int pop3code,
+/* For USER responses */
+static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code,
                                      pop3state instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *pop3 = data->state.proto.pop3;
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-  struct pingpong *pp = &pop3c->pp;
 
   (void)instate; /* no use for this yet */
 
-  if('O' != pop3code) {
-    state(conn, POP3_STOP);
-    return CURLE_RECV_ERROR;
+  if(pop3code != '+') {
+    failf(data, "Access denied. %c", pop3code);
+    result = CURLE_LOGIN_DENIED;
   }
+  else
+    /* Send the PASS command */
+    result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
+                           conn->passwd ? conn->passwd : "");
+  if(!result)
+    state(conn, POP3_PASS);
 
-  /* POP3 download */
-  Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE,
-                      pop3->bytecountp, -1, NULL); /* no upload here */
+  return result;
+}
 
-  if(pp->cache) {
-    /* At this point there is a bunch of data in the header "cache" that is
-       actually body content, send it as body and then skip it. Do note
-       that there may even be additional "headers" after the body. */
+/* For PASS responses */
+static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code,
+                                     pop3state instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
 
-    /* we may get the EOB already here! */
-    result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
-    if(result)
-      return result;
+  (void)instate; /* no use for this yet */
 
-    /* cache is drained */
-    free(pp->cache);
-    pp->cache = NULL;
-    pp->cache_size = 0;
+  if(pop3code != '+') {
+    failf(data, "Access denied. %c", pop3code);
+    result = CURLE_LOGIN_DENIED;
   }
+  else
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
-  state(conn, POP3_STOP);
   return result;
 }
 
-
-/* for the list response */
-static CURLcode pop3_state_list_resp(struct connectdata *conn,
-                                     int pop3code,
-                                     pop3state instate)
+/* For command responses */
+static CURLcode pop3_state_command_resp(struct connectdata *conn,
+                                        int pop3code,
+                                        pop3state instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *pop3 = data->state.proto.pop3;
+  struct POP3 *pop3 = data->state.proto.pop3;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   struct pingpong *pp = &pop3c->pp;
 
   (void)instate; /* no use for this yet */
 
-  if('O' != pop3code) {
+  if(pop3code != '+') {
     state(conn, POP3_STOP);
     return CURLE_RECV_ERROR;
   }
 
-  /* POP3 download */
-  Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, pop3->bytecountp,
-                      -1, NULL); /* no upload here */
-
-  if(pp->cache) {
-    /* cache holds the email ID listing */
+  /* This 'OK' line ends with a CR LF pair which is the two first bytes of the
+     EOB string so count this is two matching bytes. This is necessary to make
+     the code detect the EOB if the only data than comes now is %2e CR LF like
+     when there is no body to return. */
+  pop3c->eob = 2;
+
+  /* But since this initial CR LF pair is not part of the actual body, we set
+     the strip counter here so that these bytes won't be delivered. */
+  pop3c->strip = 2;
+
+  if(pop3->transfer == FTPTRANSFER_BODY) {
+    /* POP3 download */
+    Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
+
+    if(pp->cache) {
+      /* The header "cache" contains a bunch of data that is actually body
+         content so send it as such. Note that there may even be additional
+         "headers" after the body */
+
+      if(!data->set.opt_no_body) {
+        result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
+        if(result)
+          return result;
+      }
 
-    /* we may get the EOB already here! */
-    result = Curl_pop3_write(conn, pp->cache, pp->cache_size);
-    if(result)
-      return result;
+      /* Free the cache */
+      Curl_safefree(pp->cache);
 
-    /* cache is drained */
-    free(pp->cache);
-    pp->cache = NULL;
-    pp->cache_size = 0;
+      /* Reset the cache size */
+      pp->cache_size = 0;
+    }
   }
 
+  /* End of DO phase */
   state(conn, POP3_STOP);
-  return result;
-}
-
-/* start the DO phase for RETR */
-static CURLcode pop3_retr(struct connectdata *conn)
-{
-  CURLcode result = CURLE_OK;
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "RETR %s", pop3c->mailbox);
-  if(result)
-    return result;
-
-  state(conn, POP3_RETR);
-  return result;
-}
-
-/* start the DO phase for LIST */
-static CURLcode pop3_list(struct connectdata *conn)
-{
-  CURLcode result = CURLE_OK;
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "LIST %s", pop3c->mailbox);
-  if(result)
-    return result;
 
-  state(conn, POP3_LIST);
   return result;
 }
 
 static CURLcode pop3_statemach_act(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct SessionHandle *data=conn->data;
   int pop3code;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
   struct pingpong *pp = &pop3c->pp;
   size_t nread = 0;
 
+  /* Busy upgrading the connection; right now all I/O is SSL/TLS, not POP3 */
+  if(pop3c->state == POP3_UPGRADETLS)
+    return pop3_perform_upgrade_tls(conn);
+
+  /* Flush any data that needs to be sent */
   if(pp->sendleft)
     return Curl_pp_flushsend(pp);
 
-  /* we read a piece of response */
+  /* Read the response from the server */
   result = Curl_pp_readresp(sock, pp, &pop3code, &nread);
   if(result)
     return result;
 
   if(pop3code) {
-    /* we have now received a full POP3 server response */
+    /* We have now received a full POP3 server response */
     switch(pop3c->state) {
     case POP3_SERVERGREET:
-      if(pop3code != 'O') {
-        failf(data, "Got unexpected pop3-server response");
-        return CURLE_FTP_WEIRD_SERVER_REPLY;
-      }
+      result = pop3_state_servergreet_resp(conn, pop3code, pop3c->state);
+      break;
 
-      if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
-        /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
-           to TLS connection now */
-        result = Curl_pp_sendf(&pop3c->pp, "STARTTLS", NULL);
-        state(conn, POP3_STARTTLS);
-      }
-      else
-        result = pop3_state_user(conn);
-      if(result)
-        return result;
+    case POP3_CAPA:
+      result = pop3_state_capa_resp(conn, pop3code, pop3c->state);
       break;
 
-    case POP3_USER:
-      result = pop3_state_user_resp(conn, pop3code, pop3c->state);
+    case POP3_STARTTLS:
+      result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
       break;
 
-    case POP3_PASS:
-      result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
+    case POP3_AUTH_PLAIN:
+      result = pop3_state_auth_plain_resp(conn, pop3code, pop3c->state);
       break;
 
-    case POP3_STARTTLS:
-      result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
+    case POP3_AUTH_LOGIN:
+      result = pop3_state_auth_login_resp(conn, pop3code, pop3c->state);
+      break;
+
+    case POP3_AUTH_LOGIN_PASSWD:
+      result = pop3_state_auth_login_password_resp(conn, pop3code,
+                                                   pop3c->state);
+      break;
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+    case POP3_AUTH_CRAMMD5:
+      result = pop3_state_auth_cram_resp(conn, pop3code, pop3c->state);
+      break;
+
+    case POP3_AUTH_DIGESTMD5:
+      result = pop3_state_auth_digest_resp(conn, pop3code, pop3c->state);
+      break;
+
+    case POP3_AUTH_DIGESTMD5_RESP:
+      result = pop3_state_auth_digest_resp_resp(conn, pop3code, pop3c->state);
+      break;
+#endif
+
+#ifdef USE_NTLM
+    case POP3_AUTH_NTLM:
+      result = pop3_state_auth_ntlm_resp(conn, pop3code, pop3c->state);
+      break;
+
+    case POP3_AUTH_NTLM_TYPE2MSG:
+      result = pop3_state_auth_ntlm_type2msg_resp(conn, pop3code,
+                                                  pop3c->state);
+      break;
+#endif
+
+    case POP3_AUTH_FINAL:
+      result = pop3_state_auth_final_resp(conn, pop3code, pop3c->state);
+      break;
+
+#ifndef CURL_DISABLE_CRYPTO_AUTH
+    case POP3_APOP:
+      result = pop3_state_apop_resp(conn, pop3code, pop3c->state);
+      break;
+#endif
+
+    case POP3_USER:
+      result = pop3_state_user_resp(conn, pop3code, pop3c->state);
       break;
 
-    case POP3_RETR:
-      result = pop3_state_retr_resp(conn, pop3code, pop3c->state);
+    case POP3_PASS:
+      result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
       break;
 
-    case POP3_LIST:
-      result = pop3_state_list_resp(conn, pop3code, pop3c->state);
+    case POP3_COMMAND:
+      result = pop3_state_command_resp(conn, pop3code, pop3c->state);
       break;
 
     case POP3_QUIT:
@@ -518,76 +1358,75 @@ static CURLcode pop3_statemach_act(struct connectdata *conn)
       break;
     }
   }
+
   return result;
 }
 
-/* called repeatedly until done from multi.c */
+/* Called repeatedly until done from multi.c */
 static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done)
 {
+  CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
-  CURLcode result = Curl_pp_multi_statemach(&pop3c->pp);
 
-  *done = (bool)(pop3c->state == POP3_STOP);
+  if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone)
+    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
+  else
+    result = Curl_pp_statemach(&pop3c->pp, FALSE);
+
+  *done = (pop3c->state == POP3_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode pop3_easy_statemach(struct connectdata *conn)
+static CURLcode pop3_block_statemach(struct connectdata *conn)
 {
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-  struct pingpong *pp = &pop3c->pp;
   CURLcode result = CURLE_OK;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
 
-  while(pop3c->state != POP3_STOP) {
-    result = Curl_pp_easy_statemach(pp);
-    if(result)
-      break;
-  }
+  while(pop3c->state != POP3_STOP && !result)
+    result = Curl_pp_statemach(&pop3c->pp, TRUE);
 
   return result;
 }
 
-/*
- * Allocate and initialize the struct POP3 for the current SessionHandle.  If
- * need be.
- */
+/* Allocate and initialize the POP3 struct for the current SessionHandle if
+   required */
 static CURLcode pop3_init(struct connectdata *conn)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *pop3 = data->state.proto.pop3;
+  struct POP3 *pop3 = data->state.proto.pop3;
+
   if(!pop3) {
-    pop3 = data->state.proto.pop3 = calloc(sizeof(struct FTP), 1);
+    pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1);
     if(!pop3)
-      return CURLE_OUT_OF_MEMORY;
+      result = CURLE_OUT_OF_MEMORY;
   }
 
-  /* get some initial data into the pop3 struct */
-  pop3->bytecountp = &data->req.bytecount;
-
-  /* No need to duplicate user+password, the connectdata struct won't change
-     during a session, but we re-init them here since on subsequent inits
-     since the conn struct may have changed or been replaced.
-  */
-  pop3->user = conn->user;
-  pop3->passwd = conn->passwd;
+  return result;
+}
 
-  return CURLE_OK;
+/* For the POP3 "protocol connect" and "doing" phases only */
+static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
+                        int numsocks)
+{
+  return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks);
 }
 
-/*
- * pop3_connect() should do everything that is to be considered a part of
- * the connection phase.
+/***********************************************************************
+ *
+ * pop3_connect()
+ *
+ * This function should do everything that is to be considered a part of the
+ * connection phase.
  *
  * The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * phase is done when this function returns, or FALSE if not.
  */
-static CURLcode pop3_connect(struct connectdata *conn,
-                                 bool *done) /* see description above */
+static CURLcode pop3_connect(struct connectdata *conn, bool *done)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   struct pop3_conn *pop3c = &conn->proto.pop3c;
-  struct SessionHandle *data=conn->data;
   struct pingpong *pp = &pop3c->pp;
 
   *done = FALSE; /* default to not done yet */
@@ -596,69 +1435,36 @@ static CURLcode pop3_connect(struct connectdata *conn,
      sessionhandle, deal with it */
   Curl_reset_reqproto(conn);
 
+  /* Initialise the POP3 layer */
   result = pop3_init(conn);
-  if(CURLE_OK != result)
+  if(result)
     return result;
 
-  /* We always support persistant connections on pop3 */
+  /* We always support persistent connections in POP3 */
   conn->bits.close = FALSE;
 
-  pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+  /* Set the default response time-out */
+  pp->response_time = RESP_TIMEOUT;
   pp->statemach_act = pop3_statemach_act;
   pp->endofresp = pop3_endofresp;
   pp->conn = conn;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-    /* for POP3 over HTTP proxy */
-    struct HTTP http_proxy;
-    struct FTP *pop3_save;
-
-    /* BLOCKING */
-    /* We want "seamless" POP3 operations through HTTP proxy tunnel */
+  /* Set the default preferred authentication type and mechanism */
+  pop3c->preftype = POP3_TYPE_ANY;
+  pop3c->prefmech = SASL_AUTH_ANY;
 
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
-     * conn->proto.http; we want POP3 through HTTP and we have to change the
-     * member temporarily for connecting to the HTTP proxy. After
-     * Curl_proxyCONNECT we have to set back the member to the original struct
-     * POP3 pointer
-     */
-    pop3_save = data->state.proto.pop3;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    data->state.proto.http = &http_proxy;
+  /* Initialise the pingpong layer */
+  Curl_pp_init(pp);
 
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name, conn->remote_port);
-
-    data->state.proto.pop3 = pop3_save;
-
-    if(CURLE_OK != result)
-      return result;
-  }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
-  if(conn->protocol & PROT_POP3S) {
-    /* BLOCKING */
-    /* POP3S is simply pop3 with SSL for the control channel */
-    /* now, perform the SSL initialization for this socket */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(result)
-      return result;
-  }
-
-  Curl_pp_init(pp); /* init the response reader stuff */
+  /* Parse the URL options */
+  result = pop3_parse_url_options(conn);
+  if(result)
+    return result;
 
-  /* When we connect, we start in the state where we await the server greet
-     response */
+  /* Start off waiting for the server greeting response */
   state(conn, POP3_SERVERGREET);
 
-  if(data->state.used_interface == Curl_if_multi)
-    result = pop3_multi_statemach(conn, done);
-  else {
-    result = pop3_easy_statemach(conn);
-    if(!result)
-      *done = TRUE;
-  }
+  result = pop3_multi_statemach(conn, done);
 
   return result;
 }
@@ -675,25 +1481,29 @@ static CURLcode pop3_connect(struct connectdata *conn,
 static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
                           bool premature)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *pop3 = data->state.proto.pop3;
-  CURLcode result=CURLE_OK;
+  struct POP3 *pop3 = data->state.proto.pop3;
+
   (void)premature;
 
   if(!pop3)
-    /* When the easy handle is removed from the multi while libcurl is still
-     * trying to resolve the host name, it seems that the pop3 struct is not
-     * yet initialized, but the removal action calls Curl_done() which calls
-     * this function. So we simply return success if no pop3 pointer is set.
-     */
+    /* When the easy handle is removed from the multi interface while libcurl
+       is still trying to resolve the host name, the POP3 struct is not yet
+       initialized. However, the removal action calls Curl_done() which in
+       turn calls this function, so we simply return success. */
     return CURLE_OK;
 
   if(status) {
     conn->bits.close = TRUE; /* marked for closure */
-    result = status;      /* use the already set error code */
+    result = status;         /* use the already set error code */
   }
 
-  /* clear these for next connection */
+  /* Cleanup our per-request based variables */
+  Curl_safefree(pop3->id);
+  Curl_safefree(pop3->custom);
+
+  /* Clear the transfer mode for the next request */
   pop3->transfer = FTPTRANSFER_BODY;
 
   return result;
@@ -703,48 +1513,34 @@ static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
  *
  * pop3_perform()
  *
- * This is the actual DO function for POP3. Get a file/directory according to
+ * This is the actual DO function for POP3. Get a message/listing according to
  * the options previously setup.
  */
-
-static
-CURLcode pop3_perform(struct connectdata *conn,
-                     bool *connected,  /* connect status after PASV / PORT */
-                     bool *dophase_done)
+static CURLcode pop3_perform(struct connectdata *conn, bool *connected,
+                             bool *dophase_done)
 {
-  /* this is POP3 and no proxy */
-  CURLcode result=CURLE_OK;
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  /* This is POP3 and no proxy */
+  CURLcode result = CURLE_OK;
 
   DEBUGF(infof(conn->data, "DO phase starts\n"));
 
   if(conn->data->set.opt_no_body) {
-    /* requested no body means no transfer... */
-    struct FTP *pop3 = conn->data->state.proto.pop3;
+    /* Requested no body means no transfer */
+    struct POP3 *pop3 = conn->data->state.proto.pop3;
     pop3->transfer = FTPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
 
-  /* start the first command in the DO phase */
-  /* If mailbox is empty, then assume user wants listing for mail IDs,
-   * otherwise, attempt to retrieve the mail-id stored in mailbox
-   */
-  if (strlen(pop3c->mailbox))
-    result = pop3_retr(conn);
-  else
-    result = pop3_list(conn);
+  /* Start the first command in the DO phase */
+  result = pop3_perform_command(conn);
   if(result)
     return result;
 
-  /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi)
-    result = pop3_multi_statemach(conn, dophase_done);
-  else {
-    result = pop3_easy_statemach(conn);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  /* Run the state-machine */
+  result = pop3_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -763,49 +1559,30 @@ CURLcode pop3_perform(struct connectdata *conn,
  */
 static CURLcode pop3_do(struct connectdata *conn, bool *done)
 {
-  CURLcode retcode = CURLE_OK;
+  CURLcode result = CURLE_OK;
 
   *done = FALSE; /* default to false */
 
-  /*
-    Since connections can be re-used between SessionHandles, this might be a
-    connection already existing but on a fresh SessionHandle struct so we must
-    make sure we have a good 'struct POP3' to play with. For new connections,
-    the struct POP3 is allocated and setup in the pop3_connect() function.
-  */
+  /* Since connections can be re-used between SessionHandles, there might be a
+     connection already existing but on a fresh SessionHandle struct. As such
+     we make sure we have a good POP3 struct to play with. For new connections
+     the POP3 struct is allocated and setup in the pop3_connect() function. */
   Curl_reset_reqproto(conn);
-  retcode = pop3_init(conn);
-  if(retcode)
-    return retcode;
-
-  retcode = pop3_parse_url_path(conn);
-  if(retcode)
-    return retcode;
-
-  retcode = pop3_regular_transfer(conn, done);
-
-  return retcode;
-}
+  result = pop3_init(conn);
+  if(result)
+    return result;
 
-/***********************************************************************
- *
- * pop3_quit()
- *
- * This should be called before calling sclose().  We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode pop3_quit(struct connectdata *conn)
-{
-  CURLcode result = CURLE_OK;
+  /* Parse the URL path */
+  result = pop3_parse_url_path(conn);
+  if(result)
+    return result;
 
-  result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT", NULL);
+  /* Parse the custom request */
+  result = pop3_parse_custom_request(conn);
   if(result)
     return result;
-  state(conn, POP3_QUIT);
 
-  result = pop3_easy_statemach(conn);
+  result = pop3_regular_transfer(conn, done);
 
   return result;
 }
@@ -817,77 +1594,55 @@ static CURLcode pop3_quit(struct connectdata *conn)
  * Disconnect from an POP3 server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode pop3_disconnect(struct connectdata *conn,
+                                bool dead_connection)
 {
-  struct pop3_conn *pop3c= &conn->proto.pop3c;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
 
   /* We cannot send quit unconditionally. If this connection is stale or
      bad in any way, sending quit and waiting around here will make the
-     disconnect wait in vain and cause more problems than we need to.
-  */
+     disconnect wait in vain and cause more problems than we need to. */
 
   /* The POP3 session may or may not have been allocated/setup at this
      point! */
   if(!dead_connection && pop3c->pp.conn)
-    (void)pop3_quit(conn); /* ignore errors on the LOGOUT */
-
+    if(!pop3_perform_quit(conn))
+      (void)pop3_block_statemach(conn); /* ignore errors on QUIT */
 
+  /* Disconnect from the server */
   Curl_pp_disconnect(&pop3c->pp);
 
-  return CURLE_OK;
-}
-
-/***********************************************************************
- *
- * pop3_parse_url_path()
- *
- * Parse the URL path into separate path components.
- *
- */
-static CURLcode pop3_parse_url_path(struct connectdata *conn)
-{
-  /* the pop3 struct is already inited in pop3_connect() */
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
-  struct SessionHandle *data = conn->data;
-  const char *path = data->state.path;
+  /* Cleanup the SASL module */
+  Curl_sasl_cleanup(conn, pop3c->authused);
 
-  /* url decode the path and use this mailbox */
-  pop3c->mailbox = curl_easy_unescape(data, path, 0, NULL);
-  if (!pop3c->mailbox)
-    return CURLE_OUT_OF_MEMORY;
+  /* Cleanup our connection based variables */
+  Curl_safefree(pop3c->apoptimestamp);
 
   return CURLE_OK;
 }
 
-/* call this when the DO phase has completed */
-static CURLcode pop3_dophase_done(struct connectdata *conn,
-                                  bool connected)
+/* Call this when the DO phase has completed */
+static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
 {
-  struct FTP *pop3 = conn->data->state.proto.pop3;
-  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  (void)conn;
   (void)connected;
 
-  if(pop3->transfer != FTPTRANSFER_BODY)
-    /* no data to transfer */
-    Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
-
-  free(pop3c->mailbox);
-
   return CURLE_OK;
 }
 
-/* called from multi.c while DOing */
-static CURLcode pop3_doing(struct connectdata *conn,
-                               bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done)
 {
-  CURLcode result;
-  result = pop3_multi_statemach(conn, dophase_done);
+  CURLcode result = pop3_multi_statemach(conn, dophase_done);
 
-  if(*dophase_done) {
+  if(result)
+    DEBUGF(infof(conn->data, "DO phase failed\n"));
+  else if(*dophase_done) {
     result = pop3_dophase_done(conn, FALSE /* not connected */);
 
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
   }
+
   return result;
 }
 
@@ -899,46 +1654,39 @@ static CURLcode pop3_doing(struct connectdata *conn,
  *
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
- *
  */
-static
-CURLcode pop3_regular_transfer(struct connectdata *conn,
-                              bool *dophase_done)
+static CURLcode pop3_regular_transfer(struct connectdata *conn,
+                                      bool *dophase_done)
 {
-  CURLcode result=CURLE_OK;
-  bool connected=FALSE;
+  CURLcode result = CURLE_OK;
+  bool connected = FALSE;
   struct SessionHandle *data = conn->data;
-  data->req.size = -1; /* make sure this is unknown at this point */
 
+  /* Make sure size is unknown at this point */
+  data->req.size = -1;
+
+  /* Set the progress data */
   Curl_pgrsSetUploadCounter(data, 0);
   Curl_pgrsSetDownloadCounter(data, 0);
   Curl_pgrsSetUploadSize(data, 0);
   Curl_pgrsSetDownloadSize(data, 0);
 
-  result = pop3_perform(conn,
-                        &connected, /* have we connected after PASV/PORT */
-                        dophase_done); /* all commands in the DO-phase done? */
-
-  if(CURLE_OK == result) {
-
-    if(!*dophase_done)
-      /* the DO phase has not completed yet */
-      return CURLE_OK;
+  /* Carry out the perform */
+  result = pop3_perform(conn, &connected, dophase_done);
 
+  /* Perform post DO phase operations if necessary */
+  if(!result && *dophase_done)
     result = pop3_dophase_done(conn, connected);
-    if(result)
-      return result;
-  }
 
   return result;
 }
 
-static CURLcode pop3_setup_connection(struct connectdata * conn)
+static CURLcode pop3_setup_connection(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
 
   if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
-    /* Unless we have asked to tunnel pop3 operations through the proxy, we
+    /* Unless we have asked to tunnel POP3 operations through the proxy, we
        switch and use HTTP operations only */
 #ifndef CURL_DISABLE_HTTP
     if(conn->handler == &Curl_handler_pop3)
@@ -951,11 +1699,10 @@ static CURLcode pop3_setup_connection(struct connectdata * conn)
       return CURLE_UNSUPPORTED_PROTOCOL;
 #endif
     }
-    /*
-     * We explicitly mark this connection as persistent here as we're doing
-     * POP3 over HTTP and thus we accidentally avoid setting this value
-     * otherwise.
-     */
+
+    /* We explicitly mark this connection as persistent here as we're doing
+       POP3 over HTTP and thus we accidentally avoid setting this value
+       otherwise */
     conn->bits.close = FALSE;
 #else
     failf(data, "POP3 over http proxy requires HTTP support built-in!");
@@ -968,54 +1715,233 @@ static CURLcode pop3_setup_connection(struct connectdata * conn)
   return CURLE_OK;
 }
 
-/* this is the 5-bytes End-Of-Body marker for POP3 */
-#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
-#define POP3_EOB_LEN 5
+/***********************************************************************
+ *
+ * pop3_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode pop3_parse_url_options(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct pop3_conn *pop3c = &conn->proto.pop3c;
+  const char *options = conn->options;
+  const char *ptr = options;
+
+  if(options) {
+    const char *key = ptr;
 
-/*
+    while(*ptr && *ptr != '=')
+        ptr++;
+
+    if(strnequal(key, "AUTH", 4)) {
+      const char *value = ptr + 1;
+
+      if(strequal(value, "*")) {
+        pop3c->preftype = POP3_TYPE_ANY;
+        pop3c->prefmech = SASL_AUTH_ANY;
+      }
+      else if(strequal(value, "+APOP")) {
+        pop3c->preftype = POP3_TYPE_APOP;
+        pop3c->prefmech = SASL_AUTH_NONE;
+      }
+      else if(strequal(value, "LOGIN")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_LOGIN;
+      }
+      else if(strequal(value, "PLAIN")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_PLAIN;
+      }
+      else if(strequal(value, "CRAM-MD5")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_CRAM_MD5;
+      }
+      else if(strequal(value, "DIGEST-MD5")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_DIGEST_MD5;
+      }
+      else if(strequal(value, "GSSAPI")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_GSSAPI;
+      }
+      else if(strequal(value, "NTLM")) {
+        pop3c->preftype = POP3_TYPE_SASL;
+        pop3c->prefmech = SASL_MECH_NTLM;
+      }
+      else {
+        pop3c->preftype = POP3_TYPE_NONE;
+        pop3c->prefmech = SASL_AUTH_NONE;
+      }
+    }
+    else
+      result = CURLE_URL_MALFORMAT;
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * pop3_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ */
+static CURLcode pop3_parse_url_path(struct connectdata *conn)
+{
+  /* The POP3 struct is already initialised in pop3_connect() */
+  struct SessionHandle *data = conn->data;
+  struct POP3 *pop3 = data->state.proto.pop3;
+  const char *path = data->state.path;
+
+  /* URL decode the path for the message ID */
+  return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE);
+}
+
+/***********************************************************************
+ *
+ * pop3_parse_custom_request()
+ *
+ * Parse the custom request.
+ */
+static CURLcode pop3_parse_custom_request(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct POP3 *pop3 = data->state.proto.pop3;
+  const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+  /* URL decode the custom request */
+  if(custom)
+    result = Curl_urldecode(data, custom, 0, &pop3->custom, NULL, TRUE);
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * Curl_pop3_write()
+ *
  * This function scans the body after the end-of-body and writes everything
  * until the end is found.
  */
-CURLcode Curl_pop3_write(struct connectdata *conn,
-                         char *str,
-                         size_t nread)
+CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread)
 {
-  /* This code could be made into a special function in the handler struct. */
-  CURLcode result;
+  /* This code could be made into a special function in the handler struct */
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
   struct SingleRequest *k = &data->req;
 
-  /* Detect the end-of-body marker, which is 5 bytes:
-     0d 0a 2e 0d 0a. This marker can of course be spread out
-     over up to 5 different data chunks. Deal with it! */
   struct pop3_conn *pop3c = &conn->proto.pop3c;
-  size_t checkmax = (nread >= POP3_EOB_LEN?POP3_EOB_LEN:nread);
-  size_t checkleft = POP3_EOB_LEN-pop3c->eob;
-  size_t check = (checkmax >= checkleft?checkleft:checkmax);
-
-  if(!memcmp(POP3_EOB, &str[nread - check], check)) {
-    /* substring match */
-    pop3c->eob += check;
-    if(pop3c->eob == POP3_EOB_LEN) {
-      /* full match, the transfer is done! */
-      str[nread - check] = '\0';
-      nread -= check;
-      k->keepon &= ~KEEP_RECV;
+  bool strip_dot = FALSE;
+  size_t last = 0;
+  size_t i;
+
+  /* Search through the buffer looking for the end-of-body marker which is
+     5 bytes (0d 0a 2e 0d 0a). Note that a line starting with a dot matches
+     the eob so the server will have prefixed it with an extra dot which we
+     need to strip out. Additionally the marker could of course be spread out
+     over 5 different data chunks. */
+  for(i = 0; i < nread; i++) {
+    size_t prev = pop3c->eob;
+
+    switch(str[i]) {
+    case 0x0d:
+      if(pop3c->eob == 0) {
+        pop3c->eob++;
+
+        if(i) {
+          /* Write out the body part that didn't match */
+          result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+                                     i - last);
+
+          if(result)
+            return result;
+
+          last = i;
+        }
+      }
+      else if(pop3c->eob == 3)
+        pop3c->eob++;
+      else
+        /* If the character match wasn't at position 0 or 3 then restart the
+           pattern matching */
+        pop3c->eob = 1;
+      break;
+
+    case 0x0a:
+      if(pop3c->eob == 1 || pop3c->eob == 4)
+        pop3c->eob++;
+      else
+        /* If the character match wasn't at position 1 or 4 then start the
+           search again */
+        pop3c->eob = 0;
+      break;
+
+    case 0x2e:
+      if(pop3c->eob == 2)
+        pop3c->eob++;
+      else if(pop3c->eob == 3) {
+        /* We have an extra dot after the CRLF which we need to strip off */
+        strip_dot = TRUE;
+        pop3c->eob = 0;
+      }
+      else
+        /* If the character match wasn't at position 2 then start the search
+           again */
+        pop3c->eob = 0;
+      break;
+
+    default:
       pop3c->eob = 0;
+      break;
+    }
+
+    /* Did we have a partial match which has subsequently failed? */
+    if(prev && prev >= pop3c->eob) {
+      /* Strip can only be non-zero for the very first mismatch after CRLF
+         and then both prev and strip are equal and nothing will be output
+         below */
+      while(prev && pop3c->strip) {
+        prev--;
+        pop3c->strip--;
+      }
+
+      if(prev) {
+        /* If the partial match was the CRLF and dot then only write the CRLF
+           as the server would have inserted the dot */
+        result = Curl_client_write(conn, CLIENTWRITE_BODY, (char*)POP3_EOB,
+                                   strip_dot ? prev - 1 : prev);
+
+        if(result)
+          return result;
+
+        last = i;
+        strip_dot = FALSE;
+      }
     }
   }
-  else if(pop3c->eob) {
-    /* not a match, but we matched a piece before so we must now
-       send that part as body first, before we move on and send
-       this buffer */
-    result = Curl_client_write(conn, CLIENTWRITE_BODY,
-                               (char *)POP3_EOB, pop3c->eob);
-    if(result)
-      return result;
+
+  if(pop3c->eob == POP3_EOB_LEN) {
+    /* We have a full match so the transfer is done, however we must transfer
+    the CRLF at the start of the EOB as this is considered to be part of the
+    message as per RFC-1939, sect. 3 */
+    result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB, 2);
+
+    k->keepon &= ~KEEP_RECV;
     pop3c->eob = 0;
+
+    return result;
   }
 
-  result = Curl_client_write(conn, CLIENTWRITE_BODY, str, nread);
+  if(pop3c->eob)
+    /* While EOB is matching nothing should be output */
+    return CURLE_OK;
+
+  if(nread - last) {
+    result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last],
+                               nread - last);
+  }
 
   return result;
 }
index 337421c..0186e04 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __POP3_H
-#define __POP3_H
+#ifndef HEADER_CURL_POP3_H
+#define HEADER_CURL_POP3_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2013, 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
  *
  ***************************************************************************/
 
+#include "pingpong.h"
+
 /****************************************************************************
  * POP3 unique setup
  ***************************************************************************/
 typedef enum {
-  POP3_STOP,        /* do nothing state, stops the state machine */
-  POP3_SERVERGREET, /* waiting for the initial greeting immediately after
-                       a connect */
+  POP3_STOP,         /* do nothing state, stops the state machine */
+  POP3_SERVERGREET,  /* waiting for the initial greeting immediately after
+                        a connect */
+  POP3_CAPA,
+  POP3_STARTTLS,
+  POP3_UPGRADETLS,   /* asynchronously upgrade the connection to SSL/TLS
+                       (multi mode only) */
+  POP3_AUTH_PLAIN,
+  POP3_AUTH_LOGIN,
+  POP3_AUTH_LOGIN_PASSWD,
+  POP3_AUTH_CRAMMD5,
+  POP3_AUTH_DIGESTMD5,
+  POP3_AUTH_DIGESTMD5_RESP,
+  POP3_AUTH_NTLM,
+  POP3_AUTH_NTLM_TYPE2MSG,
+  POP3_AUTH_FINAL,
+  POP3_APOP,
   POP3_USER,
   POP3_PASS,
-  POP3_STARTTLS,
-  POP3_LIST,
-  POP3_RETR,
+  POP3_COMMAND,
   POP3_QUIT,
-  POP3_LAST  /* never used */
+  POP3_LAST          /* never used */
 } pop3state;
 
+/* This POP3 struct is used in the SessionHandle. All POP3 data that is
+   connection-oriented must be in pop3_conn to properly deal with the fact that
+   perhaps the SessionHandle is changed between the times the connection is
+   used. */
+struct POP3 {
+  curl_pp_transfer transfer;
+  char *id;               /* Message ID */
+  char *custom;           /* Custom Request */
+};
+
 /* pop3_conn is used for struct connection-oriented data in the connectdata
    struct */
 struct pop3_conn {
   struct pingpong pp;
-  char *mailbox;     /* what to RETR */
-  size_t eob;        /* number of bytes of the EOB (End Of Body) that has been
-                        received thus far */
-  pop3state state; /* always use pop3.c:state() to change state! */
+  pop3state state;        /* Always use pop3.c:state() to change state! */
+  bool ssldone;           /* Is connect() over SSL done? */
+  size_t eob;             /* Number of bytes of the EOB (End Of Body) that
+                             have been received so far */
+  size_t strip;           /* Number of bytes from the start to ignore as
+                             non-body */
+  unsigned int authtypes; /* Accepted authentication types */
+  unsigned int authmechs; /* Accepted SASL authentication mechanisms */
+  unsigned int preftype;  /* Preferred authentication type */
+  unsigned int prefmech;  /* Preferred SASL authentication mechanism */
+  unsigned int authused;  /* SASL auth mechanism used for the connection */
+  char *apoptimestamp;    /* APOP timestamp from the server greeting */
+  bool tls_supported;     /* StartTLS capability supported by server */
 };
 
 extern const struct Curl_handler Curl_handler_pop3;
 extern const struct Curl_handler Curl_handler_pop3s;
 
-/*
- * This function scans the body after the end-of-body and writes everything
- * until the end is found.
- */
-CURLcode Curl_pop3_write(struct connectdata *conn,
-                         char *str,
-                         size_t nread);
+/* Authentication type flags */
+#define POP3_TYPE_CLEARTEXT (1 << 0)
+#define POP3_TYPE_APOP      (1 << 1)
+#define POP3_TYPE_SASL      (1 << 2)
+
+/* Authentication type values */
+#define POP3_TYPE_NONE      0
+#define POP3_TYPE_ANY       ~0
+
+/* This is the 5-bytes End-Of-Body marker for POP3 */
+#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
+#define POP3_EOB_LEN 5
+
+/* This function scans the body after the end-of-body and writes everything
+ * until the end is found */
+CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread);
 
-#endif /* __POP3_H */
+#endif /* HEADER_CURL_POP3_H */
index e0758f2..dac7f8d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "urldata.h"
 #include "sendf.h"
@@ -131,26 +131,41 @@ static char *max5data(curl_off_t bytes, char *max5)
 
 */
 
-void Curl_pgrsDone(struct connectdata *conn)
+int Curl_pgrsDone(struct connectdata *conn)
 {
+  int rc;
   struct SessionHandle *data = conn->data;
   data->progress.lastshow=0;
-  Curl_pgrsUpdate(conn); /* the final (forced) update */
+  rc = Curl_pgrsUpdate(conn); /* the final (forced) update */
+  if(rc)
+    return rc;
+
+  if(!(data->progress.flags & PGRS_HIDE) &&
+     !data->progress.callback)
+    /* only output if we don't use a progress callback and we're not
+     * hidden */
+    fprintf(data->set.err, "\n");
 
   data->progress.speeder_c = 0; /* reset the progress meter display */
+  return 0;
 }
 
-/* reset all times except redirect */
-void Curl_pgrsResetTimes(struct SessionHandle *data)
+/* reset all times except redirect, and reset the known transfer sizes */
+void Curl_pgrsResetTimesSizes(struct SessionHandle *data)
 {
   data->progress.t_nslookup = 0.0;
   data->progress.t_connect = 0.0;
   data->progress.t_pretransfer = 0.0;
   data->progress.t_starttransfer = 0.0;
+
+  Curl_pgrsSetDownloadSize(data, 0);
+  Curl_pgrsSetUploadSize(data, 0);
 }
 
 void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
 {
+  struct timeval now = Curl_tvnow();
+
   switch(timer) {
   default:
   case TIMER_NONE:
@@ -158,35 +173,38 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
     break;
   case TIMER_STARTSINGLE:
     /* This is set at the start of a single fetch */
-    data->progress.t_startsingle = Curl_tvnow();
+    data->progress.t_startsingle = now;
+    break;
+
+  case TIMER_STARTACCEPT:
+    data->progress.t_acceptdata = Curl_tvnow();
     break;
 
   case TIMER_NAMELOOKUP:
     data->progress.t_nslookup =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+      Curl_tvdiff_secs(now, data->progress.t_startsingle);
     break;
   case TIMER_CONNECT:
     data->progress.t_connect =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+      Curl_tvdiff_secs(now, data->progress.t_startsingle);
     break;
   case TIMER_APPCONNECT:
     data->progress.t_appconnect =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+      Curl_tvdiff_secs(now, data->progress.t_startsingle);
     break;
   case TIMER_PRETRANSFER:
     data->progress.t_pretransfer =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+      Curl_tvdiff_secs(now, data->progress.t_startsingle);
     break;
   case TIMER_STARTTRANSFER:
     data->progress.t_starttransfer =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+      Curl_tvdiff_secs(now, data->progress.t_startsingle);
     break;
   case TIMER_POSTRANSFER:
     /* this is the normal end-of-transfer thing */
     break;
   case TIMER_REDIRECT:
-    data->progress.t_redirect =
-      Curl_tvdiff_secs(Curl_tvnow(), data->progress.start);
+    data->progress.t_redirect = Curl_tvdiff_secs(now, data->progress.start);
     break;
   }
 }
@@ -195,6 +213,8 @@ void Curl_pgrsStartNow(struct SessionHandle *data)
 {
   data->progress.speeder_c = 0; /* reset the progress meter display */
   data->progress.start = Curl_tvnow();
+  /* clear all bits except HIDE and HEADERS_OUT */
+  data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;
 }
 
 void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size)
@@ -225,6 +245,10 @@ void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
     data->progress.flags &= ~PGRS_UL_SIZE_KNOWN;
 }
 
+/*
+ * Curl_pgrsUpdate() returns 0 for success or the value returned by the
+ * progress callback!
+ */
 int Curl_pgrsUpdate(struct connectdata *conn)
 {
   struct timeval now;
@@ -333,12 +357,21 @@ int Curl_pgrsUpdate(struct connectdata *conn)
   } /* Calculations end */
 
   if(!(data->progress.flags & PGRS_HIDE)) {
-
     /* progress meter has not been shut off */
 
-    if(data->set.fprogress) {
-      /* There's a callback set, so we call that instead of writing
-         anything ourselves. This really is the way to go. */
+    if(data->set.fxferinfo) {
+      /* There's a callback set, call that */
+      result= data->set.fxferinfo(data->set.progress_client,
+                                  data->progress.size_dl,
+                                  data->progress.downloaded,
+                                  data->progress.size_ul,
+                                  data->progress.uploaded);
+      if(result)
+        failf(data, "Callback aborted");
+      return result;
+    }
+    else if(data->set.fprogress) {
+      /* The older deprecated callback is set, call that */
       result= data->set.fprogress(data->set.progress_client,
                                   (double)data->progress.size_dl,
                                   (double)data->progress.downloaded,
@@ -363,8 +396,10 @@ int Curl_pgrsUpdate(struct connectdata *conn)
                 data->state.resume_from);
       }
       fprintf(data->set.err,
-              "  %% Total    %% Received %% Xferd  Average Speed   Time    Time     Time  Current\n"
-              "                                 Dload  Upload   Total   Spent    Left  Speed\n");
+              "  %% Total    %% Received %% Xferd  Average Speed   "
+              "Time    Time     Time  Current\n"
+              "                                 Dload  Upload   "
+              "Total   Spent    Left  Speed\n");
       data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
     }
 
@@ -403,17 +438,17 @@ int Curl_pgrsUpdate(struct connectdata *conn)
     time2str(time_total, total_estimate);
     time2str(time_spent, timespent);
 
-    /* Get the total amount of data expected to get transfered */
+    /* Get the total amount of data expected to get transferred */
     total_expected_transfer =
       (data->progress.flags & PGRS_UL_SIZE_KNOWN?
        data->progress.size_ul:data->progress.uploaded)+
       (data->progress.flags & PGRS_DL_SIZE_KNOWN?
        data->progress.size_dl:data->progress.downloaded);
 
-    /* We have transfered this much so far */
+    /* We have transferred this much so far */
     total_transfer = data->progress.downloaded + data->progress.uploaded;
 
-    /* Get the percentage of data transfered so far */
+    /* Get the percentage of data transferred so far */
     if(total_expected_transfer > CURL_OFF_T_C(10000))
       total_percen = total_transfer /
         (total_expected_transfer/CURL_OFF_T_C(100));
index 95944f0..f97fef9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __PROGRESS_H
-#define __PROGRESS_H
+#ifndef HEADER_CURL_PROGRESS_H
+#define HEADER_CURL_PROGRESS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -34,18 +34,19 @@ typedef enum {
   TIMER_STARTTRANSFER,
   TIMER_POSTRANSFER,
   TIMER_STARTSINGLE,
+  TIMER_STARTACCEPT,
   TIMER_REDIRECT,
   TIMER_LAST /* must be last */
 } timerid;
 
-void Curl_pgrsDone(struct connectdata *);
+int Curl_pgrsDone(struct connectdata *);
 void Curl_pgrsStartNow(struct SessionHandle *data);
 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_pgrsResetTimesSizes(struct SessionHandle *data);
 void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
 
 
@@ -67,4 +68,5 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
 #define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */
 
 
-#endif /* __PROGRESS_H */
+#endif /* HEADER_CURL_PROGRESS_H */
+
index dd4f911..b8a8dae 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef USE_QSOSSL
+
 #include <qsossl.h>
-#include <errno.h>
-#include <string.h>
+
 #ifdef HAVE_LIMITS_H
 #  include <limits.h>
 #endif
@@ -37,6 +37,7 @@
 #include "sslgen.h"
 #include "connect.h" /* for the connect timeout */
 #include "select.h"
+#include "x509asn1.h"
 #include "curl_memory.h"
 /* The last #include file should be: */
 #include "memdebug.h"
@@ -169,13 +170,10 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex)
   SSLHandle * h = connssl->handle;
   long timeout_ms;
 
-  h->exitPgm = NULL;
-
-  if(!data->set.ssl.verifyhost)
-    h->exitPgm = Curl_qsossl_trap_cert;
+  h->exitPgm = data->set.ssl.verifypeer? NULL: Curl_qsossl_trap_cert;
 
   /* figure out how long time we should wait at maximum */
-  timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+  timeout_ms = Curl_timeleft(data, NULL, TRUE);
 
   if(timeout_ms < 0) {
     /* time-out, bail out, go home */
@@ -208,6 +206,8 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex)
     break;
   }
 
+  h->peerCert = NULL;
+  h->peerCertLen = 0;
   rc = SSL_Handshake(h, SSL_HANDSHAKE_AS_CLIENT);
 
   switch (rc) {
@@ -238,6 +238,23 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex)
     return CURLE_SSL_CONNECT_ERROR;
   }
 
+  /* Verify host. */
+  rc = Curl_verifyhost(conn, h->peerCert, h->peerCert + h->peerCertLen);
+  if(rc != CURLE_OK)
+    return rc;
+
+  /* Gather certificate info. */
+  if(data->set.ssl.certinfo) {
+    if(Curl_ssl_init_certinfo(data, 1))
+      return CURLE_OUT_OF_MEMORY;
+    if(h->peerCert) {
+      rc = Curl_extract_certinfo(conn, 0, h->peerCert,
+                                 h->peerCert + h->peerCertLen);
+      if(rc != CURLE_OK)
+        return rc;
+    }
+  }
+
   return CURLE_OK;
 }
 
@@ -257,19 +274,22 @@ CURLcode Curl_qsossl_connect(struct connectdata * conn, int sockindex)
   if(rc == CURLE_OK) {
     rc = Curl_qsossl_create(conn, sockindex);
 
-    if(rc == CURLE_OK)
+    if(rc == CURLE_OK) {
       rc = Curl_qsossl_handshake(conn, sockindex);
-    else {
-      SSL_Destroy(connssl->handle);
-      connssl->handle = NULL;
-      connssl->use = FALSE;
-      connssl->state = ssl_connection_none;
+      if(rc != CURLE_OK)
+        SSL_Destroy(connssl->handle);
     }
   }
-  if (rc == CURLE_OK) {
-    connssl->state = ssl_connection_complete;
+
+  if(rc == CURLE_OK) {
     conn->recv[sockindex] = qsossl_recv;
     conn->send[sockindex] = qsossl_send;
+    connssl->state = ssl_connection_complete;
+  }
+  else {
+    connssl->handle = NULL;
+    connssl->use = FALSE;
+    connssl->state = ssl_connection_none;
   }
 
   return rc;
@@ -347,7 +367,7 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex)
   what = Curl_socket_ready(conn->sock[sockindex],
                            CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
 
-  for (;;) {
+  for(;;) {
     if(what < 0) {
       /* anything that gets here is fatally bad */
       failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
@@ -395,7 +415,7 @@ static ssize_t qsossl_send(struct connectdata * conn, int sockindex,
 
     case SSL_ERROR_BAD_STATE:
       /* The operation did not complete; the same SSL I/O function
-         should be called again later. This is basicly an EWOULDBLOCK
+         should be called again later. This is basically an EWOULDBLOCK
          equivalent. */
       *curlcode = CURLE_AGAIN;
       return -1;
index 45190e6..1fb47b8 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __QSSL_H
-#define __QSSL_H
+#ifndef HEADER_CURL_QSSL_H
+#define HEADER_CURL_QSSL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
 /*
  * This header should only be needed to get included by sslgen.c and qssl.c
@@ -45,15 +46,16 @@ int Curl_qsossl_check_cxn(struct connectdata * cxn);
 #define curlssl_connect Curl_qsossl_connect
 
 /*  No session handling for QsoSSL */
-#define curlssl_session_free(x)
+#define curlssl_session_free(x) Curl_nop_stmt
 #define curlssl_close_all Curl_qsossl_close_all
 #define curlssl_close Curl_qsossl_close
 #define curlssl_shutdown(x,y) Curl_qsossl_shutdown(x,y)
-#define curlssl_set_engine(x,y) CURLE_FAILED_INIT
-#define curlssl_set_engine_default(x) CURLE_FAILED_INIT
+#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN
+#define curlssl_set_engine_default(x) CURLE_NOT_BUILT_IN
 #define curlssl_engines_list(x) NULL
 #define curlssl_version Curl_qsossl_version
 #define curlssl_check_cxn(x) Curl_qsossl_check_cxn(x)
 #define curlssl_data_pending(x,y) 0
 #endif /* USE_QSOSSL */
-#endif
+
+#endif /* HEADER_CURL_QSSL_H */
index f3b302d..e27dac4 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "rawstr.h"
 
@@ -133,10 +133,10 @@ int Curl_raw_nequal(const char *first, const char *second, size_t max)
  */
 void Curl_strntoupper(char *dest, const char *src, size_t n)
 {
-  if (n < 1)
+  if(n < 1)
     return;
 
   do {
     *dest++ = Curl_raw_toupper(*src);
-  } while (*src++ && --n);
+  } while(*src++ && --n);
 }
index 7e9747a..b491460 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __RAWSTR_H
-#define __RAWSTR_H
+#ifndef HEADER_CURL_RAWSTR_H
+#define HEADER_CURL_RAWSTR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -29,7 +29,8 @@
  * to be locale independent and only compare strings we know are safe for
  * this.
  *
- * The function is capable of comparing a-z case insensitively even for non-ascii.
+ * The function is capable of comparing a-z case insensitively even for
+ * non-ascii.
  */
 int Curl_raw_equal(const char *first, const char *second);
 int Curl_raw_nequal(const char *first, const char *second, size_t max);
@@ -40,5 +41,7 @@ char Curl_raw_toupper(char in);
    argument is zero-byte terminated */
 #define checkprefix(a,b)    Curl_raw_nequal(a,b,strlen(a))
 
-#endif
 void Curl_strntoupper(char *dest, const char *src, size_t n);
+
+#endif /* HEADER_CURL_RAWSTR_H */
+
index 066e10f..3dc1490 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_RTSP
 
@@ -28,7 +28,6 @@
 #include <curl/curl.h>
 #include "transfer.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
 #include "multiif.h"
 #include "http.h"
 #include "url.h"
@@ -36,6 +35,8 @@
 #include "rtsp.h"
 #include "rawstr.h"
 #include "curl_memory.h"
+#include "select.h"
+#include "connect.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #define RTP_PKT_LENGTH(p)  ((((int)((unsigned char)((p)[2]))) << 8) | \
                              ((int)((unsigned char)((p)[3]))))
 
+/* protocol-specific functions set up to be called by the main engine */
+static CURLcode rtsp_do(struct connectdata *conn, bool *done);
+static CURLcode rtsp_done(struct connectdata *conn, CURLcode, bool premature);
+static CURLcode rtsp_connect(struct connectdata *conn, bool *done);
+static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead);
+
 static int rtsp_getsock_do(struct connectdata *conn,
                            curl_socket_t *socks,
                            int numsocks);
 
+/*
+ * Parse and write out any available RTP data.
+ *
+ * nread: amount of data left after k->str. will be modified if RTP
+ *        data is parsed and k->str is moved up
+ * readmore: whether or not the RTP parser needs more data right away
+ */
+static CURLcode rtsp_rtp_readwrite(struct SessionHandle *data,
+                                   struct connectdata *conn,
+                                   ssize_t *nread,
+                                   bool *readmore);
+
+
 /* this returns the socket to wait for in the DO and DOING state for the multi
    interface and then we're always _sending_ a request and thus we wait for
    the single socket to become writable only */
@@ -85,21 +105,57 @@ CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len);
 const struct Curl_handler Curl_handler_rtsp = {
   "RTSP",                               /* scheme */
   ZERO_NULL,                            /* setup_connection */
-  Curl_rtsp,                            /* do_it */
-  Curl_rtsp_done,                       /* done */
+  rtsp_do,                              /* do_it */
+  rtsp_done,                            /* done */
   ZERO_NULL,                            /* do_more */
-  Curl_rtsp_connect,                    /* connect_it */
+  rtsp_connect,                         /* connect_it */
   ZERO_NULL,                            /* connecting */
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   rtsp_getsock_do,                      /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
-  Curl_rtsp_disconnect,                 /* disconnect */
+  rtsp_disconnect,                      /* disconnect */
+  rtsp_rtp_readwrite,                   /* readwrite */
   PORT_RTSP,                            /* defport */
-  PROT_RTSP,                            /* protocol */
+  CURLPROTO_RTSP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
-CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done)
+/*
+ * The server may send us RTP data at any point, and RTSPREQ_RECEIVE does not
+ * want to block the application forever while receiving a stream. Therefore,
+ * we cannot assume that an RTSP socket is dead just because it is readable.
+ *
+ * Instead, if it is readable, run Curl_getconnectinfo() to peek at the socket
+ * and distinguish between closed and data.
+ */
+bool Curl_rtsp_connisdead(struct connectdata *check)
+{
+  int sval;
+  bool ret_val = TRUE;
+
+  sval = Curl_socket_ready(check->sock[FIRSTSOCKET], CURL_SOCKET_BAD, 0);
+  if(sval == 0) {
+    /* timeout */
+    ret_val = FALSE;
+  }
+  else if(sval & CURL_CSELECT_ERR) {
+    /* socket is in an error state */
+    ret_val = TRUE;
+  }
+  else if((sval & CURL_CSELECT_IN) && check->data) {
+    /* readable with no error. could be closed or could be alive but we can
+       only check if we have a proper SessionHandle for the connection */
+    curl_socket_t connectinfo = Curl_getconnectinfo(check->data, &check);
+    if(connectinfo != CURL_SOCKET_BAD)
+      ret_val = FALSE;
+  }
+
+  return ret_val;
+}
+
+static CURLcode rtsp_connect(struct connectdata *conn, bool *done)
 {
   CURLcode httpStatus;
   struct SessionHandle *data = conn->data;
@@ -117,16 +173,16 @@ CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done)
   return httpStatus;
 }
 
-CURLcode Curl_rtsp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead)
 {
-  (void) dead_connection;
+  (void) dead;
   Curl_safefree(conn->proto.rtspc.rtp_buf);
   return CURLE_OK;
 }
 
 
-CURLcode Curl_rtsp_done(struct connectdata *conn,
-                        CURLcode status, bool premature)
+static CURLcode rtsp_done(struct connectdata *conn,
+                          CURLcode status, bool premature)
 {
   struct SessionHandle *data = conn->data;
   struct RTSP *rtsp = data->state.proto.rtsp;
@@ -145,7 +201,8 @@ CURLcode Curl_rtsp_done(struct connectdata *conn,
     CSeq_sent = rtsp->CSeq_sent;
     CSeq_recv = rtsp->CSeq_recv;
     if((data->set.rtspreq != RTSPREQ_RECEIVE) && (CSeq_sent != CSeq_recv)) {
-      failf(data, "The CSeq of this request %ld did not match the response %ld",
+      failf(data,
+            "The CSeq of this request %ld did not match the response %ld",
             CSeq_sent, CSeq_recv);
       return CURLE_RTSP_CSEQ_ERROR;
     }
@@ -159,7 +216,7 @@ CURLcode Curl_rtsp_done(struct connectdata *conn,
   return httpStatus;
 }
 
-CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
+static CURLcode rtsp_do(struct connectdata *conn, bool *done)
 {
   struct SessionHandle *data = conn->data;
   CURLcode result=CURLE_OK;
@@ -238,6 +295,7 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
   case RTSPREQ_GET_PARAMETER:
     /* GET_PARAMETER's no_body status is determined later */
     p_request = "GET_PARAMETER";
+    data->set.opt_no_body = FALSE;
     break;
   case RTSPREQ_SET_PARAMETER:
     p_request = "SET_PARAMETER";
@@ -475,8 +533,9 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
         }
       }
 
-    data->state.expect100header = FALSE; /* RTSP posts are simple/small */
-    } else if(rtspreq == RTSPREQ_GET_PARAMETER) {
+      data->state.expect100header = FALSE; /* RTSP posts are simple/small */
+    }
+    else if(rtspreq == RTSPREQ_GET_PARAMETER) {
       /* Check for an empty GET_PARAMETER (heartbeat) request */
       data->set.httpreq = HTTPREQ_HEAD;
       data->set.opt_no_body = TRUE;
@@ -523,10 +582,11 @@ CURLcode Curl_rtsp(struct connectdata *conn, bool *done)
   return result;
 }
 
-CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
-                                 struct connectdata *conn,
-                                 ssize_t *nread,
-                                 bool *readmore) {
+
+static CURLcode rtsp_rtp_readwrite(struct SessionHandle *data,
+                                   struct connectdata *conn,
+                                   ssize_t *nread,
+                                   bool *readmore) {
   struct SingleRequest *k = &data->req;
   struct rtsp_conn *rtspc = &(conn->proto.rtspc);
 
@@ -608,7 +668,7 @@ CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
   }
 
   if(rtp_dataleft != 0 && rtp[0] == '$') {
-    DEBUGF(infof(data, "RTP Rewinding %zu %s\n", rtp_dataleft,
+    DEBUGF(infof(data, "RTP Rewinding %zd %s\n", rtp_dataleft,
           *readmore ? "(READMORE)" : ""));
 
     /* Store the incomplete RTP packet for a "rewind" */
@@ -687,13 +747,7 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
 
   if(checkprefix("CSeq:", header)) {
     /* Store the received CSeq. Match is verified in rtsp_done */
-    int nc;
-    char *temp = strdup(header);
-    if(!temp)
-      return CURLE_OUT_OF_MEMORY;
-    Curl_strntoupper(temp, temp, sizeof(temp));
-    nc = sscanf(temp, "CSEQ: %ld", &CSeq);
-    free(temp);
+    int nc = sscanf(&header[4], ": %ld", &CSeq);
     if(nc == 1) {
       data->state.proto.rtsp->CSeq_recv = CSeq; /* mark the request */
       data->state.rtsp_CSeq_recv = CSeq; /* update the handle */
index 82e0706..3ffa70c 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __RTSP_H_
-#define __RTSP_H_
-
+#ifndef HEADER_CURL_RTSP_H
+#define HEADER_CURL_RTSP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -8,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
 
 extern const struct Curl_handler Curl_handler_rtsp;
 
-/*
- * Parse and write out any available RTP data.
- *
- * nread: amount of data left after k->str. will be modified if RTP
- *        data is parsed and k->str is moved up
- * readmore: whether or not the RTP parser needs more data right away
- */
-CURLcode Curl_rtsp_rtp_readwrite(struct SessionHandle *data,
-                                 struct connectdata *conn,
-                                 ssize_t *nread,
-                                 bool *readmore);
-
-
-/* protocol-specific functions set up to be called by the main engine */
-CURLcode Curl_rtsp(struct connectdata *conn, bool *done);
-CURLcode Curl_rtsp_done(struct connectdata *conn, CURLcode, bool premature);
-CURLcode Curl_rtsp_connect(struct connectdata *conn, bool *done);
-CURLcode Curl_rtsp_disconnect(struct connectdata *conn, bool dead_connection);
-
+bool Curl_rtsp_connisdead(struct connectdata *check);
 CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header);
 
+#else
+/* disabled */
+#define Curl_rtsp_parseheader(x,y) CURLE_NOT_BUILT_IN
+#define Curl_rtsp_connisdead(x) TRUE
+
 #endif /* CURL_DISABLE_RTSP */
 
 /*
@@ -79,4 +65,5 @@ struct RTSP {
 };
 
 
-#endif /* __RTSP_H_ */
+#endif /* HEADER_CURL_RTSP_H */
+
index 1aa2806..495a496 100644 (file)
@@ -10,7 +10,7 @@
  * Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
  *
- * Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2001 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * All rights reserved.
  *
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
 
-#include <stdarg.h>
-#include <string.h>
-
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
 #endif
 
 #include "urldata.h"
@@ -64,6 +61,7 @@
 #include "ftp.h"
 #include "sendf.h"
 #include "rawstr.h"
+#include "warnless.h"
 
 /* The last #include file should be: */
 #include "memdebug.h"
@@ -147,7 +145,7 @@ static int ftp_send_command(struct connectdata *conn, const char *message, ...)
 }
 
 /* Read |len| from the socket |fd| and store it in |to|. Return a CURLcode
-   saying whether an error occured or CURLE_OK if |len| was read. */
+   saying whether an error occurred or CURLE_OK if |len| was read. */
 static CURLcode
 socket_read(curl_socket_t fd, void *to, size_t len)
 {
@@ -173,7 +171,7 @@ socket_read(curl_socket_t fd, void *to, size_t len)
 
 
 /* Write |len| bytes from the buffer |to| to the socket |fd|. Return a
-   CURLcode saying whether an error occured or CURLE_OK if |len| was
+   CURLcode saying whether an error occurred or CURLE_OK if |len| was
    written. */
 static CURLcode
 socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
@@ -208,17 +206,17 @@ static CURLcode read_data(struct connectdata *conn,
   CURLcode ret;
 
   ret = socket_read(fd, &len, sizeof(len));
-  if (ret != CURLE_OK)
+  if(ret != CURLE_OK)
     return ret;
 
   len = ntohl(len);
   tmp = realloc(buf->data, len);
-  if (tmp == NULL)
+  if(tmp == NULL)
     return CURLE_OUT_OF_MEMORY;
 
   buf->data = tmp;
   ret = socket_read(fd, buf->data, len);
-  if (ret != CURLE_OK)
+  if(ret != CURLE_OK)
     return ret;
   buf->size = conn->mech->decode(conn->app_data, buf->data, len,
                                  conn->data_prot, conn);
@@ -283,12 +281,13 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex,
 static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
                         const char *from, int length)
 {
-  size_t bytes;
-  size_t htonl_bytes;
-  char *buffer;
+  int bytes, htonl_bytes; /* 32-bit integers for htonl */
+  char *buffer = NULL;
   char *cmd_buffer;
+  size_t cmd_size = 0;
+  CURLcode error;
   enum protection_level prot_level = conn->data_prot;
-  bool iscmd = prot_level == PROT_CMD;
+  bool iscmd = (prot_level == PROT_CMD)?TRUE:FALSE;
 
   DEBUGASSERT(prot_level > PROT_NONE && prot_level < PROT_LAST);
 
@@ -300,9 +299,17 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
   }
   bytes = conn->mech->encode(conn->app_data, from, length, prot_level,
                              (void**)&buffer, conn);
+  if(!buffer || bytes <= 0)
+    return; /* error */
+
   if(iscmd) {
-    bytes = Curl_base64_encode(conn->data, buffer, bytes, &cmd_buffer);
-    if(bytes > 0) {
+    error = Curl_base64_encode(conn->data, buffer, curlx_sitouz(bytes),
+                               &cmd_buffer, &cmd_size);
+    if(error) {
+      free(buffer);
+      return; /* error */
+    }
+    if(cmd_size > 0) {
       static const char *enc = "ENC ";
       static const char *mic = "MIC ";
       if(prot_level == PROT_PRIVATE)
@@ -310,7 +317,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
       else
         socket_write(conn, fd, mic, 4);
 
-      socket_write(conn, fd, cmd_buffer, bytes);
+      socket_write(conn, fd, cmd_buffer, cmd_size);
       socket_write(conn, fd, "\r\n", 2);
       infof(conn->data, "Send: %s%s\n", prot_level == PROT_PRIVATE?enc:mic,
             cmd_buffer);
@@ -320,7 +327,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
   else {
     htonl_bytes = htonl(bytes);
     socket_write(conn, fd, &htonl_bytes, sizeof(htonl_bytes));
-    socket_write(conn, fd, buffer, bytes);
+    socket_write(conn, fd, buffer, curlx_sitouz(bytes));
   }
   free(buffer);
 }
@@ -329,10 +336,10 @@ static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
                          const char *buffer, size_t length)
 {
   /* FIXME: Check for overflow */
-  ssize_t len = conn->buffer_size;
-  int tx = 0;
+  ssize_t tx = 0, len = conn->buffer_size;
 
-  len -= conn->mech->overhead(conn->app_data, conn->data_prot, len);
+  len -= conn->mech->overhead(conn->app_data, conn->data_prot,
+                              curlx_sztosi(len));
   if(len <= 0)
     len = length;
   while(length) {
@@ -340,7 +347,7 @@ static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
       /* FIXME: Check for overflow. */
       len = length;
     }
-    do_sec_send(conn, fd, buffer, len);
+    do_sec_send(conn, fd, buffer, curlx_sztosi(len));
     length -= len;
     buffer += len;
     tx += len;
@@ -365,14 +372,20 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer,
   int decoded_len;
   char *buf;
   int ret_code;
+  size_t decoded_sz = 0;
+  CURLcode error;
 
   DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
 
-  decoded_len = Curl_base64_decode(buffer + 4, (unsigned char **)&buf);
-  if(decoded_len <= 0) {
+  error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz);
+  if(error || decoded_sz == 0)
+    return -1;
+
+  if(decoded_sz > (size_t)INT_MAX) {
     free(buf);
     return -1;
   }
+  decoded_len = curlx_uztosi(decoded_sz);
 
   decoded_len = conn->mech->decode(conn->app_data, buf, decoded_len,
                                    level, conn);
@@ -485,7 +498,7 @@ static CURLcode choose_mech(struct connectdata *conn)
     /* We have no mechanism with a NULL name but keep this check */
     DEBUGASSERT(mech_name != NULL);
     if(mech_name == NULL) {
-      infof(data, "Skipping mechanism with empty name (%p)\n", mech);
+      infof(data, "Skipping mechanism with empty name (%p)\n", (void *)mech);
       continue;
     }
     tmp_allocation = realloc(conn->app_data, (*mech)->size);
@@ -522,7 +535,7 @@ static CURLcode choose_mech(struct connectdata *conn)
         break;
       default:
         if(ret/100 == 5) {
-          infof(data, "The server does not support the security extensions.\n");
+          infof(data, "server does not support the security extensions\n");
           return CURLE_USE_SSL_FAILED;
         }
         break;
index e6882da..db7fb6d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
 
 #if !defined(HAVE_SELECT) && !defined(HAVE_POLL_FINE)
 #error "We can't compile without select() or poll() support."
 #include "urldata.h"
 #include "connect.h"
 #include "select.h"
-
-/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1] */
-
-#if defined(USE_WINSOCK) || defined(TPF)
-#define VERIFY_SOCK(x) do { } while(0)
-#else
-#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
-#define VERIFY_SOCK(x) do { \
-  if(!VALID_SOCK(x)) { \
-    SET_SOCKERRNO(EINVAL); \
-    return -1; \
-  } \
-} while(0)
-#endif
+#include "warnless.h"
 
 /* Convenience local macros */
 
 #define elapsed_ms  (int)curlx_tvdiff(curlx_tvnow(), initial_tv)
 
-#ifdef CURL_ACKNOWLEDGE_EINTR
-#define error_not_EINTR (1)
-#else
-#define error_not_EINTR (error != EINTR)
-#endif
+int Curl_ack_eintr = 0;
+#define error_not_EINTR (Curl_ack_eintr || error != EINTR)
 
 /*
  * Internal function used for waiting a specific amount of ms
  * Timeout resolution, accuracy, as well as maximum supported
  * value is system dependent, neither factor is a citical issue
  * for the intended use of this function in the library.
- * On non-DOS and non-Winsock platforms, when compiled with
- * CURL_ACKNOWLEDGE_EINTR defined, EINTR condition is honored
- * and function might exit early without awaiting full timeout,
- * otherwise EINTR will be ignored and full timeout will elapse.
  *
  * Return values:
  *   -1 = system call error, invalid timeout value, or interrupted
  *    0 = specified timeout has elapsed
  */
-static int wait_ms(int timeout_ms)
+int Curl_wait_ms(int timeout_ms)
 {
 #if !defined(MSDOS) && !defined(USE_WINSOCK)
 #ifndef HAVE_POLL_FINE
@@ -141,28 +118,32 @@ static int wait_ms(int timeout_ms)
 }
 
 /*
- * This is an internal function used for waiting for read or write
- * events on a pair of file descriptors.  It uses poll() when a fine
- * poll() is available, in order to avoid limits with FD_SETSIZE,
- * otherwise select() is used.  An error is returned if select() is
- * being used and a file descriptor is too large for FD_SETSIZE.
+ * Wait for read or write events on a set of file descriptors. It uses poll()
+ * when a fine poll() is available, in order to avoid limits with FD_SETSIZE,
+ * otherwise select() is used.  An error is returned if select() is being used
+ * and a file descriptor is too large for FD_SETSIZE.
+ *
  * A negative timeout value makes this function wait indefinitely,
  * unles no valid file descriptor is given, when this happens the
  * negative timeout is ignored and the function times out immediately.
- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
- * is honored and function might exit early without awaiting timeout,
- * otherwise EINTR will be ignored.
  *
  * Return values:
  *   -1 = system call error or fd >= FD_SETSIZE
  *    0 = timeout
- *    CURL_CSELECT_IN | CURL_CSELECT_OUT | CURL_CSELECT_ERR
+ *    [bitmask] = action as described below
+ *
+ * CURL_CSELECT_IN - first socket is readable
+ * CURL_CSELECT_IN2 - second socket is readable
+ * CURL_CSELECT_OUT - write socket is writable
+ * CURL_CSELECT_ERR - an error condition occurred
  */
-int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
-                      int timeout_ms)
+int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
+                      curl_socket_t readfd1,
+                      curl_socket_t writefd, /* socket to write to */
+                      long timeout_ms)       /* milliseconds to wait */
 {
 #ifdef HAVE_POLL_FINE
-  struct pollfd pfd[2];
+  struct pollfd pfd[3];
   int num;
 #else
   struct timeval pending_tv;
@@ -178,8 +159,10 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
   int r;
   int ret;
 
-  if((readfd == CURL_SOCKET_BAD) && (writefd == CURL_SOCKET_BAD)) {
-    r = wait_ms(timeout_ms);
+  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
+     (writefd == CURL_SOCKET_BAD)) {
+    /* no sockets, just wait */
+    r = Curl_wait_ms((int)timeout_ms);
     return r;
   }
 
@@ -189,15 +172,21 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
      value indicating a blocking call should be performed. */
 
   if(timeout_ms > 0) {
-    pending_ms = timeout_ms;
+    pending_ms = (int)timeout_ms;
     initial_tv = curlx_tvnow();
   }
 
 #ifdef HAVE_POLL_FINE
 
   num = 0;
-  if(readfd != CURL_SOCKET_BAD) {
-    pfd[num].fd = readfd;
+  if(readfd0 != CURL_SOCKET_BAD) {
+    pfd[num].fd = readfd0;
+    pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI;
+    pfd[num].revents = 0;
+    num++;
+  }
+  if(readfd1 != CURL_SOCKET_BAD) {
+    pfd[num].fd = readfd1;
     pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI;
     pfd[num].revents = 0;
     num++;
@@ -221,9 +210,11 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
     if(error && error_not_EINTR)
       break;
     if(timeout_ms > 0) {
-      pending_ms = timeout_ms - elapsed_ms;
-      if(pending_ms <= 0)
+      pending_ms = (int)(timeout_ms - elapsed_ms);
+      if(pending_ms <= 0) {
+        r = 0;  /* Simulate a "call timed out" case */
         break;
+      }
     }
   } while(r == -1);
 
@@ -234,13 +225,20 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
 
   ret = 0;
   num = 0;
-  if(readfd != CURL_SOCKET_BAD) {
+  if(readfd0 != CURL_SOCKET_BAD) {
     if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP))
       ret |= CURL_CSELECT_IN;
     if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL))
       ret |= CURL_CSELECT_ERR;
     num++;
   }
+  if(readfd1 != CURL_SOCKET_BAD) {
+    if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP))
+      ret |= CURL_CSELECT_IN2;
+    if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL))
+      ret |= CURL_CSELECT_ERR;
+    num++;
+  }
   if(writefd != CURL_SOCKET_BAD) {
     if(pfd[num].revents & (POLLWRNORM|POLLOUT))
       ret |= CURL_CSELECT_OUT;
@@ -256,11 +254,18 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
   maxfd = (curl_socket_t)-1;
 
   FD_ZERO(&fds_read);
-  if(readfd != CURL_SOCKET_BAD) {
-    VERIFY_SOCK(readfd);
-    FD_SET(readfd, &fds_read);
-    FD_SET(readfd, &fds_err);
-    maxfd = readfd;
+  if(readfd0 != CURL_SOCKET_BAD) {
+    VERIFY_SOCK(readfd0);
+    FD_SET(readfd0, &fds_read);
+    FD_SET(readfd0, &fds_err);
+    maxfd = readfd0;
+  }
+  if(readfd1 != CURL_SOCKET_BAD) {
+    VERIFY_SOCK(readfd1);
+    FD_SET(readfd1, &fds_read);
+    FD_SET(readfd1, &fds_err);
+    if(readfd1 > maxfd)
+      maxfd = readfd1;
   }
 
   FD_ZERO(&fds_write);
@@ -291,8 +296,10 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
       break;
     if(timeout_ms > 0) {
       pending_ms = timeout_ms - elapsed_ms;
-      if(pending_ms <= 0)
+      if(pending_ms <= 0) {
+        r = 0;  /* Simulate a "call timed out" case */
         break;
+      }
     }
   } while(r == -1);
 
@@ -302,10 +309,16 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
     return 0;
 
   ret = 0;
-  if(readfd != CURL_SOCKET_BAD) {
-    if(FD_ISSET(readfd, &fds_read))
+  if(readfd0 != CURL_SOCKET_BAD) {
+    if(FD_ISSET(readfd0, &fds_read))
       ret |= CURL_CSELECT_IN;
-    if(FD_ISSET(readfd, &fds_err))
+    if(FD_ISSET(readfd0, &fds_err))
+      ret |= CURL_CSELECT_ERR;
+  }
+  if(readfd1 != CURL_SOCKET_BAD) {
+    if(FD_ISSET(readfd1, &fds_read))
+      ret |= CURL_CSELECT_IN2;
+    if(FD_ISSET(readfd1, &fds_err))
       ret |= CURL_CSELECT_ERR;
   }
   if(writefd != CURL_SOCKET_BAD) {
@@ -328,9 +341,6 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
  * A negative timeout value makes this function wait indefinitely,
  * unles no valid file descriptor is given, when this happens the
  * negative timeout is ignored and the function times out immediately.
- * When compiled with CURL_ACKNOWLEDGE_EINTR defined, EINTR condition
- * is honored and function might exit early without awaiting timeout,
- * otherwise EINTR will be ignored.
  *
  * Return values:
  *   -1 = system call error or fd >= FD_SETSIZE
@@ -355,7 +365,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
   int r;
 
   if(ufds) {
-    for (i = 0; i < nfds; i++) {
+    for(i = 0; i < nfds; i++) {
       if(ufds[i].fd != CURL_SOCKET_BAD) {
         fds_none = FALSE;
         break;
@@ -363,7 +373,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
     }
   }
   if(fds_none) {
-    r = wait_ms(timeout_ms);
+    r = Curl_wait_ms(timeout_ms);
     return r;
   }
 
@@ -402,7 +412,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
   if(r == 0)
     return 0;
 
-  for (i = 0; i < nfds; i++) {
+  for(i = 0; i < nfds; i++) {
     if(ufds[i].fd == CURL_SOCKET_BAD)
       continue;
     if(ufds[i].revents & POLLHUP)
@@ -418,7 +428,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
   FD_ZERO(&fds_err);
   maxfd = (curl_socket_t)-1;
 
-  for (i = 0; i < nfds; i++) {
+  for(i = 0; i < nfds; i++) {
     ufds[i].revents = 0;
     if(ufds[i].fd == CURL_SOCKET_BAD)
       continue;
@@ -466,7 +476,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
     return 0;
 
   r = 0;
-  for (i = 0; i < nfds; i++) {
+  for(i = 0; i < nfds; i++) {
     ufds[i].revents = 0;
     if(ufds[i].fd == CURL_SOCKET_BAD)
       continue;
index e431e5f..c00afe1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SELECT_H
-#define __SELECT_H
+#ifndef HEADER_CURL_SELECT_H
+#define HEADER_CURL_SELECT_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
 #endif
 
 /*
- * poll() function on Windows Vista and later is called WSAPoll()
- */
-
-#if defined(USE_WINSOCK) && (USE_WINSOCK > 1) && \
-    defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
-#  undef  HAVE_POLL
-#  define HAVE_POLL 1
-#  undef  HAVE_POLL_FINE
-#  define HAVE_POLL_FINE 1
-#  define poll(x,y,z) WSAPoll((x),(y),(z))
-#  if defined(_MSC_VER) && defined(POLLRDNORM)
-#    undef  POLLPRI
-#    define POLLPRI POLLRDBAND
-#    define HAVE_STRUCT_POLLFD 1
-#  endif
-#endif
-
-/*
  * Definition of pollfd struct and constants for platforms lacking them.
  */
 
@@ -84,14 +66,49 @@ struct pollfd
 #define POLLRDBAND POLLPRI
 #endif
 
-int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
-                      int timeout_ms);
+/* there are three CSELECT defines that are defined in the public header that
+   are exposed to users, but this *IN2 bit is only ever used internally and
+   therefore defined here */
+#define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1)
+
+int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2,
+                      curl_socket_t writefd,
+                      long timeout_ms);
+
+/* provide the former API internally */
+#define Curl_socket_ready(x,y,z) \
+  Curl_socket_check(x, CURL_SOCKET_BAD, y, z)
 
 int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
 
+/* On non-DOS and non-Winsock platforms, when Curl_ack_eintr is set,
+ * EINTR condition is honored and function might exit early without
+ * awaiting full timeout.  Otherwise EINTR will be ignored and full
+ * timeout will elapse. */
+extern int Curl_ack_eintr;
+
+int Curl_wait_ms(int timeout_ms);
+
 #ifdef TPF
 int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
                        fd_set* excepts, struct timeval* tv);
 #endif
 
-#endif /* __SELECT_H */
+/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1], which
+   unfortunately makes it impossible for us to easily check if they're valid
+*/
+#if defined(USE_WINSOCK) || defined(TPF)
+#define VALID_SOCK(x) 1
+#define VERIFY_SOCK(x) Curl_nop_stmt
+#else
+#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
+#define VERIFY_SOCK(x) do { \
+  if(!VALID_SOCK(x)) { \
+    SET_SOCKERRNO(EINVAL); \
+    return -1; \
+  } \
+} WHILE_FALSE
+#endif
+
+#endif /* HEADER_CURL_SELECT_H */
+
index d04371f..d5bf172 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* required for send() & recv() prototypes */
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "curl_setup.h"
 
 #include <curl/curl.h>
+
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"
 #include "sslgen.h"
 #include "ssh.h"
 #include "multiif.h"
-#include "rtsp.h"
+#include "non-ascii.h"
 
 #define _MPRINTF_REPLACE /* use the internal *printf() functions */
 #include <curl/mprintf.h>
 #define Curl_sec_read(a,b,c,d) -1
 #endif
 
-#include <string.h>
 #include "curl_memory.h"
 #include "strerror.h"
-#include "easyif.h" /* for the Curl_convert_from_network prototype */
+
 /* The last #include file should be: */
 #include "memdebug.h"
 
@@ -79,7 +66,7 @@ static size_t convert_lineends(struct SessionHandle *data,
     return(size);
   }
 
-  if(data->state.prev_block_had_trailing_cr == TRUE) {
+  if(data->state.prev_block_had_trailing_cr) {
     /* The previous block of incoming data
        had a trailing CR, which was turned into a LF. */
     if(*startPtr == '\n') {
@@ -270,7 +257,7 @@ CURLcode Curl_write(struct connectdata *conn,
 
   default:
     /* we got a specific curlcode, forward it */
-    return (CURLcode)curlcode;
+    return curlcode;
   }
 }
 
@@ -298,7 +285,8 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num,
       /* this is just a case of EWOULDBLOCK */
       bytes_written=0;
       *code = CURLE_AGAIN;
-    } else {
+    }
+    else {
       failf(conn->data, "Send failure: %s",
             Curl_strerror(conn, err));
       conn->data->state.os_errno = err;
@@ -353,7 +341,8 @@ ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
       ) {
       /* this is just a case of EWOULDBLOCK */
       *code = CURLE_AGAIN;
-    } else {
+    }
+    else {
       failf(conn->data, "Recv failure: %s",
             Curl_strerror(conn, err));
       conn->data->state.os_errno = err;
@@ -441,15 +430,13 @@ CURLcode Curl_client_write(struct connectdata *conn,
   }
 
   if(type & CLIENTWRITE_BODY) {
-    if((conn->protocol&PROT_FTP) && conn->proto.ftpc.transfertype == 'A') {
-#ifdef CURL_DOES_CONVERSIONS
+    if((conn->handler->protocol&CURLPROTO_FTP) &&
+       conn->proto.ftpc.transfertype == 'A') {
       /* convert from the network encoding */
-      size_t rc;
-      rc = Curl_convert_from_network(data, ptr, len);
+      CURLcode rc = Curl_convert_from_network(data, ptr, len);
       /* Curl_convert_from_network calls failf if unsuccessful */
-      if(rc != CURLE_OK)
+      if(rc)
         return rc;
-#endif /* CURL_DOES_CONVERSIONS */
 
 #ifdef CURL_DO_LINEEND_CONV
       /* convert end-of-line markers */
@@ -533,17 +520,16 @@ CURLcode Curl_read_plain(curl_socket_t sockfd,
  * Returns a regular CURLcode value.
  */
 CURLcode Curl_read(struct connectdata *conn, /* connection data */
-              curl_socket_t sockfd,     /* read from this socket */
-              char *buf,                /* store read data here */
-              size_t sizerequested,     /* max amount to read */
-              ssize_t *n)               /* amount bytes read */
+                   curl_socket_t sockfd,     /* read from this socket */
+                   char *buf,                /* store read data here */
+                   size_t sizerequested,     /* max amount to read */
+                   ssize_t *n)               /* amount bytes read */
 {
   CURLcode curlcode = CURLE_RECV_ERROR;
   ssize_t nread = 0;
   size_t bytesfromsocket = 0;
   char *buffertofill = NULL;
-  bool pipelining = (bool)(conn->data->multi &&
-                     Curl_multi_canPipeline(conn->data->multi));
+  bool pipelining = Curl_multi_pipeline_enabled(conn->data->multi);
 
   /* Set 'num' to 0 or 1, depending on which socket that has been sent here.
      If it is the second socket, we set num to 1. Otherwise to 0. This lets
@@ -622,7 +608,7 @@ static int showit(struct SessionHandle *data, curl_infotype type,
       size_t i;
       for(i = 0; i < size-4; i++) {
         if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) {
-          /* convert everthing through this CRLFCRLF but no further */
+          /* convert everything through this CRLFCRLF but no further */
           conv_size = i + 4;
           break;
         }
index 8f0ea24..39489e4 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
                     const char *fmt, ...);
@@ -32,9 +32,9 @@ void Curl_failf(struct SessionHandle *, const char *fmt, ...);
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
 
 #if defined(HAVE_VARIADIC_MACROS_C99)
-#define infof(...)  do { } while (0)
+#define infof(...)  Curl_nop_stmt
 #elif defined(HAVE_VARIADIC_MACROS_GCC)
-#define infof(x...)  do { } while (0)
+#define infof(x...)  Curl_nop_stmt
 #else
 #define infof (void)
 #endif
index cdeefe3..319efec 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -38,6 +38,8 @@ typedef unsigned long   u_int32_t;
 #include <sys/socket.h>
 #include <netdb.h>
 #include <qsossl.h>
+#include <gskssl.h>
+#include <qsoasync.h>
 #include <gssapi.h>
 
 extern int      Curl_getaddrinfo_a(const char * nodename, const char * servname,
@@ -68,6 +70,93 @@ extern char *   Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp);
 #define SSL_Strerror            Curl_SSL_Strerror_a
 
 
+/* GSKit wrappers. */
+
+extern int      Curl_gsk_environment_open(gsk_handle * my_env_handle);
+#define gsk_environment_open    Curl_gsk_environment_open
+
+extern int      Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+                                         gsk_handle * my_session_handle);
+#define gsk_secure_soc_open     Curl_gsk_secure_soc_open
+
+extern int      Curl_gsk_environment_close(gsk_handle * my_env_handle);
+#define gsk_environment_close   Curl_gsk_environment_close
+
+extern int      Curl_gsk_secure_soc_close(gsk_handle * my_session_handle);
+#define gsk_secure_soc_close    Curl_gsk_secure_soc_close
+
+extern int      Curl_gsk_environment_init(gsk_handle my_env_handle);
+#define gsk_environment_init    Curl_gsk_environment_init
+
+extern int      Curl_gsk_secure_soc_init(gsk_handle my_session_handle);
+#define gsk_secure_soc_init     Curl_gsk_secure_soc_init
+
+extern int      Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle,
+                                                GSK_BUF_ID bufID,
+                                                const char * buffer,
+                                                int bufSize);
+#define gsk_attribute_set_buffer        Curl_gsk_attribute_set_buffer_a
+
+extern int      Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle,
+                                            GSK_ENUM_ID enumID,
+                                            GSK_ENUM_VALUE enumValue);
+#define gsk_attribute_set_enum  Curl_gsk_attribute_set_enum
+
+extern int      Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
+                                                     GSK_NUM_ID numID,
+                                                     int numValue);
+#define gsk_attribute_set_numeric_value Curl_gsk_attribute_set_numeric_value
+
+extern int      Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
+                                                GSK_CALLBACK_ID callBackID,
+                                                void * callBackAreaPtr);
+#define gsk_attribute_set_callback      Curl_gsk_attribute_set_callback
+
+extern int      Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle,
+                                                GSK_BUF_ID bufID,
+                                                const char * * buffer,
+                                                int * bufSize);
+#define gsk_attribute_get_buffer        Curl_gsk_attribute_get_buffer_a
+
+extern int      Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle,
+                                            GSK_ENUM_ID enumID,
+                                            GSK_ENUM_VALUE * enumValue);
+#define gsk_attribute_get_enum  Curl_gsk_attribute_get_enum
+
+extern int      Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
+                                                     GSK_NUM_ID numID,
+                                                     int * numValue);
+#define gsk_attribute_get_numeric_value Curl_gsk_attribute_get_numeric_value
+
+extern int      Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
+                                 GSK_CERT_ID certID,
+                                 const gsk_cert_data_elem * * certDataElem,
+                                 int * certDataElementCount);
+#define gsk_attribute_get_cert_info     Curl_gsk_attribute_get_cert_info
+
+extern int      Curl_gsk_secure_soc_misc(gsk_handle my_session_handle,
+                                         GSK_MISC_ID miscID);
+#define gsk_secure_soc_misc     Curl_gsk_secure_soc_misc
+
+extern int      Curl_gsk_secure_soc_read(gsk_handle my_session_handle,
+                                         char * readBuffer,
+                                         int readBufSize, int * amtRead);
+#define gsk_secure_soc_read     Curl_gsk_secure_soc_read
+
+extern int      Curl_gsk_secure_soc_write(gsk_handle my_session_handle,
+                                          char * writeBuffer,
+                                          int writeBufSize, int * amtWritten);
+#define gsk_secure_soc_write    Curl_gsk_secure_soc_write
+
+extern const char *     Curl_gsk_strerror_a(int gsk_return_value);
+#define gsk_strerror    Curl_gsk_strerror_a
+
+extern int      Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
+                                      int IOCompletionPort,
+                                      Qso_OverlappedIO_t * communicationsArea);
+#define gsk_secure_soc_startInit        Curl_gsk_secure_soc_startInit
+
+
 /* GSSAPI wrappers. */
 
 extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status,
@@ -107,6 +196,7 @@ extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
                                                gss_buffer_t output_token);
 #define gss_delete_sec_context  Curl_gss_delete_sec_context_a
 
+
 /* LDAP wrappers. */
 
 #define BerValue                struct berval
diff --git a/lib/setup-vms.h b/lib/setup-vms.h
new file mode 100644 (file)
index 0000000..f5eedf7
--- /dev/null
@@ -0,0 +1,399 @@
+#ifndef HEADER_CURL_SETUP_VMS_H
+#define HEADER_CURL_SETUP_VMS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
+
+/*                                                                         */
+/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for  */
+/*                getenv(), getpwuid() and provide is_vms_shell()          */
+/*                Also need upper case symbols for system services, and    */
+/*                OpenSSL, and some Kerberos image                         */
+
+#ifdef __DECC
+#pragma message save
+#pragma message disable dollarid
+#endif
+
+/* Hide the stuff we are overriding */
+#define getenv decc_getenv
+#ifdef __DECC
+#   if __INITIAL_POINTER_SIZE != 64
+#       define getpwuid decc_getpwuid
+#   endif
+#endif
+#include <stdlib.h>
+    char * decc$getenv(const char * __name);
+#include <pwd.h>
+
+#include <string.h>
+#include <unixlib.h>
+
+#undef getenv
+#undef getpwuid
+#define getenv vms_getenv
+#define getpwuid vms_getpwuid
+
+/* VAX needs these in upper case when compiling exact case */
+#define sys$assign SYS$ASSIGN
+#define sys$dassgn SYS$DASSGN
+#define sys$qiow SYS$QIOW
+
+#ifdef __DECC
+#   if __INITIAL_POINTER_SIZE
+#       pragma __pointer_size __save
+#   endif
+#endif
+
+#if __USE_LONG_GID_T
+#   define decc_getpwuid DECC$__LONG_GID_GETPWUID
+#else
+#   if __INITIAL_POINTER_SIZE
+#       define decc_getpwuid decc$__32_getpwuid
+#   else
+#       define decc_getpwuid decc$getpwuid
+#   endif
+#endif
+
+    struct passwd * decc_getpwuid(uid_t uid);
+
+#ifdef __DECC
+#   if __INITIAL_POINTER_SIZE == 32
+/* Translate the path, but only if the path is a VMS file specification */
+/* The translation is usually only needed for older versions of VMS */
+static char * vms_translate_path(const char * path) {
+char * unix_path;
+char * test_str;
+
+    /* See if the result is in VMS format, if not, we are done */
+    /* Assume that this is a PATH, not just some data */
+    test_str = strpbrk(path, ":[<^");
+    if(test_str == NULL) {
+      return (char *)path;
+    }
+
+    unix_path = decc$translate_vms(path);
+
+    if((int)unix_path <= 0) {
+      /* We can not translate it, so return the original string */
+      return (char *)path;
+    }
+}
+#   else
+    /* VMS translate path is actually not needed on the current 64 bit */
+    /* VMS platforms, so instead of figuring out the pointer settings */
+    /* Change it to a noop */
+#   define vms_translate_path(__path) __path
+#   endif
+#endif
+
+#ifdef __DECC
+#   if __INITIAL_POINTER_SIZE
+#       pragma __pointer_size __restore
+#   endif
+#endif
+
+static char * vms_getenv(const char * envvar) {
+
+char * result;
+char * vms_path;
+
+    /* first use the DECC getenv() function */
+    result = decc$getenv(envvar);
+    if(result == NULL) {
+      return result;
+    }
+
+    vms_path = result;
+    result = vms_translate_path(vms_path);
+
+    /* note that if you backport this to use VAX C RTL, that the VAX C RTL */
+    /* may do a malloc(2048) for each call to getenv(), so you will need   */
+    /* to add a free(vms_path) */
+    /* Do not do a free() for DEC C RTL builds, which should be used for */
+    /* VMS 5.5-2 and later, even if using GCC */
+
+    return result;
+}
+
+
+static struct passwd vms_passwd_cache;
+
+static struct passwd * vms_getpwuid(uid_t uid) {
+
+struct passwd * my_passwd;
+
+/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */
+#ifdef __DECC
+#   if __INITIAL_POINTER_SIZE
+__char_ptr32 unix_path;
+#   else
+char * unix_path;
+#   endif
+#else
+char * unix_path;
+#endif
+
+    my_passwd = decc_getpwuid(uid);
+    if(my_passwd == NULL) {
+      return my_passwd;
+    }
+
+    unix_path = vms_translate_path(my_passwd->pw_dir);
+
+    if((long)unix_path <= 0) {
+      /* We can not translate it, so return the original string */
+      return my_passwd;
+    }
+
+    /* If no changes needed just return it */
+    if(unix_path == my_passwd->pw_dir) {
+      return my_passwd;
+    }
+
+    /* Need to copy the structure returned */
+    /* Since curl is only using pw_dir, no need to fix up *
+    /* the pw_shell when running under Bash */
+    vms_passwd_cache.pw_name = my_passwd->pw_name;
+    vms_passwd_cache.pw_uid = my_passwd->pw_uid;
+    vms_passwd_cache.pw_gid = my_passwd->pw_uid;
+    vms_passwd_cache.pw_dir = unix_path;
+    vms_passwd_cache.pw_shell = my_passwd->pw_shell;
+
+    return &vms_passwd_cache;
+}
+
+#ifdef __DECC
+#pragma message restore
+#endif
+
+/* Bug - VMS OpenSSL and Kerberos universal symbols are in uppercase only */
+/* VMS libraries should have universal symbols in exact and uppercase */
+
+#define ASN1_INTEGER_get ASN1_INTEGER_GET
+#define ASN1_STRING_data ASN1_STRING_DATA
+#define ASN1_STRING_length ASN1_STRING_LENGTH
+#define ASN1_STRING_print ASN1_STRING_PRINT
+#define ASN1_STRING_to_UTF8 ASN1_STRING_TO_UTF8
+#define ASN1_STRING_type ASN1_STRING_TYPE
+#define BIO_ctrl BIO_CTRL
+#define BIO_free BIO_FREE
+#define BIO_new BIO_NEW
+#define BIO_s_mem BIO_S_MEM
+#define BN_bn2bin BN_BN2BIN
+#define BN_num_bits BN_NUM_BITS
+#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
+#define CRYPTO_free CRYPTO_FREE
+#define CRYPTO_malloc CRYPTO_MALLOC
+#define DES_ecb_encrypt DES_ECB_ENCRYPT
+#define DES_set_key DES_SET_KEY
+#define DES_set_odd_parity DES_SET_ODD_PARITY
+#define ENGINE_ctrl ENGINE_CTRL
+#define ENGINE_ctrl_cmd ENGINE_CTRL_CMD
+#define ENGINE_finish ENGINE_FINISH
+#define ENGINE_free ENGINE_FREE
+#define ENGINE_get_first ENGINE_GET_FIRST
+#define ENGINE_get_id ENGINE_GET_ID
+#define ENGINE_get_next ENGINE_GET_NEXT
+#define ENGINE_init ENGINE_INIT
+#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
+#define ENGINE_load_private_key ENGINE_LOAD_PRIVATE_KEY
+#define ENGINE_set_default ENGINE_SET_DEFAULT
+#define ERR_clear_error ERR_CLEAR_ERROR
+#define ERR_error_string ERR_ERROR_STRING
+#define ERR_error_string_n ERR_ERROR_STRING_N
+#define ERR_free_strings ERR_FREE_STRINGS
+#define ERR_get_error ERR_GET_ERROR
+#define ERR_peek_error ERR_PEEK_ERROR
+#define ERR_remove_state ERR_REMOVE_STATE
+#define EVP_PKEY_copy_parameters EVP_PKEY_COPY_PARAMETERS
+#define EVP_PKEY_free EVP_PKEY_FREE
+#define EVP_cleanup EVP_CLEANUP
+#define GENERAL_NAMES_free GENERAL_NAMES_FREE
+#define MD4_Final MD4_FINAL
+#define MD4_Init MD4_INIT
+#define MD4_Update MD4_UPDATE
+#define MD5_Final MD5_FINAL
+#define MD5_Init MD5_INIT
+#define MD5_Update MD5_UPDATE
+#define OPENSSL_add_all_algo_noconf OPENSSL_ADD_ALL_ALGO_NOCONF
+#define PEM_read_X509 PEM_READ_X509
+#define PEM_write_bio_X509 PEM_WRITE_BIO_X509
+#define PKCS12_PBE_add PKCS12_PBE_ADD
+#define PKCS12_free PKCS12_FREE
+#define PKCS12_parse PKCS12_PARSE
+#define RAND_add RAND_ADD
+#define RAND_bytes RAND_BYTES
+#define RAND_egd RAND_EGD
+#define RAND_file_name RAND_FILE_NAME
+#define RAND_load_file RAND_LOAD_FILE
+#define RAND_status RAND_STATUS
+#define SSL_CIPHER_get_name SSL_CIPHER_GET_NAME
+#define SSL_CTX_add_client_CA SSL_CTX_ADD_CLIENT_CA
+#define SSL_CTX_callback_ctrl SSL_CTX_CALLBACK_CTRL
+#define SSL_CTX_check_private_key SSL_CTX_CHECK_PRIVATE_KEY
+#define SSL_CTX_ctrl SSL_CTX_CTRL
+#define SSL_CTX_free SSL_CTX_FREE
+#define SSL_CTX_get_cert_store SSL_CTX_GET_CERT_STORE
+#define SSL_CTX_load_verify_locations SSL_CTX_LOAD_VERIFY_LOCATIONS
+#define SSL_CTX_new SSL_CTX_NEW
+#define SSL_CTX_set_cipher_list SSL_CTX_SET_CIPHER_LIST
+#define SSL_CTX_set_def_passwd_cb_ud SSL_CTX_SET_DEF_PASSWD_CB_UD
+#define SSL_CTX_set_default_passwd_cb SSL_CTX_SET_DEFAULT_PASSWD_CB
+#define SSL_CTX_set_verify SSL_CTX_SET_VERIFY
+#define SSL_CTX_use_PrivateKey SSL_CTX_USE_PRIVATEKEY
+#define SSL_CTX_use_PrivateKey_file SSL_CTX_USE_PRIVATEKEY_FILE
+#define SSL_CTX_use_cert_chain_file SSL_CTX_USE_CERT_CHAIN_FILE
+#define SSL_CTX_use_certificate SSL_CTX_USE_CERTIFICATE
+#define SSL_CTX_use_certificate_file SSL_CTX_USE_CERTIFICATE_FILE
+#define SSL_SESSION_free SSL_SESSION_FREE
+#define SSL_connect SSL_CONNECT
+#define SSL_free SSL_FREE
+#define SSL_get1_session SSL_GET1_SESSION
+#define SSL_get_certificate SSL_GET_CERTIFICATE
+#define SSL_get_current_cipher SSL_GET_CURRENT_CIPHER
+#define SSL_get_error SSL_GET_ERROR
+#define SSL_get_peer_cert_chain SSL_GET_PEER_CERT_CHAIN
+#define SSL_get_peer_certificate SSL_GET_PEER_CERTIFICATE
+#define SSL_get_privatekey SSL_GET_PRIVATEKEY
+#define SSL_get_shutdown SSL_GET_SHUTDOWN
+#define SSL_get_verify_result SSL_GET_VERIFY_RESULT
+#define SSL_library_init SSL_LIBRARY_INIT
+#define SSL_load_error_strings SSL_LOAD_ERROR_STRINGS
+#define SSL_new SSL_NEW
+#define SSL_peek SSL_PEEK
+#define SSL_pending SSL_PENDING
+#define SSL_read SSL_READ
+#define SSL_set_connect_state SSL_SET_CONNECT_STATE
+#define SSL_set_fd SSL_SET_FD
+#define SSL_set_session SSL_SET_SESSION
+#define SSL_shutdown SSL_SHUTDOWN
+#define SSL_write SSL_WRITE
+#define SSLeay SSLEAY
+#define SSLv23_client_method SSLV23_CLIENT_METHOD
+#define SSLv3_client_method SSLV3_CLIENT_METHOD
+#define TLSv1_client_method TLSV1_CLIENT_METHOD
+#define UI_OpenSSL UI_OPENSSL
+#define X509V3_EXT_print X509V3_EXT_PRINT
+#define X509_EXTENSION_get_critical X509_EXTENSION_GET_CRITICAL
+#define X509_EXTENSION_get_object X509_EXTENSION_GET_OBJECT
+#define X509_LOOKUP_file X509_LOOKUP_FILE
+#define X509_NAME_ENTRY_get_data X509_NAME_ENTRY_GET_DATA
+#define X509_NAME_get_entry X509_NAME_GET_ENTRY
+#define X509_NAME_get_index_by_NID X509_NAME_GET_INDEX_BY_NID
+#define X509_NAME_print_ex X509_NAME_PRINT_EX
+#define X509_STORE_CTX_get_current_cert X509_STORE_CTX_GET_CURRENT_CERT
+#define X509_STORE_add_lookup X509_STORE_ADD_LOOKUP
+#define X509_STORE_set_flags X509_STORE_SET_FLAGS
+#define X509_check_issued X509_CHECK_ISSUED
+#define X509_free X509_FREE
+#define X509_get_ext_d2i X509_GET_EXT_D2I
+#define X509_get_issuer_name X509_GET_ISSUER_NAME
+#define X509_get_pubkey X509_GET_PUBKEY
+#define X509_get_serialNumber X509_GET_SERIALNUMBER
+#define X509_get_subject_name X509_GET_SUBJECT_NAME
+#define X509_load_crl_file X509_LOAD_CRL_FILE
+#define X509_verify_cert_error_string X509_VERIFY_CERT_ERROR_STRING
+#define d2i_PKCS12_fp D2I_PKCS12_FP
+#define i2t_ASN1_OBJECT I2T_ASN1_OBJECT
+#define sk_num SK_NUM
+#define sk_pop SK_POP
+#define sk_pop_free SK_POP_FREE
+#define sk_value SK_VALUE
+
+#define USE_UPPERCASE_GSSAPI 1
+#define gss_seal GSS_SEAL
+#define gss_unseal GSS_UNSEAL
+
+#define USE_UPPERCASE_KRBAPI 1
+
+/* AI_NUMERICHOST needed for IP V6 support in Curl */
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#ifndef AI_NUMERICHOST
+#ifdef ENABLE_IPV6
+#undef ENABLE_IPV6
+#endif
+#endif
+#endif
+
+/* VAX symbols are always in uppercase */
+#ifdef __VAX
+#define inflate INFLATE
+#define inflateEnd INFLATEEND
+#define inflateInit2_ INFLATEINIT2_
+#define inflateInit_ INFLATEINIT_
+#define zlibVersion ZLIBVERSION
+#endif
+
+/* Older VAX OpenSSL port defines these as Macros */
+/* Need to include the headers first and then redefine */
+/* that way a newer port will also work if some one has one */
+#ifdef __VAX
+
+#   if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+#       define des_set_odd_parity DES_SET_ODD_PARITY
+#       define des_set_key DES_SET_KEY
+#       define des_ecb_encrypt DES_ECB_ENCRYPT
+
+#   endif
+#   include <openssl/evp.h>
+#   ifndef OpenSSL_add_all_algorithms
+#       define OpenSSL_add_all_algorithms OPENSSL_ADD_ALL_ALGORITHMS
+        void OPENSSL_ADD_ALL_ALGORITHMS(void);
+#   endif
+
+    /* Curl defines these to lower case and VAX needs them in upper case */
+    /* So we need static routines */
+#   if (OPENSSL_VERSION_NUMBER < 0x00907001L)
+
+#       undef des_set_odd_parity
+#       undef DES_set_odd_parity
+#       undef des_set_key
+#       undef DES_set_key
+#       undef des_ecb_encrypt
+#       undef DES_ecb_encrypt
+
+        static void des_set_odd_parity(des_cblock *key) {
+            DES_SET_ODD_PARITY(key);
+        }
+
+        static int des_set_key(const_des_cblock *key,
+                               des_key_schedule schedule) {
+            return DES_SET_KEY(key, schedule);
+        }
+
+        static void des_ecb_encrypt(const_des_cblock *input,
+                                    des_cblock *output,
+                                    des_key_schedule ks,int enc) {
+            DES_ECB_ENCRYPT(input, output, ks, enc);
+        }
+#endif
+/* Need this to stop a macro redefinition error */
+#if OPENSSL_VERSION_NUMBER < 0x00907000L
+#   ifdef X509_STORE_set_flags
+#       undef X509_STORE_set_flags
+#       define X509_STORE_set_flags(x,y) Curl_nop_stmt
+#   endif
+#endif
+#endif
+
+#endif /* HEADER_CURL_SETUP_VMS_H */
index e6b8e7a..b21c9f6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
+#include "curl_setup.h"
+
 #include <curl/curl.h>
 #include "urldata.h"
 #include "share.h"
+#include "sslgen.h"
 #include "curl_memory.h"
 
 /* The last #include file should be: */
@@ -52,6 +51,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
   curl_lock_function lockfunc;
   curl_unlock_function unlockfunc;
   void *ptr;
+  CURLSHcode res = CURLSHE_OK;
 
   if(share->dirty)
     /* don't allow setting options while one or more handles are already
@@ -70,25 +70,42 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
       if(!share->hostcache) {
         share->hostcache = Curl_mk_dnscache();
         if(!share->hostcache)
-          return CURLSHE_NOMEM;
+          res = CURLSHE_NOMEM;
       }
       break;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
     case CURL_LOCK_DATA_COOKIE:
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
       if(!share->cookies) {
         share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
         if(!share->cookies)
-          return CURLSHE_NOMEM;
+          res = CURLSHE_NOMEM;
       }
+#else   /* CURL_DISABLE_HTTP */
+      res = CURLSHE_NOT_BUILT_IN;
+#endif
+      break;
+
+    case CURL_LOCK_DATA_SSL_SESSION:
+#ifdef USE_SSL
+      if(!share->sslsession) {
+        share->max_ssl_sessions = 8;
+        share->sslsession = calloc(share->max_ssl_sessions,
+                                   sizeof(struct curl_ssl_session));
+        share->sessionage = 0;
+        if(!share->sslsession)
+          res = CURLSHE_NOMEM;
+      }
+#else
+      res = CURLSHE_NOT_BUILT_IN;
+#endif
       break;
-#endif   /* CURL_DISABLE_HTTP */
 
-    case CURL_LOCK_DATA_SSL_SESSION: /* not supported (yet) */
     case CURL_LOCK_DATA_CONNECT:     /* not supported (yet) */
+      break;
 
     default:
-      return CURLSHE_BAD_OPTION;
+      res = CURLSHE_BAD_OPTION;
     }
     break;
 
@@ -96,32 +113,39 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
     /* this is a type this share will no longer share */
     type = va_arg(param, int);
     share->specifier &= ~(1<<type);
-    switch( type )
-    {
-      case CURL_LOCK_DATA_DNS:
-        if(share->hostcache) {
-          Curl_hash_destroy(share->hostcache);
-          share->hostcache = NULL;
-        }
-        break;
+    switch( type ) {
+    case CURL_LOCK_DATA_DNS:
+      if(share->hostcache) {
+        Curl_hash_destroy(share->hostcache);
+        share->hostcache = NULL;
+      }
+      break;
 
+    case CURL_LOCK_DATA_COOKIE:
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-      case CURL_LOCK_DATA_COOKIE:
-        if(share->cookies) {
-          Curl_cookie_cleanup(share->cookies);
-          share->cookies = NULL;
-        }
-        break;
-#endif   /* CURL_DISABLE_HTTP */
-
-      case CURL_LOCK_DATA_SSL_SESSION:
-        break;
-
-      case CURL_LOCK_DATA_CONNECT:
-        break;
-
-      default:
-        return CURLSHE_BAD_OPTION;
+      if(share->cookies) {
+        Curl_cookie_cleanup(share->cookies);
+        share->cookies = NULL;
+      }
+#else   /* CURL_DISABLE_HTTP */
+      res = CURLSHE_NOT_BUILT_IN;
+#endif
+      break;
+
+    case CURL_LOCK_DATA_SSL_SESSION:
+#ifdef USE_SSL
+      Curl_safefree(share->sslsession);
+#else
+      res = CURLSHE_NOT_BUILT_IN;
+#endif
+      break;
+
+    case CURL_LOCK_DATA_CONNECT:
+      break;
+
+    default:
+      res = CURLSHE_BAD_OPTION;
+      break;
     }
     break;
 
@@ -141,10 +165,13 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
     break;
 
   default:
-    return CURLSHE_BAD_OPTION;
+    res = CURLSHE_BAD_OPTION;
+    break;
   }
 
-  return CURLSHE_OK;
+  va_end(param);
+
+  return res;
 }
 
 CURLSHcode
@@ -173,7 +200,16 @@ curl_share_cleanup(CURLSH *sh)
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
   if(share->cookies)
     Curl_cookie_cleanup(share->cookies);
-#endif   /* CURL_DISABLE_HTTP */
+#endif
+
+#ifdef USE_SSL
+  if(share->sslsession) {
+    size_t i;
+    for(i = 0; i < share->max_ssl_sessions; i++)
+      Curl_ssl_kill_session(&(share->sslsession[i]));
+    free(share->sslsession);
+  }
+#endif
 
   if(share->unlockfunc)
     share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
index ea8e233..9a5128e 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __CURL_SHARE_H
-#define __CURL_SHARE_H
-
+#ifndef HEADER_CURL_SHARE_H
+#define HEADER_CURL_SHARE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -8,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 #include <curl/curl.h>
 #include "cookie.h"
+#include "urldata.h"
 
 /* SalfordC says "A structure member may not be volatile". Hence:
  */
@@ -45,11 +45,17 @@ struct Curl_share {
   void *clientdata;
 
   struct curl_hash *hostcache;
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
   struct CookieInfo *cookies;
+#endif
+
+  struct curl_ssl_session *sslsession;
+  size_t max_ssl_sessions;
+  long sessionage;
 };
 
 CURLSHcode Curl_share_lock (struct SessionHandle *, curl_lock_data,
                             curl_lock_access);
 CURLSHcode Curl_share_unlock (struct SessionHandle *, curl_lock_data);
 
-#endif /* __CURL_SHARE_H */
+#endif /* HEADER_CURL_SHARE_H */
index 7c0f67b..3cac6ca 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include <string.h>
 #include "curl_memory.h"
 #include "slist.h"
 
@@ -51,6 +46,38 @@ static struct curl_slist *slist_get_last(struct curl_slist *list)
 }
 
 /*
+ * Curl_slist_append_nodup() appends a string to the linked list. Rather than
+ * copying the string in dynamic storage, it takes its ownership. The string
+ * should have been malloc()ated. Curl_slist_append_nodup always returns
+ * the address of the first record, so that you can use this function as an
+ * initialization function as well as an append function.
+ * If an error occurs, NULL is returned and the string argument is NOT
+ * released.
+ */
+struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, char *data)
+{
+  struct curl_slist     *last;
+  struct curl_slist     *new_item;
+
+  DEBUGASSERT(data);
+
+  new_item = malloc(sizeof(struct curl_slist));
+  if(!new_item)
+    return NULL;
+
+  new_item->next = NULL;
+  new_item->data = data;
+
+  /* if this is the first item, then new_item *is* the list */
+  if(!list)
+    return new_item;
+
+  last = slist_get_last(list);
+  last->next = new_item;
+  return list;
+}
+
+/*
  * curl_slist_append() appends a string to the linked list. It always returns
  * the address of the first record, so that you can use this function as an
  * initialization function as well as an append function. If you find this
@@ -60,32 +87,16 @@ static struct curl_slist *slist_get_last(struct curl_slist *list)
 struct curl_slist *curl_slist_append(struct curl_slist *list,
                                      const char *data)
 {
-  struct curl_slist     *last;
-  struct curl_slist     *new_item;
+  char *dupdata = strdup(data);
 
-  new_item = malloc(sizeof(struct curl_slist));
-  if(new_item) {
-    char *dupdata = strdup(data);
-    if(dupdata) {
-      new_item->next = NULL;
-      new_item->data = dupdata;
-    }
-    else {
-      free(new_item);
-      return NULL;
-    }
-  }
-  else
+  if(!dupdata)
     return NULL;
 
-  if(list) {
-    last = slist_get_last(list);
-    last->next = new_item;
-    return list;
-  }
+  list = Curl_slist_append_nodup(list, dupdata);
+  if(!list)
+    free(dupdata);
 
-  /* if this is the first item, then new_item *is* the list */
-  return new_item;
+  return list;
 }
 
 /*
@@ -101,7 +112,7 @@ struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist)
   while(inlist) {
     tmp = curl_slist_append(outlist, inlist->data);
 
-    if (!tmp) {
+    if(!tmp) {
       curl_slist_free_all(outlist);
       return NULL;
     }
@@ -124,10 +135,7 @@ void curl_slist_free_all(struct curl_slist *list)
   item = list;
   do {
     next = item->next;
-
-    if(item->data) {
-      free(item->data);
-    }
+    Curl_safefree(item->data);
     free(item);
     item = next;
   } while(next);
index 161b150..ea7dcc4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SLIST_H
-#define __SLIST_H
+#ifndef HEADER_CURL_SLIST_H
+#define HEADER_CURL_SLIST_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  */
 struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist);
 
-#endif /* __SLIST_H */
+/*
+ * Curl_slist_append_nodup() takes ownership of the given string and appends
+ * it to the list.
+ */
+struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list,
+                                           char *data);
+
+#endif /* HEADER_CURL_SLIST_H */
+
index 82621a4..83fb9ec 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  * KIND, either express or implied.
  *
- * RFC2821 SMTP protocol
- * RFC3207 SMTP over TLS
- * RFC4954 SMTP Authentication
+ * RFC1870 SMTP Service Extension for Message Size
  * RFC2195 CRAM-MD5 authentication
+ * RFC2831 DIGEST-MD5 authentication
+ * RFC3207 SMTP over TLS
+ * RFC4422 Simple Authentication and Security Layer (SASL)
  * RFC4616 PLAIN authentication
+ * RFC4954 SMTP Authentication
+ * RFC5321 SMTP protocol
+ * Draft   SMTP URL Interface
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_SMTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -67,8 +59,6 @@
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
 #include "if2ip.h"
 #include "hostip.h"
 #include "progress.h"
 #include "multiif.h"
 #include "url.h"
 #include "rawstr.h"
-#include "strtoofft.h"
-#include "curl_base64.h"
-#include "curl_md5.h"
-#include "curl_hmac.h"
 #include "curl_gethostname.h"
+#include "curl_sasl.h"
 #include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 /* Local API functions */
 static CURLcode smtp_regular_transfer(struct connectdata *conn, bool *done);
 static CURLcode smtp_do(struct connectdata *conn, bool *done);
-static CURLcode smtp_done(struct connectdata *conn,
-                          CURLcode, bool premature);
+static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
+                          bool premature);
 static CURLcode smtp_connect(struct connectdata *conn, bool *done);
-static CURLcode smtp_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode smtp_disconnect(struct connectdata *conn, bool dead);
 static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done);
-static int smtp_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
                         int numsocks);
-static CURLcode smtp_doing(struct connectdata *conn,
-                           bool *dophase_done);
-static CURLcode smtp_setup_connection(struct connectdata * conn);
-
+static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done);
+static CURLcode smtp_setup_connection(struct connectdata *conn);
+static CURLcode smtp_parse_url_options(struct connectdata *conn);
+static CURLcode smtp_parse_url_path(struct connectdata *conn);
 
 /*
  * SMTP protocol handler.
@@ -132,13 +118,15 @@ const struct Curl_handler Curl_handler_smtp = {
   smtp_doing,                       /* doing */
   smtp_getsock,                     /* proto_getsock */
   smtp_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   smtp_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_SMTP,                        /* defport */
-  PROT_SMTP                         /* protocol */
+  CURLPROTO_SMTP,                   /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * SMTPS protocol handler.
@@ -155,10 +143,14 @@ const struct Curl_handler Curl_handler_smtps = {
   smtp_doing,                       /* doing */
   smtp_getsock,                     /* proto_getsock */
   smtp_getsock,                     /* doing_getsock */
+  ZERO_NULL,                        /* domore_getsock */
   ZERO_NULL,                        /* perform_getsock */
   smtp_disconnect,                  /* disconnect */
+  ZERO_NULL,                        /* readwrite */
   PORT_SMTPS,                       /* defport */
-  PROT_SMTP | PROT_SMTPS | PROT_SSL  /* protocol */
+  CURLPROTO_SMTP | CURLPROTO_SMTPS, /* protocol */
+  PROTOPT_CLOSEACTION | PROTOPT_SSL
+  | PROTOPT_NOURLQUERY              /* flags */
 };
 #endif
 
@@ -178,13 +170,15 @@ static const struct Curl_handler Curl_handler_smtp_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_SMTP,                            /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
-
 #ifdef USE_SSL
 /*
  * HTTP-proxyed SMTPS protocol handler.
@@ -201,96 +195,138 @@ static const struct Curl_handler Curl_handler_smtps_proxy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_SMTPS,                           /* defport */
-  PROT_HTTP                             /* protocol */
+  CURLPROTO_HTTP,                       /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 #endif
 #endif
 
+#ifdef USE_SSL
+static void smtp_to_smtps(struct connectdata *conn)
+{
+  conn->handler = &Curl_handler_smtps;
+}
+#else
+#define smtp_to_smtps(x) Curl_nop_stmt
+#endif
 
-/* Function that checks for an ending smtp status code at the start of the
-   given string.
-   As a side effect, it also flags allowed authentication mechanisms according
-   to EHLO AUTH response. */
-static int smtp_endofresp(struct pingpong *pp, int *resp)
+/***********************************************************************
+ *
+ * pop3_endofresp()
+ *
+ * Checks for an ending SMTP status code at the start of the given string, but
+ * also detects various capabilities from the EHLO response including the
+ * supported authentication mechanisms.
+ */
+static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
+                           int *resp)
 {
-  char *line = pp->linestart_resp;
-  size_t len = pp->nread_resp;
-  struct connectdata *conn = pp->conn;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
-  int result;
+  bool result = FALSE;
   size_t wordlen;
 
   if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
-    return FALSE;       /* Nothing for us. */
+    return FALSE;       /* Nothing for us */
 
-  if((result = (line[3] == ' ')) != 0)
+  /* Do we have a command response? */
+  result = (line[3] == ' ') ? TRUE : FALSE;
+  if(result)
     *resp = curlx_sltosi(strtol(line, NULL, 10));
 
-  line += 4;
-  len -= 4;
-
-  if(smtpc->state == SMTP_EHLO && len >= 5 && !memcmp(line, "AUTH ", 5)) {
-    line += 5;
-    len -= 5;
-
-    for (;;) {
-      while (len &&
-             (*line == ' ' || *line == '\t' ||
-              *line == '\r' || *line == '\n')) {
-        line++;
-        len--;
+  /* Are we processing EHLO command data? */
+  if(smtpc->state == SMTP_EHLO && (!result || (result && *resp/100 == 2))) {
+    line += 4;
+    len -= 4;
+
+    /* Does the server support the STARTTLS capability? */
+    if(len >= 8 && !memcmp(line, "STARTTLS", 8))
+      smtpc->tls_supported = TRUE;
+
+    /* Does the server support the SIZE capability? */
+    else if(len >= 4 && !memcmp(line, "SIZE", 4))
+      smtpc->size_supported = TRUE;
+
+    /* Do we have the authentication mechanism list? */
+    else if(len >= 5 && !memcmp(line, "AUTH ", 5)) {
+      line += 5;
+      len -= 5;
+
+      /* Loop through the data line */
+      for(;;) {
+        while(len &&
+              (*line == ' ' || *line == '\t' ||
+               *line == '\r' || *line == '\n')) {
+
+          line++;
+          len--;
+        }
+
+        if(!len)
+          break;
+
+        /* Extract the word */
+        for(wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
+              line[wordlen] != '\t' && line[wordlen] != '\r' &&
+              line[wordlen] != '\n';)
+          wordlen++;
+
+        /* Test the word for a matching authentication mechanism */
+        if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
+          smtpc->authmechs |= SASL_MECH_LOGIN;
+        else if(wordlen == 5 && !memcmp(line, "PLAIN", 5))
+          smtpc->authmechs |= SASL_MECH_PLAIN;
+        else if(wordlen == 8 && !memcmp(line, "CRAM-MD5", 8))
+          smtpc->authmechs |= SASL_MECH_CRAM_MD5;
+        else if(wordlen == 10 && !memcmp(line, "DIGEST-MD5", 10))
+          smtpc->authmechs |= SASL_MECH_DIGEST_MD5;
+        else if(wordlen == 6 && !memcmp(line, "GSSAPI", 6))
+          smtpc->authmechs |= SASL_MECH_GSSAPI;
+        else if(wordlen == 8 && !memcmp(line, "EXTERNAL", 8))
+          smtpc->authmechs |= SASL_MECH_EXTERNAL;
+        else if(wordlen == 4 && !memcmp(line, "NTLM", 4))
+          smtpc->authmechs |= SASL_MECH_NTLM;
+
+        line += wordlen;
+        len -= wordlen;
       }
-
-      if(!len)
-        break;
-
-      for (wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
-             line[wordlen] != '\t' && line[wordlen] != '\r' &&
-             line[wordlen] != '\n';)
-        wordlen++;
-
-      if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
-        smtpc->authmechs |= SMTP_AUTH_LOGIN;
-      else if(wordlen == 5 && !memcmp(line, "PLAIN", 5))
-        smtpc->authmechs |= SMTP_AUTH_PLAIN;
-      else if(wordlen == 8 && !memcmp(line, "CRAM-MD5", 8))
-        smtpc->authmechs |= SMTP_AUTH_CRAM_MD5;
-      else if(wordlen == 10 && !memcmp(line, "DIGEST-MD5", 10))
-        smtpc->authmechs |= SMTP_AUTH_DIGEST_MD5;
-      else if(wordlen == 6 && !memcmp(line, "GSSAPI", 6))
-        smtpc->authmechs |= SMTP_AUTH_GSSAPI;
-      else if(wordlen == 8 && !memcmp(line, "EXTERNAL", 8))
-        smtpc->authmechs |= SMTP_AUTH_EXTERNAL;
-
-      line += wordlen;
-      len -= wordlen;
     }
   }
 
   return result;
 }
 
-/* This is the ONLY way to change SMTP state! */
-static void state(struct connectdata *conn,
-                  smtpstate newstate)
+/***********************************************************************
+ *
+ * state()
+ *
+ * This is the ONLY way to change SMTP state!
+ */
+static void state(struct connectdata *conn, smtpstate newstate)
 {
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   /* for debug purposes */
-  static const char * const names[]={
+  static const char * const names[] = {
     "STOP",
     "SERVERGREET",
     "EHLO",
     "HELO",
     "STARTTLS",
-    "AUTHPLAIN",
-    "AUTHLOGIN",
-    "AUTHPASSWD",
-    "AUTHCRAM",
-    "AUTH",
+    "UPGRADETLS",
+    "AUTH_PLAIN",
+    "AUTH_LOGIN",
+    "AUTH_LOGIN_PASSWD",
+    "AUTH_CRAMMD5",
+    "AUTH_DIGESTMD5",
+    "AUTH_DIGESTMD5_RESP",
+    "AUTH_NTLM",
+    "AUTH_NTLM_TYPE2MSG",
+    "AUTH_FINAL",
     "MAIL",
     "RCPT",
     "DATA",
@@ -298,220 +334,428 @@ static void state(struct connectdata *conn,
     "QUIT",
     /* LAST */
   };
+
   if(smtpc->state != newstate)
     infof(conn->data, "SMTP %p state change from %s to %s\n",
-          smtpc, names[smtpc->state], names[newstate]);
+          (void *)smtpc, names[smtpc->state], names[newstate]);
 #endif
+
   smtpc->state = newstate;
 }
 
-static CURLcode smtp_state_ehlo(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_ehlo()
+ *
+ * Sends the EHLO command to not only initialise communication with the ESMTP
+ * server but to also obtain a list of server side supported capabilities.
+ */
+static CURLcode smtp_perform_ehlo(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
-  smtpc->authmechs = 0;         /* No known authentication mechanisms yet. */
+  smtpc->authmechs = 0;         /* No known authentication mechanisms yet */
+  smtpc->authused = 0;          /* Clear the authentication mechanism used
+                                   for esmtp connections */
+  smtpc->tls_supported = FALSE; /* Clear the TLS capability */
 
-  /* send EHLO */
+  /* Send the EHLO command */
   result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain);
 
-  if(result)
-    return result;
+  if(!result)
+    state(conn, SMTP_EHLO);
 
-  state(conn, SMTP_EHLO);
-  return CURLE_OK;
+  return result;
 }
 
-static CURLcode smtp_state_helo(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_helo()
+ *
+ * Sends the HELO command to initialise communication with the SMTP server.
+ */
+static CURLcode smtp_perform_helo(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
 
-  /* send HELO */
+  smtpc->authused = 0;          /* No authentication mechanism used in smtp
+                                   connections */
+
+  /* Send the HELO command */
   result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain);
 
-  if(result)
-    return result;
+  if(!result)
+    state(conn, SMTP_HELO);
 
-  state(conn, SMTP_HELO);
-  return CURLE_OK;
+  return result;
 }
 
-static size_t smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
+/***********************************************************************
+ *
+ * smtp_perform_starttls()
+ *
+ * Sends the STLS command to start the upgrade to TLS.
+ */
+static CURLcode smtp_perform_starttls(struct connectdata *conn)
 {
-  char plainauth[2 * MAX_CURL_USER_LENGTH + MAX_CURL_PASSWORD_LENGTH];
-  size_t ulen;
-  size_t plen;
-
-  ulen = strlen(conn->user);
-  plen = strlen(conn->passwd);
-
-  if(2 * ulen + plen + 2 > sizeof plainauth)
-    return 0;
-
-  memcpy(plainauth, conn->user, ulen);
-  plainauth[ulen] = '\0';
-  memcpy(plainauth + ulen + 1, conn->user, ulen);
-  plainauth[2 * ulen + 1] = '\0';
-  memcpy(plainauth + 2 * ulen + 2, conn->passwd, plen);
-  return Curl_base64_encode(conn->data, plainauth, 2 * ulen + plen + 2, outptr);
+  CURLcode result = CURLE_OK;
+
+  /* Send the STARTTLS command */
+  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "STARTTLS");
+
+  if(!result)
+    state(conn, SMTP_STARTTLS);
+
+  return result;
 }
 
-static size_t smtp_auth_login_user(struct connectdata * conn, char * * outptr)
+/***********************************************************************
+ *
+ * smtp_perform_upgrade_tls()
+ *
+ * Performs the upgrade to TLS.
+ */
+static CURLcode smtp_perform_upgrade_tls(struct connectdata *conn)
 {
-  size_t ulen;
+  CURLcode result = CURLE_OK;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
 
-  ulen = strlen(conn->user);
+  /* Start the SSL connection */
+  result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
 
-  if(!ulen) {
-    *outptr = strdup("=");
-    return *outptr? 1: 0;
+  if(!result) {
+    if(smtpc->state != SMTP_UPGRADETLS)
+      state(conn, SMTP_UPGRADETLS);
+
+    if(smtpc->ssldone) {
+      smtp_to_smtps(conn);
+      result = smtp_perform_ehlo(conn);
+    }
   }
 
-  return Curl_base64_encode(conn->data, conn->user, ulen, outptr);
+  return result;
 }
 
-static CURLcode smtp_authenticate(struct connectdata *conn)
+/***********************************************************************
+ *
+ * smtp_perform_authenticate()
+ *
+ * Sends an AUTH command allowing the client to login with the appropriate
+ * SASL authentication mechanism.
+ */
+static CURLcode smtp_perform_authenticate(struct connectdata *conn)
 {
   CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
-  char * initresp;
-  const char * mech;
-  size_t l;
-  smtpstate state1;
-  smtpstate state2;
-
-  if(!conn->bits.user_passwd)
-    state(conn, SMTP_STOP);             /* End of connect phase. */
-  else {
-    initresp = (char *) NULL;
-    l = 1;
+  const char *mech = NULL;
+  char *initresp = NULL;
+  size_t len = 0;
+  smtpstate state1 = SMTP_STOP;
+  smtpstate state2 = SMTP_STOP;
+
+  /* Check we have a username and password to authenticate with and end the
+     connect phase if we don't */
+  if(!conn->bits.user_passwd) {
+    state(conn, SMTP_STOP);
 
-    /* Check supported authentication mechanisms by decreasing order of
-       preference. */
-    mech = (const char *) NULL;         /* Avoid compiler warnings. */
-    state1 = SMTP_STOP;
-    state2 = SMTP_STOP;
+    return result;
+  }
 
+  /* Calculate the supported authentication mechanism, by decreasing order of
+     security, as well as the initial response where appropriate */
 #ifndef CURL_DISABLE_CRYPTO_AUTH
-    if(smtpc->authmechs & SMTP_AUTH_CRAM_MD5) {
-      mech = "CRAM-MD5";
-      state1 = SMTP_AUTHCRAM;
-    }
-    else
+  if((smtpc->authmechs & SASL_MECH_DIGEST_MD5) &&
+     (smtpc->prefmech & SASL_MECH_DIGEST_MD5)) {
+    mech = "DIGEST-MD5";
+    state1 = SMTP_AUTH_DIGESTMD5;
+    smtpc->authused = SASL_MECH_DIGEST_MD5;
+  }
+  else if((smtpc->authmechs & SASL_MECH_CRAM_MD5) &&
+          (smtpc->prefmech & SASL_MECH_CRAM_MD5)) {
+    mech = "CRAM-MD5";
+    state1 = SMTP_AUTH_CRAMMD5;
+    smtpc->authused = SASL_MECH_CRAM_MD5;
+  }
+  else
 #endif
-    if(smtpc->authmechs & SMTP_AUTH_PLAIN) {
-      mech = "PLAIN";
-      state1 = SMTP_AUTHPLAIN;
-      state2 = SMTP_AUTH;
-      l = smtp_auth_plain_data(conn, &initresp);
-    }
-    else if(smtpc->authmechs & SMTP_AUTH_LOGIN) {
-      mech = "LOGIN";
-      state1 = SMTP_AUTHLOGIN;
-      state2 = SMTP_AUTHPASSWD;
-      l = smtp_auth_login_user(conn, &initresp);
-    }
-    else {
-      infof(conn->data, "No known auth mechanisms supported!\n");
-      result = CURLE_LOGIN_DENIED;      /* Other mechanisms not supported. */
+#ifdef USE_NTLM
+  if((smtpc->authmechs & SASL_MECH_NTLM) &&
+     (smtpc->prefmech & SASL_MECH_NTLM)) {
+    mech = "NTLM";
+    state1 = SMTP_AUTH_NTLM;
+    state2 = SMTP_AUTH_NTLM_TYPE2MSG;
+    smtpc->authused = SASL_MECH_NTLM;
+
+    if(data->set.sasl_ir)
+      result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                   &conn->ntlm,
+                                                   &initresp, &len);
     }
+  else
+#endif
+  if((smtpc->authmechs & SASL_MECH_LOGIN) &&
+     (smtpc->prefmech & SASL_MECH_LOGIN)) {
+    mech = "LOGIN";
+    state1 = SMTP_AUTH_LOGIN;
+    state2 = SMTP_AUTH_LOGIN_PASSWD;
+    smtpc->authused = SASL_MECH_LOGIN;
+
+    if(data->set.sasl_ir)
+      result = Curl_sasl_create_login_message(conn->data, conn->user,
+                                              &initresp, &len);
+  }
+  else if((smtpc->authmechs & SASL_MECH_PLAIN) &&
+          (smtpc->prefmech & SASL_MECH_PLAIN)) {
+    mech = "PLAIN";
+    state1 = SMTP_AUTH_PLAIN;
+    state2 = SMTP_AUTH_FINAL;
+    smtpc->authused = SASL_MECH_PLAIN;
+
+    if(data->set.sasl_ir)
+      result = Curl_sasl_create_plain_message(conn->data, conn->user,
+                                              conn->passwd, &initresp, &len);
+  }
 
-    if(!result) {
-      if(!l)
-        result = CURLE_OUT_OF_MEMORY;
-      else if(initresp &&
-              l + strlen(mech) <= 512 - 8) {   /* AUTH <mech> ...<crlf> */
+  if(!result) {
+    if(mech) {
+      /* Perform SASL based authentication */
+      if(initresp &&
+         8 + strlen(mech) + len <= 512) { /* AUTH <mech> ...<crlf> */
         result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp);
-        free(initresp);
 
         if(!result)
           state(conn, state2);
       }
       else {
-        Curl_safefree(initresp);
-
         result = Curl_pp_sendf(&smtpc->pp, "AUTH %s", mech);
 
         if(!result)
           state(conn, state1);
       }
+
+      Curl_safefree(initresp);
+    }
+    else {
+      /* Other mechanisms not supported */
+      infof(conn->data, "No known authentication mechanisms supported!\n");
+      result = CURLE_LOGIN_DENIED;
     }
   }
 
   return result;
 }
 
-/* For the SMTP "protocol connect" and "doing" phases only */
-static int smtp_getsock(struct connectdata *conn,
-                        curl_socket_t *socks,
-                        int numsocks)
+/***********************************************************************
+ *
+ * smtp_perform_mail()
+ *
+ * Sends an MAIL command to initiate the upload of a message.
+ */
+static CURLcode smtp_perform_mail(struct connectdata *conn)
 {
-  return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
+  char *from = NULL;
+  char *auth = NULL;
+  char *size = NULL;
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  /* Calculate the FROM parameter */
+  if(!data->set.str[STRING_MAIL_FROM])
+    /* Null reverse-path, RFC-5321, sect. 3.6.3 */
+    from = strdup("<>");
+  else if(data->set.str[STRING_MAIL_FROM][0] == '<')
+    from = aprintf("%s", data->set.str[STRING_MAIL_FROM]);
+  else
+    from = aprintf("<%s>", data->set.str[STRING_MAIL_FROM]);
+
+  if(!from)
+    return CURLE_OUT_OF_MEMORY;
+
+  /* Calculate the optional AUTH parameter */
+  if(data->set.str[STRING_MAIL_AUTH] && conn->proto.smtpc.authused) {
+    if(data->set.str[STRING_MAIL_AUTH][0] != '\0')
+      auth = aprintf("%s", data->set.str[STRING_MAIL_AUTH]);
+    else
+      /* Empty AUTH, RFC-2554, sect. 5 */
+      auth = strdup("<>");
+
+    if(!auth) {
+      Curl_safefree(from);
+
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  /* Calculate the optional SIZE parameter */
+  if(conn->proto.smtpc.size_supported && conn->data->set.infilesize > 0) {
+    size = aprintf("%" FORMAT_OFF_T, data->set.infilesize);
+
+    if(!size) {
+      Curl_safefree(from);
+      Curl_safefree(auth);
+
+      return CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  /* Send the MAIL command */
+  if(!auth && !size)
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+                           "MAIL FROM:%s", from);
+  else if(auth && !size)
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+                           "MAIL FROM:%s AUTH=%s", from, auth);
+  else if(auth && size)
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+                           "MAIL FROM:%s AUTH=%s SIZE=%s", from, auth, size);
+  else
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp,
+                           "MAIL FROM:%s SIZE=%s", from, size);
+
+  Curl_safefree(from);
+  Curl_safefree(auth);
+  Curl_safefree(size);
+
+  if(!result)
+    state(conn, SMTP_MAIL);
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * smtp_perform_rcpt_to()
+ *
+ * Sends a RCPT TO command for a given recipient as part of the message upload
+ * process.
+ */
+static CURLcode smtp_perform_rcpt_to(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  struct SMTP *smtp = data->state.proto.smtp;
+
+  /* Send the RCPT TO command */
+  if(smtp->rcpt) {
+    if(smtp->rcpt->data[0] == '<')
+      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s",
+                             smtp->rcpt->data);
+    else
+      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>",
+                             smtp->rcpt->data);
+    if(!result)
+      state(conn, SMTP_RCPT);
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * smtp_perform_quit()
+ *
+ * Performs the quit action prior to sclose() being called.
+ */
+static CURLcode smtp_perform_quit(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+
+  /* Send the QUIT command */
+  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "QUIT");
+
+  if(!result)
+    state(conn, SMTP_QUIT);
+
+  return result;
 }
 
-/* for STARTTLS responses */
+/* For the initial server greeting */
+static CURLcode smtp_state_servergreet_resp(struct connectdata *conn,
+                                            int smtpcode,
+                                            smtpstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(smtpcode/100 != 2) {
+    failf(data, "Got unexpected smtp-server response: %d", smtpcode);
+    result = CURLE_FTP_WEIRD_SERVER_REPLY;
+  }
+  else
+    result = smtp_perform_ehlo(conn);
+
+  return result;
+}
+
+/* For STARTTLS responses */
 static CURLcode smtp_state_starttls_resp(struct connectdata *conn,
                                          int smtpcode,
                                          smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+
   (void)instate; /* no use for this yet */
 
   if(smtpcode != 220) {
-    if(data->set.ftp_ssl != CURLUSESSL_TRY) {
+    if(data->set.use_ssl != CURLUSESSL_TRY) {
       failf(data, "STARTTLS denied. %c", smtpcode);
-      result = CURLE_LOGIN_DENIED;
+      result = CURLE_USE_SSL_FAILED;
     }
     else
-      result = smtp_authenticate(conn);
-  }
-  else {
-    /* Curl_ssl_connect is BLOCKING */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(CURLE_OK == result) {
-      conn->protocol |= PROT_SMTPS;
-      result = smtp_state_ehlo(conn);
-    }
+      result = smtp_perform_authenticate(conn);
   }
+  else
+    result = smtp_perform_upgrade_tls(conn);
+
   return result;
 }
 
-/* for EHLO responses */
-static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
-                                     int smtpcode,
+/* For EHLO responses */
+static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
 
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
-    if((data->set.ftp_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) &&
+    if((data->set.use_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) &&
      !conn->bits.user_passwd)
-      result = smtp_state_helo(conn);
+      result = smtp_perform_helo(conn);
     else {
-      failf(data, "Access denied: %d", smtpcode);
-      result = CURLE_LOGIN_DENIED;
+      failf(data, "Remote access denied: %d", smtpcode);
+      result = CURLE_REMOTE_ACCESS_DENIED;
     }
   }
-  else if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
-    /* We don't have a SSL/TLS connection yet, but SSL is requested. Switch
-       to TLS connection now */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "STARTTLS");
-    state(conn, SMTP_STARTTLS);
+  else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
+    /* We don't have a SSL/TLS connection yet, but SSL is requested */
+    if(smtpc->tls_supported)
+      /* Switch to TLS connection now */
+      result = smtp_perform_starttls(conn);
+    else if(data->set.use_ssl == CURLUSESSL_TRY)
+      /* Fallback and carry on with authentication */
+      result = smtp_perform_authenticate(conn);
+    else {
+      failf(data, "STARTTLS not supported.");
+      result = CURLE_USE_SSL_FAILED;
+    }
   }
   else
-    result = smtp_authenticate(conn);
+    result = smtp_perform_authenticate(conn);
 
   return result;
 }
 
-/* for HELO responses */
-static CURLcode smtp_state_helo_resp(struct connectdata *conn,
-                                     int smtpcode,
+/* For HELO responses */
+static CURLcode smtp_state_helo_resp(struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
@@ -520,25 +764,25 @@ static CURLcode smtp_state_helo_resp(struct connectdata *conn,
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
-    failf(data, "Access denied: %d", smtpcode);
-    result = CURLE_LOGIN_DENIED;
+    failf(data, "Remote access denied: %d", smtpcode);
+    result = CURLE_REMOTE_ACCESS_DENIED;
   }
-  else {
-    /* end the connect phase */
+  else
+    /* End of connect phase */
     state(conn, SMTP_STOP);
-  }
+
   return result;
 }
 
-/* for AUTH PLAIN (without initial response) responses */
-static CURLcode smtp_state_authplain_resp(struct connectdata *conn,
-                                          int smtpcode,
-                                          smtpstate instate)
+/* For AUTH PLAIN (without initial response) responses */
+static CURLcode smtp_state_auth_plain_resp(struct connectdata *conn,
+                                           int smtpcode,
+                                           smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  size_t l;
-  char * plainauth;
+  size_t len = 0;
+  char *plainauth = NULL;
 
   (void)instate; /* no use for this yet */
 
@@ -547,31 +791,35 @@ static CURLcode smtp_state_authplain_resp(struct connectdata *conn,
     result = CURLE_LOGIN_DENIED;
   }
   else {
-    l = smtp_auth_plain_data(conn, &plainauth);
+    /* Create the authorisation message */
+    result = Curl_sasl_create_plain_message(conn->data, conn->user,
+                                            conn->passwd, &plainauth, &len);
 
-    if(!l)
-      result = CURLE_OUT_OF_MEMORY;
-    else {
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
-      free(plainauth);
+    /* Send the message */
+    if(!result) {
+      if(plainauth) {
+        result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
 
-      if(!result)
-        state(conn, SMTP_AUTH);
+        if(!result)
+          state(conn, SMTP_AUTH_FINAL);
+      }
+
+      Curl_safefree(plainauth);
     }
   }
 
   return result;
 }
 
-/* for AUTH LOGIN (without initial response) responses */
-static CURLcode smtp_state_authlogin_resp(struct connectdata *conn,
-                                          int smtpcode,
-                                          smtpstate instate)
+/* For AUTH LOGIN (without initial response) responses */
+static CURLcode smtp_state_auth_login_resp(struct connectdata *conn,
+                                           int smtpcode,
+                                           smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  size_t l;
-  char * authuser;
+  size_t len = 0;
+  char *authuser = NULL;
 
   (void)instate; /* no use for this yet */
 
@@ -580,32 +828,35 @@ static CURLcode smtp_state_authlogin_resp(struct connectdata *conn,
     result = CURLE_LOGIN_DENIED;
   }
   else {
-    l = smtp_auth_login_user(conn, &authuser);
+    /* Create the user message */
+    result = Curl_sasl_create_login_message(conn->data, conn->user,
+                                            &authuser, &len);
 
-    if(!l)
-      result = CURLE_OUT_OF_MEMORY;
-    else {
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
-      free(authuser);
+    /* Send the user */
+    if(!result) {
+      if(authuser) {
+        result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
 
-      if(!result)
-        state(conn, SMTP_AUTHPASSWD);
+        if(!result)
+          state(conn, SMTP_AUTH_LOGIN_PASSWD);
+      }
+
+      Curl_safefree(authuser);
     }
   }
 
   return result;
 }
 
-/* for responses to user entry of AUTH LOGIN. */
-static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
-                                           int smtpcode,
-                                           smtpstate instate)
+/* For AUTH LOGIN user entry responses */
+static CURLcode smtp_state_auth_login_password_resp(struct connectdata *conn,
+                                                    int smtpcode,
+                                                    smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  size_t plen;
-  size_t l;
-  char *authpasswd;
+  size_t len = 0;
+  char *authpasswd = NULL;
 
   (void)instate; /* no use for this yet */
 
@@ -614,22 +865,20 @@ static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
     result = CURLE_LOGIN_DENIED;
   }
   else {
-    plen = strlen(conn->passwd);
-
-    if(!plen)
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "=");
-    else {
-      l = Curl_base64_encode(data, conn->passwd, plen, &authpasswd);
+    /* Create the password message */
+    result = Curl_sasl_create_login_message(conn->data, conn->passwd,
+                                            &authpasswd, &len);
 
-      if(!l)
-        result = CURLE_OUT_OF_MEMORY;
-      else {
+    /* Send the password */
+    if(!result) {
+      if(authpasswd) {
         result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
-        free(authpasswd);
 
         if(!result)
-          state(conn, SMTP_AUTH);
+          state(conn, SMTP_AUTH_FINAL);
       }
+
+      Curl_safefree(authpasswd);
     }
   }
 
@@ -637,22 +886,16 @@ static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
 }
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
-
-/* for AUTH CRAM-MD5 responses. */
-static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
-                                         int smtpcode,
-                                         smtpstate instate)
+/* For AUTH CRAM-MD5 responses */
+static CURLcode smtp_state_auth_cram_resp(struct connectdata *conn,
+                                          int smtpcode,
+                                          smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  char * chlg64 = data->state.buffer;
-  unsigned char * chlg;
-  size_t chlglen;
-  size_t l;
-  char * rplyb64;
-  HMAC_context * ctxt;
-  unsigned char digest[16];
-  char reply[MAX_CURL_USER_LENGTH + 32 /* 2 * size of MD5 digest */ + 1];
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
 
   (void)instate; /* no use for this yet */
 
@@ -661,66 +904,103 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
     return CURLE_LOGIN_DENIED;
   }
 
-  /* Get the challenge. */
-  for (chlg64 += 4; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+  /* Get the challenge */
+  for(chlg64 += 4; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
     ;
 
-  chlg = (unsigned char *) NULL;
-  chlglen = 0;
-
+  /* Terminate the challenge */
   if(*chlg64 != '=') {
-    for (l = strlen(chlg64); l--;)
-      if(chlg64[l] != '\r' && chlg64[l] != '\n' && chlg64[l] != ' ' &&
-       chlg64[l] != '\t')
+    for(len = strlen(chlg64); len--;)
+      if(chlg64[len] != '\r' && chlg64[len] != '\n' && chlg64[len] != ' ' &&
+         chlg64[len] != '\t')
         break;
 
-    if(++l) {
-      chlg64[l] = '\0';
+    if(++len) {
+      chlg64[len] = '\0';
+    }
+  }
+
+  /* Create the response message */
+  result = Curl_sasl_create_cram_md5_message(data, chlg64, conn->user,
+                                             conn->passwd, &rplyb64, &len);
 
-      chlglen = Curl_base64_decode(chlg64, &chlg);
-      if(!chlglen)
-        return CURLE_OUT_OF_MEMORY;
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
+
+      if(!result)
+        state(conn, SMTP_AUTH_FINAL);
     }
+
+    Curl_safefree(rplyb64);
   }
 
-  /* Compute digest. */
-  ctxt = Curl_HMAC_init(Curl_HMAC_MD5,
-                        (const unsigned char *) conn->passwd,
-                        (unsigned int)(strlen(conn->passwd)));
+  return result;
+}
+
+/* For AUTH DIGEST-MD5 challenge responses */
+static CURLcode smtp_state_auth_digest_resp(struct connectdata *conn,
+                                            int smtpcode,
+                                            smtpstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+  char *chlg64 = data->state.buffer;
+  size_t len = 0;
+  char *rplyb64 = NULL;
 
-  if(!ctxt) {
-    if(chlg)
-      free(chlg);
+  (void)instate; /* no use for this yet */
 
-    return CURLE_OUT_OF_MEMORY;
+  if(smtpcode != 334) {
+    failf(data, "Access denied: %d", smtpcode);
+    return CURLE_LOGIN_DENIED;
   }
 
-  if(chlglen > 0)
-    Curl_HMAC_update(ctxt, chlg, (unsigned int)(chlglen));
+  /* Get the challenge */
+  for(chlg64 += 4; *chlg64 == ' ' || *chlg64 == '\t'; chlg64++)
+    ;
 
-  if(chlg)
-    free(chlg);
+  /* Create the response message */
+  result = Curl_sasl_create_digest_md5_message(data, chlg64, conn->user,
+                                               conn->passwd, "smtp",
+                                               &rplyb64, &len);
 
-  Curl_HMAC_final(ctxt, digest);
+  /* Send the response */
+  if(!result) {
+    if(rplyb64) {
+      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
 
-  /* Prepare the reply. */
-  snprintf(reply, sizeof reply,
-   "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
-   conn->user, digest[0], digest[1], digest[2], digest[3], digest[4], digest[5],
-   digest[6], digest[7], digest[8], digest[9], digest[10], digest[11],
-   digest[12], digest[13], digest[14], digest[15]);
+      if(!result)
+        state(conn, SMTP_AUTH_DIGESTMD5_RESP);
+    }
 
-  /* Encode it to base64 and send it. */
-  l = Curl_base64_encode(data, reply, 0, &rplyb64);
+    Curl_safefree(rplyb64);
+  }
 
-  if(!l)
-    result = CURLE_OUT_OF_MEMORY;
+  return result;
+}
+
+/* For AUTH DIGEST-MD5 challenge-response responses */
+static CURLcode smtp_state_auth_digest_resp_resp(struct connectdata *conn,
+                                                 int smtpcode,
+                                                 smtpstate instate)
+{
+  CURLcode result = CURLE_OK;
+  struct SessionHandle *data = conn->data;
+
+  (void)instate; /* no use for this yet */
+
+  if(smtpcode != 334) {
+    failf(data, "Authentication failed: %d", smtpcode);
+    result = CURLE_LOGIN_DENIED;
+  }
   else {
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
-    free(rplyb64);
+    /* Send an empty response */
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "");
 
     if(!result)
-      state(conn, SMTP_AUTH);
+      state(conn, SMTP_AUTH_FINAL);
   }
 
   return result;
@@ -728,149 +1008,196 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
 
 #endif
 
-/* for final responses to AUTH sequences. */
-static CURLcode smtp_state_auth_resp(struct connectdata *conn,
-                                     int smtpcode,
-                                     smtpstate instate)
+#ifdef USE_NTLM
+/* For AUTH NTLM (without initial response) responses */
+static CURLcode smtp_state_auth_ntlm_resp(struct connectdata *conn,
+                                          int smtpcode,
+                                          smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+  char *type1msg = NULL;
+  size_t len = 0;
 
   (void)instate; /* no use for this yet */
 
-  if(smtpcode != 235) {
-    failf(data, "Authentication failed: %d", smtpcode);
+  if(smtpcode != 334) {
+    failf(data, "Access denied: %d", smtpcode);
     result = CURLE_LOGIN_DENIED;
   }
-  else
-    state(conn, SMTP_STOP);             /* End of connect phase. */
+  else {
+    /* Create the type-1 message */
+    result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type1msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type1msg) {
+        result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type1msg);
+
+        if(!result)
+          state(conn, SMTP_AUTH_NTLM_TYPE2MSG);
+      }
+
+      Curl_safefree(type1msg);
+    }
+  }
 
   return result;
 }
 
-/* start the DO phase */
-static CURLcode smtp_mail(struct connectdata *conn)
+/* For NTLM type-2 responses (sent in reponse to our type-1 message) */
+static CURLcode smtp_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
+                                                   int smtpcode,
+                                                   smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+  char *type3msg = NULL;
+  size_t len = 0;
 
-  /* send MAIL */
-  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s",
-                         data->set.str[STRING_MAIL_FROM]);
-  if(result)
-    return result;
+  (void)instate; /* no use for this yet */
+
+  if(smtpcode != 334) {
+    failf(data, "Access denied: %d", smtpcode);
+    result = CURLE_LOGIN_DENIED;
+  }
+  else {
+    /* Create the type-3 message */
+    result = Curl_sasl_create_ntlm_type3_message(data,
+                                                 data->state.buffer + 4,
+                                                 conn->user, conn->passwd,
+                                                 &conn->ntlm,
+                                                 &type3msg, &len);
+
+    /* Send the message */
+    if(!result) {
+      if(type3msg) {
+        result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type3msg);
+
+        if(!result)
+          state(conn, SMTP_AUTH_FINAL);
+      }
+
+      Curl_safefree(type3msg);
+    }
+  }
 
-  state(conn, SMTP_MAIL);
   return result;
 }
+#endif
 
-static CURLcode smtp_rcpt_to(struct connectdata *conn)
+/* For the final responses to the AUTH sequence */
+static CURLcode smtp_state_auth_final_resp(struct connectdata *conn,
+                                           int smtpcode,
+                                           smtpstate instate)
 {
   CURLcode result = CURLE_OK;
-  struct smtp_conn *smtpc = &conn->proto.smtpc;
+  struct SessionHandle *data = conn->data;
 
-  /* send RCPT TO */
-  if(smtpc->rcpt) {
-    if(smtpc->rcpt->data[0] == '<')
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s",
-                             smtpc->rcpt->data);
-    else
-      result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>",
-                             smtpc->rcpt->data);
-    if(!result)
-      state(conn, SMTP_RCPT);
+  (void)instate; /* no use for this yet */
+
+  if(smtpcode != 235) {
+    failf(data, "Authentication failed: %d", smtpcode);
+    result = CURLE_LOGIN_DENIED;
   }
+  else
+    /* End of connect phase */
+    state(conn, SMTP_STOP);
+
   return result;
 }
 
-/* for MAIL responses */
-static CURLcode smtp_state_mail_resp(struct connectdata *conn,
-                                     int smtpcode,
+/* For MAIL responses */
+static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+  struct SMTP *smtp = data->state.proto.smtp;
+
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
-    failf(data, "Access denied: %d", smtpcode);
-    result = CURLE_LOGIN_DENIED;
+    failf(data, "MAIL failed: %d", smtpcode);
+    result = CURLE_SEND_ERROR;
     state(conn, SMTP_STOP);
   }
   else {
-    struct smtp_conn *smtpc = &conn->proto.smtpc;
-    smtpc->rcpt = data->set.mail_rcpt;
+    smtp->rcpt = data->set.mail_rcpt;
 
-    result = smtp_rcpt_to(conn);
+    result = smtp_perform_rcpt_to(conn);
   }
 
   return result;
 }
 
-/* for RCPT responses */
-static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
-                                     int smtpcode,
+/* For RCPT responses */
+static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
+  struct SMTP *smtp = data->state.proto.smtp;
+
   (void)instate; /* no use for this yet */
 
   if(smtpcode/100 != 2) {
-    failf(data, "Access denied: %d", smtpcode);
-    result = CURLE_LOGIN_DENIED;
+    failf(data, "RCPT failed: %d", smtpcode);
+    result = CURLE_SEND_ERROR;
     state(conn, SMTP_STOP);
   }
   else {
-    struct smtp_conn *smtpc = &conn->proto.smtpc;
-
-    if(smtpc->rcpt) {
-      smtpc->rcpt = smtpc->rcpt->next;
-      result = smtp_rcpt_to(conn);
+    if(smtp->rcpt) {
+      smtp->rcpt = smtp->rcpt->next;
+      result = smtp_perform_rcpt_to(conn);
 
-      /* if we failed or still is in RCPT sending, return */
-      if(result || smtpc->rcpt)
+      /* If we failed or still are sending RCPT data then return */
+      if(result || smtp->rcpt)
         return result;
     }
 
-    /* send DATA */
-    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "DATA");
-    if(result)
-      return result;
+    /* Send the DATA command */
+    result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "DATA");
 
-    state(conn, SMTP_DATA);
+    if(!result)
+      state(conn, SMTP_DATA);
   }
+
   return result;
 }
 
-/* for the DATA response */
-static CURLcode smtp_state_data_resp(struct connectdata *conn,
-                                     int smtpcode,
+/* For DATA response */
+static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode,
                                      smtpstate instate)
 {
   struct SessionHandle *data = conn->data;
-  struct FTP *smtp = data->state.proto.smtp;
 
   (void)instate; /* no use for this yet */
 
   if(smtpcode != 354) {
     state(conn, SMTP_STOP);
-    return CURLE_RECV_ERROR;
+    return CURLE_SEND_ERROR;
   }
 
+  /* Set the progress upload size */
+  Curl_pgrsSetUploadSize(data, data->set.infilesize);
+
   /* SMTP upload */
-  Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
-                      FIRSTSOCKET, smtp->bytecountp);
+  Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL);
 
+  /* End of DO phase */
   state(conn, SMTP_STOP);
+
   return CURLE_OK;
 }
 
-/* for the POSTDATA response, which is received after the entire DATA
-   part has been sent off to the server */
+/* For POSTDATA responses, which are received after the entire DATA
+   part has been sent to the server */
 static CURLcode smtp_state_postdata_resp(struct connectdata *conn,
-                                     int smtpcode,
-                                     smtpstate instate)
+                                         int smtpcode,
+                                         smtpstate instate)
 {
   CURLcode result = CURLE_OK;
 
@@ -879,41 +1206,44 @@ static CURLcode smtp_state_postdata_resp(struct connectdata *conn,
   if(smtpcode != 250)
     result = CURLE_RECV_ERROR;
 
+  /* End of DONE phase */
   state(conn, SMTP_STOP);
+
   return result;
 }
 
 static CURLcode smtp_statemach_act(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-  struct SessionHandle *data=conn->data;
+  struct SessionHandle *data = conn->data;
   int smtpcode;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
   struct pingpong *pp = &smtpc->pp;
   size_t nread = 0;
 
+  /* Busy upgrading the connection; right now all I/O is SSL/TLS, not SMTP */
+  if(smtpc->state == SMTP_UPGRADETLS)
+    return smtp_perform_upgrade_tls(conn);
+
+  /* Flush any data that needs to be sent */
   if(pp->sendleft)
-    /* we have a piece of a command still left to send */
     return Curl_pp_flushsend(pp);
 
-  /* we read a piece of response */
+  /* Read the response from the server */
   result = Curl_pp_readresp(sock, pp, &smtpcode, &nread);
   if(result)
     return result;
 
+  /* Store the latest response for later retrieval */
+  if(smtpc->state != SMTP_QUIT)
+    data->info.httpcode = smtpcode;
+
   if(smtpcode) {
-    /* we have now received a full SMTP server response */
+    /* We have now received a full SMTP server response */
     switch(smtpc->state) {
     case SMTP_SERVERGREET:
-      if(smtpcode/100 != 2) {
-        failf(data, "Got unexpected smtp-server response: %d", smtpcode);
-        return CURLE_FTP_WEIRD_SERVER_REPLY;
-      }
-
-      result = smtp_state_ehlo(conn);
-      if(result)
-        return result;
+      result = smtp_state_servergreet_resp(conn, smtpcode, smtpc->state);
       break;
 
     case SMTP_EHLO:
@@ -928,26 +1258,46 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
       result = smtp_state_starttls_resp(conn, smtpcode, smtpc->state);
       break;
 
-    case SMTP_AUTHPLAIN:
-      result = smtp_state_authplain_resp(conn, smtpcode, smtpc->state);
+    case SMTP_AUTH_PLAIN:
+      result = smtp_state_auth_plain_resp(conn, smtpcode, smtpc->state);
       break;
 
-    case SMTP_AUTHLOGIN:
-      result = smtp_state_authlogin_resp(conn, smtpcode, smtpc->state);
+    case SMTP_AUTH_LOGIN:
+      result = smtp_state_auth_login_resp(conn, smtpcode, smtpc->state);
       break;
 
-    case SMTP_AUTHPASSWD:
-      result = smtp_state_authpasswd_resp(conn, smtpcode, smtpc->state);
+    case SMTP_AUTH_LOGIN_PASSWD:
+      result = smtp_state_auth_login_password_resp(conn, smtpcode,
+                                                   smtpc->state);
       break;
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
-    case SMTP_AUTHCRAM:
-      result = smtp_state_authcram_resp(conn, smtpcode, smtpc->state);
+    case SMTP_AUTH_CRAMMD5:
+      result = smtp_state_auth_cram_resp(conn, smtpcode, smtpc->state);
+      break;
+
+    case SMTP_AUTH_DIGESTMD5:
+      result = smtp_state_auth_digest_resp(conn, smtpcode, smtpc->state);
+      break;
+
+    case SMTP_AUTH_DIGESTMD5_RESP:
+      result = smtp_state_auth_digest_resp_resp(conn, smtpcode, smtpc->state);
+      break;
+#endif
+
+#ifdef USE_NTLM
+    case SMTP_AUTH_NTLM:
+      result = smtp_state_auth_ntlm_resp(conn, smtpcode, smtpc->state);
+      break;
+
+    case SMTP_AUTH_NTLM_TYPE2MSG:
+      result = smtp_state_auth_ntlm_type2msg_resp(conn, smtpcode,
+                                                  smtpc->state);
       break;
 #endif
 
-    case SMTP_AUTH:
-      result = smtp_state_auth_resp(conn, smtpcode, smtpc->state);
+    case SMTP_AUTH_FINAL:
+      result = smtp_state_auth_final_resp(conn, smtpcode, smtpc->state);
       break;
 
     case SMTP_MAIL:
@@ -974,81 +1324,76 @@ static CURLcode smtp_statemach_act(struct connectdata *conn)
       break;
     }
   }
+
   return result;
 }
 
-/* called repeatedly until done from multi.c */
-static CURLcode smtp_multi_statemach(struct connectdata *conn,
-                                     bool *done)
+/* Called repeatedly until done from multi.c */
+static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done)
 {
+  CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
-  CURLcode result = Curl_pp_multi_statemach(&smtpc->pp);
 
-  *done = (bool)(smtpc->state == SMTP_STOP);
+  if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone)
+    result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
+  else
+    result = Curl_pp_statemach(&smtpc->pp, FALSE);
+
+  *done = (smtpc->state == SMTP_STOP) ? TRUE : FALSE;
 
   return result;
 }
 
-static CURLcode smtp_easy_statemach(struct connectdata *conn)
+static CURLcode smtp_block_statemach(struct connectdata *conn)
 {
-  struct smtp_conn *smtpc = &conn->proto.smtpc;
-  struct pingpong *pp = &smtpc->pp;
   CURLcode result = CURLE_OK;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
 
-  while(smtpc->state != SMTP_STOP) {
-    result = Curl_pp_easy_statemach(pp);
-    if(result)
-      break;
-  }
+  while(smtpc->state != SMTP_STOP && !result)
+    result = Curl_pp_statemach(&smtpc->pp, TRUE);
 
   return result;
 }
 
-/*
- * Allocate and initialize the struct SMTP for the current SessionHandle.  If
- * need be.
- */
+/* Allocate and initialize the SMTP struct for the current SessionHandle if
+   required */
 static CURLcode smtp_init(struct connectdata *conn)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *smtp = data->state.proto.smtp;
+  struct SMTP *smtp = data->state.proto.smtp;
+
   if(!smtp) {
-    smtp = data->state.proto.smtp = calloc(sizeof(struct FTP), 1);
+    smtp = data->state.proto.smtp = calloc(sizeof(struct SMTP), 1);
     if(!smtp)
-      return CURLE_OUT_OF_MEMORY;
+      result = CURLE_OUT_OF_MEMORY;
   }
 
-  /* get some initial data into the smtp struct */
-  smtp->bytecountp = &data->req.bytecount;
-
-  /* No need to duplicate user+password, the connectdata struct won't change
-     during a session, but we re-init them here since on subsequent inits
-     since the conn struct may have changed or been replaced.
-  */
-  smtp->user = conn->user;
-  smtp->passwd = conn->passwd;
+  return result;
+}
 
-  return CURLE_OK;
+/* For the SMTP "protocol connect" and "doing" phases only */
+static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks,
+                        int numsocks)
+{
+  return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks);
 }
 
-/*
- * smtp_connect() should do everything that is to be considered a part of
+/***********************************************************************
+ *
+ * smtp_connect()
+ *
+ * This function should do everything that is to be considered a part of
  * the connection phase.
  *
- * The variable 'done' points to will be TRUE if the protocol-layer connect
- * phase is done when this function returns, or FALSE is not. When called as
- * a part of the easy interface, it will always be TRUE.
+ * The variable pointed to by 'done' will be TRUE if the protocol-layer
+ * connect phase is done when this function returns, or FALSE if not.
  */
-static CURLcode smtp_connect(struct connectdata *conn,
-                             bool *done) /* see description above */
+static CURLcode smtp_connect(struct connectdata *conn, bool *done)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   struct smtp_conn *smtpc = &conn->proto.smtpc;
-  struct SessionHandle *data=conn->data;
-  struct pingpong *pp=&smtpc->pp;
-  const char *path = conn->data->state.path;
-  int len;
-  char localhost[1024 + 1];
+  struct pingpong *pp = &smtpc->pp;
 
   *done = FALSE; /* default to not done yet */
 
@@ -1056,86 +1401,40 @@ static CURLcode smtp_connect(struct connectdata *conn,
      sessionhandle, deal with it */
   Curl_reset_reqproto(conn);
 
+  /* Initialise the SMTP layer */
   result = smtp_init(conn);
-  if(CURLE_OK != result)
+  if(result)
     return result;
 
-  /* We always support persistant connections on smtp */
+  /* We always support persistent connections in SMTP */
   conn->bits.close = FALSE;
 
-  pp->response_time = RESP_TIMEOUT; /* set default response time-out */
+  /* Set the default response time-out */
+  pp->response_time = RESP_TIMEOUT;
   pp->statemach_act = smtp_statemach_act;
   pp->endofresp = smtp_endofresp;
   pp->conn = conn;
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY)
-  if(conn->bits.tunnel_proxy && conn->bits.httpproxy) {
-    /* for SMTP over HTTP proxy */
-    struct HTTP http_proxy;
-    struct FTP *smtp_save;
-
-    /* BLOCKING */
-    /* We want "seamless" SMTP operations through HTTP proxy tunnel */
-
-    /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the member
-     * conn->proto.http; we want SMTP through HTTP and we have to change the
-     * member temporarily for connecting to the HTTP proxy. After
-     * Curl_proxyCONNECT we have to set back the member to the original struct
-     * SMTP pointer
-     */
-    smtp_save = data->state.proto.smtp;
-    memset(&http_proxy, 0, sizeof(http_proxy));
-    data->state.proto.http = &http_proxy;
-
-    result = Curl_proxyCONNECT(conn, FIRSTSOCKET,
-                               conn->host.name, conn->remote_port);
-
-    data->state.proto.smtp = smtp_save;
+  /* Set the default preferred authentication mechanism */
+  smtpc->prefmech = SASL_AUTH_ANY;
 
-    if(CURLE_OK != result)
-      return result;
-  }
-#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
-
-  if(conn->protocol & PROT_SMTPS) {
-    /* BLOCKING */
-    /* SMTPS is simply smtp with SSL for the control channel */
-    /* now, perform the SSL initialization for this socket */
-    result = Curl_ssl_connect(conn, FIRSTSOCKET);
-    if(result)
-      return result;
-  }
+  /* Initialise the pingpong layer */
+  Curl_pp_init(pp);
 
-  Curl_pp_init(pp); /* init the response reader stuff */
-
-  pp->response_time = RESP_TIMEOUT; /* set default response time-out */
-  pp->statemach_act = smtp_statemach_act;
-  pp->endofresp = smtp_endofresp;
-  pp->conn = conn;
-
-  if(!*path) {
-    if(!Curl_gethostname(localhost, sizeof localhost))
-      path = localhost;
-    else
-      path = "localhost";
-  }
+  /* Parse the URL options */
+  result = smtp_parse_url_options(conn);
+  if(result)
+    return result;
 
-  /* url decode the path and use it as domain with EHLO */
-  smtpc->domain = curl_easy_unescape(conn->data, path, 0, &len);
-  if(!smtpc->domain)
-    return CURLE_OUT_OF_MEMORY;
+  /* Parse the URL path */
+  result = smtp_parse_url_path(conn);
+  if(result)
+    return result;
 
-  /* When we connect, we start in the state where we await the server greeting
-   */
+  /* Start off waiting for the server greeting response */
   state(conn, SMTP_SERVERGREET);
 
-  if(data->state.used_interface == Curl_if_multi)
-    result = smtp_multi_statemach(conn, done);
-  else {
-    result = smtp_easy_statemach(conn);
-    if(!result)
-      *done = TRUE;
-  }
+  result = smtp_multi_statemach(conn, done);
 
   return result;
 }
@@ -1152,52 +1451,67 @@ static CURLcode smtp_connect(struct connectdata *conn,
 static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
                           bool premature)
 {
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
-  struct FTP *smtp = data->state.proto.smtp;
-  CURLcode result=CURLE_OK;
+  struct SMTP *smtp = data->state.proto.smtp;
+  struct pingpong *pp = &conn->proto.smtpc.pp;
+  const char *eob;
+  ssize_t len;
   ssize_t bytes_written;
+
   (void)premature;
 
   if(!smtp)
-    /* When the easy handle is removed from the multi while libcurl is still
-     * trying to resolve the host name, it seems that the smtp struct is not
-     * yet initialized, but the removal action calls Curl_done() which calls
-     * this function. So we simply return success if no smtp pointer is set.
-     */
+    /* When the easy handle is removed from the multi interface while libcurl
+       is still trying to resolve the host name, the SMTP struct is not yet
+       initialized. However, the removal action calls Curl_done() which in
+       turn calls this function, so we simply return success. */
     return CURLE_OK;
 
   if(status) {
     conn->bits.close = TRUE; /* marked for closure */
-    result = status;      /* use the already set error code */
+    result = status;         /* use the already set error code */
   }
-  else
-    /* TODO: make this work even when the socket is EWOULDBLOCK in this call! */
-
-    /* write to socket (send away data) */
-    result = Curl_write(conn,
-                        conn->writesockfd,  /* socket to send to */
-                        SMTP_EOB,           /* buffer pointer */
-                        SMTP_EOB_LEN,       /* buffer size */
-                        &bytes_written);    /* actually sent away */
+  else if(!data->set.connect_only) {
+    /* Calculate the EOB taking into account any terminating CRLF from the
+       previous line of the email or the CRLF of the DATA command when there
+       is "no mail data". RFC-5321, sect. 4.1.1.4. */
+    eob = SMTP_EOB;
+    len = SMTP_EOB_LEN;
+    if(smtp->trailing_crlf || !conn->data->set.infilesize) {
+      eob += 2;
+      len -= 2;
+    }
 
+    /* Send the end of block data */
+    result = Curl_write(conn, conn->writesockfd, eob, len, &bytes_written);
+    if(result)
+      return result;
 
-  if(status == CURLE_OK) {
-    struct smtp_conn *smtpc = &conn->proto.smtpc;
-    struct pingpong *pp= &smtpc->pp;
-    pp->response = Curl_tvnow(); /* timeout relative now */
+    if(bytes_written != len) {
+      /* The whole chunk was not sent so keep it around and adjust the
+         pingpong structure accordingly */
+      pp->sendthis = strdup(eob);
+      pp->sendsize = len;
+      pp->sendleft = len - bytes_written;
+    }
+    else
+      /* Successfully sent so adjust the response timeout relative to now */
+      pp->response = Curl_tvnow();
 
     state(conn, SMTP_POSTDATA);
-    /* run the state-machine
+
+    /* Run the state-machine
 
        TODO: when the multi interface is used, this _really_ should be using
        the smtp_multi_statemach function but we have no general support for
        non-blocking DONE operations, not in the multi state machine and with
        Curl_done() invokes on several places in the code!
     */
-    result = smtp_easy_statemach(conn);
+    result = smtp_block_statemach(conn);
   }
 
-  /* clear these for next connection */
+  /* Clear the transfer mode for the next request */
   smtp->transfer = FTPTRANSFER_BODY;
 
   return result;
@@ -1207,41 +1521,34 @@ static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
  *
  * smtp_perform()
  *
- * This is the actual DO function for SMTP. Get a file/directory according to
- * the options previously setup.
+ * This is the actual DO function for SMTP. Send a mail according to the
+ * options previously setup.
  */
-
-static
-CURLcode smtp_perform(struct connectdata *conn,
-                     bool *connected,  /* connect status after PASV / PORT */
-                     bool *dophase_done)
+static CURLcode smtp_perform(struct connectdata *conn, bool *connected,
+                             bool *dophase_done)
 {
-  /* this is SMTP and no proxy */
-  CURLcode result=CURLE_OK;
+  /* This is SMTP and no proxy */
+  CURLcode result = CURLE_OK;
 
   DEBUGF(infof(conn->data, "DO phase starts\n"));
 
   if(conn->data->set.opt_no_body) {
-    /* requested no body means no transfer... */
-    struct FTP *smtp = conn->data->state.proto.smtp;
+    /* Requested no body means no transfer */
+    struct SMTP *smtp = conn->data->state.proto.smtp;
     smtp->transfer = FTPTRANSFER_INFO;
   }
 
   *dophase_done = FALSE; /* not done yet */
 
-  /* start the first command in the DO phase */
-  result = smtp_mail(conn);
+  /* Start the first command in the DO phase */
+  result = smtp_perform_mail(conn);
   if(result)
     return result;
 
   /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi)
-    result = smtp_multi_statemach(conn, dophase_done);
-  else {
-    result = smtp_easy_statemach(conn);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  result = smtp_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done)
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -1260,45 +1567,20 @@ CURLcode smtp_perform(struct connectdata *conn,
  */
 static CURLcode smtp_do(struct connectdata *conn, bool *done)
 {
-  CURLcode retcode = CURLE_OK;
+  CURLcode result = CURLE_OK;
 
   *done = FALSE; /* default to false */
 
-  /*
-    Since connections can be re-used between SessionHandles, this might be a
-    connection already existing but on a fresh SessionHandle struct so we must
-    make sure we have a good 'struct SMTP' to play with. For new connections,
-    the struct SMTP is allocated and setup in the smtp_connect() function.
-  */
+  /* Since connections can be re-used between SessionHandles, there might be a
+     connection already existing but on a fresh SessionHandle struct. As such
+     we make sure we have a good SMTP struct to play with. For new connections
+     the SMTP struct is allocated and setup in the smtp_connect() function. */
   Curl_reset_reqproto(conn);
-  retcode = smtp_init(conn);
-  if(retcode)
-    return retcode;
-
-  retcode = smtp_regular_transfer(conn, done);
-
-  return retcode;
-}
-
-/***********************************************************************
- *
- * smtp_quit()
- *
- * This should be called before calling sclose().  We should then wait for the
- * response from the server before returning. The calling code should then try
- * to close the connection.
- *
- */
-static CURLcode smtp_quit(struct connectdata *conn)
-{
-  CURLcode result = CURLE_OK;
-
-  result = Curl_pp_sendf(&conn->proto.smtpc.pp, "QUIT");
+  result = smtp_init(conn);
   if(result)
     return result;
-  state(conn, SMTP_QUIT);
 
-  result = smtp_easy_statemach(conn);
+  result = smtp_regular_transfer(conn, done);
 
   return result;
 }
@@ -1310,59 +1592,60 @@ static CURLcode smtp_quit(struct connectdata *conn)
  * Disconnect from an SMTP server. Cleanup protocol-specific per-connection
  * resources. BLOCKING.
  */
-static CURLcode smtp_disconnect(struct connectdata *conn, bool dead_connection)
+static CURLcode smtp_disconnect(struct connectdata *conn,
+                                bool dead_connection)
 {
-  struct smtp_conn *smtpc= &conn->proto.smtpc;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
 
   /* We cannot send quit unconditionally. If this connection is stale or
      bad in any way, sending quit and waiting around here will make the
-     disconnect wait in vain and cause more problems than we need to.
-  */
+     disconnect wait in vain and cause more problems than we need to. */
 
   /* The SMTP session may or may not have been allocated/setup at this
      point! */
   if(!dead_connection && smtpc->pp.conn)
-    (void)smtp_quit(conn); /* ignore errors on the LOGOUT */
+    if(!smtp_perform_quit(conn))
+      (void)smtp_block_statemach(conn); /* ignore errors on QUIT */
 
+  /* Disconnect from the server */
   Curl_pp_disconnect(&smtpc->pp);
 
-  /* This won't already be freed in some error cases */
+  /* Cleanup the SASL module */
+  Curl_sasl_cleanup(conn, smtpc->authused);
+
+  /* Cleanup our connection based variables */
   Curl_safefree(smtpc->domain);
-  smtpc->domain = NULL;
 
   return CURLE_OK;
 }
 
-/* call this when the DO phase has completed */
-static CURLcode smtp_dophase_done(struct connectdata *conn,
-                                  bool connected)
+/* Call this when the DO phase has completed */
+static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected)
 {
-  struct FTP *smtp = conn->data->state.proto.smtp;
-  struct smtp_conn *smtpc= &conn->proto.smtpc;
+  struct SMTP *smtp = conn->data->state.proto.smtp;
+
   (void)connected;
 
   if(smtp->transfer != FTPTRANSFER_BODY)
     /* no data to transfer */
     Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
 
-  free(smtpc->domain);
-  smtpc->domain = NULL;
-
   return CURLE_OK;
 }
 
-/* called from multi.c while DOing */
-static CURLcode smtp_doing(struct connectdata *conn,
-                               bool *dophase_done)
+/* Called from multi.c while DOing */
+static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done)
 {
-  CURLcode result;
-  result = smtp_multi_statemach(conn, dophase_done);
+  CURLcode result = smtp_multi_statemach(conn, dophase_done);
 
-  if(*dophase_done) {
+  if(result)
+    DEBUGF(infof(conn->data, "DO phase failed\n"));
+  else if(*dophase_done) {
     result = smtp_dophase_done(conn, FALSE /* not connected */);
 
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
   }
+
   return result;
 }
 
@@ -1375,44 +1658,38 @@ static CURLcode smtp_doing(struct connectdata *conn,
  * Performs all commands done before a regular transfer between a local and a
  * remote host.
  */
-static
-CURLcode smtp_regular_transfer(struct connectdata *conn,
-                              bool *dophase_done)
+static CURLcode smtp_regular_transfer(struct connectdata *conn,
+                                      bool *dophase_done)
 {
-  CURLcode result=CURLE_OK;
-  bool connected=FALSE;
+  CURLcode result = CURLE_OK;
+  bool connected = FALSE;
   struct SessionHandle *data = conn->data;
-  data->req.size = -1; /* make sure this is unknown at this point */
 
+  /* Make sure size is unknown at this point */
+  data->req.size = -1;
+
+  /* Set the progress data */
   Curl_pgrsSetUploadCounter(data, 0);
   Curl_pgrsSetDownloadCounter(data, 0);
   Curl_pgrsSetUploadSize(data, 0);
   Curl_pgrsSetDownloadSize(data, 0);
 
-  result = smtp_perform(conn,
-                        &connected, /* have we connected after PASV/PORT */
-                        dophase_done); /* all commands in the DO-phase done? */
-
-  if(CURLE_OK == result) {
-
-    if(!*dophase_done)
-      /* the DO phase has not completed yet */
-      return CURLE_OK;
+  /* Carry out the perform */
+  result = smtp_perform(conn, &connected, dophase_done);
 
+  /* Perform post DO phase operations if necessary */
+  if(!result && *dophase_done)
     result = smtp_dophase_done(conn, connected);
-    if(result)
-      return result;
-  }
 
   return result;
 }
 
-static CURLcode smtp_setup_connection(struct connectdata * conn)
+static CURLcode smtp_setup_connection(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
 
   if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) {
-    /* Unless we have asked to tunnel smtp operations through the proxy, we
+    /* Unless we have asked to tunnel SMTP operations through the proxy, we
        switch and use HTTP operations only */
 #ifndef CURL_DISABLE_HTTP
     if(conn->handler == &Curl_handler_smtp)
@@ -1425,11 +1702,10 @@ static CURLcode smtp_setup_connection(struct connectdata * conn)
       return CURLE_UNSUPPORTED_PROTOCOL;
 #endif
     }
-    /*
-     * We explicitly mark this connection as persistent here as we're doing
-     * SMTP over HTTP and thus we accidentally avoid setting this value
-     * otherwise.
-     */
+
+    /* We explicitly mark this connection as persistent here as we're doing
+       SMTP over HTTP and thus we accidentally avoid setting this value
+       otherwise */
     conn->bits.close = FALSE;
 #else
     failf(data, "SMTP over http proxy requires HTTP support built-in!");
@@ -1442,66 +1718,157 @@ static CURLcode smtp_setup_connection(struct connectdata * conn)
   return CURLE_OK;
 }
 
+/***********************************************************************
+ *
+ * smtp_parse_url_options()
+ *
+ * Parse the URL login options.
+ */
+static CURLcode smtp_parse_url_options(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
+  const char *options = conn->options;
+  const char *ptr = options;
+
+  if(options) {
+    const char *key = ptr;
+
+    while(*ptr && *ptr != '=')
+        ptr++;
+
+    if(strnequal(key, "AUTH", 4)) {
+      const char *value = ptr + 1;
+
+      if(strequal(value, "*"))
+        smtpc->prefmech = SASL_AUTH_ANY;
+      else if(strequal(value, "LOGIN"))
+        smtpc->prefmech = SASL_MECH_LOGIN;
+      else if(strequal(value, "PLAIN"))
+        smtpc->prefmech = SASL_MECH_PLAIN;
+      else if(strequal(value, "CRAM-MD5"))
+        smtpc->prefmech = SASL_MECH_CRAM_MD5;
+      else if(strequal(value, "DIGEST-MD5"))
+        smtpc->prefmech = SASL_MECH_DIGEST_MD5;
+      else if(strequal(value, "GSSAPI"))
+        smtpc->prefmech = SASL_MECH_GSSAPI;
+      else if(strequal(value, "NTLM"))
+        smtpc->prefmech = SASL_MECH_NTLM;
+      else
+        smtpc->prefmech = SASL_AUTH_NONE;
+    }
+    else
+      result = CURLE_URL_MALFORMAT;
+  }
+
+  return result;
+}
+
+/***********************************************************************
+ *
+ * smtp_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ */
+static CURLcode smtp_parse_url_path(struct connectdata *conn)
+{
+  /* The SMTP struct is already initialised in smtp_connect() */
+  struct SessionHandle *data = conn->data;
+  struct smtp_conn *smtpc = &conn->proto.smtpc;
+  const char *path = data->state.path;
+  char localhost[HOSTNAME_MAX + 1];
+
+  /* Calculate the path if necessary */
+  if(!*path) {
+    if(!Curl_gethostname(localhost, sizeof(localhost)))
+      path = localhost;
+    else
+      path = "localhost";
+  }
+
+  /* URL decode the path and use it as the domain in our EHLO */
+  return Curl_urldecode(conn->data, path, 0, &smtpc->domain, NULL, TRUE);
+}
+
 CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
 {
-  /* When sending SMTP payload, we must detect CRLF.CRLF sequences in
-   * the data and make sure it is sent as CRLF..CRLF instead, as
-   * otherwise it will wrongly be detected as end of data by the server.
-   */
+  /* When sending a SMTP payload we must detect CRLF. sequences making sure
+     they are sent as CRLF.. instead, as a . on the beginning of a line will
+     be deleted by the server when not part of an EOB terminator and a
+     genuine CRLF.CRLF which isn't escaped will wrongly be detected as end of
+     data by the server
+  */
   ssize_t i;
   ssize_t si;
-  struct smtp_conn *smtpc = &conn->proto.smtpc;
   struct SessionHandle *data = conn->data;
+  struct SMTP *smtp = data->state.proto.smtp;
 
-  if(data->state.scratch == NULL)
-    data->state.scratch = malloc(2*BUFSIZE);
-  if(data->state.scratch == NULL) {
-    failf (data, "Failed to alloc scratch buffer!");
-    return CURLE_OUT_OF_MEMORY;
+  /* Do we need to allocate the scatch buffer? */
+  if(!data->state.scratch) {
+    data->state.scratch = malloc(2 * BUFSIZE);
+
+    if(!data->state.scratch) {
+      failf (data, "Failed to alloc scratch buffer!");
+      return CURLE_OUT_OF_MEMORY;
+    }
   }
+
   /* This loop can be improved by some kind of Boyer-Moore style of
      approach but that is saved for later... */
-  for(i = 0, si = 0; i < nread; i++, si++) {
-    ssize_t left = nread - i;
-
-    if(left>= (ssize_t)(SMTP_EOB_LEN-smtpc->eob)) {
-      if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
-                 SMTP_EOB_LEN-smtpc->eob)) {
-        /* It matched, copy the replacement data to the target buffer
-           instead. Note that the replacement does not contain the
-           trailing CRLF but we instead continue to match on that one
-           to deal with repeated sequences. Like CRLF.CRLF.CRLF etc
-        */
-        memcpy(&data->state.scratch[si], SMTP_EOB_REPL,
-               SMTP_EOB_REPL_LEN);
-        si+=SMTP_EOB_REPL_LEN-1; /* minus one since the for() increments
-                                          it */
-        i+=SMTP_EOB_LEN-smtpc->eob-1-2;
-        smtpc->eob = 0; /* start over */
-        continue;
-      }
+  for(i = 0, si = 0; i < nread; i++) {
+    if(SMTP_EOB[smtp->eob] == data->req.upload_fromhere[i]) {
+      smtp->eob++;
+
+      /* Is the EOB potentially the terminating CRLF? */
+      if(2 == smtp->eob || SMTP_EOB_LEN == smtp->eob)
+        smtp->trailing_crlf = TRUE;
+      else
+        smtp->trailing_crlf = FALSE;
     }
-    else if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
-                    left)) {
-      /* the last piece of the data matches the EOB so we can't send that
-         until we know the rest of it */
-      smtpc->eob += left;
-      break;
+    else if(smtp->eob) {
+      /* A previous substring matched so output that first */
+      memcpy(&data->state.scratch[si], SMTP_EOB, smtp->eob);
+      si += smtp->eob;
+
+      /* Then compare the first byte */
+      if(SMTP_EOB[0] == data->req.upload_fromhere[i])
+        smtp->eob = 1;
+      else
+        smtp->eob = 0;
+
+      /* Reset the trailing CRLF flag as there was more data */
+      smtp->trailing_crlf = FALSE;
     }
 
-    data->state.scratch[si] = data->req.upload_fromhere[i];
-  } /* for() */
+    /* Do we have a match for CRLF. as per RFC-5321, sect. 4.5.2 */
+    if(SMTP_EOB_FIND_LEN == smtp->eob) {
+      /* Copy the replacement data to the target buffer */
+      memcpy(&data->state.scratch[si], SMTP_EOB_REPL, SMTP_EOB_REPL_LEN);
+      si += SMTP_EOB_REPL_LEN;
+      smtp->eob = 0;
+    }
+    else if(!smtp->eob)
+      data->state.scratch[si++] = data->req.upload_fromhere[i];
+  }
+
+  if(smtp->eob) {
+    /* A substring matched before processing ended so output that now */
+    memcpy(&data->state.scratch[si], SMTP_EOB, smtp->eob);
+    si += smtp->eob;
+    smtp->eob = 0;
+  }
 
   if(si != nread) {
-    /* only use the new buffer if we replaced something */
+    /* Only use the new buffer if we replaced something */
     nread = si;
 
-    /* upload from the new (replaced) buffer instead */
+    /* Upload from the new (replaced) buffer instead */
     data->req.upload_fromhere = data->state.scratch;
 
-    /* set the new amount too */
+    /* Set the new amount too */
     data->req.upload_present = nread;
   }
+
   return CURLE_OK;
 }
 
index 417fd52..4aff0c5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SMTP_H
-#define __SMTP_H
+#ifndef HEADER_CURL_SMTP_H
+#define HEADER_CURL_SMTP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2009 - 2013, 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
@@ -34,45 +34,59 @@ typedef enum {
   SMTP_EHLO,
   SMTP_HELO,
   SMTP_STARTTLS,
-  SMTP_AUTHPLAIN,
-  SMTP_AUTHLOGIN,
-  SMTP_AUTHPASSWD,
-  SMTP_AUTHCRAM,
-  SMTP_AUTH,
-  SMTP_MAIL, /* MAIL FROM */
-  SMTP_RCPT, /* RCPT TO */
+  SMTP_UPGRADETLS,  /* asynchronously upgrade the connection to SSL/TLS
+                       (multi mode only) */
+  SMTP_AUTH_PLAIN,
+  SMTP_AUTH_LOGIN,
+  SMTP_AUTH_LOGIN_PASSWD,
+  SMTP_AUTH_CRAMMD5,
+  SMTP_AUTH_DIGESTMD5,
+  SMTP_AUTH_DIGESTMD5_RESP,
+  SMTP_AUTH_NTLM,
+  SMTP_AUTH_NTLM_TYPE2MSG,
+  SMTP_AUTH_FINAL,
+  SMTP_MAIL,        /* MAIL FROM */
+  SMTP_RCPT,        /* RCPT TO */
   SMTP_DATA,
   SMTP_POSTDATA,
   SMTP_QUIT,
-  SMTP_LAST  /* never used */
+  SMTP_LAST         /* never used */
 } smtpstate;
 
+/* This SMTP struct is used in the SessionHandle. All SMTP data that is
+   connection-oriented must be in smtp_conn to properly deal with the fact that
+   perhaps the SessionHandle is changed between the times the connection is
+   used. */
+struct SMTP {
+  curl_pp_transfer transfer;
+  struct curl_slist *rcpt; /* Recipient list */
+  size_t eob;              /* Number of bytes of the EOB (End Of Body) that
+                              have been received so far */
+  bool trailing_crlf;      /* Specifies if the tailing CRLF is present */
+};
+
 /* smtp_conn is used for struct connection-oriented data in the connectdata
    struct */
 struct smtp_conn {
   struct pingpong pp;
-  char *domain;    /* what to send in the EHLO */
-  size_t eob;         /* number of bytes of the EOB (End Of Body) that has been
-                         received thus far */
-  unsigned int authmechs;       /* Accepted authentication methods. */
-  smtpstate state; /* always use smtp.c:state() to change state! */
-  struct curl_slist *rcpt;
+  smtpstate state;         /* Always use smtp.c:state() to change state! */
+  bool ssldone;            /* Is connect() over SSL done? */
+  char *domain;            /* Client address/name to send in the EHLO */
+  unsigned int authmechs;  /* Accepted authentication mechanisms */
+  unsigned int prefmech;   /* Preferred authentication mechanism */
+  unsigned int authused;   /* Auth mechanism used for the connection */
+  bool tls_supported;      /* StartTLS capability supported by server */
+  bool size_supported;     /* If server supports SIZE extension according to
+                              RFC 1870 */
 };
 
-/* Authentication mechanism flags. */
-#define SMTP_AUTH_LOGIN         0x0001
-#define SMTP_AUTH_PLAIN         0x0002
-#define SMTP_AUTH_CRAM_MD5      0x0004
-#define SMTP_AUTH_DIGEST_MD5    0x0008
-#define SMTP_AUTH_GSSAPI        0x0010
-#define SMTP_AUTH_EXTERNAL      0x0020
-
 extern const struct Curl_handler Curl_handler_smtp;
 extern const struct Curl_handler Curl_handler_smtps;
 
 /* this is the 5-bytes End-Of-Body marker for SMTP */
 #define SMTP_EOB "\x0d\x0a\x2e\x0d\x0a"
 #define SMTP_EOB_LEN 5
+#define SMTP_EOB_FIND_LEN 3
 
 /* if found in data, replace it with this string instead */
 #define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e"
@@ -80,4 +94,4 @@ extern const struct Curl_handler Curl_handler_smtps;
 
 CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread);
 
-#endif /* __SMTP_H */
+#endif /* HEADER_CURL_SMTP_H */
index c69411b..6a2151c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SOCKADDR_H
-#define __SOCKADDR_H
+#ifndef HEADER_CURL_SOCKADDR_H
+#define HEADER_CURL_SOCKADDR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
 struct Curl_sockaddr_storage {
-  struct sockaddr_storage buffer;
-};
+  union {
+    struct sockaddr sa;
+    struct sockaddr_in sa_in;
+#ifdef ENABLE_IPV6
+    struct sockaddr_in6 sa_in6;
+#endif
+#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
+    struct sockaddr_storage sa_stor;
 #else
-struct Curl_sockaddr_storage {
-  char buffer[256];   /* this should be big enough to fit a lot */
-};
+    char cbuf[256];   /* this should be big enough to fit a lot */
 #endif
+  } buffer;
+};
+
+#endif /* HEADER_CURL_SOCKADDR_H */
 
-#endif /* __SOCKADDR_H */
index 7b5740b..b101a0d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_PROXY) || defined(USE_WINDOWS_SSPI)
-#include <string.h>
+#if !defined(CURL_DISABLE_PROXY)
 
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -60,28 +53,21 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
                        curl_socket_t sockfd,     /* read from this socket */
                        char *buf,                /* store read data here */
                        ssize_t buffersize,       /* max amount to read */
-                       ssize_t *n,               /* amount bytes read */
-                       long conn_timeout)        /* timeout for data wait
-                                                    relative to
-                                                    conn->created */
+                       ssize_t *n)               /* amount bytes read */
 {
   ssize_t nread;
   ssize_t allread = 0;
   int result;
-  struct timeval tvnow;
-  long conntime;
+  long timeleft;
   *n = 0;
   for(;;) {
-    tvnow = Curl_tvnow();
-    /* calculating how long connection is establishing */
-    conntime = Curl_tvdiff(tvnow, conn->created);
-    if(conntime > conn_timeout) {
+    timeleft = Curl_timeleft(conn->data, NULL, TRUE);
+    if(timeleft < 0) {
       /* we already got the timeout */
       result = CURLE_OPERATION_TIMEDOUT;
       break;
     }
-    if(Curl_socket_ready(sockfd, CURL_SOCKET_BAD,
-                   (int)(conn_timeout - conntime)) <= 0) {
+    if(Curl_socket_ready(sockfd, CURL_SOCKET_BAD, timeleft) <= 0) {
       result = ~CURLE_OK;
       break;
     }
@@ -133,13 +119,9 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
   int result;
   CURLcode code;
   curl_socket_t sock = conn->sock[sockindex];
-  long timeout;
   struct SessionHandle *data = conn->data;
 
-  /* get timeout */
-  timeout = Curl_timeleft(conn, NULL, TRUE);
-
-  if(timeout < 0) {
+  if(Curl_timeleft(data, NULL, TRUE) < 0) {
     /* time-out, bail out, go home */
     failf(data, "Connection time-out");
     return CURLE_OPERATION_TIMEDOUT;
@@ -160,10 +142,11 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
 
   socksreq[0] = 4; /* version (SOCKS4) */
   socksreq[1] = 1; /* connect */
-  *((unsigned short*)&socksreq[2]) = htons((unsigned short)remote_port);
+  socksreq[2] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */
+  socksreq[3] = (unsigned char)(remote_port & 0xff);        /* PORT LSB */
 
   /* DNS resolve only for SOCKS4, not SOCKS4a */
-  if (!protocol4a) {
+  if(!protocol4a) {
     struct Curl_dns_entry *dns;
     Curl_addrinfo *hp=NULL;
     int rc;
@@ -175,7 +158,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
 
     if(rc == CURLRESOLV_PENDING)
       /* ignores the return code, but 'dns' remains NULL on failure */
-      (void)Curl_wait_for_resolv(conn, &dns);
+      (void)Curl_resolver_wait_resolv(conn, &dns);
 
     /*
      * We cannot use 'hostent' as a struct that Curl_resolv() returns.  It
@@ -213,8 +196,15 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
    * This is currently not supporting "Identification Protocol (RFC1413)".
    */
   socksreq[8] = 0; /* ensure empty userid is NUL-terminated */
-  if(proxy_name)
-    strlcat((char*)socksreq + 8, proxy_name, sizeof(socksreq) - 8);
+  if(proxy_name) {
+    size_t plen = strlen(proxy_name);
+    if(plen >= sizeof(socksreq) - 8) {
+      failf(data, "Too long SOCKS proxy name, can't use!\n");
+      return CURLE_COULDNT_CONNECT;
+    }
+    /* copy the proxy name WITH trailing zero */
+    memcpy(socksreq + 8, proxy_name, plen+1);
+  }
 
   /*
    * Make connection
@@ -227,14 +217,14 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
       (int)strlen((char*)socksreq + 8); /* size including NUL */
 
     /* If SOCKS4a, set special invalid IP address 0.0.0.x */
-    if (protocol4a) {
+    if(protocol4a) {
       socksreq[4] = 0;
       socksreq[5] = 0;
       socksreq[6] = 0;
       socksreq[7] = 1;
       /* If still enough room in buffer, also append hostname */
       hostnamelen = (ssize_t)strlen(hostname) + 1; /* length including NUL */
-      if (packetsize + hostnamelen <= SOCKS4REQLEN)
+      if(packetsize + hostnamelen <= SOCKS4REQLEN)
         strcpy((char*)socksreq + packetsize, hostname);
       else
         hostnamelen = 0; /* Flag: hostname did not fit in buffer */
@@ -248,7 +238,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
       failf(data, "Failed to send SOCKS4 connect request.");
       return CURLE_COULDNT_CONNECT;
     }
-    if (protocol4a && hostnamelen == 0) {
+    if(protocol4a && hostnamelen == 0) {
       /* SOCKS4a with very long hostname - send that name separately */
       hostnamelen = (ssize_t)strlen(hostname) + 1;
       code = Curl_write_plain(conn, sock, (char *)hostname, hostnamelen,
@@ -263,7 +253,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
 
     /* Receive response */
     result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize,
-                           &actualread, timeout);
+                                &actualread);
     if((result != CURLE_OK) || (actualread != packetsize)) {
       failf(data, "Failed to receive SOCKS4 connect request ack.");
       return CURLE_COULDNT_CONNECT;
@@ -296,13 +286,9 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
     }
 
     /* Result */
-    switch(socksreq[1])
-    {
+    switch(socksreq[1]) {
     case 90:
-      if (protocol4a)
-        infof(data, "SOCKS4a request granted.\n");
-      else
-        infof(data, "SOCKS4 request granted.\n");
+      infof(data, "SOCKS4%s request granted.\n", protocol4a?"a":"");
       break;
     case 91:
       failf(data,
@@ -310,7 +296,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
             ", request rejected or failed.",
             (unsigned char)socksreq[4], (unsigned char)socksreq[5],
             (unsigned char)socksreq[6], (unsigned char)socksreq[7],
-            (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+            ((socksreq[8] << 8) | socksreq[9]),
             socksreq[1]);
       return CURLE_COULDNT_CONNECT;
     case 92:
@@ -320,7 +306,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
             "identd on the client.",
             (unsigned char)socksreq[4], (unsigned char)socksreq[5],
             (unsigned char)socksreq[6], (unsigned char)socksreq[7],
-            (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+            ((socksreq[8] << 8) | socksreq[9]),
             socksreq[1]);
       return CURLE_COULDNT_CONNECT;
     case 93:
@@ -330,7 +316,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
             "report different user-ids.",
             (unsigned char)socksreq[4], (unsigned char)socksreq[5],
             (unsigned char)socksreq[6], (unsigned char)socksreq[7],
-            (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+            ((socksreq[8] << 8) | socksreq[9]),
             socksreq[1]);
       return CURLE_COULDNT_CONNECT;
     default:
@@ -339,7 +325,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
             ", Unknown.",
             (unsigned char)socksreq[4], (unsigned char)socksreq[5],
             (unsigned char)socksreq[6], (unsigned char)socksreq[7],
-            (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+            ((socksreq[8] << 8) | socksreq[9]),
             socksreq[1]);
       return CURLE_COULDNT_CONNECT;
     }
@@ -386,20 +372,19 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   curl_socket_t sock = conn->sock[sockindex];
   struct SessionHandle *data = conn->data;
   long timeout;
-  bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5);
+  bool socks5_resolve_local = (conn->proxytype == CURLPROXY_SOCKS5)?TRUE:FALSE;
   const size_t hostname_len = strlen(hostname);
-  ssize_t packetsize = 0;
+  ssize_t len = 0;
 
   /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
-  if(!socks5_resolve_local && hostname_len > 255)
-  {
+  if(!socks5_resolve_local && hostname_len > 255) {
     infof(conn->data,"SOCKS5: server resolving disabled for hostnames of "
           "length > 255 [actual len=%zu]\n", hostname_len);
     socks5_resolve_local = TRUE;
   }
 
   /* get timeout */
-  timeout = Curl_timeleft(conn, NULL, TRUE);
+  timeout = Curl_timeleft(data, NULL, TRUE);
 
   if(timeout < 0) {
     /* time-out, bail out, go home */
@@ -410,7 +395,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   curlx_nonblock(sock, TRUE);
 
   /* wait until socket gets connected */
-  result = Curl_socket_ready(CURL_SOCKET_BAD, sock, (int)timeout);
+  result = Curl_socket_ready(CURL_SOCKET_BAD, sock, timeout);
 
   if(-1 == result) {
     failf(conn->data, "SOCKS5: no connection here");
@@ -422,7 +407,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   }
 
   if(result & CURL_CSELECT_ERR) {
-    failf(conn->data, "SOCKS5: error occured during connection");
+    failf(conn->data, "SOCKS5: error occurred during connection");
     return CURLE_COULDNT_CONNECT;
   }
 
@@ -449,7 +434,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
 
   curlx_nonblock(sock, TRUE);
 
-  result = Curl_socket_ready(sock, CURL_SOCKET_BAD, (int)timeout);
+  result = Curl_socket_ready(sock, CURL_SOCKET_BAD, timeout);
 
   if(-1 == result) {
     failf(conn->data, "SOCKS5 nothing to read");
@@ -461,14 +446,13 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   }
 
   if(result & CURL_CSELECT_ERR) {
-    failf(conn->data, "SOCKS5 read error occured");
+    failf(conn->data, "SOCKS5 read error occurred");
     return CURLE_RECV_ERROR;
   }
 
   curlx_nonblock(sock, FALSE);
 
-  result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread,
-                            timeout);
+  result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread);
   if((result != CURLE_OK) || (actualread != 2)) {
     failf(data, "Unable to receive initial SOCKS5 response.");
     return CURLE_COULDNT_CONNECT;
@@ -493,15 +477,14 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
 #endif
   else if(socksreq[1] == 2) {
     /* Needs user name and password */
-    size_t userlen, pwlen;
-    int len;
+    size_t proxy_name_len, proxy_password_len;
     if(proxy_name && proxy_password) {
-      userlen = strlen(proxy_name);
-      pwlen = strlen(proxy_password);
+      proxy_name_len = strlen(proxy_name);
+      proxy_password_len = strlen(proxy_password);
     }
     else {
-      userlen = 0;
-      pwlen = 0;
+      proxy_name_len = 0;
+      proxy_password_len = 0;
     }
 
     /*   username/password request looks like
@@ -513,14 +496,14 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
      */
     len = 0;
     socksreq[len++] = 1;    /* username/pw subnegotiation version */
-    socksreq[len++] = (unsigned char) userlen;
-    if(proxy_name && userlen)
-      memcpy(socksreq + len, proxy_name, userlen);
-    len += (int)userlen;
-    socksreq[len++] = (unsigned char) pwlen;
-    if(proxy_password && pwlen)
-      memcpy(socksreq + len, proxy_password, pwlen);
-    len += (int)pwlen;
+    socksreq[len++] = (unsigned char) proxy_name_len;
+    if(proxy_name && proxy_name_len)
+      memcpy(socksreq + len, proxy_name, proxy_name_len);
+    len += proxy_name_len;
+    socksreq[len++] = (unsigned char) proxy_password_len;
+    if(proxy_password && proxy_password_len)
+      memcpy(socksreq + len, proxy_password, proxy_password_len);
+    len += proxy_password_len;
 
     code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written);
     if((code != CURLE_OK) || (len != written)) {
@@ -528,8 +511,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
       return CURLE_COULDNT_CONNECT;
     }
 
-    result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread,
-                         timeout);
+    result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread);
     if((result != CURLE_OK) || (actualread != 2)) {
       failf(data, "Unable to receive SOCKS5 sub-negotiation response.");
       return CURLE_COULDNT_CONNECT;
@@ -575,35 +557,28 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   }
 
   /* Authentication is complete, now specify destination to the proxy */
-  socksreq[0] = 5; /* version (SOCKS5) */
-  socksreq[1] = 1; /* connect */
-  socksreq[2] = 0; /* must be zero */
+  len = 0;
+  socksreq[len++] = 5; /* version (SOCKS5) */
+  socksreq[len++] = 1; /* connect */
+  socksreq[len++] = 0; /* must be zero */
 
   if(!socks5_resolve_local) {
-    packetsize = (ssize_t)(5 + hostname_len + 2);
-
-    socksreq[3] = 3; /* ATYP: domain name = 3 */
-    socksreq[4] = (char) hostname_len; /* address length */
-    memcpy(&socksreq[5], hostname, hostname_len); /* address bytes w/o NULL */
-
-    *((unsigned short*)&socksreq[hostname_len+5]) =
-      htons((unsigned short)remote_port);
+    socksreq[len++] = 3; /* ATYP: domain name = 3 */
+    socksreq[len++] = (char) hostname_len; /* address length */
+    memcpy(&socksreq[len], hostname, hostname_len); /* address str w/o NULL */
+    len += hostname_len;
   }
   else {
     struct Curl_dns_entry *dns;
-    Curl_addrinfo *hp=NULL;
+    Curl_addrinfo *hp = NULL;
     int rc = Curl_resolv(conn, hostname, remote_port, &dns);
 
-    packetsize = 10;
-
-    socksreq[3] = 1; /* IPv4 = 1 */
-
     if(rc == CURLRESOLV_ERROR)
       return CURLE_COULDNT_RESOLVE_HOST;
 
     if(rc == CURLRESOLV_PENDING) {
       /* this requires that we're in "wait for resolve" state */
-      code = Curl_wait_for_resolv(conn, &dns);
+      code = Curl_resolver_wait_resolv(conn, &dns);
       if(code != CURLE_OK)
         return code;
     }
@@ -615,17 +590,31 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
     if(dns)
       hp=dns->addr;
     if(hp) {
-      char buf[64];
-      unsigned short ip[4];
-      Curl_printable_address(hp, buf, sizeof(buf));
+      struct sockaddr_in *saddr_in;
+#ifdef ENABLE_IPV6
+      struct sockaddr_in6 *saddr_in6;
+#endif
+      int i;
 
-      if(4 == sscanf( buf, "%hu.%hu.%hu.%hu",
-                      &ip[0], &ip[1], &ip[2], &ip[3])) {
-        socksreq[4] = (unsigned char)ip[0];
-        socksreq[5] = (unsigned char)ip[1];
-        socksreq[6] = (unsigned char)ip[2];
-        socksreq[7] = (unsigned char)ip[3];
+      if(hp->ai_family == AF_INET) {
+        socksreq[len++] = 1; /* ATYP: IPv4 = 1 */
+
+        saddr_in = (struct sockaddr_in*)hp->ai_addr;
+        for(i = 0; i < 4; i++) {
+          socksreq[len++] = ((unsigned char*)&saddr_in->sin_addr.s_addr)[i];
+          infof(data, "%d\n", socksreq[len-1]);
+        }
       }
+#ifdef ENABLE_IPV6
+      else if(hp->ai_family == AF_INET6) {
+        socksreq[len++] = 4; /* ATYP: IPv6 = 4 */
+
+        saddr_in6 = (struct sockaddr_in6*)hp->ai_addr;
+        for(i = 0; i < 16; i++) {
+          socksreq[len++] = ((unsigned char*)&saddr_in6->sin6_addr.s6_addr)[i];
+        }
+      }
+#endif
       else
         hp = NULL; /* fail! */
 
@@ -636,31 +625,36 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
             hostname);
       return CURLE_COULDNT_RESOLVE_HOST;
     }
-
-    *((unsigned short*)&socksreq[8]) = htons((unsigned short)remote_port);
   }
 
+  socksreq[len++] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */
+  socksreq[len++] = (unsigned char)(remote_port & 0xff);        /* PORT LSB */
+
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   if(conn->socks5_gssapi_enctype) {
     failf(data, "SOCKS5 gssapi protection not yet implemented.");
-  } else
+  }
+  else
 #endif
-  code = Curl_write_plain(conn, sock, (char *)socksreq, packetsize, &written);
-  if((code != CURLE_OK) || (written != packetsize)) {
+    code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written);
+
+  if((code != CURLE_OK) || (len != written)) {
     failf(data, "Failed to send SOCKS5 connect request.");
     return CURLE_COULDNT_CONNECT;
   }
 
-  packetsize = 10; /* minimum packet size is 10 */
+  len = 10; /* minimum packet size is 10 */
 
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   if(conn->socks5_gssapi_enctype) {
     failf(data, "SOCKS5 gssapi protection not yet implemented.");
-  } else
+  }
+  else
 #endif
-    result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize,
-                           &actualread, timeout);
-  if((result != CURLE_OK) || (actualread != packetsize)) {
+    result = Curl_blockread_all(conn, sock, (char *)socksreq,
+                                len, &actualread);
+
+  if((result != CURLE_OK) || (len != actualread)) {
     failf(data, "Failed to receive SOCKS5 connect request ack.");
     return CURLE_COULDNT_CONNECT;
   }
@@ -671,13 +665,37 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
     return CURLE_COULDNT_CONNECT;
   }
   if(socksreq[1] != 0) { /* Anything besides 0 is an error */
+    if(socksreq[3] == 1) {
       failf(data,
             "Can't complete SOCKS5 connection to %d.%d.%d.%d:%d. (%d)",
             (unsigned char)socksreq[4], (unsigned char)socksreq[5],
             (unsigned char)socksreq[6], (unsigned char)socksreq[7],
-            (unsigned int)ntohs(*(unsigned short*)(&socksreq[8])),
+            ((socksreq[8] << 8) | socksreq[9]),
             socksreq[1]);
-      return CURLE_COULDNT_CONNECT;
+    }
+    else if(socksreq[3] == 3) {
+      failf(data,
+            "Can't complete SOCKS5 connection to %s:%d. (%d)",
+            hostname,
+            ((socksreq[8] << 8) | socksreq[9]),
+            socksreq[1]);
+    }
+    else if(socksreq[3] == 4) {
+      failf(data,
+            "Can't complete SOCKS5 connection to %02x%02x:%02x%02x:"
+            "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%d. (%d)",
+            (unsigned char)socksreq[4], (unsigned char)socksreq[5],
+            (unsigned char)socksreq[6], (unsigned char)socksreq[7],
+            (unsigned char)socksreq[8], (unsigned char)socksreq[9],
+            (unsigned char)socksreq[10], (unsigned char)socksreq[11],
+            (unsigned char)socksreq[12], (unsigned char)socksreq[13],
+            (unsigned char)socksreq[14], (unsigned char)socksreq[15],
+            (unsigned char)socksreq[16], (unsigned char)socksreq[17],
+            (unsigned char)socksreq[18], (unsigned char)socksreq[19],
+            ((socksreq[8] << 8) | socksreq[9]),
+            socksreq[1]);
+    }
+    return CURLE_COULDNT_CONNECT;
   }
 
   /* Fix: in general, returned BND.ADDR is variable length parameter by RFC
@@ -700,11 +718,11 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   if(socksreq[3] == 3) {
     /* domain name */
     int addrlen = (int) socksreq[4];
-    packetsize = 5 + addrlen + 2;
+    len = 5 + addrlen + 2;
   }
   else if(socksreq[3] == 4) {
     /* IPv6 */
-    packetsize = 4 + 16 + 2;
+    len = 4 + 16 + 2;
   }
 
   /* At this point we already read first 10 bytes */
@@ -712,11 +730,11 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
   if(!conn->socks5_gssapi_enctype) {
     /* decrypt_gssapi_blockread already read the whole packet */
 #endif
-    if(packetsize > 10) {
-      packetsize -= 10;
+    if(len > 10) {
+      len -= 10;
       result = Curl_blockread_all(conn, sock, (char *)&socksreq[10],
-                                  packetsize, &actualread, timeout);
-      if((result != CURLE_OK) || (actualread != packetsize)) {
+                                  len, &actualread);
+      if((result != CURLE_OK) || (len != actualread)) {
         failf(data, "Failed to receive SOCKS5 connect request ack.");
         return CURLE_COULDNT_CONNECT;
       }
index 2bea66b..dc4670b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SOCKS_H
-#define __SOCKS_H
+#ifndef HEADER_CURL_SOCKS_H
+#define HEADER_CURL_SOCKS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
+#include "curl_setup.h"
+
+#ifdef CURL_DISABLE_PROXY
+#define Curl_SOCKS4(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
+#define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
+#else
 /*
  * Helper read-from-socket functions. Does the same as Curl_read() but it
  * blocks until all bytes amount of buffersize will be read. No more, no less.
@@ -33,8 +39,7 @@ int Curl_blockread_all(struct connectdata *conn,
                        curl_socket_t sockfd,
                        char *buf,
                        ssize_t buffersize,
-                       ssize_t *n,
-                       long conn_timeout);
+                       ssize_t *n);
 
 /*
  * This function logs in to a SOCKS4(a) proxy and sends the specifics to the
@@ -66,4 +71,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
                                       struct connectdata *conn);
 #endif
 
-#endif  /* __SOCKS_H */
+#endif /* CURL_DISABLE_PROXY */
+
+#endif  /* HEADER_CURL_SOCKS_H */
+
index 1ff6f60..1f840bd 100644 (file)
@@ -5,7 +5,8 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_PROXY
 
 #ifdef HAVE_GSSAPI
 #ifdef HAVE_OLD_GSSMIT
 #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#define NCOMPAT 1
 #endif
 #ifndef gss_nt_service_name
 #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
 #endif
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
+#include "curl_gssapi.h"
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"
 #include "timeval.h"
 #include "socks.h"
-
-static gss_ctx_id_t     gss_context = GSS_C_NO_CONTEXT;
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -52,6 +49,8 @@ static gss_ctx_id_t     gss_context = GSS_C_NO_CONTEXT;
 /* The last #include file should be: */
 #include "memdebug.h"
 
+static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
+
 /*
  * Helper gssapi error functions.
  */
@@ -97,16 +96,14 @@ static int check_gss_err(struct SessionHandle *data,
                                     GSS_C_NULL_OID,
                                     &msg_ctx, &status_string);
       if(maj_stat == GSS_S_COMPLETE) {
-        if(sizeof(buf) > len + status_string.length) {
+        if(sizeof(buf) > len + status_string.length)
           strcpy(buf+len, (char*) status_string.value);
-          len += status_string.length;
-        }
         gss_release_buffer(&min_stat, &status_string);
         break;
       }
       gss_release_buffer(&min_stat, &status_string);
     }
-    failf(data, "GSSAPI error: %s failed:\n%s\n", function, buf);
+    failf(data, "GSSAPI error: %s failed:\n%s", function, buf);
     return(1);
   }
 
@@ -122,7 +119,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   ssize_t actualread;
   ssize_t written;
   int result;
-  long timeout;
   OM_uint32 gss_major_status, gss_minor_status, gss_status;
   OM_uint32 gss_ret_flags;
   int gss_conf_state, gss_enc;
@@ -133,14 +129,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   gss_buffer_desc* gss_token = GSS_C_NO_BUFFER;
   gss_name_t       server = GSS_C_NO_NAME;
   gss_name_t       gss_client_name = GSS_C_NO_NAME;
-  u_short          us_length;
+  unsigned short   us_length;
   char             *user=NULL;
   unsigned char socksreq[4]; /* room for gssapi exchange header only */
   char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
 
-  /* get timeout */
-  timeout = Curl_timeleft(conn, NULL, TRUE);
-
   /*   GSSAPI request looks like
    * +----+------+-----+----------------+
    * |VER | MTYP | LEN |     TOKEN      |
@@ -150,7 +143,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
    */
 
   /* prepare service name */
-  if (strchr(serviceptr,'/')) {
+  if(strchr(serviceptr,'/')) {
     service.value = malloc(strlen(serviceptr));
     if(!service.value)
       return CURLE_OUT_OF_MEMORY;
@@ -184,19 +177,14 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   /* As long as we need to keep sending some context info, and there's no  */
   /* errors, keep sending it...                                            */
   for(;;) {
-    gss_major_status = gss_init_sec_context(&gss_minor_status,
-                                            GSS_C_NO_CREDENTIAL,
-                                            &gss_context, server,
-                                            GSS_C_NULL_OID,
-                                            GSS_C_MUTUAL_FLAG |
-                                            GSS_C_REPLAY_FLAG,
-                                            0,
-                                            NULL,
-                                            gss_token,
-                                            NULL,
-                                            &gss_send_token,
-                                            &gss_ret_flags,
-                                            NULL);
+    gss_major_status = Curl_gss_init_sec_context(data,
+                                                 &gss_minor_status,
+                                                 &gss_context,
+                                                 server,
+                                                 NULL,
+                                                 gss_token,
+                                                 &gss_send_token,
+                                                 &gss_ret_flags);
 
     if(gss_token != GSS_C_NO_BUFFER)
       gss_release_buffer(&gss_status, &gss_recv_token);
@@ -254,8 +242,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
      * +----+------+-----+----------------+
      */
 
-    result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
-                              &actualread, timeout);
+    result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
     if(result != CURLE_OK || actualread != 4) {
       failf(data, "Failed to receive GSSAPI authentication response.");
       gss_release_name(&gss_status, &server);
@@ -295,8 +282,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     }
 
     result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
-                              gss_recv_token.length,
-                              &actualread, timeout);
+                              gss_recv_token.length, &actualread);
 
     if(result != CURLE_OK || actualread != us_length) {
       failf(data, "Failed to receive GSSAPI authentication token.");
@@ -440,7 +426,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
       gss_delete_sec_context(&gss_status, &gss_context, NULL);
       return CURLE_COULDNT_CONNECT;
     }
-  } else {
+  }
+  else {
     code = Curl_write_plain(conn, sock, (char *)gss_w_token.value,
                             gss_w_token.length, &written);
     if((code != CURLE_OK) || ((ssize_t)gss_w_token.length != written)) {
@@ -452,8 +439,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     gss_release_buffer(&gss_status, &gss_w_token);
   }
 
-  result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
-                            &actualread, timeout);
+  result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
   if(result != CURLE_OK || actualread != 4) {
     failf(data, "Failed to receive GSSAPI encryption response.");
     gss_delete_sec_context(&gss_status, &gss_context, NULL);
@@ -485,8 +471,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     return CURLE_OUT_OF_MEMORY;
   }
   result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value,
-                            gss_recv_token.length,
-                            &actualread, timeout);
+                            gss_recv_token.length, &actualread);
 
   if(result != CURLE_OK || actualread != us_length) {
     failf(data, "Failed to receive GSSAPI encryptrion type.");
index e9fd551..0313de3 100644 (file)
@@ -5,7 +5,8 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2009, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
+ * Copyright (C) 2012 - 2013, 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
  *
  ***************************************************************************/
 
+#include "curl_setup.h"
 
-#include "setup.h"
-
-#ifdef USE_WINDOWS_SSPI
-
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY)
 
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"
+#include "strerror.h"
 #include "timeval.h"
 #include "socks.h"
 #include "curl_sspi.h"
+#include "curl_multibyte.h"
+#include "warnless.h"
 
 #define _MPRINTF_REPLACE /* use the internal *printf() functions */
 #include <curl/mprintf.h>
 /*
  * Helper sspi error functions.
  */
-static int check_sspi_err(struct SessionHandle *data,
-                          SECURITY_STATUS major_status,
-                          SECURITY_STATUS minor_status,
+static int check_sspi_err(struct connectdata *conn,
+                          SECURITY_STATUS status,
                           const char* function)
 {
-  const char *txt;
-  (void)minor_status;
-
-  if(major_status != SEC_E_OK &&
-     major_status != SEC_I_COMPLETE_AND_CONTINUE &&
-     major_status != SEC_I_COMPLETE_NEEDED &&
-     major_status != SEC_I_CONTINUE_NEEDED) {
-    failf(data, "SSPI error: %s failed: %d\n", function, major_status);
-    switch (major_status) {
-    case SEC_I_COMPLETE_AND_CONTINUE:
-      txt="SEC_I_COMPLETE_AND_CONTINUE";
-      break;
-    case SEC_I_COMPLETE_NEEDED:
-      txt="SEC_I_COMPLETE_NEEDED";
-      break;
-    case SEC_I_CONTINUE_NEEDED:
-      txt="SEC_I_CONTINUE_NEEDED";
-      break;
-    case SEC_I_CONTEXT_EXPIRED:
-      txt="SEC_I_CONTEXT_EXPIRED";
-      break;
-    case SEC_I_INCOMPLETE_CREDENTIALS:
-      txt="SEC_I_INCOMPLETE_CREDENTIALS";
-      break;
-    case SEC_I_RENEGOTIATE:
-      txt="SEC_I_RENEGOTIATE";
-      break;
-    case SEC_E_BUFFER_TOO_SMALL:
-      txt="SEC_E_BUFFER_TOO_SMALL";
-      break;
-    case SEC_E_CONTEXT_EXPIRED:
-      txt="SEC_E_CONTEXT_EXPIRED";
-      break;
-    case SEC_E_CRYPTO_SYSTEM_INVALID:
-      txt="SEC_E_CRYPTO_SYSTEM_INVALID";
-      break;
-    case SEC_E_INCOMPLETE_MESSAGE:
-      txt="SEC_E_INCOMPLETE_MESSAGE";
-      break;
-    case SEC_E_INSUFFICIENT_MEMORY:
-      txt="SEC_E_INSUFFICIENT_MEMORY";
-      break;
-    case SEC_E_INTERNAL_ERROR:
-      txt="SEC_E_INTERNAL_ERROR";
-      break;
-    case SEC_E_INVALID_HANDLE:
-      txt="SEC_E_INVALID_HANDLE";
-      break;
-    case SEC_E_INVALID_TOKEN:
-      txt="SEC_E_INVALID_TOKEN";
-      break;
-    case SEC_E_LOGON_DENIED:
-      txt="SEC_E_LOGON_DENIED";
-      break;
-    case SEC_E_MESSAGE_ALTERED:
-      txt="SEC_E_MESSAGE_ALTERED";
-      break;
-    case SEC_E_NO_AUTHENTICATING_AUTHORITY:
-      txt="SEC_E_NO_AUTHENTICATING_AUTHORITY";
-      break;
-    case SEC_E_NO_CREDENTIALS:
-      txt="SEC_E_NO_CREDENTIALS";
-      break;
-    case SEC_E_NOT_OWNER:
-      txt="SEC_E_NOT_OWNER";
-      break;
-    case SEC_E_OUT_OF_SEQUENCE:
-      txt="SEC_E_OUT_OF_SEQUENCE";
-      break;
-    case SEC_E_QOP_NOT_SUPPORTED:
-      txt="SEC_E_QOP_NOT_SUPPORTED";
-      break;
-    case SEC_E_SECPKG_NOT_FOUND:
-      txt="SEC_E_SECPKG_NOT_FOUND";
-      break;
-    case SEC_E_TARGET_UNKNOWN:
-      txt="SEC_E_TARGET_UNKNOWN";
-      break;
-    case SEC_E_UNKNOWN_CREDENTIALS:
-      txt="SEC_E_UNKNOWN_CREDENTIALS";
-      break;
-    case SEC_E_UNSUPPORTED_FUNCTION:
-      txt="SEC_E_UNSUPPORTED_FUNCTION";
-      break;
-    case SEC_E_WRONG_PRINCIPAL:
-      txt="SEC_E_WRONG_PRINCIPAL";
-      break;
-    default:
-      txt="Unknown error";
-
-    }
-    failf(data, "SSPI error: %s failed: %s\n", function, txt);
+  if(status != SEC_E_OK &&
+     status != SEC_I_COMPLETE_AND_CONTINUE &&
+     status != SEC_I_COMPLETE_NEEDED &&
+     status != SEC_I_CONTINUE_NEEDED) {
+    failf(conn->data, "SSPI error: %s failed: %s", function,
+          Curl_sspi_strerror(conn, status));
     return 1;
   }
   return 0;
@@ -166,10 +76,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   ssize_t actualread;
   ssize_t written;
   int result;
-  long timeout;
   /* Needs GSSAPI authentication */
-  SECURITY_STATUS sspi_major_status, sspi_minor_status=0;
-  unsigned long sspi_ret_flags=0;
+  SECURITY_STATUS status;
+  unsigned long sspi_ret_flags = 0;
   int gss_enc;
   SecBuffer sspi_send_token, sspi_recv_token, sspi_w_token[3];
   SecBufferDesc input_desc, output_desc, wrap_desc;
@@ -179,15 +88,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   PCtxtHandle context_handle = NULL;
   SecPkgCredentials_Names names;
   TimeStamp expiry;
-  char *service_name=NULL;
-  u_short us_length;
-  ULONG qop;
+  char *service_name = NULL;
+  unsigned short us_length;
+  unsigned long qop;
   unsigned char socksreq[4]; /* room for gssapi exchange header only */
   char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
 
-  /* get timeout */
-  timeout = Curl_timeleft(conn, NULL, TRUE);
-
   /*   GSSAPI request looks like
    * +----+------+-----+----------------+
    * |VER | MTYP | LEN |     TOKEN      |
@@ -197,7 +103,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
    */
 
   /* prepare service name */
-  if (strchr(service, '/')) {
+  if(strchr(service, '/')) {
     service_name = malloc(strlen(service));
     if(!service_name)
       return CURLE_OUT_OF_MEMORY;
@@ -234,21 +140,19 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   cred_handle.dwLower = 0;
   cred_handle.dwUpper = 0;
 
-  sspi_major_status = s_pSecFn->AcquireCredentialsHandleA( NULL,
-                                                           (char *)"Kerberos",
-                                                           SECPKG_CRED_OUTBOUND,
-                                                           NULL,
-                                                           NULL,
-                                                           NULL,
-                                                           NULL,
-                                                           &cred_handle,
-                                                           &expiry);
-
-  if(check_sspi_err(data, sspi_major_status,sspi_minor_status,
-                    "AcquireCredentialsHandleA") ) {
+  status = s_pSecFn->AcquireCredentialsHandle(NULL,
+                                              (TCHAR *) TEXT("Kerberos"),
+                                              SECPKG_CRED_OUTBOUND,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              &cred_handle,
+                                              &expiry);
+
+  if(check_sspi_err(conn, status, "AcquireCredentialsHandle")) {
     failf(data, "Failed to acquire credentials.");
-    free(service_name);
-    service_name=NULL;
+    Curl_safefree(service_name);
     s_pSecFn->FreeCredentialsHandle(&cred_handle);
     return CURLE_COULDNT_CONNECT;
   }
@@ -256,23 +160,29 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
   /* As long as we need to keep sending some context info, and there's no  */
   /* errors, keep sending it...                                            */
   for(;;) {
+    TCHAR *sname;
+
+    sname = Curl_convert_UTF8_to_tchar(service_name);
+    if(!sname)
+      return CURLE_OUT_OF_MEMORY;
 
-    sspi_major_status = s_pSecFn->InitializeSecurityContextA(
-                                    &cred_handle,
-                                    context_handle,
-                                    service_name,
-                                    ISC_REQ_MUTUAL_AUTH |
-                                    ISC_REQ_ALLOCATE_MEMORY |
-                                    ISC_REQ_CONFIDENTIALITY |
-                                    ISC_REQ_REPLAY_DETECT,
-                                    0,
-                                    SECURITY_NATIVE_DREP,
-                                    &input_desc,
-                                    0,
-                                    &sspi_context,
-                                    &output_desc,
-                                    &sspi_ret_flags,
-                                    &expiry);
+    status = s_pSecFn->InitializeSecurityContext(&cred_handle,
+                                                 context_handle,
+                                                 sname,
+                                                 ISC_REQ_MUTUAL_AUTH |
+                                                 ISC_REQ_ALLOCATE_MEMORY |
+                                                 ISC_REQ_CONFIDENTIALITY |
+                                                 ISC_REQ_REPLAY_DETECT,
+                                                 0,
+                                                 SECURITY_NATIVE_DREP,
+                                                 &input_desc,
+                                                 0,
+                                                 &sspi_context,
+                                                 &output_desc,
+                                                 &sspi_ret_flags,
+                                                 &expiry);
+
+    Curl_unicodefree(sname);
 
     if(sspi_recv_token.pvBuffer) {
       s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
@@ -280,10 +190,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
       sspi_recv_token.cbBuffer = 0;
     }
 
-    if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
-                      "InitializeSecurityContextA") ){
-      free(service_name);
-      service_name=NULL;
+    if(check_sspi_err(conn, status, "InitializeSecurityContext")) {
+      Curl_safefree(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
@@ -300,8 +208,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
       code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written);
       if((code != CURLE_OK) || (4 != written)) {
         failf(data, "Failed to send SSPI authentication request.");
-        free(service_name);
-        service_name=NULL;
+        Curl_safefree(service_name);
         s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
         s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
         s_pSecFn->FreeCredentialsHandle(&cred_handle);
@@ -313,8 +220,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
                               sspi_send_token.cbBuffer, &written);
       if((code != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) {
         failf(data, "Failed to send SSPI authentication token.");
-        free(service_name);
-        service_name=NULL;
+        Curl_safefree(service_name);
         s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
         s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
         s_pSecFn->FreeCredentialsHandle(&cred_handle);
@@ -330,7 +236,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
     sspi_recv_token.pvBuffer = NULL;
     sspi_recv_token.cbBuffer = 0;
-    if(sspi_major_status != SEC_I_CONTINUE_NEEDED)  break;
+    if(status != SEC_I_CONTINUE_NEEDED)
+      break;
 
     /* analyse response */
 
@@ -342,12 +249,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
      * +----+------+-----+----------------+
      */
 
-    result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
-                              &actualread, timeout);
+    result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
     if(result != CURLE_OK || actualread != 4) {
       failf(data, "Failed to receive SSPI authentication response.");
-      free(service_name);
-      service_name=NULL;
+      Curl_safefree(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_COULDNT_CONNECT;
@@ -355,20 +260,18 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
 
     /* ignore the first (VER) byte */
     if(socksreq[1] == 255) { /* status / message type */
-      failf(data, "User was rejected by the SOCKS5 server (%d %d).",
-            socksreq[0], socksreq[1]);
-      free(service_name);
-      service_name=NULL;
+      failf(data, "User was rejected by the SOCKS5 server (%u %u).",
+            (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
+      Curl_safefree(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_COULDNT_CONNECT;
     }
 
     if(socksreq[1] != 1) { /* status / messgae type */
-      failf(data, "Invalid SSPI authentication response type (%d %d).",
-            socksreq[0], socksreq[1]);
-      free(service_name);
-      service_name=NULL;
+      failf(data, "Invalid SSPI authentication response type (%u %u).",
+            (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
+      Curl_safefree(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_COULDNT_CONNECT;
@@ -381,20 +284,17 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     sspi_recv_token.pvBuffer = malloc(us_length);
 
     if(!sspi_recv_token.pvBuffer) {
-      free(service_name);
-      service_name=NULL;
+      Curl_safefree(service_name);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_OUT_OF_MEMORY;
     }
     result = Curl_blockread_all(conn, sock, (char *)sspi_recv_token.pvBuffer,
-                                sspi_recv_token.cbBuffer,
-                                &actualread, timeout);
+                                sspi_recv_token.cbBuffer, &actualread);
 
     if(result != CURLE_OK || actualread != us_length) {
       failf(data, "Failed to receive SSPI authentication token.");
-      free(service_name);
-      service_name=NULL;
+      Curl_safefree(service_name);
       s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer);
       s_pSecFn->FreeCredentialsHandle(&cred_handle);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -404,16 +304,14 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     context_handle = &sspi_context;
   }
 
-  free(service_name);
-  service_name=NULL;
+  Curl_safefree(service_name);
 
   /* Everything is good so far, user was authenticated! */
-  sspi_major_status = s_pSecFn->QueryCredentialsAttributes( &cred_handle,
-                                                            SECPKG_CRED_ATTR_NAMES,
-                                                            &names);
+  status = s_pSecFn->QueryCredentialsAttributes(&cred_handle,
+                                                SECPKG_CRED_ATTR_NAMES,
+                                                &names);
   s_pSecFn->FreeCredentialsHandle(&cred_handle);
-  if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
-                    "QueryCredentialAttributes") ){
+  if(check_sspi_err(conn, status, "QueryCredentialAttributes")) {
     s_pSecFn->DeleteSecurityContext(&sspi_context);
     s_pSecFn->FreeContextBuffer(names.sUserName);
     failf(data, "Failed to determine user name.");
@@ -475,11 +373,10 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     memcpy(socksreq+2, &us_length, sizeof(short));
   }
   else {
-    sspi_major_status = s_pSecFn->QueryContextAttributesA( &sspi_context,
-                                                           SECPKG_ATTR_SIZES,
-                                                           &sspi_sizes);
-    if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
-                      "QueryContextAttributesA")) {
+    status = s_pSecFn->QueryContextAttributes(&sspi_context,
+                                              SECPKG_ATTR_SIZES,
+                                              &sspi_sizes);
+    if(check_sspi_err(conn, status, "QueryContextAttributes")) {
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       failf(data, "Failed to query security context attributes.");
       return CURLE_COULDNT_CONNECT;
@@ -496,7 +393,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
 
     sspi_w_token[1].cbBuffer = 1;
     sspi_w_token[1].pvBuffer = malloc(1);
-    if(!sspi_w_token[1].pvBuffer){
+    if(!sspi_w_token[1].pvBuffer) {
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_OUT_OF_MEMORY;
@@ -512,12 +409,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_OUT_OF_MEMORY;
     }
-    sspi_major_status = s_pSecFn->EncryptMessage( &sspi_context,
-                                                  KERB_WRAP_NO_ENCRYPT,
-                                                  &wrap_desc,
-                                                  0);
-    if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
-                      "EncryptMessage") ) {
+    status = s_pSecFn->EncryptMessage(&sspi_context,
+                                      KERB_WRAP_NO_ENCRYPT,
+                                      &wrap_desc,
+                                      0);
+    if(check_sspi_err(conn, status, "EncryptMessage")) {
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer);
@@ -576,7 +472,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_COULDNT_CONNECT;
     }
-  } else {
+  }
+  else {
     code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer,
                             sspi_send_token.cbBuffer, &written);
     if((code != CURLE_OK) || (sspi_send_token.cbBuffer != (size_t)written)) {
@@ -588,8 +485,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer);
   }
 
-  result=Curl_blockread_all(conn, sock, (char *)socksreq, 4,
-                            &actualread, timeout);
+  result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread);
   if(result != CURLE_OK || actualread != 4) {
     failf(data, "Failed to receive SSPI encryption response.");
     s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -598,15 +494,15 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
 
   /* ignore the first (VER) byte */
   if(socksreq[1] == 255) { /* status / message type */
-    failf(data, "User was rejected by the SOCKS5 server (%d %d).",
-          socksreq[0], socksreq[1]);
+    failf(data, "User was rejected by the SOCKS5 server (%u %u).",
+          (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
     s_pSecFn->DeleteSecurityContext(&sspi_context);
     return CURLE_COULDNT_CONNECT;
   }
 
   if(socksreq[1] != 2) { /* status / message type */
-    failf(data, "Invalid SSPI encryption response type (%d %d).",
-          socksreq[0], socksreq[1]);
+    failf(data, "Invalid SSPI encryption response type (%u %u).",
+          (unsigned int)socksreq[0], (unsigned int)socksreq[1]);
     s_pSecFn->DeleteSecurityContext(&sspi_context);
     return CURLE_COULDNT_CONNECT;
   }
@@ -621,9 +517,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     return CURLE_OUT_OF_MEMORY;
   }
 
-  result=Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer,
-                            sspi_w_token[0].cbBuffer,
-                            &actualread, timeout);
+  result = Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer,
+                              sspi_w_token[0].cbBuffer, &actualread);
 
   if(result != CURLE_OK || actualread != us_length) {
     failf(data, "Failed to receive SSPI encryption type.");
@@ -640,13 +535,12 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     sspi_w_token[1].cbBuffer = 0;
     sspi_w_token[1].pvBuffer = NULL;
 
-    sspi_major_status = s_pSecFn->DecryptMessage( &sspi_context,
-                                                  &wrap_desc,
-                                                  0,
-                                                  &qop);
+    status = s_pSecFn->DecryptMessage(&sspi_context,
+                                      &wrap_desc,
+                                      0,
+                                      &qop);
 
-    if(check_sspi_err(data,sspi_major_status,sspi_minor_status,
-                      "DecryptMessage")) {
+    if(check_sspi_err(conn, status, "DecryptMessage")) {
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -655,8 +549,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     }
 
     if(sspi_w_token[1].cbBuffer != 1) {
-      failf(data, "Invalid SSPI encryption response length (%d).",
-            sspi_w_token[1].cbBuffer);
+      failf(data, "Invalid SSPI encryption response length (%lu).",
+            (unsigned long)sspi_w_token[1].cbBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
@@ -666,10 +560,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
     memcpy(socksreq,sspi_w_token[1].pvBuffer,sspi_w_token[1].cbBuffer);
     s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
     s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer);
-  } else {
+  }
+  else {
     if(sspi_w_token[0].cbBuffer != 1) {
-      failf(data, "Invalid SSPI encryption response length (%d).",
-            sspi_w_token[0].cbBuffer);
+      failf(data, "Invalid SSPI encryption response length (%lu).",
+            (unsigned long)sspi_w_token[0].cbBuffer);
       s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer);
       s_pSecFn->DeleteSecurityContext(&sspi_context);
       return CURLE_COULDNT_CONNECT;
@@ -684,11 +579,11 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
 
   /* For later use if encryption is required
      conn->socks5_gssapi_enctype = socksreq[0];
-     if (socksreq[0] != 0)
-     conn->socks5_sspi_context = sspi_context;
+     if(socksreq[0] != 0)
+       conn->socks5_sspi_context = sspi_context;
      else {
-     s_pSecFn->DeleteSecurityContext(&sspi_context);
-     conn->socks5_sspi_context = sspi_context;
+       s_pSecFn->DeleteSecurityContext(&sspi_context);
+       conn->socks5_sspi_context = sspi_context;
      }
   */
   return CURLE_OK;
index 38bad5a..ea17a59 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 #include "urldata.h"
@@ -44,21 +41,24 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
      (Curl_tvlong(data->state.keeps_speed) != 0) &&
      (data->progress.current_speed < data->set.low_speed_limit)) {
     long howlong = Curl_tvdiff(now, data->state.keeps_speed);
+    long nextcheck = (data->set.low_speed_time * 1000) - howlong;
 
     /* We are now below the "low speed limit". If we are below it
        for "low speed time" seconds we consider that enough reason
        to abort the download. */
-
-    if( (howlong/1000) > data->set.low_speed_time) {
+    if(nextcheck <= 0) {
       /* we have been this slow for long enough, now die */
       failf(data,
             "Operation too slow. "
-            "Less than %ld bytes/sec transfered the last %ld seconds",
+            "Less than %ld bytes/sec transferred the last %ld seconds",
             data->set.low_speed_limit,
             data->set.low_speed_time);
       return CURLE_OPERATION_TIMEDOUT;
     }
-    Curl_expire(data, howlong);
+    else {
+      /* wait complete low_speed_time */
+      Curl_expire(data, nextcheck);
+    }
   }
   else {
     /* we keep up the required speed all right */
index fc40e7d..786cd12 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "timeval.h"
 
index dcc42cf..3570712 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1997 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2011, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "splay.h"
 
@@ -48,7 +48,7 @@ struct Curl_tree *Curl_splay(struct timeval i,
   N.smaller = N.larger = NULL;
   l = r = &N;
 
-  for (;;) {
+  for(;;) {
     comp = compare(i, t->key);
     if(comp < 0) {
       if(t->smaller == NULL)
@@ -93,12 +93,15 @@ struct Curl_tree *Curl_splay(struct timeval i,
 }
 
 /* Insert key i into the tree t.  Return a pointer to the resulting tree or
-   NULL if something went wrong. */
+ * NULL if something went wrong.
+ *
+ * @unittest: 1309
+ */
 struct Curl_tree *Curl_splayinsert(struct timeval i,
                                    struct Curl_tree *t,
                                    struct Curl_tree *node)
 {
-  static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */
+  static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */
 
   if(node == NULL)
     return t;
@@ -146,56 +149,6 @@ struct Curl_tree *Curl_splayinsert(struct timeval i,
   return node;
 }
 
-#if 0
-/* Deletes 'i' from the tree if it's there (with an exact match). Returns a
-   pointer to the resulting tree.
-
-   Function not used in libcurl.
-*/
-struct Curl_tree *Curl_splayremove(struct timeval i,
-                                   struct Curl_tree *t,
-                                   struct Curl_tree **removed)
-{
-  struct Curl_tree *x;
-
-  *removed = NULL; /* default to no removed */
-
-  if(t==NULL)
-    return NULL;
-
-  t = Curl_splay(i,t);
-  if(compare(i, t->key) == 0) {               /* found it */
-
-    /* FIRST! Check if there is a list with identical sizes */
-    if((x = t->same) != NULL) {
-      /* there is, pick one from the list */
-
-      /* 'x' is the new root node */
-
-      x->key = t->key;
-      x->larger = t->larger;
-      x->smaller = t->smaller;
-
-      *removed = t;
-      return x; /* new root */
-    }
-
-    if(t->smaller == NULL) {
-      x = t->larger;
-    }
-    else {
-      x = Curl_splay(i, t->smaller);
-      x->larger = t->larger;
-    }
-    *removed = t;
-
-    return x;
-  }
-  else
-    return t;                         /* It wasn't there */
-}
-#endif
-
 /* Finds and deletes the best-fit node from the tree. Return a pointer to the
    resulting tree.  best-fit means the node with the given or lower key */
 struct Curl_tree *Curl_splaygetbest(struct timeval i,
@@ -256,19 +209,21 @@ struct Curl_tree *Curl_splaygetbest(struct timeval i,
 
 
 /* Deletes the very node we point out from the tree if it's there. Stores a
-   pointer to the new resulting tree in 'newroot'.
-
-   Returns zero on success and non-zero on errors! TODO: document error codes.
-   When returning error, it does not touch the 'newroot' pointer.
-
-   NOTE: when the last node of the tree is removed, there's no tree left so
-   'newroot' will be made to point to NULL.
-*/
+ * pointer to the new resulting tree in 'newroot'.
+ *
+ * Returns zero on success and non-zero on errors! TODO: document error codes.
+ * When returning error, it does not touch the 'newroot' pointer.
+ *
+ * NOTE: when the last node of the tree is removed, there's no tree left so
+ * 'newroot' will be made to point to NULL.
+ *
+ * @unittest: 1309
+ */
 int Curl_splayremovebyaddr(struct Curl_tree *t,
                            struct Curl_tree *removenode,
                            struct Curl_tree **newroot)
 {
-  static struct timeval KEY_NOTUSED = {-1,-1}; /* key that will *NEVER* appear */
+  static struct timeval KEY_NOTUSED = {-1,-1}; /* will *NEVER* appear */
   struct Curl_tree *x;
 
   if(!t || !removenode)
@@ -331,108 +286,3 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
   return 0;
 }
 
-#ifdef DEBUGBUILD
-
-void Curl_splayprint(struct Curl_tree * t, int d, char output)
-{
-  struct Curl_tree *node;
-  int i;
-  int count;
-  if(t == NULL)
-    return;
-
-  Curl_splayprint(t->larger, d+1, output);
-  for (i=0; i<d; i++)
-    if(output)
-      fprintf(stderr, "  ");
-
-  if(output) {
-#ifdef TEST_SPLAY
-    fprintf(stderr, "%ld[%d]", (long)t->key.tv_usec, i);
-#else
-    fprintf(stderr, "%ld.%ld[%d]", (long)t->key.tv_sec, (long)t->key.tv_usec, i);
-#endif
-  }
-
-  for(count=0, node = t->same; node; node = node->same, count++)
-    ;
-
-  if(output) {
-    if(count)
-      fprintf(stderr, " [%d more]\n", count);
-    else
-      fprintf(stderr, "\n");
-  }
-
-  Curl_splayprint(t->smaller, d+1, output);
-}
-#endif
-
-#ifdef TEST_SPLAY
-
-/*#define TEST2 */
-#define MAX 50
-#define TEST2
-
-/* A sample use of these functions.  Start with the empty tree, insert some
-   stuff into it, and then delete it */
-int main(int argc, argv_item_t argv[])
-{
-  struct Curl_tree *root, *t;
-  void *ptrs[MAX];
-  int adds=0;
-  int rc;
-
-  static const long sizes[]={
-    50, 60, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120, 200, 300,
-    220, 80, 90, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120, 200,
-    300, 220, 80, 90, 50, 100, 60, 200, 120, 300, 400, 200, 256, 122, 60, 120,
-    200, 300, 220, 80, 90};
-  int i;
-  root = NULL;              /* the empty tree */
-
-  for (i = 0; i < MAX; i++) {
-    struct timeval key;
-    ptrs[i] = t = malloc(sizeof(struct Curl_tree));
-    if(!t) {
-      puts("out of memory!");
-      return 0;
-    }
-
-    key.tv_sec = 0;
-#ifdef TEST2
-    key.tv_usec = sizes[i];
-#elif defined(TEST1)
-    key.tv_usec = (541*i)%1023;
-#elif defined(TEST3)
-    key.tv_usec = 100;
-#endif
-
-    t->payload = (void *)key.tv_usec; /* for simplicity */
-    root = Curl_splayinsert(key, root, t);
-  }
-
-#if 0
-  puts("Result:");
-  Curl_splayprint(root, 0, 1);
-#endif
-
-#if 1
-  for (i = 0; i < MAX; i++) {
-    int rem = (i+7)%MAX;
-    struct Curl_tree *r;
-    printf("Tree look:\n");
-    Curl_splayprint(root, 0, 1);
-    printf("remove pointer %d, payload %ld\n", rem,
-           (long)((struct Curl_tree *)ptrs[rem])->payload);
-    rc = Curl_splayremovebyaddr(root, (struct Curl_tree *)ptrs[rem], &root);
-    if(rc)
-      /* failed! */
-      printf("remove %d failed!\n", rem);
-  }
-#endif
-
-  return 0;
-}
-
-#endif /* TEST_SPLAY */
index 832e4e2..5f9ef24 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SPLAY_H
-#define __SPLAY_H
+#ifndef HEADER_CURL_SPLAY_H
+#define HEADER_CURL_SPLAY_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1997 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
 
 struct Curl_tree {
   struct Curl_tree *smaller; /* smaller node */
@@ -59,7 +60,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
 #ifdef DEBUGBUILD
 void Curl_splayprint(struct Curl_tree * t, int d, char output);
 #else
-#define Curl_splayprint(x,y,z)
+#define Curl_splayprint(x,y,z) Curl_nop_stmt
 #endif
 
-#endif
+#endif /* HEADER_CURL_SPLAY_H */
index ffcb48b..422357b 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
 
 /* #define CURL_LIBSSH2_DEBUG */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef USE_LIBSSH2
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
+
 #ifdef HAVE_LIMITS_H
 #  include <limits.h>
 #endif
 #include <libssh2.h>
 #include <libssh2_sftp.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-
-#ifndef WIN32
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -69,7 +53,6 @@
 #include <in.h>
 #include <inet.h>
 #endif
-#endif /* !WIN32 */
 
 #if (defined(NETWARE) && defined(__NOVELL_LIBC__))
 #undef in_addr_t
@@ -79,8 +62,6 @@
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"
-#include "easyif.h" /* for Curl_convert_... prototypes */
-
 #include "hostip.h"
 #include "progress.h"
 #include "transfer.h"
 /* The last #include file should be: */
 #include "memdebug.h"
 
+#ifdef WIN32
+#  undef  PATH_MAX
+#  define PATH_MAX MAX_PATH
+#endif
+
 #ifndef PATH_MAX
 #define PATH_MAX 1024 /* just an extra precaution since there are systems that
                          have their definition hidden well */
 #endif
 
+#define sftp_libssh2_last_error(s) curlx_ultosi(libssh2_sftp_last_error(s))
+
+#define sftp_libssh2_realpath(s,p,t,m) \
+        libssh2_sftp_symlink_ex((s), (p), curlx_uztoui(strlen(p)), \
+                                (t), (m), LIBSSH2_SFTP_REALPATH)
+
 /* Local functions: */
-static const char *sftp_libssh2_strerror(unsigned long err);
+static const char *sftp_libssh2_strerror(int err);
 static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc);
 static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc);
 static LIBSSH2_FREE_FUNC(my_libssh2_free);
@@ -141,7 +133,7 @@ static CURLcode sftp_done(struct connectdata *conn,
                           CURLcode, bool premature);
 static CURLcode sftp_doing(struct connectdata *conn,
                            bool *dophase_done);
-static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode sftp_disconnect(struct connectdata *conn, bool dead);
 static
 CURLcode sftp_perform(struct connectdata *conn,
                       bool *connected,
@@ -172,10 +164,14 @@ const struct Curl_handler Curl_handler_scp = {
   scp_doing,                            /* doing */
   ssh_getsock,                          /* proto_getsock */
   ssh_getsock,                          /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ssh_perform_getsock,                  /* perform_getsock */
   scp_disconnect,                       /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_SSH,                             /* defport */
-  PROT_SCP                              /* protocol */
+  CURLPROTO_SCP,                        /* protocol */
+  PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
+  | PROTOPT_NOURLQUERY                  /* flags */
 };
 
 
@@ -194,10 +190,14 @@ const struct Curl_handler Curl_handler_sftp = {
   sftp_doing,                           /* doing */
   ssh_getsock,                          /* proto_getsock */
   ssh_getsock,                          /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ssh_perform_getsock,                  /* perform_getsock */
   sftp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_SSH,                             /* defport */
-  PROT_SFTP                             /* protocol */
+  CURLPROTO_SFTP,                       /* protocol */
+  PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
+  | PROTOPT_NOURLQUERY                  /* flags */
 };
 
 
@@ -224,7 +224,7 @@ kbd_callback(const char *name, int name_len, const char *instruction,
 #endif  /* CURL_LIBSSH2_DEBUG */
   if(num_prompts == 1) {
     responses[0].text = strdup(conn->passwd);
-    responses[0].length = (unsigned int)strlen(conn->passwd);
+    responses[0].length = curlx_uztoui(strlen(conn->passwd));
   }
   (void)prompts;
   (void)abstract;
@@ -317,7 +317,8 @@ static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc)
 static LIBSSH2_FREE_FUNC(my_libssh2_free)
 {
   (void)abstract; /* arg not used */
-  free(ptr);
+  if(ptr) /* ssh2 agent sometimes call free with null ptr */
+    free(ptr);
 }
 
 /*
@@ -330,6 +331,7 @@ static void state(struct connectdata *conn, sshstate nowstate)
   /* for debug purposes */
   static const char * const names[] = {
     "SSH_STOP",
+    "SSH_INIT",
     "SSH_S_STARTUP",
     "SSH_HOSTKEY",
     "SSH_AUTHLIST",
@@ -337,6 +339,9 @@ static void state(struct connectdata *conn, sshstate nowstate)
     "SSH_AUTH_PKEY",
     "SSH_AUTH_PASS_INIT",
     "SSH_AUTH_PASS",
+    "SSH_AUTH_AGENT_INIT",
+    "SSH_AUTH_AGENT_LIST",
+    "SSH_AUTH_AGENT",
     "SSH_AUTH_HOST_INIT",
     "SSH_AUTH_HOST",
     "SSH_AUTH_KEY_INIT",
@@ -387,7 +392,7 @@ static void state(struct connectdata *conn, sshstate nowstate)
 #if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
   if(sshc->state != nowstate) {
     infof(conn->data, "SFTP %p state change from %s to %s\n",
-          sshc, names[sshc->state], names[nowstate]);
+          (void *)sshc, names[sshc->state], names[nowstate]);
   }
 #endif
 
@@ -411,19 +416,19 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
     return CURLE_OUT_OF_MEMORY;
 
   /* Check for /~/ , indicating relative to the user's home directory */
-  if(conn->protocol & PROT_SCP) {
+  if(conn->handler->protocol & CURLPROTO_SCP) {
     real_path = malloc(working_path_len+1);
     if(real_path == NULL) {
       free(working_path);
       return CURLE_OUT_OF_MEMORY;
     }
-    if((working_path_len > 1) && (working_path[1] == '~'))
-      /* It is referenced to the home directory, so strip the leading '/' */
-      memcpy(real_path, working_path+1, 1 + working_path_len-1);
+    if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3)))
+      /* It is referenced to the home directory, so strip the leading '/~/' */
+      memcpy(real_path, working_path+3, 4 + working_path_len-3);
     else
       memcpy(real_path, working_path, 1 + working_path_len);
   }
-  else if(conn->protocol & PROT_SFTP) {
+  else if(conn->handler->protocol & CURLPROTO_SFTP) {
     if((working_path_len > 1) && (working_path[1] == '~')) {
       size_t homelen = strlen(homedir);
       real_path = malloc(homelen + working_path_len + 1);
@@ -504,6 +509,173 @@ static int sshkeycallback(CURL *easy,
 #define libssh2_session_startup(x,y) libssh2_session_handshake(x,y)
 #endif
 
+static CURLcode ssh_knownhost(struct connectdata *conn)
+{
+  CURLcode result = CURLE_OK;
+
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
+  struct SessionHandle *data = conn->data;
+
+  if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
+    /* we're asked to verify the host against a file */
+    struct ssh_conn *sshc = &conn->proto.sshc;
+    int rc;
+    int keytype;
+    size_t keylen;
+    const char *remotekey = libssh2_session_hostkey(sshc->ssh_session,
+                                                    &keylen, &keytype);
+    int keycheck = LIBSSH2_KNOWNHOST_CHECK_FAILURE;
+    int keybit = 0;
+
+    if(remotekey) {
+      /*
+       * A subject to figure out is what host name we need to pass in here.
+       * What host name does OpenSSH store in its file if an IDN name is
+       * used?
+       */
+      struct libssh2_knownhost *host;
+      enum curl_khmatch keymatch;
+      curl_sshkeycallback func =
+        data->set.ssh_keyfunc?data->set.ssh_keyfunc:sshkeycallback;
+      struct curl_khkey knownkey;
+      struct curl_khkey *knownkeyp = NULL;
+      struct curl_khkey foundkey;
+
+      keybit = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
+        LIBSSH2_KNOWNHOST_KEY_SSHRSA:LIBSSH2_KNOWNHOST_KEY_SSHDSS;
+
+      keycheck = libssh2_knownhost_check(sshc->kh,
+                                         conn->host.name,
+                                         remotekey, keylen,
+                                         LIBSSH2_KNOWNHOST_TYPE_PLAIN|
+                                         LIBSSH2_KNOWNHOST_KEYENC_RAW|
+                                         keybit,
+                                         &host);
+
+      infof(data, "SSH host check: %d, key: %s\n", keycheck,
+            (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
+            host->key:"<none>");
+
+      /* setup 'knownkey' */
+      if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
+        knownkey.key = host->key;
+        knownkey.len = 0;
+        knownkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
+          CURLKHTYPE_RSA : CURLKHTYPE_DSS;
+        knownkeyp = &knownkey;
+      }
+
+      /* setup 'foundkey' */
+      foundkey.key = remotekey;
+      foundkey.len = keylen;
+      foundkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
+        CURLKHTYPE_RSA : CURLKHTYPE_DSS;
+
+      /*
+       * if any of the LIBSSH2_KNOWNHOST_CHECK_* defines and the
+       * curl_khmatch enum are ever modified, we need to introduce a
+       * translation table here!
+       */
+      keymatch = (enum curl_khmatch)keycheck;
+
+      /* Ask the callback how to behave */
+      rc = func(data, knownkeyp, /* from the knownhosts file */
+                &foundkey, /* from the remote host */
+                keymatch, data->set.ssh_keyfunc_userp);
+    }
+    else
+      /* no remotekey means failure! */
+      rc = CURLKHSTAT_REJECT;
+
+    switch(rc) {
+    default: /* unknown return codes will equal reject */
+    case CURLKHSTAT_REJECT:
+      state(conn, SSH_SESSION_FREE);
+    case CURLKHSTAT_DEFER:
+      /* DEFER means bail out but keep the SSH_HOSTKEY state */
+      result = sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
+      break;
+    case CURLKHSTAT_FINE:
+    case CURLKHSTAT_FINE_ADD_TO_FILE:
+      /* proceed */
+      if(keycheck != LIBSSH2_KNOWNHOST_CHECK_MATCH) {
+        /* the found host+key didn't match but has been told to be fine
+           anyway so we add it in memory */
+        int addrc = libssh2_knownhost_add(sshc->kh,
+                                          conn->host.name, NULL,
+                                          remotekey, keylen,
+                                          LIBSSH2_KNOWNHOST_TYPE_PLAIN|
+                                          LIBSSH2_KNOWNHOST_KEYENC_RAW|
+                                          keybit, NULL);
+        if(addrc)
+          infof(data, "Warning adding the known host %s failed!\n",
+                conn->host.name);
+        else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE) {
+          /* now we write the entire in-memory list of known hosts to the
+             known_hosts file */
+          int wrc =
+            libssh2_knownhost_writefile(sshc->kh,
+                                        data->set.str[STRING_SSH_KNOWNHOSTS],
+                                        LIBSSH2_KNOWNHOST_FILE_OPENSSH);
+          if(wrc) {
+            infof(data, "Warning, writing %s failed!\n",
+                  data->set.str[STRING_SSH_KNOWNHOSTS]);
+          }
+        }
+      }
+      break;
+    }
+  }
+#else /* HAVE_LIBSSH2_KNOWNHOST_API */
+  (void)conn;
+#endif
+  return result;
+}
+
+static CURLcode ssh_check_fingerprint(struct connectdata *conn)
+{
+  struct ssh_conn *sshc = &conn->proto.sshc;
+  struct SessionHandle *data = conn->data;
+  const char *pubkey_md5 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5];
+  char md5buffer[33];
+  int i;
+
+  const char *fingerprint = libssh2_hostkey_hash(sshc->ssh_session,
+      LIBSSH2_HOSTKEY_HASH_MD5);
+
+  if(fingerprint) {
+    /* The fingerprint points to static storage (!), don't free() it. */
+    for(i = 0; i < 16; i++)
+      snprintf(&md5buffer[i*2], 3, "%02x", (unsigned char) fingerprint[i]);
+    infof(data, "SSH MD5 fingerprint: %s\n", md5buffer);
+  }
+
+  /* Before we authenticate we check the hostkey's MD5 fingerprint
+   * against a known fingerprint, if available.
+   */
+  if(pubkey_md5 && strlen(pubkey_md5) == 32) {
+    if(!fingerprint || !strequal(md5buffer, pubkey_md5)) {
+      if(fingerprint)
+        failf(data,
+            "Denied establishing ssh session: mismatch md5 fingerprint. "
+            "Remote %s is not equal to %s", md5buffer, pubkey_md5);
+      else
+        failf(data,
+            "Denied establishing ssh session: md5 fingerprint not available");
+      state(conn, SSH_SESSION_FREE);
+      sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
+      return sshc->actualcode;
+    }
+    else {
+      infof(data, "MD5 checksum match!\n");
+      /* as we already matched, we skip the check for known hosts */
+      return CURLE_OK;
+    }
+  }
+  else
+    return ssh_knownhost(conn);
+}
+
 /*
  * ssh_statemach_act() runs the SSH state machine as far as it can without
  * blocking and without reaching the end.  The data the pointer 'block' points
@@ -518,11 +690,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
   struct SSHPROTO *sftp_scp = data->state.proto.ssh;
   struct ssh_conn *sshc = &conn->proto.sshc;
   curl_socket_t sock = conn->sock[FIRSTSOCKET];
-#ifdef CURL_LIBSSH2_DEBUG
-  const char *fingerprint;
-#endif /* CURL_LIBSSH2_DEBUG */
-  const char *host_public_key_md5;
-  int rc = LIBSSH2_ERROR_NONE, i;
+  char *new_readdir_line;
+  int rc = LIBSSH2_ERROR_NONE;
   int err;
   int seekerr = CURL_SEEKFUNC_OK;
   *block = 0; /* we're not blocking by default */
@@ -530,12 +699,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
   do {
 
     switch(sshc->state) {
-    case SSH_S_STARTUP:
+    case SSH_INIT:
       sshc->secondCreateDirs = 0;
       sshc->nextstate = SSH_NO_STATE;
       sshc->actualcode = CURLE_OK;
 
-      rc = libssh2_session_startup(sshc->ssh_session, sock);
+      /* Set libssh2 to non-blocking, since everything internally is
+         non-blocking */
+      libssh2_session_set_blocking(sshc->ssh_session, 0);
+
+      state(conn, SSH_S_STARTUP);
+      /* fall-through */
+
+    case SSH_S_STARTUP:
+      rc = libssh2_session_startup(sshc->ssh_session, (int)sock);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
@@ -546,168 +723,18 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         break;
       }
 
-      /* Set libssh2 to non-blocking, since everything internally is
-         non-blocking */
-      libssh2_session_set_blocking(sshc->ssh_session, 0);
-
       state(conn, SSH_HOSTKEY);
 
       /* fall-through */
     case SSH_HOSTKEY:
-
-#ifdef CURL_LIBSSH2_DEBUG
       /*
        * Before we authenticate we should check the hostkey's fingerprint
        * against our known hosts. How that is handled (reading from file,
-       * whatever) is up to us. As for know not much is implemented, besides
-       * showing how to get the fingerprint.
-       */
-      fingerprint = libssh2_hostkey_hash(sshc->ssh_session,
-                                         LIBSSH2_HOSTKEY_HASH_MD5);
-
-      /* The fingerprint points to static storage (!), don't free() it. */
-      infof(data, "Fingerprint: ");
-      for (rc = 0; rc < 16; rc++) {
-        infof(data, "%02X ", (unsigned char) fingerprint[rc]);
-      }
-      infof(data, "\n");
-#endif /* CURL_LIBSSH2_DEBUG */
-
-      /* Before we authenticate we check the hostkey's MD5 fingerprint
-       * against a known fingerprint, if available.  This implementation pulls
-       * it from the curl option.
+       * whatever) is up to us.
        */
-      if(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5] &&
-         strlen(data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]) == 32) {
-        char buf[33];
-        host_public_key_md5 = libssh2_hostkey_hash(sshc->ssh_session,
-                                                   LIBSSH2_HOSTKEY_HASH_MD5);
-        for (i = 0; i < 16; i++)
-          snprintf(&buf[i*2], 3, "%02x",
-                   (unsigned char) host_public_key_md5[i]);
-        if(!strequal(buf, data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5])) {
-          failf(data,
-                "Denied establishing ssh session: mismatch md5 fingerprint. "
-                "Remote %s is not equal to %s",
-                buf, data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]);
-          state(conn, SSH_SESSION_FREE);
-          sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
-          break;
-        }
-      }
-
-#ifdef HAVE_LIBSSH2_KNOWNHOST_API
-      if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
-        /* we're asked to verify the host against a file */
-        int keytype;
-        size_t keylen;
-        const char *remotekey = libssh2_session_hostkey(sshc->ssh_session,
-                                                        &keylen, &keytype);
-        int keycheck;
-        int keybit;
-
-        if(remotekey) {
-          /*
-           * A subject to figure out is what host name we need to pass in here.
-           * What host name does OpenSSH store in its file if an IDN name is
-           * used?
-           */
-          struct libssh2_knownhost *host;
-          enum curl_khmatch keymatch;
-          curl_sshkeycallback func =
-            data->set.ssh_keyfunc?data->set.ssh_keyfunc:sshkeycallback;
-          struct curl_khkey knownkey;
-          struct curl_khkey *knownkeyp = NULL;
-          struct curl_khkey foundkey;
-
-          keybit = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
-            LIBSSH2_KNOWNHOST_KEY_SSHRSA:LIBSSH2_KNOWNHOST_KEY_SSHDSS;
-
-          keycheck = libssh2_knownhost_check(sshc->kh,
-                                             conn->host.name,
-                                             remotekey, keylen,
-                                             LIBSSH2_KNOWNHOST_TYPE_PLAIN|
-                                             LIBSSH2_KNOWNHOST_KEYENC_RAW|
-                                             keybit,
-                                             &host);
-
-          infof(data, "SSH host check: %d, key: %s\n", keycheck,
-                (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
-                host->key:"<none>");
-
-          /* setup 'knownkey' */
-          if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
-            knownkey.key = host->key;
-            knownkey.len = 0;
-            knownkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
-              CURLKHTYPE_RSA : CURLKHTYPE_DSS;
-            knownkeyp = &knownkey;
-          }
-
-          /* setup 'foundkey' */
-          foundkey.key = remotekey;
-          foundkey.len = keylen;
-          foundkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)?
-            CURLKHTYPE_RSA : CURLKHTYPE_DSS;
-
-          /*
-           * if any of the LIBSSH2_KNOWNHOST_CHECK_* defines and the
-           * curl_khmatch enum are ever modified, we need to introduce a
-           * translation table here!
-           */
-          keymatch = (enum curl_khmatch)keycheck;
-
-          /* Ask the callback how to behave */
-          rc = func(data, knownkeyp, /* from the knownhosts file */
-                    &foundkey, /* from the remote host */
-                    keymatch, data->set.ssh_keyfunc_userp);
-        }
-        else
-          /* no remotekey means failure! */
-          rc = CURLKHSTAT_REJECT;
-
-        switch(rc) {
-        default: /* unknown return codes will equal reject */
-        case CURLKHSTAT_REJECT:
-          state(conn, SSH_SESSION_FREE);
-        case CURLKHSTAT_DEFER:
-          /* DEFER means bail out but keep the SSH_HOSTKEY state */
-          result = sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
-          break;
-        case CURLKHSTAT_FINE:
-        case CURLKHSTAT_FINE_ADD_TO_FILE:
-          /* proceed */
-          if(keycheck != LIBSSH2_KNOWNHOST_CHECK_MATCH) {
-            /* the found host+key didn't match but has been told to be fine
-               anyway so we add it in memory */
-            int addrc = libssh2_knownhost_add(sshc->kh,
-                                              conn->host.name, NULL,
-                                              remotekey, keylen,
-                                              LIBSSH2_KNOWNHOST_TYPE_PLAIN|
-                                              LIBSSH2_KNOWNHOST_KEYENC_RAW|
-                                              keybit, NULL);
-            if(addrc)
-              infof(data, "Warning adding the known host %s failed!\n",
-                    conn->host.name);
-            else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE) {
-              /* now we write the entire in-memory list of known hosts to the
-                 known_hosts file */
-              int wrc =
-                libssh2_knownhost_writefile(sshc->kh,
-                                            data->set.str[STRING_SSH_KNOWNHOSTS],
-                                            LIBSSH2_KNOWNHOST_FILE_OPENSSH);
-              if(wrc) {
-                infof(data, "Warning, writing %s failed!\n",
-                      data->set.str[STRING_SSH_KNOWNHOSTS]);
-              }
-            }
-          }
-          break;
-        }
-      }
-#endif /* HAVE_LIBSSH2_KNOWNHOST_API */
-
-      state(conn, SSH_AUTHLIST);
+      result = ssh_check_fingerprint(conn);
+      if(result == CURLE_OK)
+        state(conn, SSH_AUTHLIST);
       break;
 
     case SSH_AUTHLIST:
@@ -723,7 +750,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        */
       sshc->authlist = libssh2_userauth_list(sshc->ssh_session,
                                              conn->user,
-                                             (unsigned int)strlen(conn->user));
+                                             curlx_uztoui(strlen(conn->user)));
 
       if(!sshc->authlist) {
         if((err = libssh2_session_last_errno(sshc->ssh_session)) ==
@@ -752,7 +779,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
       if((data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY) &&
          (strstr(sshc->authlist, "publickey") != NULL)) {
-        char *home;
+        char *home = NULL;
+        bool rsa_pub_empty_but_ok = FALSE;
 
         sshc->rsa_pub = sshc->rsa = NULL;
 
@@ -760,7 +788,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
            HOME environment variable etc? */
         home = curl_getenv("HOME");
 
-        if(data->set.str[STRING_SSH_PUBLIC_KEY])
+        if(data->set.str[STRING_SSH_PUBLIC_KEY] &&
+           !*data->set.str[STRING_SSH_PUBLIC_KEY])
+           rsa_pub_empty_but_ok = true;
+        else if(data->set.str[STRING_SSH_PUBLIC_KEY])
           sshc->rsa_pub = aprintf("%s", data->set.str[STRING_SSH_PUBLIC_KEY]);
         else if(home)
           sshc->rsa_pub = aprintf("%s/.ssh/id_dsa.pub", home);
@@ -768,9 +799,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           /* as a final resort, try current dir! */
           sshc->rsa_pub = strdup("id_dsa.pub");
 
-        if(sshc->rsa_pub == NULL) {
+        if(!rsa_pub_empty_but_ok && (sshc->rsa_pub == NULL)) {
           Curl_safefree(home);
-          home = NULL;
           state(conn, SSH_SESSION_FREE);
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
@@ -786,9 +816,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
         if(sshc->rsa == NULL) {
           Curl_safefree(home);
-          home = NULL;
           Curl_safefree(sshc->rsa_pub);
-          sshc->rsa_pub = NULL;
           state(conn, SSH_SESSION_FREE);
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
@@ -799,7 +827,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           sshc->passphrase = "";
 
         Curl_safefree(home);
-        home = NULL;
 
         infof(data, "Using ssh public key file %s\n", sshc->rsa_pub);
         infof(data, "Using ssh private key file %s\n", sshc->rsa);
@@ -816,8 +843,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        */
       rc = libssh2_userauth_publickey_fromfile_ex(sshc->ssh_session,
                                                   conn->user,
-                                                  (unsigned int)
-                                                  strlen(conn->user),
+                                                  curlx_uztoui(
+                                                    strlen(conn->user)),
                                                   sshc->rsa_pub,
                                                   sshc->rsa, sshc->passphrase);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
@@ -825,9 +852,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
 
       Curl_safefree(sshc->rsa_pub);
-      sshc->rsa_pub = NULL;
       Curl_safefree(sshc->rsa);
-      sshc->rsa = NULL;
 
       if(rc == 0) {
         sshc->authed = TRUE;
@@ -855,9 +880,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_AUTH_PASS:
       rc = libssh2_userauth_password_ex(sshc->ssh_session, conn->user,
-                                        (unsigned int)strlen(conn->user),
+                                        curlx_uztoui(strlen(conn->user)),
                                         conn->passwd,
-                                        (unsigned int)strlen(conn->passwd),
+                                        curlx_uztoui(strlen(conn->passwd)),
                                         NULL);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -878,12 +903,101 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         state(conn, SSH_AUTH_HOST);
       }
       else {
-        state(conn, SSH_AUTH_KEY_INIT);
+        state(conn, SSH_AUTH_AGENT_INIT);
       }
       break;
 
     case SSH_AUTH_HOST:
-      state(conn, SSH_AUTH_KEY_INIT);
+      state(conn, SSH_AUTH_AGENT_INIT);
+      break;
+
+    case SSH_AUTH_AGENT_INIT:
+#ifdef HAVE_LIBSSH2_AGENT_API
+      if((data->set.ssh_auth_types & CURLSSH_AUTH_AGENT)
+         && (strstr(sshc->authlist, "publickey") != NULL)) {
+
+        /* Connect to the ssh-agent */
+        /* The agent could be shared by a curl thread i believe
+           but nothing obvious as keys can be added/removed at any time */
+        if(!sshc->ssh_agent) {
+          sshc->ssh_agent = libssh2_agent_init(sshc->ssh_session);
+          if(!sshc->ssh_agent) {
+            infof(data, "Could not create agent object\n");
+
+            state(conn, SSH_AUTH_KEY_INIT);
+          }
+        }
+
+        rc = libssh2_agent_connect(sshc->ssh_agent);
+        if(rc == LIBSSH2_ERROR_EAGAIN)
+          break;
+        if(rc < 0) {
+          infof(data, "Failure connecting to agent\n");
+          state(conn, SSH_AUTH_KEY_INIT);
+        }
+        else {
+          state(conn, SSH_AUTH_AGENT_LIST);
+        }
+      }
+      else
+#endif /* HAVE_LIBSSH2_AGENT_API */
+        state(conn, SSH_AUTH_KEY_INIT);
+      break;
+
+    case SSH_AUTH_AGENT_LIST:
+#ifdef HAVE_LIBSSH2_AGENT_API
+      rc = libssh2_agent_list_identities(sshc->ssh_agent);
+
+      if(rc == LIBSSH2_ERROR_EAGAIN)
+        break;
+      if(rc < 0) {
+        infof(data, "Failure requesting identities to agent\n");
+        state(conn, SSH_AUTH_KEY_INIT);
+      }
+      else {
+        state(conn, SSH_AUTH_AGENT);
+        sshc->sshagent_prev_identity = NULL;
+      }
+#endif
+      break;
+
+    case SSH_AUTH_AGENT:
+#ifdef HAVE_LIBSSH2_AGENT_API
+      /* as prev_identity evolves only after an identity user auth finished we
+         can safely request it again as long as EAGAIN is returned here or by
+         libssh2_agent_userauth */
+      rc = libssh2_agent_get_identity(sshc->ssh_agent,
+                                      &sshc->sshagent_identity,
+                                      sshc->sshagent_prev_identity);
+      if(rc == LIBSSH2_ERROR_EAGAIN)
+        break;
+
+      if(rc == 0) {
+        rc = libssh2_agent_userauth(sshc->ssh_agent, conn->user,
+                                    sshc->sshagent_identity);
+
+        if(rc < 0) {
+          if(rc != LIBSSH2_ERROR_EAGAIN) {
+            /* tried and failed? go to next identity */
+            sshc->sshagent_prev_identity = sshc->sshagent_identity;
+          }
+          break;
+        }
+      }
+
+      if(rc < 0)
+        infof(data, "Failure requesting identities to agent\n");
+      else if(rc == 1)
+        infof(data, "No identity would match\n");
+
+      if(rc == LIBSSH2_ERROR_NONE) {
+        sshc->authed = TRUE;
+        infof(data, "Agent based authentication successful\n");
+        state(conn, SSH_AUTH_DONE);
+      }
+      else
+        state(conn, SSH_AUTH_KEY_INIT);
+#endif
       break;
 
     case SSH_AUTH_KEY_INIT:
@@ -900,8 +1014,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /* Authentication failed. Continue with keyboard-interactive now. */
       rc = libssh2_userauth_keyboard_interactive_ex(sshc->ssh_session,
                                                     conn->user,
-                                                    (unsigned int)
-                                                    strlen(conn->user),
+                                                    curlx_uztoui(
+                                                      strlen(conn->user)),
                                                     &kbd_callback);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -931,7 +1045,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       conn->sockfd = sock;
       conn->writesockfd = CURL_SOCKET_BAD;
 
-      if(conn->protocol == PROT_SFTP) {
+      if(conn->handler->protocol == CURLPROTO_SFTP) {
         state(conn, SSH_SFTP_INIT);
         break;
       }
@@ -971,7 +1085,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /*
        * Get the "home" directory
        */
-      rc = libssh2_sftp_realpath(sshc->sftp_session, ".",
+      rc = sftp_libssh2_realpath(sshc->sftp_session, ".",
                                  tempHome, PATH_MAX-1);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -985,10 +1099,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
         }
+        conn->data->state.most_recent_ftp_entrypath = sshc->homedir;
       }
       else {
         /* Return the error type */
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         result = sftp_libssh2_error_to_CURLE(err);
         sshc->actualcode = result?result:CURLE_SSH;
         DEBUGF(infof(data, "error = %d makes libcurl = %d\n",
@@ -1043,28 +1158,51 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /*
        * Support some of the "FTP" commands
        */
-      if(curl_strequal("pwd", sshc->quote_item->data)) {
+      char *cmd = sshc->quote_item->data;
+      sshc->acceptfail = FALSE;
+
+      /* if a command starts with an asterisk, which a legal SFTP command never
+         can, the command will be allowed to fail without it causing any
+         aborts or cancels etc. It will cause libcurl to act as if the command
+         is successful, whatever the server reponds. */
+
+      if(cmd[0] == '*') {
+        cmd++;
+        sshc->acceptfail = TRUE;
+      }
+
+      if(curl_strequal("pwd", cmd)) {
         /* output debug output if that is requested */
+        char *tmp = aprintf("257 \"%s\" is current directory.\n",
+                            sftp_scp->path);
+        if(!tmp) {
+          result = CURLE_OUT_OF_MEMORY;
+          state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
+          break;
+        }
         if(data->set.verbose) {
-          char tmp[PATH_MAX+1];
-
           Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"PWD\n", 4, conn);
-          snprintf(tmp, PATH_MAX, "257 \"%s\" is current directory.\n",
-                   sftp_scp->path);
           Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp), conn);
         }
+        /* this sends an FTP-like "header" to the header callback so that the
+           current directory can be read very similar to how it is read when
+           using ordinary FTP. */
+        result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp));
+        free(tmp);
         state(conn, SSH_SFTP_NEXT_QUOTE);
         break;
       }
-      else if(sshc->quote_item->data) {
+      else if(cmd) {
         /*
          * the arguments following the command must be separated from the
          * command with a space so we can check for it unconditionally
          */
-        cp = strchr(sshc->quote_item->data, ' ');
+        cp = strchr(cmd, ' ');
         if(cp == NULL) {
           failf(data, "Syntax error in SFTP command. Supply parameter(s)!");
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
@@ -1080,6 +1218,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           else
             failf(data, "Syntax error: Bad first parameter");
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = result;
           break;
         }
@@ -1090,9 +1229,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
          * OpenSSH's sftp program and call the appropriate libssh2
          * functions.
          */
-        if(curl_strnequal(sshc->quote_item->data, "chgrp ", 6) ||
-           curl_strnequal(sshc->quote_item->data, "chmod ", 6) ||
-           curl_strnequal(sshc->quote_item->data, "chown ", 6) ) {
+        if(curl_strnequal(cmd, "chgrp ", 6) ||
+           curl_strnequal(cmd, "chmod ", 6) ||
+           curl_strnequal(cmd, "chown ", 6) ) {
           /* attribute change */
 
           /* sshc->quote_path1 contains the mode to set */
@@ -1105,8 +1244,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
               failf(data, "Syntax error in chgrp/chmod/chown: "
                     "Bad second parameter");
             Curl_safefree(sshc->quote_path1);
-            sshc->quote_path1 = NULL;
             state(conn, SSH_SFTP_CLOSE);
+            sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
@@ -1114,8 +1253,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           state(conn, SSH_SFTP_QUOTE_STAT);
           break;
         }
-        else if(curl_strnequal(sshc->quote_item->data, "ln ", 3) ||
-                curl_strnequal(sshc->quote_item->data, "symlink ", 8)) {
+        else if(curl_strnequal(cmd, "ln ", 3) ||
+                curl_strnequal(cmd, "symlink ", 8)) {
           /* symbolic linking */
           /* sshc->quote_path1 is the source */
           /* get the destination */
@@ -1127,20 +1266,20 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
               failf(data,
                     "Syntax error in ln/symlink: Bad second parameter");
             Curl_safefree(sshc->quote_path1);
-            sshc->quote_path1 = NULL;
             state(conn, SSH_SFTP_CLOSE);
+            sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
           state(conn, SSH_SFTP_QUOTE_SYMLINK);
           break;
         }
-        else if(curl_strnequal(sshc->quote_item->data, "mkdir ", 6)) {
+        else if(curl_strnequal(cmd, "mkdir ", 6)) {
           /* create dir */
           state(conn, SSH_SFTP_QUOTE_MKDIR);
           break;
         }
-        else if(curl_strnequal(sshc->quote_item->data, "rename ", 7)) {
+        else if(curl_strnequal(cmd, "rename ", 7)) {
           /* rename file */
           /* first param is the source path */
           /* second param is the dest. path */
@@ -1151,30 +1290,29 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
             else
               failf(data, "Syntax error in rename: Bad second parameter");
             Curl_safefree(sshc->quote_path1);
-            sshc->quote_path1 = NULL;
             state(conn, SSH_SFTP_CLOSE);
+            sshc->nextstate = SSH_NO_STATE;
             sshc->actualcode = result;
             break;
           }
           state(conn, SSH_SFTP_QUOTE_RENAME);
           break;
         }
-        else if(curl_strnequal(sshc->quote_item->data, "rmdir ", 6)) {
+        else if(curl_strnequal(cmd, "rmdir ", 6)) {
           /* delete dir */
           state(conn, SSH_SFTP_QUOTE_RMDIR);
           break;
         }
-        else if(curl_strnequal(sshc->quote_item->data, "rm ", 3)) {
+        else if(curl_strnequal(cmd, "rm ", 3)) {
           state(conn, SSH_SFTP_QUOTE_UNLINK);
           break;
         }
 
         failf(data, "Unknown SFTP command");
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         Curl_safefree(sshc->quote_path2);
-        sshc->quote_path2 = NULL;
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1185,14 +1323,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
     break;
 
     case SSH_SFTP_NEXT_QUOTE:
-      if(sshc->quote_path1) {
-        Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
-      }
-      if(sshc->quote_path2) {
-        Curl_safefree(sshc->quote_path2);
-        sshc->quote_path2 = NULL;
-      }
+      Curl_safefree(sshc->quote_path1);
+      Curl_safefree(sshc->quote_path2);
 
       sshc->quote_item = sshc->quote_item->next;
 
@@ -1211,73 +1343,85 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       break;
 
     case SSH_SFTP_QUOTE_STAT:
-      if(!curl_strnequal(sshc->quote_item->data, "chmod", 5)) {
+    {
+      char *cmd = sshc->quote_item->data;
+      sshc->acceptfail = FALSE;
+
+      /* if a command starts with an asterisk, which a legal SFTP command never
+         can, the command will be allowed to fail without it causing any
+         aborts or cancels etc. It will cause libcurl to act as if the command
+         is successful, whatever the server reponds. */
+
+      if(cmd[0] == '*') {
+        cmd++;
+        sshc->acceptfail = TRUE;
+      }
+
+      if(!curl_strnequal(cmd, "chmod", 5)) {
         /* Since chown and chgrp only set owner OR group but libssh2 wants to
          * set them both at once, we need to obtain the current ownership
          * first.  This takes an extra protocol round trip.
          */
         rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
-                                  (unsigned int)strlen(sshc->quote_path2),
+                                  curlx_uztoui(strlen(sshc->quote_path2)),
                                   LIBSSH2_SFTP_STAT,
                                   &sshc->quote_attrs);
         if(rc == LIBSSH2_ERROR_EAGAIN) {
           break;
         }
-        else if(rc != 0) { /* get those attributes */
-          err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+        else if(rc != 0 && !sshc->acceptfail) { /* get those attributes */
+          err = sftp_libssh2_last_error(sshc->sftp_session);
           Curl_safefree(sshc->quote_path1);
-          sshc->quote_path1 = NULL;
           Curl_safefree(sshc->quote_path2);
-          sshc->quote_path2 = NULL;
           failf(data, "Attempt to get SFTP stats failed: %s",
                 sftp_libssh2_strerror(err));
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
       }
 
       /* Now set the new attributes... */
-      if(curl_strnequal(sshc->quote_item->data, "chgrp", 5)) {
+      if(curl_strnequal(cmd, "chgrp", 5)) {
         sshc->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10);
         sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
-        if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0])) {
+        if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+           !sshc->acceptfail) {
           Curl_safefree(sshc->quote_path1);
-          sshc->quote_path1 = NULL;
           Curl_safefree(sshc->quote_path2);
-          sshc->quote_path2 = NULL;
           failf(data, "Syntax error: chgrp gid not a number");
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
       }
-      else if(curl_strnequal(sshc->quote_item->data, "chmod", 5)) {
+      else if(curl_strnequal(cmd, "chmod", 5)) {
         sshc->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8);
         sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS;
         /* permissions are octal */
         if(sshc->quote_attrs.permissions == 0 &&
            !ISDIGIT(sshc->quote_path1[0])) {
           Curl_safefree(sshc->quote_path1);
-          sshc->quote_path1 = NULL;
           Curl_safefree(sshc->quote_path2);
-          sshc->quote_path2 = NULL;
           failf(data, "Syntax error: chmod permissions not a number");
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
       }
-      else if(curl_strnequal(sshc->quote_item->data, "chown", 5)) {
+      else if(curl_strnequal(cmd, "chown", 5)) {
         sshc->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10);
         sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
-        if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0])) {
+        if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
+           !sshc->acceptfail) {
           Curl_safefree(sshc->quote_path1);
-          sshc->quote_path1 = NULL;
           Curl_safefree(sshc->quote_path2);
-          sshc->quote_path2 = NULL;
           failf(data, "Syntax error: chown uid not a number");
           state(conn, SSH_SFTP_CLOSE);
+          sshc->nextstate = SSH_NO_STATE;
           sshc->actualcode = CURLE_QUOTE_ERROR;
           break;
         }
@@ -1286,24 +1430,24 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /* Now send the completed structure... */
       state(conn, SSH_SFTP_QUOTE_SETSTAT);
       break;
+    }
 
     case SSH_SFTP_QUOTE_SETSTAT:
       rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2,
-                                (unsigned int)strlen(sshc->quote_path2),
+                                curlx_uztoui(strlen(sshc->quote_path2)),
                                 LIBSSH2_SFTP_SETSTAT,
                                 &sshc->quote_attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         Curl_safefree(sshc->quote_path2);
-        sshc->quote_path2 = NULL;
         failf(data, "Attempt to set SFTP stats failed: %s",
               sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1312,22 +1456,21 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_SFTP_QUOTE_SYMLINK:
       rc = libssh2_sftp_symlink_ex(sshc->sftp_session, sshc->quote_path1,
-                                   (unsigned int)strlen(sshc->quote_path1),
+                                   curlx_uztoui(strlen(sshc->quote_path1)),
                                    sshc->quote_path2,
-                                   (unsigned int)strlen(sshc->quote_path2),
+                                   curlx_uztoui(strlen(sshc->quote_path2)),
                                    LIBSSH2_SFTP_SYMLINK);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         Curl_safefree(sshc->quote_path2);
-        sshc->quote_path2 = NULL;
         failf(data, "symlink command failed: %s",
               sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1336,17 +1479,17 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_SFTP_QUOTE_MKDIR:
       rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshc->quote_path1,
-                                 (unsigned int)strlen(sshc->quote_path1),
-                                 0755);
+                                 curlx_uztoui(strlen(sshc->quote_path1)),
+                                 data->set.new_directory_perms);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1355,23 +1498,23 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_SFTP_QUOTE_RENAME:
       rc = libssh2_sftp_rename_ex(sshc->sftp_session, sshc->quote_path1,
-                                  (unsigned int)strlen(sshc->quote_path1),
+                                  curlx_uztoui(strlen(sshc->quote_path1)),
                                   sshc->quote_path2,
-                                  (unsigned int)strlen(sshc->quote_path2),
+                                  curlx_uztoui(strlen(sshc->quote_path2)),
                                   LIBSSH2_SFTP_RENAME_OVERWRITE |
                                   LIBSSH2_SFTP_RENAME_ATOMIC |
                                   LIBSSH2_SFTP_RENAME_NATIVE);
+
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         Curl_safefree(sshc->quote_path2);
-        sshc->quote_path2 = NULL;
         failf(data, "rename command failed: %s", sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1380,16 +1523,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_SFTP_QUOTE_RMDIR:
       rc = libssh2_sftp_rmdir_ex(sshc->sftp_session, sshc->quote_path1,
-                                 (unsigned int)strlen(sshc->quote_path1));
+                                 curlx_uztoui(strlen(sshc->quote_path1)));
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1398,16 +1541,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
     case SSH_SFTP_QUOTE_UNLINK:
       rc = libssh2_sftp_unlink_ex(sshc->sftp_session, sshc->quote_path1,
-                                  (unsigned int)strlen(sshc->quote_path1));
+                                  curlx_uztoui(strlen(sshc->quote_path1)));
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
       }
-      else if(rc != 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+      else if(rc != 0 && !sshc->acceptfail) {
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         Curl_safefree(sshc->quote_path1);
-        sshc->quote_path1 = NULL;
         failf(data, "rm command failed: %s", sftp_libssh2_strerror(err));
         state(conn, SSH_SFTP_CLOSE);
+        sshc->nextstate = SSH_NO_STATE;
         sshc->actualcode = CURLE_QUOTE_ERROR;
         break;
       }
@@ -1441,7 +1584,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         LIBSSH2_SFTP_ATTRIBUTES attrs;
         if(data->state.resume_from < 0) {
           rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
-                                    (unsigned int)strlen(sftp_scp->path),
+                                    curlx_uztoui(strlen(sftp_scp->path)),
                                     LIBSSH2_SFTP_STAT, &attrs);
           if(rc == LIBSSH2_ERROR_EAGAIN) {
             break;
@@ -1463,7 +1606,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       if(data->set.ftp_append)
         /* Try to open for append, but create if nonexisting */
         flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_APPEND;
-      else if (data->state.resume_from > 0)
+      else if(data->state.resume_from > 0)
         /* If we have restart position then open for append */
         flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_APPEND;
       else
@@ -1472,7 +1615,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
       sshc->sftp_handle =
         libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
-                             (unsigned int)strlen(sftp_scp->path),
+                             curlx_uztoui(strlen(sftp_scp->path)),
                              flags, data->set.new_file_perms,
                              LIBSSH2_SFTP_OPENFILE);
 
@@ -1485,7 +1628,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc)
             /* only when there was an SFTP protocol error can we extract
                the sftp error! */
-            err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+            err = sftp_libssh2_last_error(sshc->sftp_session);
           else
             err = -1; /* not an sftp error at all */
 
@@ -1533,7 +1676,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
                                     SEEK_SET);
         }
 
-        if(seekerr != CURL_SEEKFUNC_OK){
+        if(seekerr != CURL_SEEKFUNC_OK) {
 
           if(seekerr != CURL_SEEKFUNC_CANTSEEK) {
             failf(data, "Could not seek stream");
@@ -1590,6 +1733,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
            figure out a "real" bitmask */
         sshc->orig_waitfor = data->req.keepon;
 
+        /* we want to use the _sending_ function even when the socket turns
+           out readable as the underlying libssh2 sftp send function will deal
+           with both accordingly */
+        conn->cselect_bits = CURL_CSELECT_OUT;
+
+        /* since we don't really wait for anything at this point, we want the
+           state machine to move on as soon as possible so we set a very short
+           timeout here */
+        Curl_expire(data, 1);
+
         state(conn, SSH_STOP);
       }
       break;
@@ -1621,7 +1774,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
     case SSH_SFTP_CREATE_DIRS_MKDIR:
       /* 'mode' - parameter is preliminary - default to 0644 */
       rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sftp_scp->path,
-                                 (unsigned int)strlen(sftp_scp->path),
+                                 curlx_uztoui(strlen(sftp_scp->path)),
                                  data->set.new_directory_perms);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -1629,17 +1782,16 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       *sshc->slash_pos = '/';
       ++sshc->slash_pos;
       if(rc == -1) {
-        unsigned int sftp_err = 0;
         /*
          * Abort if failure wasn't that the dir already exists or the
          * permission was denied (creation might succeed further down the
          * path) - retry on unspecific FAILURE also
          */
-        sftp_err = (unsigned int)(libssh2_sftp_last_error(sshc->sftp_session));
-        if((sftp_err != LIBSSH2_FX_FILE_ALREADY_EXISTS) &&
-           (sftp_err != LIBSSH2_FX_FAILURE) &&
-           (sftp_err != LIBSSH2_FX_PERMISSION_DENIED)) {
-          result = sftp_libssh2_error_to_CURLE(sftp_err);
+        err = sftp_libssh2_last_error(sshc->sftp_session);
+        if((err != LIBSSH2_FX_FILE_ALREADY_EXISTS) &&
+           (err != LIBSSH2_FX_FAILURE) &&
+           (err != LIBSSH2_FX_PERMISSION_DENIED)) {
+          result = sftp_libssh2_error_to_CURLE(err);
           state(conn, SSH_SFTP_CLOSE);
           sshc->actualcode = result?result:CURLE_SSH;
           break;
@@ -1655,8 +1807,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        */
       sshc->sftp_handle = libssh2_sftp_open_ex(sshc->sftp_session,
                                                sftp_scp->path,
-                                               (unsigned int)
-                                               strlen(sftp_scp->path),
+                                               curlx_uztoui(
+                                                 strlen(sftp_scp->path)),
                                                0, 0, LIBSSH2_SFTP_OPENDIR);
       if(!sshc->sftp_handle) {
         if(libssh2_session_last_errno(sshc->ssh_session) ==
@@ -1665,7 +1817,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           break;
         }
         else {
-          err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+          err = sftp_libssh2_last_error(sshc->sftp_session);
           failf(data, "Could not open directory for reading: %s",
                 sftp_libssh2_strerror(err));
           state(conn, SSH_SFTP_CLOSE);
@@ -1681,7 +1833,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
       if((sshc->readdir_longentry = malloc(PATH_MAX+1)) == NULL) {
         Curl_safefree(sshc->readdir_filename);
-        sshc->readdir_filename = NULL;
         state(conn, SSH_SFTP_CLOSE);
         sshc->actualcode = CURLE_OUT_OF_MEMORY;
         break;
@@ -1736,9 +1887,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           sshc->readdir_line = calloc(sshc->readdir_totalLen, 1);
           if(!sshc->readdir_line) {
             Curl_safefree(sshc->readdir_filename);
-            sshc->readdir_filename = NULL;
             Curl_safefree(sshc->readdir_longentry);
-            sshc->readdir_longentry = NULL;
             state(conn, SSH_SFTP_CLOSE);
             sshc->actualcode = CURLE_OUT_OF_MEMORY;
             break;
@@ -1752,9 +1901,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
             sshc->readdir_linkPath = malloc(PATH_MAX + 1);
             if(sshc->readdir_linkPath == NULL) {
               Curl_safefree(sshc->readdir_filename);
-              sshc->readdir_filename = NULL;
               Curl_safefree(sshc->readdir_longentry);
-              sshc->readdir_longentry = NULL;
               state(conn, SSH_SFTP_CLOSE);
               sshc->actualcode = CURLE_OUT_OF_MEMORY;
               break;
@@ -1771,23 +1918,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
       else if(sshc->readdir_len == 0) {
         Curl_safefree(sshc->readdir_filename);
-        sshc->readdir_filename = NULL;
         Curl_safefree(sshc->readdir_longentry);
-        sshc->readdir_longentry = NULL;
         state(conn, SSH_SFTP_READDIR_DONE);
         break;
       }
       else if(sshc->readdir_len <= 0) {
-        err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+        err = sftp_libssh2_last_error(sshc->sftp_session);
         result = sftp_libssh2_error_to_CURLE(err);
         sshc->actualcode = result?result:CURLE_SSH;
         failf(data, "Could not open remote file for reading: %s :: %d",
               sftp_libssh2_strerror(err),
               libssh2_session_last_errno(sshc->ssh_session));
         Curl_safefree(sshc->readdir_filename);
-        sshc->readdir_filename = NULL;
         Curl_safefree(sshc->readdir_longentry);
-        sshc->readdir_longentry = NULL;
         state(conn, SSH_SFTP_CLOSE);
         break;
       }
@@ -1797,7 +1940,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       sshc->readdir_len =
         libssh2_sftp_symlink_ex(sshc->sftp_session,
                                 sshc->readdir_linkPath,
-                                (unsigned int) strlen(sshc->readdir_linkPath),
+                                curlx_uztoui(strlen(sshc->readdir_linkPath)),
                                 sshc->readdir_filename,
                                 PATH_MAX, LIBSSH2_SFTP_READLINK);
       if(sshc->readdir_len == LIBSSH2_ERROR_EAGAIN) {
@@ -1805,19 +1948,19 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         break;
       }
       Curl_safefree(sshc->readdir_linkPath);
-      sshc->readdir_linkPath = NULL;
-      sshc->readdir_line = realloc(sshc->readdir_line,
-                                   sshc->readdir_totalLen + 4 +
-                                   sshc->readdir_len);
-      if(!sshc->readdir_line) {
+
+      /* get room for the filename and extra output */
+      sshc->readdir_totalLen += 4 + sshc->readdir_len;
+      new_readdir_line = realloc(sshc->readdir_line, sshc->readdir_totalLen);
+      if(!new_readdir_line) {
+        Curl_safefree(sshc->readdir_line);
         Curl_safefree(sshc->readdir_filename);
-        sshc->readdir_filename = NULL;
         Curl_safefree(sshc->readdir_longentry);
-        sshc->readdir_longentry = NULL;
         state(conn, SSH_SFTP_CLOSE);
         sshc->actualcode = CURLE_OUT_OF_MEMORY;
         break;
       }
+      sshc->readdir_line = new_readdir_line;
 
       sshc->readdir_currLen += snprintf(sshc->readdir_line +
                                         sshc->readdir_currLen,
@@ -1848,7 +1991,6 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         data->req.bytecount += sshc->readdir_currLen;
       }
       Curl_safefree(sshc->readdir_line);
-      sshc->readdir_line = NULL;
       if(result) {
         state(conn, SSH_STOP);
       }
@@ -1864,9 +2006,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
       sshc->sftp_handle = NULL;
       Curl_safefree(sshc->readdir_filename);
-      sshc->readdir_filename = NULL;
       Curl_safefree(sshc->readdir_longentry);
-      sshc->readdir_longentry = NULL;
 
       /* no data to transfer */
       Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1879,7 +2019,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
        */
       sshc->sftp_handle =
         libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path,
-                             (unsigned int)strlen(sftp_scp->path),
+                             curlx_uztoui(strlen(sftp_scp->path)),
                              LIBSSH2_FXF_READ, data->set.new_file_perms,
                              LIBSSH2_SFTP_OPENFILE);
       if(!sshc->sftp_handle) {
@@ -1889,7 +2029,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           break;
         }
         else {
-          err = (int)(libssh2_sftp_last_error(sshc->sftp_session));
+          err = sftp_libssh2_last_error(sshc->sftp_session);
           failf(data, "Could not open remote file for reading: %s",
                 sftp_libssh2_strerror(err));
           state(conn, SSH_SFTP_CLOSE);
@@ -1906,7 +2046,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       LIBSSH2_SFTP_ATTRIBUTES attrs;
 
       rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
-                                (unsigned int)strlen(sftp_scp->path),
+                                curlx_uztoui(strlen(sftp_scp->path)),
                                 LIBSSH2_SFTP_STAT, &attrs);
       if(rc == LIBSSH2_ERROR_EAGAIN) {
         break;
@@ -2009,8 +2149,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /* not set by Curl_setup_transfer to preserve keepon bits */
       conn->writesockfd = conn->sockfd;
 
-      /* FIXME: here should be explained why we need it to start the
-       * download */
+      /* we want to use the _receiving_ function even when the socket turns
+         out writableable as the underlying libssh2 recv function will deal
+         with both accordingly */
       conn->cselect_bits = CURL_CSELECT_IN;
     }
     if(result) {
@@ -2033,15 +2174,22 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         }
         sshc->sftp_handle = NULL;
       }
-      Curl_safefree(sftp_scp->path);
-      sftp_scp->path = NULL;
+      if(sftp_scp)
+        Curl_safefree(sftp_scp->path);
 
       DEBUGF(infof(data, "SFTP DONE done\n"));
-#if 0 /* PREV */
-      state(conn, SSH_SFTP_SHUTDOWN);
-#endif
-      state(conn, SSH_STOP);
-      result = sshc->actualcode;
+
+      /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
+         After nextstate is executed,the control should come back to
+         SSH_SFTP_CLOSE to pass the correct result back  */
+      if(sshc->nextstate != SSH_NO_STATE) {
+        state(conn, sshc->nextstate);
+        sshc->nextstate = SSH_SFTP_CLOSE;
+      }
+      else {
+        state(conn, SSH_STOP);
+        result = sshc->actualcode;
+      }
       break;
 
     case SSH_SFTP_SHUTDOWN:
@@ -2071,7 +2219,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
 
       Curl_safefree(sshc->homedir);
-      sshc->homedir = NULL;
+      conn->data->state.most_recent_ftp_entrypath = NULL;
 
       state(conn, SSH_SESSION_DISCONNECT);
       break;
@@ -2139,6 +2287,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         sshc->actualcode = result;
       }
       else {
+        /* we want to use the _sending_ function even when the socket turns
+           out readable as the underlying libssh2 scp send function will deal
+           with both accordingly */
+        conn->cselect_bits = CURL_CSELECT_OUT;
+
         state(conn, SSH_STOP);
       }
       break;
@@ -2185,8 +2338,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       /* not set by Curl_setup_transfer to preserve keepon bits */
       conn->writesockfd = conn->sockfd;
 
-      /* FIXME: here should be explained why we need it to start the
-       * download */
+      /* we want to use the _receiving_ function even when the socket turns
+         out writableable as the underlying libssh2 recv function will deal
+         with both accordingly */
       conn->cselect_bits = CURL_CSELECT_IN;
 
       if(result) {
@@ -2289,7 +2443,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
 
       Curl_safefree(sshc->homedir);
-      sshc->homedir = NULL;
+      conn->data->state.most_recent_ftp_entrypath = NULL;
 
       state(conn, SSH_SESSION_FREE);
       break;
@@ -2302,6 +2456,25 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
       }
 #endif
 
+#ifdef HAVE_LIBSSH2_AGENT_API
+      if(sshc->ssh_agent) {
+        rc = libssh2_agent_disconnect(sshc->ssh_agent);
+        if(rc == LIBSSH2_ERROR_EAGAIN) {
+          break;
+        }
+        else if(rc < 0) {
+          infof(data, "Failed to disconnect from libssh2 agent\n");
+        }
+        libssh2_agent_free (sshc->ssh_agent);
+        sshc->ssh_agent = NULL;
+
+        /* NB: there is no need to free identities, they are part of internal
+           agent stuff */
+        sshc->sshagent_identity = NULL;
+        sshc->sshagent_prev_identity = NULL;
+      }
+#endif
+
       if(sshc->ssh_session) {
         rc = libssh2_session_free(sshc->ssh_session);
         if(rc == LIBSSH2_ERROR_EAGAIN) {
@@ -2312,10 +2485,42 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
         }
         sshc->ssh_session = NULL;
       }
+
+      /* worst-case scenario cleanup */
+
+      DEBUGASSERT(sshc->ssh_session == NULL);
+      DEBUGASSERT(sshc->ssh_channel == NULL);
+      DEBUGASSERT(sshc->sftp_session == NULL);
+      DEBUGASSERT(sshc->sftp_handle == NULL);
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
+      DEBUGASSERT(sshc->kh == NULL);
+#endif
+#ifdef HAVE_LIBSSH2_AGENT_API
+      DEBUGASSERT(sshc->ssh_agent == NULL);
+#endif
+
+      Curl_safefree(sshc->rsa_pub);
+      Curl_safefree(sshc->rsa);
+
+      Curl_safefree(sshc->quote_path1);
+      Curl_safefree(sshc->quote_path2);
+
+      Curl_safefree(sshc->homedir);
+
+      Curl_safefree(sshc->readdir_filename);
+      Curl_safefree(sshc->readdir_longentry);
+      Curl_safefree(sshc->readdir_line);
+      Curl_safefree(sshc->readdir_linkPath);
+
+      /* the code we are about to return */
+      result = sshc->actualcode;
+
+      memset(sshc, 0, sizeof(struct ssh_conn));
+
       conn->bits.close = TRUE;
+      sshc->state = SSH_SESSION_FREE; /* current */
       sshc->nextstate = SSH_NO_STATE;
       state(conn, SSH_STOP);
-      result = sshc->actualcode;
       break;
 
     case SSH_QUIT:
@@ -2412,7 +2617,7 @@ static void ssh_block2waitfor(struct connectdata *conn, bool block)
 }
 #else
   /* no libssh2 directional support so we simply don't know */
-#define ssh_block2waitfor(x,y)
+#define ssh_block2waitfor(x,y) Curl_nop_stmt
 #endif
 
 /* called repeatedly until done from multi.c */
@@ -2424,13 +2629,13 @@ static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done)
                  implementation */
 
   result = ssh_statemach_act(conn, &block);
-  *done = (bool)(sshc->state == SSH_STOP);
+  *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
   ssh_block2waitfor(conn, block);
 
   return result;
 }
 
-static CURLcode ssh_easy_statemach(struct connectdata *conn,
+static CURLcode ssh_block_statemach(struct connectdata *conn,
                                    bool duringconnect)
 {
   struct ssh_conn *sshc = &conn->proto.sshc;
@@ -2442,13 +2647,21 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn,
     long left;
 
     result = ssh_statemach_act(conn, &block);
+    if(result)
+      break;
 
     if(Curl_pgrsUpdate(conn))
       return CURLE_ABORTED_BY_CALLBACK;
+    else {
+      struct timeval now = Curl_tvnow();
+      result = Curl_speedcheck(data, now);
+      if(result)
+        break;
+    }
 
-    left = Curl_timeleft(conn, NULL, duringconnect);
+    left = Curl_timeleft(data, NULL, duringconnect);
     if(left < 0) {
-      failf(data, "Operation timed out\n");
+      failf(data, "Operation timed out");
       return CURLE_OPERATION_TIMEDOUT;
     }
 
@@ -2458,15 +2671,13 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn,
       curl_socket_t sock = conn->sock[FIRSTSOCKET];
       curl_socket_t fd_read = CURL_SOCKET_BAD;
       curl_socket_t fd_write = CURL_SOCKET_BAD;
-      if (LIBSSH2_SESSION_BLOCK_INBOUND & dir) {
+      if(LIBSSH2_SESSION_BLOCK_INBOUND & dir)
         fd_read = sock;
-      }
-      if (LIBSSH2_SESSION_BLOCK_OUTBOUND & dir) {
+      if(LIBSSH2_SESSION_BLOCK_OUTBOUND & dir)
         fd_write = sock;
-      }
       /* wait for the socket to become ready */
       Curl_socket_ready(fd_read, fd_write,
-                        (int)(left>1000?1000:left)); /* ignore result */
+                        left>1000?1000:left); /* ignore result */
     }
 #endif
 
@@ -2528,10 +2739,11 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
   if(result)
     return result;
 
-  if(conn->protocol & PROT_SCP) {
+  if(conn->handler->protocol & CURLPROTO_SCP) {
     conn->recv[FIRSTSOCKET] = scp_recv;
     conn->send[FIRSTSOCKET] = scp_send;
-  } else {
+  }
+  else {
     conn->recv[FIRSTSOCKET] = sftp_recv;
     conn->send[FIRSTSOCKET] = sftp_send;
   }
@@ -2568,10 +2780,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
     rc = libssh2_knownhost_readfile(ssh->kh,
                                     data->set.str[STRING_SSH_KNOWNHOSTS],
                                     LIBSSH2_KNOWNHOST_FILE_OPENSSH);
-    if(rc) {
+    if(rc < 0)
       infof(data, "Failed to read known hosts from %s\n",
             data->set.str[STRING_SSH_KNOWNHOSTS]);
-    }
   }
 #endif /* HAVE_LIBSSH2_KNOWNHOST_API */
 
@@ -2580,15 +2791,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
   infof(data, "SSH socket: %d\n", (int)sock);
 #endif /* CURL_LIBSSH2_DEBUG */
 
-  state(conn, SSH_S_STARTUP);
+  state(conn, SSH_INIT);
 
-  if(data->state.used_interface == Curl_if_multi)
-    result = ssh_multi_statemach(conn, done);
-  else {
-    result = ssh_easy_statemach(conn, TRUE);
-    if(!result)
-      *done = TRUE;
-  }
+  result = ssh_multi_statemach(conn, done);
 
   return result;
 }
@@ -2617,14 +2822,9 @@ CURLcode scp_perform(struct connectdata *conn,
   state(conn, SSH_SCP_TRANS_INIT);
 
   /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi) {
-    result = ssh_multi_statemach(conn, dophase_done);
-  }
-  else {
-    result = ssh_easy_statemach(conn, FALSE);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  result = ssh_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -2678,7 +2878,7 @@ static CURLcode ssh_do(struct connectdata *conn, bool *done)
   Curl_pgrsSetUploadSize(data, 0);
   Curl_pgrsSetDownloadSize(data, 0);
 
-  if(conn->protocol & PROT_SCP)
+  if(conn->handler->protocol & CURLPROTO_SCP)
     res = scp_perform(conn, &connected,  done);
   else
     res = sftp_perform(conn, &connected,  done);
@@ -2696,14 +2896,13 @@ static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection)
   (void) dead_connection;
 
   Curl_safefree(conn->data->state.proto.ssh);
-  conn->data->state.proto.ssh = NULL;
 
   if(ssh->ssh_session) {
     /* only if there's a session still around to use! */
 
     state(conn, SSH_SESSION_DISCONNECT);
 
-    result = ssh_easy_statemach(conn, FALSE);
+    result = ssh_block_statemach(conn, FALSE);
   }
 
   return result;
@@ -2724,14 +2923,15 @@ static CURLcode ssh_done(struct connectdata *conn, CURLcode status)
        non-blocking DONE operations, not in the multi state machine and with
        Curl_done() invokes on several places in the code!
     */
-    result = ssh_easy_statemach(conn, FALSE);
+    result = ssh_block_statemach(conn, FALSE);
   }
   else
     result = status;
 
-  Curl_safefree(sftp_scp->path);
-  sftp_scp->path = NULL;
-  Curl_pgrsDone(conn);
+  if(sftp_scp)
+    Curl_safefree(sftp_scp->path);
+  if(Curl_pgrsDone(conn))
+    return CURLE_ABORTED_BY_CALLBACK;
 
   conn->data->req.keepon = 0; /* clear all bits */
   return result;
@@ -2767,6 +2967,10 @@ static ssize_t scp_send(struct connectdata *conn, int sockindex,
     *err = CURLE_AGAIN;
     nwrite = 0;
   }
+  else if(nwrite < LIBSSH2_ERROR_NONE) {
+    *err = libssh2_session_error_to_CURLE((int)nwrite);
+    nwrite = -1;
+  }
 
   return nwrite;
 }
@@ -2786,7 +2990,7 @@ static ssize_t scp_recv(struct connectdata *conn, int sockindex,
     libssh2_channel_read(conn->proto.sshc.ssh_channel, mem, len);
 
   ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE);
-  if (nread == LIBSSH2_ERROR_EAGAIN) {
+  if(nread == LIBSSH2_ERROR_EAGAIN) {
     *err = CURLE_AGAIN;
     nread = -1;
   }
@@ -2822,14 +3026,9 @@ CURLcode sftp_perform(struct connectdata *conn,
   state(conn, SSH_SFTP_QUOTE_INIT);
 
   /* run the state-machine */
-  if(conn->data->state.used_interface == Curl_if_multi) {
-    result = ssh_multi_statemach(conn, dophase_done);
-  }
-  else {
-    result = ssh_easy_statemach(conn, FALSE);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
-  *connected = conn->bits.tcpconnect;
+  result = ssh_multi_statemach(conn, dophase_done);
+
+  *connected = conn->bits.tcpconnect[FIRSTSOCKET];
 
   if(*dophase_done) {
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -2862,12 +3061,11 @@ static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection)
   DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));
 
   Curl_safefree(conn->data->state.proto.ssh);
-  conn->data->state.proto.ssh = NULL;
 
   if(conn->proto.sshc.ssh_session) {
     /* only if there's a session still around to use! */
     state(conn, SSH_SFTP_SHUTDOWN);
-    result = ssh_easy_statemach(conn, FALSE);
+    result = ssh_block_statemach(conn, FALSE);
   }
 
   DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n"));
@@ -2882,11 +3080,12 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode status,
   struct ssh_conn *sshc = &conn->proto.sshc;
 
   if(status == CURLE_OK) {
-    /* Before we shut down, see if there are any post-quote commands to
-       send: */
+    /* Post quote commands are executed after the SFTP_CLOSE state to avoid
+       errors that could happen due to open file handles during POSTQUOTE
+       operation */
     if(!status && !premature && conn->data->set.postquote) {
-      sshc->nextstate = SSH_SFTP_CLOSE;
-      state(conn, SSH_SFTP_POSTQUOTE_INIT);
+      sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
+      state(conn, SSH_SFTP_CLOSE);
     }
     else
       state(conn, SSH_SFTP_CLOSE);
@@ -2911,6 +3110,10 @@ static ssize_t sftp_send(struct connectdata *conn, int sockindex,
     *err = CURLE_AGAIN;
     nwrite = 0;
   }
+  else if(nwrite < LIBSSH2_ERROR_NONE) {
+    *err = libssh2_session_error_to_CURLE((int)nwrite);
+    nwrite = -1;
+  }
 
   return nwrite;
 }
@@ -2976,7 +3179,7 @@ get_pathname(const char **cpp, char **path)
     quot = *cp++;
 
     /* Search for terminating quote, unescape some chars */
-    for (i = j = 0; i <= strlen(cp); i++) {
+    for(i = j = 0; i <= strlen(cp); i++) {
       if(cp[i] == quot) {  /* Found quote */
         i++;
         (*path)[j] = '\0';
@@ -3018,12 +3221,11 @@ get_pathname(const char **cpp, char **path)
 
   fail:
     Curl_safefree(*path);
-    *path = NULL;
     return CURLE_QUOTE_ERROR;
 }
 
 
-static const char *sftp_libssh2_strerror(unsigned long err)
+static const char *sftp_libssh2_strerror(int err)
 {
   switch (err) {
     case LIBSSH2_FX_NO_SUCH_FILE:
index 406220c..ff2e16b 100644 (file)
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_LIBSSH2_H
 #include <libssh2.h>
@@ -36,13 +36,17 @@ typedef enum {
   SSH_NO_STATE = -1,  /* Used for "nextState" so say there is none */
   SSH_STOP = 0,       /* do nothing state, stops the state machine */
 
-  SSH_S_STARTUP,      /* Session startup, First state in SSH-CONNECT */
+  SSH_INIT,           /* First state in SSH-CONNECT */
+  SSH_S_STARTUP,      /* Session startup */
   SSH_HOSTKEY,        /* verify hostkey */
   SSH_AUTHLIST,
   SSH_AUTH_PKEY_INIT,
   SSH_AUTH_PKEY,
   SSH_AUTH_PASS_INIT,
   SSH_AUTH_PASS,
+  SSH_AUTH_AGENT_INIT,/* initialize then wait for connection to agent */
+  SSH_AUTH_AGENT_LIST,/* ask for list then wait for entire list to come */
+  SSH_AUTH_AGENT,     /* attempt one key at a time */
   SSH_AUTH_HOST_INIT,
   SSH_AUTH_HOST,
   SSH_AUTH_KEY_INIT,
@@ -114,6 +118,8 @@ struct ssh_conn {
   char *quote_path1;          /* two generic pointers for the QUOTE stuff */
   char *quote_path2;
   LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */
+  bool acceptfail;            /* used by the SFTP_QUOTE (continue if
+                                 quote command fails) */
   char *homedir;              /* when doing SFTP we figure out home dir in the
                                  connect phase */
 
@@ -136,6 +142,12 @@ struct ssh_conn {
   LIBSSH2_SFTP_HANDLE *sftp_handle;
   int orig_waitfor;             /* default READ/WRITE bits wait for */
 
+#ifdef HAVE_LIBSSH2_AGENT_API
+  LIBSSH2_AGENT *ssh_agent;     /* proxy to ssh-agent/pageant */
+  struct libssh2_agent_publickey *sshagent_identity,
+                                 *sshagent_prev_identity;
+#endif
+
   /* note that HAVE_LIBSSH2_KNOWNHOST_API is a define set in the libssh2.h
      header */
 #ifdef HAVE_LIBSSH2_KNOWNHOST_API
index bd8dc17..d2d0e30 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
    Curl_ossl_ - prefix for OpenSSL ones
    Curl_gtls_ - prefix for GnuTLS ones
    Curl_nss_ - prefix for NSS ones
+   Curl_qssl_ - prefix for QsoSSL ones
+   Curl_gskit_ - prefix for GSKit ones
    Curl_polarssl_ - prefix for PolarSSL ones
+   Curl_cyassl_ - prefix for CyaSSL ones
+   Curl_schannel_ - prefix for Schannel SSPI ones
+   Curl_darwinssl_ - prefix for SecureTransport (Darwin) ones
 
    Note that this source code uses curlssl_* functions, and they are all
    defines/macros #defined by the lib-specific header files.
    http://httpd.apache.org/docs-2.0/ssl/ssl_intro.html
 */
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
 #endif
 
 #include "urldata.h"
 #include "gtls.h"   /* GnuTLS versions */
 #include "nssg.h"   /* NSS versions */
 #include "qssl.h"   /* QSOSSL versions */
+#include "gskit.h"  /* Global Secure ToolKit versions */
 #include "polarssl.h" /* PolarSSL versions */
+#include "axtls.h"  /* axTLS versions */
+#include "cyassl.h"  /* CyaSSL versions */
+#include "curl_schannel.h" /* Schannel SSPI version */
+#include "curl_darwinssl.h" /* SecureTransport (Darwin) version */
+#include "slist.h"
 #include "sendf.h"
 #include "rawstr.h"
 #include "url.h"
 #include "curl_memory.h"
 #include "progress.h"
+#include "share.h"
+#include "timeval.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
 /* The last #include file should be: */
 #include "memdebug.h"
 
+/* convenience macro to check if this handle is using a shared SSL session */
+#define SSLSESSION_SHARED(data) (data->share &&                        \
+                                 (data->share->specifier &             \
+                                  (1<<CURL_LOCK_DATA_SSL_SESSION)))
+
 static bool safe_strequal(char* str1, char* str2)
 {
   if(str1 && str2)
     /* both pointers point to something then compare them */
-    return (bool)(0 != Curl_raw_equal(str1, str2));
+    return (0 != Curl_raw_equal(str1, str2)) ? TRUE : FALSE;
   else
     /* if both pointers are NULL then treat them as equal */
-    return (bool)(!str1 && !str2);
+    return (!str1 && !str2) ? TRUE : FALSE;
 }
 
 bool
@@ -153,6 +178,62 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc)
   Curl_safefree(sslc->random_file);
 }
 
+
+/*
+ * Curl_rand() returns a random unsigned integer, 32bit.
+ *
+ * This non-SSL function is put here only because this file is the only one
+ * with knowledge of what the underlying SSL libraries provide in terms of
+ * randomizers.
+ *
+ * NOTE: 'data' may be passed in as NULL when coming from external API without
+ * easy handle!
+ *
+ */
+
+unsigned int Curl_rand(struct SessionHandle *data)
+{
+  unsigned int r;
+  static unsigned int randseed;
+  static bool seeded = FALSE;
+
+#ifndef have_curlssl_random
+  (void)data;
+#else
+  if(data) {
+    Curl_ssl_random(data, (unsigned char *)&r, sizeof(r));
+    return r;
+  }
+#endif
+
+#ifdef RANDOM_FILE
+  if(!seeded) {
+    /* if there's a random file to read a seed from, use it */
+    int fd = open(RANDOM_FILE, O_RDONLY);
+    if(fd > -1) {
+      /* read random data into the randseed variable */
+      ssize_t nread = read(fd, &randseed, sizeof(randseed));
+      if(nread == sizeof(randseed))
+        seeded = TRUE;
+      close(fd);
+    }
+  }
+#endif
+
+  if(!seeded) {
+    struct timeval now = curlx_tvnow();
+    randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec;
+    randseed = randseed * 1103515245 + 12345;
+    randseed = randseed * 1103515245 + 12345;
+    randseed = randseed * 1103515245 + 12345;
+    seeded = TRUE;
+  }
+
+  /* Return an unsigned 32-bit pseudo-random number. */
+  r = randseed = randseed * 1103515245 + 12345;
+  return (r << 16) | ((r >> 16) & 0xFFFF);
+}
+
 #ifdef USE_SSL
 
 /* "global" init done? */
@@ -205,19 +286,18 @@ CURLcode
 Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
                              bool *done)
 {
-#ifdef curlssl_connect_nonblocking
   CURLcode res;
   /* mark this is being ssl requested from here on. */
   conn->ssl[sockindex].use = TRUE;
+#ifdef curlssl_connect_nonblocking
   res = curlssl_connect_nonblocking(conn, sockindex, done);
-  if(!res && *done == TRUE)
-    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
-  return res;
 #else
   *done = TRUE; /* fallback to BLOCKING */
-  conn->ssl[sockindex].use = TRUE;
-  return curlssl_connect(conn, sockindex);
+  res = curlssl_connect(conn, sockindex);
 #endif /* non-blocking connect support */
+  if(!res && *done)
+    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+  return res;
 }
 
 /*
@@ -230,13 +310,25 @@ int Curl_ssl_getsessionid(struct connectdata *conn,
 {
   struct curl_ssl_session *check;
   struct SessionHandle *data = conn->data;
-  long i;
+  size_t i;
+  long *general_age;
+  bool no_match = TRUE;
+
+  *ssl_sessionid = NULL;
 
   if(!conn->ssl_config.sessionid)
     /* session ID re-use is disabled */
     return TRUE;
 
-  for(i=0; i< data->set.ssl.numsessions; i++) {
+  /* Lock if shared */
+  if(SSLSESSION_SHARED(data)) {
+    Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+    general_age = &data->share->sessionage;
+  }
+  else
+    general_age = &data->state.sessionage;
+
+  for(i = 0; i < data->set.ssl.max_ssl_sessions; i++) {
     check = &data->state.session[i];
     if(!check->sessionid)
       /* not session ID means blank entry */
@@ -245,22 +337,27 @@ int Curl_ssl_getsessionid(struct connectdata *conn,
        (conn->remote_port == check->remote_port) &&
        Curl_ssl_config_matches(&conn->ssl_config, &check->ssl_config)) {
       /* yes, we have a session ID! */
-      data->state.sessionage++;            /* increase general age */
-      check->age = data->state.sessionage; /* set this as used in this age */
+      (*general_age)++;          /* increase general age */
+      check->age = *general_age; /* set this as used in this age */
       *ssl_sessionid = check->sessionid;
       if(idsize)
         *idsize = check->idsize;
-      return FALSE;
+      no_match = FALSE;
+      break;
     }
   }
-  *ssl_sessionid = NULL;
-  return TRUE;
+
+  /* Unlock */
+  if(SSLSESSION_SHARED(data))
+    Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
+
+  return no_match;
 }
 
 /*
  * Kill a single session ID entry in the cache.
  */
-static int kill_session(struct curl_ssl_session *session)
+void Curl_ssl_kill_session(struct curl_ssl_session *session)
 {
   if(session->sessionid) {
     /* defensive check */
@@ -268,18 +365,13 @@ static int kill_session(struct curl_ssl_session *session)
     /* free the ID the SSL-layer specific way */
     curlssl_session_free(session->sessionid);
 
-    session->sessionid=NULL;
+    session->sessionid = NULL;
     session->age = 0; /* fresh */
 
     Curl_free_ssl_config(&session->ssl_config);
 
     Curl_safefree(session->name);
-    session->name = NULL; /* no name */
-
-    return 0; /* ok */
   }
-  else
-    return 1;
 }
 
 /*
@@ -287,15 +379,23 @@ static int kill_session(struct curl_ssl_session *session)
  */
 void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid)
 {
-  int i;
-  for(i=0; i< conn->data->set.ssl.numsessions; i++) {
-    struct curl_ssl_session *check = &conn->data->state.session[i];
+  size_t i;
+  struct SessionHandle *data=conn->data;
+
+  if(SSLSESSION_SHARED(data))
+    Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+
+  for(i = 0; i < data->set.ssl.max_ssl_sessions; i++) {
+    struct curl_ssl_session *check = &data->state.session[i];
 
-    if (check->sessionid == ssl_sessionid) {
-      kill_session(check);
+    if(check->sessionid == ssl_sessionid) {
+      Curl_ssl_kill_session(check);
       break;
     }
   }
+
+  if(SSLSESSION_SHARED(data))
+    Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
 }
 
 /*
@@ -308,11 +408,12 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
                                void *ssl_sessionid,
                                size_t idsize)
 {
-  long i;
+  size_t i;
   struct SessionHandle *data=conn->data; /* the mother of all structs */
   struct curl_ssl_session *store = &data->state.session[0];
   long oldest_age=data->state.session[0].age; /* zero if unused */
   char *clone_host;
+  long *general_age;
 
   /* Even though session ID re-use might be disabled, that only disables USING
      IT. We still store it here in case the re-using is again enabled for an
@@ -325,32 +426,49 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
   /* Now we should add the session ID and the host name to the cache, (remove
      the oldest if necessary) */
 
+  /* If using shared SSL session, lock! */
+  if(SSLSESSION_SHARED(data)) {
+    Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE);
+    general_age = &data->share->sessionage;
+  }
+  else {
+    general_age = &data->state.sessionage;
+  }
+
   /* find an empty slot for us, or find the oldest */
-  for(i=1; (i<data->set.ssl.numsessions) &&
+  for(i = 1; (i < data->set.ssl.max_ssl_sessions) &&
         data->state.session[i].sessionid; i++) {
     if(data->state.session[i].age < oldest_age) {
       oldest_age = data->state.session[i].age;
       store = &data->state.session[i];
     }
   }
-  if(i == data->set.ssl.numsessions)
+  if(i == data->set.ssl.max_ssl_sessions)
     /* cache is full, we must "kill" the oldest entry! */
-    kill_session(store);
+    Curl_ssl_kill_session(store);
   else
     store = &data->state.session[i]; /* use this slot */
 
   /* now init the session struct wisely */
   store->sessionid = ssl_sessionid;
   store->idsize = idsize;
-  store->age = data->state.sessionage;    /* set current age */
-  if (store->name)
+  store->age = *general_age;    /* set current age */
+  if(store->name)
     /* free it if there's one already present */
     free(store->name);
   store->name = clone_host;               /* clone host name */
   store->remote_port = conn->remote_port; /* port number */
 
-  if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config))
+
+  /* Unlock */
+  if(SSLSESSION_SHARED(data))
+    Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
+
+  if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config)) {
+    store->sessionid = NULL; /* let caller free sessionid */
+    free(clone_host);
     return CURLE_OUT_OF_MEMORY;
+  }
 
   return CURLE_OK;
 }
@@ -358,16 +476,15 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
 
 void Curl_ssl_close_all(struct SessionHandle *data)
 {
-  long i;
-  /* kill the session ID cache */
-  if(data->state.session) {
-    for(i=0; i< data->set.ssl.numsessions; i++)
+  size_t i;
+  /* kill the session ID cache if not shared */
+  if(data->state.session && !SSLSESSION_SHARED(data)) {
+    for(i = 0; i < data->set.ssl.max_ssl_sessions; i++)
       /* the single-killer function handles empty table slots */
-      kill_session(&data->state.session[i]);
+      Curl_ssl_kill_session(&data->state.session[i]);
 
     /* free the cache data */
-    free(data->state.session);
-    data->state.session = NULL;
+    Curl_safefree(data->state.session);
   }
 
   curlssl_close_all(data);
@@ -387,6 +504,9 @@ CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
   conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */
   conn->ssl[sockindex].state = ssl_connection_none;
 
+  conn->recv[sockindex] = Curl_recv_plain;
+  conn->send[sockindex] = Curl_send_plain;
+
   return CURLE_OK;
 }
 
@@ -414,7 +534,7 @@ struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
  * This sets up a session ID cache to the specified size. Make sure this code
  * is agnostic to what underlying SSL technology we use.
  */
-CURLcode Curl_ssl_initsessions(struct SessionHandle *data, long amount)
+CURLcode Curl_ssl_initsessions(struct SessionHandle *data, size_t amount)
 {
   struct curl_ssl_session *session;
 
@@ -427,7 +547,7 @@ CURLcode Curl_ssl_initsessions(struct SessionHandle *data, long amount)
     return CURLE_OUT_OF_MEMORY;
 
   /* store the info in the SSL section */
-  data->set.ssl.numsessions = amount;
+  data->set.ssl.max_ssl_sessions = amount;
   data->state.session = session;
   data->state.sessionage = 1; /* this is brand new */
   return CURLE_OK;
@@ -463,10 +583,94 @@ void Curl_ssl_free_certinfo(struct SessionHandle *data)
   struct curl_certinfo *ci = &data->info.certs;
   if(ci->num_of_certs) {
     /* free all individual lists used */
-    for(i=0; i<ci->num_of_certs; i++)
+    for(i=0; i<ci->num_of_certs; i++) {
       curl_slist_free_all(ci->certinfo[i]);
+      ci->certinfo[i] = NULL;
+    }
     free(ci->certinfo); /* free the actual array too */
+    ci->certinfo = NULL;
     ci->num_of_certs = 0;
   }
 }
+
+int Curl_ssl_init_certinfo(struct SessionHandle * data,
+                           int num)
+{
+  struct curl_certinfo * ci = &data->info.certs;
+  struct curl_slist * * table;
+
+  /* Initialize the certificate information structures. Return 0 if OK, else 1.
+   */
+  Curl_ssl_free_certinfo(data);
+  ci->num_of_certs = num;
+  table = calloc((size_t) num, sizeof(struct curl_slist *));
+  if(!table)
+    return 1;
+
+  ci->certinfo = table;
+  return 0;
+}
+
+CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle *data,
+                                    int certnum,
+                                    const char *label,
+                                    const char *value,
+                                    size_t valuelen)
+{
+  struct curl_certinfo * ci = &data->info.certs;
+  char * output;
+  struct curl_slist * nl;
+  CURLcode res = CURLE_OK;
+
+  /* Add an information record for a particular certificate. */
+  output = curl_maprintf("%s:%.*s", label, valuelen, value);
+  if(!output)
+    return CURLE_OUT_OF_MEMORY;
+
+  nl = Curl_slist_append_nodup(ci->certinfo[certnum], output);
+  if(!nl) {
+    free(output);
+    curl_slist_free_all(ci->certinfo[certnum]);
+    res = CURLE_OUT_OF_MEMORY;
+  }
+
+  ci->certinfo[certnum] = nl;
+  return res;
+}
+
+/*
+ * This is a convenience function for push_certinfo_len that takes a zero
+ * terminated value.
+ */
+CURLcode Curl_ssl_push_certinfo(struct SessionHandle *data,
+                                int certnum,
+                                const char *label,
+                                const char *value)
+{
+  size_t valuelen = strlen(value);
+
+  return Curl_ssl_push_certinfo_len(data, certnum, label, value, valuelen);
+}
+
+/* these functions are only provided by some SSL backends */
+
+#ifdef have_curlssl_random
+void Curl_ssl_random(struct SessionHandle *data,
+                     unsigned char *entropy,
+                     size_t length)
+{
+  curlssl_random(data, entropy, length);
+}
+#endif
+
+#ifdef have_curlssl_md5sum
+void Curl_ssl_md5sum(unsigned char *tmp, /* input */
+                     size_t tmplen,
+                     unsigned char *md5sum, /* output */
+                     size_t md5len)
+{
+  curlssl_md5sum(tmp, tmplen, md5sum, md5len);
+}
+#endif
+
 #endif /* USE_SSL */
index 997e30d..c7f5f00 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SSLGEN_H
-#define __SSLGEN_H
+#ifndef HEADER_CURL_SSLGEN_H
+#define HEADER_CURL_SSLGEN_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "curl_setup.h"
+
+#ifndef MD5_DIGEST_LENGTH
+#define MD5_DIGEST_LENGTH 16 /* fixed size */
+#endif
 
 bool Curl_ssl_config_matches(struct ssl_config_data* data,
                              struct ssl_config_data* needle);
@@ -28,6 +33,8 @@ bool Curl_clone_ssl_config(struct ssl_config_data* source,
                            struct ssl_config_data* dest);
 void Curl_free_ssl_config(struct ssl_config_data* sslc);
 
+unsigned int Curl_rand(struct SessionHandle *);
+
 #ifdef USE_SSL
 int Curl_ssl_init(void);
 void Curl_ssl_cleanup(void);
@@ -46,12 +53,21 @@ CURLcode Curl_ssl_set_engine_default(struct SessionHandle *data);
 struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data);
 
 /* init the SSL session ID cache */
-CURLcode Curl_ssl_initsessions(struct SessionHandle *, long);
+CURLcode Curl_ssl_initsessions(struct SessionHandle *, size_t);
 size_t Curl_ssl_version(char *buffer, size_t size);
 bool Curl_ssl_data_pending(const struct connectdata *conn,
                            int connindex);
 int Curl_ssl_check_cxn(struct connectdata *conn);
+
+/* Certificate information list handling. */
+
 void Curl_ssl_free_certinfo(struct SessionHandle *data);
+int Curl_ssl_init_certinfo(struct SessionHandle * data, int num);
+CURLcode Curl_ssl_push_certinfo_len(struct SessionHandle * data, int certnum,
+                                    const char * label, const char * value,
+                                    size_t valuelen);
+CURLcode Curl_ssl_push_certinfo(struct SessionHandle * data, int certnum,
+                                const char * label, const char * value);
 
 /* Functions to be used by SSL library adaptation functions */
 
@@ -63,21 +79,38 @@ int Curl_ssl_getsessionid(struct connectdata *conn,
 CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
                                void *ssl_sessionid,
                                size_t idsize);
+/* Kill a single session ID entry in the cache */
+void Curl_ssl_kill_session(struct curl_ssl_session *session);
 /* delete a session from the cache */
 void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid);
 
+/* get N random bytes into the buffer */
+void Curl_ssl_random(struct SessionHandle *data, unsigned char *buffer,
+                     size_t length);
+void Curl_ssl_md5sum(unsigned char *tmp, /* input */
+                     size_t tmplen,
+                     unsigned char *md5sum, /* output */
+                     size_t md5len);
+
 #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
 
+#ifdef have_curlssl_random
+#define HAVE_CURL_SSL_RANDOM
+#endif
+#ifdef have_curlssl_md5sum
+#define HAVE_CURL_SSL_MD5SUM
+#endif
+
 #else
 /* When SSL support is not present, just define away these function calls */
 #define Curl_ssl_init() 1
-#define Curl_ssl_cleanup() do { } while (0)
-#define Curl_ssl_connect(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_close_all(x)
-#define Curl_ssl_close(x,y)
-#define Curl_ssl_shutdown(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_set_engine(x,y) CURLE_FAILED_INIT
-#define Curl_ssl_set_engine_default(x) CURLE_FAILED_INIT
+#define Curl_ssl_cleanup() Curl_nop_stmt
+#define Curl_ssl_connect(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_close_all(x) Curl_nop_stmt
+#define Curl_ssl_close(x,y) Curl_nop_stmt
+#define Curl_ssl_shutdown(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_set_engine(x,y) CURLE_NOT_BUILT_IN
+#define Curl_ssl_set_engine_default(x) CURLE_NOT_BUILT_IN
 #define Curl_ssl_engines_list(x) NULL
 #define Curl_ssl_send(a,b,c,d,e) -1
 #define Curl_ssl_recv(a,b,c,d,e) -1
@@ -85,8 +118,9 @@ void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid);
 #define Curl_ssl_version(x,y) 0
 #define Curl_ssl_data_pending(x,y) 0
 #define Curl_ssl_check_cxn(x) 0
-#define Curl_ssl_free_certinfo(x)
-
+#define Curl_ssl_free_certinfo(x) Curl_nop_stmt
+#define Curl_ssl_connect_nonblocking(x,y,z) CURLE_NOT_BUILT_IN
+#define Curl_ssl_kill_session(x) Curl_nop_stmt
 #endif
 
-#endif /* USE_SSL */
+#endif /* HEADER_CURL_SSLGEN_H */
index d8f7760..69328f6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * Sampo Kellomaki 1998.
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 
 #include "urldata.h"
 #include "sendf.h"
 #include "inet_pton.h"
 #include "ssluse.h"
 #include "connect.h"
+#include "slist.h"
 #include "strequal.h"
 #include "select.h"
 #include "sslgen.h"
 #include "rawstr.h"
+#include "hostcheck.h"
 
 #define _MPRINTF_REPLACE /* use the internal *printf() functions */
 #include <curl/mprintf.h>
 #include <openssl/dsa.h>
 #include <openssl/dh.h>
 #include <openssl/err.h>
+#include <openssl/md5.h>
 #else
 #include <rand.h>
 #include <x509v3.h>
+#include <md5.h>
 #endif
 
+#include "warnless.h"
 #include "curl_memory.h"
-#include "easyif.h" /* for Curl_convert_from_utf8 prototype */
+#include "non-ascii.h" /* for Curl_convert_from_utf8 prototype */
 
 /* The last #include file should be: */
 #include "memdebug.h"
 
+#ifndef OPENSSL_VERSION_NUMBER
+#error "OPENSSL_VERSION_NUMBER not defined"
+#endif
+
 #if OPENSSL_VERSION_NUMBER >= 0x0090581fL
 #define HAVE_SSL_GET1_SESSION 1
 #else
 /* 0.9.6 didn't have X509_STORE_set_flags() */
 #define HAVE_X509_STORE_SET_FLAGS 1
 #else
-#define X509_STORE_set_flags(x,y)
+#define X509_STORE_set_flags(x,y) Curl_nop_stmt
+#endif
+
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define HAVE_ERR_REMOVE_THREAD_STATE 1
+#endif
+
+#ifndef HAVE_SSLV2_CLIENT_METHOD
+#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */
+#define OPENSSL_NO_SSL2
 #endif
 
 /*
 static char global_passwd[64];
 #endif
 
-static int passwd_callback(char *buf, int num, int verify
+static int passwd_callback(char *buf, int num, int encrypting
 #ifdef HAVE_USERDATA_IN_PWD_CALLBACK
                            /* This was introduced in 0.9.4, we can set this
                               using SSL_CTX_set_default_passwd_cb_userdata()
@@ -143,12 +155,13 @@ static int passwd_callback(char *buf, int num, int verify
 #endif
                            )
 {
-  if(verify)
-    fprintf(stderr, "%s\n", buf);
-  else {
-    if(num > (int)strlen((char *)global_passwd)) {
-      strcpy(buf, global_passwd);
-      return (int)strlen(buf);
+  DEBUGASSERT(0 == encrypting);
+
+  if(!encrypting) {
+    int klen = curlx_uztosi(strlen((char *)global_passwd));
+    if(num > klen) {
+      memcpy(buf, global_passwd, klen+1);
+      return klen;
     }
   }
   return 0;
@@ -165,14 +178,14 @@ static int passwd_callback(char *buf, int num, int verify
 #define seed_enough(x) rand_enough()
 static bool rand_enough(void)
 {
-  return (bool)(0 != RAND_status());
+  return (0 != RAND_status()) ? TRUE : FALSE;
 }
 #else
 #define seed_enough(x) rand_enough(x)
 static bool rand_enough(int nread)
 {
   /* this is a very silly decision to make */
-  return (bool)(nread > 500);
+  return (nread > 500) ? TRUE : FALSE;
 }
 #endif
 
@@ -224,32 +237,12 @@ static int ossl_seed(struct SessionHandle *data)
 
   /* If we get here, it means we need to seed the PRNG using a "silly"
      approach! */
-#ifdef HAVE_RAND_SCREEN
-  /* if RAND_screen() is present, it was called during global init */
-  nread = 100; /* just a value */
-#else
-  {
-    int len;
-    char *area;
-
-    /* Changed call to RAND_seed to use the underlying RAND_add implementation
-     * directly.  Do this in a loop, with the amount of additional entropy
-     * being dependent upon the algorithm used by Curl_FormBoundary(): N bytes
-     * of a 7-bit ascii set. -- Richard Gorton, March 11 2003.
-     */
-
-    do {
-      area = Curl_FormBoundary();
-      if(!area)
-        return 3; /* out of memory */
-
-      len = (int)strlen(area);
-      RAND_add(area, len, (len >> 1));
-
-      free(area); /* now remove the random junk */
-    } while(!RAND_status());
-  }
-#endif
+  do {
+    unsigned char randb[64];
+    int len = sizeof(randb);
+    RAND_bytes(randb, len);
+    RAND_add(randb, len, (len >> 1));
+  } while(!RAND_status());
 
   /* generates a default path for the random seed file */
   buf[0]=0; /* blank it first */
@@ -324,9 +317,11 @@ int cert_stuff(struct connectdata *conn,
        * If password has been given, we store that in the global
        * area (*shudder*) for a while:
        */
-      size_t len = strlen(data->set.key_passwd);
+      size_t len = strlen(data->set.str[STRING_KEY_PASSWD]);
       if(len < sizeof(global_passwd))
-        memcpy(global_passwd, data->set.key_passwd, len+1);
+        memcpy(global_passwd, data->set.str[STRING_KEY_PASSWD], len+1);
+      else
+        global_passwd[0] = '\0';
 #else
       /*
        * We set the password in the callback userdata
@@ -377,22 +372,22 @@ int cert_stuff(struct connectdata *conn,
           params.cert = NULL;
 
           /* Does the engine supports LOAD_CERT_CTRL ? */
-          if (!ENGINE_ctrl(data->state.engine, ENGINE_CTRL_GET_CMD_FROM_NAME,
-                           0, (void *)cmd_name, NULL)) {
+          if(!ENGINE_ctrl(data->state.engine, ENGINE_CTRL_GET_CMD_FROM_NAME,
+                          0, (void *)cmd_name, NULL)) {
             failf(data, "ssl engine does not support loading certificates");
             return 0;
           }
 
           /* Load the certificate from the engine */
-          if (!ENGINE_ctrl_cmd(data->state.engine, cmd_name,
-                               0, &params, NULL, 1)) {
+          if(!ENGINE_ctrl_cmd(data->state.engine, cmd_name,
+                              0, &params, NULL, 1)) {
             failf(data, "ssl engine cannot load client cert with id"
                   " '%s' [%s]", cert_file,
                   ERR_error_string(ERR_get_error(), NULL));
             return 0;
           }
 
-          if (!params.cert) {
+          if(!params.cert) {
             failf(data, "ssl engine didn't initialized the certificate "
                   "properly.");
             return 0;
@@ -441,7 +436,7 @@ int cert_stuff(struct connectdata *conn,
       PKCS12_PBE_add();
 
       if(!PKCS12_parse(p12, data->set.str[STRING_KEY_PASSWD], &pri, &x509,
-                        &ca)) {
+                       &ca)) {
         failf(data,
               "could not parse PKCS12 file, check password, OpenSSL error %s",
               ERR_error_string(ERR_get_error(), NULL) );
@@ -453,48 +448,53 @@ int cert_stuff(struct connectdata *conn,
 
       if(SSL_CTX_use_certificate(ctx, x509) != 1) {
         failf(data, SSL_CLIENT_CERT_ERR);
-        EVP_PKEY_free(pri);
-        X509_free(x509);
-        return 0;
+        goto fail;
       }
 
       if(SSL_CTX_use_PrivateKey(ctx, pri) != 1) {
         failf(data, "unable to use private key from PKCS12 file '%s'",
               cert_file);
-        EVP_PKEY_free(pri);
-        X509_free(x509);
-        return 0;
+        goto fail;
       }
 
-      if (!SSL_CTX_check_private_key (ctx)) {
+      if(!SSL_CTX_check_private_key (ctx)) {
         failf(data, "private key from PKCS12 file '%s' "
               "does not match certificate in same file", cert_file);
-        EVP_PKEY_free(pri);
-        X509_free(x509);
-        return 0;
+        goto fail;
       }
       /* Set Certificate Verification chain */
-      if (ca && sk_X509_num(ca)) {
-        for (i = 0; i < sk_X509_num(ca); i++) {
-          if (!SSL_CTX_add_extra_chain_cert(ctx,sk_X509_value(ca, i))) {
+      if(ca && sk_X509_num(ca)) {
+        for(i = 0; i < sk_X509_num(ca); i++) {
+          /*
+           * Note that sk_X509_pop() is used below to make sure the cert is
+           * removed from the stack properly before getting passed to
+           * SSL_CTX_add_extra_chain_cert(). Previously we used
+           * sk_X509_value() instead, but then we'd clean it in the subsequent
+           * sk_X509_pop_free() call.
+           */
+          X509 *x = sk_X509_pop(ca);
+          if(!SSL_CTX_add_extra_chain_cert(ctx, x)) {
             failf(data, "cannot add certificate to certificate chain");
-            EVP_PKEY_free(pri);
-            X509_free(x509);
-            return 0;
+            goto fail;
           }
-          if (!SSL_CTX_add_client_CA(ctx, sk_X509_value(ca, i))) {
+          /* SSL_CTX_add_client_CA() seems to work with either sk_* function,
+           * presumably because it duplicates what we pass to it.
+           */
+          if(!SSL_CTX_add_client_CA(ctx, x)) {
             failf(data, "cannot add certificate to client CA list");
-            EVP_PKEY_free(pri);
-            X509_free(x509);
-            return 0;
+            goto fail;
           }
         }
       }
 
+      cert_done = 1;
+  fail:
       EVP_PKEY_free(pri);
       X509_free(x509);
-      cert_done = 1;
-      break;
+      sk_X509_pop_free(ca, X509_free);
+
+      if(!cert_done)
+        return 0; /* failure! */
 #else
       failf(data, "file type P12 for certificate not supported");
       return 0;
@@ -685,13 +685,6 @@ int Curl_ossl_init(void)
 
   OpenSSL_add_all_algorithms();
 
-#ifdef HAVE_RAND_SCREEN
-  /* This one gets a random value by reading the currently shown screen.
-     RAND_screen() is not thread-safe according to OpenSSL devs - although not
-     mentioned in documentation. */
-  RAND_screen();
-#endif
-
   return 1;
 }
 
@@ -702,21 +695,28 @@ int Curl_ossl_init(void)
 /* Global cleanup */
 void Curl_ossl_cleanup(void)
 {
-  /* Free the SSL error strings */
-  ERR_free_strings();
-
-  /* EVP_cleanup() removes all ciphers and digests from the table. */
+  /* Free ciphers and digests lists */
   EVP_cleanup();
 
 #ifdef HAVE_ENGINE_CLEANUP
+  /* Free engine list */
   ENGINE_cleanup();
 #endif
 
 #ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
-  /* this function was not present in 0.9.6b, but was added sometimes
-     later */
+  /* Free OpenSSL ex_data table */
   CRYPTO_cleanup_all_ex_data();
 #endif
+
+  /* Free OpenSSL error strings */
+  ERR_free_strings();
+
+  /* Free thread local error state, destroying hash upon zero refcount */
+#ifdef HAVE_ERR_REMOVE_THREAD_STATE
+  ERR_remove_thread_state(NULL);
+#else
+  ERR_remove_state(0);
+#endif
 }
 
 /*
@@ -794,10 +794,12 @@ CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data)
 #ifdef HAVE_OPENSSL_ENGINE_H
   if(data->state.engine) {
     if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
-      infof(data,"set default crypto engine '%s'\n", ENGINE_get_id(data->state.engine));
+      infof(data,"set default crypto engine '%s'\n",
+            ENGINE_get_id(data->state.engine));
     }
     else {
-      failf(data, "set default crypto engine '%s' failed", ENGINE_get_id(data->state.engine));
+      failf(data, "set default crypto engine '%s' failed",
+            ENGINE_get_id(data->state.engine));
       return CURLE_SSL_ENGINE_SETFAILED;
     }
   }
@@ -813,18 +815,16 @@ struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data)
 {
   struct curl_slist *list = NULL;
 #if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
-  struct curl_slist *beg = NULL;
+  struct curl_slist *beg;
   ENGINE *e;
 
-  for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
-    list = curl_slist_append(list, ENGINE_get_id(e));
-    if(list == NULL) {
-      curl_slist_free_all(beg);
+  for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) {
+    beg = curl_slist_append(list, ENGINE_get_id(e));
+    if(!beg) {
+      curl_slist_free_all(list);
       return NULL;
     }
-    else if(beg == NULL) {
-      beg = list;
-    }
+    list = beg;
   }
 #endif
   (void) data;
@@ -881,7 +881,7 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex)
     buffsize = (int)sizeof(buf);
     while(!done) {
       int what = Curl_socket_ready(conn->sock[sockindex],
-                             CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
+                                   CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
       if(what > 0) {
         ERR_clear_error();
 
@@ -965,17 +965,6 @@ void Curl_ossl_session_free(void *ptr)
  */
 int Curl_ossl_close_all(struct SessionHandle *data)
 {
-  /*
-    ERR_remove_state() frees the error queue associated with
-    thread pid.  If pid == 0, the current thread will have its
-    error queue removed.
-
-    Since error queue data structures are allocated
-    automatically for new threads, they must be freed when
-    threads are terminated in oder to avoid memory leaks.
-  */
-  ERR_remove_state(0);
-
 #ifdef HAVE_OPENSSL_ENGINE_H
   if(data->state.engine) {
     ENGINE_finish(data->state.engine);
@@ -1004,7 +993,7 @@ static int asn1_output(const ASN1_UTCTIME *tm,
     return 1;
   if(asn1_string[i-1] == 'Z')
     gmt=TRUE;
-  for (i=0; i<10; i++)
+  for(i=0; i<10; i++)
     if((asn1_string[i] > '9') || (asn1_string[i] < '0'))
       return 2;
 
@@ -1033,61 +1022,6 @@ static int asn1_output(const ASN1_UTCTIME *tm,
 
 /* ====================================================== */
 
-/*
- * Match a hostname against a wildcard pattern.
- * E.g.
- *  "foo.host.com" matches "*.host.com".
- *
- * We are a bit more liberal than RFC2818 describes in that we
- * accept multiple "*" in pattern (similar to what some other browsers do).
- * E.g.
- *  "abc.def.domain.com" should strickly not match "*.domain.com", but we
- *  don't consider "." to be important in CERT checking.
- */
-#define HOST_NOMATCH 0
-#define HOST_MATCH   1
-
-static int hostmatch(const char *hostname, const char *pattern)
-{
-  for(;;) {
-    char c = *pattern++;
-
-    if(c == '\0')
-      return (*hostname ? HOST_NOMATCH : HOST_MATCH);
-
-    if(c == '*') {
-      c = *pattern;
-      if(c == '\0')      /* "*\0" matches anything remaining */
-        return HOST_MATCH;
-
-      while(*hostname) {
-        /* The only recursive function in libcurl! */
-        if(hostmatch(hostname++,pattern) == HOST_MATCH)
-          return HOST_MATCH;
-      }
-      break;
-    }
-
-    if(Curl_raw_toupper(c) != Curl_raw_toupper(*hostname++))
-      break;
-  }
-  return HOST_NOMATCH;
-}
-
-static int
-cert_hostcheck(const char *match_pattern, const char *hostname)
-{
-  if(!match_pattern || !*match_pattern ||
-      !hostname || !*hostname) /* sanity check */
-    return 0;
-
-  if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
-    return 1;
-
-  if(hostmatch(hostname,match_pattern) == HOST_MATCH)
-    return 1;
-  return 0;
-}
 
 /* Quote from RFC2818 section 3.1 "Server Identity"
 
@@ -1151,7 +1085,7 @@ static CURLcode verifyhost(struct connectdata *conn,
     numalts = sk_GENERAL_NAME_num(altnames);
 
     /* loop through all alternatives while none has matched */
-    for (i=0; (i<numalts) && (matched != 1); i++) {
+    for(i=0; (i<numalts) && (matched != 1); i++) {
       /* get a handle to alternative name number i */
       const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i);
 
@@ -1176,7 +1110,7 @@ static CURLcode verifyhost(struct connectdata *conn,
           if((altlen == strlen(altptr)) &&
              /* if this isn't true, there was an embedded zero in the name
                 string and we cannot match it. */
-             cert_hostcheck(altptr, conn->host.name))
+             Curl_cert_hostcheck(altptr, conn->host.name))
             matched = 1;
           else
             matched = 0;
@@ -1206,7 +1140,7 @@ static CURLcode verifyhost(struct connectdata *conn,
     res = CURLE_PEER_FAILED_VERIFICATION;
   }
   else {
-    /* we have to look to the last occurence of a commonName in the
+    /* we have to look to the last occurrence of a commonName in the
        distinguished one to get the most significant one. */
     int j,i=-1 ;
 
@@ -1246,7 +1180,7 @@ static CURLcode verifyhost(struct connectdata *conn,
         else /* not a UTF8 name */
           j = ASN1_STRING_to_UTF8(&peer_CN, tmp);
 
-        if(peer_CN && ((int)strlen((char *)peer_CN) != j)) {
+        if(peer_CN && (curlx_uztosi(strlen((char *)peer_CN)) != j)) {
           /* there was a terminating zero before the end of string, this
              cannot match and we return failure! */
           failf(data, "SSL: illegal cert name field");
@@ -1257,18 +1191,15 @@ static CURLcode verifyhost(struct connectdata *conn,
 
     if(peer_CN == nulstr)
        peer_CN = NULL;
-#ifdef CURL_DOES_CONVERSIONS
     else {
       /* convert peer_CN from UTF8 */
-      size_t rc;
-      rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
+      CURLcode rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
       /* Curl_convert_from_utf8 calls failf if unsuccessful */
-      if(rc != CURLE_OK) {
+      if(rc) {
         OPENSSL_free(peer_CN);
         return rc;
       }
     }
-#endif /* CURL_DOES_CONVERSIONS */
 
     if(res)
       /* error already detected, pass through */
@@ -1278,15 +1209,10 @@ static CURLcode verifyhost(struct connectdata *conn,
             "SSL: unable to obtain common name from peer certificate");
       res = CURLE_PEER_FAILED_VERIFICATION;
     }
-    else if(!cert_hostcheck((const char *)peer_CN, conn->host.name)) {
-      if(data->set.ssl.verifyhost > 1) {
-        failf(data, "SSL: certificate subject name '%s' does not match "
-              "target host name '%s'", peer_CN, conn->host.dispname);
-        res = CURLE_PEER_FAILED_VERIFICATION;
-      }
-      else
-        infof(data, "\t common name: %s (does not match '%s')\n",
-              peer_CN, conn->host.dispname);
+    else if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) {
+      failf(data, "SSL: certificate subject name '%s' does not match "
+            "target host name '%s'", peer_CN, conn->host.dispname);
+      res = CURLE_PEER_FAILED_VERIFICATION;
     }
     else {
       infof(data, "\t common name: %s (matched)\n", peer_CN);
@@ -1413,7 +1339,7 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
 #  define use_sni(x)  sni = (x)
 #else
-#  define use_sni(x)  do { } while (0)
+#  define use_sni(x)  Curl_nop_stmt
 #endif
 
 static CURLcode
@@ -1428,6 +1354,7 @@ ossl_connect_step1(struct connectdata *conn,
   X509_LOOKUP *lookup=NULL;
   curl_socket_t sockfd = conn->sock[sockindex];
   struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+  long ctx_options;
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
   bool sni;
 #ifdef ENABLE_IPV6
@@ -1443,9 +1370,17 @@ ossl_connect_step1(struct connectdata *conn,
   Curl_ossl_seed(data);
 
   /* check to see if we've been told to use an explicit SSL/TLS version */
+
   switch(data->set.ssl.version) {
   default:
   case CURL_SSLVERSION_DEFAULT:
+#ifdef USE_TLS_SRP
+    if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+      infof(data, "Set version TLSv1 for SRP authorisation\n");
+      req_method = TLSv1_client_method() ;
+    }
+    else
+#endif
     /* we try to figure out version */
     req_method = SSLv23_client_method();
     use_sni(TRUE);
@@ -1455,10 +1390,23 @@ ossl_connect_step1(struct connectdata *conn,
     use_sni(TRUE);
     break;
   case CURL_SSLVERSION_SSLv2:
+#ifdef OPENSSL_NO_SSL2
+    failf(data, "OpenSSL was built without SSLv2 support");
+    return CURLE_NOT_BUILT_IN;
+#else
+#ifdef USE_TLS_SRP
+    if(data->set.ssl.authtype == CURL_TLSAUTH_SRP)
+      return CURLE_SSL_CONNECT_ERROR;
+#endif
     req_method = SSLv2_client_method();
     use_sni(FALSE);
     break;
+#endif
   case CURL_SSLVERSION_SSLv3:
+#ifdef USE_TLS_SRP
+    if(data->set.ssl.authtype == CURL_TLSAUTH_SRP)
+      return CURLE_SSL_CONNECT_ERROR;
+#endif
     req_method = SSLv3_client_method();
     use_sni(FALSE);
     break;
@@ -1469,10 +1417,15 @@ ossl_connect_step1(struct connectdata *conn,
   connssl->ctx = SSL_CTX_new(req_method);
 
   if(!connssl->ctx) {
-    failf(data, "SSL: couldn't create a context!");
+    failf(data, "SSL: couldn't create a context: %s",
+          ERR_error_string(ERR_peek_error(), NULL));
     return CURLE_OUT_OF_MEMORY;
   }
 
+#ifdef SSL_MODE_RELEASE_BUFFERS
+  SSL_CTX_set_mode(connssl->ctx, SSL_MODE_RELEASE_BUFFERS);
+#endif
+
 #ifdef SSL_CTRL_SET_MSG_CALLBACK
   if(data->set.fdebug && data->set.verbose) {
     /* the SSL trace callback is only used for verbose logging so we only
@@ -1507,30 +1460,50 @@ ossl_connect_step1(struct connectdata *conn,
      If someone writes an application with libcurl and openssl who wants to
      enable the feature, one can do this in the SSL callback.
 
+     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
+     interoperability with web server Netscape Enterprise Server 2.0.1 which
+     was released back in 1996.
+
+     Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
+     become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
+     CVE-2010-4180 when using previous OpenSSL versions we no longer enable
+     this option regardless of OpenSSL version and SSL_OP_ALL definition.
+
+     OpenSSL added a work-around for a SSL 3.0/TLS 1.0 CBC vulnerability
+     (http://www.openssl.org/~bodo/tls-cbc.txt). In 0.9.6e they added a bit to
+     SSL_OP_ALL that _disables_ that work-around despite the fact that
+     SSL_OP_ALL is documented to do "rather harmless" workarounds. In order to
+     keep the secure work-around, the SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit
+     must not be set.
   */
+
+  ctx_options = SSL_OP_ALL;
+
 #ifdef SSL_OP_NO_TICKET
-  /* expect older openssl releases to not have this define so only use it if
-     present */
-#define CURL_CTX_OPTIONS SSL_OP_ALL|SSL_OP_NO_TICKET
-#else
-#define CURL_CTX_OPTIONS SSL_OP_ALL
+  ctx_options |= SSL_OP_NO_TICKET;
 #endif
 
-  SSL_CTX_set_options(connssl->ctx, CURL_CTX_OPTIONS);
+#ifdef SSL_OP_NO_COMPRESSION
+  ctx_options |= SSL_OP_NO_COMPRESSION;
+#endif
+
+#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
+  /* mitigate CVE-2010-4180 */
+  ctx_options &= ~SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
+#endif
+
+#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
+  /* unless the user explicitly ask to allow the protocol vulnerability we
+     use the work-around */
+  if(!conn->data->set.ssl_enable_beast)
+    ctx_options &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
+#endif
 
   /* disable SSLv2 in the default case (i.e. allow SSLv3 and TLSv1) */
   if(data->set.ssl.version == CURL_SSLVERSION_DEFAULT)
-    SSL_CTX_set_options(connssl->ctx, SSL_OP_NO_SSLv2);
+    ctx_options |= SSL_OP_NO_SSLv2;
 
-#if 0
-  /*
-   * Not sure it's needed to tell SSL_connect() that socket is
-   * non-blocking. It doesn't seem to care, but just return with
-   * SSL_ERROR_WANT_x.
-   */
-  if(data->state.used_interface == Curl_if_multi)
-    SSL_CTX_ctrl(connssl->ctx, BIO_C_SET_NBIO, 1, NULL);
-#endif
+  SSL_CTX_set_options(connssl->ctx, ctx_options);
 
   if(data->set.str[STRING_CERT] || data->set.str[STRING_CERT_TYPE]) {
     if(!cert_stuff(conn,
@@ -1552,6 +1525,28 @@ ossl_connect_step1(struct connectdata *conn,
     }
   }
 
+#ifdef USE_TLS_SRP
+  if(data->set.ssl.authtype == CURL_TLSAUTH_SRP) {
+    infof(data, "Using TLS-SRP username: %s\n", data->set.ssl.username);
+
+    if(!SSL_CTX_set_srp_username(connssl->ctx, data->set.ssl.username)) {
+      failf(data, "Unable to set SRP user name");
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    }
+    if(!SSL_CTX_set_srp_password(connssl->ctx,data->set.ssl.password)) {
+      failf(data, "failed setting SRP password");
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    }
+    if(!data->set.str[STRING_SSL_CIPHER_LIST]) {
+      infof(data, "Setting cipher list SRP\n");
+
+      if(!SSL_CTX_set_cipher_list(connssl->ctx, "SRP")) {
+        failf(data, "failed setting SRP cipher list");
+        return CURLE_SSL_CIPHER;
+      }
+    }
+  }
+#endif
   if(data->set.str[STRING_SSL_CAFILE] || data->set.str[STRING_SSL_CAPATH]) {
     /* tell SSL where to find CA certificates that are used to verify
        the servers certificate. */
@@ -1561,7 +1556,7 @@ ossl_connect_step1(struct connectdata *conn,
       if(data->set.ssl.verifypeer) {
         /* Fail if we insist on successfully verifying the server. */
         failf(data,"error setting certificate verify locations:\n"
-              "  CAfile: %s\n  CApath: %s\n",
+              "  CAfile: %s\n  CApath: %s",
               data->set.str[STRING_SSL_CAFILE]?
               data->set.str[STRING_SSL_CAFILE]: "none",
               data->set.str[STRING_SSL_CAPATH]?
@@ -1588,21 +1583,22 @@ ossl_connect_step1(struct connectdata *conn,
           "none");
   }
 
-  if (data->set.str[STRING_SSL_CRLFILE]) {
+  if(data->set.str[STRING_SSL_CRLFILE]) {
     /* tell SSL where to find CRL file that is used to check certificate
      * revocation */
-    lookup=X509_STORE_add_lookup(connssl->ctx->cert_store,X509_LOOKUP_file());
-    if ( !lookup ||
-         (!X509_load_crl_file(lookup,data->set.str[STRING_SSL_CRLFILE],
-                              X509_FILETYPE_PEM)) ) {
-      failf(data,"error loading CRL file: %s\n",
+    lookup=X509_STORE_add_lookup(SSL_CTX_get_cert_store(connssl->ctx),
+                                 X509_LOOKUP_file());
+    if(!lookup ||
+       (!X509_load_crl_file(lookup,data->set.str[STRING_SSL_CRLFILE],
+                            X509_FILETYPE_PEM)) ) {
+      failf(data,"error loading CRL file: %s",
             data->set.str[STRING_SSL_CRLFILE]);
       return CURLE_SSL_CRL_BADFILE;
     }
     else {
       /* Everything is fine. */
       infof(data, "successfully load CRL file:\n");
-      X509_STORE_set_flags(connssl->ctx->cert_store,
+      X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx),
                            X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL);
     }
     infof(data,
@@ -1641,12 +1637,12 @@ ossl_connect_step1(struct connectdata *conn,
   connssl->server_cert = 0x0;
 
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
-  if ((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
+  if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) &&
 #ifdef ENABLE_IPV6
-      (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
+     (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) &&
 #endif
-      sni &&
-      !SSL_set_tlsext_host_name(connssl->handle, conn->host.name))
+     sni &&
+     !SSL_set_tlsext_host_name(connssl->handle, conn->host.name))
     infof(data, "WARNING: failed to configure server name indication (SNI) "
           "TLS extension\n");
 #endif
@@ -1665,9 +1661,9 @@ ossl_connect_step1(struct connectdata *conn,
 
   /* pass the raw socket into the SSL layers */
   if(!SSL_set_fd(connssl->handle, (int)sockfd)) {
-     failf(data, "SSL: SSL_set_fd failed: %s",
-           ERR_error_string(ERR_get_error(),NULL));
-     return CURLE_SSL_CONNECT_ERROR;
+    failf(data, "SSL: SSL_set_fd failed: %s",
+          ERR_error_string(ERR_get_error(),NULL));
+    return CURLE_SSL_CONNECT_ERROR;
   }
 
   connssl->connecting_state = ssl_connect_2;
@@ -1710,6 +1706,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex)
                                  256 bytes long. */
       CURLcode rc;
       const char *cert_problem = NULL;
+      long lerr;
 
       connssl->connecting_state = ssl_connect_2; /* the connection failed,
                                                     we're not waiting for
@@ -1731,12 +1728,22 @@ ossl_connect_step2(struct connectdata *conn, int sockindex)
            SSL routines:
            SSL3_GET_SERVER_CERTIFICATE:
            certificate verify failed */
-        cert_problem = "SSL certificate problem, verify that the CA cert is"
-          " OK. Details:\n";
         rc = CURLE_SSL_CACERT;
+
+        lerr = SSL_get_verify_result(connssl->handle);
+        if(lerr != X509_V_OK) {
+          snprintf(error_buffer, sizeof(error_buffer),
+                   "SSL certificate problem: %s",
+                   X509_verify_cert_error_string(lerr));
+        }
+        else
+          cert_problem = "SSL certificate problem, verify that the CA cert is"
+            " OK.";
+
         break;
       default:
         rc = CURLE_SSL_CONNECT_ERROR;
+        SSL_strerror(errdetail, error_buffer, sizeof(error_buffer));
         break;
       }
 
@@ -1753,7 +1760,6 @@ ossl_connect_step2(struct connectdata *conn, int sockindex)
       }
       /* Could be a CERT problem */
 
-      SSL_strerror(errdetail, error_buffer, sizeof(error_buffer));
       failf(data, "%s%s", cert_problem ? cert_problem : "", error_buffer);
       return rc;
     }
@@ -1785,60 +1791,6 @@ static int asn1_object_dump(ASN1_OBJECT *a, char *buf, size_t len)
   return 0;
 }
 
-static CURLcode push_certinfo_len(struct SessionHandle *data,
-                                  int certnum,
-                                  const char *label,
-                                  const char *value,
-                                  size_t valuelen)
-{
-  struct curl_certinfo *ci = &data->info.certs;
-  char *output;
-  struct curl_slist *nl;
-  CURLcode res = CURLE_OK;
-  size_t labellen = strlen(label);
-  size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */
-
-  output = malloc(outlen);
-  if(!output)
-    return CURLE_OUT_OF_MEMORY;
-
-  /* sprintf the label and colon */
-  snprintf(output, outlen, "%s:", label);
-
-  /* memcpy the value (it might not be zero terminated) */
-  memcpy(&output[labellen+1], value, valuelen);
-
-  /* zero terminate the output */
-  output[labellen + 1 + valuelen] = 0;
-
-  /* TODO: we should rather introduce an internal API that can do the
-     equivalent of curl_slist_append but doesn't strdup() the given data as
-     like in this place the extra malloc/free is totally pointless */
-  nl = curl_slist_append(ci->certinfo[certnum], output);
-  if(!nl) {
-    curl_slist_free_all(ci->certinfo[certnum]);
-    res = CURLE_OUT_OF_MEMORY;
-  }
-  else
-    ci->certinfo[certnum] = nl;
-
-  free(output);
-
-  return res;
-}
-
-/* this is a convenience function for push_certinfo_len that takes a zero
-   terminated value */
-static CURLcode push_certinfo(struct SessionHandle *data,
-                              int certnum,
-                              const char *label,
-                              const char *value)
-{
-  size_t valuelen = strlen(value);
-
-  return push_certinfo_len(data, certnum, label, value, valuelen);
-}
-
 static void pubkey_show(struct SessionHandle *data,
                         int num,
                         const char *type,
@@ -1846,34 +1798,38 @@ static void pubkey_show(struct SessionHandle *data,
                         unsigned char *raw,
                         int len)
 {
-  char buffer[1024];
-  size_t left = sizeof(buffer);
+  size_t left;
   int i;
-  char *ptr=buffer;
   char namebuf[32];
-
-  snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name);
-
-  for(i=0; i< len; i++) {
-    snprintf(ptr, left, "%02x:", raw[i]);
-    ptr += 3;
-    left -= 3;
+  char *buffer;
+
+  left = len*3 + 1;
+  buffer = malloc(left);
+  if(buffer) {
+    char *ptr=buffer;
+    snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name);
+    for(i=0; i< len; i++) {
+      snprintf(ptr, left, "%02x:", raw[i]);
+      ptr += 3;
+      left -= 3;
+    }
+    infof(data, "   %s: %s\n", namebuf, buffer);
+    Curl_ssl_push_certinfo(data, num, namebuf, buffer);
+    free(buffer);
   }
-  infof(data, "   %s: %s\n", namebuf, buffer);
-  push_certinfo(data, num, namebuf, buffer);
 }
 
 #define print_pubkey_BN(_type, _name, _num)    \
 do {                              \
-  if (pubkey->pkey._type->_name != NULL) { \
-    int len = BN_num_bytes(pubkey->pkey._type->_name); \
-    if(len < (int)sizeof(buf)) {                       \
-      BN_bn2bin(pubkey->pkey._type->_name, (unsigned char*)buf); \
-      buf[len] = 0; \
-      pubkey_show(data, _num, #_type, #_name, (unsigned char*)buf, len); \
+  if(pubkey->pkey._type->_name != NULL) { \
+    int len = BN_num_bytes(pubkey->pkey._type->_name);  \
+    if(len < CERTBUFFERSIZE) {                                    \
+      BN_bn2bin(pubkey->pkey._type->_name, (unsigned char*)bufp); \
+      bufp[len] = 0;                                                    \
+      pubkey_show(data, _num, #_type, #_name, (unsigned char*)bufp, len); \
     } \
   } \
-} while (0)
+} WHILE_FALSE
 
 static int X509V3_ext(struct SessionHandle *data,
                       int certnum,
@@ -1886,7 +1842,7 @@ static int X509V3_ext(struct SessionHandle *data,
     /* no extensions, bail out */
     return 1;
 
-  for (i=0; i<sk_X509_EXTENSION_num(exts); i++) {
+  for(i=0; i<sk_X509_EXTENSION_num(exts); i++) {
     ASN1_OBJECT *obj;
     X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i);
     BUF_MEM *biomem;
@@ -1922,11 +1878,12 @@ static int X509V3_ext(struct SessionHandle *data,
       while((biomem->data[j] == ' ') && (j<(size_t)biomem->length))
         j++;
       if(j<(size_t)biomem->length)
-        ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep, biomem->data[j]);
+        ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep,
+                      biomem->data[j]);
     }
     infof(data, "  %s\n", buf);
 
-    push_certinfo(data, certnum, namebuf, buf);
+    Curl_ssl_push_certinfo(data, certnum, namebuf, buf);
 
     BIO_free(bio_out);
 
@@ -1942,11 +1899,11 @@ static void X509_signature(struct SessionHandle *data,
   char buf[1024];
   char *ptr = buf;
   int i;
-  for (i=0; i<sig->length; i++)
+  for(i=0; i<sig->length; i++)
     ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%02x:", sig->data[i]);
 
   infof(data, " Signature: %s\n", buf);
-  push_certinfo(data, numcert, "Signature", buf);
+  Curl_ssl_push_certinfo(data, numcert, "Signature", buf);
 }
 
 static void dumpcert(struct SessionHandle *data, X509 *x, int numcert)
@@ -1962,29 +1919,19 @@ static void dumpcert(struct SessionHandle *data, X509 *x, int numcert)
 
   infof(data, "%s\n", biomem->data);
 
-  push_certinfo_len(data, numcert, "Cert", biomem->data, biomem->length);
+  Curl_ssl_push_certinfo_len(data, numcert,
+                             "Cert", biomem->data, biomem->length);
 
   BIO_free(bio_out);
 
 }
 
-
-static int init_certinfo(struct SessionHandle *data,
-                         int num)
-{
-  struct curl_certinfo *ci = &data->info.certs;
-  struct curl_slist **table;
-
-  Curl_ssl_free_certinfo(data);
-
-  ci->num_of_certs = num;
-  table = calloc((size_t)num, sizeof(struct curl_slist *));
-  if(!table)
-    return 1;
-
-  ci->certinfo = table;
-  return 0;
-}
+/*
+ * This size was previously 512 which has been reported "too small" without
+ * any specifics, so it was enlarged to allow more data to get shown uncut.
+ * The "perfect" size is yet to figure out.
+ */
+#define CERTBUFFERSIZE 8192
 
 static CURLcode get_cert_chain(struct connectdata *conn,
                                struct ssl_connect_data *connssl)
@@ -1992,22 +1939,28 @@ static CURLcode get_cert_chain(struct connectdata *conn,
 {
   STACK_OF(X509) *sk;
   int i;
-  char buf[512];
+  char *bufp;
   struct SessionHandle *data = conn->data;
   int numcerts;
 
-  sk = SSL_get_peer_cert_chain(connssl->handle);
+  bufp = malloc(CERTBUFFERSIZE);
+  if(!bufp)
+    return CURLE_OUT_OF_MEMORY;
 
-  if(!sk)
+  sk = SSL_get_peer_cert_chain(connssl->handle);
+  if(!sk) {
+    free(bufp);
     return CURLE_OUT_OF_MEMORY;
+  }
 
   numcerts = sk_X509_num(sk);
-
-  if(init_certinfo(data, numcerts))
+  if(Curl_ssl_init_certinfo(data, numcerts)) {
+    free(bufp);
     return CURLE_OUT_OF_MEMORY;
+  }
 
   infof(data, "--- Certificate chain\n");
-  for (i=0; i<numcerts; i++) {
+  for(i=0; i<numcerts; i++) {
     long value;
     ASN1_INTEGER *num;
     ASN1_TIME *certdate;
@@ -2024,68 +1977,70 @@ static CURLcode get_cert_chain(struct connectdata *conn,
     int j;
     char *ptr;
 
-    (void)x509_name_oneline(X509_get_subject_name(x), buf, sizeof(buf));
-    infof(data, "%2d Subject: %s\n",i,buf);
-    push_certinfo(data, i, "Subject", buf);
+    (void)x509_name_oneline(X509_get_subject_name(x), bufp, CERTBUFFERSIZE);
+    infof(data, "%2d Subject: %s\n", i, bufp);
+    Curl_ssl_push_certinfo(data, i, "Subject", bufp);
 
-    (void)x509_name_oneline(X509_get_issuer_name(x), buf, sizeof(buf));
-    infof(data, "   Issuer: %s\n",buf);
-    push_certinfo(data, i, "Issuer", buf);
+    (void)x509_name_oneline(X509_get_issuer_name(x), bufp, CERTBUFFERSIZE);
+    infof(data, "   Issuer: %s\n", bufp);
+    Curl_ssl_push_certinfo(data, i, "Issuer", bufp);
 
     value = X509_get_version(x);
     infof(data, "   Version: %lu (0x%lx)\n", value+1, value);
-    snprintf(buf, sizeof(buf), "%lx", value);
-    push_certinfo(data, i, "Version", buf); /* hex */
+    snprintf(bufp, CERTBUFFERSIZE, "%lx", value);
+    Curl_ssl_push_certinfo(data, i, "Version", bufp); /* hex */
 
     num=X509_get_serialNumber(x);
-    if (num->length <= 4) {
+    if(num->length <= 4) {
       value = ASN1_INTEGER_get(num);
       infof(data,"   Serial Number: %ld (0x%lx)\n", value, value);
-      snprintf(buf, sizeof(buf), "%lx", value);
+      snprintf(bufp, CERTBUFFERSIZE, "%lx", value);
     }
     else {
+      int left = CERTBUFFERSIZE;
 
-      ptr = buf;
+      ptr = bufp;
       *ptr++ = 0;
       if(num->type == V_ASN1_NEG_INTEGER)
         *ptr++='-';
 
-      for (j=0; j<num->length; j++) {
+      for(j=0; (j<num->length) && (left>=4); j++) {
         /* TODO: length restrictions */
         snprintf(ptr, 3, "%02x%c",num->data[j],
                  ((j+1 == num->length)?'\n':':'));
         ptr += 3;
+        left-=4;
       }
       if(num->length)
-        infof(data,"   Serial Number: %s\n", buf);
+        infof(data,"   Serial Number: %s\n", bufp);
       else
-        buf[0]=0;
+        bufp[0]=0;
     }
-    if(buf[0])
-      push_certinfo(data, i, "Serial Number", buf); /* hex */
+    if(bufp[0])
+      Curl_ssl_push_certinfo(data, i, "Serial Number", bufp); /* hex */
 
     cinf = x->cert_info;
 
-    j = asn1_object_dump(cinf->signature->algorithm, buf, sizeof(buf));
+    j = asn1_object_dump(cinf->signature->algorithm, bufp, CERTBUFFERSIZE);
     if(!j) {
-      infof(data, "   Signature Algorithm: %s\n", buf);
-      push_certinfo(data, i, "Signature Algorithm", buf);
+      infof(data, "   Signature Algorithm: %s\n", bufp);
+      Curl_ssl_push_certinfo(data, i, "Signature Algorithm", bufp);
     }
 
     certdate = X509_get_notBefore(x);
-    asn1_output(certdate, buf, sizeof(buf));
-    infof(data, "   Start date: %s\n", buf);
-    push_certinfo(data, i, "Start date", buf);
+    asn1_output(certdate, bufp, CERTBUFFERSIZE);
+    infof(data, "   Start date: %s\n", bufp);
+    Curl_ssl_push_certinfo(data, i, "Start date", bufp);
 
     certdate = X509_get_notAfter(x);
-    asn1_output(certdate, buf, sizeof(buf));
-    infof(data, "   Expire date: %s\n", buf);
-    push_certinfo(data, i, "Expire date", buf);
+    asn1_output(certdate, bufp, CERTBUFFERSIZE);
+    infof(data, "   Expire date: %s\n", bufp);
+    Curl_ssl_push_certinfo(data, i, "Expire date", bufp);
 
-    j = asn1_object_dump(cinf->key->algor->algorithm, buf, sizeof(buf));
+    j = asn1_object_dump(cinf->key->algor->algorithm, bufp, CERTBUFFERSIZE);
     if(!j) {
-      infof(data, "   Public Key Algorithm: %s\n", buf);
-      push_certinfo(data, i, "Public Key Algorithm", buf);
+      infof(data, "   Public Key Algorithm: %s\n", bufp);
+      Curl_ssl_push_certinfo(data, i, "Public Key Algorithm", bufp);
     }
 
     pubkey = X509_get_pubkey(x);
@@ -2096,8 +2051,8 @@ static CURLcode get_cert_chain(struct connectdata *conn,
       case EVP_PKEY_RSA:
         infof(data,  "   RSA Public Key (%d bits)\n",
               BN_num_bits(pubkey->pkey.rsa->n));
-        snprintf(buf, sizeof(buf), "%d", BN_num_bits(pubkey->pkey.rsa->n));
-        push_certinfo(data, i, "RSA Public Key", buf);
+        snprintf(bufp, CERTBUFFERSIZE, "%d", BN_num_bits(pubkey->pkey.rsa->n));
+        Curl_ssl_push_certinfo(data, i, "RSA Public Key", bufp);
 
         print_pubkey_BN(rsa, n, i);
         print_pubkey_BN(rsa, e, i);
@@ -2137,6 +2092,8 @@ static CURLcode get_cert_chain(struct connectdata *conn,
     dumpcert(data, x, i);
   }
 
+  free(bufp);
+
   return CURLE_OK;
 }
 
@@ -2159,7 +2116,7 @@ static CURLcode servercert(struct connectdata *conn,
   struct SessionHandle *data = conn->data;
   X509 *issuer;
   FILE *fp;
-  char buffer[256];
+  char *buffer = data->state.buffer;
 
   if(data->set.ssl.certinfo)
     /* we've been asked to gather certificate info! */
@@ -2176,22 +2133,15 @@ static CURLcode servercert(struct connectdata *conn,
   infof (data, "Server certificate:\n");
 
   rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
-                          buffer, sizeof(buffer));
-  if(rc) {
-    if(strict)
-      failf(data, "SSL: couldn't get X509-subject!");
-    X509_free(connssl->server_cert);
-    connssl->server_cert = NULL;
-    return CURLE_SSL_CONNECT_ERROR;
-  }
-  infof(data, "\t subject: %s\n", buffer);
+                         buffer, BUFSIZE);
+  infof(data, "\t subject: %s\n", rc?"[NONE]":buffer);
 
   certdate = X509_get_notBefore(connssl->server_cert);
-  asn1_output(certdate, buffer, sizeof(buffer));
+  asn1_output(certdate, buffer, BUFSIZE);
   infof(data, "\t start date: %s\n", buffer);
 
   certdate = X509_get_notAfter(connssl->server_cert);
-  asn1_output(certdate, buffer, sizeof(buffer));
+  asn1_output(certdate, buffer, BUFSIZE);
   infof(data, "\t expire date: %s\n", buffer);
 
   if(data->set.ssl.verifyhost) {
@@ -2204,7 +2154,7 @@ static CURLcode servercert(struct connectdata *conn,
   }
 
   rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert),
-                         buffer, sizeof(buffer));
+                         buffer, BUFSIZE);
   if(rc) {
     if(strict)
       failf(data, "SSL: couldn't get X509-issuer name!");
@@ -2217,19 +2167,20 @@ static CURLcode servercert(struct connectdata *conn,
        deallocating the certificate. */
 
     /* e.g. match issuer name with provided issuer certificate */
-    if (data->set.str[STRING_SSL_ISSUERCERT]) {
-      if (! (fp=fopen(data->set.str[STRING_SSL_ISSUERCERT],"r"))) {
-        if (strict)
-          failf(data, "SSL: Unable to open issuer cert (%s)\n",
+    if(data->set.str[STRING_SSL_ISSUERCERT]) {
+      fp=fopen(data->set.str[STRING_SSL_ISSUERCERT],"r");
+      if(!fp) {
+        if(strict)
+          failf(data, "SSL: Unable to open issuer cert (%s)",
                 data->set.str[STRING_SSL_ISSUERCERT]);
         X509_free(connssl->server_cert);
         connssl->server_cert = NULL;
         return CURLE_SSL_ISSUER_ERROR;
       }
       issuer = PEM_read_X509(fp,NULL,ZERO_NULL,NULL);
-      if (!issuer) {
-        if (strict)
-          failf(data, "SSL: Unable to read issuer cert (%s)\n",
+      if(!issuer) {
+        if(strict)
+          failf(data, "SSL: Unable to read issuer cert (%s)",
                 data->set.str[STRING_SSL_ISSUERCERT]);
         X509_free(connssl->server_cert);
         X509_free(issuer);
@@ -2237,9 +2188,9 @@ static CURLcode servercert(struct connectdata *conn,
         return CURLE_SSL_ISSUER_ERROR;
       }
       fclose(fp);
-      if (X509_check_issued(issuer,connssl->server_cert) != X509_V_OK) {
-        if (strict)
-          failf(data, "SSL: Certificate issuer check failed (%s)\n",
+      if(X509_check_issued(issuer,connssl->server_cert) != X509_V_OK) {
+        if(strict)
+          failf(data, "SSL: Certificate issuer check failed (%s)",
                 data->set.str[STRING_SSL_ISSUERCERT]);
         X509_free(connssl->server_cert);
         X509_free(issuer);
@@ -2313,14 +2264,14 @@ ossl_connect_step3(struct connectdata *conn,
 #endif
 
   incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL));
-  if (incache) {
-    if (old_ssl_sessionid != our_ssl_sessionid) {
+  if(incache) {
+    if(old_ssl_sessionid != our_ssl_sessionid) {
       infof(data, "old SSL session ID is stale, removing\n");
       Curl_ssl_delsessionid(conn, old_ssl_sessionid);
       incache = FALSE;
     }
   }
-  if (!incache) {
+  if(!incache) {
     retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
                                     0 /* unknown size */);
     if(retcode) {
@@ -2379,7 +2330,7 @@ ossl_connect_common(struct connectdata *conn,
 
   if(ssl_connect_1==connssl->connecting_state) {
     /* Find out how much more time we're allowed */
-    timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
 
     if(timeout_ms < 0) {
       /* no need to continue if time already is up */
@@ -2396,7 +2347,7 @@ ossl_connect_common(struct connectdata *conn,
         ssl_connect_2_writing == connssl->connecting_state) {
 
     /* check allowed time left */
-    timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+    timeout_ms = Curl_timeleft(data, NULL, TRUE);
 
     if(timeout_ms < 0) {
       /* no need to continue if time already is up */
@@ -2413,8 +2364,7 @@ ossl_connect_common(struct connectdata *conn,
       curl_socket_t readfd = ssl_connect_2_reading==
         connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
 
-      what = Curl_socket_ready(readfd, writefd,
-                               nonblocking?0:(int)timeout_ms);
+      what = Curl_socket_ready(readfd, writefd, nonblocking?0:timeout_ms);
       if(what < 0) {
         /* fatal error */
         failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
@@ -2500,7 +2450,7 @@ bool Curl_ossl_data_pending(const struct connectdata *conn,
 {
   if(conn->ssl[connindex].handle)
     /* SSL is in use */
-    return (bool)(0 != SSL_pending(conn->ssl[connindex].handle));
+    return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE;
   else
     return FALSE;
 }
@@ -2525,14 +2475,14 @@ static ssize_t ossl_send(struct connectdata *conn,
   memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
   rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen);
 
-  if(rc < 0) {
+  if(rc <= 0) {
     err = SSL_get_error(conn->ssl[sockindex].handle, rc);
 
     switch(err) {
     case SSL_ERROR_WANT_READ:
     case SSL_ERROR_WANT_WRITE:
       /* The operation did not complete; the same TLS/SSL I/O function
-         should be called again later. This is basicly an EWOULDBLOCK
+         should be called again later. This is basically an EWOULDBLOCK
          equivalent. */
       *curlcode = CURLE_AGAIN;
       return -1;
@@ -2574,7 +2524,7 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
 
   buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
   nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize);
-  if(nread < 0) {
+  if(nread <= 0) {
     /* failed SSL_read */
     int err = SSL_get_error(conn->ssl[num].handle, (int)nread);
 
@@ -2588,13 +2538,19 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
       *curlcode = CURLE_AGAIN;
       return -1;
     default:
-      /* openssl/ssl.h says "look at error stack/return value/errno" */
+      /* openssl/ssl.h for SSL_ERROR_SYSCALL says "look at error stack/return
+         value/errno" */
+      /* http://www.openssl.org/docs/crypto/ERR_get_error.html */
       sslerror = ERR_get_error();
-      failf(conn->data, "SSL read: %s, errno %d",
-            ERR_error_string(sslerror, error_buffer),
-            SOCKERRNO);
-      *curlcode = CURLE_RECV_ERROR;
-      return -1;
+      if((nread < 0) || sslerror) {
+        /* If the return code was negative or there actually is an error in the
+           queue */
+        failf(conn->data, "SSL read: %s, errno %d",
+              ERR_error_string(sslerror, error_buffer),
+              SOCKERRNO);
+        *curlcode = CURLE_RECV_ERROR;
+        return -1;
+      }
     }
   }
   return nread;
@@ -2603,7 +2559,7 @@ static ssize_t ossl_recv(struct connectdata *conn, /* connection data */
 size_t Curl_ossl_version(char *buffer, size_t size)
 {
 #ifdef YASSL_VERSION
-  /* yassl provides an OpenSSL API compatiblity layer so it looks identical
+  /* yassl provides an OpenSSL API compatibility layer so it looks identical
      to OpenSSL in all other aspects */
   return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
 #else /* YASSL_VERSION */
@@ -2661,4 +2617,23 @@ size_t Curl_ossl_version(char *buffer, size_t size)
 
 #endif /* YASSL_VERSION */
 }
+
+void Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy,
+                      size_t length)
+{
+  Curl_ossl_seed(data); /* Initiate the seed if not already done */
+  RAND_bytes(entropy, curlx_uztosi(length));
+}
+
+void Curl_ossl_md5sum(unsigned char *tmp, /* input */
+                      size_t tmplen,
+                      unsigned char *md5sum /* output */,
+                      size_t unused)
+{
+  MD5_CTX MD5pw;
+  (void)unused;
+  MD5_Init(&MD5pw);
+  MD5_Update(&MD5pw, tmp, tmplen);
+  MD5_Final(md5sum, &MD5pw);
+}
 #endif /* USE_SSLEAY */
index 2ac0ad2..d6efcb2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SSLUSE_H
-#define __SSLUSE_H
+#ifndef HEADER_CURL_SSLUSE_H
+#define HEADER_CURL_SSLUSE_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
+#include "curl_setup.h"
+
 #ifdef USE_SSLEAY
 /*
  * This header should only be needed to get included by sslgen.c and ssluse.c
  */
 
 #include "urldata.h"
+
 CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
 CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
                                        int sockindex,
@@ -63,6 +66,16 @@ int Curl_ossl_seed(struct SessionHandle *data);
 int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
 bool Curl_ossl_data_pending(const struct connectdata *conn,
                             int connindex);
+void Curl_ossl_random(struct SessionHandle *data, unsigned char *entropy,
+                      size_t length);
+void Curl_ossl_md5sum(unsigned char *tmp, /* input */
+                      size_t tmplen,
+                      unsigned char *md5sum /* output */,
+                      size_t unused);
+
+/* this backend provides these functions: */
+#define have_curlssl_random 1
+#define have_curlssl_md5sum 1
 
 /* API setup for OpenSSL */
 #define curlssl_init Curl_ossl_init
@@ -79,6 +92,8 @@ bool Curl_ossl_data_pending(const struct connectdata *conn,
 #define curlssl_version Curl_ossl_version
 #define curlssl_check_cxn Curl_ossl_check_cxn
 #define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y)
+#define curlssl_random(x,y,z) Curl_ossl_random(x,y,z)
+#define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d)
 
 #endif /* USE_SSLEAY */
-#endif /* __SSLUSE_H */
+#endif /* HEADER_CURL_SSLUSE_H */
index a3107cf..3b776b1 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+/*
+ * This file is 'mem-include-scan' clean. See test 1132.
+ */
+#include "curl_setup.h"
 
-#include "setup.h"
 #include "strdup.h"
 
 #ifndef HAVE_STRDUP
index 4edbcd7..49af911 100644 (file)
@@ -21,7 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef HAVE_STRDUP
 extern char *curlx_strdup(const char *str);
index f6bf5f3..5f2f508 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <string.h>
-#include <ctype.h>
+#include "curl_setup.h"
 
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
@@ -31,6 +28,9 @@
 
 #include "strequal.h"
 
+/*
+ * @unittest: 1301
+ */
 int curl_strequal(const char *first, const char *second)
 {
 #if defined(HAVE_STRCASECMP)
@@ -51,6 +51,9 @@ int curl_strequal(const char *first, const char *second)
 #endif
 }
 
+/*
+ * @unittest: 1301
+ */
 int curl_strnequal(const char *first, const char *second, size_t max)
 {
 #if defined(HAVE_STRNCASECMP)
@@ -74,48 +77,3 @@ int curl_strnequal(const char *first, const char *second, size_t max)
   return toupper(*first) == toupper(*second);
 #endif
 }
-
-#ifndef HAVE_STRLCAT
-/*
- * The strlcat() function appends the NUL-terminated string src to the end
- * of dst. It will append at most size - strlen(dst) - 1 bytes, NUL-termi-
- * nating the result.
- *
- * The strlcpy() and strlcat() functions return the total length of the
- * string they tried to create.  For strlcpy() that means the length of src.
- * For strlcat() that means the initial length of dst plus the length of
- * src. While this may seem somewhat confusing it was done to make trunca-
- * tion detection simple.
- *
- *
- */
-size_t Curl_strlcat(char *dst, const char *src, size_t siz)
-{
-  char *d = dst;
-  const char *s = src;
-  size_t n = siz;
-  union {
-    ssize_t sig;
-     size_t uns;
-  } dlen;
-
-  /* Find the end of dst and adjust bytes left but don't go past end */
-  while(n-- != 0 && *d != '\0')
-    d++;
-  dlen.sig = d - dst;
-  n = siz - dlen.uns;
-
-  if(n == 0)
-    return(dlen.uns + strlen(s));
-  while(*s != '\0') {
-    if(n != 1) {
-      *d++ = *s;
-      n--;
-    }
-    s++;
-  }
-  *d = '\0';
-
-  return(dlen.uns + (s - src));     /* count does not include NUL */
-}
-#endif
index 202c919..117a305 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __STREQUAL_H
-#define __STREQUAL_H
+#ifndef HEADER_CURL_STREQUAL_H
+#define HEADER_CURL_STREQUAL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -27,9 +27,5 @@
 #define strequal(a,b) curl_strequal(a,b)
 #define strnequal(a,b,c) curl_strnequal(a,b,c)
 
-#ifndef HAVE_STRLCAT
-#define strlcat(x,y,z) Curl_strlcat(x,y,z)
-#endif
-size_t strlcat(char *dst, const char *src, size_t siz);
+#endif /* HEADER_CURL_STREQUAL_H */
 
-#endif
index e8ecea5..a385f55 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2004 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 2012, 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
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifdef HAVE_STRERROR_R
 #  if (!defined(HAVE_POSIX_STRERROR_R) && \
       (defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \
       (defined(HAVE_GLIBC_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \
       (defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R))
-#    error "strerror_r MUST be either POSIX-style, glibc-style or vxworks-style"
+#    error "strerror_r MUST be either POSIX, glibc or vxworks-style"
 #  endif
 #endif
 
 #include <curl/curl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
 
 #ifdef USE_LIBIDN
 #include <idna.h>
@@ -47,6 +44,9 @@
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
 
 const char *
 curl_easy_strerror(CURLcode error)
@@ -65,6 +65,10 @@ curl_easy_strerror(CURLcode error)
   case CURLE_URL_MALFORMAT:
     return "URL using bad/illegal format or missing URL";
 
+  case CURLE_NOT_BUILT_IN:
+    return "A requested feature, protocol or option was not found built-in in"
+      " this libcurl due to a build-time decision.";
+
   case CURLE_COULDNT_RESOLVE_PROXY:
     return "Couldn't resolve proxy name";
 
@@ -80,6 +84,12 @@ curl_easy_strerror(CURLcode error)
   case CURLE_REMOTE_ACCESS_DENIED:
     return "Access denied to remote resource";
 
+  case CURLE_FTP_ACCEPT_FAILED:
+    return "FTP: The server failed to connect to data port";
+
+  case CURLE_FTP_ACCEPT_TIMEOUT:
+    return "FTP: Accepting server connect has timed out";
+
   case CURLE_FTP_PRET_FAILED:
     return "FTP: The server did not accept the PRET command.";
 
@@ -167,8 +177,8 @@ curl_easy_strerror(CURLcode error)
   case CURLE_TOO_MANY_REDIRECTS :
     return "Number of redirects hit maximum amount";
 
-  case CURLE_UNKNOWN_TELNET_OPTION:
-    return "User specified an unknown telnet option";
+  case CURLE_UNKNOWN_OPTION:
+    return "An unknown option was passed in to libcurl";
 
   case CURLE_TELNET_OPTION_SYNTAX :
     return "Malformed telnet option";
@@ -201,13 +211,14 @@ curl_easy_strerror(CURLcode error)
     return "Couldn't use specified SSL cipher";
 
   case CURLE_SSL_CACERT:
-    return "Peer certificate cannot be authenticated with known CA certificates";
+    return "Peer certificate cannot be authenticated with given CA "
+      "certificates";
 
   case CURLE_SSL_CACERT_BADFILE:
     return "Problem with the SSL CA cert (path? access rights?)";
 
   case CURLE_BAD_CONTENT_ENCODING:
-    return "Unrecognized HTTP Content-Encoding";
+    return "Unrecognized or bad HTTP Content or Transfer-Encoding";
 
   case CURLE_LDAP_INVALID_URL:
     return "Invalid LDAP URL";
@@ -281,10 +292,10 @@ curl_easy_strerror(CURLcode error)
   case CURLE_CHUNK_FAILED:
     return "Chunk callback failed";
 
+  case CURLE_NO_CONNECTION_AVAILABLE:
+    return "The max connection limit is reached";
+
     /* error codes not used by current libcurl */
-  case CURLE_OBSOLETE4:
-  case CURLE_OBSOLETE10:
-  case CURLE_OBSOLETE12:
   case CURLE_OBSOLETE16:
   case CURLE_OBSOLETE20:
   case CURLE_OBSOLETE24:
@@ -383,6 +394,9 @@ curl_share_strerror(CURLSHcode error)
   case CURLSHE_NOMEM:
     return "Out of memory";
 
+  case CURLSHE_NOT_BUILT_IN:
+    return "Feature not enabled in this library";
+
   case CURLSHE_LAST:
     break;
   }
@@ -627,7 +641,7 @@ const char *Curl_strerror(struct connectdata *conn, int err)
     strncpy(buf, strerror(err), max);
   else {
     if(!get_winsock_error(err, buf, max) &&
-        !FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
+       !FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
                        LANG_NEUTRAL, buf, (DWORD)max, NULL))
       snprintf(buf, max, "Unknown error %d (%#x)", err, err);
   }
@@ -773,3 +787,336 @@ const char *Curl_idn_strerror (struct connectdata *conn, int err)
 #endif
 }
 #endif  /* USE_LIBIDN */
+
+#ifdef USE_WINDOWS_SSPI
+const char *Curl_sspi_strerror (struct connectdata *conn, int err)
+{
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
+  char txtbuf[80];
+  char msgbuf[sizeof(conn->syserr_buf)];
+  char *p, *str, *msg = NULL;
+  bool msg_formatted = FALSE;
+  int old_errno;
+#endif
+  const char *txt;
+  char *outbuf;
+  size_t outmax;
+
+  DEBUGASSERT(conn);
+
+  outbuf = conn->syserr_buf;
+  outmax = sizeof(conn->syserr_buf)-1;
+  *outbuf = '\0';
+
+#ifndef CURL_DISABLE_VERBOSE_STRINGS
+
+  old_errno = ERRNO;
+
+  switch (err) {
+    case SEC_E_OK:
+      txt = "No error";
+      break;
+    case SEC_E_ALGORITHM_MISMATCH:
+      txt = "SEC_E_ALGORITHM_MISMATCH";
+      break;
+    case SEC_E_BAD_BINDINGS:
+      txt = "SEC_E_BAD_BINDINGS";
+      break;
+    case SEC_E_BAD_PKGID:
+      txt = "SEC_E_BAD_PKGID";
+      break;
+    case SEC_E_BUFFER_TOO_SMALL:
+      txt = "SEC_E_BUFFER_TOO_SMALL";
+      break;
+    case SEC_E_CANNOT_INSTALL:
+      txt = "SEC_E_CANNOT_INSTALL";
+      break;
+    case SEC_E_CANNOT_PACK:
+      txt = "SEC_E_CANNOT_PACK";
+      break;
+    case SEC_E_CERT_EXPIRED:
+      txt = "SEC_E_CERT_EXPIRED";
+      break;
+    case SEC_E_CERT_UNKNOWN:
+      txt = "SEC_E_CERT_UNKNOWN";
+      break;
+    case SEC_E_CERT_WRONG_USAGE:
+      txt = "SEC_E_CERT_WRONG_USAGE";
+      break;
+    case SEC_E_CONTEXT_EXPIRED:
+      txt = "SEC_E_CONTEXT_EXPIRED";
+      break;
+    case SEC_E_CROSSREALM_DELEGATION_FAILURE:
+      txt = "SEC_E_CROSSREALM_DELEGATION_FAILURE";
+      break;
+    case SEC_E_CRYPTO_SYSTEM_INVALID:
+      txt = "SEC_E_CRYPTO_SYSTEM_INVALID";
+      break;
+    case SEC_E_DECRYPT_FAILURE:
+      txt = "SEC_E_DECRYPT_FAILURE";
+      break;
+    case SEC_E_DELEGATION_POLICY:
+      txt = "SEC_E_DELEGATION_POLICY";
+      break;
+    case SEC_E_DELEGATION_REQUIRED:
+      txt = "SEC_E_DELEGATION_REQUIRED";
+      break;
+    case SEC_E_DOWNGRADE_DETECTED:
+      txt = "SEC_E_DOWNGRADE_DETECTED";
+      break;
+    case SEC_E_ENCRYPT_FAILURE:
+      txt = "SEC_E_ENCRYPT_FAILURE";
+      break;
+    case SEC_E_ILLEGAL_MESSAGE:
+      txt = "SEC_E_ILLEGAL_MESSAGE";
+      break;
+    case SEC_E_INCOMPLETE_CREDENTIALS:
+      txt = "SEC_E_INCOMPLETE_CREDENTIALS";
+      break;
+    case SEC_E_INCOMPLETE_MESSAGE:
+      txt = "SEC_E_INCOMPLETE_MESSAGE";
+      break;
+    case SEC_E_INSUFFICIENT_MEMORY:
+      txt = "SEC_E_INSUFFICIENT_MEMORY";
+      break;
+    case SEC_E_INTERNAL_ERROR:
+      txt = "SEC_E_INTERNAL_ERROR";
+      break;
+    case SEC_E_INVALID_HANDLE:
+      txt = "SEC_E_INVALID_HANDLE";
+      break;
+    case SEC_E_INVALID_PARAMETER:
+      txt = "SEC_E_INVALID_PARAMETER";
+      break;
+    case SEC_E_INVALID_TOKEN:
+      txt = "SEC_E_INVALID_TOKEN";
+      break;
+    case SEC_E_ISSUING_CA_UNTRUSTED:
+      txt = "SEC_E_ISSUING_CA_UNTRUSTED";
+      break;
+    case SEC_E_ISSUING_CA_UNTRUSTED_KDC:
+      txt = "SEC_E_ISSUING_CA_UNTRUSTED_KDC";
+      break;
+    case SEC_E_KDC_CERT_EXPIRED:
+      txt = "SEC_E_KDC_CERT_EXPIRED";
+      break;
+    case SEC_E_KDC_CERT_REVOKED:
+      txt = "SEC_E_KDC_CERT_REVOKED";
+      break;
+    case SEC_E_KDC_INVALID_REQUEST:
+      txt = "SEC_E_KDC_INVALID_REQUEST";
+      break;
+    case SEC_E_KDC_UNABLE_TO_REFER:
+      txt = "SEC_E_KDC_UNABLE_TO_REFER";
+      break;
+    case SEC_E_KDC_UNKNOWN_ETYPE:
+      txt = "SEC_E_KDC_UNKNOWN_ETYPE";
+      break;
+    case SEC_E_LOGON_DENIED:
+      txt = "SEC_E_LOGON_DENIED";
+      break;
+    case SEC_E_MAX_REFERRALS_EXCEEDED:
+      txt = "SEC_E_MAX_REFERRALS_EXCEEDED";
+      break;
+    case SEC_E_MESSAGE_ALTERED:
+      txt = "SEC_E_MESSAGE_ALTERED";
+      break;
+    case SEC_E_MULTIPLE_ACCOUNTS:
+      txt = "SEC_E_MULTIPLE_ACCOUNTS";
+      break;
+    case SEC_E_MUST_BE_KDC:
+      txt = "SEC_E_MUST_BE_KDC";
+      break;
+    case SEC_E_NOT_OWNER:
+      txt = "SEC_E_NOT_OWNER";
+      break;
+    case SEC_E_NO_AUTHENTICATING_AUTHORITY:
+      txt = "SEC_E_NO_AUTHENTICATING_AUTHORITY";
+      break;
+    case SEC_E_NO_CREDENTIALS:
+      txt = "SEC_E_NO_CREDENTIALS";
+      break;
+    case SEC_E_NO_IMPERSONATION:
+      txt = "SEC_E_NO_IMPERSONATION";
+      break;
+    case SEC_E_NO_IP_ADDRESSES:
+      txt = "SEC_E_NO_IP_ADDRESSES";
+      break;
+    case SEC_E_NO_KERB_KEY:
+      txt = "SEC_E_NO_KERB_KEY";
+      break;
+    case SEC_E_NO_PA_DATA:
+      txt = "SEC_E_NO_PA_DATA";
+      break;
+    case SEC_E_NO_S4U_PROT_SUPPORT:
+      txt = "SEC_E_NO_S4U_PROT_SUPPORT";
+      break;
+    case SEC_E_NO_TGT_REPLY:
+      txt = "SEC_E_NO_TGT_REPLY";
+      break;
+    case SEC_E_OUT_OF_SEQUENCE:
+      txt = "SEC_E_OUT_OF_SEQUENCE";
+      break;
+    case SEC_E_PKINIT_CLIENT_FAILURE:
+      txt = "SEC_E_PKINIT_CLIENT_FAILURE";
+      break;
+    case SEC_E_PKINIT_NAME_MISMATCH:
+      txt = "SEC_E_PKINIT_NAME_MISMATCH";
+      break;
+    case SEC_E_POLICY_NLTM_ONLY:
+      txt = "SEC_E_POLICY_NLTM_ONLY";
+      break;
+    case SEC_E_QOP_NOT_SUPPORTED:
+      txt = "SEC_E_QOP_NOT_SUPPORTED";
+      break;
+    case SEC_E_REVOCATION_OFFLINE_C:
+      txt = "SEC_E_REVOCATION_OFFLINE_C";
+      break;
+    case SEC_E_REVOCATION_OFFLINE_KDC:
+      txt = "SEC_E_REVOCATION_OFFLINE_KDC";
+      break;
+    case SEC_E_SECPKG_NOT_FOUND:
+      txt = "SEC_E_SECPKG_NOT_FOUND";
+      break;
+    case SEC_E_SECURITY_QOS_FAILED:
+      txt = "SEC_E_SECURITY_QOS_FAILED";
+      break;
+    case SEC_E_SHUTDOWN_IN_PROGRESS:
+      txt = "SEC_E_SHUTDOWN_IN_PROGRESS";
+      break;
+    case SEC_E_SMARTCARD_CERT_EXPIRED:
+      txt = "SEC_E_SMARTCARD_CERT_EXPIRED";
+      break;
+    case SEC_E_SMARTCARD_CERT_REVOKED:
+      txt = "SEC_E_SMARTCARD_CERT_REVOKED";
+      break;
+    case SEC_E_SMARTCARD_LOGON_REQUIRED:
+      txt = "SEC_E_SMARTCARD_LOGON_REQUIRED";
+      break;
+    case SEC_E_STRONG_CRYPTO_NOT_SUPPORTED:
+      txt = "SEC_E_STRONG_CRYPTO_NOT_SUPPORTED";
+      break;
+    case SEC_E_TARGET_UNKNOWN:
+      txt = "SEC_E_TARGET_UNKNOWN";
+      break;
+    case SEC_E_TIME_SKEW:
+      txt = "SEC_E_TIME_SKEW";
+      break;
+    case SEC_E_TOO_MANY_PRINCIPALS:
+      txt = "SEC_E_TOO_MANY_PRINCIPALS";
+      break;
+    case SEC_E_UNFINISHED_CONTEXT_DELETED:
+      txt = "SEC_E_UNFINISHED_CONTEXT_DELETED";
+      break;
+    case SEC_E_UNKNOWN_CREDENTIALS:
+      txt = "SEC_E_UNKNOWN_CREDENTIALS";
+      break;
+    case SEC_E_UNSUPPORTED_FUNCTION:
+      txt = "SEC_E_UNSUPPORTED_FUNCTION";
+      break;
+    case SEC_E_UNSUPPORTED_PREAUTH:
+      txt = "SEC_E_UNSUPPORTED_PREAUTH";
+      break;
+    case SEC_E_UNTRUSTED_ROOT:
+      txt = "SEC_E_UNTRUSTED_ROOT";
+      break;
+    case SEC_E_WRONG_CREDENTIAL_HANDLE:
+      txt = "SEC_E_WRONG_CREDENTIAL_HANDLE";
+      break;
+    case SEC_E_WRONG_PRINCIPAL:
+      txt = "SEC_E_WRONG_PRINCIPAL";
+      break;
+    case SEC_I_COMPLETE_AND_CONTINUE:
+      txt = "SEC_I_COMPLETE_AND_CONTINUE";
+      break;
+    case SEC_I_COMPLETE_NEEDED:
+      txt = "SEC_I_COMPLETE_NEEDED";
+      break;
+    case SEC_I_CONTEXT_EXPIRED:
+      txt = "SEC_I_CONTEXT_EXPIRED";
+      break;
+    case SEC_I_CONTINUE_NEEDED:
+      txt = "SEC_I_CONTINUE_NEEDED";
+      break;
+    case SEC_I_INCOMPLETE_CREDENTIALS:
+      txt = "SEC_I_INCOMPLETE_CREDENTIALS";
+      break;
+    case SEC_I_LOCAL_LOGON:
+      txt = "SEC_I_LOCAL_LOGON";
+      break;
+    case SEC_I_NO_LSA_CONTEXT:
+      txt = "SEC_I_NO_LSA_CONTEXT";
+      break;
+    case SEC_I_RENEGOTIATE:
+      txt = "SEC_I_RENEGOTIATE";
+      break;
+    case SEC_I_SIGNATURE_NEEDED:
+      txt = "SEC_I_SIGNATURE_NEEDED";
+      break;
+    default:
+      txt = "Unknown error";
+  }
+
+  if(err == SEC_E_OK)
+    strncpy(outbuf, txt, outmax);
+  else {
+    str = txtbuf;
+    snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)",
+             txt, (err >> 16) & 0xffff, err & 0xffff);
+    txtbuf[sizeof(txtbuf)-1] = '\0';
+
+#ifdef _WIN32_WCE
+    {
+      wchar_t wbuf[256];
+      wbuf[0] = L'\0';
+
+      if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+                       FORMAT_MESSAGE_IGNORE_INSERTS,
+                       NULL, err, LANG_NEUTRAL,
+                       wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL)) {
+        wcstombs(msgbuf,wbuf,sizeof(msgbuf)-1);
+        msg_formatted = TRUE;
+      }
+    }
+#else
+    if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
+                      FORMAT_MESSAGE_IGNORE_INSERTS,
+                      NULL, err, LANG_NEUTRAL,
+                      msgbuf, sizeof(msgbuf)-1, NULL)) {
+      msg_formatted = TRUE;
+    }
+#endif
+    if(msg_formatted) {
+      msgbuf[sizeof(msgbuf)-1] = '\0';
+      /* strip trailing '\r\n' or '\n' */
+      if((p = strrchr(msgbuf,'\n')) != NULL && (p - msgbuf) >= 2)
+         *p = '\0';
+      if((p = strrchr(msgbuf,'\r')) != NULL && (p - msgbuf) >= 1)
+         *p = '\0';
+      msg = msgbuf;
+    }
+    if(msg)
+      snprintf(outbuf, outmax, "%s - %s", str, msg);
+    else
+      strncpy(outbuf, str, outmax);
+  }
+
+  if(old_errno != ERRNO)
+    SET_ERRNO(old_errno);
+
+#else
+
+  if(err == SEC_E_OK)
+    txt = "No error";
+  else
+    txt = "Error";
+
+  strncpy(outbuf, txt, outmax);
+
+#endif
+
+  outbuf[outmax] = '\0';
+
+  return outbuf;
+}
+#endif /* USE_WINDOWS_SSPI */
index 7f2342a..f1b2221 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CURL_STRERROR_H
-#define __CURL_STRERROR_H
+#ifndef HEADER_CURL_STRERROR_H
+#define HEADER_CURL_STRERROR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -30,4 +30,8 @@ const char *Curl_strerror (struct connectdata *conn, int err);
 const char *Curl_idn_strerror (struct connectdata *conn, int err);
 #endif
 
+#ifdef USE_WINDOWS_SSPI
+const char *Curl_sspi_strerror (struct connectdata *conn, int err);
 #endif
+
+#endif /* HEADER_CURL_STRERROR_H */
index 91c2541..0d31351 100644 (file)
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef HAVE_STRTOK_R
 #include <stddef.h>
-#include <string.h>
 
 #include "strtok.h"
 
index 8baf779..1147d70 100644 (file)
@@ -21,7 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
 #include <stddef.h>
 
 #ifndef HAVE_STRTOK_R
index 61ff05b..03a97e8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -20,7 +20,8 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
+
 #include "strtoofft.h"
 
 /*
  */
 
 #ifdef NEED_CURL_STRTOLL
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
 /* Range tests can be used for alphanum decoding if characters are consecutive,
    like in ASCII. Else an array is scanned. Determine this condition now. */
 
 #if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25
-#include <string.h>
 
 #define NO_RANGE_TEST
 
@@ -110,9 +107,9 @@ curlx_strtoll(const char *nptr, char **endptr, int base)
   /* Loop handling digits. */
   value = 0;
   overflow = 0;
-  for (i = get_char(end[0], base);
-       i != -1;
-       end++, i = get_char(end[0], base)) {
+  for(i = get_char(end[0], base);
+      i != -1;
+      end++, i = get_char(end[0], base)) {
     newval = base * value + i;
     if(newval < value) {
       /* We've overflowed. */
index 8208e87..b812a67 100644 (file)
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 /*
  * Determine which string to integral data type conversion function we use
  * to implement string conversion to our curl_off_t integral data type.
  *
  * Notice that curl_off_t might be 64 or 32 bit wide, and that it might use
- * an undelying data type which might be 'long', 'int64_t', 'long long' or
+ * an underlying data type which might be 'long', 'int64_t', 'long long' or
  * '__int64' and more remotely other data types.
  *
  * On systems where the size of curl_off_t is greater than the size of 'long'
- * the conversion funtion to use is strtoll() if it is available, otherwise,
+ * the conversion function to use is strtoll() if it is available, otherwise,
  * we emulate its functionality with our own clone.
  *
  * On systems where the size of curl_off_t is smaller or equal than the size
- * of 'long' the conversion funtion to use is strtol().
+ * of 'long' the conversion function to use is strtol().
  */
 
 #if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
index 1a5683d..77d8b7b 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_TELNET
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#if defined(WIN32)
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
 #endif
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
@@ -59,8 +44,6 @@
 #include <sys/param.h>
 #endif
 
-#endif  /* WIN32 */
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
 #include "select.h"
 #include "strequal.h"
 #include "rawstr.h"
+#include "warnless.h"
 
 /* The last #include file should be: */
 #include "memdebug.h"
 
 #define SUBBUFSIZE 512
 
-#define CURL_SB_CLEAR(x)  x->subpointer = x->subbuffer;
-#define CURL_SB_TERM(x)   { x->subend = x->subpointer; CURL_SB_CLEAR(x); }
-#define CURL_SB_ACCUM(x,c) \
-  if(x->subpointer < (x->subbuffer+sizeof x->subbuffer)) { \
-    *x->subpointer++ = (c); \
-  }
+#define CURL_SB_CLEAR(x)  x->subpointer = x->subbuffer
+#define CURL_SB_TERM(x)                                 \
+  do {                                                  \
+    x->subend = x->subpointer;                          \
+    CURL_SB_CLEAR(x);                                   \
+  } WHILE_FALSE
+#define CURL_SB_ACCUM(x,c)                                   \
+  do {                                                       \
+    if(x->subpointer < (x->subbuffer+sizeof x->subbuffer))   \
+      *x->subpointer++ = (c);                                \
+  } WHILE_FALSE
 
 #define  CURL_SB_GET(x) ((*x->subpointer++)&0xff)
 #define  CURL_SB_PEEK(x)   ((*x->subpointer)&0xff)
@@ -99,7 +88,7 @@
 #define  CURL_SB_LEN(x) (x->subend - x->subpointer)
 
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define printoption(a,b,c,d)  do { } while(0)
+#define printoption(a,b,c,d)  Curl_nop_stmt
 #endif
 
 #ifdef USE_WINSOCK
@@ -127,10 +116,13 @@ static void printsub(struct SessionHandle *data,
                      int direction, unsigned char *pointer,
                      size_t length);
 static void suboption(struct connectdata *);
+static void sendsuboption(struct connectdata *conn, int option);
 
 static CURLcode telnet_do(struct connectdata *conn, bool *done);
 static CURLcode telnet_done(struct connectdata *conn,
                                  CURLcode, bool premature);
+static CURLcode send_telnet_data(struct connectdata *conn,
+                                 char *buffer, ssize_t nread);
 
 /* For negotiation compliant to RFC 1143 */
 #define CURL_NO          0
@@ -166,9 +158,12 @@ struct TELNET {
   int him[256];
   int himq[256];
   int him_preferred[256];
+  int subnegotiation[256];
   char subopt_ttype[32];             /* Set with suboption TTYPE */
-  char subopt_xdisploc[128];          /* Set with suboption XDISPLOC */
-  struct curl_slist *telnet_vars; /* Environment variables */
+  char subopt_xdisploc[128];         /* Set with suboption XDISPLOC */
+  unsigned short subopt_wsx;         /* Set with suboption NAWS */
+  unsigned short subopt_wsy;         /* Set with suboption NAWS */
+  struct curl_slist *telnet_vars;    /* Environment variables */
 
   /* suboptions */
   unsigned char subbuffer[SUBBUFSIZE];
@@ -193,10 +188,13 @@ const struct Curl_handler Curl_handler_telnet = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_TELNET,                          /* defport */
-  PROT_TELNET                           /* protocol */
+  CURLPROTO_TELNET,                     /* protocol */
+  PROTOPT_NONE | PROTOPT_NOURLQUERY     /* flags */
 };
 
 
@@ -257,11 +255,37 @@ CURLcode init_telnet(struct connectdata *conn)
   CURL_SB_CLEAR(tn);
 
   /* Set the options we want by default */
-  tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES;
   tn->us_preferred[CURL_TELOPT_SGA] = CURL_YES;
-  tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES;
   tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES;
 
+  /* To be compliant with previous releases of libcurl
+     we enable this option by default. This behaviour
+         can be changed thanks to the "BINARY" option in
+         CURLOPT_TELNETOPTIONS
+  */
+  tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES;
+  tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES;
+
+  /* We must allow the server to echo what we sent
+         but it is not necessary to request the server
+         to do so (it might forces the server to close
+         the connection). Hence, we ignore ECHO in the
+         negotiate function
+  */
+  tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES;
+
+  /* Set the subnegotiation fields to send information
+    just after negotiation passed (do/will)
+
+     Default values are (0,0) initialized by calloc.
+     According to the RFC1013 it is valid:
+     A value equal to zero is acceptable for the width (or height),
+         and means that no character width (or height) is being sent.
+         In this case, the width (or height) that will be assumed by the
+         Telnet server is operating system specific (it will probably be
+         based upon the terminal type information that may have been sent
+         using the TERMINAL TYPE Telnet option). */
+  tn->subnegotiation[CURL_TELOPT_NAWS] = CURL_YES;
   return CURLE_OK;
 }
 
@@ -270,8 +294,10 @@ static void negotiate(struct connectdata *conn)
   int i;
   struct TELNET *tn = (struct TELNET *) conn->data->state.proto.telnet;
 
-  for(i = 0;i < CURL_NTELOPTS;i++)
-  {
+  for(i = 0;i < CURL_NTELOPTS;i++) {
+    if(i==CURL_TELOPT_ECHO)
+      continue;
+
     if(tn->us_preferred[i] == CURL_YES)
       set_local_option(conn, i, CURL_YES);
 
@@ -287,21 +313,17 @@ static void printoption(struct SessionHandle *data,
   const char *fmt;
   const char *opt;
 
-  if(data->set.verbose)
-  {
-    if(cmd == CURL_IAC)
-    {
+  if(data->set.verbose) {
+    if(cmd == CURL_IAC) {
       if(CURL_TELCMD_OK(option))
         infof(data, "%s IAC %s\n", direction, CURL_TELCMD(option));
       else
         infof(data, "%s IAC %d\n", direction, option);
     }
-    else
-    {
+    else {
       fmt = (cmd == CURL_WILL) ? "WILL" : (cmd == CURL_WONT) ? "WONT" :
         (cmd == CURL_DO) ? "DO" : (cmd == CURL_DONT) ? "DONT" : 0;
-      if(fmt)
-      {
+      if(fmt) {
         if(CURL_TELOPT_OK(option))
           opt = CURL_TELOPT(option);
         else if(option == CURL_TELOPT_EXOPL)
@@ -345,80 +367,72 @@ static
 void set_remote_option(struct connectdata *conn, int option, int newstate)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  if(newstate == CURL_YES)
-  {
-    switch(tn->him[option])
-    {
-      case CURL_NO:
-        tn->him[option] = CURL_WANTYES;
-        send_negotiation(conn, CURL_DO, option);
-        break;
+  if(newstate == CURL_YES) {
+    switch(tn->him[option]) {
+    case CURL_NO:
+      tn->him[option] = CURL_WANTYES;
+      send_negotiation(conn, CURL_DO, option);
+      break;
 
-      case CURL_YES:
-        /* Already enabled */
-        break;
+    case CURL_YES:
+      /* Already enabled */
+      break;
 
-      case CURL_WANTNO:
-        switch(tn->himq[option])
-        {
-          case CURL_EMPTY:
-            /* Already negotiating for CURL_YES, queue the request */
-            tn->himq[option] = CURL_OPPOSITE;
-            break;
-          case CURL_OPPOSITE:
-            /* Error: already queued an enable request */
-            break;
-        }
+    case CURL_WANTNO:
+      switch(tn->himq[option]) {
+      case CURL_EMPTY:
+        /* Already negotiating for CURL_YES, queue the request */
+        tn->himq[option] = CURL_OPPOSITE;
+        break;
+      case CURL_OPPOSITE:
+        /* Error: already queued an enable request */
         break;
+      }
+      break;
 
-      case CURL_WANTYES:
-        switch(tn->himq[option])
-        {
-          case CURL_EMPTY:
-            /* Error: already negotiating for enable */
-            break;
-          case CURL_OPPOSITE:
-            tn->himq[option] = CURL_EMPTY;
-            break;
-        }
+    case CURL_WANTYES:
+      switch(tn->himq[option]) {
+      case CURL_EMPTY:
+        /* Error: already negotiating for enable */
         break;
+      case CURL_OPPOSITE:
+        tn->himq[option] = CURL_EMPTY;
+        break;
+      }
+      break;
     }
   }
-  else /* NO */
-  {
-    switch(tn->him[option])
-    {
-      case CURL_NO:
-        /* Already disabled */
-        break;
+  else { /* NO */
+    switch(tn->him[option]) {
+    case CURL_NO:
+      /* Already disabled */
+      break;
 
-      case CURL_YES:
-        tn->him[option] = CURL_WANTNO;
-        send_negotiation(conn, CURL_DONT, option);
-        break;
+    case CURL_YES:
+      tn->him[option] = CURL_WANTNO;
+      send_negotiation(conn, CURL_DONT, option);
+      break;
 
-      case CURL_WANTNO:
-        switch(tn->himq[option])
-        {
-          case CURL_EMPTY:
-            /* Already negotiating for NO */
-            break;
-          case CURL_OPPOSITE:
-            tn->himq[option] = CURL_EMPTY;
-            break;
-        }
+    case CURL_WANTNO:
+      switch(tn->himq[option]) {
+      case CURL_EMPTY:
+        /* Already negotiating for NO */
         break;
+      case CURL_OPPOSITE:
+        tn->himq[option] = CURL_EMPTY;
+        break;
+      }
+      break;
 
-      case CURL_WANTYES:
-        switch(tn->himq[option])
-        {
-          case CURL_EMPTY:
-            tn->himq[option] = CURL_OPPOSITE;
-            break;
-          case CURL_OPPOSITE:
-            break;
-        }
+    case CURL_WANTYES:
+      switch(tn->himq[option]) {
+      case CURL_EMPTY:
+        tn->himq[option] = CURL_OPPOSITE;
+        break;
+      case CURL_OPPOSITE:
         break;
+      }
+      break;
     }
   }
 }
@@ -427,52 +441,47 @@ static
 void rec_will(struct connectdata *conn, int option)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  switch(tn->him[option])
-  {
-    case CURL_NO:
-      if(tn->him_preferred[option] == CURL_YES)
-      {
-        tn->him[option] = CURL_YES;
-        send_negotiation(conn, CURL_DO, option);
-      }
-      else
-      {
-        send_negotiation(conn, CURL_DONT, option);
-      }
-      break;
+  switch(tn->him[option]) {
+  case CURL_NO:
+    if(tn->him_preferred[option] == CURL_YES) {
+      tn->him[option] = CURL_YES;
+      send_negotiation(conn, CURL_DO, option);
+    }
+    else
+      send_negotiation(conn, CURL_DONT, option);
 
-    case CURL_YES:
-      /* Already enabled */
-      break;
+    break;
 
-    case CURL_WANTNO:
-      switch(tn->himq[option])
-      {
-        case CURL_EMPTY:
-          /* Error: DONT answered by WILL */
-          tn->him[option] = CURL_NO;
-          break;
-        case CURL_OPPOSITE:
-          /* Error: DONT answered by WILL */
-          tn->him[option] = CURL_YES;
-          tn->himq[option] = CURL_EMPTY;
-          break;
-      }
+  case CURL_YES:
+    /* Already enabled */
+    break;
+
+  case CURL_WANTNO:
+    switch(tn->himq[option]) {
+    case CURL_EMPTY:
+      /* Error: DONT answered by WILL */
+      tn->him[option] = CURL_NO;
+      break;
+    case CURL_OPPOSITE:
+      /* Error: DONT answered by WILL */
+      tn->him[option] = CURL_YES;
+      tn->himq[option] = CURL_EMPTY;
       break;
+    }
+    break;
 
-    case CURL_WANTYES:
-      switch(tn->himq[option])
-      {
-        case CURL_EMPTY:
-          tn->him[option] = CURL_YES;
-          break;
-        case CURL_OPPOSITE:
-          tn->him[option] = CURL_WANTNO;
-          tn->himq[option] = CURL_EMPTY;
-          send_negotiation(conn, CURL_DONT, option);
-          break;
-      }
+  case CURL_WANTYES:
+    switch(tn->himq[option]) {
+    case CURL_EMPTY:
+      tn->him[option] = CURL_YES;
       break;
+    case CURL_OPPOSITE:
+      tn->him[option] = CURL_WANTNO;
+      tn->himq[option] = CURL_EMPTY;
+      send_negotiation(conn, CURL_DONT, option);
+      break;
+    }
+    break;
   }
 }
 
@@ -480,44 +489,41 @@ static
 void rec_wont(struct connectdata *conn, int option)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  switch(tn->him[option])
-  {
-    case CURL_NO:
-      /* Already disabled */
-      break;
+  switch(tn->him[option]) {
+  case CURL_NO:
+    /* Already disabled */
+    break;
 
-    case CURL_YES:
+  case CURL_YES:
+    tn->him[option] = CURL_NO;
+    send_negotiation(conn, CURL_DONT, option);
+    break;
+
+  case CURL_WANTNO:
+    switch(tn->himq[option]) {
+    case CURL_EMPTY:
       tn->him[option] = CURL_NO;
-      send_negotiation(conn, CURL_DONT, option);
       break;
 
-    case CURL_WANTNO:
-      switch(tn->himq[option])
-      {
-        case CURL_EMPTY:
-          tn->him[option] = CURL_NO;
-          break;
-
-        case CURL_OPPOSITE:
-          tn->him[option] = CURL_WANTYES;
-          tn->himq[option] = CURL_EMPTY;
-          send_negotiation(conn, CURL_DO, option);
-          break;
-      }
+    case CURL_OPPOSITE:
+      tn->him[option] = CURL_WANTYES;
+      tn->himq[option] = CURL_EMPTY;
+      send_negotiation(conn, CURL_DO, option);
       break;
+    }
+    break;
 
-    case CURL_WANTYES:
-      switch(tn->himq[option])
-      {
-        case CURL_EMPTY:
-          tn->him[option] = CURL_NO;
-          break;
-        case CURL_OPPOSITE:
-          tn->him[option] = CURL_NO;
-          tn->himq[option] = CURL_EMPTY;
-          break;
-      }
+  case CURL_WANTYES:
+    switch(tn->himq[option]) {
+    case CURL_EMPTY:
+      tn->him[option] = CURL_NO;
+      break;
+    case CURL_OPPOSITE:
+      tn->him[option] = CURL_NO;
+      tn->himq[option] = CURL_EMPTY;
       break;
+    }
+    break;
   }
 }
 
@@ -525,80 +531,72 @@ static void
 set_local_option(struct connectdata *conn, int option, int newstate)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  if(newstate == CURL_YES)
-  {
-    switch(tn->us[option])
-    {
-      case CURL_NO:
-        tn->us[option] = CURL_WANTYES;
-        send_negotiation(conn, CURL_WILL, option);
-        break;
+  if(newstate == CURL_YES) {
+    switch(tn->us[option]) {
+    case CURL_NO:
+      tn->us[option] = CURL_WANTYES;
+      send_negotiation(conn, CURL_WILL, option);
+      break;
 
-      case CURL_YES:
-        /* Already enabled */
-        break;
+    case CURL_YES:
+      /* Already enabled */
+      break;
 
-      case CURL_WANTNO:
-        switch(tn->usq[option])
-        {
-          case CURL_EMPTY:
-            /* Already negotiating for CURL_YES, queue the request */
-            tn->usq[option] = CURL_OPPOSITE;
-            break;
-          case CURL_OPPOSITE:
-            /* Error: already queued an enable request */
-            break;
-        }
+    case CURL_WANTNO:
+      switch(tn->usq[option]) {
+      case CURL_EMPTY:
+        /* Already negotiating for CURL_YES, queue the request */
+        tn->usq[option] = CURL_OPPOSITE;
         break;
+      case CURL_OPPOSITE:
+        /* Error: already queued an enable request */
+        break;
+      }
+      break;
 
-      case CURL_WANTYES:
-        switch(tn->usq[option])
-        {
-          case CURL_EMPTY:
-            /* Error: already negotiating for enable */
-            break;
-          case CURL_OPPOSITE:
-            tn->usq[option] = CURL_EMPTY;
-            break;
-        }
+    case CURL_WANTYES:
+      switch(tn->usq[option]) {
+      case CURL_EMPTY:
+        /* Error: already negotiating for enable */
         break;
+      case CURL_OPPOSITE:
+        tn->usq[option] = CURL_EMPTY;
+        break;
+      }
+      break;
     }
   }
-  else /* NO */
-  {
-    switch(tn->us[option])
-    {
-      case CURL_NO:
-        /* Already disabled */
-        break;
+  else { /* NO */
+    switch(tn->us[option]) {
+    case CURL_NO:
+      /* Already disabled */
+      break;
 
-      case CURL_YES:
-        tn->us[option] = CURL_WANTNO;
-        send_negotiation(conn, CURL_WONT, option);
-        break;
+    case CURL_YES:
+      tn->us[option] = CURL_WANTNO;
+      send_negotiation(conn, CURL_WONT, option);
+      break;
 
-      case CURL_WANTNO:
-        switch(tn->usq[option])
-        {
-          case CURL_EMPTY:
-            /* Already negotiating for NO */
-            break;
-          case CURL_OPPOSITE:
-            tn->usq[option] = CURL_EMPTY;
-            break;
-        }
+    case CURL_WANTNO:
+      switch(tn->usq[option]) {
+      case CURL_EMPTY:
+        /* Already negotiating for NO */
         break;
+      case CURL_OPPOSITE:
+        tn->usq[option] = CURL_EMPTY;
+        break;
+      }
+      break;
 
-      case CURL_WANTYES:
-        switch(tn->usq[option])
-        {
-          case CURL_EMPTY:
-            tn->usq[option] = CURL_OPPOSITE;
-            break;
-          case CURL_OPPOSITE:
-            break;
-        }
+    case CURL_WANTYES:
+      switch(tn->usq[option]) {
+      case CURL_EMPTY:
+        tn->usq[option] = CURL_OPPOSITE;
+        break;
+      case CURL_OPPOSITE:
         break;
+      }
+      break;
     }
   }
 }
@@ -607,52 +605,59 @@ static
 void rec_do(struct connectdata *conn, int option)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  switch(tn->us[option])
-  {
-    case CURL_NO:
-      if(tn->us_preferred[option] == CURL_YES)
-      {
-        tn->us[option] = CURL_YES;
-        send_negotiation(conn, CURL_WILL, option);
-      }
-      else
-      {
-        send_negotiation(conn, CURL_WONT, option);
-      }
-      break;
+  switch(tn->us[option]) {
+  case CURL_NO:
+    if(tn->us_preferred[option] == CURL_YES) {
+      tn->us[option] = CURL_YES;
+      send_negotiation(conn, CURL_WILL, option);
+      if(tn->subnegotiation[option] == CURL_YES)
+        /* transmission of data option */
+        sendsuboption(conn, option);
+    }
+    else if(tn->subnegotiation[option] == CURL_YES) {
+      /* send information to achieve this option*/
+      tn->us[option] = CURL_YES;
+      send_negotiation(conn, CURL_WILL, option);
+      sendsuboption(conn, option);
+    }
+    else
+      send_negotiation(conn, CURL_WONT, option);
+    break;
 
-    case CURL_YES:
-      /* Already enabled */
-      break;
+  case CURL_YES:
+    /* Already enabled */
+    break;
 
-    case CURL_WANTNO:
-      switch(tn->usq[option])
-      {
-        case CURL_EMPTY:
-          /* Error: DONT answered by WILL */
-          tn->us[option] = CURL_NO;
-          break;
-        case CURL_OPPOSITE:
-          /* Error: DONT answered by WILL */
-          tn->us[option] = CURL_YES;
-          tn->usq[option] = CURL_EMPTY;
-          break;
-      }
+  case CURL_WANTNO:
+    switch(tn->usq[option]) {
+    case CURL_EMPTY:
+      /* Error: DONT answered by WILL */
+      tn->us[option] = CURL_NO;
+      break;
+    case CURL_OPPOSITE:
+      /* Error: DONT answered by WILL */
+      tn->us[option] = CURL_YES;
+      tn->usq[option] = CURL_EMPTY;
       break;
+    }
+    break;
 
-    case CURL_WANTYES:
-      switch(tn->usq[option])
-      {
-        case CURL_EMPTY:
-          tn->us[option] = CURL_YES;
-          break;
-        case CURL_OPPOSITE:
-          tn->us[option] = CURL_WANTNO;
-          tn->himq[option] = CURL_EMPTY;
-          send_negotiation(conn, CURL_WONT, option);
-          break;
+  case CURL_WANTYES:
+    switch(tn->usq[option]) {
+    case CURL_EMPTY:
+      tn->us[option] = CURL_YES;
+      if(tn->subnegotiation[option] == CURL_YES) {
+        /* transmission of data option */
+        sendsuboption(conn, option);
       }
       break;
+    case CURL_OPPOSITE:
+      tn->us[option] = CURL_WANTNO;
+      tn->himq[option] = CURL_EMPTY;
+      send_negotiation(conn, CURL_WONT, option);
+      break;
+    }
+    break;
   }
 }
 
@@ -660,44 +665,41 @@ static
 void rec_dont(struct connectdata *conn, int option)
 {
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
-  switch(tn->us[option])
-  {
-    case CURL_NO:
-      /* Already disabled */
-      break;
+  switch(tn->us[option]) {
+  case CURL_NO:
+    /* Already disabled */
+    break;
 
-    case CURL_YES:
+  case CURL_YES:
+    tn->us[option] = CURL_NO;
+    send_negotiation(conn, CURL_WONT, option);
+    break;
+
+  case CURL_WANTNO:
+    switch(tn->usq[option]) {
+    case CURL_EMPTY:
       tn->us[option] = CURL_NO;
-      send_negotiation(conn, CURL_WONT, option);
       break;
 
-    case CURL_WANTNO:
-      switch(tn->usq[option])
-      {
-        case CURL_EMPTY:
-          tn->us[option] = CURL_NO;
-          break;
-
-        case CURL_OPPOSITE:
-          tn->us[option] = CURL_WANTYES;
-          tn->usq[option] = CURL_EMPTY;
-          send_negotiation(conn, CURL_WILL, option);
-          break;
-      }
+    case CURL_OPPOSITE:
+      tn->us[option] = CURL_WANTYES;
+      tn->usq[option] = CURL_EMPTY;
+      send_negotiation(conn, CURL_WILL, option);
       break;
+    }
+    break;
 
-    case CURL_WANTYES:
-      switch(tn->usq[option])
-      {
-        case CURL_EMPTY:
-          tn->us[option] = CURL_NO;
-          break;
-        case CURL_OPPOSITE:
-          tn->us[option] = CURL_NO;
-          tn->usq[option] = CURL_EMPTY;
-          break;
-      }
+  case CURL_WANTYES:
+    switch(tn->usq[option]) {
+    case CURL_EMPTY:
+      tn->us[option] = CURL_NO;
       break;
+    case CURL_OPPOSITE:
+      tn->us[option] = CURL_NO;
+      tn->usq[option] = CURL_EMPTY;
+      break;
+    }
+    break;
   }
 }
 
@@ -708,21 +710,18 @@ static void printsub(struct SessionHandle *data,
                      size_t length)             /* length of suboption data */
 {
   unsigned int i = 0;
+  unsigned short *pval;
 
-  if(data->set.verbose)
-  {
-    if(direction)
-    {
+  if(data->set.verbose) {
+    if(direction) {
       infof(data, "%s IAC SB ", (direction == '<')? "RCVD":"SENT");
-      if(length >= 3)
-      {
+      if(length >= 3) {
         int j;
 
         i = pointer[length-2];
         j = pointer[length-1];
 
-        if(i != CURL_IAC || j != CURL_SE)
-        {
+        if(i != CURL_IAC || j != CURL_SE) {
           infof(data, "(terminated by ");
           if(CURL_TELOPT_OK(i))
             infof(data, "%s ", CURL_TELOPT(i));
@@ -741,28 +740,35 @@ static void printsub(struct SessionHandle *data,
       }
       length -= 2;
     }
-    if(length < 1)
-    {
+    if(length < 1) {
       infof(data, "(Empty suboption?)");
       return;
     }
 
     if(CURL_TELOPT_OK(pointer[0])) {
       switch(pointer[0]) {
-        case CURL_TELOPT_TTYPE:
-        case CURL_TELOPT_XDISPLOC:
-        case CURL_TELOPT_NEW_ENVIRON:
-          infof(data, "%s", CURL_TELOPT(pointer[0]));
-          break;
-        default:
-          infof(data, "%s (unsupported)", CURL_TELOPT(pointer[0]));
-          break;
+      case CURL_TELOPT_TTYPE:
+      case CURL_TELOPT_XDISPLOC:
+      case CURL_TELOPT_NEW_ENVIRON:
+      case CURL_TELOPT_NAWS:
+        infof(data, "%s", CURL_TELOPT(pointer[0]));
+        break;
+      default:
+        infof(data, "%s (unsupported)", CURL_TELOPT(pointer[0]));
+        break;
       }
     }
     else
       infof(data, "%d (unknown)", pointer[i]);
 
-    switch(pointer[1]) {
+    switch(pointer[0]) {
+    case CURL_TELOPT_NAWS:
+      pval = (unsigned short*)(pointer+1);
+      infof(data, "Width: %hu ; Height: %hu",
+            ntohs(pval[0]), ntohs(pval[1]));
+      break;
+    default:
+      switch(pointer[1]) {
       case CURL_TELQUAL_IS:
         infof(data, " IS");
         break;
@@ -775,9 +781,9 @@ static void printsub(struct SessionHandle *data,
       case CURL_TELQUAL_NAME:
         infof(data, " NAME");
         break;
-    }
+      }
 
-    switch(pointer[0]) {
+      switch(pointer[0]) {
       case CURL_TELOPT_TTYPE:
       case CURL_TELOPT_XDISPLOC:
         pointer[length] = 0;
@@ -788,48 +794,52 @@ static void printsub(struct SessionHandle *data,
           infof(data, " ");
           for(i = 3;i < length;i++) {
             switch(pointer[i]) {
-              case CURL_NEW_ENV_VAR:
-                infof(data, ", ");
-                break;
-              case CURL_NEW_ENV_VALUE:
-                infof(data, " = ");
-                break;
-              default:
-                infof(data, "%c", pointer[i]);
-                break;
+            case CURL_NEW_ENV_VAR:
+              infof(data, ", ");
+              break;
+            case CURL_NEW_ENV_VALUE:
+              infof(data, " = ");
+              break;
+            default:
+              infof(data, "%c", pointer[i]);
+              break;
             }
           }
         }
         break;
       default:
-        for (i = 2; i < length; i++)
+        for(i = 2; i < length; i++)
           infof(data, " %.2x", pointer[i]);
         break;
+      }
     }
-
     if(direction)
-    {
       infof(data, "\n");
-    }
   }
 }
 
 static CURLcode check_telnet_options(struct connectdata *conn)
 {
   struct curl_slist *head;
+  struct curl_slist *beg;
   char option_keyword[128];
   char option_arg[256];
-  char *buf;
   struct SessionHandle *data = conn->data;
   struct TELNET *tn = (struct TELNET *)conn->data->state.proto.telnet;
+  CURLcode result = CURLE_OK;
+  int binary_option;
 
   /* Add the user name as an environment variable if it
      was given on the command line */
-  if(conn->bits.user_passwd)
-  {
+  if(conn->bits.user_passwd) {
     snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user);
-    tn->telnet_vars = curl_slist_append(tn->telnet_vars, option_arg);
-
+    beg = curl_slist_append(tn->telnet_vars, option_arg);
+    if(!beg) {
+      curl_slist_free_all(tn->telnet_vars);
+      tn->telnet_vars = NULL;
+      return CURLE_OUT_OF_MEMORY;
+    }
+    tn->telnet_vars = beg;
     tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;
   }
 
@@ -855,23 +865,56 @@ static CURLcode check_telnet_options(struct connectdata *conn)
 
       /* Environment variable */
       if(Curl_raw_equal(option_keyword, "NEW_ENV")) {
-        buf = strdup(option_arg);
-        if(!buf)
-          return CURLE_OUT_OF_MEMORY;
-        tn->telnet_vars = curl_slist_append(tn->telnet_vars, buf);
+        beg = curl_slist_append(tn->telnet_vars, option_arg);
+        if(!beg) {
+          result = CURLE_OUT_OF_MEMORY;
+          break;
+        }
+        tn->telnet_vars = beg;
         tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES;
         continue;
       }
 
+          /* Window Size */
+      if(Curl_raw_equal(option_keyword, "WS")) {
+        if(sscanf(option_arg, "%hu%*[xX]%hu",
+                  &tn->subopt_wsx, &tn->subopt_wsy) == 2)
+          tn->us_preferred[CURL_TELOPT_NAWS] = CURL_YES;
+        else {
+          failf(data, "Syntax error in telnet option: %s", head->data);
+          result = CURLE_TELNET_OPTION_SYNTAX;
+          break;
+        }
+        continue;
+      }
+
+      /* To take care or not of the 8th bit in data exchange */
+      if(Curl_raw_equal(option_keyword, "BINARY")) {
+        binary_option=atoi(option_arg);
+        if(binary_option!=1) {
+          tn->us_preferred[CURL_TELOPT_BINARY] = CURL_NO;
+          tn->him_preferred[CURL_TELOPT_BINARY] = CURL_NO;
+        }
+        continue;
+      }
+
       failf(data, "Unknown telnet option %s", head->data);
-      return CURLE_UNKNOWN_TELNET_OPTION;
-    } else {
+      result = CURLE_UNKNOWN_TELNET_OPTION;
+      break;
+    }
+    else {
       failf(data, "Syntax error in telnet option: %s", head->data);
-      return CURLE_TELNET_OPTION_SYNTAX;
+      result = CURLE_TELNET_OPTION_SYNTAX;
+      break;
     }
   }
 
-  return CURLE_OK;
+  if(result) {
+    curl_slist_free_all(tn->telnet_vars);
+    tn->telnet_vars = NULL;
+  }
+
+  return result;
 }
 
 /*
@@ -951,6 +994,69 @@ static void suboption(struct connectdata *conn)
   return;
 }
 
+
+/*
+ * sendsuboption()
+ *
+ * Send suboption information to the server side.
+ */
+
+static void sendsuboption(struct connectdata *conn, int option)
+{
+  ssize_t bytes_written;
+  int err;
+  unsigned short x, y;
+  unsigned char*uc1, *uc2;
+
+  struct SessionHandle *data = conn->data;
+  struct TELNET *tn = (struct TELNET *)data->state.proto.telnet;
+
+  switch (option) {
+  case CURL_TELOPT_NAWS:
+    /* We prepare data to be sent */
+    CURL_SB_CLEAR(tn);
+    CURL_SB_ACCUM(tn, CURL_IAC);
+    CURL_SB_ACCUM(tn, CURL_SB);
+    CURL_SB_ACCUM(tn, CURL_TELOPT_NAWS);
+    /* We must deal either with litte or big endien processors */
+    /* Window size must be sent according to the 'network order' */
+    x=htons(tn->subopt_wsx);
+    y=htons(tn->subopt_wsy);
+    uc1 = (unsigned char*)&x;
+    uc2 = (unsigned char*)&y;
+    CURL_SB_ACCUM(tn, uc1[0]);
+    CURL_SB_ACCUM(tn, uc1[1]);
+    CURL_SB_ACCUM(tn, uc2[0]);
+    CURL_SB_ACCUM(tn, uc2[1]);
+
+    CURL_SB_ACCUM(tn, CURL_IAC);
+    CURL_SB_ACCUM(tn, CURL_SE);
+    CURL_SB_TERM(tn);
+    /* data suboption is now ready */
+
+    printsub(data, '>', (unsigned char *)tn->subbuffer+2,
+             CURL_SB_LEN(tn)-2);
+
+    /* we send the header of the suboption... */
+    bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer, 3);
+    if(bytes_written < 0) {
+      err = SOCKERRNO;
+      failf(data, "Sending data failed (%d)", err);
+    }
+    /* ... then the window size with the send_telnet_data() function
+       to deal with 0xFF cases ... */
+    send_telnet_data(conn, (char *)tn->subbuffer+3, 4);
+    /* ... and the footer */
+    bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer+7, 2);
+    if(bytes_written < 0) {
+      err = SOCKERRNO;
+      failf(data, "Sending data failed (%d)", err);
+    }
+    break;
+  }
+}
+
+
 static
 CURLcode telrcv(struct connectdata *conn,
                 const unsigned char *inbuf, /* Data received from socket */
@@ -980,69 +1086,61 @@ CURLcode telrcv(struct connectdata *conn,
 
 #define bufferflush() startskipping()
 
-  while(count--)
-  {
+  while(count--) {
     c = inbuf[in];
 
-    /*infof(data,"In rcv state %d char %d\n", tn->telrcv_state, c);*/
-    switch (tn->telrcv_state)
-    {
-      case CURL_TS_CR:
-        tn->telrcv_state = CURL_TS_DATA;
-        if(c == '\0')
-        {
-          startskipping();
-          break;   /* Ignore \0 after CR */
-        }
-        writebyte();
-        break;
+    switch (tn->telrcv_state) {
+    case CURL_TS_CR:
+      tn->telrcv_state = CURL_TS_DATA;
+      if(c == '\0') {
+        startskipping();
+        break;   /* Ignore \0 after CR */
+      }
+      writebyte();
+      break;
 
-      case CURL_TS_DATA:
-        if(c == CURL_IAC)
-        {
-          tn->telrcv_state = CURL_TS_IAC;
-          startskipping();
-          break;
-        }
-        else if(c == '\r')
-        {
-          tn->telrcv_state = CURL_TS_CR;
-        }
-        writebyte();
+    case CURL_TS_DATA:
+      if(c == CURL_IAC) {
+        tn->telrcv_state = CURL_TS_IAC;
+        startskipping();
         break;
+      }
+      else if(c == '\r')
+        tn->telrcv_state = CURL_TS_CR;
+      writebyte();
+      break;
 
-      case CURL_TS_IAC:
-      process_iac:
+    case CURL_TS_IAC:
+    process_iac:
       DEBUGASSERT(startwrite < 0);
-      switch (c)
-      {
-        case CURL_WILL:
-          tn->telrcv_state = CURL_TS_WILL;
-          break;
-        case CURL_WONT:
-          tn->telrcv_state = CURL_TS_WONT;
-          break;
-        case CURL_DO:
-          tn->telrcv_state = CURL_TS_DO;
-          break;
-        case CURL_DONT:
-          tn->telrcv_state = CURL_TS_DONT;
-          break;
-        case CURL_SB:
-          CURL_SB_CLEAR(tn);
-          tn->telrcv_state = CURL_TS_SB;
-          break;
-        case CURL_IAC:
-          tn->telrcv_state = CURL_TS_DATA;
-          writebyte();
-          break;
-        case CURL_DM:
-        case CURL_NOP:
-        case CURL_GA:
-        default:
-          tn->telrcv_state = CURL_TS_DATA;
-          printoption(data, "RCVD", CURL_IAC, c);
-          break;
+      switch (c) {
+      case CURL_WILL:
+        tn->telrcv_state = CURL_TS_WILL;
+        break;
+      case CURL_WONT:
+        tn->telrcv_state = CURL_TS_WONT;
+        break;
+      case CURL_DO:
+        tn->telrcv_state = CURL_TS_DO;
+        break;
+      case CURL_DONT:
+        tn->telrcv_state = CURL_TS_DONT;
+        break;
+      case CURL_SB:
+        CURL_SB_CLEAR(tn);
+        tn->telrcv_state = CURL_TS_SB;
+        break;
+      case CURL_IAC:
+        tn->telrcv_state = CURL_TS_DATA;
+        writebyte();
+        break;
+      case CURL_DM:
+      case CURL_NOP:
+      case CURL_GA:
+      default:
+        tn->telrcv_state = CURL_TS_DATA;
+        printoption(data, "RCVD", CURL_IAC, c);
+        break;
       }
       break;
 
@@ -1076,23 +1174,17 @@ CURLcode telrcv(struct connectdata *conn,
 
       case CURL_TS_SB:
         if(c == CURL_IAC)
-        {
           tn->telrcv_state = CURL_TS_SE;
-        }
         else
-        {
           CURL_SB_ACCUM(tn,c);
-        }
         break;
 
       case CURL_TS_SE:
-        if(c != CURL_SE)
-        {
-          if(c != CURL_IAC)
-          {
+        if(c != CURL_SE) {
+          if(c != CURL_IAC) {
             /*
              * This is an error.  We only expect to get "IAC IAC" or "IAC SE".
-             * Several things may have happend.  An IAC was not doubled, the
+             * Several things may have happened.  An IAC was not doubled, the
              * IAC SE was left off, or another option got inserted into the
              * suboption are all possibilities.  If we assume that the IAC was
              * not doubled, and really the IAC SE was left off, we could get
@@ -1164,7 +1256,7 @@ static CURLcode send_telnet_data(struct connectdata *conn,
           break;
       }
     /* handle partial write */
-    } while (rc == CURLE_OK && total_written < out_count);
+    } while(rc == CURLE_OK && total_written < out_count);
   }
   return rc;
 }
@@ -1176,10 +1268,13 @@ static CURLcode telnet_done(struct connectdata *conn,
   (void)status; /* unused */
   (void)premature; /* not used */
 
+  if(!tn)
+    return CURLE_OK;
+
   curl_slist_free_all(tn->telnet_vars);
+  tn->telnet_vars = NULL;
 
-  free(conn->data->state.proto.telnet);
-  conn->data->state.proto.telnet = NULL;
+  Curl_safefree(conn->data->state.proto.telnet);
 
   return CURLE_OK;
 }
@@ -1240,7 +1335,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
 
   /* OK, so we have WinSock 2.0.  We need to dynamically */
   /* load ws2_32.dll and get the function pointers we need. */
-  wsock2 = LoadLibrary("WS2_32.DLL");
+  wsock2 = LoadLibrary(TEXT("WS2_32.DLL"));
   if(wsock2 == NULL) {
     failf(data,"failed to load WS2_32.DLL (%d)", ERRNO);
     return CURLE_FAILED_INIT;
@@ -1295,6 +1390,14 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
     return CURLE_FAILED_INIT;
   }
 
+  /* Tell winsock what events we want to listen to */
+  if(event_select_func(sockfd, event_handle, FD_READ|FD_CLOSE) ==
+     SOCKET_ERROR) {
+    close_event_func(event_handle);
+    FreeLibrary(wsock2);
+    return CURLE_OK;
+  }
+
   /* The get the Windows file handle for stdin */
   stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
 
@@ -1302,21 +1405,16 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
   objs[0] = event_handle;
   objs[1] = stdin_handle;
 
-  /* Tell winsock what events we want to listen to */
-  if(event_select_func(sockfd, event_handle, FD_READ|FD_CLOSE) == SOCKET_ERROR) {
-    close_event_func(event_handle);
-    FreeLibrary(wsock2);
-    return CURLE_OK;
-  }
-
   /* If stdin_handle is a pipe, use PeekNamedPipe() method to check it,
      else use the old WaitForMultipleObjects() way */
-  if(GetFileType(stdin_handle) == FILE_TYPE_PIPE) {
+  if(GetFileType(stdin_handle) == FILE_TYPE_PIPE ||
+     data->set.is_fread_set) {
     /* Don't wait for stdin_handle, just wait for event_handle */
     obj_count = 1;
     /* Check stdin_handle per 100 milliseconds */
     wait_timeout = 100;
-  } else {
+  }
+  else {
     obj_count = 2;
     wait_timeout = 1000;
   }
@@ -1328,20 +1426,41 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
     case WAIT_TIMEOUT:
     {
       for(;;) {
-        if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL, &readfile_read, NULL)) {
-          keepon = FALSE;
-          code = CURLE_READ_ERROR;
-          break;
+        if(obj_count == 1) {
+          /* read from user-supplied method */
+          code = (int)conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in);
+          if(code == CURL_READFUNC_ABORT) {
+            keepon = FALSE;
+            code = CURLE_READ_ERROR;
+            break;
+          }
+
+          if(code == CURL_READFUNC_PAUSE)
+            break;
+
+          if(code == 0)                        /* no bytes */
+            break;
+
+          readfile_read = code; /* fall thru with number of bytes read */
         }
+        else {
+          /* read from stdin */
+          if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL,
+                            &readfile_read, NULL)) {
+            keepon = FALSE;
+            code = CURLE_READ_ERROR;
+            break;
+          }
 
-        if(!readfile_read)
-          break;
+          if(!readfile_read)
+            break;
 
-        if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
-                     &readfile_read, NULL)) {
-          keepon = FALSE;
-          code = CURLE_READ_ERROR;
-          break;
+          if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
+                       &readfile_read, NULL)) {
+            keepon = FALSE;
+            code = CURLE_READ_ERROR;
+            break;
+          }
         }
 
         code = send_telnet_data(conn, buf, readfile_read);
@@ -1430,7 +1549,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
   }
 
   /* We called WSACreateEvent, so call WSACloseEvent */
-  if(close_event_func(event_handle) == FALSE) {
+  if(!close_event_func(event_handle)) {
     infof(data,"WSACloseEvent failed (%d)", SOCKERRNO);
   }
 
@@ -1447,12 +1566,13 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
   pfd[0].fd = sockfd;
   pfd[0].events = POLLIN;
 
-  if (data->set.is_fread_set) {
+  if(conn->fread_func != (curl_read_callback)fread) {
     poll_cnt = 1;
     interval_ms = 100; /* poll user-supplied read function */
   }
   else {
-    pfd[1].fd = 0;
+    /* really using fread, so infile is a FILE* */
+    pfd[1].fd = fileno((FILE *)conn->fread_in);
     pfd[1].events = POLLIN;
     poll_cnt = 2;
     interval_ms = 1 * 1000;
@@ -1504,23 +1624,23 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
       }
 
       nread = 0;
-      if (poll_cnt == 2) {
-        if(pfd[1].revents & POLLIN) { /* read from stdin */
-          nread = read(0, buf, BUFSIZE - 1);
+      if(poll_cnt == 2) {
+        if(pfd[1].revents & POLLIN) { /* read from in file */
+          nread = read(pfd[1].fd, buf, BUFSIZE - 1);
         }
       }
       else {
         /* read from user-supplied method */
         nread = (int)conn->fread_func(buf, 1, BUFSIZE - 1, conn->fread_in);
-        if (nread == CURL_READFUNC_ABORT) {
+        if(nread == CURL_READFUNC_ABORT) {
           keepon = FALSE;
           break;
         }
-        if (nread == CURL_READFUNC_PAUSE)
+        if(nread == CURL_READFUNC_PAUSE)
           break;
       }
 
-      if (nread > 0) {
+      if(nread > 0) {
         code = send_telnet_data(conn, buf, nread);
         if(code) {
           keepon = FALSE;
@@ -1529,7 +1649,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
         total_ul += nread;
         Curl_pgrsSetUploadCounter(data, total_ul);
       }
-      else if (nread < 0)
+      else if(nread < 0)
         keepon = FALSE;
 
       break;
@@ -1545,8 +1665,8 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
     }
 
     if(Curl_pgrsUpdate(conn)) {
-       code = CURLE_ABORTED_BY_CALLBACK;
-       break;
+      code = CURLE_ABORTED_BY_CALLBACK;
+      break;
     }
   }
 #endif
index f00f7fd..ddb9e54 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __TELNET_H
-#define __TELNET_H
-
+#ifndef HEADER_CURL_TELNET_H
+#define HEADER_CURL_TELNET_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -25,4 +24,6 @@
 #ifndef CURL_DISABLE_TELNET
 extern const struct Curl_handler Curl_handler_telnet;
 #endif
-#endif
+
+#endif /* HEADER_CURL_TELNET_H */
+
index fc741c9..ef740b8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #ifndef CURL_DISABLE_TFTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#if defined(WIN32)
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
 #endif
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
@@ -58,8 +44,6 @@
 #include <sys/param.h>
 #endif
 
-#endif /* WIN32 */
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "transfer.h"
@@ -166,7 +150,8 @@ typedef struct tftp_state_data {
 static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) ;
 static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) ;
 static CURLcode tftp_connect(struct connectdata *conn, bool *done);
-static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection);
+static CURLcode tftp_disconnect(struct connectdata *conn,
+                                bool dead_connection);
 static CURLcode tftp_do(struct connectdata *conn, bool *done);
 static CURLcode tftp_done(struct connectdata *conn,
                           CURLcode, bool premature);
@@ -193,10 +178,13 @@ const struct Curl_handler Curl_handler_tftp = {
   tftp_doing,                           /* doing */
   tftp_getsock,                         /* proto_getsock */
   tftp_getsock,                         /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   tftp_disconnect,                      /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   PORT_TFTP,                            /* defport */
-  PROT_TFTP                             /* protocol */
+  CURLPROTO_TFTP,                       /* protocol */
+  PROTOPT_NONE | PROTOPT_NOURLQUERY     /* flags */
 };
 
 /**********************************************************
@@ -213,12 +201,12 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state)
 {
   time_t maxtime, timeout;
   long timeout_ms;
-  bool start = (bool)(state->state == TFTP_STATE_START);
+  bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE;
 
   time(&state->start_time);
 
   /* Compute drop-dead time */
-  timeout_ms = Curl_timeleft(state->conn, NULL, start);
+  timeout_ms = Curl_timeleft(state->conn->data, NULL, start);
 
   if(timeout_ms < 0) {
     /* time-out, bail out, go home */
@@ -255,11 +243,11 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state)
 
     state->max_time = state->start_time+maxtime;
 
-    /* Set per-block timeout to 10% of total */
-    timeout = maxtime/10 ;
+    /* Set per-block timeout to total */
+    timeout = maxtime;
 
-    /* Average reposting an ACK after 15 seconds */
-    state->retry_max = (int)timeout/15;
+    /* Average reposting an ACK after 5 seconds */
+    state->retry_max = (int)timeout/5;
   }
   /* But bound the total number */
   if(state->retry_max<3)
@@ -329,14 +317,14 @@ static const char *tftp_option_get(const char *buf, size_t len,
   loc = Curl_strnlen( buf, len );
   loc++; /* NULL term */
 
-  if (loc >= len)
+  if(loc >= len)
     return NULL;
   *option = buf;
 
   loc += Curl_strnlen( buf+loc, len-loc );
   loc++; /* NULL term */
 
-  if (loc > len)
+  if(loc > len)
     return NULL;
   *value = &buf[strlen(*option) + 1];
 
@@ -352,7 +340,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
   /* if OACK doesn't contain blksize option, the default (512) must be used */
   state->blksize = TFTP_BLKSIZE_DEFAULT;
 
-  while (tmp < ptr + len) {
+  while(tmp < ptr + len) {
     const char *option, *value;
 
     tmp = tftp_option_get(tmp, ptr + len - tmp, &option, &value);
@@ -382,7 +370,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
               TFTP_BLKSIZE_MIN);
         return CURLE_TFTP_ILLEGAL;
       }
-      else if (blksize > state->requested_blksize) {
+      else if(blksize > state->requested_blksize) {
         /* could realloc pkt buffers here, but the spec doesn't call out
          * support for the server requesting a bigger blksize than the client
          * requests */
@@ -403,7 +391,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
 
       /* tsize should be ignored on upload: Who cares about the size of the
          remote file? */
-      if (!data->set.upload) {
+      if(!data->set.upload) {
         if(!tsize) {
           failf(data, "invalid tsize -:%s:- value in OACK packet", value);
           return CURLE_TFTP_ILLEGAL;
@@ -419,7 +407,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
 static size_t tftp_option_add(tftp_state_data_t *state, size_t csize,
                               char *buf, const char *option)
 {
-  if( ( strlen(option) + csize + 1 ) > (size_t)state->blksize )
+  if(( strlen(option) + csize + 1 ) > (size_t)state->blksize)
     return 0;
   strcpy(buf, option);
   return( strlen(option) + 1 );
@@ -597,21 +585,25 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
   case TFTP_EVENT_DATA:
     /* Is this the block we expect? */
     rblock = getrpacketblock(&state->rpacket);
-    if(NEXT_BLOCKNUM(state->block) != rblock) {
-      /* No, log it, up the retry count and fail if over the limit */
+    if(NEXT_BLOCKNUM(state->block) == rblock) {
+      /* This is the expected block.  Reset counters and ACK it. */
+      state->retries = 0;
+    }
+    else if(state->block == rblock) {
+      /* This is the last recently received block again. Log it and ACK it
+         again. */
+      infof(data, "Received last DATA packet block %d again.\n", rblock);
+    }
+    else {
+      /* totally unexpected, just log it */
       infof(data,
-            "Received unexpected DATA packet block %d\n", rblock);
-      state->retries++;
-      if(state->retries > state->retry_max) {
-        failf(data, "tftp_rx: giving up waiting for block %d",
-              NEXT_BLOCKNUM(state->block));
-        return CURLE_TFTP_ILLEGAL;
-      }
+            "Received unexpected DATA packet block %d, expecting block %d\n",
+            rblock, NEXT_BLOCKNUM(state->block));
       break;
     }
-    /* This is the expected block.  Reset counters and ACK it. */
+
+    /* ACK this block. */
     state->block = (unsigned short)rblock;
-    state->retries = 0;
     setpacketevent(&state->spacket, TFTP_EVENT_ACK);
     setpacketblock(&state->spacket, state->block);
     sbytes = sendto(state->sockfd, (void *)state->spacket.data,
@@ -624,7 +616,7 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
     }
 
     /* Check if completed (That is, a less than full packet is received) */
-    if(state->rbytes < (ssize_t)state->blksize+4){
+    if(state->rbytes < (ssize_t)state->blksize+4) {
       state->state = TFTP_STATE_FIN;
     }
     else {
@@ -715,7 +707,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
 
   case TFTP_EVENT_ACK:
   case TFTP_EVENT_OACK:
-    if (event == TFTP_EVENT_ACK) {
+    if(event == TFTP_EVENT_ACK) {
       /* Ack the packet */
       rblock = getrpacketblock(&state->rpacket);
 
@@ -738,7 +730,7 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
         }
         else {
           /* Re-send the data packet */
-          sbytes = sendto(state->sockfd, (void *)&state->spacket.data,
+          sbytes = sendto(state->sockfd, (void *)state->spacket.data,
                           4+state->sbytes, SEND_4TH_ARG,
                           (struct sockaddr *)&state->remote_addr,
                           state->remote_addrlen);
@@ -1047,7 +1039,8 @@ static CURLcode tftp_done(struct connectdata *conn, CURLcode status,
   (void)status; /* unused */
   (void)premature; /* not used */
 
-  Curl_pgrsDone(conn);
+  if(Curl_pgrsDone(conn))
+    return CURLE_ABORTED_BY_CALLBACK;
 
   /* If we have encountered an error */
   code = tftp_translate_code(state->error);
@@ -1169,7 +1162,7 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
   time_t                current;
   tftp_state_data_t     *state = (tftp_state_data_t *)conn->proto.tftpc;
 
-  if (event)
+  if(event)
     *event = TFTP_EVENT_NONE;
 
   time(&current);
@@ -1180,8 +1173,8 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
     state->state = TFTP_STATE_FIN;
     return 0;
   }
-  else if (current > state->rx_time+state->retry_time) {
-    if (event)
+  else if(current > state->rx_time+state->retry_time) {
+    if(event)
       *event = TFTP_EVENT_TIMEOUT;
     time(&state->rx_time); /* update even though we received nothing */
   }
@@ -1192,130 +1185,6 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
   return (long)(state->max_time - current);
 }
 
-
-/**********************************************************
- *
- * tftp_easy_statemach
- *
- * Handle easy request until completion
- *
- **********************************************************/
-static CURLcode tftp_easy_statemach(struct connectdata *conn)
-{
-  int                   rc;
-  int                   check_time = 0;
-  CURLcode              result = CURLE_OK;
-  struct SessionHandle  *data = conn->data;
-  tftp_state_data_t     *state = (tftp_state_data_t *)conn->proto.tftpc;
-  curl_socket_t         fd_read;
-  long                  timeout_ms;
-  struct SingleRequest  *k = &data->req;
-  struct timeval        transaction_start = Curl_tvnow();
-
-  k->start = transaction_start;
-  k->now = transaction_start;
-
-  /* Run the TFTP State Machine */
-  for(; (state->state != TFTP_STATE_FIN) && (result == CURLE_OK); ) {
-
-    timeout_ms = state->retry_time * 1000;
-
-    if (data->set.upload) {
-      if (data->set.max_send_speed &&
-          (data->progress.ulspeed > data->set.max_send_speed)) {
-        fd_read = CURL_SOCKET_BAD;
-        timeout_ms = Curl_sleep_time(data->set.max_send_speed,
-                                     data->progress.ulspeed, state->blksize);
-      }
-      else {
-        fd_read = state->sockfd;
-      }
-    }
-    else {
-      if (data->set.max_recv_speed &&
-          (data->progress.dlspeed > data->set.max_recv_speed)) {
-        fd_read = CURL_SOCKET_BAD;
-        timeout_ms = Curl_sleep_time(data->set.max_recv_speed,
-                                     data->progress.dlspeed, state->blksize);
-      }
-      else {
-        fd_read = state->sockfd;
-      }
-    }
-
-    if(data->set.timeout) {
-      timeout_ms = data->set.timeout - Curl_tvdiff(k->now, k->start);
-      if (timeout_ms > state->retry_time * 1000)
-        timeout_ms = state->retry_time * 1000;
-      else if(timeout_ms < 0)
-        timeout_ms = 0;
-    }
-
-
-    /* Wait until ready to read or timeout occurs */
-    rc = Curl_socket_ready(fd_read, CURL_SOCKET_BAD, (int)(timeout_ms));
-
-    k->now = Curl_tvnow();
-
-    /* Force a progress callback if it's been too long */
-    if (Curl_tvdiff(k->now, k->start) >= data->set.timeout) {
-      if(Curl_pgrsUpdate(conn)) {
-        tftp_state_machine(state, TFTP_EVENT_ERROR);
-        return CURLE_ABORTED_BY_CALLBACK;
-      }
-      k->start = k->now;
-    }
-
-    if(rc == -1) {
-      /* bail out */
-      int error = SOCKERRNO;
-      failf(data, "%s", Curl_strerror(conn, error));
-      state->event = TFTP_EVENT_ERROR;
-    }
-    else {
-
-      if(rc==0) {
-        /* A timeout occured, but our timeout is variable, so maybe
-           just continue? */
-        long rtms = state->retry_time * 1000;
-        if (Curl_tvdiff(k->now, transaction_start) > rtms) {
-          state->event = TFTP_EVENT_TIMEOUT;
-          /* Force a look at transfer timeouts */
-          check_time = 1;
-        }
-        else {
-          continue; /* skip state machine */
-        }
-      }
-      else {
-        result = tftp_receive_packet(conn);
-        if (result == CURLE_OK)
-          transaction_start = Curl_tvnow();
-
-        if(k->bytecountp)
-          *k->bytecountp = k->bytecount; /* read count */
-        if(k->writebytecountp)
-          *k->writebytecountp = k->writebytecount; /* write count */
-      }
-    }
-
-    if(check_time) {
-      tftp_state_timeout(conn, NULL);
-      check_time = 0;
-    }
-
-    if(result)
-      return(result);
-
-    result = tftp_state_machine(state, state->event);
-  }
-
-  /* Tell curl we're done */
-  Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
-
-  return(result);
-}
-
 /**********************************************************
  *
  * tftp_multi_statemach
@@ -1338,11 +1207,11 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
     failf(data, "TFTP response timeout");
     return CURLE_OPERATION_TIMEDOUT;
   }
-  else if (event != TFTP_EVENT_NONE) {
+  else if(event != TFTP_EVENT_NONE) {
     result = tftp_state_machine(state, event);
     if(result != CURLE_OK)
       return(result);
-    *done = (bool)(state->state == TFTP_STATE_FIN);
+    *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
     if(*done)
       /* Tell curl we're done */
       Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1364,7 +1233,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
       result = tftp_state_machine(state, state->event);
       if(result != CURLE_OK)
         return(result);
-      *done = (bool)(state->state == TFTP_STATE_FIN);
+      *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
       if(*done)
         /* Tell curl we're done */
         Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
@@ -1412,12 +1281,7 @@ static CURLcode tftp_perform(struct connectdata *conn, bool *dophase_done)
   if(state->state == TFTP_STATE_FIN || result != CURLE_OK)
     return(result);
 
-  if(conn->data->state.used_interface == Curl_if_multi)
-    tftp_multi_statemach(conn, dophase_done);
-  else {
-    result = tftp_easy_statemach(conn);
-    *dophase_done = TRUE; /* with the easy interface we are done here */
-  }
+  tftp_multi_statemach(conn, dophase_done);
 
   if(*dophase_done)
     DEBUGF(infof(conn->data, "DO phase is complete\n"));
@@ -1462,7 +1326,7 @@ static CURLcode tftp_do(struct connectdata *conn, bool *done)
 
   /* If tftp_perform() returned an error, use that for return code. If it
      was OK, see if tftp_translate_code() has an error. */
-  if (code == CURLE_OK)
+  if(code == CURLE_OK)
     /* If we have encountered an internal tftp error, translate it. */
     code = tftp_translate_code(state->error);
 
index b2d67b2..117b40f 100644 (file)
@@ -1,6 +1,5 @@
-#ifndef __TFTP_H
-#define __TFTP_H
-
+#ifndef HEADER_CURL_TFTP_H
+#define HEADER_CURL_TFTP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -25,4 +24,6 @@
 #ifndef CURL_DISABLE_TFTP
 extern const struct Curl_handler Curl_handler_tftp;
 #endif
-#endif
+
+#endif /* HEADER_CURL_TFTP_H */
+
index cb39308..2fd7201 100644 (file)
@@ -120,8 +120,11 @@ long curlx_tvdiff(struct timeval newer, struct timeval older)
  */
 double curlx_tvdiff_secs(struct timeval newer, struct timeval older)
 {
-  return (double)(newer.tv_sec-older.tv_sec)+
-    (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  if(newer.tv_sec != older.tv_sec)
+    return (double)(newer.tv_sec-older.tv_sec)+
+      (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  else
+    return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
 }
 
 /* return the number of seconds in the given input timeval struct */
index bc79a45..3f1b9ea 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __TIMEVAL_H
-#define __TIMEVAL_H
+#ifndef HEADER_CURL_TIMEVAL_H
+#define HEADER_CURL_TIMEVAL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -27,7 +27,7 @@
  * as well as the library. Do not mix with library internals!
  */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 struct timeval curlx_tvnow(void);
 
@@ -54,4 +54,5 @@ long Curl_tvlong(struct timeval t1);
 #define Curl_tvdiff(x,y) curlx_tvdiff(x,y)
 #define Curl_tvdiff_secs(x,y) curlx_tvdiff_secs(x,y)
 
-#endif
+#endif /* HEADER_CURL_TIMEVAL_H */
+
index e4e3405..db0318d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
+#include "curl_setup.h"
 
 #include "strtoofft.h"
 #include "strequal.h"
 #include "rawstr.h"
 
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -78,8 +57,6 @@
 #error "We can't compile without socket() support!"
 #endif
 
-#endif  /* WIN32 */
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "netrc.h"
 #include "getinfo.h"
 #include "sslgen.h"
 #include "http_digest.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
 #include "http_negotiate.h"
 #include "share.h"
 #include "curl_memory.h"
 #include "select.h"
 #include "multiif.h"
-#include "easyif.h" /* for Curl_convert_to_network prototype */
-#include "rtsp.h"
 #include "connect.h"
+#include "non-ascii.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -125,7 +101,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
 #ifdef CURL_DOES_CONVERSIONS
   bool sending_http_headers = FALSE;
 
-  if((conn->protocol&(PROT_HTTP|PROT_RTSP)) &&
+  if((conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) &&
      (data->state.proto.http->sending == HTTPSEND_REQUEST)) {
     /* We're sending the HTTP request headers, not the data.
        Remember that so we don't re-translate them into garbage. */
@@ -187,11 +163,12 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
     const char *endofline_native;
     const char *endofline_network;
     int hexlen;
+
+    if(
 #ifdef CURL_DO_LINEEND_CONV
-    if((data->set.crlf) || (data->set.prefer_ascii)) {
-#else
-    if(data->set.crlf) {
-#endif /* CURL_DO_LINEEND_CONV */
+       (data->set.prefer_ascii) ||
+#endif
+       (data->set.crlf)) {
       /* \n will become \r\n later on */
       endofline_native  = "\n";
       endofline_network = "\x0a";
@@ -233,7 +210,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
 #endif /* CURL_DOES_CONVERSIONS */
 
     if((nread - hexlen) == 0)
-      /* mark this as done once this chunk is transfered */
+      /* mark this as done once this chunk is transferred */
       data->req.upload_done = TRUE;
 
     nread+=(int)strlen(endofline_native); /* for the added end of line */
@@ -303,7 +280,7 @@ CURLcode Curl_readrewind(struct connectdata *conn)
     else {
       /* If no CURLOPT_READFUNCTION is used, we know that we operate on a
          given FILE * stream and we can actually attempt to rewind that
-         ourself with fseek() */
+         ourselves with fseek() */
       if(data->set.fread_func == (curl_read_callback)fread) {
         if(-1 != fseek(data->set.in, 0, SEEK_SET))
           /* successful rewind */
@@ -322,7 +299,7 @@ static int data_pending(const struct connectdata *conn)
 {
   /* in the case of libssh2, we can never be really sure that we have emptied
      its internal buffers so we MUST always try until we get EAGAIN back */
-  return conn->protocol&(PROT_SCP|PROT_SFTP) ||
+  return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) ||
     Curl_ssl_data_pending(conn, FIRSTSOCKET);
 }
 
@@ -349,12 +326,43 @@ static void read_rewind(struct connectdata *conn,
     }
 
     DEBUGF(infof(conn->data,
-                 "Buffer after stream rewind (read_pos = %zu): [%s]",
+                 "Buffer after stream rewind (read_pos = %zu): [%s]\n",
                  conn->read_pos, buf));
   }
 #endif
 }
 
+/*
+ * Check to see if CURLOPT_TIMECONDITION was met by comparing the time of the
+ * remote document with the time provided by CURLOPT_TIMEVAL
+ */
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc)
+{
+  if((timeofdoc == 0) || (data->set.timevalue == 0))
+    return TRUE;
+
+  switch(data->set.timecondition) {
+  case CURL_TIMECOND_IFMODSINCE:
+  default:
+    if(timeofdoc <= data->set.timevalue) {
+      infof(data,
+            "The requested document is not new enough\n");
+      data->info.timecond = TRUE;
+      return FALSE;
+    }
+    break;
+  case CURL_TIMECOND_IFUNMODSINCE:
+    if(timeofdoc >= data->set.timevalue) {
+      infof(data,
+            "The requested document is not old enough\n");
+      data->info.timecond = TRUE;
+      return FALSE;
+    }
+    break;
+  }
+
+  return TRUE;
+}
 
 /*
  * Go ahead and do a read if we have a readable socket or if
@@ -370,9 +378,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
   ssize_t nread; /* number of bytes read */
   size_t excess = 0; /* excess bytes read */
   bool is_empty_data = FALSE;
-#ifndef CURL_DISABLE_RTSP
   bool readmore = FALSE; /* used by RTP to signal for more data */
-#endif
 
   *done = FALSE;
 
@@ -418,7 +424,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
 
     *didwhat |= KEEP_RECV;
     /* indicates data of zero size, i.e. empty file */
-    is_empty_data = (bool)((nread == 0) && (k->bodywrites == 0));
+    is_empty_data = ((nread == 0) && (k->bodywrites == 0)) ? TRUE : FALSE;
 
     /* NUL terminate, allowing string ops to be used */
     if(0 < nread || is_empty_data) {
@@ -436,16 +442,13 @@ static CURLcode readwrite_data(struct SessionHandle *data,
        in the flow below before the actual storing is done. */
     k->str = k->buf;
 
-#ifndef CURL_DISABLE_RTSP
-    /* Check for RTP at the beginning of the data */
-    if(conn->protocol & PROT_RTSP) {
-      result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+    if(conn->handler->readwrite) {
+      result = conn->handler->readwrite(data, conn, &nread, &readmore);
       if(result)
         return result;
       if(readmore)
         break;
     }
-#endif
 
 #ifndef CURL_DISABLE_HTTP
     /* Since this is a two-state thing, we check if we are parsing
@@ -457,20 +460,37 @@ static CURLcode readwrite_data(struct SessionHandle *data,
       if(result)
         return result;
 
-#ifndef CURL_DISABLE_RTSP
-      /* Check for RTP after the headers if there is no Content */
-      if(k->maxdownload <= 0 && nread > 0 && (conn->protocol & PROT_RTSP)) {
-        result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+      if(conn->handler->readwrite &&
+         (k->maxdownload <= 0 && nread > 0)) {
+        result = conn->handler->readwrite(data, conn, &nread, &readmore);
         if(result)
           return result;
         if(readmore)
           break;
       }
-#endif
 
-      if(stop_reading)
+      if(stop_reading) {
         /* We've stopped dealing with input, get out of the do-while loop */
+
+        if(nread > 0) {
+          if(Curl_multi_pipeline_enabled(conn->data->multi)) {
+            infof(data,
+                  "Rewinding stream by : %zd"
+                  " bytes on url %s (zero-length body)\n",
+                  nread, data->state.path);
+            read_rewind(conn, (size_t)nread);
+          }
+          else {
+            infof(data,
+                  "Excess found in a non pipelined read:"
+                  " excess = %zd"
+                  " url = %s (zero-length body)\n",
+                  nread, data->state.path);
+          }
+        }
+
         break;
+      }
     }
 #endif /* CURL_DISABLE_HTTP */
 
@@ -480,12 +500,11 @@ static CURLcode readwrite_data(struct SessionHandle *data,
        is non-headers. */
     if(k->str && !k->header && (nread > 0 || is_empty_data)) {
 
-
 #ifndef CURL_DISABLE_HTTP
       if(0 == k->bodywrites && !is_empty_data) {
         /* These checks are only made the first time we are about to
            write a piece of the body */
-        if(conn->protocol&(PROT_HTTP|PROT_RTSP)) {
+        if(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) {
           /* HTTP-only checks */
 
           if(data->req.newurl) {
@@ -518,34 +537,20 @@ static CURLcode readwrite_data(struct SessionHandle *data,
                requested. This seems to be what chapter 13.3.4 of
                RFC 2616 defines to be the correct action for a
                HTTP/1.1 client */
-            if((k->timeofdoc > 0) && (data->set.timevalue > 0)) {
-              switch(data->set.timecondition) {
-              case CURL_TIMECOND_IFMODSINCE:
-              default:
-                if(k->timeofdoc < data->set.timevalue) {
-                  infof(data,
-                        "The requested document is not new enough\n");
-                  *done = TRUE;
-                  data->info.timecond = TRUE;
-                  return CURLE_OK;
-                }
-                break;
-              case CURL_TIMECOND_IFUNMODSINCE:
-                if(k->timeofdoc > data->set.timevalue) {
-                  infof(data,
-                        "The requested document is not old enough\n");
-                  *done = TRUE;
-                  data->info.timecond = TRUE;
-                  return CURLE_OK;
-                }
-                break;
-              } /* switch */
-            } /* two valid time strings */
+
+            if(!Curl_meets_timecondition(data, k->timeofdoc)) {
+              *done = TRUE;
+              /* we abort the transfer before it is completed == we ruin the
+                 re-use ability. Close the connection */
+              conn->bits.close = TRUE;
+              return CURLE_OK;
+            }
           } /* we have a time condition */
 
-        } /* this is HTTP */
+        } /* this is HTTP or RTSP */
       } /* this is the first time we write a body part */
 #endif /* CURL_DISABLE_HTTP */
+
       k->bodywrites++;
 
       /* pass data to the debug function before it gets "dechunked" */
@@ -579,7 +584,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
             failf(data, "Failed writing data");
             return CURLE_WRITE_ERROR;
           }
-          failf(data, "Received problem %d in the chunky parser", (int)res);
+          failf(data, "Problem (%d) in the Chunked-Encoded data", (int)res);
           return CURLE_RECV_ERROR;
         }
         else if(CHUNKE_STOP == res) {
@@ -595,8 +600,9 @@ static CURLcode readwrite_data(struct SessionHandle *data,
 
           dataleft = conn->chunk.dataleft;
           if(dataleft != 0) {
-            infof(conn->data, "Leftovers after chunking: %zu bytes", dataleft);
-            if(conn->data->multi && Curl_multi_canPipeline(conn->data->multi)) {
+            infof(conn->data, "Leftovers after chunking: %zu bytes\n",
+                  dataleft);
+            if(Curl_multi_pipeline_enabled(conn->data->multi)) {
               /* only attempt the rewind if we truly are pipelining */
               infof(conn->data, "Rewinding %zu bytes\n",dataleft);
               read_rewind(conn, dataleft);
@@ -619,7 +625,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
 
         excess = (size_t)(k->bytecount + nread - k->maxdownload);
         if(excess > 0 && !k->ignorebody) {
-          if(conn->data->multi && Curl_multi_canPipeline(conn->data->multi)) {
+          if(Curl_multi_pipeline_enabled(conn->data->multi)) {
             /* The 'excess' amount below can't be more than BUFSIZE which
                always will fit in a size_t */
             infof(data,
@@ -663,12 +669,12 @@ static CURLcode readwrite_data(struct SessionHandle *data,
           /* Don't let excess data pollute body writes */
           if(k->maxdownload == -1 || (curl_off_t)k->hbuflen <= k->maxdownload)
             result = Curl_client_write(conn, CLIENTWRITE_BODY,
-                data->state.headerbuff,
-                k->hbuflen);
+                                       data->state.headerbuff,
+                                       k->hbuflen);
           else
             result = Curl_client_write(conn, CLIENTWRITE_BODY,
-                data->state.headerbuff,
-                (size_t)k->maxdownload);
+                                       data->state.headerbuff,
+                                       (size_t)k->maxdownload);
 
           if(result)
             return result;
@@ -681,22 +687,22 @@ static CURLcode readwrite_data(struct SessionHandle *data,
              encodings handled here. */
 #ifdef HAVE_LIBZ
           switch (conn->data->set.http_ce_skip ?
-                  IDENTITY : k->content_encoding) {
+                  IDENTITY : k->auto_decoding) {
           case IDENTITY:
 #endif
             /* This is the default when the server sends no
                Content-Encoding header. See Curl_readwrite_init; the
-               memset() call initializes k->content_encoding to zero. */
+               memset() call initializes k->auto_decoding to zero. */
             if(!k->ignorebody) {
 
 #ifndef CURL_DISABLE_POP3
-              if(conn->protocol&PROT_POP3)
+              if(conn->handler->protocol&CURLPROTO_POP3)
                 result = Curl_pop3_write(conn, k->str, nread);
               else
 #endif /* CURL_DISABLE_POP3 */
 
-              result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str,
-                                         nread);
+                result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str,
+                                           nread);
             }
 #ifdef HAVE_LIBZ
             break;
@@ -731,24 +737,20 @@ static CURLcode readwrite_data(struct SessionHandle *data,
 
     } /* if(! header and data to read ) */
 
-#ifndef CURL_DISABLE_RTSP
-    if(excess > 0 && !conn->bits.stream_was_rewound &&
-        (conn->protocol & PROT_RTSP)) {
-      /* Check for RTP after the content if there is unrewound excess */
-
+    if(conn->handler->readwrite &&
+       (excess > 0 && !conn->bits.stream_was_rewound)) {
       /* Parse the excess data */
       k->str += nread;
       nread = (ssize_t)excess;
 
-      result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
+      result = conn->handler->readwrite(data, conn, &nread, &readmore);
       if(result)
         return result;
 
       if(readmore)
         k->keepon |= KEEP_RECV; /* we're not done reading */
-        break;
+      break;
     }
-#endif
 
     if(is_empty_data) {
       /* if we received nothing, the server closed the connection and we
@@ -792,6 +794,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
   /*
    * We loop here to do the READ and SEND loop until we run out of
    * data to send or until we get EWOULDBLOCK back
+   *
+   * FIXME: above comment is misleading. Currently no looping is
+   * actually done in do-while loop below.
    */
   do {
 
@@ -821,7 +826,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
           break;
         }
 
-        if(conn->protocol&(PROT_HTTP|PROT_RTSP)) {
+        if(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) {
           if(data->state.proto.http->sending == HTTPSEND_REQUEST)
             /* We're sending the HTTP request headers, not the data.
                Remember that so we don't change the line endings. */
@@ -859,7 +864,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
       data->req.upload_present = nread;
 
 #ifndef CURL_DISABLE_SMTP
-      if(conn->protocol & PROT_SMTP) {
+      if(conn->handler->protocol & CURLPROTO_SMTP) {
         result = Curl_smtp_escape_eob(conn, nread);
         if(result)
           return result;
@@ -868,13 +873,12 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
 #endif /* CURL_DISABLE_SMTP */
 
       /* convert LF to CRLF if so asked */
-      if((!sending_http_headers) &&
+      if((!sending_http_headers) && (
 #ifdef CURL_DO_LINEEND_CONV
-        /* always convert if we're FTPing in ASCII mode */
-         ((data->set.crlf) || (data->set.prefer_ascii))) {
-#else
-         (data->set.crlf)) {
+         /* always convert if we're FTPing in ASCII mode */
+         (data->set.prefer_ascii) ||
 #endif
+         (data->set.crlf))) {
         if(data->state.scratch == NULL)
           data->state.scratch = malloc(2*BUFSIZE);
         if(data->state.scratch == NULL) {
@@ -933,6 +937,14 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
       Curl_debug(data, CURLINFO_DATA_OUT, data->req.upload_fromhere,
                  (size_t)bytes_written, conn);
 
+    k->writebytecount += bytes_written;
+
+    if(k->writebytecount == data->set.infilesize) {
+      /* we have sent all data we were supposed to */
+      k->upload_done = TRUE;
+      infof(data, "We are completely uploaded and fine\n");
+    }
+
     if(data->req.upload_present != bytes_written) {
       /* we only wrote a part of the buffer (if anything), deal with it! */
 
@@ -954,10 +966,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
       }
     }
 
-    k->writebytecount += bytes_written;
     Curl_pgrsSetUploadCounter(data, k->writebytecount);
 
-  } while(0); /* just to break out from! */
+  } WHILE_FALSE; /* just to break out from! */
 
   return CURLE_OK;
 }
@@ -1064,7 +1075,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
     return result;
 
   if(k->keepon) {
-    if(0 > Curl_timeleft(conn, &k->now, FALSE)) {
+    if(0 > Curl_timeleft(data, &k->now, FALSE)) {
       if(k->size != -1) {
         failf(data, "Operation timed out after %ld milliseconds with %"
               FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received",
@@ -1105,7 +1116,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
             (conn->chunk.state != CHUNK_STOP)) {
       /*
        * In chunked mode, return an error if the connection is closed prior to
-       * the empty (terminiating) chunk is read.
+       * the empty (terminating) chunk is read.
        *
        * The condition above used to check for
        * conn->proto.http->chunk.datasize != 0 which is true after reading
@@ -1120,8 +1131,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
   }
 
   /* Now update the "done" boolean we return */
-  *done = (bool)(0 == (k->keepon&(KEEP_RECV|KEEP_SEND|
-                                  KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)));
+  *done = (0 == (k->keepon&(KEEP_RECV|KEEP_SEND|
+                            KEEP_RECV_PAUSE|KEEP_SEND_PAUSE))) ? TRUE : FALSE;
 
   return CURLE_OK;
 }
@@ -1182,11 +1193,11 @@ int Curl_single_getsock(const struct connectdata *conn,
 /*
  * Determine optimum sleep time based on configured rate, current rate,
  * and packet size.
- * Returns value in mili-seconds.
+ * Returns value in milliseconds.
  *
  * The basic idea is to adjust the desired rate up/down in this method
  * based on whether we are running too slow or too fast.  Then, calculate
- * how many miliseconds to wait for the next packet to achieve this new
+ * how many milliseconds to wait for the next packet to achieve this new
  * rate.
  */
 long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
@@ -1195,24 +1206,24 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
   curl_off_t min_sleep = 0;
   curl_off_t rv = 0;
 
-  if (rate_bps == 0)
+  if(rate_bps == 0)
     return 0;
 
   /* If running faster than about .1% of the desired speed, slow
    * us down a bit.  Use shift instead of division as the 0.1%
    * cutoff is arbitrary anyway.
    */
-  if (cur_rate_bps > (rate_bps + (rate_bps >> 10))) {
+  if(cur_rate_bps > (rate_bps + (rate_bps >> 10))) {
     /* running too fast, decrease target rate by 1/64th of rate */
     rate_bps -= rate_bps >> 6;
     min_sleep = 1;
   }
-  else if (cur_rate_bps < (rate_bps - (rate_bps >> 10))) {
+  else if(cur_rate_bps < (rate_bps - (rate_bps >> 10))) {
     /* running too slow, increase target rate by 1/64th of rate */
     rate_bps += rate_bps >> 6;
   }
 
-  /* Determine number of miliseconds to wait until we do
+  /* Determine number of milliseconds to wait until we do
    * the next packet at the adjusted rate.  We should wait
    * longer when using larger packets, for instance.
    */
@@ -1221,7 +1232,7 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
   /* Catch rounding errors and always slow down at least 1ms if
    * we are running too fast.
    */
-  if (rv < min_sleep)
+  if(rv < min_sleep)
     rv = min_sleep;
 
   /* Bound value to fit in 'long' on 32-bit platform.  That's
@@ -1233,195 +1244,6 @@ long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
   return (long)rv;
 }
 
-
-/*
- * Transfer()
- *
- * This function is what performs the actual transfer. It is capable of doing
- * both ways simultaneously.  The transfer must already have been setup by a
- * call to Curl_setup_transfer().
- *
- * Note that headers are created in a preallocated buffer of a default size.
- * That buffer can be enlarged on demand, but it is never shrunken again.
- *
- */
-
-static CURLcode
-Transfer(struct connectdata *conn)
-{
-  CURLcode result;
-  struct SessionHandle *data = conn->data;
-  struct SingleRequest *k = &data->req;
-  bool done=FALSE;
-  bool first=TRUE;
-  int timeout_ms;
-  int buffersize;
-  int totmp;
-
-  if((conn->sockfd == CURL_SOCKET_BAD) &&
-     (conn->writesockfd == CURL_SOCKET_BAD))
-    /* nothing to read, nothing to write, we're already OK! */
-    return CURLE_OK;
-
-  /* we want header and/or body, if neither then don't do this! */
-  if(!k->getheader && data->set.opt_no_body)
-    return CURLE_OK;
-
-  while(!done) {
-    curl_socket_t fd_read = conn->sockfd;
-    curl_socket_t fd_write = conn->writesockfd;
-    int keepon = k->keepon;
-    timeout_ms = 1000;
-
-    if(conn->waitfor) {
-      /* if waitfor is set, get the RECV and SEND bits from that but keep the
-         other bits */
-      keepon &= ~ (KEEP_RECV|KEEP_SEND);
-      keepon |= conn->waitfor & (KEEP_RECV|KEEP_SEND);
-    }
-
-    /* limit-rate logic: if speed exceeds threshold, then do not include fd in
-       select set. The current speed is recalculated in each Curl_readwrite()
-       call */
-    if((keepon & KEEP_SEND) &&
-        (!data->set.max_send_speed ||
-         (data->progress.ulspeed < data->set.max_send_speed) )) {
-      k->keepon &= ~KEEP_SEND_HOLD;
-    }
-    else {
-      if (data->set.upload && data->set.max_send_speed &&
-          (data->progress.ulspeed > data->set.max_send_speed) ) {
-        /* calculate upload rate-limitation timeout. */
-        buffersize = (int)(data->set.buffer_size ?
-                           data->set.buffer_size : BUFSIZE);
-        totmp = (int)Curl_sleep_time(data->set.max_send_speed,
-                                     data->progress.ulspeed, buffersize);
-        if (totmp < timeout_ms)
-          timeout_ms = totmp;
-      }
-      fd_write = CURL_SOCKET_BAD;
-      if(keepon & KEEP_SEND)
-        k->keepon |= KEEP_SEND_HOLD; /* hold it */
-    }
-
-    if((keepon & KEEP_RECV) &&
-        (!data->set.max_recv_speed ||
-         (data->progress.dlspeed < data->set.max_recv_speed)) ) {
-      k->keepon &= ~KEEP_RECV_HOLD;
-    }
-    else {
-      if ((!data->set.upload) && data->set.max_recv_speed &&
-          (data->progress.dlspeed > data->set.max_recv_speed)) {
-        /* Calculate download rate-limitation timeout. */
-        buffersize = (int)(data->set.buffer_size ?
-                           data->set.buffer_size : BUFSIZE);
-        totmp = (int)Curl_sleep_time(data->set.max_recv_speed,
-                                     data->progress.dlspeed, buffersize);
-        if (totmp < timeout_ms)
-          timeout_ms = totmp;
-      }
-      fd_read = CURL_SOCKET_BAD;
-      if(keepon & KEEP_RECV)
-        k->keepon |= KEEP_RECV_HOLD; /* hold it */
-    }
-
-    /* pause logic. Don't check descriptors for paused connections */
-    if(k->keepon & KEEP_RECV_PAUSE)
-      fd_read = CURL_SOCKET_BAD;
-    if(k->keepon & KEEP_SEND_PAUSE)
-      fd_write = CURL_SOCKET_BAD;
-
-    /* The *_HOLD and *_PAUSE logic is necessary since even though there might
-       be no traffic during the select interval, we still call
-       Curl_readwrite() for the timeout case and if we limit transfer speed we
-       must make sure that this function doesn't transfer anything while in
-       HOLD status.
-
-       The no timeout for the first round is for the protocols for which data
-       has already been slurped off the socket and thus waiting for action
-       won't work since it'll wait even though there is already data present
-       to work with. */
-    if(first &&
-       ((fd_read != CURL_SOCKET_BAD) || (fd_write != CURL_SOCKET_BAD)))
-      /* if this is the first lap and one of the file descriptors is fine
-         to work with, skip the timeout */
-      timeout_ms = 0;
-    else {
-      totmp = Curl_timeleft(conn, &k->now, FALSE);
-      if(totmp < 0)
-        return CURLE_OPERATION_TIMEDOUT;
-      else if(!totmp)
-        totmp = 1000;
-
-      if (totmp < timeout_ms)
-        timeout_ms = totmp;
-    }
-
-    switch (Curl_socket_ready(fd_read, fd_write, timeout_ms)) {
-    case -1: /* select() error, stop reading */
-#ifdef EINTR
-      /* The EINTR is not serious, and it seems you might get this more
-         often when using the lib in a multi-threaded environment! */
-      if(SOCKERRNO == EINTR)
-        continue;
-#endif
-      return CURLE_RECV_ERROR;  /* indicate a network problem */
-    case 0:  /* timeout */
-    default: /* readable descriptors */
-
-      result = Curl_readwrite(conn, &done);
-      /* "done" signals to us if the transfer(s) are ready */
-      break;
-    }
-    if(result)
-      return result;
-
-    first = FALSE; /* not the first lap anymore */
-  }
-
-  return CURLE_OK;
-}
-
-static void loadhostpairs(struct SessionHandle *data)
-{
-  struct curl_slist *hostp;
-  char hostname[256];
-  char address[256];
-  int port;
-
-  for(hostp = data->change.resolve; hostp; hostp = hostp->next ) {
-    if(!hostp->data)
-      continue;
-    if(hostp->data[0] == '-') {
-      /* mark an entry for removal */
-    }
-    else if(3 == sscanf(hostp->data, "%255[^:]:%d:%255s", hostname, &port,
-                        address)) {
-      struct Curl_dns_entry *dns;
-      Curl_addrinfo *addr;
-
-      addr = Curl_str2addr(address, port);
-      if(!addr) {
-        infof(data, "Resolve %s found illegal!\n", hostp->data);
-        continue;
-      }
-      infof(data, "Added %s:%d:%s to DNS cache\n",
-            hostname, port, address);
-
-      if(data->share)
-        Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
-
-      /* put this host in the cache */
-      dns = Curl_cache_addr(data, addr, hostname, port);
-
-      if(data->share)
-        Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
-    }
-  }
-  data->change.resolve = NULL; /* dealt with now */
-}
-
-
 /*
  * Curl_pretransfer() is called immediately before a transfer starts.
  */
@@ -1435,9 +1257,9 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
   }
 
   /* Init the SSL session ID cache here. We do it here since we want to do it
-     after the *_setopt() calls (that could change the size of the cache) but
+     after the *_setopt() calls (that could specify the size of the cache) but
      before any transfer takes place. */
-  res = Curl_ssl_initsessions(data, data->set.ssl.numsessions);
+  res = Curl_ssl_initsessions(data, data->set.ssl.max_ssl_sessions);
   if(res)
     return res;
 
@@ -1460,31 +1282,39 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
 
   /* If there is a list of host pairs to deal with */
   if(data->change.resolve)
-    loadhostpairs(data);
+    res = Curl_loadhostpairs(data);
 
- /* Allow data->set.use_port to set which port to use. This needs to be
-  * disabled for example when we follow Location: headers to URLs using
-  * different ports! */
-  data->state.allow_port = TRUE;
+  if(!res) {
+    /* Allow data->set.use_port to set which port to use. This needs to be
+     * disabled for example when we follow Location: headers to URLs using
+     * different ports! */
+    data->state.allow_port = TRUE;
 
 #if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)
-  /*************************************************************
-   * Tell signal handler to ignore SIGPIPE
-   *************************************************************/
-  if(!data->set.no_signal)
-    data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
+    /*************************************************************
+     * Tell signal handler to ignore SIGPIPE
+     *************************************************************/
+    if(!data->set.no_signal)
+      data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
 #endif
 
-  Curl_initinfo(data); /* reset session-specific information "variables" */
-  Curl_pgrsStartNow(data);
+    Curl_initinfo(data); /* reset session-specific information "variables" */
+    Curl_pgrsStartNow(data);
 
-  if(data->set.timeout)
-    Curl_expire(data, data->set.timeout);
+    if(data->set.timeout)
+      Curl_expire(data, data->set.timeout);
 
-  if(data->set.connecttimeout)
-    Curl_expire(data, data->set.connecttimeout);
+    if(data->set.connecttimeout)
+      Curl_expire(data, data->set.connecttimeout);
 
-  return CURLE_OK;
+    /* In case the handle is re-used and an authentication method was picked
+       in the session we need to make sure we only use the one(s) we now
+       consider to be fine */
+    data->state.authhost.picked &= data->state.authhost.want;
+    data->state.authproxy.picked &= data->state.authproxy.want;
+  }
+
+  return res;
 }
 
 /*
@@ -1500,11 +1330,6 @@ CURLcode Curl_posttransfer(struct SessionHandle *data)
   (void)data; /* unused parameter */
 #endif
 
-  if(!(data->progress.flags & PGRS_HIDE) &&
-     !data->progress.callback)
-    /* only output if we don't use a progress callback and we're not hidden */
-    fprintf(data->set.err, "\n");
-
   return CURLE_OK;
 }
 
@@ -1580,7 +1405,7 @@ static bool is_absolute_url(const char *url)
   char prot[16]; /* URL protocol string storage */
   char letter;   /* used for a silly sscanf */
 
-  return (bool)(2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter));
+  return (2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter)) ? TRUE : FALSE;
 }
 
 /*
@@ -1672,26 +1497,37 @@ static char *concat_url(const char *base, const char *relurl)
     }
   }
   else {
-    /* We got a new absolute path for this server, cut off from the
-       first slash */
-    pathsep = strchr(protsep, '/');
-    if(pathsep) {
-      /* When people use badly formatted URLs, such as
-         "http://www.url.com?dir=/home/daniel" we must not use the first
-         slash, if there's a ?-letter before it! */
-      char *sep = strchr(protsep, '?');
-      if(sep && (sep < pathsep))
-        pathsep = sep;
-      *pathsep=0;
+    /* We got a new absolute path for this server */
+
+    if((relurl[0] == '/') && (relurl[1] == '/')) {
+      /* the new URL starts with //, just keep the protocol part from the
+         original one */
+      *protsep=0;
+      useurl = &relurl[2]; /* we keep the slashes from the original, so we
+                              skip the new ones */
     }
     else {
-      /* There was no slash. Now, since we might be operating on a badly
-         formatted URL, such as "http://www.url.com?id=2380" which doesn't
-         use a slash separator as it is supposed to, we need to check for a
-         ?-letter as well! */
-      pathsep = strchr(protsep, '?');
-      if(pathsep)
+      /* cut off the original URL from the first slash, or deal with URLs
+         without slash */
+      pathsep = strchr(protsep, '/');
+      if(pathsep) {
+        /* When people use badly formatted URLs, such as
+           "http://www.url.com?dir=/home/daniel" we must not use the first
+           slash, if there's a ?-letter before it! */
+        char *sep = strchr(protsep, '?');
+        if(sep && (sep < pathsep))
+          pathsep = sep;
         *pathsep=0;
+      }
+      else {
+        /* There was no slash. Now, since we might be operating on a badly
+           formatted URL, such as "http://www.url.com?id=2380" which doesn't
+           use a slash separator as it is supposed to, we need to check for a
+           ?-letter as well! */
+        pathsep = strchr(protsep, '?');
+        if(pathsep)
+          *pathsep=0;
+      }
     }
   }
 
@@ -1704,8 +1540,8 @@ static char *concat_url(const char *base, const char *relurl)
 
   urllen = strlen(url_clone);
 
-  newest = malloc( urllen + 1 + /* possible slash */
-                         newlen + 1 /* zero byte */);
+  newest = malloc(urllen + 1 + /* possible slash */
+                  newlen + 1 /* zero byte */);
 
   if(!newest) {
     free(url_clone); /* don't leak this */
@@ -1768,15 +1604,14 @@ CURLcode Curl_follow(struct SessionHandle *data,
          when we get the next URL. We pick the ->url field, which may or may
          not be 100% correct */
 
-      if(data->change.referer_alloc)
-        /* If we already have an allocated referer, free this first */
-        free(data->change.referer);
+      if(data->change.referer_alloc) {
+        Curl_safefree(data->change.referer);
+        data->change.referer_alloc = FALSE;
+      }
 
       data->change.referer = strdup(data->change.url);
-      if (!data->change.referer) {
-        data->change.referer_alloc = FALSE;
+      if(!data->change.referer)
         return CURLE_OUT_OF_MEMORY;
-      }
       data->change.referer_alloc = TRUE; /* yes, free this later */
     }
   }
@@ -1787,7 +1622,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
      to be absolute and this doesn't seem to be that!
      */
     char *absolute = concat_url(data->change.url, newurl);
-    if (!absolute)
+    if(!absolute)
       return CURLE_OUT_OF_MEMORY;
     free(newurl);
     newurl = absolute;
@@ -1803,7 +1638,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
       size_t newlen = strlen_url(newurl);
 
       newest = malloc(newlen+1); /* get memory for this */
-      if (!newest)
+      if(!newest)
         return CURLE_OUT_OF_MEMORY;
       strcpy_url(newest, newurl); /* create a space-free URL */
 
@@ -1823,12 +1658,13 @@ CURLcode Curl_follow(struct SessionHandle *data,
   if(disallowport)
     data->state.allow_port = FALSE;
 
-  if(data->change.url_alloc)
-    free(data->change.url);
-  else
-    data->change.url_alloc = TRUE; /* the URL is allocated */
+  if(data->change.url_alloc) {
+    Curl_safefree(data->change.url);
+    data->change.url_alloc = FALSE;
+  }
 
   data->change.url = newurl;
+  data->change.url_alloc = TRUE;
   newurl = NULL; /* don't free! */
 
   infof(data, "Issue another request to this URL: '%s'\n", data->change.url);
@@ -1856,23 +1692,22 @@ CURLcode Curl_follow(struct SessionHandle *data,
   case 301: /* Moved Permanently */
     /* (quote from RFC2616, section 10.3.2):
      *
-     * Note: When automatically redirecting a POST request after receiving a
-     * 301 status code, some existing HTTP/1.0 user agents will erroneously
-     * change it into a GET request.
+     * When automatically redirecting a POST request after receiving a 301
+     * status code, some existing HTTP/1.0 user agents will erroneously change
+     * it into a GET request.
      *
      * ----
      *
-     * Warning: Because most of importants user agents do this obvious RFC2616
-     * violation, many webservers expect this misbehavior. So these servers
-     * often answers to a POST request with an error page.  To be sure that
-     * libcurl gets the page that most user agents would get, libcurl has to
-     * force GET.
+     * As most of the important user agents do this obvious RFC2616 violation,
+     * many webservers expect this. So these servers often answers to a POST
+     * request with an error page.  To be sure that libcurl gets the page that
+     * most user agents would get, libcurl has to force GET.
      *
-     * This behaviour can be overridden with CURLOPT_POSTREDIR.
+     * This behavior can be overridden with CURLOPT_POSTREDIR.
      */
-    if( (data->set.httpreq == HTTPREQ_POST
-         || data->set.httpreq == HTTPREQ_POST_FORM)
-        && !data->set.post301) {
+    if((data->set.httpreq == HTTPREQ_POST
+        || data->set.httpreq == HTTPREQ_POST_FORM)
+       && !(data->set.keep_post & CURL_REDIR_POST_301)) {
       infof(data,
             "Violate RFC 2616/10.3.2 and switch from POST to GET\n");
       data->set.httpreq = HTTPREQ_GET;
@@ -1896,11 +1731,11 @@ CURLcode Curl_follow(struct SessionHandle *data,
     302 status code may be used instead, since most user agents react
     to a 302 response as described here for 303.
 
-    This behaviour can be overriden with CURLOPT_POSTREDIR
+    This behavior can be overridden with CURLOPT_POSTREDIR
     */
-    if( (data->set.httpreq == HTTPREQ_POST
-         || data->set.httpreq == HTTPREQ_POST_FORM)
-        && !data->set.post302) {
+    if((data->set.httpreq == HTTPREQ_POST
+        || data->set.httpreq == HTTPREQ_POST_FORM)
+       && !(data->set.keep_post & CURL_REDIR_POST_302)) {
       infof(data,
             "Violate RFC 2616/10.3.3 and switch from POST to GET\n");
       data->set.httpreq = HTTPREQ_GET;
@@ -1908,9 +1743,10 @@ CURLcode Curl_follow(struct SessionHandle *data,
     break;
 
   case 303: /* See Other */
-    /* Disable both types of POSTs, since doing a second POST when
-     * following isn't what anyone would want! */
-    if(data->set.httpreq != HTTPREQ_GET) {
+    /* Disable both types of POSTs, unless the user explicitely
+       asks for POST after POST */
+    if(data->set.httpreq != HTTPREQ_GET
+      && !(data->set.keep_post & CURL_REDIR_POST_303)) {
       data->set.httpreq = HTTPREQ_GET; /* enforce GET request */
       infof(data, "Disables POST, goes with %s\n",
             data->set.opt_no_body?"HEAD":"GET");
@@ -1932,39 +1768,12 @@ CURLcode Curl_follow(struct SessionHandle *data,
     break;
   }
   Curl_pgrsTime(data, TIMER_REDIRECT);
-  Curl_pgrsResetTimes(data);
+  Curl_pgrsResetTimesSizes(data);
 
   return CURLE_OK;
 #endif /* CURL_DISABLE_HTTP */
 }
 
-static CURLcode
-connect_host(struct SessionHandle *data,
-             struct connectdata **conn)
-{
-  CURLcode res = CURLE_OK;
-
-  bool async;
-  bool protocol_done=TRUE; /* will be TRUE always since this is only used
-                                within the easy interface */
-  Curl_pgrsTime(data, TIMER_STARTSINGLE);
-  res = Curl_connect(data, conn, &async, &protocol_done);
-
-  if((CURLE_OK == res) && async) {
-    /* Now, if async is TRUE here, we need to wait for the name
-       to resolve */
-    res = Curl_wait_for_resolv(*conn, NULL);
-    if(CURLE_OK == res)
-      /* Resolved, continue with the connection */
-      res = Curl_async_resolved(*conn, &protocol_done);
-    else
-      /* if we can't resolve, we kill this "connection" now */
-      (void)Curl_disconnect(*conn, /* dead_connection */ FALSE);
-  }
-
-  return res;
-}
-
 CURLcode
 Curl_reconnect_request(struct connectdata **connp)
 {
@@ -1983,7 +1792,9 @@ Curl_reconnect_request(struct connectdata **connp)
   conn->bits.close = TRUE; /* enforce close of this connection */
   result = Curl_done(&conn, result, FALSE); /* we are so done with this */
 
-  /* conn may no longer be a good pointer */
+  /* conn may no longer be a good pointer, clear it to avoid mistakes by
+     parent functions */
+  *connp = NULL;
 
   /*
    * According to bug report #1330310. We need to check for CURLE_SEND_ERROR
@@ -2005,7 +1816,7 @@ Curl_reconnect_request(struct connectdata **connp)
       if(async) {
         /* Now, if async is TRUE here, we need to wait for the name
            to resolve */
-        result = Curl_wait_for_resolv(conn, NULL);
+        result = Curl_resolver_wait_resolv(conn, NULL);
         if(result)
           return result;
 
@@ -2032,7 +1843,8 @@ CURLcode Curl_retry_request(struct connectdata *conn,
 
   /* if we're talking upload, we can't do the checks below, unless the protocol
      is HTTP as when uploading over HTTP we will still get a response */
-  if(data->set.upload && !(conn->protocol&(PROT_HTTP|PROT_RTSP)))
+  if(data->set.upload &&
+     !(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)))
     return CURLE_OK;
 
   if(/* workaround for broken TLS servers */ data->state.ssl_connect_retry ||
@@ -2055,201 +1867,14 @@ CURLcode Curl_retry_request(struct connectdata *conn,
                                 to retry. Marking it this way should
                                 prevent i.e HTTP transfers to return
                                 error just because nothing has been
-                                transfered! */
-  }
-  return CURLE_OK;
-}
-
-static CURLcode Curl_do_perform(struct SessionHandle *data)
-{
-  CURLcode res;
-  CURLcode res2;
-  struct connectdata *conn=NULL;
-  char *newurl = NULL; /* possibly a new URL to follow to! */
-  followtype follow = FOLLOW_NONE;
-
-  data->state.used_interface = Curl_if_easy;
-
-  res = Curl_pretransfer(data);
-  if(res)
-    return res;
-
-  /*
-   * It is important that there is NO 'return' from this function at any other
-   * place than falling down to the end of the function! This is because we
-   * have cleanup stuff that must be done before we get back, and that is only
-   * performed after this do-while loop.
-   */
-
-  for(;;) {
-    res = connect_host(data, &conn);   /* primary connection */
-
-    if(res == CURLE_OK) {
-      bool do_done;
-      if(data->set.connect_only) {
-        /* keep connection open for application to use the socket */
-        conn->bits.close = FALSE;
-        res = Curl_done(&conn, CURLE_OK, FALSE);
-        break;
-      }
-      res = Curl_do(&conn, &do_done);
-
-      if(res == CURLE_OK) {
-        if(conn->data->set.wildcardmatch) {
-          if(conn->data->wildcard.state == CURLWC_DONE ||
-             conn->data->wildcard.state == CURLWC_SKIP) {
-            /* keep connection open for application to use the socket */
-            conn->bits.close = FALSE;
-            res = Curl_done(&conn, CURLE_OK, FALSE);
-            break;
-          }
-        }
-        res = Transfer(conn); /* now fetch that URL please */
-        if((res == CURLE_OK) || (res == CURLE_RECV_ERROR)) {
-          bool retry = FALSE;
-          CURLcode rc = Curl_retry_request(conn, &newurl);
-          if(rc)
-            res = rc;
-          else
-            retry = (newurl?TRUE:FALSE);
-
-          if(retry) {
-            /* we know (newurl != NULL) at this point */
-            res = CURLE_OK;
-            follow = FOLLOW_RETRY;
-          }
-          else if (res == CURLE_OK) {
-            /*
-             * We must duplicate the new URL here as the connection data may
-             * be free()ed in the Curl_done() function. We prefer the newurl
-             * one since that's used for redirects or just further requests
-             * for retries or multi-stage HTTP auth methods etc.
-             */
-            if(data->req.newurl) {
-              follow = FOLLOW_REDIR;
-              newurl = strdup(data->req.newurl);
-              if (!newurl)
-                res = CURLE_OUT_OF_MEMORY;
-            }
-            else if(data->req.location) {
-              follow = FOLLOW_FAKE;
-              newurl = strdup(data->req.location);
-              if (!newurl)
-                res = CURLE_OUT_OF_MEMORY;
-            }
-          }
-
-          /* in the above cases where 'newurl' gets assigned, we have a fresh
-           * allocated memory pointed to */
-        }
-        if(res != CURLE_OK) {
-          /* The transfer phase returned error, we mark the connection to get
-           * closed to prevent being re-used. This is because we can't
-           * possibly know if the connection is in a good shape or not now. */
-          conn->bits.close = TRUE;
-
-          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] = CURL_SOCKET_BAD;
-          }
-        }
-
-        /* Always run Curl_done(), even if some of the previous calls
-           failed, but return the previous (original) error code */
-        res2 = Curl_done(&conn, res, FALSE);
-
-        if(CURLE_OK == res)
-          res = res2;
-      }
-      else if(conn)
-        /* Curl_do() failed, clean up left-overs in the done-call, but note
-           that at some cases the conn pointer is NULL when Curl_do() failed
-           and the connection cache is very small so only call Curl_done() if
-           conn is still "alive". */
-        /* ignore return code since we already have an error to return */
-        (void)Curl_done(&conn, res, FALSE);
-
-      /*
-       * Important: 'conn' cannot be used here, since it may have been closed
-       * in 'Curl_done' or other functions.
-       */
-
-      if((res == CURLE_OK) && follow) {
-        res = Curl_follow(data, newurl, follow);
-        if(CURLE_OK == res) {
-          /* if things went fine, Curl_follow() freed or otherwise took
-             responsibility for the newurl pointer */
-          newurl = NULL;
-          if(follow >= FOLLOW_RETRY) {
-            follow = FOLLOW_NONE;
-            continue;
-          }
-          /* else we break out of the loop below */
-        }
-      }
-    }
-    break; /* it only reaches here when this shouldn't loop */
-
-  } /* loop if Location: */
+                                transferred! */
 
-  if(newurl)
-    free(newurl);
 
-  if(res && !data->state.errorbuf) {
-    /*
-     * As an extra precaution: if no error string has been set and there was
-     * an error, use the strerror() string or if things are so bad that not
-     * even that is good, set a bad string that mentions the error code.
-     */
-    const char *str = curl_easy_strerror(res);
-    if(!str)
-      failf(data, "unspecified error %d", (int)res);
-    else
-      failf(data, "%s", str);
+    if((conn->handler->protocol&CURLPROTO_HTTP) &&
+       data->state.proto.http->writebytecount)
+      return Curl_readrewind(conn);
   }
-
-  /* run post-transfer unconditionally, but don't clobber the return code if
-     we already have an error code recorder */
-  res2 = Curl_posttransfer(data);
-  if(!res && res2)
-    res = res2;
-
-  return res;
-}
-
-/*
- * Curl_perform() is the internal high-level function that gets called by the
- * external curl_easy_perform() function. It inits, performs and cleans up a
- * single file transfer.
- */
-CURLcode Curl_perform(struct SessionHandle *data)
-{
-  CURLcode res;
-  if(!data->set.wildcardmatch)
-    return Curl_do_perform(data);
-
-  /* init main wildcard structures */
-  res = Curl_wildcard_init(&data->wildcard);
-  if(res)
-    return res;
-
-  res = Curl_do_perform(data);
-  if(res) {
-    Curl_wildcard_dtor(&data->wildcard);
-    return res;
-  }
-
-  /* wildcard loop */
-  while(!res && data->wildcard.state != CURLWC_DONE)
-    res = Curl_do_perform(data);
-
-  Curl_wildcard_dtor(&data->wildcard);
-
-  /* wildcard download finished or failed */
-  data->wildcard.state = CURLWC_INIT;
-  return res;
+  return CURLE_OK;
 }
 
 /*
@@ -2318,7 +1943,7 @@ Curl_setup_transfer(
          (data->state.proto.http->sending == HTTPSEND_BODY)) {
         /* wait with write until we either got 100-continue or a timeout */
         k->exp100 = EXP100_AWAITING_CONTINUE;
-        k->start100 = k->start;
+        k->start100 = Curl_tvnow();
 
         /* set a timeout for the multi interface */
         Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
index 790e1e3..ad4a3ac 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __TRANSFER_H
-#define __TRANSFER_H
+#ifndef HEADER_CURL_TRANSFER_H
+#define HEADER_CURL_TRANSFER_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-CURLcode Curl_perform(struct SessionHandle *data);
+
 CURLcode Curl_pretransfer(struct SessionHandle *data);
 CURLcode Curl_second_connect(struct connectdata *conn);
 CURLcode Curl_posttransfer(struct SessionHandle *data);
@@ -36,7 +36,8 @@ typedef enum {
   FOLLOW_LAST   /* never used */
 } followtype;
 
-CURLcode Curl_follow(struct SessionHandle *data, char *newurl, followtype type);
+CURLcode Curl_follow(struct SessionHandle *data, char *newurl,
+                     followtype type);
 
 
 CURLcode Curl_readwrite(struct connectdata *conn, bool *done);
@@ -47,6 +48,7 @@ CURLcode Curl_readrewind(struct connectdata *conn);
 CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
 CURLcode Curl_reconnect_request(struct connectdata **connp);
 CURLcode Curl_retry_request(struct connectdata *conn, char **url);
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc);
 
 /* This sets up a forthcoming transfer */
 void
@@ -64,4 +66,5 @@ Curl_setup_transfer (struct connectdata *data,
 long Curl_sleep_time(curl_off_t rate_bps, curl_off_t cur_rate_bps,
                      int pkt_size);
 
-#endif
+#endif /* HEADER_CURL_TRANSFER_H */
+
index 8511ffe..7cec5bc 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-/* -- WIN32 approved -- */
+#include "curl_setup.h"
 
-#include "setup.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef WIN32
-#include <time.h>
-#include <io.h>
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
@@ -73,8 +51,6 @@
 #error "We can't compile without socket() support!"
 #endif
 
-#endif  /* WIN32 */
-
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
 #ifdef HAVE_IDN_FREE_H
 #include <idn-free.h>
 #else
-void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
-                              libidn 0.4.5's make install! */
+/* prototype from idn-free.h, not provided by libidn 0.4.5's make install! */
+void idn_free (void *ptr);
 #endif
 #ifndef HAVE_IDN_FREE
-/* if idn_free() was not found in this version of libidn, use plain free()
-   instead */
+/* if idn_free() was not found in this version of libidn use free() instead */
 #define idn_free(x) (free)(x)
 #endif
+#elif defined(USE_WIN32_IDN)
+/* prototype for curl_win32_idn_to_ascii() */
+int curl_win32_idn_to_ascii(const char *in, char **out);
 #endif  /* USE_LIBIDN */
 
 #include "urldata.h"
@@ -120,6 +98,8 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
 #include "speedcheck.h"
 #include "rawstr.h"
 #include "warnless.h"
+#include "non-ascii.h"
+#include "inet_pton.h"
 
 /* And now for the protocols */
 #include "ftp.h"
@@ -134,11 +114,17 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
 #include "url.h"
 #include "connect.h"
 #include "inet_ntop.h"
-#include "http_ntlm.h"
+#include "curl_ntlm.h"
+#include "curl_ntlm_wb.h"
 #include "socks.h"
-#include "rtsp.h"
 #include "curl_rtmp.h"
 #include "gopher.h"
+#include "http_proxy.h"
+#include "bundles.h"
+#include "conncache.h"
+#include "multihandle.h"
+#include "pipeline.h"
+#include "dotdot.h"
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
@@ -148,10 +134,20 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
 #include "memdebug.h"
 
 /* Local static prototypes */
-static long ConnectionKillOne(struct SessionHandle *data);
+static struct connectdata *
+find_oldest_idle_connection(struct SessionHandle *data);
+static struct connectdata *
+find_oldest_idle_connection_in_bundle(struct SessionHandle *data,
+                                      struct connectbundle *bundle);
 static void conn_free(struct connectdata *conn);
 static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke);
-
+static CURLcode do_init(struct connectdata *conn);
+static CURLcode parse_url_login(struct SessionHandle *data,
+                                struct connectdata *conn,
+                                char *user, char *passwd, char *options);
+static CURLcode parse_login_details(const char *login, const size_t len,
+                                    char **userptr, char **passwdptr,
+                                    char **optionsptr);
 /*
  * Protocol table.
  */
@@ -184,8 +180,9 @@ static const struct Curl_handler * const protocols[] = {
 
 #ifndef CURL_DISABLE_LDAP
   &Curl_handler_ldap,
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
-   (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+    ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+     (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
   &Curl_handler_ldaps,
 #endif
 #endif
@@ -259,44 +256,35 @@ static const struct Curl_handler Curl_handler_dummy = {
   ZERO_NULL,                            /* doing */
   ZERO_NULL,                            /* proto_getsock */
   ZERO_NULL,                            /* doing_getsock */
+  ZERO_NULL,                            /* domore_getsock */
   ZERO_NULL,                            /* perform_getsock */
   ZERO_NULL,                            /* disconnect */
+  ZERO_NULL,                            /* readwrite */
   0,                                    /* defport */
-  0                                     /* protocol */
+  0,                                    /* protocol */
+  PROTOPT_NONE                          /* flags */
 };
 
-void Curl_safefree(void *ptr)
-{
-  if(ptr)
-    free(ptr);
-}
-
-static void close_connections(struct SessionHandle *data)
-{
-  /* Loop through all open connections and kill them one by one */
-  long i;
-  do {
-    i = ConnectionKillOne(data);
-  } while(i != -1L);
-}
-
-void Curl_freeset(struct SessionHandle * data)
+void Curl_freeset(struct SessionHandle *data)
 {
   /* Free all dynamic strings stored in the data->set substructure. */
   enum dupstring i;
   for(i=(enum dupstring)0; i < STRING_LAST; i++)
     Curl_safefree(data->set.str[i]);
+
+  if(data->change.referer_alloc) {
+    Curl_safefree(data->change.referer);
+    data->change.referer_alloc = FALSE;
+  }
+  data->change.referer = NULL;
 }
 
-static CURLcode setstropt(char **charp, char * s)
+static CURLcode setstropt(char **charp, char *s)
 {
   /* Release the previous storage at `charp' and replace by a dynamic storage
      copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */
 
-  if(*charp) {
-    free(*charp);
-    *charp = (char *) NULL;
-  }
+  Curl_safefree(*charp);
 
   if(s) {
     s = strdup(s);
@@ -310,49 +298,54 @@ static CURLcode setstropt(char **charp, char * s)
   return CURLE_OK;
 }
 
-static CURLcode setstropt_userpwd(char *option, char **user_storage,
-                                  char **pwd_storage)
+static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp,
+                                  char **optionsp)
 {
-  char* separator;
   CURLcode result = CURLE_OK;
-
-  if(!option) {
-    /* we treat a NULL passed in as a hint to clear existing info */
-    Curl_safefree(*user_storage);
-    *user_storage = (char *) NULL;
-    Curl_safefree(*pwd_storage);
-    *pwd_storage = (char *) NULL;
-    return CURLE_OK;
+  char *user = NULL;
+  char *passwd = NULL;
+  char *options = NULL;
+
+  /* Parse the login details if specified. It not then we treat NULL as a hint
+     to clear the existing data */
+  if(option) {
+    result = parse_login_details(option, strlen(option),
+                                 (userp ? &user : NULL),
+                                 (passwdp ? &passwd : NULL),
+                                 (optionsp ? &options : NULL));
   }
 
-  separator = strchr(option, ':');
-  if (separator != NULL) {
+  if(!result) {
+    /* Store the username part of option if required */
+    if(userp) {
+      if(!user && option && option[0] == ':') {
+        /* Allocate an empty string instead of returning NULL as user name */
+        user = strdup("");
+        if(!user)
+          result = CURLE_OUT_OF_MEMORY;
+      }
 
-    /* store username part of option */
-    char * p;
-    size_t username_len = (size_t)(separator-option);
-    p = malloc(username_len+1);
-    if(!p)
-      result = CURLE_OUT_OF_MEMORY;
-    else {
-      memcpy(p, option, username_len);
-      p[username_len] = '\0';
-      Curl_safefree(*user_storage);
-      *user_storage = p;
+      Curl_safefree(*userp);
+      *userp = user;
     }
 
-    /* store password part of option */
-    if (result == CURLE_OK) {
-      result = setstropt(pwd_storage, separator+1);
+    /* Store the password part of option if required */
+    if(passwdp) {
+      Curl_safefree(*passwdp);
+      *passwdp = passwd;
+    }
+
+    /* Store the options part of option if required */
+    if(optionsp) {
+      Curl_safefree(*optionsp);
+      *optionsp = options;
     }
   }
-  else {
-    result = setstropt(user_storage, option);
-  }
+
   return result;
 }
 
-CURLcode Curl_dupset(struct SessionHandle * dst, struct SessionHandle * src)
+CURLcode Curl_dupset(struct SessionHandle *dst, struct SessionHandle *src)
 {
   CURLcode r = CURLE_OK;
   enum dupstring i;
@@ -375,39 +368,6 @@ CURLcode Curl_dupset(struct SessionHandle * dst, struct SessionHandle * src)
   return r;
 }
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-static void flush_cookies(struct SessionHandle *data, int cleanup)
-{
-  if(data->set.str[STRING_COOKIEJAR]) {
-    if(data->change.cookielist) {
-      /* If there is a list of cookie files to read, do it first so that
-         we have all the told files read before we write the new jar.
-         Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */
-      Curl_cookie_loadfiles(data);
-    }
-
-    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
-
-    /* if we have a destination file for all the cookies to get dumped to */
-    if(Curl_cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR]))
-      infof(data, "WARNING: failed to save cookies in %s\n",
-            data->set.str[STRING_COOKIEJAR]);
-  }
-  else {
-    if(cleanup && data->change.cookielist)
-      /* since nothing is written, we can just free the list of cookie file
-         names */
-      curl_slist_free_all(data->change.cookielist); /* clean up list */
-    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
-  }
-
-  if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
-    Curl_cookie_cleanup(data->cookies);
-  }
-  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
-}
-#endif
-
 /*
  * This is the internal function curl_easy_cleanup() calls. This should
  * cleanup and free all resources associated with this sessionhandle.
@@ -419,75 +379,25 @@ static void flush_cookies(struct SessionHandle *data, int cleanup)
 
 CURLcode Curl_close(struct SessionHandle *data)
 {
-  struct Curl_multi *m = data->multi;
-
-#ifdef DEBUGBUILD
-  /* only for debugging, scan through all connections and see if there's a
-     pipe reference still identifying this handle */
-
-  if(data->state.connc && data->state.connc->type == CONNCACHE_MULTI) {
-    struct conncache *c = data->state.connc;
-    long i;
-    struct curl_llist *pipeline;
-    struct curl_llist_element *curr;
-    struct connectdata *connptr;
-
-    for(i=0; i< c->num; i++) {
-      connptr = c->connects[i];
-      if(!connptr)
-        continue;
+  struct Curl_multi *m;
 
-      pipeline = connptr->send_pipe;
-      if(pipeline) {
-        for (curr = pipeline->head; curr; curr=curr->next) {
-          if(data == (struct SessionHandle *) curr->ptr) {
-            fprintf(stderr,
-                    "problem we %p are still in send pipe for %p done %d\n",
-                    data, connptr, (int)connptr->bits.done);
-          }
-        }
-      }
-      pipeline = connptr->recv_pipe;
-      if(pipeline) {
-        for (curr = pipeline->head; curr; curr=curr->next) {
-          if(data == (struct SessionHandle *) curr->ptr) {
-            fprintf(stderr,
-                    "problem we %p are still in recv pipe for %p done %d\n",
-                    data, connptr, (int)connptr->bits.done);
-          }
-        }
-      }
-      pipeline = connptr->done_pipe;
-      if(pipeline) {
-        for (curr = pipeline->head; curr; curr=curr->next) {
-          if(data == (struct SessionHandle *) curr->ptr) {
-            fprintf(stderr,
-                    "problem we %p are still in done pipe for %p done %d\n",
-                    data, connptr, (int)connptr->bits.done);
-          }
-        }
-      }
-      pipeline = connptr->pend_pipe;
-      if(pipeline) {
-        for (curr = pipeline->head; curr; curr=curr->next) {
-          if(data == (struct SessionHandle *) curr->ptr) {
-            fprintf(stderr,
-                    "problem we %p are still in pend pipe for %p done %d\n",
-                    data, connptr, (int)connptr->bits.done);
-          }
-        }
-      }
-    }
-  }
-#endif
+  if(!data)
+    return CURLE_OK;
 
   Curl_expire(data, 0); /* shut off timers */
 
+  m = data->multi;
+
   if(m)
     /* This handle is still part of a multi handle, take care of this first
        and detach this handle from there. */
     curl_multi_remove_handle(data->multi, data);
 
+  if(data->multi_easy)
+    /* when curl_easy_perform() is used, it creates its own multi handle to
+       use and this is the one */
+    curl_multi_cleanup(data->multi_easy);
+
   /* Destroy the timeout list that is held in the easy handle. It is
      /normally/ done by curl_multi_remove_handle() but this is "just in
      case" */
@@ -500,36 +410,13 @@ CURLcode Curl_close(struct SessionHandle *data)
                       the multi handle, since that function uses the magic
                       field! */
 
-  if(data->state.connc) {
-
-    if(data->state.connc->type == CONNCACHE_PRIVATE) {
-      /* close all connections still alive that are in the private connection
-         cache, as we no longer have the pointer left to the shared one. */
-      close_connections(data);
-
-      /* free the connection cache if allocated privately */
-      Curl_rm_connc(data->state.connc);
-    }
-  }
-
-  if(data->state.shared_conn) {
-    /* marked to be used by a pending connection so we can't kill this handle
-       just yet */
-    data->state.closed = TRUE;
-    return CURLE_OK;
-  }
-
-  if(data->dns.hostcachetype == HCACHE_PRIVATE) {
-    Curl_hash_destroy(data->dns.hostcache);
-    data->dns.hostcachetype = HCACHE_NONE;
-    data->dns.hostcache = NULL;
-  }
-
   if(data->state.rangestringalloc)
     free(data->state.range);
 
   /* Free the pathbuffer */
   Curl_safefree(data->state.pathbuffer);
+  data->state.path = NULL;
+
   Curl_safefree(data->state.proto.generic);
 
   /* Close down all open SSL info and sessions */
@@ -538,17 +425,21 @@ CURLcode Curl_close(struct SessionHandle *data)
   Curl_safefree(data->state.scratch);
   Curl_ssl_free_certinfo(data);
 
-  if(data->change.referer_alloc)
-    free(data->change.referer);
+  if(data->change.referer_alloc) {
+    Curl_safefree(data->change.referer);
+    data->change.referer_alloc = FALSE;
+  }
+  data->change.referer = NULL;
 
-  if(data->change.url_alloc)
-    free(data->change.url);
+  if(data->change.url_alloc) {
+    Curl_safefree(data->change.url);
+    data->change.url_alloc = FALSE;
+  }
+  data->change.url = NULL;
 
   Curl_safefree(data->state.headerbuff);
 
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
-  flush_cookies(data, 1);
-#endif
+  Curl_flush_cookies(data, 1);
 
   Curl_digest_cleanup(data);
 
@@ -556,20 +447,9 @@ CURLcode Curl_close(struct SessionHandle *data)
   Curl_safefree(data->info.wouldredirect);
 
   /* this destroys the channel and we cannot use it anymore after this */
-  ares_destroy(data->state.areschannel);
+  Curl_resolver_cleanup(data->state.resolver);
 
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-  /* close iconv conversion descriptors */
-  if(data->inbound_cd != (iconv_t)-1) {
-     iconv_close(data->inbound_cd);
-  }
-  if(data->outbound_cd != (iconv_t)-1) {
-     iconv_close(data->outbound_cd);
-  }
-  if(data->utf8_cd != (iconv_t)-1) {
-     iconv_close(data->utf8_cd);
-  }
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+  Curl_convert_close(data);
 
   /* No longer a dirty share, if it exists */
   if(data->share) {
@@ -583,116 +463,6 @@ CURLcode Curl_close(struct SessionHandle *data)
   return CURLE_OK;
 }
 
-/* create a connection cache of a private or multi type */
-struct conncache *Curl_mk_connc(int type,
-                                long amount) /* set -1 to use default */
-{
-  /* It is subject for debate how many default connections to have for a multi
-     connection cache... */
-
-  struct conncache *c;
-  long default_amount;
-  long max_amount = (long)(((size_t)INT_MAX) / sizeof(struct connectdata *));
-
-  if(type == CONNCACHE_PRIVATE) {
-    default_amount = (amount < 1L) ? 5L : amount;
-  }
-  else {
-    default_amount = (amount < 1L) ? 10L : amount;
-  }
-
-  if(default_amount > max_amount)
-    default_amount = max_amount;
-
-  c = calloc(1, sizeof(struct conncache));
-  if(!c)
-    return NULL;
-
-  c->connects = calloc((size_t)default_amount, sizeof(struct connectdata *));
-  if(!c->connects) {
-    free(c);
-    return NULL;
-  }
-
-  c->num = default_amount;
-
-  return c;
-}
-
-/* Change number of entries of a connection cache */
-CURLcode Curl_ch_connc(struct SessionHandle *data,
-                       struct conncache *c,
-                       long newamount)
-{
-  long i;
-  struct connectdata **newptr;
-  long max_amount = (long)(((size_t)INT_MAX) / sizeof(struct connectdata *));
-
-  if(newamount < 1)
-    newamount = 1; /* we better have at least one entry */
-
-  if(!c) {
-    /* we get a NULL pointer passed in as connection cache, which means that
-       there is no cache created for this SessionHandle just yet, we create a
-       brand new with the requested size.
-    */
-    data->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, newamount);
-    if(!data->state.connc)
-      return CURLE_OUT_OF_MEMORY;
-    return CURLE_OK;
-  }
-
-  if(newamount < c->num) {
-    /* Since this number is *decreased* from the existing number, we must
-       close the possibly open connections that live on the indexes that
-       are being removed!
-
-       NOTE: for conncache_multi cases we must make sure that we only
-       close handles not in use.
-    */
-    for(i=newamount; i< c->num; i++)
-      Curl_disconnect(c->connects[i], /* dead_connection */ FALSE);
-
-    /* If the most recent connection is no longer valid, mark it
-       invalid. */
-    if(data->state.lastconnect <= newamount)
-      data->state.lastconnect = -1;
-  }
-  if(newamount > 0) {
-    if(newamount > max_amount)
-      newamount = max_amount;
-    newptr = realloc(c->connects, sizeof(struct connectdata *) * newamount);
-    if(!newptr)
-      /* we closed a few connections in vain, but so what? */
-      return CURLE_OUT_OF_MEMORY;
-
-    /* nullify the newly added pointers */
-    for(i=c->num; i<newamount; i++)
-      newptr[i] = NULL;
-
-    c->connects = newptr;
-    c->num = newamount;
-  }
-  /* we no longer support less than 1 as size for the connection cache, and
-     I'm not sure it ever worked to set it to zero */
-  return CURLE_OK;
-}
-
-/* Free a connection cache. This is called from Curl_close() and
-   curl_multi_cleanup(). */
-void Curl_rm_connc(struct conncache *c)
-{
-  if(c->connects) {
-    long i;
-    for(i = 0; i < c->num; ++i)
-      conn_free(c->connects[i]);
-
-    free(c->connects);
-  }
-
-  free(c);
-}
-
 /*
  * Initialize the UserDefined fields within a SessionHandle.
  * This may be safely called on a new or existing SessionHandle.
@@ -735,7 +505,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
   set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
 
   /* Set the default size of the SSL session ID cache */
-  set->ssl.numsessions = 5;
+  set->ssl.max_ssl_sessions = 5;
 
   set->proxyport = CURL_DEFAULT_PROXY_PORT; /* from url.h */
   set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
@@ -750,7 +520,10 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
    * switched off unless wanted.
    */
   set->ssl.verifypeer = TRUE;
-  set->ssl.verifyhost = 2;
+  set->ssl.verifyhost = TRUE;
+#ifdef USE_TLS_SRP
+  set->ssl.authtype = CURL_TLSAUTH_NONE;
+#endif
   set->ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth
                                                       type */
   set->ssl.sessionid = TRUE; /* session ID caching enabled by default */
@@ -761,9 +534,9 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
   /* for the *protocols fields we don't use the CURLPROTO_ALL convenience
      define since we internally only use the lower 16 bits for the passed
      in bitmask to not conflict with the private bits */
-  set->allowed_protocols = PROT_EXTMASK;
+  set->allowed_protocols = CURLPROTO_ALL;
   set->redir_protocols =
-    PROT_EXTMASK & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
+    CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
 
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   /*
@@ -774,7 +547,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
   /* set default gssapi service name */
   res = setstropt(&set->str[STRING_SOCKS5_GSSAPI_SERVICE],
                   (char *) CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE);
-  if (res != CURLE_OK)
+  if(res != CURLE_OK)
     return res;
 #endif
 
@@ -789,6 +562,13 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
   set->chunk_bgn      = ZERO_NULL;
   set->chunk_end      = ZERO_NULL;
 
+  /* tcp keepalives are disabled by default, but provide reasonable values for
+   * the interval and idle times.
+   */
+  set->tcp_keepalive = FALSE;
+  set->tcp_keepintvl = 60;
+  set->tcp_keepidle = 60;
+
   return res;
 }
 
@@ -804,9 +584,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
 {
   CURLcode res = CURLE_OK;
   struct SessionHandle *data;
-#ifdef USE_ARES
-  int status;
-#endif
+  CURLcode status;
 
   /* Very simple start-up: alloc the struct, init it with zeroes and return */
   data = calloc(1, sizeof(struct SessionHandle));
@@ -818,18 +596,12 @@ CURLcode Curl_open(struct SessionHandle **curl)
 
   data->magic = CURLEASY_MAGIC_NUMBER;
 
-#ifdef USE_ARES
-  if((status = ares_init(&data->state.areschannel)) != ARES_SUCCESS) {
-    DEBUGF(fprintf(stderr, "Error: ares_init failed\n"));
+  status = Curl_resolver_init(&data->state.resolver);
+  if(status) {
+    DEBUGF(fprintf(stderr, "Error: resolver_init failed\n"));
     free(data);
-    if(status == ARES_ENOMEM)
-      return CURLE_OUT_OF_MEMORY;
-    else
-      return CURLE_FAILED_INIT;
+    return status;
   }
-  /* make sure that all other returns from this function should destroy the
-     ares channel before returning error! */
-#endif
 
   /* We do some initial setup here, all those fields that can't be just 0 */
 
@@ -844,15 +616,10 @@ CURLcode Curl_open(struct SessionHandle **curl)
 
     data->state.headersize=HEADERSIZE;
 
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-    /* conversion descriptors for iconv calls */
-    data->outbound_cd = (iconv_t)-1;
-    data->inbound_cd  = (iconv_t)-1;
-    data->utf8_cd     = (iconv_t)-1;
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
+    Curl_convert_init(data);
 
     /* most recent connection is not yet defined */
-    data->state.lastconnect = -1;
+    data->state.lastconnect = NULL;
 
     data->progress.flags |= PGRS_HIDE;
     data->state.current_speed = -1; /* init to negative == impossible */
@@ -860,13 +627,11 @@ CURLcode Curl_open(struct SessionHandle **curl)
     data->wildcard.state = CURLWC_INIT;
     data->wildcard.filelist = NULL;
     data->set.fnmatch = ZERO_NULL;
-    /* This no longer creates a connection cache here. It is instead made on
-       the first call to curl_easy_perform() or when the handle is added to a
-       multi stack. */
+    data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
   }
 
   if(res) {
-    ares_destroy(data->state.areschannel);
+    Curl_resolver_cleanup(data->state.resolver);
     if(data->state.headerbuff)
       free(data->state.headerbuff);
     Curl_freeset(data);
@@ -884,6 +649,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
 {
   char *argptr;
   CURLcode result = CURLE_OK;
+  long arg;
 #ifndef CURL_DISABLE_HTTP
   curl_off_t bigsize;
 #endif
@@ -893,12 +659,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     data->set.dns_cache_timeout = va_arg(param, long);
     break;
   case CURLOPT_DNS_USE_GLOBAL_CACHE:
-  {
     /* remember we want this enabled */
-    long use_cache = va_arg(param, long);
-    data->set.global_dns_cache = (bool)(0 != use_cache);
-  }
-  break;
+    arg = va_arg(param, long);
+    data->set.global_dns_cache = (0 != arg)?TRUE:FALSE;
+    break;
   case CURLOPT_SSL_CIPHER_LIST:
     /* set a list of cipher we want to use in the SSL connection */
     result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST],
@@ -925,40 +689,40 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Set the absolute number of maximum simultaneous alive connection that
      * libcurl is allowed to have.
      */
-    result = Curl_ch_connc(data, data->state.connc, va_arg(param, long));
+    data->set.maxconnects = va_arg(param, long);
     break;
   case CURLOPT_FORBID_REUSE:
     /*
      * When this transfer is done, it must not be left to be reused by a
      * subsequent transfer but shall be closed immediately.
      */
-    data->set.reuse_forbid = (bool)(0 != va_arg(param, long));
+    data->set.reuse_forbid = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_FRESH_CONNECT:
     /*
      * This transfer shall not use a previously cached connection but
      * should be made with a fresh new connect!
      */
-    data->set.reuse_fresh = (bool)(0 != va_arg(param, long));
+    data->set.reuse_fresh = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_VERBOSE:
     /*
      * Verbose means infof() calls that give a lot of information about
      * the connection and transfer procedures as well as internal choices.
      */
-    data->set.verbose = (bool)(0 != va_arg(param, long));
+    data->set.verbose = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_HEADER:
     /*
      * Set to include the header in the general data output stream.
      */
-    data->set.include_header = (bool)(0 != va_arg(param, long));
+    data->set.include_header = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_NOPROGRESS:
     /*
      * Shut off the internal supported progress meter
      */
-    data->set.hide_progress = (bool)(0 != va_arg(param, long));
+    data->set.hide_progress = (0 != va_arg(param, long))?TRUE:FALSE;
     if(data->set.hide_progress)
       data->progress.flags |= PGRS_HIDE;
     else
@@ -968,14 +732,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * Do not include the body part in the output data stream.
      */
-    data->set.opt_no_body = (bool)(0 != va_arg(param, long));
+    data->set.opt_no_body = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_FAILONERROR:
     /*
      * Don't output the >=300 error code HTML-page, but instead only
      * return error.
      */
-    data->set.http_fail_on_error = (bool)(0 != va_arg(param, long));
+    data->set.http_fail_on_error = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_UPLOAD:
   case CURLOPT_PUT:
@@ -983,7 +747,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * We want to sent data to the remote host. If this is HTTP, that equals
      * using the PUT request.
      */
-    data->set.upload = (bool)(0 != va_arg(param, long));
+    data->set.upload = (0 != va_arg(param, long))?TRUE:FALSE;
     if(data->set.upload) {
       /* If this is HTTP, PUT is what's needed to "upload" */
       data->set.httpreq = HTTPREQ_PUT;
@@ -999,7 +763,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Try to get the file time of the remote document. The time will
      * later (possibly) become available using curl_easy_getinfo().
      */
-    data->set.get_filetime = (bool)(0 != va_arg(param, long));
+    data->set.get_filetime = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_FTP_CREATE_MISSING_DIRS:
     /*
@@ -1018,7 +782,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
       break;
     default:
       /* reserve other values for future use */
-      result = CURLE_FAILED_INIT;
+      result = CURLE_UNKNOWN_OPTION;
       break;
     }
     break;
@@ -1040,13 +804,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * An option that changes the command to one that asks for a list
      * only, no file info details.
      */
-    data->set.ftp_list_only = (bool)(0 != va_arg(param, long));
+    data->set.ftp_list_only = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_APPEND:
     /*
      * We want to upload and append to an existing file.
      */
-    data->set.ftp_append = (bool)(0 != va_arg(param, long));
+    data->set.ftp_append = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_FTP_FILEMETHOD:
     /*
@@ -1074,7 +838,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      *
      * Transfer using ASCII (instead of BINARY).
      */
-    data->set.prefer_ascii = (bool)(0 != va_arg(param, long));
+    data->set.prefer_ascii = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_TIMECONDITION:
     /*
@@ -1103,10 +867,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * Switch on automatic referer that gets set if curl follows locations.
      */
-    data->set.http_auto_referer = (bool)(0 != va_arg(param, long));
+    data->set.http_auto_referer = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
-  case CURLOPT_ENCODING:
+  case CURLOPT_ACCEPT_ENCODING:
     /*
      * String to use at the value of Accept-Encoding header.
      *
@@ -1122,11 +886,15 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
                        (char *) ALL_CONTENT_ENCODINGS: argptr);
     break;
 
+  case CURLOPT_TRANSFER_ENCODING:
+    data->set.http_transfer_encoding = (0 != va_arg(param, long))?TRUE:FALSE;
+    break;
+
   case CURLOPT_FOLLOWLOCATION:
     /*
      * Follow Location: header hints on a HTTP-server.
      */
-    data->set.http_follow_location = (bool)(0 != va_arg(param, long));
+    data->set.http_follow_location = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_UNRESTRICTED_AUTH:
@@ -1135,7 +903,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * hostname changed.
      */
     data->set.http_disable_hostname_check_before_authentication =
-      (bool)(0 != va_arg(param, long));
+      (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_MAXREDIRS:
@@ -1153,12 +921,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302
      * CURL_REDIR_POST_301 - POST is kept as POST after 301
      * CURL_REDIR_POST_302 - POST is kept as POST after 302
-     * CURL_REDIR_POST_ALL - POST is kept as POST after 301 and 302
+     * CURL_REDIR_POST_303 - POST is kept as POST after 303
+     * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303
      * other - POST is kept as POST after 301 and 302
      */
-    long postRedir = va_arg(param, long);
-    data->set.post301 = (bool)((postRedir & CURL_REDIR_POST_301)?TRUE:FALSE);
-    data->set.post302 = (bool)((postRedir & CURL_REDIR_POST_302)?TRUE:FALSE);
+    int postRedir = curlx_sltosi(va_arg(param, long));
+    data->set.keep_post = postRedir & CURL_REDIR_POST_ALL;
   }
   break;
 
@@ -1279,7 +1047,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * String to set in the HTTP Referer: field.
      */
     if(data->change.referer_alloc) {
-      free(data->change.referer);
+      Curl_safefree(data->change.referer);
       data->change.referer_alloc = FALSE;
     }
     result = setstropt(&data->set.str[STRING_SET_REFERER],
@@ -1328,10 +1096,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
       /* append the cookie file name to the list of file names, and deal with
          them later */
       cl = curl_slist_append(data->change.cookielist, argptr);
-
-      if(!cl)
+      if(!cl) {
+        curl_slist_free_all(data->change.cookielist);
+        data->change.cookielist = NULL;
         return CURLE_OUT_OF_MEMORY;
-
+      }
       data->change.cookielist = cl; /* store the list for later use */
     }
     break;
@@ -1367,7 +1136,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * We run mostly with the original cookie spec, as hardly anyone implements
      * anything else.
      */
-    data->set.cookiesession = (bool)(0 != va_arg(param, long));
+    data->set.cookiesession = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_COOKIELIST:
@@ -1376,41 +1145,44 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     if(argptr == NULL)
       break;
 
+    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
+
     if(Curl_raw_equal(argptr, "ALL")) {
       /* clear all cookies */
       Curl_cookie_clearall(data->cookies);
-      break;
     }
     else if(Curl_raw_equal(argptr, "SESS")) {
       /* clear session cookies */
       Curl_cookie_clearsess(data->cookies);
-      break;
     }
     else if(Curl_raw_equal(argptr, "FLUSH")) {
       /* flush cookies to file */
-      flush_cookies(data, 0);
-      break;
+      Curl_flush_cookies(data, 0);
     }
+    else {
+      if(!data->cookies)
+        /* if cookie engine was not running, activate it */
+        data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE);
 
-    if(!data->cookies)
-      /* if cookie engine was not running, activate it */
-      data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE);
+      argptr = strdup(argptr);
+      if(!argptr) {
+        result = CURLE_OUT_OF_MEMORY;
+      }
+      else {
 
-    argptr = strdup(argptr);
-    if(!argptr) {
-      result = CURLE_OUT_OF_MEMORY;
-      break;
-    }
+        if(checkprefix("Set-Cookie:", argptr))
+          /* HTTP Header format line */
+          Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);
 
-    if(checkprefix("Set-Cookie:", argptr))
-      /* HTTP Header format line */
-      Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);
+        else
+          /* Netscape format line */
+          Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);
 
-    else
-      /* Netscape format line */
-      Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);
+        free(argptr);
+      }
+    }
+    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 
-    free(argptr);
     break;
 #endif /* CURL_DISABLE_COOKIES */
 
@@ -1438,12 +1210,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Set HTTP Authentication type BITMASK.
      */
   {
-    long auth = va_arg(param, long);
+    int bitcheck;
+    bool authbits;
+    unsigned long auth = va_arg(param, unsigned long);
+
+    if(auth == CURLAUTH_NONE) {
+      data->set.httpauth = auth;
+      break;
+    }
 
     /* the DIGEST_IE bit is only used to set a special marker, for all the
        rest we need to handle it as normal DIGEST */
-    data->state.authhost.iestyle = (bool)((auth & CURLAUTH_DIGEST_IE)?
-                                          TRUE:FALSE);
+    data->state.authhost.iestyle = (auth & CURLAUTH_DIGEST_IE)?TRUE:FALSE;
 
     if(auth & CURLAUTH_DIGEST_IE) {
       auth |= CURLAUTH_DIGEST; /* set standard digest bit */
@@ -1452,13 +1230,27 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
 
     /* switch off bits we can't support */
 #ifndef USE_NTLM
-    auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */
+    auth &= ~CURLAUTH_NTLM;    /* no NTLM support */
+    auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
+#elif !defined(NTLM_WB_ENABLED)
+    auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
 #endif
-#ifndef HAVE_GSSAPI
-    auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI */
+#ifndef USE_HTTP_NEGOTIATE
+    auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or
+                                       WINDOWS_SSPI */
 #endif
-    if(!auth)
-      return CURLE_FAILED_INIT; /* no supported types left! */
+
+    /* check if any auth bit lower than CURLAUTH_ONLY is still set */
+    bitcheck = 0;
+    authbits = FALSE;
+    while(bitcheck < 31) {
+      if(auth & (1UL << bitcheck++)) {
+        authbits = TRUE;
+        break;
+      }
+    }
+    if(!authbits)
+      return CURLE_NOT_BUILT_IN; /* no supported types left! */
 
     data->set.httpauth = auth;
   }
@@ -1484,7 +1276,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * Tunnel operations through the proxy instead of normal proxy use
      */
-    data->set.tunnel_thru_httpproxy = (bool)(0 != va_arg(param, long));
+    data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_PROXYPORT:
@@ -1499,12 +1291,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Set HTTP Authentication type BITMASK.
      */
   {
-    long auth = va_arg(param, long);
+    int bitcheck;
+    bool authbits;
+    unsigned long auth = va_arg(param, unsigned long);
+
+    if(auth == CURLAUTH_NONE) {
+      data->set.proxyauth = auth;
+      break;
+    }
 
     /* the DIGEST_IE bit is only used to set a special marker, for all the
        rest we need to handle it as normal DIGEST */
-    data->state.authproxy.iestyle = (bool)((auth & CURLAUTH_DIGEST_IE)?
-                                           TRUE:FALSE);
+    data->state.authproxy.iestyle = (auth & CURLAUTH_DIGEST_IE)?TRUE:FALSE;
 
     if(auth & CURLAUTH_DIGEST_IE) {
       auth |= CURLAUTH_DIGEST; /* set standard digest bit */
@@ -1512,13 +1310,27 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     }
     /* switch off bits we can't support */
 #ifndef USE_NTLM
-    auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */
+    auth &= ~CURLAUTH_NTLM;    /* no NTLM support */
+    auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
+#elif !defined(NTLM_WB_ENABLED)
+    auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */
 #endif
-#ifndef HAVE_GSSAPI
-    auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI */
+#ifndef USE_HTTP_NEGOTIATE
+    auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or
+                                       WINDOWS_SSPI */
 #endif
-    if(!auth)
-      return CURLE_FAILED_INIT; /* no supported types left! */
+
+    /* check if any auth bit lower than CURLAUTH_ONLY is still set */
+    bitcheck = 0;
+    authbits = FALSE;
+    while(bitcheck < 31) {
+      if(auth & (1UL << bitcheck++)) {
+        authbits = TRUE;
+        break;
+      }
+    }
+    if(!authbits)
+      return CURLE_NOT_BUILT_IN; /* no supported types left! */
 
     data->set.proxyauth = auth;
   }
@@ -1558,7 +1370,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
       break;
     default:
       /* reserve other values for future use */
-      result = CURLE_FAILED_INIT;
+      result = CURLE_UNKNOWN_OPTION;
       break;
     }
     break;
@@ -1577,7 +1389,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * set flag for nec socks5 support
      */
-    data->set.socks5_gssapi_nec = (bool)(0 != va_arg(param, long));
+    data->set.socks5_gssapi_nec = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 #endif
 
@@ -1596,9 +1408,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     break;
   case CURLOPT_FILE:
     /*
-     * FILE pointer to write to or include in the data write callback
+     * FILE pointer to write to. Or possibly
+     * used as argument to the write callback.
      */
-    data->set.out = va_arg(param, FILE *);
+    data->set.out = va_arg(param, void *);
     break;
   case CURLOPT_FTPPORT:
     /*
@@ -1606,19 +1419,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     result = setstropt(&data->set.str[STRING_FTPPORT],
                        va_arg(param, char *));
-    data->set.ftp_use_port = (bool)(NULL != data->set.str[STRING_FTPPORT]);
+    data->set.ftp_use_port = (NULL != data->set.str[STRING_FTPPORT]) ?
+                             TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_USE_EPRT:
-    data->set.ftp_use_eprt = (bool)(0 != va_arg(param, long));
+    data->set.ftp_use_eprt = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_USE_EPSV:
-    data->set.ftp_use_epsv = (bool)(0 != va_arg(param, long));
+    data->set.ftp_use_epsv = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_USE_PRET:
-    data->set.ftp_use_pret = (bool)(0 != va_arg(param, long));
+    data->set.ftp_use_pret = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_SSL_CCC:
@@ -1630,7 +1444,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the
      * bypass of the IP address in PASV responses.
      */
-    data->set.ftp_skip_ip = (bool)(0 != va_arg(param, long));
+    data->set.ftp_skip_ip = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_INFILE:
@@ -1638,7 +1452,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * FILE pointer to read the file to be uploaded from. Or possibly
      * used as argument to the read callback.
      */
-    data->set.in = va_arg(param, FILE *);
+    data->set.in = va_arg(param, void *);
     break;
   case CURLOPT_INFILESIZE:
     /*
@@ -1688,8 +1502,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     if(data->change.url_alloc) {
       /* the already set URL is allocated, free it first! */
-      free(data->change.url);
-      data->change.url_alloc=FALSE;
+      Curl_safefree(data->change.url);
+      data->change.url_alloc = FALSE;
     }
     result = setstropt(&data->set.str[STRING_SET_URL],
                        va_arg(param, char *));
@@ -1724,13 +1538,21 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     data->set.connecttimeout = va_arg(param, long);
     break;
 
+  case CURLOPT_ACCEPTTIMEOUT_MS:
+    /*
+     * The maximum time you allow curl to wait for server connect
+     */
+    data->set.accepttimeout = va_arg(param, long);
+    break;
+
   case CURLOPT_USERPWD:
     /*
-     * user:password to use in the operation
+     * user:password;options to use in the operation
      */
     result = setstropt_userpwd(va_arg(param, char *),
                                &data->set.str[STRING_USERNAME],
-                               &data->set.str[STRING_PASSWORD]);
+                               &data->set.str[STRING_PASSWORD],
+                               &data->set.str[STRING_OPTIONS]);
     break;
   case CURLOPT_USERNAME:
     /*
@@ -1787,8 +1609,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
       data->progress.callback = TRUE; /* no longer internal */
     else
       data->progress.callback = FALSE; /* NULL enforces internal */
+    break;
+
+  case CURLOPT_XFERINFOFUNCTION:
+    /*
+     * Transfer info callback function
+     */
+    data->set.fxferinfo = va_arg(param, curl_xferinfo_callback);
+    if(data->set.fxferinfo)
+      data->progress.callback = TRUE; /* no longer internal */
+    else
+      data->progress.callback = FALSE; /* NULL enforces internal */
 
     break;
+
   case CURLOPT_PROGRESSDATA:
     /*
      * Custom client data to pass to the progress callback
@@ -1803,7 +1637,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     result = setstropt_userpwd(va_arg(param, char *),
                                &data->set.str[STRING_PROXYUSERNAME],
-                               &data->set.str[STRING_PROXYPASSWORD]);
+                               &data->set.str[STRING_PROXYPASSWORD], NULL);
     break;
   case CURLOPT_PROXYUSERNAME:
     /*
@@ -2000,7 +1834,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * Kludgy option to enable CRLF conversions. Subject for removal.
      */
-    data->set.crlf = (bool)(0 != va_arg(param, long));
+    data->set.crlf = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_INTERFACE:
@@ -2029,19 +1863,37 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     result = setstropt(&data->set.str[STRING_KRB_LEVEL],
                        va_arg(param, char *));
-    data->set.krb = (bool)(NULL != data->set.str[STRING_KRB_LEVEL]);
+    data->set.krb = (NULL != data->set.str[STRING_KRB_LEVEL])?TRUE:FALSE;
+    break;
+  case CURLOPT_GSSAPI_DELEGATION:
+    /*
+     * GSSAPI credential delegation
+     */
+    data->set.gssapi_delegation = va_arg(param, long);
     break;
   case CURLOPT_SSL_VERIFYPEER:
     /*
      * Enable peer SSL verifying.
      */
-    data->set.ssl.verifypeer = va_arg(param, long);
+    data->set.ssl.verifypeer = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_SSL_VERIFYHOST:
     /*
-     * Enable verification of the CN contained in the peer certificate
+     * Enable verification of the host name in the peer certificate
      */
-    data->set.ssl.verifyhost = va_arg(param, long);
+    arg = va_arg(param, long);
+
+    /* Obviously people are not reading documentation and too many thought
+       this argument took a boolean when it wasn't and misused it. We thus ban
+       1 as a sensible input and we warn about its use. Then we only have the
+       2 action internally stored as TRUE. */
+
+    if(1 == arg) {
+      failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!");
+      return CURLE_BAD_FUNCTION_ARGUMENT;
+    }
+
+    data->set.ssl.verifyhost = (0 != arg)?TRUE:FALSE;
     break;
 #ifdef USE_SSLEAY
     /* since these two options are only possible to use on an OpenSSL-
@@ -2060,8 +1912,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     data->set.ssl.fsslctxp = va_arg(param, void *);
     break;
+#endif
+#if defined(USE_SSLEAY) || defined(USE_QSOSSL) || defined(USE_GSKIT)
   case CURLOPT_CERTINFO:
-    data->set.ssl.certinfo = (bool)(0 != va_arg(param, long));
+    data->set.ssl.certinfo = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 #endif
   case CURLOPT_CAINFO:
@@ -2121,7 +1975,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * The application asks not to set any signal() or alarm() handlers,
      * even when using a timeout.
      */
-    data->set.no_signal = (bool)(0 != va_arg(param, long));
+    data->set.no_signal = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_SHARE:
@@ -2138,8 +1992,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
         data->dns.hostcachetype = HCACHE_NONE;
       }
 
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
       if(data->share->cookies == data->cookies)
         data->cookies = NULL;
+#endif
+
+      if(data->share->sslsession == data->state.session)
+        data->state.session = NULL;
 
       data->share->dirty--;
 
@@ -2156,10 +2015,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
       data->share->dirty++;
 
       if(data->share->hostcache) {
-        /* use shared host cache, first free the private one if any */
-        if(data->dns.hostcachetype == HCACHE_PRIVATE)
-          Curl_hash_destroy(data->dns.hostcache);
-
+        /* use shared host cache */
         data->dns.hostcache = data->share->hostcache;
         data->dns.hostcachetype = HCACHE_SHARED;
       }
@@ -2172,6 +2028,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
         data->cookies = data->share->cookies;
       }
 #endif   /* CURL_DISABLE_HTTP */
+      if(data->share->sslsession) {
+        data->set.ssl.max_ssl_sessions = data->share->max_ssl_sessions;
+        data->state.session = data->share->sslsession;
+      }
       Curl_share_unlock(data, CURL_LOCK_DATA_SHARE);
 
     }
@@ -2199,8 +2059,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * Make transfers attempt to use SSL/TLS.
      */
-    data->set.ftp_ssl = (curl_usessl)va_arg(param, long);
+    data->set.use_ssl = (curl_usessl)va_arg(param, long);
+    break;
+
+  case CURLOPT_SSL_OPTIONS:
+    arg = va_arg(param, long);
+    data->set.ssl_enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE;
     break;
+
 #endif
   case CURLOPT_FTPSSLAUTH:
     /*
@@ -2225,7 +2091,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Enable or disable TCP_NODELAY, which will disable/enable the Nagle
      * algorithm
      */
-    data->set.tcp_nodelay = (bool)(0 != va_arg(param, long));
+    data->set.tcp_nodelay = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_ACCOUNT:
@@ -2234,14 +2100,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     break;
 
   case CURLOPT_IGNORE_CONTENT_LENGTH:
-    data->set.ignorecl = (bool)(0 != va_arg(param, long));
+    data->set.ignorecl = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_CONNECT_ONLY:
     /*
      * No data transfer, set up connection and let application use the socket
      */
-    data->set.connect_only = (bool)(0 != va_arg(param, long));
+    data->set.connect_only = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_FTP_ALTERNATIVE_TO_USER:
@@ -2278,8 +2144,23 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     data->set.opensocket_client = va_arg(param, void *);
     break;
 
+  case CURLOPT_CLOSESOCKETFUNCTION:
+    /*
+     * close socket callback function: called instead of close()
+     * when shutting down a connection
+     */
+    data->set.fclosesocket = va_arg(param, curl_closesocket_callback);
+    break;
+
+  case CURLOPT_CLOSESOCKETDATA:
+    /*
+     * socket callback data pointer. Might be NULL.
+     */
+    data->set.closesocket_client = va_arg(param, void *);
+    break;
+
   case CURLOPT_SSL_SESSIONID_CACHE:
-    data->set.ssl.sessionid = (bool)(0 != va_arg(param, long));
+    data->set.ssl.sessionid = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
 
 #ifdef USE_LIBSSH2
@@ -2340,14 +2221,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     /*
      * disable libcurl transfer encoding is used
      */
-    data->set.http_te_skip = (bool)(0 == va_arg(param, long));
+    data->set.http_te_skip = (0 == va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_HTTP_CONTENT_DECODING:
     /*
      * raw data passed to the application when content encoding is used
      */
-    data->set.http_ce_skip = (bool)(0 == va_arg(param, long));
+    data->set.http_ce_skip = (0 == va_arg(param, long))?TRUE:FALSE;
     break;
 
   case CURLOPT_NEW_FILE_PERMS:
@@ -2378,7 +2259,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
        transfer, which thus helps the app which takes URLs from users or other
        external inputs and want to restrict what protocol(s) to deal
        with. Defaults to CURLPROTO_ALL. */
-    data->set.allowed_protocols = va_arg(param, long) & PROT_EXTMASK;
+    data->set.allowed_protocols = va_arg(param, long);
     break;
 
   case CURLOPT_REDIR_PROTOCOLS:
@@ -2386,19 +2267,31 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
        as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
        to be set in both bitmasks to be allowed to get redirected to. Defaults
        to all protocols except FILE and SCP. */
-    data->set.redir_protocols = va_arg(param, long) & PROT_EXTMASK;
+    data->set.redir_protocols = va_arg(param, long);
     break;
 
   case CURLOPT_MAIL_FROM:
+    /* Set the SMTP mail originator */
     result = setstropt(&data->set.str[STRING_MAIL_FROM],
                        va_arg(param, char *));
     break;
 
+  case CURLOPT_MAIL_AUTH:
+    /* Set the SMTP auth originator */
+    result = setstropt(&data->set.str[STRING_MAIL_AUTH],
+                       va_arg(param, char *));
+    break;
+
   case CURLOPT_MAIL_RCPT:
-    /* get a list of mail recipients */
+    /* Set the list of mail recipients */
     data->set.mail_rcpt = va_arg(param, struct curl_slist *);
     break;
 
+  case CURLOPT_SASL_IR:
+    /* Enable/disable SASL initial response */
+    data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE;
+    break;
+
   case CURLOPT_RTSP_REQUEST:
     {
       /*
@@ -2509,7 +2402,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     break;
 
   case CURLOPT_WILDCARDMATCH:
-    data->set.wildcardmatch = (bool)(0 != va_arg(param, long));
+    data->set.wildcardmatch = (0 != va_arg(param, long))?TRUE:FALSE;
     break;
   case CURLOPT_CHUNK_BGN_FUNCTION:
     data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback);
@@ -2526,9 +2419,43 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
   case CURLOPT_FNMATCH_DATA:
     data->set.fnmatch_data = va_arg(param, void *);
     break;
+#ifdef USE_TLS_SRP
+  case CURLOPT_TLSAUTH_USERNAME:
+    result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME],
+                       va_arg(param, char *));
+    if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
+      data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
+    break;
+  case CURLOPT_TLSAUTH_PASSWORD:
+    result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD],
+                       va_arg(param, char *));
+    if(data->set.str[STRING_TLSAUTH_USERNAME] && !data->set.ssl.authtype)
+      data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */
+    break;
+  case CURLOPT_TLSAUTH_TYPE:
+    if(strnequal((char *)va_arg(param, char *), "SRP", strlen("SRP")))
+      data->set.ssl.authtype = CURL_TLSAUTH_SRP;
+    else
+      data->set.ssl.authtype = CURL_TLSAUTH_NONE;
+    break;
+#endif
+  case CURLOPT_DNS_SERVERS:
+    result = Curl_set_dns_servers(data, va_arg(param, char *));
+    break;
+
+  case CURLOPT_TCP_KEEPALIVE:
+    data->set.tcp_keepalive = (0 != va_arg(param, long))?TRUE:FALSE;
+    break;
+  case CURLOPT_TCP_KEEPIDLE:
+    data->set.tcp_keepidle = va_arg(param, long);
+    break;
+  case CURLOPT_TCP_KEEPINTVL:
+    data->set.tcp_keepintvl = va_arg(param, long);
+    break;
+
   default:
     /* unknown tag and its companion, just ignore: */
-    result = CURLE_FAILED_INIT; /* correct this */
+    result = CURLE_UNKNOWN_OPTION;
     break;
   }
 
@@ -2540,6 +2467,9 @@ static void conn_free(struct connectdata *conn)
   if(!conn)
     return;
 
+  /* possible left-overs from the async name resolvers */
+  Curl_resolver_cancel(conn);
+
   /* close the SSL stuff before we close any sockets since they will/may
      write to the sockets */
   Curl_ssl_close(conn, FIRSTSOCKET);
@@ -2547,18 +2477,24 @@ static void conn_free(struct connectdata *conn)
 
   /* close possibly still open sockets */
   if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
-    sclose(conn->sock[SECONDARYSOCKET]);
+    Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
   if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
-    sclose(conn->sock[FIRSTSOCKET]);
+    Curl_closesocket(conn, conn->sock[FIRSTSOCKET]);
+
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+  Curl_ntlm_wb_cleanup(conn);
+#endif
 
   Curl_safefree(conn->user);
   Curl_safefree(conn->passwd);
+  Curl_safefree(conn->options);
   Curl_safefree(conn->proxyuser);
   Curl_safefree(conn->proxypasswd);
   Curl_safefree(conn->allocptr.proxyuserpwd);
   Curl_safefree(conn->allocptr.uagent);
   Curl_safefree(conn->allocptr.userpwd);
   Curl_safefree(conn->allocptr.accept_encoding);
+  Curl_safefree(conn->allocptr.te);
   Curl_safefree(conn->allocptr.rangeline);
   Curl_safefree(conn->allocptr.ref);
   Curl_safefree(conn->allocptr.host);
@@ -2571,17 +2507,11 @@ static void conn_free(struct connectdata *conn)
 
   Curl_llist_destroy(conn->send_pipe, NULL);
   Curl_llist_destroy(conn->recv_pipe, NULL);
-  Curl_llist_destroy(conn->pend_pipe, NULL);
-  Curl_llist_destroy(conn->done_pipe, NULL);
 
-  /* possible left-overs from the async name resolvers */
-#if defined(CURLRES_THREADED)
-  Curl_destroy_thread_data(&conn->async);
-#elif defined(CURLRES_ASYNCH)
-  Curl_safefree(conn->async.hostname);
-  Curl_safefree(conn->async.os_specific);
-#endif
+  conn->send_pipe = NULL;
+  conn->recv_pipe = NULL;
 
+  Curl_safefree(conn->localdev);
   Curl_free_ssl_config(&conn->ssl_config);
 
   free(conn); /* free all the connection oriented data */
@@ -2595,7 +2525,7 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
   data = conn->data;
 
   if(!data) {
-    DEBUGF(infof(data, "DISCONNECT without easy handle, ignoring\n"));
+    DEBUGF(fprintf(stderr, "DISCONNECT without easy handle, ignoring\n"));
     return CURLE_OK;
   }
 
@@ -2604,12 +2534,6 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
     conn->dns_entry = NULL;
   }
 
-#if defined(DEBUGBUILD) && defined(AGGRESIVE_TEST)
-  /* scan for DNS cache entries still marked as in use */
-  Curl_hash_apply(data->hostcache,
-                  NULL, Curl_scan_cache_used);
-#endif
-
   Curl_hostcache_prune(data); /* kill old DNS cache entries */
 
   {
@@ -2620,25 +2544,25 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
        related stuff. NTLM is connection-related so when we close the shop
        we shall forget. */
 
-    if (has_host_ntlm) {
+    if(has_host_ntlm) {
       data->state.authhost.done = FALSE;
       data->state.authhost.picked =
         data->state.authhost.want;
     }
 
-    if (has_proxy_ntlm) {
+    if(has_proxy_ntlm) {
       data->state.authproxy.done = FALSE;
       data->state.authproxy.picked =
         data->state.authproxy.want;
     }
 
-    if (has_host_ntlm || has_proxy_ntlm) {
+    if(has_host_ntlm || has_proxy_ntlm)
       data->state.authproblem = FALSE;
-
-      Curl_ntlm_cleanup(conn);
-    }
   }
 
+  /* Cleanup NTLM connection-related data */
+  Curl_http_ntlm_cleanup(conn);
+
   /* Cleanup possible redirect junk */
   if(data->req.newurl) {
     free(data->req.newurl);
@@ -2649,16 +2573,11 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
     /* This is set if protocol-specific cleanups should be made */
     conn->handler->disconnect(conn, dead_connection);
 
-  if(-1 != conn->connectindex) {
     /* unlink ourselves! */
-    infof(data, "Closing connection #%ld\n", conn->connectindex);
-    if(data->state.connc)
-      /* only clear the table entry if we still know in which cache we
-         used to be in */
-      data->state.connc->connects[conn->connectindex] = NULL;
-  }
+  infof(data, "Closing connection %ld\n", conn->connection_id);
+  Curl_conncache_remove_conn(data->state.conn_cache, conn);
 
-#ifdef USE_LIBIDN
+#if defined(USE_LIBIDN)
   if(conn->host.encalloc)
     idn_free(conn->host.encalloc); /* encoded host name buffer, must be freed
                                       with idn_free() since this was allocated
@@ -2667,20 +2586,27 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
     idn_free(conn->proxy.encalloc); /* encoded proxy name buffer, must be
                                        freed with idn_free() since this was
                                        allocated by libidn */
+#elif defined(USE_WIN32_IDN)
+  free(conn->host.encalloc); /* encoded host name buffer, must be freed with
+                                idn_free() since this was allocated by
+                                curl_win32_idn_to_ascii */
+  if(conn->proxy.encalloc)
+    free(conn->proxy.encalloc); /* encoded proxy name buffer, must be freed
+                                   with idn_free() since this was allocated by
+                                   curl_win32_idn_to_ascii */
 #endif
 
   Curl_ssl_close(conn, FIRSTSOCKET);
 
   /* Indicate to all handles on the pipe that we're dead */
-  if(Curl_isPipeliningEnabled(data)) {
+  if(Curl_multi_pipeline_enabled(data->multi)) {
     signalPipeClose(conn->send_pipe, TRUE);
     signalPipeClose(conn->recv_pipe, TRUE);
-    signalPipeClose(conn->pend_pipe, TRUE);
-    signalPipeClose(conn->done_pipe, FALSE);
   }
 
   conn_free(conn);
-  data->state.current_conn = NULL;
+
+  Curl_speedinit(data);
 
   return CURLE_OK;
 }
@@ -2703,60 +2629,22 @@ static bool SocketIsDead(curl_socket_t sock)
   return ret_val;
 }
 
-#ifndef CURL_DISABLE_RTSP
-/*
- * The server may send us RTP data at any point, and RTSPREQ_RECEIVE does not
- * want to block the application forever while receiving a stream. Therefore,
- * we cannot assume that an RTSP socket is dead just because it is readable.
- *
- * Instead, if it is readable, run Curl_getconnectinfo() to peek at the socket
- * and distinguish between closed and data.
- */
-static bool RTSPConnIsDead(struct connectdata *check)
+static bool IsPipeliningPossible(const struct SessionHandle *handle,
+                                 const struct connectdata *conn)
 {
-  int sval;
-  bool ret_val = TRUE;
-
-  sval = Curl_socket_ready(check->sock[FIRSTSOCKET], CURL_SOCKET_BAD, 0);
-  if(sval == 0) {
-    /* timeout */
-    ret_val = FALSE;
-  }
-  else if (sval & CURL_CSELECT_ERR) {
-    /* socket is in an error state */
-    ret_val = TRUE;
-  }
-  else if (sval & CURL_CSELECT_IN) {
-    /* readable with no error. could be closed or could be alive */
-    curl_socket_t connectinfo =
-      Curl_getconnectinfo(check->data, &check);
-    if(connectinfo != CURL_SOCKET_BAD)
-      ret_val = FALSE;
-  }
-
-  return ret_val;
-}
-#endif /* CURL_DISABLE_RTSP */
-
-static bool IsPipeliningPossible(const struct SessionHandle *handle,
-                                 const struct connectdata *conn)
-{
-  if((conn->handler->protocol & PROT_HTTP) &&
-     handle->multi && Curl_multi_canPipeline(handle->multi) &&
-     (handle->set.httpreq == HTTPREQ_GET ||
-      handle->set.httpreq == HTTPREQ_HEAD) &&
-     handle->set.httpversion != CURL_HTTP_VERSION_1_0)
-    return TRUE;
+  if((conn->handler->protocol & CURLPROTO_HTTP) &&
+     Curl_multi_pipeline_enabled(handle->multi) &&
+     (handle->set.httpreq == HTTPREQ_GET ||
+      handle->set.httpreq == HTTPREQ_HEAD) &&
+     handle->set.httpversion != CURL_HTTP_VERSION_1_0)
+    return TRUE;
 
   return FALSE;
 }
 
 bool Curl_isPipeliningEnabled(const struct SessionHandle *handle)
 {
-  if(handle->multi && Curl_multi_canPipeline(handle->multi))
-    return TRUE;
-
-  return FALSE;
+  return Curl_multi_pipeline_enabled(handle->multi);
 }
 
 CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
@@ -2764,6 +2652,7 @@ CURLcode Curl_addHandleToPipeline(struct SessionHandle *data,
 {
   if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
     return CURLE_OUT_OF_MEMORY;
+  infof(data, "Curl_addHandleToPipeline: length: %d\n", pipeline->size);
   return CURLE_OK;
 }
 
@@ -2813,18 +2702,16 @@ static struct SessionHandle* gethandleathead(struct curl_llist *pipeline)
 void Curl_getoff_all_pipelines(struct SessionHandle *data,
                                struct connectdata *conn)
 {
-  bool recv_head = (bool)(conn->readchannel_inuse &&
-    (gethandleathead(conn->recv_pipe) == data));
+  bool recv_head = (conn->readchannel_inuse &&
+    (gethandleathead(conn->recv_pipe) == data)) ? TRUE : FALSE;
 
-  bool send_head = (bool)(conn->writechannel_inuse &&
-    (gethandleathead(conn->send_pipe) == data));
+  bool send_head = (conn->writechannel_inuse &&
+    (gethandleathead(conn->send_pipe) == data)) ? TRUE : FALSE;
 
   if(Curl_removeHandleFromPipeline(data, conn->recv_pipe) && recv_head)
     conn->readchannel_inuse = FALSE;
   if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head)
     conn->writechannel_inuse = FALSE;
-  Curl_removeHandleFromPipeline(data, conn->pend_pipe);
-  Curl_removeHandleFromPipeline(data, conn->done_pipe);
 }
 
 static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
@@ -2846,14 +2733,106 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
     }
 #endif
 
-    if (pipe_broke)
-       data->state.pipe_broke = TRUE;
+    if(pipe_broke)
+      data->state.pipe_broke = TRUE;
     Curl_multi_handlePipeBreak(data);
     Curl_llist_remove(pipeline, curr, NULL);
     curr = next;
   }
 }
 
+/*
+ * This function finds the connection in the connection
+ * cache that has been unused for the longest time.
+ *
+ * Returns the pointer to the oldest idle connection, or NULL if none was
+ * found.
+ */
+static struct connectdata *
+find_oldest_idle_connection(struct SessionHandle *data)
+{
+  struct conncache *bc = data->state.conn_cache;
+  struct curl_hash_iterator iter;
+  struct curl_llist_element *curr;
+  struct curl_hash_element *he;
+  long highscore=-1;
+  long score;
+  struct timeval now;
+  struct connectdata *conn_candidate = NULL;
+  struct connectbundle *bundle;
+
+  now = Curl_tvnow();
+
+  Curl_hash_start_iterate(bc->hash, &iter);
+
+  he = Curl_hash_next_element(&iter);
+  while(he) {
+    struct connectdata *conn;
+
+    bundle = he->ptr;
+
+    curr = bundle->conn_list->head;
+    while(curr) {
+      conn = curr->ptr;
+
+      if(!conn->inuse) {
+        /* Set higher score for the age passed since the connection was used */
+        score = Curl_tvdiff(now, conn->now);
+
+        if(score > highscore) {
+          highscore = score;
+          conn_candidate = conn;
+        }
+      }
+      curr = curr->next;
+    }
+
+    he = Curl_hash_next_element(&iter);
+  }
+
+  return conn_candidate;
+}
+
+/*
+ * This function finds the connection in the connection
+ * bundle that has been unused for the longest time.
+ *
+ * Returns the pointer to the oldest idle connection, or NULL if none was
+ * found.
+ */
+static struct connectdata *
+find_oldest_idle_connection_in_bundle(struct SessionHandle *data,
+                                      struct connectbundle *bundle)
+{
+  struct curl_llist_element *curr;
+  long highscore=-1;
+  long score;
+  struct timeval now;
+  struct connectdata *conn_candidate = NULL;
+  struct connectdata *conn;
+
+  (void)data;
+
+  now = Curl_tvnow();
+
+  curr = bundle->conn_list->head;
+  while(curr) {
+    conn = curr->ptr;
+
+    if(!conn->inuse) {
+      /* Set higher score for the age passed since the connection was used */
+      score = Curl_tvdiff(now, conn->now);
+
+      if(score > highscore) {
+        highscore = score;
+        conn_candidate = conn;
+      }
+    }
+    curr = curr->next;
+  }
+
+  return conn_candidate;
+}
 
 /*
  * Given one filled in connection struct (named needle), this function should
@@ -2863,303 +2842,352 @@ static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
  * If there is a match, this function returns TRUE - and has marked the
  * connection as 'in-use'. It must later be called with ConnectionDone() to
  * return back to 'idle' (unused) state.
+ *
+ * The force_reuse flag is set if the connection must be used, even if
+ * the pipelining strategy wants to open a new connection instead of reusing.
  */
 static bool
 ConnectionExists(struct SessionHandle *data,
                  struct connectdata *needle,
-                 struct connectdata **usethis)
+                 struct connectdata **usethis,
+                 bool *force_reuse)
 {
-  long i;
   struct connectdata *check;
+  struct connectdata *chosen = 0;
   bool canPipeline = IsPipeliningPossible(data, needle);
+  bool wantNTLM = (data->state.authhost.want==CURLAUTH_NTLM) ||
+                  (data->state.authhost.want==CURLAUTH_NTLM_WB) ? TRUE : FALSE;
+  struct connectbundle *bundle;
 
-  for(i=0; i< data->state.connc->num; i++) {
-    bool match = FALSE;
-    size_t pipeLen = 0;
-    /*
-     * Note that if we use a HTTP proxy, we check connections to that
-     * proxy and not to the actual remote server.
-     */
-    check = data->state.connc->connects[i];
-    if(!check)
-      /* NULL pointer means not filled-in entry */
-      continue;
+  *force_reuse = FALSE;
 
-    pipeLen = check->send_pipe->size + check->recv_pipe->size;
+  /* We can't pipe if the site is blacklisted */
+  if(canPipeline && Curl_pipeline_site_blacklisted(data, needle)) {
+    canPipeline = FALSE;
+  }
+
+  /* Look up the bundle with all the connections to this
+     particular host */
+  bundle = Curl_conncache_find_bundle(data->state.conn_cache,
+                                      needle->host.name);
+  if(bundle) {
+    size_t max_pipe_len = Curl_multi_max_pipeline_length(data->multi);
+    size_t best_pipe_len = max_pipe_len;
+    struct curl_llist_element *curr;
+
+    infof(data, "Found bundle for host %s: %p\n",
+          needle->host.name, (void *)bundle);
 
-    if(check->connectindex == -1) {
-      check->connectindex = i; /* Set this appropriately since it might have
-                                  been set to -1 when the easy was removed
-                                  from the multi */
+    /* We can't pipe if we don't know anything about the server */
+    if(canPipeline && !bundle->server_supports_pipelining) {
+      infof(data, "Server doesn't support pipelining\n");
+      canPipeline = FALSE;
     }
 
-    if(!pipeLen && !check->inuse) {
-      /* The check for a dead socket makes sense only if there are no
-         handles in pipeline and the connection isn't already marked in
-         use */
-      bool dead;
-#ifndef CURL_DISABLE_RTSP
-      if(check->protocol & PROT_RTSP)
-        /* RTSP is a special case due to RTP interleaving */
-        dead = RTSPConnIsDead(check);
-      else
-#endif /*CURL_DISABLE_RTSP*/
-        dead = SocketIsDead(check->sock[FIRSTSOCKET]);
+    curr = bundle->conn_list->head;
+    while(curr) {
+      bool match = FALSE;
+      bool credentialsMatch = FALSE;
+      size_t pipeLen;
 
-      if(dead) {
-        check->data = data;
-        infof(data, "Connection #%ld seems to be dead!\n", i);
+      /*
+       * Note that if we use a HTTP proxy, we check connections to that
+       * proxy and not to the actual remote server.
+       */
+      check = curr->ptr;
+      curr = curr->next;
+
+      pipeLen = check->send_pipe->size + check->recv_pipe->size;
+
+      if(!pipeLen && !check->inuse) {
+        /* The check for a dead socket makes sense only if there are no
+           handles in pipeline and the connection isn't already marked in
+           use */
+        bool dead;
+        if(check->handler->protocol & CURLPROTO_RTSP)
+          /* RTSP is a special case due to RTP interleaving */
+          dead = Curl_rtsp_connisdead(check);
+        else
+          dead = SocketIsDead(check->sock[FIRSTSOCKET]);
 
-        /* disconnect resources */
-        Curl_disconnect(check, /* dead_connection */ TRUE);
-        data->state.connc->connects[i]=NULL; /* nothing here */
+        if(dead) {
+          check->data = data;
+          infof(data, "Connection %ld seems to be dead!\n",
+                check->connection_id);
 
-        continue;
+          /* disconnect resources */
+          Curl_disconnect(check, /* dead_connection */ TRUE);
+          continue;
+        }
       }
-    }
 
-    if(canPipeline) {
-      /* Make sure the pipe has only GET requests */
-      struct SessionHandle* sh = gethandleathead(check->send_pipe);
-      struct SessionHandle* rh = gethandleathead(check->recv_pipe);
-      if(sh) {
-        if(!IsPipeliningPossible(sh, check))
-          continue;
+      if(canPipeline) {
+        /* Make sure the pipe has only GET requests */
+        struct SessionHandle* sh = gethandleathead(check->send_pipe);
+        struct SessionHandle* rh = gethandleathead(check->recv_pipe);
+        if(sh) {
+          if(!IsPipeliningPossible(sh, check))
+            continue;
+        }
+        else if(rh) {
+          if(!IsPipeliningPossible(rh, check))
+            continue;
+        }
       }
-      else if(rh) {
-        if(!IsPipeliningPossible(rh, check))
+      else {
+        if(pipeLen > 0) {
+          /* can only happen within multi handles, and means that another easy
+             handle is using this connection */
           continue;
-      }
+        }
+
+        if(Curl_resolver_asynch()) {
+          /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
+             completed yet and until then we don't re-use this connection */
+          if(!check->ip_addr_str[0]) {
+            infof(data,
+                  "Connection #%ld is still name resolving, can't reuse\n",
+                  check->connection_id);
+            continue;
+          }
+        }
 
+        if((check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) ||
+           check->bits.close) {
+          /* Don't pick a connection that hasn't connected yet or that is going
+             to get closed. */
+          infof(data, "Connection #%ld isn't open enough, can't reuse\n",
+                check->connection_id);
 #ifdef DEBUGBUILD
-      if(pipeLen > MAX_PIPELINE_LENGTH) {
-        infof(data, "BAD! Connection #%ld has too big pipeline!\n",
-              check->connectindex);
-      }
+          if(check->recv_pipe->size > 0) {
+            infof(data,
+                  "BAD! Unconnected #%ld has a non-empty recv pipeline!\n",
+                  check->connection_id);
+          }
 #endif
-    }
-    else {
-      if(pipeLen > 0) {
-        /* can only happen within multi handles, and means that another easy
-           handle is using this connection */
-        continue;
+          continue;
+        }
       }
 
-#ifdef CURLRES_ASYNCH
-      /* ip_addr_str[0] is NUL only if the resolving of the name hasn't
-         completed yet and until then we don't re-use this connection */
-      if(!check->ip_addr_str[0]) {
-        infof(data,
-              "Connection #%ld hasn't finished name resolve, can't reuse\n",
-              check->connectindex);
-        continue;
-      }
-#endif
+      if((needle->handler->flags&PROTOPT_SSL) !=
+         (check->handler->flags&PROTOPT_SSL))
+        /* don't do mixed SSL and non-SSL connections */
+        if(!(needle->handler->protocol & check->handler->protocol))
+          /* except protocols that have been upgraded via TLS */
+          continue;
 
-      if((check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) || check->bits.close) {
-        /* Don't pick a connection that hasn't connected yet or that is going
-           to get closed. */
-        infof(data, "Connection #%ld isn't open enough, can't reuse\n",
-              check->connectindex);
-#ifdef DEBUGBUILD
-        if(check->recv_pipe->size > 0) {
-          infof(data, "BAD! Unconnected #%ld has a non-empty recv pipeline!\n",
-                check->connectindex);
-        }
-#endif
-        continue;
+      if(needle->handler->flags&PROTOPT_SSL) {
+        if((data->set.ssl.verifypeer != check->verifypeer) ||
+           (data->set.ssl.verifyhost != check->verifyhost))
+          continue;
       }
-    }
 
-    if((needle->protocol&PROT_SSL) != (check->protocol&PROT_SSL))
-      /* don't do mixed SSL and non-SSL connections */
-      continue;
+      if(needle->bits.proxy != check->bits.proxy)
+        /* don't do mixed proxy and non-proxy connections */
+        continue;
 
-    if(needle->protocol&PROT_SSL) {
-      if((data->set.ssl.verifypeer != check->verifypeer) ||
-         (data->set.ssl.verifyhost != check->verifyhost))
+      if(!canPipeline && check->inuse)
+        /* this request can't be pipelined but the checked connection is
+           already in use so we skip it */
         continue;
-    }
 
-    if(needle->bits.proxy != check->bits.proxy)
-      /* don't do mixed proxy and non-proxy connections */
-      continue;
-
-    if(!canPipeline && check->inuse)
-      /* this request can't be pipelined but the checked connection is already
-         in use so we skip it */
-      continue;
-
-    if(!needle->bits.httpproxy || needle->protocol&PROT_SSL ||
-       (needle->bits.httpproxy && check->bits.httpproxy &&
-        needle->bits.tunnel_proxy && check->bits.tunnel_proxy &&
-        Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
-        (needle->port == check->port))) {
-      /* The requested connection does not use a HTTP proxy or it uses SSL or
-         it is a non-SSL protocol tunneled over the same http proxy name and
-         port number */
-
-      if(Curl_raw_equal(needle->handler->scheme, check->handler->scheme) &&
-         Curl_raw_equal(needle->host.name, check->host.name) &&
-         (needle->remote_port == check->remote_port) ) {
-        if(needle->protocol & PROT_SSL) {
-          /* This is SSL, verify that we're using the same
-             ssl options as well */
-          if(!Curl_ssl_config_matches(&needle->ssl_config,
-                                      &check->ssl_config)) {
-            DEBUGF(infof(data,
-                         "Connection #%ld has different SSL parameters, "
-                         "can't reuse\n",
-                         check->connectindex));
+      if(needle->localdev || needle->localport) {
+        /* If we are bound to a specific local end (IP+port), we must not
+           re-use a random other one, although if we didn't ask for a
+           particular one we can reuse one that was bound.
+
+           This comparison is a bit rough and too strict. Since the input
+           parameters can be specified in numerous ways and still end up the
+           same it would take a lot of processing to make it really accurate.
+           Instead, this matching will assume that re-uses of bound connections
+           will most likely also re-use the exact same binding parameters and
+           missing out a few edge cases shouldn't hurt anyone very much.
+        */
+        if((check->localport != needle->localport) ||
+           (check->localportrange != needle->localportrange) ||
+           !check->localdev ||
+           !needle->localdev ||
+           strcmp(check->localdev, needle->localdev))
+          continue;
+      }
+
+      if((needle->handler->protocol & CURLPROTO_FTP) ||
+         ((needle->handler->protocol & CURLPROTO_HTTP) && wantNTLM)) {
+         /* This is FTP or HTTP+NTLM, verify that we're using the same name
+            and password as well */
+         if(!strequal(needle->user, check->user) ||
+            !strequal(needle->passwd, check->passwd)) {
+            /* one of them was different */
             continue;
+         }
+         credentialsMatch = TRUE;
+      }
+
+      if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
+         (needle->bits.httpproxy && check->bits.httpproxy &&
+          needle->bits.tunnel_proxy && check->bits.tunnel_proxy &&
+          Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
+          (needle->port == check->port))) {
+        /* The requested connection does not use a HTTP proxy or it uses SSL or
+           it is a non-SSL protocol tunneled over the same http proxy name and
+           port number or it is a non-SSL protocol which is allowed to be
+           upgraded via TLS */
+
+        if((Curl_raw_equal(needle->handler->scheme, check->handler->scheme) ||
+            needle->handler->protocol & check->handler->protocol) &&
+           Curl_raw_equal(needle->host.name, check->host.name) &&
+           needle->remote_port == check->remote_port) {
+          if(needle->handler->flags & PROTOPT_SSL) {
+            /* This is a SSL connection so verify that we're using the same
+               SSL options as well */
+            if(!Curl_ssl_config_matches(&needle->ssl_config,
+                                        &check->ssl_config)) {
+              DEBUGF(infof(data,
+                           "Connection #%ld has different SSL parameters, "
+                           "can't reuse\n",
+                           check->connection_id));
+              continue;
+            }
+            else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) {
+              DEBUGF(infof(data,
+                           "Connection #%ld has not started SSL connect, "
+                           "can't reuse\n",
+                           check->connection_id));
+              continue;
+            }
           }
-          else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) {
-            DEBUGF(infof(data,
-                         "Connection #%ld has not started ssl connect, "
-                         "can't reuse\n",
-                         check->connectindex));
-            continue;
+          match = TRUE;
+        }
+      }
+      else { /* The requested needle connection is using a proxy,
+                is the checked one using the same host, port and type? */
+        if(check->bits.proxy &&
+           (needle->proxytype == check->proxytype) &&
+           (needle->bits.tunnel_proxy == check->bits.tunnel_proxy) &&
+           Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
+           needle->port == check->port) {
+          /* This is the same proxy connection, use it! */
+          match = TRUE;
+        }
+      }
+
+      if(match) {
+        /* If we are looking for an NTLM connection, check if this is already
+           authenticating with the right credentials. If not, keep looking so
+           that we can reuse NTLM connections if possible. (Especially we
+           must not reuse the same connection if partway through
+           a handshake!) */
+        if(wantNTLM) {
+          if(credentialsMatch && check->ntlm.state != NTLMSTATE_NONE) {
+            chosen = check;
+
+            /* We must use this connection, no other */
+            *force_reuse = TRUE;
+            break;
           }
+          else
+            continue;
         }
-        if((needle->protocol & PROT_FTP) ||
-           ((needle->protocol & PROT_HTTP) &&
-            (data->state.authhost.want==CURLAUTH_NTLM))) {
-          /* This is FTP or HTTP+NTLM, verify that we're using the same name
-             and password as well */
-          if(!strequal(needle->user, check->user) ||
-             !strequal(needle->passwd, check->passwd)) {
-            /* one of them was different */
+
+        if(canPipeline) {
+          /* We can pipeline if we want to. Let's continue looking for
+             the optimal connection to use, i.e the shortest pipe that is not
+             blacklisted. */
+
+          if(pipeLen == 0) {
+            /* We have the optimal connection. Let's stop looking. */
+            chosen = check;
+            break;
+          }
+
+          /* We can't use the connection if the pipe is full */
+          if(pipeLen >= max_pipe_len)
+            continue;
+
+          /* We can't use the connection if the pipe is penalized */
+          if(Curl_pipeline_penalized(data, check))
+            continue;
+
+          if(pipeLen < best_pipe_len) {
+            /* This connection has a shorter pipe so far. We'll pick this
+               and continue searching */
+            chosen = check;
+            best_pipe_len = pipeLen;
             continue;
           }
         }
-        match = TRUE;
-      }
-    }
-    else { /* The requested needle connection is using a proxy,
-              is the checked one using the same host, port and type? */
-      if(check->bits.proxy &&
-         (needle->proxytype == check->proxytype) &&
-         (needle->bits.tunnel_proxy == check->bits.tunnel_proxy) &&
-         Curl_raw_equal(needle->proxy.name, check->proxy.name) &&
-         needle->port == check->port) {
-        /* This is the same proxy connection, use it! */
-        match = TRUE;
+        else {
+          /* We have found a connection. Let's stop searching. */
+          chosen = check;
+          break;
+        }
       }
     }
+  }
 
-    if(match) {
-      check->inuse = TRUE; /* mark this as being in use so that no other
-                              handle in a multi stack may nick it */
-
-      *usethis = check;
-      return TRUE; /* yes, we found one to use! */
-    }
+  if(chosen) {
+    *usethis = chosen;
+    return TRUE; /* yes, we found one to use! */
   }
 
   return FALSE; /* no matching connecting exists */
 }
 
-
-
-/*
- * This function frees/closes a connection in the connection cache. This
- * should take the previously set policy into account when deciding which
- * of the connections to kill.
- */
-static long
-ConnectionKillOne(struct SessionHandle *data)
+/* Mark the connection as 'idle', or close it if the cache is full.
+   Returns TRUE if the connection is kept, or FALSE if it was closed. */
+static bool
+ConnectionDone(struct SessionHandle *data, struct connectdata *conn)
 {
-  long i;
-  struct connectdata *conn;
-  long highscore=-1;
-  long connindex=-1;
-  long score;
-  struct timeval now;
+  /* data->multi->maxconnects can be negative, deal with it. */
+  size_t maxconnects =
+    (data->multi->maxconnects < 0) ? 0 : data->multi->maxconnects;
+  struct connectdata *conn_candidate = NULL;
 
-  now = Curl_tvnow();
+  /* Mark the current connection as 'unused' */
+  conn->inuse = FALSE;
 
-  for(i=0; data->state.connc && (i< data->state.connc->num); i++) {
-    conn = data->state.connc->connects[i];
+  if(maxconnects > 0 &&
+     data->state.conn_cache->num_connections > maxconnects) {
+    infof(data, "Connection cache is full, closing the oldest one.\n");
 
-    if(!conn || conn->inuse)
-      continue;
+    conn_candidate = find_oldest_idle_connection(data);
 
-    /* Set higher score for the age passed since the connection was used */
-    score = Curl_tvdiff(now, conn->now);
+    if(conn_candidate) {
+      /* Set the connection's owner correctly */
+      conn_candidate->data = data;
 
-    if(score > highscore) {
-      highscore = score;
-      connindex = i;
+      /* the winner gets the honour of being disconnected */
+      (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
     }
   }
-  if(connindex >= 0) {
-    /* Set the connection's owner correctly */
-    conn = data->state.connc->connects[connindex];
-    conn->data = data;
-
-    /* the winner gets the honour of being disconnected */
-    (void)Curl_disconnect(conn, /* dead_connection */ FALSE);
-
-    /* clean the array entry */
-    data->state.connc->connects[connindex] = NULL;
-  }
 
-  return connindex; /* return the available index or -1 */
-}
-
-/* this connection can now be marked 'idle' */
-static void
-ConnectionDone(struct connectdata *conn)
-{
-  conn->inuse = FALSE;
+  return (conn_candidate == conn) ? FALSE : TRUE;
 }
 
 /*
- * The given input connection struct pointer is to be stored. If the "cache"
- * is already full, we must clean out the most suitable using the previously
- * set policy.
+ * The given input connection struct pointer is to be stored in the connection
+ * cache. If the cache is already full, least interesting existing connection
+ * (if any) gets closed.
  *
  * The given connection should be unique. That must've been checked prior to
  * this call.
  */
-static long
-ConnectionStore(struct SessionHandle *data,
-                struct connectdata *conn)
+static CURLcode ConnectionStore(struct SessionHandle *data,
+                                struct connectdata *conn)
 {
-  long i;
-  for(i=0; i< data->state.connc->num; i++) {
-    if(!data->state.connc->connects[i])
-      break;
-  }
-  if(i == data->state.connc->num) {
-    /* there was no room available, kill one */
-    i = ConnectionKillOne(data);
-    if(-1 != i)
-      infof(data, "Connection (#%ld) was killed to make room (holds %ld)\n",
-            i, data->state.connc->num);
-    else
-      infof(data, "This connection did not fit in the connection cache\n");
-  }
+  static int connection_id_counter = 0;
 
-  conn->connectindex = i; /* Make the child know where the pointer to this
-                             particular data is stored. But note that this -1
-                             if this is not within the cache and this is
-                             probably not checked for everywhere (yet). */
-  conn->inuse = TRUE;
-  if(-1 != i) {
-    /* Only do this if a true index was returned, if -1 was returned there
-       is no room in the cache for an unknown reason and we cannot store
-       this there.
-
-       TODO: make sure we really can work with more handles than positions in
-       the cache, or possibly we should (allow to automatically) resize the
-       connection cache when we add more easy handles to a multi handle!
-    */
-    data->state.connc->connects[i] = conn; /* fill in this */
-    conn->data = data;
-  }
+  CURLcode result;
+
+  /* Assign a number to the connection for easier tracking in the log
+     output */
+  conn->connection_id = connection_id_counter++;
 
-  return i;
+  result = Curl_conncache_add_conn(data->state.conn_cache, conn);
+  if(result != CURLE_OK)
+    conn->connection_id = -1;
+
+  return result;
 }
 
 /* after a TCP connection to the proxy has been verified, this function does
@@ -3170,25 +3198,25 @@ ConnectionStore(struct SessionHandle *data,
 */
 CURLcode Curl_connected_proxy(struct connectdata *conn)
 {
-  CURLcode result = CURLE_OK;
-  struct SessionHandle *data = conn->data;
+  if(!conn->bits.proxy)
+    return CURLE_OK;
 
-  switch(data->set.proxytype) {
+  switch(conn->proxytype) {
 #ifndef CURL_DISABLE_PROXY
   case CURLPROXY_SOCKS5:
   case CURLPROXY_SOCKS5_HOSTNAME:
-    result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
-                         conn->host.name, conn->remote_port,
-                         FIRSTSOCKET, conn);
-    break;
+    return Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
+                       conn->host.name, conn->remote_port,
+                       FIRSTSOCKET, conn);
+
   case CURLPROXY_SOCKS4:
-    result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
-                         conn->remote_port, FIRSTSOCKET, conn, FALSE);
-    break;
+    return Curl_SOCKS4(conn->proxyuser, conn->host.name,
+                       conn->remote_port, FIRSTSOCKET, conn, FALSE);
+
   case CURLPROXY_SOCKS4A:
-    result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
-                         conn->remote_port, FIRSTSOCKET, conn, TRUE);
-    break;
+    return Curl_SOCKS4(conn->proxyuser, conn->host.name,
+                       conn->remote_port, FIRSTSOCKET, conn, TRUE);
+
 #endif /* CURL_DISABLE_PROXY */
   case CURLPROXY_HTTP:
   case CURLPROXY_HTTP_1_0:
@@ -3198,7 +3226,7 @@ CURLcode Curl_connected_proxy(struct connectdata *conn)
     break;
   } /* switch proxytype */
 
-  return result;
+  return CURLE_OK;
 }
 
 static CURLcode ConnectPlease(struct SessionHandle *data,
@@ -3212,7 +3240,7 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
 
   infof(data, "About to connect() to %s%s port %ld (#%ld)\n",
         conn->bits.proxy?"proxy ":"",
-        hostname, conn->port, conn->connectindex);
+        hostname, conn->port, conn->connection_id);
 #else
   (void)data;
 #endif
@@ -3229,8 +3257,13 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
     /* All is cool, we store the current information */
     conn->ip_addr = addr;
 
-    if(*connected)
+    if(*connected) {
       result = Curl_connected_proxy(conn);
+      if(!result) {
+        conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
+        Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
+      }
+    }
   }
 
   if(result)
@@ -3248,7 +3281,7 @@ void Curl_verboseconnect(struct connectdata *conn)
   if(conn->data->set.verbose)
     infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
           conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
-          conn->ip_addr_str, conn->port, conn->connectindex);
+          conn->ip_addr_str, conn->port, conn->connection_id);
 }
 #endif
 
@@ -3319,11 +3352,10 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
                                bool *protocol_done)
 {
   CURLcode result=CURLE_OK;
-  struct SessionHandle *data = conn->data;
 
   *protocol_done = FALSE;
 
-  if(conn->bits.tcpconnect && conn->bits.protoconnstart) {
+  if(conn->bits.tcpconnect[FIRSTSOCKET] && conn->bits.protoconnstart) {
     /* We already are connected, get back. This may happen when the connect
        worked fine in the first call, like when we connect to a local server
        or proxy. Note that we don't know if the protocol is actually done.
@@ -3336,20 +3368,21 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
     return CURLE_OK;
   }
 
-  if(!conn->bits.tcpconnect) {
+  if(!conn->bits.protoconnstart) {
 
-    Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */
-    Curl_verboseconnect(conn);
-  }
+    result = Curl_proxy_connect(conn);
+    if(result)
+      return result;
+
+    if(conn->bits.tunnel_proxy && conn->bits.httpproxy &&
+       (conn->tunnel_state[FIRSTSOCKET] != TUNNEL_COMPLETE))
+      /* when using an HTTP tunnel proxy, await complete tunnel establishment
+         before proceeding further. Return CURLE_OK so we'll be called again */
+      return CURLE_OK;
 
-  if(!conn->bits.protoconnstart) {
     if(conn->handler->connect_it) {
       /* is there a protocol-specific connect() procedure? */
 
-      /* Set start time here for timeout purposes in the connect procedure, it
-         is later set again for the progress meter purpose */
-      conn->now = Curl_tvnow();
-
       /* Call the protocol-specific connect function */
       result = conn->handler->connect_it(conn, protocol_done);
     }
@@ -3368,7 +3401,6 @@ CURLcode Curl_protocol_connect(struct connectdata *conn,
 /*
  * Helpers for IDNA convertions.
  */
-#ifdef USE_LIBIDN
 static bool is_ASCII_name(const char *hostname)
 {
   const unsigned char *ch = (const unsigned char*)hostname;
@@ -3380,6 +3412,7 @@ static bool is_ASCII_name(const char *hostname)
   return TRUE;
 }
 
+#ifdef USE_LIBIDN
 /*
  * Check if characters in hostname is allowed in Top Level Domain.
  */
@@ -3438,13 +3471,12 @@ static void fix_hostname(struct SessionHandle *data,
 
   /* set the name we use to display the host name */
   host->dispname = host->name;
-
+  if(!is_ASCII_name(host->name)) {
 #ifdef USE_LIBIDN
   /*************************************************************
    * Check name for non-ASCII and convert hostname to ACE form.
    *************************************************************/
-  if(!is_ASCII_name(host->name) &&
-      stringprep_check_version(LIBIDN_REQUIRED_VERSION)) {
+  if(stringprep_check_version(LIBIDN_REQUIRED_VERSION)) {
     char *ace_hostname = NULL;
     int rc = idna_to_ascii_lz(host->name, &ace_hostname, 0);
     infof (data, "Input domain encoded as `%s'\n",
@@ -3462,7 +3494,24 @@ static void fix_hostname(struct SessionHandle *data,
       host->name = host->encalloc;
     }
   }
+#elif defined(USE_WIN32_IDN)
+  /*************************************************************
+   * Check name for non-ASCII and convert hostname to ACE form.
+   *************************************************************/
+    char *ace_hostname = NULL;
+    int rc = curl_win32_idn_to_ascii(host->name, &ace_hostname);
+    if(rc == 0)
+      infof(data, "Failed to convert %s to ACE;\n",
+            host->name);
+    else {
+      host->encalloc = ace_hostname;
+      /* change the name pointer to point to the encoded hostname */
+      host->name = host->encalloc;
+    }
+#else
+    infof(data, "IDN support not present, can't parse Unicode domains\n");
 #endif
+  }
 }
 
 static void llist_dtor(void *user, void *element)
@@ -3489,7 +3538,7 @@ static struct connectdata *allocate_conn(struct SessionHandle *data)
 
   conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
   conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
-  conn->connectindex = -1;    /* no index */
+  conn->connection_id = -1;    /* no ID */
   conn->port = -1; /* unknown at this point */
 
   /* Default protocol-independent behavior doesn't support persistent
@@ -3514,18 +3563,20 @@ static struct connectdata *allocate_conn(struct SessionHandle *data)
 
 #else /* CURL_DISABLE_PROXY */
 
-  conn->bits.proxy = (bool)(data->set.str[STRING_PROXY] &&
-                            *data->set.str[STRING_PROXY]);
-  conn->bits.httpproxy = (bool)(conn->bits.proxy &&
-                                (conn->proxytype == CURLPROXY_HTTP ||
-                                 conn->proxytype == CURLPROXY_HTTP_1_0));
+  /* note that these two proxy bits are now just on what looks to be
+     requested, they may be altered down the road */
+  conn->bits.proxy = (data->set.str[STRING_PROXY] &&
+                      *data->set.str[STRING_PROXY])?TRUE:FALSE;
+  conn->bits.httpproxy = (conn->bits.proxy &&
+                          (conn->proxytype == CURLPROXY_HTTP ||
+                           conn->proxytype == CURLPROXY_HTTP_1_0))?TRUE:FALSE;
   conn->bits.proxy_user_passwd =
-    (bool)(NULL != data->set.str[STRING_PROXYUSERNAME]);
+    (NULL != data->set.str[STRING_PROXYUSERNAME])?TRUE:FALSE;
   conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
 
 #endif /* CURL_DISABLE_PROXY */
 
-  conn->bits.user_passwd = (bool)(NULL != data->set.str[STRING_USERNAME]);
+  conn->bits.user_passwd = (NULL != data->set.str[STRING_USERNAME])?TRUE:FALSE;
   conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
   conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 
@@ -3534,7 +3585,14 @@ static struct connectdata *allocate_conn(struct SessionHandle *data)
 
   conn->ip_version = data->set.ipver;
 
-  if(data->multi && Curl_multi_canPipeline(data->multi) &&
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+  conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD;
+  conn->ntlm_auth_hlpr_pid = 0;
+  conn->challenge_header = NULL;
+  conn->response_header = NULL;
+#endif
+
+  if(Curl_multi_pipeline_enabled(data->multi) &&
       !conn->master_buffer) {
     /* Allocate master_buffer to be used for pipelining */
     conn->master_buffer = calloc(BUFSIZE, sizeof (char));
@@ -3545,23 +3603,38 @@ static struct connectdata *allocate_conn(struct SessionHandle *data)
   /* Initialize the pipeline lists */
   conn->send_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
   conn->recv_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
-  conn->pend_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
-  conn->done_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor);
-  if(!conn->send_pipe || !conn->recv_pipe || !conn->pend_pipe ||
-     !conn->done_pipe)
+  if(!conn->send_pipe || !conn->recv_pipe)
     goto error;
 
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
   conn->data_prot = PROT_CLEAR;
 #endif
 
+  /* Store the local bind parameters that will be used for this connection */
+  if(data->set.str[STRING_DEVICE]) {
+    conn->localdev = strdup(data->set.str[STRING_DEVICE]);
+    if(!conn->localdev)
+      goto error;
+  }
+  conn->localportrange = data->set.localportrange;
+  conn->localport = data->set.localport;
+
+  /* the close socket stuff needs to be copied to the connection struct as
+     it may live on without (this specific) SessionHandle */
+  conn->fclosesocket = data->set.fclosesocket;
+  conn->closesocket_client = data->set.closesocket_client;
+
   return conn;
   error:
+
   Curl_llist_destroy(conn->send_pipe, NULL);
   Curl_llist_destroy(conn->recv_pipe, NULL);
-  Curl_llist_destroy(conn->pend_pipe, NULL);
-  Curl_llist_destroy(conn->done_pipe, NULL);
+
+  conn->send_pipe = NULL;
+  conn->recv_pipe = NULL;
+
   Curl_safefree(conn->master_buffer);
+  Curl_safefree(conn->localdev);
   Curl_safefree(conn);
   return NULL;
 }
@@ -3576,7 +3649,7 @@ static CURLcode findprotocol(struct SessionHandle *data,
   /* Scan protocol handler table and match against 'protostr' to set a few
      variables based on the URL. Now that the handler may be changed later
      when the protocol specific setup function is called. */
-  for (pp = protocols; (p = *pp) != NULL; pp++) {
+  for(pp = protocols; (p = *pp) != NULL; pp++) {
     if(Curl_raw_equal(p->scheme, protostr)) {
       /* Protocol found in table. Check if allowed */
       if(!(data->set.allowed_protocols & p->protocol))
@@ -3591,8 +3664,7 @@ static CURLcode findprotocol(struct SessionHandle *data,
         break;
 
       /* Perform setup complement if some. */
-      conn->handler = p;
-      conn->protocol |= p->protocol;
+      conn->handler = conn->given = p;
 
       /* 'port' and 'remote_port' are set in setup_connection_internals() */
       return CURLE_OK;
@@ -3614,7 +3686,8 @@ static CURLcode findprotocol(struct SessionHandle *data,
  */
 static CURLcode parseurlandfillconn(struct SessionHandle *data,
                                     struct connectdata *conn,
-                                    bool *prot_missing)
+                                    bool *prot_missing,
+                                    char *user, char *passwd, char *options)
 {
   char *at;
   char *fragment;
@@ -3623,6 +3696,8 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
   int rc;
   char protobuf[16];
   const char *protop;
+  CURLcode result;
+  bool rebuild_url = FALSE;
 
   *prot_missing = FALSE;
 
@@ -3705,7 +3780,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
          * assigned, but the return value is EOF!
          */
 #if defined(__DJGPP__) && (DJGPP_MINOR == 4)
-        if (!(rc == -1 && *conn->host.name))
+        if(!(rc == -1 && *conn->host.name))
 #endif
         {
           failf(data, "<url> malformed");
@@ -3729,6 +3804,10 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
         protop = "LDAP";
       else if(checkprefix("IMAP.", conn->host.name))
         protop = "IMAP";
+      else if(checkprefix("SMTP.", conn->host.name))
+        protop = "smtp";
+      else if(checkprefix("POP3.", conn->host.name))
+        protop = "pop3";
       else {
         protop = "http";
       }
@@ -3769,12 +3848,14 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
     memcpy(path+1, query, hostlen);
 
     path[0]='/'; /* prepend the missing slash */
+    rebuild_url = TRUE;
 
     *query=0; /* now cut off the hostname at the ? */
   }
   else if(!path[0]) {
     /* if there's no path set, use a single slash */
     strcpy(path, "/");
+    rebuild_url = TRUE;
   }
 
   /* If the URL is malformatted (missing a '/' after hostname before path) we
@@ -3787,23 +3868,89 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
        is bigger than the path. Use +1 to move the zero byte too. */
     memmove(&path[1], path, strlen(path)+1);
     path[0] = '/';
+    rebuild_url = TRUE;
+  }
+  else {
+    /* sanitise paths and remove ../ and ./ sequences according to RFC3986 */
+    char *newp = Curl_dedotdotify(path);
+    if(!newp)
+      return CURLE_OUT_OF_MEMORY;
+
+    if(strcmp(newp, path)) {
+      rebuild_url = TRUE;
+      free(data->state.pathbuffer);
+      data->state.pathbuffer = newp;
+      data->state.path = newp;
+      path = newp;
+    }
+    else
+      free(newp);
+  }
+
+  /*
+   * "rebuild_url" means that one or more URL components have been modified so
+   * we need to generate an updated full version.  We need the corrected URL
+   * when communicating over HTTP proxy and we don't know at this point if
+   * we're using a proxy or not.
+   */
+  if(rebuild_url) {
+    char *reurl;
+
+    size_t plen = strlen(path); /* new path, should be 1 byte longer than
+                                   the original */
+    size_t urllen = strlen(data->change.url); /* original URL length */
+
+    size_t prefixlen = strlen(conn->host.name);
+
+    if(!*prot_missing)
+      prefixlen += strlen(protop) + strlen("://");
+
+    reurl = malloc(urllen + 2); /* 2 for zerobyte + slash */
+    if(!reurl)
+      return CURLE_OUT_OF_MEMORY;
+
+    /* copy the prefix */
+    memcpy(reurl, data->change.url, prefixlen);
+
+    /* append the trailing piece + zerobyte */
+    memcpy(&reurl[prefixlen], path, plen + 1);
+
+    /* possible free the old one */
+    if(data->change.url_alloc) {
+      Curl_safefree(data->change.url);
+      data->change.url_alloc = FALSE;
+    }
+
+    infof(data, "Rebuilt URL to: %s\n", reurl);
+
+    data->change.url = reurl;
+    data->change.url_alloc = TRUE; /* free this later */
   }
 
-  if (conn->host.name[0] == '[') {
+  /*
+   * Parse the login details from the URL and strip them out of
+   * the host name
+   */
+  result = parse_url_login(data, conn, user, passwd, options);
+  if(result != CURLE_OK)
+    return result;
+
+  if(conn->host.name[0] == '[') {
     /* This looks like an IPv6 address literal.  See if there is an address
        scope.  */
     char *percent = strstr (conn->host.name, "%25");
-    if (percent) {
+    if(percent) {
       char *endp;
       unsigned long scope = strtoul (percent + 3, &endp, 10);
-      if (*endp == ']') {
+      if(*endp == ']') {
         /* The address scope was well formed.  Knock it out of the
            hostname. */
         memmove(percent, endp, strlen(endp)+1);
-        if (!data->state.this_is_a_follow)
+        if(!data->state.this_is_a_follow)
           /* Don't honour a scope given in a Location: header */
           conn->scope = (unsigned int)scope;
-      } else
+      }
+      else
         infof(data, "Invalid IPv6 address format\n");
     }
   }
@@ -3816,9 +3963,17 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
      last part of the URI. We are looking for the first '#' so that we deal
      gracefully with non conformant URI such as http://example.com#foo#bar. */
   fragment = strchr(path, '#');
-  if(fragment)
+  if(fragment) {
     *fragment = 0;
 
+    /* we know the path part ended with a fragment, so we know the full URL
+       string does too and we need to cut it off from there so it isn't used
+       over proxy */
+    fragment = strchr(data->change.url, '#');
+    if(fragment)
+      *fragment = 0;
+  }
+
   /*
    * So if the URL was A://B/C#D,
    *   protop is A
@@ -3846,7 +4001,7 @@ static CURLcode setup_range(struct SessionHandle *data)
     else
       s->range = strdup(data->set.str[STRING_SET_RANGE]);
 
-    s->rangestringalloc = (bool)(s->range?TRUE:FALSE);
+    s->rangestringalloc = (s->range)?TRUE:FALSE;
 
     if(!s->range)
       return CURLE_OUT_OF_MEMORY;
@@ -3890,8 +4045,7 @@ static CURLcode setup_connection_internals(struct connectdata *conn)
     /* we check for -1 here since if proxy was detected already, this
        was very likely already set to the proxy port */
     conn->port = p->defport;
-  conn->remote_port = (unsigned short)p->defport;
-  conn->protocol |= p->protocol;
+  conn->remote_port = (unsigned short)conn->given->defport;
 
   return CURLE_OK;
 }
@@ -3929,9 +4083,9 @@ static bool check_noproxy(const char* name, const char* no_proxy)
     else
       namelen = strlen(name);
 
-    for (tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) {
-      while (tok_start < no_proxy_len &&
-             strchr(separator, no_proxy[tok_start]) != NULL) {
+    for(tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) {
+      while(tok_start < no_proxy_len &&
+            strchr(separator, no_proxy[tok_start]) != NULL) {
         /* Look for the beginning of the token. */
         ++tok_start;
       }
@@ -3939,10 +4093,10 @@ static bool check_noproxy(const char* name, const char* no_proxy)
       if(tok_start == no_proxy_len)
         break; /* It was all trailing separator chars, no more tokens. */
 
-      for (tok_end = tok_start; tok_end < no_proxy_len &&
-             strchr(separator, no_proxy[tok_end]) == NULL; ++tok_end) {
+      for(tok_end = tok_start; tok_end < no_proxy_len &&
+            strchr(separator, no_proxy[tok_end]) == NULL; ++tok_end)
         /* Look for the end of the token. */
-      }
+        ;
 
       /* To match previous behaviour, where it was necessary to specify
        * ".local.com" to prevent matching "notlocal.com", we will leave
@@ -3964,7 +4118,7 @@ static bool check_noproxy(const char* name, const char* no_proxy)
           }
         }
       } /* if((tok_end - tok_start) <= namelen) */
-    } /* for (tok_start = 0; tok_start < no_proxy_len;
+    } /* for(tok_start = 0; tok_start < no_proxy_len;
          tok_start = tok_end + 1) */
   } /* NO_PROXY was specified and it wasn't just an asterisk */
 
@@ -4078,64 +4232,75 @@ static CURLcode parse_proxy(struct SessionHandle *data,
   char *atsign;
 
   /* We do the proxy host string parsing here. We want the host name and the
-   * port name. Accept a protocol:// prefix, even though it should just be
-   * ignored.
+   * port name. Accept a protocol:// prefix
    */
 
-  /* Skip the protocol part if present */
+  /* Parse the protocol part if present */
   endofprot = strstr(proxy, "://");
-  if(endofprot)
+  if(endofprot) {
     proxyptr = endofprot+3;
+    if(checkprefix("socks5h", proxy))
+      conn->proxytype = CURLPROXY_SOCKS5_HOSTNAME;
+    else if(checkprefix("socks5", proxy))
+      conn->proxytype = CURLPROXY_SOCKS5;
+    else if(checkprefix("socks4a", proxy))
+      conn->proxytype = CURLPROXY_SOCKS4A;
+    else if(checkprefix("socks4", proxy) || checkprefix("socks", proxy))
+      conn->proxytype = CURLPROXY_SOCKS4;
+    /* Any other xxx:// : change to http proxy */
+  }
   else
-    proxyptr = proxy;
+    proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */
 
   /* Is there a username and password given in this proxy url? */
   atsign = strchr(proxyptr, '@');
   if(atsign) {
-    char proxyuser[MAX_CURL_USER_LENGTH];
-    char proxypasswd[MAX_CURL_PASSWORD_LENGTH];
-    proxypasswd[0] = 0;
-
-    if(1 <= sscanf(proxyptr,
-                   "%" MAX_CURL_USER_LENGTH_TXT"[^:@]:"
-                   "%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
-                   proxyuser, proxypasswd)) {
-      CURLcode res = CURLE_OK;
+    CURLcode res = CURLE_OK;
+    char *proxyuser = NULL;
+    char *proxypasswd = NULL;
 
+    res = parse_login_details(proxyptr, atsign - proxyptr,
+                              &proxyuser, &proxypasswd, NULL);
+    if(!res) {
       /* found user and password, rip them out.  note that we are
          unescaping them, as there is otherwise no way to have a
          username or password with reserved characters like ':' in
          them. */
       Curl_safefree(conn->proxyuser);
-      conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
+      if(proxyuser && strlen(proxyuser) < MAX_CURL_USER_LENGTH)
+        conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
+      else
+        conn->proxyuser = strdup("");
 
       if(!conn->proxyuser)
         res = CURLE_OUT_OF_MEMORY;
       else {
         Curl_safefree(conn->proxypasswd);
-        conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
+        if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH)
+          conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
+        else
+          conn->proxypasswd = strdup("");
 
         if(!conn->proxypasswd)
           res = CURLE_OUT_OF_MEMORY;
       }
 
-      if(CURLE_OK == res) {
+      if(!res) {
         conn->bits.proxy_user_passwd = TRUE; /* enable it */
-        atsign = strdup(atsign+1); /* the right side of the @-letter */
+        atsign++; /* the right side of the @-letter */
 
-        if(atsign) {
-          free(proxy); /* free the former proxy string */
-          proxy = proxyptr = atsign; /* now use this instead */
-        }
+        if(atsign)
+          proxyptr = atsign; /* now use this instead */
         else
           res = CURLE_OUT_OF_MEMORY;
       }
-
-      if(res) {
-        free(proxy); /* free the allocated proxy string */
-        return res;
-      }
     }
+
+    Curl_safefree(proxyuser);
+    Curl_safefree(proxypasswd);
+
+    if(res)
+      return res;
   }
 
   /* start scanning for port number at this point */
@@ -4147,10 +4312,10 @@ static CURLcode parse_proxy(struct SessionHandle *data,
     while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '%') ||
                    (*ptr == '.')))
       ptr++;
-    if(*ptr == ']') {
+    if(*ptr == ']')
       /* yeps, it ended nicely with a bracket as well */
       *ptr++ = 0;
-    else
+    else
       infof(data, "Invalid IPv6 address format\n");
     portptr = ptr;
     /* Note that if this didn't end with a bracket, we still advanced the
@@ -4168,6 +4333,12 @@ static CURLcode parse_proxy(struct SessionHandle *data,
     conn->port = strtol(prox_portno, NULL, 10);
   }
   else {
+    if(proxyptr[0]=='/')
+      /* If the first character in the proxy string is a slash, fail
+         immediately. The following code will otherwise clear the string which
+         will lead to code running as if no proxy was set! */
+      return CURLE_COULDNT_RESOLVE_PROXY;
+
     /* without a port number after the host name, some people seem to use
        a slash so we strip everything from the first slash */
     atsign = strchr(proxyptr, '/');
@@ -4184,7 +4355,6 @@ static CURLcode parse_proxy(struct SessionHandle *data,
   conn->proxy.rawalloc = strdup(proxyptr);
   conn->proxy.name = conn->proxy.rawalloc;
 
-  free(proxy);
   if(!conn->proxy.rawalloc)
     return CURLE_OUT_OF_MEMORY;
 
@@ -4224,8 +4394,10 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data,
 #endif /* CURL_DISABLE_PROXY */
 
 /*
+ * parse_url_login()
  *
- * Parse a user name and password in the URL and strip it out of the host name
+ * Parse the login details (user name, password and options) from the URL and
+ * strip them out of the host name
  *
  * Inputs: data->set.use_netrc (CURLOPT_NETRC)
  *         conn->host.name
@@ -4233,31 +4405,38 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data,
  * Outputs: (almost :- all currently undefined)
  *          conn->bits.user_passwd  - non-zero if non-default passwords exist
  *          user                    - non-zero length if defined
- *          passwd                  -   ditto
+ *          passwd                  - non-zero length if defined
+ *          options                 - non-zero length if defined
  *          conn->host.name         - remove user name and password
  */
-static CURLcode parse_url_userpass(struct SessionHandle *data,
-                                   struct connectdata *conn,
-                                   char *user, char *passwd)
+static CURLcode parse_url_login(struct SessionHandle *data,
+                                struct connectdata *conn,
+                                char *user, char *passwd, char *options)
 {
+  CURLcode result = CURLE_OK;
+  char *userp = NULL;
+  char *passwdp = NULL;
+  char *optionsp = NULL;
+
   /* At this point, we're hoping all the other special cases have
    * been taken care of, so conn->host.name is at most
-   *    [user[:password]]@]hostname
+   *    [user[:password][;options]]@]hostname
    *
    * We need somewhere to put the embedded details, so do that first.
    */
 
-  char *ptr=strchr(conn->host.name, '@');
-  char *userpass = conn->host.name;
+  char *ptr = strchr(conn->host.name, '@');
+  char *login = conn->host.name;
 
-  user[0] =0;   /* to make everything well-defined */
-  passwd[0]=0;
+  user[0] = 0;   /* to make everything well-defined */
+  passwd[0] = 0;
+  options[0] = 0;
 
   /* We will now try to extract the
-   * possible user+password pair in a string like:
+   * possible login information in a string like:
    * ftp://user:password@ftp.my.site:8021/README */
-  if(ptr != NULL) {
-    /* there's a user+password given here, to the left of the @ */
+  if(ptr) {
+    /* There's login information to the left of the @ */
 
     conn->host.name = ++ptr;
 
@@ -4267,46 +4446,200 @@ static CURLcode parse_url_userpass(struct SessionHandle *data,
      * set user/passwd, but doing that first adds more cases here :-(
      */
 
-    conn->bits.userpwd_in_url = TRUE;
     if(data->set.use_netrc != CURL_NETRC_REQUIRED) {
-      /* We could use the one in the URL */
+      /* We could use the login information in the URL so extract it */
+      result = parse_login_details(login, ptr - login - 1,
+                                   &userp, &passwdp, &optionsp);
+      if(!result) {
+        if(userp) {
+          char *newname;
+
+          /* We have a user in the URL */
+          conn->bits.userpwd_in_url = TRUE;
+          conn->bits.user_passwd = TRUE; /* enable user+password */
+
+          /* Decode the user */
+          newname = curl_easy_unescape(data, userp, 0, NULL);
+          if(!newname) {
+            Curl_safefree(userp);
+            Curl_safefree(passwdp);
+            Curl_safefree(optionsp);
+            return CURLE_OUT_OF_MEMORY;
+          }
 
-      conn->bits.user_passwd = TRUE; /* enable user+password */
+          if(strlen(newname) < MAX_CURL_USER_LENGTH)
+            strcpy(user, newname);
 
-      if(*userpass != ':') {
-        /* the name is given, get user+password */
-        sscanf(userpass, "%" MAX_CURL_USER_LENGTH_TXT "[^:@]:"
-               "%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
-               user, passwd);
-      }
-      else
-        /* no name given, get the password only */
-        sscanf(userpass, ":%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]", passwd);
-
-      if(user[0]) {
-        char *newname=curl_easy_unescape(data, user, 0, NULL);
-        if(!newname)
-          return CURLE_OUT_OF_MEMORY;
-        if(strlen(newname) < MAX_CURL_USER_LENGTH)
-          strcpy(user, newname);
-
-        /* if the new name is longer than accepted, then just use
-           the unconverted name, it'll be wrong but what the heck */
-        free(newname);
-      }
-      if(passwd[0]) {
-        /* we have a password found in the URL, decode it! */
-        char *newpasswd=curl_easy_unescape(data, passwd, 0, NULL);
-        if(!newpasswd)
-          return CURLE_OUT_OF_MEMORY;
-        if(strlen(newpasswd) < MAX_CURL_PASSWORD_LENGTH)
-          strcpy(passwd, newpasswd);
-
-        free(newpasswd);
+          free(newname);
+        }
+
+        if(passwdp) {
+          /* We have a password in the URL so decode it */
+          char *newpasswd = curl_easy_unescape(data, passwdp, 0, NULL);
+          if(!newpasswd) {
+            Curl_safefree(userp);
+            Curl_safefree(passwdp);
+            Curl_safefree(optionsp);
+            return CURLE_OUT_OF_MEMORY;
+          }
+
+          if(strlen(newpasswd) < MAX_CURL_PASSWORD_LENGTH)
+            strcpy(passwd, newpasswd);
+
+          free(newpasswd);
+        }
+
+        if(optionsp) {
+          /* We have an options list in the URL so decode it */
+          char *newoptions = curl_easy_unescape(data, optionsp, 0, NULL);
+          if(!newoptions) {
+            Curl_safefree(userp);
+            Curl_safefree(passwdp);
+            Curl_safefree(optionsp);
+            return CURLE_OUT_OF_MEMORY;
+          }
+
+          if(strlen(newoptions) < MAX_CURL_OPTIONS_LENGTH)
+            strcpy(options, newoptions);
+
+          free(newoptions);
+        }
       }
+
+      Curl_safefree(userp);
+      Curl_safefree(passwdp);
+      Curl_safefree(optionsp);
     }
   }
-  return CURLE_OK;
+
+  return result;
+}
+
+/*
+ * parse_login_details()
+ *
+ * This is used to parse a login string for user name, password and options in
+ * the following formats:
+ *
+ *   user
+ *   user:password
+ *   user:password;options
+ *   user;options
+ *   user;options:password
+ *   :password
+ *   :password;options
+ *   ;options
+ *   ;options:password
+ *
+ * Parameters:
+ *
+ * login    [in]     - The login string.
+ * len      [in]     - The length of the login string.
+ * userp    [in/out] - The address where a pointer to newly allocated memory
+ *                     holding the user will be stored upon completion.
+ * passdwp  [in/out] - The address where a pointer to newly allocated memory
+ *                     holding the password will be stored upon completion.
+ * optionsp [in/out] - The address where a pointer to newly allocated memory
+ *                     holding the options will be stored upon completion.
+ *
+ * Returns CURLE_OK on success.
+ */
+static CURLcode parse_login_details(const char *login, const size_t len,
+                                    char **userp, char **passwdp,
+                                    char **optionsp)
+{
+  CURLcode result = CURLE_OK;
+  char *ubuf = NULL;
+  char *pbuf = NULL;
+  char *obuf = NULL;
+  const char *psep = NULL;
+  const char *osep = NULL;
+  size_t ulen;
+  size_t plen;
+  size_t olen;
+
+  /* Attempt to find the password separator */
+  if(passwdp) {
+    psep = strchr(login, ':');
+
+    /* Within the constraint of the login string */
+    if(psep >= login + len)
+      psep = NULL;
+  }
+
+  /* Attempt to find the options separator */
+  if(optionsp) {
+    osep = strchr(login, ';');
+
+    /* Within the constraint of the login string */
+    if(osep >= login + len)
+      osep = NULL;
+  }
+
+  /* Calculate the portion lengths */
+  ulen = (psep ?
+          (size_t)(osep && psep > osep ? osep - login : psep - login) :
+          (osep ? (size_t)(osep - login) : len));
+  plen = (psep ?
+          (osep && osep > psep ? (size_t)(osep - psep) :
+                                 (size_t)(login + len - psep)) - 1 : 0);
+  olen = (osep ?
+          (psep && psep > osep ? (size_t)(psep - osep) :
+                                 (size_t)(login + len - osep)) - 1 : 0);
+
+  /* Allocate the user portion buffer */
+  if(userp && ulen) {
+    ubuf = malloc(ulen + 1);
+    if(!ubuf)
+      result = CURLE_OUT_OF_MEMORY;
+  }
+
+  /* Allocate the password portion buffer */
+  if(!result && passwdp && plen) {
+    pbuf = malloc(plen + 1);
+    if(!pbuf) {
+      Curl_safefree(ubuf);
+      result = CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  /* Allocate the options portion buffer */
+  if(!result && optionsp && olen) {
+    obuf = malloc(olen + 1);
+    if(!obuf) {
+      Curl_safefree(pbuf);
+      Curl_safefree(ubuf);
+      result = CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  if(!result) {
+    /* Store the user portion if necessary */
+    if(ubuf) {
+      memcpy(ubuf, login, ulen);
+      ubuf[ulen] = '\0';
+      Curl_safefree(*userp);
+      *userp = ubuf;
+    }
+
+    /* Store the password portion if necessary */
+    if(pbuf) {
+      memcpy(pbuf, psep + 1, plen);
+      pbuf[plen] = '\0';
+      Curl_safefree(*passwdp);
+      *passwdp = pbuf;
+    }
+
+    /* Store the options portion if necessary */
+    if(obuf) {
+      memcpy(obuf, osep + 1, olen);
+      obuf[olen] = '\0';
+      Curl_safefree(*optionsp);
+      *optionsp = obuf;
+    }
+  }
+
+  return result;
 }
 
 /*************************************************************
@@ -4346,8 +4679,19 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
         portptr = NULL; /* no port number available */
     }
   }
-  else
+  else {
+#ifdef ENABLE_IPV6
+    struct in6_addr in6;
+    if(Curl_inet_pton(AF_INET6, conn->host.name, &in6) > 0) {
+      /* This is a numerical IPv6 address, meaning this is a wrongly formatted
+         URL */
+      failf(data, "IPv6 numerical address used in URL without brackets");
+      return CURLE_URL_MALFORMAT;
+    }
+#endif
+
     portptr = strrchr(conn->host.name, ':');
+  }
 
   if(data->set.use_port && data->state.allow_port) {
     /* if set, we use this and ignore the port possibly given in the URL */
@@ -4370,7 +4714,7 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
        * stripped off. It would be better to work directly from the original
        * URL and simply replace the port part of it.
        */
-      url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->handler->scheme,
+      url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->given->scheme,
                     conn->bits.ipv6_ip?"[":"", conn->host.name,
                     conn->bits.ipv6_ip?"]":"", conn->remote_port,
                     data->state.slash_removed?"/":"", data->state.path,
@@ -4378,8 +4722,10 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
       if(!url)
         return CURLE_OUT_OF_MEMORY;
 
-      if(data->change.url_alloc)
-        free(data->change.url);
+      if(data->change.url_alloc) {
+        Curl_safefree(data->change.url);
+        data->change.url_alloc = FALSE;
+      }
 
       data->change.url = url;
       data->change.url_alloc = TRUE;
@@ -4416,20 +4762,26 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
 }
 
 /*
- * Override a user name and password from the URL with that in the
- * CURLOPT_USERPWD option or a .netrc file, if applicable.
+ * Override the login details from the URL with that in the CURLOPT_USERPWD
+ * option or a .netrc file, if applicable.
  */
-static void override_userpass(struct SessionHandle *data,
-                              struct connectdata *conn,
-                              char *user, char *passwd)
+static void override_login(struct SessionHandle *data,
+                           struct connectdata *conn,
+                           char *user, char *passwd, char *options)
 {
-  if(data->set.str[STRING_USERNAME] != NULL) {
+  if(data->set.str[STRING_USERNAME]) {
     strncpy(user, data->set.str[STRING_USERNAME], MAX_CURL_USER_LENGTH);
-    user[MAX_CURL_USER_LENGTH-1] = '\0';   /*To be on safe side*/
+    user[MAX_CURL_USER_LENGTH - 1] = '\0';   /* To be on safe side */
   }
-  if(data->set.str[STRING_PASSWORD] != NULL) {
+
+  if(data->set.str[STRING_PASSWORD]) {
     strncpy(passwd, data->set.str[STRING_PASSWORD], MAX_CURL_PASSWORD_LENGTH);
-    passwd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/
+    passwd[MAX_CURL_PASSWORD_LENGTH - 1] = '\0'; /* To be on safe side */
+  }
+
+  if(data->set.str[STRING_OPTIONS]) {
+    strncpy(options, data->set.str[STRING_OPTIONS], MAX_CURL_OPTIONS_LENGTH);
+    options[MAX_CURL_OPTIONS_LENGTH - 1] = '\0'; /* To be on safe side */
   }
 
   conn->bits.netrc = FALSE;
@@ -4455,32 +4807,48 @@ static void override_userpass(struct SessionHandle *data,
 /*
  * Set password so it's available in the connection.
  */
-static CURLcode set_userpass(struct connectdata *conn,
-                             const char *user, const char *passwd)
+static CURLcode set_login(struct connectdata *conn,
+                          const char *user, const char *passwd,
+                          const char *options)
 {
-  /* If our protocol needs a password and we have none, use the defaults */
-  if( (conn->protocol & (PROT_FTP|PROT_IMAP)) &&
-       !conn->bits.user_passwd) {
+  CURLcode result = CURLE_OK;
 
+  /* If our protocol needs a password and we have none, use the defaults */
+  if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) {
+    /* Store the default user */
     conn->user = strdup(CURL_DEFAULT_USER);
+
+    /* Store the default password */
     if(conn->user)
       conn->passwd = strdup(CURL_DEFAULT_PASSWORD);
     else
       conn->passwd = NULL;
+
     /* This is the default password, so DON'T set conn->bits.user_passwd */
   }
   else {
-    /* store user + password, zero-length if not set */
+    /* Store the user, zero-length if not set */
     conn->user = strdup(user);
+
+    /* Store the password (only if user is present), zero-length if not set */
     if(conn->user)
       conn->passwd = strdup(passwd);
     else
       conn->passwd = NULL;
   }
+
   if(!conn->user || !conn->passwd)
-    return CURLE_OUT_OF_MEMORY;
+    result = CURLE_OUT_OF_MEMORY;
 
-  return CURLE_OK;
+  /* Store the options, null if not set */
+  if(!result && options[0]) {
+    conn->options = strdup(options);
+
+    if(!conn->options)
+      result = CURLE_OUT_OF_MEMORY;
+  }
+
+  return result;
 }
 
 /*************************************************************
@@ -4491,18 +4859,17 @@ static CURLcode resolve_server(struct SessionHandle *data,
                                bool *async)
 {
   CURLcode result=CURLE_OK;
-  long timeout_ms = Curl_timeleft(conn, NULL, TRUE);
+  long timeout_ms = Curl_timeleft(data, NULL, TRUE);
 
   /*************************************************************
    * Resolve the name of the server or proxy
    *************************************************************/
-  if(conn->bits.reuse) {
-    /* We're reusing the connection - no need to resolve anything */
+  if(conn->bits.reuse)
+    /* We're reusing the connection - no need to resolve anything, and
+       fix_hostname() was called already in create_conn() for the re-use
+       case. */
     *async = FALSE;
 
-    if(conn->bits.proxy)
-      fix_hostname(data, conn, &conn->host);
-  }
   else {
     /* this is a fresh connect */
     int rc;
@@ -4522,7 +4889,7 @@ static CURLcode resolve_server(struct SessionHandle *data,
       if(rc == CURLRESOLV_PENDING)
         *async = TRUE;
 
-      else if (rc == CURLRESOLV_TIMEDOUT)
+      else if(rc == CURLRESOLV_TIMEDOUT)
         result = CURLE_OPERATION_TIMEDOUT;
 
       else if(!hostaddr) {
@@ -4544,7 +4911,7 @@ static CURLcode resolve_server(struct SessionHandle *data,
       if(rc == CURLRESOLV_PENDING)
         *async = TRUE;
 
-      else if (rc == CURLRESOLV_TIMEDOUT)
+      else if(rc == CURLRESOLV_TIMEDOUT)
         result = CURLE_OPERATION_TIMEDOUT;
 
       else if(!hostaddr) {
@@ -4601,13 +4968,10 @@ static void reuse_conn(struct connectdata *old_conn,
     old_conn->proxypasswd = NULL;
   }
 
-  /* host can change, when doing keepalive with a proxy ! */
-  if(conn->bits.proxy) {
-    free(conn->host.rawalloc);
-    conn->host=old_conn->host;
-  }
-  else
-    free(old_conn->host.rawalloc); /* free the newly allocated name buffer */
+  /* host can change, when doing keepalive with a proxy or if the case is
+     different this time etc */
+  Curl_safefree(conn->host.rawalloc);
+  conn->host=old_conn->host;
 
   /* persist connection info in session handle */
   Curl_persistconninfo(conn);
@@ -4619,10 +4983,14 @@ static void reuse_conn(struct connectdata *old_conn,
   Curl_safefree(old_conn->passwd);
   Curl_safefree(old_conn->proxyuser);
   Curl_safefree(old_conn->proxypasswd);
+  Curl_safefree(old_conn->localdev);
+
   Curl_llist_destroy(old_conn->send_pipe, NULL);
   Curl_llist_destroy(old_conn->recv_pipe, NULL);
-  Curl_llist_destroy(old_conn->pend_pipe, NULL);
-  Curl_llist_destroy(old_conn->done_pipe, NULL);
+
+  old_conn->send_pipe = NULL;
+  old_conn->recv_pipe = NULL;
+
   Curl_safefree(old_conn->master_buffer);
 }
 
@@ -4637,7 +5005,7 @@ static void reuse_conn(struct connectdata *old_conn,
  * @param data The sessionhandle pointer
  * @param in_connect is set to the next connection data pointer
  * @param async is set TRUE when an async DNS resolution is pending
- * @see setup_conn()
+ * @see Curl_setup_conn()
  *
  * *NOTE* this function assigns the conn->data pointer!
  */
@@ -4646,15 +5014,20 @@ static CURLcode create_conn(struct SessionHandle *data,
                             struct connectdata **in_connect,
                             bool *async)
 {
-  CURLcode result=CURLE_OK;
+  CURLcode result = CURLE_OK;
   struct connectdata *conn;
   struct connectdata *conn_temp = NULL;
   size_t urllen;
   char user[MAX_CURL_USER_LENGTH];
   char passwd[MAX_CURL_PASSWORD_LENGTH];
+  char options[MAX_CURL_OPTIONS_LENGTH];
   bool reuse;
   char *proxy = NULL;
   bool prot_missing = FALSE;
+  bool no_connections_available = FALSE;
+  bool force_reuse;
+  size_t max_host_connections = Curl_multi_max_host_connections(data->multi);
+  size_t max_total_connections = Curl_multi_max_total_connections(data->multi);
 
   *async = FALSE;
 
@@ -4693,28 +5066,33 @@ static CURLcode create_conn(struct SessionHandle *data,
     urllen=LEAST_PATH_ALLOC;
 
   /*
-   * We malloc() the buffers below urllen+2 to make room for to possibilities:
+   * We malloc() the buffers below urllen+2 to make room for 2 possibilities:
    * 1 - an extra terminating zero
    * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used)
    */
 
   Curl_safefree(data->state.pathbuffer);
+  data->state.path = NULL;
+
   data->state.pathbuffer = malloc(urllen+2);
   if(NULL == data->state.pathbuffer)
     return CURLE_OUT_OF_MEMORY; /* really bad error */
   data->state.path = data->state.pathbuffer;
 
   conn->host.rawalloc = malloc(urllen+2);
-  if(NULL == conn->host.rawalloc)
+  if(NULL == conn->host.rawalloc) {
+    Curl_safefree(data->state.pathbuffer);
+    data->state.path = NULL;
     return CURLE_OUT_OF_MEMORY;
+  }
 
   conn->host.name = conn->host.rawalloc;
   conn->host.name[0] = 0;
 
-  result = parseurlandfillconn(data, conn, &prot_missing);
-  if(result != CURLE_OK) {
-      return result;
-  }
+  result = parseurlandfillconn(data, conn, &prot_missing, user, passwd,
+                               options);
+  if(result != CURLE_OK)
+    return result;
 
   /*************************************************************
    * No protocol part in URL was used, add it!
@@ -4732,17 +5110,32 @@ static CURLcode create_conn(struct SessionHandle *data,
       return CURLE_OUT_OF_MEMORY;
     }
 
+    if(data->change.url_alloc) {
+      Curl_safefree(data->change.url);
+      data->change.url_alloc = FALSE;
+    }
+
     data->change.url = reurl;
     data->change.url_alloc = TRUE; /* free this later */
   }
 
   /*************************************************************
-   * Parse a user name and password in the URL and strip it out
-   * of the host name
+   * If the protocol can't handle url query strings, then cut
+   * of the unhandable part
    *************************************************************/
-  result = parse_url_userpass(data, conn, user, passwd);
-  if(result != CURLE_OK)
-    return result;
+  if((conn->given->flags&PROTOPT_NOURLQUERY)) {
+    char *path_q_sep = strchr(conn->data->state.path, '?');
+    if(path_q_sep) {
+      /* according to rfc3986, allow the query (?foo=bar)
+         also on protocols that can't handle it.
+
+         cut the string-part after '?'
+      */
+
+      /* terminate the string */
+      path_q_sep[0] = 0;
+    }
+  }
 
 #ifndef CURL_DISABLE_PROXY
   /*************************************************************
@@ -4751,7 +5144,7 @@ static CURLcode create_conn(struct SessionHandle *data,
   if(conn->bits.proxy_user_passwd) {
     result = parse_proxy_auth(data, conn);
     if(result != CURLE_OK)
-        return result;
+      return result;
   }
 
   /*************************************************************
@@ -4776,20 +5169,42 @@ static CURLcode create_conn(struct SessionHandle *data,
   else if(!proxy)
     proxy = detect_proxy(conn);
 
-  if(proxy && !*proxy) {
-    free(proxy);  /* Don't bother with an empty proxy string */
+  if(proxy && (!*proxy || (conn->handler->flags & PROTOPT_NONETWORK))) {
+    free(proxy);  /* Don't bother with an empty proxy string or if the
+                     protocol doesn't work with network */
     proxy = NULL;
   }
-  /* proxy must be freed later unless NULL */
+
+  /***********************************************************************
+   * If this is supposed to use a proxy, we need to figure out the proxy host
+   * name, proxy type and port number, so that we can re-use an existing
+   * connection that may exist registered to the same proxy host.
+   ***********************************************************************/
   if(proxy) {
-    long bits = conn->protocol & (PROT_HTTPS|PROT_SSL);
+    result = parse_proxy(data, conn, proxy);
+
+    free(proxy); /* parse_proxy copies the proxy string */
+
+    if(result)
+      return result;
 
     if((conn->proxytype == CURLPROXY_HTTP) ||
        (conn->proxytype == CURLPROXY_HTTP_1_0)) {
-      /* force this connection's protocol to become HTTP */
-      conn->protocol = PROT_HTTP | bits;
+#ifdef CURL_DISABLE_HTTP
+      /* asking for a HTTP proxy is a bit funny when HTTP is disabled... */
+      return CURLE_UNSUPPORTED_PROTOCOL;
+#else
+      /* force this connection's protocol to become HTTP if not already
+         compatible - if it isn't tunneling through */
+      if(!(conn->handler->protocol & CURLPROTO_HTTP) &&
+         !conn->bits.tunnel_proxy)
+        conn->handler = &Curl_handler_http;
+
       conn->bits.httpproxy = TRUE;
+#endif
     }
+    else
+      conn->bits.httpproxy = FALSE; /* not a HTTP proxy */
     conn->bits.proxy = TRUE;
   }
   else {
@@ -4800,18 +5215,6 @@ static CURLcode create_conn(struct SessionHandle *data,
     conn->bits.tunnel_proxy = FALSE;
   }
 
-  /***********************************************************************
-   * If this is supposed to use a proxy, we need to figure out the proxy
-   * host name, so that we can re-use an existing connection
-   * that may exist registered to the same proxy host.
-   ***********************************************************************/
-  if(proxy) {
-    result = parse_proxy(data, conn, proxy);
-    /* parse_proxy has freed the proxy string, so don't try to use it again */
-    proxy = NULL;
-    if(result != CURLE_OK)
-      return result;
-  }
 #endif /* CURL_DISABLE_PROXY */
 
   /*************************************************************
@@ -4833,7 +5236,7 @@ static CURLcode create_conn(struct SessionHandle *data,
    * file: is a special case in that it doesn't need a network connection
    ***********************************************************************/
 #ifndef CURL_DISABLE_FILE
-  if(conn->protocol & PROT_FILE) {
+  if(conn->handler->flags & PROTOPT_NONETWORK) {
     bool done;
     /* this is supposed to be the connect function so we better at least check
        that the file is present here! */
@@ -4843,7 +5246,7 @@ static CURLcode create_conn(struct SessionHandle *data,
     /* Setup a "faked" transfer that'll do nothing */
     if(CURLE_OK == result) {
       conn->data = data;
-      conn->bits.tcpconnect = TRUE; /* we are "connected */
+      conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */
 
       ConnectionStore(data, conn);
 
@@ -4862,6 +5265,9 @@ static CURLcode create_conn(struct SessionHandle *data,
                           -1, NULL); /* no upload */
     }
 
+    /* since we skip do_init() */
+    Curl_speedinit(data);
+
     return result;
   }
 #endif
@@ -4870,7 +5276,7 @@ static CURLcode create_conn(struct SessionHandle *data,
    * If the protocol is using SSL and HTTP proxy is used, we set
    * the tunnel_proxy bit.
    *************************************************************/
-  if((conn->protocol&PROT_SSL) && conn->bits.httpproxy)
+  if((conn->given->flags&PROTOPT_SSL) && conn->bits.httpproxy)
     conn->bits.tunnel_proxy = TRUE;
 
   /*************************************************************
@@ -4880,12 +5286,9 @@ static CURLcode create_conn(struct SessionHandle *data,
   if(result != CURLE_OK)
     return result;
 
-  /*************************************************************
-   * Check for an overridden user name and password, then set it
-   * for use
-   *************************************************************/
-  override_userpass(data, conn, user, passwd);
-  result = set_userpass(conn, user, passwd);
+  /* Check for overridden login details and set them accordingly */
+  override_login(data, conn, user, passwd, options);
+  result = set_login(conn, user, passwd, options);
   if(result != CURLE_OK)
     return result;
 
@@ -4905,6 +5308,10 @@ static CURLcode create_conn(struct SessionHandle *data,
   data->set.ssl.random_file = data->set.str[STRING_SSL_RANDOM_FILE];
   data->set.ssl.egdsocket = data->set.str[STRING_SSL_EGDSOCKET];
   data->set.ssl.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
+#ifdef USE_TLS_SRP
+  data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME];
+  data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD];
+#endif
 
   if(!Curl_clone_ssl_config(&data->set.ssl, &conn->ssl_config))
     return CURLE_OUT_OF_MEMORY;
@@ -4922,7 +5329,25 @@ static CURLcode create_conn(struct SessionHandle *data,
   if(data->set.reuse_fresh && !data->state.this_is_a_follow)
     reuse = FALSE;
   else
-    reuse = ConnectionExists(data, conn, &conn_temp);
+    reuse = ConnectionExists(data, conn, &conn_temp, &force_reuse);
+
+  /* If we found a reusable connection, we may still want to
+     open a new connection if we are pipelining. */
+  if(reuse && !force_reuse && IsPipeliningPossible(data, conn_temp)) {
+    size_t pipelen = conn_temp->send_pipe->size + conn_temp->recv_pipe->size;
+    if(pipelen > 0) {
+      infof(data, "Found connection %ld, with requests in the pipe (%zu)\n",
+            conn_temp->connection_id, pipelen);
+
+      if(conn_temp->bundle->num_connections < max_host_connections &&
+         data->state.conn_cache->num_connections < max_total_connections) {
+        /* We want a new connection anyway */
+        reuse = FALSE;
+
+        infof(data, "We can reuse, but we want a new connection anyway\n");
+      }
+    }
+  }
 
   if(reuse) {
     /*
@@ -4931,22 +5356,84 @@ static CURLcode create_conn(struct SessionHandle *data,
      * just allocated before we can move along and use the previously
      * existing one.
      */
+    conn_temp->inuse = TRUE; /* mark this as being in use so that no other
+                                handle in a multi stack may nick it */
     reuse_conn(conn, conn_temp);
     free(conn);          /* we don't need this anymore */
     conn = conn_temp;
     *in_connect = conn;
+
+    /* set a pointer to the hostname we display */
+    fix_hostname(data, conn, &conn->host);
+
     infof(data, "Re-using existing connection! (#%ld) with host %s\n",
-          conn->connectindex,
+          conn->connection_id,
           conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
   }
   else {
-    /*
-     * This is a brand new connection, so let's store it in the connection
-     * cache of ours!
-     */
-    ConnectionStore(data, conn);
+    /* We have decided that we want a new connection. However, we may not
+       be able to do that if we have reached the limit of how many
+       connections we are allowed to open. */
+    struct connectbundle *bundle;
+
+    bundle = Curl_conncache_find_bundle(data->state.conn_cache,
+                                        conn->host.name);
+    if(max_host_connections > 0 && bundle &&
+       (bundle->num_connections >= max_host_connections)) {
+      struct connectdata *conn_candidate;
+
+      /* The bundle is full. Let's see if we can kill a connection. */
+      conn_candidate = find_oldest_idle_connection_in_bundle(data, bundle);
+
+      if(conn_candidate) {
+        /* Set the connection's owner correctly, then kill it */
+        conn_candidate->data = data;
+        (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
+      }
+      else
+        no_connections_available = TRUE;
+    }
+
+    if(max_total_connections > 0 &&
+       (data->state.conn_cache->num_connections >= max_total_connections)) {
+      struct connectdata *conn_candidate;
+
+      /* The cache is full. Let's see if we can kill a connection. */
+      conn_candidate = find_oldest_idle_connection(data);
+
+      if(conn_candidate) {
+        /* Set the connection's owner correctly, then kill it */
+        conn_candidate->data = data;
+        (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE);
+      }
+      else
+        no_connections_available = TRUE;
+    }
+
+
+    if(no_connections_available) {
+      infof(data, "No connections available.\n");
+
+      conn_free(conn);
+      *in_connect = NULL;
+
+      return CURLE_NO_CONNECTION_AVAILABLE;
+    }
+    else {
+      /*
+       * This is a brand new connection, so let's store it in the connection
+       * cache of ours!
+       */
+      ConnectionStore(data, conn);
+    }
   }
 
+  /* Mark the connection as used */
+  conn->inuse = TRUE;
+
+  /* Setup and init stuff before DO starts, in preparing for the transfer. */
+  do_init(conn);
+
   /*
    * Setup whatever necessary for a resumed transfer
    */
@@ -4973,25 +5460,24 @@ static CURLcode create_conn(struct SessionHandle *data,
   return result;
 }
 
-/* setup_conn() is called after the name resolve initiated in
+/* Curl_setup_conn() is called after the name resolve initiated in
  * create_conn() is all done.
  *
- * setup_conn() also handles reused connections
+ * Curl_setup_conn() also handles reused connections
  *
  * conn->data MUST already have been setup fine (in create_conn)
  */
 
-static CURLcode setup_conn(struct connectdata *conn,
-                           bool *protocol_done)
+CURLcode Curl_setup_conn(struct connectdata *conn,
+                         bool *protocol_done)
 {
-  CURLcode result=CURLE_OK;
+  CURLcode result = CURLE_OK;
   struct SessionHandle *data = conn->data;
 
   Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 
-  if(conn->protocol & PROT_FILE) {
-    /* There's nothing in this function to setup if we're only doing
-       a file:// transfer */
+  if(conn->handler->flags & PROTOPT_NONETWORK) {
+    /* nothing to setup when not using a network */
     *protocol_done = TRUE;
     return result;
   }
@@ -5022,6 +5508,10 @@ static CURLcode setup_conn(struct connectdata *conn,
   data->state.crlf_conversions = 0; /* reset CRLF conversion counter */
 #endif /* CURL_DO_LINEEND_CONV */
 
+  /* set start time here for timeout purposes in the connect procedure, it
+     is later set again for the progress meter purpose */
+  conn->now = Curl_tvnow();
+
   for(;;) {
     /* loop for CURL_SERVER_CLOSED_CONNECTION */
 
@@ -5031,13 +5521,19 @@ static CURLcode setup_conn(struct connectdata *conn,
 
       result = ConnectPlease(data, conn, &connected);
 
+      if(result && !conn->ip_addr) {
+        /* transport connection failure not related with authentication */
+        conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
+        return result;
+      }
+
       if(connected) {
         result = Curl_protocol_connect(conn, protocol_done);
         if(CURLE_OK == result)
-          conn->bits.tcpconnect = TRUE;
+          conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
       }
       else
-        conn->bits.tcpconnect = FALSE;
+        conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
 
       /* if the connection was closed by the server while exchanging
          authentication informations, retry with the new set
@@ -5056,7 +5552,7 @@ static CURLcode setup_conn(struct connectdata *conn,
     else {
       Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
       Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
-      conn->bits.tcpconnect = TRUE;
+      conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
       *protocol_done = TRUE;
       Curl_verboseconnect(conn);
       Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
@@ -5101,14 +5597,19 @@ CURLcode Curl_connect(struct SessionHandle *data,
     if((*in_connect)->send_pipe->size || (*in_connect)->recv_pipe->size)
       /* pipelining */
       *protocol_done = TRUE;
-    else if (!*asyncp) {
+    else if(!*asyncp) {
       /* DNS resolution is done: that's either because this is a reused
          connection, in which case DNS was unnecessary, or because DNS
          really did finish already (synch resolver/fast async resolve) */
-      code = setup_conn(*in_connect, protocol_done);
+      code = Curl_setup_conn(*in_connect, protocol_done);
     }
   }
 
+  if(code == CURLE_NO_CONNECTION_AVAILABLE) {
+    *in_connect = NULL;
+    return code;
+  }
+
   if(code && *in_connect) {
     /* We're not allowed to return failure with memory left allocated
        in the connectdata struct, free those here */
@@ -5119,38 +5620,6 @@ CURLcode Curl_connect(struct SessionHandle *data,
   return code;
 }
 
-/* Call this function after Curl_connect() has returned async=TRUE and
-   then a successful name resolve has been received.
-
-   Note: this function disconnects and frees the conn data in case of
-   resolve failure */
-CURLcode Curl_async_resolved(struct connectdata *conn,
-                             bool *protocol_done)
-{
-#ifdef CURLRES_ASYNCH
-  CURLcode code;
-
-  if(conn->async.dns) {
-    conn->dns_entry = conn->async.dns;
-    conn->async.dns = NULL;
-  }
-
-  code = setup_conn(conn, protocol_done);
-
-  if(code)
-    /* We're not allowed to return failure with memory left allocated
-       in the connectdata struct, free those here */
-    Curl_disconnect(conn, FALSE); /* close the connection */
-
-  return code;
-#else
-  (void)conn;
-  (void)protocol_done;
-  return CURLE_OK;
-#endif
-}
-
-
 CURLcode Curl_done(struct connectdata **connp,
                    CURLcode status,  /* an error if this is called after an
                                         error was detected */
@@ -5190,18 +5659,28 @@ CURLcode Curl_done(struct connectdata **connp,
     data->req.location = NULL;
   }
 
+  Curl_resolver_cancel(conn);
+
   if(conn->dns_entry) {
     Curl_resolv_unlock(data, conn->dns_entry); /* done with this */
     conn->dns_entry = NULL;
   }
 
+  if(status == CURLE_ABORTED_BY_CALLBACK)
+    /* When we're aborted due to a callback return code it basically have to
+       be counted as premature as there is trouble ahead if we don't. We have
+       many callbacks and protocols work differently, we could potentially do
+       this more fine-grained in the future. */
+    premature = TRUE;
+
   /* this calls the protocol-specific function pointer previously set */
   if(conn->handler->done)
     result = conn->handler->done(conn, status, premature);
   else
     result = CURLE_OK;
 
-  Curl_pgrsDone(conn); /* done with the operation */
+  if(Curl_pgrsDone(conn) && !result)
+    result = CURLE_ABORTED_BY_CALLBACK;
 
   /* if the transfer was completed in a paused state there can be buffered
      data left to write and then kill */
@@ -5210,10 +5689,6 @@ CURLcode Curl_done(struct connectdata **connp,
     data->state.tempwrite = NULL;
   }
 
-  /* for ares-using, make sure all possible outstanding requests are properly
-     cancelled before we proceed */
-  ares_cancel(data->state.areschannel);
-
   /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
      forced us to close this no matter what we think.
 
@@ -5226,13 +5701,9 @@ CURLcode Curl_done(struct connectdata **connp,
      state it is for re-using, so we're forced to close it. In a perfect world
      we can add code that keep track of if we really must close it here or not,
      but currently we have no such detail knowledge.
-
-     connectindex == -1 here means that the connection has no spot in the
-     connection cache and thus we must disconnect it here.
   */
-  if(data->set.reuse_forbid || conn->bits.close || premature ||
-     (-1 == conn->connectindex)) {
-    CURLcode res2 = Curl_disconnect(conn, FALSE); /* close the connection */
+  if(data->set.reuse_forbid || conn->bits.close || premature) {
+    CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */
 
     /* If we had an error already, make sure we return that one. But
        if we got a new error, return that. */
@@ -5240,14 +5711,17 @@ CURLcode Curl_done(struct connectdata **connp,
       result = res2;
   }
   else {
-    ConnectionDone(conn); /* the connection is no longer in use */
-
-    /* remember the most recently used connection */
-    data->state.lastconnect = conn->connectindex;
-
-    infof(data, "Connection #%ld to host %s left intact\n",
-          conn->connectindex,
-          conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+    /* the connection is no longer in use */
+    if(ConnectionDone(data, conn)) {
+      /* remember the most recently used connection */
+      data->state.lastconnect = conn;
+
+      infof(data, "Connection #%ld to host %s left intact\n",
+            conn->connection_id,
+            conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname);
+    }
+    else
+      data->state.lastconnect = NULL;
   }
 
   *connp = NULL; /* to make the caller of this function better detect that
@@ -5300,7 +5774,6 @@ static CURLcode do_init(struct connectdata *conn)
   k->hbufp = data->state.headerbuff;
   k->ignorebody=FALSE;
 
-  Curl_pgrsTime(data, TIMER_PRETRANSFER);
   Curl_speedinit(data);
 
   Curl_pgrsSetUploadCounter(data, 0);
@@ -5320,6 +5793,7 @@ static void do_complete(struct connectdata *conn)
   conn->data->req.chunk=FALSE;
   conn->data->req.maxfd = (conn->sockfd>conn->writesockfd?
                            conn->sockfd:conn->writesockfd)+1;
+  Curl_pgrsTime(conn->data, TIMER_PRETRANSFER);
 }
 
 CURLcode Curl_do(struct connectdata **connp, bool *done)
@@ -5328,31 +5802,29 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
   struct connectdata *conn = *connp;
   struct SessionHandle *data = conn->data;
 
-  /* setup and init stuff before DO starts, in preparing for the transfer */
-  do_init(conn);
-
   if(conn->handler->do_it) {
     /* generic protocol-specific function pointer set in curl_connect() */
     result = conn->handler->do_it(conn, done);
 
     /* This was formerly done in transfer.c, but we better do it here */
     if((CURLE_SEND_ERROR == result) && conn->bits.reuse) {
-        /*
-         * If the connection is using an easy handle, call reconnect
-         * to re-establish the connection.  Otherwise, let the multi logic
-         * figure out how to re-establish the connection.
-         */
-        if(!data->multi) {
-          result = Curl_reconnect_request(connp);
-
-          if(result == CURLE_OK) {
-            /* ... finally back to actually retry the DO phase */
-            result = conn->handler->do_it(conn, done);
-          }
-        }
-        else {
-          return result;
+      /*
+       * If the connection is using an easy handle, call reconnect
+       * to re-establish the connection.  Otherwise, let the multi logic
+       * figure out how to re-establish the connection.
+       */
+      if(!data->multi) {
+        result = Curl_reconnect_request(connp);
+
+        if(result == CURLE_OK) {
+          /* ... finally back to actually retry the DO phase */
+          conn = *connp; /* re-assign conn since Curl_reconnect_request
+                            creates a new connection */
+          result = conn->handler->do_it(conn, done);
         }
+      }
+      else
+        return result;
     }
 
     if((result == CURLE_OK) && *done)
@@ -5362,14 +5834,27 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
   return result;
 }
 
-CURLcode Curl_do_more(struct connectdata *conn)
+/*
+ * Curl_do_more() is called during the DO_MORE multi state. It is basically a
+ * second stage DO state which (wrongly) was introduced to support FTP's
+ * second connection.
+ *
+ * TODO: A future libcurl should be able to work away this state.
+ *
+ * 'complete' can return 0 for incomplete, 1 for done and -1 for go back to
+ * DOING state there's more work to do!
+ */
+
+CURLcode Curl_do_more(struct connectdata *conn, int *complete)
 {
   CURLcode result=CURLE_OK;
 
+  *complete = 0;
+
   if(conn->handler->do_more)
-    result = conn->handler->do_more(conn);
+    result = conn->handler->do_more(conn, complete);
 
-  if(result == CURLE_OK)
+  if(!result && (*complete == 1))
     /* do_complete must be called after the protocol-specific DO function */
     do_complete(conn);
 
@@ -5382,9 +5867,7 @@ CURLcode Curl_do_more(struct connectdata *conn)
 void Curl_reset_reqproto(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
-  if(data->state.proto.generic && data->state.current_conn != conn) {
-    free(data->state.proto.generic);
-    data->state.proto.generic = NULL;
-  }
-  data->state.current_conn = conn;
+
+  Curl_safefree(data->state.proto.generic);
+  data->state.proto.generic = NULL;
 }
index 241dc28..c0d9c38 100644 (file)
--- a/lib/url.h
+++ b/lib/url.h
@@ -1,5 +1,5 @@
-#ifndef __URL_H
-#define __URL_H
+#ifndef HEADER_CURL_URL_H
+#define HEADER_CURL_URL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,8 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include <stdarg.h> /* to make sure we have ap_list */
+#include "curl_setup.h"
 
 /*
  * Prototypes for library-wide functions provided by url.c
@@ -37,25 +36,15 @@ void Curl_freeset(struct SessionHandle * data);
 CURLcode Curl_close(struct SessionHandle *data); /* opposite of curl_open() */
 CURLcode Curl_connect(struct SessionHandle *, struct connectdata **,
                       bool *async, bool *protocol_connect);
-CURLcode Curl_async_resolved(struct connectdata *conn,
-                             bool *protocol_connect);
 CURLcode Curl_do(struct connectdata **, bool *done);
-CURLcode Curl_do_more(struct connectdata *);
+CURLcode Curl_do_more(struct connectdata *, int *completed);
 CURLcode Curl_done(struct connectdata **, CURLcode, bool premature);
 CURLcode Curl_disconnect(struct connectdata *, bool dead_connection);
 CURLcode Curl_protocol_connect(struct connectdata *conn, bool *done);
 CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done);
 CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done);
-void Curl_safefree(void *ptr);
-
-/* create a connection cache */
-struct conncache *Curl_mk_connc(int type, long amount);
-/* free a connection cache */
-void Curl_rm_connc(struct conncache *c);
-/* Change number of entries of a connection cache */
-CURLcode Curl_ch_connc(struct SessionHandle *data,
-                       struct conncache *c,
-                       long newamount);
+CURLcode Curl_setup_conn(struct connectdata *conn,
+                         bool *protocol_done);
 
 int Curl_protocol_getsock(struct connectdata *conn,
                           curl_socket_t *socks,
@@ -82,15 +71,16 @@ void Curl_close_connections(struct SessionHandle *data);
 void Curl_reset_reqproto(struct connectdata *conn);
 
 #define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
-#define CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE "rcmd" /* default socks5 gssapi service */
+#define CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE "rcmd" /* default socks5 gssapi
+                                                     service */
 
 CURLcode Curl_connected_proxy(struct connectdata *conn);
 
 #ifdef CURL_DISABLE_VERBOSE_STRINGS
-#define Curl_verboseconnect(x)  do { } while (0)
+#define Curl_verboseconnect(x)  Curl_nop_stmt
 #else
 void Curl_verboseconnect(struct connectdata *conn);
 #endif
 
 
-#endif
+#endif /* HEADER_CURL_URL_H */
index f4f6786..d597c67 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __URLDATA_H
-#define __URLDATA_H
+#ifndef HEADER_CURL_URLDATA_H
+#define HEADER_CURL_URLDATA_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -24,7 +24,7 @@
 
 /* This file is for lib internal stuff */
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #define PORT_FTP 21
 #define PORT_FTPS 990
@@ -58,6 +58,8 @@
 #define CURL_DEFAULT_USER "anonymous"
 #define CURL_DEFAULT_PASSWORD "ftp@example.com"
 
+#define DEFAULT_CONNCACHE_SIZE 5
+
 /* length of longest IPv6 address string including the trailing null */
 #define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
 
 
 #ifdef USE_SSLEAY
 #ifdef USE_OPENSSL
-#include "openssl/rsa.h"
-#include "openssl/crypto.h"
-#include "openssl/x509.h"
-#include "openssl/pem.h"
-#include "openssl/ssl.h"
-#include "openssl/err.h"
+#include <openssl/rsa.h>
+#include <openssl/crypto.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
 #ifdef HAVE_OPENSSL_ENGINE_H
 #include <openssl/engine.h>
 #endif
 #include <openssl/pkcs12.h>
 #endif
 #else /* SSLeay-style includes */
-#include "rsa.h"
-#include "crypto.h"
-#include "x509.h"
-#include "pem.h"
-#include "ssl.h"
-#include "err.h"
+#include <rsa.h>
+#include <crypto.h>
+#include <x509.h>
+#include <pem.h>
+#include <ssl.h>
+#include <err.h>
 #ifdef HAVE_OPENSSL_ENGINE_H
 #include <engine.h>
 #endif
 #endif
 
 #ifdef USE_POLARSSL
-#include <polarssl/havege.h>
 #include <polarssl/ssl.h>
+#include <polarssl/version.h>
+#if POLARSSL_VERSION_NUMBER<0x01010000
+#include <polarssl/havege.h>
+#else
+#include <polarssl/entropy.h>
+#include <polarssl/ctr_drbg.h>
+#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
+#endif /* USE_POLARSSL */
+
+#ifdef USE_CYASSL
+#undef OCSP_REQUEST  /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */
+#undef OCSP_RESPONSE /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */
+#include <cyassl/openssl/ssl.h>
 #endif
 
 #ifdef USE_NSS
 #include <qsossl.h>
 #endif
 
+#ifdef USE_GSKIT
+#include <gskssl.h>
+#endif
+
+#ifdef USE_AXTLS
+#include <axTLS/ssl.h>
+#undef malloc
+#undef calloc
+#undef realloc
+#endif /* USE_AXTLS */
+
+#ifdef USE_SCHANNEL
+#include "curl_sspi.h"
+#include <schnlsp.h>
+#include <schannel.h>
+#endif
+
+#ifdef USE_DARWINSSL
+#include <Security/Security.h>
+/* For some reason, when building for iOS, the omnibus header above does
+ * not include SecureTransport.h as of iOS SDK 5.1. */
+#include <Security/SecureTransport.h>
+#endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #endif
 #endif
 
-#ifdef USE_ARES
-#  if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
-     (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
-#    define CARES_STATICLIB
-#  endif
-#  include <ares.h>
-#endif
-
 #include <curl/curl.h>
 
 #include "http_chunks.h" /* for the structs and enum stuff */
 #include "http.h"
 #include "rtsp.h"
 #include "wildcard.h"
+#include "multihandle.h"
 
 #ifdef HAVE_GSSAPI
 # ifdef HAVE_GSSGNU
@@ -211,6 +242,21 @@ enum protection_level {
 };
 #endif
 
+#ifdef USE_SCHANNEL
+/* Structs to store Schannel handles */
+struct curl_schannel_cred {
+  CredHandle cred_handle;
+  TimeStamp time_stamp;
+  int refcount;
+  bool cached;
+};
+
+struct curl_schannel_ctxt {
+  CtxtHandle ctxt_handle;
+  TimeStamp time_stamp;
+};
+#endif
+
 /* enum for the nonblocking SSL connection state machine */
 typedef enum {
   ssl_connect_1,
@@ -244,10 +290,19 @@ struct ssl_connect_data {
 #ifdef USE_GNUTLS
   gnutls_session session;
   gnutls_certificate_credentials cred;
+#ifdef USE_TLS_SRP
+  gnutls_srp_client_credentials srp_client_cred;
+#endif
   ssl_connect_state connecting_state;
 #endif /* USE_GNUTLS */
 #ifdef USE_POLARSSL
+#if POLARSSL_VERSION_NUMBER<0x01010000
   havege_state hs;
+#else
+  /* from v1.1.0, use ctr_drbg and entropy */
+  ctr_drbg_context ctr_drbg;
+  entropy_context entropy;
+#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
   ssl_context ssl;
   ssl_session ssn;
   int server_fd;
@@ -255,28 +310,58 @@ struct ssl_connect_data {
   x509_cert clicert;
   x509_crl crl;
   rsa_context rsa;
+  ssl_connect_state connecting_state;
 #endif /* USE_POLARSSL */
+#ifdef USE_CYASSL
+  SSL_CTX* ctx;
+  SSL*     handle;
+  ssl_connect_state connecting_state;
+#endif /* USE_CYASSL */
 #ifdef USE_NSS
   PRFileDesc *handle;
   char *client_nickname;
   struct SessionHandle *data;
-#ifdef HAVE_PK11_CREATEGENERICOBJECT
-  PK11GenericObject *key;
-  PK11GenericObject *cacert[2];
-#endif
+  struct curl_llist *obj_list;
+  PK11GenericObject *obj_clicert;
 #endif /* USE_NSS */
 #ifdef USE_QSOSSL
   SSLHandle *handle;
 #endif /* USE_QSOSSL */
+#ifdef USE_GSKIT
+  gsk_handle handle;
+  int iocport;
+  ssl_connect_state connecting_state;
+#endif
+#ifdef USE_AXTLS
+  SSL_CTX* ssl_ctx;
+  SSL*     ssl;
+  ssl_connect_state connecting_state;
+#endif /* USE_AXTLS */
+#ifdef USE_SCHANNEL
+  struct curl_schannel_cred *cred;
+  struct curl_schannel_ctxt *ctxt;
+  SecPkgContext_StreamSizes stream_sizes;
+  ssl_connect_state connecting_state;
+  size_t encdata_length, decdata_length;
+  size_t encdata_offset, decdata_offset;
+  unsigned char *encdata_buffer, *decdata_buffer;
+  unsigned long req_flags, ret_flags;
+#endif /* USE_SCHANNEL */
+#ifdef USE_DARWINSSL
+  SSLContextRef ssl_ctx;
+  curl_socket_t ssl_sockfd;
+  ssl_connect_state connecting_state;
+  bool ssl_direction; /* true if writing, false if reading */
+  size_t ssl_write_buffered_length;
+#endif /* USE_DARWINSSL */
 };
 
 struct ssl_config_data {
   long version;          /* what version the client wants to use */
   long certverifyresult; /* result from the certificate verification */
-  long verifypeer;       /* set TRUE if this is desired */
-  long verifyhost;       /* 0: no verify
-                            1: check that CN exists
-                            2: CN must match hostname */
+
+  bool verifypeer;       /* set TRUE if this is desired */
+  bool verifyhost;       /* set TRUE if CN/SAN must match hostname */
   char *CApath;          /* certificate dir (doesn't work on windows) */
   char *CAfile;          /* certificate to verify peer against */
   const char *CRLfile;   /* CRL to check certificate revocation */
@@ -284,11 +369,17 @@ struct ssl_config_data {
   char *random_file;     /* path to file containing "random" data */
   char *egdsocket;       /* path to file containing the EGD daemon socket */
   char *cipher_list;     /* list of ciphers to use */
-  long numsessions;      /* SSL session id cache size */
+  size_t max_ssl_sessions; /* SSL session id cache size */
   curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
   void *fsslctxp;        /* parameter for call back */
   bool sessionid;        /* cache session IDs or not */
   bool certinfo;         /* gather lots of certificate info */
+
+#ifdef USE_TLS_SRP
+  char *username; /* TLS username (for, e.g., SRP) */
+  char *password; /* TLS password (for, e.g., SRP) */
+  enum CURL_TLSAUTH authtype; /* TLS authentication type (default SRP) */
+#endif
 };
 
 /* information stored about one single SSL session */
@@ -340,24 +431,36 @@ struct ntlmdata {
   SEC_WINNT_AUTH_IDENTITY *p_identity;
   int has_handles;
   void *type_2;
-  int n_type_2;
+  unsigned long n_type_2;
 #else
   unsigned int flags;
   unsigned char nonce[8];
 #endif
 };
 
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
 struct negotiatedata {
   /* when doing Negotiate we first need to receive an auth token and then we
      need to send our header */
   enum { GSS_AUTHNONE, GSS_AUTHRECV, GSS_AUTHSENT } state;
   bool gss; /* Whether we're processing GSS-Negotiate or Negotiate */
   const char* protocol; /* "GSS-Negotiate" or "Negotiate" */
+#ifdef HAVE_GSSAPI
   OM_uint32 status;
   gss_ctx_id_t context;
   gss_name_t server_name;
   gss_buffer_desc output_token;
+#else
+#ifdef USE_WINDOWS_SSPI
+  DWORD status;
+  CtxtHandle *context;
+  CredHandle *credentials;
+  char server_name[1024];
+  size_t max_token_length;
+  BYTE *output_token;
+  size_t output_token_length;
+#endif
+#endif
 };
 #endif
 
@@ -378,8 +481,7 @@ struct ConnectBits {
 
   bool do_more; /* this is set TRUE if the ->curl_do_more() function is
                    supposed to be called, after ->curl_do() */
-
-  bool tcpconnect;    /* the TCP layer (or similar) is connected, this is set
+  bool tcpconnect[2]; /* the TCP layer (or similar) is connected, this is set
                          the first time on the first connect function call */
   bool protoconnstart;/* the protocol layer has STARTED its operation after
                          the TCP layer connect */
@@ -390,8 +492,6 @@ struct ConnectBits {
                          This is implicit when SSL-protocols are used through
                          proxies, but can also be enabled explicitly by
                          apps */
-  bool tunnel_connecting; /* TRUE while we're still waiting for a proxy CONNECT
-                           */
   bool authneg;       /* TRUE when the auth phase has started, which means
                          that we are creating a request with an auth header,
                          but it is not the final request in the auth
@@ -477,7 +577,7 @@ struct Curl_async {
 /* These function pointer types are here only to allow easier typecasting
    within the source when we need to cast between data pointers (such as NULL)
    and function pointers. */
-typedef CURLcode (*Curl_do_more_func)(struct connectdata *);
+typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *);
 typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
 
 
@@ -509,7 +609,7 @@ struct SingleRequest {
 
   long headerbytecount;         /* only count received headers */
   long deductheadercount; /* this amount of bytes doesn't count when we check
-                             if anything has been transfered at the end of a
+                             if anything has been transferred at the end of a
                              connection. We use this counter to make only a
                              100 reply (without a following second response
                              code) result in a CURLE_GOT_NOTHING error code */
@@ -540,7 +640,7 @@ struct SingleRequest {
   struct timeval start100;      /* time stamp to wait for the 100 code from */
   enum expect100 exp100;        /* expect 100 continue state */
 
-  int content_encoding;         /* What content encoding. sec 3.5, RFC2616. */
+  int auto_decoding;            /* What content encoding. sec 3.5, RFC2616. */
 
 #define IDENTITY 0              /* No encoding */
 #define DEFLATE 1               /* zlib deflate [RFC 1950 & 1951] */
@@ -638,6 +738,12 @@ struct Curl_handler {
                        curl_socket_t *socks,
                        int numsocks);
 
+  /* Called from the multi interface during the DO_MORE phase, and it should
+     then return a proper fd set */
+  int (*domore_getsock)(struct connectdata *conn,
+                        curl_socket_t *socks,
+                        int numsocks);
+
   /* Called from the multi interface during the DO_DONE, PERFORM and
      WAITPERFORM phases, and it should then return a proper fd set. Not setting
      this will make libcurl use the generic default one. */
@@ -652,10 +758,32 @@ struct Curl_handler {
    */
   CURLcode (*disconnect)(struct connectdata *, bool dead_connection);
 
-  long defport;       /* Default port. */
-  long protocol;      /* PROT_* flags concerning the protocol set */
+  /* If used, this function gets called from transfer.c:readwrite_data() to
+     allow the protocol to do extra reads/writes */
+  CURLcode (*readwrite)(struct SessionHandle *data, struct connectdata *conn,
+                        ssize_t *nread, bool *readmore);
+
+  long defport;           /* Default port. */
+  unsigned int protocol;  /* See CURLPROTO_*  */
+  unsigned int flags;     /* Extra particular characteristics, see PROTOPT_* */
 };
 
+#define PROTOPT_NONE 0             /* nothing extra */
+#define PROTOPT_SSL (1<<0)         /* uses SSL */
+#define PROTOPT_DUAL (1<<1)        /* this protocol uses two connections */
+#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
+/* some protocols will have to call the underlying functions without regard to
+   what exact state the socket signals. IE even if the socket says "readable",
+   the send function might need to be called while uploading, or vice versa.
+*/
+#define PROTOPT_DIRLOCK (1<<3)
+#define PROTOPT_NONETWORK (1<<4)   /* protocol doesn't use the network! */
+#define PROTOPT_NEEDSPWD (1<<5)    /* needs a password, and if none is set it
+                                      gets a default */
+#define PROTOPT_NOURLQUERY (1<<6)   /* protocol can't handle
+                                        url query strings (?foo=bar) ! */
+
+
 /* return the count of bytes sent, or -1 on error */
 typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
                             int sockindex,            /* socketindex */
@@ -685,52 +813,17 @@ struct connectdata {
      and a HTTP proxy may in fact respond using chunked encoding */
   struct Curl_chunker chunk;
 
+  curl_closesocket_callback fclosesocket; /* function closing the socket(s) */
+  void *closesocket_client;
+
   bool inuse; /* This is a marker for the connection cache logic. If this is
                  TRUE this handle is being used by an easy handle and cannot
                  be used by any other easy handle without careful
                  consideration (== only for pipelining). */
 
   /**** Fields set when inited and not modified again */
-  long connectindex; /* what index in the connection cache connects index this
-                        particular struct has */
-  long protocol; /* PROT_* flags concerning the protocol set */
-#define PROT_HTTP    CURLPROTO_HTTP
-#define PROT_HTTPS   CURLPROTO_HTTPS
-#define PROT_FTP     CURLPROTO_FTP
-#define PROT_TELNET  CURLPROTO_TELNET
-#define PROT_DICT    CURLPROTO_DICT
-#define PROT_LDAP    CURLPROTO_LDAP
-#define PROT_FILE    CURLPROTO_FILE
-#define PROT_FTPS    CURLPROTO_FTPS
-#define PROT_TFTP    CURLPROTO_TFTP
-#define PROT_SCP     CURLPROTO_SCP
-#define PROT_SFTP    CURLPROTO_SFTP
-#define PROT_IMAP    CURLPROTO_IMAP
-#define PROT_IMAPS   CURLPROTO_IMAPS
-#define PROT_POP3    CURLPROTO_POP3
-#define PROT_POP3S   CURLPROTO_POP3S
-#define PROT_SMTP    CURLPROTO_SMTP
-#define PROT_SMTPS   CURLPROTO_SMTPS
-#define PROT_RTSP    CURLPROTO_RTSP
-#define PROT_RTMP    CURLPROTO_RTMP
-#define PROT_RTMPT   CURLPROTO_RTMPT
-#define PROT_RTMPE   CURLPROTO_RTMPE
-#define PROT_RTMPTE  CURLPROTO_RTMPTE
-#define PROT_RTMPS   CURLPROTO_RTMPS
-#define PROT_RTMPTS  CURLPROTO_RTMPTS
-#define PROT_GOPHER  CURLPROTO_GOPHER
-
-/* (1<<25) is currently the highest used bit in the public bitmask. We make
-   sure we use "private bits" above the public ones to make things easier;
-   Gopher will not conflict with the current bit 25. */
-
-#define PROT_EXTMASK 0x03ffffff
-
-#define PROT_SSL     (1<<29) /* protocol requires SSL */
-
-/* these ones need action before socket close */
-#define PROT_CLOSEACTION (PROT_FTP | PROT_IMAP | PROT_POP3)
-#define PROT_DUALCHANNEL PROT_FTP /* these protocols use two connections */
+  long connection_id; /* Contains a unique number to make it easier to
+                         track the connections in the log output */
 
   /* 'dns_entry' is the particular host we use. This points to an entry in the
      DNS cache and it will not get pruned while locked. It gets unlocked in
@@ -761,9 +854,9 @@ struct connectdata {
 
   /* 'primary_ip' and 'primary_port' get filled with peer's numerical
      ip address and port number whenever an outgoing connection is
-     *attemted* from the primary socket to a remote address. When more
+     *attempted* from the primary socket to a remote address. When more
      than one address is tried for a connection these will hold data
-     for the last attempt. When the connection is actualy established
+     for the last attempt. When the connection is actually established
      these are updated with data which comes directly from the socket. */
 
   char primary_ip[MAX_IPADR_LEN];
@@ -778,6 +871,7 @@ struct connectdata {
 
   char *user;    /* user name string, allocated */
   char *passwd;  /* password string, allocated */
+  char *options; /* options string, allocated */
 
   char *proxyuser;    /* proxy user name string, allocated */
   char *proxypasswd;  /* proxy password string, allocated */
@@ -790,7 +884,8 @@ struct connectdata {
   struct timeval created; /* creation time */
   curl_socket_t sock[2]; /* two sockets, the second is used for the data
                             transfer when doing FTP */
-
+  bool sock_accepted[2]; /* TRUE if the socket on this index was created with
+                            accept() */
   Curl_recv *recv[2];
   Curl_send *send[2];
 
@@ -799,7 +894,17 @@ struct connectdata {
 
   struct ConnectBits bits;    /* various state-flags for this connection */
 
-  const struct Curl_handler * handler;  /* Connection's protocol handler. */
+ /* connecttime: when connect() is called on the current IP address. Used to
+    be able to track when to move on to try next IP - but only when the multi
+    interface is used. */
+  struct timeval connecttime;
+  /* The two fields below get set in Curl_connecthost */
+  int num_addr; /* number of addresses to try to connect to */
+  long timeoutms_per_addr; /* how long time in milliseconds to spend on
+                              trying to connect to each IP address */
+
+  const struct Curl_handler *handler; /* Connection's protocol handler */
+  const struct Curl_handler *given;   /* The protocol first given */
 
   long ip_version; /* copied from the SessionHandle at creation time */
 
@@ -810,18 +915,19 @@ struct connectdata {
                                 well be the same we read from.
                                 CURL_SOCKET_BAD disables */
 
-  /** Dynamicly allocated strings, may need to be freed before this **/
-  /** struct is killed.                                             **/
+  /** Dynamicly allocated strings, MUST be freed before this **/
+  /** struct is killed.                                      **/
   struct dynamically_allocated_data {
-    char *proxyuserpwd; /* free later if not NULL! */
-    char *uagent; /* free later if not NULL! */
-    char *accept_encoding; /* free later if not NULL! */
-    char *userpwd; /* free later if not NULL! */
-    char *rangeline; /* free later if not NULL! */
-    char *ref; /* free later if not NULL! */
-    char *host; /* free later if not NULL */
-    char *cookiehost; /* free later if not NULL */
-    char *rtsp_transport; /* free later if not NULL */
+    char *proxyuserpwd;
+    char *uagent;
+    char *accept_encoding;
+    char *userpwd;
+    char *rangeline;
+    char *ref;
+    char *host;
+    char *cookiehost;
+    char *rtsp_transport;
+    char *te; /* TE: request header */
   } allocptr;
 
   int sec_complete; /* if kerberos is enabled for this connection */
@@ -844,19 +950,10 @@ struct connectdata {
                               handle */
   bool writechannel_inuse; /* whether the write channel is in use by an easy
                               handle */
-  bool server_supports_pipelining; /* TRUE if server supports pipelining,
-                                      set after first response */
-
   struct curl_llist *send_pipe; /* List of handles waiting to
                                    send on this pipeline */
   struct curl_llist *recv_pipe; /* List of handles waiting to read
                                    their responses on this pipeline */
-  struct curl_llist *pend_pipe; /* List of pending handles on
-                                   this pipeline */
-  struct curl_llist *done_pipe; /* Handles that are finished, but
-                                   still reference this connectdata */
-#define MAX_PIPELINE_LENGTH 5
-
   char* master_buffer; /* The master buffer allocated on-demand;
                           used for pipelining. */
   size_t read_pos; /* Current read position in the master buffer */
@@ -877,6 +974,14 @@ struct connectdata {
                                single requests! */
   struct ntlmdata proxyntlm; /* NTLM data for proxy */
 
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+  /* used for communication with Samba's winbind daemon helper ntlm_auth */
+  curl_socket_t ntlm_auth_hlpr_socket;
+  pid_t ntlm_auth_hlpr_pid;
+  char* challenge_header;
+  char* response_header;
+#endif
+
   char syserr_buf [256]; /* buffer for Curl_strerror() */
 
 #ifdef CURLRES_ASYNCH
@@ -907,8 +1012,25 @@ struct connectdata {
   int socks5_gssapi_enctype;
 #endif
 
-  long verifypeer;
-  long verifyhost;
+  bool verifypeer;
+  bool verifyhost;
+
+  /* When this connection is created, store the conditions for the local end
+     bind. This is stored before the actual bind and before any connection is
+     made and will serve the purpose of being used for comparison reasons so
+     that subsequent bound-requested connections aren't accidentally re-using
+     wrong connections. */
+  char *localdev;
+  unsigned short localport;
+  int localportrange;
+
+  /* tunnel as in tunnel through a HTTP proxy with CONNECT */
+  enum {
+    TUNNEL_INIT,    /* init/default/no tunnel state */
+    TUNNEL_CONNECT, /* CONNECT has been sent off */
+    TUNNEL_COMPLETE /* CONNECT response received completely */
+  } tunnel_state[2]; /* two separate ones to allow FTP */
+  struct connectbundle *bundle; /* The bundle we are member of */
 };
 
 /* The end of connectdata. */
@@ -928,8 +1050,8 @@ struct PureInfo {
                      thus made the document NOT get fetched */
   long header_size;  /* size of read header(s) in bytes */
   long request_size; /* the amount of bytes sent in the request(s) */
-  long proxyauthavail; /* what proxy auth types were announced */
-  long httpauthavail;  /* what host auth types were announced */
+  unsigned long proxyauthavail; /* what proxy auth types were announced */
+  unsigned long httpauthavail;  /* what host auth types were announced */
   long numconnects; /* how many new connection did libcurl created */
   char *contenttype; /* the content type of the object */
   char *wouldredirect; /* URL this would've been redirected to if asked to */
@@ -959,8 +1081,8 @@ struct Progress {
                     force redraw at next call */
   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 */
+  curl_off_t downloaded; /* transferred so far */
+  curl_off_t uploaded; /* transferred so far */
 
   curl_off_t current_speed; /* uses the currently fastest transfer */
 
@@ -982,6 +1104,7 @@ struct Progress {
 
   struct timeval start;
   struct timeval t_startsingle;
+  struct timeval t_acceptdata;
 #define CURR_TIME (5+1) /* 6 entries for 5 seconds */
 
   curl_off_t speeder[ CURR_TIME ];
@@ -1026,15 +1149,14 @@ typedef enum {
  * Session-data MUST be put in the connectdata struct and here.  */
 #define MAX_CURL_USER_LENGTH 256
 #define MAX_CURL_PASSWORD_LENGTH 256
-#define MAX_CURL_USER_LENGTH_TXT "255"
-#define MAX_CURL_PASSWORD_LENGTH_TXT "255"
+#define MAX_CURL_OPTIONS_LENGTH 256
 
 struct auth {
-  long want;  /* Bitmask set to the authentication methods wanted by the app
-                 (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
-  long picked;
-  long avail; /* bitmask for what the server reports to support for this
-                 resource */
+  unsigned long want;  /* Bitmask set to the authentication methods wanted by
+                          app (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
+  unsigned long picked;
+  unsigned long avail; /* Bitmask for what the server reports to support for
+                          this resource */
   bool done;  /* TRUE when the auth phase is done and ready to do the *actual*
                  request */
   bool multi; /* TRUE if this is not yet authenticated but within the auth
@@ -1043,32 +1165,20 @@ struct auth {
                    be RFC compliant */
 };
 
-struct conncache {
-  /* 'connects' will be an allocated array with pointers. If the pointer is
-     set, it holds an allocated connection. */
-  struct connectdata **connects;
-  long num;           /* number of entries of the 'connects' array */
-  enum {
-    CONNCACHE_PRIVATE, /* used for an easy handle alone */
-    CONNCACHE_MULTI    /* shared within a multi handle */
-  } type;
-};
-
-
 struct UrlState {
-  enum {
-    Curl_if_none,
-    Curl_if_easy,
-    Curl_if_multi
-  } used_interface;
 
-  struct conncache *connc; /* points to the connection cache this handle
-                              uses */
+  /* Points to the connection cache */
+  struct conncache *conn_cache;
+
+  /* when curl_easy_perform() is called, the multi handle is "owned" by
+     the easy handle so curl_easy_cleanup() on such an easy handle will
+     also close the multi handle! */
+  bool multi_owned_by_easy;
 
   /* buffers to store authentication data in, as parsed from input options */
   struct timeval keeps_speed; /* for the progress meter really */
 
-  long lastconnect;  /* index of most recent connect or -1 if undefined */
+  struct connectdata *lastconnect; /* The last connection, NULL if undefined */
 
   char *headerbuff; /* allocated buffer to store headers in */
   size_t headersize;   /* size of the allocation */
@@ -1084,7 +1194,7 @@ struct UrlState {
                        following not keep sending user+password... This is
                        strdup() data.
                     */
-  struct curl_ssl_session *session; /* array of 'numsessions' size */
+  struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
   long sessionage;                  /* number of the most recent session */
   char *tempwrite;      /* allocated buffer to keep data in when a write
                            callback returns to make the connection paused */
@@ -1105,7 +1215,7 @@ struct UrlState {
   struct digestdata digest;      /* state data for host Digest auth */
   struct digestdata proxydigest; /* state data for proxy Digest auth */
 
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
   struct negotiatedata negotiate; /* state data for host Negotiate auth */
   struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
 #endif
@@ -1115,9 +1225,8 @@ struct UrlState {
 
   bool authproblem; /* TRUE if there's some problem authenticating */
 
-#ifdef USE_ARES
-  ares_channel areschannel; /* for name resolves */
-#endif
+  void *resolver; /* resolver state, if it is used in the URL state -
+                     ares_channel f.e. */
 
 #if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
   ENGINE *engine;
@@ -1148,14 +1257,6 @@ struct UrlState {
   /* for FTP downloads: how many CRLFs did we converted to LFs? */
   curl_off_t crlf_conversions;
 #endif
-  /* If set to non-NULL, there's a connection in a shared connection cache
-     that uses this handle so we can't kill this SessionHandle just yet but
-     must keep it around and add it to the list of handles to kill once all
-     its connections are gone */
-  void *shared_conn;
-  bool closed; /* set to TRUE when curl_easy_cleanup() has been called on this
-                  handle, but it is kept around as mentioned for
-                  shared_conn */
   char *pathbuffer;/* allocated buffer to store the URL's path part in */
   char *path;      /* path to use, points to somewhere within the pathbuffer
                       area */
@@ -1190,12 +1291,10 @@ struct UrlState {
     void *telnet;        /* private for telnet.c-eyes only */
     void *generic;
     struct SSHPROTO *ssh;
-    struct FTP *imap;
-    struct FTP *pop3;
-    struct FTP *smtp;
+    struct IMAP *imap;
+    struct POP3 *pop3;
+    struct SMTP *smtp;
   } proto;
-  /* current user of this SessionHandle instance, or NULL */
-  struct connectdata *current_conn;
 
   /* if true, force SSL connection retry (workaround for certain servers) */
   bool ssl_connect_retry;
@@ -1228,7 +1327,7 @@ struct DynamicStatic {
  * the 'DynamicStatic' struct.
  * Character pointer fields point to dynamic storage, unless otherwise stated.
  */
-struct Curl_one_easy; /* declared and used only in multi.c */
+
 struct Curl_multi;    /* declared and used only in multi.c */
 
 enum dupstring {
@@ -1263,6 +1362,7 @@ enum dupstring {
   STRING_SSL_ISSUERCERT,  /* issuer cert file to check certificate */
   STRING_USERNAME,        /* <username>, if used */
   STRING_PASSWORD,        /* <password>, if used */
+  STRING_OPTIONS,         /* <options>, if used */
   STRING_PROXYUSERNAME,   /* Proxy <username>, if used */
   STRING_PROXYPASSWORD,   /* Proxy <password>, if used */
   STRING_NOPROXY,         /* List of hosts which should not use the proxy, if
@@ -1280,6 +1380,12 @@ enum dupstring {
   STRING_SOCKS5_GSSAPI_SERVICE,  /* GSSAPI service name */
 #endif
   STRING_MAIL_FROM,
+  STRING_MAIL_AUTH,
+
+#ifdef USE_TLS_SRP
+  STRING_TLSAUTH_USERNAME,     /* TLS auth <username> */
+  STRING_TLSAUTH_PASSWORD,     /* TLS auth <password> */
+#endif
 
   /* -- end of strings -- */
   STRING_LAST /* not used, just an end-of-list marker */
@@ -1297,14 +1403,14 @@ struct UserDefined {
   void *writeheader; /* write the header to this if non-NULL */
   void *rtp_out;     /* write RTP to this if non-NULL */
   long use_port;     /* which port to use (when not using default) */
-  long httpauth;     /* what kind of HTTP authentication to use (bitmask) */
-  long proxyauth;    /* what kind of proxy authentication to use (bitmask) */
+  unsigned long httpauth;  /* kind of HTTP authentication to use (bitmask) */
+  unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */
   long followlocation; /* as in HTTP Location: */
   long maxredirs;    /* maximum no. of http(s) redirects to follow, set to -1
                         for infinity */
-  bool post301;      /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a
-                        301 */
-  bool post302;      /* keep POSTs as POSTs after a 302 */
+
+  int keep_post;     /* keep POSTs as POSTs after a 30x request; each
+                        bit represents a request, from 301 to 303 */
   bool free_referer; /* set TRUE if 'referer' points to a string we
                         allocated */
   void *postfields;  /* if POST, set the fields' values here */
@@ -1321,14 +1427,19 @@ struct UserDefined {
   curl_read_callback fread_func;     /* function that reads the input */
   int is_fread_set; /* boolean, has read callback been set to non-NULL? */
   int is_fwrite_set; /* boolean, has write callback been set to non-NULL? */
-  curl_progress_callback fprogress;  /* function for progress information */
+  curl_progress_callback fprogress; /* OLD and deprecated progress callback  */
+  curl_xferinfo_callback fxferinfo; /* progress callback */
   curl_debug_callback fdebug;      /* function that write informational data */
   curl_ioctl_callback ioctl_func;  /* function for I/O control */
   curl_sockopt_callback fsockopt;  /* function for setting socket options */
   void *sockopt_client; /* pointer to pass to the socket options callback */
   curl_opensocket_callback fopensocket; /* function for checking/translating
-                                           the address and opening the socket */
+                                           the address and opening the
+                                           socket */
   void* opensocket_client;
+  curl_closesocket_callback fclosesocket; /* function for closing the
+                                             socket */
+  void* closesocket_client;
 
   void *seek_client;    /* pointer to pass to the seek callback */
   /* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
@@ -1343,13 +1454,15 @@ struct UserDefined {
   void *ioctl_client;   /* pointer to pass to the ioctl callback */
   long timeout;         /* in milliseconds, 0 means no timeout */
   long connecttimeout;  /* in milliseconds, 0 means no timeout */
+  long accepttimeout;   /* in milliseconds, 0 means no timeout */
   long server_response_timeout; /* in milliseconds, 0 means no timeout */
   long tftp_blksize ; /* in bytes, 0 means use default */
   curl_off_t infilesize;      /* size of file to upload, -1 means unknown */
   long low_speed_limit; /* bytes/second */
   long low_speed_time;  /* number of seconds */
   curl_off_t max_send_speed; /* high speed limit in bytes/second for upload */
-  curl_off_t max_recv_speed; /* high speed limit in bytes/second for download */
+  curl_off_t max_recv_speed; /* high speed limit in bytes/second for
+                                download */
   curl_off_t set_resume_from;  /* continue [ftp] transfer from here */
   struct curl_slist *headers; /* linked list of extra headers */
   struct curl_httppost *httppost;  /* linked list of POST data */
@@ -1377,12 +1490,6 @@ struct UserDefined {
   long buffer_size;      /* size of receive buffer to use */
   void *private_data; /* application-private data */
 
-  struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi
-                                     handle, an internal 'Curl_one_easy'
-                                     struct is created and this is a pointer
-                                     to the particular struct associated with
-                                     this SessionHandle */
-
   struct curl_slist *http200aliases; /* linked list of aliases for http200 */
 
   long ipver; /* the CURL_IPRESOLVE_* defines in the public header file
@@ -1413,11 +1520,12 @@ struct UserDefined {
   bool hide_progress;    /* don't use the progress meter */
   bool http_fail_on_error;  /* fail on HTTP error codes >= 300 */
   bool http_follow_location; /* follow HTTP redirects */
+  bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */
   bool http_disable_hostname_check_before_authentication;
   bool include_header;   /* include received protocol headers in data output */
   bool http_set_referer; /* is a custom referer used */
   bool http_auto_referer; /* set "correct" referer when following location: */
-  bool opt_no_body;      /* as set with CURLOPT_NO_BODY */
+  bool opt_no_body;      /* as set with CURLOPT_NOBODY */
   bool set_port;         /* custom port number used */
   bool upload;           /* upload request */
   enum CURL_NETRC_OPTION
@@ -1430,7 +1538,7 @@ struct UserDefined {
   bool ftp_use_eprt;     /* if EPRT is to be attempted or not */
   bool ftp_use_pret;     /* if PRET is to be used before PASV or not */
 
-  curl_usessl ftp_ssl;   /* if AUTH TLS is to be attempted etc, for FTP or
+  curl_usessl use_ssl;   /* if AUTH TLS is to be attempted etc, for FTP or
                             IMAP or POP3 or others! */
   curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */
   curl_ftpccc ftp_ccc;   /* FTP CCC options */
@@ -1441,6 +1549,8 @@ struct UserDefined {
   bool ftp_skip_ip;      /* skip the IP address the FTP server passes on to
                             us */
   bool connect_only;     /* make connection, let application use the socket */
+  bool ssl_enable_beast; /* especially allow this flaw for interoperability's
+                            sake*/
   long ssh_auth_types;   /* allowed SSH auth types */
   bool http_te_skip;     /* pass the raw body data to the user, even when
                             transfer-encoded (chunked, compressed) */
@@ -1458,23 +1568,33 @@ struct UserDefined {
   long socks5_gssapi_nec; /* flag to support nec socks5 server */
 #endif
   struct curl_slist *mail_rcpt; /* linked list of mail recipients */
+  bool sasl_ir;         /* Enable/disable SASL initial response */
   /* Common RTSP header options */
   Curl_RtspReq rtspreq; /* RTSP request type */
   long rtspversion; /* like httpversion, for RTSP */
   bool wildcardmatch; /* enable wildcard matching */
-  curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer starts */
+  curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer
+                                        starts */
   curl_chunk_end_callback chunk_end; /* called after part transferring
                                         stopped */
   curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds
                                     to pattern (e.g. if WILDCARDMATCH is on) */
   void *fnmatch_data;
+
+  long gssapi_delegation; /* GSSAPI credential delegation, see the
+                             documentation of CURLOPT_GSSAPI_DELEGATION */
+
+  bool tcp_keepalive;    /* use TCP keepalives */
+  long tcp_keepidle;     /* seconds in idle before sending keepalive probe */
+  long tcp_keepintvl;    /* seconds between TCP keepalive probes */
+
+  size_t maxconnects;  /* Max idle connections in the connection cache */
 };
 
 struct Names {
   struct curl_hash *hostcache;
   enum {
     HCACHE_NONE,    /* not pointing to anything */
-    HCACHE_PRIVATE, /* points to our own */
     HCACHE_GLOBAL,  /* points to the (shrug) global one */
     HCACHE_MULTI,   /* points to a shared one in the multi handle */
     HCACHE_SHARED   /* points to a shared one in a shared object */
@@ -1492,12 +1612,31 @@ struct Names {
  */
 
 struct SessionHandle {
+  /* first, two fields for the linked list of these */
+  struct SessionHandle *next;
+  struct SessionHandle *prev;
+
+  struct connectdata *easy_conn;     /* the "unit's" connection */
+
+  CURLMstate mstate;  /* the handle's state */
+  CURLcode result;   /* previous result */
+
+  struct Curl_message msg; /* A single posted message. */
+
+  /* Array with the plain socket numbers this handle takes care of, in no
+     particular order. Note that all sockets are added to the sockhash, where
+     the state etc are also kept. This array is mostly used to detect when a
+     socket is to be removed from the hash. See singlesocket(). */
+  curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE];
+  int numsocks;
+
   struct Names dns;
   struct Curl_multi *multi;    /* if non-NULL, points to the multi handle
-                                  struct to which this "belongs" */
-  struct Curl_one_easy *multi_pos; /* if non-NULL, points to its position
-                                      in multi controlling structure to assist
-                                      in removal. */
+                                  struct to which this "belongs" when used by
+                                  the multi interface */
+  struct Curl_multi *multi_easy; /* if non-NULL, points to the multi handle
+                                    struct to which this "belongs" when used
+                                    by the easy interface */
   struct Curl_share *share;    /* Share, handles global variable mutexing */
   struct SingleRequest req;    /* Request-specific data */
   struct UserDefined set;      /* values set by the libcurl user */
@@ -1521,4 +1660,4 @@ struct SessionHandle {
 
 #define LIBCURL_NAME "libcurl"
 
-#endif
+#endif /* HEADER_CURL_URLDATA_H */
diff --git a/lib/vc6libcurl.dsp b/lib/vc6libcurl.dsp
deleted file mode 100644 (file)
index ee8f6f1..0000000
+++ /dev/null
@@ -1,862 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
-# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
-\r
-CFG=libcurl - Win32 LIB Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "libcurl.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "libcurl.mak" CFG="libcurl - Win32 LIB Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")\r
-!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-\r
-!IF  "$(CFG)" == "libcurl - Win32 DLL Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "DLL-Debug"\r
-# PROP BASE Intermediate_Dir "DLL-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "DLL-Debug"\r
-# PROP Intermediate_Dir "DLL-Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /GZ /c\r
-MTL=midl.exe\r
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
-# ADD RSC /l 0x409 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept\r
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"DLL-Debug/libcurld.dll" /implib:"DLL-Debug/libcurld_imp.lib" /pdbtype:sept\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "DLL-Release"\r
-# PROP BASE Intermediate_Dir "DLL-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "DLL-Release"\r
-# PROP Intermediate_Dir "DLL-Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /FD /c\r
-MTL=midl.exe\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"\r
-# ADD LINK32 kernel32.lib ws2_32.lib wldap32.lib /nologo /dll /pdb:none /machine:I386 /out:"DLL-Release/libcurl.dll" /implib:"DLL-Release/libcurl_imp.lib"\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "LIB-Debug"\r
-# PROP BASE Intermediate_Dir "LIB-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "LIB-Debug"\r
-# PROP Intermediate_Dir "LIB-Debug"\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
-# ADD RSC /l 0x409 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386\r
-# ADD LIB32 /nologo /out:"LIB-Debug/libcurld.lib" /machine:I386\r
-\r
-!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "LIB-Release"\r
-# PROP BASE Intermediate_Dir "LIB-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "LIB-Release"\r
-# PROP Intermediate_Dir "LIB-Release"\r
-# PROP Target_Dir ""\r
-CPP=cl.exe\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
-RSC=rc.exe\r
-# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386\r
-# ADD LIB32 /nologo /out:"LIB-Release/libcurl.lib" /machine:I386\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "libcurl - Win32 DLL Debug"\r
-# Name "libcurl - Win32 DLL Release"\r
-# Name "libcurl - Win32 LIB Debug"\r
-# Name "libcurl - Win32 LIB Release"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\base64.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\connect.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\content_encoding.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\cookie.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_addrinfo.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_fnmatch.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_gethostname.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_memrchr.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_rand.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_rtmp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_sspi.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_threads.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\dict.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\easy.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\escape.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\file.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\fileinfo.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\formdata.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ftp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ftplistparser.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\getenv.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\getinfo.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\gopher.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\gtls.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hash.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hmac.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostares.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostasyn.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostip4.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostip6.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostip.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostsyn.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostthre.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_chunks.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_digest.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_negotiate.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_ntlm.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\if2ip.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\imap.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\inet_ntop.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\inet_pton.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\krb4.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\krb5.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ldap.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\llist.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\md4.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\md5.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\memdebug.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\mprintf.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\multi.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\netrc.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\nonblock.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\nss.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\openldap.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\parsedate.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\pingpong.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\polarssl.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\pop3.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\progress.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\qssl.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rawstr.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rtsp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\security.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\select.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sendf.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\share.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\slist.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\smtp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\socks.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\socks_gssapi.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\socks_sspi.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\speedcheck.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\splay.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ssh.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sslgen.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ssluse.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strdup.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strequal.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strerror.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strtok.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strtoofft.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\telnet.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tftp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\timeval.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\transfer.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\url.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\version.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\warnless.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\wildcard.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\arpa_telnet.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\config-win32.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\connect.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\content_encoding.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\cookie.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_addrinfo.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_base64.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_fnmatch.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_gethostname.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_hmac.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_ldap.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_md4.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_md5.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_memory.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_memrchr.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_rand.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_rtmp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_sspi.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curl_threads.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curlx.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\dict.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\easyif.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\escape.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\file.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\fileinfo.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\formdata.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ftp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ftplistparser.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\getinfo.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\gopher.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\gtls.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hash.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hostip.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_chunks.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_digest.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_negotiate.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\http_ntlm.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\if2ip.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\imap.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\inet_ntop.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\inet_pton.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\krb4.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\llist.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\memdebug.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\multiif.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\netrc.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\nonblock.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\nssg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\parsedate.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\pingpong.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\polarssl.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\pop3.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\progress.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\qssl.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rawstr.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rtsp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\select.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sendf.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\setup.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\setup_once.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\share.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\slist.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\smtp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sockaddr.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\socks.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\speedcheck.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\splay.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ssh.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sslgen.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ssluse.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strdup.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strequal.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strerror.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strtok.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\strtoofft.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\telnet.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tftp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\timeval.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\transfer.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\urldata.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\url.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\warnless.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\wildcard.h\r
-# End Source File\r
-# End Group\r
-\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\libcurl.rc\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
index 9ba2e33..d39fe0c 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
-
-#include <string.h>
-#include <stdio.h>
+#include "curl_setup.h"
 
 #include <curl/curl.h>
 #include "urldata.h"
 #include <curl/mprintf.h>
 
 #ifdef USE_ARES
-#include <ares_version.h>
+#  if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
+     (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+#    define CARES_STATICLIB
+#  endif
+#  include <ares.h>
 #endif
 
 #ifdef USE_LIBIDN
 char *curl_version(void)
 {
   static char version[200];
-  char *ptr=version;
+  char *ptr = version;
   size_t len;
   size_t left = sizeof(version);
-  strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
+
+  strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
   len = strlen(ptr);
   left -= len;
   ptr += len;
@@ -99,6 +101,11 @@ char *curl_version(void)
     ptr += len;
   }
 #endif
+#ifdef USE_WIN32_IDN
+  len = snprintf(ptr, left, " WinIDN");
+  left -= len;
+  ptr += len;
+#endif
 #if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
 #ifdef _LIBICONV_VERSION
   len = snprintf(ptr, left, " iconv/%d.%d",
@@ -118,18 +125,22 @@ char *curl_version(void)
 #ifdef USE_LIBRTMP
   {
     char suff[2];
-    if (RTMP_LIB_VERSION & 0xff) {
+    if(RTMP_LIB_VERSION & 0xff) {
       suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1;
       suff[1] = '\0';
-    } else {
-      suff[0] = '\0';
     }
-    len = snprintf(ptr, left, " librtmp/%d.%d%s",
-      RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+    else
+      suff[0] = '\0';
+
+    snprintf(ptr, left, " librtmp/%d.%d%s",
+             RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff,
+             suff);
 /*
   If another lib version is added below this one, this code would
   also have to do:
 
+    len = what snprintf() returned
+
     left -= len;
     ptr += len;
 */
@@ -175,8 +186,9 @@ static const char * const protocols[] = {
 #endif
 #ifndef CURL_DISABLE_LDAP
   "ldap",
-#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
-   (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
+#if !defined(CURL_DISABLE_LDAPS) && \
+    ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \
+     (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))
   "ldaps",
 #endif
 #endif
@@ -232,13 +244,16 @@ static curl_version_info_data version_info = {
 #ifdef USE_NTLM
   | CURL_VERSION_NTLM
 #endif
+#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
+  | CURL_VERSION_NTLM_WB
+#endif
 #ifdef USE_WINDOWS_SSPI
   | CURL_VERSION_SSPI
 #endif
 #ifdef HAVE_LIBZ
   | CURL_VERSION_LIBZ
 #endif
-#ifdef HAVE_GSSAPI
+#ifdef USE_HTTP_NEGOTIATE
   | CURL_VERSION_GSSNEGOTIATE
 #endif
 #ifdef DEBUGBUILD
@@ -260,6 +275,9 @@ static curl_version_info_data version_info = {
 #if defined(CURL_DOES_CONVERSIONS)
   | CURL_VERSION_CONV
 #endif
+#if defined(USE_TLS_SRP)
+  | CURL_VERSION_TLSAUTH_SRP
+#endif
   ,
   NULL, /* ssl_version */
   0,    /* ssl_version_num, this is kept at zero */
@@ -301,6 +319,8 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
   version_info.libidn = stringprep_check_version(LIBIDN_REQUIRED_VERSION);
   if(version_info.libidn)
     version_info.features |= CURL_VERSION_IDN;
+#elif defined(USE_WIN32_IDN)
+  version_info.features |= CURL_VERSION_IDN;
 #endif
 
 #if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS)
index bc29d28..7a4b01e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#  include <arpa/inet.h>
+#endif
+
+#endif /* __INTEL_COMPILER && __unix__ */
+
+#define BUILDING_WARNLESS_C 1
 
 #include "warnless.h"
 
@@ -115,6 +128,7 @@ unsigned short curlx_ultous(unsigned long ulnum)
 #  pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
+  DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_USHORT);
   return (unsigned short)(ulnum & (unsigned long) CURL_MASK_USHORT);
 
 #ifdef __INTEL_COMPILER
@@ -133,6 +147,7 @@ unsigned char curlx_ultouc(unsigned long ulnum)
 #  pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
+  DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_UCHAR);
   return (unsigned char)(ulnum & (unsigned long) CURL_MASK_UCHAR);
 
 #ifdef __INTEL_COMPILER
@@ -141,6 +156,25 @@ unsigned char curlx_ultouc(unsigned long ulnum)
 }
 
 /*
+** unsigned long to signed int
+*/
+
+int curlx_ultosi(unsigned long ulnum)
+{
+#ifdef __INTEL_COMPILER
+#  pragma warning(push)
+#  pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+  DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_SINT);
+  return (int)(ulnum & (unsigned long) CURL_MASK_SINT);
+
+#ifdef __INTEL_COMPILER
+#  pragma warning(pop)
+#endif
+}
+
+/*
 ** unsigned size_t to signed int
 */
 
@@ -151,6 +185,7 @@ int curlx_uztosi(size_t uznum)
 #  pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
+  DEBUGASSERT(uznum <= (size_t) CURL_MASK_SINT);
   return (int)(uznum & (size_t) CURL_MASK_SINT);
 
 #ifdef __INTEL_COMPILER
@@ -159,6 +194,48 @@ int curlx_uztosi(size_t uznum)
 }
 
 /*
+** unsigned size_t to unsigned long
+*/
+
+unsigned long curlx_uztoul(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+#if (CURL_SIZEOF_LONG < SIZEOF_SIZE_T)
+  DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG);
+#endif
+  return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
+** unsigned size_t to unsigned int
+*/
+
+unsigned int curlx_uztoui(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+#if (SIZEOF_INT < SIZEOF_SIZE_T)
+  DEBUGASSERT(uznum <= (size_t) CURL_MASK_UINT);
+#endif
+  return (unsigned int)(uznum & (size_t) CURL_MASK_UINT);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
 ** signed long to signed int
 */
 
@@ -170,6 +247,9 @@ int curlx_sltosi(long slnum)
 #endif
 
   DEBUGASSERT(slnum >= 0);
+#if (SIZEOF_INT < CURL_SIZEOF_LONG)
+  DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_SINT);
+#endif
   return (int)(slnum & (long) CURL_MASK_SINT);
 
 #ifdef __INTEL_COMPILER
@@ -189,6 +269,9 @@ unsigned int curlx_sltoui(long slnum)
 #endif
 
   DEBUGASSERT(slnum >= 0);
+#if (SIZEOF_INT < CURL_SIZEOF_LONG)
+  DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT);
+#endif
   return (unsigned int)(slnum & (long) CURL_MASK_UINT);
 
 #ifdef __INTEL_COMPILER
@@ -208,6 +291,7 @@ unsigned short curlx_sltous(long slnum)
 #endif
 
   DEBUGASSERT(slnum >= 0);
+  DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_USHORT);
   return (unsigned short)(slnum & (long) CURL_MASK_USHORT);
 
 #ifdef __INTEL_COMPILER
@@ -226,6 +310,7 @@ ssize_t curlx_uztosz(size_t uznum)
 #  pragma warning(disable:810) /* conversion may lose significant bits */
 #endif
 
+  DEBUGASSERT(uznum <= (size_t) CURL_MASK_SSIZE_T);
   return (ssize_t)(uznum & (size_t) CURL_MASK_SSIZE_T);
 
 #ifdef __INTEL_COMPILER
@@ -251,3 +336,118 @@ size_t curlx_sotouz(curl_off_t sonum)
 #  pragma warning(pop)
 #endif
 }
+
+/*
+** signed ssize_t to signed int
+*/
+
+int curlx_sztosi(ssize_t sznum)
+{
+#ifdef __INTEL_COMPILER
+#  pragma warning(push)
+#  pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+  DEBUGASSERT(sznum >= 0);
+#if (SIZEOF_INT < SIZEOF_SIZE_T)
+  DEBUGASSERT((size_t) sznum <= (size_t) CURL_MASK_SINT);
+#endif
+  return (int)(sznum & (ssize_t) CURL_MASK_SINT);
+
+#ifdef __INTEL_COMPILER
+#  pragma warning(pop)
+#endif
+}
+
+/*
+** signed int to unsigned size_t
+*/
+
+size_t curlx_sitouz(int sinum)
+{
+#ifdef __INTEL_COMPILER
+#  pragma warning(push)
+#  pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+  DEBUGASSERT(sinum >= 0);
+  return (size_t) sinum;
+
+#ifdef __INTEL_COMPILER
+#  pragma warning(pop)
+#endif
+}
+
+#ifdef USE_WINSOCK
+
+/*
+** curl_socket_t to signed int
+*/
+
+int curlx_sktosi(curl_socket_t s)
+{
+  return (int)((ssize_t) s);
+}
+
+/*
+** signed int to curl_socket_t
+*/
+
+curl_socket_t curlx_sitosk(int i)
+{
+  return (curl_socket_t)((ssize_t) i);
+}
+
+#endif /* USE_WINSOCK */
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+int curlx_FD_ISSET(int fd, fd_set *fdset)
+{
+  #pragma warning(push)
+  #pragma warning(disable:1469) /* clobber ignored */
+  return FD_ISSET(fd, fdset);
+  #pragma warning(pop)
+}
+
+void curlx_FD_SET(int fd, fd_set *fdset)
+{
+  #pragma warning(push)
+  #pragma warning(disable:1469) /* clobber ignored */
+  FD_SET(fd, fdset);
+  #pragma warning(pop)
+}
+
+void curlx_FD_ZERO(fd_set *fdset)
+{
+  #pragma warning(push)
+  #pragma warning(disable:593) /* variable was set but never used */
+  FD_ZERO(fdset);
+  #pragma warning(pop)
+}
+
+unsigned short curlx_htons(unsigned short usnum)
+{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+  return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
+  #pragma warning(push)
+  #pragma warning(disable:810) /* conversion may lose significant bits */
+  return htons(usnum);
+  #pragma warning(pop)
+#endif
+}
+
+unsigned short curlx_ntohs(unsigned short usnum)
+{
+#if (__INTEL_COMPILER == 910) && defined(__i386__)
+  return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
+#else
+  #pragma warning(push)
+  #pragma warning(disable:810) /* conversion may lose significant bits */
+  return ntohs(usnum);
+  #pragma warning(pop)
+#endif
+}
+
+#endif /* __INTEL_COMPILER && __unix__ */
index 7b9bd3c..f22f0ba 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  *
  ***************************************************************************/
 
+#ifdef USE_WINSOCK
+#include <curl/curl.h> /* for curl_socket_t */
+#endif
+
 unsigned short curlx_ultous(unsigned long ulnum);
 
 unsigned char curlx_ultouc(unsigned long ulnum);
 
+int curlx_ultosi(unsigned long ulnum);
+
 int curlx_uztosi(size_t uznum);
 
+unsigned long curlx_uztoul(size_t uznum);
+
+unsigned int curlx_uztoui(size_t uznum);
+
 int curlx_sltosi(long slnum);
 
 unsigned int curlx_sltoui(long slnum);
@@ -38,4 +48,43 @@ ssize_t curlx_uztosz(size_t uznum);
 
 size_t curlx_sotouz(curl_off_t sonum);
 
+int curlx_sztosi(ssize_t sznum);
+
+size_t curlx_sitouz(int sinum);
+
+#ifdef USE_WINSOCK
+
+int curlx_sktosi(curl_socket_t s);
+
+curl_socket_t curlx_sitosk(int i);
+
+#endif /* USE_WINSOCK */
+
+#if defined(__INTEL_COMPILER) && defined(__unix__)
+
+int curlx_FD_ISSET(int fd, fd_set *fdset);
+
+void curlx_FD_SET(int fd, fd_set *fdset);
+
+void curlx_FD_ZERO(fd_set *fdset);
+
+unsigned short curlx_htons(unsigned short usnum);
+
+unsigned short curlx_ntohs(unsigned short usnum);
+
+#ifndef BUILDING_WARNLESS_C
+#  undef  FD_ISSET
+#  define FD_ISSET(a,b) curlx_FD_ISSET((a),(b))
+#  undef  FD_SET
+#  define FD_SET(a,b)   curlx_FD_SET((a),(b))
+#  undef  FD_ZERO
+#  define FD_ZERO(a)    curlx_FD_ZERO((a))
+#  undef  htons
+#  define htons(a)      curlx_htons((a))
+#  undef  ntohs
+#  define ntohs(a)      curlx_ntohs((a))
+#endif
+
+#endif /* __INTEL_COMPILER && __unix__ */
+
 #endif /* HEADER_CURL_WARNLESS_H */
index 9fe5d51..7130d5e 100644 (file)
@@ -20,7 +20,8 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
+
 #include "wildcard.h"
 #include "llist.h"
 #include "fileinfo.h"
index 8f732d1..16c80ec 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2013, 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
@@ -33,8 +33,8 @@ typedef enum {
   CURLWC_CLEAN, /* deallocate resources and reset settings */
   CURLWC_SKIP,  /* skip over concrete file */
   CURLWC_ERROR, /* error cases */
-  CURLWC_DONE   /* if is wildcard->state == CURLWC_DONE wildcard loop in
-                   Curl_perform() will end */
+  CURLWC_DONE   /* if is wildcard->state == CURLWC_DONE wildcard loop
+                   will end */
 } curl_wildcard_states;
 
 typedef void (*curl_wildcard_tmp_dtor)(void *ptr);
diff --git a/lib/x509asn1.c b/lib/x509asn1.c
new file mode 100644 (file)
index 0000000..94b89b2
--- /dev/null
@@ -0,0 +1,1151 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#if defined(USE_QSOSSL) || defined(USE_GSKIT)
+
+#include <curl/curl.h>
+#include "urldata.h"
+#include "strequal.h"
+#include "hostcheck.h"
+#include "sslgen.h"
+#include "sendf.h"
+#include "inet_pton.h"
+#include "curl_base64.h"
+#include "x509asn1.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "curl_memory.h"
+/* The last #include file should be: */
+#include "memdebug.h"
+
+
+/* ASN.1 OIDs. */
+static const char       cnOID[] = "2.5.4.3";    /* Common name. */
+static const char       sanOID[] = "2.5.29.17"; /* Subject alternative name. */
+
+static const curl_OID   OIDtable[] = {
+  { "1.2.840.10040.4.1",        "dsa" },
+  { "1.2.840.10040.4.3",        "dsa-with-sha1" },
+  { "1.2.840.10045.2.1",        "ecPublicKey" },
+  { "1.2.840.10045.3.0.1",      "c2pnb163v1" },
+  { "1.2.840.10045.4.1",        "ecdsa-with-SHA1" },
+  { "1.2.840.10046.2.1",        "dhpublicnumber" },
+  { "1.2.840.113549.1.1.1",     "rsaEncryption" },
+  { "1.2.840.113549.1.1.2",     "md2WithRSAEncryption" },
+  { "1.2.840.113549.1.1.4",     "md5WithRSAEncryption" },
+  { "1.2.840.113549.1.1.5",     "sha1WithRSAEncryption" },
+  { "1.2.840.113549.1.1.10",    "RSASSA-PSS" },
+  { "1.2.840.113549.1.1.14",    "sha224WithRSAEncryption" },
+  { "1.2.840.113549.1.1.11",    "sha256WithRSAEncryption" },
+  { "1.2.840.113549.1.1.12",    "sha384WithRSAEncryption" },
+  { "1.2.840.113549.1.1.13",    "sha512WithRSAEncryption" },
+  { "1.2.840.113549.2.2",       "md2" },
+  { "1.2.840.113549.2.5",       "md5" },
+  { "1.3.14.3.2.26",            "sha1" },
+  { cnOID,                      "CN" },
+  { "2.5.4.4",                  "SN" },
+  { "2.5.4.5",                  "serialNumber" },
+  { "2.5.4.6",                  "C" },
+  { "2.5.4.7",                  "L" },
+  { "2.5.4.8",                  "ST" },
+  { "2.5.4.9",                  "streetAddress" },
+  { "2.5.4.10",                 "O" },
+  { "2.5.4.11",                 "OU" },
+  { "2.5.4.12",                 "title" },
+  { "2.5.4.13",                 "description" },
+  { "2.5.4.17",                 "postalCode" },
+  { "2.5.4.41",                 "name" },
+  { "2.5.4.42",                 "givenName" },
+  { "2.5.4.43",                 "initials" },
+  { "2.5.4.44",                 "generationQualifier" },
+  { "2.5.4.45",                 "X500UniqueIdentifier" },
+  { "2.5.4.46",                 "dnQualifier" },
+  { "2.5.4.65",                 "pseudonym" },
+  { "1.2.840.113549.1.9.1",     "emailAddress" },
+  { "2.5.4.72",                 "role" },
+  { sanOID,                     "subjectAltName" },
+  { "2.5.29.18",                "issuerAltName" },
+  { "2.5.29.19",                "basicConstraints" },
+  { "2.16.840.1.101.3.4.2.4",   "sha224" },
+  { "2.16.840.1.101.3.4.2.1",   "sha256" },
+  { "2.16.840.1.101.3.4.2.2",   "sha384" },
+  { "2.16.840.1.101.3.4.2.3",   "sha512" },
+  { (const char *) NULL,        (const char *) NULL }
+};
+
+/*
+ * Lightweight ASN.1 parser.
+ * In particular, it does not check for syntactic/lexical errors.
+ * It is intended to support certificate information gathering for SSL backends
+ * that offer a mean to get certificates as a whole, but do not supply
+ * entry points to get particular certificate sub-fields.
+ * Please note there is no pretention here to rewrite a full SSL library.
+ */
+
+
+const char * Curl_getASN1Element(curl_asn1Element * elem,
+                                 const char * beg, const char * end)
+{
+  unsigned char b;
+  unsigned long len;
+  curl_asn1Element lelem;
+
+  /* Get a single ASN.1 element into `elem', parse ASN.1 string at `beg'
+     ending at `end'.
+     Returns a pointer in source string after the parsed element, or NULL
+     if an error occurs. */
+
+  if(beg >= end || !*beg)
+    return (const char *) NULL;
+
+  /* Process header byte. */
+  b = (unsigned char) *beg++;
+  elem->constructed = (b & 0x20) != 0;
+  elem->class = (b >> 6) & 3;
+  b &= 0x1F;
+  if(b == 0x1F)
+    return (const char *) NULL; /* Long tag values not supported here. */
+  elem->tag = b;
+
+  /* Process length. */
+  if(beg >= end)
+    return (const char *) NULL;
+  b = (unsigned char) *beg++;
+  if(!(b & 0x80))
+    len = b;
+  else if(!(b &= 0x7F)) {
+    /* Unspecified length. Since we have all the data, we can determine the
+       effective length by skipping element until an end element is found. */
+    if(!elem->constructed)
+      return (const char *) NULL;
+    elem->beg = beg;
+    while(beg < end && *beg) {
+      beg = Curl_getASN1Element(&lelem, beg, end);
+      if(!beg)
+        return (const char *) NULL;
+    }
+    if(beg >= end)
+      return (const char *) NULL;
+    elem->end = beg;
+    return beg + 1;
+  }
+  else if(beg + b > end)
+    return (const char *) NULL; /* Does not fit in source. */
+  else {
+    /* Get long length. */
+    len = 0;
+    do {
+      if(len & 0xFF000000L)
+        return (const char *) NULL;  /* Lengths > 32 bits are not supported. */
+      len = (len << 8) | (unsigned char) *beg++;
+    } while(--b);
+  }
+  if((unsigned long) (end - beg) < len)
+    return (const char *) NULL;  /* Element data does not fit in source. */
+  elem->beg = beg;
+  elem->end = beg + len;
+  return elem->end;
+}
+
+static const curl_OID * searchOID(const char * oid)
+{
+  const curl_OID * op;
+
+  /* Search the null terminated OID or OID identifier in local table.
+     Return the table entry pointer or NULL if not found. */
+
+  for(op = OIDtable; op->numoid; op++)
+    if(!strcmp(op->numoid, oid) || curl_strequal(op->textoid, oid))
+      return op;
+
+  return (const curl_OID *) NULL;
+}
+
+static const char * bool2str(const char * beg, const char * end)
+{
+  /* Convert an ASN.1 Boolean value into its string representation.
+     Return the dynamically allocated string, or NULL if source is not an
+     ASN.1 Boolean value. */
+
+  if(end - beg != 1)
+    return (const char *) NULL;
+  return strdup(*beg? "TRUE": "FALSE");
+}
+
+static const char * octet2str(const char * beg, const char * end)
+{
+  size_t n = end - beg;
+  char * buf;
+
+  /* Convert an ASN.1 octet string to a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  buf = malloc(3 * n + 1);
+  if(buf)
+    for(n = 0; beg < end; n += 3)
+      snprintf(buf + n, 4, "%02x:", *(const unsigned char *) beg++);
+  return buf;
+}
+
+static const char * bit2str(const char * beg, const char * end)
+
+{
+  /* Convert an ASN.1 bit string to a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  if(++beg > end)
+    return (const char *) NULL;
+  return octet2str(beg, end);
+}
+
+static const char * int2str(const char * beg, const char * end)
+{
+  long val = 0;
+  size_t n = end - beg;
+
+  /* Convert an ASN.1 integer value into its string representation.
+     Return the dynamically allocated string, or NULL if source is not an
+     ASN.1 integer value. */
+
+  if(!n)
+    return (const char *) NULL;
+
+  if(n > 4)
+    return octet2str(beg, end);
+
+  /* Represent integers <= 32-bit as a single value. */
+  if(*beg & 0x80)
+    val = ~val;
+
+  do
+    val = (val << 8) | *(const unsigned char *) beg++;
+  while(beg < end);
+  return curl_maprintf("%s%lx", (val < 0 || val >= 10)? "0x": "", val);
+}
+
+static ssize_t
+utf8asn1str(char * * to, int type, const char * from, const char * end)
+{
+  size_t inlength = end - from;
+  int size = 1;
+  size_t outlength;
+  int chsize;
+  unsigned int wc;
+  char * buf;
+
+  /* Perform a lazy conversion from an ASN.1 typed string to UTF8. Allocate the
+     destination buffer dynamically. The allocation size will normally be too
+     large: this is to avoid buffer overflows.
+     Terminate the string with a nul byte and return the converted
+     string length. */
+
+  *to = (char *) NULL;
+  switch (type) {
+  case CURL_ASN1_BMP_STRING:
+    size = 2;
+    break;
+  case CURL_ASN1_UNIVERSAL_STRING:
+    size = 4;
+    break;
+  case CURL_ASN1_NUMERIC_STRING:
+  case CURL_ASN1_PRINTABLE_STRING:
+  case CURL_ASN1_TELETEX_STRING:
+  case CURL_ASN1_IA5_STRING:
+  case CURL_ASN1_VISIBLE_STRING:
+  case CURL_ASN1_UTF8_STRING:
+    break;
+  default:
+    return -1;  /* Conversion not supported. */
+  }
+
+  if(inlength % size)
+    return -1;  /* Length inconsistent with character size. */
+  buf = malloc(4 * (inlength / size) + 1);
+  if(!buf)
+    return -1;  /* Not enough memory. */
+
+  if(type == CURL_ASN1_UTF8_STRING) {
+    /* Just copy. */
+    outlength = inlength;
+    if(outlength)
+      memcpy(buf, from, outlength);
+  }
+  else {
+    for(outlength = 0; from < end;) {
+      wc = 0;
+      switch (size) {
+      case 4:
+        wc = (wc << 8) | *(const unsigned char *) from++;
+        wc = (wc << 8) | *(const unsigned char *) from++;
+      case 2:
+        wc = (wc << 8) | *(const unsigned char *) from++;
+      default: /* case 1: */
+        wc = (wc << 8) | *(const unsigned char *) from++;
+      }
+      chsize = 1;
+      if(wc >= 0x00000080) {
+        if(wc >= 0x00000800) {
+          if(wc >= 0x00010000) {
+            if(wc >= 0x00200000) {
+              free(buf);
+              return -1;        /* Invalid char. size for target encoding. */
+            }
+            buf[outlength + 3] = (char) (0x80 | (wc & 0x3F));
+            wc = (wc >> 6) | 0x00010000;
+            chsize++;
+          }
+          buf[outlength + 2] = (char) (0x80 | (wc & 0x3F));
+          wc = (wc >> 6) | 0x00000800;
+          chsize++;
+        }
+        buf[outlength + 1] = (char) (0x80 | (wc & 0x3F));
+        wc = (wc >> 6) | 0x000000C0;
+        chsize++;
+      }
+      buf[outlength] = (char) wc;
+      outlength += chsize;
+    }
+  }
+  buf[outlength] = '\0';
+  *to = buf;
+  return outlength;
+}
+
+static const char * string2str(int type, const char * beg, const char * end)
+{
+  char * buf;
+
+  /* Convert an ASN.1 String into its UTF-8 string representation.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  if(utf8asn1str(&buf, type, beg, end) < 0)
+    return (const char *) NULL;
+  return buf;
+}
+
+static int encodeUint(char * buf, int n, unsigned int x)
+{
+  int i = 0;
+  unsigned int y = x / 10;
+
+  /* Decimal ASCII encode unsigned integer `x' in the `n'-byte buffer at `buf'.
+     Return the total number of encoded digits, even if larger than `n'. */
+
+  if(y) {
+    i += encodeUint(buf, n, y);
+    x -= y * 10;
+  }
+  if(i < n)
+    buf[i] = (char) ('0' + x);
+  i++;
+  if(i < n)
+    buf[i] = '\0';      /* Store a terminator if possible. */
+  return i;
+}
+
+static int encodeOID(char * buf, int n, const char * beg, const char * end)
+{
+  int i = 0;
+  unsigned int x;
+  unsigned int y;
+
+  /* Convert an ASN.1 OID into its dotted string representation.
+     Store the result in th `n'-byte buffer at `buf'.
+     Return the converted string length, or -1 if an error occurs. */
+
+  /* Process the first two numbers. */
+  y = *(const unsigned char *) beg++;
+  x = y / 40;
+  y -= x * 40;
+  i += encodeUint(buf + i, n - i, x);
+  if(i < n)
+    buf[i] = '.';
+  i++;
+  i += encodeUint(buf + i, n - i, y);
+
+  /* Process the trailing numbers. */
+  while(beg < end) {
+    if(i < n)
+      buf[i] = '.';
+    i++;
+    x = 0;
+    do {
+      if(x & 0xFF000000)
+        return -1;
+      y = *(const unsigned char *) beg++;
+      x = (x << 7) | (y & 0x7F);
+    } while(y & 0x80);
+    i += encodeUint(buf + i, n - i, x);
+  }
+  if(i < n)
+    buf[i] = '\0';
+  return i;
+}
+
+static const char * OID2str(const char * beg, const char * end, bool symbolic)
+{
+  char * buf = (char *) NULL;
+  const curl_OID * op;
+  int n;
+
+  /* Convert an ASN.1 OID into its dotted or symbolic string representation.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  if(beg < end) {
+    n = encodeOID((char *) NULL, -1, beg, end);
+    if(n >= 0) {
+      buf = malloc(n + 1);
+      if(buf) {
+        encodeOID(buf, n, beg, end);
+        buf[n] = '\0';
+
+        if(symbolic) {
+          op = searchOID(buf);
+          if(op) {
+            free(buf);
+            buf = strdup(op->textoid);
+          }
+        }
+      }
+    }
+  }
+  return buf;
+}
+
+static const char * GTime2str(const char * beg, const char * end)
+{
+  const char * tzp;
+  const char * fracp;
+  char sec1, sec2;
+  size_t fracl;
+  size_t tzl;
+  const char * sep = "";
+
+  /* Convert an ASN.1 Generalized time to a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++)
+    ;
+
+  /* Get seconds digits. */
+  sec1 = '0';
+  switch (fracp - beg - 12) {
+  case 0:
+    sec2 = '0';
+    break;
+  case 2:
+    sec1 = fracp[-2];
+  case 1:
+    sec2 = fracp[-1];
+    break;
+  default:
+    return (const char *) NULL;
+  }
+
+  /* Scan for timezone, measure fractional seconds. */
+  tzp = fracp;
+  fracl = 0;
+  if(fracp < end && (*fracp == '.' || *fracp == ',')) {
+    fracp++;
+    do
+      tzp++;
+    while(tzp < end && *tzp >= '0' && *tzp <= '9');
+    /* Strip leading zeroes in fractional seconds. */
+    for(fracl = tzp - fracp - 1; fracl && fracp[fracl - 1] == '0'; fracl--)
+      ;
+  }
+
+  /* Process timezone. */
+  if(tzp >= end)
+    ;           /* Nothing to do. */
+  else if(*tzp == 'Z') {
+    tzp = " GMT";
+    end = tzp + 4;
+  }
+  else {
+    sep = " ";
+    tzp++;
+  }
+
+  tzl = end - tzp;
+  return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s",
+                       beg, beg + 4, beg + 6,
+                       beg + 8, beg + 10, sec1, sec2,
+                       fracl? ".": "", fracl, fracp,
+                       sep, tzl, tzp);
+}
+
+static const char * UTime2str(const char * beg, const char * end)
+{
+  const char * tzp;
+  size_t tzl;
+  const char * sec;
+
+  /* Convert an ASN.1 UTC time to a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++)
+    ;
+  /* Get the seconds. */
+  sec = beg + 10;
+  switch (tzp - sec) {
+  case 0:
+    sec = "00";
+  case 2:
+    break;
+  default:
+    return (const char *) NULL;
+  }
+
+  /* Process timezone. */
+  if(tzp >= end)
+    return (const char *) NULL;
+  if(*tzp == 'Z') {
+    tzp = "GMT";
+    end = tzp + 3;
+  }
+  else
+    tzp++;
+
+  tzl = end - tzp;
+  return curl_maprintf("%u%.2s-%.2s-%.2s %.2s:%.2s:%.2s %.*s",
+                       20 - (*beg >= '5'), beg, beg + 2, beg + 4,
+                       beg + 6, beg + 8, sec,
+                       tzl, tzp);
+}
+
+const char * Curl_ASN1tostr(curl_asn1Element * elem, int type)
+{
+  static const char zero = '\0';
+
+  /* Convert an ASN.1 element to a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  if(elem->constructed)
+    return (const char *) NULL; /* No conversion of structured elements. */
+
+  if(!type)
+    type = elem->tag;   /* Type not forced: use element tag as type. */
+
+  switch (type) {
+  case CURL_ASN1_BOOLEAN:
+    return bool2str(elem->beg, elem->end);
+  case CURL_ASN1_INTEGER:
+  case CURL_ASN1_ENUMERATED:
+    return int2str(elem->beg, elem->end);
+  case CURL_ASN1_BIT_STRING:
+    return bit2str(elem->beg, elem->end);
+  case CURL_ASN1_OCTET_STRING:
+    return octet2str(elem->beg, elem->end);
+  case CURL_ASN1_NULL:
+    return strdup(&zero);
+  case CURL_ASN1_OBJECT_IDENTIFIER:
+    return OID2str(elem->beg, elem->end, TRUE);
+  case CURL_ASN1_UTC_TIME:
+    return UTime2str(elem->beg, elem->end);
+  case CURL_ASN1_GENERALIZED_TIME:
+    return GTime2str(elem->beg, elem->end);
+  case CURL_ASN1_UTF8_STRING:
+  case CURL_ASN1_NUMERIC_STRING:
+  case CURL_ASN1_PRINTABLE_STRING:
+  case CURL_ASN1_TELETEX_STRING:
+  case CURL_ASN1_IA5_STRING:
+  case CURL_ASN1_VISIBLE_STRING:
+  case CURL_ASN1_UNIVERSAL_STRING:
+  case CURL_ASN1_BMP_STRING:
+    return string2str(type, elem->beg, elem->end);
+  }
+
+  return (const char *) NULL;   /* Unsupported. */
+}
+
+static ssize_t encodeDN(char * buf, size_t n, curl_asn1Element * dn)
+{
+  curl_asn1Element rdn;
+  curl_asn1Element atv;
+  curl_asn1Element oid;
+  curl_asn1Element value;
+  size_t l = 0;
+  const char * p1;
+  const char * p2;
+  const char * p3;
+  const char * str;
+
+  /* ASCII encode distinguished name at `dn' into the `n'-byte buffer at `buf'.
+     Return the total string length, even if larger than `n'. */
+
+  for(p1 = dn->beg; p1 < dn->end;) {
+    p1 = Curl_getASN1Element(&rdn, p1, dn->end);
+    for(p2 = rdn.beg; p2 < rdn.end;) {
+      p2 = Curl_getASN1Element(&atv, p2, rdn.end);
+      p3 = Curl_getASN1Element(&oid, atv.beg, atv.end);
+      Curl_getASN1Element(&value, p3, atv.end);
+      str = Curl_ASN1tostr(&oid, 0);
+      if(!str)
+        return -1;
+
+      /* Encode delimiter.
+         If attribute has a short uppercase name, delimiter is ", ". */
+      if(l) {
+        for(p3 = str; isupper(*p3); p3++)
+          ;
+        for(p3 = (*p3 || p3 - str > 2)? "/": ", "; *p3; p3++) {
+          if(l < n)
+            buf[l] = *p3;
+          l++;
+        }
+      }
+
+      /* Encode attribute name. */
+      for(p3 = str; *p3; p3++) {
+        if(l < n)
+          buf[l] = *p3;
+        l++;
+      }
+      free((char *) str);
+
+      /* Generate equal sign. */
+      if(l < n)
+        buf[l] = '=';
+      l++;
+
+      /* Generate value. */
+      str = Curl_ASN1tostr(&value, 0);
+      if(!str)
+        return -1;
+      for(p3 = str; *p3; p3++) {
+        if(l < n)
+          buf[l] = *p3;
+        l++;
+      }
+      free((char *) str);
+    }
+  }
+
+  return l;
+}
+
+const char * Curl_DNtostr(curl_asn1Element * dn)
+{
+  char * buf = (char *) NULL;
+  ssize_t n = encodeDN(buf, 0, dn);
+
+  /* Convert an ASN.1 distinguished name into a printable string.
+     Return the dynamically allocated string, or NULL if an error occurs. */
+
+  if(n >= 0) {
+    buf = malloc(n + 1);
+    if(buf) {
+      encodeDN(buf, n + 1, dn);
+      buf[n] = '\0';
+    }
+  }
+  return (const char *) buf;
+}
+
+static const char * checkOID(const char * beg, const char * end,
+                             const char * oid)
+{
+  curl_asn1Element e;
+  const char * ccp;
+  const char * p;
+  bool matched;
+
+  /* Check if first ASN.1 element at `beg' is the given OID.
+     Return a pointer in the source after the OID if found, else NULL. */
+
+  ccp = Curl_getASN1Element(&e, beg, end);
+  if(!ccp || e.tag != CURL_ASN1_OBJECT_IDENTIFIER)
+    return (const char *) NULL;
+
+  p = OID2str(e.beg, e.end, FALSE);
+  if(!p)
+    return (const char *) NULL;
+
+  matched = !strcmp(p, oid);
+  free((char *) p);
+  return matched? ccp: (const char *) NULL;
+}
+
+
+/*
+ * X509 parser.
+ */
+
+void Curl_parseX509(curl_X509certificate * cert,
+                    const char * beg, const char * end)
+{
+  curl_asn1Element elem;
+  curl_asn1Element tbsCertificate;
+  const char * ccp;
+  static const char defaultVersion = 0;  /* v1. */
+
+  /* ASN.1 parse an X509 certificate into structure subfields.
+     Syntax is assumed to have already been checked by the SSL backend.
+     See RFC 5280. */
+
+  cert->certificate.beg = beg;
+  cert->certificate.end = end;
+
+  /* Get the sequence content. */
+  Curl_getASN1Element(&elem, beg, end);
+  beg = elem.beg;
+  end = elem.end;
+
+  /* Get tbsCertificate. */
+  beg = Curl_getASN1Element(&tbsCertificate, beg, end);
+  /* Skip the signatureAlgorithm. */
+  beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end);
+  /* Get the signatureValue. */
+  Curl_getASN1Element(&cert->signature, beg, end);
+
+  /* Parse TBSCertificate. */
+  beg = tbsCertificate.beg;
+  end = tbsCertificate.end;
+  /* Get optional version, get serialNumber. */
+  cert->version.beg = &defaultVersion;
+  cert->version.end = &defaultVersion + sizeof defaultVersion;;
+  beg = Curl_getASN1Element(&elem, beg, end);
+  if(elem.tag == 0) {
+    Curl_getASN1Element(&cert->version, elem.beg, elem.end);
+    beg = Curl_getASN1Element(&elem, beg, end);
+  }
+  cert->serialNumber = elem;
+  /* Get signature algorithm. */
+  beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end);
+  /* Get issuer. */
+  beg = Curl_getASN1Element(&cert->issuer, beg, end);
+  /* Get notBefore and notAfter. */
+  beg = Curl_getASN1Element(&elem, beg, end);
+  ccp = Curl_getASN1Element(&cert->notBefore, elem.beg, elem.end);
+  Curl_getASN1Element(&cert->notAfter, ccp, elem.end);
+  /* Get subject. */
+  beg = Curl_getASN1Element(&cert->subject, beg, end);
+  /* Get subjectPublicKeyAlgorithm and subjectPublicKey. */
+  beg = Curl_getASN1Element(&elem, beg, end);
+  ccp = Curl_getASN1Element(&cert->subjectPublicKeyAlgorithm,
+                            elem.beg, elem.end);
+  Curl_getASN1Element(&cert->subjectPublicKey, ccp, elem.end);
+  /* Get optional issuerUiqueID, subjectUniqueID and extensions. */
+  cert->issuerUniqueID.tag = cert->subjectUniqueID.tag = 0;
+  cert->extensions.tag = elem.tag = 0;
+  cert->issuerUniqueID.beg = cert->issuerUniqueID.end = "";
+  cert->subjectUniqueID.beg = cert->subjectUniqueID.end = "";
+  cert->extensions.beg = cert->extensions.end = "";
+  if(beg < end)
+    beg = Curl_getASN1Element(&elem, beg, end);
+  if(elem.tag == 1) {
+    cert->issuerUniqueID = elem;
+    if(beg < end)
+      beg = Curl_getASN1Element(&elem, beg, end);
+  }
+  if(elem.tag == 2) {
+    cert->subjectUniqueID = elem;
+    if(beg < end)
+      beg = Curl_getASN1Element(&elem, beg, end);
+  }
+  if(elem.tag == 3)
+    Curl_getASN1Element(&cert->extensions, elem.beg, elem.end);
+}
+
+static size_t copySubstring(char * to, const char * from)
+{
+  size_t i;
+
+  /* Copy at most 64-characters, terminate with a newline and returns the
+     effective number of stored characters. */
+
+  for(i = 0; i < 64; i++) {
+    to[i] = *from;
+    if(!*from++)
+      break;
+  }
+
+  to[i++] = '\n';
+  return i;
+}
+
+static const char * dumpAlgo(curl_asn1Element * param,
+                             const char * beg, const char * end)
+{
+  curl_asn1Element oid;
+
+  /* Get algorithm parameters and return algorithm name. */
+
+  beg = Curl_getASN1Element(&oid, beg, end);
+  param->tag = 0;
+  param->beg = param->end = end;
+  if(beg < end)
+    Curl_getASN1Element(param, beg, end);
+  return OID2str(oid.beg, oid.end, TRUE);
+}
+
+static void do_pubkey_field(struct SessionHandle *data, int certnum,
+                            const char * label, curl_asn1Element * elem)
+{
+  const char * output;
+
+  /* Generate a certificate information record for the public key. */
+
+  output = Curl_ASN1tostr(elem, 0);
+  if(output) {
+    Curl_ssl_push_certinfo(data, certnum, label, output);
+    infof(data, "   %s: %s\n", label, output);
+    free((char *) output);
+  }
+}
+
+static void do_pubkey(struct SessionHandle * data, int certnum,
+                      const char * algo, curl_asn1Element * param,
+                      curl_asn1Element * pubkey)
+{
+  curl_asn1Element elem;
+  curl_asn1Element pk;
+  const char * p;
+  const char * q;
+  unsigned long len;
+  unsigned int i;
+
+  /* Generate all information records for the public key. */
+
+  /* Get the public key (single element). */
+  Curl_getASN1Element(&pk, pubkey->beg + 1, pubkey->end);
+
+  if(curl_strequal(algo, "rsaEncryption")) {
+    p = Curl_getASN1Element(&elem, pk.beg, pk.end);
+    /* Compute key length. */
+    for(q = elem.beg; !*q && q < elem.end; q++)
+      ;
+    len = (elem.end - q) * 8;
+    if(len)
+      for(i = *(unsigned char *) q; !(i & 0x80); i <<= 1)
+        len--;
+    if(len > 32)
+      elem.beg = q;     /* Strip leading zero bytes. */
+    infof(data, "   RSA Public Key (%lu bits)\n", len);
+    q = curl_maprintf("%lu", len);
+    if(q) {
+      Curl_ssl_push_certinfo(data, certnum, "RSA Public Key", q);
+      free((char *) q);
+    }
+    /* Generate coefficients. */
+    do_pubkey_field(data, certnum, "rsa(n)", &elem);
+    Curl_getASN1Element(&elem, p, pk.end);
+    do_pubkey_field(data, certnum, "rsa(e)", &elem);
+  }
+  else if(curl_strequal(algo, "dsa")) {
+    p = Curl_getASN1Element(&elem, param->beg, param->end);
+    do_pubkey_field(data, certnum, "dsa(p)", &elem);
+    p = Curl_getASN1Element(&elem, p, param->end);
+    do_pubkey_field(data, certnum, "dsa(q)", &elem);
+    Curl_getASN1Element(&elem, p, param->end);
+    do_pubkey_field(data, certnum, "dsa(g)", &elem);
+    do_pubkey_field(data, certnum, "dsa(pub_key)", &pk);
+  }
+  else if(curl_strequal(algo, "dhpublicnumber")) {
+    p = Curl_getASN1Element(&elem, param->beg, param->end);
+    do_pubkey_field(data, certnum, "dh(p)", &elem);
+    Curl_getASN1Element(&elem, param->beg, param->end);
+    do_pubkey_field(data, certnum, "dh(g)", &elem);
+    do_pubkey_field(data, certnum, "dh(pub_key)", &pk);
+  }
+#if 0 /* Patent-encumbered. */
+  else if(curl_strequal(algo, "ecPublicKey")) {
+    /* Left TODO. */
+  }
+#endif
+}
+
+CURLcode Curl_extract_certinfo(struct connectdata * conn,
+                               int certnum,
+                               const char * beg,
+                               const char * end)
+{
+  curl_X509certificate cert;
+  struct SessionHandle * data = conn->data;
+  curl_asn1Element param;
+  const char * ccp;
+  char * cp1;
+  size_t cl1;
+  char * cp2;
+  CURLcode cc;
+  unsigned long version;
+  size_t i;
+  size_t j;
+
+  /* Prepare the certificate information for curl_easy_getinfo(). */
+
+  /* Extract the certificate ASN.1 elements. */
+  Curl_parseX509(&cert, beg, end);
+
+  /* Subject. */
+  ccp = Curl_DNtostr(&cert.subject);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Subject", ccp);
+  infof(data, "%2d Subject: %s\n", certnum, ccp);
+  free((char *) ccp);
+
+  /* Issuer. */
+  ccp = Curl_DNtostr(&cert.issuer);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Issuer", ccp);
+  infof(data, "   Issuer: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Version (always fits in less than 32 bits). */
+  version = 0;
+  for(ccp = cert.version.beg; ccp < cert.version.end; ccp++)
+    version = (version << 8) | *(const unsigned char *) ccp;
+  ccp = curl_maprintf("%lx", version);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Version", ccp);
+  free((char *) ccp);
+  infof(data, "   Version: %lu (0x%lx)\n", version + 1, version);
+
+  /* Serial number. */
+  ccp = Curl_ASN1tostr(&cert.serialNumber, 0);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Serial Number", ccp);
+  infof(data, "   Serial Number: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Signature algorithm .*/
+  ccp = dumpAlgo(&param, cert.signatureAlgorithm.beg,
+                 cert.signatureAlgorithm.end);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Signature Algorithm", ccp);
+  infof(data, "   Signature Algorithm: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Start Date. */
+  ccp = Curl_ASN1tostr(&cert.notBefore, 0);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Start Date", ccp);
+  infof(data, "   Start Date: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Expire Date. */
+  ccp = Curl_ASN1tostr(&cert.notAfter, 0);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Expire Date", ccp);
+  infof(data, "   Expire Date: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Public Key Algorithm. */
+  ccp = dumpAlgo(&param, cert.subjectPublicKeyAlgorithm.beg,
+                 cert.subjectPublicKeyAlgorithm.end);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Public Key Algorithm", ccp);
+  infof(data, "   Public Key Algorithm: %s\n", ccp);
+  do_pubkey(data, certnum, ccp, &param, &cert.subjectPublicKey);
+  free((char *) ccp);
+
+/* TODO: extensions. */
+
+  /* Signature. */
+  ccp = Curl_ASN1tostr(&cert.signature, 0);
+  if(!ccp)
+    return CURLE_OUT_OF_MEMORY;
+  Curl_ssl_push_certinfo(data, certnum, "Signature", ccp);
+  infof(data, "   Signature: %s\n", ccp);
+  free((char *) ccp);
+
+  /* Generate PEM certificate. */
+  cc = Curl_base64_encode(data, cert.certificate.beg,
+                          cert.certificate.end - cert.certificate.beg,
+                          &cp1, &cl1);
+  if(cc != CURLE_OK)
+    return cc;
+  /* Compute the number of charaters in final certificate string. Format is:
+     -----BEGIN CERTIFICATE-----\n
+     <max 64 base64 characters>\n
+     .
+     .
+     .
+     -----END CERTIFICATE-----\n
+   */
+  i = 28 + cl1 + (cl1 + 64 - 1) / 64 + 26;
+  cp2 = malloc(i + 1);
+  if(!cp2) {
+    free(cp1);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  /* Build the certificate string. */
+  i = copySubstring(cp2, "-----BEGIN CERTIFICATE-----");
+  for(j = 0; j < cl1; j += 64)
+    i += copySubstring(cp2 + i, cp1 + j);
+  i += copySubstring(cp2 + i, "-----END CERTIFICATE-----");
+  cp2[i] = '\0';
+  free(cp1);
+  Curl_ssl_push_certinfo(data, certnum, "Cert", cp2);
+  infof(data, "%s\n", cp2);
+  free(cp2);
+  return CURLE_OK;
+}
+
+
+CURLcode Curl_verifyhost(struct connectdata * conn,
+                         const char * beg, const char * end)
+{
+  struct SessionHandle * data = conn->data;
+  curl_X509certificate cert;
+  curl_asn1Element dn;
+  curl_asn1Element elem;
+  curl_asn1Element ext;
+  curl_asn1Element name;
+  int i;
+  const char * p;
+  const char * q;
+  char * dnsname;
+  int matched = -1;
+  size_t addrlen = (size_t) -1;
+  ssize_t len;
+#ifdef ENABLE_IPV6
+  struct in6_addr addr;
+#else
+  struct in_addr addr;
+#endif
+
+  /* Verify that connection server matches info in X509 certificate at
+     `beg'..`end'. */
+
+  if(!data->set.ssl.verifyhost)
+    return CURLE_OK;
+
+  if(!beg)
+    return CURLE_PEER_FAILED_VERIFICATION;
+  Curl_parseX509(&cert, beg, end);
+
+  /* Get the server IP address. */
+#ifdef ENABLE_IPV6
+  if(conn->bits.ipv6_ip && Curl_inet_pton(AF_INET6, conn->host.name, &addr))
+    addrlen = sizeof(struct in6_addr);
+  else
+#endif
+  if(Curl_inet_pton(AF_INET, conn->host.name, &addr))
+    addrlen = sizeof(struct in_addr);
+
+  /* Process extensions. */
+  for(p = cert.extensions.beg; p < cert.extensions.end && matched != 1;) {
+    p = Curl_getASN1Element(&ext, p, cert.extensions.end);
+    /* Check if extension is a subjectAlternativeName. */
+    ext.beg = checkOID(ext.beg, ext.end, sanOID);
+    if(ext.beg) {
+      ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end);
+      /* Skip critical if present. */
+      if(elem.tag == CURL_ASN1_BOOLEAN)
+        ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end);
+      /* Parse the octet string contents: is a single sequence. */
+      Curl_getASN1Element(&elem, elem.beg, elem.end);
+      /* Check all GeneralNames. */
+      for(q = elem.beg; matched != 1 && q < elem.end;) {
+        q = Curl_getASN1Element(&name, q, elem.end);
+        switch (name.tag) {
+        case 2: /* DNS name. */
+          i = 0;
+          len = utf8asn1str(&dnsname, CURL_ASN1_IA5_STRING,
+                            name.beg, name.end);
+          if(len > 0)
+            if(strlen(dnsname) == (size_t) len)
+              i = Curl_cert_hostcheck((const char *) dnsname, conn->host.name);
+          if(dnsname)
+            free(dnsname);
+          if(!i)
+            return CURLE_PEER_FAILED_VERIFICATION;
+          matched = i;
+          break;
+
+        case 7: /* IP address. */
+          matched = (size_t) (name.end - q) == addrlen &&
+                    !memcmp(&addr, q, addrlen);
+          break;
+        }
+      }
+    }
+  }
+
+  switch (matched) {
+  case 1:
+    /* an alternative name matched the server hostname */
+    infof(data, "\t subjectAltName: %s matched\n", conn->host.dispname);
+    return CURLE_OK;
+  case 0:
+    /* an alternative name field existed, but didn't match and then
+       we MUST fail */
+    infof(data, "\t subjectAltName does not match %s\n", conn->host.dispname);
+    return CURLE_PEER_FAILED_VERIFICATION;
+  }
+
+  /* Process subject. */
+  name.beg = name.end = "";
+  q = cert.subject.beg;
+  /* we have to look to the last occurrence of a commonName in the
+     distinguished one to get the most significant one. */
+  while(q < cert.subject.end) {
+    q = Curl_getASN1Element(&dn, q, cert.subject.end);
+    for(p = dn.beg; p < dn.end;) {
+      p = Curl_getASN1Element(&elem, p, dn.end);
+      /* We have a DN's AttributeTypeAndValue: check it in case it's a CN. */
+      elem.beg = checkOID(elem.beg, elem.end, cnOID);
+      if(elem.beg)
+        name = elem;    /* Latch CN. */
+    }
+  }
+
+  /* Check the CN if found. */
+  if(!Curl_getASN1Element(&elem, name.beg, name.end))
+    failf(data, "SSL: unable to obtain common name from peer certificate");
+  else {
+    len = utf8asn1str(&dnsname, elem.tag, elem.beg, elem.end);
+    if(len < 0) {
+      free(dnsname);
+      return CURLE_OUT_OF_MEMORY;
+    }
+    if(strlen(dnsname) != (size_t) len)         /* Nul byte in string ? */
+      failf(data, "SSL: illegal cert name field");
+    else if(Curl_cert_hostcheck((const char *) dnsname, conn->host.name)) {
+      infof(data, "\t common name: %s (matched)\n", dnsname);
+      free(dnsname);
+      return CURLE_OK;
+    }
+    else
+      failf(data, "SSL: certificate subject name '%s' does not match "
+            "target host name '%s'", dnsname, conn->host.dispname);
+    free(dnsname);
+  }
+
+  return CURLE_PEER_FAILED_VERIFICATION;
+}
+
+#endif /* USE_QSOSSL or USE_GSKIT */
diff --git a/lib/x509asn1.h b/lib/x509asn1.h
new file mode 100644 (file)
index 0000000..2276b5b
--- /dev/null
@@ -0,0 +1,129 @@
+#ifndef HEADER_CURL_X509ASN1_H
+#define HEADER_CURL_X509ASN1_H
+
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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_setup.h"
+
+#if defined(USE_QSOSSL) || defined(USE_GSKIT)
+
+#include "urldata.h"
+
+/*
+ * Constants.
+ */
+
+/* ASN.1 classes. */
+#define CURL_ASN1_UNIVERSAL             0
+#define CURL_ASN1_APPLICATION           1
+#define CURL_ASN1_CONTEXT_SPECIFIC      2
+#define CURL_ASN1_PRIVATE               3
+
+/* ASN.1 types. */
+#define CURL_ASN1_BOOLEAN               1
+#define CURL_ASN1_INTEGER               2
+#define CURL_ASN1_BIT_STRING            3
+#define CURL_ASN1_OCTET_STRING          4
+#define CURL_ASN1_NULL                  5
+#define CURL_ASN1_OBJECT_IDENTIFIER     6
+#define CURL_ASN1_OBJECT_DESCRIPTOR     7
+#define CURL_ASN1_INSTANCE_OF           8
+#define CURL_ASN1_REAL                  9
+#define CURL_ASN1_ENUMERATED            10
+#define CURL_ASN1_EMBEDDED              11
+#define CURL_ASN1_UTF8_STRING           12
+#define CURL_ASN1_RELATIVE_OID          13
+#define CURL_ASN1_SEQUENCE              16
+#define CURL_ASN1_SET                   17
+#define CURL_ASN1_NUMERIC_STRING        18
+#define CURL_ASN1_PRINTABLE_STRING      19
+#define CURL_ASN1_TELETEX_STRING        20
+#define CURL_ASN1_VIDEOTEX_STRING       21
+#define CURL_ASN1_IA5_STRING            22
+#define CURL_ASN1_UTC_TIME              23
+#define CURL_ASN1_GENERALIZED_TIME      24
+#define CURL_ASN1_GRAPHIC_STRING        25
+#define CURL_ASN1_VISIBLE_STRING        26
+#define CURL_ASN1_GENERAL_STRING        27
+#define CURL_ASN1_UNIVERSAL_STRING      28
+#define CURL_ASN1_CHARACTER_STRING      29
+#define CURL_ASN1_BMP_STRING            30
+
+
+/*
+ * Types.
+ */
+
+/* ASN.1 parsed element. */
+typedef struct {
+  const char *  beg;            /* Pointer to element data. */
+  const char *  end;            /* Pointer to 1st byte after element data. */
+  unsigned char class;          /* ASN.1 element class. */
+  unsigned char tag;            /* ASN.1 element tag. */
+  bool          constructed;    /* Element is constructed. */
+}  curl_asn1Element;
+
+
+/* ASN.1 OID table entry. */
+typedef struct {
+  const char *  numoid;         /* Dotted-numeric OID. */
+  const char *  textoid;        /* OID name. */
+}  curl_OID;
+
+
+/* X509 certificate: RFC 5280. */
+typedef struct {
+  curl_asn1Element      certificate;
+  curl_asn1Element      version;
+  curl_asn1Element      serialNumber;
+  curl_asn1Element      signatureAlgorithm;
+  curl_asn1Element      signature;
+  curl_asn1Element      issuer;
+  curl_asn1Element      notBefore;
+  curl_asn1Element      notAfter;
+  curl_asn1Element      subject;
+  curl_asn1Element      subjectPublicKeyAlgorithm;
+  curl_asn1Element      subjectPublicKey;
+  curl_asn1Element      issuerUniqueID;
+  curl_asn1Element      subjectUniqueID;
+  curl_asn1Element      extensions;
+}  curl_X509certificate;
+
+
+/*
+ * Prototypes.
+ */
+
+const char * Curl_getASN1Element(curl_asn1Element * elem,
+                                 const char * beg, const char * end);
+const char * Curl_ASN1tostr(curl_asn1Element * elem, int type);
+const char * Curl_DNtostr(curl_asn1Element * dn);
+void Curl_parseX509(curl_X509certificate * cert,
+                    const char * beg, const char * end);
+CURLcode Curl_extract_certinfo(struct connectdata * conn, int certnum,
+                               const char * beg, const char * end);
+CURLcode Curl_verifyhost(struct connectdata * conn,
+                         const char * beg, const char * end);
+
+#endif /* USE_QSOSSL or USE_GSKIT */
+#endif /* HEADER_CURL_X509ASN1_H */
index 6eea31f..fdfaec9 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2004 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, 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
@@ -33,7 +33,7 @@ supported_features="@SUPPORT_FEATURES@"
 Name: libcurl
 URL: http://curl.haxx.se/
 Description: Library to transfer files with ftp, http, etc.
-Version: @VERSION@
-Libs: -L${libdir} -lcurl @LIBS@
-Libs.private: @LIBCURL_LIBS@ @LIBS@
-Cflags: -I${includedir}
+Version: @CURLVERSION@
+Libs: -L${libdir} -lcurl
+Libs.private: @LIBCURL_LIBS@
+Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
old mode 100755 (executable)
new mode 100644 (file)
index d88da2c..68c6d96
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,9 +1,9 @@
-# Generated from ltmain.m4sh.
 
-# ltmain.sh (GNU libtool) 2.2.6b
+# libtool (GNU libtool) 2.4.2
 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 #
 # Provide generalized library-building support services.
 #
-#     --config             show all configuration variables
-#     --debug              enable verbose shell tracing
-# -n, --dry-run            display commands without modifying any files
-#     --features           display basic configuration information and exit
-#     --mode=MODE          use operation mode MODE
-#     --preserve-dup-deps  don't remove duplicate dependency libraries
-#     --quiet, --silent    don't print informational messages
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long help message
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --no-warn            don't display warning messages
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
 #
 # MODE must be one of the following:
 #
-#       clean              remove files from the build directory
-#       compile            compile a source file into a libtool object
-#       execute            automatically set library path, then run a program
-#       finish             complete the installation of libtool libraries
-#       install            install libraries or executables
-#       link               create a library or an executable
-#       uninstall          remove libraries from an installed directory
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
 #
-# MODE-ARGS vary depending on the MODE.
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
 #
 # When reporting a bug, please describe a test case to reproduce it and
 # include the following information:
 #
-#       host-triplet:  $host
-#       shell:         $SHELL
-#       compiler:              $LTCC
-#       compiler flags:                $LTCFLAGS
-#       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU libtool) 2.2.6b Debian-2.2.6b-2
-#       automake:              $automake_version
-#       autoconf:              $autoconf_version
+#         host-triplet:        $host
+#         shell:               $SHELL
+#         compiler:            $LTCC
+#         compiler flags:              $LTCFLAGS
+#         linker:              $LD (gnu? $with_gnu_ld)
+#         $progname:   (GNU libtool) 2.4.2 Debian-2.4.2-1.3
+#         automake:    $automake_version
+#         autoconf:    $autoconf_version
 #
 # Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
-PROGRAM=ltmain.sh
+PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2"
+VERSION="2.4.2 Debian-2.4.2-1.3"
 TIMESTAMP=""
-package_revision=1.3017
+package_revision=1.3337
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -91,10 +98,15 @@ fi
 BIN_SH=xpg4; export BIN_SH # for Tru64
 DUALCASE=1; export DUALCASE # for MKS sh
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
 # NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
 lt_user_locale=
 lt_safe_locale=
 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
@@ -107,24 +119,28 @@ do
          lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
        fi"
 done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
 
 $lt_unset CDPATH
 
 
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
 
 
 
 : ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/bin/sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -144,6 +160,27 @@ IFS="      $lt_nl"
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,"
 
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
 # func_dirname_and_basename file append nondir_replacement
 # perform func_basename and func_dirname in a single function
 # call:
@@ -158,33 +195,183 @@ basename="s,^.*/,,"
 # those functions but instead duplicate the functionality here.
 func_dirname_and_basename ()
 {
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+               s@/\./@/@g
+               t dotsl
+               s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
 }
 
-# Generated shell functions inserted here.
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
 
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
 
 # The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
 func_dirname_and_basename "$progpath"
 progname=$func_basename_result
-case $progname in
-  -*) progname=./$progname ;;
-esac
 
 # Make sure we have an absolute path for reexecution:
 case $progpath in
@@ -196,7 +383,7 @@ case $progpath in
      ;;
   *)
      save_IFS="$IFS"
-     IFS=:
+     IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
        IFS="$save_IFS"
        test -x "$progdir/$progname" && break
@@ -215,6 +402,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 # Same as above, but do not quote variable references.
 double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
 # Re-`\' parameter expansions in output of double_quote_subst that were
 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
 # in input to double_quote_subst, that '$' was protected from expansion.
@@ -243,7 +439,7 @@ opt_warning=:
 # name if it has been set yet.
 func_echo ()
 {
-    $ECHO "$progname${mode+: }$mode: $*"
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
 }
 
 # func_verbose arg...
@@ -258,18 +454,25 @@ func_verbose ()
     :
 }
 
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
 # func_error arg...
 # Echo program name prefixed message to standard error.
 func_error ()
 {
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
 }
 
 # func_warning arg...
 # Echo program name prefixed warning message to standard error.
 func_warning ()
 {
-    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
 
     # bash bug again:
     :
@@ -326,9 +529,9 @@ func_mkdir_p ()
         case $my_directory_path in */*) ;; *) break ;; esac
 
         # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
       done
-      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
 
       save_mkdir_p_IFS="$IFS"; IFS=':'
       for my_dir in $my_dir_list; do
@@ -378,7 +581,7 @@ func_mktempdir ()
         func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    $ECHO "X$my_tmpdir" | $Xsed
+    $ECHO "$my_tmpdir"
 }
 
 
@@ -392,7 +595,7 @@ func_quote_for_eval ()
 {
     case $1 in
       *[\\\`\"\$]*)
-       func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+       func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
       *)
         func_quote_for_eval_unquoted_result="$1" ;;
     esac
@@ -419,7 +622,7 @@ func_quote_for_expand ()
 {
     case $1 in
       *[\\\`\"]*)
-       my_arg=`$ECHO "X$1" | $Xsed \
+       my_arg=`$ECHO "$1" | $SED \
            -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
       *)
         my_arg="$1" ;;
@@ -488,15 +691,39 @@ func_show_eval_locale ()
     fi
 }
 
-
-
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
 
 
 # func_version
 # Echo version message to standard output and exit.
 func_version ()
 {
-    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+       :more
+       /\./!{
+         N
+         s/\n# / /
+         b more
+       }
+       :go
+       /^# '$PROGRAM' (GNU /,/# warranty; / {
         s/^# //
        s/^# *$//
         s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
@@ -509,22 +736,28 @@ func_version ()
 # Echo short help message to standard output and exit.
 func_usage ()
 {
-    $SED -n '/^# Usage:/,/# -h/ {
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
         s/^# //
        s/^# *$//
        s/\$progname/'$progname'/
        p
     }' < "$progpath"
-    $ECHO
+    echo
     $ECHO "run \`$progname --help | more' for full usage"
     exit $?
 }
 
-# func_help
-# Echo long help message to standard output and exit.
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
 func_help ()
 {
+    $opt_debug
+
     $SED -n '/^# Usage:/,/# Report bugs to/ {
+       :print
         s/^# //
        s/^# *$//
        s*\$progname*'$progname'*
@@ -534,11 +767,18 @@ func_help ()
        s*\$LTCFLAGS*'"$LTCFLAGS"'*
        s*\$LD*'"$LD"'*
        s/\$with_gnu_ld/'"$with_gnu_ld"'/
-       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+       s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+       s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
        p
-     }' < "$progpath"
-    exit $?
+       d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
 }
 
 # func_missing_arg argname
@@ -546,63 +786,106 @@ func_help ()
 # exit_cmd.
 func_missing_arg ()
 {
-    func_error "missing argument for $1"
+    $opt_debug
+
+    func_error "missing argument for $1."
     exit_cmd=exit
 }
 
-exit_cmd=:
 
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
 
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
 
 
 
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell, and then maybe $ECHO will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
 
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
 
 magic="%%%MAGIC variable%%%"
 magic_exe="%%%MAGIC EXE variable%%%"
 
 # Global variables.
-# $mode is unset
 nonopt=
-execute_dlfiles=
 preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 extracted_archives=
 extracted_serial=0
 
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
 # If this variable is set in any of the actions, the command in it
 # will be execed at the end.  This prevents here-documents from being
 # left over by shells.
 exec_cmd=
 
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
 # func_fatal_configuration arg...
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
@@ -636,16 +919,16 @@ func_config ()
 # Display the features supported by this script.
 func_features ()
 {
-    $ECHO "host: $host"
+    echo "host: $host"
     if test "$build_libtool_libs" = yes; then
-      $ECHO "enable shared libraries"
+      echo "enable shared libraries"
     else
-      $ECHO "disable shared libraries"
+      echo "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      $ECHO "enable static libraries"
+      echo "enable static libraries"
     else
-      $ECHO "disable static libraries"
+      echo "disable static libraries"
     fi
 
     exit $?
@@ -692,117 +975,209 @@ func_enable_tag ()
   esac
 }
 
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
 {
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
 
-  # Shorthand for --mode=foo, only valid as the first argument
-  case $1 in
-  clean|clea|cle|cl)
-    shift; set dummy --mode clean ${1+"$@"}; shift
-    ;;
-  compile|compil|compi|comp|com|co|c)
-    shift; set dummy --mode compile ${1+"$@"}; shift
-    ;;
-  execute|execut|execu|exec|exe|ex|e)
-    shift; set dummy --mode execute ${1+"$@"}; shift
-    ;;
-  finish|finis|fini|fin|fi|f)
-    shift; set dummy --mode finish ${1+"$@"}; shift
-    ;;
-  install|instal|insta|inst|ins|in|i)
-    shift; set dummy --mode install ${1+"$@"}; shift
-    ;;
-  link|lin|li|l)
-    shift; set dummy --mode link ${1+"$@"}; shift
-    ;;
-  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-    shift; set dummy --mode uninstall ${1+"$@"}; shift
-    ;;
-  esac
 
-  # Parse non-mode specific arguments:
-  while test "$#" -gt 0; do
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
     opt="$1"
     shift
-
     case $opt in
-      --config)                func_config                                     ;;
-
-      --debug)         preserve_args="$preserve_args $opt"
+      --debug|-x)      opt_debug='set -x'
                        func_echo "enabling shell trace mode"
-                       opt_debug='set -x'
                        $opt_debug
                        ;;
-
-      -dlopen)         test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       execute_dlfiles="$execute_dlfiles $1"
-                       shift
+      --dry-run|--dryrun|-n)
+                       opt_dry_run=:
                        ;;
-
-      --dry-run | -n)  opt_dry_run=:                                   ;;
-      --features)       func_features                                  ;;
-      --finish)                mode="finish"                                   ;;
-
-      --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       case $1 in
-                         # Valid mode arguments:
-                         clean)        ;;
-                         compile)      ;;
-                         execute)      ;;
-                         finish)       ;;
-                         install)      ;;
-                         link)         ;;
-                         relink)       ;;
-                         uninstall)    ;;
-
-                         # Catch anything else as an error
-                         *) func_error "invalid argument for $opt"
-                            exit_cmd=exit
-                            break
-                            ;;
-                       esac
-
-                       mode="$1"
+      --config)
+                       opt_config=:
+func_config
+                       ;;
+      --dlopen|-dlopen)
+                       optarg="$1"
+                       opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
                        shift
                        ;;
-
       --preserve-dup-deps)
-                       opt_duplicate_deps=:                            ;;
-
-      --quiet|--silent)        preserve_args="$preserve_args $opt"
-                       opt_silent=:
+                       opt_preserve_dup_deps=:
                        ;;
-
-      --verbose| -v)   preserve_args="$preserve_args $opt"
+      --features)
+                       opt_features=:
+func_features
+                       ;;
+      --finish)
+                       opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+                       ;;
+      --help)
+                       opt_help=:
+                       ;;
+      --help-all)
+                       opt_help_all=:
+opt_help=': help-all'
+                       ;;
+      --mode)
+                       test $# = 0 && func_missing_arg $opt && break
+                       optarg="$1"
+                       opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+                       shift
+                       ;;
+      --no-silent|--no-quiet)
                        opt_silent=false
+func_append preserve_args " $opt"
                        ;;
-
-      --tag)           test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       preserve_args="$preserve_args $opt $1"
-                       func_enable_tag "$1"    # tagname is set here
+      --no-warning|--no-warn)
+                       opt_warning=false
+func_append preserve_args " $opt"
+                       ;;
+      --no-verbose)
+                       opt_verbose=false
+func_append preserve_args " $opt"
+                       ;;
+      --silent|--quiet)
+                       opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+                       ;;
+      --verbose|-v)
+                       opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+                       ;;
+      --tag)
+                       test $# = 0 && func_missing_arg $opt && break
+                       optarg="$1"
+                       opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
                        shift
                        ;;
 
+      -\?|-h)          func_usage                              ;;
+      --help)          func_help                               ;;
+      --version)       func_version                            ;;
+
       # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-                       func_opt_split "$opt"
-                       set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+      --*=*)
+                       func_split_long_opt "$opt"
+                       set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
                        shift
                        ;;
 
-      -\?|-h)          func_usage                                      ;;
-      --help)          opt_help=:                                      ;;
-      --version)       func_version                                    ;;
-
-      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
-
-      *)               nonopt="$opt"
-                       break
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+                       func_split_short_opt "$opt"
+                       set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+                       shift
                        ;;
+
+      --)              break                                   ;;
+      -*)              func_fatal_help "unrecognized option \`$opt'" ;;
+      *)               set dummy "$opt" ${1+"$@"};     shift; break  ;;
     esac
   done
 
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
 
   case $host in
     *cygwin* | *mingw* | *pw32* | *cegcc*)
@@ -810,82 +1185,44 @@ func_enable_tag ()
       opt_duplicate_compiler_generated_deps=:
       ;;
     *)
-      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
       ;;
   esac
 
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
 
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      else
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      fi
-    else
-      cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
     fi
 
-    exit $EXIT_MISMATCH
-  fi
-}
-
-
-## ----------- ##
-##    Main.    ##
-## ----------- ##
-
-$opt_help || {
-  # Sanity checks first:
-  func_check_version_match
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
 
-  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-    func_fatal_configuration "not configured to build any kind of library"
-  fi
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
 
-  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
 
 
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
 
 
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    func_error "unrecognized option \`-dlopen'"
-    $ECHO "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
 
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$progname --help --mode=$mode' for more information."
-}
 
+## ----------- ##
+##    Main.    ##
+## ----------- ##
 
 # func_lalib_p file
 # True iff FILE is a libtool `.la' library or `.lo' object file.
@@ -950,12 +1287,9 @@ func_ltwrapper_executable_p ()
 # temporary ltwrapper_script.
 func_ltwrapper_scriptname ()
 {
-    func_ltwrapper_scriptname_result=""
-    if func_ltwrapper_executable_p "$1"; then
-       func_dirname_and_basename "$1" "" "."
-       func_stripname '' '.exe' "$func_basename_result"
-       func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-    fi
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
 }
 
 # func_ltwrapper_p file
@@ -1001,6 +1335,37 @@ func_source ()
 }
 
 
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
 # func_infer_tag arg
 # Infer tagged configuration to use if any are available and
 # if one wasn't chosen via the "--tag" command line option.
@@ -1013,13 +1378,15 @@ func_infer_tag ()
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
-        func_quote_for_eval "$arg"
-       CC_quoted="$CC_quoted $func_quote_for_eval_result"
+       func_append_quoted CC_quoted "$arg"
       done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
       case $@ in
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
       # Blanks at the start of $base_compile will cause this to fail
       # if we don't check for them as well.
       *)
@@ -1030,11 +1397,13 @@ func_infer_tag ()
            CC_quoted=
            for arg in $CC; do
              # Double-quote args containing other shell metacharacters.
-             func_quote_for_eval "$arg"
-             CC_quoted="$CC_quoted $func_quote_for_eval_result"
+             func_append_quoted CC_quoted "$arg"
            done
+           CC_expanded=`func_echo_all $CC`
+           CC_quoted_expanded=`func_echo_all $CC_quoted`
            case "$@ " in
-             " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+           " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+           " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
              # The compiler in the base compile command matches
              # the one in the tagged configuration.
              # Assume this is the tagged configuration we want.
@@ -1097,6 +1466,486 @@ EOF
     }
 }
 
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
@@ -1137,12 +1986,12 @@ func_mode_compile ()
          ;;
 
        -pie | -fpie | -fPIE)
-          pie_flag="$pie_flag $arg"
+          func_append pie_flag " $arg"
          continue
          ;;
 
        -shared | -static | -prefer-pic | -prefer-non-pic)
-         later="$later $arg"
+         func_append later " $arg"
          continue
          ;;
 
@@ -1163,15 +2012,14 @@ func_mode_compile ()
          save_ifs="$IFS"; IFS=','
          for arg in $args; do
            IFS="$save_ifs"
-           func_quote_for_eval "$arg"
-           lastarg="$lastarg $func_quote_for_eval_result"
+           func_append_quoted lastarg "$arg"
          done
          IFS="$save_ifs"
          func_stripname ' ' '' "$lastarg"
          lastarg=$func_stripname_result
 
          # Add the arguments to base_compile.
-         base_compile="$base_compile $lastarg"
+         func_append base_compile " $lastarg"
          continue
          ;;
 
@@ -1187,8 +2035,7 @@ func_mode_compile ()
       esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-      func_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
+      func_append_quoted base_compile "$lastarg"
     done # for arg
 
     case $arg_mode in
@@ -1213,7 +2060,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -1288,7 +2135,7 @@ func_mode_compile ()
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
     if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
       lockfile="$output_obj.lock"
     else
       output_obj=
@@ -1319,17 +2166,16 @@ compiler."
        $opt_dry_run || $RM $removelist
        exit $EXIT_FAILURE
       fi
-      removelist="$removelist $output_obj"
+      func_append removelist " $output_obj"
       $ECHO "$srcfile" > "$lockfile"
     fi
 
     $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
+    func_append removelist " $lockfile"
     trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
 
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
     func_quote_for_eval "$srcfile"
     qsrcfile=$func_quote_for_eval_result
 
@@ -1349,7 +2195,7 @@ compiler."
 
       if test -z "$output_obj"; then
        # Place PIC objects in $objdir
-       command="$command -o $lobj"
+       func_append command " -o $lobj"
       fi
 
       func_show_eval_locale "$command" \
@@ -1396,11 +2242,11 @@ compiler."
        command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
-       command="$command -o $obj"
+       func_append command " -o $obj"
       fi
 
       # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
+      func_append command "$suppress_output"
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
@@ -1445,13 +2291,13 @@ compiler."
 }
 
 $opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
 {
     # We need to display help for each of the modes.
-    case $mode in
+    case $opt_mode in
       "")
         # Generic help is extracted from the usage comments
         # at the start of this file.
@@ -1482,10 +2328,11 @@ This mode accepts the following additional options:
 
   -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
   -no-suppress      do not suppress compiler output for multiple passes
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
   -shared           do not build a \`.o' file suitable for static linking
   -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
 from the given SOURCEFILE.
@@ -1538,7 +2385,7 @@ either the \`install' or \`cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
-  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
 The rest of the components are interpreted as arguments to that command (only
 BSD-compatible install options are recognized)."
@@ -1558,6 +2405,8 @@ The following components of LINK-COMMAND are treated specially:
 
   -all-static       do not do any dynamic linking at all
   -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
@@ -1586,6 +2435,11 @@ The following components of LINK-COMMAND are treated specially:
   -version-info CURRENT[:REVISION[:AGE]]
                     specify library version info [each variable defaults to 0]
   -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
 All other options (arguments beginning with \`-') are ignored.
 
@@ -1619,18 +2473,44 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$mode'"
+        func_fatal_help "invalid operation mode \`$opt_mode'"
         ;;
     esac
 
-    $ECHO
+    echo
     $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
 }
 
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       echo
+       func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+       H
+       d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
 
 
 # func_mode_execute arg...
@@ -1643,13 +2523,16 @@ func_mode_execute ()
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
+    for file in $opt_dlopen; do
       test -f "$file" \
        || func_fatal_help "\`$file' is not a file"
 
       dir=
       case $file in
       *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
        # Check to see that this really is a libtool archive.
        func_lalib_unsafe_p "$file" \
          || func_fatal_help "\`$lib' is not a valid libtool archive"
@@ -1671,7 +2554,7 @@ func_mode_execute ()
        dir="$func_dirname_result"
 
        if test -f "$dir/$objdir/$dlname"; then
-         dir="$dir/$objdir"
+         func_append dir "/$objdir"
        else
          if test ! -f "$dir/$dlname"; then
            func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
@@ -1712,7 +2595,7 @@ func_mode_execute ()
     for file
     do
       case $file in
-      -*) ;;
+      -* | *.la | *.lo ) ;;
       *)
        # Do a test to see if this is really a libtool program.
        if func_ltwrapper_script_p "$file"; then
@@ -1728,8 +2611,7 @@ func_mode_execute ()
        ;;
       esac
       # Quote arguments (to preserve shell metacharacters).
-      func_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
+      func_append_quoted args "$file"
     done
 
     if test "X$opt_dry_run" = Xfalse; then
@@ -1754,29 +2636,66 @@ func_mode_execute ()
       # Display what would be done.
       if test -n "$shlibpath_var"; then
        eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-       $ECHO "export $shlibpath_var"
+       echo "export $shlibpath_var"
       fi
       $ECHO "$cmd$args"
       exit $EXIT_SUCCESS
     fi
 }
 
-test "$mode" = execute && func_mode_execute ${1+"$@"}
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
     $opt_debug
-    libdirs="$nonopt"
+    libs=
+    libdirs=
     admincmds=
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-       libdirs="$libdirs $dir"
-      done
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+       func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+       if func_lalib_unsafe_p "$opt"; then
+         func_append libs " $opt"
+       else
+         func_warning "\`$opt' is not a valid libtool archive"
+       fi
+
+      else
+       func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+         sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+           > $tmpdir/tmp-la
+         mv -f $tmpdir/tmp-la $lib
+       done
+        ${RM}r "$tmpdir"
+      fi
+    fi
 
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       for libdir in $libdirs; do
        if test -n "$finish_cmds"; then
          # Do each command in the finish commands.
@@ -1786,7 +2705,7 @@ func_mode_finish ()
        if test -n "$finish_eval"; then
          # Do the single finish_eval.
          eval cmds=\"$finish_eval\"
-         $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+         $opt_dry_run || eval "$cmds" || func_append admincmds "
        $cmds"
        fi
       done
@@ -1795,53 +2714,55 @@ func_mode_finish ()
     # Exit here if they wanted silent mode.
     $opt_silent && exit $EXIT_SUCCESS
 
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
-    $ECHO "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $ECHO "   $libdir"
-    done
-    $ECHO
-    $ECHO "If you ever happen to want to link against installed libraries"
-    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
-    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $ECHO "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $ECHO "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $ECHO "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+       $ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+       echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+       echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+       echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+       echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+       libdir=LIBDIR
+       eval flag=\"$hardcode_libdir_flag_spec\"
 
-      $ECHO "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $ECHO "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $ECHO
+       $ECHO "   - use the \`$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+       $ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+       echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      fi
+      echo
 
-    $ECHO "See any operating system documentation about shared libraries for"
-    case $host in
-      solaris2.[6789]|solaris2.1[0-9])
-        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-       $ECHO "pages."
-       ;;
-      *)
-        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
-        ;;
-    esac
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+       solaris2.[6789]|solaris2.1[0-9])
+         echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+         echo "pages."
+         ;;
+       *)
+         echo "more information, such as the ld(1) and ld.so(8) manual pages."
+         ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
     exit $EXIT_SUCCESS
 }
 
-test "$mode" = finish && func_mode_finish ${1+"$@"}
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
@@ -1852,7 +2773,7 @@ func_mode_install ()
     # install_prog (especially on Windows NT).
     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
        # Allow the use of GNU shtool's install command.
-       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+       case $nonopt in *shtool*) :;; *) false;; esac; then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -1866,7 +2787,12 @@ func_mode_install ()
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
     func_quote_for_eval "$arg"
-    install_prog="$install_prog$func_quote_for_eval_result"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1876,10 +2802,12 @@ func_mode_install ()
     install_type=
     isdir=no
     stripme=
+    no_mode=:
     for arg
     do
+      arg2=
       if test -n "$dest"; then
-       files="$files $dest"
+       func_append files " $dest"
        dest=$arg
        continue
       fi
@@ -1887,10 +2815,9 @@ func_mode_install ()
       case $arg in
       -d) isdir=yes ;;
       -f)
-       case " $install_prog " in
-       *[\\\ /]cp\ *) ;;
-       *) prev=$arg ;;
-       esac
+       if $install_cp; then :; else
+         prev=$arg
+       fi
        ;;
       -g | -m | -o)
        prev=$arg
@@ -1904,6 +2831,10 @@ func_mode_install ()
       *)
        # If the previous option needed an argument, then skip it.
        if test -n "$prev"; then
+         if test "x$prev" = x-m && test -n "$install_override_mode"; then
+           arg2=$install_override_mode
+           no_mode=false
+         fi
          prev=
        else
          dest=$arg
@@ -1914,7 +2845,11 @@ func_mode_install ()
 
       # Aesthetically quote the argument.
       func_quote_for_eval "$arg"
-      install_prog="$install_prog $func_quote_for_eval_result"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+       func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
     done
 
     test -z "$install_prog" && \
@@ -1923,6 +2858,13 @@ func_mode_install ()
     test -n "$prev" && \
       func_fatal_help "the \`$prev' option requires an argument"
 
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+       func_quote_for_eval "$install_override_mode"
+       func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
     if test -z "$files"; then
       if test -z "$dest"; then
        func_fatal_help "no file or destination specified"
@@ -1977,10 +2919,13 @@ func_mode_install ()
       case $file in
       *.$libext)
        # Do the static libraries later.
-       staticlibs="$staticlibs $file"
+       func_append staticlibs " $file"
        ;;
 
       *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
        # Check to see that this really is a libtool archive.
        func_lalib_unsafe_p "$file" \
          || func_fatal_help "\`$file' is not a valid libtool archive"
@@ -1994,23 +2939,23 @@ func_mode_install ()
        if test "X$destdir" = "X$libdir"; then
          case "$current_libdirs " in
          *" $libdir "*) ;;
-         *) current_libdirs="$current_libdirs $libdir" ;;
+         *) func_append current_libdirs " $libdir" ;;
          esac
        else
          # Note the libdir as a future libdir.
          case "$future_libdirs " in
          *" $libdir "*) ;;
-         *) future_libdirs="$future_libdirs $libdir" ;;
+         *) func_append future_libdirs " $libdir" ;;
          esac
        fi
 
        func_dirname "$file" "/" ""
        dir="$func_dirname_result"
-       dir="$dir$objdir"
+       func_append dir "$objdir"
 
        if test -n "$relink_command"; then
          # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+         inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
 
          # Don't allow the user to place us outside of our expected
          # location b/c this prevents finding dependent libraries that
@@ -2023,9 +2968,9 @@ func_mode_install ()
 
          if test -n "$inst_prefix_dir"; then
            # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
          else
-           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
          fi
 
          func_warning "relinking \`$file'"
@@ -2043,7 +2988,7 @@ func_mode_install ()
          test -n "$relink_command" && srcname="$realname"T
 
          # Install the shared library and build the symlinks.
-         func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+         func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
              'exit $?'
          tstripme="$stripme"
          case $host_os in
@@ -2083,7 +3028,7 @@ func_mode_install ()
        func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
        # Maybe install the static library, too.
-       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+       test -n "$old_library" && func_append staticlibs " $dir/$old_library"
        ;;
 
       *.lo)
@@ -2183,7 +3128,7 @@ func_mode_install ()
            if test -f "$lib"; then
              func_source "$lib"
            fi
-           libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
            if test -n "$libdir" && test ! -f "$libfile"; then
              func_warning "\`$lib' has not been installed in \`$libdir'"
              finalize=no
@@ -2202,7 +3147,7 @@ func_mode_install ()
                file="$func_basename_result"
                outputname="$tmpdir/$file"
                # Replace the output file specification.
-               relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+               relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
                $opt_silent || {
                  func_quote_for_expand "$relink_command"
@@ -2221,7 +3166,7 @@ func_mode_install ()
            }
          else
            # Install the binary that we compiled earlier.
-           file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+           file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
          fi
        fi
 
@@ -2257,11 +3202,13 @@ func_mode_install ()
 
       # Set up the ranlib parameters.
       oldlib="$destdir/$name"
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
 
       func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
       if test -n "$stripme" && test -n "$old_striplib"; then
-       func_show_eval "$old_striplib $oldlib" 'exit $?'
+       func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
       fi
 
       # Do each command in the postinstall commands.
@@ -2280,7 +3227,7 @@ func_mode_install ()
     fi
 }
 
-test "$mode" = install && func_mode_install ${1+"$@"}
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -2323,6 +3270,22 @@ func_generate_dlsyms ()
 extern \"C\" {
 #endif
 
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 /* External symbol declarations for the compiler. */\
 "
 
@@ -2332,10 +3295,11 @@ extern \"C\" {
          $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
          # Add our own program objects to the symbol list.
-         progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+         progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
          for progfile in $progfiles; do
-           func_verbose "extracting global C symbols from \`$progfile'"
-           $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+           func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+           func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+           $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
          done
 
          if test -n "$exclude_expsyms"; then
@@ -2371,7 +3335,7 @@ extern \"C\" {
              eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
              eval '$MV "$nlist"T "$nlist"'
              case $host in
-               *cygwin | *mingw* | *cegcc* )
+               *cygwin* | *mingw* | *cegcc* )
                  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
                  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
                  ;;
@@ -2384,10 +3348,52 @@ extern \"C\" {
          func_verbose "extracting global C symbols from \`$dlprefile'"
          func_basename "$dlprefile"
          name="$func_basename_result"
-         $opt_dry_run || {
-           eval '$ECHO ": $name " >> "$nlist"'
-           eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-         }
+          case $host in
+           *cygwin* | *mingw* | *cegcc* )
+             # if an import library, we need to obtain dlname
+             if func_win32_import_lib_p "$dlprefile"; then
+               func_tr_sh "$dlprefile"
+               eval "curr_lafile=\$libfile_$func_tr_sh_result"
+               dlprefile_dlbasename=""
+               if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+                 # Use subshell, to avoid clobbering current variable values
+                 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+                 if test -n "$dlprefile_dlname" ; then
+                   func_basename "$dlprefile_dlname"
+                   dlprefile_dlbasename="$func_basename_result"
+                 else
+                   # no lafile. user explicitly requested -dlpreopen <import library>.
+                   $sharedlib_from_linklib_cmd "$dlprefile"
+                   dlprefile_dlbasename=$sharedlib_from_linklib_result
+                 fi
+               fi
+               $opt_dry_run || {
+                 if test -n "$dlprefile_dlbasename" ; then
+                   eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+                 else
+                   func_warning "Could not compute DLL name from $name"
+                   eval '$ECHO ": $name " >> "$nlist"'
+                 fi
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+                   $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+               }
+             else # not an import lib
+               $opt_dry_run || {
+                 eval '$ECHO ": $name " >> "$nlist"'
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+               }
+             fi
+           ;;
+           *)
+             $opt_dry_run || {
+               eval '$ECHO ": $name " >> "$nlist"'
+               func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+               eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+             }
+           ;;
+          esac
        done
 
        $opt_dry_run || {
@@ -2415,36 +3421,19 @@ extern \"C\" {
          if test -f "$nlist"S; then
            eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
          else
-           $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+           echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
          fi
 
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
+         echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
 typedef struct {
   const char *name;
   void *address;
 } lt_dlsymlist;
-"
-         case $host in
-         *cygwin* | *mingw* | *cegcc* )
-           $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs.  */"
-           lt_dlsym_const= ;;
-         *osf5*)
-           echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
-           lt_dlsym_const= ;;
-         *)
-           lt_dlsym_const=const ;;
-         esac
-
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
+extern LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
+LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
 {\
   { \"$my_originator\", (void *) 0 },"
@@ -2457,7 +3446,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] =
            eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
            ;;
          esac
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
+         echo >> "$output_objdir/$my_dlsyms" "\
   {0, (void *) 0}
 };
 
@@ -2484,7 +3473,7 @@ static const void *lt_preloaded_setup() {
          # linked before any other PIC object.  But we must not use
          # pic_flag when linking with -static.  The problem exists in
          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+         *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
            pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
          *-*-hpux*)
            pic_flag_for_symtable=" $pic_flag"  ;;
@@ -2500,7 +3489,7 @@ static const void *lt_preloaded_setup() {
        for arg in $LTCFLAGS; do
          case $arg in
          -pie | -fpie | -fPIE) ;;
-         *) symtab_cflags="$symtab_cflags $arg" ;;
+         *) func_append symtab_cflags " $arg" ;;
          esac
        done
 
@@ -2515,16 +3504,16 @@ static const void *lt_preloaded_setup() {
        case $host in
        *cygwin* | *mingw* | *cegcc* )
          if test -f "$output_objdir/$my_outputname.def"; then
-           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
          else
-           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
          fi
          ;;
        *)
-         compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-         finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+         compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
          ;;
        esac
        ;;
@@ -2538,8 +3527,8 @@ static const void *lt_preloaded_setup() {
       # really was required.
 
       # Nullify the symbol file.
-      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
     fi
 }
 
@@ -2549,6 +3538,7 @@ static const void *lt_preloaded_setup() {
 # Need a lot of goo to handle *both* DLLs and import libs
 # Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
   $opt_debug
@@ -2559,9 +3549,11 @@ func_win32_libid ()
     win32_libid_type="x86 archive import"
     ;;
   *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
        $SED -n -e '
            1,100{
                / I /{
@@ -2590,6 +3582,131 @@ func_win32_libid ()
   $ECHO "$win32_libid_type"
 }
 
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[         ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
 
 
 # func_extract_an_archive dir oldlib
@@ -2598,7 +3715,18 @@ func_extract_an_archive ()
     $opt_debug
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if test "$lock_old_archive_extraction" = yes; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+                  'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
      :
     else
@@ -2669,7 +3797,7 @@ func_extract_archives ()
            darwin_file=
            darwin_files=
            for darwin_file in $darwin_filelist; do
-             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+             darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
              $LIPO -create -output "$darwin_file" $darwin_files
            done # $darwin_filelist
            $RM -rf unfat-$$
@@ -2684,25 +3812,30 @@ func_extract_archives ()
         func_extract_an_archive "$my_xdir" "$my_xabs"
        ;;
       esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
     func_extract_archives_result="$my_oldobjs"
 }
 
 
-
-# func_emit_wrapper_part1 [arg=no]
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
 #
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
 {
-       func_emit_wrapper_part1_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_part1_arg1=$1
-       fi
+       func_emit_wrapper_arg1=${1-no}
 
        $ECHO "\
 #! $SHELL
@@ -2718,7 +3851,6 @@ func_emit_wrapper_part1 ()
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
 sed_quote_subst='$sed_quote_subst'
 
 # Be Bourne compatible
@@ -2749,31 +3881,135 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then
 else
   # When we are sourced in execute mode, \$file and \$ECHO are already set.
   if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    ECHO=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$ECHO works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$ECHO will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
 "
-       $ECHO "\
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
 
   # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
   while test -n \"\$file\"; do
-    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
 
     # If there was a directory component, then change thisdir.
     if test \"x\$destdir\" != \"x\$file\"; then
@@ -2783,30 +4019,13 @@ else
       esac
     fi
 
-    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
   done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
-       func_emit_wrapper_part2_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_part2_arg1=$1
-       fi
-
-       $ECHO "\
 
   # Usually 'no', except on cygwin/mingw when embedded into
   # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
     # special case for '.'
     if test \"\$thisdir\" = \".\"; then
@@ -2814,7 +4033,7 @@ func_emit_wrapper_part2 ()
     fi
     # remove .libs from thisdir
     case \"\$thisdir\" in
-    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
     $objdir )   thisdir=. ;;
     esac
   fi
@@ -2869,6 +4088,18 @@ func_emit_wrapper_part2 ()
 
   if test -f \"\$progdir/\$program\"; then"
 
+       # fixup the dll searchpath if we need to.
+       #
+       # Fix the DLL searchpath if we need to.  Do this before prepending
+       # to shlibpath, because on Windows, both are PATH and uninstalled
+       # libraries must come first.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
        # Export our shlibpath_var if we have one.
        if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
          $ECHO "\
@@ -2877,253 +4108,28 @@ func_emit_wrapper_part2 ()
 
     # Some systems cannot cope with colon-terminated $shlibpath_var
     # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
 
     export $shlibpath_var
 "
        fi
 
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
        $ECHO "\
     if test \"\$libtool_execute_magic\" != \"$magic\"; then
       # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2* | *-cegcc*)
-         $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-         ;;
-
-       *)
-         $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-         ;;
-       esac
-       $ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
+      func_exec_program \${1+\"\$@\"}
     fi
   else
     # The program doesn't exist.
     \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
-    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
   fi
 fi\
 "
 }
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory.  This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
-       func_emit_wrapper_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_arg1=$1
-       fi
-
-       # split this up so that func_emit_cwrapperexe_src
-       # can call each part independently.
-       func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
-       func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin.  Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
-  func_to_host_path_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        case $build in
-          *mingw* ) # actually, msys
-            # awkward: cmd appends spaces to result
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_tmp1=`cygpath -w "$1"`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check the contents of
-            # stdout. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127 and print
-            # *an error message* to stdout. So we must check for both
-            # error code of zero AND non-empty stdout, which explains
-            # the odd construction:
-            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
-            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
-              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-                $SED -e "$lt_sed_naive_backslashify"`
-            else
-              # Allow warning below.
-              func_to_host_path_result=""
-            fi
-            ;;
-        esac
-        if test -z "$func_to_host_path_result" ; then
-          func_error "Could not determine host path corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback:
-          func_to_host_path_result="$1"
-        fi
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_path
 
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
-  func_to_host_pathlist_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        # Remove leading and trailing path separator characters from
-        # ARG. msys behavior is inconsistent here, cygpath turns them
-        # into '.;' and ';.', and winepath ignores them completely.
-        func_to_host_pathlist_tmp2="$1"
-        # Once set for this call, this variable should not be
-        # reassigned. It is used in tha fallback case.
-        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
-          $SED -e 's|^:*||' -e 's|:*$||'`
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # unfortunately, winepath doesn't convert pathlists
-            func_to_host_pathlist_result=""
-            func_to_host_pathlist_oldIFS=$IFS
-            IFS=:
-            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
-              IFS=$func_to_host_pathlist_oldIFS
-              if test -n "$func_to_host_pathlist_f" ; then
-                func_to_host_path "$func_to_host_pathlist_f"
-                if test -n "$func_to_host_path_result" ; then
-                  if test -z "$func_to_host_pathlist_result" ; then
-                    func_to_host_pathlist_result="$func_to_host_path_result"
-                  else
-                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
-                  fi
-                fi
-              fi
-              IFS=:
-            done
-            IFS=$func_to_host_pathlist_oldIFS
-            ;;
-        esac
-        if test -z "$func_to_host_pathlist_result" ; then
-          func_error "Could not determine the host path(s) corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback. This may break if $1 contains DOS-style drive
-          # specifications. The fix is not to complicate the expression
-          # below, but for the user to provide a working wine installation
-          # with winepath so that path translation in the cross-to-mingw
-          # case works properly.
-          lt_replace_pathsep_nix_to_dos="s|:|;|g"
-          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
-            $SED -e "$lt_replace_pathsep_nix_to_dos"`
-        fi
-        # Now, add the leading and trailing path separators back
-        case "$1" in
-          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
-            ;;
-        esac
-        case "$1" in
-          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
-            ;;
-        esac
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_pathlist
 
 # func_emit_cwrapperexe_src
 # emit the source code for a wrapper executable on stdout
@@ -3141,31 +4147,23 @@ func_emit_cwrapperexe_src ()
 
    This wrapper executable should never be moved out of the build directory.
    If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "$SHELL $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
 */
 EOF
            cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef _MSC_VER
 # include <direct.h>
 # include <process.h>
 # include <io.h>
-# define setmode _setmode
 #else
 # include <unistd.h>
 # include <stdint.h>
 # ifdef __CYGWIN__
 #  include <io.h>
-#  define HAVE_SETENV
-#  ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-#  endif
 # endif
 #endif
 #include <malloc.h>
@@ -3177,6 +4175,44 @@ int setenv (const char *, const char *, int);
 #include <fcntl.h>
 #include <sys/stat.h>
 
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
 #if defined(PATH_MAX)
 # define LT_PATHMAX PATH_MAX
 #elif defined(MAXPATHLEN)
@@ -3192,14 +4228,7 @@ int setenv (const char *, const char *, int);
 # define S_IXGRP 0
 #endif
 
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#endif
-
+/* path handling portability macros */
 #ifndef DIR_SEPARATOR
 # define DIR_SEPARATOR '/'
 # define PATH_SEPARATOR ':'
@@ -3230,10 +4259,6 @@ int setenv (const char *, const char *, int);
 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
 #endif /* PATH_SEPARATOR_2 */
 
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
 #ifndef FOPEN_WB
 # define FOPEN_WB "w"
 #endif
@@ -3246,22 +4271,13 @@ int setenv (const char *, const char *, int);
   if (stale) { free ((void *) stale); stale = 0; } \
 } while (0)
 
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    (void) vfprintf (stderr, fmt, args);
-    va_end (args);
-}
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
 #else
-# define LTWRAPPER_DEBUGPRINTF(args)
+static int lt_debug = 0;
 #endif
 
-const char *program_name = NULL;
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
 
 void *xmalloc (size_t num);
 char *xstrdup (const char *string);
@@ -3271,41 +4287,27 @@ char *chase_symlinks (const char *pathspec);
 int make_executable (const char *path);
 int check_executable (const char *path);
 char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
 void lt_setenv (const char *name, const char *value);
 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
 void lt_update_exe_path (const char *name, const char *value);
 void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
-           func_emit_wrapper_part1 yes |
-               $SED -e 's/\([\\"]\)/\\\1/g' \
-                    -e 's/^/  "/' -e 's/$/\\n"/'
-           echo ";"
-           cat <<EOF
-
-static const char *script_text_part2 =
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
 EOF
-           func_emit_wrapper_part2 yes |
-               $SED -e 's/\([\\"]\)/\\\1/g' \
-                    -e 's/^/  "/' -e 's/$/\\n"/'
-           echo ";"
 
            cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
+volatile const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
            if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_pathlist "$temp_rpath"
+              func_to_host_path "$temp_rpath"
              cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
 EOF
            else
              cat <<"EOF"
@@ -3314,10 +4316,10 @@ EOF
            fi
 
            if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
+              func_to_host_path "$dllsearchpath:"
              cat <<EOF
 const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
 EOF
            else
              cat <<"EOF"
@@ -3340,24 +4342,10 @@ EOF
            cat <<"EOF"
 
 #define LTWRAPPER_OPTION_PREFIX         "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
 
-static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
 static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
 
 int
 main (int argc, char *argv[])
@@ -3374,10 +4362,13 @@ main (int argc, char *argv[])
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+  newargz = XMALLOC (char *, argc + 1);
 
-  /* very simple arg parsing; don't want to rely on getopt */
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
   for (i = 1; i < argc; i++)
     {
       if (strcmp (argv[i], dumpscript_opt) == 0)
@@ -3391,25 +4382,57 @@ EOF
              esac
 
            cat <<"EOF"
-         printf ("%s", script_text_part1);
-         printf ("%s", script_text_part2);
+         lt_dump_script (stdout);
          return 0;
        }
+      if (strcmp (argv[i], debug_opt) == 0)
+       {
+          lt_debug = 1;
+          continue;
+       }
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+                   "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
     }
+  newargz[++newargc] = NULL;
+
+EOF
+           cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+           cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
 
-  newargz = XMALLOC (char *, argc + 1);
   tmp_pathspec = find_executable (argv[0]);
   if (tmp_pathspec == NULL)
-    lt_fatal ("Couldn't find %s", argv[0]);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
-                         tmp_pathspec));
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+                 tmp_pathspec);
 
   actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
-                         actual_cwrapper_path));
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+                 actual_cwrapper_path);
   XFREE (tmp_pathspec);
 
-  actual_cwrapper_name = xstrdupbase_name (actual_cwrapper_path));
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
   strendzap (actual_cwrapper_path, actual_cwrapper_name);
 
   /* wrapper name transforms */
@@ -3427,8 +4450,9 @@ EOF
   target_name = tmp_pathspec;
   tmp_pathspec = 0;
 
-  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
-                         target_name));
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(main) libtool target name: %s\n",
+                 target_name);
 EOF
 
            cat <<EOF
@@ -3478,80 +4502,19 @@ EOF
 
   lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
   lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
 
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
-      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal ("Unrecognized option in %s namespace: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+                 nonnull (lt_argv_zero));
   for (i = 0; i < newargc; i++)
     {
-      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+                     i, nonnull (newargz[i]));
     }
 
 EOF
@@ -3560,11 +4523,14 @@ EOF
              mingw*)
                cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
   rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      lt_debugprintf (__FILE__, __LINE__,
+                     "(main) failed to launch target \"%s\": %s\n",
+                     lt_argv_zero, nonnull (strerror (errno)));
       return 127;
     }
   return rval;
@@ -3586,7 +4552,7 @@ xmalloc (size_t num)
 {
   void *p = (void *) malloc (num);
   if (!p)
-    lt_fatal ("Memory exhausted");
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
 
   return p;
 }
@@ -3620,8 +4586,8 @@ check_executable (const char *path)
 {
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
-                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3638,8 +4604,8 @@ make_executable (const char *path)
   int rval = 0;
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
-                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3665,8 +4631,8 @@ find_executable (const char *wrapper)
   int tmp_len;
   char *concat_name;
 
-  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
-                         wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
 
   if ((wrapper == NULL) || (*wrapper == '\0'))
     return NULL;
@@ -3719,7 +4685,8 @@ find_executable (const char *wrapper)
                {
                  /* empty path: current directory */
                  if (getcwd (tmp, LT_PATHMAX) == NULL)
-                   lt_fatal ("getcwd failed");
+                   lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
                  tmp_len = strlen (tmp);
                  concat_name =
                    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
@@ -3744,7 +4711,8 @@ find_executable (const char *wrapper)
     }
   /* Relative path | not found in path: prepend cwd */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
   tmp_len = strlen (tmp);
   concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
   memcpy (concat_name, tmp, tmp_len);
@@ -3770,8 +4738,9 @@ chase_symlinks (const char *pathspec)
   int has_symlinks = 0;
   while (strlen (tmp_pathspec) && !has_symlinks)
     {
-      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
-                             tmp_pathspec));
+      lt_debugprintf (__FILE__, __LINE__,
+                     "checking path component for symlinks: %s\n",
+                     tmp_pathspec);
       if (lstat (tmp_pathspec, &s) == 0)
        {
          if (S_ISLNK (s.st_mode) != 0)
@@ -3793,8 +4762,9 @@ chase_symlinks (const char *pathspec)
        }
       else
        {
-         char *errstr = strerror (errno);
-         lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+         lt_fatal (__FILE__, __LINE__,
+                   "error accessing file \"%s\": %s",
+                   tmp_pathspec, nonnull (strerror (errno)));
        }
     }
   XFREE (tmp_pathspec);
@@ -3807,7 +4777,8 @@ chase_symlinks (const char *pathspec)
   tmp_pathspec = realpath (pathspec, buf);
   if (tmp_pathspec == 0)
     {
-      lt_fatal ("Could not follow symlinks for %s", pathspec);
+      lt_fatal (__FILE__, __LINE__,
+               "could not follow symlinks for %s", pathspec);
     }
   return xstrdup (tmp_pathspec);
 #endif
@@ -3833,11 +4804,25 @@ strendzap (char *str, const char *pat)
   return str;
 }
 
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
 static void
-lt_error_core (int exit_status, const char *mode,
+lt_error_core (int exit_status, const char *file,
+              int line, const char *mode,
               const char *message, va_list ap)
 {
-  fprintf (stderr, "%s: %s: ", program_name, mode);
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
   vfprintf (stderr, message, ap);
   fprintf (stderr, ".\n");
 
@@ -3846,20 +4831,32 @@ lt_error_core (int exit_status, const char *mode,
 }
 
 void
-lt_fatal (const char *message, ...)
+lt_fatal (const char *file, int line, const char *message, ...)
 {
   va_list ap;
   va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
   va_end (ap);
 }
 
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
 void
 lt_setenv (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
   {
 #ifdef HAVE_SETENV
     /* always make a copy, for consistency with !HAVE_SETENV */
@@ -3904,95 +4901,12 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   return new_value;
 }
 
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
 void
 lt_update_exe_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
@@ -4011,9 +4925,9 @@ lt_update_exe_path (const char *name, const char *value)
 void
 lt_update_lib_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
@@ -4023,11 +4937,158 @@ lt_update_lib_path (const char *name, const char *value)
     }
 }
 
+EOF
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+       new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+       {
+         int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+         size_t length;
+         unsigned int backslashes;
+         const char *s;
+         char *quoted_string;
+         char *p;
+
+         length = 0;
+         backslashes = 0;
+         if (quote_around)
+           length++;
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               length += backslashes + 1;
+             length++;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           length += backslashes + 1;
+
+         quoted_string = XMALLOC (char, length + 1);
+
+         p = quoted_string;
+         backslashes = 0;
+         if (quote_around)
+           *p++ = '"';
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               {
+                 unsigned int j;
+                 for (j = backslashes + 1; j > 0; j--)
+                   *p++ = '\\';
+               }
+             *p++ = c;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           {
+             unsigned int j;
+             for (j = backslashes; j > 0; j--)
+               *p++ = '\\';
+             *p++ = '"';
+           }
+         *p = '\0';
+
+         new_argv[i] = quoted_string;
+       }
+      else
+       new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+               ;;
+           esac
 
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+           func_emit_wrapper yes |
+             $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
+            cat <<"EOF"
+}
 EOF
 }
 # end: func_emit_cwrapperexe_src
 
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
@@ -4072,6 +5133,7 @@ func_mode_link ()
     new_inherited_linker_flags=
 
     avoid_version=no
+    bindir=
     dlfiles=
     dlprefiles=
     dlself=no
@@ -4164,6 +5226,11 @@ func_mode_link ()
        esac
 
        case $prev in
+       bindir)
+         bindir="$arg"
+         prev=
+         continue
+         ;;
        dlfiles|dlprefiles)
          if test "$preload" = no; then
            # Add the symbol object into the linking commands.
@@ -4195,9 +5262,9 @@ func_mode_link ()
            ;;
          *)
            if test "$prev" = dlfiles; then
-             dlfiles="$dlfiles $arg"
+             func_append dlfiles " $arg"
            else
-             dlprefiles="$dlprefiles $arg"
+             func_append dlprefiles " $arg"
            fi
            prev=
            continue
@@ -4221,7 +5288,7 @@ func_mode_link ()
            *-*-darwin*)
              case "$deplibs " in
                *" $qarg.ltframework "*) ;;
-               *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+               *) func_append deplibs " $qarg.ltframework" # this is fixed later
                   ;;
              esac
              ;;
@@ -4240,7 +5307,7 @@ func_mode_link ()
            moreargs=
            for fil in `cat "$save_arg"`
            do
-#            moreargs="$moreargs $fil"
+#            func_append moreargs " $fil"
              arg=$fil
              # A libtool-controlled object.
 
@@ -4269,7 +5336,7 @@ func_mode_link ()
 
                  if test "$prev" = dlfiles; then
                    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-                     dlfiles="$dlfiles $pic_object"
+                     func_append dlfiles " $pic_object"
                      prev=
                      continue
                    else
@@ -4281,7 +5348,7 @@ func_mode_link ()
                  # CHECK ME:  I think I busted this.  -Ossama
                  if test "$prev" = dlprefiles; then
                    # Preload the old-style object.
-                   dlprefiles="$dlprefiles $pic_object"
+                   func_append dlprefiles " $pic_object"
                    prev=
                  fi
 
@@ -4351,12 +5418,12 @@ func_mode_link ()
          if test "$prev" = rpath; then
            case "$rpath " in
            *" $arg "*) ;;
-           *) rpath="$rpath $arg" ;;
+           *) func_append rpath " $arg" ;;
            esac
          else
            case "$xrpath " in
            *" $arg "*) ;;
-           *) xrpath="$xrpath $arg" ;;
+           *) func_append xrpath " $arg" ;;
            esac
          fi
          prev=
@@ -4368,28 +5435,28 @@ func_mode_link ()
          continue
          ;;
        weak)
-         weak_libs="$weak_libs $arg"
+         func_append weak_libs " $arg"
          prev=
          continue
          ;;
        xcclinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $qarg"
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $qarg"
          prev=
          func_append compile_command " $qarg"
          func_append finalize_command " $qarg"
          continue
          ;;
        xcompiler)
-         compiler_flags="$compiler_flags $qarg"
+         func_append compiler_flags " $qarg"
          prev=
          func_append compile_command " $qarg"
          func_append finalize_command " $qarg"
          continue
          ;;
        xlinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $wl$qarg"
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $wl$qarg"
          prev=
          func_append compile_command " $wl$qarg"
          func_append finalize_command " $wl$qarg"
@@ -4425,6 +5492,11 @@ func_mode_link ()
        continue
        ;;
 
+      -bindir)
+       prev=bindir
+       continue
+       ;;
+
       -dlopen)
        prev=dlfiles
        continue
@@ -4475,15 +5547,16 @@ func_mode_link ()
        ;;
 
       -L*)
-       func_stripname '-L' '' "$arg"
-       dir=$func_stripname_result
-       if test -z "$dir"; then
+       func_stripname "-L" '' "$arg"
+       if test -z "$func_stripname_result"; then
          if test "$#" -gt 0; then
            func_fatal_error "require no space between \`-L' and \`$1'"
          else
            func_fatal_error "need path for \`-L' option"
          fi
        fi
+       func_resolve_sysroot "$func_stripname_result"
+       dir=$func_resolve_sysroot_result
        # We need an absolute path.
        case $dir in
        [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4495,24 +5568,30 @@ func_mode_link ()
          ;;
        esac
        case "$deplibs " in
-       *" -L$dir "*) ;;
+       *" -L$dir "* | *" $arg "*)
+         # Will only happen for absolute or sysroot arguments
+         ;;
        *)
-         deplibs="$deplibs -L$dir"
-         lib_search_path="$lib_search_path $dir"
+         # Preserve sysroot, but never include relative directories
+         case $dir in
+           [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+           *) func_append deplibs " -L$dir" ;;
+         esac
+         func_append lib_search_path " $dir"
          ;;
        esac
        case $host in
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$dir:"*) ;;
          ::) dllsearchpath=$dir;;
-         *) dllsearchpath="$dllsearchpath:$dir";;
+         *) func_append dllsearchpath ":$dir";;
          esac
          case :$dllsearchpath: in
          *":$testbindir:"*) ;;
          ::) dllsearchpath=$testbindir;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         *) func_append dllsearchpath ":$testbindir";;
          esac
          ;;
        esac
@@ -4522,7 +5601,7 @@ func_mode_link ()
       -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
@@ -4536,7 +5615,7 @@ func_mode_link ()
            ;;
          *-*-rhapsody* | *-*-darwin1.[012])
            # Rhapsody C and math libraries are in the System framework
-           deplibs="$deplibs System.ltframework"
+           func_append deplibs " System.ltframework"
            continue
            ;;
          *-*-sco3.2v5* | *-*-sco5v6*)
@@ -4556,7 +5635,7 @@ func_mode_link ()
           ;;
         esac
        fi
-       deplibs="$deplibs $arg"
+       func_append deplibs " $arg"
        continue
        ;;
 
@@ -4568,21 +5647,22 @@ func_mode_link ()
       # Tru64 UNIX uses -model [arg] to determine the layout of C++
       # classes, name mangling, and exception handling.
       # Darwin uses the -arch flag to determine output architecture.
-      -model|-arch|-isysroot)
-       compiler_flags="$compiler_flags $arg"
+      -model|-arch|-isysroot|--sysroot)
+       func_append compiler_flags " $arg"
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        prev=xcompiler
        continue
        ;;
 
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-       compiler_flags="$compiler_flags $arg"
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+       func_append compiler_flags " $arg"
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        case "$new_inherited_linker_flags " in
            *" $arg "*) ;;
-           * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+           * ) func_append new_inherited_linker_flags " $arg" ;;
        esac
        continue
        ;;
@@ -4649,13 +5729,17 @@ func_mode_link ()
        # We need an absolute path.
        case $dir in
        [\\/]* | [A-Za-z]:[\\/]*) ;;
+       =*)
+         func_stripname '=' '' "$dir"
+         dir=$lt_sysroot$func_stripname_result
+         ;;
        *)
          func_fatal_error "only absolute run-paths are allowed"
          ;;
        esac
        case "$xrpath " in
        *" $dir "*) ;;
-       *) xrpath="$xrpath $dir" ;;
+       *) func_append xrpath " $dir" ;;
        esac
        continue
        ;;
@@ -4708,8 +5792,8 @@ func_mode_link ()
        for flag in $args; do
          IFS="$save_ifs"
           func_quote_for_eval "$flag"
-         arg="$arg $wl$func_quote_for_eval_result"
-         compiler_flags="$compiler_flags $func_quote_for_eval_result"
+         func_append arg " $func_quote_for_eval_result"
+         func_append compiler_flags " $func_quote_for_eval_result"
        done
        IFS="$save_ifs"
        func_stripname ' ' '' "$arg"
@@ -4724,9 +5808,9 @@ func_mode_link ()
        for flag in $args; do
          IFS="$save_ifs"
           func_quote_for_eval "$flag"
-         arg="$arg $wl$func_quote_for_eval_result"
-         compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
-         linker_flags="$linker_flags $func_quote_for_eval_result"
+         func_append arg " $wl$func_quote_for_eval_result"
+         func_append compiler_flags " $wl$func_quote_for_eval_result"
+         func_append linker_flags " $func_quote_for_eval_result"
        done
        IFS="$save_ifs"
        func_stripname ' ' '' "$arg"
@@ -4754,23 +5838,27 @@ func_mode_link ()
        arg="$func_quote_for_eval_result"
        ;;
 
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-      # @file GCC response files
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         func_quote_for_eval "$arg"
        arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
-        compiler_flags="$compiler_flags $arg"
+        func_append compiler_flags " $arg"
         continue
         ;;
 
@@ -4782,7 +5870,7 @@ func_mode_link ()
 
       *.$objext)
        # A standard object.
-       objs="$objs $arg"
+       func_append objs " $arg"
        ;;
 
       *.lo)
@@ -4813,7 +5901,7 @@ func_mode_link ()
 
            if test "$prev" = dlfiles; then
              if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-               dlfiles="$dlfiles $pic_object"
+               func_append dlfiles " $pic_object"
                prev=
                continue
              else
@@ -4825,7 +5913,7 @@ func_mode_link ()
            # CHECK ME:  I think I busted this.  -Ossama
            if test "$prev" = dlprefiles; then
              # Preload the old-style object.
-             dlprefiles="$dlprefiles $pic_object"
+             func_append dlprefiles " $pic_object"
              prev=
            fi
 
@@ -4870,24 +5958,25 @@ func_mode_link ()
 
       *.$libext)
        # An archive.
-       deplibs="$deplibs $arg"
-       old_deplibs="$old_deplibs $arg"
+       func_append deplibs " $arg"
+       func_append old_deplibs " $arg"
        continue
        ;;
 
       *.la)
        # A libtool-controlled library.
 
+       func_resolve_sysroot "$arg"
        if test "$prev" = dlfiles; then
          # This library was specified with -dlopen.
-         dlfiles="$dlfiles $arg"
+         func_append dlfiles " $func_resolve_sysroot_result"
          prev=
        elif test "$prev" = dlprefiles; then
          # The library was specified with -dlpreopen.
-         dlprefiles="$dlprefiles $arg"
+         func_append dlprefiles " $func_resolve_sysroot_result"
          prev=
        else
-         deplibs="$deplibs $arg"
+         func_append deplibs " $func_resolve_sysroot_result"
        fi
        continue
        ;;
@@ -4925,7 +6014,7 @@ func_mode_link ()
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
@@ -4934,6 +6023,8 @@ func_mode_link ()
 
     func_dirname "$output" "/" ""
     output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
     func_mkdir_p "$output_objdir"
 
@@ -4954,12 +6045,12 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_duplicate_deps ; then
+      if $opt_preserve_dup_deps ; then
        case "$libs " in
-       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       *" $deplib "*) func_append specialdeplibs " $deplib" ;;
        esac
       fi
-      libs="$libs $deplib"
+      func_append libs " $deplib"
     done
 
     if test "$linkmode" = lib; then
@@ -4972,9 +6063,9 @@ func_mode_link ()
       if $opt_duplicate_compiler_generated_deps; then
        for pre_post_dep in $predeps $postdeps; do
          case "$pre_post_deps " in
-         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
          esac
-         pre_post_deps="$pre_post_deps $pre_post_dep"
+         func_append pre_post_deps " $pre_post_dep"
        done
       fi
       pre_post_deps=
@@ -5044,17 +6135,19 @@ func_mode_link ()
        for lib in $dlprefiles; do
          # Ignore non-libtool-libs
          dependency_libs=
+         func_resolve_sysroot "$lib"
          case $lib in
-         *.la) func_source "$lib" ;;
+         *.la) func_source "$func_resolve_sysroot_result" ;;
          esac
 
          # Collect preopened libtool deplibs, except any this library
          # has declared as weak libs
          for deplib in $dependency_libs; do
-            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+           func_basename "$deplib"
+            deplib_base=$func_basename_result
            case " $weak_libs " in
            *" $deplib_base "*) ;;
-           *) deplibs="$deplibs $deplib" ;;
+           *) func_append deplibs " $deplib" ;;
            esac
          done
        done
@@ -5070,16 +6163,17 @@ func_mode_link ()
        lib=
        found=no
        case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
          if test "$linkmode,$pass" = "prog,link"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"
          else
-           compiler_flags="$compiler_flags $deplib"
+           func_append compiler_flags " $deplib"
            if test "$linkmode" = lib ; then
                case "$new_inherited_linker_flags " in
                    *" $deplib "*) ;;
-                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
                esac
            fi
          fi
@@ -5164,7 +6258,7 @@ func_mode_link ()
            if test "$linkmode" = lib ; then
                case "$new_inherited_linker_flags " in
                    *" $deplib "*) ;;
-                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
                esac
            fi
          fi
@@ -5177,7 +6271,8 @@ func_mode_link ()
            test "$pass" = conv && continue
            newdependency_libs="$deplib $newdependency_libs"
            func_stripname '-L' '' "$deplib"
-           newlib_search_path="$newlib_search_path $func_stripname_result"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
            ;;
          prog)
            if test "$pass" = conv; then
@@ -5191,7 +6286,8 @@ func_mode_link ()
              finalize_deplibs="$deplib $finalize_deplibs"
            fi
            func_stripname '-L' '' "$deplib"
-           newlib_search_path="$newlib_search_path $func_stripname_result"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
            ;;
          *)
            func_warning "\`-L' is ignored for archives/objects"
@@ -5202,17 +6298,21 @@ func_mode_link ()
        -R*)
          if test "$pass" = link; then
            func_stripname '-R' '' "$deplib"
-           dir=$func_stripname_result
+           func_resolve_sysroot "$func_stripname_result"
+           dir=$func_resolve_sysroot_result
            # Make sure the xrpath contains only unique directories.
            case "$xrpath " in
            *" $dir "*) ;;
-           *) xrpath="$xrpath $dir" ;;
+           *) func_append xrpath " $dir" ;;
            esac
          fi
          deplibs="$deplib $deplibs"
          continue
          ;;
-       *.la) lib="$deplib" ;;
+       *.la)
+         func_resolve_sysroot "$deplib"
+         lib=$func_resolve_sysroot_result
+         ;;
        *.$libext)
          if test "$pass" = conv; then
            deplibs="$deplib $deplibs"
@@ -5230,7 +6330,7 @@ func_mode_link ()
                match_pattern*)
                  set dummy $deplibs_check_method; shift
                  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-                 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+                 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
                    | $EGREP "$match_pattern_regex" > /dev/null; then
                    valid_a_lib=yes
                  fi
@@ -5240,15 +6340,15 @@ func_mode_link ()
                ;;
              esac
              if test "$valid_a_lib" != yes; then
-               $ECHO
+               echo
                $ECHO "*** Warning: Trying to link with static lib archive $deplib."
-               $ECHO "*** I have the capability to make that library automatically link in when"
-               $ECHO "*** you link to this library.  But I can only do this if you have a"
-               $ECHO "*** shared version of the library, which you do not appear to have"
-               $ECHO "*** because the file extensions .$libext of this argument makes me believe"
-               $ECHO "*** that it is just a static archive that I should not use here."
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because the file extensions .$libext of this argument makes me believe"
+               echo "*** that it is just a static archive that I should not use here."
              else
-               $ECHO
+               echo
                $ECHO "*** Warning: Linking the shared library $output against the"
                $ECHO "*** static library $deplib is not portable!"
                deplibs="$deplib $deplibs"
@@ -5275,11 +6375,11 @@ func_mode_link ()
            if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
              # If there is no dlopen support or we're linking statically,
              # we need to preload.
-             newdlprefiles="$newdlprefiles $deplib"
+             func_append newdlprefiles " $deplib"
              compile_deplibs="$deplib $compile_deplibs"
              finalize_deplibs="$deplib $finalize_deplibs"
            else
-             newdlfiles="$newdlfiles $deplib"
+             func_append newdlfiles " $deplib"
            fi
          fi
          continue
@@ -5321,20 +6421,20 @@ func_mode_link ()
 
        # Convert "-framework foo" to "foo.ltframework"
        if test -n "$inherited_linker_flags"; then
-         tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
          for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
            case " $new_inherited_linker_flags " in
              *" $tmp_inherited_linker_flag "*) ;;
-             *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+             *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
            esac
          done
        fi
-       dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
        if test "$linkmode,$pass" = "lib,link" ||
           test "$linkmode,$pass" = "prog,scan" ||
           { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+         test -n "$dlopen" && func_append dlfiles " $dlopen"
+         test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
        fi
 
        if test "$pass" = conv; then
@@ -5345,17 +6445,17 @@ func_mode_link ()
              func_fatal_error "cannot find name of link library for \`$lib'"
            fi
            # It is a libtool convenience library, so add in its objects.
-           convenience="$convenience $ladir/$objdir/$old_library"
-           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+           func_append convenience " $ladir/$objdir/$old_library"
+           func_append old_convenience " $ladir/$objdir/$old_library"
            tmp_libs=
            for deplib in $dependency_libs; do
              deplibs="$deplib $deplibs"
-             if $opt_duplicate_deps ; then
+             if $opt_preserve_dup_deps ; then
                case "$tmp_libs " in
-               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+               *" $deplib "*) func_append specialdeplibs " $deplib" ;;
                esac
              fi
-             tmp_libs="$tmp_libs $deplib"
+             func_append tmp_libs " $deplib"
            done
          elif test "$linkmode" != prog && test "$linkmode" != lib; then
            func_fatal_error "\`$lib' is not a convenience library"
@@ -5366,9 +6466,15 @@ func_mode_link ()
 
        # Get the name of the library we link against.
        linklib=
-       for l in $old_library $library_names; do
-         linklib="$l"
-       done
+       if test -n "$old_library" &&
+          { test "$prefer_static_libs" = yes ||
+            test "$prefer_static_libs,$installed" = "built,no"; }; then
+         linklib=$old_library
+       else
+         for l in $old_library $library_names; do
+           linklib="$l"
+         done
+       fi
        if test -z "$linklib"; then
          func_fatal_error "cannot find name of link library for \`$lib'"
        fi
@@ -5385,9 +6491,9 @@ func_mode_link ()
            # statically, we need to preload.  We also need to preload any
            # dependent libraries so libltdl's deplib preloader doesn't
            # bomb out in the load deplibs phase.
-           dlprefiles="$dlprefiles $lib $dependency_libs"
+           func_append dlprefiles " $lib $dependency_libs"
          else
-           newdlfiles="$newdlfiles $lib"
+           func_append newdlfiles " $lib"
          fi
          continue
        fi # $pass = dlopen
@@ -5409,14 +6515,14 @@ func_mode_link ()
 
        # Find the relevant object directory and library name.
        if test "X$installed" = Xyes; then
-         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+         if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
            func_warning "library \`$lib' was moved."
            dir="$ladir"
            absdir="$abs_ladir"
            libdir="$abs_ladir"
          else
-           dir="$libdir"
-           absdir="$libdir"
+           dir="$lt_sysroot$libdir"
+           absdir="$lt_sysroot$libdir"
          fi
          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
        else
@@ -5424,12 +6530,12 @@ func_mode_link ()
            dir="$ladir"
            absdir="$abs_ladir"
            # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
+           func_append notinst_path " $abs_ladir"
          else
            dir="$ladir/$objdir"
            absdir="$abs_ladir/$objdir"
            # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
+           func_append notinst_path " $abs_ladir"
          fi
        fi # $installed = yes
        func_stripname 'lib' '.la' "$laname"
@@ -5440,20 +6546,46 @@ func_mode_link ()
          if test -z "$libdir" && test "$linkmode" = prog; then
            func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
          fi
-         # Prefer using a static library (so that no silly _DYNAMIC symbols
-         # are required to link).
-         if test -n "$old_library"; then
-           newdlprefiles="$newdlprefiles $dir/$old_library"
-           # Keep a list of preopened convenience libraries to check
-           # that they are being used correctly in the link pass.
-           test -z "$libdir" && \
-               dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
-         # Otherwise, use the dlname, so that lt_dlopen finds it.
-         elif test -n "$dlname"; then
-           newdlprefiles="$newdlprefiles $dir/$dlname"
-         else
-           newdlprefiles="$newdlprefiles $dir/$linklib"
-         fi
+         case "$host" in
+           # special handling for platforms with PE-DLLs.
+           *cygwin* | *mingw* | *cegcc* )
+             # Linker will automatically link against shared library if both
+             # static and shared are present.  Therefore, ensure we extract
+             # symbols from the import library if a shared library is present
+             # (otherwise, the dlopen module name will be incorrect).  We do
+             # this by putting the import library name into $newdlprefiles.
+             # We recover the dlopen module name by 'saving' the la file
+             # name in a special purpose variable, and (later) extracting the
+             # dlname from the la file.
+             if test -n "$dlname"; then
+               func_tr_sh "$dir/$linklib"
+               eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+               func_append newdlprefiles " $dir/$linklib"
+             else
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             fi
+           ;;
+           * )
+             # Prefer using a static library (so that no silly _DYNAMIC symbols
+             # are required to link).
+             if test -n "$old_library"; then
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             # Otherwise, use the dlname, so that lt_dlopen finds it.
+             elif test -n "$dlname"; then
+               func_append newdlprefiles " $dir/$dlname"
+             else
+               func_append newdlprefiles " $dir/$linklib"
+             fi
+           ;;
+         esac
        fi # $pass = dlpreopen
 
        if test -z "$libdir"; then
@@ -5471,7 +6603,7 @@ func_mode_link ()
 
 
        if test "$linkmode" = prog && test "$pass" != link; then
-         newlib_search_path="$newlib_search_path $ladir"
+         func_append newlib_search_path " $ladir"
          deplibs="$lib $deplibs"
 
          linkalldeplibs=no
@@ -5484,7 +6616,8 @@ func_mode_link ()
          for deplib in $dependency_libs; do
            case $deplib in
            -L*) func_stripname '-L' '' "$deplib"
-                newlib_search_path="$newlib_search_path $func_stripname_result"
+                func_resolve_sysroot "$func_stripname_result"
+                func_append newlib_search_path " $func_resolve_sysroot_result"
                 ;;
            esac
            # Need to link against all dependency_libs?
@@ -5495,12 +6628,12 @@ func_mode_link ()
              # or/and link against static libraries
              newdependency_libs="$deplib $newdependency_libs"
            fi
-           if $opt_duplicate_deps ; then
+           if $opt_preserve_dup_deps ; then
              case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             *" $deplib "*) func_append specialdeplibs " $deplib" ;;
              esac
            fi
-           tmp_libs="$tmp_libs $deplib"
+           func_append tmp_libs " $deplib"
          done # for deplib
          continue
        fi # $linkmode = prog...
@@ -5515,7 +6648,7 @@ func_mode_link ()
              # Make sure the rpath contains only unique directories.
              case "$temp_rpath:" in
              *"$absdir:"*) ;;
-             *) temp_rpath="$temp_rpath$absdir:" ;;
+             *) func_append temp_rpath "$absdir:" ;;
              esac
            fi
 
@@ -5527,7 +6660,7 @@ func_mode_link ()
            *)
              case "$compile_rpath " in
              *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
+             *) func_append compile_rpath " $absdir" ;;
              esac
              ;;
            esac
@@ -5536,7 +6669,7 @@ func_mode_link ()
            *)
              case "$finalize_rpath " in
              *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
+             *) func_append finalize_rpath " $libdir" ;;
              esac
              ;;
            esac
@@ -5561,12 +6694,12 @@ func_mode_link ()
          case $host in
          *cygwin* | *mingw* | *cegcc*)
              # No point in relinking DLLs because paths are not encoded
-             notinst_deplibs="$notinst_deplibs $lib"
+             func_append notinst_deplibs " $lib"
              need_relink=no
            ;;
          *)
            if test "$installed" = no; then
-             notinst_deplibs="$notinst_deplibs $lib"
+             func_append notinst_deplibs " $lib"
              need_relink=yes
            fi
            ;;
@@ -5583,7 +6716,7 @@ func_mode_link ()
            fi
          done
          if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
-           $ECHO
+           echo
            if test "$linkmode" = prog; then
              $ECHO "*** Warning: Linking the executable $output against the loadable module"
            else
@@ -5601,7 +6734,7 @@ func_mode_link ()
            *)
              case "$compile_rpath " in
              *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
+             *) func_append compile_rpath " $absdir" ;;
              esac
              ;;
            esac
@@ -5610,7 +6743,7 @@ func_mode_link ()
            *)
              case "$finalize_rpath " in
              *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
+             *) func_append finalize_rpath " $libdir" ;;
              esac
              ;;
            esac
@@ -5664,7 +6797,7 @@ func_mode_link ()
            linklib=$newlib
          fi # test -n "$old_archive_from_expsyms_cmds"
 
-         if test "$linkmode" = prog || test "$mode" != relink; then
+         if test "$linkmode" = prog || test "$opt_mode" != relink; then
            add_shlibpath=
            add_dir=
            add=
@@ -5686,9 +6819,9 @@ func_mode_link ()
                      if test "X$dlopenmodule" != "X$lib"; then
                        $ECHO "*** Warning: lib $linklib is a module, not a shared library"
                        if test -z "$old_library" ; then
-                         $ECHO
-                         $ECHO "*** And there doesn't seem to be a static archive available"
-                         $ECHO "*** The link will probably fail, sorry"
+                         echo
+                         echo "*** And there doesn't seem to be a static archive available"
+                         echo "*** The link will probably fail, sorry"
                        else
                          add="$dir/$old_library"
                        fi
@@ -5715,12 +6848,12 @@ func_mode_link ()
                 test "$hardcode_direct_absolute" = no; then
                add="$dir/$linklib"
              elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
+               add_dir="-L$absdir"
                # Try looking first in the location we're being installed to.
                if test -n "$inst_prefix_dir"; then
                  case $libdir in
                    [\\/]*)
-                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                     func_append add_dir " -L$inst_prefix_dir$libdir"
                      ;;
                  esac
                fi
@@ -5742,7 +6875,7 @@ func_mode_link ()
            if test -n "$add_shlibpath"; then
              case :$compile_shlibpath: in
              *":$add_shlibpath:"*) ;;
-             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+             *) func_append compile_shlibpath "$add_shlibpath:" ;;
              esac
            fi
            if test "$linkmode" = prog; then
@@ -5756,13 +6889,13 @@ func_mode_link ()
                 test "$hardcode_shlibpath_var" = yes; then
                case :$finalize_shlibpath: in
                *":$libdir:"*) ;;
-               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               *) func_append finalize_shlibpath "$libdir:" ;;
                esac
              fi
            fi
          fi
 
-         if test "$linkmode" = prog || test "$mode" = relink; then
+         if test "$linkmode" = prog || test "$opt_mode" = relink; then
            add_shlibpath=
            add_dir=
            add=
@@ -5776,7 +6909,7 @@ func_mode_link ()
            elif test "$hardcode_shlibpath_var" = yes; then
              case :$finalize_shlibpath: in
              *":$libdir:"*) ;;
-             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+             *) func_append finalize_shlibpath "$libdir:" ;;
              esac
              add="-l$name"
            elif test "$hardcode_automatic" = yes; then
@@ -5793,7 +6926,7 @@ func_mode_link ()
              if test -n "$inst_prefix_dir"; then
                case $libdir in
                  [\\/]*)
-                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                   func_append add_dir " -L$inst_prefix_dir$libdir"
                    ;;
                esac
              fi
@@ -5828,21 +6961,21 @@ func_mode_link ()
 
            # Just print a warning and add the library to dependency_libs so
            # that the program can be linked against the static library.
-           $ECHO
+           echo
            $ECHO "*** Warning: This system can not link to static lib archive $lib."
-           $ECHO "*** I have the capability to make that library automatically link in when"
-           $ECHO "*** you link to this library.  But I can only do this if you have a"
-           $ECHO "*** shared version of the library, which you do not appear to have."
+           echo "*** I have the capability to make that library automatically link in when"
+           echo "*** you link to this library.  But I can only do this if you have a"
+           echo "*** shared version of the library, which you do not appear to have."
            if test "$module" = yes; then
-             $ECHO "*** But as you try to build a module library, libtool will still create "
-             $ECHO "*** a static module, that should work as long as the dlopening application"
-             $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             echo "*** But as you try to build a module library, libtool will still create "
+             echo "*** a static module, that should work as long as the dlopening application"
+             echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
              if test -z "$global_symbol_pipe"; then
-               $ECHO
-               $ECHO "*** However, this would only work if libtool was able to extract symbol"
-               $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-               $ECHO "*** not find such a program.  So, this module is probably useless."
-               $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+               echo
+               echo "*** However, this would only work if libtool was able to extract symbol"
+               echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               echo "*** not find such a program.  So, this module is probably useless."
+               echo "*** \`nm' from GNU binutils and a full rebuild may help."
              fi
              if test "$build_old_libs" = no; then
                build_libtool_libs=module
@@ -5870,27 +7003,33 @@ func_mode_link ()
                   temp_xrpath=$func_stripname_result
                   case " $xrpath " in
                   *" $temp_xrpath "*) ;;
-                  *) xrpath="$xrpath $temp_xrpath";;
+                  *) func_append xrpath " $temp_xrpath";;
                   esac;;
-             *) temp_deplibs="$temp_deplibs $libdir";;
+             *) func_append temp_deplibs " $libdir";;
              esac
            done
            dependency_libs="$temp_deplibs"
          fi
 
-         newlib_search_path="$newlib_search_path $absdir"
+         func_append newlib_search_path " $absdir"
          # Link against this library
          test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
          # ... and its dependency_libs
          tmp_libs=
          for deplib in $dependency_libs; do
            newdependency_libs="$deplib $newdependency_libs"
-           if $opt_duplicate_deps ; then
+           case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+           if $opt_preserve_dup_deps ; then
              case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
              esac
            fi
-           tmp_libs="$tmp_libs $deplib"
+           func_append tmp_libs " $func_resolve_sysroot_result"
          done
 
          if test "$link_all_deplibs" != no; then
@@ -5900,8 +7039,10 @@ func_mode_link ()
              case $deplib in
              -L*) path="$deplib" ;;
              *.la)
+               func_resolve_sysroot "$deplib"
+               deplib=$func_resolve_sysroot_result
                func_dirname "$deplib" "" "."
-               dir="$func_dirname_result"
+               dir=$func_dirname_result
                # We need an absolute path.
                case $dir in
                [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
@@ -5928,8 +7069,8 @@ func_mode_link ()
                       if test -z "$darwin_install_name"; then
                           darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-                     compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-                     linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+                     func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+                     func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
                      path=
                    fi
                  fi
@@ -5962,7 +7103,7 @@ func_mode_link ()
          compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
        else
-         compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
        fi
       fi
       dependency_libs="$newdependency_libs"
@@ -5979,7 +7120,7 @@ func_mode_link ()
          for dir in $newlib_search_path; do
            case "$lib_search_path " in
            *" $dir "*) ;;
-           *) lib_search_path="$lib_search_path $dir" ;;
+           *) func_append lib_search_path " $dir" ;;
            esac
          done
          newlib_search_path=
@@ -6037,10 +7178,10 @@ func_mode_link ()
            -L*)
              case " $tmp_libs " in
              *" $deplib "*) ;;
-             *) tmp_libs="$tmp_libs $deplib" ;;
+             *) func_append tmp_libs " $deplib" ;;
              esac
              ;;
-           *) tmp_libs="$tmp_libs $deplib" ;;
+           *) func_append tmp_libs " $deplib" ;;
            esac
          done
          eval $var=\"$tmp_libs\"
@@ -6056,7 +7197,7 @@ func_mode_link ()
          ;;
        esac
        if test -n "$i" ; then
-         tmp_libs="$tmp_libs $i"
+         func_append tmp_libs " $i"
        fi
       done
       dependency_libs=$tmp_libs
@@ -6097,7 +7238,7 @@ func_mode_link ()
       # Now set the variables for building old libraries.
       build_libtool_libs=no
       oldlibs="$output"
-      objs="$objs$old_deplibs"
+      func_append objs "$old_deplibs"
       ;;
 
     lib)
@@ -6130,10 +7271,10 @@ func_mode_link ()
        if test "$deplibs_check_method" != pass_all; then
          func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
        else
-         $ECHO
+         echo
          $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
          $ECHO "*** objects $objs is not portable!"
-         libobjs="$libobjs $objs"
+         func_append libobjs " $objs"
        fi
       fi
 
@@ -6192,13 +7333,14 @@ func_mode_link ()
          # which has an extra 1 added just for fun
          #
          case $version_type in
+         # correct linux to gnu/linux during the next big refactor
          darwin|linux|osf|windows|none)
            func_arith $number_major + $number_minor
            current=$func_arith_result
            age="$number_minor"
            revision="$number_revision"
            ;;
-         freebsd-aout|freebsd-elf|sunos)
+         freebsd-aout|freebsd-elf|qnx|sunos)
            current="$number_major"
            revision="$number_minor"
            age="0"
@@ -6311,7 +7453,7 @@ func_mode_link ()
          versuffix="$major.$revision"
          ;;
 
-       linux)
+       linux) # correct to gnu/linux during the next big refactor
          func_arith $current - $age
          major=.$func_arith_result
          versuffix="$major.$age.$revision"
@@ -6334,7 +7476,7 @@ func_mode_link ()
          done
 
          # Make executables depend on our current version.
-         verstring="$verstring:${current}.0"
+         func_append verstring ":${current}.0"
          ;;
 
        qnx)
@@ -6402,10 +7544,10 @@ func_mode_link ()
       fi
 
       func_generate_dlsyms "$libname" "$libname" "yes"
-      libobjs="$libobjs $symfileobj"
+      func_append libobjs " $symfileobj"
       test "X$libobjs" = "X " && libobjs=
 
-      if test "$mode" != relink; then
+      if test "$opt_mode" != relink; then
        # Remove our outputs, but don't remove object files since they
        # may have been created when compiling PIC objects.
        removelist=
@@ -6421,7 +7563,7 @@ func_mode_link ()
                   continue
                 fi
               fi
-              removelist="$removelist $p"
+              func_append removelist " $p"
               ;;
            *) ;;
          esac
@@ -6432,27 +7574,28 @@ func_mode_link ()
 
       # Now set the variables for building old libraries.
       if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+       func_append oldlibs " $output_objdir/$libname.$libext"
 
        # Transform .lo files to .o files.
-       oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
       #for path in $notinst_path; do
-      #        lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
-      #        deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
-      #        dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #        lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #        deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #        dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
       #done
 
       if test -n "$xrpath"; then
        # If the user specified any rpath flags, then add them.
        temp_xrpath=
        for libdir in $xrpath; do
-         temp_xrpath="$temp_xrpath -R$libdir"
+         func_replace_sysroot "$libdir"
+         func_append temp_xrpath " -R$func_replace_sysroot_result"
          case "$finalize_rpath " in
          *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         *) func_append finalize_rpath " $libdir" ;;
          esac
        done
        if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
@@ -6466,7 +7609,7 @@ func_mode_link ()
       for lib in $old_dlfiles; do
        case " $dlprefiles $dlfiles " in
        *" $lib "*) ;;
-       *) dlfiles="$dlfiles $lib" ;;
+       *) func_append dlfiles " $lib" ;;
        esac
       done
 
@@ -6476,19 +7619,19 @@ func_mode_link ()
       for lib in $old_dlprefiles; do
        case "$dlprefiles " in
        *" $lib "*) ;;
-       *) dlprefiles="$dlprefiles $lib" ;;
+       *) func_append dlprefiles " $lib" ;;
        esac
       done
 
       if test "$build_libtool_libs" = yes; then
        if test -n "$rpath"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
            # these systems don't actually have a c library (as such)!
            ;;
          *-*-rhapsody* | *-*-darwin1.[012])
            # Rhapsody C library is in the System framework
-           deplibs="$deplibs System.ltframework"
+           func_append deplibs " System.ltframework"
            ;;
          *-*-netbsd*)
            # Don't link with libc until the a.out ld.so is fixed.
@@ -6505,7 +7648,7 @@ func_mode_link ()
          *)
            # Add libc to deplibs on all other systems if necessary.
            if test "$build_libtool_need_lc" = "yes"; then
-             deplibs="$deplibs -lc"
+             func_append deplibs " -lc"
            fi
            ;;
          esac
@@ -6554,7 +7697,7 @@ EOF
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
                  case " $predeps $postdeps " in
                  *" $i "*)
-                   newdeplibs="$newdeplibs $i"
+                   func_append newdeplibs " $i"
                    i=""
                    ;;
                  esac
@@ -6565,21 +7708,21 @@ EOF
                  set dummy $deplib_matches; shift
                  deplib_match=$1
                  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   newdeplibs="$newdeplibs $i"
+                   func_append newdeplibs " $i"
                  else
                    droppeddeps=yes
-                   $ECHO
+                   echo
                    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                   $ECHO "*** I have the capability to make that library automatically link in when"
-                   $ECHO "*** you link to this library.  But I can only do this if you have a"
-                   $ECHO "*** shared version of the library, which I believe you do not have"
-                   $ECHO "*** because a test_compile did reveal that the linker did not use it for"
-                   $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+                   echo "*** I have the capability to make that library automatically link in when"
+                   echo "*** you link to this library.  But I can only do this if you have a"
+                   echo "*** shared version of the library, which I believe you do not have"
+                   echo "*** because a test_compile did reveal that the linker did not use it for"
+                   echo "*** its dynamic dependency list that programs get resolved with at runtime."
                  fi
                fi
                ;;
              *)
-               newdeplibs="$newdeplibs $i"
+               func_append newdeplibs " $i"
                ;;
              esac
            done
@@ -6597,7 +7740,7 @@ EOF
                  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
                    case " $predeps $postdeps " in
                    *" $i "*)
-                     newdeplibs="$newdeplibs $i"
+                     func_append newdeplibs " $i"
                      i=""
                      ;;
                    esac
@@ -6608,29 +7751,29 @@ EOF
                    set dummy $deplib_matches; shift
                    deplib_match=$1
                    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     newdeplibs="$newdeplibs $i"
+                     func_append newdeplibs " $i"
                    else
                      droppeddeps=yes
-                     $ECHO
+                     echo
                      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                     $ECHO "*** I have the capability to make that library automatically link in when"
-                     $ECHO "*** you link to this library.  But I can only do this if you have a"
-                     $ECHO "*** shared version of the library, which you do not appear to have"
-                     $ECHO "*** because a test_compile did reveal that the linker did not use this one"
-                     $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+                     echo "*** I have the capability to make that library automatically link in when"
+                     echo "*** you link to this library.  But I can only do this if you have a"
+                     echo "*** shared version of the library, which you do not appear to have"
+                     echo "*** because a test_compile did reveal that the linker did not use this one"
+                     echo "*** as a dynamic dependency that programs can get resolved with at runtime."
                    fi
                  fi
                else
                  droppeddeps=yes
-                 $ECHO
+                 echo
                  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-                 $ECHO "*** make it link in!  You will probably need to install it or some"
-                 $ECHO "*** library that it depends on before this library will be fully"
-                 $ECHO "*** functional.  Installing it before continuing would be even better."
+                 echo "*** make it link in!  You will probably need to install it or some"
+                 echo "*** library that it depends on before this library will be fully"
+                 echo "*** functional.  Installing it before continuing would be even better."
                fi
                ;;
              *)
-               newdeplibs="$newdeplibs $i"
+               func_append newdeplibs " $i"
                ;;
              esac
            done
@@ -6647,15 +7790,27 @@ EOF
              if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
                case " $predeps $postdeps " in
                *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
+                 func_append newdeplibs " $a_deplib"
                  a_deplib=""
                  ;;
                esac
              fi
              if test -n "$a_deplib" ; then
                libname=`eval "\\$ECHO \"$libname_spec\""`
+               if test -n "$file_magic_glob"; then
+                 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+               else
+                 libnameglob=$libname
+               fi
+               test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
                for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 if test "$want_nocaseglob" = yes; then
+                   shopt -s nocaseglob
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                   $nocaseglob
+                 else
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                 fi
                  for potent_lib in $potential_libs; do
                      # Follow soft links.
                      if ls -lLd "$potent_lib" 2>/dev/null |
@@ -6672,13 +7827,13 @@ EOF
                        potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
                        case $potliblink in
                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
                        esac
                      done
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
                         $SED -e 10q |
                         $EGREP "$file_magic_regex" > /dev/null; then
-                       newdeplibs="$newdeplibs $a_deplib"
+                       func_append newdeplibs " $a_deplib"
                        a_deplib=""
                        break 2
                      fi
@@ -6687,12 +7842,12 @@ EOF
              fi
              if test -n "$a_deplib" ; then
                droppeddeps=yes
-               $ECHO
+               echo
                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-               $ECHO "*** I have the capability to make that library automatically link in when"
-               $ECHO "*** you link to this library.  But I can only do this if you have a"
-               $ECHO "*** shared version of the library, which you do not appear to have"
-               $ECHO "*** because I did check the linker path looking for a file starting"
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
                if test -z "$potlib" ; then
                  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
                else
@@ -6703,7 +7858,7 @@ EOF
              ;;
            *)
              # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
+             func_append newdeplibs " $a_deplib"
              ;;
            esac
          done # Gone through all deplibs.
@@ -6719,7 +7874,7 @@ EOF
              if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
                case " $predeps $postdeps " in
                *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
+                 func_append newdeplibs " $a_deplib"
                  a_deplib=""
                  ;;
                esac
@@ -6730,9 +7885,9 @@ EOF
                  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
                  for potent_lib in $potential_libs; do
                    potlib="$potent_lib" # see symlink-check above in file_magic test
-                   if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+                   if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
                       $EGREP "$match_pattern_regex" > /dev/null; then
-                     newdeplibs="$newdeplibs $a_deplib"
+                     func_append newdeplibs " $a_deplib"
                      a_deplib=""
                      break 2
                    fi
@@ -6741,12 +7896,12 @@ EOF
              fi
              if test -n "$a_deplib" ; then
                droppeddeps=yes
-               $ECHO
+               echo
                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-               $ECHO "*** I have the capability to make that library automatically link in when"
-               $ECHO "*** you link to this library.  But I can only do this if you have a"
-               $ECHO "*** shared version of the library, which you do not appear to have"
-               $ECHO "*** because I did check the linker path looking for a file starting"
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
                if test -z "$potlib" ; then
                  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
                else
@@ -6757,32 +7912,32 @@ EOF
              ;;
            *)
              # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
+             func_append newdeplibs " $a_deplib"
              ;;
            esac
          done # Gone through all deplibs.
          ;;
        none | unknown | *)
          newdeplibs=""
-         tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-             -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+         tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
          if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
            for i in $predeps $postdeps ; do
              # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
            done
          fi
-         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
-            $GREP . >/dev/null; then
-           $ECHO
+         case $tmp_deplibs in
+         *[!\  \ ]*)
+           echo
            if test "X$deplibs_check_method" = "Xnone"; then
-             $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+             echo "*** Warning: inter-library dependencies are not supported in this platform."
            else
-             $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+             echo "*** Warning: inter-library dependencies are not known to be supported."
            fi
-           $ECHO "*** All declared inter-library dependencies are being dropped."
+           echo "*** All declared inter-library dependencies are being dropped."
            droppeddeps=yes
-         fi
+           ;;
+         esac
          ;;
        esac
        versuffix=$versuffix_save
@@ -6794,23 +7949,23 @@ EOF
        case $host in
        *-*-rhapsody* | *-*-darwin1.[012])
          # On Rhapsody replace the C library with the System framework
-         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
          ;;
        esac
 
        if test "$droppeddeps" = yes; then
          if test "$module" = yes; then
-           $ECHO
-           $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+           echo
+           echo "*** Warning: libtool could not satisfy all declared inter-library"
            $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
-           $ECHO "*** a static module, that should work as long as the dlopening"
-           $ECHO "*** application is linked with the -dlopen flag."
+           echo "*** a static module, that should work as long as the dlopening"
+           echo "*** application is linked with the -dlopen flag."
            if test -z "$global_symbol_pipe"; then
-             $ECHO
-             $ECHO "*** However, this would only work if libtool was able to extract symbol"
-             $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-             $ECHO "*** not find such a program.  So, this module is probably useless."
-             $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+             echo
+             echo "*** However, this would only work if libtool was able to extract symbol"
+             echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             echo "*** not find such a program.  So, this module is probably useless."
+             echo "*** \`nm' from GNU binutils and a full rebuild may help."
            fi
            if test "$build_old_libs" = no; then
              oldlibs="$output_objdir/$libname.$libext"
@@ -6820,16 +7975,16 @@ EOF
              build_libtool_libs=no
            fi
          else
-           $ECHO "*** The inter-library dependencies that have been dropped here will be"
-           $ECHO "*** automatically added whenever a program is linked with this library"
-           $ECHO "*** or is declared to -dlopen it."
+           echo "*** The inter-library dependencies that have been dropped here will be"
+           echo "*** automatically added whenever a program is linked with this library"
+           echo "*** or is declared to -dlopen it."
 
            if test "$allow_undefined" = no; then
-             $ECHO
-             $ECHO "*** Since this library must not contain undefined symbols,"
-             $ECHO "*** because either the platform does not support them or"
-             $ECHO "*** it was explicitly requested with -no-undefined,"
-             $ECHO "*** libtool will only create a static version of it."
+             echo
+             echo "*** Since this library must not contain undefined symbols,"
+             echo "*** because either the platform does not support them or"
+             echo "*** it was explicitly requested with -no-undefined,"
+             echo "*** libtool will only create a static version of it."
              if test "$build_old_libs" = no; then
                oldlibs="$output_objdir/$libname.$libext"
                build_libtool_libs=module
@@ -6846,9 +8001,9 @@ EOF
       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
       case $host in
        *-*-darwin*)
-         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-         new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
          ;;
       esac
 
@@ -6861,7 +8016,7 @@ EOF
        *)
          case " $deplibs " in
          *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
+           func_append new_libs " -L$path/$objdir" ;;
          esac
          ;;
        esac
@@ -6871,10 +8026,10 @@ EOF
        -L*)
          case " $new_libs " in
          *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
+         *) func_append new_libs " $deplib" ;;
          esac
          ;;
-       *) new_libs="$new_libs $deplib" ;;
+       *) func_append new_libs " $deplib" ;;
        esac
       done
       deplibs="$new_libs"
@@ -6886,15 +8041,22 @@ EOF
 
       # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
+       # Remove ${wl} instances when linking with ld.
+       # FIXME: should test the right _cmds variable.
+       case $archive_cmds in
+         *\$LD\ *) wl= ;;
+        esac
        if test "$hardcode_into_libs" = yes; then
          # Hardcode the library paths
          hardcode_libdirs=
          dep_rpath=
          rpath="$finalize_rpath"
-         test "$mode" != relink && rpath="$compile_rpath$rpath"
+         test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
          for libdir in $rpath; do
            if test -n "$hardcode_libdir_flag_spec"; then
              if test -n "$hardcode_libdir_separator"; then
+               func_replace_sysroot "$libdir"
+               libdir=$func_replace_sysroot_result
                if test -z "$hardcode_libdirs"; then
                  hardcode_libdirs="$libdir"
                else
@@ -6903,18 +8065,18 @@ EOF
                  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
                    ;;
                  *)
-                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
                    ;;
                  esac
                fi
              else
                eval flag=\"$hardcode_libdir_flag_spec\"
-               dep_rpath="$dep_rpath $flag"
+               func_append dep_rpath " $flag"
              fi
            elif test -n "$runpath_var"; then
              case "$perm_rpath " in
              *" $libdir "*) ;;
-             *) perm_rpath="$perm_rpath $libdir" ;;
+             *) func_append perm_rpath " $libdir" ;;
              esac
            fi
          done
@@ -6922,17 +8084,13 @@ EOF
          if test -n "$hardcode_libdir_separator" &&
             test -n "$hardcode_libdirs"; then
            libdir="$hardcode_libdirs"
-           if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           else
-             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-           fi
+           eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
          fi
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
            # We should set the runpath_var.
            rpath=
            for dir in $perm_rpath; do
-             rpath="$rpath$dir:"
+             func_append rpath "$dir:"
            done
            eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
          fi
@@ -6940,7 +8098,7 @@ EOF
        fi
 
        shlibpath="$finalize_shlibpath"
-       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
        if test -n "$shlibpath"; then
          eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
        fi
@@ -6966,18 +8124,18 @@ EOF
        linknames=
        for link
        do
-         linknames="$linknames $link"
+         func_append linknames " $link"
        done
 
        # Use standard objects if they are pic
-       test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
        test "X$libobjs" = "X " && libobjs=
 
        delfiles=
        if test -n "$export_symbols" && test -n "$include_expsyms"; then
          $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
          export_symbols="$output_objdir/$libname.uexp"
-         delfiles="$delfiles $export_symbols"
+         func_append delfiles " $export_symbols"
        fi
 
        orig_export_symbols=
@@ -7008,13 +8166,45 @@ EOF
            $opt_dry_run || $RM $export_symbols
            cmds=$export_symbols_cmds
            save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
+           for cmd1 in $cmds; do
              IFS="$save_ifs"
-             eval cmd=\"$cmd\"
-             func_len " $cmd"
-             len=$func_len_result
-             if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+             # Take the normal branch if the nm_file_list_spec branch
+             # doesn't work or if tool conversion is not needed.
+             case $nm_file_list_spec~$to_tool_file_cmd in
+               *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+                 try_normal_branch=yes
+                 eval cmd=\"$cmd1\"
+                 func_len " $cmd"
+                 len=$func_len_result
+                 ;;
+               *)
+                 try_normal_branch=no
+                 ;;
+             esac
+             if test "$try_normal_branch" = yes \
+                && { test "$len" -lt "$max_cmd_len" \
+                     || test "$max_cmd_len" -le -1; }
+             then
+               func_show_eval "$cmd" 'exit $?'
+               skipped_export=false
+             elif test -n "$nm_file_list_spec"; then
+               func_basename "$output"
+               output_la=$func_basename_result
+               save_libobjs=$libobjs
+               save_output=$output
+               output=${output_objdir}/${output_la}.nm
+               func_to_tool_file "$output"
+               libobjs=$nm_file_list_spec$func_to_tool_file_result
+               func_append delfiles " $output"
+               func_verbose "creating $NM input file list: $output"
+               for obj in $save_libobjs; do
+                 func_to_tool_file "$obj"
+                 $ECHO "$func_to_tool_file_result"
+               done > "$output"
+               eval cmd=\"$cmd1\"
                func_show_eval "$cmd" 'exit $?'
+               output=$save_output
+               libobjs=$save_libobjs
                skipped_export=false
              else
                # The command line is too long to execute in one step.
@@ -7036,7 +8226,7 @@ EOF
        if test -n "$export_symbols" && test -n "$include_expsyms"; then
          tmp_export_symbols="$export_symbols"
          test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-         $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+         $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
        fi
 
        if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
@@ -7048,7 +8238,7 @@ EOF
          # global variables. join(1) would be nice here, but unfortunately
          # isn't a blessed tool.
          $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-         delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+         func_append delfiles " $export_symbols $output_objdir/$libname.filter"
          export_symbols=$output_objdir/$libname.def
          $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
        fi
@@ -7058,7 +8248,7 @@ EOF
          case " $convenience " in
          *" $test_deplib "*) ;;
          *)
-           tmp_deplibs="$tmp_deplibs $test_deplib"
+           func_append tmp_deplibs " $test_deplib"
            ;;
          esac
        done
@@ -7078,21 +8268,21 @@ EOF
            test "X$libobjs" = "X " && libobjs=
          else
            gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
+           func_append generated " $gentop"
 
            func_extract_archives $gentop $convenience
-           libobjs="$libobjs $func_extract_archives_result"
+           func_append libobjs " $func_extract_archives_result"
            test "X$libobjs" = "X " && libobjs=
          fi
        fi
 
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
          eval flag=\"$thread_safe_flag_spec\"
-         linker_flags="$linker_flags $flag"
+         func_append linker_flags " $flag"
        fi
 
        # Make a backup of the uninstalled library when relinking
-       if test "$mode" = relink; then
+       if test "$opt_mode" = relink; then
          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
        fi
 
@@ -7137,7 +8327,8 @@ EOF
            save_libobjs=$libobjs
          fi
          save_output=$output
-         output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+         func_basename "$output"
+         output_la=$func_basename_result
 
          # Clear the reloadable object creation command queue and
          # initialize k to one.
@@ -7150,13 +8341,16 @@ EOF
          if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
            output=${output_objdir}/${output_la}.lnkscript
            func_verbose "creating GNU ld script: $output"
-           $ECHO 'INPUT (' > $output
+           echo 'INPUT (' > $output
            for obj in $save_libobjs
            do
-             $ECHO "$obj" >> $output
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
            done
-           $ECHO ')' >> $output
-           delfiles="$delfiles $output"
+           echo ')' >> $output
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$func_to_tool_file_result
          elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
            output=${output_objdir}/${output_la}.lnk
            func_verbose "creating linker input file list: $output"
@@ -7170,10 +8364,12 @@ EOF
            fi
            for obj
            do
-             $ECHO "$obj" >> $output
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
            done
-           delfiles="$delfiles $output"
-           output=$firstobj\"$file_list_spec$output\"
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
          else
            if test -n "$save_libobjs"; then
              func_verbose "creating reloadable object files..."
@@ -7197,17 +8393,19 @@ EOF
                  # command to the queue.
                  if test "$k" -eq 1 ; then
                    # The first file doesn't have a previous command to add.
-                   eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+                   reload_objs=$objlist
+                   eval concat_cmds=\"$reload_cmds\"
                  else
                    # All subsequent reloadable object files will link in
                    # the last one created.
-                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+                   reload_objs="$objlist $last_robj"
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
                  fi
                  last_robj=$output_objdir/$output_la-${k}.$objext
                  func_arith $k + 1
                  k=$func_arith_result
                  output=$output_objdir/$output_la-${k}.$objext
-                 objlist=$obj
+                 objlist=" $obj"
                  func_len " $last_robj"
                  func_arith $len0 + $func_len_result
                  len=$func_arith_result
@@ -7217,11 +8415,12 @@ EOF
              # reloadable object file.  All subsequent reloadable object
              # files will link in the last one created.
              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+             reload_objs="$objlist $last_robj"
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
              if test -n "$last_robj"; then
                eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
              fi
-             delfiles="$delfiles $output"
+             func_append delfiles " $output"
 
            else
              output=
@@ -7255,7 +8454,7 @@ EOF
                lt_exit=$?
 
                # Restore the uninstalled library and exit
-               if test "$mode" = relink; then
+               if test "$opt_mode" = relink; then
                  ( cd "$output_objdir" && \
                    $RM "${realname}T" && \
                    $MV "${realname}U" "$realname" )
@@ -7276,7 +8475,7 @@ EOF
            if test -n "$export_symbols" && test -n "$include_expsyms"; then
              tmp_export_symbols="$export_symbols"
              test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-             $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+             $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
            fi
 
            if test -n "$orig_export_symbols"; then
@@ -7288,7 +8487,7 @@ EOF
              # global variables. join(1) would be nice here, but unfortunately
              # isn't a blessed tool.
              $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-             delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+             func_append delfiles " $export_symbols $output_objdir/$libname.filter"
              export_symbols=$output_objdir/$libname.def
              $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
            fi
@@ -7329,10 +8528,10 @@ EOF
        # Add any objects from preloaded convenience libraries
        if test -n "$dlprefiles"; then
          gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
+         func_append generated " $gentop"
 
          func_extract_archives $gentop $dlprefiles
-         libobjs="$libobjs $func_extract_archives_result"
+         func_append libobjs " $func_extract_archives_result"
          test "X$libobjs" = "X " && libobjs=
        fi
 
@@ -7348,7 +8547,7 @@ EOF
            lt_exit=$?
 
            # Restore the uninstalled library and exit
-           if test "$mode" = relink; then
+           if test "$opt_mode" = relink; then
              ( cd "$output_objdir" && \
                $RM "${realname}T" && \
                $MV "${realname}U" "$realname" )
@@ -7360,7 +8559,7 @@ EOF
        IFS="$save_ifs"
 
        # Restore the uninstalled library and exit
-       if test "$mode" = relink; then
+       if test "$opt_mode" = relink; then
          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
          if test -n "$convenience"; then
@@ -7441,18 +8640,21 @@ EOF
       if test -n "$convenience"; then
        if test -n "$whole_archive_flag_spec"; then
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-         reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+         reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
        else
          gentop="$output_objdir/${obj}x"
-         generated="$generated $gentop"
+         func_append generated " $gentop"
 
          func_extract_archives $gentop $convenience
          reload_conv_objs="$reload_objs $func_extract_archives_result"
        fi
       fi
 
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
       output="$obj"
       func_execute_cmds "$reload_cmds" 'exit $?'
@@ -7512,8 +8714,8 @@ EOF
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
        # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
        ;;
       esac
 
@@ -7524,14 +8726,14 @@ EOF
        if test "$tagname" = CXX ; then
          case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
            10.[0123])
-             compile_command="$compile_command ${wl}-bind_at_load"
-             finalize_command="$finalize_command ${wl}-bind_at_load"
+             func_append compile_command " ${wl}-bind_at_load"
+             func_append finalize_command " ${wl}-bind_at_load"
            ;;
          esac
        fi
        # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
        ;;
       esac
 
@@ -7545,7 +8747,7 @@ EOF
        *)
          case " $compile_deplibs " in
          *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
+           func_append new_libs " -L$path/$objdir" ;;
          esac
          ;;
        esac
@@ -7555,17 +8757,17 @@ EOF
        -L*)
          case " $new_libs " in
          *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
+         *) func_append new_libs " $deplib" ;;
          esac
          ;;
-       *) new_libs="$new_libs $deplib" ;;
+       *) func_append new_libs " $deplib" ;;
        esac
       done
       compile_deplibs="$new_libs"
 
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
 
       if test -n "$rpath$xrpath"; then
        # If the user specified any rpath flags, then add them.
@@ -7573,7 +8775,7 @@ EOF
          # This is the magic to use -rpath.
          case "$finalize_rpath " in
          *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         *) func_append finalize_rpath " $libdir" ;;
          esac
        done
       fi
@@ -7592,18 +8794,18 @@ EOF
              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
                ;;
              *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
                ;;
              esac
            fi
          else
            eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
+           func_append rpath " $flag"
          fi
        elif test -n "$runpath_var"; then
          case "$perm_rpath " in
          *" $libdir "*) ;;
-         *) perm_rpath="$perm_rpath $libdir" ;;
+         *) func_append perm_rpath " $libdir" ;;
          esac
        fi
        case $host in
@@ -7612,12 +8814,12 @@ EOF
          case :$dllsearchpath: in
          *":$libdir:"*) ;;
          ::) dllsearchpath=$libdir;;
-         *) dllsearchpath="$dllsearchpath:$libdir";;
+         *) func_append dllsearchpath ":$libdir";;
          esac
          case :$dllsearchpath: in
          *":$testbindir:"*) ;;
          ::) dllsearchpath=$testbindir;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         *) func_append dllsearchpath ":$testbindir";;
          esac
          ;;
        esac
@@ -7643,18 +8845,18 @@ EOF
              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
                ;;
              *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
                ;;
              esac
            fi
          else
            eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
+           func_append rpath " $flag"
          fi
        elif test -n "$runpath_var"; then
          case "$finalize_perm_rpath " in
          *" $libdir "*) ;;
-         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+         *) func_append finalize_perm_rpath " $libdir" ;;
          esac
        fi
       done
@@ -7668,8 +8870,8 @@ EOF
 
       if test -n "$libobjs" && test "$build_old_libs" = yes; then
        # Transform all the library objects into standard objects.
-       compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-       finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+       finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
       func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
@@ -7681,15 +8883,15 @@ EOF
 
       wrappers_required=yes
       case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
       *cygwin* | *mingw* )
         if test "$build_libtool_libs" != yes; then
           wrappers_required=no
         fi
         ;;
-      *cegcc)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
       *)
         if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
           wrappers_required=no
@@ -7698,13 +8900,19 @@ EOF
       esac
       if test "$wrappers_required" = no; then
        # Replace the output file specification.
-       compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
        link_command="$compile_command$compile_rpath"
 
        # We have no uninstalled library dependencies, so finalize right now.
        exit_status=0
        func_show_eval "$link_command" 'exit_status=$?'
 
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
        # Delete the generated files.
        if test -f "$output_objdir/${outputname}S.${objext}"; then
          func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
@@ -7727,7 +8935,7 @@ EOF
          # We should set the runpath_var.
          rpath=
          for dir in $perm_rpath; do
-           rpath="$rpath$dir:"
+           func_append rpath "$dir:"
          done
          compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
        fi
@@ -7735,7 +8943,7 @@ EOF
          # We should set the runpath_var.
          rpath=
          for dir in $finalize_perm_rpath; do
-           rpath="$rpath$dir:"
+           func_append rpath "$dir:"
          done
          finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
        fi
@@ -7745,11 +8953,18 @@ EOF
        # We don't need to create a wrapper script.
        link_command="$compile_var$compile_command$compile_rpath"
        # Replace the output file specification.
-       link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
        # Delete the old output file.
        $opt_dry_run || $RM $output
        # Link the executable and exit
        func_show_eval "$link_command" 'exit $?'
+
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
        exit $EXIT_SUCCESS
       fi
 
@@ -7764,7 +8979,7 @@ EOF
        if test "$fast_install" != no; then
          link_command="$finalize_var$compile_command$finalize_rpath"
          if test "$fast_install" = yes; then
-           relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+           relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
          else
            # fast_install is set to needless
            relink_command=
@@ -7776,13 +8991,19 @@ EOF
       fi
 
       # Replace the output file specification.
-      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
       # Delete the old output files.
       $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
       func_show_eval "$link_command" 'exit $?'
 
+      if test -n "$postlink_cmds"; then
+       func_to_tool_file "$output_objdir/$outputname"
+       postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+       func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
       # Now create the wrapper script.
       func_verbose "creating $output"
 
@@ -7800,18 +9021,7 @@ EOF
          fi
        done
        relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $ECHO for shipping.
-      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
-       case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-       esac
-       qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-       qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
       fi
 
       # Only actually do things if not in dry run mode.
@@ -7891,7 +9101,7 @@ EOF
        else
          oldobjs="$old_deplibs $non_pic_objects"
          if test "$preload" = yes && test -f "$symfileobj"; then
-           oldobjs="$oldobjs $symfileobj"
+           func_append oldobjs " $symfileobj"
          fi
        fi
        addlibs="$old_convenience"
@@ -7899,10 +9109,10 @@ EOF
 
       if test -n "$addlibs"; then
        gentop="$output_objdir/${outputname}x"
-       generated="$generated $gentop"
+       func_append generated " $gentop"
 
        func_extract_archives $gentop $addlibs
-       oldobjs="$oldobjs $func_extract_archives_result"
+       func_append oldobjs " $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
@@ -7913,10 +9123,10 @@ EOF
        # Add any objects from preloaded convenience libraries
        if test -n "$dlprefiles"; then
          gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
+         func_append generated " $gentop"
 
          func_extract_archives $gentop $dlprefiles
-         oldobjs="$oldobjs $func_extract_archives_result"
+         func_append oldobjs " $func_extract_archives_result"
        fi
 
        # POSIX demands no paths to be encoded in archives.  We have
@@ -7932,9 +9142,9 @@ EOF
            done | sort | sort -uc >/dev/null 2>&1); then
          :
        else
-         $ECHO "copying selected object files to avoid basename conflicts..."
+         echo "copying selected object files to avoid basename conflicts..."
          gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
+         func_append generated " $gentop"
          func_mkdir_p "$gentop"
          save_oldobjs=$oldobjs
          oldobjs=
@@ -7958,18 +9168,30 @@ EOF
                esac
              done
              func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-             oldobjs="$oldobjs $gentop/$newobj"
+             func_append oldobjs " $gentop/$newobj"
              ;;
-           *) oldobjs="$oldobjs $obj" ;;
+           *) func_append oldobjs " $obj" ;;
            esac
          done
        fi
+       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+       tool_oldlib=$func_to_tool_file_result
        eval cmds=\"$old_archive_cmds\"
 
        func_len " $cmds"
        len=$func_len_result
        if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
          cmds=$old_archive_cmds
+       elif test -n "$archiver_list_spec"; then
+         func_verbose "using command file archive linking..."
+         for obj in $oldobjs
+         do
+           func_to_tool_file "$obj"
+           $ECHO "$func_to_tool_file_result"
+         done > $output_objdir/$libname.libcmd
+         func_to_tool_file "$output_objdir/$libname.libcmd"
+         oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+         cmds=$old_archive_cmds
        else
          # the command line is too long to link in one step, link in parts
          func_verbose "using piecewise archive linking..."
@@ -8043,7 +9265,7 @@ EOF
       done
       # Quote the link command for shipping.
       relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
       if test "$hardcode_automatic" = yes ; then
        relink_command=
       fi
@@ -8063,12 +9285,23 @@ EOF
              *.la)
                func_basename "$deplib"
                name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               func_resolve_sysroot "$deplib"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
                test -z "$libdir" && \
                  func_fatal_error "\`$deplib' is not a valid libtool archive"
-               newdependency_libs="$newdependency_libs $libdir/$name"
+               func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             -L*)
+               func_stripname -L '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -L$func_replace_sysroot_result"
                ;;
-             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             -R*)
+               func_stripname -R '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -R$func_replace_sysroot_result"
+               ;;
+             *) func_append newdependency_libs " $deplib" ;;
              esac
            done
            dependency_libs="$newdependency_libs"
@@ -8082,9 +9315,9 @@ EOF
                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
                test -z "$libdir" && \
                  func_fatal_error "\`$lib' is not a valid libtool archive"
-               newdlfiles="$newdlfiles $libdir/$name"
+               func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
                ;;
-             *) newdlfiles="$newdlfiles $lib" ;;
+             *) func_append newdlfiles " $lib" ;;
              esac
            done
            dlfiles="$newdlfiles"
@@ -8101,7 +9334,7 @@ EOF
                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
                test -z "$libdir" && \
                  func_fatal_error "\`$lib' is not a valid libtool archive"
-               newdlprefiles="$newdlprefiles $libdir/$name"
+               func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
                ;;
              esac
            done
@@ -8113,7 +9346,7 @@ EOF
                [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
                *) abs=`pwd`"/$lib" ;;
              esac
-             newdlfiles="$newdlfiles $abs"
+             func_append newdlfiles " $abs"
            done
            dlfiles="$newdlfiles"
            newdlprefiles=
@@ -8122,15 +9355,33 @@ EOF
                [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
                *) abs=`pwd`"/$lib" ;;
              esac
-             newdlprefiles="$newdlprefiles $abs"
+             func_append newdlprefiles " $abs"
            done
            dlprefiles="$newdlprefiles"
          fi
          $RM $output
          # place dlname in correct position for cygwin
+         # In fact, it would be nice if we could use this code for all target
+         # systems that can't hard-code library paths into their executables
+         # and that have no shared library path variable independent of PATH,
+         # but it turns out we can't easily determine that from inspecting
+         # libtool variables, so we have to hard-code the OSs to which it
+         # applies here; at the moment, that means platforms that use the PE
+         # object format with DLL files.  See the long comment at the top of
+         # tests/bindir.at for full details.
          tdlname=$dlname
          case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+             # If a -bindir argument was supplied, place the dll there.
+             if test "x$bindir" != x ;
+             then
+               func_relative_path "$install_libdir" "$bindir"
+               tdlname=$func_relative_path_result$dlname
+             else
+               # Otherwise fall back on heuristic.
+               tdlname=../bin/$dlname
+             fi
+             ;;
          esac
          $ECHO > $output "\
 # $outputname - a libtool library file
@@ -8189,7 +9440,7 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$mode" = link || test "$mode" = relink; } &&
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
     func_mode_link ${1+"$@"}
 
 
@@ -8209,9 +9460,9 @@ func_mode_uninstall ()
     for arg
     do
       case $arg in
-      -f) RM="$RM $arg"; rmforce=yes ;;
-      -*) RM="$RM $arg" ;;
-      *) files="$files $arg" ;;
+      -f) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
       esac
     done
 
@@ -8220,24 +9471,23 @@ func_mode_uninstall ()
 
     rmdirs=
 
-    origobjdir="$objdir"
     for file in $files; do
       func_dirname "$file" "" "."
       dir="$func_dirname_result"
       if test "X$dir" = X.; then
-       objdir="$origobjdir"
+       odir="$objdir"
       else
-       objdir="$dir/$origobjdir"
+       odir="$dir/$objdir"
       fi
       func_basename "$file"
       name="$func_basename_result"
-      test "$mode" = uninstall && objdir="$dir"
+      test "$opt_mode" = uninstall && odir="$dir"
 
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
        case " $rmdirs " in
-         *" $objdir "*) ;;
-         *) rmdirs="$rmdirs $objdir" ;;
+         *" $odir "*) ;;
+         *) func_append rmdirs " $odir" ;;
        esac
       fi
 
@@ -8263,18 +9513,17 @@ func_mode_uninstall ()
 
          # Delete the libtool libraries and symlinks.
          for n in $library_names; do
-           rmfiles="$rmfiles $objdir/$n"
+           func_append rmfiles " $odir/$n"
          done
-         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+         test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-         case "$mode" in
+         case "$opt_mode" in
          clean)
-           case "  $library_names " in
-           # "  " in the beginning catches empty $dlname
+           case " $library_names " in
            *" $dlname "*) ;;
-           *) rmfiles="$rmfiles $objdir/$dlname" ;;
+           *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
            esac
-           test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
            ;;
          uninstall)
            if test -n "$library_names"; then
@@ -8302,19 +9551,19 @@ func_mode_uninstall ()
          # Add PIC object to the list of files to remove.
          if test -n "$pic_object" &&
             test "$pic_object" != none; then
-           rmfiles="$rmfiles $dir/$pic_object"
+           func_append rmfiles " $dir/$pic_object"
          fi
 
          # Add non-PIC object to the list of files to remove.
          if test -n "$non_pic_object" &&
             test "$non_pic_object" != none; then
-           rmfiles="$rmfiles $dir/$non_pic_object"
+           func_append rmfiles " $dir/$non_pic_object"
          fi
        fi
        ;;
 
       *)
-       if test "$mode" = clean ; then
+       if test "$opt_mode" = clean ; then
          noexename=$name
          case $file in
          *.exe)
@@ -8324,7 +9573,7 @@ func_mode_uninstall ()
            noexename=$func_stripname_result
            # $file with .exe has already been added to rmfiles,
            # add $file without .exe
-           rmfiles="$rmfiles $file"
+           func_append rmfiles " $file"
            ;;
          esac
          # Do a test to see if this is a libtool program.
@@ -8333,7 +9582,7 @@ func_mode_uninstall ()
              func_ltwrapper_scriptname "$file"
              relink_command=
              func_source $func_ltwrapper_scriptname_result
-             rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+             func_append rmfiles " $func_ltwrapper_scriptname_result"
            else
              relink_command=
              func_source $dir/$noexename
@@ -8341,12 +9590,12 @@ func_mode_uninstall ()
 
            # note $name still contains .exe if it was in $file originally
            # as does the version of $file that was added into $rmfiles
-           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+           func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
            if test "$fast_install" = yes && test -n "$relink_command"; then
-             rmfiles="$rmfiles $objdir/lt-$name"
+             func_append rmfiles " $odir/lt-$name"
            fi
            if test "X$noexename" != "X$name" ; then
-             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+             func_append rmfiles " $odir/lt-${noexename}.c"
            fi
          fi
        fi
@@ -8354,7 +9603,6 @@ func_mode_uninstall ()
       esac
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
-    objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
@@ -8366,16 +9614,16 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
     func_mode_uninstall ${1+"$@"}
 
-test -z "$mode" && {
+test -z "$opt_mode" && {
   help="$generic_help"
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$mode'"
+  func_fatal_help "invalid operation mode \`$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
index 413293b..2467128 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 56
+# serial 66
 
 
 dnl CURL_CHECK_COMPILER
@@ -40,6 +40,8 @@ AC_DEFUN([CURL_CHECK_COMPILER], [
   flags_opt_yes="unknown"
   flags_opt_off="unknown"
   #
+  flags_prefer_cppflags="no"
+  #
   CURL_CHECK_COMPILER_DEC_C
   CURL_CHECK_COMPILER_HPUX_C
   CURL_CHECK_COMPILER_IBM_C
@@ -95,7 +97,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
     flags_dbg_all="$flags_dbg_all -gdwarf-2"
     flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
     flags_opt_yes="-Os"
     flags_opt_off="-O0"
@@ -119,7 +121,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_DEC_C], [
     compiler_id="DEC_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g2"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
     flags_opt_yes="-O1"
     flags_opt_off="-O0"
@@ -155,10 +157,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
     flags_dbg_all="$flags_dbg_all -gdwarf-2"
     flags_dbg_all="$flags_dbg_all -gvms"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
+    CURL_CHECK_DEF([_WIN32], [], [silent])
   else
     AC_MSG_RESULT([no])
   fi
@@ -210,6 +213,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_IBM_C], [
     flags_opt_all="$flags_opt_all -qoptimize=5"
     flags_opt_yes="-O2"
     flags_opt_off="-qnooptimize"
+    flags_prefer_cppflags="yes"
   else
     AC_MSG_RESULT([no])
   fi
@@ -232,7 +236,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_INTEL_C], [
       compiler_id="INTEL_UNIX_C"
       flags_dbg_all="-g -g0"
       flags_dbg_yes="-g"
-      flags_dbg_off="-g0"
+      flags_dbg_off=""
       flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
       flags_opt_yes="-O2"
       flags_opt_off="-O0"
@@ -296,7 +300,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [
     compiler_id="SGI_MIPS_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -323,7 +327,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSPRO_C], [
     compiler_id="SGI_MIPSPRO_C"
     flags_dbg_all="-g -g0 -g1 -g2 -g3"
     flags_dbg_yes="-g"
-    flags_dbg_off="-g0"
+    flags_dbg_off=""
     flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
     flags_opt_yes="-O2"
     flags_opt_off="-O0"
@@ -420,35 +424,39 @@ dnl GNUC versions these warnings are not silenced.
 
 AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
   AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
-  tmp_has_include="no"
-  tmp_chg_FLAGS="$CFLAGS"
-  for word1 in $tmp_chg_FLAGS; do
-    case "$word1" in
-      -I*)
-        tmp_has_include="yes"
-        ;;
-    esac
-  done
-  if test "$tmp_has_include" = "yes"; then
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
-    CFLAGS="$tmp_chg_FLAGS"
-    squeeze CFLAGS
-  fi
-  tmp_has_include="no"
-  tmp_chg_FLAGS="$CPPFLAGS"
-  for word1 in $tmp_chg_FLAGS; do
-    case "$word1" in
-      -I*)
-        tmp_has_include="yes"
-        ;;
-    esac
-  done
-  if test "$tmp_has_include" = "yes"; then
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
-    tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
-    CPPFLAGS="$tmp_chg_FLAGS"
-    squeeze CPPFLAGS
+  AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+  if test "$compiler_id" = "GNU_C" ||
+    test "$compiler_id" = "CLANG"; then
+    tmp_has_include="no"
+    tmp_chg_FLAGS="$CFLAGS"
+    for word1 in $tmp_chg_FLAGS; do
+      case "$word1" in
+        -I*)
+          tmp_has_include="yes"
+          ;;
+      esac
+    done
+    if test "$tmp_has_include" = "yes"; then
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+      CFLAGS="$tmp_chg_FLAGS"
+      squeeze CFLAGS
+    fi
+    tmp_has_include="no"
+    tmp_chg_FLAGS="$CPPFLAGS"
+    for word1 in $tmp_chg_FLAGS; do
+      case "$word1" in
+        -I*)
+          tmp_has_include="yes"
+          ;;
+      esac
+    done
+    if test "$tmp_has_include" = "yes"; then
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+      tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+      CPPFLAGS="$tmp_chg_FLAGS"
+      squeeze CPPFLAGS
+    fi
   fi
 ])
 
@@ -586,15 +594,15 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
       IBM_C)
         #
         dnl Ensure that compiler optimizations are always thread-safe.
-        tmp_CFLAGS="$tmp_CFLAGS -qthreaded"
+        tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
         dnl Disable type based strict aliasing optimizations, using worst
         dnl case aliasing assumptions when compiling. Type based aliasing
         dnl would restrict the lvalues that could be safely used to access
         dnl a data object.
-        tmp_CFLAGS="$tmp_CFLAGS -qnoansialias"
+        tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
         dnl Force compiler to stop after the compilation phase, without
         dnl generating an object code file when compilation has errors.
-        tmp_CFLAGS="$tmp_CFLAGS -qhalt=e"
+        tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
         ;;
         #
       INTEL_UNIX_C)
@@ -720,8 +728,13 @@ AC_DEFUN([CURL_SET_COMPILER_DEBUG_OPTS], [
       tmp_options="$flags_dbg_off"
     fi
     #
-    CPPFLAGS="$tmp_CPPFLAGS"
-    CFLAGS="$tmp_CFLAGS $tmp_options"
+    if test "$flags_prefer_cppflags" = "yes"; then
+      CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+      CFLAGS="$tmp_CFLAGS"
+    else
+      CPPFLAGS="$tmp_CPPFLAGS"
+      CFLAGS="$tmp_CFLAGS $tmp_options"
+    fi
     squeeze CPPFLAGS
     squeeze CFLAGS
     CURL_COMPILER_WORKS_IFELSE([
@@ -796,8 +809,13 @@ AC_DEFUN([CURL_SET_COMPILER_OPTIMIZE_OPTS], [
         AC_MSG_CHECKING([if compiler accepts optimizer disabling options])
         tmp_options="$flags_opt_off"
       fi
-      CPPFLAGS="$tmp_CPPFLAGS"
-      CFLAGS="$tmp_CFLAGS $tmp_options"
+      if test "$flags_prefer_cppflags" = "yes"; then
+        CPPFLAGS="$tmp_CPPFLAGS $tmp_options"
+        CFLAGS="$tmp_CFLAGS"
+      else
+        CPPFLAGS="$tmp_CPPFLAGS"
+        CFLAGS="$tmp_CFLAGS $tmp_options"
+      fi
       squeeze CPPFLAGS
       squeeze CFLAGS
       CURL_COMPILER_WORKS_IFELSE([
@@ -838,8 +856,6 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
       CLANG)
         #
         if test "$want_warnings" = "yes"; then
-          dnl All versions of clang support the same warnings as at least
-          dnl gcc 4.2.1 except -Wunused.
           tmp_CFLAGS="$tmp_CFLAGS -pedantic"
           tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
           tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
@@ -947,10 +963,16 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
             tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
           fi
           #
+          dnl Only gcc 4.0 or later
+          if test "$compiler_num" -ge "400"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+          fi
+          #
           dnl Only gcc 4.2 or later
           if test "$compiler_num" -ge "402"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
           fi
+          #
           dnl Only gcc 4.3 or later
           if test "$compiler_num" -ge "403"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wtype-limits -Wold-style-declaration"
@@ -959,6 +981,14 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
             tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
           fi
           #
+          dnl Only gcc 4.5 or later
+          if test "$compiler_num" -ge "405"; then
+            dnl Only windows targets
+            if test "$curl_cv_have_def__WIN32" = "yes"; then
+              tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+            fi
+          fi
+          #
         fi
         #
         dnl Do not issue warnings for code in system include paths.
@@ -1165,6 +1195,7 @@ dnl library or as a shared one on those systems on which
 dnl shared libraries support undefined symbols.
 
 AC_DEFUN([CURL_CHECK_CURLDEBUG], [
+  AC_REQUIRE([XC_LIBTOOL])dnl
   AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
   supports_curldebug="unknown"
   if test "$want_curldebug" = "yes"; then
@@ -1180,7 +1211,7 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
     fi
     if test "$supports_curldebug" != "no"; then
       if test "$enable_shared" = "yes" &&
-        test "$need_no_undefined" = "yes"; then
+        test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
         supports_curldebug="no"
         AC_MSG_WARN([shared library does not support undefined symbols.])
       fi
@@ -1198,55 +1229,16 @@ AC_DEFUN([CURL_CHECK_CURLDEBUG], [
   fi
   #
   if test "$want_curldebug" = "yes"; then
-    CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
+    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
     squeeze CPPFLAGS
   fi
   if test "$want_debug" = "yes"; then
-    CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
+    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
     squeeze CPPFLAGS
   fi
 ])
 
 
-dnl CURL_CHECK_NO_UNDEFINED
-dnl -------------------------------------------------
-dnl Checks if the -no-undefined flag must be used when
-dnl building shared libraries. This is required on all
-dnl systems on which shared libraries should not have
-dnl references to undefined symbols. This check should
-dnl not be done before AC-PROG-LIBTOOL.
-
-AC_DEFUN([CURL_CHECK_NO_UNDEFINED], [
-  AC_BEFORE([$0],[CURL_CHECK_CURLDEBUG])dnl
-  AC_MSG_CHECKING([if shared libraries need -no-undefined])
-  need_no_undefined="no"
-  case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
-      need_no_undefined="yes"
-      ;;
-  esac
-  if test "x$allow_undefined" = "xno"; then
-    need_no_undefined="yes"
-  elif test "x$allow_undefined_flag" = "xunsupported"; then
-    need_no_undefined="yes"
-  fi
-  AC_MSG_RESULT($need_no_undefined)
-])
-
-
-dnl CURL_CHECK_PROG_CC
-dnl -------------------------------------------------
-dnl Check for compiler program, preventing CFLAGS and
-dnl CPPFLAGS from being unexpectedly changed.
-
-AC_DEFUN([CURL_CHECK_PROG_CC], [
-  ac_save_CFLAGS="$CFLAGS"
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_PROG_CC
-  CFLAGS="$ac_save_CFLAGS"
-  CPPFLAGS="$ac_save_CPPFLAGS"
-])
-
 
 dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
 dnl -------------------------------------------------
@@ -1357,6 +1349,150 @@ AC_DEFUN([CURL_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
 ])
 
 
+dnl CURL_CHECK_COMPILER_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Verify if compiler supports hiding library internal symbols, setting
+dnl shell variable supports_symbol_hiding value as appropriate, as well as
+dnl variables symbol_hiding_CFLAGS and symbol_hiding_EXTERN when supported.
+
+AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
+  AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+  AC_BEFORE([$0],[CURL_CONFIGURE_SYMBOL_HIDING])dnl
+  AC_MSG_CHECKING([if compiler supports hiding library internal symbols])
+  supports_symbol_hiding="no"
+  symbol_hiding_CFLAGS=""
+  symbol_hiding_EXTERN=""
+  tmp_CFLAGS=""
+  tmp_EXTERN=""
+  case "$compiler_id" in
+    CLANG)
+      dnl All versions of clang support -fvisibility=
+      tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+      tmp_CFLAGS="-fvisibility=hidden"
+      supports_symbol_hiding="yes"
+      ;;
+    GNU_C)
+      dnl Only gcc 3.4 or later
+      if test "$compiler_num" -ge "304"; then
+        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+          tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+          tmp_CFLAGS="-fvisibility=hidden"
+          supports_symbol_hiding="yes"
+        fi
+      fi
+      ;;
+    INTEL_UNIX_C)
+      dnl Only icc 9.0 or later
+      if test "$compiler_num" -ge "900"; then
+        if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
+          tmp_save_CFLAGS="$CFLAGS"
+          CFLAGS="$CFLAGS -fvisibility=hidden"
+          AC_LINK_IFELSE([
+            AC_LANG_PROGRAM([[
+#             include <stdio.h>
+            ]],[[
+              printf("icc fvisibility bug test");
+            ]])
+          ],[
+            tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
+            tmp_CFLAGS="-fvisibility=hidden"
+            supports_symbol_hiding="yes"
+          ])
+          CFLAGS="$tmp_save_CFLAGS"
+        fi
+      fi
+      ;;
+    SUNPRO_C)
+      if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
+        tmp_EXTERN="__global"
+        tmp_CFLAGS="-xldscope=hidden"
+        supports_symbol_hiding="yes"
+      fi
+      ;;
+  esac
+  if test "$supports_symbol_hiding" = "yes"; then
+    tmp_save_CFLAGS="$CFLAGS"
+    CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
+    squeeze CFLAGS
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+        $tmp_EXTERN char *dummy(char *buff);
+        char *dummy(char *buff)
+        {
+         if(buff)
+           return ++buff;
+         else
+           return buff;
+        }
+      ]],[[
+        char b[16];
+        char *r = dummy(&b[0]);
+        if(r)
+          return (int)*r;
+      ]])
+    ],[
+      supports_symbol_hiding="yes"
+      if test -f conftest.err; then
+        grep 'visibility' conftest.err >/dev/null
+        if test "$?" -eq "0"; then
+          supports_symbol_hiding="no"
+        fi
+      fi
+    ],[
+      supports_symbol_hiding="no"
+      echo " " >&6
+      sed 's/^/cc-src: /' conftest.$ac_ext >&6
+      sed 's/^/cc-err: /' conftest.err >&6
+      echo " " >&6
+    ])
+    CFLAGS="$tmp_save_CFLAGS"
+  fi
+  if test "$supports_symbol_hiding" = "yes"; then
+    AC_MSG_RESULT([yes])
+    symbol_hiding_CFLAGS="$tmp_CFLAGS"
+    symbol_hiding_EXTERN="$tmp_EXTERN"
+  else
+    AC_MSG_RESULT([no])
+  fi
+])
+
+
+dnl CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
+dnl -------------------------------------------------
+dnl Verifies if the compiler actually halts after the
+dnl compilation phase without generating any object
+dnl code file, when the source code tries to redefine
+dnl a prototype which does not match previous one.
+
+AC_DEFUN([CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH], [
+  AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
+  AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
+  AC_COMPILE_IFELSE([
+    AC_LANG_PROGRAM([[
+#     include <stdlib.h>
+      int rand(int n);
+      int rand(int n)
+      {
+        if(n)
+          return ++n;
+        else
+          return n;
+      }
+    ]],[[
+      int i[2];
+      int j = rand(i[0]);
+      if(j)
+        return j;
+    ]])
+  ],[
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR([compiler does not halt on function prototype mismatch.])
+  ],[
+    AC_MSG_RESULT([yes])
+  ])
+])
+
+
 dnl CURL_VAR_MATCH (VARNAME, VALUE)
 dnl -------------------------------------------------
 dnl Verifies if shell variable VARNAME contains VALUE.
index 30fb025..44b018e 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 14
+# serial 19
 
 dnl CURL_CHECK_OPTION_THREADED_RESOLVER
 dnl -------------------------------------------------
@@ -145,7 +145,7 @@ dnl variable want_debug value as appropriate.
 AC_DEFUN([CURL_CHECK_OPTION_DEBUG], [
   AC_BEFORE([$0],[CURL_CHECK_OPTION_WARNINGS])dnl
   AC_BEFORE([$0],[CURL_CHECK_OPTION_CURLDEBUG])dnl
-  AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+  AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
   AC_MSG_CHECKING([whether to enable debug build options])
   OPT_DEBUG_BUILD="default"
   AC_ARG_ENABLE(debug,
@@ -169,39 +169,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug build options]),
   AC_MSG_RESULT([$want_debug])
 ])
 
-
-dnl CURL_CHECK_OPTION_NONBLOCKING
-dnl -------------------------------------------------
-dnl Verify if configure has been invoked with option
-dnl --enable-nonblocking or --disable-nonblocking, and
-dnl set shell variable want_nonblocking as appropriate.
-
-AC_DEFUN([CURL_CHECK_OPTION_NONBLOCKING], [
-  AC_BEFORE([$0],[CURL_CHECK_NONBLOCKING_SOCKET])dnl
-  AC_MSG_CHECKING([whether to enable non-blocking communications])
-  OPT_NONBLOCKING="default"
-  AC_ARG_ENABLE(nonblocking,
-AC_HELP_STRING([--enable-nonblocking],[Enable non-blocking communications])
-AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking communications]),
-  OPT_NONBLOCKING=$enableval)
-  case "$OPT_NONBLOCKING" in
-    no)
-      dnl --disable-nonblocking option used
-      want_nonblocking="no"
-      ;;
-    default)
-      dnl configure option not specified
-      want_nonblocking="yes"
-      ;;
-    *)
-      dnl --enable-nonblocking option used
-      want_nonblocking="yes"
-      ;;
-  esac
-  AC_MSG_RESULT([$want_nonblocking])
-])
-
-
 dnl CURL_CHECK_OPTION_OPTIMIZE
 dnl -------------------------------------------------
 dnl Verify if configure has been invoked with option
@@ -210,7 +177,7 @@ dnl shell variable want_optimize value as appropriate.
 
 AC_DEFUN([CURL_CHECK_OPTION_OPTIMIZE], [
   AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
-  AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+  AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
   AC_MSG_CHECKING([whether to enable compiler optimizer])
   OPT_COMPILER_OPTIMIZE="default"
   AC_ARG_ENABLE(optimize,
@@ -258,6 +225,50 @@ AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
 ])
 
 
+dnl CURL_CHECK_OPTION_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-symbol-hiding or --disable-symbol-hiding,
+dnl setting shell variable want_symbol_hiding value.
+
+AC_DEFUN([CURL_CHECK_OPTION_SYMBOL_HIDING], [
+  AC_BEFORE([$0],[CURL_CHECK_COMPILER_SYMBOL_HIDING])dnl
+  AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
+  OPT_SYMBOL_HIDING="default"
+  AC_ARG_ENABLE(symbol-hiding,
+AC_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
+AC_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
+  OPT_SYMBOL_HIDING=$enableval)
+  AC_ARG_ENABLE(hidden-symbols,
+AC_HELP_STRING([--enable-hidden-symbols],[To be deprecated, use --enable-symbol-hiding])
+AC_HELP_STRING([--disable-hidden-symbols],[To be deprecated, use --disable-symbol-hiding]),
+  OPT_SYMBOL_HIDING=$enableval)
+  case "$OPT_SYMBOL_HIDING" in
+    no)
+      dnl --disable-symbol-hiding option used.
+      dnl This is an indication to not attempt hiding of library internal
+      dnl symbols. Default symbol visibility will be used, which normally
+      dnl exposes all library internal symbols.
+      want_symbol_hiding="no"
+      AC_MSG_RESULT([no])
+      ;;
+    default)
+      dnl configure's symbol-hiding option not specified.
+      dnl Handle this as if --enable-symbol-hiding option was given.
+      want_symbol_hiding="yes"
+      AC_MSG_RESULT([yes])
+      ;;
+    *)
+      dnl --enable-symbol-hiding option used.
+      dnl This is an indication to attempt hiding of library internal
+      dnl symbols. This is only supported on some compilers/linkers.
+      want_symbol_hiding="yes"
+      AC_MSG_RESULT([yes])
+      ;;
+  esac
+])
+
+
 dnl CURL_CHECK_OPTION_THREADS
 dnl -------------------------------------------------
 dnl Verify if configure has been invoked with option
@@ -315,7 +326,7 @@ dnl shell variable want_warnings as appropriate.
 AC_DEFUN([CURL_CHECK_OPTION_WARNINGS], [
   AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
   AC_BEFORE([$0],[CURL_CHECK_OPTION_WERROR])dnl
-  AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
+  AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
   AC_MSG_CHECKING([whether to enable strict compiler warnings])
   OPT_COMPILER_WARNINGS="default"
   AC_ARG_ENABLE(warnings,
@@ -377,7 +388,6 @@ dnl -------------------------------------------------
 dnl Check for how to set a socket into non-blocking state.
 
 AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
-  AC_REQUIRE([CURL_CHECK_OPTION_NONBLOCKING])dnl
   AC_REQUIRE([CURL_CHECK_FUNC_FCNTL])dnl
   AC_REQUIRE([CURL_CHECK_FUNC_IOCTL])dnl
   AC_REQUIRE([CURL_CHECK_FUNC_IOCTLSOCKET])dnl
@@ -385,29 +395,52 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], [
   AC_REQUIRE([CURL_CHECK_FUNC_SETSOCKOPT])dnl
   #
   tst_method="unknown"
-  if test "$want_nonblocking" = "yes"; then
-    AC_MSG_CHECKING([how to set a socket into non-blocking mode])
-    if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
-      tst_method="fcntl O_NONBLOCK"
-    elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
-      tst_method="ioctl FIONBIO"
-    elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
-      tst_method="ioctlsocket FIONBIO"
-    elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
-      tst_method="IoctlSocket FIONBIO"
-    elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
-      tst_method="setsockopt SO_NONBLOCK"
-    fi
-    AC_MSG_RESULT([$tst_method])
-    if test "$tst_method" = "unknown"; then
-      AC_MSG_WARN([cannot determine non-blocking socket method.])
-    fi
+
+  AC_MSG_CHECKING([how to set a socket into non-blocking mode])
+  if test "x$ac_cv_func_fcntl_o_nonblock" = "xyes"; then
+    tst_method="fcntl O_NONBLOCK"
+  elif test "x$ac_cv_func_ioctl_fionbio" = "xyes"; then
+    tst_method="ioctl FIONBIO"
+  elif test "x$ac_cv_func_ioctlsocket_fionbio" = "xyes"; then
+    tst_method="ioctlsocket FIONBIO"
+  elif test "x$ac_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then
+    tst_method="IoctlSocket FIONBIO"
+  elif test "x$ac_cv_func_setsockopt_so_nonblock" = "xyes"; then
+    tst_method="setsockopt SO_NONBLOCK"
   fi
+  AC_MSG_RESULT([$tst_method])
   if test "$tst_method" = "unknown"; then
-    AC_DEFINE_UNQUOTED(USE_BLOCKING_SOCKETS, 1,
-      [Define to disable non-blocking sockets.])
-    AC_MSG_WARN([non-blocking sockets disabled.])
+    AC_MSG_WARN([cannot determine non-blocking socket method.])
+  fi
+])
+
+
+dnl CURL_CONFIGURE_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
+dnl configure option, and compiler capability to actually honor such
+dnl option, this will modify compiler flags as appropriate and also
+dnl provide needed definitions for configuration and Makefile.am files.
+dnl This macro should not be used until all compilation tests have
+dnl been done to prevent interferences on other tests.
+
+AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [
+  AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
+  CFLAG_CURL_SYMBOL_HIDING=""
+  doing_symbol_hiding="no"
+  if test x"$ac_cv_native_windows" != "xyes" &&
+    test "$want_symbol_hiding" = "yes" &&
+    test "$supports_symbol_hiding" = "yes"; then
+    doing_symbol_hiding="yes"
+    CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
+    AC_DEFINE_UNQUOTED(CURL_EXTERN_SYMBOL, $symbol_hiding_EXTERN,
+      [Definition to make a library symbol externally visible.])
+    AC_MSG_RESULT([yes])
+  else
+    AC_MSG_RESULT([no])
   fi
+  AM_CONDITIONAL(DOING_CURL_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes)
+  AC_SUBST(CFLAG_CURL_SYMBOL_HIDING)
 ])
 
 
@@ -496,3 +529,64 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
   fi
 ])
 
+
+dnl CURL_CHECK_OPTION_NTLM_WB
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-ntlm-wb or --disable-ntlm-wb, and set
+dnl shell variable want_ntlm_wb and want_ntlm_wb_file
+dnl as appropriate.
+
+AC_DEFUN([CURL_CHECK_OPTION_NTLM_WB], [
+  AC_BEFORE([$0],[CURL_CHECK_NTLM_WB])dnl
+  OPT_NTLM_WB="default"
+  AC_ARG_ENABLE(ntlm-wb,
+AC_HELP_STRING([--enable-ntlm-wb@<:@=FILE@:>@],[Enable NTLM delegation to winbind's ntlm_auth helper, where FILE is ntlm_auth's absolute filename (default: /usr/bin/ntlm_auth)])
+AC_HELP_STRING([--disable-ntlm-wb],[Disable NTLM delegation to winbind's ntlm_auth helper]),
+  OPT_NTLM_WB=$enableval)
+  want_ntlm_wb_file="/usr/bin/ntlm_auth"
+  case "$OPT_NTLM_WB" in
+    no)
+      dnl --disable-ntlm-wb option used
+      want_ntlm_wb="no"
+      ;;
+    default)
+      dnl configure option not specified
+      want_ntlm_wb="yes"
+      ;;
+    *)
+      dnl --enable-ntlm-wb option used
+      want_ntlm_wb="yes"
+      if test -n "$enableval" && test "$enableval" != "yes"; then
+        want_ntlm_wb_file="$enableval"
+      fi
+      ;;
+  esac
+])
+
+
+dnl CURL_CHECK_NTLM_WB
+dnl -------------------------------------------------
+dnl Check if support for NTLM delegation to winbind's
+dnl ntlm_auth helper will finally be enabled depending
+dnl on given configure options and target platform.
+
+AC_DEFUN([CURL_CHECK_NTLM_WB], [
+  AC_REQUIRE([CURL_CHECK_OPTION_NTLM_WB])dnl
+  AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+  AC_MSG_CHECKING([whether to enable NTLM delegation to winbind's helper])
+  if test "$ac_cv_native_windows" = "yes" ||
+    test "x$SSL_ENABLED" = "x"; then
+    want_ntlm_wb_file=""
+    want_ntlm_wb="no"
+  fi
+  AC_MSG_RESULT([$want_ntlm_wb])
+  if test "$want_ntlm_wb" = "yes"; then
+    AC_DEFINE(NTLM_WB_ENABLED, 1,
+      [Define to enable NTLM delegation to winbind's ntlm_auth helper.])
+    AC_DEFINE_UNQUOTED(NTLM_WB_FILE, "$want_ntlm_wb_file",
+      [Define absolute filename for winbind's ntlm_auth helper.])
+    NTLM_WB_ENABLED=1
+  fi
+])
+
index 6067abf..fdf004b 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 65
+# serial 73
 
 
 dnl CURL_INCLUDES_ARPA_INET
@@ -2020,6 +2020,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
   AC_REQUIRE([CURL_INCLUDES_STRING])dnl
   AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
   AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
+  AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
   #
   tst_links_getaddrinfo="unknown"
   tst_proto_getaddrinfo="unknown"
@@ -2196,19 +2197,58 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
         tst_tsafe_getaddrinfo="yes"
         ;;
     esac
+    if test "$tst_tsafe_getaddrinfo" = "unknown" &&
+       test "$ac_cv_native_windows" = "yes"; then
+      tst_tsafe_getaddrinfo="yes"
+    fi
     if test "$tst_tsafe_getaddrinfo" = "unknown"; then
       CURL_CHECK_DEF_CC([h_errno], [
-        $curl_includes_ws2tcpip
         $curl_includes_sys_socket
         $curl_includes_netdb
         ], [silent])
-      if test "$curl_cv_have_def_h_errno" = "no"; then
+      if test "$curl_cv_have_def_h_errno" = "yes"; then
+        tst_h_errno_macro="yes"
+      else
+        tst_h_errno_macro="no"
+      fi
+      AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([[
+          $curl_includes_sys_socket
+          $curl_includes_netdb
+        ]],[[
+          h_errno = 2;
+          if(0 != h_errno)
+            return 1;
+        ]])
+      ],[
+        tst_h_errno_modifiable_lvalue="yes"
+      ],[
+        tst_h_errno_modifiable_lvalue="no"
+      ])
+      AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([[
+        ]],[[
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
+          return 0;
+#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
+          return 0;
+#else
+          force compilation error
+#endif
+        ]])
+      ],[
+        tst_h_errno_sbs_issue_7="yes"
+      ],[
+        tst_h_errno_sbs_issue_7="no"
+      ])
+      if test "$tst_h_errno_macro" = "no" &&
+         test "$tst_h_errno_modifiable_lvalue" = "no" &&
+         test "$tst_h_errno_sbs_issue_7" = "no"; then
         tst_tsafe_getaddrinfo="no"
+      else
+        tst_tsafe_getaddrinfo="yes"
       fi
     fi
-    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
-      tst_tsafe_getaddrinfo="yes"
-    fi
     AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
     if test "$tst_tsafe_getaddrinfo" = "yes"; then
       AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
@@ -2314,6 +2354,99 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR], [
   fi
 ])
 
+dnl CURL_CHECK_FUNC_GAI_STRERROR
+dnl -------------------------------------------------
+dnl Verify if gai_strerror is available, prototyped,
+dnl and can be compiled. If all of these are true,
+dnl and usage has not been previously disallowed with
+dnl shell variable curl_disallow_gai_strerror, then
+dnl HAVE_GAI_STRERROR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_GAI_STRERROR], [
+  AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
+  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
+  #
+  tst_links_gai_strerror="unknown"
+  tst_proto_gai_strerror="unknown"
+  tst_compi_gai_strerror="unknown"
+  tst_allow_gai_strerror="unknown"
+  #
+  AC_MSG_CHECKING([if gai_strerror can be linked])
+  AC_LINK_IFELSE([
+    AC_LANG_PROGRAM([[
+      $curl_includes_winsock2
+      $curl_includes_netdb
+    ]],[[
+      if(0 != gai_strerror(0))
+        return 1;
+    ]])
+  ],[
+    AC_MSG_RESULT([yes])
+    tst_links_gai_strerror="yes"
+  ],[
+    AC_MSG_RESULT([no])
+    tst_links_gai_strerror="no"
+  ])
+  #
+  if test "$tst_links_gai_strerror" = "yes"; then
+    AC_MSG_CHECKING([if gai_strerror is prototyped])
+    AC_EGREP_CPP([gai_strerror],[
+      $curl_includes_winsock2
+      $curl_includes_netdb
+    ],[
+      AC_MSG_RESULT([yes])
+      tst_proto_gai_strerror="yes"
+    ],[
+      AC_MSG_RESULT([no])
+      tst_proto_gai_strerror="no"
+    ])
+  fi
+  #
+  if test "$tst_proto_gai_strerror" = "yes"; then
+    AC_MSG_CHECKING([if gai_strerror is compilable])
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM([[
+        $curl_includes_winsock2
+        $curl_includes_netdb
+      ]],[[
+        if(0 != gai_strerror(0))
+          return 1;
+      ]])
+    ],[
+      AC_MSG_RESULT([yes])
+      tst_compi_gai_strerror="yes"
+    ],[
+      AC_MSG_RESULT([no])
+      tst_compi_gai_strerror="no"
+    ])
+  fi
+  #
+  if test "$tst_compi_gai_strerror" = "yes"; then
+    AC_MSG_CHECKING([if gai_strerror usage allowed])
+    if test "x$curl_disallow_gai_strerror" != "xyes"; then
+      AC_MSG_RESULT([yes])
+      tst_allow_gai_strerror="yes"
+    else
+      AC_MSG_RESULT([no])
+      tst_allow_gai_strerror="no"
+    fi
+  fi
+  #
+  AC_MSG_CHECKING([if gai_strerror might be used])
+  if test "$tst_links_gai_strerror" = "yes" &&
+     test "$tst_proto_gai_strerror" = "yes" &&
+     test "$tst_compi_gai_strerror" = "yes" &&
+     test "$tst_allow_gai_strerror" = "yes"; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE_UNQUOTED(HAVE_GAI_STRERROR, 1,
+      [Define to 1 if you have the gai_strerror function.])
+    ac_cv_func_gai_strerror="yes"
+  else
+    AC_MSG_RESULT([no])
+    ac_cv_func_gai_strerror="no"
+  fi
+])
+
 
 dnl CURL_CHECK_FUNC_GETHOSTBYADDR_R
 dnl -------------------------------------------------
@@ -2704,6 +2837,7 @@ dnl HAVE_GETHOSTNAME will be defined.
 AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
   AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
   AC_REQUIRE([CURL_INCLUDES_UNISTD])dnl
+  AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
   #
   tst_links_gethostname="unknown"
   tst_proto_gethostname="unknown"
@@ -2761,6 +2895,35 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
   fi
   #
   if test "$tst_compi_gethostname" = "yes"; then
+    AC_MSG_CHECKING([for gethostname arg 2 data type])
+    tst_gethostname_type_arg2="unknown"
+    for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do
+      for tst_arg2 in 'int' 'unsigned int' 'size_t'; do
+        if test "$tst_gethostname_type_arg2" = "unknown"; then
+          AC_COMPILE_IFELSE([
+            AC_LANG_PROGRAM([[
+              $curl_includes_winsock2
+              $curl_includes_unistd
+              $curl_preprocess_callconv
+              extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
+            ]],[[
+              if(0 != gethostname(0, 0))
+                return 1;
+            ]])
+          ],[
+            tst_gethostname_type_arg2="$tst_arg2"
+          ])
+        fi
+      done
+    done
+    AC_MSG_RESULT([$tst_gethostname_type_arg2])
+    if test "$tst_gethostname_type_arg2" != "unknown"; then
+      AC_DEFINE_UNQUOTED(GETHOSTNAME_TYPE_ARG2, $tst_gethostname_type_arg2,
+        [Define to the type of arg 2 for gethostname.])
+    fi
+  fi
+  #
+  if test "$tst_compi_gethostname" = "yes"; then
     AC_MSG_CHECKING([if gethostname usage allowed])
     if test "x$curl_disallow_gethostname" != "xyes"; then
       AC_MSG_RESULT([yes])
@@ -5531,176 +5694,179 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
 ])
 
 
-dnl CURL_CHECK_FUNC_STRCASECMP
+dnl CURL_CHECK_FUNC_SOCKETPAIR
 dnl -------------------------------------------------
-dnl Verify if strcasecmp is available, prototyped, and
+dnl Verify if socketpair is available, prototyped, and
 dnl can be compiled. If all of these are true, and
 dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strcasecmp, then
-dnl HAVE_STRCASECMP will be defined.
+dnl shell variable curl_disallow_socketpair, then
+dnl HAVE_SOCKETPAIR will be defined.
 
-AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
-  AC_REQUIRE([CURL_INCLUDES_STRING])dnl
+AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
+  AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
+  AC_REQUIRE([CURL_INCLUDES_SOCKET])dnl
   #
-  tst_links_strcasecmp="unknown"
-  tst_proto_strcasecmp="unknown"
-  tst_compi_strcasecmp="unknown"
-  tst_allow_strcasecmp="unknown"
+  tst_links_socketpair="unknown"
+  tst_proto_socketpair="unknown"
+  tst_compi_socketpair="unknown"
+  tst_allow_socketpair="unknown"
   #
-  AC_MSG_CHECKING([if strcasecmp can be linked])
+  AC_MSG_CHECKING([if socketpair can be linked])
   AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([strcasecmp])
+    AC_LANG_FUNC_LINK_TRY([socketpair])
   ],[
     AC_MSG_RESULT([yes])
-    tst_links_strcasecmp="yes"
+    tst_links_socketpair="yes"
   ],[
     AC_MSG_RESULT([no])
-    tst_links_strcasecmp="no"
+    tst_links_socketpair="no"
   ])
   #
-  if test "$tst_links_strcasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strcasecmp is prototyped])
-    AC_EGREP_CPP([strcasecmp],[
-      $curl_includes_string
+  if test "$tst_links_socketpair" = "yes"; then
+    AC_MSG_CHECKING([if socketpair is prototyped])
+    AC_EGREP_CPP([socketpair],[
+      $curl_includes_sys_socket
+      $curl_includes_socket
     ],[
       AC_MSG_RESULT([yes])
-      tst_proto_strcasecmp="yes"
+      tst_proto_socketpair="yes"
     ],[
       AC_MSG_RESULT([no])
-      tst_proto_strcasecmp="no"
+      tst_proto_socketpair="no"
     ])
   fi
   #
-  if test "$tst_proto_strcasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strcasecmp is compilable])
+  if test "$tst_proto_socketpair" = "yes"; then
+    AC_MSG_CHECKING([if socketpair is compilable])
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
-        $curl_includes_string
+        $curl_includes_sys_socket
+        $curl_includes_socket
       ]],[[
-        if(0 != strcasecmp(0, 0))
+        int sv[2];
+        if(0 != socketpair(0, 0, 0, sv))
           return 1;
       ]])
     ],[
       AC_MSG_RESULT([yes])
-      tst_compi_strcasecmp="yes"
+      tst_compi_socketpair="yes"
     ],[
       AC_MSG_RESULT([no])
-      tst_compi_strcasecmp="no"
+      tst_compi_socketpair="no"
     ])
   fi
   #
-  if test "$tst_compi_strcasecmp" = "yes"; then
-    AC_MSG_CHECKING([if strcasecmp usage allowed])
-    if test "x$curl_disallow_strcasecmp" != "xyes"; then
+  if test "$tst_compi_socketpair" = "yes"; then
+    AC_MSG_CHECKING([if socketpair usage allowed])
+    if test "x$curl_disallow_socketpair" != "xyes"; then
       AC_MSG_RESULT([yes])
-      tst_allow_strcasecmp="yes"
+      tst_allow_socketpair="yes"
     else
       AC_MSG_RESULT([no])
-      tst_allow_strcasecmp="no"
+      tst_allow_socketpair="no"
     fi
   fi
   #
-  AC_MSG_CHECKING([if strcasecmp might be used])
-  if test "$tst_links_strcasecmp" = "yes" &&
-     test "$tst_proto_strcasecmp" = "yes" &&
-     test "$tst_compi_strcasecmp" = "yes" &&
-     test "$tst_allow_strcasecmp" = "yes"; then
+  AC_MSG_CHECKING([if socketpair might be used])
+  if test "$tst_links_socketpair" = "yes" &&
+     test "$tst_proto_socketpair" = "yes" &&
+     test "$tst_compi_socketpair" = "yes" &&
+     test "$tst_allow_socketpair" = "yes"; then
     AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_STRCASECMP, 1,
-      [Define to 1 if you have the strcasecmp function.])
-    ac_cv_func_strcasecmp="yes"
+    AC_DEFINE_UNQUOTED(HAVE_SOCKETPAIR, 1,
+      [Define to 1 if you have the socketpair function.])
+    ac_cv_func_socketpair="yes"
   else
     AC_MSG_RESULT([no])
-    ac_cv_func_strcasecmp="no"
+    ac_cv_func_socketpair="no"
   fi
 ])
 
 
-dnl CURL_CHECK_FUNC_STRCASESTR
+dnl CURL_CHECK_FUNC_STRCASECMP
 dnl -------------------------------------------------
-dnl Verify if strcasestr is available, prototyped, and
+dnl Verify if strcasecmp is available, prototyped, and
 dnl can be compiled. If all of these are true, and
 dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strcasestr, then
-dnl HAVE_STRCASESTR will be defined.
+dnl shell variable curl_disallow_strcasecmp, then
+dnl HAVE_STRCASECMP will be defined.
 
-AC_DEFUN([CURL_CHECK_FUNC_STRCASESTR], [
+AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
   AC_REQUIRE([CURL_INCLUDES_STRING])dnl
   #
-  tst_links_strcasestr="unknown"
-  tst_proto_strcasestr="unknown"
-  tst_compi_strcasestr="unknown"
-  tst_allow_strcasestr="unknown"
+  tst_links_strcasecmp="unknown"
+  tst_proto_strcasecmp="unknown"
+  tst_compi_strcasecmp="unknown"
+  tst_allow_strcasecmp="unknown"
   #
-  AC_MSG_CHECKING([if strcasestr can be linked])
+  AC_MSG_CHECKING([if strcasecmp can be linked])
   AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([strcasestr])
+    AC_LANG_FUNC_LINK_TRY([strcasecmp])
   ],[
     AC_MSG_RESULT([yes])
-    tst_links_strcasestr="yes"
+    tst_links_strcasecmp="yes"
   ],[
     AC_MSG_RESULT([no])
-    tst_links_strcasestr="no"
+    tst_links_strcasecmp="no"
   ])
   #
-  if test "$tst_links_strcasestr" = "yes"; then
-    AC_MSG_CHECKING([if strcasestr is prototyped])
-    AC_EGREP_CPP([strcasestr],[
+  if test "$tst_links_strcasecmp" = "yes"; then
+    AC_MSG_CHECKING([if strcasecmp is prototyped])
+    AC_EGREP_CPP([strcasecmp],[
       $curl_includes_string
     ],[
       AC_MSG_RESULT([yes])
-      tst_proto_strcasestr="yes"
+      tst_proto_strcasecmp="yes"
     ],[
       AC_MSG_RESULT([no])
-      tst_proto_strcasestr="no"
+      tst_proto_strcasecmp="no"
     ])
   fi
   #
-  if test "$tst_proto_strcasestr" = "yes"; then
-    AC_MSG_CHECKING([if strcasestr is compilable])
+  if test "$tst_proto_strcasecmp" = "yes"; then
+    AC_MSG_CHECKING([if strcasecmp is compilable])
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
         $curl_includes_string
       ]],[[
-        if(0 != strcasestr(0, 0))
+        if(0 != strcasecmp(0, 0))
           return 1;
       ]])
     ],[
       AC_MSG_RESULT([yes])
-      tst_compi_strcasestr="yes"
+      tst_compi_strcasecmp="yes"
     ],[
       AC_MSG_RESULT([no])
-      tst_compi_strcasestr="no"
+      tst_compi_strcasecmp="no"
     ])
   fi
   #
-  if test "$tst_compi_strcasestr" = "yes"; then
-    AC_MSG_CHECKING([if strcasestr usage allowed])
-    if test "x$curl_disallow_strcasestr" != "xyes"; then
+  if test "$tst_compi_strcasecmp" = "yes"; then
+    AC_MSG_CHECKING([if strcasecmp usage allowed])
+    if test "x$curl_disallow_strcasecmp" != "xyes"; then
       AC_MSG_RESULT([yes])
-      tst_allow_strcasestr="yes"
+      tst_allow_strcasecmp="yes"
     else
       AC_MSG_RESULT([no])
-      tst_allow_strcasestr="no"
+      tst_allow_strcasecmp="no"
     fi
   fi
   #
-  AC_MSG_CHECKING([if strcasestr might be used])
-  if test "$tst_links_strcasestr" = "yes" &&
-     test "$tst_proto_strcasestr" = "yes" &&
-     test "$tst_compi_strcasestr" = "yes" &&
-     test "$tst_allow_strcasestr" = "yes"; then
+  AC_MSG_CHECKING([if strcasecmp might be used])
+  if test "$tst_links_strcasecmp" = "yes" &&
+     test "$tst_proto_strcasecmp" = "yes" &&
+     test "$tst_compi_strcasecmp" = "yes" &&
+     test "$tst_allow_strcasecmp" = "yes"; then
     AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_STRCASESTR, 1,
-      [Define to 1 if you have the strcasestr function.])
-    ac_cv_func_strcasestr="yes"
+    AC_DEFINE_UNQUOTED(HAVE_STRCASECMP, 1,
+      [Define to 1 if you have the strcasecmp function.])
+    ac_cv_func_strcasecmp="yes"
   else
     AC_MSG_RESULT([no])
-    ac_cv_func_strcasestr="no"
+    ac_cv_func_strcasecmp="no"
   fi
 ])
 
-
 dnl CURL_CHECK_FUNC_STRCMPI
 dnl -------------------------------------------------
 dnl Verify if strcmpi is available, prototyped, and
@@ -5960,8 +6126,8 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
         AC_COMPILE_IFELSE([
           AC_LANG_PROGRAM([[
             $curl_includes_string
-          ]],[[
             char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
+          ]],[[
             if(0 != strerror_r(0, 0, 0))
               return 1;
           ]])
@@ -6021,8 +6187,8 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
         AC_COMPILE_IFELSE([
           AC_LANG_PROGRAM([[
             $curl_includes_string
-          ]],[[
             int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
+          ]],[[
             if(0 != strerror_r(0, 0, 0))
               return 1;
           ]])
@@ -6220,92 +6386,6 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
   fi
 ])
 
-
-dnl CURL_CHECK_FUNC_STRLCAT
-dnl -------------------------------------------------
-dnl Verify if strlcat is available, prototyped, and
-dnl can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strlcat, then
-dnl HAVE_STRLCAT will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_STRLCAT], [
-  AC_REQUIRE([CURL_INCLUDES_STRING])dnl
-  #
-  tst_links_strlcat="unknown"
-  tst_proto_strlcat="unknown"
-  tst_compi_strlcat="unknown"
-  tst_allow_strlcat="unknown"
-  #
-  AC_MSG_CHECKING([if strlcat can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([strlcat])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_strlcat="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_strlcat="no"
-  ])
-  #
-  if test "$tst_links_strlcat" = "yes"; then
-    AC_MSG_CHECKING([if strlcat is prototyped])
-    AC_EGREP_CPP([strlcat],[
-      $curl_includes_string
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_strlcat="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_strlcat="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_strlcat" = "yes"; then
-    AC_MSG_CHECKING([if strlcat is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_string
-      ]],[[
-        if(0 != strlcat(0, 0, 0))
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_strlcat="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_strlcat="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_strlcat" = "yes"; then
-    AC_MSG_CHECKING([if strlcat usage allowed])
-    if test "x$curl_disallow_strlcat" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_strlcat="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_strlcat="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if strlcat might be used])
-  if test "$tst_links_strlcat" = "yes" &&
-     test "$tst_proto_strlcat" = "yes" &&
-     test "$tst_compi_strlcat" = "yes" &&
-     test "$tst_allow_strlcat" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_STRLCAT, 1,
-      [Define to 1 if you have the strlcat function.])
-    ac_cv_func_strlcat="yes"
-  else
-    AC_MSG_RESULT([no])
-    ac_cv_func_strlcat="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_STRNCASECMP
 dnl -------------------------------------------------
 dnl Verify if strncasecmp is available, prototyped, and
diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4
new file mode 100644 (file)
index 0000000..cd9074b
--- /dev/null
@@ -0,0 +1,260 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+#***************************************************************************
+
+# File version for 'aclocal' use. Keep it a single number.
+# serial 5
+
+
+dnl CURL_CHECK_OPENSSL_API_HEADERS
+dnl -------------------------------------------------
+dnl Find out OpenSSL headers API version, as reported
+dnl by OPENSSL_VERSION_NUMBER. No runtime checks
+dnl allowed here for cross-compilation support.
+dnl HAVE_OPENSSL_API_HEADERS is defined as apprpriate
+dnl only for systems which actually run the configure
+dnl script. Config files generated manually or in any
+dnl other way shall not define this.
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API_HEADERS], [
+  #
+  tst_api="unknown"
+  #
+  AC_MSG_CHECKING([for OpenSSL headers version])
+  CURL_CHECK_DEF([OPENSSL_VERSION_NUMBER], [
+#   ifdef USE_OPENSSL
+#     include <openssl/crypto.h>
+#   else
+#     include <crypto.h>
+#   endif
+    ], [silent])
+  if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then
+    tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'`
+    case "x$tst_verlen" in
+      x6)
+        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4`
+        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+        ;;
+      x11|x10)
+        tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
+        tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
+        tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`
+        tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
+        ;;
+      *)
+        tst_api="unknown"
+        ;;
+    esac
+    case $tst_api in
+      0x110) tst_show="1.1.0" ;;
+      0x101) tst_show="1.0.1" ;;
+      0x100) tst_show="1.0.0" ;;
+      0x099) tst_show="0.9.9" ;;
+      0x098) tst_show="0.9.8" ;;
+      0x097) tst_show="0.9.7" ;;
+      0x096) tst_show="0.9.6" ;;
+      0x095) tst_show="0.9.5" ;;
+      0x094) tst_show="0.9.4" ;;
+      0x093) tst_show="0.9.3" ;;
+      0x092) tst_show="0.9.2" ;;
+      0x091) tst_show="0.9.1" ;;
+      *)     tst_show="unknown" ;;
+    esac
+    tst_show="$tst_show - $curl_cv_def_OPENSSL_VERSION_NUMBER"
+  else
+    tst_show="unknown"
+  fi
+  AC_MSG_RESULT([$tst_show])
+  #
+dnl if test "$tst_api" != "unknown"; then
+dnl AC_DEFINE_UNQUOTED(HAVE_OPENSSL_API_HEADERS, $tst_api,
+dnl   [OpenSSL headers configure time API. Defined only by configure script.
+dnl    No matter what, do not ever define this manually or by any other means.])
+dnl fi
+  curl_openssl_api_headers=$tst_api
+])
+
+
+dnl CURL_CHECK_OPENSSL_API_LIBRARY
+dnl -------------------------------------------------
+dnl Find out OpenSSL library API version, performing
+dnl only link tests in order to avoid getting fooled
+dnl by mismatched OpenSSL headers. No runtime checks
+dnl allowed here for cross-compilation support.
+dnl HAVE_OPENSSL_API_LIBRARY is defined as apprpriate
+dnl only for systems which actually run the configure
+dnl script. Config files generated manually or in any
+dnl other way shall not define this.
+dnl
+dnl Most probably we should not bother attempting to
+dnl detect OpenSSL library development API versions
+dnl 0.9.9 and 1.1.0. For our intended use, detecting
+dnl released versions should be good enough.
+dnl
+dnl Given that currently we are not using the result
+dnl of this check, except for informative purposes,
+dnl lets try to figure out everything.
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API_LIBRARY], [
+  #
+  tst_api="unknown"
+  #
+  AC_MSG_CHECKING([for OpenSSL library version])
+  if test "$tst_api" = "unknown"; then
+    case $host in
+      *-*-vms*)
+        AC_LINK_IFELSE([
+          AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_not_resumbl_sess_cb])
+        ],[
+          tst_api="0x110"
+        ])
+        ;;
+      *)
+        AC_LINK_IFELSE([
+          AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_not_resumable_session_callback])
+        ],[
+          tst_api="0x110"
+        ])
+        ;;
+    esac
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([SSL_renegotiate_abbreviated])
+    ],[
+      tst_api="0x101"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([OBJ_add_sigid])
+    ],[
+      tst_api="0x100"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([ERR_set_mark])
+    ],[
+      tst_api="0x098"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([ERR_peek_last_error])
+    ],[
+      tst_api="0x097"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([c2i_ASN1_OBJECT])
+    ],[
+      tst_api="0x096"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_purpose])
+    ],[
+      tst_api="0x095"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([OBJ_obj2txt])
+    ],[
+      tst_api="0x094"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([SSL_get_verify_depth])
+    ],[
+      tst_api="0x093"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([SSL_library_init])
+    ],[
+      tst_api="0x092"
+    ])
+  fi
+  if test "$tst_api" = "unknown"; then
+    AC_LINK_IFELSE([
+      AC_LANG_FUNC_LINK_TRY([SSL_CTX_set_cipher_list])
+    ],[
+      tst_api="0x091"
+    ])
+  fi
+  case $tst_api in
+    0x110) tst_show="1.1.0" ;;
+    0x101) tst_show="1.0.1" ;;
+    0x100) tst_show="1.0.0" ;;
+    0x099) tst_show="0.9.9" ;;
+    0x098) tst_show="0.9.8" ;;
+    0x097) tst_show="0.9.7" ;;
+    0x096) tst_show="0.9.6" ;;
+    0x095) tst_show="0.9.5" ;;
+    0x094) tst_show="0.9.4" ;;
+    0x093) tst_show="0.9.3" ;;
+    0x092) tst_show="0.9.2" ;;
+    0x091) tst_show="0.9.1" ;;
+    *)     tst_show="unknown" ;;
+  esac
+  AC_MSG_RESULT([$tst_show])
+  #
+dnl if test "$tst_api" != "unknown"; then
+dnl AC_DEFINE_UNQUOTED(HAVE_OPENSSL_API_LIBRARY, $tst_api,
+dnl   [OpenSSL library link time API. Defined only by configure script.
+dnl    No matter what, do not ever define this manually or by any other means.])
+dnl fi
+  curl_openssl_api_library=$tst_api
+])
+
+
+dnl CURL_CHECK_OPENSSL_API
+dnl -------------------------------------------------
+
+AC_DEFUN([CURL_CHECK_OPENSSL_API], [
+  #
+  CURL_CHECK_OPENSSL_API_HEADERS
+  CURL_CHECK_OPENSSL_API_LIBRARY
+  #
+  tst_match="yes"
+  #
+  AC_MSG_CHECKING([for OpenSSL headers and library versions matching])
+  if test "$curl_openssl_api_headers" = "unknown" ||
+    test "$curl_openssl_api_library" = "unknown"; then
+    tst_match="fail"
+    tst_warns="Can not compare OpenSSL headers and library versions."
+  elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then
+    tst_match="no"
+    tst_warns="OpenSSL headers and library versions do not match."
+  fi
+  AC_MSG_RESULT([$tst_match])
+  if test "$tst_match" != "yes"; then
+    AC_MSG_WARN([$tst_warns])
+  fi
+])
index 326c59c..a35d3b2 100644 (file)
@@ -2,7 +2,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 3
+# serial 7
 
 dnl CURL_OVERRIDE_AUTOCONF
 dnl -------------------------------------------------
@@ -16,16 +16,6 @@ AC_BEFORE([$0],[AC_PROG_LIBTOOL])
 # using curl-override.m4
 ])
 
-dnl Override some Libtool tests
-dnl -------------------------------------------------
-dnl This is done to prevent Libtool 1.5.X from doing
-dnl unnecesary C++, Fortran and Java tests and reduce
-dnl resulting configure script by nearly 300 Kb.
-
-m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
-
 dnl Override Autoconf's AC_LANG_PROGRAM (C)
 dnl -------------------------------------------------
 dnl This is done to prevent compiler warning
@@ -84,18 +74,3 @@ choke me
 #endif
 ], [return $1 ();])])
 
-dnl Override Autoconf's PATH_SEPARATOR check
-dnl -------------------------------------------------
-dnl This is done to ensure that the same check is
-dnl used across different Autoconf versions and to
-dnl allow us to use this macro early enough in the
-dnl configure script.
-
-m4_defun([_AS_PATH_SEPARATOR_PREPARE],
-[CURL_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
-m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[CURL_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
index 2e2d868..842cc40 100644 (file)
@@ -21,7 +21,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 8
+# serial 10
 
 dnl Note 1
 dnl ------
@@ -467,7 +467,7 @@ dnl This macro ensures that configuration tests done
 dnl after this will execute with preprocessor symbol
 dnl _REENTRANT defined. This macro also ensures that
 dnl the generated config file defines NEED_REENTRANT
-dnl and that in turn setup.h will define _REENTRANT.
+dnl and that in turn curl_setup.h will define _REENTRANT.
 dnl Internal macro for CURL_CONFIGURE_REENTRANT.
 
 AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
@@ -487,7 +487,7 @@ dnl This macro ensures that configuration tests done
 dnl after this will execute with preprocessor symbol
 dnl _THREAD_SAFE defined. This macro also ensures that
 dnl the generated config file defines NEED_THREAD_SAFE
-dnl and that in turn setup.h will define _THREAD_SAFE.
+dnl and that in turn curl_setup.h will define _THREAD_SAFE.
 dnl Internal macro for CURL_CONFIGURE_THREAD_SAFE.
 
 AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE], [
diff --git a/m4/curl-system.m4 b/m4/curl-system.m4
deleted file mode 100644 (file)
index 6e3e9f9..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#***************************************************************************
-#                                  _   _ ____  _
-#  Project                     ___| | | |  _ \| |
-#                             / __| | | | |_) | |
-#                            | (__| |_| |  _ <| |___
-#                             \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# 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.
-#
-#***************************************************************************
-
-# File version for 'aclocal' use. Keep it a single number.
-# serial 3
-
-
-dnl CURL_CHECK_PATH_SEPARATOR
-dnl -------------------------------------------------
-dnl Check and compute the path separator for us. This
-dnl path separator is the symbol used to diferentiate
-dnl or separate paths inside the PATH environment var.
-
-AC_DEFUN([CURL_CHECK_PATH_SEPARATOR], [
-  if test -z "$curl_cv_PATH_SEPARATOR"; then
-    if test -z "$PATH"; then
-      AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.])
-    fi
-    dnl Directory count in PATH when using a colon separator.
-    tst_dirs_col=0
-    tst_save_IFS=$IFS; IFS=':'
-    for tst_dir in $PATH; do
-      IFS=$tst_save_IFS
-      test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
-    done
-    IFS=$tst_save_IFS
-    dnl Directory count in PATH when using a semicolon separator.
-    tst_dirs_sem=0
-    tst_save_IFS=$IFS; IFS=';'
-    for tst_dir in $PATH; do
-      IFS=$tst_save_IFS
-      test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
-    done
-    IFS=$tst_save_IFS
-    if test $tst_dirs_sem -eq $tst_dirs_col; then
-      dnl When both counting methods give the same result we do not want to
-      dnl chose one over the other, and consider auto-detection not possible.
-      if test -z "$PATH_SEPARATOR"; then
-        dnl Stop dead until user provides PATH_SEPARATOR definition.
-        AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.])
-      fi
-    else
-      dnl Separator with the greater directory count is the auto-detected one.
-      if test $tst_dirs_sem -gt $tst_dirs_col; then
-        tst_auto_separator=';'
-      else
-        tst_auto_separator=':'
-      fi
-      if test -z "$PATH_SEPARATOR"; then
-        dnl Simply use the auto-detected one when not already set.
-        PATH_SEPARATOR="$tst_auto_separator"
-      fi
-    fi
-    curl_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
-  fi
-  AC_SUBST([PATH_SEPARATOR])
-  AC_SUBST([PATH])
-])
-
-
-dnl CURL_CHECK_PATH_SEPARATOR_REQUIRED
-dnl -------------------------------------------------
-dnl Use this to ensure that the path separator check
-dnl macro is only expanded and included once.
-
-AC_DEFUN([CURL_CHECK_PATH_SEPARATOR_REQUIRED], [
-  AC_REQUIRE([CURL_CHECK_PATH_SEPARATOR])dnl
-])
-
index a3fee53..a849b9d 100644 (file)
@@ -1,7 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -10,7 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ])
 
-# serial 56 LT_INIT
+# serial 57 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -66,6 +68,7 @@ esac
 # ------------------
 AC_DEFUN([LT_INIT],
 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
 AC_BEFORE([$0], [LTDL_INIT])dnl
@@ -82,6 +85,8 @@ AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
 dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
@@ -118,7 +123,7 @@ m4_defun([_LT_CC_BASENAME],
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 ])
 
 
@@ -138,6 +143,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
 m4_defun([_LT_SETUP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -160,10 +170,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
 # See if we are running on zsh, and set the options which allow our
@@ -179,7 +192,6 @@ fi
 _LT_CHECK_OBJDIR
 
 m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -193,23 +205,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -250,6 +245,28 @@ _LT_CONFIG_COMMANDS
 ])# _LT_SETUP
 
 
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
 # _LT_PROG_LTMAIN
 # ---------------
 # Note that this code is called both from `configure', and `config.status'
@@ -408,7 +425,7 @@ m4_define([_lt_decl_all_varnames],
 # declaration there will have the same value as in `configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
 
 # _LT_CONFIG_STATUS_DECLARATIONS
@@ -418,7 +435,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE],
 # embedded single quotes properly.  In configure, this macro expands
 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 #
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
@@ -517,12 +534,20 @@ LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -533,9 +558,9 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -543,16 +568,38 @@ for var in lt_decl_all_varnames([[ \
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
 _LT_OUTPUT_LIBTOOL_INIT
 ])
 
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
 # ---------
@@ -562,20 +609,11 @@ _LT_OUTPUT_LIBTOOL_INIT
 AC_DEFUN([LT_OUTPUT],
 [: ${CONFIG_LT=./config.lt}
 AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
 
 cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
+lt_cl_silent=false
 exec AS_MESSAGE_LOG_FD>>config.log
 {
   echo
@@ -601,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -646,15 +684,13 @@ chmod +x "$CONFIG_LT"
 # appending to config.log, which fails on DOS, as config.log is still kept
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
 ])# LT_OUTPUT
 
 
@@ -717,15 +753,12 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  _LT_PROG_REPLACE_SHELLFNS
 
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -770,6 +803,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],                 [_LT_LANG(C)],
   [C++],               [_LT_LANG(CXX)],
+  [Go],                        [_LT_LANG(GO)],
   [Java],              [_LT_LANG(GCJ)],
   [Fortran 77],                [_LT_LANG(F77)],
   [Fortran],           [_LT_LANG(FC)],
@@ -791,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -821,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -831,11 +894,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -921,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # If there is a non-empty error log, and "single_module"
+       # appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+         cat conftest.err >&AS_MESSAGE_LOG_FD
+       # Otherwise, if the output was created with a 0 exit code from
+       # the compiler, it worked.
+       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -929,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        rm -rf libconftest.dylib*
        rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -940,6 +1012,34 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        [lt_cv_ld_exported_symbols_list=no])
        LDFLAGS="$save_LDFLAGS"
     ])
+
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+       cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -967,7 +1067,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -977,8 +1077,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -987,7 +1087,13 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -995,7 +1101,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
@@ -1011,203 +1117,142 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
 # _LT_SHELL_INIT(ARG)
 # -------------------
 m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-        [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
 
 
 # _LT_PROG_ECHO_BACKSLASH
 # -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
 else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
 fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-          test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-         # Cool, printf works
-         :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-         export CONFIG_SHELL
-         SHELL="$CONFIG_SHELL"
-         export SHELL
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-         # maybe with a smaller string...
-         prev=:
-
-         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-           then
-             break
-           fi
-           prev="$cmd"
-         done
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
 
-         if test "$prev" != 'sed 50q "[$]0"'; then
-           echo_test_string=`eval $prev`
-           export echo_test_string
-           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-         else
-           # Oops.  We lost completely, so just stick with echo.
-           ECHO=echo
-         fi
-        fi
-      fi
-    fi
-  fi
-fi
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
-AC_SUBST(lt_ECHO)
-])
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
@@ -1236,7 +1281,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
@@ -1279,7 +1324,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
          ppc64-*linux*|powerpc64-*linux*)
            LD="${LD-ld} -m elf32ppclinux"
@@ -1329,14 +1381,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD="${LD-ld}_sol2"
+        fi
+        ;;
       *)
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
          LD="${LD-ld} -64"
@@ -1354,14 +1419,47 @@ need_locks="$enable_libtool_lock"
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       AC_TRY_EVAL([lt_ar_try])
+       if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _LT_CMD_OLD_ARCHIVE
 # -------------------
 m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1380,18 +1478,27 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1416,15 +1523,15 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        $2=yes
@@ -1464,7 +1571,7 @@ AC_CACHE_CHECK([$1], [$2],
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          $2=yes
@@ -1527,6 +1634,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -1552,6 +1664,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1578,7 +1695,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
@@ -1591,8 +1709,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
              test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
@@ -1643,7 +1761,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
+[#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -1684,7 +1802,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1693,7 +1817,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
       /* dlclose (self); */
     }
   else
@@ -1869,16 +1997,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
@@ -2037,6 +2165,7 @@ m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
        [], [
@@ -2045,16 +2174,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
   # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
@@ -2067,7 +2203,7 @@ if test "$GCC" = yes; then
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -2087,7 +2223,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi])
@@ -2113,7 +2255,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
@@ -2122,7 +2264,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2175,7 +2317,7 @@ amigaos*)
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
@@ -2187,7 +2329,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -2206,8 +2348,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -2228,36 +2371,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2278,7 +2468,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2286,10 +2476,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2297,7 +2483,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2315,7 +2501,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2334,13 +2520,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
+  dynamic_linker="$host_os runtime_loader"
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -2386,12 +2575,14 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2407,7 +2598,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
        if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
@@ -2444,9 +2635,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2454,16 +2645,21 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+        [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
@@ -2472,7 +2668,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -2516,7 +2712,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -2585,7 +2781,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2610,7 +2806,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -2634,7 +2830,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    version_type=linux # correct to gnu/linux during the next big refactor
     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
     soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
@@ -2665,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2675,7 +2871,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
@@ -2717,6 +2913,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],
@@ -2829,6 +3027,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
@@ -2950,6 +3149,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -2958,8 +3162,8 @@ case $host_os in
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
@@ -3011,16 +3215,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -3046,7 +3252,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3058,11 +3264,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -3083,8 +3289,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3162,6 +3368,21 @@ tpf*)
   ;;
 esac
 ])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3169,7 +3390,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 _LT_DECL([], [deplibs_check_method], [1],
     [Method to check whether dependent libraries are shared objects])
 _LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3226,7 +3451,19 @@ if test "$lt_cv_path_NM" != "no"; then
   NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -3239,13 +3476,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3260,7 +3497,68 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
-
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
 # LT_LIB_M
 # --------
 # check for math library
@@ -3268,7 +3566,7 @@ AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
@@ -3296,7 +3594,12 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
 if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3313,6 +3616,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
 AC_REQUIRE([LT_PATH_LD])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -3380,8 +3684,8 @@ esac
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3405,6 +3709,7 @@ for ac_symprfx in "" "_"; do
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -3417,6 +3722,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -3438,7 +3744,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -3450,6 +3756,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3461,7 +3779,7 @@ _LT_EOF
          cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t@_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3486,16 +3804,16 @@ static const void *lt_preloaded_setup() {
 #endif
 _LT_EOF
          # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
+         mv -f conftest.$ac_objext conftstm.$ac_objext
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
            pipe_works=yes
          fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
        else
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
        fi
@@ -3528,6 +3846,13 @@ else
   AC_MSG_RESULT(ok)
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
@@ -3538,6 +3863,8 @@ _LT_DECL([global_symbol_to_c_name_address],
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3549,7 +3876,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -3600,6 +3926,11 @@ m4_if([$1], [CXX], [
       # DJGPP does not support shared libraries at all
       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
     interix[[3-9]]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -3649,6 +3980,12 @@ m4_if([$1], [CXX], [
          ;;
        esac
        ;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
       dgux*)
        case $cc_basename in
          ec++*)
@@ -3705,7 +4042,7 @@ m4_if([$1], [CXX], [
            ;;
        esac
        ;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
        case $cc_basename in
          KCC*)
            # KAI C++ Compiler
@@ -3738,8 +4075,8 @@ m4_if([$1], [CXX], [
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
            ;;
-         xlc* | xlC*)
-           # IBM XL 8.0 on PPC
+         xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+           # IBM XL 8.0, 9.0 on PPC and BlueGene
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -3801,7 +4138,7 @@ m4_if([$1], [CXX], [
        ;;
       solaris*)
        case $cc_basename in
-         CC*)
+         CC* | sunCC*)
            # Sun C++ 4.2, 5.x and Centerline C++
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -3905,6 +4242,12 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -3947,6 +4290,15 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -3989,7 +4341,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -4010,7 +4362,13 @@ m4_if([$1], [CXX], [
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+       # NAG Fortran compiler
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4022,25 +4380,40 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+         ;;
+       *Sun\ F* | *Sun*Fortran*)
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+         ;;
        *Sun\ C*)
          # Sun C 5.9
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
          ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+        *Intel*\ [[CF]]*Compiler*)
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+         ;;
+       *Portland\ Group*)
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
          ;;
        esac
        ;;
@@ -4072,7 +4445,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
       *)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
@@ -4129,9 +4502,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-       [How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4150,6 +4525,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
        [Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+       [How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4170,6 +4547,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4178,30 +4556,40 @@ m4_require([_LT_TAG_COMPILER])dnl
 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
+    ;;
   cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  linux* | k*bsd*-gnu)
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  linux* | k*bsd*-gnu | gnu*)
     _LT_TAGVAR(link_all_deplibs, $1)=no
-  ;;
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ], [
   runpath_var=
   _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -4216,7 +4604,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4261,13 +4648,39 @@ dnl Note also adjust exclude_expsyms for C++ above.
   openbsd*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu)
+  linux* | k*bsd*-gnu | gnu*)
     _LT_TAGVAR(link_all_deplibs, $1)=no
     ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
   if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+         *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
@@ -4301,11 +4714,12 @@ dnl Note also adjust exclude_expsyms for C++ above.
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -4341,10 +4755,12 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -4362,6 +4778,11 @@ _LT_EOF
       fi
       ;;
 
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4387,15 +4808,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
         && test "$tmp_diet" = no
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -4406,13 +4828,17 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
          tmp_sharedflag='--shared' ;;
-       xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
+       xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(compiler_needs_object, $1)=yes
+         ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
          _LT_TAGVAR(compiler_needs_object, $1)=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
@@ -4428,17 +4854,16 @@ _LT_EOF
         fi
 
        case $cc_basename in
-       xlf*)
+       xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
          if test "x$supports_anon_versioning" = xyes; then
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
              echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -4452,8 +4877,8 @@ _LT_EOF
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4471,8 +4896,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4518,8 +4943,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4559,8 +4984,10 @@ _LT_EOF
       else
        # If we're using GNU nm, then we don't want the "-C" option.
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # Also, AIX nm treats weak defined symbols like other global
+       # defined symbols, whereas GNU nm marks them as "W".
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        else
          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        fi
@@ -4648,9 +5075,9 @@ _LT_EOF
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
+        _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
        if test "$host_cpu" = ia64; then
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -4659,14 +5086,19 @@ _LT_EOF
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
+        _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         if test "$with_gnu_ld" = yes; then
+           # We only use this code for GNU lds that support --whole-archive.
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         fi
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
          # This is similar to how AIX traditionally builds its shared libraries.
          _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -4698,20 +5130,64 @@ _LT_EOF
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(always_export_symbols, $1)=yes
+       _LT_TAGVAR(file_list_spec, $1)='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+         else
+           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+         fi~
+         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+         linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+       _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+         lt_tool_outputfile="@TOOL_OUTPUT@"~
+         case $lt_outputfile in
+           *.exe|*.EXE) ;;
+           *)
+             lt_outputfile="$lt_outputfile.exe"
+             lt_tool_outputfile="$lt_tool_outputfile.exe"
+             ;;
+         esac~
+         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+           $RM "$lt_outputfile.manifest";
+         fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=".dll"
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       # FIXME: Should let the user specify the lib program.
+       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4724,10 +5200,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -4740,7 +5212,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4749,7 +5221,7 @@ _LT_EOF
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4757,9 +5229,9 @@ _LT_EOF
 
     hpux9*)
       if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
       fi
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -4772,14 +5244,13 @@ _LT_EOF
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
       if test "$with_gnu_ld" = no; then
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -4791,16 +5262,16 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
        case $host_cpu in
        hppa*64*)
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
@@ -4812,7 +5283,14 @@ _LT_EOF
          _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+       m4_if($1, [], [
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         _LT_LINKER_OPTION([if $CC understands -b],
+           _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+           [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+         [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
          ;;
        esac
       fi
@@ -4840,19 +5318,34 @@ _LT_EOF
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+       # This should be the same for all languages, so no per-tag cache variable.
+       AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+         [lt_cv_irix_exported_symbol],
+         [save_LDFLAGS="$LDFLAGS"
+          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+          AC_LINK_IFELSE(
+            [AC_LANG_SOURCE(
+               [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+                             [C++], [[int foo (void) { return 0; }]],
+                             [Fortran 77], [[
+      subroutine foo
+      end]],
+                             [Fortran], [[
+      subroutine foo
+      end]])])],
+             [lt_cv_irix_exported_symbol=yes],
+             [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+       if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+       fi
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4914,17 +5407,17 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4934,13 +5427,13 @@ _LT_EOF
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -4953,9 +5446,9 @@ _LT_EOF
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
        wlarc='${wl}'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
@@ -5131,36 +5624,38 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-       pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+       [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+       [$RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+         _LT_TAGVAR(allow_undefined_flag, $1)=
+         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+         then
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+         else
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+         fi
+         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+       ])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
       ;;
     esac
   fi
@@ -5197,9 +5692,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
@@ -5225,8 +5717,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
     [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
     [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
@@ -5237,6 +5727,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
     [Symbols that must always be exported])
 _LT_TAGDECL([], [prelink_cmds], [2],
     [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5330,37 +5822,22 @@ CC="$lt_save_CC"
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5372,7 +5849,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5382,6 +5858,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -5413,6 +5891,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -5430,6 +5909,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5451,8 +5931,8 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
       if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5484,7 +5964,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -5593,10 +6073,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          _LT_SYS_MODULE_PATH_AIX
+          _LT_SYS_MODULE_PATH_AIX([$1])
           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         else
           if test "$host_cpu" = ia64; then
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -5605,14 +6085,19 @@ if test "$_lt_caught_CXX_error" != yes; then
           else
            # Determine the default libpath from the value encoded in an
            # empty executable.
-           _LT_SYS_MODULE_PATH_AIX
+           _LT_SYS_MODULE_PATH_AIX([$1])
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
            # Warning - without using the other run time loading flags,
            # -berok will link without error, but may produce a broken library.
            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-           # Exported symbols can be pulled into shared objects from archives
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           if test "$with_gnu_ld" = yes; then
+             # We only use this code for GNU lds that support --whole-archive.
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           else
+             # Exported symbols can be pulled into shared objects from archives
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           fi
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
            # This is similar to how AIX traditionally builds its shared
            # libraries.
@@ -5642,28 +6127,75 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           cp $export_symbols $output_objdir/$soname.def;
-          else
-           echo EXPORTS > $output_objdir/$soname.def;
-           cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
+       case $GXX,$cc_basename in
+       ,cl* | no,cl*)
+         # Native MSVC
+         # hardcode_libdir_flag_spec is actually meaningless, as there is
+         # no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=yes
+         _LT_TAGVAR(file_list_spec, $1)='@'
+         # Tell ltmain to make .lib files, not .a files.
+         libext=lib
+         # Tell ltmain to make .dll files, not .so files.
+         shrext_cmds=".dll"
+         # FIXME: Setting linknames here is a bad hack.
+         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+             $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+           else
+             $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+           fi~
+           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+           linknames='
+         # The linker will not automatically build a static lib if we build a DLL.
+         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+         # Don't use ranlib
+         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+           lt_tool_outputfile="@TOOL_OUTPUT@"~
+           case $lt_outputfile in
+             *.exe|*.EXE) ;;
+             *)
+               lt_outputfile="$lt_outputfile.exe"
+               lt_tool_outputfile="$lt_tool_outputfile.exe"
+               ;;
+           esac~
+           func_to_tool_file "$lt_outputfile"~
+           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+             $RM "$lt_outputfile.manifest";
+           fi'
+         ;;
+       *)
+         # g++
+         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+         # as there is no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=no
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+           # If the export-symbols file already is a .def file (1st line
+           # is EXPORTS), use it as is; otherwise, prepend...
+           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+             cp $export_symbols $output_objdir/$soname.def;
+           else
+             echo EXPORTS > $output_objdir/$soname.def;
+             cat $export_symbols >> $output_objdir/$soname.def;
+           fi~
+           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+         else
+           _LT_TAGVAR(ld_shlibs, $1)=no
+         fi
+         ;;
+       esac
+       ;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
        ;;
@@ -5686,7 +6218,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
        # switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5702,7 +6234,9 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
@@ -5720,7 +6254,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -5729,11 +6263,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
             if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5794,7 +6328,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
           *)
            if test "$GXX" = yes; then
@@ -5804,10 +6338,10 @@ if test "$_lt_caught_CXX_error" != yes; then
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  ia64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  *)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                esac
              fi
@@ -5837,7 +6371,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         case $cc_basename in
           CC*)
            # SGI C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
            # Archives containing C++ object files must be created using
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -5848,9 +6382,9 @@ if test "$_lt_caught_CXX_error" != yes; then
           *)
            if test "$GXX" = yes; then
              if test "$with_gnu_ld" = no; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
              else
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
              fi
            fi
            _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5861,7 +6395,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
            # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -5869,8 +6403,8 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv -f \$templib $lib'
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
@@ -5879,7 +6413,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5916,26 +6450,26 @@ if test "$_lt_caught_CXX_error" != yes; then
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
            case `$CC -V` in
-           *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+           *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
                rm -rf $tpldir~
                $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
                rm -rf $tpldir~
                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
                $RANLIB $oldlib'
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
                rm -rf $tpldir~
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
                rm -rf $tpldir~
                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
              ;;
-           *) # Version 6 will use weak symbols
+           *) # Version 6 and above use weak symbols
              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
              ;;
@@ -5943,7 +6477,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
             ;;
          cxx*)
            # Compaq C++
@@ -5962,9 +6496,9 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
            ;;
-         xl*)
+         xl* | mpixl* | bgxl*)
            # IBM XL 8.0 on PPC, with GNU ld
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5984,13 +6518,13 @@ if test "$_lt_caught_CXX_error" != yes; then
              _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
              _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
              # Not sure whether something based on
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
              # would be better.
-             output_verbose_link_cmd='echo'
+             output_verbose_link_cmd='func_echo_all'
 
              # Archives containing C++ object files must be created using
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6059,7 +6593,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
            _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
          fi
-         output_verbose_link_cmd=echo
+         output_verbose_link_cmd=func_echo_all
        else
          _LT_TAGVAR(ld_shlibs, $1)=no
        fi
@@ -6073,7 +6607,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
 
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -6094,15 +6628,15 @@ if test "$_lt_caught_CXX_error" != yes; then
            case $host in
              osf3*)
                _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
                ;;
              *)
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
                  echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
                  $RM $lib.exp'
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
                ;;
@@ -6118,17 +6652,17 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
          *)
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
              _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
              case $host in
                osf3*)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
                  ;;
                *)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
                  ;;
              esac
 
@@ -6138,7 +6672,7 @@ if test "$_lt_caught_CXX_error" != yes; then
              # Commands to make compiler produce verbose output that lists
              # what "hidden" libraries, object files and flags are used when
              # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
            else
              # FIXME: insert proper C++ library support
@@ -6174,7 +6708,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
            # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -6195,7 +6729,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            esac
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-           output_verbose_link_cmd='echo'
+           output_verbose_link_cmd='func_echo_all'
 
            # Archives containing C++ object files must be created using
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6215,14 +6749,14 @@ if test "$_lt_caught_CXX_error" != yes; then
            if test "$GXX" = yes && test "$with_gnu_ld" = no; then
              _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              else
                # g++ 2.7 appears to require `-G' NOT `-shared' on this
                # platform.
@@ -6233,7 +6767,7 @@ if test "$_lt_caught_CXX_error" != yes; then
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              fi
 
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
@@ -6287,6 +6821,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           CC*)
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+             '"$_LT_TAGVAR(old_archive_cmds, $1)"
+           _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+             '"$_LT_TAGVAR(reload_cmds, $1)"
            ;;
          *)
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
@@ -6342,6 +6880,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6356,6 +6895,29 @@ AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6364,6 +6926,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6413,7 +6976,20 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6425,7 +7001,7 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -6434,13 +7010,22 @@ if AC_TRY_EVAL(ac_compile); then
           test $p = "-R"; then
         prev=$p
         continue
-       else
-        prev=
        fi
 
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
        if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
+        case ${prev} in
+        -L | -R)
           # Internal compiler library paths should come after those
           # provided the user.  The postdeps already come after the
           # user supplied libs so there is no need to process them.
@@ -6460,8 +7045,10 @@ if AC_TRY_EVAL(ac_compile); then
           _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
         fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -6497,6 +7084,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6533,7 +7121,7 @@ linux*)
 
 solaris*)
   case $cc_basename in
-  CC*)
+  CC* | sunCC*)
     # The more standards-conforming stlport4 library is
     # incompatible with the Cstd library. Avoid specifying
     # it if it's in CXXFLAGS. Ignore libCrun as
@@ -6577,32 +7165,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6612,7 +7184,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6621,6 +7192,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6660,7 +7233,9 @@ if test "$_lt_disable_F77" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6714,38 +7289,24 @@ if test "$_lt_disable_F77" != yes; then
 
   GCC=$lt_save_GCC
   CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
 fi # test "$_lt_disable_F77" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6755,7 +7316,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6764,6 +7324,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6803,7 +7365,9 @@ if test "$_lt_disable_FC" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6859,7 +7423,8 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
 fi # test "$_lt_disable_FC" != yes
 
 AC_LANG_POP
@@ -6896,10 +7461,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_TAGVAR(LD, $1)="$LD"
@@ -6909,6 +7476,8 @@ _LT_CC_BASENAME([$compiler])
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
@@ -6928,10 +7497,82 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
@@ -6963,9 +7604,11 @@ _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -6978,7 +7621,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -6998,6 +7642,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7037,6 +7688,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7094,7 +7754,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
   fi
   while true; do
     cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
+    mv -f conftest.tmp conftest.in
     cp conftest.in conftest.nl
     echo >>conftest.nl
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
@@ -7130,8 +7790,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -7170,208 +7830,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([    ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
 
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
 
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
-_LT_EOF
-esac
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
 
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
     ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
     ;;
-  esac
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
index 34151a3..5d9acd8 100644 (file)
@@ -1,13 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 6 ltoptions.m4
+# serial 7 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -125,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -133,13 +134,13 @@ case $host in
 esac
 
 test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
 test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 ])# win32-dll
 
 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
@@ -325,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+       IFS="$lt_save_ifs"
+       if test "X$lt_pkg" = "X$lt_p"; then
+         pic_mode=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
index f3c5309..07a8602 100644 (file)
@@ -7,17 +7,17 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-# serial 3017 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
+[macro_version='2.4.2'
+macro_revision='1.3337'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
index 637bb20..c573da9 100644 (file)
@@ -1,13 +1,13 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 4 lt~obsolete.m4
+# serial 5 lt~obsolete.m4
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
@@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],  [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],             [AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],       [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],        [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],                [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],        [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],   [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],              [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],               [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],              [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/m4/xc-am-iface.m4 b/m4/xc-am-iface.m4
new file mode 100644 (file)
index 0000000..1571c21
--- /dev/null
@@ -0,0 +1,253 @@
+#---------------------------------------------------------------------------
+#
+# xc-am-iface.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_AUTOMAKE_BODY
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs embedding of automake initialization
+dnl code into configure script. When automake version 1.14 or
+dnl newer is used at configure script generation time, this
+dnl results in 'subdir-objects' automake option being used.
+dnl When using automake versions older than 1.14 this option
+dnl is not used when generating configure script.
+dnl
+dnl Existence of automake _AM_PROG_CC_C_O m4 private macro
+dnl is used to differentiate automake version 1.14 from older
+dnl ones which lack this macro.
+
+m4_define([_XC_AUTOMAKE_BODY],
+[dnl
+## --------------------------------------- ##
+##  Start of automake initialization code  ##
+## --------------------------------------- ##
+m4_ifdef([_AM_PROG_CC_C_O],
+[
+AM_INIT_AUTOMAKE([subdir-objects])
+],[
+AM_INIT_AUTOMAKE
+])dnl
+## ------------------------------------- ##
+##  End of automake initialization code  ##
+## ------------------------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl XC_AUTOMAKE
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds automake machinery into configure
+dnl script regardless of automake version used in order
+dnl to generate configure script.
+dnl
+dnl When using automake version 1.14 or newer, automake
+dnl initialization option 'subdir-objects' is used to
+dnl generate the configure script, otherwise this option
+dnl is not used.
+
+AC_DEFUN([XC_AUTOMAKE],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+dnl
+_XC_AUTOMAKE_BODY
+dnl
+m4_ifdef([AM_INIT_AUTOMAKE],
+  [m4_undefine([AM_INIT_AUTOMAKE])])dnl
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_AMEND_DISTCLEAN_BODY ([LIST-OF-SUBDIRS])
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs shell code embedding into
+dnl configure script in order to modify distclean
+dnl and maintainer-clean targets of makefiles which
+dnl are located in given list of subdirs.
+dnl
+dnl See XC_AMEND_DISTCLEAN comments for details.
+
+m4_define([_XC_AMEND_DISTCLEAN_BODY],
+[dnl
+## ---------------------------------- ##
+##  Start of distclean amending code  ##
+## ---------------------------------- ##
+
+for xc_subdir in [$1]
+do
+
+if test ! -f "$xc_subdir/Makefile"; then
+  echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2
+  exit 1
+fi
+
+# Fetch dependency tracking file list from Makefile include lines.
+
+xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null`
+xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"`
+
+# --disable-dependency-tracking might have been used, consequently
+# there is nothing to amend without a dependency tracking file list.
+
+if test $xc_cnt_words -gt 0; then
+
+AC_MSG_NOTICE([amending $xc_subdir/Makefile])
+
+# Build Makefile specific patch hunk.
+
+xc_p="$xc_subdir/xc_patch.tmp"
+
+xc_rm_depfiles=`echo "$xc_inc_lines" \
+  | $SED 's%include%   -rm -f%' 2>/dev/null`
+
+xc_dep_subdirs=`echo "$xc_inc_lines" \
+  | $SED 's%include[[ ]][[ ]]*%%' 2>/dev/null \
+  | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \
+  | sort | uniq`
+
+echo "$xc_rm_depfiles" >$xc_p
+
+for xc_dep_dir in $xc_dep_subdirs; do
+  echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\"            >>$xc_p
+  echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\"      >>$xc_p
+  echo "${xc_tab}  rm -rf $xc_dep_dir; \\"                                          >>$xc_p
+  echo "${xc_tab}fi"                                                                >>$xc_p
+done
+
+# Build Makefile patching sed scripts.
+
+xc_s1="$xc_subdir/xc_script_1.tmp"
+xc_s2="$xc_subdir/xc_script_2.tmp"
+xc_s3="$xc_subdir/xc_script_3.tmp"
+
+cat >$xc_s1 <<\_EOT
+/^distclean[[ ]]*:/,/^[[^      ]][[^   ]]*:/{
+  s/^.*(DEPDIR)/___xc_depdir_line___/
+}
+/^maintainer-clean[[ ]]*:/,/^[[^       ]][[^   ]]*:/{
+  s/^.*(DEPDIR)/___xc_depdir_line___/
+}
+_EOT
+
+cat >$xc_s2 <<\_EOT
+/___xc_depdir_line___$/{
+  N
+  /___xc_depdir_line___$/D
+}
+_EOT
+
+cat >$xc_s3 <<_EOT
+/^___xc_depdir_line___/{
+  r $xc_p
+  d
+}
+_EOT
+
+# Apply patch to Makefile and cleanup.
+
+$SED -f "$xc_s1" "$xc_subdir/Makefile"      >"$xc_subdir/Makefile.tmp1"
+$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2"
+$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3"
+
+if test -f "$xc_subdir/Makefile.tmp3"; then
+  mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile"
+fi
+
+test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1"
+test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2"
+test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3"
+
+test -f "$xc_p"  && rm -f "$xc_p"
+test -f "$xc_s1" && rm -f "$xc_s1"
+test -f "$xc_s2" && rm -f "$xc_s2"
+test -f "$xc_s3" && rm -f "$xc_s3"
+
+fi
+
+done
+
+## -------------------------------- ##
+##  End of distclean amending code  ##
+## -------------------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl XC_AMEND_DISTCLEAN ([LIST-OF-SUBDIRS])
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds shell code into configure script
+dnl that amends, at configure runtime, the distclean
+dnl and maintainer-clean targets of Makefiles located
+dnl in all subdirs given in the mandatory white-space
+dnl separated list argument.
+dnl
+dnl Embedding only takes place when using automake 1.14
+dnl or newer, otherwise amending code is not included
+dnl in generated configure script.
+dnl
+dnl distclean and maintainer-clean targets are modified
+dnl to avoid unconditional removal of dependency subdirs
+dnl which triggers distclean and maintainer-clean errors
+dnl when using automake 'subdir-objects' option along
+dnl with per-target objects and source files existing in
+dnl multiple subdirs used for different build targets.
+dnl
+dnl New behavior first removes each dependency tracking
+dnl file independently, and only removes each dependency
+dnl subdir when it finds out that it no longer holds any
+dnl dependency tracking file.
+dnl
+dnl When configure option --disable-dependency-tracking
+dnl is used no amending takes place given that there are
+dnl no dependency tracking files.
+
+AC_DEFUN([XC_AMEND_DISTCLEAN],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+m4_ifdef([_AC_OUTPUT_MAIN_LOOP],
+  [m4_provide_if([_AC_OUTPUT_MAIN_LOOP], [],
+    [m4_fatal([call to AC_OUTPUT needed before $0])])])dnl
+dnl
+m4_if([$#], [1], [], [m4_fatal([$0: wrong number of arguments])])dnl
+m4_if([$1], [], [m4_fatal([$0: missing argument])])dnl
+dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl
+m4_ifdef([_AM_PROG_CC_C_O],
+[
+_XC_AMEND_DISTCLEAN_BODY([$1])
+])dnl
+m4_define([$0], [])[]dnl
+])
+
diff --git a/m4/xc-cc-check.m4 b/m4/xc-cc-check.m4
new file mode 100644 (file)
index 0000000..777decf
--- /dev/null
@@ -0,0 +1,96 @@
+#---------------------------------------------------------------------------
+#
+# xc-cc-check.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_PROG_CC_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_PREAMBLE], [
+  xc_prog_cc_prev_IFS=$IFS
+  xc_prog_cc_prev_LIBS=$LIBS
+  xc_prog_cc_prev_CFLAGS=$CFLAGS
+  xc_prog_cc_prev_LDFLAGS=$LDFLAGS
+  xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS
+])
+
+
+dnl _XC_PROG_CC_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_POSTLUDE], [
+  IFS=$xc_prog_cc_prev_IFS
+  LIBS=$xc_prog_cc_prev_LIBS
+  CFLAGS=$xc_prog_cc_prev_CFLAGS
+  LDFLAGS=$xc_prog_cc_prev_LDFLAGS
+  CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
+  AC_SUBST([CC])dnl
+  AC_SUBST([CPP])dnl
+  AC_SUBST([LIBS])dnl
+  AC_SUBST([CFLAGS])dnl
+  AC_SUBST([LDFLAGS])dnl
+  AC_SUBST([CPPFLAGS])dnl
+])
+
+
+dnl _XC_PROG_CC
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC], [
+  AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
+  AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AM_PROG_CC_C_O])dnl
+  AC_REQUIRE([AC_PROG_CPP])dnl
+  AC_REQUIRE([_XC_PROG_CC_POSTLUDE])dnl
+])
+
+
+dnl XC_CHECK_PROG_CC
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Checks for C compiler and C preprocessor programs,
+dnl while doing some previous sanity validation on user
+dnl provided LIBS, LDFLAGS, CPPFLAGS and CFLAGS values
+dnl that must succeed in order to continue execution.
+dnl
+dnl This sets variables CC and CPP, while preventing
+dnl LIBS, LDFLAGS, CFLAGS, CPPFLAGS and IFS from being
+dnl unexpectedly changed by underlying macros.
+
+AC_DEFUN([XC_CHECK_PROG_CC], [
+  AC_PREREQ([2.50])dnl
+  AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])dnl
+  AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+  AC_BEFORE([$0],[AC_PROG_CC])dnl
+  AC_BEFORE([$0],[AM_PROG_CC_C_O])dnl
+  AC_BEFORE([$0],[AC_PROG_CPP])dnl
+  AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+  AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+  AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])dnl
+  AC_REQUIRE([_XC_PROG_CC])dnl
+])
+
diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4
new file mode 100644 (file)
index 0000000..0b90d5f
--- /dev/null
@@ -0,0 +1,465 @@
+#---------------------------------------------------------------------------
+#
+# xc-lt-iface.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_LIBTOOL_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks some configure script options related with
+dnl libtool and customizes its default behavior before
+dnl libtool code is actually used in script.
+
+m4_define([_XC_LIBTOOL_PREAMBLE],
+[dnl
+# ------------------------------------ #
+#  Determine libtool default behavior  #
+# ------------------------------------ #
+
+#
+# Default behavior is to enable shared and static libraries on systems
+# where libtool knows how to build both library versions, and does not
+# require separate configuration and build runs for each flavor.
+#
+
+xc_lt_want_enable_shared='yes'
+xc_lt_want_enable_static='yes'
+
+#
+# User may have disabled shared or static libraries.
+#
+case "x$enable_shared" in @%:@ (
+  xno)
+    xc_lt_want_enable_shared='no'
+    ;;
+esac
+case "x$enable_static" in @%:@ (
+  xno)
+    xc_lt_want_enable_static='no'
+    ;;
+esac
+if test "x$xc_lt_want_enable_shared" = 'xno' &&
+  test "x$xc_lt_want_enable_static" = 'xno'; then
+  AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
+fi
+
+#
+# Default behavior on systems that require independent configuration
+# and build runs for shared and static is to enable shared libraries
+# and disable static ones. On these systems option '--disable-shared'
+# must be used in order to build a proper static library.
+#
+
+if test "x$xc_lt_want_enable_shared" = 'xyes' &&
+  test "x$xc_lt_want_enable_static" = 'xyes'; then
+  case $host_os in @%:@ (
+    mingw* | pw32* | cegcc* | os2* | aix*)
+      xc_lt_want_enable_static='no'
+      ;;
+  esac
+fi
+
+#
+# Make libtool aware of current shared and static library preferences
+# taking in account that, depending on host characteristics, libtool
+# may modify these option preferences later in this configure script.
+#
+
+enable_shared=$xc_lt_want_enable_shared
+enable_static=$xc_lt_want_enable_static
+
+#
+# Default behavior is to build PIC objects for shared libraries and
+# non-PIC objects for static libraries.
+#
+
+xc_lt_want_with_pic='default'
+
+#
+# User may have specified PIC preference.
+#
+
+case "x$with_pic" in @%:@ ((
+  xno)
+    xc_lt_want_with_pic='no'
+    ;;
+  xyes)
+    xc_lt_want_with_pic='yes'
+    ;;
+esac
+
+#
+# Default behavior on some systems where building a shared library out
+# of non-PIC compiled objects will fail with following linker error
+# "relocation R_X86_64_32 can not be used when making a shared object"
+# is to build PIC objects even for static libraries. This behavior may
+# be overriden using 'configure --disable-shared --without-pic'.
+#
+
+if test "x$xc_lt_want_with_pic" = 'xdefault'; then
+  case $host_cpu in @%:@ (
+    x86_64 | amd64 | ia64)
+      case $host_os in @%:@ (
+        linux* | freebsd*)
+          xc_lt_want_with_pic='yes'
+          ;;
+      esac
+      ;;
+  esac
+fi
+
+#
+# Make libtool aware of current PIC preference taking in account that,
+# depending on host characteristics, libtool may modify PIC default
+# behavior to fit host system idiosyncrasies later in this script.
+#
+
+with_pic=$xc_lt_want_with_pic
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_BODY
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs embedding of libtool code into
+dnl configure script, regardless of libtool version in
+dnl use when generating configure script.
+
+m4_define([_XC_LIBTOOL_BODY],
+[dnl
+## ----------------------- ##
+##  Start of libtool code  ##
+## ----------------------- ##
+m4_ifdef([LT_INIT],
+[dnl
+LT_INIT([win32-dll])
+],[dnl
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+])dnl
+## --------------------- ##
+##  End of libtool code  ##
+## --------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_LIBRARIES
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl are finally built depending on user input, default
+dnl behavior and knowledge that libtool has about host
+dnl characteristics.
+dnl Results stored in following shell variables:
+dnl   xc_lt_build_shared
+dnl   xc_lt_build_static
+
+m4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
+[dnl
+#
+# Verify if finally libtool shared libraries will be built
+#
+
+case "x$enable_shared" in @%:@ ((
+  xyes | xno)
+    xc_lt_build_shared=$enable_shared
+    ;;
+  *)
+    AC_MSG_ERROR([unexpected libtool enable_shared value: $enable_shared])
+    ;;
+esac
+
+#
+# Verify if finally libtool static libraries will be built
+#
+
+case "x$enable_static" in @%:@ ((
+  xyes | xno)
+    xc_lt_build_static=$enable_static
+    ;;
+  *)
+    AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static])
+    ;;
+esac
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -version-info linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_version_info.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -version-info
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -version-info])
+xc_lt_shlib_use_version_info='yes'
+if test "x$version_type" = 'xnone'; then
+  xc_lt_shlib_use_version_info='no'
+fi
+case $host_os in @%:@ (
+  amigaos*)
+    xc_lt_shlib_use_version_info='yes'
+    ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_version_info])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -no-undefined linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_no_undefined.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -no-undefined
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -no-undefined])
+xc_lt_shlib_use_no_undefined='no'
+if test "x$allow_undefined" = 'xno'; then
+  xc_lt_shlib_use_no_undefined='yes'
+elif test "x$allow_undefined_flag" = 'xunsupported'; then
+  xc_lt_shlib_use_no_undefined='yes'
+fi
+case $host_os in @%:@ (
+  cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
+    xc_lt_shlib_use_no_undefined='yes'
+    ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_no_undefined])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -mimpure-text linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_mimpure_text.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -mimpure-text
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -mimpure-text])
+xc_lt_shlib_use_mimpure_text='no'
+case $host_os in @%:@ (
+  solaris2*)
+    if test "x$GCC" = 'xyes'; then
+      xc_lt_shlib_use_mimpure_text='yes'
+    fi
+    ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_WITH_PIC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl would be built with PIC depending on user input,
+dnl default behavior and knowledge that libtool has
+dnl about host characteristics.
+dnl Results stored in following shell variables:
+dnl   xc_lt_build_shared_with_pic
+dnl   xc_lt_build_static_with_pic
+
+m4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
+[dnl
+#
+# Find out wether libtool libraries would be built wit PIC
+#
+
+case "x$pic_mode" in @%:@ ((((
+  xdefault)
+    xc_lt_build_shared_with_pic='yes'
+    xc_lt_build_static_with_pic='no'
+    ;;
+  xyes)
+    xc_lt_build_shared_with_pic='yes'
+    xc_lt_build_static_with_pic='yes'
+    ;;
+  xno)
+    xc_lt_build_shared_with_pic='no'
+    xc_lt_build_static_with_pic='no'
+    ;;
+  *)
+    xc_lt_build_shared_with_pic='unknown'
+    xc_lt_build_static_with_pic='unknown'
+    AC_MSG_WARN([unexpected libtool pic_mode value: $pic_mode])
+    ;;
+esac
+AC_MSG_CHECKING([whether to build shared libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_shared_with_pic])
+AC_MSG_CHECKING([whether to build static libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_static_with_pic])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether a libtool shared or static library
+dnl is finally built exclusively without the other.
+dnl Results stored in following shell variables:
+dnl   xc_lt_build_shared_only
+dnl   xc_lt_build_static_only
+
+m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
+[dnl
+#
+# Verify if libtool shared libraries will be built while static not built
+#
+
+AC_MSG_CHECKING([whether to build shared libraries only])
+if test "$xc_lt_build_shared" = 'yes' &&
+  test "$xc_lt_build_static" = 'no'; then
+  xc_lt_build_shared_only='yes'
+else
+  xc_lt_build_shared_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_shared_only])
+
+#
+# Verify if libtool static libraries will be built while shared not built
+#
+
+AC_MSG_CHECKING([whether to build static libraries only])
+if test "$xc_lt_build_static" = 'yes' &&
+  test "$xc_lt_build_shared" = 'no'; then
+  xc_lt_build_static_only='yes'
+else
+  xc_lt_build_static_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_static_only])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Performs several checks related with libtool that
+dnl can not be done unless libtool code has already
+dnl been executed. See individual check descriptions
+dnl for further info.
+
+m4_define([_XC_LIBTOOL_POSTLUDE],
+[dnl
+_XC_CHECK_LT_BUILD_LIBRARIES
+_XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+_XC_CHECK_LT_BUILD_WITH_PIC
+_XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl XC_LIBTOOL
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds libtool machinery into configure
+dnl script, regardless of libtool version, and performs
+dnl several additional checks whose results can be used
+dnl later on.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses equivalent logic irrespective of autoconf
+dnl or libtool version being used to generate configure
+dnl script.
+dnl
+dnl Results stored in following shell variables:
+dnl   xc_lt_build_shared
+dnl   xc_lt_build_static
+dnl   xc_lt_shlib_use_version_info
+dnl   xc_lt_shlib_use_no_undefined
+dnl   xc_lt_shlib_use_mimpure_text
+dnl   xc_lt_build_shared_with_pic
+dnl   xc_lt_build_static_with_pic
+dnl   xc_lt_build_shared_only
+dnl   xc_lt_build_static_only
+
+AC_DEFUN([XC_LIBTOOL],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+dnl
+_XC_LIBTOOL_PREAMBLE
+_XC_LIBTOOL_BODY
+_XC_LIBTOOL_POSTLUDE
+dnl
+m4_ifdef([AC_LIBTOOL_WIN32_DLL],
+  [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl
+m4_ifdef([AC_PROG_LIBTOOL],
+  [m4_undefine([AC_PROG_LIBTOOL])])dnl
+m4_ifdef([LT_INIT],
+  [m4_undefine([LT_INIT])])dnl
+dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/xc-translit.m4 b/m4/xc-translit.m4
new file mode 100644 (file)
index 0000000..1918f16
--- /dev/null
@@ -0,0 +1,164 @@
+#---------------------------------------------------------------------------
+#
+# xc-translit.m4
+#
+# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# File version for 'aclocal' use. Keep it a single number.
+# serial 2
+
+
+dnl XC_SH_TR_SH (expression)
+dnl -------------------------------------------------
+dnl Shell execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character.
+dnl Normal shell expansion and substitution takes place
+dnl for given 'expression' at shell execution time before
+dnl transliteration is applied to it.
+
+AC_DEFUN([XC_SH_TR_SH],
+[`echo "$1" | sed 's/[[^a-zA-Z0-9_]]/_/g'`])
+
+
+dnl XC_SH_TR_SH_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_SH_TR_SH but transliterating characters
+dnl given in 'extra' argument to lowercase 'p'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_SH_TR_SH_EX],
+[ifelse([$2], [],
+  [XC_SH_TR_SH([$1])],
+  [`echo "$1" | sed 's/[[$2]]/p/g' | sed 's/[[^a-zA-Z0-9_]]/_/g'`])])
+
+
+dnl XC_M4_TR_SH (expression)
+dnl -------------------------------------------------
+dnl m4 execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character.
+
+AC_DEFUN([XC_M4_TR_SH],
+[patsubst(XC_QPATSUBST(XC_QUOTE($1),
+                       [[^a-zA-Z0-9_]], [_]),
+          [\(_\(.*\)_\)], [\2])])
+
+
+dnl XC_M4_TR_SH_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_M4_TR_SH but transliterating characters
+dnl given in 'extra' argument to lowercase 'p'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_M4_TR_SH_EX],
+[ifelse([$2], [],
+  [XC_M4_TR_SH([$1])],
+  [patsubst(XC_QPATSUBST(XC_QPATSUBST(XC_QUOTE($1),
+                                      [[$2]],
+                                      [p]),
+                         [[^a-zA-Z0-9_]], [_]),
+            [\(_\(.*\)_\)], [\2])])])
+
+
+dnl XC_SH_TR_CPP (expression)
+dnl -------------------------------------------------
+dnl Shell execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character and alnum
+dnl characters are converted to uppercase.
+dnl Normal shell expansion and substitution takes place
+dnl for given 'expression' at shell execution time before
+dnl transliteration is applied to it.
+
+AC_DEFUN([XC_SH_TR_CPP],
+[`echo "$1" | dnl
+sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
+sed 's/[[^A-Z0-9_]]/_/g'`])
+
+
+dnl XC_SH_TR_CPP_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_SH_TR_CPP but transliterating characters
+dnl given in 'extra' argument to uppercase 'P'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_SH_TR_CPP_EX],
+[ifelse([$2], [],
+  [XC_SH_TR_CPP([$1])],
+  [`echo "$1" | dnl
+sed 's/[[$2]]/P/g' | dnl
+sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | dnl
+sed 's/[[^A-Z0-9_]]/_/g'`])])
+
+
+dnl XC_M4_TR_CPP (expression)
+dnl -------------------------------------------------
+dnl m4 execution time transliteration of 'expression'
+dnl argument, where all non-alfanumeric characters are
+dnl converted to the underscore '_' character and alnum
+dnl characters are converted to uppercase.
+
+AC_DEFUN([XC_M4_TR_CPP],
+[patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QUOTE($1),
+                                    [abcdefghijklmnopqrstuvwxyz],
+                                    [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+                       [[^A-Z0-9_]], [_]),
+          [\(_\(.*\)_\)], [\2])])
+
+
+dnl XC_M4_TR_CPP_EX (expression, [extra])
+dnl -------------------------------------------------
+dnl Like XC_M4_TR_CPP but transliterating characters
+dnl given in 'extra' argument to uppercase 'P'. For
+dnl example [*+], [*], and [+] are valid 'extra' args.
+
+AC_DEFUN([XC_M4_TR_CPP_EX],
+[ifelse([$2], [],
+  [XC_M4_TR_CPP([$1])],
+  [patsubst(XC_QPATSUBST(XC_QTRANSLIT(XC_QPATSUBST(XC_QUOTE($1),
+                                                   [[$2]],
+                                                   [P]),
+                                      [abcdefghijklmnopqrstuvwxyz],
+                                      [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+                         [[^A-Z0-9_]], [_]),
+            [\(_\(.*\)_\)], [\2])])])
+
+
+dnl XC_QUOTE (expression)
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'expression' expansion.
+
+AC_DEFUN([XC_QUOTE],
+[[$@]])
+
+
+dnl XC_QPATSUBST (string, regexp[, repl])
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'patsubst' expansion.
+
+AC_DEFUN([XC_QPATSUBST],
+[XC_QUOTE(patsubst([$1], [$2], [$3]))])
+
+
+dnl XC_QTRANSLIT (string, chars, repl)
+dnl -------------------------------------------------
+dnl Expands to quoted result of 'translit' expansion.
+
+AC_DEFUN([XC_QTRANSLIT],
+[XC_QUOTE(translit([$1], [$2], [$3]))])
+
diff --git a/m4/xc-val-flgs.m4 b/m4/xc-val-flgs.m4
new file mode 100644 (file)
index 0000000..36b432c
--- /dev/null
@@ -0,0 +1,243 @@
+#---------------------------------------------------------------------------
+#
+# xc-val-flgs.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_CHECK_VAR_LIBS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LIBS], [
+  xc_bad_var_libs=no
+  for xc_word in $LIBS; do
+    case "$xc_word" in
+      -l* | --library=*)
+        :
+        ;;
+      *)
+        xc_bad_var_libs=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_libs = yes; then
+    AC_MSG_NOTICE([using LIBS: $LIBS])
+    AC_MSG_NOTICE([LIBS note: LIBS should only be used to specify libraries (-lname).])
+  fi
+])
+
+
+dnl _XC_CHECK_VAR_LDFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [
+  xc_bad_var_ldflags=no
+  for xc_word in $LDFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -U*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -I*)
+        xc_bad_var_ldflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_ldflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_ldflags = yes; then
+    AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
+    xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not"
+    for xc_word in $LDFLAGS; do
+      case "$xc_word" in
+        -D*)
+          AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+          ;;
+        -U*)
+          AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+          ;;
+        -I*)
+          AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+          ;;
+        -l* | --library=*)
+          AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+          ;;
+      esac
+    done
+  fi
+])
+
+
+dnl _XC_CHECK_VAR_CPPFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [
+  xc_bad_var_cppflags=no
+  for xc_word in $CPPFLAGS; do
+    case "$xc_word" in
+      -rpath*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cppflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cppflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cppflags = yes; then
+    AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
+    xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not"
+    for xc_word in $CPPFLAGS; do
+      case "$xc_word" in
+        -rpath*)
+          AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+          ;;
+        -L* | --library-path=*)
+          AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+          ;;
+        -l* | --library=*)
+          AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+          ;;
+      esac
+    done
+  fi
+])
+
+
+dnl _XC_CHECK_VAR_CFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [
+  xc_bad_var_cflags=no
+  for xc_word in $CFLAGS; do
+    case "$xc_word" in
+      -D*)
+        xc_bad_var_cflags=yes
+        ;;
+      -U*)
+        xc_bad_var_cflags=yes
+        ;;
+      -I*)
+        xc_bad_var_cflags=yes
+        ;;
+      -rpath*)
+        xc_bad_var_cflags=yes
+        ;;
+      -L* | --library-path=*)
+        xc_bad_var_cflags=yes
+        ;;
+      -l* | --library=*)
+        xc_bad_var_cflags=yes
+        ;;
+    esac
+  done
+  if test $xc_bad_var_cflags = yes; then
+    AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
+    xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not"
+    for xc_word in $CFLAGS; do
+      case "$xc_word" in
+        -D*)
+          AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+          ;;
+        -U*)
+          AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+          ;;
+        -I*)
+          AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+          ;;
+        -rpath*)
+          AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+          ;;
+        -L* | --library-path=*)
+          AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+          ;;
+        -l* | --library=*)
+          AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+          ;;
+      esac
+    done
+  fi
+])
+
+
+dnl XC_CHECK_USER_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the user might
+dnl have set. When checks fails, user is noticed
+dnl about errors detected in all of them and script
+dnl execution is halted.
+dnl
+dnl Intended to be used early in configure script.
+
+AC_DEFUN([XC_CHECK_USER_FLAGS], [
+  AC_PREREQ([2.50])dnl
+  AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+  dnl check order below matters
+  _XC_CHECK_VAR_LIBS
+  _XC_CHECK_VAR_LDFLAGS
+  _XC_CHECK_VAR_CPPFLAGS
+  _XC_CHECK_VAR_CFLAGS
+  if test $xc_bad_var_libs = yes ||
+     test $xc_bad_var_cflags = yes ||
+     test $xc_bad_var_ldflags = yes ||
+     test $xc_bad_var_cppflags = yes; then
+     AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
+  fi
+])
+
+
+dnl XC_CHECK_BUILD_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the configure
+dnl script might have set. When checks fails, user
+dnl is noticed about errors detected in all of them
+dnl but script continues execution.
+dnl
+dnl Intended to be used very late in configure script.
+
+AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
+  AC_PREREQ([2.50])dnl
+  dnl check order below matters
+  _XC_CHECK_VAR_LIBS
+  _XC_CHECK_VAR_LDFLAGS
+  _XC_CHECK_VAR_CPPFLAGS
+  _XC_CHECK_VAR_CFLAGS
+  if test $xc_bad_var_libs = yes ||
+     test $xc_bad_var_cflags = yes ||
+     test $xc_bad_var_ldflags = yes ||
+     test $xc_bad_var_cppflags = yes; then
+     AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
+  fi
+])
+
diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4
new file mode 100644 (file)
index 0000000..0e3b1cb
--- /dev/null
@@ -0,0 +1,668 @@
+#---------------------------------------------------------------------------
+#
+# zz40-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Version macros
+dnl -------------------------------------------------
+dnl Public macros.
+
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl
+
+
+dnl _XC_CFG_PRE_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_PREAMBLE],
+[
+## -------------------------------- ##
+@%:@@%:@  [XC_CONFIGURE_PREAMBLE] ver: []dnl
+XC_CONFIGURE_PREAMBLE_VER_MAJOR.[]dnl
+XC_CONFIGURE_PREAMBLE_VER_MINOR  ##
+## -------------------------------- ##
+
+xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR'
+xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR'
+
+#
+# Set IFS to space, tab and newline.
+#
+
+xc_space=' '
+xc_tab='       '
+xc_newline='
+'
+IFS="$xc_space$xc_tab$xc_newline"
+
+#
+# Set internationalization behavior variables.
+#
+
+LANG='C'
+LC_ALL='C'
+LANGUAGE='C'
+export LANG
+export LC_ALL
+export LANGUAGE
+
+#
+# Some useful variables.
+#
+
+xc_msg_warn='configure: WARNING:'
+xc_msg_abrt='Can not continue.'
+xc_msg_err='configure: error:'
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_ECHO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'echo' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+#
+# Verify that 'echo' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    # Try built-in echo, and fail.
+    echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_TEST
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'test' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+#
+# Verify that 'test' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_VAR_PATH
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'PATH' variable
+dnl is set, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+#
+# Verify that 'PATH' variable is set, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_EXPR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'expr' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'expr' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+  x7)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_SED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'sed' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'sed' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'sed' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'sed' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | sed -e 's:unknown:success:' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_GREP
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'grep' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'grep' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'grep' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'grep' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" 2>/dev/null \
+  | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_TR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'tr' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'tr' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | tr -d "0123456789$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+  xsuccess)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_WC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'wc' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+#
+# Verify that 'wc' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown unknown unknown unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+  | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+  x4)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_CAT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'cat' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+#
+# Verify that 'cat' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`cat <<_EOT 2>/dev/null \
+  | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
+unknown
+unknown
+unknown
+_EOT`
+case "x$xc_tst_str" in @%:@ ((
+  x3)
+    :
+    ;;
+  *)
+    echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2
+    exit 1
+    ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+
+AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+#
+# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
+#
+
+# Directory count in 'PATH' when using a colon separator.
+xc_tst_dirs_col='x'
+xc_tst_prev_IFS=$IFS; IFS=':'
+for xc_tst_dir in $PATH; do
+  IFS=$xc_tst_prev_IFS
+  xc_tst_dirs_col="x$xc_tst_dirs_col"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
+
+# Directory count in 'PATH' when using a semicolon separator.
+xc_tst_dirs_sem='x'
+xc_tst_prev_IFS=$IFS; IFS=';'
+for xc_tst_dir in $PATH; do
+  IFS=$xc_tst_prev_IFS
+  xc_tst_dirs_sem="x$xc_tst_dirs_sem"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
+
+if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
+  # When both counting methods give the same result we do not want to
+  # chose one over the other, and consider auto-detection not possible.
+  if test -z "$PATH_SEPARATOR"; then
+    # Stop dead until user provides 'PATH_SEPARATOR' definition.
+    echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2
+    exit 1
+  fi
+else
+  # Separator with the greater directory count is the auto-detected one.
+  if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then
+    xc_tst_auto_separator=';'
+  else
+    xc_tst_auto_separator=':'
+  fi
+  if test -z "$PATH_SEPARATOR"; then
+    # Simply use the auto-detected one when not already set.
+    PATH_SEPARATOR=$xc_tst_auto_separator
+  elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
+    echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
+  fi
+fi
+xc_PATH_SEPARATOR=$PATH_SEPARATOR
+AC_SUBST([PATH_SEPARATOR])dnl
+])
+
+
+dnl _XC_CFG_PRE_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_POSTLUDE],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+dnl
+xc_configure_preamble_result='yes'
+])
+
+
+dnl XC_CONFIGURE_PREAMBLE
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro emits shell code which does some
+dnl very basic checks related with the availability
+dnl of some commands and utilities needed to allow
+dnl configure script bootstrapping itself when using
+dnl these to figure out other settings. Also emits
+dnl code that performs PATH_SEPARATOR auto-detection
+dnl and sets its value unless it is already set with
+dnl a non-empty value.
+dnl
+dnl These basic checks are intended to be placed and
+dnl executed as early as possible in the resulting
+dnl configure script, and as such these must be pure
+dnl and portable shell code.
+dnl
+dnl This macro may be used directly, or indirectly
+dnl when using other macros that AC_REQUIRE it such
+dnl as XC_CHECK_PATH_SEPARATOR.
+dnl
+dnl Currently the mechanism used to ensure that this
+dnl macro expands early enough in generated configure
+dnl script is making it override autoconf and libtool
+dnl PATH_SEPARATOR check.
+
+AC_DEFUN([XC_CONFIGURE_PREAMBLE],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl Override autoconf and libtool PATH_SEPARATOR check
+dnl -------------------------------------------------
+dnl Macros overriding.
+dnl
+dnl This is done to ensure that the same check is
+dnl used across different autoconf versions and to
+dnl allow expansion of XC_CONFIGURE_PREAMBLE macro
+dnl early enough in the generated configure script.
+
+dnl
+dnl Override when using autoconf 2.53 and newer.
+dnl
+
+m4_ifdef([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl
+m4_defun([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using autoconf 2.50 to 2.52
+dnl
+
+m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl
+m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+ac_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using libtool 1.4.2
+dnl
+
+m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+lt_cv_sys_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+
+dnl XC_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses the same PATH_SEPARATOR check irrespective
+dnl of autoconf or libtool version being used to generate
+dnl configure script.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+dnl
+dnl Strictly speaking the check is done in two steps. The
+dnl first, which does the actual check, takes place in
+dnl XC_CONFIGURE_PREAMBLE macro and happens very early in
+dnl generated configure script. The second one shows and
+dnl logs the result of the check into config.log at a later
+dnl configure stage. Placement of this second stage in
+dnl generated configure script will be done where first
+dnl direct or indirect usage of this macro happens.
+
+AC_DEFUN([XC_CHECK_PATH_SEPARATOR],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl
+#
+# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
+#
+
+if test -z "$xc_configure_preamble_result"; then
+  AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)])
+fi
+
+#
+# Check that 'PATH_SEPARATOR' has already been set.
+#
+
+if test -z "$xc_PATH_SEPARATOR"; then
+  AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)])
+fi
+if test -z "$PATH_SEPARATOR"; then
+  AC_MSG_ERROR([PATH_SEPARATOR not set (internal or config.site problem)])
+fi
+AC_MSG_CHECKING([for path separator])
+AC_MSG_RESULT([$PATH_SEPARATOR])
+if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then
+  AC_MSG_CHECKING([for initial path separator])
+  AC_MSG_RESULT([$xc_PATH_SEPARATOR])
+  AC_MSG_ERROR([path separator mismatch (internal or config.site problem)])
+fi
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/zz50-xc-ovr.m4 b/m4/zz50-xc-ovr.m4
new file mode 100644 (file)
index 0000000..7e9ae59
--- /dev/null
@@ -0,0 +1,60 @@
+#---------------------------------------------------------------------------
+#
+# zz50-xc-ovr.m4
+#
+# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override some language related macros
+dnl -------------------------------------------------
+dnl This is done to prevent Libtool 1.5.X from doing
+dnl unnecesary C++, Fortran and Java tests when only
+dnl using C language and reduce resulting configure
+dnl script by nearly 300 Kb.
+
+m4_ifdef([AC_LIBTOOL_LANG_CXX_CONFIG],
+  [m4_undefine([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_F77_CONFIG],
+  [m4_undefine([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_GCJ_CONFIG],
+  [m4_undefine([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
+
+
+dnl XC_OVR_ZZ50
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ50],
+  [AC_BEFORE([$0],[AC_PROG_LIBTOOL])])
+
diff --git a/m4/zz60-xc-ovr.m4 b/m4/zz60-xc-ovr.m4
new file mode 100644 (file)
index 0000000..959f118
--- /dev/null
@@ -0,0 +1,64 @@
+#---------------------------------------------------------------------------
+#
+# zz60-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override an autoconf provided macro
+dnl -------------------------------------------------
+dnl This macro overrides the one provided by autoconf
+dnl 2.58 or newer, and provides macro definition for
+dnl autoconf 2.57 or older which lack it. This allows
+dnl using libtool 2.2 or newer, which requires that
+dnl this macro is used in configure.ac, with autoconf
+dnl 2.57 or older.
+
+m4_ifdef([AC_CONFIG_MACRO_DIR],
+[dnl
+m4_undefine([AC_CONFIG_MACRO_DIR])dnl
+])
+m4_define([AC_CONFIG_MACRO_DIR],[])
+
+
+dnl XC_OVR_ZZ60
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ60],
+[dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIR])dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIRS])dnl
+])
+
diff --git a/maketgz b/maketgz
index b2a09be..38d2b63 100755 (executable)
--- a/maketgz
+++ b/maketgz
@@ -9,7 +9,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -43,7 +43,7 @@ patch=`echo $libversion |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
 numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`
 
 HEADER=include/curl/curlver.h
-CHEADER=src/version.h
+CHEADER=src/tool_version.h
 
 # requires a date command that knows -u for UTC time zone
 datestamp=`date -u`
@@ -91,9 +91,6 @@ findprog()
   return 0
 }
 
-echo "maketgz: cp lib/curl_config.h.in src/curl_config.h.in"
-cp lib/curl_config.h.in src/curl_config.h.in
-
 ############################################################################
 #
 # Enforce a rerun of configure (updates the VERSION)
@@ -145,7 +142,7 @@ make -s dist VERSION=$version
 
 bzip2="curl-$version.tar.bz2"
 echo "Generating $bzip2"
-gzip -dc $targz | bzip2 --best > $bzip2
+gzip -dc $targz | bzip2 --best > $bzip2
 
 ############################################################################
 #
old mode 100644 (file)
new mode 100755 (executable)
index 115df4e..4191a45
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
 
+scriptversion=2009-04-28.21; # UTC
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
 
+nl='
+'
+IFS=" ""       $nl"
 errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
 
 for file
 do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
+
+for file
+do
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
 
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
 
-     if test ! -d "$pathcomp"; then
-        echo "mkdir -m0755 $pathcomp" 1>&2
+      mkdir "$pathcomp" || lasterr=$?
 
-        mkdir -m0755 "$pathcomp" || lasterr=$?
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
 
-        if test ! -d "$pathcomp"; then
-         errstatus=$lasterr
-        fi
-     fi
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
 
-     pathcomp="$pathcomp/"
-   done
+    pathcomp=$pathcomp/
+  done
 done
 
 exit $errstatus
 
-# mkinstalldirs ends here
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index 09d1385..7a42640 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,58 +78,133 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/AIX
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -104,7 +221,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -117,15 +235,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -135,6 +255,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -142,16 +265,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -164,7 +283,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -177,34 +295,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -216,6 +334,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -235,7 +354,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -245,9 +363,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = RPM
 EXTRA_DIST = Makefile.am
 all: all-recursive
@@ -257,14 +379,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/AIX/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/AIX/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/AIX/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -282,6 +404,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -289,27 +412,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -317,66 +439,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -388,81 +464,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -482,16 +581,22 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -502,8 +607,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -511,18 +615,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -541,22 +665,23 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 7c4a555..e2e7721 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,50 +78,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/AIX/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/curl.spec.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs $(srcdir)/curl.spec.in README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES = curl.spec
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -96,7 +161,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -109,15 +175,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -127,6 +195,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -134,16 +205,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -156,7 +223,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -169,34 +235,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -208,6 +274,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -227,7 +294,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -237,9 +303,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = README curl.spec.in
 all: all-am
 
@@ -248,14 +318,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/AIX/RPM/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/AIX/RPM/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -273,6 +343,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
@@ -281,41 +352,40 @@ mostlyclean-libtool:
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -333,16 +403,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -353,7 +429,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -361,18 +437,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -391,17 +487,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index a37e0d7..366cfa0 100644 (file)
@@ -105,6 +105,7 @@ make DESTDIR=%{buildroot} install-strip
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl
 %attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %{_libdir}/libcurl.a
 %if %{SSL} == 1
 %{_datadir}/curl/curl-ca-bundle.crt
@@ -124,6 +125,7 @@ make DESTDIR=%{buildroot} install-strip
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl-config
 %attr(0644,root,root) %{_mandir}/man1/curl-config.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %attr(0644,root,root) %{_mandir}/man3/*
 %attr(0644,root,root) %{_includedir}/curl/*
 %{_libdir}/libcurl.la
similarity index 90%
rename from Android.mk
rename to packages/Android/Android.mk
index 6453fcd..3e94b80 100644 (file)
@@ -1,8 +1,13 @@
 # Google Android makefile for curl and libcurl
 #
+# This file can be used when building curl using the full Android source
+# release or the NDK. Most users do not want or need to do this; please
+# instead read the Android section in docs/INSTALL for alternate
+# methods.
+#
 # Place the curl source (including this makefile) into external/curl/ in the
 # Android source tree.  Then build them with 'make curl' or just 'make libcurl'
-# from the Android root. Tested with Android 1.5 and 2.1
+# from the Android root. Tested with Android versions 1.5, 2.1-2.3
 #
 # Note: you must first create a curl_config.h file by running configure in the
 # Android environment. The only way I've found to do this is tricky. Perform a
@@ -42,9 +47,9 @@
 # into the right place (but see the note about this below).
 #
 # Dan Fandrich
-# August 2010
+# November 2011
 
-LOCAL_PATH:= $(call my-dir)
+LOCAL_PATH:= $(call my-dir)/../..
 
 common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
 
@@ -62,8 +67,7 @@ CURL_HEADERS := \
        mprintf.h \
        multi.h \
        stdcheaders.h \
-       typecheck-gcc.h \
-       types.h
+       typecheck-gcc.h
 
 LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
@@ -73,6 +77,7 @@ LOCAL_COPY_HEADERS_TO := libcurl/curl
 LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
 
 LOCAL_MODULE:= libcurl
+LOCAL_MODULE_TAGS := optional
 
 # Copy the licence to a place where Android will find it.
 # Actually, this doesn't quite work because the build system searches
@@ -93,6 +98,7 @@ include $(LOCAL_PATH)/src/Makefile.inc
 LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
 
 LOCAL_MODULE := curl
+LOCAL_MODULE_TAGS := optional
 LOCAL_STATIC_LIBRARIES := libcurl
 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
 
index a32f10c..1b3e757 100644 (file)
@@ -92,7 +92,7 @@ ARES_ROOT    = $(TOPDIR)/ares
 CC   = gcc
 YACC = bison -y
 
-CFLAGS = -g -gcoff -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
+CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
          -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
 
 ifeq ($(USE_SSL),1)
index 122015e..6e401a1 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,50 +78,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/EPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/curl.list.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs $(srcdir)/curl.list.in README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES = curl.list
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -96,7 +161,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -109,15 +175,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -127,6 +195,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -134,16 +205,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -156,7 +223,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -169,34 +235,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -208,6 +274,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -227,7 +294,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -237,9 +303,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 EXTRA_DIST = README curl.list.in
 all: all-am
@@ -249,14 +319,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  packages/EPM/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  packages/EPM/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/EPM/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/EPM/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -274,6 +344,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 curl.list: $(top_builddir)/config.status $(srcdir)/curl.list.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
@@ -282,41 +353,40 @@ mostlyclean-libtool:
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -334,16 +404,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -354,7 +430,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -362,18 +438,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -392,17 +488,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 39060dd..00f05fb 100644 (file)
@@ -23,6 +23,7 @@ $datarootdir=@datarootdir@
 
 f 0644 cowo pppusers ${mandir}/man1/curl.1 ./docs/curl.1
 f 0644 cowo pppusers ${mandir}/man1/curl-config.1 ./docs/curl-config.1
+f 0644 cowo pppusers ${mandir}/man1/mk-ca-bundle.1 ./docs/mk-ca-bundle.1
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_cleanup.3 ./docs/curl_easy_cleanup.3
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_getinfo.3 ./docs/curl_easy_getinfo.3
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_init.3 ./docs/curl_easy_init.3
index cc2a027..e576c3d 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,58 +78,133 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/Linux
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -104,7 +221,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -117,15 +235,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -135,6 +255,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -142,16 +265,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -164,7 +283,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -177,34 +295,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -216,6 +334,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -235,7 +354,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -245,9 +363,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = RPM
 all: all-recursive
 
@@ -256,14 +378,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Linux/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Linux/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Linux/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -281,6 +403,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -288,27 +411,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -316,66 +438,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -387,81 +463,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -481,16 +580,22 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -501,8 +606,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -510,18 +614,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -540,22 +664,23 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 46b6955..dd2f19b 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,50 +78,74 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/Linux/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/curl-ssl.spec.in $(srcdir)/curl.spec.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs $(srcdir)/curl.spec.in \
+       $(srcdir)/curl-ssl.spec.in README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES = curl.spec curl-ssl.spec
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -96,7 +162,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -109,15 +176,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -127,6 +196,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -134,16 +206,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -156,7 +224,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -169,34 +236,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -208,6 +275,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -227,7 +295,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -237,9 +304,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = README curl-ssl.spec.in curl.spec.in make_curl_rpm
 all: all-am
 
@@ -248,14 +319,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Linux/RPM/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Linux/RPM/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -273,6 +344,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 curl-ssl.spec: $(top_builddir)/config.status $(srcdir)/curl-ssl.spec.in
@@ -283,41 +355,40 @@ mostlyclean-libtool:
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -335,16 +406,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -355,7 +432,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -363,18 +440,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -393,17 +490,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 7f290ba..287a3a5 100644 (file)
@@ -66,6 +66,7 @@ make DESTDIR=%{buildroot} install-strip
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl
 %attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %{_libdir}/libcurl.so*
 %{_datadir}/curl/curl-ca-bundle.crt
 %doc CHANGES COPYING README testcurl.sh docs/BUGS docs/SSLCERTS
index e211c0a..bef04f3 100644 (file)
@@ -4,6 +4,7 @@ EXTRA_DIST = README                     \
        DOS/README                      \
        DOS/common.dj                   \
        NetWare/get_ver.awk             \
+       NetWare/get_exp.awk             \
        OS400/README.OS400              \
        OS400/ccsidcurl.c               \
        OS400/ccsidcurl.h               \
@@ -28,5 +29,5 @@ EXTRA_DIST = README                   \
        Symbian/readme.txt              \
        TPF/curl.mak                    \
        TPF/maketpf.env_curl            \
-       TPF/maketpf.env_curllib
-
+       TPF/maketpf.env_curllib         \
+       Android/Android.mk
index da71578..4edbf13 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,58 +78,133 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -104,7 +221,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -117,15 +235,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -135,6 +255,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -142,16 +265,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -164,7 +283,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -177,34 +295,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -216,6 +334,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -235,7 +354,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -245,14 +363,19 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = Win32 Linux Solaris EPM AIX vms
 EXTRA_DIST = README                    \
        DOS/README                      \
        DOS/common.dj                   \
        NetWare/get_ver.awk             \
+       NetWare/get_exp.awk             \
        OS400/README.OS400              \
        OS400/ccsidcurl.c               \
        OS400/ccsidcurl.h               \
@@ -277,7 +400,8 @@ EXTRA_DIST = README                         \
        Symbian/readme.txt              \
        TPF/curl.mak                    \
        TPF/maketpf.env_curl            \
-       TPF/maketpf.env_curllib
+       TPF/maketpf.env_curllib         \
+       Android/Android.mk
 
 all: all-recursive
 
@@ -286,14 +410,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -311,6 +435,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -318,27 +443,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -346,66 +470,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -417,82 +495,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       $(mkdir_p) $(distdir)/DOS $(distdir)/NetWare $(distdir)/OS400 $(distdir)/Symbian $(distdir)/Symbian/bwins $(distdir)/Symbian/eabi $(distdir)/Symbian/group $(distdir)/TPF
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -512,16 +612,22 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -532,8 +638,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -541,18 +646,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -571,22 +696,23 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/packages/NetWare/get_exp.awk b/packages/NetWare/get_exp.awk
new file mode 100644 (file)
index 0000000..5bd8a0c
--- /dev/null
@@ -0,0 +1,72 @@
+# ***************************************************************************
+# *                                  _   _ ____  _
+# *  Project                     ___| | | |  _ \| |
+# *                             / __| | | | |_) | |
+# *                            | (__| |_| |  _ <| |___
+# *                             \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 1998 - 2012, 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.
+# *
+# ***************************************************************************
+# awk script which fetches curl function symbols from public header input
+# files and write them to STDOUT. Here you can get an awk version for Win32:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+#
+BEGIN {
+  add_symbol("curl_strequal")
+  add_symbol("curl_strnequal")
+}
+
+function add_symbol(sym_name) {
+  sub(" ", "", sym_name)
+  exports[++idx] = sym_name
+}
+
+
+/^CURL_EXTERN .* [*]?curl_.*[(]/ {
+  sub("[(].*", "")
+  sub("^.* ", "")
+  sub("^[*]", "")
+  add_symbol($0)
+}
+
+END {
+  printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+  # sort symbols with shell sort
+  increment = int(idx / 2)
+  while (increment > 0) {
+    for (i = increment+1; i <= idx; i++) {
+      j = i
+      temp = exports[i]
+      while ((j >= increment+1) && (exports[j-increment] > temp)) {
+        exports[j] = exports[j-increment]
+        j -= increment
+      }
+      exports[j] = temp
+    }
+    if (increment == 2)
+      increment = 1
+    else
+      increment = int(increment*5/11)
+  }
+  # print the array
+  if (EXPPREFIX) {
+    printf(" (%s)\n", EXPPREFIX)
+  }
+  while (x < idx - 1) {
+    printf(" %s,\n", exports[++x])
+  }
+  printf(" %s\n", exports[++x])
+}
+
index 2f3b308..91affbb 100644 (file)
@@ -5,7 +5,7 @@
 # *                            | (__| |_| |  _ <| |___
 # *                             \___|\___/|_| \_\_____|
 # *
-# * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2012, 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
 # * KIND, either express or implied.
 # *
 # ***************************************************************************
-# awk script which fetches curl / ares version number and string from input
+# awk script which fetches curl version number and copyright string from input
 # file and writes them to STDOUT. Here you can get an awk version for Win32:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
 #
 BEGIN {
-  if (match (ARGV[1], /curlver.h/)) {
-    while ((getline < ARGV[1]) > 0) {
-      if (match ($0, /^#define LIBCURL_COPYRIGHT "[^"]+"$/)) {
-        libcurl_copyright_str = substr($0, 28, length($0)-28);
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/)) {
-        libcurl_ver_str = substr($3, 2, length($3)-2);
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/)) {
-        libcurl_ver_major = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/)) {
-        libcurl_ver_minor = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/)) {
-        libcurl_ver_patch = substr($3, 1, length($3));
-      }
-    }
-    libcurl_ver = libcurl_ver_major "," libcurl_ver_minor "," libcurl_ver_patch;
-    print "LIBCURL_VERSION = " libcurl_ver "";
-    print "LIBCURL_VERSION_STR = " libcurl_ver_str "";
-    print "LIBCURL_COPYRIGHT_STR = " libcurl_copyright_str "";
-  }
-  if (match (ARGV[1], /ares_version.h/)) {
-    while ((getline < ARGV[1]) > 0) {
-      if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) {
-        libcares_copyright_str = substr($0, 25, length($0)-25);
-      }
-      else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) {
-        libcares_ver_str = substr($3, 2, length($3)-2);
-      }
-      else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) {
-        libcares_ver_major = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) {
-        libcares_ver_minor = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) {
-        libcares_ver_patch = substr($3, 1, length($3));
-      }
-    }
-    libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch;
-    print "LIBCARES_VERSION = " libcares_ver "";
-    print "LIBCARES_VERSION_STR = " libcares_ver_str "";
-    print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str "";
+  while ((getline < ARGV[1]) > 0) {
+    sub("\r", "") # make MSYS gawk work with CRLF header input.
+    if (match ($0, /^#define LIBCURL_COPYRIGHT "([^"]+)"$/))
+      copyright_string = substr($0, 28, length($0)-28)
+    else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/))
+      version_string = substr($3, 2, length($3)-2)
+    else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/))
+      version_major = $3
+    else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/))
+      version_minor = $3
+    else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/))
+      version_patch = $3
   }
+  print "LIBCURL_VERSION = " version_major "," version_minor "," version_patch
+  print "LIBCURL_VERSION_STR = " version_string
+  print "LIBCURL_COPYRIGHT_STR = " copyright_string
 }
 
-
index 746bba8..73e81f8 100644 (file)
@@ -39,22 +39,24 @@ header files are thus altered during build process to use this pragma, in
 order to force libcurl enums of being type int (the pragma disposition in use
 before inclusion is restored before resuming the including unit compilation).
 
-  Three SSL implementations were present in libcurl. Nevertheless, none of them
-is available on OS/400. To support SSL on OS/400, a fourth implementation has
-been added (qssl.[ch]). There is no way to have different certificate stores
-for CAs and for personal/application certificates/key. More, the SSL context
-may be defined as an application identifier in the main certificate store,
-or as a keyring file. As a consequence, the meaning of some fields have been
-slightly altered:
-_ The "certificate identifier" is taken from CURLOPT_SSLCERT if defined, else
-from CURLOPT_CAINFO.
-_ The certificate identifier is then used as an application identifier in the
-main certificate store. If successful, this context is used.
-_ If the previous step failed, the certificate identifier is used as the file
-name of a keyring. CURLOPT_KEYPASSWD is used here as the keyring password.
-_ The default ca-bundle (CURLOPT_CAINFO) is set to the main certificate store's
-keyring file name: this allows to use the system global CAs by default. (In that
-case, the keyring password is safely recovered from the system... IBM dixit!)
+  Two SSL implementations are available to libcurl on OS/400: QsoSSL which is
+obsolescent, does not support asynchronous I/O and only allows a single SSL
+context within a job, and GSKit that does not suffer from these limitations
+and is able to provide some information about the server certificate.
+  Both implementations of SSL are working on "certificate stores" or keyrings,
+rather than individual certificate/key files. Certificate stores, as weel as
+"certificate labels" are managed by external IBM-defined applications.
+  There are two ways to specify an SSL context:
+- By an application identifier.
+- By a keyring file pathname and (optionally) certificate label.
+  To identify an SSL context by application identifier, use option
+SETOPT_SSLCERT to specify the application identifier.
+  To address an SSL context by keyring and certificate label, use CURLOPT_CAINFO
+to set-up the keyring pathname, CURLOPT_SSLCERT to define the certificate label
+(omitting it will cause the default certificate in keyring to be used) and
+CURLOPT_KEYPASSWD to give the keyring password. If SSL is used without
+defining any of these options, the default (i.e.: system) keyring is used for
+server certificate validation.
 
   Non-standard EBCDIC wrapper prototypes are defined in an additional header
 file: ccsidcurl.h. These should be self-explanatory to an OS/400-aware
@@ -70,46 +72,52 @@ options:
         CURLOPT_COOKIEFILE
         CURLOPT_COOKIEJAR
         CURLOPT_COOKIELIST
+        CURLOPT_COPYPOSTFIELDS
+        CURLOPT_CRLFILE
         CURLOPT_CUSTOMREQUEST
+        CURLOPT_DNS_SERVERS
         CURLOPT_EGDSOCKET
         CURLOPT_ENCODING
-        CURLOPT_FTPPORT
         CURLOPT_FTP_ACCOUNT
         CURLOPT_FTP_ALTERNATIVE_TO_USER
+        CURLOPT_FTPPORT
         CURLOPT_INTERFACE
+        CURLOPT_ISSUERCERT
         CURLOPT_KEYPASSWD
         CURLOPT_KRBLEVEL
+        CURLOPT_MAIL_FROM
+        CURLOPT_MAIL_AUTH
         CURLOPT_NETRC_FILE
-        CURLOPT_COPYPOSTFIELDS
+        CURLOPT_NOPROXY
+        CURLOPT_PASSWORD
         CURLOPT_PROXY
+        CURLOPT_PROXYPASSWORD
+        CURLOPT_PROXYUSERNAME
         CURLOPT_PROXYUSERPWD
         CURLOPT_RANDOM_FILE
         CURLOPT_RANGE
         CURLOPT_REFERER
-        CURLOPT_SSH_PRIVATE_KEYFILE
-        CURLOPT_SSH_PUBLIC_KEYFILE
+        CURLOPT_RTSP_SESSION_UID
+        CURLOPT_RTSP_STREAM_URI
+        CURLOPT_RTSP_TRANSPORT
+        CURLOPT_SOCKS5_GSSAPI_SERVICE
+        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 Note: SSH not available on OS400.
+        CURLOPT_SSH_KNOWNHOSTS          Note: SSH not available on OS400.
+        CURLOPT_SSH_PRIVATE_KEYFILE     Note: SSH not available on OS400.
+        CURLOPT_SSH_PUBLIC_KEYFILE      Note: SSH not available on OS400.
         CURLOPT_SSLCERT
         CURLOPT_SSLCERTTYPE
+        CURLOPT_SSL_CIPHER_LIST
         CURLOPT_SSLENGINE
         CURLOPT_SSLKEY
         CURLOPT_SSLKEYTYPE
-        CURLOPT_SSL_CIPHER_LIST
+        CURLOPT_TLSAUTH_PASSWORD
+        CURLOPT_TLSAUTH_TYPE
+        CURLOPT_TLSAUTH_USERNAME
         CURLOPT_URL
         CURLOPT_USERAGENT
-        CURLOPT_USERPWD
-        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
-        CURLOPT_CRLFILE
-        CURLOPT_ISSUERCERT
         CURLOPT_USERNAME
-        CURLOPT_PASSWORD
-        CURLOPT_PROXYUSERNAME
-        CURLOPT_PROXYPASSWORD
-        CURLOPT_NOPROXY
-        CURLOPT_RTSP_SESSION_UID
-        CURLOPT_RTSP_STREAM_URI
-        CURLOPT_RTSP_TRANSPORT
-        CURLOPT_SOCKS5_GSSAPI_SERVICE
-        CURLOPT_MAIL_FROM
+        CURLOPT_USERPWD
   Else it is the same as for curl_easy_setopt().
   Note that CURLOPT_ERRORBUFFER is not in the list above, since it gives the
 address of an (empty) character buffer, not the address of a string.
@@ -144,6 +152,18 @@ use:
         CURLINFO_EFFECTIVE_URL
         CURLINFO_CONTENT_TYPE
         CURLINFO_FTP_ENTRY_PATH
+        CURLINFO_REDIRECT_URL
+        CURLINFO_PRIMARY_IP
+        CURLINFO_RTSP_SESSION_ID
+        CURLINFO_LOCAL_IP
+  Likewise, the following options are followed by a struct curl_slist * * and a
+CCSID.
+        CURLINFO_SSL_ENGINES
+        CURLINFO_COOKIELIST
+Lists returned should be released with curl_slist_free_all() after use.
+  Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a
+CCSID. Returned structures sould be free'ed using curl_certinfo_free_all() after
+use.
   Other options are processed like in curl_easy_getinfo().
 
   Standard compilation environment does support neither autotools nor make;
@@ -156,14 +176,27 @@ OS/400.
 
 
 Protocols currently implemented on OS/400:
-_ HTTP
-_ HTTPS
+_ DICT
+_ FILE
 _ FTP
 _ FTPS
-_ FTP with secure transmission.
+_ FTP with secure transmission
+_ GOPHER
+_ HTTP
+_ HTTPS
+_ IMAP
+_ IMAPS
+_ IMAP with secure transmission
 _ LDAP
-_ DICT
+_ POP3
+_ POP3S
+_ POP3 with secure transmission
+_ RTSP
+_ SMTP
+_ SMTPS
+_ SMTP with secure transmission
 _ TELNET
+_ TFTP
 
 
 
@@ -177,6 +210,8 @@ _ As a prerequisite, QADRT development environment must be installed.
 _ Install the curl source directory in IFS.
 _ Enter shell (QSH)
 _ Change current directory to the curl installation directory
+- If the SSL backend has to be changed, edit file lib/config-os400.h
+  accordingly.
 _ Change current directory to ./packages/OS400
 _ Edit file iniscript.sh. You may want to change tunable configuration
   parameters, like debug info generation, optimisation level, listing option,
index ad67e1c..a37f790 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -33,6 +33,7 @@
 
 #include "curl.h"
 #include "mprintf.h"
+#include "slist.h"
 #include "urldata.h"
 #include "url.h"
 #include "getinfo.h"
@@ -67,7 +68,7 @@ makeOS400IconvCode(char buf[ICONV_ID_SIZE], unsigned int ccsid)
 
   ccsid &= 0xFFFF;
 
-  if (ccsid == NOCONV_CCSID)
+  if(ccsid == NOCONV_CCSID)
     ccsid = ASCII_CCSID;
 
   memset(buf, 0, ICONV_ID_SIZE);
@@ -93,7 +94,7 @@ iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr)
   makeOS400IconvCode(tocode, ccsidout);
   memset(tocode + 13, 0, sizeof tocode - 13);   /* Dest. code id format. */
 
-  if (cstr)
+  if(cstr)
     fromcode[18] = '1';                         /* Set null-terminator flag. */
 
   return iconv_open(tocode, fromcode);
@@ -117,23 +118,23 @@ convert(char * d, size_t dlen, int dccsid,
   ***  Return the converted destination byte count, or -1 if error.
   **/
 
-  if (sccsid == 65535)
+  if(sccsid == 65535)
     sccsid = ASCII_CCSID;
 
-  if (dccsid == 65535)
+  if(dccsid == 65535)
     dccsid = ASCII_CCSID;
 
-  if (sccsid == dccsid) {
+  if(sccsid == dccsid) {
     lslen = slen >= 0? slen: strlen(s) + 1;
     i = lslen < dlen? lslen: dlen;
 
-    if (s != d && i > 0)
+    if(s != d && i > 0)
       memcpy(d, s, i);
 
     return i;
     }
 
-  if (slen < 0) {
+  if(slen < 0) {
     lslen = 0;
     cd = iconv_open_CCSID(dccsid, sccsid, 1);
     }
@@ -142,12 +143,12 @@ convert(char * d, size_t dlen, int dccsid,
     cd = iconv_open_CCSID(dccsid, sccsid, 0);
     }
 
-  if (ICONV_OPEN_ERROR(cd))
+  if(ICONV_OPEN_ERROR(cd))
     return -1;
 
   i = dlen;
 
-  if ((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
+  if((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
     i = -1;
   else
     i -= dlen;
@@ -174,24 +175,24 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
   dlen *= MAX_CONV_EXPANSION;           /* Allow some expansion. */
   d = malloc(dlen);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   l = convert(d, dlen, dccsid, s, slen, sccsid);
 
-  if (l < 0) {
+  if(l < 0) {
     free(d);
     return (char *) NULL;
     }
 
-  if (slen < 0) {
+  if(slen < 0) {
     /* Need to null-terminate even when source length is given.
        Since destination code size is unknown, use a conversion to generate
        terminator. */
 
     l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID);
 
-    if (l2 < 0) {
+    if(l2 < 0) {
       free(d);
       return (char *) NULL;
       }
@@ -199,10 +200,10 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
     l += l2;
     }
 
-  if ((size_t) l < dlen) {
+  if((size_t) l < dlen) {
     cp = realloc(d, l);         /* Shorten to minimum needed. */
 
-    if (cp)
+    if(cp)
       d = cp;
     }
 
@@ -210,6 +211,24 @@ dynconvert(int dccsid, const char * s, int slen, int sccsid)
 }
 
 
+static struct curl_slist *
+slist_convert(int dccsid, struct curl_slist * from, int sccsid)
+
+{
+  struct curl_slist * to = (struct curl_slist *) NULL;
+  char * cp;
+
+  for (; from; from = from->next) {
+    if(!(cp = dynconvert(dccsid, from->data, -1, sccsid))) {
+      curl_slist_free_all(to);
+      return (struct curl_slist *) NULL;
+    }
+    to = Curl_slist_append_nodup(to, cp);
+  }
+  return to;
+}
+
+
 char *
 curl_version_ccsid(unsigned int ccsid)
 
@@ -220,16 +239,16 @@ curl_version_ccsid(unsigned int ccsid)
 
   aversion = curl_version();
 
-  if (!aversion)
+  if(!aversion)
     return aversion;
 
   i = strlen(aversion) + 1;
   i *= MAX_CONV_EXPANSION;
 
-  if (!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
+  if(!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
     return (char *) NULL;
 
-  if (convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
+  if(convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
     return (char *) NULL;
 
   return eversion;
@@ -244,20 +263,20 @@ curl_easy_escape_ccsid(CURL * handle, const char * string, int length,
   char * s;
   char * d;
 
-  if (!string) {
+  if(!string) {
     errno = EINVAL;
     return (char *) NULL;
     }
 
   s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
 
-  if (!s)
+  if(!s)
     return (char *) NULL;
 
   d = curl_easy_escape(handle, s, 0);
   free(s);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   s = dynconvert(dccsid, d, -1, ASCII_CCSID);
@@ -275,26 +294,26 @@ curl_easy_unescape_ccsid(CURL * handle, const char * string, int length,
   char * s;
   char * d;
 
-  if (!string) {
+  if(!string) {
     errno = EINVAL;
     return (char *) NULL;
     }
 
   s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
 
-  if (!s)
+  if(!s)
     return (char *) NULL;
 
   d = curl_easy_unescape(handle, s, 0, outlength);
   free(s);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   s = dynconvert(dccsid, d, -1, ASCII_CCSID);
   free(d);
 
-  if (s && outlength)
+  if(s && outlength)
     *outlength = strlen(s);
 
   return s;
@@ -310,12 +329,12 @@ curl_slist_append_ccsid(struct curl_slist * list,
 
   s = (char *) NULL;
 
-  if (!data)
+  if(!data)
     return curl_slist_append(list, data);
 
   s = dynconvert(ASCII_CCSID, data, -1, ccsid);
 
-  if (!s)
+  if(!s)
     return (struct curl_slist *) NULL;
 
   list = curl_slist_append(list, s);
@@ -331,12 +350,12 @@ curl_getdate_ccsid(const char * p, const time_t * unused, unsigned int ccsid)
   char * s;
   time_t t;
 
-  if (!p)
+  if(!p)
     return curl_getdate(p, unused);
 
   s = dynconvert(ASCII_CCSID, p, -1, ccsid);
 
-  if (!s)
+  if(!s)
     return (time_t) -1;
 
   t = curl_getdate(s, unused);
@@ -357,10 +376,10 @@ convert_version_info_string(const char * * stringp,
      `*bufp' and `*left' are updated accordingly.
      Return 0 if ok, else -1. */
 
-  if (*stringp) {
+  if(*stringp) {
     l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID);
 
-    if (l <= 0)
+    if(l <= 0)
       return -1;
 
     *stringp = *bufp;
@@ -393,12 +412,12 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
 
   /* If caller has been compiled with a new version, error. */
 
-  if (stamp > CURLVERSION_NOW)
+  if(stamp > CURLVERSION_NOW)
     return (curl_version_info_data *) NULL;
 
   p = curl_version_info(stamp);
 
-  if (!p)
+  if(!p)
     return p;
 
   /* Measure thread space needed. */
@@ -406,53 +425,53 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
   n = 0;
   nproto = 0;
 
-  if (p->protocols) {
+  if(p->protocols) {
     while (p->protocols[nproto])
       n += strlen(p->protocols[nproto++]);
 
     n += nproto++;
     }
 
-  if (p->version)
+  if(p->version)
     n += strlen(p->version) + 1;
 
-  if (p->host)
+  if(p->host)
     n += strlen(p->host) + 1;
 
-  if (p->ssl_version)
+  if(p->ssl_version)
     n += strlen(p->ssl_version) + 1;
 
-  if (p->libz_version)
+  if(p->libz_version)
     n += strlen(p->libz_version) + 1;
 
-  if (p->ares)
+  if(p->ares)
     n += strlen(p->ares) + 1;
 
-  if (p->libidn)
+  if(p->libidn)
     n += strlen(p->libidn) + 1;
 
-  if (p->libssh_version)
+  if(p->libssh_version)
     n += strlen(p->libssh_version) + 1;
 
   /* Allocate thread space. */
 
   n *= MAX_CONV_EXPANSION;
 
-  if (nproto)
+  if(nproto)
     n += nproto * sizeof(const char *);
 
   cp = Curl_thread_buffer(LK_VERSION_INFO_DATA, n);
   id = (curl_version_info_data *) Curl_thread_buffer(LK_VERSION_INFO,
                                                      sizeof *id);
 
-  if (!id || !cp)
+  if(!id || !cp)
     return (curl_version_info_data *) NULL;
 
   /* Copy data and convert strings. */
 
   memcpy((char *) id, (char *) p, sizeof *p);
 
-  if (id->protocols) {
+  if(id->protocols) {
     id->protocols = (const char * const *) cp;
     i = nproto * sizeof id->protocols[0];
     memcpy(cp, (char *) p->protocols, i);
@@ -460,30 +479,30 @@ curl_version_info_ccsid(CURLversion stamp, unsigned int ccsid)
     n -= i;
 
     for (i = 0; id->protocols[i]; i++)
-      if (convert_version_info_string(((const char * *) id->protocols) + i,
+      if(convert_version_info_string(((const char * *) id->protocols) + i,
                                       &cp, &n, ccsid))
         return (curl_version_info_data *) NULL;
     }
 
-  if (convert_version_info_string(&id->version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->host, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->host, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->ares, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->ares, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libidn, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libidn, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
   return id;
@@ -500,15 +519,15 @@ curl_easy_strerror_ccsid(CURLcode error, unsigned int ccsid)
 
   s = curl_easy_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
@@ -525,15 +544,15 @@ curl_share_strerror_ccsid(CURLSHcode error, unsigned int ccsid)
 
   s = curl_share_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
@@ -550,21 +569,39 @@ curl_multi_strerror_ccsid(CURLMcode error, unsigned int ccsid)
 
   s = curl_multi_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
 }
 
 
+void
+curl_certinfo_free_all(struct curl_certinfo *info)
+
+{
+  int i;
+
+  /* Free all memory used by certificate info. */
+  if(info) {
+    if(info->certinfo) {
+      for (i = 0; i < info->num_of_certs; i++)
+        curl_slist_free_all(info->certinfo[i]);
+      free((char *) info->certinfo);
+    }
+    free((char *) info);
+  }
+}
+
+
 CURLcode
 curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
 
@@ -577,6 +614,10 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
   char * s;
   char * d;
   struct SessionHandle * data;
+  struct curl_slist * * slp;
+  struct curl_certinfo * cipf;
+  struct curl_certinfo * cipt;
+  int i;
 
   /* WARNING: unlike curl_easy_get_info(), the strings returned by this
      procedure have to be free'ed. */
@@ -586,25 +627,66 @@ curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
   paramp = va_arg(arg, void *);
   ret = Curl_getinfo(data, info, paramp);
 
-  if (ret != CURLE_OK || ((int) info & CURLINFO_TYPEMASK) != CURLINFO_STRING) {
-    va_end(arg);
-    return ret;
-    }
+  if(ret == CURLE_OK)
+    switch ((int) info & CURLINFO_TYPEMASK) {
 
-  ccsid = va_arg(arg, unsigned int);
-  va_end(arg);
-  cpp = (char * *) paramp;
-  s = *cpp;
+    case CURLINFO_STRING:
+      ccsid = va_arg(arg, unsigned int);
+      cpp = (char * *) paramp;
+      s = *cpp;
+
+      if(s) {
+        d = dynconvert(ccsid, s, -1, ASCII_CCSID);
+        *cpp = d;
 
-  if (!s)
-    return ret;
+        if(!d)
+          ret = CURLE_OUT_OF_MEMORY;
+      }
 
-  d = dynconvert(ccsid, s, -1, ASCII_CCSID);
-  *cpp = d;
+      break;
 
-  if (!d)
-    return CURLE_OUT_OF_MEMORY;
+    case CURLINFO_SLIST:
+      ccsid = va_arg(arg, unsigned int);
+      if(info == CURLINFO_CERTINFO) {
+        cipf = *(struct curl_certinfo * *) paramp;
+        if(cipf) {
+          if(!(cipt = (struct curl_certinfo *) malloc(sizeof *cipt)))
+            ret = CURLE_OUT_OF_MEMORY;
+          else {
+            cipt->certinfo = (struct curl_slist * *) calloc(cipf->num_of_certs +
+                             1, sizeof(struct curl_slist *));
+            if(!cipt->certinfo)
+              ret = CURLE_OUT_OF_MEMORY;
+            else {
+              cipt->num_of_certs = cipf->num_of_certs;
+              for (i = 0; i < cipf->num_of_certs; i++)
+                if(cipf->certinfo[i])
+                  if(!(cipt->certinfo[i] = slist_convert(ccsid,
+                                                          cipf->certinfo[i],
+                                                          ASCII_CCSID))) {
+                    ret = CURLE_OUT_OF_MEMORY;
+                    break;
+                  }
+              }
+            }
+
+          if(ret != CURLE_OK) {
+            curl_certinfo_free_all(cipt);
+            cipt = (struct curl_certinfo *) NULL;
+          }
+
+          *(struct curl_certinfo * *) paramp = cipt;
+        }
+      }
+      else {
+        slp = (struct curl_slist * *) paramp;
+        if(*slp)
+          if(!(*slp = slist_convert(ccsid, *slp, ASCII_CCSID)))
+            ret = CURLE_OUT_OF_MEMORY;
+      }
+    }
 
+  va_end(arg);
   return ret;
 }
 
@@ -615,15 +697,15 @@ Curl_is_formadd_string(CURLformoption option)
 {
   switch (option) {
 
-    case CURLFORM_FILENAME:
-    case CURLFORM_CONTENTTYPE:
-    case CURLFORM_BUFFER:
-    case CURLFORM_FILE:
-    case CURLFORM_FILECONTENT:
-    case CURLFORM_COPYCONTENTS:
-    case CURLFORM_COPYNAME:
-      return 1;
-    }
+  case CURLFORM_FILENAME:
+  case CURLFORM_CONTENTTYPE:
+  case CURLFORM_BUFFER:
+  case CURLFORM_FILE:
+  case CURLFORM_FILECONTENT:
+  case CURLFORM_COPYCONTENTS:
+  case CURLFORM_COPYNAME:
+    return 1;
+  }
 
   return 0;
 }
@@ -634,9 +716,9 @@ Curl_formadd_release_local(struct curl_forms * forms, int nargs, int skip)
 
 {
   while (nargs--)
-    if (nargs != skip)
-      if (Curl_is_formadd_string(forms[nargs].option))
-        if (forms[nargs].value)
+    if(nargs != skip)
+      if(Curl_is_formadd_string(forms[nargs].option))
+        if(forms[nargs].value)
           free((char *) forms[nargs].value);
 
   free((char *) forms);
@@ -652,35 +734,35 @@ Curl_formadd_convert(struct curl_forms * forms,
   char * cp;
   char * cp2;
 
-  if (formx < 0 || !forms[formx].value)
+  if(formx < 0 || !forms[formx].value)
     return 0;
 
-  if (lengthx >= 0)
+  if(lengthx >= 0)
     l = (int) forms[lengthx].value;
   else
     l = strlen(forms[formx].value) + 1;
 
   cp = malloc(MAX_CONV_EXPANSION * l);
 
-  if (!cp)
+  if(!cp)
     return -1;
 
   l = convert(cp, MAX_CONV_EXPANSION * l, ASCII_CCSID,
               forms[formx].value, l, ccsid);
 
-  if (l < 0) {
+  if(l < 0) {
     free(cp);
     return -1;
     }
 
   cp2 = realloc(cp, l);                 /* Shorten buffer to the string size. */
 
-  if (cp2)
+  if(cp2)
     cp = cp2;
 
   forms[formx].value = cp;
 
-  if (lengthx >= 0)
+  if(lengthx >= 0)
     forms[lengthx].value = (char *) l;  /* Update to length after conversion. */
 
   return l;
@@ -729,7 +811,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
   lformlen = ALLOC_GRANULE;
   lforms = malloc(lformlen * sizeof *lforms);
 
-  if (!lforms)
+  if(!lforms)
     return CURL_FORMADD_MEMORY;
 
   /* Process the arguments, copying them into local array, latching conversion
@@ -747,11 +829,11 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
   for (;;) {
     /* Make sure there is still room for an item in local array. */
 
-    if (nargs >= lformlen) {
+    if(nargs >= lformlen) {
       lformlen += ALLOC_GRANULE;
       tforms = realloc(lforms, lformlen * sizeof *lforms);
 
-      if (!tforms) {
+      if(!tforms) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -761,7 +843,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
     /* Get next option. */
 
-    if (forms) {
+    if(forms) {
       /* Get option from array. */
 
       option = forms->option;
@@ -773,7 +855,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
       option = va_arg(arg, CURLformoption);
 
-      if (option == CURLFORM_END)
+      if(option == CURLFORM_END)
         break;
       }
 
@@ -786,7 +868,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
       continue;
 
     case CURLFORM_ARRAY:
-      if (!forms) {
+      if(!forms) {
         forms = va_arg(arg, struct curl_forms *);
         continue;
         }
@@ -798,12 +880,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
       option = CURLFORM_PTRNAME;                /* Static for now. */
 
     case CURLFORM_PTRNAME:
-      if (namex >= 0)
+      if(namex >= 0)
         result = CURL_FORMADD_OPTION_TWICE;
 
       namex = nargs;
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         nameccsid = (unsigned int) va_arg(arg, long);
         }
@@ -815,12 +897,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
       break;
 
     case CURLFORM_COPYCONTENTS:
-      if (contentx >= 0)
+      if(contentx >= 0)
         result = CURL_FORMADD_OPTION_TWICE;
 
       contentx = nargs;
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         contentccsid = (unsigned int) va_arg(arg, long);
         }
@@ -833,7 +915,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
     case CURLFORM_PTRCONTENTS:
     case CURLFORM_BUFFERPTR:
-      if (!forms)
+      if(!forms)
         value = va_arg(arg, char *);            /* No conversion. */
 
       break;
@@ -841,7 +923,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
     case CURLFORM_CONTENTSLENGTH:
       lengthx = nargs;
 
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
@@ -849,25 +931,25 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
     case CURLFORM_NAMELENGTH:
       namelengthx = nargs;
 
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
 
     case CURLFORM_BUFFERLENGTH:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
 
     case CURLFORM_CONTENTHEADER:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, struct curl_slist *);
 
       break;
 
     case CURLFORM_STREAM:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, void *);
 
       break;
@@ -875,7 +957,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
     case CURLFORM_CONTENTTYPE:
       /* If a previous content has been encountered, convert it now. */
 
-      if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
+      if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -887,12 +969,12 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
     default:
       /* Must be a convertible string. */
 
-      if (!Curl_is_formadd_string(option)) {
+      if(!Curl_is_formadd_string(option)) {
         result = CURL_FORMADD_UNKNOWN_OPTION;
         break;
         }
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         ccsid = (unsigned int) va_arg(arg, long);
         }
@@ -905,7 +987,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
       lforms[nargs].value = value;
 
-      if (Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
+      if(Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -913,7 +995,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
       value = lforms[nargs].value;
       }
 
-    if (result != CURL_FORMADD_OK)
+    if(result != CURL_FORMADD_OK)
       break;
 
     lforms[nargs].value = value;
@@ -924,15 +1006,15 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
   /* Convert the name and the last content, now that we know their lengths. */
 
-  if (result == CURL_FORMADD_OK && namex >= 0) {
-    if (Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
+  if(result == CURL_FORMADD_OK && namex >= 0) {
+    if(Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
       result = CURL_FORMADD_MEMORY;
     else
       lforms[namex].option = CURLFORM_COPYNAME;         /* Force copy. */
     }
 
-  if (result == CURL_FORMADD_OK) {
-    if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
+  if(result == CURL_FORMADD_OK) {
+    if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
       result = CURL_FORMADD_MEMORY;
     else
       contentx = -1;
@@ -940,7 +1022,7 @@ curl_formadd_ccsid(struct curl_httppost * * httppost,
 
   /* Do the formadd with our converted parameters. */
 
-  if (result == CURL_FORMADD_OK) {
+  if(result == CURL_FORMADD_OK) {
     lforms[nargs].option = CURLFORM_END;
     result = curl_formadd(httppost, last_post,
                           CURLFORM_ARRAY, lforms, CURLFORM_END);
@@ -971,17 +1053,17 @@ Curl_formget_callback_ccsid(void * arg, const char * buf, size_t len)
 
   p = (cfcdata *) arg;
 
-  if ((long) len <= 0)
+  if((long) len <= 0)
     return (*p->append)(p->arg, buf, len);
 
   b = malloc(MAX_CONV_EXPANSION * len);
 
-  if (!b)
+  if(!b)
     return (size_t) -1;
 
   l = convert(b, MAX_CONV_EXPANSION * len, p->ccsid, buf, len, ASCII_CCSID);
 
-  if (l < 0) {
+  if(l < 0) {
     free(b);
     return (size_t) -1;
     }
@@ -1026,10 +1108,14 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
      the same message; but since threadsafeness is not handled here,
      this may occur (and we don't care!). */
 
-  if (testwarn) {
+  if(testwarn) {
     testwarn = 0;
 
-    if ((int) STRING_LAST != (int) STRING_MAIL_FROM + 1)
+#ifdef USE_TLS_SRP
+    if((int) STRING_LAST != (int) STRING_TLSAUTH_PASSWORD + 1)
+#else
+    if((int) STRING_LAST != (int) STRING_MAIL_AUTH + 1)
+#endif
       curl_mfprintf(stderr,
        "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n");
     }
@@ -1045,54 +1131,58 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
   case CURLOPT_COOKIEFILE:
   case CURLOPT_COOKIEJAR:
   case CURLOPT_COOKIELIST:
+  case CURLOPT_CRLFILE:
   case CURLOPT_CUSTOMREQUEST:
+  case CURLOPT_DNS_SERVERS:
   case CURLOPT_EGDSOCKET:
   case CURLOPT_ENCODING:
-  case CURLOPT_FTPPORT:
   case CURLOPT_FTP_ACCOUNT:
   case CURLOPT_FTP_ALTERNATIVE_TO_USER:
+  case CURLOPT_FTPPORT:
   case CURLOPT_INTERFACE:
+  case CURLOPT_ISSUERCERT:
   case CURLOPT_KEYPASSWD:
   case CURLOPT_KRBLEVEL:
+  case CURLOPT_MAIL_FROM:
+  case CURLOPT_MAIL_AUTH:
   case CURLOPT_NETRC_FILE:
+  case CURLOPT_NOPROXY:
+  case CURLOPT_PASSWORD:
   case CURLOPT_PROXY:
+  case CURLOPT_PROXYPASSWORD:
+  case CURLOPT_PROXYUSERNAME:
   case CURLOPT_PROXYUSERPWD:
   case CURLOPT_RANDOM_FILE:
   case CURLOPT_RANGE:
   case CURLOPT_REFERER:
+  case CURLOPT_RTSP_SESSION_ID:
+  case CURLOPT_RTSP_STREAM_URI:
+  case CURLOPT_RTSP_TRANSPORT:
+  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
+  case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
+  case CURLOPT_SSH_KNOWNHOSTS:
   case CURLOPT_SSH_PRIVATE_KEYFILE:
   case CURLOPT_SSH_PUBLIC_KEYFILE:
   case CURLOPT_SSLCERT:
   case CURLOPT_SSLCERTTYPE:
+  case CURLOPT_SSL_CIPHER_LIST:
   case CURLOPT_SSLENGINE:
   case CURLOPT_SSLKEY:
   case CURLOPT_SSLKEYTYPE:
-  case CURLOPT_SSL_CIPHER_LIST:
+  case CURLOPT_TLSAUTH_PASSWORD:
+  case CURLOPT_TLSAUTH_TYPE:
+  case CURLOPT_TLSAUTH_USERNAME:
   case CURLOPT_URL:
   case CURLOPT_USERAGENT:
-  case CURLOPT_USERPWD:
-  case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
-  case CURLOPT_CRLFILE:
-  case CURLOPT_ISSUERCERT:
   case CURLOPT_USERNAME:
-  case CURLOPT_PASSWORD:
-  case CURLOPT_PROXYUSERNAME:
-  case CURLOPT_PROXYPASSWORD:
-  case CURLOPT_NOPROXY:
-  case CURLOPT_RTSP_SESSION_ID:
-  case CURLOPT_RTSP_STREAM_URI:
-  case CURLOPT_RTSP_TRANSPORT:
-  /* SSH2 not (yet) implemented on OS400. */
-  /* case CURLOPT_SSH_KNOWNHOSTS: */
-  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
-  case CURLOPT_MAIL_FROM:
+  case CURLOPT_USERPWD:
     s = va_arg(arg, char *);
     ccsid = va_arg(arg, unsigned int);
 
-    if (s) {
+    if(s) {
       s = dynconvert(ASCII_CCSID, s, -1, ccsid);
 
-      if (!s) {
+      if(!s) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
@@ -1100,7 +1190,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
 
     result = curl_easy_setopt(curl, tag, s);
 
-    if (s)
+    if(s)
       free(s);
 
     break;
@@ -1114,16 +1204,16 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
 
     pfsize = data->set.postfieldsize;
 
-    if (!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
+    if(!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
       result = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, s);
       break;
       }
 
-    if (pfsize == -1) {
+    if(pfsize == -1) {
       /* Data is null-terminated. */
       s = dynconvert(ASCII_CCSID, s, -1, ccsid);
 
-      if (!s) {
+      if(!s) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
@@ -1131,7 +1221,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
     else {
       /* Data length specified. */
 
-      if (pfsize < 0 || pfsize > SIZE_MAX) {
+      if(pfsize < 0 || pfsize > SIZE_MAX) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
@@ -1139,19 +1229,19 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
       len = pfsize;
       pfsize = len * MAX_CONV_EXPANSION;
 
-      if (pfsize > SIZE_MAX)
+      if(pfsize > SIZE_MAX)
         pfsize = SIZE_MAX;
 
       cp = malloc(pfsize);
 
-      if (!cp) {
+      if(!cp) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
 
       pfsize = convert(cp, pfsize, ASCII_CCSID, s, len, ccsid);
 
-      if (pfsize < 0) {
+      if(pfsize < 0) {
         free(cp);
         result = CURLE_OUT_OF_MEMORY;
         break;
index 96340c9..eaa591f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -60,5 +60,6 @@ CURL_EXTERN int curl_formget_ccsid(struct curl_httppost * form, void * arg,
                                    curl_formget_callback append,
                                    unsigned int ccsid);
 CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...);
+CURL_EXTERN void curl_certinfo_free_all(struct curl_certinfo *info);
 
 #endif
index b5e46bb..1015843 100644 (file)
@@ -5,7 +5,7 @@
       *                            | (__| |_| |  _ <| |___
       *                             \___|\___/|_| \_\_____|
       *
-      * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+      * Copyright (C) 1998 - 2013, 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
@@ -80,6 +80,8 @@
      d                 c                   X'00000000'
      d CURL_GLOBAL_DEFAULT...
      d                 c                   X'00000003'
+     d CURL_GLOBAL_ACK_EINTR...
+     d                 c                   X'00000004'
       *
      d CURL_VERSION_IPV6...
      d                 c                   X'00000001'
      d                 c                   X'00001000'
      d CURL_VERSION_CURLDEBUG...
      d                 c                   X'00002000'
+     d CURL_VERSION_TLSAUTH_SRP...
+     d                 c                   X'00004000'
+     d CURL_VERSION_NTLM_WB...
+     d                 c                   X'00008000'
       *
      d HTTPPOST_FILENAME...
      d                 c                   X'00000001'
      d CURLAUTH_NTLM   c                   X'00000008'
      d CURLAUTH_DIGEST_IE...
      d                 c                   X'00000010'
+     d CURLAUTH_NTLM_WB...
+     d                 c                   X'00000020'
+     d CURLAUTH_ONLY...
+     d                 c                   X'80000000'
      d CURLAUTH_ANY    c                   X'7FFFFFEF'
      d CURLAUTH_ANYSAFE...
      d                 c                   X'7FFFFFEE'
      d                 c                   X'00000004'
      d CURLSSH_AUTH_KEYBOARD...
      d                 c                   X'00000008'
+     d CURLSSH_AUTH_AGENT...
+     d                 c                   X'00000010'
      d CURLSSH_AUTH_DEFAULT...
      d                 c                   X'7FFFFFFF'                          CURLSSH_AUTH_ANY
       *
+     d CURLGSSAPI_DELEGATION_NONE...
+     d                 c                   0
+     d CURLGSSAPI_DELEGATION_POLICY_FLAG...
+     d                 c                   X'00000001'
+     d CURLGSSAPI_DELEGATION_FLAG...
+     d                 c                   X'00000002'
+      *
      d CURL_ERROR_SIZE...
      d                 c                   256
       *
      d CURL_SSLVERSION_SSLv3...
      d                 c                   3
       *
+     d CURL_TLSAUTH_NONE...
+     d                 c                   0
+     d CURL_TLSAUTH_SRP...
+     d                 c                   1
+      *
      d CURL_REDIR_GET_ALL...
      d                 c                   0
      d CURL_REDIR_POST_301...
      d                 c                   1
      d CURL_REDIR_POST_302...
      d                 c                   2
+     d CURL_REDIR_POST_303...
+     d                 c                   4
      d CURL_REDIR_POST_ALL...
-     d                 c                   3
+     d                 c                   7
       *
      d CURL_POLL_NONE  c                   0
      d CURL_POLL_IN    c                   1
      d CURL_FNMATCHFUNC_FAIL...
      d                 c                   2
       *
+     d CURL_WAIT_POLLIN...
+     d                 c                   X'0001'
+     d CURL_WAIT_POLLPRI...
+     d                 c                   X'0002'
+     d CURL_WAIT_POLLOUT...
+     d                 c                   X'0004'
+      *
       **************************************************************************
       *                                Types
       **************************************************************************
      d                 c                   2
      d  CURLE_URL_MALFORMAT...
      d                 c                   3
-     d  CURLE_OBSOLETE4...
+     d  CURLE_NOT_BUILT_IN...
      d                 c                   4
      d  CURLE_COULDNT_RESOLVE_PROXY...
      d                 c                   5
      d                 c                   8
      d  CURLE_REMOTE_ACCESS_DENIED...
      d                 c                   9
-     d  CURLE_OBSOLETE10...
+     d  CURLE_FTP_ACCEPT_FAILED...
      d                 c                   10
      d  CURLE_FTP_WEIRD_PASS_REPLY...
      d                 c                   11
-     d  CURLE_OBSOLETE12...
+     d  CURLE_FTP_ACCEPT_TIMEOUT...
      d                 c                   12
      d  CURLE_FTP_WEIRD_PASV_REPLY...
      d                 c                   13
      d                 c                   46
      d  CURLE_TOO_MANY_REDIRECTS...
      d                 c                   47
-     d  CURLE_UNKNOWN_TELNET_OPTION...
+     d  CURLE_UNKNOWN_OPTION...
      d                 c                   48
      d  CURLE_TELNET_OPTION_SYNTAX...
      d                 c                   49
      d                 c                   87
      d  CURLE_CHUNK_FAILED...
      d                 c                   88
+     d  CURLE_NO_CONNECTION_AVAILABLE...
+     d                 c                   89
+      *
+      /if not defined(CURL_NO_OLDIES)
+     d  CURLE_URL_MALFORMAT_USER...
+     d                 c                   4
+     d  CURLE_FTP_ACCESS_DENIED...
+     d                 c                   9
+     d  CURLE_FTP_USER_PASSWORD_INCORRECT...
+     d                 c                   10
+     d  CURLE_FTP_WEIRD_USER_REPLY...
+     d                 c                   12
+     d  CURLE_FTP_CANT_RECONNECT...
+     d                 c                   16
+     d  CURLE_FTP_COULDNT_SET_BINARY...
+     d                 c                   17
+     d  CURLE_FTP_PARTIAL_FILE...
+     d                 c                   18
+     d  CURLE_FTP_WRITE_ERROR...
+     d                 c                   20
+     d  CURLE_FTP_QUOTE_ERROR...
+     d                 c                   21
+     d  CURLE_HTTP_NOT_FOUND...
+     d                 c                   22
+     d  CURLE_MALFORMAT_USER...
+     d                 c                   24
+     d  CURLE_FTP_COULDNT_STOR_FILE...
+     d                 c                   25
+     d  CURLE_OPERATION_TIMEOUTED...
+     d                 c                   28
+     d  CURLE_FTP_COULDNT_SET_ASCII...
+     d                 c                   29
+     d  CURLE_FTP_COULDNT_GET_SIZE...
+     d                 c                   32
+     d  CURLE_HTTP_RANGE_ERROR...
+     d                 c                   33
+     d  CURLE_FTP_BAD_DOWNLOAD_RESUME...
+     d                 c                   36
+     d  CURLE_LIBRARY_NOT_FOUND...
+     d                 c                   40
+     d  CURLE_BAD_CALLING_ORDER...
+     d                 c                   44
+     d  CURLE_HTTP_PORT_FAILED...
+     d                 c                   45
+     d  CURLE_BAD_PASSWORD_ENTERED...
+     d                 c                   46
+     d  CURLE_UNKNOWN_TELNET_OPTION...
+     d                 c                   48
+     d  CURLE_OBSOLETE...
+     d                 c                   50
+     d  CURLE_SSL_PEER_CERTIFICATE...
+     d                 c                   51
+     d  CURLE_SHARE_IN_USE...
+     d                 c                   57
+     d  CURLE_FTP_SSL_FAILED...
+     d                 c                   64
+     d  CURLE_TFTP_DISKFULL...
+     d                 c                   70
+     d  CURLE_TFTP_EXISTS...
+     d                 c                   73
+     d  CURLE_ALREADY_COMPLETE...
+     d                 c                   99999
+      /endif
       *
      d curlioerr       s             10i 0 based(######ptr######)               Enum
      d  CURLIOE_OK     c                   0
      d  CURLUSESSL_ALL...
      d                 c                   3
       *
+     d CURLSSLOPT_ALLOW_BEAST...
+     d                 c                   1
+      *
+      /if not defined(CURL_NO_OLDIES)
+     d curl_ftpssl     s                   like(curl_usessl)
+     d                                     based(######ptr######)
+     d  CURLFTPSSL_NONE...
+     d                 c                   0
+     d  CURLFTPSSL_TRY...
+     d                 c                   1
+     d  CURLFTPSSL_CONTROL...
+     d                 c                   2
+     d  CURLFTPSSL_ALL...
+     d                 c                   3
+      /endif
+      *
      d curl_ftpccc     s             10i 0 based(######ptr######)               Enum
      d  CURLFTPSSL_CCC_NONE...
      d                 c                   0
      d                 c                   10024
      d  CURLOPT_SSLCERT...
      d                 c                   10025
-     d  CURLOPT_SSLCERTPASSWD...
-     d                 c                   10026
      d  CURLOPT_KEYPASSWD...
      d                 c                   10026
      d  CURLOPT_CRLF   c                   00027
      d                 c                   20056
      d  CURLOPT_PROGRESSDATA...
      d                 c                   10057
+     d  CURLOPT_XFERINFODATA...
+     d                 c                   10057                                PROGRESSDATA alias
      d  CURLOPT_AUTOREFERER...
      d                 c                   00058
      d  CURLOPT_PROXYPORT...
      d  CURLOPT_SHARE  c                   10100
      d  CURLOPT_PROXYTYPE...
      d                 c                   00101
-     d  CURLOPT_ENCODING...
+     d  CURLOPT_ACCEPT_ENCODING...
      d                 c                   10102
      d  CURLOPT_PRIVATE...
      d                 c                   10103
      d                 c                   10201
      d  CURLOPT_FNMATCH_DATA...
      d                 c                   10202
-      *
+     d  CURLOPT_RESOLVE...
+     d                 c                   10203
+     d  CURLOPT_TLSAUTH_USERNAME...
+     d                 c                   10204
+     d  CURLOPT_TLSAUTH_PASSWORD...
+     d                 c                   10205
+     d  CURLOPT_TLSAUTH_TYPE...
+     d                 c                   10206
+     d  CURLOPT_TRANSFER_ENCODING...
+     d                 c                   00207
+     d  CURLOPT_CLOSESOCKETFUNCTION...
+     d                 c                   20208
+     d  CURLOPT_CLOSESOCKETDATA...
+     d                 c                   10209
+     d  CURLOPT_GSSAPI_DELEGATION...
+     d                 c                   00210
+     d  CURLOPT_DNS_SERVERS...
+     d                 c                   10211
+     d  CURLOPT_ACCEPTTIMEOUT_MS...
+     d                 c                   00212
+     d  CURLOPT_TCP_KEEPALIVE...
+     d                 c                   00213
+     d  CURLOPT_TCP_KEEPIDLE...
+     d                 c                   00214
+     d  CURLOPT_TCP_KEEPINTVL...
+     d                 c                   00215
+     d  CURLOPT_SSL_OPTIONS...
+     d                 c                   00216
+     d  CURLOPT_MAIL_AUTH...
+     d                 c                   10217
+     d  CURLOPT_SASL_IR...
+     d                 c                   00218
+     d  CURLOPT_XFERINFOFUNCTION...
+     d                 c                   20219
+      *
+      /if not defined(CURL_NO_OLDIES)
+     d  CURLOPT_SSLKEYPASSWD...
+     d                 c                   10026
+     d  CURLOPT_SSLCERTPASSWD...
+     d                 c                   10026
+     d  CURLOPT_FTPLISTONLY...
+     d                 c                   00048
+     d  CURLOPT_FTPAPPEND...
+     d                 c                   00050
+     d  CURLOPT_KRB4LEVEL...
+     d                 c                   10063
+     d  CURLOPT_ENCODING...
+     d                 c                   10102
      d  CURLOPT_SERVER_RESPONSE_TIMEOUT...
      d                 c                   00112
+     d  CURLOPT_FTP_SSL...
+     d                 c                   00119
      d  CURLOPT_POST301...
-     d                 c                   00161                                Obsolescent
+     d                 c                   00161
+      /endif
       *
      d CURLFORMcode    s             10i 0 based(######ptr######)               Enum
      d  CURL_FORMADD_OK...
      d                 c                   3
      d  CURLSHE_NOMEM...
      d                 c                   4
+     d  CURLSHE_NOT_BUILT_IN...
+     d                 c                   5
       *
      d CURLSHoption...
      d                 s             10i 0 based(######ptr######)               Enum
      d curlsocktype    s             10i 0 based(######ptr######)               Enum
      d  CURLSOCKTYPE_IPCXN...
      d                 c                   0
+     d  CURLSOCKTYPE_ACCEPT...
+     d                 c                   1
+      *
+     d  CURL_SOCKOPT_OK...
+     d                 c                   0
+     d  CURL_SOCKOPT_ERROR...
+     d                 c                   1
+     d  CURL_SOCKOPT_ALREADY_CONNECTED...
+     d                 c                   2
       *
      d CURLMcode       s             10i 0 based(######ptr######)               Enum
      d  CURLM_CALL_MULTI_PERFORM...
      d                 c                   10005
      d  CURLMOPT_MAXCONNECTS...
      d                 c                   00006
+     d  CURLMOPT_MAX_HOST_CONNECTIONS...
+     d                 c                   00007
+     d  CURLMOPT_MAX_PIPELINE_LENGTH...
+     d                 c                   00008
+     d  CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE...
+     d                 c                   30009
+     d  CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE...
+     d                 c                   30010
+     d  CURLMOPT_PIPELINING_SITE_BL...
+     d                 c                   10011
+     d  CURLMOPT_PIPELINING_SERVER_BL...
+     d                 c                   10012
+     d  CURLMOPT_MAX_TOTAL_CONNECTIONS...
+     d                 c                   00013
       *
       *  Public API enums for RTSP requests.
       *
      d   whatever                      *   overlay(data)                        void *
      d   result                            overlay(data) like(CURLcode)
       *
+     d curl_waitfd...
+     d                 ds                  based(######ptr######)
+     d                                     qualified
+     d  fd                                 like(curl_socket_t)
+     d  events                        5i 0
+     d  revents                       5i 0
+      *
      d curl_http_post...
      d                 ds                  based(######ptr######)
      d                                     qualified
      d curl_progress_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_xferinfo_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
      d curl_read_callback...
      d                 s               *   based(######ptr######) procptr
       *
      d curl_fnmatch_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_closesocket_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
       **************************************************************************
       *                              Prototypes
       **************************************************************************
      d  exc_fd_set                65535    options(*varsize)                    fd_set
      d  max_fd                       10i 0
       *
+     d curl_multi_wait...
+     d                 pr                  extproc('curl_multi_wait')
+     d                                     like(CURLMcode)
+     d  multi_handle                   *   value                                CURLM *
+     d  extra_fds                      *   value                                curl_waitfd *
+     d  extra_nfds                   10u 0 value
+     d  timeout_ms                   10i 0 value
+     d  ret                          10i 0 options(*omit)
+      *
      d curl_multi_perform...
      d                 pr                  extproc('curl_multi_perform')
      d                                     like(CURLMcode)
      d  code                               value like(CURLMcode)
      d  ccsid                        10u 0 value
       *
+      * May be used for strings and structures.
      d curl_easy_getinfo_ccsid...
      d                 pr                  extproc('curl_easy_getinfo_ccsid')
      d                                     like(CURLcode)
      d  curl                           *   value                                CURL *
      d  info                               value like(CURLINFO)
-     d  stringarg                      *   options(*nopass)                     char *
+     d  ptrarg                         *   options(*nopass)                     char *
      d  ccsid                        10u 0 value options(*nopass)
       *
+     d curl_certinfo_free_all...
+     d                 pr                  extproc('curl_certinfo_free_all')
+     d  info                           *   value
+      *
      d curl_formadd_ccsid...
      d                 pr                  extproc('curl_formadd_ccsid')
      d                                     like(CURLFORMcode)
index 9bf93a8..c07355f 100644 (file)
@@ -155,9 +155,10 @@ db2_name()
 
 {
         basename "${1}"                                                 |
-        tr '[a-z-]' '[A-Z_]'                                            |
+        tr 'a-z-' 'A-Z_'                                                |
         sed -e 's/\..*//'                                               \
-            -e 's/^\(..........\).*/\1/'
+            -e 's/^CURL_*/C/'                                           \
+            -e 's/^\(.\).*\(.........\)$/\1\2/'
 }
 
 
index b7f951b..e2a8708 100644 (file)
@@ -11,8 +11,9 @@ cd "${TOPDIR}/lib"
 #      Create and compile the identification source file.
 
 echo '#pragma comment(user, "libcurl version '"${LIBCURL_VERSION}"'")' > os400.c
-echo '#pragma comment(date)' >> os400.c
-echo '#pragma comment(copyright, "Copyright (C) 1998-2010 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c
+echo '#pragma comment(user, __DATE__)' >> os400.c
+echo '#pragma comment(user, __TIME__)' >> os400.c
+echo '#pragma comment(copyright, "Copyright (C) 1998-2013 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c
 make_module     OS400           os400.c
 LINK=                           # No need to rebuild service program yet.
 MODULES=
@@ -45,9 +46,7 @@ make_module     OS400SYS        "${SCRIPTDIR}/os400sys.c"
 make_module     CCSIDCURL       "${SCRIPTDIR}/ccsidcurl.c"
 
 for SRC in ${CSOURCES}
-do      MODULE=`basename "${SRC}" .c |
-                tr '[a-z]' '[A-Z]'   |
-                sed -e 's/^\(..........\).*/\1/'`
+do      MODULE=`db2_name "${SRC}"`
         make_module "${MODULE}" "${SRC}"
 done
 
index 1e67290..d2b6bc9 100644 (file)
@@ -47,6 +47,7 @@ done
 
 #       Build in each directory.
 
-for SUBDIR in include lib src tests
+# for SUBDIR in include lib src tests
+for SUBDIR in include lib src
 do      "${SCRIPTDIR}/make-${SUBDIR}.sh"
 done
index 071fa48..ab0c4fb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -24,7 +24,7 @@
 /* OS/400 additional support. */
 
 #include "curlbuild.h"
-#include "config-os400.h"       /* Not setup.h: we only need some defines. */
+#include "config-os400.h"  /* Not curl_setup.h: we only need some defines. */
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <qsossl.h>
 #endif
 
+#ifdef USE_GSKIT
+#include <gskssl.h>
+#include <qsoasync.h>
+#endif
+
 #ifdef HAVE_GSSAPI
 #include <gssapi.h>
 #endif
@@ -451,6 +456,412 @@ Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp)
 #endif /* USE_QSOSSL */
 
 
+#ifdef USE_GSKIT
+
+/* ASCII wrappers for the GSKit procedures. */
+
+/*
+ * EBCDIC --> ASCII string mapping table.
+ * Some strings returned by GSKit are dynamically allocated and automatically
+ * released when closing the handle.
+ * To provide the same functionality, we use a "private" handle that
+ * holds the GSKit handle and a list of string mappings. This will allow
+ * avoid conversion of already converted strings and releasing them upon
+ * close time.
+ */
+
+struct gskstrlist {
+  struct gskstrlist * next;
+  const char * ebcdicstr;
+  const char * asciistr;
+};
+
+struct Curl_gsk_descriptor {
+  gsk_handle h;
+  struct gskstrlist * strlist;
+};
+
+
+int
+Curl_gsk_environment_open(gsk_handle * my_env_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  gsk_handle h;
+  int rc;
+
+  if(!my_env_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+    return GSK_INSUFFICIENT_STORAGE;
+  p->strlist = (struct gskstrlist *) NULL;
+  if((rc = gsk_environment_open(&p->h)) != GSK_OK)
+    free(p);
+  else
+    *my_env_handle = (gsk_handle) p;
+  return rc;
+}
+
+
+int
+Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+                         gsk_handle * my_session_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  gsk_handle h;
+  int rc;
+
+  if(!my_env_handle)
+    return GSK_INVALID_HANDLE;
+  if(!my_session_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  h = ((struct Curl_gsk_descriptor *) my_env_handle)->h;
+  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+    return GSK_INSUFFICIENT_STORAGE;
+  p->strlist = (struct gskstrlist *) NULL;
+  if((rc = gsk_secure_soc_open(h, &p->h)) != GSK_OK)
+    free(p);
+  else
+    *my_session_handle = (gsk_handle) p;
+  return rc;
+}
+
+
+static void
+gsk_free_handle(struct Curl_gsk_descriptor * p)
+
+{
+  struct gskstrlist * q;
+
+  while ((q = p->strlist)) {
+    p->strlist = q;
+    free((void *) q->asciistr);
+    free(q);
+  }
+  free(p);
+}
+
+
+int
+Curl_gsk_environment_close(gsk_handle * my_env_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+
+  if(!my_env_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!*my_env_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) *my_env_handle;
+  if ((rc = gsk_environment_close(&p->h)) == GSK_OK) {
+    gsk_free_handle(p);
+    *my_env_handle = (gsk_handle) NULL;
+  }
+  return rc;
+}
+
+
+int
+Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+
+  if(!my_session_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!*my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) *my_session_handle;
+  if ((rc = gsk_secure_soc_close(&p->h)) == GSK_OK) {
+    gsk_free_handle(p);
+    *my_session_handle = (gsk_handle) NULL;
+  }
+  return rc;
+}
+
+
+int
+Curl_gsk_environment_init(gsk_handle my_env_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_env_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_env_handle;
+  return gsk_environment_init(p->h);
+}
+
+
+int
+Curl_gsk_secure_soc_init(gsk_handle my_session_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_init(p->h);
+}
+
+
+int
+Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+                                const char * buffer, int bufSize)
+
+{
+  struct Curl_gsk_descriptor * p;
+  char * ebcdicbuf;
+  int rc;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  if(!buffer)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(bufSize < 0)
+    return GSK_ATTRIBUTE_INVALID_LENGTH;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  if(!bufSize)
+    bufSize = strlen(buffer);
+  if (!(ebcdicbuf = malloc(bufSize + 1)))
+      return GSK_INSUFFICIENT_STORAGE;
+  QadrtConvertA2E(ebcdicbuf, buffer, bufSize, bufSize);
+  ebcdicbuf[bufSize] = '\0';
+  rc = gsk_attribute_set_buffer(p->h, bufID, ebcdicbuf, bufSize);
+  free(ebcdicbuf);
+  return rc;
+}
+
+
+int
+Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+                            GSK_ENUM_VALUE enumValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_enum(p->h, enumID, enumValue);
+}
+
+
+int
+Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
+                                     GSK_NUM_ID numID, int numValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_numeric_value(p->h, numID, numValue);
+}
+
+
+int
+Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
+                                GSK_CALLBACK_ID callBackID,
+                                void * callBackAreaPtr)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_callback(p->h, callBackID, callBackAreaPtr);
+}
+
+
+static int
+cachestring(struct Curl_gsk_descriptor * p,
+            const char * ebcdicbuf, int bufsize, const char * * buffer)
+
+{
+  int rc;
+  char * asciibuf;
+  struct gskstrlist * sp;
+
+  for (sp = p->strlist; sp; sp = sp->next)
+    if(sp->ebcdicstr == ebcdicbuf)
+      break;
+  if(!sp) {
+    if(!(sp = (struct gskstrlist *) malloc(sizeof *sp)))
+      return GSK_INSUFFICIENT_STORAGE;
+    if(!(asciibuf = malloc(bufsize + 1))) {
+      free(sp);
+      return GSK_INSUFFICIENT_STORAGE;
+    }
+    QadrtConvertE2A(asciibuf, ebcdicbuf, bufsize, bufsize);
+    asciibuf[bufsize] = '\0';
+    sp->ebcdicstr = ebcdicbuf;
+    sp->asciistr = asciibuf;
+    sp->next = p->strlist;
+    p->strlist = sp;
+  }
+  *buffer = sp->asciistr;
+  return GSK_OK;
+}
+
+
+int
+Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+                                const char * * buffer, int * bufSize)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+  const char * mybuf;
+  int mylen;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  if(!buffer || !bufSize)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  if ((rc = gsk_attribute_get_buffer(p->h, bufID, &mybuf, &mylen)) != GSK_OK)
+    return rc;
+  if((rc = cachestring(p, mybuf, mylen, buffer)) == GSK_OK)
+    *bufSize = mylen;
+  return rc;
+}
+
+
+int
+Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+                            GSK_ENUM_VALUE * enumValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_get_enum(p->h, enumID, enumValue);
+}
+
+
+int
+Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
+                                     GSK_NUM_ID numID, int * numValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_get_numeric_value(p->h, numID, numValue);
+}
+
+
+int
+Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
+                                 GSK_CERT_ID certID,
+                                 const gsk_cert_data_elem * * certDataElem,
+                                 int * certDataElementCount)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  /* No need to convert code: text results are already in ASCII. */
+  return gsk_attribute_get_cert_info(p->h, certID,
+                                     certDataElem, certDataElementCount);
+}
+
+
+int
+Curl_gsk_secure_soc_misc(gsk_handle my_session_handle, GSK_MISC_ID miscID)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_misc(p->h, miscID);
+}
+
+
+int
+Curl_gsk_secure_soc_read(gsk_handle my_session_handle, char * readBuffer,
+                         int readBufSize, int * amtRead)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_read(p->h, readBuffer, readBufSize, amtRead);
+}
+
+
+int
+Curl_gsk_secure_soc_write(gsk_handle my_session_handle, char * writeBuffer,
+                          int writeBufSize, int * amtWritten)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_write(p->h, writeBuffer, writeBufSize, amtWritten);
+}
+
+
+const char *
+Curl_gsk_strerror_a(int gsk_return_value)
+
+{
+  int i;
+  const char * cp;
+  char * cp2;
+
+  cp = gsk_strerror(gsk_return_value);
+
+  if (!cp)
+    return cp;
+
+  i = strlen(cp);
+
+  if (!(cp2 = Curl_thread_buffer(LK_GSK_ERROR, MAX_CONV_EXPANSION * i + 1)))
+    return cp2;
+
+  i = QadrtConvertE2A(cp2, cp, MAX_CONV_EXPANSION * i, i);
+  cp2[i] = '\0';
+  return cp2;
+}
+
+int
+Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
+                              int IOCompletionPort,
+                              Qso_OverlappedIO_t * communicationsArea)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_startInit(p->h, IOCompletionPort, communicationsArea);
+}
+
+#endif /* USE_GSKIT */
+
+
+
 #ifdef HAVE_GSSAPI
 
 /* ASCII wrappers for the GSSAPI procedures. */
@@ -863,6 +1274,7 @@ Curl_ldap_get_dn_a(void * ld, LDAPMessage * entry)
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -894,6 +1306,7 @@ Curl_ldap_first_attribute_a(void * ld,
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -925,6 +1338,7 @@ Curl_ldap_next_attribute_a(void * ld,
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
index e708365..234bf5e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -31,6 +31,7 @@
 
 typedef enum {
         LK_SSL_ERROR,
+        LK_GSK_ERROR,
         LK_LDAP_ERROR,
         LK_CURL_VERSION,
         LK_VERSION_INFO,
index 951ac0c..aca3530 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 #
 #
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -39,49 +81,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/Solaris
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -98,7 +164,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -111,15 +178,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -129,6 +198,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -136,16 +208,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -158,7 +226,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = "@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
@@ -171,34 +238,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -210,6 +277,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -229,7 +297,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -239,9 +306,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 PKGADD_ARCH = "@host_cpu@"
 PKGADD_DESC = "@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
 PKGADD_CLASSES = none
@@ -254,14 +325,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Solaris/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Solaris/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Solaris/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Solaris/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -279,47 +350,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -337,16 +408,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -357,7 +434,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -365,18 +442,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -395,17 +492,21 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
 
 
 package:
@@ -433,6 +534,7 @@ package:
        mkdir ./tmp
        pkgmk -o -d ./tmp
        pkgtrans -so ./tmp ${top_srcdir}/../${PKGADD_FILE} ${PKGADD_PKG}
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 4d693a9..035df13 100644 (file)
@@ -57,4 +57,5 @@ EXPORTS
        curl_version_info @ 56 NONAME
        curl_easy_recv @ 57 NONAME
        curl_easy_send @ 58 NONAME
+       curl_multi_wait @ 59 NONAME
 
index 4d693a9..035df13 100644 (file)
@@ -57,4 +57,5 @@ EXPORTS
        curl_version_info @ 56 NONAME
        curl_easy_recv @ 57 NONAME
        curl_easy_send @ 58 NONAME
+       curl_multi_wait @ 59 NONAME
 
index 706cba6..28498ce 100644 (file)
@@ -8,8 +8,44 @@ UID           0x00000000 0xF0206442
 
 SOURCEPATH  ../../../src
 SOURCE \
-    main.c hugehelp.c urlglob.c writeout.c writeenv.c \
-    getpass.c homedir.c curlutil.c os-specific.c xattr.c
+    tool_binmode.c \
+    tool_bname.c \
+    tool_cb_dbg.c \
+    tool_cb_hdr.c \
+    tool_cb_prg.c \
+    tool_cb_rea.c \
+    tool_cb_see.c \
+    tool_cb_wrt.c \
+    tool_cfgable.c \
+    tool_convert.c \
+    tool_dirhie.c \
+    tool_doswin.c \
+    tool_easysrc.c \
+    tool_formparse.c \
+    tool_getparam.c \
+    tool_getpass.c \
+    tool_help.c \
+    tool_helpers.c \
+    tool_homedir.c \
+    tool_hugehelp.c \
+    tool_libinfo.c \
+    tool_main.c \
+    tool_metalink.c \
+    tool_mfiles.c \
+    tool_msgs.c \
+    tool_operate.c \
+    tool_operhlp.c \
+    tool_panykey.c \
+    tool_paramhlp.c \
+    tool_parsecfg.c \
+    tool_setopt.c \
+    tool_sleep.c \
+    tool_urlglob.c \
+    tool_util.c \
+    tool_vms.c \
+    tool_writeenv.c \
+    tool_writeout.c \
+    tool_xattr.c
 
 SOURCEPATH  ../../../lib
 SOURCE \
index c060024..933994f 100644 (file)
@@ -21,21 +21,24 @@ MACRO       USE_SSLEAY
 
 SOURCEPATH  ../../../lib
 SOURCE \
-  file.c timeval.c base64.c hostip.c progress.c formdata.c     \
+  file.c timeval.c base64.c hostip.c progress.c formdata.c             \
   cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c      \
   ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c       \
   netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c     \
   curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c          \
   memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c   \
   content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c     \
-  http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c      \
-  hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c       \
-  inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c      \
-  strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c         \
-  socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c           \
-  curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
-  warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
-  gopher.c
+  http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c                \
+  hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c     \
+  select.c gtls.c sslgen.c tftp.c splay.c strdup.c socks.c ssh.c nss.c \
+  qssl.c rawstr.c curl_addrinfo.c socks_gssapi.c socks_sspi.c          \
+  curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c   \
+  pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c                \
+  curl_rtmp.c openldap.c curl_gethostname.c gopher.c axtls.c           \
+  idn_win32.c http_negotiate_sspi.c cyassl.c http_proxy.c non-ascii.c  \
+  asyn-ares.c asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c   \
+  curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_schannel.c                \
+  curl_multibyte.c curl_darwinssl.c bundles.c conncache.c
 
 USERINCLUDE   ../../../lib ../../../include/curl
 #ifdef ENABLE_SSL
index a4e1930..7be4932 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,58 +78,133 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/Win32
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -104,7 +221,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -117,15 +235,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -135,6 +255,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -142,16 +265,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -164,7 +283,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -177,34 +295,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -216,6 +334,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -235,7 +354,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -245,9 +363,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = cygwin
 EXTRA_DIST = README
 all: all-recursive
@@ -257,14 +379,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Win32/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Win32/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Win32/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -282,6 +404,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -289,27 +412,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -317,66 +439,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -388,81 +464,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -482,16 +581,22 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -502,8 +607,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -511,18 +615,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -541,22 +665,23 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index ebcb34d..4e7f754 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,49 +78,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/Win32/cygwin
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -95,7 +161,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -108,15 +175,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -126,6 +195,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -133,16 +205,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -155,7 +223,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -168,34 +235,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -207,6 +274,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -226,7 +294,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -236,9 +303,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 EXTRA_DIST = README
 
 #
@@ -264,14 +335,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/Win32/cygwin/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/Win32/cygwin/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -289,47 +360,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -347,16 +418,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -367,7 +444,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -375,18 +452,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -405,17 +502,21 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
 
 
 cygwinbin:
@@ -461,6 +562,7 @@ cygwinbin:
        cd $(cygwintmp)-dev ; tar cjf \
          $(PACKAGE)-devel-$(VERSION)-$(CYGBUILD).tar.bz2 usr
        mv $(cygwintmp)-dev/*.tar.bz2 . && rm -rf $(cygwintmp)-dev
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 848b627..38f6585 100644 (file)
@@ -1,16 +1,36 @@
-EXTRA_DIST = build_vms.com \
+EXTRA_DIST = \
+ backup_gnv_curl_src.com \
+ build_curl-config_script.com \
+ build_gnv_curl.com \
+ build_gnv_curl_pcsi_desc.com \
+ build_gnv_curl_pcsi_text.com \
+ build_gnv_curl_release_notes.com \
+ build_libcurl_pc.com \
+ build_vms.com \
+ clean_gnv_curl.com \
+ compare_curl_source.com \
+ config_h.com \
+ curl_crtl_init.c \
+ curl_gnv_build_steps.txt \
+ curl_release_note_start.txt \
+ curl_startup.com \
  curlmsg.h \
  curlmsg.msg \
  curlmsg.sdl \
  curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
+ generate_config_vms_h_curl.com \
+ generate_vax_transfer.com \
+ gnv_conftest.c_first \
+ gnv_curl_configure.sh \
+ gnv_libcurl_symbols.opt \
+ gnv_link_curl.com \
+ macro32_exactcase.patch \
+ make_gnv_curl_install.sh \
+ make_pcsi_curl_kit_name.com \
+ pcsi_gnv_curl_file_list.txt \
+ pcsi_product_gnv_curl.com \
+ readme \
+ report_openssl_version.c \
+ setup_gnv_curl_build.com \
+ stage_curl_install.com \
+ vms_eco_level.h
index 65ea195..3013639 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,49 +78,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = packages/vms
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -95,7 +161,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -108,15 +175,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -126,6 +195,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -133,16 +205,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -155,7 +223,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -168,34 +235,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -207,6 +274,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -226,7 +294,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -236,25 +303,49 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-EXTRA_DIST = build_vms.com \
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ backup_gnv_curl_src.com \
+ build_curl-config_script.com \
+ build_gnv_curl.com \
+ build_gnv_curl_pcsi_desc.com \
+ build_gnv_curl_pcsi_text.com \
+ build_gnv_curl_release_notes.com \
+ build_libcurl_pc.com \
+ build_vms.com \
+ clean_gnv_curl.com \
+ compare_curl_source.com \
+ config_h.com \
+ curl_crtl_init.c \
+ curl_gnv_build_steps.txt \
+ curl_release_note_start.txt \
+ curl_startup.com \
  curlmsg.h \
  curlmsg.msg \
  curlmsg.sdl \
  curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
+ generate_config_vms_h_curl.com \
+ generate_vax_transfer.com \
+ gnv_conftest.c_first \
+ gnv_curl_configure.sh \
+ gnv_libcurl_symbols.opt \
+ gnv_link_curl.com \
+ macro32_exactcase.patch \
+ make_gnv_curl_install.sh \
+ make_pcsi_curl_kit_name.com \
+ pcsi_gnv_curl_file_list.txt \
+ pcsi_product_gnv_curl.com \
+ readme \
+ report_openssl_version.c \
+ setup_gnv_curl_build.com \
+ stage_curl_install.com \
+ vms_eco_level.h
 
 all: all-am
 
@@ -263,14 +354,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  packages/vms/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  packages/vms/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/vms/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign packages/vms/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -288,47 +379,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -346,16 +437,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -366,7 +463,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -374,18 +471,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -404,17 +521,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/packages/vms/backup_gnv_curl_src.com b/packages/vms/backup_gnv_curl_src.com
new file mode 100644 (file)
index 0000000..9a7905b
--- /dev/null
@@ -0,0 +1,132 @@
+$! File: Backup_gnv_curl_src.com
+$!
+$! $Id$
+$!
+$! Procedure to create backup save sets for installing in a PCSI kit.
+$!
+$! To comply with most Open Source licenses, the source used for building
+$! a kit will be packaged with the distribution kit for the binary.
+$!
+$! Backup save sets are the only storage format that I can expect a
+$! VMS system to be able to extract ODS-5 filenames and directories.
+$!
+$! The make_pcsi_kit_name.com needs to be run before this procedure to
+$! properly name the files that will be created.
+$!
+$! This file is created from a template file for the purpose of making it
+$! easier to port Unix code, particularly open source code to VMS.
+$! Therefore permission is freely granted for any use.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 13-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$ ss_abort = 44
+$ status = ss_abort
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$ node_swvers = f$getsyi("NODE_SWVERS")
+$ node_swvers_type = f$extract(0, 1, node_swvers)
+$ node_swvers_vers = f$extract(1, f$length(node_swvers), node_swvers)
+$ swvers_maj = f$element(0, ".", node_swvers_vers)
+$ node_swvers_min_update = f$element(1, ".", node_swvers_vers)
+$ swvers_min = f$element(0, "-", node_swvers_min_update)
+$ swvers_update = f$element(1, "-", node_swvers_min_update)
+$!
+$ if swvers_update .eqs. "-" then swvers_update = ""
+$!
+$ vms_vers = f$fao("!2ZB!2ZB!AS", 'swvers_maj', 'swvers_min', swvers_update)
+$!
+$!
+$!
+$! If available make an interchange save set
+$!-------------------------------------------
+$ interchange = ""
+$ if arch_code .eqs. "V"
+$ then
+$   interchange = "/interchange"
+$ endif
+$ if (swvers_maj .ges. "8") .and. (swvers_min .ges. 4)
+$ then
+$   interchange = "/interchange/noconvert"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$ src_root = "src_root:"
+$ if f$trnlnm("src_root1") .nes. "" then src_root = "src_root1:"
+$ backup'interchange' 'src_root'[curl...]*.*;0 -
+           'filename_base'_original_src.bck/sav
+$ status = $status
+$!
+$! There may be a VMS specific source kit
+$!-----------------------------------------
+$ vms_root = "vms_root:"
+$ if f$trnlnm("vms_root1") .nes. "" then vms_root = "vms_root1:"
+$ files_found = 0
+$ define/user sys$error nl:
+$ define/user sys$output nl:
+$ directory 'vms_root'[...]*.*;*/exc=*.dir
+$ if '$severity' .eq. 1 then files_found = 1
+$!
+$ if files_found .eq. 1
+$ then
+$   backup'interchange' 'vms_root'[curl...]*.*;0 -
+            'filename_base'_vms_src.bck/sav
+$   status = $status
+$ endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com
new file mode 100644 (file)
index 0000000..ae9d181
--- /dev/null
@@ -0,0 +1,288 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the curl-config file from the config_curl.in file
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013  J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the curl-config. already exists.
+$ if f$search("[--]curl-config.") .nes. "" then goto all_exit
+$!
+$! Need to know the kit type.
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$ cfg_file_in = "[--]curl-config.in"
+$!
+$ if f$search(cfg_file_in) .eqs. ""
+$ then
+$    write sys$output "Can not find curl-config.in."
+$    goto all_exit
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$    arch_name = "VAX"
+$ else
+$    arch_name = ""
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$    if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.include.curl]curlver.h
+$version_loop:
+$   read vf/end=version_loop_end line_in
+$   if line_in .eqs. "" then goto version_loop
+$   key = f$element(0, " ", line_in)
+$   if key .nes. "#define" then goto version_loop
+$   name = f$element(1, " ", line_in)
+$   if name .eqs. "LIBCURL_VERSION"
+$   then
+$       curl_version = f$element(2, " ", line_in) - """" - """"
+$       goto version_loop
+$   endif
+$   if name .eqs. "LIBCURL_VERSION_NUM"
+$   then
+$       version_num_hex = f$element(2, " ", line_in)
+$       version_num = version_num_hex - "0x"
+$       goto version_loop
+$   endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]curl-config.
+$ open/append pco [--]curl-config.
+$ open/read pci 'cfg_file_in'
+$cfg_file_loop:
+$ read pci/end=cfg_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$   write pco ""
+$   goto cfg_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$   write pco line_in
+$   goto cfg_file_loop
+$ endif
+$!
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$   write pco line_in
+$   goto cfg_file_loop
+$ endif
+$!
+$ if f$locate("@prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "prefix=/usr"
+$    else
+$        write pco "prefix=/beta"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "exec_prefix=/usr"
+$    else
+$        write pco "exec_prefix=/beta"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("=@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "includedir=$(prefix}/include"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("X@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test ""X$(prefix}/include""; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("I@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "          echo "${CPPFLAG_CURL_STATICLIB}-I$(prefix}/include"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$    write pco "cppflag_curl_staticlib=-DCURL_STATICLIB"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@ENABLE_SHARED@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo no"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CURL_CA_BUNDLE@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo """""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CC@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo ""cc"""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "        for feature in SSL libz NTLM ""; do"
+$    else
+$        write pco "        for feature in SSL IPv6 libz NTLM ""; do"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
+$ then
+$    proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
+$    proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$    proto = proto1 + proto2
+$    write pco "        for protocol in " + proto + "; do"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("libcurl @CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo libcurl ''curl_version'"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("existing @CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    line_start = -
+  "          echo ""requested version $checkfor is newer than existing"
+$    write pco "''line_start' ''curl_version'"""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("`echo @versionnum@", line_in) .lt line_in_len
+$ then
+$    write pco "        numuppercase=`echo ''version_num' | tr 'a-f' 'A-F'`"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate(" echo @versionnum@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo ''version_num'"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("X@libdir@", line_in) .lt line_in_len
+$ then
+$    part1 = "        if test ""$(exec_prefix}/lib"" != ""X/usr/lib"""
+$    part2 = "-a ""X$(exec_prefix}/lib"" != ""X/usr/lib64""; then"
+$    write pco part1,part2
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("L@libdir@", line_in) .lt line_in_len
+$ then
+$    write pco "           CURLLIBDIR=""$(exec_prefix}/lib """
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@REQUIRE_LIB_DEPS@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test "Xyes" = "Xyes"; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lz"
+$    else
+$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@ENABLE_STATIC@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test "Xyes" != "Xno" ; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    part1 = "          echo ${exec_prefix}/lib/libcurl.a"
+$    part2 = "-L/usr/lib -L/SSL_LIB"
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "''part1' ''part2' -lssl -lcrypto -lz"
+$    else
+$        write pco "''part1' ''part2' -lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CONFIGURE_OPTIONS@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        part1 = "        echo "" '--prefix=/usr' '--exec-prefix=/usr' "
+$    else
+$        part1 = "        echo "" '--prefix=/beta' '--exec_prefix=/beta' "
+$    endif
+$    if arch_name .eqs. "VAX"
+$    then
+$        part3 = ""
+$    else
+$        part3 = "'--with-gssapi' "
+$    endif
+$    part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' "
+$    part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'"""
+$!
+$    write pco part1,part2,part3,part4
+$!
+$    goto cfg_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl.com b/packages/vms/build_gnv_curl.com
new file mode 100644 (file)
index 0000000..1eaa7d5
--- /dev/null
@@ -0,0 +1,38 @@
+$! File: build_gnv_curl.com
+$!
+$! $Id$
+$!
+$! All in one build procedure
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 11-Jun-2009 J. Malmberg
+$!-----------------------------------------------------------------------
+$!
+$ @setup_gnv_curl_build.com
+$!
+$ bash gnv_curl_configure.sh
+$!
+$ @clean_gnv_curl.com
+$!
+$ bash make_gnv_curl_install.sh
+$!
+$ @gnv_link_curl.com
+$!
+$ purge new_gnu:[*...]/log
+$!
+$!
+$exit
diff --git a/packages/vms/build_gnv_curl_pcsi_desc.com b/packages/vms/build_gnv_curl_pcsi_desc.com
new file mode 100644 (file)
index 0000000..572b9b8
--- /dev/null
@@ -0,0 +1,488 @@
+$! File: Build_GNV_CURL_PCSI_DESC.COM
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file in the following sections:
+$!   Required software dependencies.
+$!   install/upgrade/postinstall steps.
+$!      1. Duplicate filenames need an alias procedure. (N/A for curl)
+$!      2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$!      3. Special alias links for executables (curl. -> curl.exe)
+$!         if a lot, then an alias procedure is needed.
+$!      4. Rename the files to lowercase.
+$!   Move Release Notes to destination
+$!   Source kit option
+$!   Create directory lines
+$!   Add file lines for curl.
+$!   Add Link alias procedure file (N/A for curl)
+$!   Add [.SYS$STARTUP]curl_startup file
+$!   Add Release notes file.
+$!
+$! The file PCSI_GNV_CURL_FILE_LIST.TXT is read in to get the files other
+$! than the release notes file and the source backup file.
+$!
+$! The PCSI system can really only handle ODS-2 format filenames and
+$! assumes that there is only one source directory.  It also assumes that
+$! all destination files with the same name come from the same source file.
+$! Fortunately CURL does not trip most of these issues, so those steps
+$! above are marked N/A.
+$!
+$! A rename action section is needed to make sure that the files are
+$! created in the GNV$GNU: in the correct case, and to create the alias
+$! link [usr.bin]curl. for [usr.bin]curl.exe.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$!
+$ product_line = "product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$     product_name = " ''majorver'.''minorver'"
+$ else
+$     product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full;"
+$!write sys$output product_line
+$!
+$!
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$desc
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append pdsc 'base_file'.pcsi$desc
+$!
+$ write pdsc product_line
+$!
+$! Required product dependencies.
+$!----------------------------------
+$ vmsprd = "DEC"
+$ if base .eqs. "I64VMS" then vmsprd = "HP"
+$!
+$ write pdsc "   software ''vmsprd' ''base' VMS ;"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$ arch_code = f$extract(0, 1, arch_type)
+$ write pdsc -
+ "   if (not <software ''vmsprd' ''base' VMS version minimum ''node_swvers'>) ;"
+$ write pdsc "      error NEED_VMS''vmstag';"
+$ write pdsc "   end if;"
+$!
+$write pdsc "   software VMSPORTS ''base' ZLIB ;"
+$write pdsc -
+    "   if (not <software VMSPORTS ''base' ZLIB version minimum V1.2-8>) ;"
+$write pdsc "      error NEED_ZLIB;"
+$write pdsc "   end if;"
+$!
+$!
+$!
+$! install/upgrade/postinstall steps.
+$!-----------------------------------
+$!      1. Duplicate filenames need an alias procedure. (N/A for curl)
+$!      2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$!      3. Special alias links for executables (curl. -> curl.exe)
+$!         if a lot, then an alias procedure is needed.
+$!      4. Rename the files to lowercase.
+$!
+$!
+$!   Alias links needed.
+$!-------------------------
+$ add_alias_lines = ""
+$ rem_alias_lines = ""
+$ line_out = ""
+$!
+$!   Read through the file list to set up aliases and rename commands.
+$!---------------------------------------------------------------------
+$ open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$inst_alias_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_alias_loop
+$   pathname = f$element(0, " ", line_in)
+$   linkflag = f$element(1, " ", line_in)
+
+$   if linkflag .nes. "->" then goto inst_alias_write
+$!
+$   linktarget = f$element(2, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", pathname)
+$       if old_start .lt. f$length(pathname)
+$       then
+$           pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           linktarget = "[gnv.beta" + linktarget - "[gnv.usr"
+$       endif
+$   endif
+$   nlink = "pcsi$destination:" + pathname
+$   ntarg = "pcsi$destination:" + linktarget
+$   new_add_alias_line = -
+  """if f$search(""""''nlink'"""") .eqs. """""""" then" + -
+  " set file/enter=''nlink' ''ntarg'"""
+$   if add_alias_lines .nes. ""
+$   then
+$       add_alias_lines = add_alias_lines + "," + new_add_alias_line
+$   else
+$       add_alias_lines = new_add_alias_line
+$   endif
+$!
+$   new_rem_alias_line = -
+  """if f$search(""""''nlink'"""") .nes. """""""" then" + -
+  " set file/remove ''nlink';"""
+$   if rem_alias_lines .nes. ""
+$   then
+$      rem_alias_lines = rem_alias_lines + "," + new_rem_alias_line
+$   else
+$      rem_alias_lines = new_rem_alias_line
+$   endif
+$!
+$   goto inst_alias_loop
+$!
+$inst_alias_write:
+$!
+$!  execute install / remove
+$   write pdsc "   execute install ("
+$! add aliases
+$   i = 0
+$ex_ins_loop:
+$       line = f$element(i, ",", add_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_ins_loop
+$       if line .eqs. "," then goto ex_ins_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_ins_loop
+$ex_ins_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$   write pdsc "      )"
+$   write pdsc "   remove ("
+$! remove aliases
+$   i = 0
+$ex_rem_loop:
+$       line = f$element(i, ",", rem_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_rem_loop
+$       if line .eqs. "," then goto ex_rem_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_rem_loop
+$ex_rem_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$   write pdsc "      ) ;"
+$!
+$!  execute upgrade
+$   write pdsc "   execute upgrade ("
+$   i = 0
+$ex_upg_loop:
+$       line = f$element(i, ",", rem_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_upg_loop
+$       if line .eqs. "," then goto ex_upg_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_upg_loop
+$ex_upg_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$! remove aliases
+$   write pdsc "      ) ;"
+$!
+$!  execute postinstall
+$   write pdsc "   execute postinstall ("
+$   if arch_code .nes. "V"
+$   then
+$       line_out = "   ""set process/parse=extended"""
+$   endif
+$   i = 0
+$ex_pins_loop:
+$       line = f$element(i, ",", add_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_pins_loop
+$       if line .eqs. "," then goto ex_pins_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_pins_loop
+$ex_pins_loop_end:
+$   if line_out .eqs. "" then line_out = "   ""continue"""
+$!   write pdsc line_out
+$!   line_out = ""
+$! add aliases and follow with renames.
+$!
+$goto inst_dir
+$!
+$inst_dir_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_dir_loop
+$inst_dir:
+$   pathname = f$element(0, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       if pathname .eqs. "[gnv]usr.dir"
+$       then
+$           pathname = "[gnv]beta.dir"
+$       else
+$           old_start = f$locate("[gnv.usr", pathname)
+$           if old_start .lt. f$length(pathname)
+$           then
+$               pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           endif
+$       endif
+$   endif
+$!
+$!  Ignore the directory entries for now.
+$!-----------------------------------------
+$   filedir = f$parse(pathname,,,"DIRECTORY")
+$   if pathname .eqs. filedir then goto inst_dir_loop
+$!
+$!  process .dir extensions for rename
+$!  If this is not a directory then start processing files.
+$!-------------------------
+$   filetype = f$parse(pathname,,,"TYPE")
+$   filetype_u = f$edit(filetype, "upcase")
+$   filename = f$parse(pathname,,,"NAME")
+$   if filetype_u .nes. ".DIR" then goto inst_file
+$!
+$!  process directory lines for rename.
+$!--------------------------------------
+$   if line_out .nes. ""
+$   then
+$       write pdsc line_out,","
+$       line_out = ""
+$   endif
+$   if arch_code .nes. "V"
+$   then
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = "   ""rename pcsi$destination:''pathname' ''filename'.DIR"""
+$   else
+$       if line_out .nes. "" then write pdsc line_out
+$       line_out = ""
+$   endif
+$   goto inst_dir_loop
+$!
+$!
+$!   process file lines for rename
+$!---------------------------------
+$inst_file_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_dir_loop
+$   pathname = f$element(0, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       if pathname .eqs. "[gnv]usr.dir"
+$       then
+$           pathname = "[gnv]beta.dir"
+$       else
+$           old_start = f$locate("[gnv.usr", pathname)
+$           if old_start .lt. f$length(pathname)
+$           then
+$               pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           endif
+$       endif
+$   endif
+$!
+$!  Filenames with $ in them are VMS special and do not need to be lowercased.
+$!  --------------------------------------------------------------------------
+$   if f$locate("$", pathname) .lt. f$length(pathname) then goto inst_file_loop
+$!
+$   filetype = f$parse(pathname,,,"TYPE")
+$   filename = f$parse(pathname,,,"NAME") + filetype
+$inst_file:
+$   if arch_code .nes. "V"
+$   then
+$       if line_out .nes. "" then write pdsc line_out,","
+$       filetype = f$parse(pathname,,,"TYPE")
+$       filename = f$parse(pathname,,,"NAME") + filetype
+$       line_out = "   ""rename pcsi$destination:''pathname' ''filename'"""
+$   else
+$       if line_out .nes. "" then write pdsc line_out
+$       line_out = ""
+$   endif
+$   goto inst_file_loop
+$!
+$inst_alias_loop_end:
+$!
+$write pdsc line_out
+$write pdsc "        ) ;"
+$close flst
+$!
+$!   Move Release Notes to destination
+$!-------------------------------------
+$write pdsc "   information RELEASE_NOTES phase after ;"
+$!
+$!   Source kit option
+$!---------------------
+$write pdsc "   option SOURCE default 0;"
+$write pdsc "   directory ""[gnv.common_src]"" PROTECTION PUBLIC ;"
+$write pdsc -
+    "        file ""[gnv.common_src]''filename_base'_original_src.bck"""
+$write pdsc -
+    "          source [common_src]''filename_base'_original_src.bck ;"
+$if f$search("gnv$gnu:[vms_src]''filename_base'_vms_src.bck") .nes. ""
+$then
+$    write pdsc "   directory ""[gnv.vms_src]"" PROTECTION PUBLIC ;"
+$    write pdsc "        file ""[gnv.vms_src]''filename_base'_vms_src.bck"""
+$    write pdsc "          source [vms_src]''filename_base'_vms_src.bck ;"
+$endif
+$write pdsc "   end option;"
+$!
+$!
+$! Read through the file list again.
+$!----------------------------------
+$open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$!
+$!   Create directory lines
+$!-------------------------
+$flst_dir_loop:
+$   read/end=flst_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto flst_dir_loop
+$!
+$   filename = f$element(0, " ", line_in)
+$   linkflag = f$element(1, " ", line_in)
+$   if linkflag .eqs. "->" then goto flst_dir_loop
+$!
+$!  Ignore .dir extensions
+$!-------------------------
+$   filetype = f$edit(f$parse(filename,,,"TYPE"), "upcase")
+$   if filetype .eqs. ".DIR" then goto flst_dir_loop
+$!
+$   destname = filename
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", destname)
+$       if old_start .lt. f$length(destname)
+$       then
+$           destname = "[gnv.beta" + destname - "[gnv.usr"
+$       endif
+$   endif
+$!
+$!  It should be just a directory then.
+$!-------------------------------------
+$   filedir = f$edit(f$parse(filename,,,"DIRECTORY"), "lowercase")
+$!  If this is not a directory then start processing files.
+$!---------------------------------------------------------
+$   if filename .nes. filedir then goto flst_file
+$!
+$   write pdsc "   directory ""''destname'"" PROTECTION PUBLIC ;"
+$   goto flst_dir_loop
+$!
+$!
+$!   Add file lines for curl.
+$!---------------------------
+$flst_file_loop:
+$   read/end=flst_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_file_loop
+$   filename = f$element(0, " ", line_in)
+$   destname = filename
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", destname)
+$       if old_start .lt. f$length(destname)
+$       then
+$           destname = "[gnv.beta" + destname - "[gnv.usr"
+$       endif
+$   endif
+$flst_file:
+$   srcfile = filename - "gnv."
+$   write pdsc "   file ""''destname'"" "
+$   write pdsc "     source ""''srcfile'"" ;"
+$   goto flst_file_loop
+$!
+$flst_loop_end:
+$ close flst
+$!
+$!   Add Link alias procedure file (N/A for curl)
+$!------------------------------------------------
+$!
+$!   Add [.SYS$STARTUP]curl_startup file
+$!---------------------------------------
+$ if kit_type .eqs. "D"
+$ then
+$   write pdsc "   file ""[sys$startup]curl_daily_startup.com"""
+$ else
+$   write pdsc "   file ""[sys$startup]curl_startup.com"""
+$ endif
+$ write pdsc "     source [usr.lib]curl_startup.com ;"
+$!
+$!   Add Release notes file.
+$!------------------------------
+$ write pdsc -
+    "   file ""[SYSHLP]''filename_base'.release_notes"" release notes ;"
+$!
+$! Close the product file
+$!------------------------
+$ write pdsc "end product;"
+$!
+$close pdsc
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_pcsi_text.com b/packages/vms/build_gnv_curl_pcsi_text.com
new file mode 100644 (file)
index 0000000..df98f63
--- /dev/null
@@ -0,0 +1,198 @@
+$! File: Build_GNV_curl_pcsi_text.com
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file from the four components:
+$!    1. Generated =product header section
+$!    2. [--]readme. file from the Curl distribution, modified to fit
+$!       a pcsi$text file format.
+$!    3. [--]copying file from the Curl distribution, modified to fit
+$!       a pcsi$text file format.
+$!    4. Generated Producer section.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$!
+$ product_line = "=product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$     product_name = " ''majorver'.''minorver'"
+$ else
+$     product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full"
+$!
+$!
+$! If this is VAX and the file is on NFS, the names may be mangled.
+$!-----------------------------------------------------------------
+$ readme_file = ""
+$ if f$search("[--]readme.") .nes. ""
+$ then
+$   readme_file = "[--]readme."
+$ else
+$   if f$search("[--]$README.") .nes. ""
+$   then
+$       readme_file = "[--]$README."
+$   else
+$       write sys$output "Can not find readme file."
+$       goto all_exit
+$   endif
+$ endif
+$ copying_file = ""
+$ if f$search("[--]copying.") .nes. ""
+$ then
+$   copying_file = "[--]copying."
+$ else
+$   if f$search("[--]$COPYING.") .nes. ""
+$   then
+$       copying_file = "[--]$COPYING."
+$   else
+$       write sys$output "Can not find copying file."
+$       goto all_exit
+$   endif
+$ endif
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$text
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append ptxt 'base_file'.pcsi$text
+$ write ptxt product_line
+$!
+$!
+$! First insert the Readme file.
+$!
+$ open/read rf 'readme_file'
+$!
+$ write ptxt "1 'PRODUCT"
+$ write ptxt "=prompt ''producter' ''product' for OpenVMS"
+$!
+$rf_loop:
+$   read/end=rf_loop_end rf line_in
+$   if line_in .nes. ""
+$   then
+$!    PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$     first_char = f$extract(0, 1, line_in)
+$     if first_char .nes. " " then line_in = " " + line_in
+$   endif
+$   write ptxt line_in
+$   goto rf_loop
+$rf_loop_end:
+$ close rf
+$!
+$!
+$! Now add in the copying file
+$!--------------------------------
+$ write ptxt ""
+$ write ptxt "1 'NOTICE"
+$ write ptxt ""
+$!
+$ open/read cf 'copying_file'
+$!
+$cf_loop:
+$   read/end=cf_loop_end cf line_in
+$   if line_in .nes. ""
+$   then
+$!    PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$     first_char = f$extract(0, 1, line_in)
+$     if first_char .nes. " " then line_in = " " + line_in
+$   endif
+$   write ptxt line_in
+$   goto cf_loop
+$cf_loop_end:
+$ close cf
+$!
+$! Now we need the rest of the boiler plate.
+$!--------------------------------------------
+$ write ptxt ""
+$ write ptxt "1 'PRODUCER"
+$ write ptxt "=prompt ''producer_full_name'"
+$ write ptxt -
+ "This software product is provided by ''producer_full_name' with no warranty."
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$!
+$ write ptxt "1 NEED_VMS''vmstag'"
+$ write ptxt -
+   "=prompt OpenVMS ''vernum' or later is not installed on your system."
+$ write ptxt "This product requires OpenVMS ''vernum' or later to function."
+$ write ptxt "1 NEED_ZLIB"
+$ write ptxt "=prompt ZLIB 1.2-8 or later is not installed on your system."
+$ write ptxt "This product requires ZLIB 1.2-8 or later to function."
+$ write ptxt "1 SOURCE"
+$ write ptxt "=prompt Source modules for ''product'"
+$ write ptxt "The Source modules for ''product' will be installed."
+$ write ptxt "1 RELEASE_NOTES"
+$ write ptxt "=prompt Release notes are available in the [SYSHLP] directory."
+$!
+$ close ptxt
+$!
+$!
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_release_notes.com b/packages/vms/build_gnv_curl_release_notes.com
new file mode 100644 (file)
index 0000000..dbe43d9
--- /dev/null
@@ -0,0 +1,90 @@
+$! File: Build_GNV_curl_release_notes.com
+$!
+$! $Id$
+$!
+$! Build the release note file from the four components:
+$!    1. The curl_release_note_start.txt
+$!    2. The hp_ssl_release_info.txt
+$!    3. [--]readme. file from the Curl distribution.
+$!    4. The Curl_gnv-build_steps.txt.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$! logical name.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 14-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ base_file = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if base_file .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$ curl_readme = f$search("sys$disk:[--]readme.")
+$ if curl_readme .eqs. ""
+$ then
+$   curl_readme = f$search("sys$disk:[--]$README.")
+$ endif
+$ if curl_readme .eqs. ""
+$ then
+$    write sys$output "Can not find Curl readme file."
+$    goto all_exit
+$ endif
+$!
+$ curl_copying = f$search("sys$disk:[--]copying.")
+$ if curl_copying .eqs. ""
+$ then
+$   curl_copying = f$search("sys$disk:[--]$COPYING.")
+$ endif
+$ if curl_copying .eqs. ""
+$ then
+$    write sys$output "Can not find Curl copying file."
+$    goto all_exit
+$ endif
+$!
+$ vms_readme = f$search("sys$disk:[]readme.")
+$ if vms_readme .eqs. ""
+$ then
+$   vms_readme = f$search("sys$disk:[]$README.")
+$ endif
+$ if vms_readme .eqs. ""
+$ then
+$   write sys$output "Can not find VMS specific Curl readme file."
+$   goto all_exit
+$ endif
+$!
+$ if f$search("sys$disk:[]hp_ssl_release_info.txt") .eqs. ""
+$ then
+$   write sys$output "GNV_LINK_CURL.COM has not been run!"
+$   goto all_exit
+$ endif
+$!
+$ type/noheader 'curl_readme', 'vms_readme', -
+                sys$disk:[]curl_release_note_start.txt, -
+                sys$disk:[]hp_ssl_release_info.txt, -
+                'curl_copying', -
+                sys$disk:[]curl_gnv_build_steps.txt -
+                /out='base_file'.release_notes
+$!
+$ purge 'base_file'.release_notes
+$ rename 'base_file.release_notes ;1
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com
new file mode 100644 (file)
index 0000000..251b345
--- /dev/null
@@ -0,0 +1,205 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the libcurl.pc file from the libcurl.pc.in file
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013  J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the libcurl.pc already exists.
+$ if f$search("[--]libcurl.pc") .nes. "" then goto all_exit
+$!
+$! Need to know the kit type.
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$ pc_file_in = "[--]libcurl^.pc.in"
+$!
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$    pc_file_in = "[--]libcurl.pc$5nin"
+$    if f$search(pc_file_in) .eqs. ""
+$    then
+$        pc_file_in = "[--]libcurl.pc_in"
+$        if f$search(pc_file_in) .eqs. ""
+$        then
+$            write sys$output "Can not find libcurl.pc.in."
+$            goto all_exit
+$        endif
+$    endif
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$    arch_name = "VAX"
+$ else
+$    arch_name = ""
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$    if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.src]version.h
+$version_loop:
+$   read vf/end=version_loop_end line_in
+$   if line_in .eqs. "" then goto version_loop
+$   key = f$element(0, " ", line_in)
+$   if key .nes. "#define" then goto version_loop
+$   name = f$element(1, " ", line_in)
+$   if name .eqs. "VERSION"
+$   then
+$       curl_version = f$element(2, " ", line_in) - """" - """"
+$   else
+$       goto version_loop
+$   endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]libcurl.pc
+$ open/append pco [--]libcurl.pc
+$ open/read pci 'pc_file_in'
+$pc_file_loop:
+$ read pci/end=pc_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$   write pco ""
+$   goto pc_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$   write pco line_in
+$   goto pc_file_loop
+$ endif
+$!
+$! Special handling for libs.
+$ if f$locate("Libs:", line_in) .eq. 0
+$ then
+$   write pco "#",line_in
+$   goto pc_file_loop
+$ endif
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$   write pco line_in
+$   goto pc_file_loop
+$ endif
+$!
+$ if f$locate("@prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "prefix=/usr"
+$    else
+$        write pco "prefix=/beta"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "exec_prefix=/usr"
+$    else
+$        write pco "exec_prefix=/beta"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@libdir@", line_in) .lt line_in_len
+$ then
+$    write pco "libdir=$(exec_prefix}/lib"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "includedir=$(prefix}/include"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
+$ then
+$    proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
+$    proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$    proto = proto1 + proto2
+$    write pco "supported_protocols=""" + proto + """"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "supported_features=""SSL libz NTLM"""
+$    else
+$        write pco "supported_features=""SSL IPv6 libz NTLM"""
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    write pco "Version: ''curl_version'"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "Libs.private: -lssl -lcrypto -lz"
+$    else
+$        write pco "Libs.private: -lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$    write pco "Cflags: -I${includedir} -DCURL_STATICLIB"
+$    goto pc_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
index 276e767..4ec7635 100644 (file)
@@ -18,16 +18,43 @@ $!    CLEAN_ALL Delete product files for all host architectures.  (No
 $!              build done.)
 $!
 $!    64        Compile with 64-bit pointers.
+$!              Note, you must match the pointer size that the OpenSSL
+$!              shared image expects.
+$!              Currently curl is not building properly with 64 bit pointers
+$!              on VMS because it is trying to cast pointers to 32 bit
+$!              integers and some OpenVMS library routines called by curl
+$!              do not yet support 64 bit pointers.
 $!    CCQUAL=x  Add "x" to the C compiler qualifiers.
-$!    DEBUG     Compile and link with debug.
-$!    IEEE      Use IEEE floating point.  (Alpha.)
-$!    LARGE     Enable large-file support.  (Non-VAX, VMS >= V7.2.)
-$!    LDAP      Enable LDAP support.
+$!              Default qualifiers are:
+$!                  /standard=relaxed
+$!                  /names=(as_is, shortened)
+$!                  /repository=[.'arch']
+$!                  /nested_include_directory=none
+$!                  /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
+$!                  /float=ieee/ieee_mode=denorm_results (non-vax)
+$!    DEBUG     Compile debug and nooptimize
+$!              Alpha/IA64 always compiles /debug.
+$!              Always link a debug image.
+$!    NOIEEE    Do not use IEEE floating point.  (Alpha/I64)
+$!              VAX must always use DFLOAT
+$!    NOLARGE   Disable large-file support if large file support available.
+$!              (Non-VAX, VMS >= V7.2.)
+$!    NOLDAP    Disable LDAP support if LDAP is available.
+$!    NOKERBEROS   Disable Kerberos support if Kerberos is available.
 $!    LIST      Create C compiler listings and linker maps.
+$!                 /list/show=(expan,includ)/machine
+$!    FULLLIST  Full detailed listing.
+$!                 /list/show=(all, nomessages)/machine
 $!    NOHPSSL   Don't use HP SSL, even if available.
+$!              Note, you must match the pointer size that the OpenSSL
+$!              shared image expects.  This procedure will select the
+$!              correct HP OpenSSL image.
 $!    NOSSL     Don't use any SSL, even if available.
 $!    OSSLOLB   Use OpenSSL object libraries (.OLB), even if shared
 $!              images (.EXE) are available.
+$!    NOZLIB    Don't use GNV$ZLIB shared image even if available.
+$!    REALCLEAN Delete product files for all host architectures.  (No
+$!              build done.)  Alias for CLEAN_ALL
 $!
 $! DCL Symbols:
 $!
@@ -73,7 +100,7 @@ $!                   Changed to avoid case confusion on ODS5 disks.
 $!                   Added more default dev:[dir] save+restore.
 $!                   Moved remaining "defines.com" code (back) into
 $!                   here, eliminating the hard-coded OpenSSL nonsense.
-$!                   Changed to use F$GETSYI( "ARCH_NAME") (or
+$!                   Changed to use F$GETSYI("ARCH_NAME") (or
 $!                   equivalent) to name architecture-specific product
 $!                   file destination directory, and to create the
 $!                   directory if needed (obviating inclusion of these
@@ -84,260 +111,565 @@ $!                   command across multiple lines to avoid DCL
 $!                   line-too-long problems.
 $!                   Changed "vo_c" messages to show the CC qualifiers
 $!                   once, not with every compile command.
+$! 01-Jan-2013  J. Malmberg
+$!                   VMS build procedures need to be able to work with
+$!                   the default set to a search list, with created or
+$!                   modified files only in the first member of the search
+$!                   list.
+$!                   Whitespace change to be more compatible with current
+$!                   practices.
+$!                   One pass option parsing instead of loop.
+$!                   GNV ZLIB shared image support.
+$!                   KERBEROS support where available.
+$!                   LDAP default to on where available
+$!                   LARGEFILE default to on where available
+$!                   IEEE float default to on where available.
+$!                   Generate the curl_config.h file from system inspection.
+$!                   Linker finds ldap with out option file.
+$! 13-Mar-2013, Tom Grace
+$!                   Added missing slash in cc_full_list.
+$!                   Removed unwanted extra quotes inside symbol tool_main
+$!                   for non-VAX architectures that triggered link failure.
+$!                   Replaced curl_sys_inc with sys_inc.
+$! 19-Mar-2013, John Malmberg
+$!                   symbol tool_main needs to be quoted when parse style is
+$!                   set to exended in versions of VMS greater than 7.3-1.
+$!                   Remove curlbuild.h generation as it should be pre-built
+$!                   in the curl release or daily tarball.
+$! 12-Jul-2013, John Malmberg
+$!                   Adjust to find and use ZLIB from the Jean-Francois
+$!                   Pieronne shared image and newer GNV ZLIB kit that
+$!                   is upward compatible with Jean-Francois's kit.
+$!                   Remove tabs from file.
+$!                   Fixed DCL formatting as follows:
+$!                      * Labels have no space after leading $.
+$!                      * 1 space after $ for first level.
+$!                      * 3 spaces after $ for second level.  Line start + 4.
+$!                      * 7 spaces after $ for third level.  Line start + 8.
+$!                      * Each level after that indents 4 characters.
+$!                      * then/else/endif same indentation as if statement.
+$!
+$!===========================================================================
 $!
 $!
 $! Save the original default dev:[dir], and arrange for its restoration
 $! at exit.
-$!
+$!------------------------------------------------------------------------
 $ curl = ""
-$ orig_def = f$environment( "DEFAULT")
+$ orig_def = f$environment("DEFAULT")
 $ on error then goto Common_Exit
 $ on control_y then goto Common_Exit
 $!
 $ ctrl_y  = 1556
-$ proc = f$environment( "PROCEDURE")
-$ proc_dev_dir = -
-   f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
+$ proc = f$environment("PROCEDURE")
+$ proc_fid = f$file_attributes(proc, "FID")
+$ proc_dev = f$parse(proc, , , "DEVICE")
+$ proc_dir = f$parse(proc, , , "DIRECTORY")
+$ proc_name = f$parse(proc, , , "NAME")
+$ proc_type = f$parse(proc, , , "TYPE")
+$ proc_dev_dir = proc_dev + proc_dir
+$!
+$! Have to manually parse the device for a search list.
+$! Can not use the f$parse() as it will return the first name
+$! in the search list.
+$!
+$ orig_def_dev = f$element(0, ":", orig_def) + ":"
+$ if orig_def_dev .eqs. "::" then orig_def_dev = "sys$disk:"
+$ test_proc = orig_def_dev + proc_dir + proc_name + proc_type
+$!
+$! If we can find this file using the default directory
+$! then we know that we should use the original device from the
+$! default directory which could be a search list.
+$!
+$ test_proc_fid = f$file_attributes(test_proc, "FID")
+$!
+$ if (test_proc_fid .eq. proc_fid)
+$ then
+$   proc_dev_dir = orig_def_dev + proc_dir
+$ endif
+$!
 $!
 $! 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 = "!"
+$ vo_c := "write sys$output"
+$ vo_l := "write sys$output"
+$ vo_o := "!"
 $!
 $! Determine the main distribution directory ("[--]") in an
 $! ODS5-tolerant (case-insensitive) way.  (We do assume that the only
-$! "]" is the one at the end.)
+$! "]" or ">" is the one at the end.)
+$!
+$! Some non-US VMS installations report ">" for the directory delimiter
+$! so do not assume that it is "]".
+$!
+$ orig_def_len = f$length(orig_def)
+$ delim = f$extract(orig_def_len - 1, 1, orig_def)
 $!
 $ set default 'proc_dev_dir'
 $ set default [--]
-$ top_dev_dir = f$environment( "DEFAULT")- "]"
+$ base_dev_dir = f$environment("default")
+$ top_dev_dir = base_dev_dir - delim
+$!
+$!
 $!
 $! Define the architecture-specific product file destination directory
 $! name(s).
 $!
-$ if (f$getsyi( "HW_MODEL") .lt. 1024)
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
 $ then
 $    arch_name = "VAX"
 $ else
 $    arch_name = ""
-$    arch_name = arch_name+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
 $    if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$!   Extended parsing option starts with VMS 7.3-1.
+$!   There is no 7.4, so that simplifies the parse a bit.
+$!
+$    node_swvers = f$getsyi("node_swvers")
+$    version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$    maj_ver = f$element(0, ".", version_patch)
+$    min_ver_patch = f$element(1, ".", version_patch)
+$    min_ver = f$element(0, "-", min_ver_patch)
+$    patch = f$element(1, "-", min_ver_patch)
+$    if patch .eqs. "-" then patch = ""
+$    parse_x = 0
+$    if maj_ver .ges. "8"
+$    then
+$       parse_x = 1
+$    else
+$       if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$       then
+$          parse_x = 1
+$       endif
+$    endif
+$    if parse_x
+$    then
+$       parse_style = f$getjpi("", "parse_style_perm")
+$    endif
 $ endif
 $!
-$ exedir = proc_dev_dir- "]"+ ".''arch_name']"
+$ exedir = proc_dev_dir - delim + ".''arch_name'" + delim
 $ lisdir = exedir
 $ objdir = exedir
 $!
+$! When building on a search list, need to do a create to make sure that
+$! the output directory exists, since the clean procedure tries to delete
+$! it.
+$ create/dir 'exedir'/prot=o:rwed
+$!
 $! Interpret command-line options.
 $!
 $ hpssl = 0
-$ ldap = 0
+$ ldap = 1
 $ list = 0
+$ full_list = 0
 $ nohpssl = 0
 $ nossl = 0
 $ openssl = 0
 $ osslolb = 0
+$ nozlib = 0
+$ nokerberos = 0
+$ cc_names = "/names=(shortened, as_is)/repository='exedir'
+$ cc_defs = "HAVE_CONFIG_H=1"
+$ cc_list = "/list='objdir'/show=(expan, includ)/machine
+$ cc_full_list = "/list='objdir'/show=(all, nomessages)/machine
+$ link_qual = ""
+$ if arch_name .eqs. "VAX"
+$ then
+$    cc_debug = "/nodebug/optimize"
+$    !cc_defs = cc_defs + ""
+$    cc_float = ""
+$    cc_large = ""
+$ else
+$    cc_debug = "/debug/optimize"
+$    cc_defs = cc_defs + ",_USE_STD_STAT"
+$    cc_float = "/float=ieee/ieee_mode=denorm_results"
+$    cc_large = ",_LARGEFILE"
+$ endif
 $ cc_qual1 = ""
 $ cc_qual2 = ""
-$ cc_defs = "HAVE_CONFIG_H=1"
-$ if (f$type( CURL_CCDEFS) .nes. "")
+$ if (f$type(CURL_CCDEFS) .nes. "")
 $ then
-$    CURL_CCDEFS = f$edit( CURL_CCDEFS, "TRIM")
-$    cc_defs = cc_defs+ ", "+ CURL_CCDEFS
+$    CURL_CCDEFS = f$edit(CURL_CCDEFS, "TRIM")
+$    cc_defs = cc_defs + ", " + CURL_CCDEFS
 $ endif
-$ link_qual = ""
 $ msg_qual = "/object = ''objdir'"
 $ ssl_opt = ""
 $!
-$ arg = 1
-$arg_loop:
-$    p = "p''arg'"
-$    arg_val = 'p'
-$    if (arg_val .eqs. "") then goto arg_loop_out
-$    arg_val = f$edit( arg_val, "upcase")
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
 $!
-$    if (arg_val .eqs. "CLEAN")
-$    then
-$       prods = "''exedir'*.*;*"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir+ arch_name+ ".DIR;1"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       goto Common_Exit
-$    endif
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
 $!
-$    if (arg_val .eqs. "CLEAN_ALL")
-$    then
-$       prods = proc_dev_dir- "]"+ ".ALPHA]*.*;*"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir+ "ALPHA"+ ".DIR;1"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir- "]"+ ".IA64]*.*;*"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir+ "IA64"+ ".DIR;1"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir- "]"+ ".VAX]*.*;*"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       prods = proc_dev_dir+ "VAX"+ ".DIR;1"
-$       if (f$search( prods) .nes. "") then delete /log 'prods'
-$       goto Common_Exit
-$    endif
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
 $!
-$    if (arg_val .eqs. "64")
-$    then
-$       cc_qual1 = cc_qual1+ " /POINTER = 64"
-$       goto arg_loop_end
-$    endif
+$ clean = 0
+$ if f$locate(",clean,", args_lower) .lt. args_lower_len
+$ then
+$   clean = 1
+$ endif
+$ clean_all = 0
+$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
+$ then
+$    clean = 1
+$    clean_all = 1
+$ endif
+$ if f$locate(",realclean,", args_lower) .lt. args_lower_len
+$ then
+$    clean = 1
+$    clean_all = 1
+$ endif
 $!
-$    if (f$extract( 0, 6, arg_val) .eqs. "CCQUAL")
-$    then
-$       opts = f$edit( arg_val, "COLLAPSE")
-$       eq = f$locate( "=", opts)
-$       cc_qual2 = f$extract( (eq+ 1), 1000, opts)
-$       goto arg_loop_end
-$    endif
+$ if clean .ne. 0
+$ then
+$   prods = "''exedir'*.*;*"
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir + arch_name + ".DIR;1"
+$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   file = "[]config_vms.h"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[]config.h"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[]curl-config."
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[]libcurl.pc"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[.lib.cxx_repository]cxx$demangler_db."
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[.src.cxx_repository]cxx$demangler_db."
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[.lib]config_vms.h"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]curl_crtl_init"
+$   if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$   if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$   file = "[...]gnv$curlmsg"
+$   if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$   if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   file = "[...]curlmsg"
+$   if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$   if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   file = "[...]report_openssl_version"
+$   if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$   if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   file = "[...]hp_ssl_release_info.txt"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]gnv_libcurl_xfer.mar_exact"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]gnv_libcurl_xfer"
+$   if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$   if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$   if f$search("''file'.opt") .nes. "" then delete/log 'file'.opt;*
+$   file = "[...]curl-*_original_src.bck"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]curl-*_vms_src.bck"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]curl-*.release_notes"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]*curl*.pcsi$desc"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$   file = "[...]*curl*.pcsi$text"
+$   if f$search(file) .nes. "" then delete/log 'file';*
+$!
+$   if clean_all .eq. 0 then goto Common_Exit
+$ endif
 $!
-$    if (arg_val .eqs. "DEBUG")
-$    then
-$       cc_qual1 = cc_qual1+ " /debug /nooptimize"
-$       link_qual = link_qual+ " /debug"
-$       goto arg_loop_end
-$    endif
 $!
-$    if (arg_val .eqs. "IEEE")
-$    then
-$       cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
-$       goto arg_loop_end
-$    endif
+$ if clean_all .ne. 0
+$ then
+$   file = "[...]gnv$libcurl"
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$   if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$   file = "[.src]curl"
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$   if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$   prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir + "ALPHA" + ".DIR;1"
+$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir - delim + ".IA64" + delim + "*.*;*"
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir + "IA64" + ".DIR;1"
+$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir - delim + ".VAX" + delim + "*.*;*"
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   prods = proc_dev_dir + "VAX"+ ".DIR;1"
+$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$   if (f$search(prods) .nes. "") then delete /log 'prods'
+$   file = "[...]macro32_exactcase"
+$   if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$   if f$search("''file'.jnl") .nes. "" then delete/log 'file'.jnl;*
+$   goto Common_Exit
+$ endif
 $!
-$    if (arg_val .eqs. "LARGE")
-$    then
-$       if (arch_name .eqs. "VAX")
-$       then
-$          write sys$output """LARGE"" is ignored on VAX."
-$       else
-$          cc_defs = cc_defs+ ", _LARGEFILE=1"
-$       endif
-$       goto arg_loop_end
-$    endif
+$ build_64 = 0
+$ if f$locate(",64,", args_lower) .lt. args_lower_len
+$ then
+$   cc_qual1 = cc_qual1 + " /POINTER = 64"
+$   build_64 = 1
+$ endif
 $!
-$    if (arg_val .eqs. "LDAP")
-$    then
-$       ldap = 1
-$       goto arg_loop_end
-$    endif
+$ args_loc = f$locate(",ccqual=", args_lower)
+$ if args_loc .lt. args_lower_len
+$ then
+$   arg = f$extract(args_loc + 1, args_lower_len, args_lower)
+$   arg_val = f$element(0, ",", arg)
+$   cc_qual2 = f$element(1, "=", arg_val);
+$ endif
 $!
-$    if (f$extract( 0, 4, arg_val) .eqs. "LIST")
-$    then
-$       list = 1
-$       cc_qual1 = cc_qual1+ " /list = ''lisdir' /show = (all, nomessages)"
-$       link_qual = link_qual+ " /map = ''lisdir'"
-$       msg_qual = msg_qual+ " /list = ''lisdir'"
-$       goto arg_loop_end
-$    endif
+$! On Alpha/IA64 no size penalty for compiling /debug/optimize
+$! by default.
+$ if f$locate(",debug,", args_lower) .lt. args_lower_len
+$ then
+$   cc_debug = "/debug/nooptimize"
+$ endif
 $!
-$    if (arg_val .eqs. "NOHPSSL")
-$    then
-$       nohpssl = 1
-$       goto arg_loop_end
-$    endif
+$! We normally want IEEE float if it is available.  Programs that are
+$! calling libcurl will typically prefer IEEE behavior, unless on the
+$! VAX where we have no choice.
 $!
-$    if (arg_val .eqs. "NOSSL")
-$    then
-$       nossl = 1
-$       goto arg_loop_end
-$    endif
+$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
+$ then
+$   cc_float = ""
+$ endif
 $!
-$    if (arg_val .eqs. "OSSLOLB")
-$    then
-$       osslolb = 1
-$       goto arg_loop_end
-$    endif
+$! Normally we want large file if it is available.
+$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
+$ then
+$   write sys$output "Handling of large files disabled."
+$   cc_large = ""
+$ endif
+$ if cc_large .nes. ""
+$ then
+$   cc_defs = cc_defs + cc_large
+$ endif
+$!
+$ if f$locate(",noldap,", args_lower) .lt. args_lower_len
+$ then
+$   ldap = 0
+$ endif
+$!
+$ if f$locate(",list,", args_lower) .lt. args_lower_len
+$ then
+$   list = 1
+$ endif
+$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
+$ then
+$    list = 1
+$    full_list = 1
+$ endif
+$!
+$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
+$ then
+$   nohpssl = 1
+$ endif
+$!
+$ if f$locate(",nossl,", args_lower) .lt. args_lower_len
+$ then
+$   nossl = 1
+$ endif
+$!
+$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
+$ then
+$    osslolb = 1
+$ endif
+$!
+$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
+$ then
+$   nozlib = 1
+$ endif
 $!
-$    write sys$output "Unrecognized command-line option: ''arg_val'"
-$    goto Common_Exit
+$ if f$locate(",nokerberos,", args_lower) .lt. args_lower_len
+$ then
+$   nokerberos = 1
+$ endif
 $!
-$arg_loop_end:
-$ arg = arg+ 1
-$ goto arg_loop
-$arg_loop_out:
 $!
 $! CC /LIST, LINK /MAP, and MESSAGE /LIST are defaults in batch mode,
 $! so be explicit when they're not desired.
 $!
-$ if (list .eq. 0)
+$
+$ if list .eq. 0
 $ then
-$    cc_qual1 = cc_qual1+ " /nolist"
-$    link_qual = link_qual+ " /nomap"
-$    msg_qual = msg_qual+ " /nolist"
+$   cc_qual1 = cc_qual1 + "/nolist"
+$   msg_qual = msg_qual + "/nolist"
+$ else
+$   msg_qual = msg_qual + "/list='objdir'"
+$   if (full_list .ne. 0)
+$   then
+$       cc_qual1 = cc_qual1 + cc_full_list
+$   else
+$       cc_qual1 = cc_qual1 + cc_list
+$   endif
 $ endif
+$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
 $!
 $! Create product directory, if needed.
 $!
-$ if (f$search( proc_dev_dir+ arch_name+ ".DIR;1") .eqs. "")
+$ if (f$search(proc_dev_dir + arch_name + ".DIR;1") .eqs. "")
 $ then
 $    create /directory 'exedir'
 $ endif
 $!
 $! Detect available (but not prohibited) SSL software.
 $!
+$ libsslshr_line = ""
+$ libcryptoshr_line = ""
 $ if (.not. nossl)
 $ then
-$    if (f$trnlnm( "OPENSSL") .nes. "")
-$    then
-$       cc_defs = cc_defs+ ", USE_SSLEAY=1"
-$       if ((f$trnlnm( "SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
-$       then
-$!         Use HP SSL.
-$          hpssl = 1
-$          ssl_opt = ", ''proc_dev_dir'hpssl_"+ -
-            f$getsyi("ARCH_NAME")+ ".opt /options"
+$   if (f$trnlnm("OPENSSL") .nes. "")
+$   then
+$!        cc_defs = cc_defs + ", USE_SSLEAY=1"
+$        if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
+$        then
+$!          Use HP SSL.
+$           hpssl = 1
+$!
+$!          Older SSL only has lib*_shr32 images
+$!-----------------------------------------------
+$           libsslshr = "sys$share:ssl$libssl_shr"
+$           if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
+$           then
+$               libsslshr = libsslshr + "32"
+$           endif
+$           libcryptoshr = "sys$share:ssl$libcrypto_shr"
+$           if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
+$           then
+$               libcryptoshr = libcryptoshr + "32"
+$           endif
+$           libsslshr_line = "''libsslshr'.exe/share"
+$           libcryptoshr_line = "''libcryptoshr'.exe/share"
 $       else
-$!         Use OpenSSL.  Assume object libraries, unless shared images
-$!         are found (and not prohibited).
-$          openssl = 1
-$          ssl_opt = ", ssllib:libssl.olb /library"+ -
-            ", ssllib:libcrypto.olb /library"
-$          if (osslolb .eq. 0)
-$          then
-              if ((f$search( "ssllib:ssl_libcrypto.exe") .nes. "") .and. -
-               (f$search( "ssllib:ssl_libssl.exe") .nes. ""))
-$             then
-$!               OpenSSL shared images with "SSL_xxx.EXE names.
-$                openssl = 2
-$                ssl_opt = ", ''proc_dev_dir'openssl_ssl_"+ -
-                  f$getsyi("ARCH_NAME")+ ".opt /options"
-$             else
-$                if ((f$search( "ssllib:libcrypto.exe") .nes. "") .and. -
-                  (f$search( "ssllib:libssl.exe") .nes. ""))
+$!          Use OpenSSL.  Assume object libraries, unless shared images
+$!          are found (and not prohibited).
+$!          TODO: We do not know how to automatically choose based on the
+$!          pointer size.
+$!
+$           openssl = 1
+$           libsslshr_line = "ssllib:libssl.olb/lib"
+$           libcryptoshr_line = "ssllib:libcrypto.olb/lib"
+$           ssl_opt = ", ssllib:libssl.olb /library" + -
+                ", ssllib:libcrypto.olb /library"
+$           if (osslolb .eq. 0)
+$           then
+                if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "")  .and. -
+                    (f$search("ssllib:ssl_libssl.exe") .nes. ""))
 $                then
-$!                  OpenSSL shared images with "xxx.EXE names.
-$                   openssl = 3
-$                   ssl_opt = ", ''proc_dev_dir'openssl_"+ -
-                     f$getsyi("ARCH_NAME")+ ".opt /options"
+$!                   OpenSSL shared images with "SSL_xxx.EXE names.
+$                    openssl = 2
+$                    libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
+$                    libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
+$                else
+$                    if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
+                         (f$search("ssllib:libssl.exe") .nes. ""))
+$                    then
+$!                       OpenSSL shared images with "xxx.EXE names.
+$                        openssl = 3
+$                        libsslshr_line = "ssllib:libssl_shr.exe/share"
+$                        libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
+$                    endif
 $                endif
-$             endif
-$          endif
+$           endif
 $       endif
-$    endif
+$   endif
 $ endif
 $!
 $! LDAP.
 $!
+$ if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$ then
+$   ldap = 0
+$ endif
 $ if (ldap .eq. 0)
 $ then
-$    cc_defs = cc_defs+ ", CURL_DISABLE_LDAP=1"
+$!   cc_defs = cc_defs + ", CURL_DISABLE_LDAP=1"
+$ else
+$   'vo_c' "%CURL-I-BLDHPLDAP, building with HP LDAP support"
+$ endif
+$!
+$! KERBEROS
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .eqs. ""
+$ then
+$   nokerberos = 1
+$ endif
+$ curl_sys_krbinc = ""
+$ if nokerberos .eq. 0
+$ then
+$   'vo_c' "%CURL-I-BLDHPKERBEROS, building with HP KERBEROS support"
+$   curl_sys_krbinc = "sys$sysroot:[kerberos.include]"
+$   gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr"
+$ if build_64
+$ then
+$!  First look for 64 bit
+$   if f$search("''try_shr'64") .eqs. ""
+$   then
+$!      Second look for the J.F. Pieronne 64 bit shared image
+$       try_shr = "LIBZ_SHR64"
+$       if f$search(try_shr) .eqs. "" then nozlib = 1
+$   endif
+$ else
+$!  First look for 32 bit
+$   if f$search("''try_shr'32") .eqs. ""
+$   then
+$!      Second look for old 32 bit image
+$       if f$search(try_shr) .eqs. ""
+$       then
+$!          Third look for the J.F. Pieronne 32 bit shared image
+$           try_shr = "LIBZ_SHR32"
+$           if f$search(try_shr) .eqs. "" then nozlib = 1
+$       endif
+$   endif
+$ endif
+$ if f$search(try_shr) .eqs. ""
+$ then
+$   nozlib = 1
+$ endif
+$ curl_sys_zlibinc = ""
+$ if nozlib .eq. 0
+$ then
+$   libzshr_line = "''try_shr'/share"
+$   if f$locate("LIBZ", try_shr) .eq. 0
+$   then
+$       'vo_c' "%CURL-I-BLDJFPLIBZ, building with JFP LIBZ support"
+$       curl_sys_zlibinc = "LIBZ:"
+$   else
+$       'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
+$       curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
+$   endif
 $ endif
 $!
 $! Form CC qualifiers.
 $!
 $ cc_defs = "/define = (''cc_defs')"
-$ cc_qual2 = cc_qual2+ " /object = ''objdir'"+ -
-   " /include = ([-.lib], [-.src],"+ -
-   " [-.packages.vms], [-.packages.vms.''arch_name'])"
+$ cc_qual2 = cc_qual2 + " /object = ''objdir'"
+$ cc_qual2 = cc_qual2 + " /include = ([-.lib], [-.src],"
+$ cc_qual2 = cc_qual2 + " [-.packages.vms], [-.packages.vms.''arch_name'])"
+$ cc_qual2 = cc_qual2 + "/nested_include_directory=none"
 $!
 $ 'vo_c' "CC opts:", -
   " ''cc_defs'", -
@@ -372,65 +704,111 @@ $ 'vo_c' "   EXEDIR = ''exedir'"
 $!
 $ if (openssl .ne. 0)
 $ then
-$    ssllib = f$trnlnm( "ssllib")
-$    if (ssllib .eqs. "")
-$    then
-$        ssllib = "(undefined)"
-$    endif
-$    'vo_c' "   SSLLIB = ''ssllib'"
-$!
-$    if (openssl .eq. 1)
-$    then
-$       ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.OLB"
-$       ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.OLB"
+$   ssllib = f$trnlnm("ssllib")
+$   if (ssllib .eqs. "")
+$   then
+$       ssllib = "(undefined)"
+$   endif
+$   'vo_c' "   SSLLIB = ''ssllib'"
+$!
+$! TODO: Why are we translating the logical name?
+$! The logical aname used to find the shared image should just be used
+$! as translating it could result in the wrong location at run time.
+$   if (openssl .eq. 1)
+$   then
+$       ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
+$       ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
 $       msg = "object libraries"
-$    else
+$   else
 $       if (openssl .eq. 2)
 $       then
-$          ossl_lib1 = f$trnlnm( "ssllib")+ "SSL_LIBSSL.EXE"
-$          ossl_lib2 = f$trnlnm( "ssllib")+ "SSL_LIBCRYPTO.EXE"
+$           ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
+$           ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
 $       else
-$          ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.EXE"
-$          ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.EXE"
+$           ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
+$           ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
 $       endif
 $       msg = "shared images"
-$    endif
-$    if ((f$search( ossl_lib1) .eqs. "") .or. -
-      (f$search( ossl_lib2) .eqs. ""))
-$    then
+$   endif
+$   if ((f$search(ossl_lib1) .eqs. "") .or. -
+        (f$search(ossl_lib2) .eqs. ""))
+$   then
 $       write sys$output "Can't find OpenSSL ''msg':"
 $       write sys$output "   ''ossl_lib1'"
 $       write sys$output "   ''ossl_lib2'"
 $       goto Common_Exit
-$    endif
+$   endif
 $ endif
 $!
 $! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
 $!
-$ curl = f$trnlnm( "curl", "LNM$PROCESS")
+$ curl = f$trnlnm("curl", "LNM$PROCESS")
 $ if (curl .nes. "")
 $ then
-$    write sys$output ""
-$    write sys$output -
+$   write sys$output ""
+$   write sys$output -
  "Process logical name ""curl"" is already defined, but this procedure"
-$    write sys$output -
+$   write sys$output -
  "would override that definition.  Use a command like"
-$    write sys$output -
+$   write sys$output -
  "      deassign /process curl"
-$    write sys$output -
+$   write sys$output -
  "to cancel that logical name definition, and then and re-run this procedure."
-$    write sys$output ""
-$    goto Common_Exit
+$   write sys$output ""
+$   goto Common_Exit
+$ endif
+$ curl_logical = top_dev_dir + ".include.curl" + delim
+$ curl_sys_inc2 = curl_logical
+$ curl_sys_inc1 = top_dev_dir + ".include" + delim
+$! define curl 'top_dev_dir'.include.curl'delim'
+$!
+$! Generate config file into the product directory.
+$!
+$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
+$!
+$ conf_params = ""
+$ if nossl .ne. 0 then conf_params = conf_params + ",nossl"
+$ if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
+$ if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
+$ if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
+$ if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
+$ conf_params = conf_params - ","
+$!
+$!
+$ new_conf = f$search("''objdir'curl_config.h")
+$ if new_conf .eqs. ""
+$ then
+$!   set ver
+$   write sys$output "Generating curl custom config_vms.h"
+$   @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
+$!
+$   write sys$output "Generating curl_config.h"
+$   conf_in = f$search("[.lib]curl_config*.*in")
+$   if conf_in .eqs. ""
+$   then
+$       write sys$output "Can not find [.lib]curl_config*.*in file!"
+$       goto common_exit
+$   endif
+$   @'proc_dev_dir'config_h.com 'conf_in'
+$   copy config.h 'objdir'curl_config.h
+$   delete config.h;
+$!   set nover
 $ endif
-$ define curl 'top_dev_dir'.include.curl]
 $!
-$! Copy the VMS-specific config file into the product directory.
 $!
-$ call MoveIfDiff 'top_dev_dir'.lib]config-vms.h 'objdir'curl_config.h
 $!
 $ on control_y then goto Common_Exit
 $!
 $ set default 'proc_dev_dir'
+$ sys_inc = "''curl_sys_inc1', ''curl_sys_inc2', ''curl_logical'"
+$ if curl_sys_krbinc .nes. ""
+$ then
+$   sys_inc = sys_inc + ",''curl_sys_krbinc'"
+$ endif
+$ if curl_sys_zlibinc .nes. ""
+$ then
+$   sys_inc = sys_inc + ",''curl_sys_zlibinc'"
+$ endif
 $ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
 $ if ($status .eq. ctrl_y) then goto Common_Exit
 $ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB"
@@ -438,31 +816,87 @@ $ if ($status .eq. ctrl_y) then goto Common_Exit
 $ call build "[]" "*.msg" "''objdir'CURLSRC.OLB"
 $ if ($status .eq. ctrl_y) then goto Common_Exit
 $!
-$ ldap_opt = ""
-$ if (ldap .ne. 0) then ldap_opt = ", ''proc_dev_dir'ldap.opt /options"
 $!
 $ if (openssl .ne. 0)
 $ then
-$    if (openssl .eq. 1)
-$    then
+$   if (openssl .eq. 1)
+$   then
 $       'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL (object library)"
-$    else
+$   else
 $       'vo_l' "%CURL-I-LINK_HPSSL, linking with OpenSSL (shared image)"
-$    endif
+$   endif
 $ else
-$    if (hpssl)
-$    then
+$   if (hpssl)
+$   then
 $       'vo_l' "%CURL-I-LINK_HPSSL, linking with HP SSL"
-$    else
+$   else
 $       'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support"
-$    endif
+$   endif
 $ endif
 $!
-$ link 'link_qual' /executable = 'exedir'CURL.EXE -
-   'objdir'curlsrc.olb /library /include = (main, curlmsg), -
-   'objdir'curllib.olb /library -
-   'ssl_opt' -
-   'ldap_opt'
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create 'exedir'gnv$curl.opt
+$ open/append opt 'exedir'gnv$curl.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'exedir'gnv_libcurl_linker.opt
+$ open/append opt 'exedir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! If we are not on VAX, then we want the debug symbol table in
+$! a separate file.
+$! VAX needs the tool_main unquoted in uppercase,
+$! Alpha and IA64 need tool_main quoted in exact case when parse style is
+$! extended.
+$ link_dsf1 = ""
+$ link_dsf2 = ""
+$ tool_main = "tool_main"
+$ if arch_name .nes. "VAX"
+$ then
+$   if parse_style .eqs. "EXTENDED"
+$   then
+$      tool_main = """tool_main"""
+$   endif
+$   link_dsf1 = "/dsf=" + exedir + "CURL.DSF"
+$   link_dsf2 = "/dsf=" + exedir + "CURL_DEBUG.DSF"
+$ endif
+$ if (list .eq. 0)
+$ then
+$   link_map1 = "/nomap"
+$   link_map2 = "/nomap"
+$ else
+$   link_map1 = "/map=" + exedir + "CURL.MAP"
+$   link_map2 = "/map=" + exedir + "CURL_DEBUG.MAP"
+$ endif
+$!
+$!
+$! Make a normal image.
+$ set ver
+$ link 'link_map1' 'link_dsf1' /executable = 'exedir'CURL.EXE -
+   'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+   'objdir'curllib.olb /library, -
+   'exedir'gnv$curl.opt/opt
+$!
+$! Also make a debug copy.
+$ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
+   'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+   'objdir'curllib.olb /library, -
+   'exedir'gnv$curl.opt/opt
+$ set nover
 $!
 $ goto Common_Exit
 $!
@@ -471,89 +905,92 @@ $! the directory passed in via P1 and put it in the object library named
 $! via P3.  Exclude items in P4.
 $!
 $build:   subroutine
-$    build_def = f$environment( "default")
-$    on control_y then goto EndLoop ! SS$_CONTROLY
-$    sts = 1 ! SS$_NORMAL.
-$!    set noon
-$    set default 'p1'
-$    search = p2
-$    reset = f$search("reset")
-$    if f$search( p3) .eqs. ""
-$    then
+$   build_def = f$environment("default")
+$   on control_y then goto EndLoop ! SS$_CONTROLY
+$   sts = 1 ! SS$_NORMAL.
+$!   set noon
+$   set default 'p1'
+$   search = p2
+$   reset = f$search("reset")
+$   if f$search( p3) .eqs. ""
+$   then
 $       librarian /create /object 'p3'
-$    endif
-$    reject_list__ = ","+ f$edit( p4, "COLLAPSE, UPCASE")+ ","
-$    reject_list___len = f$length( reject_list__)
-$    reset = f$search( "reset", 1)
+$   endif
+$   reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
+$   reject_list___len = f$length(reject_list__)
+$   reset = f$search( "reset", 1)
 $Loop:
-$    file = f$search( search, 1)
-$    if file .eqs. "" then goto EndLoop
-$!      Skip a name if it's in the P4 exclusion list.
-$       if (p4 .nes. "")
-$       then
-$          name__ = ","+ -
-            f$edit( f$parse( file, , , "NAME", "SYNTAX_ONLY"), "UPCASE")+ -
+$   file = f$search( search, 1)
+$   if file .eqs. "" then goto EndLoop
+$!  Skip a name if it's in the P4 exclusion list.
+$   if (p4 .nes. "")
+$   then
+$       name__ = "," + -
+            f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
             ","
-$          if (f$locate( name__, reject_list__) .lt. reject_list___len)
-$          then
-$             goto Loop
-$          endif
+$       if (f$locate(name__, reject_list__) .lt. reject_list___len)
+$       then
+$          goto Loop
 $       endif
-$       objfile = f$parse( "''objdir'.OBJ;", file)
-$       obj = f$search( objfile, 2)
-$       if (obj .nes. "")
+$   endif
+$   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
-$          if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
-$          then
-$             call compile 'file'
-$             sts = $status
-$             if .not. sts
-$             then
-$                goto EndLoop
-$             endif
-$             librarian /object 'p3' 'objfile'
-$          else
-$             'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
-$          endif
+$           call compile 'file'
+$           sts = $status
+$           if .not. sts
+$           then
+$               goto EndLoop
+$           endif
+$           librarian /object 'p3' 'objfile'
 $       else
-$          'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
-$          call compile 'file'
-$          sts = $status
-$          if .not. sts
-$          then
-$             goto EndLoop
-$          endif
-$          librarian /object 'p3' 'objfile'
+$           'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
+$       endif
+$   else
+$       'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
+$       call compile 'file'
+$       sts = $status
+$       if .not. sts
+$       then
+$           goto EndLoop
 $       endif
-$    goto Loop
+$       librarian /object 'p3' 'objfile'
+$   endif
+$   goto Loop
 $EndLoop:
 $!!!    purge
-$    set default 'build_def'
-$    exit 'sts'
+$   set default 'build_def'
+$   exit 'sts'
 $ endsubroutine   ! Build
 $!
 $! Based on the file TYPE, do the right compile command.
 $! Only C and MSG supported.
 $!
 $compile:   subroutine
-$    on control_y then return ctrl_y ! SS$_CONTROLY
-$!    set noon
-$    file = p1
-$    qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
-$    typ = f$edit( f$parse( file, , , "TYPE"), "UPCASE") - "."
-$    if (typ .eqs. "C")
-$    then
+$   on control_y then return ctrl_y ! SS$_CONTROLY
+$!   set noon
+$   file = p1
+$   qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
+$   typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
+$   if (typ .eqs. "C")
+$   then
 $       'vo_c' "CC (opts) ", file
+$       define/user curl 'curl_logical'
+$       if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
+$       define/user decc$system_include 'sys_inc'
 $       CC 'cc_defs' -
          'cc_qual1' -
          'cc_qual2' -
          'file'
-$    else
-$       cmd_msg = "MESSAGE "+ msg_qual
+$   else
+$       cmd_msg = "MESSAGE " + msg_qual
 $       x = cmd_'typ'
-$       'vo_c' x," ",file
+$       'vo_c' x, " ", file
 $       'x' 'file'
-$    endif
+$   endif
 $ ENDSUBROUTINE   ! Compile
 $!
 $! Do a diff of the file specified in P1 with that in P2.  If different
@@ -561,23 +998,19 @@ $! copy P1 to P2.  This also covers if P2 doesn't exist, but not if P2
 $! is an invalid filespec.
 $!
 $MoveIfDiff:  subroutine
-$    set NoOn
-$    define /user_mode sys$error nl:
-$    define /user_mode sys$output nl:
-$    differences 'p1' 'p2'
-$    status = $status
-$    if ( status .ne. %X006C8009) ! if status is not "no diff"
-$    then
+$   set NoOn
+$   define /user_mode sys$error nl:
+$   define /user_mode sys$output nl:
+$   differences 'p1' 'p2'
+$   status = $status
+$   if (status .ne. %X006C8009) ! if status is not "no diff"
+$   then
 $       copy 'p1' 'p2'
 $       purge /nolog 'p2'
-$    endif
-$    on control_y then return ctrl_y ! SS$_CONTROLY
+$   endif
+$   on control_y then return ctrl_y ! SS$_CONTROLY
 $ ENDSUBROUTINE   ! MoveIfDiff
 $!
 $Common_Exit:
 $ set default 'orig_def'
-$ if ((curl .eqs. "") .and. (f$trnlnm( "curl", "LNM$PROCESS") .nes. ""))
-$ then
-$    deassign curl
-$ endif
 $ exit
diff --git a/packages/vms/clean_gnv_curl.com b/packages/vms/clean_gnv_curl.com
new file mode 100644 (file)
index 0000000..0bef42c
--- /dev/null
@@ -0,0 +1,229 @@
+$! File: clean_gnv_curl.COM
+$!
+$! $Id$
+$!
+$! The GNV environment leaves behind some during the configure and build
+$! procedure that need to be cleaned up.
+$!
+$! The default is to remove all the left over stuff from running the
+$! configure script and to remove all intermediate binary files.
+$!
+$! This should be run with no parameters after the gnv_curl_configure.sh
+$! script is run.
+$!
+$! Paramter P1: REALCLEAN
+$!   This removes all build products and brings the environment back to
+$!   the point where the gnv_curl_configure.sh procedure needs to be run again.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 07-Jul-2009 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$!
+$! Move to where the base directory is.
+$ set def [--]
+$!
+$!
+$ file = "sys$login:sh*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "sys$login:make*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]confdefs.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.sym"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.conf*...]*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[]conf*.dir
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.out"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[.lib]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]ar*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lo"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.la"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lai"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h_old"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*.release_notes"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$text"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!======================================================================
+$!
+$ if p1 .nes. "REALCLEAN" then goto all_exit
+$!
+$ file = "lcl_root:[...]*.obj"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]Makefile."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]libtool."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]POTFILES."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]libcurl.pc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]curl-config."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.tests]configurehelp.pm"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]curl_config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]libcurl.vers"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]ca-bundle.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.log"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.status"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dangle"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]CXX$DEMANGLER_DB."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h2."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h3."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.spec"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv$*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv*.opt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.EPM]curl.list"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]macro32_exactcase.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]report_openssl_version.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]hp_ssl_release_info.txt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$all_exit:
+$!
+$! Put the default back.
+$!-----------------------
+$ set def 'default_dir'
+$!
+$ exit
diff --git a/packages/vms/compare_curl_source.com b/packages/vms/compare_curl_source.com
new file mode 100644 (file)
index 0000000..eeaec31
--- /dev/null
@@ -0,0 +1,371 @@
+$! Compare_curl_source.com
+$!
+$! $Id$
+$!
+$! This procedure compares the files in two directories and reports the
+$! differences.  It is customized for the vmsports repository layout.
+$!
+$! It needs to be customized to the local site directories.
+$!
+$! This is used by me for these purposes:
+$!     1. Compare the original source of a project with an existing
+$!        VMS port.
+$!     2. Compare the checked out repository of a project with the
+$!        the local working copy to make sure they are in sync.
+$!     3. Keep a copy directory up to date.  The third is needed by
+$!        me because VMS Backup can create a saveset of files from a
+$!        NFS mounted volume.
+$!
+$! First the files in the original source directory which is assumed to be
+$! under source codde control are compared with the copy directory.
+$!
+$! Then the files are are only in the copy directory are listed.
+$!
+$! The result will five diagnostics about of files:
+$!    1. Files that are not generation 1.
+$!    2. Files missing in the copy directory.
+$!    3. Files in the copy directory not in the source directory.
+$!    4. Files different from the source directory.
+$!    5. Files that VMS DIFF can not process.
+$!
+$! This needs to be run on an ODS-5 volume.
+$!
+$! If UPDATE is given as a second parameter, files missing or different in the
+$! copy directory will be updated.
+$!
+$! By default:
+$!    The directory src_root:[project_name] will be translated to something like
+$!    DISK:[dir.dir.reference.project_name] and this will be used
+$!    to calculate DISK:[dir.dir.vms_source.project_name] for the VMS specific
+$!    source directory.
+$!
+$!    The copy directory is vms_root:[project_name]
+$!    The UPDATE parameter is ignored.
+$!
+$!    This setting is used to make sure that the working vms directory
+$!    and the repository checkout directory have the same contents.
+$!
+$! If P1 is "SRCBCK" then this
+$!     The source directory tree is: src_root:[project_name]
+$!     The copy directory is src_root1:[project_name]
+$!
+$!   src_root1:[project_name] is used by me to work around that VMS backup will
+$!   not use NFS as a source directory so I need to make a copy.
+$!
+$!   This is to make sure that the backup save set for the unmodified
+$!   source is up to date.
+$!
+$!   If your repository checkout is not on an NFS mounted volume, you do not
+$!   need to use this option or have the logical name src_root1 defined.
+$!
+$! If P1 is "VMSBCK" then this changes the two directories:
+$!    The source directory is vms_root:[project_name]
+$!    The copy directory is vms_root1:[project_name]
+$!
+$!   vms_root:[project_name] is where I do the VMS specific edits.
+$!   vms_root1:[project_name] is used by me to work around that VMS backup will
+$!   not use NFS as a source directory so I need to make a copy.
+$!
+$!   This is to make sure that the backup save set for the unmodified
+$!   source is up to date.
+$!
+$! Copyright 2011, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 18-Aug-2011  J. Malmberg
+$!==========================================================================
+$!
+$! Update missing/changed files.
+$ update_file = 0
+$ if (p2 .eqs. "UPDATE")
+$ then
+$   update_file = 1
+$ endif
+$!
+$ myproc = f$environment("PROCEDURE")
+$ myprocdir = f$parse(myproc,,,"DIRECTORY") - "[" - "]" - "<" - ">"
+$ myprocdir = f$edit(myprocdir, "LOWERCASE")
+$ mydefault = f$environment("DEFAULT")
+$ mydir = f$parse(mydefault,,,"DIRECTORY")
+$ mydir = f$edit(mydir, "LOWERCASE")
+$ odelim = f$extract(0, 1, mydir)
+$ mydir = mydir - "[" - "]" - "<" - ">"
+$ mydev = f$parse(mydefault,,,"DEVICE")
+$!
+$ ref = ""
+$ if P1 .eqs. ""
+$ then
+$   ref_base_dir = myprocdir
+$   wrk_base_dir = mydir
+$   update_file = 0
+$   resultd = f$parse("src_root:",,,,"NO_CONCEAL")
+$   resultd = f$edit(resultd, "LOWERCASE")
+$   resultd = resultd - "][" - "><" - ".;" - ".."
+$   resultd_len = f$length(resultd) - 1
+$   delim = f$extract(resultd_len, 1, resultd)
+$   ref_root_base = mydir + delim
+$   resultd = resultd - ref_root_base - "reference." + "vms_source."
+$   ref = resultd + ref_base_dir
+$   wrk = "VMS_ROOT:" + odelim + wrk_base_dir
+$   resultd_len = f$length(resultd) - 1
+$   resultd = f$extract(0, resultd_len, resultd) + delim
+$   ref_root_dir = f$parse(resultd,,,"DIRECTORY")
+$   ref_root_dir = f$edit(ref_root_dir, "LOWERCASE")
+$   ref_root_dir = ref_root_dir - "[" - "]"
+$   ref_base_dir = ref_root_dir + "." + ref_base_dir
+$ endif
+$!
+$ if p1 .eqs. "SRCBCK"
+$ then
+$   ref_base_dir = "curl"
+$   wrk_base_dir = "curl"
+$   ref = "src_root:[" + ref_base_dir
+$   wrk = "src_root1:[" + wrk_base_dir
+$   if update_file
+$   then
+$       if f$search("src_root1:[000000]curl.dir") .eqs. ""
+$       then
+$           create/dir/prot=o:rwed src_root1:[curl]
+$       endif
+$   endif
+$ endif
+$!
+$!
+$ if p1 .eqs. "VMSBCK"
+$ then
+$   ref_base_dir = "curl"
+$   wrk_base_dir = "curl"
+$   ref = "vms_root:[" + ref_base_dir
+$   wrk = "vms_root1:[" + wrk_base_dir
+$   if update_file
+$   then
+$       if f$search("vms_root1:[000000]curl.dir") .eqs. ""
+$       then
+$           create/dir/prot=o:rwed vms_root1:[curl]
+$       endif
+$   endif
+$ endif
+$!
+$!
+$ if ref .eqs. ""
+$ then
+$   write sys$output "Unknown compare type specified!"
+$   exit 44
+$ endif
+$!
+$!
+$! Future - check the device types involved for the
+$! the syntax to check.
+$ ODS2_SYNTAX = 0
+$ NFS_MANGLE = 0
+$ PWRK_MANGLE = 0
+$!
+$ vax = f$getsyi("HW_MODEL") .lt. 1024
+$ if vax
+$ then
+$   ODS2_SYNTAX = 1
+$ endif
+$!
+$ report_missing = 1
+$!
+$ if .not. ODS2_SYNTAX
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$loop:
+$   ref_spec = f$search("''ref'...]*.*;",1)
+$   if ref_spec .eqs. "" then goto loop_end
+$!
+$   ref_dev = f$parse(ref_spec,,,"DEVICE")
+$   ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$   ref_dir = f$edit(ref_dir, "LOWERCASE")
+$   ref_name = f$parse(ref_spec,,,"NAME")
+$   ref_type = f$parse(ref_spec,,,"TYPE")
+$!
+$!
+$   rel_path = ref_dir - "[" - ref_base_dir
+$!  rel_path_len = f$length(rel_path) - 1
+$!  delim = f$extract(rel_path_len, 1, rel_path)
+$!  rel_path = rel_path - ".]" - ".>" - "]" - ">"
+$!  rel_path = rel_path + delim
+$!
+$   if ODS2_SYNTAX
+$   then
+$!       if rel_path .eqs. ".examples.scripts^.noah]"
+$!       then
+$!           rel_path = ".examples.scripts_noah]"
+$!       endif
+$!       if rel_path .eqs. ".examples.scripts^.v2]"
+$!       then
+$!           rel_path = ".examples.scripts_v2]"
+$!       endif
+$   endif
+$!
+$   wrk_path = wrk + rel_path
+$!
+$   ref_name_type = ref_name + ref_type
+$!
+$   if ODS2_SYNTAX
+$   then
+$   endif
+$!
+$   wrk_spec = wrk_path + ref_name_type
+$!
+$!
+$   wrk_chk = f$search(wrk_spec, 0)
+$   if wrk_chk .eqs. ""
+$   then
+$       if report_missing
+$       then
+$           write sys$output "''wrk_spec' is missing"
+$        endif
+$        if update_file
+$        then
+$            copy/log 'ref_spec' 'wrk_spec'
+$        endif
+$        goto loop
+$   endif
+$!
+$   wrk_name = f$parse(wrk_spec,,,"NAME")
+$   wrk_type = f$parse(wrk_spec,,,"TYPE")
+$   wrk_fname = wrk_name + wrk_type"
+$   ref_fname = ref_name + ref_type
+$!
+$   if ref_fname .nes. wrk_fname
+$   then
+$       write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$   endif
+$!
+$   ref_type = f$edit(ref_type, "UPCASE")
+$   if ref_type .eqs. ".DIR" then goto loop
+$!
+$   if ODS2_SYNTAX
+$   then
+$       ref_fname = f$edit(ref_fname, "LOWERCASE")
+$   endif
+$!
+$!  These files are in the wrong format for VMS diff, and we don't change them.
+$   ref_skip = 0
+$   if ref_type .eqs. ".PDF" then ref_skip = 1
+$   if ref_type .eqs. ".HTML" then ref_skip = 1
+$   if ref_type .eqs. ".HQX" then ref_skip = 1
+$   if ref_type .eqs. ".P12" then ref_skip = 1
+$   if ref_type .eqs. "."
+$   then
+$       if f$locate("test", ref_fname) .eq. 0 then ref_skip = 1
+$       if ref_fname .eqs. "configure." then ref_skip = 1
+$   endif
+$   if ref_fname .eqs. "MACINSTALL.TXT" then ref_skip = 1
+$   if ref_fname .eqs. "$macinstall.txt" then ref_skip = 1
+$   if ref_fname .eqs. "curl.mcp$5nxml$5nsit$5nhqx" then ref_skip = 1
+$   if ref_fname .eqs. "curl_GUSIConfig.cpp" then ref_skip = 1
+$   if ref_fname .eqs. "curl_$gusic$onfig.cpp" then ref_skip = 1
+$   if ref_fname .eqs. "macos_main.cpp" then ref_skip = 1
+$!
+$!
+$   if ref_skip .ne. 0
+$   then
+$      if report_missing
+$      then
+$          write sys$output "Skipping diff of ''ref_fname'"
+$      endif
+$      goto loop
+$   endif
+$!
+$!
+$   wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$   if wrk_ver .nes. ";1"
+$   then
+$       write sys$output "Version for ''wrk_spec' is not 1"
+$   endif
+$   set noon
+$   diff/out=nl: 'wrk_spec' 'ref_spec'
+$   if $severity .nes. "1"
+$   then
+$       write sys$output "''wrk_spec' is different from ''ref_spec'"
+$       if update_file
+$       then
+$           delete 'wrk_spec';*
+$           copy/log 'ref_spec' 'wrk_spec'
+$       endif
+$   endif
+$   set on
+$
+$!
+$   goto loop
+$loop_end:
+$!
+$!
+$missing_loop:
+$!  For missing loop, check the latest generation.
+$   ref_spec = f$search("''wrk'...]*.*;")
+$   if ref_spec .eqs. "" then goto missing_loop_end
+$!
+$   ref_dev = f$parse(ref_spec,,,"DEVICE")
+$   ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$   ref_dir = f$edit(ref_dir, "LOWERCASE")
+$   ref_name = f$parse(ref_spec,,,"NAME")
+$   ref_type = f$parse(ref_spec,,,"TYPE")
+$   ref_name_type = ref_name + ref_type
+$!
+$   rel_path = ref_dir - "[" - wrk_base_dir
+$!
+$!
+$   wrk_path = ref + rel_path
+$   wrk_spec = wrk_path + ref_name + ref_type
+$   wrk_name = f$parse(wrk_spec,,,"NAME")
+$   wrk_type = f$parse(wrk_spec,,,"TYPE")
+$!
+$   wrk_fname = wrk_name + wrk_type"
+$   ref_fname = ref_name + ref_type
+$!
+$   wrk_skip = 0
+$   ref_utype = f$edit(ref_type,"UPCASE")
+$   ref_ufname = f$edit(ref_fname,"UPCASE")
+$!
+$   if wrk_skip .eq. 0
+$   then
+$       wrk_chk = f$search(wrk_spec, 0)
+$       if wrk_chk .eqs. ""
+$       then
+$           if report_missing
+$           then
+$               write sys$output "''wrk_spec' is missing"
+$           endif
+$           goto missing_loop
+$       endif
+$   else
+$       goto missing_loop
+$   endif
+$!
+$   if ref_fname .nes. wrk_fname
+$   then
+$       write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$   endif
+$!
+$   if ref_utype .eqs. ".DIR" then goto missing_loop
+$!
+$   wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$   if wrk_ver .nes. ";1"
+$   then
+$      write sys$output "Version for ''wrk_spec' is not 1"
+$   endif
+$!
+$   goto missing_loop
+$!
+$!
+$missing_loop_end:
+$!
+$exit
diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com
new file mode 100644 (file)
index 0000000..6ec27ea
--- /dev/null
@@ -0,0 +1,2184 @@
+$! File: config_h.com
+$!
+$! $Id: config_h.com,v 1.1.1.1 2012/12/02 19:25:21 wb8tyw Exp $
+$!
+$! This procedure attempts to figure out how to build a config.h file
+$! for the current project.
+$!
+$! P1 specifies the config.h.in file or equivalent.  If it is not specified
+$! then this procedure will search for several common names of the file.
+$!
+$! The CONFIGURE shell script will be examined for hints and a few symbols
+$! but most of the tests will not produce valid results on OpenVMS.  Some
+$! will produce false positives and some will produce false negatives.
+$!
+$! It is easier to just read the config.h_in file and make up tests based
+$! on what is in it!
+$!
+$! This file will create an empty config_vms.h file if one does not exist.
+$! The config_vms.h is intended for manual edits to handle things that
+$! this procedure can not.
+$!
+$! The config_vms.h will be invoked by the resulting config.h file.
+$!
+$! This procedure knows about the DEC C RTL on the system it is on.
+$! Future versions may be handle the GNV, the OpenVMS porting library,
+$! and others.
+$!
+$! This procedure may not guess the options correctly for all architectures,
+$! and is a work in progress.
+$!
+$! Copyright 2011, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jan-2001 J. Malmberg     Original
+$! 29-Apr-2001 J. Malmberg     Also look for config.*in* in a [.include]
+$!                             subdirectory
+$! 30-Apr-2001 J. Malmberg     Update for SAMBA checks
+$! 09-Apr-2005 J. Malmberg     Update for RSYNC and large file.
+$! 29-Sep-2011 J. Malmberg     Update for Bash 4.2
+$! 01-Mar-2012 J. Malmberg     Warn about getcwd(0,0)
+$! 21-Dec-2012 J. Malmberg     Update for gawk
+$! 29-Dec-2012 J. Malmberg     Update for curl
+$!============================================================================
+$!
+$ss_normal = 1
+$ss_abort = 44
+$ss_control_y = 1556
+$status = ss_normal
+$on control_y then goto control_y
+$on warning then goto general_error
+$!on warning then set ver
+$!
+$! Some information for writing timestamps to created files
+$!----------------------------------------------------------
+$my_proc = f$environment("PROCEDURE")
+$my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE")
+$tab[0,8] = 9
+$datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME"))
+$username = f$edit(f$getjpi("","USERNAME"),"TRIM")
+$!
+$pid = f$getjpi("","PID")
+$tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP"
+$dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP"
+$starhfile = "SYS$SCRATCH:config_h_starlet_''pid'.TEMP"
+$configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP"
+$!
+$!  Get the system type
+$!----------------------
+$arch_type = f$getsyi("arch_type")
+$!
+$! Does config_vms.h exist?
+$!-------------------------
+$update_config_vms = 0
+$file = f$search("sys$disk:[]config_vms.h")
+$if file .nes. ""
+$then
+$   write sys$output "Found existing custom file ''file'."
+$else
+$   update_config_vms = 1
+$   write sys$output "Creating new sys$disk:[]config_vms.h for you."
+$   gosub write_config_vms
+$endif
+$!
+$!
+$! On some platforms, DCL search has problems with searching a file
+$! on a NFS mounted volume.  So copy it to sys$scratch:
+$!
+$if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$copy sys$disk:[]configure 'configure_script'
+$!
+$ssl_header_dir = "OPENSSL:"
+$if f$trnlnm("OPENSSL") .eqs. ""
+$then
+$    ssl_header_dir = "SSL$INCLUDE:"
+$endif
+$!
+$!
+$! Write out the header
+$!----------------------
+$gosub write_config_h_header
+$!
+$!
+$!
+$! config.h.in could have at least five different names depending
+$! on how it was transferred to OpenVMS
+$!------------------------------------------------------------------
+$if p1 .nes. ""
+$then
+$   cfile = p1
+$else
+$   cfile = f$search("sys$disk:[]config.h.in")
+$   if cfile .eqs. ""
+$   then
+$      cfile = f$search("sys$disk:[]config.h_in")
+$      if cfile .eqs. ""
+$      then
+$          cfile = f$search("sys$disk:[]configh.in")
+$          if cfile .eqs. ""
+$          then
+$              cfile = f$search("sys$disk:[]config__2eh.in")
+$              if cfile .eqs. ""
+$              then
+$                  cfile = f$search("sys$disk:[]config.h__2ein")
+$              endif
+$          endif
+$      endif
+$   endif
+$endif
+$if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$then
+$   cfile = f$search("PRJ_INCLUDE:config.h.in")
+$   if cfile .eqs. ""
+$   then
+$      cfile = f$search("PRJ_INCLUDE:config.h_in")
+$      if cfile .eqs. ""
+$      then
+$          cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$          if cfile .eqs. ""
+$          then
+$              cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$              if cfile .eqs. ""
+$              then
+$                  cfile = f$search("PRJ_INCLUDE:config.h__2ein")
+$              endif
+$          endif
+$      endif
+$    endif
+$endif
+$if cfile .eqs. ""
+$then
+$   write sys$output "Can not find sys$disk:config.h.in"
+$   line_out = "Looked for config.h.in, config.h_in, configh.in, "
+$   line_out = line_out + "config__2eh.in, config.h__2ein"
+$   write/symbol sys$output line_out
+$   if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$   then
+$      write sys$output "Also looked in PRJ_INCLUDE: for these files."
+$   endif
+$!
+$   write tf ""
+$   write tf -
+       "   /* Could not find sys$disk:config.h.in                           */"
+$   write tf -
+       "  /*  Looked also for config.h_in, configh.in, config__2eh.in,     */"
+$   write tf -
+       " /*   config.h__2ein                                              */"
+$   if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$   then
+$      write tf -
+       " /* Also looked in PRJ_INCLUDE: for these files.                 */"
+$   endif
+$   write tf -
+       "/*--------------------------------------------------------------*/
+$   write tf ""
+$   goto write_tail
+$endif
+$!
+$!
+$! Locate the DECC libraries in use
+$!-----------------------------------
+$decc_rtldef = f$parse("decc$rtldef","sys$library:.tlb;0")
+$decc_starletdef = f$parse("sys$starlet_c","sys$library:.tlb;0")
+$decc_shr = f$parse("decc$shr","sys$share:.exe;0")
+$!
+$! Dump the DECC header names into a file
+$!----------------------------------------
+$if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_rtldef'
+$open/read/error=rtldef_loop1_end tf1 'tfile1'
+$open/write/error=rtldef_loop1_end tf2 'dchfile'
+$rtldef_loop1:
+$   read/end=rtldef_loop1_end tf1 line_in
+$   line_in = f$edit(line_in,"TRIM,COMPRESS")
+$   key1 = f$element(0," ",line_in)
+$   key2 = f$element(1," ",line_in)
+$   if key1 .eqs. " " .or. key1 .eqs. "" then goto rtldef_loop1
+$   if key2 .nes. " " .and. key2 .nes. "" then goto rtldef_loop1
+$   write tf2 "|",key1,"|"
+$   goto rtldef_loop1
+$rtldef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$! Dump the STARLET header names into a file
+$!----------------------------------------
+$if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_starletdef'
+$open/read/error=stardef_loop1_end tf1 'tfile1'
+$open/write/error=stardef_loop1_end tf2 'starhfile'
+$stardef_loop1:
+$   read/end=stardef_loop1_end tf1 line_in
+$   line_in = f$edit(line_in,"TRIM,COMPRESS")
+$   key1 = f$element(0," ",line_in)
+$   key2 = f$element(1," ",line_in)
+$   if key1 .eqs. " " .or. key1 .eqs. "" then goto stardef_loop1
+$   if key2 .nes. " " .and. key2 .nes. "" then goto stardef_loop1
+$   write tf2 "|",key1,"|"
+$   goto stardef_loop1
+$stardef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$!
+$! Now calculate what should be in the file from reading
+$! config.h.in and CONFIGURE.
+$!---------------------------------------------------------------
+$open/read inf 'cfile'
+$do_comment = 0
+$if_block = 0
+$cfgh_in_loop1:
+$!set nover
+$   read/end=cfgh_in_loop1_end inf line_in
+$   xline = f$edit(line_in,"TRIM,COMPRESS")
+$!
+$!  Blank line handling
+$!---------------------
+$   if xline .eqs. ""
+$   then
+$      write tf ""
+$      goto cfgh_in_loop1
+$   endif
+$   xlen = f$length(xline)
+$   key = f$extract(0,2,xline)
+$!
+$!  deal with comments by copying exactly
+$!-----------------------------------------
+$   if (do_comment .eq. 1) .or. (key .eqs. "/*")
+$   then
+$      do_comment = 1
+$      write tf line_in
+$      key = f$extract(xlen - 2, 2, xline)
+$      if key .eqs. "*/" then do_comment = 0
+$      goto cfgh_in_loop1
+$   endif
+$!
+$!  Some quick parsing
+$!----------------------
+$   keyif = f$extract(0,3,xline)
+$   key1 = f$element(0," ",xline)
+$   key2 = f$element(1," ",xline)
+$   key2a = f$element(0,"_",key2)
+$   key2b = f$element(1,"_",key2)
+$   key2_len = f$length(key2)
+$   key2_h = f$extract(key2_len - 2, 2, key2)
+$   key2_t = f$extract(key2_len - 5, 5, key2)
+$   if key2_t .eqs. "_TYPE" then key2_h = "_T"
+$   key64 = 0
+$   if f$locate("64", xline) .lt. xlen then key64 = 1
+$!
+$!write sys$output "xline = ''xline'"
+$!
+$!  Comment out this section of the ifblock
+$!-----------------------------------------
+$   if if_block .ge. 3
+$   then
+$      write tf "/* ", xline, " */"
+$      if keyif .eqs. "#en" then if_block = 0
+$      goto cfgh_in_loop1
+$   endif
+$!
+$!  Handle the end of an ifblock
+$!-------------------------------
+$   if keyif .eqs. "#en"
+$   then
+$      write tf xline
+$      if_block = 0
+$      goto cfgh_in_loop1
+$   endif
+$!
+$   if key1 .eqs. "#ifndef"
+$   then
+$!     Manual check for _ALL_SOURCE on AIX error
+$!-----------------------------------------------
+$      if key2 .eqs. "_ALL_SOURCE"
+$      then
+$         write tf "/* ", xline, " */"
+$!
+$!        Ignore the rest of the block
+$!--------------------------------------
+$         if_block = 3
+$         goto cfgh_in_loop1
+$      endif
+$   endif
+$!
+$!
+$!  Default action for an #if/#else/#endif
+$!------------------------------------------
+$   if keyif .eqs. "#if" .or. keyif .eqs. "#el"
+$   then
+$      if_block = 1
+$      write tf xline
+$      goto cfgh_in_loop1
+$   endif
+$!
+$!
+$!  Process "normal?" stuff
+$!---------------------------
+$   if key1 .eqs. "#undef"
+$   then
+$      key2c = f$element(2, "_", key2)
+$      if (key2c .eqs. "_") .or. (key2c .eqs. "H") then key2c = ""
+$      key2d = f$element(3, "_", key2)
+$      if (key2d .eqs. "_") .or. (key2d .eqs. "H") then key2d = ""
+$      key2e = f$element(4, "_", key2)
+$      if (key2e .eqs. "_") .or. (key2e .eqs. "H") then key2e = ""
+$      if key2d .eqs. "T"
+$      then
+$          if key2e .eqs. "TYPE"
+$          then
+$              key2_h = "_T"
+$              key2d = ""
+$          endif
+$      endif
+$!
+$      double_under = 0
+$!
+$!     Process FCNTL directives
+$!-------------------------------------
+$      if (key2b .eqs. "FCNTL") .and. (key2c .eqs. "O") .and. -
+          (key2d .eqs. "NONBLOCK")
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process GETADDRINFO directives
+$!-------------------------------------
+$      if key2 .eqs. "GETADDRINFO_THREADSAFE"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process IOCTL directives
+$!-------------------------------------
+$      if (key2b .eqs. "IOCTL") .and. (key2c .nes. "")
+$      then
+$          if (key2c .eqs. "FIONBIO") .or. (key2c .eqs. "SIOCGIFADDR")
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' 1"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!
+$!     Manual check for LL on
+$!-----------------------------------------------
+$      if key2 .eqs. "LL"
+$      then
+$         write tf "#ifndef __VAX
+$         write tf "#define HAVE_''key2' 1"
+$         write tf "#endif"
+$         goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "bool_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' short"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "bits16_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' short"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "u_bits16_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' unsigned short"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "bits32_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' int"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "u_bits32_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' unsigned int"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "intmax_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#ifdef __VAX"
+$          write tf "#define ''key2' long"
+$          write tf "#else"
+$          write tf "#define ''key2' long long"
+$          write tf "#endif"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "uintmax_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#ifdef __VAX"
+$          write tf "#define ''key2' unsigned long"
+$          write tf "#else"
+$          write tf "#define ''key2' unsigned long long"
+$          write tf "#endif"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "socklen_t"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' int"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "GETGROUPS_T"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' gid_t"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_SYS_SIGLIST"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_SYS_ERRLIST"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_STRUCT_DIRENT_D_INO"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_STRUCT_TIMEVAL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     ! The header files have this information, however
+$!      ! The ioctl() call only works on sockets.
+$!     if key2 .eqs. "FIONREAD_IN_SYS_IOCTL"
+$!     then
+$!         write tf "#ifndef ''key2'"
+$!         write tf "#define ''key2' 1"
+$!         write tf "#endif"
+$!         goto cfgh_in_loop1
+$!     endif
+$!
+$!     ! The header files have this information, however
+$!      ! The ioctl() call only works on sockets.
+$!     if key2 .eqs. "GWINSZ_IN_SYS_IOCTL"
+$!     then
+$!         write tf "#ifndef ''key2'"
+$!         write tf "#define ''key2' 1"
+$!         write tf "#endif"
+$!         goto cfgh_in_loop1
+$!     endif
+$!
+$!     ! The header files have this information, however
+$!      ! The ioctl() call only works on sockets.
+$!     if key2 .eqs. "STRUCT_WINSIZE_IN_SYS_IOCTL"
+$!     then
+$!         write tf "#ifndef ''key2'"
+$!         write tf "#define ''key2' 0"
+$!         write tf "#endif"
+$!         goto cfgh_in_loop1
+$!     endif
+$!
+$      if key2 .eqs. "HAVE_STRUCT_TM_TM_ZONE"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_TM_ZONE"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_TIMEVAL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "WEXITSTATUS_OFFSET"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 2"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_GETPW_DECLS"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_CONFSTR"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_PRINTF"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_SBRK"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRSIGNAL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2a .eqs. "HAVE_DECL_STRTOLD"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOIMAX"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOLL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOUL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOULL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_STRTOUMAX"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "GETPGRP_VOID"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "NAMED_PIPES_MISSING"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "OPENDIR_NOT_ROBUST"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "PGRP_PIPE"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "CAN_REDEFINE_GETENV"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_PRINTF_A_FORMAT"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "CTYPE_NON_ASCII"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_LANGINFO_CODESET"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 0"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!      This wants execve() to do this automagically to pass.
+$!     if key2 .eqs. "HAVE_HASH_BANG_EXEC"
+$!     then
+$!         write tf "#ifndef ''key2'"
+$!         write tf "#define ''key2' 1"
+$!         write tf "#endif"
+$!         goto cfgh_in_loop1
+$!     endif
+$!
+$      if key2 .eqs. "ICONV_CONST"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2'"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "VOID_SIGHANDLER"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_POSIX_SIGNALS"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "UNUSABLE_RT_SIGNALS"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2a .eqs. "HAVE_DECL_FPURGE"
+$      then
+$          write tf "#ifndef ''key2a'"
+$          write tf "#define ''key2a' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_DECL_SETREGID"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_POSIX_SIGSETJMP"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_LIBDL"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_ENGINE_LOAD_BUILTIN_ENGINES"
+$      then
+$          if f$search("''ssl_header_dir'engine.h") .nes. ""
+$          then
+$              search_key = key2 - "HAVE_"
+$              define/user sys$output nl:
+$              define/user sys$error nl:
+$              search/output=nl: 'ssl_header_dir'engine.h 'search_key'
+$              if '$severity' .eq. 1
+$              then
+$                  write tf "#ifndef ''key2'"
+$                  write tf "#define ''key2' 1"
+$                  write tf "#endif"
+$              else
+$                  write tf "/* #undef ''key2' */"
+$              endif
+$          else
+$              write tf "/* #undef ''key2' */"
+$          endif
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "HAVE_SSL_GET_SHUTDOWN"
+$      then
+$          if f$search("''ssl_header_dir'ssl.h") .nes. ""
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' 1"
+$              write tf "#endif"
+$          else
+$              write tf "/* #undef ''key2' */"
+$          endif
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. ""
+$      then
+$          if (key2c .eqs. "EGD") .or. -
+              (key2c .eqs. "STATUS") .or. -
+              (key2c .eqs. "SCREEN")
+$          then
+$              if f$search("''ssl_header_dir'rand.h") .nes. ""
+$              then
+$                  write tf "#ifndef ''key2'"
+$                  write tf "#define ''key2' 1"
+$                  write tf "#endif"
+$              else
+$                  write tf "/* #undef ''key2' */"
+$              endif
+$          endif
+$      endif
+$!
+$      if key2 .eqs. "STRCOLL_BROKEN"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if key2 .eqs. "DUP_BROKEN"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#define ''key2' 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     This is for a test that getcwd(0,0) works.
+$!     It does not on VMS.
+$!--------------------------
+$      if key2 .eqs. "GETCWD_BROKEN"
+$      then
+$          write sys$output ""
+$          write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being tested for!"
+$                 write sys$output -
+ "-CONFIG_H-I-GETCWD, GETCWD(0,0) does not work on VMS."
+$                 write sys$output -
+ "-CONFIG_H-I-GETCWD2, Work around hack probably required."
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$                  if update_config_vms
+$                  then
+$                      open/append tfcv sys$disk:[]config_vms.h
+$                      write tfcv ""
+$                      write tfcv -
+               "/* Check config.h for use of ''key2' settings */"
+$                      write tfcv ""
+$                      close tfcv
+$                  endif
+$
+$          goto cfgh_in_loop1
+$      endif
+$!
+$      if (key2a .eqs. "HAVE") .or. (key2a .eqs. "STAT") .or. -
+          (key2 .eqs. "ENABLE_IPV6") .or. (key2b .eqs. "LDAP")
+$      then
+$!
+$!         Process extra underscores
+$!------------------------------------
+$          if f$locate("HAVE___", key2) .lt. key2_len
+$          then
+$              key2b = "__" + key2d
+$              key2d = ""
+$              double_under = 1
+$          else
+$              if f$locate("HAVE__", key2) .lt. key2_len
+$              then
+$                  key2b = "_" + key2c
+$                  key2c = ""
+$                  double_under = 1
+$              endif
+$          endif
+$!
+$          if (key2_h .eqs. "_H") .or. (key2 .eqs. "ENABLE_IPV6") .or. -
+              (key2b .eqs. "LDAP")
+$          then
+$!
+$!             Looking for a header file
+$!---------------------------------------
+$              headf = key2b
+$              if key2c .nes. "" then headf = headf + "_" + key2c
+$              if key2d .nes. "" then headf = headf + "_" + key2d
+$!
+$!                (key2b .eqs. "READLINE")
+$!
+$!             Some special parsing
+$!------------------------------------------
+$              if (key2b .eqs. "SYS") .or. (key2b .eqs. "ARPA") .or. -
+                  (key2b .eqs. "NET") .or. (key2b .eqs. "NETINET")
+$              then
+$                  if key2c .nes. ""
+$                  then
+$                      headf = key2c
+$                      if key2d .nes. "" then headf = key2c + "_" + key2d
+$                  endif
+$              endif
+$!
+$!             And of course what's life with out some special cases
+$!--------------------------------------------------------------------
+$              if key2 .eqs. "ENABLE_IPV6"
+$              then
+$                  headf = "in6"
+$              endif
+$!
+$              if key2b .eqs. "LDAP"
+$              then
+$                  if (key2 .eqs. "HAVE_LDAP_SSL") .or. -
+                      (key2 .eqs. "HAVE_LDAP_URL_PARSE")
+$                  then
+$                      headf = "ldap"
+$                  endif
+$              endif
+$!
+$!
+$              if key2b .eqs. "FILE"
+$              then
+$                 write sys$output ""
+$                 write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$                 write sys$output -
+ "-CONFIG_H-I-FILE_OLD, file.h will not be configured as is obsolete!"
+$                 write sys$output -
+ "-CONFIG_H_I-FCNTL_NEW, "Expecting fcntl.h to be configured instead!"
+$                 write sys$output -
+ "-CONFIG_H_I-FCNTL_CHK, "Unable to verify at this time!"
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$!
+$                  if update_config_vms
+$                  then
+$                      open/append tfcv sys$disk:[]config_vms.h
+$                      write tfcv ""
+$                      write tfcv -
+               "/* Check config.h for use of fcntl.h instead of file.h */"
+$                      write tfcv ""
+$                      close tfcv
+$                  endif
+$              endif
+$!
+$!             Now look it up in the DEC C RTL
+$!---------------------------------------------
+$              define/user sys$output nl:
+$              define/user sys$error nl:
+$              search/output=nl: 'dchfile' |'headf'|/exact
+$              if '$severity' .eq. 1
+$              then
+$                  if key64 then write tf "#ifndef __VAX"
+$                  write tf "#ifndef ''key2'"
+$                  write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''dchfile' - #define ''key2' 1"
+$                  write tf "#endif"
+$                  if key64 then write tf "#endif"
+$set nover
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!
+$!             Now look it up in the DEC C STARLET_C
+$!---------------------------------------------
+$              define/user sys$output nl:
+$              define/user sys$error nl:
+$              search/output=nl: 'starhfile' |'headf'|/exact
+$              if '$severity' .eq. 1
+$              then
+$                  if key64 then write tf "#ifndef __VAX"
+$                  write tf "#ifndef ''key2'"
+$                  write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''starfile' - #define ''key2' 1"
+$                  write tf "#endif"
+$                  if key64 then write tf "#endif"
+$set nover
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             Now look for OPENSSL headers
+$!---------------------------------------------------------
+$              if key2b .eqs. "OPENSSL"
+$              then
+$                  headf = headf - "OPENSSL_"
+$                  header = f$search("''ssl_header_dir'''headf'.h")
+$                  if header .nes. ""
+$                  then
+$                      write tf "#ifndef ''key2'"
+$                      write tf "#define ''key2' 1"
+$                      write tf "#endif"
+$set nover
+$                      goto cfgh_in_loop1
+$                  endif
+$              endif
+$!
+$!             Now look for Kerberos
+$!------------------------------------------------------------
+$              if key2b .eqs. "GSSAPI"
+$              then
+$                  header_dir = "sys$sysroot:[kerberos.include]"
+$                  headf = headf - "GSSAPI_"
+$                  header = f$search("''header_dir'''headf'.h")
+$                  if header .nes. ""
+$                  then
+$                      write tf "#ifndef ''key2'"
+$                      write tf "#define ''key2' 1"
+$                      write tf "#endif"
+$set nover
+$                      goto cfgh_in_loop1
+$                  endif
+$              endif
+$!
+$set nover
+$          else
+$!
+$!             Looking for a routine or a symbol
+$!------------------------------------------------
+$              if key2c .eqs. "MACRO"
+$              then
+$                  if (key2b .eqs. "FILE") .or. (key2b .eqs. "DATE") -
+                       .or. (key2b .eqs. "LINE") .or. (key2b .eqs. "TIME")
+$                  then
+$                      write tf "#ifndef HAVE_''key2b'"
+$                      write tf "#define HAVE_''key2b' 1"
+$                      write tf "#endif"
+$                  endif
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             Special false tests
+$!-------------------------------------
+$              if double_under
+$              then
+$                  if key2b .eqs. "_FCNTL" .or. key2b .eqs. "__FCNTL"
+$                  then
+$                      write tf "/* #undef HAVE_''key2b' */"
+$                      goto cfgh_in_loop1
+$                  endif
+$!
+$                  if key2b .eqs. "_STAT" .or. key2b .eqs. "__STAT"
+$                  then
+$                      write tf "/* #undef HAVE_''key2b' */"
+$                      goto cfgh_in_loop1
+$                  endif
+$!
+$                  if key2b .eqs. "_READ" .or. key2b .eqs. "__READ"
+$                  then
+$                      write tf "/* #undef HAVE_''key2b' */"
+$                      goto cfgh_in_loop1
+$                  endif
+$              endif
+$!
+$              keysym = key2b
+$              if key2c .nes. "" then keysym = keysym + "_" + key2c
+$              if key2d .nes. "" then keysym = keysym + "_" + key2d
+$              if key2e .nes. "" then keysym = keysym + "_" + key2e
+$!
+$!
+$!             Stat structure members
+$!-------------------------------------
+$              if key2b .eqs. "STRUCT"
+$              then
+$                  if key2c .eqs. "STAT" .and (key2d .nes. "")
+$                  then
+$                      key2b = key2b + "_" + key2c + "_" + key2d
+$                      key2c = key2e
+$                      key2d = ""
+$                      key2e = ""
+$                  endif
+$              endif
+$              if (key2b .eqs. "ST") .or. (key2b .eqs. "STRUCT_STAT_ST")
+$              then
+$                  keysym = "ST" + "_" + key2c
+$                  keysym = f$edit(keysym,"LOWERCASE")
+$              endif
+$              if key2a .eqs. "STAT"
+$              then
+$                  if (f$locate("STATVFS", key2b) .eq. 0) .and. key2c .eqs. ""
+$                  then
+$                      keysym = f$edit(key2b, "LOWERCASE")
+$                  endif
+$!$                if (key2b .eqs. "STATVFS" .or. key2b .eqs. "STATFS2" -
+$!                     .or. key2b .eqs. "STATFS3") .and. key2c .nes. ""
+$!
+$                  if (key2b .eqs. "STATVFS") .and. key2c .nes. ""
+$                  then
+$!                     Should really verify that the structure
+$!                     named by key2b actually exists first.
+$!------------------------------------------------------------
+$!
+$!                     Statvfs structure members
+$!-------------------------------------------------
+$                      keysym = "f_" + f$edit(key2c,"LOWERCASE")
+$                  endif
+$              endif
+$!
+$!             UTMPX structure members
+$!--------------------------------------
+$              if key2b .eqs. "UT" .and. key2c .eqs. "UT"
+$              then
+$                  keysym = "ut_" + f$edit(key2d,"LOWERCASE")
+$              endif
+$!
+$              if f$locate("MMAP",key2) .lt. key2_len
+$              then
+$                 write sys$output ""
+$                 write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$                 write sys$output -
+ "-CONFIG_H-I-MMAP, MMAP operations only work on STREAM and BINARY files!"
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$                  if update_config_vms
+$                  then
+$                      open/append tfcv sys$disk:[]config_vms.h
+$                      write tfcv ""
+$                      write tfcv -
+               "/* Check config.h for use of ''key2' settings */"
+$                      write tfcv ""
+$                      close tfcv
+$                  endif
+$              endif
+$!
+$!
+$              if keysym .eqs. "CRYPT"
+$              then
+$                 write sys$output ""
+$                 write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$                 write sys$output -
+ "-CONFIG_H-I-CRYPT, CRYPT operations on the VMS SYSUAF may not work!"
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$                  if update_config_vms
+$                  then
+$                      open/append tfcv sys$disk:[]config_vms.h
+$                      write tfcv ""
+$                      write tfcv -
+               "/* Check config.h for use of ''keysym' */"
+$                      write tfcv ""
+$                      close tfcv
+$                  endif
+$              endif
+$!
+$!
+$              if keysym .eqs. "EXECL"
+$              then
+$                 write sys$output ""
+$                 write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$                 write sys$output -
+ "-CONFIG_H-I-EXCEL, EXECL configured, Will probably not work."
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$                  if update_config_vms
+$                  then
+$                      open/append tfcv sys$disk:[]config_vms.h
+$                      write tfcv ""
+$                      write tfcv -
+               "/* Check config.h for use of ''keysym' */"
+$                      write tfcv ""
+$                      close tfcv
+$                  endif
+$              endif
+$!
+$!
+$!             Process if cpp supports ANSI-C stringizing '#' operator
+$!-----------------------------------------------------------------------
+$              if keysym .eqs. "STRINGIZE"
+$              then
+$                  write tf "#ifndef HAVE_STRINGIZE"
+$                  write tf "#define HAVE_STRINGSIZE 1"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "VOLATILE"
+$              then
+$                  write tf "#ifndef HAVE_VOLATILE"
+$                  write tf "#define HAVE_VOLATILE 1"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "ALLOCA"
+$              then
+$                  write tf "#ifndef HAVE_ALLOCA"
+$                  write tf "#define HAVE_ALLOCA 1"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "ERRNO_DECL"
+$              then
+$                  write tf "#ifndef HAVE_ERRNO_DECL"
+$                  write tf "#define HAVE_ERRNO_DECL 1"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "LONGLONG"
+$              then
+$                  write tf "#ifndef __VAX"
+$                  write tf "#pragma message disable longlongtype"
+$                  write tf "#ifndef HAVE_LONGLONG"
+$                  write tf "#define HAVE_LONGLONG 1"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             May need to test compiler version
+$!-----------------------------------------------
+$              if keysym .eqs. "LONG_LONG"
+$              then
+$                  write tf "#ifndef __VAX"
+$                  write tf "#pragma message disable longlongtype"
+$                  write tf "#ifndef HAVE_LONG_LONG"
+$                  write tf "#define HAVE_LONG_LONG 1"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             May need to test compiler version
+$!-----------------------------------------------
+$              if keysym .eqs. "UNSIGNED_LONG_LONG"
+$              then
+$                  write tf "#ifndef __VAX"
+$                  write tf "#pragma message disable longlongtype"
+$                  write tf "#ifndef HAVE_UNSIGNED_LONG_LONG"
+$                  write tf "#define HAVE_UNSIGNED_LONG_LONG 1"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             May need to test compiler version
+$!-----------------------------------------------
+$              if keysym .eqs. "UNSIGNED_LONG_LONG_INT"
+$              then
+$                  write tf "#ifndef __VAX"
+$                  write tf "#pragma message disable longlongtype"
+$                  write tf "#ifndef HAVE_UNSIGNED_LONG_LONG_INT"
+$                  write tf "#define HAVE_UNSIGNED_LONG_LONG_INT 1"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             May need to test compiler version
+$!-----------------------------------------------
+$              if keysym .eqs. "LONG_DOUBLE"
+$              then
+$                  write tf "#ifndef __VAX"
+$                  write tf "#pragma message disable longlongtype"
+$                  write tf "#ifndef HAVE_LONG_DOUBLE"
+$                  write tf "#define HAVE_LONG_DOUBLE 1"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "FCNTL_LOCK"
+$              then
+$                  write sys$output -
+  "%CONFIG_H-I-NONPORT, ''key2' being asked for!
+$                 write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!
+$!             These libraries are provided by the DEC C RTL
+$!-------------------------------------------------------------
+$              if keysym .eqs. "LIBINET" .or. keysym .eqs. "LIBSOCKET"
+$              then
+$                  write tf "#ifndef HAVE_''keysym'"
+$                  write tf "#define HAVE_''keysym' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''keysym' 1"
+$                  write tf "#endif
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$              if keysym .eqs. "HERRNO" then keysym = "h_errno"
+$              if keysym .eqs. "UTIMBUF" then keysym = "utimbuf"
+$              if key2c .eqs. "STRUCT"
+$              then
+$                  keysym = f$edit(key2d,"LOWERCASE")
+$              else
+$                  if key2_h .eqs. "_T"
+$                  then
+$                      if key2_t .eqs. "_TYPE"
+$                      then
+$                          keysym = f$extract(0, key2_len - 5, key2) - "HAVE_"
+$                      endif
+$                      keysym = f$edit(keysym,"LOWERCASE")
+$                  endif
+$              endif
+$!
+$!             Check the DEC C RTL shared image first
+$!------------------------------------------------------
+$              if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$              define/user sys$output nl:
+$              define/user sys$error nl:
+$              search/format=nonull/out='tfile1' 'decc_shr' 'keysym'
+$              if '$severity' .eq. 1
+$              then
+$!
+$!                 Not documented, but from observation
+$!------------------------------------------------------
+$                  define/user sys$output nl:
+$                  define/user sys$error nl:
+$                  if arch_type .eq. 3
+$                  then
+$                      keyterm = "''keysym'<SOH>"
+$                  else
+$                      if arch_type .eq. 2
+$                      then
+$                          keyterm = "''keysym'<BS>"
+$                      else
+$                          keyterm = "''keysym'<STX>"
+$                      endif
+$                  endif
+$                  search/out=nl: 'tfile1' -
+   "$''keyterm'","$g''keyterm'","$__utc_''keyterm'",-
+   "$__utctz_''keyterm'","$__bsd44_''keyterm'","$bsd_''keyterm'",-
+   "$''keysym'decc$","$G''keysym'decc$","$GX''keyterm'"
+$                  severity = '$severity'
+$!
+$!
+$!                 Of course the 64 bit stuff is different
+$!---------------------------------------------------------
+$                  if severity .ne. 1 .and. key64
+$                  then
+$                      define/user sys$output nl:
+$                      define/user sys$error nl:
+$                      search/out=nl: 'tfile1' "$_''keyterm'"
+$!                     search/out 'tfile1' "$_''keyterm'"
+$                      severity = '$severity'
+$                  endif
+$!
+$!                 UNIX compatability routines
+$!---------------------------------------------
+$                  if severity .ne. 1
+$                  then
+$                      define/user sys$output nl:
+$                      define/user sys$error nl:
+$                      search/out=nl: 'tfile1' -
+    "$__unix_''keyterm'","$__vms_''keyterm'","$_posix_''keyterm'"
+$                      severity = '$severity'
+$                  endif
+$!
+$!                 Show the result of the search
+$!------------------------------------------------
+$                  if 'severity' .eq. 1
+$                  then
+$                      if key64 then write tf "#ifndef __VAX"
+$                      write tf "#ifndef ''key2'"
+$                      write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''key2' 1"
+$                      write tf "#endif"
+$                      if key64 then write tf "#endif"
+$                      goto cfgh_in_loop1
+$                  endif
+$              endif
+$              if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$!             Check the DECC Header files next
+$!----------------------------------------------
+$              define/user sys$output nl:
+$              define/user sys$error nl:
+$              search/out=nl: 'decc_rtldef' -
+                   "''keysym';", "''keysym'[", "struct ''keysym'"/exact
+$              severity = '$severity'
+$              if severity .eq. 1
+$              then
+$                  if key64 then write tf "#ifndef __VAX"
+$                  write tf "#ifndef ''key2'"
+$                  write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_rtldef' #define ''key2' 1"
+$                  write tf "#endif"
+$                  if key64 then write tf "#endif"
+$                  goto cfgh_in_loop1
+$              endif
+$!
+$!             Check kerberos
+$!--------------------------------------------
+$              if f$search("SYS$SYSROOT:[kerberos]include.dir") .nes. ""
+$              then
+$                  test_mit = "SYS$SYSROOT:[kerberos.include]gssapi_krb5.h"
+$                  if (key2 .eqs. "HAVE_GSSAPI")
+$                  then
+$                      write tf "#ifndef ''key2'"
+$                      write tf "#define ''key2' 1"
+$                      write tf "#endif"
+$                      goto cfgh_in_loop1
+$                  endif
+$!
+$!                 This is really do we have the newer MIT Kerberos
+$!----------------------------------------------------------------------
+$                  if (key2 .eqs. "HAVE_GSSMIT")
+$                  then
+$                      if f$search(test_mit) .nes. ""
+$                      then
+$                          write tf "#ifndef ''key2'"
+$                          write tf "#define ''key2' 1"
+$                      else
+$                          write tf "#ifdef ''key2'"
+$                          write tf "#undef ''key2'"
+$                      endif
+$                      write tf "#endif"
+$                      goto cfgh_in_loop1
+$                  endif
+$!
+$!                 Older MIT looks like Heimdal
+$!------------------------------------------------
+$                  if (key2 .eqs. "HAVE_HEIMDAL")
+$                  then
+$                      if f$search(test_mit) .eqs. ""
+$                      then
+$                          write tf "#ifndef ''key2'"
+$                          write tf "#define ''key2' 1"
+$                      else
+$                          write tf "#ifdef ''key2'"
+$                          write tf "#undef ''key2'"
+$                      endif
+$                      write tf "#endif"
+$                      goto cfgh_in_loop1
+$                  endif
+$              endif
+$!
+$          endif
+$          write tf "/* ", xline, " */"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!
+$!     Process SIZEOF directives found in SAMBA and others
+$!----------------------------------------------------------
+$      if key2a .eqs. "SIZEOF"
+$      then
+$          if key2b .eqs. "INO" .and. key2_h .eqs. "_T"
+$          then
+$              write tf "#ifndef SIZEOF_INO_T"
+$              write tf "#if !__USING_STD_STAT
+$              write tf "#define SIZEOF_INO_T 6"
+$              write tf "#else
+$              write tf "#define SIZEOF_INO_T 8"
+$              write tf "#endif
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "INTMAX" .and. key2_h .eqs. "_T"
+$          then
+$              write tf "#ifndef SIZEOF_INTMAX_T"
+$              write tf "#ifdef __VAX"
+$              write tf "#define SIZEOF_INTMAX_T 4"
+$              write tf "#else"
+$              write tf "#define SIZEOF_INTMAX_T 8"
+$              write tf "#endif"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "OFF" .and. key2_h .eqs. "_T"
+$          then
+$              write tf "#ifndef SIZEOF_OFF_T"
+$              write tf "#if __USE_OFF64_T"
+$              write tf "#define SIZEOF_OFF_T 8"
+$              write tf "#else"
+$              write tf "#define SIZEOF_OFF_T 4"
+$              write tf "#endif"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "CHAR" .and. key2_h .eqs. "_P"
+$          then
+$              write tf "#ifndef SIZEOF_CHAR_P"
+$              write tf "#if __INITIAL_POINTER_SIZE == 64"
+$              write tf "#define SIZEOF_CHAR_P 8"
+$              write tf "#else"
+$              write tf "#define SIZEOF_CHAR_P 4"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "VOIDP"
+$          then
+$              write tf "#ifndef SIZEOF_VOIDP"
+$              write tf "#if __INITIAL_POINTER_SIZE == 64"
+$              write tf "#define SIZEOF_VOIDP 8"
+$              write tf "#else"
+$              write tf "#define SIZEOF_VOIDP 4"
+$              write tf "#endif"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "INT"
+$          then
+$              write tf "#ifndef SIZEOF_INT"
+$              write tf "#define SIZEOF_INT 4"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "SIZE" .and. key2_h .eqs. "_T"
+$          then
+$              write tf "#ifndef SIZEOF_SIZE_T"
+$              write tf "#define SIZEOF_SIZE_T 4"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "TIME" .and. key2_h .eqs. "_T"
+$          then
+$              write tf "#ifndef SIZEOF_TIME_T"
+$              write tf "#define SIZEOF_TIME_T 4"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "DOUBLE"
+$          then
+$              write tf "#ifndef SIZEOF_DOUBLE"
+$              write tf "#define SIZEOF_DOUBLE 8"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "LONG"
+$          then
+$              if key2c .eqs. ""
+$              then
+$                  write tf "#ifndef SIZEOF_LONG"
+$                  write tf "#define SIZEOF_LONG 4"
+$                  write tf "#endif"
+$              else
+$                  write tf "#ifndef SIZEOF_LONG_LONG"
+$                  write tf "#ifndef __VAX"
+$                  write tf "#define SIZEOF_LONG_LONG 8"
+$                  write tf "#endif"
+$                  write tf "#endif"
+$              endif
+$              goto cfgh_in_loop1
+$          endif
+$          if key2b .eqs. "SHORT"
+$          then
+$              write tf "#ifndef SIZEOF_SHORT"
+$              write tf "#define SIZEOF_SHORT 2"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          write tf "/* ", xline, " */"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process NEED directives
+$!-------------------------------
+$      if key2a .eqs. "NEED"
+$      then
+$          if key2b .eqs. "STRINGS" .and. key2_h .eqs. "_H"
+$          then
+$              write tf "#ifndef NEED_STRINGS_H"
+$              write tf "#define NEED_STRINGS_H 1"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          write tf "/* ", xline, " */"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process GETHOSTNAME directives
+$!-------------------------------------
+$      if key2 .eqs. "GETHOSTNAME_TYPE_ARG2"
+$      then
+$          write tf "#ifndef ''key2'"
+$          write tf "#ifdef _DECC_V4_SOURCE"
+$          write tf "#define ''key2' int"
+$          write tf "#else"
+$          write tf "#define ''key2' size_t"
+$          write tf "#endif"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process GETNAMEINFO directives
+$!-------------------------------------
+$      if key2a .eqs. "GETNAMEINFO"
+$      then
+$          if key2 .eqs. "GETNAMEINFO_QUAL_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' const"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "GETNAMEINFO_TYPE_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' struct sockaddr *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "GETNAMEINFO_TYPE_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' size_t"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "GETNAMEINFO_TYPE_ARG46"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' size_t"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "GETNAMEINFO_TYPE_ARG7"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!     Process RECV directives
+$!-------------------------------------
+$      if key2a .eqs. "RECV"
+$      then
+$          if key2 .eqs. "RECV_TYPE_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECV_TYPE_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' void *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECV_TYPE_ARG3"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' size_t"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECV_TYPE_ARG4"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECV_TYPE_RETV"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!
+$!     Process RECVFROM directives
+$!-------------------------------------
+$      if key2a .eqs. "RECVFROM"
+$      then
+$          if key2 .eqs. "RECVFROM_QUAL_ARG5"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2'"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' void *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG3"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' size_t"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG4"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG5"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' struct sockaddr"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_ARG6"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' unsigned int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "RECVFROM_TYPE_RETV"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!     Process SELECT directives
+$!-------------------------------------
+$      if key2a .eqs. "SELECT"
+$      then
+$          if key2 .eqs. "SELECT_QUAL_ARG5"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' const"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SELECT_TYPE_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SELECT_TYPE_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' void *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SELECT_TYPE_ARG234"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' fd_set *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SELECT_TYPE_ARG5"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' struct timeval *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SELECT_TYPE_RETV"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!     Process SEND directives
+$!-------------------------------------
+$      if key2a .eqs. "SEND"
+$      then
+$          if key2 .eqs. "SEND_QUAL_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' const"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SEND_TYPE_ARG1"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SEND_TYPE_ARG2"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' void *"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SEND_TYPE_ARG3"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' size_t"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SEND_TYPE_ARG4"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$          if key2 .eqs. "SEND_TYPE_RETV"
+$          then
+$              write tf "#ifndef ''key2'"
+$              write tf "#define ''key2' int"
+$              write tf "#endif"
+$              goto cfgh_in_loop1
+$          endif
+$      endif
+$!
+$!
+$!     Process STATFS directives
+$!-------------------------------
+$!     if key2a .eqs. "STATFS"
+$!     then
+$!         write tf "/* ", xline, " */"
+$!         goto cfgh_in_loop1
+$!     endif
+$!
+$!     Process inline directive
+$!------------------------------
+$      if key2 .eqs. "inline"
+$      then
+$          write tf "#ifndef inline"
+$          write tf "#define inline __inline"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process restrict directive
+$!--------------------------------
+$      if key2 .eqs. "restrict"
+$      then
+$          write tf "#ifndef restrict"
+$          write tf "#define restrict __restrict"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process RETSIGTYPE directive
+$!----------------------------------
+$      if key2 .eqs. "RETSIGTYPE"
+$      then
+$          write tf "#ifndef RETSIGTYPE"
+$          write tf "#define RETSIGTYPE void"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process STDC_HEADERS (SAMBA!)
+$!---------------------------
+$      if key2 .eqs. "STDC_HEADERS"
+$      then
+$          write tf "#ifndef STDC_HEADERS"
+$          write tf "#define STDC_HEADERS 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Process PROTOTYPES directive
+$!-------------------------------------
+$      if key2 .eqs. "PROTOTYPES"
+$      then
+$          write tf "#ifndef PROTOTYPES"
+$          write tf "#define PROTOTYPES 1"
+$          write tf "#endif"
+$          goto cfgh_in_loop1
+$      endif
+$!
+$!     Special for SEEKDIR_RETURNS_VOID
+$!---------------------------------------
+$      if key2 .eqs. "SEEKDIR_RETURNS_VOID"
+$      then
+$          write tf "#ifndef SEEKDIR_RETURNS_VOID"
+$          write tf "#define SEEKDIR_RETURNS_VOID 1"
+$          write tf "#endif"
+$      endif
+$!
+$!     Unknown - See if CONFIGURE can give a clue for this
+$!----------------------------------------------------------
+$      pflag = 0
+$      set_flag = 0
+$!     gproj_name = proj_name - "_VMS" - "-VMS"
+$      if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$      define/user sys$output nl:
+$      define/user sys$error nl:
+$!     if f$locate("FILE", key2) .lt. key2_len then pflag = 1
+$!     if f$locate("DIR", key2) .eq. key2_len - 3 then pflag = 1
+$!     if f$locate("PATH", key2) .eq. key2_len - 4 then pflag = 1
+$!
+$      search/out='tfile1' 'configure_script' "''key2'="/exact
+$      search_sev = '$severity'
+$      if 'search_sev' .eq. 1
+$      then
+$          open/read/err=unknown_cf_rd_error sf 'tfile1'
+$search_file_rd_loop:
+$          read/end=unknown_cf_rd_err sf line_in
+$          line_in = f$edit(line_in, "TRIM")
+$          skey1 = f$element(0,"=",line_in)
+$          if skey1 .eqs. key2
+$          then
+$              skey2 = f$element(1,"=",line_in)
+$              skey2a = f$extract(0,2,skey2)
+$!
+$!
+$!             We can not handle assignment to shell symbols.
+$!             For now skip them.
+$!------------------------------------------------------------
+$              if f$locate("$", skey2) .lt. f$length(skey2)
+$              then
+$                  write tf "/* ", xline, " */"
+$                  set_flag = 1
+$                  goto found_in_configure
+$              endif
+$!
+$!             Keep these two cases separate to make it easier to add
+$!             more future intelligence to this routine
+$!----------------------------------------------------------------------
+$              if skey2a .eqs. """`"
+$              then
+$!                 if pflag .eq. 1
+$!                 then
+$!                     write tf "#ifndef ''key2'"
+$!                     write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$!                     write tf "#endif"
+$!                 else
+$!                     Ignore this for now
+$!------------------------------------------
+$                      write tf "/* ", xline, " */"
+$!                 endif
+$                  set_flag = 1
+$                  goto found_in_configure
+$              endif
+$              if skey2a .eqs. """$"
+$              then
+$!                 if pflag .eq. 1
+$!                 then
+$!                     write tf "#ifndef ''key2'"
+$!                     write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$!                     write tf "#endif"
+$!                 else
+$!                     Ignore this for now
+$!-------------------------------------------
+$                      write tf "/* ", xline, " */"
+$!                 endif
+$                  set_flag = 1
+$                  goto found_in_configure
+$              endif
+$!
+$!             Remove multiple layers of quotes if present
+$!----------------------------------------------------------
+$              if f$extract(0, 1, skey2) .eqs. "'"
+$              then
+$                  skey2 = skey2 - "'" - "'" - "'" - "'"
+$              endif
+$              if f$extract(0, 1, skey2) .eqs. """"
+$              then
+$                  skey2 = skey2 - """" - """" - """" - """"
+$              endif
+$              write tf "#ifndef ''key2'"
+$              if skey2 .eqs. ""
+$              then
+$                  write tf "#define ",key2
+$              else
+$!                 Only quote non-numbers
+$!----------------------------------------
+$                  if f$string(skey2+0) .eqs. skey2
+$                  then
+$                      write tf "#define ",key2," ",skey2
+$                  else
+$                      write tf "#define ",key2," """,skey2,""""
+$                  endif
+$              endif
+$              write tf "#endif"
+$              set_flag = 1
+$          else
+$              goto search_file_rd_loop
+$!             if pflag .eq. 1
+$!             then
+$!                 write tf "#ifndef ''key2'"
+$!                 write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$!                 write tf "#endif"
+$!                 set_flag = 1
+$!             endif
+$          endif
+$found_in_configure:
+$unknown_cf_rd_err:
+$          if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. ""
+$          then
+$              close sf
+$          endif
+$          if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$          if set_flag .eq. 1 then goto cfgh_in_loop1
+$      endif
+$   endif
+$!
+$!
+$!
+$!  If it falls through everything else, comment it out
+$!-----------------------------------------------------
+$   write tf "/* ", xline, " */"
+$   goto cfgh_in_loop1
+$cfgh_in_loop1_end:
+$close inf
+$!
+$!
+$! Write out the tail
+$!--------------------
+$write_tail:
+$gosub write_config_h_tail
+$!
+$! Exit and clean up
+$!--------------------
+$general_error:
+$status = '$status'
+$all_exit:
+$set noon
+$if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" then close sf
+$if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf
+$if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$trnlnm("tfcv","lnm$process",,"SUPERVISOR") .nes. "" then close tfcv
+$if f$type(tfile1) .eqs. "STRING"
+$then
+$   if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$endif
+$if f$type(dchfile) .eqs. "STRING"
+$then
+$   if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$endif
+$if f$type(starhfile) .eqs. "STRING"
+$then
+$   if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$endif
+$if f$type(configure_script) .eqs. "STRING"
+$then
+$   if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$endif
+$exit 'status'
+$!
+$!
+$control_y:
+$   status = ss_control_y
+$   goto all_exit
+$!
+$!
+$!
+$! Gosub to write a new config_vms.h
+$!-----------------------------------
+$write_config_vms:
+$outfile = "sys$disk:[]config_vms.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "/* File: config_vms.h"
+$write tf "**"
+$write tf "** This file contains the manual edits needed for porting"
+$!write tf "** the ''proj_name' package to OpenVMS.
+$write tf "**"
+$write tf "** Edit this file as needed.  The procedure that automatically"
+$write tf "** generated this header stub will not overwrite or make any"
+$write tf "** changes to this file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$close tf
+$return
+$!
+$! gosub to write out a documentation header for config.h
+$!----------------------------------------------------------------
+$write_config_h_header:
+$outfile = "sys$disk:[]config.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "#ifndef CONFIG_H"
+$write tf "#define CONFIG_H"
+$write tf "/* File: config.h"
+$write tf "**"
+$write tf -
+  "** This file contains the options needed for porting "
+$write tf "** the project on a VMS system."
+$write tf "**"
+$write tf "** Try not to make any edits to this file, as it is"
+$write tf "** automagically generated."
+$write tf "**"
+$write tf "** Manual edits should be made to the config_vms.h file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$write tf "#if (__CRTL_VER >= 70200000) && !defined (__VAX)"
+$write tf "#define _LARGEFILE 1"
+$write tf "#endif"
+$write tf ""
+$write tf "#ifndef __VAX"
+$write tf "#ifdef __CRTL_VER"
+$write tf "#if __CRTL_VER >= 80200000"
+$write tf "#define _USE_STD_STAT 1"
+$write tf "#endif"
+$write tf "#endif"
+$write tf "#endif"
+$write tf ""
+$!
+$write tf " /* Allow compiler builtins */"
+$write tf "/*-------------------------*/"
+$write tf "#ifdef __DECC_VER"
+$write tf "#include <non_existant_dir:builtins.h>"
+$write tf "#endif"
+$!
+$write tf ""
+$return
+$!
+$! gosub to write out the tail for config.h and close it
+$!---------------------------------------------------------
+$write_config_h_tail:
+$write tf ""
+$write tf " /* Include the hand customized settings */"
+$write tf "/*--------------------------------------*/"
+$write tf "#include ""config_vms.h"""
+$write tf ""
+$write tf "#endif /* CONFIG_H */"
+$close tf
+$return
+$!
diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c
new file mode 100644 (file)
index 0000000..98c70ec
--- /dev/null
@@ -0,0 +1,311 @@
+/* File: curl_crtl_init.c
+ *
+ * This file makes sure that the DECC Unix settings are correct for
+ * the mode the the program is run in.
+ *
+ * The CRTL has not been initialized at the time that these routines
+ * are called, so many routines can not be called.
+ *
+ * This is a module that provides a LIB$INITIALIZE routine that
+ * will turn on some CRTL features that are not enabled by default.
+ *
+ * The CRTL features can also be turned on via logical names, but that
+ * impacts all programs and some aren't ready, willing, or able to handle
+ * those settings.
+ *
+ * On VMS versions that are too old to use the feature setting API, this
+ * module falls back to using logical names.
+ *
+ * Copyright 2013, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* Unix headers */
+#include <stdio.h>
+#include <string.h>
+
+/* VMS specific headers */
+#include <descrip.h>
+#include <lnmdef.h>
+#include <stsdef.h>
+
+#pragma member_alignment save
+#pragma nomember_alignment longword
+#pragma message save
+#pragma message disable misalgndmem
+struct itmlst_3 {
+  unsigned short int buflen;
+  unsigned short int itmcode;
+  void *bufadr;
+  unsigned short int *retlen;
+};
+#pragma message restore
+#pragma member_alignment restore
+
+#ifdef __VAX
+#define ENABLE "ENABLE"
+#define DISABLE "DISABLE"
+#else
+
+#define ENABLE TRUE
+#define DISABLE 0
+int   decc$feature_get_index (const char *name);
+int   decc$feature_set_value (int index, int mode, int value);
+#endif
+
+int   SYS$TRNLNM(
+    const unsigned long * attr,
+    const struct dsc$descriptor_s * table_dsc,
+    struct dsc$descriptor_s * name_dsc,
+    const unsigned char * acmode,
+    const struct itmlst_3 * item_list);
+int   SYS$CRELNM(
+    const unsigned long * attr,
+    const struct dsc$descriptor_s * table_dsc,
+    const struct dsc$descriptor_s * name_dsc,
+    const unsigned char * acmode,
+    const struct itmlst_3 * item_list);
+
+
+/* Take all the fun out of simply looking up a logical name */
+static int sys_trnlnm
+   (const char * logname,
+    char * value,
+    int value_len)
+{
+    const $DESCRIPTOR(table_dsc, "LNM$FILE_DEV");
+    const unsigned long attr = LNM$M_CASE_BLIND;
+    struct dsc$descriptor_s name_dsc;
+    int status;
+    unsigned short result;
+    struct itmlst_3 itlst[2];
+
+    itlst[0].buflen = value_len;
+    itlst[0].itmcode = LNM$_STRING;
+    itlst[0].bufadr = value;
+    itlst[0].retlen = &result;
+
+    itlst[1].buflen = 0;
+    itlst[1].itmcode = 0;
+
+    name_dsc.dsc$w_length = strlen(logname);
+    name_dsc.dsc$a_pointer = (char *)logname;
+    name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+    name_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+    status = SYS$TRNLNM(&attr, &table_dsc, &name_dsc, 0, itlst);
+
+    if ($VMS_STATUS_SUCCESS(status)) {
+
+         /* Null terminate and return the string */
+        /*--------------------------------------*/
+        value[result] = '\0';
+    }
+
+    return status;
+}
+
+/* How to simply create a logical name */
+static int sys_crelnm
+   (const char * logname,
+    const char * value)
+{
+    int ret_val;
+    const char * proc_table = "LNM$PROCESS_TABLE";
+    struct dsc$descriptor_s proc_table_dsc;
+    struct dsc$descriptor_s logname_dsc;
+    struct itmlst_3 item_list[2];
+
+    proc_table_dsc.dsc$a_pointer = (char *) proc_table;
+    proc_table_dsc.dsc$w_length = strlen(proc_table);
+    proc_table_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+    proc_table_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+    logname_dsc.dsc$a_pointer = (char *) logname;
+    logname_dsc.dsc$w_length = strlen(logname);
+    logname_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+    logname_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+    item_list[0].buflen = strlen(value);
+    item_list[0].itmcode = LNM$_STRING;
+    item_list[0].bufadr = (char *)value;
+    item_list[0].retlen = NULL;
+
+    item_list[1].buflen = 0;
+    item_list[1].itmcode = 0;
+
+    ret_val = SYS$CRELNM(NULL, &proc_table_dsc, &logname_dsc, NULL, item_list);
+
+    return ret_val;
+}
+
+
+ /* Start of DECC RTL Feature handling */
+
+/*
+** Sets default value for a feature
+*/
+#ifdef __VAX
+static void set_feature_default(const char *name, const char *value)
+{
+    sys_crelnm(name, value);
+}
+#else
+static void set_feature_default(const char *name, int value)
+{
+    int index;
+
+    index = decc$feature_get_index(name);
+
+    if (index > 0)
+        decc$feature_set_value (index, 0, value);
+}
+#endif
+
+static void set_features(void)
+{
+    int status;
+    char unix_shell_name[255];
+    int use_unix_settings = 1;
+
+    status = sys_trnlnm("GNV$UNIX_SHELL",
+                        unix_shell_name, sizeof unix_shell_name -1);
+    if (!$VMS_STATUS_SUCCESS(status)) {
+        unix_shell_name[0] = 0;
+        use_unix_settings = 0;
+    }
+
+    /* ACCESS should check ACLs or it is lying. */
+    set_feature_default("DECC$ACL_ACCESS_CHECK", ENABLE);
+
+    /* We always want the new parse style */
+    set_feature_default ("DECC$ARGV_PARSE_STYLE" , ENABLE);
+
+
+    /* Unless we are in POSIX compliant mode, we want the old POSIX root
+     * enabled.
+     */
+    set_feature_default("DECC$DISABLE_POSIX_ROOT", DISABLE);
+
+    /* EFS charset, means UTF-8 support */
+    /* VTF-7 support is controlled by a feature setting called UTF8 */
+    set_feature_default ("DECC$EFS_CHARSET", ENABLE);
+    set_feature_default ("DECC$EFS_CASE_PRESERVE", ENABLE);
+
+    /* Support timestamps when available */
+    set_feature_default ("DECC$EFS_FILE_TIMESTAMPS", ENABLE);
+
+    /* Cache environment variables - performance improvements */
+    set_feature_default ("DECC$ENABLE_GETENV_CACHE", ENABLE);
+
+    /* Start out with new file attribute inheritance */
+#ifdef __VAX
+    set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", "2");
+#else
+    set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", 2);
+#endif
+
+    /* Don't display trailing dot after files without type */
+    set_feature_default ("DECC$READDIR_DROPDOTNOTYPE", ENABLE);
+
+    /* For standard output channels buffer output until terminator */
+    /* Gets rid of output logs with single character lines in them. */
+    set_feature_default ("DECC$STDIO_CTX_EOL", ENABLE);
+
+    /* Fix mv aa.bb aa  */
+    set_feature_default ("DECC$RENAME_NO_INHERIT", ENABLE);
+
+    if (use_unix_settings) {
+
+        /* POSIX requires that open files be able to be removed */
+        set_feature_default ("DECC$ALLOW_REMOVE_OPEN_FILES", ENABLE);
+
+        /* Default to outputting UNIX filesnames in VMS routines */
+        set_feature_default ("DECC$FILENAME_UNIX_ONLY", ENABLE);
+        /* FILENAME_UNIX_ONLY Implicitly sets */
+        /* decc$disable_to_vms_logname_translation */
+
+        set_feature_default ("DECC$FILE_PERMISSION_UNIX", ENABLE);
+
+        set_feature_default ("DECC$FILE_SHARING", ENABLE);
+
+        set_feature_default ("DECC$FILE_OWNER_UNIX", ENABLE);
+        set_feature_default ("DECC$POSIX_SEEK_STREAM_FILE", ENABLE);
+
+    } else {
+        set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE);
+    }
+
+    /* When reporting UNIX filenames, glob the same way */
+    set_feature_default ("DECC$GLOB_UNIX_STYLE", ENABLE);
+
+    /* The VMS version numbers on Unix filenames is incompatible with most */
+    /* ported packages. */
+    set_feature_default("DECC$FILENAME_UNIX_NO_VERSION", ENABLE);
+
+    /* The VMS version numbers on Unix filenames is incompatible with most */
+    /* ported packages. */
+    set_feature_default("DECC$UNIX_PATH_BEFORE_LOGNAME", ENABLE);
+
+    /* Set strtol to proper behavior */
+    set_feature_default("DECC$STRTOL_ERANGE", ENABLE);
+
+    /* Commented here to prevent future bugs:  A program or user should */
+    /* never ever enable DECC$POSIX_STYLE_UID. */
+    /* It will probably break all code that accesses UIDs */
+    /*  do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */
+}
+
+
+/* Some boilerplate to force this to be a proper LIB$INITIALIZE section */
+
+#pragma nostandard
+#pragma extern_model save
+#ifdef __VAX
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long, nopic
+#else
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long
+#    if __INITIAL_POINTER_SIZE
+#        pragma __pointer_size __save
+#        pragma __pointer_size 32
+#    else
+#        pragma __required_pointer_size __save
+#        pragma __required_pointer_size 32
+#    endif
+#endif
+/* Set our contribution to the LIB$INITIALIZE array */
+void (* const iniarray[])(void) = {set_features, } ;
+#ifndef __VAX
+#    if __INITIAL_POINTER_SIZE
+#        pragma __pointer_size __restore
+#    else
+#        pragma __required_pointer_size __restore
+#    endif
+#endif
+
+
+/*
+** Force a reference to LIB$INITIALIZE to ensure it
+** exists in the image.
+*/
+int LIB$INITIALIZE(void);
+#ifdef __DECC
+#pragma extern_model strict_refdef
+#endif
+    int lib_init_ref = (int) LIB$INITIALIZE;
+#ifdef __DECC
+#pragma extern_model restore
+#pragma standard
+#endif
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
new file mode 100644 (file)
index 0000000..e21b37d
--- /dev/null
@@ -0,0 +1,253 @@
+From File: curl_gnv_build_steps.txt
+
+ Copyright 2009, John Malmberg
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Currently building Curl using GNV takes longer than building Curl via DCL.
+The GNV procedure actually uses the same configure and makefiles that
+Unix builds use.
+
+Building CURL on OpenVMS using GNV requires GNV V2.1-2 or the updated
+images that are available via anonymous FTP at encompasserve.org in the gnv
+directory.  It also requires the GNV Bash 4.2.45 kit as an update from the
+same location or from the sourceforge.net GNV project.
+
+The HP C 7.x compiler was used for building the GNV version.
+
+The source kits are provided in backup savesets inside of the PCSI install kit.
+
+Backup save sets are currently the only distribution medium that I can be
+sure is installed on a target VMS system that will correctly unpack files
+with extended character sets in them.  You may need to adjust the ownership
+of the restored files, since /Interchange/noconvert was not available at the
+time that this document was written.
+
+[gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
+as provided by the curl project.  [gnv.vms_src]curl-*_vms_src.bck, if present,
+has the OpenVMS specific files that are used for building that are not yet in
+the curl source kits for that release distributed http://curl.haxx.se
+
+These backup savesets should be restored to different directory trees on
+an ODS-5 volume(s) which are referenced by concealed rooted logical names.
+
+SRC_ROOT: is for the source files common to all platforms.
+VMS_ROOT: is for the source files that are specific to OpenVMS.
+          Note, you should create the VMS_ROOT: directory tree even if it is
+          initially empty.  This is where you should put edits if you are
+          making changes.
+LCL_ROOT: is manually created to have the same base and sub-directories as
+          SRC_ROOT: and VMS_ROOT:
+
+The logical name REF_ROOT: may be defined to be a search list for
+VMS_ROOT:,SRC_ROOT:
+
+The logical name PRJ_ROOT: is defined to be a search list for
+LCL_ROOT:,VMS_ROOT:,SRC_ROOT:
+
+For the make install process to work, it must have write access to the
+directories referenced by the GNU: logical name.
+
+In future releases of GNV, and with GNV Bash 4.2.45 installed, this name
+should be GNV$GNU:
+
+As directly updating those directories would probably be disruptive to other
+users of the system and require elevated privilege, this can be handled by
+creating a separate directory tree to install into which can be referenced
+by the concealed rooted logical name new_gnu:.  A concealed logical name of
+OLD_GNU: can be set up to reference the real GNV directory tree.
+
+Then a local copy of the GNU/GNV$GNU logical names can be set up as a search
+list such as NEW_GNU:,OLD_GNU:
+
+The directory NEW_GNU:[usr] should be created.  The make install phase should
+create all the other directories.
+
+The make install process may abort if curl is already because it can not
+uninstall the older version of curl because it does not have permission.
+
+The file stage_curl_install.com is used set up a new_gnu: directory tree
+for testing.  The PCSI kitting procedure uses these files as input.
+
+These files do not create the directories in the VMS_ROOT and LCL_ROOT
+directory trees.  You can create them with commands similar to:
+
+  $ create/dir lcl_root:[curl]/prot=w:re
+  $ copy src_root:[curl...]*.dir -
+    lcl_root:[curl...]/prot=(o:rwed,w:re)
+  $ create/dir vms_root:[curl]/prot=w:re
+  $ copy src_root:[curl...]*.dir -
+    vms_root:[curl...]/prot=(o:rwed,w:re)
+
+One of the ways with to protect the source from being modified is to have
+the directories under src_root: owned by a user or resource where the build
+username only has read access to it.
+
+
+Note to builders:
+
+GNV currently has a bug where configure scripts take a long time to run.
+Some of the configure steps take a while to complete, and on a 600 Mhz
+DS10 with IDE disks, taking an hour to run the CURL configure is normal.
+The bug appears to be in the SED for GNV 2.1.3 and GNV 3.0.1 where it
+is taking far longer than it should to do I/O.  In addition, there are
+reports that the SED in GNV 3.0.1 is broken so the SED from GNV 2.1.3
+should be used instead.
+
+The following messages can be ignored and may get fixed in a future version
+of GNV.  The GNV$*.OPT files are used to find the libraries as many have
+different names on VMS than on Unix.  The Bash environment variable
+GNV_CC_QUALIFIERS can override all other settings for the C Compiler.
+
+? cc: No support for switch -warnprotos
+? cc: Unrecognized file toomanyargs
+? cc: Warning: library "ssl" not found
+? cc: Warning: library "crypto" not found
+? cc: Warning: library "gssapi" not found
+? cc: Warning: library "z" not found
+u unimplemented switch - ignored
+
+
+With these search lists set up and the properly, curl can be built by
+setting your default to PRJ_ROOT:[curl.packages.vms] where the * is
+replaced by the actual version of curl, and then issuing the command:
+
+  $ @build_gnv_curl.com.
+
+This command procedure does the following:
+
+  $ @setup_gnv_curl_build.com
+
+  $ bash gnv_curl_configure.sh
+
+  $ @clean_gnv_curl.com
+
+  $ bash make_gnv_curl_install.sh
+
+  $ @gnv_link_curl.com
+
+  $ @stage_curl_install.com
+
+  $ purge new_gnu:[*...]/log
+
+To clean up after a build to start over, the following commands are used:
+
+   $ bash
+   bash$ cd ../..
+   bash$ make clean
+   bash$ exit
+
+Then run the @clean_gnv_curl.com.  Use the parameter "realclean" if you are
+going to run the setup_gnv_curl_build.com and configure script again.
+
+   $ @clean_gnv_curl.com realclean
+
+If new public symbols have been added, adjust the file gnv_libcurl_symbols.opt
+to have the new symbols.  If the symbols are longer than 32 characters,
+then they will need to have the original be exact case CRC shortened and
+an alias in upper case with CRC shortened, in addition to having an exact
+case truncated alias and an uppercase truncated alias.
+
+The *.EXE files are not moved to the new_gnu: directory.
+
+After you are satisfied with the results of your build, you can move the
+files from new_gnu: to old_gnu: at your convenience.
+
+Building a PCSI kit for an archictecture takes the following steps after
+making sure that you have a working build environment.
+
+Note that it requires manually creating two logical names as described
+below.  It is intentional that they be manually set.  This is for
+branding the PCSI kit based on who is making the kit.
+
+   1. Make sure that you have a staging directory that can be referenced
+      by the path STAGE_ROOT:[KIT]
+
+   2. Edit the file curl_release_note_start.txt or other text files to
+      reflect any changes.
+
+   3. Define the logical name GNV_PCSI_PRODUCER to indicate who is making
+      the distribution.  For making updates to an existing open source
+      kit you may need to keep the producer the same.
+
+   4. Define the logical name GNV_PCSI_PRODUCER_FULL_NAME to be your full
+      name or full name of your company.
+
+   5. If you are producing an update kit, then update the file
+      vms_eco_level.h by changing the value for the VMS_ECO_LEVEL macro.
+      This file is currently only used in building the PCSI kit.
+
+   6. Edit the file PCSI_GNV_CURL_FILE_LIST.TXT if there are new files added
+      to the kit.  These files should all be ODS-2 legal filenames and
+      directories.
+
+      A limitation of the PCSI kitting procedure is that when selecting files,
+      it tends to ignore the directory structure and assumes that all files
+      with the same name are the same file, so every file placed in the kit
+      must have a unique name.  Then a procedure needs to be added to the kit
+      to create an alias link on install and remove the link on remove.
+
+      Since at this time curl does not need this alias procedure, the steps
+      to automatically build it are not included here.
+
+      While newer versions of PCSI can support ODS-5 filenames, not all verions
+      of PCSI on systems that have ODS-5 filenames do.  So as a post install
+      step, the PCSI kit built by these steps does a rename to the correct
+      case as a post install step.
+
+   7. Edit the build_curl_pcsi_desc.com and build_curl_pcsi_text.com if you
+      have changed the version of ZLIB that curl is built against.
+
+   8. Prepare to backup the files for building the kit.
+
+      Note that if src_root: or vms_root: are NFS mounted disks, the
+      step of backing up the source files will probably hang or fail.
+
+      You need to copy the source files to VMS mounted disks and create
+      logical names SRC_ROOT1 and VMS_ROOT1 to work around this to to
+      reference local disks.  Make sure src_root1:[000000] and
+      vms_root1:[000000] exist and can be written to.
+
+      The command procedure compare_curl_source can be used to check
+      those directories and keep them up to date.
+
+         @compare_curl_source.com SRCBCK UPDATE
+
+         This compares the reference project source with the backup
+         staging directory for it and updates with any changes.
+
+         @compare_curl_source.com VMSBCK UPDATE
+
+         This compares the VMS specific source with the backup
+         staging directory for it and updates with any changes.
+
+         Leave off "UPDATE" to just check without doing any changes.
+
+      If you are not using NFS mounted disks and do not want to have a
+      separate directory for staging the sources for backup make sure
+      that src_root1: and vms_root1: do not exist.
+
+   9. Build the PCSI kit with @pcsi_product_gnv_curl.com
+
+       The following message is normal:
+          %PCSI-I-CANNOTVAL, cannot validate
+            EAGLE$DQA0:[stage_root.][kit]VMSPORTS-AXPVMS-CURL-V0731-0-1.PCSI;1
+          -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
+          no manifest file
+
+       This will result in an uncompressed kit for the target platform.
+       On Alpha and Integrity, the pcsi_product_gnv_curl.com can be used with
+       the "COMPRESSED" parameter to build both a compressed and uncompressed
+       kits.
+
+Good Luck.
diff --git a/packages/vms/curl_release_note_start.txt b/packages/vms/curl_release_note_start.txt
new file mode 100644 (file)
index 0000000..977dce1
--- /dev/null
@@ -0,0 +1,77 @@
+From file: CURL_RELEASE_NOTE_START.TXT
+
+Note: These kits are produced by a hobbyist and are providing any support
+or any commitment to supply bug fixes or future releases.  This code is
+as-is with no warrantees.
+
+The testing of this build of curl was minimal and involved building some of
+the sample and test programs, accessing a public HTTPS: website, doing a
+form post of some VMS test files, and FTP upload of some text files.
+
+Due to the way that PCSI identifies packages, if you install a package from
+one producer and then want to upgrade it from another producer, you will
+probably need to uninstall the previous package first.
+
+OpenVMS specific building and kitting instructions are after the standard
+curl readme file.
+
+This product may be available for your platform in a PCSI kit.  The source kit
+contains files for building CURL using GNV or with a DCL procedure.
+
+The GNV based build creates a libcurl share imaged which is supplied in the
+PCSI kit.
+
+This version of CURL will return VMS compatible status codes when run from
+DCL and Unix compatible exit codes and messages when run with the SHELL
+environment variable set.
+
+This port of Curl uses the OpenSSL, Ldap, and Kerberos V5 that are bundled
+with OpenVMS or supplied as updates by HP.  Ldap and Kerberos are not available
+on the VAX platform.  See section below for a special note about HP OpenSSL
+on Alpha and IA64.
+
+The supplied CURL_STARTUP.COM procedure that is installed in
+[VMS$COMMON.SYS$STARTUP] can be put in your VMS startup procedure to install
+the GNV$LIBCURL shared image and create logical names GNV$LIBCURL to reference
+it.  It will create the GNV$CURL_INCLUDE logical name for build procedures
+to access the header files.
+
+Normally to use curl from DCL, just create a foreign command as:
+   curl :== $gnv$gnu:[usr.bin]gnv$curl.exe
+
+If you need to work around having the older HP SSL kit installed, then
+for DCL create this command procedure:
+
+ $ create/dir gnv$gnu:[vms_bin]/prot=w:re
+ $ create gnv$gnu:[vms_bin]curl.com
+ $ curl := $gnv$gnu:[usr.bin]gnv$curl.exe
+ $ define/user ssl$libcrypto_shr32 gnv$curl_ssl_libcryptoshr32
+ $ curl "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
+ ^Z
+
+Then you can use: curl :== @gnv$gnu:[vms_bin]curl.com to run curl.
+
+For the HP SSL work around to work for GNV do the following:
+ $ create/dir gnv$gnu:[usr.local.bin]/prot=w:re
+ $ create gnv$gnu:[usr.local.bin]curl.
+ #! /bin/sh
+ dcl @gnv\$gnu:[vms_bin]curl.com $*
+ ^Z
+
+Similar work arounds will be needed for any program linked with GNV$LIBCURL
+until the HP OpenSSL is upgraded to the current 1.4 version or later.
+
+If you are installing a "daily" build instead of a release build of Curl, some
+things have been changed so that it can be installed at the same time as
+a production build with out conflicts.
+
+   The CURL_DAILY_STARTUP.COM will be supplied instead of CURL_STARTUP.COM.
+   This file is actually not used with the daily package and is provided as
+   a preview of what the next CURL_STARTUP.COM will be for the next release.
+   Do not run it.
+
+   The files that are normally installed in [VMS$COMMON.GNV.usr], for the
+   daily build are installed in [VMS$COMMON.GNV.beta] directory.
+
+   To use the daily GNV$LIBCURL image, you will need to define the logical
+   name GNV$LIBCURL to the image.
diff --git a/packages/vms/curl_startup.com b/packages/vms/curl_startup.com
new file mode 100644 (file)
index 0000000..84760a0
--- /dev/null
@@ -0,0 +1,100 @@
+$! File: curl_Startup.com
+$!
+$! $Id$
+$!
+$! Procedure to setup the CURL libraries for use by programs from the
+$! VMS SYSTARTUP*.COM procedure.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jun-2009 J. Malmberg
+$! 30-Jul-2013 J. Malmberg  Update for Curl 7.32
+$!========================================================================
+$!
+$!
+$! GNV$GNU if needed.
+$ if f$trnlnm("GNV$GNU") .eqs. ""
+$ then
+$   x = f$trnlnm("GNU","LNM$SYSTEM_TABLE")
+$   if x .eqs. ""
+$   then
+$       write sys$output "GNV must be started up before this procedure.
+$       exit 44
+$   endif
+$   define/system/exec/trans=conc GNV$GNU 'x'
+$ endif
+$!
+$!
+$ myproc = f$environment("procedure")
+$!
+$! ZLIB needed.
+$ if f$trnlnm("GNV$LIBZSHR32") .eqs. ""
+$ then
+$   zlib_startup = f$parse("gnv$zlib_startup.com;0", myproc,,,)
+$   if f$search(zlib_startup) .nes. ""
+$   then
+$       @'zlib_startup
+$   else
+$       write sys$output "ZLIB package not found and is required."
+$       exit 44
+$   endif
+$ endif
+$!
+$!
+$ curl_ssl_libcrypto32 = ""
+$ curl_ssl_libssl32 = ""
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$   curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$   curl_ssl_libssl32 = gnv_ssl_libssl32
+$ else
+$   hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$   hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$   if f$search(hp_ssl_libcrypto32) .nes. ""
+$   then
+$       curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$       curl_ssl_libssl32 = hp_ssl_libssl32
+$   else
+$       write sys$output "HP SSL package not found and is required."
+$   endif
+$ endif
+$!
+$ define/system/exec gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/system/exec gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$!
+$!
+$! CURL setup
+$ define/system/exec gnv$libcurl gnv$gnu:[usr.lib]GNV$LIBCURL.EXE
+$ define/system/exec gnv$curl_include gnv$gnu:[usr.include.curl]
+$ if .not. f$file_attributes("gnv$libcurl", "known")
+$ then
+$   install ADD gnv$libcurl/OPEN/SHARE/HEADER
+$ else
+$   install REPLACE gnv$libcurl/OPEN/SHARE/HEADER
+$ endif
+$!
+$!
+$ curl_exe = "gnv$gnu:[usr.bin]gnv$curl.exe"
+$ if .not. f$file_attributes(curl_exe, "known")
+$ then
+$   install ADD 'curl_exe'/OPEN/SHARE/HEADER
+$ else
+$   install REPLACE 'curl_exe'/OPEN/SHARE/HEADER
+$ endif
+$!
+$all_exit:
+$ exit
index 32f335f..0473be6 100644 (file)
@@ -1,5 +1,26 @@
 #ifndef HEADER_CURLMSG_H
 #define HEADER_CURLMSG_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 
 #pragma __member_alignment __save
 #pragma __nomember_alignment
index e99e88c..3976973 100644 (file)
@@ -1,5 +1,26 @@
 #ifndef HEADER_CURLMSG_VMS_H
 #define HEADER_CURLMSG_VMS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 
 /*                                                                          */
 /* CURLMSG_VMS.H                                                            */
diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com
new file mode 100644 (file)
index 0000000..8024a92
--- /dev/null
@@ -0,0 +1,445 @@
+$! File: GENERATE_CONFIG_H_CURL.COM
+$!
+$! $Id$
+$!
+$! Curl like most open source products uses a variant of a config.h file.
+$! Depending on the curl version, this could be config.h or curl_config.h.
+$!
+$! For GNV based builds, the configure script is run and that produces
+$! a [curl_]config.h file.  Configure scripts on VMS generally do not
+$! know how to do everything, so there is also a [-.lib]config-vms.h file
+$! that has VMS specific code that compensates for bugs in some of the
+$! VMS shared images.
+$!
+$! This generates a [curl_]config.h file and also a config_vms.h file,
+$! which is used to supplement that file.  Note that the config_vms.h file
+$! and the [.lib]config-vms.h file do two different tasks and that the
+$! filenames are slightly different.
+$!
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 06-Jan-2013 J. Malmberg
+$!
+$!=========================================================================
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$args_lower = f$edit(args, "LOWERCASE")
+$!
+$args_len = f$length(args)
+$!
+$if (f$getsyi("HW_MODEL") .lt. 1024)
+$then
+$   arch_name = "VAX"
+$else
+$   arch_name = ""
+$   arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$   if (arch_name .eqs. "") then arch_name = "UNK"
+$endif
+$!
+$!
+$nossl = 0
+$nohpssl = 1
+$hpssl = 0
+$libidn = 0
+$libssh2 = 0
+$noldap = 0
+$nozlib = 0
+$nokerberos = 0
+$!
+$! First check to see if SSL is disabled.
+$!---------------------------------------
+$if f$locate(",nossl,", args_lower) .lt. args_len then nossl = 1
+$if .not. nossl
+$then
+$!
+$!  ssl$* logicals means HP ssl is present
+$!----------------------------------------
+$   if f$trnlnm("ssl$root") .nes. ""
+$   then
+$      nohpssl = 0
+$      hpssl = 1
+$   endif
+$!
+$!  HP defines OPENSSL as SSL$INCLUDE as a convenience for linking.
+$!  As it is a violation of VMS standards for this to be provided,
+$!  some sites may have removed it, but if present, assume that
+$!  it indicates which OpenSSL to use.
+$!------------------------------------
+$   openssl_lnm = f$trnlnm("OPENSSL")
+$   if (openssl_lnm .nes. "SYS$INCLUDE")
+$   then
+$!     Non HP SSL is installed, default to use it.
+$      nohpssl = 1
+$      hpssl = 0
+$   endif
+$!
+$!  Now check to see if hpssl has been specifically disabled
+$!----------------------------------------------------------
+$   if f$locate(",nohpssl,", args_lower) .lt. args_len
+$   then
+$      nohpssl = 1
+$      hpssl = 0
+$   endif
+$!
+$!  Finally check to see if hp ssl has been specifically included.
+$!----------------------------------------------------------------
+$   if f$locate(",nohpssl,", args_lower) .lt. args_len
+$   then
+$      nohpssl = 1
+$      hpssl = 0
+$   endif
+$endif
+$!
+$! Did someone port LIBIDN in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBIDNSHR") .nes. ""
+$then
+$   write sys$output "NOTICE:  A LIBIDN port has been detected."
+$   write sys$output " This port of curl for VMS has not been tested with it."
+$   if f$locate(",libidn,", args_lower) .lt. args_len
+$   then
+$      libidn = 1
+$   endif
+$   if .not. libidn
+$   then
+$      write sys$output " LIBIDN support is not enabled."
+$      write sys$output "Run with the ""libidn"" parameter to attempt to use."
+$   else
+$      write sys$output " Untested LIBIDN support requested."
+$   endif
+$endif
+$!
+$! Did someone port LIBSSH2 in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBSSH2SHR") .nes. ""
+$then
+$   write sys$output "NOTICE:  A LIBSSH2 port has been detected."
+$   write sys$output " This port of curl for VMS has not been tested with it."
+$   if f$locate(",libssh2,", args_lower) .lt. args_len
+$   then
+$      libssh2 = 1
+$   endif
+$   if .not. libssh2
+$   then
+$      write sys$output " LIBSSH2 support is not enabled."
+$      write sys$output "Run with the ""libssh2"" parameter to attempt to use."
+$   else
+$      write sys$output " Untested LIBSSH2 support requested."
+$   endif
+$endif
+$!
+$! LDAP suppressed?
+$if f$locate(",noldap,", args_lower) .lt. args_len
+$then
+$   noldap = 1
+$endif
+$if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$then
+$   noldap = 1
+$endif
+$!
+$if f$locate(",nokerberos,", args_lower) .lt. args_len then nokerberos = 1
+$if .not. nokerberos
+$then
+$!  If kerberos is installed: sys$share:gss$rtl.exe exists.
+$   if f$search("sys$shsare:gss$rtl.exe") .eqs. ""
+$   then
+$      nokerberos = 1
+$   endif
+$endif
+$!
+$!
+$! Is GNV compatible LIBZ present?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBZSHR") .nes. ""
+$then
+$   if f$locate(",nozlib,", args_lower) .lt. args_len
+$   then
+$      nozlib = 1
+$   endif
+$!   if .not. nozlib
+$!   then
+$!     write sys$output " GNV$LIBZSHR support is enabled."
+$!   else
+$!     write sys$output " GNV$LIBZSHR support is disabled by nozlib."
+$!   endif
+$else
+$   nozlib = 1
+$endif
+$!
+$!
+$! Start the configuration file.
+$! Need to do a create and then an append to make the file have the
+$! typical file attributes of a VMS text file.
+$create sys$disk:[curl.lib]config_vms.h
+$open/append cvh sys$disk:[curl.lib]config_vms.h
+$!
+$! Write the defines to prevent multiple includes.
+$! These are probably not needed in this case,
+$! but are best practice to put on all header files.
+$write cvh "#ifndef __CONFIG_VMS_H__"
+$write cvh "#define __CONFIG_VMS_H__"
+$write cvh ""
+$write cvh "/* Define cpu-machine-OS */"
+$!
+$! Curl uses an OS macro to set the build environment.
+$!----------------------------------------------------
+$! Now the DCL builds usually say xxx-HP-VMS and configure scripts
+$! may put DEC or COMPAQ or HP for the middle part.
+$!
+$write cvh "#if defined(__alpha)"
+$write cvh "#define OS ""ALPHA-HP-VMS"""
+$write cvh "#elif defined(__vax)"
+$write cvh "#define OS ""VAX-HP-VMS"""
+$write cvh "#elif defined(__ia64)"
+$write cvh "#define OS ""IA64-HP-VMS""
+$write cvh "#else"
+$write cvh "#define OS ""UNKNOWN-HP-VMS""
+$write cvh "#endif"
+$write cvh ""
+$!
+$! We are now setting this on the GNV build, so also do this
+$! for compatibility.
+$write cvh "/* Location of default ca path */"
+$write cvh "#define curl_ca_path ""gnv$curl_ca_path"""
+$!
+$! NTLM_WB_ENABLED requires fork() but configure does not know this
+$! We have to disble this in th configure command line.
+$! config_h.com finds that configure defaults to it being enabled so
+$! reports it.  So we need to turn it off here.
+$!
+$write cvh "#ifdef NTLM_WB_ENABLED"
+$write cvh "#undef NTLM_WB_ENABLED"
+$write cvh "#endif"
+$!
+$! The config_h.com finds a bunch of default disable commands in
+$! configure and will incorrectly disable these options.  The config_h.com
+$! is a generic procedure and it would break more things to try to fix it
+$! to special case it for curl.  So we will fix it here.
+$!
+$! We do them all here, even the ones that config_h.com currently gets correct.
+$!
+$write cvh "#ifdef CURL_DISABLE_COOKIES"
+$write cvh "#undef CURL_DISABLE_COOKIES"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#undef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_DICT"
+$write cvh "#undef CURL_DISABLE_DICT"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FILE"
+$write cvh "#undef CURL_DISABLE_FILE"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FTP"
+$write cvh "#undef CURL_DISABLE_FTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_GOPHER"
+$write cvh "#undef CURL_DISABLE_GOPHER"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_HTTP"
+$write cvh "#undef CURL_DISABLE_HTTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_IMAP"
+$write cvh "#undef CURL_DISABLE_IMAP"
+$write cvh "#endif"
+$if .not. noldap
+$then
+$   write cvh "#ifdef CURL_DISABLE_LDAP"
+$   write cvh "#undef CURL_DISABLE_LDAP"
+$   write cvh "#endif"
+$   if .not. nossl
+$   then
+$      write cvh "#ifdef CURL_DISABLE_LDAPS"
+$      write cvh "#undef CURL_DISABLE_LDAPS"
+$      write cvh "#endif"
+$   endif
+$endif
+$write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
+$write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_POP3"
+$write cvh "#undef CURL_DISABLE_POP3"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_PROXY"
+$write cvh "#undef CURL_DISABLE_PROXY"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_RTSP"
+$write cvh "#undef CURL_DISABLE_RTSP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_SMTP"
+$write cvh "#undef CURL_DISABLE_SMTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TELNET"
+$write cvh "#undef CURL_DISABLE_TELNET"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TFTP"
+$write cvh "#undef CURL_DISABLE_TFTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_POP3"
+$write cvh "#undef CURL_DISABLE_POP3"
+$write cvh "#endif"
+$if .not. nossl
+$then
+$   write cvh "#ifdef CURL_DISABLE_TLS_SRP"
+$   write cvh "#undef CURL_DISABLE_TLS_SRP"
+$   write cvh "#endif"
+$!
+$endif
+$write cvh "#ifdef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#undef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#endif"
+$!
+$! configure defaults to USE_*, a real configure on VMS chooses different.
+$write cvh "#ifdef USE_ARES"
+$write cvh "#undef USE_ARES"
+$write cvh "#endif"
+$write cvh "#ifdef USE_AXTLS"
+$write cvh "#undef USE_AXTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_CYASSL"
+$write cvh "#undef USE_CYASSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_DARWINSSL"
+$write cvh "#undef USE_DARWINSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS"
+$write cvh "#undef USE_GNUTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS_NETTLE"
+$write cvh "#undef USE_GNUTLS_NETTLE"
+$write cvh "#endif"
+$write cvh "#ifdef USE_LIBRTMP"
+$write cvh "#undef USE_LIBRTMP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_MANUAL"
+$write cvh "#undef USE_MANUAL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_NSS"
+$write cvh "#undef USE_NSS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_OPENLDAP"
+$write cvh "#undef USE_OPENLDAP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_POLARSSL"
+$write cvh "#undef USE_POLARSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_SCHANNEL"
+$write cvh "#undef USE_SCHANNEL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_THREADS_POSIX"
+$write cvh "#undef USE_THREADS_POSIX"
+$write cvh "#endif"
+$write cvh "#ifdef USE_TLS_SRP"
+$write cvh "#undef USE_TLS_SRP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_WINDOWS_SSPI"
+$write cvh "#undef USE_WINDOWS_SSPI"
+$write cvh "#endif"
+$!
+$!
+$! Note:
+$! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler
+$! to know about universal symbols.  VMS does not need this support so
+$! we do not set it here.
+$!
+$!
+$! I can not figure out where the C compiler is finding the ALLOCA.H file
+$! in the text libraries, so CONFIG_H.COM can not find it either.
+$! Usually the header file name is the module name in the text library.
+$! It does not appear to hurt anything to not find header file, so we
+$! are not overriding it here.
+$!
+$!
+$! Check to see if OpenSSL is present.
+$!----------------------------------
+$ssl_include = f$trnlnm("OPENSSL")
+$if ssl_include .eqs. ""
+$then
+$    ssl_include = f$trnlnm("ssl$include")
+$endif
+$if ssl_include .eqs. "" then nossl = 1
+$!
+$if .not. nossl
+$then
+$!
+$   write cvh "#ifndef USE_OPENSSL"
+$   write cvh "#define USE_OPENSSL 1"
+$   write cvh "#endif"
+$   write cvh "#ifndef USE_SSLEAY"
+$   write cvh "#define USE_SSLEAY 1"
+$   write cvh "#endif"
+$endif
+$!
+$!
+$! LibIDN not ported to VMS at this time.
+$! This is for international domain name support.
+$! Allow explicit experimentation.
+$if libidn
+$then
+$   write cvh "#define HAVE_IDNA_STRERROR 1"
+$   write cvh "#define HAVE_IDNA_FREE 1"
+$   write cvh "#define HAVE_IDNA_FREE_H 1"
+$   write cvh "#define HAVE_LIBIDN 1"
+$else
+$   write cvh "#ifdef HAVE_LIBIDN"
+$   write cvh "#undef HAVE_LIBIDN"
+$   write cvh "#endif"
+$endif
+$!
+$! LibSSH2 not ported to VMS at this time.
+$! Allow explicit experimentation.
+$if libssh2
+$then
+$   write cvh "#define HAVE_LIBSSH2_EXIT 1"
+$   write cvh "#define HAVE_LIBSSH2_H 1"
+$   write cvh "#define HAVE_LIBSSH2_INIT 1"
+$   write cvh "#define HAVE_LIBSSH2_SCP_SEND64 1"
+$   write cvh "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1"
+$   write cvh "#define HAVE_LIBSSH2_VERSION 1
+$   write cvh "#define HAVE_LIBSSH2 1
+$!
+$   write cvh "#ifndef USE_LIBSSH2"
+$   write cvh "#define USE_LIBSSH2 1"
+$   write cvh "#endif"
+$else
+$   write cvh "#ifdef USE_LIBSSH2"
+$   write cvh "#undef USE_LIBSSH2"
+$   write cvh "#endif"
+$endif
+$!
+$!
+$if .not. nozlib
+$then
+$   write cvh "#define HAVE_LIBZ 1"
+$   write cvh "#define HAVE_ZLIB_H 1"
+$endif
+$!
+$!
+$! Close out the file
+$!
+$write cvh ""
+$write cvh "#endif /* __CONFIG_VMS_H__ */"
+$close cvh
+$!
+$all_exit:
+$exit
diff --git a/packages/vms/generate_vax_transfer.com b/packages/vms/generate_vax_transfer.com
new file mode 100644 (file)
index 0000000..115db8a
--- /dev/null
@@ -0,0 +1,274 @@
+$! File: generate_vax_transfer.com
+$!
+$! $Id$
+$!
+$! File to generate and compile the VAX transfer vectors from reading in the
+$! Alpha/Itanium gnv_libcurl_symbols.opt file.
+$!
+$! This procedure patches the VAX Macro32 assembler to be case sensitive
+$! and then compiles the generated
+$!
+$! The output of this procedure is:
+$!     gnv_libcurl_xfer.mar_exact
+$!     gnv_libcurl_xfer.obj
+$!     gnv_libcurl_xfer.opt
+$!     macro32_exactcase.exe
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 20-Jul-2013  J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$ on warning then goto all_exit
+$!
+$! Want hard tabs in the generated file.
+$ tab[0,8] = 9
+$!
+$! This procedure is used on VAX only
+$ if (f$getsyi("HW_MODEL") .ge. 1024)
+$ then
+$   write sys$output "This procedure is only used on VAX."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Get the libcurl version to generate the ident string.
+$! ident string is max of 31 characters.
+$!
+$ ident_string = "unknown"
+$ open/read cver [-.-.include.curl]curlver.h
+$cver_loop:
+$ read/end=cver_loop_end cver line_in
+$ line_in = f$edit(line_in, "COMPRESS,TRIM")
+$ if line_in .eqs. "" then goto cver_loop
+$ code = f$extract(0, 1, line_in)
+$ if code .nes. "#" then goto cver_loop
+$ directive = f$element(0, " ", line_in)
+$ if directive .nes. "#define" then goto cver_loop
+$ name = f$element(1, " ", line_in)
+$ if name .nes. "LIBCURL_VERSION" then goto cver_loop
+$ ident_string = f$element(2, " ", line_in) - "" - ""
+$cver_loop_end:
+$ close cver
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$! Write out the header
+$ gosub do_header
+$!
+$ open/append vopt gnv_libcurl_xfer.mar_exact
+$ write vopt tab,".IDENT /", ident_string, "/"
+$!
+$ write vopt tab, ".PSECT LIBCURL_XFERVECTORS  -"
+$ write vopt tab,tab,tab, "PIC,USR,CON,REL,GBL,SHR,EXE,RD,NOWRT,QUAD"
+$ write vopt ""
+$ write vopt tab, "SPARE", tab, "; never delete this spare"
+$ write vopt ";"
+$ write vopt ";", tab, "Exact case and upper case transfer vectors"
+$!
+$ alias_count = 0
+$vector_loop:
+$!
+$!  Read in symbol_vector
+$!
+$   read/end=vector_loop_end aopt line_in
+$   line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$   if line .eqs. "" then goto vector_loop
+$!
+$   line_u = f$edit(line, "UPCASE")
+$   key = f$element(0, "=", line_u)
+$   if (key .eqs. "SYMBOL_VECTOR")
+$   then
+$       symbol_string = f$element(1, "=", line) - "("
+$       symbol_type = f$element(2, "=", line_u) - ")"
+$       symbol_name = f$element(1, "/", symbol_string)
+$       if symbol_type .nes. "PROCEDURE"
+$       then
+$           write sys$output "%CURLBUILD-W-NOTPROC, " + -
+$                            "This procedure can only handle procedure vectors"
+$           write sys$output -
+"Data vectors require manual construction for which this procedure or"
+$           write sys$output -
+"the shared library needs to be updated to resolve."
+$           write sys$output -
+"the preferred solution is to have a procedure return the address of the "
+$           write sys$output -
+"the variable instead of having a variable, as if the size of the variable "
+            write sys$output -
+"changes, the symbol vector is no longer backwards compatible."
+$       endif
+$       if (symbol_name .eqs. "/")
+$       then
+$           symbol_name = symbol_string
+$           write vopt tab, symbol_type, tab, symbol_name
+$       else
+$           alias_count = alias_count + 1
+$           symbol_alias = f$element(0, "/", symbol_string)
+$           write vopt -
+                  tab, "''symbol_type_U", tab, symbol_name, tab, symbol_alias
+$       endif
+$   endif
+$   goto vector_loop
+$vector_loop_end:
+$!
+$! End of pass one, second pass needed if aliases exist
+$ close aopt
+$!
+$ if alias_count .eq. 0 then goto finish_file
+$!
+$! Start pass 2, write stub routine header
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$alias_loop:
+$!
+$!  Read in symbol_vector
+$!
+$   read/end=alias_loop_end aopt line_in
+$   line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$   if line .eqs. "" then goto alias_loop
+$!
+$   line_u = f$edit(line, "UPCASE")
+$   key = f$element(0, "=", line_u)
+$   if (key .eqs. "SYMBOL_VECTOR")
+$   then
+$       symbol_string = f$element(1, "=", line) - "("
+$       symbol_type = f$element(2, "=", line_u) - ")"
+$       symbol_name = f$element(1, "/", symbol_string)
+$       if (symbol_name .eqs. "/")
+$       then
+$           symbol_name = symbol_string
+$       else
+$           alias_count = alias_count + 1
+$           symbol_alias = f$element(0, "/", symbol_string)
+$           write vopt tab, ".ENTRY", tab, symbol_alias, ", ^M<>"
+$       endif
+$   endif
+$   goto alias_loop
+$! read in symbol_vector
+$! if not alias, then loop
+$! write out subroutine name
+$!
+$alias_loop_end:
+$!
+$ write vopt tab, "MOVL #1, R0"
+$ write vopt tab, "RET"
+$!
+$finish_file:
+$!
+$ write vopt ""
+$ write vopt tab, ".END"
+$!
+$ close aopt
+$ close vopt
+$!
+$! Patch the Macro32 compiler
+$!----------------------------
+$ patched_macro = "sys$disk:[]macro32_exactcase.exe"
+$ if f$search(patched_macro) .eqs. ""
+$ then
+$   copy sys$system:macro32.exe 'patched_macro'
+$   patch @macro32_exactcase.patch
+$ endif
+$ define/user macro32 'patched_macro'
+$ macro/object=gnv_libcurl_xfer.obj gnv_libcurl_xfer.mar_exact
+$!
+$! Create the option file for linking the shared image.
+$ create gnv_libcurl_xfer.opt
+$ open/append lco gnv_libcurl_xfer.opt
+$ write lco "gsmatch=lequal,1,1"
+$ write lco "cluster=transfer_vector,,,''default_dir'gnv_libcurl_xfer"
+$ write lco "collect=libcurl_global, libcurl_xfervectors"
+$ close lco
+$!
+$!
+$ goto all_exit
+$!
+$! Process the header
+$do_header:
+$!
+$! Force the mode of the file to same as text editor generated.
+$ create gnv_libcurl_xfer.mar_exact
+$deck
+; File: gnv_libcurl_xfer.mar_exact
+;
+; VAX transfer vectors
+;
+; This needs to be compiled with a specialized patch on Macro32 to make it
+; preserve the case of symbols instead of converting it to uppercase.
+;
+; This patched Macro32 requires all directives to be in upper case.
+;
+; There are three sets of symbols for transfer vectors here.
+;
+; The first for upper case which matches the tradition method of generating
+; VAX transfer vectors.
+;
+; The second is the exact case for compatibilty with open source C programs
+; that expect exact case symbols in images.  These are separated because a
+; previous kit had only upper case symbols.
+;
+; The third is the routine stub that is used to resolve part of the upper
+; case transfer vectors, with exact case entry symbols.
+;
+; When you add routines, you need to add them after the second set of transfer
+; vectors for both upper and exact case, and then additional entry points
+; in upper case added to stub routines.
+;
+;*************************************************************************
+
+        .TITLE libcurl_xfer - Transfer vector for libcurl
+        .DISABLE GLOBAL
+
+;
+; Macro to generate a transfer vector entry
+;
+        .MACRO  PROCEDURE       NAME
+        .EXTRN          'NAME
+        .ALIGN  QUAD
+        .TRANSFER       'NAME
+        .MASK           'NAME
+        JMP             'NAME+2
+        .ENDM
+
+        .MACRO  PROCEDUREU      NAME    NAMEU
+        .EXTRN          'NAME
+        .ALIGN  QUAD
+        .TRANSFER       'NAMEU
+        .MASK           'NAME
+        JMP             'NAME+2
+
+        .ENDM
+;
+;
+; Macro to reserve a spare entry.
+;
+        .MACRO  SPARE
+        .ALIGN QUAD
+        .ALIGN QUAD
+        .QUAD   0
+        .ENDM
+
+$EOD
+$!
+$!
+$ return
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
diff --git a/packages/vms/gnv_conftest.c_first b/packages/vms/gnv_conftest.c_first
new file mode 100644 (file)
index 0000000..8645b0e
--- /dev/null
@@ -0,0 +1,61 @@
+/* File: GNV$CONFTEST.C_FIRST
+ *
+ * $Id$
+ *
+ * Copyright 2009, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* This is needed for Configure tests to get the correct exit status */
+void __posix_exit(int __status);
+#define exit(__p1) __posix_exit(__p1)
+
+/* Fake pass the test to find a standard ldap routine that we know is */
+/* present on VMS, but with the wrong case for the symbol */
+char ldap_url_parse(void) {return 0;}
+
+/* These are to pass the test that does not use headers */
+/* Because configure does an #undef which keeps us from using #define */
+/* char CRYPTO_add_lock(void) {return 0;} */
+char SSL_connnect(void) {return 0;}
+char ENGINE_init(void) {return 0;}
+char RAND_status(void) {return 0;}
+/* char RAND_screen(void) {return 0;} In headers, but not present */
+char RAND_egd(void) {return 0;}
+char CRYPTO_cleanup_all_ex_data(void) {return 0;}
+char SSL_get_shutdown(void) {return 0;}
+char ENGINE_load_builtin_engines (void) {return 0;}
+
+/* And these are to pass the test that uses headers. */
+/* Because the HP OpenSSL transfer vectors are currently in Upper case only */
+#pragma message disable macroredef
+#define CRYPTO_add_lock CRYPTO_ADD_LOCK
+#define SSL_connect SSL_CONNECT
+#define ENGINE_init ENGINE_INIT
+#define RAND_status RAND_STATUS
+/* #define RAND_screen RAND_SCREEN */
+#define RAND_egd RAND_EGD
+#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
+#define SSL_get_shutdown SSL_GET_SHUTDOWN
+#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
+
+/* Can not use the #define macro to fix the case on CRYPTO_lock because */
+/* there is a macro CRYPTO_LOCK that is a number */
+
+/* After all the work to get configure to pass the CRYPTO_LOCK tests,
+ * it turns out that VMS does not have the CRYPTO_LOCK symbol in the
+ * transfer vector, even though it is in the header file.
+ */
+
diff --git a/packages/vms/gnv_curl_configure.sh b/packages/vms/gnv_curl_configure.sh
new file mode 100644 (file)
index 0000000..f714210
--- /dev/null
@@ -0,0 +1,46 @@
+# File: gnv_curl_configure.sh
+#
+# $Id$
+#
+# Set up and run the configure script for Curl so that it can find the
+# proper options for VMS.
+#
+# Copyright 2009, John Malmberg
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009  J. Malmberg
+# 28-Dec-2012  J. Malmberg     Update for Bash 4.2.39
+#==========================================================================
+#
+# POSIX exit mode is needed for UNIX shells.
+export GNV_CC_MAIN_POSIX_EXIT=1
+#
+# Where to look for the helper files.
+export GNV_OPT_DIR=.
+#
+# How to find the SSL library files.
+export LIB_OPENSSL=/SSL_LIB
+#
+# Override configure adding -std1 which is too strict for what curl
+# actually wants.
+export GNV_CC_QUALIFIERS=/STANDARD=RELAXED
+#
+# Set the directory to where the Configure script actually is.
+cd ../..
+#
+#
+./configure  --prefix=/usr --exec-prefix=/usr --disable-dependency-tracking \
+ --disable-libtool-lock --with-gssapi --disable-ntlm-wb \
+ --with-ca-path=gnv\$curl_ca_path
+#
diff --git a/packages/vms/gnv_libcurl_symbols.opt b/packages/vms/gnv_libcurl_symbols.opt
new file mode 100644 (file)
index 0000000..8465592
--- /dev/null
@@ -0,0 +1,181 @@
+! File GNV$LIBCURL_SYMBOLS.OPT
+!
+! $Id$
+!
+! This file must be manually maintained to allow upward compatibility
+! The SYMBOL_VECTORs are set up so that applications can be compiled
+! with either case sensitive symbol names or the default of uppercase.
+! This is because many of the Open Source applications that would call
+! the LIBCURL library need to be built with case sensitive names.
+!
+! Automatic generation is currently not practical because the order of
+! the entries are important for upward compatibility.
+!
+! The GSMATCH is manually set to the major version of 1, with the minor
+! version being the next two sections multiplied by a power of 10 to
+! become the minor version.
+! So LIBCURL 7.18.1 becomes 1,718010.
+! And a future LIBCURL of 7.18.2 would be 1,718020 if new routines were added.
+!
+! This leaves some spare digits for minor patches.
+!
+! Note that the GSMATCH does not need to have any real relationship to the
+! actual package version number.
+!
+! New SYMBOL_VECTORs must be added to the end of this list, and added
+! in pairs for both exact and with an uppercase alias.
+! If the public symbol is more than 31 characters long, then a special
+! shortened symbol will be exported, and three aliases should be created,
+! The aliases will be the special shortened uppercase alias, and both
+! upper and lowercase versions of a truncated name (preferred) or a
+! modified manually shortened name if a truncated name will not be
+! unique.
+!
+! Routines can not be removed, the functionality must be maintained.
+! If a new routine is supplied where the arguments are incompatible with
+! the older version, both versions are needed to be maintained.
+! The old version can be given a different name, but must be in the same
+! SYMBOL_VECTOR positions in this file.
+!
+! Changing the number of parameters for an existing routine does not require
+! maintaining multiple versions as long as the routine can be called with
+! the old number of parameters.
+!
+! Copyright 2009, John Malmberg
+!
+! Permission to use, copy, modify, and/or distribute this software for any
+! purpose with or without fee is hereby granted, provided that the above
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!============================================================================
+GSMATCH=LEQUAL,1,719050
+CASE_SENSITIVE=YES
+SYMBOL_VECTOR=(curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STREQUAL/curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STRNEQUAL/curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMADD/curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMGET/curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMFREE/curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETENV/curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(curl_version=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION/curl_version=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_ESCAPE/curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_ESCAPE/curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_UNESCAPE/curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_UNESCAPE/curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_free=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FREE/curl_free=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT/curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT_MEM/curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_CLEANUP/curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_APPEND/curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_FREE_ALL/curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETDATE/curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_INIT/curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_SETOPT/curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_CLEANUP/curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION_INFO/curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_STRERROR/curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_STRERROR/curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_pause=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PAUSE/curl_easy_pause=PROCEDURE)
+!
+! easy.h
+SYMBOL_VECTOR=(curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_INIT/curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SETOPT/curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PERFORM/curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_CLEANUP/curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_GETINFO/curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_DUPHANDLE/curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RESET/curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RECV/curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_send=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SEND/curl_easy_send=PROCEDURE)
+!
+! multi.h
+SYMBOL_VECTOR=(curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INIT/curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ADD_HANDLE/curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_REMOVE_HANDLE/curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_FDSET/curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_PERFORM/curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_CLEANUP/curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INFO_READ/curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_STRERROR/curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET/curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ACTION/curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ALL/curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_TIMEOUT/curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SETOPT/curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_assign=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ASSIGN/curl_multi_assign=PROCEDURE)
+!
+! mprintf.h
+SYMBOL_VECTOR=(curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MPRINTF/curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MFPRINTF/curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSPRINTF/curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSNPRINTF/curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVPRINTF/curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVFPRINTF/curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSPRINTF/curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSNPRINTF/curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MAPRINTF/curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvaprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVAPRINTF/curl_mvaprintf=PROCEDURE)
diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com
new file mode 100644 (file)
index 0000000..fadbbcc
--- /dev/null
@@ -0,0 +1,846 @@
+$! File: gnv_link_curl.com
+$!
+$! $Id$
+$!
+$! File to build images using gnv$libcurl.exe
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 10-Jun-2009  J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$ on warning then goto all_exit
+$!
+$! On VAX, we need to generate a Macro transfer vector.
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$   @generate_vax_transfer.com
+$   arch_name = "VAX"
+$ else
+$    arch_name = ""
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$    if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$!   Extended parsing option starts with VMS 7.3-1.
+$!   There is no 7.4, so that simplifies the parse a bit.
+$!
+$    node_swvers = f$getsyi("node_swvers")
+$    version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$    maj_ver = f$element(0, ".", version_patch)
+$    min_ver_patch = f$element(1, ".", version_patch)
+$    min_ver = f$element(0, "-", min_ver_patch)
+$    patch = f$element(1, "-", min_ver_patch)
+$    if patch .eqs. "-" then patch = ""
+$    parse_x = 0
+$    if maj_ver .ges. "8"
+$    then
+$       parse_x = 1
+$    else
+$       if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$       then
+$          parse_x = 1
+$       endif
+$    endif
+$    if parse_x
+$    then
+$       parse_style = f$getjpi("", "parse_style_perm")
+$    endif
+$ endif
+$!
+$!
+$! Move to where the base directories.
+$ set def [--]
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$   message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$   link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ cflags = "/list/show=(expan,includ)"
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$   cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$ endif
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$!
+$!
+$! Need to build the module to test the HP OpenSSL version
+$!--------------------------------------------------------
+$ if arch_name .nes. "VAX"
+$ then
+$   rpt_obj = "[.packages.vms]report_openssl_version.obj
+$   if f$search(rpt_obj) .eqs. ""
+$   then
+$       cc'cflags' 'default_dir'report_openssl_version.c/obj='rpt_obj'
+$   endif
+$   purge 'rpt_obj'
+$   rename 'rpt_obj' ;1
+$!
+$   link/exe='default_dir'report_openssl_version.exe 'rpt_obj'
+$   report_openssl_version := $'default_dir'report_openssl_version.exe
+$ endif
+$!
+$!
+$ base_link_opt_file = "[.packages.vms.''arch_name']gnv_libcurl_linker.opt"
+$ share_link_opt_file = "[.packages.vms.''arch_name']gnv_ssl_libcurl_linker.opt"
+$ if f$search(base_link_opt_file) .eqs. ""
+$ then
+$   base_link_opt_file = "[.packages.vms]gnv_libcurl_linker.opt"
+$   share_link_opt_file = "[.packages.vms]gnv_ssl_libcurl_linker.opt"
+$   if f$search(base_link_opt_file) .eqs. ""
+$   then
+$       write sys$output "Can not find base library option file!"
+$       goto all_exit
+$   endif
+$ endif
+$!
+$! Create the a new option file with special fixup for HP SSL
+$! For a shared image, we always want ZLIB and 32 bit HPSSL
+$!
+$ if f$search("gnv$libzshr32") .eqs. ""
+$ then
+$   write sys$output "VMSPORTS/GNV LIBZ Shared image not found!"
+$   goto all_exit
+$ endif
+$!
+$!
+$! Need to check the version of the HP SSL shared image.
+$!
+$! VAX platform can not be checked this way, it appears symbol lookup
+$! was disabled.  VAX has not been updated in a while.
+$ if arch_name .eqs. "VAX"
+$ then
+$   hp_ssl_libcrypto32 = "sys$common:[syslib]ssl$libcrypto_shr32.exe"
+$   hp_ssl_libssl32 = "sys$common:[syslib]ssl$libssl_shr32.exe"
+$   if f$search(hp_ssl_libcrypto32) .nes. ""
+$   then
+$       use_hp_ssl = 1
+$       curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$       curl_ssl_libssl32 = hp_ssl_libssl32
+$       curl_ssl_version = "OpenSSL/0.9.6g"
+$   else
+$       write sys$output "HP OpenSSL Shared images not found!"
+$       goto all_exit
+$   endif
+$ else
+$!
+$!   Minimum HP version we can use reports:
+$!   "OpenSSL 0.9.8w 23 Apr 2012"
+$!
+$   use_hp_ssl = 0
+$   hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$   hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$   if f$search(hp_ssl_libcrypto32) .nes. ""
+$   then
+$       curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$       curl_ssl_libssl32 = hp_ssl_libssl32
+$       report_openssl_version 'hp_ssl_libcrypto32' hp_ssl_version
+$   endif
+$!
+$   if f$type(hp_ssl_version) .eqs. "STRING"
+$   then
+$       curl_ssl_version = hp_ssl_version
+$       full_version = f$element(1, " ", hp_ssl_version)
+$       ver_maj = f$element(0, ".", full_version)
+$       ver_min = f$element(1, ".", full_version)
+$       ver_patch = f$element(2, ".", full_version)
+$       ver_patch_len = f$length(ver_patch)
+$       ver_patchnum = f$extract(0, ver_patch_len - 1, ver_patch)
+$       ver_patchltr = f$extract(ver_patch_len - 1, 1, ver_patch)
+$       if 'ver_maj' .ge. 0
+$       then
+$           if 'ver_min' .ge. 9
+$           then
+$               if 'ver_patchnum' .ge. 8
+$               then
+$                   if ver_patchltr .ges. "w" then use_hp_ssl = 1
+$               endif
+$           endif
+$       endif
+$       if use_hp_ssl .eq. 0
+$       then
+$           write sys$output -
+   " HP OpenSSL version of ""''hp_ssl_version'"" is too old for shared libcurl!"
+$       endif
+$   else
+$       write sys$output "Unable to get version of HP OpenSSL"
+$   endif
+$!
+$   gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$   gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$   if f$search(gnv_ssl_libcrypto32) .nes. ""
+$   then
+$       report_openssl_version 'gnv_ssl_libcrypto32' gnv_ssl_version
+$   endif
+$!
+$   use_gnv_ssl = 0
+$   if f$type(gnv_ssl_version) .eqs. "STRING"
+$   then
+$       gnv_full_version = f$element(1, " ", gnv_ssl_version)
+$       gnv_ver_maj = f$element(0, ".", gnv_full_version)
+$       gnv_ver_min = f$element(1, ".", gnv_full_version)
+$       gnv_ver_patch = f$element(2, ".", gnv_full_version)
+$       gnv_ver_patch_len = f$length(gnv_ver_patch)
+$       gnv_ver_patchnum = f$extract(0, gnv_ver_patch_len - 1, gnv_ver_patch)
+$       gnv_ver_patchltr = f$extract(gnv_ver_patch_len - 1, 1, gnv_ver_patch)
+$       if 'gnv_ver_maj' .ge. 0
+$       then
+$           if 'gnv_ver_min' .ge. 9
+$           then
+$               if 'gnv_ver_patchnum' .ge. 8
+$               then
+$                   if gnv_ver_patchltr .ges. "w" then use_gnv_ssl = 1
+$               endif
+$           endif
+$       endif
+$       if use_gnv_ssl .eq. 0
+$       then
+$           write sys$output -
+   "GNV OpenSSL version of ""''gnv_ssl_version'" is too old for shared libcurl!"
+$       endif
+$!
+$!      Prefer to break the tie with the lowest supported version
+$!      For simplicity, if the GNV image is present, it will be used.
+$!      Version tuple is not a simple compare.
+$!
+$       if use_gnv_ssl .eq. 1 then
+$           curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$           curl_ssl_libssl32 = gnv_ssl_libssl32
+$           curl_ssl_version = gnv_ssl_version
+$           use_hp_ssl = 0
+$       endif
+!$!
+$   else
+$       write sys$output "Unable to get version of GNV OpenSSL"
+$   endif
+$!
+$!  Need to write a release note section about HP OpenSSL
+$!
+$create 'default_dir'hp_ssl_release_info.txt
+$deck
+This package is built on with the OpenSSL version listed below and requires
+the shared images from the HP OpenSSL product that is kitted with that
+version or a compatible later version.
+
+For Alpha and IA64 platforms, see the url below to register to get the
+download URL.  The kit will be HP 1.4-467 or later.
+  http://h71000.www7.hp.com/openvms/products/ssl/ssl.html
+
+For VAX, use the same registration, but remove the kit name from any of the
+download URLs provided and put in CPQ-VAXVMS-SSL-V0101-B-1.PCSI-DCX_VAXEXE
+
+If your system can not be upgraded to a compatible version of OpenSSL, then
+you can extract the two shared images from the kit and place them in the
+[vms$common.gnv.lib]directory of the volume that you are installing GNV and
+or GNV compatible components like Curl.
+
+If GNV is installed, you must run the GNV startup procedure before these steps
+and before installing Curl.
+
+
+  1.  make sure that [vms$common.gnv.lib] exists by using the following
+      commands.  We want the directory to be in lowercase except on VAX.
+
+    $SET PROCESS/PARSE=extend !If not VAX.
+    $CREATE/DIR device:[vms$common.gnv.lib]/prot=w:re
+
+  2. Extract the ssl$crypto_shr32.exe and ssl$libssl_shr32.exe images.
+
+    $PRODUCT EXTRACT FILE -
+      /select=(ssl$libcrypto_shr32.exe,ssl$libssl_shr32.exe)-
+      /source=device:[dir] -
+      /options=noconfirm -
+      /destination=device:[vms$common.gnv.lib] SSL
+
+The [vms$common.sys$startup}curl_startup.com procedure will then configure
+libcurl to use these shared images instead of the system ones.
+
+When you upgrade SSL on VMS to the newer version of HP SSL, then these copies
+should be deleted.
+
+$eod
+$!
+$ open/append sslr 'default_dir'hp_ssl_release_info.txt
+$ write sslr "OpenSSL version used for building this kit: ",curl_ssl_version
+$ write sslr ""
+$ close sslr
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr32"
+$ if f$search(try_shr) .nes. ""
+$ then
+$   libzshr_line = "''try_shr'/share"
+$ else
+$   write sys$output "''try_shr' image not found!"
+$   goto all_exit
+$ endif
+$!
+$!
+$ gssrtlshr_line = ""
+$ if arch_name .nes. "VAX"
+$ then
+$   try_shr = "sys$share:gss$rtl"
+$   if f$search("''try_shr'.exe") .nes. ""
+$   then
+$       gssrtlshr_line = "''try_shr'/share"
+$   else
+$       write sys$output "''try_shr' image not found!"
+$       goto all_exit
+$   endif
+$ endif
+$!
+$!
+$!
+$ if f$search(share_link_opt_file) .eqs. ""
+$ then
+$   create 'share_link_opt_file'
+$   open/append slopt 'share_link_opt_file'
+$   if libzshr_line .nes. "" then write slopt libzshr_line
+$   if gssrtlshr_line .nes. "" then write slopt gssrtlshr_line
+$   write slopt "gnv$curl_ssl_libcryptoshr32/share"
+$   write slopt "gnv$curl_ssl_libsslshr32/share"
+$   close slopt
+$ endif
+$!
+$! DCL build puts curllib in architecture directory
+$! GNV build uses the makefile.
+$ libfile = "[.packages.vms.''arch_name']curllib.olb"
+$ if f$search(libfile) .nes. ""
+$ then
+$   olb_file = libfile
+$ else
+$   ! GNV based build
+$   libfile = "[.lib.^.libs]libcurl.a"
+$   if f$search(libfile) .nes. ""
+$   then
+$       olb_file = libfile
+$   else
+$       write sys$output -
+  "Can not build shared image, libcurl object library not found!"
+$       goto all_exit
+$   endif
+$ endif
+$!
+$gnv_libcurl_share = "''default_dir'gnv$libcurl.exe"
+$!
+$set ver
+$ if f$search(gnv_libcurl_share) .eqs. ""
+$ then
+$   if arch_name .nes. "VAX"
+$   then
+$       define/user gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$       define/user gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$       link/dsf='default_dir'gnv$libcurl.dsf/share='gnv_libcurl_share' -
+            /map='default_dir'gnv$libcurl.map -
+            gnv_packages_vms:gnv_libcurl_symbols.opt/opt,-
+            'olb_file'/lib,-
+            'share_link_opt_file'/opt
+$   else
+$!      VAX will not allow the logical name hack for the
+$!      SSL libcryto library, it is pulling it in twice if I try it.
+$       link/share='gnv_libcurl_share'/map='default_dir'gnv$libcurl.map -
+            gnv_packages_vms:gnv_libcurl_xfer.opt/opt,-
+            'olb_file'/lib,-
+            'base_link_opt_file'/opt
+$   endif
+$ endif
+$!
+$!
+$ if f$search("[.src]curl-tool_main.o") .nes. ""
+$ then
+$!  From src/makefile.inc:
+$!  # libcurl has sources that provide functions named curlx_* that aren't
+$!  # part of the official API, but we re-use the code here to avoid
+$!  # duplication.
+$!
+$!
+$   if f$search("[.src]curl.exe") .eqs. ""
+$   then
+$       define/user gnv$libcurl 'gnv_libcurl_share'
+$       link'ldebug'/exe=[.src]curl.exe/dsf=[.src]curl.dsf -
+           [.src]curl-tool_main.o, [.src]curl-tool_binmode.o, -
+           [.src]curl-tool_bname.o, [.src]curl-tool_cb_dbg.o, -
+           [.src]curl-tool_cb_hdr.o, [.src]curl-tool_cb_prg.o, -
+           [.src]curl-tool_cb_rea.o, [.src]curl-tool_cb_see.o, -
+           [.src]curl-tool_cb_wrt.o, [.src]curl-tool_cfgable.o, -
+           [.src]curl-tool_convert.o, [.src]curl-tool_dirhie.o, -
+           [.src]curl-tool_doswin.o, [.src]curl-tool_easysrc.o, -
+           [.src]curl-tool_formparse.o, [.src]curl-tool_getparam.o, -
+           [.src]curl-tool_getpass.o, [.src]curl-tool_help.o, -
+           [.src]curl-tool_helpers.o, [.src]curl-tool_homedir.o, -
+           [.src]curl-tool_hugehelp.o, [.src]curl-tool_libinfo.o, -
+           [.src]curl-tool_metalink.o, [.src]curl-tool_mfiles.o, -
+           [.src]curl-tool_msgs.o, [.src]curl-tool_operate.o, -
+           [.src]curl-tool_operhlp.o, [.src]curl-tool_panykey.o, -
+           [.src]curl-tool_paramhlp.o, [.src]curl-tool_parsecfg.o, -
+           [.src]curl-tool_setopt.o, [.src]curl-tool_sleep.o, -
+           [.src]curl-tool_urlglob.o, [.src]curl-tool_util.o, -
+           [.src]curl-tool_vms.o, [.src]curl-tool_writeenv.o, -
+           [.src]curl-tool_writeout.o, [.src]curl-tool_xattr.o, -
+           [.src]curl-strtoofft.o, [.src]curl-strdup.o, [.src]curl-rawstr.o, -
+           [.src]curl-nonblock.o, gnv_packages_vms:curlmsg.obj,-
+           sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$   endif
+$ else
+$   curl_exe = "[.src]curl.exe"
+$   curl_dsf = "[.src]curl.dsf"
+$   curl_main = "[.packages.vms.''arch_name']tool_main.obj"
+$   curl_src = "[.packages.vms.''arch_name']curlsrc.olb"
+$   curl_lib = "[.packages.vms.''arch_name']curllib.olb"
+$   strtoofft = "strtoofft"
+$   strdup = "strdup"
+$   rawstr = "rawstr"
+$   nonblock = "nonblock"
+$!
+$!  Extended parse style requires special quoting
+$!
+$   if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED")
+$   then
+$       strtoofft = """strtoofft"""
+$       strdup = """strdup"""
+$       rawstr = """rawstr"""
+$       nonblock = """nonblock"""
+$   endif
+$   if f$search(curl_exe) .eqs. ""
+$   then
+$       define/user gnv$libcurl 'gnv_libcurl_share'
+$       link'ldebug'/exe='curl_exe'/dsf='curl_dsf' -
+           'curl_main','curl_src'/lib, -
+           'curl_lib'/library/include=-
+           ('strtoofft', 'strdup', 'rawstr', 'nonblock'),-
+           gnv_packages_vms:curlmsg.obj,-
+           sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$   endif
+$ endif
+$!
+$set nover
+$!
+$! in6addr_missing so skip building:
+$! [.server]sws.o
+$! [.server]sockfilt.o
+$! [.server]tftpd.o
+$!
+$!
+$ target = "10-at-a-time"
+$ if f$search("[.docs.examples]''target'.o") .eqs. ""
+$ then
+$   write sys$output "examples not built"
+$   goto all_exit
+$ endif
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "anyauthput"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "certinfo"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "cookie_interface"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "debug"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fileupload"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fopen"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$target = "ftpget"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpgetresp"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpupload"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinfo"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinmemory"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "http-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpcustomheader"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpput"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "https"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-app"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-debugcallback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-double"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-single"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "persistant"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "post-callback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "postit2"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sendrecv"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sepheaders"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simple"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplepost"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplessl"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$   define/user gnv$libcurl 'gnv_libcurl_share'
+$   link'ldebug'/exe=[.docs.examples]'target'.exe-
+    /dsf=[.docs.examples]'target'.dsf -
+    [.docs.examples]'target'.o,-
+    gnv$'target'.opt/opt,-
+    sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$! =============== End of docs/examples =========================
+$!
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
+$!
diff --git a/packages/vms/hpssl_alpha.opt b/packages/vms/hpssl_alpha.opt
deleted file mode 100644 (file)
index 3ad9fbd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/hpssl_ia64.opt b/packages/vms/hpssl_ia64.opt
deleted file mode 100644 (file)
index 9b22014..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR.EXE/SHARE
diff --git a/packages/vms/hpssl_vax.opt b/packages/vms/hpssl_vax.opt
deleted file mode 100644 (file)
index 3ad9fbd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/ldap.opt b/packages/vms/ldap.opt
deleted file mode 100644 (file)
index 23f1ee4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-SYS$SHARE:LDAP$SHR.EXE /SHARE
diff --git a/packages/vms/macro32_exactcase.patch b/packages/vms/macro32_exactcase.patch
new file mode 100644 (file)
index 0000000..eda5cac
--- /dev/null
@@ -0,0 +1,11 @@
+macro32_exactcase.exe
+SE EC
+^X00000001
+RE /I
+^X00012B1D
+'BICB2 #^X00000020,R3'
+EXIT
+'BICB2 #^X00000000,R3'
+EXI
+U
+EXI
diff --git a/packages/vms/make_gnv_curl_install.sh b/packages/vms/make_gnv_curl_install.sh
new file mode 100644 (file)
index 0000000..d2150e6
--- /dev/null
@@ -0,0 +1,45 @@
+# File: make_gnv_curl_install.sh
+#
+# $Id$
+#
+# Set up and run the make script for Curl.
+#
+# This makes the library, the curl binary and attempts an install.
+# A search list should be set up for GNU (GNV$GNU).
+#
+# Copyright 2009, John Malmberg
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009  J. Malmberg
+#==========================================================================
+#
+#
+# Needed VMS build setups for GNV.
+export GNV_OPT_DIR=.
+export GNV_CC_QUALIFIERS=/DEBUG/OPTIMIZE/STANDARD=RELAXED\
+/float=ieee_float/ieee_mode=denorm_results
+export GNV_CXX_QUALIFIERS=/DEBUG/OPTIMIZE/float=ieee/ieee_mode=denorm_results
+export GNV_CC_NO_INC_PRIMARY=1
+#
+#
+# POSIX exit mode is needed for UNIX shells.
+export GNV_CC_MAIN_POSIX_EXIT=1
+make
+cd ../..
+# adjust the libcurl.pc file, GNV currently ignores the Lib: line.
+# but is noisy about it, so we just remove it.
+sed -e 's/^Libs:/#Libs:/g' libcurl.pc > libcurl.pc_new
+rm libcurl.pc
+mv libcurl.pc_new libcurl.pc
+make install
diff --git a/packages/vms/make_pcsi_curl_kit_name.com b/packages/vms/make_pcsi_curl_kit_name.com
new file mode 100644 (file)
index 0000000..f644fe3
--- /dev/null
@@ -0,0 +1,190 @@
+$! File: MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! $Id$
+$!
+$! Calculates the PCSI kit name for use in building an installation kit.
+$! PCSI is HP's PolyCenter Software Installation Utility.
+$!
+$! The results are stored in as logical names so that other procedures
+$! can use them.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 11-Jun-2009 J. Malmberg
+$!
+$!========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$! The producer is the name or common abbreviation for the entity that is
+$! making the kit.  It must be set as a logical name before running this
+$! procedure.
+$!
+$! HP documents the producer as the legal owner of the software, but for
+$! open source work, it should document who is creating the package for
+$! distribution.
+$!
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "The logical name GNV_PCSI_PRODUCER needs to be defined."
+$   write sys$output "This should be set to the common abbreviation or name of"
+$   write sys$output "the entity creating this kit.  If you are an individual"
+$   write sys$output "then use your initials."
+$   goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output "The logical name GNV_PCSI_PRODUCER_FULL_NAME needs to"
+$   write sys$output "be defined.  This should be set to the full name of"
+$   write sys$output "the entity creating this kit.  If you are an individual"
+$   write sys$output "then use your name."
+$   write sys$output "EX: DEFINE GNV_PCSI_PRODUCER_FULL_NAME ""First M. Last"""
+$   goto all_exit
+$ endif
+$!
+$ write sys$output "*****"
+$ write sys$output "***** Producer = ''producer'"
+$ write sys$output "*****"
+$!
+$!
+$! Base is one of 'VMS', 'AXPVMS', 'I64VMS', 'VAXVMS' and indicates what
+$! binaries are in the kit.  A kit with just 'VMS' can be installed on all
+$! architectures.
+$!
+$ base = "VMS"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ code = f$extract(0, 1, arch_type)
+$ if (code .eqs. "I") then base = "I64VMS"
+$ if (code .eqs. "V") then base = "VAXVMS"
+$ if (code .eqs. "A") then base = "AXPVMS"
+$!
+$!
+$ product = "curl"
+$!
+$!
+$! We need to get the version from curlver_h.  It will have a line like
+$! #define LIBCURL_VERSION "7.31.0"
+$!   or
+$! #define LIBCURL_VERSION "7.32.0-20130731".
+$!
+$! The dash indicates that this is a daily pre-release.
+$!
+$!
+$ open/read/error=version_loop_end vhf [.include.curl]curlver.h
+$ version_loop:
+$   read vhf line_in
+$   if line_in .eqs. "" then goto version_loop
+$   if f$locate("#define LIBCURL_VERSION ", line_in) .ne. 0
+$   then
+$       goto version_loop
+$   endif
+$   raw_version = f$element(2," ", line_in) - """" - """"
+$ version_loop_end:
+$ close vhf
+$!
+$!
+$ eco_level = ""
+$ if f$search("''default_dir'vms_eco_level.h") .nes. ""
+$ then
+$   open/read ef 'default_dir'vms_eco_level.h
+$ecolevel_loop:
+$       read/end=ecolevel_loop_end ef line_in
+$       prefix = f$element(0, " ", line_in)
+$       if prefix .nes. "#define" then goto ecolevel_loop
+$       key = f$element(1, " ", line_in)
+$       value = f$element(2, " ", line_in) - """" - """"
+$       if key .eqs. "VMS_ECO_LEVEL"
+$       then
+$           eco_level = "''value'"
+$           if eco_level .eqs. "0"
+$           then
+$               eco_level = ""
+$           else
+$               eco_level = "E" + eco_level
+$           endif
+$           goto ecolevel_loop_end
+$       endif
+$       goto ecolevel_loop
+$ecolevel_loop_end:
+$   close ef
+$ endif
+$!
+$!
+$! This translates to V0732-0 or D0732-0
+$! We encode the snapshot date into the version as an ECO since a daily
+$! can never have an ECO.
+$!
+$! version_type = 'V' for a production release, and 'D' for a build from a
+$! daiy snapshot of the curl source.
+$ majorver = f$element(0, ".", raw_version)
+$ minorver = f$element(1, ".", raw_version)
+$ raw_update = f$element(2, ".", raw_version)
+$ update = f$element(0, "-", raw_update)
+$ if update .eqs. "0" then update = ""
+$ daily_tag = f$element(1, "-", raw_update)
+$ vtype = "V"
+$ patch = ""
+$ if daily_tag .nes. "-"
+$ then
+$   vtype = "D"
+$   daily_tag_len = f$length(daily_tag)
+$   daily_tag = f$extract(4, daily_tag_len - 4, daily_tag)
+$   patch = vtype + daily_tag
+$   product = product + "_d"
+$ else
+$   daily_tag = ""
+$   if eco_level .nes. "" then patch = eco_level
+$ endif
+$!
+$!
+$ version_fao = "!2ZB!2ZB"
+$ mmversion = f$fao(version_fao, 'majorver', 'minorver')
+$ version = vtype + "''mmversion'"
+$ if update .nes. "" .or. patch .nes. ""
+$ then
+$!  The presence of a patch implies an update
+$   if update .eqs. "" .and. patch .nes. "" then update = "0"
+$   version = version + "-" + update + patch
+$   fversion = version
+$ else
+$   fversion = version
+$   version = version + "-"
+$ endif
+$!
+$! Kit type 1 is complete kit, the only type that this procedure will make.
+$ kittype = 1
+$!
+$! Write out a logical name for the resulting base kit name.
+$ name = "''producer'-''base'-''product'-''version'-''kittype'"
+$ define GNV_PCSI_KITNAME "''name'"
+$ fname = "''product'-''fversion'"
+$ define GNV_PCSI_FILENAME_BASE "''fname'"
+$ write sys$output "*****"
+$ write sys$output "***** GNV_PCSI_KITNAME = ''name'."
+$ write sys$output "***** GNV_PCSI_FILENAME_BASE = ''fname'."
+$ write sys$output "*****"
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit '$status'
diff --git a/packages/vms/openssl_alpha.opt b/packages/vms/openssl_alpha.opt
deleted file mode 100644 (file)
index b445119..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ia64.opt b/packages/vms/openssl_ia64.opt
deleted file mode 100644 (file)
index b445119..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_alpha.opt b/packages/vms/openssl_ssl_alpha.opt
deleted file mode 100644 (file)
index c726c2f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_ia64.opt b/packages/vms/openssl_ssl_ia64.opt
deleted file mode 100644 (file)
index c726c2f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_vax.opt b/packages/vms/openssl_ssl_vax.opt
deleted file mode 100644 (file)
index c726c2f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_vax.opt b/packages/vms/openssl_vax.opt
deleted file mode 100644 (file)
index b445119..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/pcsi_gnv_curl_file_list.txt b/packages/vms/pcsi_gnv_curl_file_list.txt
new file mode 100644 (file)
index 0000000..ab5b633
--- /dev/null
@@ -0,0 +1,127 @@
+! File: PCSI_GNV_CURL_FILE_LIST.TXT
+!
+! $Id$
+!
+! File list for building a PCSI kit.
+! Very simple format so that the parsing logic can be simple.
+! links first, directory second, and files third.
+!
+! link -> file tells procedure to create/remove a link on install/uninstall
+! If more than one link, consider using an alias file.
+!
+! [xxx.yyy]foo.dir is a directory file for the rename phase.
+! [xxx.yyy.foo] is a directory file for the create phase.
+! Each subdirectory needs to be on its own pair of lines.
+!
+! [xxx.yyy]file.ext is a file for the rename and add phases.
+!
+! Copyright 2009, John Malmberg
+!
+! Permission to use, copy, modify, and/or distribute this software for any
+! purpose with or without fee is hereby granted, provided that the above
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!
+! 15-Jun-2009  J. Malmberg
+!============================================================================
+[gnv.usr.bin]curl. -> [gnv.usr.bin]gnv$curl.exe
+[gnv.usr.bin]curl.exe -> [gnv.usr.bin]gnv$curl.exe
+[gnv]
+[000000]gnv.dir
+[gnv.usr]
+[gnv]usr.dir
+[gnv.usr]bin.dir
+[gnv.usr.bin]
+[gnv.usr]include.dir
+[gnv.usr.include]
+[gnv.usr.include]curl.dir
+[gnv.usr.include.curl]
+[gnv.usr]lib.dir
+[gnv.usr.lib]
+[gnv.usr.lib]pkgconfig.dir
+[gnv.usr.lib.pkgconfig]
+[gnv.usr]share.dir
+[gnv.usr.share]
+[gnv.usr.share]man.dir
+[gnv.usr.share.man]
+[gnv.usr.share.man]man1.dir
+[gnv.usr.share.man.man1]
+[gnv.usr.share.man]man3.dir
+[gnv.usr.share.man.man3]
+[gnv.usr.bin]curl-config.
+[gnv.usr.bin]gnv$curl.exe
+[gnv.usr.include.curl]curl.h
+[gnv.usr.include.curl]curlbuild.h
+[gnv.usr.include.curl]curlrules.h
+[gnv.usr.include.curl]curlver.h
+[gnv.usr.include.curl]easy.h
+[gnv.usr.include.curl]mprintf.h
+[gnv.usr.include.curl]multi.h
+[gnv.usr.include.curl]stdcheaders.h
+[gnv.usr.include.curl]typecheck-gcc.h
+[gnv.usr.lib]gnv$libcurl.exe
+[gnv.usr.lib]gnv$curlmsg.exe
+[gnv.usr.lib.pkgconfig]libcurl.pc
+[gnv.usr.share.man.man1]curl-config.1
+[gnv.usr.share.man.man1]curl.1
+[gnv.usr.share.man.man3]curl_easy_cleanup.3
+[gnv.usr.share.man.man3]curl_easy_duphandle.3
+[gnv.usr.share.man.man3]curl_easy_escape.3
+[gnv.usr.share.man.man3]curl_easy_getinfo.3
+[gnv.usr.share.man.man3]curl_easy_init.3
+[gnv.usr.share.man.man3]curl_easy_pause.3
+[gnv.usr.share.man.man3]curl_easy_perform.3
+[gnv.usr.share.man.man3]curl_easy_recv.3
+[gnv.usr.share.man.man3]curl_easy_reset.3
+[gnv.usr.share.man.man3]curl_easy_send.3
+[gnv.usr.share.man.man3]curl_easy_setopt.3
+[gnv.usr.share.man.man3]curl_easy_strerror.3
+[gnv.usr.share.man.man3]curl_easy_unescape.3
+[gnv.usr.share.man.man3]curl_escape.3
+[gnv.usr.share.man.man3]curl_formadd.3
+[gnv.usr.share.man.man3]curl_formfree.3
+[gnv.usr.share.man.man3]curl_formget.3
+[gnv.usr.share.man.man3]curl_free.3
+[gnv.usr.share.man.man3]curl_getdate.3
+[gnv.usr.share.man.man3]curl_getenv.3
+[gnv.usr.share.man.man3]curl_global_cleanup.3
+[gnv.usr.share.man.man3]curl_global_init.3
+[gnv.usr.share.man.man3]curl_global_init_mem.3
+[gnv.usr.share.man.man3]curl_mprintf.3
+[gnv.usr.share.man.man3]curl_multi_add_handle.3
+[gnv.usr.share.man.man3]curl_multi_assign.3
+[gnv.usr.share.man.man3]curl_multi_cleanup.3
+[gnv.usr.share.man.man3]curl_multi_fdset.3
+[gnv.usr.share.man.man3]curl_multi_info_read.3
+[gnv.usr.share.man.man3]curl_multi_init.3
+[gnv.usr.share.man.man3]curl_multi_perform.3
+[gnv.usr.share.man.man3]curl_multi_remove_handle.3
+[gnv.usr.share.man.man3]curl_multi_setopt.3
+[gnv.usr.share.man.man3]curl_multi_socket.3
+[gnv.usr.share.man.man3]curl_multi_socket_action.3
+[gnv.usr.share.man.man3]curl_multi_strerror.3
+[gnv.usr.share.man.man3]curl_multi_timeout.3
+[gnv.usr.share.man.man3]curl_multi_wait.3
+[gnv.usr.share.man.man3]curl_share_cleanup.3
+[gnv.usr.share.man.man3]curl_share_init.3
+[gnv.usr.share.man.man3]curl_share_setopt.3
+[gnv.usr.share.man.man3]curl_share_strerror.3
+[gnv.usr.share.man.man3]curl_slist_append.3
+[gnv.usr.share.man.man3]curl_slist_free_all.3
+[gnv.usr.share.man.man3]curl_strequal.3
+[gnv.usr.share.man.man3]curl_unescape.3
+[gnv.usr.share.man.man3]curl_version.3
+[gnv.usr.share.man.man3]curl_version_info.3
+[gnv.usr.share.man.man3]libcurl-easy.3
+[gnv.usr.share.man.man3]libcurl-errors.3
+[gnv.usr.share.man.man3]libcurl-multi.3
+[gnv.usr.share.man.man3]libcurl-share.3
+[gnv.usr.share.man.man3]libcurl-tutorial.3
+[gnv.usr.share.man.man3]libcurl.3
diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com
new file mode 100644 (file)
index 0000000..38a1a99
--- /dev/null
@@ -0,0 +1,171 @@
+$! File: PCSI_PRODUCT_GNV_CURL.COM
+$!
+$! $Id$
+$!
+$! This command file packages up the product CURL into a sequential
+$! format kit
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 16-Jun-2009  J.Malmberg
+$!
+$!=========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$!
+$ can_build = 1
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
+$   can_build = 0
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output -
+        "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
+$   can_build = 0
+$ endif
+$ stage_root_name = f$trnlnm("STAGE_ROOT")
+$ if stage_root_name .eqs. ""
+$ then
+$   write sys$output "STAGE_ROOT logical name has not been set."
+$   can_build = 0
+$ endif
+$!
+$ if (can_build .eq. 0)
+$ then
+$    write sys$output "Not able to build a kit."
+$    goto all_exit
+$ endif
+$!
+$! Make sure that the kit name is up to date for this build
+$!----------------------------------------------------------
+$ @MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! Make sure that the release note file name is up to date
+$!---------------------------------------------------------
+$ @BUILD_GNV_CURL_RELEASE_NOTES.COM
+$!
+$!
+$! Make sure that the source has been backed up.
+$!----------------------------------------------
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$ @backup_gnv_curl_src.com
+$!
+$! Regenerate the PCSI description file.
+$!--------------------------------------
+$ @BUILD_GNV_CURL_PCSI_DESC.COM
+$!
+$! Regenerate the PCSI Text file.
+$!---------------------------------
+$ @BUILD_GNV_CURL_PCSI_TEXT.COM
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product_name = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "" then updatepatch = ""
+$!
+$ version_fao = "!AS.!AS"
+$ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
+$ if updatepatch .nes. ""
+$ then
+$   version = "''mmversion'" + "-" + updatepatch
+$ else
+$   version = "''mmversion'"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$!
+$ source = "''default_dir'"
+$ src1 = "new_gnu:[usr.bin],"
+$ src2 = "new_gnu:[usr.include.curl],"
+$ src3 = "new_gnu:[usr.lib],"
+$ src4 = "new_gnu:[usr.lib.pkgconfig],"
+$ src5 = "new_gnu:[usr.share.man.man1],"
+$ src6 = "new_gnu:[usr.share.man.man3],"
+$ src7 = "new_gnu:[vms_src],"
+$ src8 = "new_gnu:[common_src],"
+$ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
+$ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
+$!
+$!
+$ base = ""
+$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
+$ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
+$ if arch_name .eqs. "IA64" then base = "I64VMS"
+$ if arch_name .eqs. "VAX" then base = "VAXVMS"
+$!
+$ if base .eqs. "" then exit 44
+$!
+$ pcsi_option = "/option=noconfirm"
+$ if arch_code .eqs. "V"
+$ then
+$   pcsi_option = ""
+$ endif
+$!
+$!
+$product package 'product_name' -
+ /base='base' -
+ /producer='producer' -
+ /source='source' -
+ /destination=STAGE_ROOT:[KIT] -
+ /material=('gnu_src','source') -
+ /format=sequential 'pcsi_option'
+$!
+$!
+$! VAX can not do a compressed kit.
+$! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
+$! kit.
+$!----------------------------------
+$if p1 .eqs. "COMPRESSED"
+$then
+$   if arch_code .nes. "V"
+$   then
+$       product copy /options=(novalidate, noconfirm) /format=compressed -
+        'product_name' -
+        /source=stage_root:[kit]/dest=stage_root:[kit] -
+        /version='version'/base='base'
+$   endif
+$endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
index 22fde88..1b24580 100644 (file)
@@ -11,6 +11,11 @@ History:
 15-MAR-2004, MSK, Updated to reflect the new files in this directory.
 14-FEB-2005, MSK, removed config-vms.h_with* file comments
 10-FEB-2010, SMS. General update.
+14-Jul-2013, JEM, General Update, add GNV build information.
+
+
+The release notes installed by the PCSI kit consist of this file and the
+curl_gnv_build_steps.txt and other useful information.
 
 Prerequisites:
 
@@ -20,37 +25,161 @@ OpenSSL or hp SSL, if you want SSL support
 
 What is Here:
 
-This directory contains the following files:
+This directory contains the following files for a DCL based build.
+
+backup_gnv_curl_src.com  This procedure backs up the source modules for
+                        creating a PCSI kit.
+
+build_curl-config_script.com
+                        Procedure to create the curl-config script.
+
+build_gnv_curl.com      This procedure does a build of curl using the
+                        GNV utilities and then uses DCL tools to build
+                        the libcurl shared image.  The setup_gnv_curl_build.com
+                        procedure must be run first.
+
+build_gnv_curl_pcsi_desc.com
+                        This procedure builds the pcsi$desc file for
+                        creating a PCSI based package.
+
+build_gnv_curl_pcsi_text.com
+                        This procedure builds the pcsi$text file for
+                        creating a PCSI based package.
+
+build_gnv_curl_release_notes.com
+                        This procedure creates the release notes for
+                        a PCSI kit based on curl_release_note_start.txt,
+                        this readme file, and the curl_gnv_build_steps.txt
+
+build_libcurl_pc.com    Procedure to create a libcurl.pc file.
+
+build_vms.com           DCL based build procedure.
+
+clean_gnv_curl.com      This procedure cleans up the files generated by
+                        a GNV based build.
+
+config_h.com            DCL based procedure used by build_vms.com
+                        to run generate the curl_config.h file.
+                        This is a generic procedure that does most
+                        of the work for generating config.h files.
+
+compare_curl_source.com Procedure to compare the working directory
+                        with a repository directory or a backup staging
+                        directory.
+
+curl_crtl_init.c        A special pre-initialization routine to for
+                        programs to behave more Unix like when run
+                        under GNV.
+
+curl_gnv_build_steps.txt
+                        Detailed instructions on how to built curl using
+                        GNV and how to build the libcurl shared image and
+                        PCSI kit.
+
+curl_release_note_start.txt
+                        The first part of the curl release notes.
+
+curl_startup.com        A procedure run at VMS startup to install the
+                        libcurl shared image and to set up the needed
+                        logical names.
 
-build_vms.com           Build procedure.
-config-vms.h            VMS-specific config.h.
 curlmsg.h               C header defining cURL status code macros.
+
 curlmsg.msg             Error message source for curlmsg.h and curlmsg.sdl.
+
 curlmsg.sdl             SDL source defining cURL status code constants.
+
 curlmsg_vms.h           Mapping of cURL status codes to VMS-form codes.
-hpssl_alpha.opt         LINK options file for HP SSL on Alpha.
-hpssl_ia64.opt          LINK options file for HP SSL on IA64.
-hpssl_vax.opt           LINK options file for HP SSL on VAX.
-ldap.opt                LINK options file for LDAP.
+
+generate_config_vms_h_curl.com
+                        DCL procedure to generate the curl specific
+                        definitions for curl_config.h that config_h.com
+                        can not properly generate.
+
+generate_vax_transfer.com
+                        DCL procedure to read an Alpha/IA64 symbol vector
+                        linker option file and generate the VAX transfer
+                        vector modules.
+
+gnv_conftest.c_first    A helper file for the configure script.
+
+gnv_curl_configure.sh   A script to run the configure script with the
+                        options needed for VMS.
+
+gnv_libcurl_symbols.opt The symbol vectors needed for Alpha and IA64
+                        libcurl shared image.
+
+gnv_link_curl.com       Links the libcurl shared image and then links a curl
+                        image to use the libcurl.
+
+macro32_exactcase.patch The patch file needed to modify VAX Macro32 to be
+                        case sensitive and case preserving.
+
 Makefile.am             cURL kit file list for this directory.
+
 Makefile.in             cURL kit makefile source for this directory.
-openssl_alpha.opt       LINK options file for OpenSSL on Alpha.
-openssl_ia64.opt        LINK options file for OpenSSL on IA64.
-openssl_ssl_alpha.opt   LINK options file for OpenSSL (SSL_ prefix) on Alpha.
-openssl_ssl_ia64.opt    LINK options file for OpenSSL (SSL_ prefix) on IA64.
-openssl_ssl_vax.opt     LINK options file for OpenSSL (SSL_ prefix) on VAX.
-openssl_vax.opt         LINK options file for OpenSSL on VAX.
+
+make_gnv_curl_install.sh
+                        Script to do a make install using GNV after running
+                        the configure script.
+
+make_pcsi_curl_kit_name.com
+                        This generates the name of the PCSI kit based on
+                        the version of curl being built.
+
+pcsi_gnv_curl_file_list.txt
+                        This is a text file describing what files should
+                        be included in a PCSI kit.
+
+pcsi_product_gnv_curl.com
+                        This generates the PCSI kit after the libcurl
+                        shared image has been made.
+
 readme.                 This file.
 
+report_openssl_version.c
+                        Program to check that the openssl version is new
+                        enough for building a shared libcurl image.
+
+setup_gnv_curl_build.com
+                        This procedure sets up symbols and logical names
+                        for a GNV build environment and also copies some
+                        helper files.
+
+stage_curl_install.com  This procedure sets up new_gnu: directory tree to
+                        for testing the install and building the PCSI kit.
+                        It takes a "remove" option to remove all the staged
+                        files.
+
+vms_eco_level.h         This sets the ECO level for the PCSI kit name.
+
 
 How to Build:
 
-The (brute-force) builder is [.packages.vms]build_vms.com.  Comments in
-this procedure describe various optional parameters which enable or
-disable optional program features, or which control the build in other
-ways.  Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...) should be
-produced in an architecture-specific subdirectory under this directory
-([.ALPHA], [.IA64], [.VAX]).
+The GNV based build and the DCL based build procedures are not compatible
+and you must make sure that none of the build files are present before
+running a different type of build.  Use the "REALCLEAN" option for
+BUILD_VMS.COM and the "REALCLEAN" option for clean_gnv_curl.com.
+
+The (brute-force) DCL based builder is [.packages.vms]build_vms.com.
+Comments in this procedure describe various optional parameters which
+enable or disable optional program features, or which control the build
+in other ways.  Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...)
+should be produced in an architecture-specific subdirectory under this
+directory ([.ALPHA], [.IA64], [.VAX]).
+
+The file curl_gnv_build_steps.txt contains information on buildling using
+the GNV tool kit, building a shared libcurl, and producting a PCSI kit for
+distribution.  The curl_gnv_build_steps.text is included in the release
+notes file of the PCSI kit.
+
+The building with 64 bit pointers does not currently work.
+
+The build procedure will detect if HP OpenSSL, LDAP, and Kerberos are
+installed and default to building with them.
+
+The build procedure will also detect if a compatible ZLIB shared image
+is installed from a PCSI kit and default to using it.
 
    Example build commands:
 
@@ -58,13 +187,42 @@ produced in an architecture-specific subdirectory under this directory
       @ [.packages.vms]build_vms.com LARGE LDAP
       submit /noprint [.packages.vms]build_vms.com /param = (LARGE, LDAP)
 
+The build_vms.com procedure does not build the shared image file or the PCSI
+kit.  If you have built a curl with ZLIB and HPSSL support as well as if
+LDAP and Kerberos installed, you can use the GNV_LINK_CURL.COM file.
+
+The GNV_LINK_CURL.COM contains information on how to link and run with a newer
+version of HP SSL than what may be install on an Alpha or IA64 based system.
+
+To build the PCSI kit, follow the the instructions in the file
+curl_gnv_build_steps.txt.
 
 Other Notes:
 
+This release fixes known bugs #22, and #57 in the [curl.docs]known_bugs.
+file.
+
+The libcurl formdata.c module and Curl tools post form now have some
+understanding of VMS file types.  Files will be posted in STREAM_LF format.
+
+The Curl tool now has some understanding of VMS file types and will upload the
+files in STREAM_LF fomat.
+
+When CURL is uploading a VARIABLE format VMS file, it is less efficient as in
+order to get the file size, it will first read the entire file once, and then
+read the file again for the actual upload.
+
+The Curl tool will now always download files into STREAM_LF format.  Even if a
+file by that name with a different format already exists.  This is needed to
+allow interrupted downloads to be continued.
+
+
+The libcurl file module still does not understand VMS file types and requires
+the input files to be in STREAM_LF to work propery.
+
 The test suites are not supported as of 7.11.0.
 
 The curlmsg.sdl and curlmsg.h files are generated from curlmsg.msg.
 This is not done automatically, since the .MSG file is a hand edit
 of the relevant stuff from the curl.h file.  If you want to do this
 yourself you'll need the SDL package from the freeware collection.
-
diff --git a/packages/vms/report_openssl_version.c b/packages/vms/report_openssl_version.c
new file mode 100644 (file)
index 0000000..ccb363b
--- /dev/null
@@ -0,0 +1,100 @@
+/* File: report_openssl_version.c
+ *
+ * $Id$
+ *
+ * This file dynamically loads the openssl shared image to report the
+ * version string.
+ *
+ * It will optionally place that version string in a DCL symbol.
+ *
+ * Usage:  report_openssl_version <shared_image> [<dcl_symbol>]
+ *
+ * Copyright 2013, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <dlfcn.h>
+#include <openssl/opensslv.h>
+#include <openssl/crypto.h>
+
+#include <string.h>
+#include <descrip.h>
+#include <libclidef.h>
+#include <stsdef.h>
+#include <errno.h>
+
+unsigned long LIB$SET_SYMBOL(
+    const struct dsc$descriptor_s * symbol,
+    const struct dsc$descriptor_s * value,
+    const unsigned long * table_type);
+
+int main(int argc, char ** argv) {
+
+
+void * libptr;
+const char * (*ssl_version)(int t);
+const char * version;
+
+   if (argc < 1) {
+       puts("report_openssl_version filename");
+       exit(1);
+   }
+
+   libptr = dlopen(argv[1], 0);
+
+   ssl_version = (const char * (*)(int))dlsym(libptr, "SSLeay_version");
+   if ((void *)ssl_version == NULL) {
+      ssl_version = (const char * (*)(int))dlsym(libptr, "ssleay_version");
+      if ((void *)ssl_version == NULL) {
+         ssl_version = (const char * (*)(int))dlsym(libptr, "SSLEAY_VERSION");
+      }
+   }
+
+   dlclose(libptr);
+
+   if ((void *)ssl_version == NULL) {
+      puts("Unable to lookup version of OpenSSL");
+      exit(1);
+   }
+
+   version = ssl_version(SSLEAY_VERSION);
+
+   puts(version);
+
+   /* Was a symbol argument given? */
+   if (argc > 1) {
+      int status;
+      struct dsc$descriptor_s symbol_dsc;
+      struct dsc$descriptor_s value_dsc;
+      const unsigned long table_type = LIB$K_CLI_LOCAL_SYM;
+
+      symbol_dsc.dsc$a_pointer = argv[2];
+      symbol_dsc.dsc$w_length = strlen(argv[2]);
+      symbol_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+      symbol_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+      value_dsc.dsc$a_pointer = (char *)version; /* Cast ok */
+      value_dsc.dsc$w_length = strlen(version);
+      value_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+      value_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+      status = LIB$SET_SYMBOL(&symbol_dsc, &value_dsc, &table_type);
+      if (!$VMS_STATUS_SUCCESS(status)) {
+         exit(status);
+      }
+   }
+
+   exit(0);
+}
diff --git a/packages/vms/setup_gnv_curl_build.com b/packages/vms/setup_gnv_curl_build.com
new file mode 100644 (file)
index 0000000..beec733
--- /dev/null
@@ -0,0 +1,288 @@
+$! File: setup_gnv_curl_build.com
+$!
+$! $Id$
+$!
+$! Set up build environment for building Curl under GNV on VMS.
+$!
+$! GNV needs some files moved into the other directories to help with
+$! the configure script and the build.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 30-May-2009  J. Malmberg
+$!
+$!=======================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$! Move to where the Configure script is.
+$ set def [--]
+$!
+$! Get the path to where the Configure script is.
+$ base_dir = f$environment("default")
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
+$!
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
+$!
+$ tests = 0
+$ if f$locate(",test", args_lower) .lt. args_lower_len
+$ then
+$   tests = 1
+$ endif
+$!
+$ examples = 0
+$ if f$locate(",exam", args_lower) .lt. args_lower_len
+$ then
+$   examples = 1
+$ endif
+$!
+$! We want detailed build logs.
+$ clist = "/list/show=(expan,includ)"
+$!
+$! We want full symbol names in exact case.  Need a commmon
+$! repository for all directories.
+$ cnames = "/names=(shortened,as_is)/repository=''base_dir'"
+$!
+$! Set the compiler options for GNV CC wrapper to inherit.
+$ cc :== cc'clist''cnames'/nested_include_directory=none
+$ cxx :== cxx'clist''cnames'/nested_include_directory=none
+$ pointer_size = "32"
+$! Note 64 bit pointers requires all libraries to either have
+$! 64 bit pointers or have #pragma directives.
+$! Currently building curl on VMS with 64 bit pointers does not work.
+$!
+$! A logical name to make it easier to find some of the hacks.
+$ define/job gnv_hacks 'base_dir'
+$!
+$! A logical name to find the [.packages.vms] directory where we started.
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$! Kerberos headers:
+$ if f$trnlnm("gssapi") .eqs. ""
+$ then
+$   if f$search("sys$sysroot:[kerberos]include.dir") .nes. ""
+$   then
+$       define/job gssapi sys$sysroot:[kerberos.include]
+$   endif
+$ endif
+$!
+$! OpenSSL headers
+$ if f$trnlnm("openssl") .eqs. ""
+$ then
+$   if f$trnlnm("ssl$include") .nes. ""
+$   then
+$       define/job openssl ssl$include:
+$   endif
+$ endif
+$!
+$! C compiler include path.
+$ define/job decc$system_include prj_root:[.include.curl],-
+    [-.packages.vms],-
+    ssl$include:,gnv$gnu:[usr.include],-
+    gnv$gnu:[usr.include.libz],gnv$gnu:[include],-
+    gnv$zlib_include:,-
+    sys$sysroot:[kerberos.include]
+$!
+$! Set up a include list for the compiler to find all the header files
+$! that they need.
+$!
+$ define/job decc$user_include src_root:[.include.curl]
+$ define ssl_lib sys$library:
+$!
+$! Calculate what is needed in the option files
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr''pointer_size'"
+$ if f$search(try_shr) .nes. "" then libzshr_line = "''try_shr'/share"
+$ if (libzshr_line .eqs. "")
+$ then
+$   try_shr = "sys$share:" + try_shr
+$   if f$search("''try_shr'.exe") .nes. ""
+$   then
+$       libzshr_line = "''try_shr'/share"
+$   endif
+$ endif
+$!
+$! Kerberos
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$   gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$! HP OpenSSL
+$ libcryptoshr_line = ""
+$ try_shr = "sys$share:ssl$libcrypto_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$   libcryptoshr_line = "''try_shr'/share"
+$ endif
+$!
+$ libsslshr_line = ""
+$ try_shr = "sys$share:ssl$libssl_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$   libsslshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! Copy over the gnv$conftest* files to base directory.
+$!-----------------------------------------------------
+$ copy 'default_dir'gnv_conftest.c_first 'base_dir'gnv$conftest.c_first
+$ create 'base_dir'gnv$conftest.opt
+$ open/append opt 'base_dir'gnv$conftest.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge 'base_dir'gnv$conftest.*
+$ rename 'base_dir'gnv$conftest.* ;1
+$!
+$!
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create [.src]gnv$curl.opt
+$ open/append opt [.src]gnv$curl.opt
+$ write opt "gnv_packages_vms:curlmsg.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge [.src]gnv$*.*
+$ rename [.src]gnv$*.* ;1
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'default_dir'gnv_libcurl_linker.opt
+$ open/append opt 'default_dir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the template linker file
+$!---------------------------------
+$ create 'default_dir'gnv_template_linker.opt
+$ open/append opt 'default_dir'gnv_template_linker.opt
+$ write opt "gnv_vms_common:vms_curl_init_unix.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$! Copy over the gnv$*.opt files for [.docs.examples]
+$!----------------------------------------------------
+$ if examples .ne. 0
+$ then
+$   example_apps = "10-at-a-time,anyauthput,certinfo,cookie_interface,debug"
+$   example_apps = example_apps + ",fileupload,fopen,ftpget,ftpgetresp"
+$   example_apps = example_apps + ",ftpupload,getinfo,getinmemory"
+$   example_apps = example_apps + ",http-post,httpcustomheader,httpput"
+$   example_apps = example_apps + ",https,multi-app,multi-debugcallback"
+$   example_apps = example_apps + ",multi-double,multi-post,multi-single"
+$   example_apps = example_apps + ",persistant,post-callback,postit2"
+$   example_apps = example_apps + ",sendrecv,sepheaders,simple,simplepost"
+$   example_apps = example_apps + ",simplessl"
+$!
+$   i = 0
+$example_loop:
+$      ap_name = f$element(i, ",", example_apps)
+$      if ap_name .eqs. "," then goto example_loop_end
+$      if ap_name .eqs. "" then goto example_loop_end
+$      copy 'default_dir'gnv_template_linker.opt -
+           [.docs.examples]gnv$'ap_name'.opt
+$      i = i + 1
+$      goto example_loop
+$example_loop_end:
+$!
+$! clean up the copy.
+$    purge [.docs.examples]gnv$*.opt
+$    rename [.docs.examples]gnv$*.opt ;1
+$ endif
+$!
+$!
+$ if tests .ne. 0
+$ then
+$   libtest_apps = "lib500,lib501,lib502,lib503,lib504,lib505,lib506,lib507"
+$   libtest_apps = libtest_apps + ",lib508,lib510,lib511,lib512,lib513,lib514"
+$   libtest_apps = libtest_apps + ",lib515,lib516,lib517,lib518,lib519,lib520"
+$   libtest_apps = libtest_apps + ",lib521,lib523,lib524,lib525,lib526,lib527"
+$   libtest_apps = libtest_apps + ",lib529,lib530,lib532,lib533,lib536,lib537"
+$   libtest_apps = libtest_apps + ",lib539,lib540,lib541,lib542,lib543,lib544"
+$   libtest_apps = libtest_apps + ",lib545,lib547,lib548,lib549,lib552,lib553"
+$   libtest_apps = libtest_apps + ",lib554,lib555,lib556,lib557,lib558,lib559"
+$   libtest_apps = libtest_apps + ",lib560,lib562,lib564"
+$   i = 0
+$libtest_loop:
+$     ap_name = f$element(i, ",", libtest_apps)
+$     if ap_name .eqs. "," then goto libtest_loop_end
+$     if ap_name .eqs. "" then goto libtest_loop_end
+$     copy 'default_dir'gnv_template_linker.opt -
+          [.tests.libtest]gnv$'ap_name'.opt
+$     i = i + 1
+$     goto libtest_loop
+$libtest_loop_end:
+$!
+$! clean up the copy.
+$   purge [.tests.libtest]gnv$*.opt
+$   rename [.tests.libtest]gnv$*.opt ;1
+$ endif
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$   message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$   link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$   cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$   purge 'init_obj'
+$   rename 'init_obj' ;1
+$ endif
+$!
+$all_exit:
+$!
+$ set def 'default_dir'
+$!
+$! Verify can break things in bash, especially in Configure scripts.
+$ set nover
+$ exit
diff --git a/packages/vms/stage_curl_install.com b/packages/vms/stage_curl_install.com
new file mode 100644 (file)
index 0000000..0dccdd6
--- /dev/null
@@ -0,0 +1,177 @@
+$! File: stage_curl_install.com
+$!
+$! $Id$
+$!
+$! This updates or removes the GNV$CURL.EXE and related files for the
+$! new_gnu:[*...] directory tree for running the self tests.
+$!
+$! The files installed/removed are:
+$!     [usr.bin]gnv$curl.exe
+$!     [usr.bin]curl-config.
+$!     [usr.lib]gnv$libcurl.exe
+$!     [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe
+$!     [usr.include.curl]curl.h
+$!     [usr.include.curl]curlbuild.h
+$!     [usr.include.curl]curlrules.h
+$!     [usr.include.curl]curlver.h
+$!     [usr.include.curl]easy.h
+$!     [usr.include.curl]mprintf.h
+$!     [usr.include.curl]multi.h
+$!     [usr.include.curl]stdcheaders.h
+$!     [usr.include.curl]typecheck-gcc.h
+$!     [usr.lib.pkgconfig]libcurl.pc
+$!     [usr.share.man.man1]curl-config.1
+$!     [usr.share.man.man1]curl.1
+$!     [usr.share.man.man3]curl*.3
+$!     [usr.share.man.man3]libcurl*.3
+$! Future: A symbolic link to the release notes?
+$!
+$! Copyright 2012, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 20-Aug-2012  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$!
+$! If the first parameter begins with "r" or "R" then this is to
+$! remove the files instead of installing them.
+$ remove_filesq = f$edit(p1, "upcase,trim")
+$ remove_filesq = f$extract(0, 1, remove_filesq)
+$ remove_files = 0
+$ if remove_filesq .eqs. "R" then remove_files = 1
+$!
+$!
+$! If we are staging files, make sure that the libcurl.pc and curl-config
+$! files are present.
+$ if remove_files .eq. 0
+$ then
+$   if f$search("[--]libcurl.pc") .eqs. ""
+$   then
+$       @build_libcurl_pc.com
+$   endif
+$   if f$search("[--]curl-config") .eqs. ""
+$   then
+$       @build_curl-config_script.com
+$   endif
+$ endif
+$!
+$!
+$! Dest dirs
+$!------------------
+$ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]"
+$ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]"
+$ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]"
+$ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3
+$!
+$!
+$!   Alias links needed.
+$!-------------------------
+$ source_curl = "gnv$curl.exe"
+$ dest_curl = "[bin]gnv$curl.exe"
+$ curl_links = "[bin]curl."
+$ new_gnu = "new_gnu:"
+$!
+$!
+$! Create the directories if they do not exist
+$!---------------------------------------------
+$ i = 0
+$curl_dir_loop:
+$   this_dir = f$element(i, ",", dest_dirs)
+$   i = i + 1
+$   if this_dir .eqs. "" then goto curl_dir_loop
+$   if this_dir .eqs. "," then goto curl_dir_loop_end
+$!  Just create the directories, do not delete them.
+$!  --------------------------------------------------
+$   if remove_files .eq. 0
+$   then
+$       create/dir 'new_gnu''this_dir'/prot=(o:rwed)
+$   endif
+$   goto curl_dir_loop
+$curl_dir_loop_end:
+$!
+$!
+$! Need to add in the executable file
+$!-----------------------------------
+$ if remove_files .eq. 0
+$ then
+$   copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re
+$   copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re
+$   copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re
+$ endif
+$!
+$ if remove_files .eq. 0
+$ then
+$   set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe
+$ else
+$   file = "''new_gnu'[bin]curl."
+$   if f$search(file) .nes. "" then set file/remove 'file';*
+$ endif
+$!
+$!
+$ if remove_files .eq. 0
+$ then
+$   copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h
+$   copy [--.include.curl]curlbuild.h -
+         'new_gnu'[usr.include.curl]curlbuild.h
+$   copy [--.include.curl]curlrules.h -
+         'new_gnu'[usr.include.curl]curlrules.h
+$   copy [--.include.curl]curlver.h -
+         'new_gnu'[usr.include.curl]curlver.h
+$   copy [--.include.curl]easy.h -
+         'new_gnu'[usr.include.curl]easy.h
+$   copy [--.include.curl]mprintf.h -
+         'new_gnu'[usr.include.curl]mprintf.h
+$   copy [--.include.curl]multi.h -
+         'new_gnu'[usr.include.curl]multi.h
+$   copy [--.include.curl]stdcheaders.h -
+         'new_gnu'[usr.include.curl]stdcheaders.h
+$   copy [--.include.curl]typecheck-gcc.h -
+         'new_gnu'[usr.include.curl]typecheck-gcc.h
+$   copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc
+$!
+$   copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1
+$   copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1
+$!
+$   copy [--.docs.libcurl]*.3 -
+         'new_gnu'[usr.share.man.man3]*.3
+$!
+$ else
+$   file = "''new_gnu'[usr.bin]curl-config."
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.bin]gnv$curl.exe"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.lib]gnv$libcurl.exe"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.include.curl]*.h"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man1]curl-config.1"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man1]curl.1"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man3]curl*.3"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man3]libcurl*.3"
+$   if f$search(file) .nes. "" then delete 'file';*
+$ endif
+$!
diff --git a/packages/vms/vms_eco_level.h b/packages/vms/vms_eco_level.h
new file mode 100644 (file)
index 0000000..4353407
--- /dev/null
@@ -0,0 +1,30 @@
+/* File: vms_eco_level.h
+ *
+ * $Id$
+ *
+ * Copyright 2012, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ */
+
+/* This file should be incremented for each ECO that is kit */
+/* for a specific cURL x.y-z release. */
+/* When any part of x.y-z is incremented, the ECO should be set back to 0 */
+
+#ifndef _VMS_ECO_LEVEL_H
+#define _VMS_ECO_LEVEL_H
+
+#define VMS_ECO_LEVEL "0"
+
+#endif
diff --git a/sample.emacs b/sample.emacs
deleted file mode 100644 (file)
index e4470fe..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-;; This file was contributed by Mats Lidell
-
-;; Here's a sample .emacs file that might help you along the way.
-
-;; First comes a setup that is ideal when you are only working with curl. Just
-;; select the next few lines, paste it into your .emacs and change the path to
-;; the tools folder. (If you are using more than one style. Look further down
-;; this file.)
-
-(load-file "<YOUR-PATH-TO-CURL>/curl-style.el")
-(add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
-
-;; If you are using more than one style in maybe more than one project the
-;; example below might help out. It uses a predicate hook pair to select the
-;; right hook to use.
-
-(defvar my-style-selective-mode-hook nil
-  "Holds a list of predicate and hooks pairs. (list (PREDICATE . HOOK)
-...) It is used by my-mode-selective-mood-hook-function for choosing
-the right hook to run.")
-
-(defun my-style-selective-mode-hook-function ()
-  "Run each PREDICATE in `my-style-selective-mode-hook' to see if the 
-HOOK in the pair should be executed. If the PREDICATE evaluate to non
-nil HOOK is executed and the rest of the hooks are ignored."
-  (let ((h my-style-selective-mode-hook))
-    (while (not (eval (caar h)))
-      (setq h (cdr h)))
-    (funcall (cdar h))))
-
-;;; Example configuration.
-;; Add the selective hook to the c-mode-common-hook
-(add-hook 'c-mode-common-hook 'my-style-selective-mode-hook-function)
-
-;; Add your own hooks and predicates. The predicate should evaluate to
-;; non nil if the hook in the pair is supposed to be evaluated. In the
-;; example a part of the path is used to select what style to
-;; use. Choose what is appropriate for you.
-(add-hook 'my-style-selective-mode-hook 
-         '((string-match "curl" (buffer-file-name)) . curl-c-mode-common-hook))
-(add-hook 'my-style-selective-mode-hook 
-         '((string-match "other" (buffer-file-name)) . other-c-mode-common-hook))
-;; Make sure the default style is appended.
-(add-hook 'my-style-selective-mode-hook '(t . my-c-mode-common-hook) t)
index faea096..0b4556f 100644 (file)
@@ -1,11 +1,11 @@
 set(EXE_NAME curl)
 
-# First try to locate hugehelp.c to see if it has already been created
+# First try to locate tool_hugehelp.c to see if it has already been created
 # TODO Find the file WITHOUT adding a cache entry!!! Or else the user can delete the file after the script was first run, and the script won't notice it has gone.
-find_file(HUGEHELP_C_FILE hugehelp.c PATHS . NO_DEFAULT_PATH)
+find_file(HUGEHELP_C_FILE tool_hugehelp.c PATHS . NO_DEFAULT_PATH)
 if (NOT HUGEHELP_C_FILE)
-  message(STATUS "Warning: hugehelp.c file was not generated before. Generating an 'empty' file...")
-  file(WRITE hugehelp.c "/* built-in manual is disabled, blank function */\n#include \"hugehelp.h\"\nvoid hugehelp(void) {}\n\n")
+  message(STATUS "Warning: tool_hugehelp.c file was not generated before. Generating an 'empty' file...")
+  file(WRITE tool_hugehelp.c "/* built-in manual is disabled, blank function */\n#include \"tool_hugehelp.h\"\nvoid hugehelp(void) {}\n\n")
 endif()
 
 transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
@@ -25,8 +25,8 @@ source_group("cURL source files" FILES ${CURL_CFILES})
 source_group("cURL header files" FILES ${CURL_HFILES})
 
 include_directories(
-  ${CURL_SOURCE_DIR}/lib                # To be able to reach "setup_once.h"
-  ${CURL_BINARY_DIR}/lib                # To be able to reach "curl_config.h"
+  ${CURL_SOURCE_DIR}/lib        # To be able to reach "curl_setup_once.h"
+  ${CURL_BINARY_DIR}/lib        # To be able to reach "curl_config.h"
   ${CURL_BINARY_DIR}/include    # To be able to reach "curl/curlbuild.h"
   )
 
@@ -46,11 +46,6 @@ target_link_libraries( ${EXE_NAME} libcurl )
 set_target_properties(${EXE_NAME} PROPERTIES
   DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
 
-if(MSVC)
-  if(NOT BUILD_RELEASE_DEBUG_DIRS)
-    # Ugly workaround to remove the "/debug" or "/release" in each output
-    set_target_properties(${EXE_NAME} PROPERTIES PREFIX "../")
-  endif()
-endif()
-
 #INCLUDE(ModuleInstall OPTIONAL)
+
+install(TARGETS ${EXE_NAME} DESTINATION bin)
index eb2e766..6b3103a 100644 (file)
@@ -72,13 +72,13 @@ CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
 !ifdef %zlib_root
 ZLIB_ROOT = $(%zlib_root)
 !else
-ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.5
+ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.8
 !endif
 
 !ifdef %libssh2_root
 LIBSSH2_ROOT = $(%libssh2_root)
 !else
-LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.2.7
+LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.4.3
 !endif
 
 !ifdef %librtmp_root
@@ -90,7 +90,7 @@ LIBRTMP_ROOT = ..$(DS)..$(DS)rtmpdump-2.3
 !ifdef %openssl_root
 OPENSSL_ROOT = $(%openssl_root)
 !else
-OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8q
+OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8y
 !endif
 
 !ifdef %ares_root
@@ -132,7 +132,7 @@ OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
 
 RESOURCE = $(OBJ_DIR)$(DS)curl.res
 
-all: hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
+all: tool_hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
        @echo Welcome to cURL
 
 clean: .SYMBOLIC
@@ -141,13 +141,13 @@ clean: .SYMBOLIC
 
 vclean distclean: clean .SYMBOLIC
        -$(RD) $(OBJ_DIR)
-       -$(RM) curl.exe curl.map curl.sym hugehelp.c
+       -$(RM) curl.exe curl.map curl.sym tool_hugehelp.c
 
-hugehelp.c: hugehelp.c.cvs
+tool_hugehelp.c: tool_hugehelp.c.cvs
        $(CP) $[@ $^@
 
-hugehelp.c.cvs: .EXISTSONLY
-       $(CP) hugehelp.c $^@
+tool_hugehelp.c.cvs: .EXISTSONLY
+       $(CP) tool_hugehelp.c $^@
 
 $(OBJ_DIR):
        -$(MD) $^@
@@ -184,8 +184,8 @@ $(LINK_ARG): $(__MAKEFILES__)
 !ifdef %use_rtmp
        @%append $^@ library $(LIBRTMP_ROOT)$(DS)librtmp$(DS)librtmp.lib, winmm.lib
 !endif
-!ifdef %use_ssh2                                                                                                                    
-       @%append $^@ library $(LIBSSH2_ROOT)$(DS)win32$(DS)libssh2.lib                                                                      
+!ifdef %use_ssh2
+       @%append $^@ library $(LIBSSH2_ROOT)$(DS)win32$(DS)libssh2.lib
 !endif
 !ifdef %use_ssl
        @%append $^@ library $(OPENSSL_ROOT)$(DS)out32$(DS)libeay32.lib, $(OPENSSL_ROOT)$(DS)out32$(DS)ssleay32.lib
@@ -193,6 +193,14 @@ $(LINK_ARG): $(__MAKEFILES__)
 !ifdef %use_ares
        @%append $^@ library $(ARES_ROOT)$(DS)cares.lib
 !endif
+!ifdef %use_winidn
+!  if $(__VERSION__) > 1290
+       @%append $^@ library normaliz.lib
+!  else
+       @%append $^@ import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii'
+       @%append $^@ import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode'
+!  endif
+!endif
 !else
        @%append $^@ library ..$(DS)lib$(DS)$(LIBNAME)_imp.lib
 !endif
index 9188e82..72e6772 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -27,64 +27,88 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
 # $(top_builddir)/src is for curl's generated src/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_srcdir)/src is for curl's src/setup.h and "curl-private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
 
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_builddir)/src          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_builddir)/src          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_srcdir)/src
 
 bin_PROGRAMS = curl
 
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
 include Makefile.inc
 
 # This might hold -Werror
 CFLAGS += @CURL_CFLAG_EXTRAS@
 
-curl_LDADD = $(top_builddir)/lib/libcurl.la -lrt @CURL_LIBS@
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if USE_EXPLICIT_LIB_DEPS
+curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
+else
+curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+endif
+
+curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
+curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
 curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-BUILT_SOURCES = hugehelp.c
-CLEANFILES = hugehelp.c
+
+# if unit tests are enabled, build a static library to link them with
+if BUILD_UNITTESTS
+noinst_LTLIBRARIES = libcurltool.la
+libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS)
+libcurltool_la_CFLAGS = -DUNITTESTS
+libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
+libcurltool_la_SOURCES = $(curl_SOURCES)
+endif
+
+BUILT_SOURCES = tool_hugehelp.c
+CLEANFILES = tool_hugehelp.c
 # Use the C locale to ensure that only ASCII characters appear in the
 # embedded text.
 NROFF=env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
 
 EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
-       curl_config.h.in macos/curl.mcp.xml.sit.hqx                       \
-       macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp vc6curlsrc.dsp \
-       macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc  \
-       Makefile.netware Makefile.inc Makefile.Watcom vc6curlsrc.dsw      \
-       CMakeLists.txt
+       macos/curl.mcp.xml.sit.hqx                                        \
+       macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp \
+       macos/src/macos_main.cpp makefile.amiga curl.rc                   \
+       Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
 
 MANPAGE=$(top_srcdir)/docs/curl.1
 README=$(top_srcdir)/docs/MANUAL
 MKHELP=$(top_srcdir)/src/mkhelp.pl
-HUGE=hugehelp.c
+HUGE=tool_hugehelp.c
 
 if USE_MANUAL
 # Here are the stuff to create a built-in manual
 
 if HAVE_LIBZ
-# This generates the hugehelp.c file in both uncompressed and compressed formats
+# This generates the tool_hugehelp.c file in both uncompressed and
+# compressed formats
 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
-       echo '#include "setup.h"' > $(HUGE)
+       echo '#include "tool_setup.h"' > $(HUGE)
        echo '#ifndef HAVE_LIBZ' >> $(HUGE)
        $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
        echo '#else' >> $(HUGE)
        $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
        echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
 else # HAVE_LIBZ
-# This generates the hugehelp.c file uncompressed only
+# This generates the tool_hugehelp.c file uncompressed only
 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
-       echo '#include "setup.h"' > $(HUGE)
+       echo '#include "tool_setup.h"' > $(HUGE)
        $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
 endif
 
@@ -92,6 +116,16 @@ else # USE_MANUAL
 # built-in manual has been disabled, make a blank file
 $(HUGE):
        echo "/* built-in manual is disabled, blank function */" > $(HUGE)
-       echo '#include "hugehelp.h"' >> $(HUGE)
+       echo '#include "tool_hugehelp.h"' >> $(HUGE)
        echo "void hugehelp(void) {}" >>$(HUGE)
 endif
+
+# ignore tool_hugehelp.c since it is generated source code and it plays
+# by slightly different rules!
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/src -Wtool_hugehelp.c $(CURL_CFILES) $(CURL_HFILES)
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
index 7408dd2..b0ee5b6 100644 (file)
 #
 #  'BCCDIR' has to be set up to point to the base directory
 #  of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
-#  where c:\Borland\BCC55 is the compiler is installed
 #
-#  Written by Jaepil Kim, pit@paradise.net.nz
+#  Initially written by Jaepil Kim, pit@paradise.net.nz
 ############################################################
 
+!if "$(__MAKE__)" == ""
+!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
+!endif
+
+# Borland's $(MAKEDIR) expands to the path where make.exe is located,
+# use this feature to define BCCDIR when user has not defined BCCDIR.
+!ifndef BCCDIR
+BCCDIR = $(MAKEDIR)\..
+!endif
+
 # Edit the path below to point to the base of your Zlib sources.
 !ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.1
+ZLIB_PATH = ..\..\zlib-1.2.8
 !endif
 
 # Edit the path below to point to the base of your OpenSSL package.
 !ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.7d
+OPENSSL_PATH = ..\..\openssl-0.9.8y
 !endif
 
 # Set program's name
 PROGNAME = curl.exe
 
 # Setup environment
-CXX      = bcc32
+PP_CMD   = cpp32 -q -P-
+CC_CMD   = bcc32 -q -c
 LD       = bcc32
-CP       = copy
-RM       = del
-LIB      = tlib
+RM       = del 2>NUL
+MKDIR    = md
+RMDIR    = rd /q 2>NUL
+COPY     = $(COMSPEC) /c copy /y
 
-CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
+CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline
 LDFLAGS  = -q -lq -lap
 
-INCDIRS  = -I.;../include;../lib
-LINKLIB  = $(BCCDIR)/lib/cw32mt.lib
-
-# If you build with SSL support, set WITH_SSL=1
+SRCDIRS  = .;..\lib
+OBJDIR   = .\BCC_objs
+INCDIRS  = -I.;..\include;..\lib
+LINKLIB  = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib
 DEFINES  = -DNDEBUG -DWIN32
 
 !ifdef DYNAMIC
-LIBCURL_LIB = ../lib/libcurl_imp.lib
+LIBCURL_LIB = ..\lib\libcurl_imp.lib
 !else
-LIBCURL_LIB = ../lib/libcurl.lib
+LIBCURL_LIB = ..\lib\libcurl.lib
 DEFINES = $(DEFINES) -DCURL_STATICLIB
 !endif
 
+# ZLIB support is enabled setting WITH_ZLIB=1
 !ifdef WITH_ZLIB
 DEFINES  = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
 INCDIRS  = $(INCDIRS);$(ZLIB_PATH)
-LINKLIB  = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
+LINKLIB  = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
 !endif
 
+# SSL support is enabled setting WITH_SSL=1
 !ifdef WITH_SSL
 DEFINES  = $(DEFINES) -DUSE_SSLEAY
-INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
-LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
+INCDIRS  = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
+LINKLIB  = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
 !endif
 
 .autodepend
 
+.path.c   = $(SRCDIRS)
+.path.obj = $(OBJDIR)
+.path.int = $(OBJDIR)
+
 # Makefile.inc provides the CSOURCES and HHEADERS defines
-top_srcdir = ..
 !include Makefile.inc
 
-CSOURCES = $(CURL_CFILES) $(CURLX_ONES)
+CSOURCES = $(CURL_CFILES) $(CURLX_ONES:../lib/=)
 OBJECTS  = $(CSOURCES:.c=.obj)
+PREPROCESSED = $(CSOURCES:.c=.int)
+
+# Borland's command line compiler (BCC32) version 5.5.1 integrated
+# preprocessor has a bug which results in silently generating wrong
+# definitions for libcurl macros such as CURL_OFF_T_C, on the other
+# hand Borland's command line preprocessor (CPP32) version 5.5.1 does
+# not have the bug and achieves proper results. In order to avoid the
+# silent bug we first preprocess source files and later compile the
+# preprocessed result.
 
 .c.obj:
-       $(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
+       @-$(RM) $(@R).int
+       $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
+       $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
 
-all:   $(PROGNAME)
+all:   $(OBJDIR) tool_hugehelp $(PROGNAME)
 
 clean:
-       -$(RM) $(PROGNAME)
-       -$(RM) *.obj
-       -$(RM) hugehelp.c
+       cd $(OBJDIR)
+       @-$(RM) $(OBJECTS)
+       @-$(RM) $(PREPROCESSED)
+       cd ..
+       @-$(RMDIR) $(OBJDIR)
+       @-$(RM) $(PROGNAME)
+       @-$(RM) curl.tds
+
+$(OBJDIR):
+       @-$(RMDIR) $(OBJDIR)
+       @-$(MKDIR) $(OBJDIR)
 
-$(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
-       @-$(RM) $@
-       $(LD) $(LDFLAGS) -e$@ $**
+!ifdef WITH_ZLIB
+tool_hugehelp: ..\docs\MANUAL ..\docs\curl.1 mkhelp.pl
+        groff -Tascii -man -P -c ../docs/curl.1 > tool_hugehelp.tmp
+        perl -w mkhelp.pl -c ../docs/MANUAL < tool_hugehelp.tmp > tool_hugehelp.c
+       @-$(RM) tool_hugehelp.tmp
+!else
+tool_hugehelp:
+       if exist ..\GIT-INFO $(COPY) tool_hugehelp.c.cvs tool_hugehelp.c
+!endif
 
-hugehelp.c: hugehelp.c.cvs
-       @echo Creating $@
-       @$(CP) $** $@
+$(PROGNAME): $(OBJECTS) $(LIBCURL_LIB) $(LINKLIB)
+       @-$(RM) $(PROGNAME)
+       $(LD) $(LDFLAGS) -e$@ @&&!
+$(**: = ^
+)
+!
 
 
+# End of Makefile.b32
index eadbe48..6c0f250 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # CSRC2 = file4.c file5.c file6.c
 # CSOURCES = $(CSRC1) $(CSRC2)
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -46,77 +89,206 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = curl$(EXEEXT)
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.inc $(srcdir)/curl_config.h.in
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \
+       $(top_srcdir)/depcomp
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h curl_config.h \
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libcurltool_la_LIBADD =
+am__libcurltool_la_SOURCES_DIST = tool_binmode.c tool_bname.c \
+       tool_cb_dbg.c tool_cb_hdr.c tool_cb_prg.c tool_cb_rea.c \
+       tool_cb_see.c tool_cb_wrt.c tool_cfgable.c tool_convert.c \
+       tool_dirhie.c tool_doswin.c tool_easysrc.c tool_formparse.c \
+       tool_getparam.c tool_getpass.c tool_help.c tool_helpers.c \
+       tool_homedir.c tool_hugehelp.c tool_libinfo.c tool_main.c \
+       tool_metalink.c tool_mfiles.c tool_msgs.c tool_operate.c \
+       tool_operhlp.c tool_panykey.c tool_paramhlp.c tool_parsecfg.c \
+       tool_setopt.c tool_sleep.c tool_urlglob.c tool_util.c \
+       tool_vms.c tool_writeenv.c tool_writeout.c tool_xattr.c \
+       ../lib/strtoofft.c ../lib/strdup.c ../lib/rawstr.c \
+       ../lib/nonblock.c tool_binmode.h tool_bname.h tool_cb_dbg.h \
+       tool_cb_hdr.h tool_cb_prg.h tool_cb_rea.h tool_cb_see.h \
+       tool_cb_wrt.h tool_cfgable.h tool_convert.h tool_dirhie.h \
+       tool_doswin.h tool_easysrc.h tool_formparse.h tool_getparam.h \
+       tool_getpass.h tool_help.h tool_helpers.h tool_homedir.h \
+       tool_hugehelp.h tool_libinfo.h tool_main.h tool_metalink.h \
+       tool_mfiles.h tool_msgs.h tool_operate.h tool_operhlp.h \
+       tool_panykey.h tool_paramhlp.h tool_parsecfg.h tool_sdecls.h \
+       tool_setopt.h tool_setup.h tool_sleep.h tool_urlglob.h \
+       tool_util.h tool_version.h tool_vms.h tool_writeenv.h \
+       tool_writeout.h tool_xattr.h
+am__objects_1 = libcurltool_la-tool_binmode.lo \
+       libcurltool_la-tool_bname.lo libcurltool_la-tool_cb_dbg.lo \
+       libcurltool_la-tool_cb_hdr.lo libcurltool_la-tool_cb_prg.lo \
+       libcurltool_la-tool_cb_rea.lo libcurltool_la-tool_cb_see.lo \
+       libcurltool_la-tool_cb_wrt.lo libcurltool_la-tool_cfgable.lo \
+       libcurltool_la-tool_convert.lo libcurltool_la-tool_dirhie.lo \
+       libcurltool_la-tool_doswin.lo libcurltool_la-tool_easysrc.lo \
+       libcurltool_la-tool_formparse.lo \
+       libcurltool_la-tool_getparam.lo libcurltool_la-tool_getpass.lo \
+       libcurltool_la-tool_help.lo libcurltool_la-tool_helpers.lo \
+       libcurltool_la-tool_homedir.lo libcurltool_la-tool_hugehelp.lo \
+       libcurltool_la-tool_libinfo.lo libcurltool_la-tool_main.lo \
+       libcurltool_la-tool_metalink.lo libcurltool_la-tool_mfiles.lo \
+       libcurltool_la-tool_msgs.lo libcurltool_la-tool_operate.lo \
+       libcurltool_la-tool_operhlp.lo libcurltool_la-tool_panykey.lo \
+       libcurltool_la-tool_paramhlp.lo \
+       libcurltool_la-tool_parsecfg.lo libcurltool_la-tool_setopt.lo \
+       libcurltool_la-tool_sleep.lo libcurltool_la-tool_urlglob.lo \
+       libcurltool_la-tool_util.lo libcurltool_la-tool_vms.lo \
+       libcurltool_la-tool_writeenv.lo \
+       libcurltool_la-tool_writeout.lo libcurltool_la-tool_xattr.lo
+am__objects_2 = libcurltool_la-strtoofft.lo libcurltool_la-strdup.lo \
+       libcurltool_la-rawstr.lo libcurltool_la-nonblock.lo
+am__objects_3 =
+am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
+@BUILD_UNITTESTS_TRUE@am_libcurltool_la_OBJECTS = $(am__objects_4)
+libcurltool_la_OBJECTS = $(am_libcurltool_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcurltool_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libcurltool_la_CFLAGS) $(CFLAGS) $(libcurltool_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
+@BUILD_UNITTESTS_TRUE@am_libcurltool_la_rpath =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am__objects_1 = main.$(OBJEXT) hugehelp.$(OBJEXT) urlglob.$(OBJEXT) \
-       writeout.$(OBJEXT) writeenv.$(OBJEXT) getpass.$(OBJEXT) \
-       homedir.$(OBJEXT) curlutil.$(OBJEXT) os-specific.$(OBJEXT) \
-       xattr.$(OBJEXT)
-am__objects_2 = strtoofft.$(OBJEXT) strdup.$(OBJEXT) rawstr.$(OBJEXT) \
-       nonblock.$(OBJEXT)
-am__objects_3 =
-am_curl_OBJECTS = $(am__objects_1) $(am__objects_2) $(am__objects_3)
+am__objects_5 = curl-tool_binmode.$(OBJEXT) curl-tool_bname.$(OBJEXT) \
+       curl-tool_cb_dbg.$(OBJEXT) curl-tool_cb_hdr.$(OBJEXT) \
+       curl-tool_cb_prg.$(OBJEXT) curl-tool_cb_rea.$(OBJEXT) \
+       curl-tool_cb_see.$(OBJEXT) curl-tool_cb_wrt.$(OBJEXT) \
+       curl-tool_cfgable.$(OBJEXT) curl-tool_convert.$(OBJEXT) \
+       curl-tool_dirhie.$(OBJEXT) curl-tool_doswin.$(OBJEXT) \
+       curl-tool_easysrc.$(OBJEXT) curl-tool_formparse.$(OBJEXT) \
+       curl-tool_getparam.$(OBJEXT) curl-tool_getpass.$(OBJEXT) \
+       curl-tool_help.$(OBJEXT) curl-tool_helpers.$(OBJEXT) \
+       curl-tool_homedir.$(OBJEXT) curl-tool_hugehelp.$(OBJEXT) \
+       curl-tool_libinfo.$(OBJEXT) curl-tool_main.$(OBJEXT) \
+       curl-tool_metalink.$(OBJEXT) curl-tool_mfiles.$(OBJEXT) \
+       curl-tool_msgs.$(OBJEXT) curl-tool_operate.$(OBJEXT) \
+       curl-tool_operhlp.$(OBJEXT) curl-tool_panykey.$(OBJEXT) \
+       curl-tool_paramhlp.$(OBJEXT) curl-tool_parsecfg.$(OBJEXT) \
+       curl-tool_setopt.$(OBJEXT) curl-tool_sleep.$(OBJEXT) \
+       curl-tool_urlglob.$(OBJEXT) curl-tool_util.$(OBJEXT) \
+       curl-tool_vms.$(OBJEXT) curl-tool_writeenv.$(OBJEXT) \
+       curl-tool_writeout.$(OBJEXT) curl-tool_xattr.$(OBJEXT)
+am__objects_6 = curl-strtoofft.$(OBJEXT) curl-strdup.$(OBJEXT) \
+       curl-rawstr.$(OBJEXT) curl-nonblock.$(OBJEXT)
+am_curl_OBJECTS = $(am__objects_5) $(am__objects_6) $(am__objects_3)
 curl_OBJECTS = $(am_curl_OBJECTS)
+curl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(curl_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(curl_SOURCES)
-DIST_SOURCES = $(curl_SOURCES)
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libcurltool_la_SOURCES) $(curl_SOURCES)
+DIST_SOURCES = $(am__libcurltool_la_SOURCES_DIST) $(curl_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 
 # This might hold -Werror
 CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -133,7 +305,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -146,15 +319,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -164,23 +339,24 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 # Use the C locale to ensure that only ASCII characters appear in the
 # embedded text.
 NROFF = env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
@@ -195,7 +371,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -208,34 +383,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -247,6 +422,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -266,7 +442,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -276,9 +451,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 #***************************************************************************
 #                                  _   _ ____  _
@@ -287,7 +466,7 @@ target_alias = @target_alias@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -309,53 +488,134 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
 # $(top_builddir)/src is for curl's generated src/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
-# $(top_srcdir)/src is for curl's src/setup.h and "curl-private" files
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_builddir)/src          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_srcdir)/src
-
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
+AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \
+       -I$(top_srcdir)/include -I$(top_builddir)/lib \
+       -I$(top_builddir)/src -I$(top_srcdir)/lib -I$(top_srcdir)/src \
+       $(am__append_1)
 
 # libcurl has sources that provide functions named curlx_* that aren't part of
 # the official API, but we re-use the code here to avoid duplication.
-CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
-       $(top_srcdir)/lib/strdup.c \
-       $(top_srcdir)/lib/rawstr.c \
-       $(top_srcdir)/lib/nonblock.c
-
-CURL_CFILES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
-       getpass.c homedir.c curlutil.c os-specific.c xattr.c
-
-CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
-       config-riscos.h urlglob.h version.h os-specific.h \
-       writeout.h writeenv.h getpass.h homedir.h curlutil.h \
-       xattr.h
+CURLX_ONES = \
+       ../lib/strtoofft.c \
+       ../lib/strdup.c \
+       ../lib/rawstr.c \
+       ../lib/nonblock.c
+
+CURL_CFILES = \
+       tool_binmode.c \
+       tool_bname.c \
+       tool_cb_dbg.c \
+       tool_cb_hdr.c \
+       tool_cb_prg.c \
+       tool_cb_rea.c \
+       tool_cb_see.c \
+       tool_cb_wrt.c \
+       tool_cfgable.c \
+       tool_convert.c \
+       tool_dirhie.c \
+       tool_doswin.c \
+       tool_easysrc.c \
+       tool_formparse.c \
+       tool_getparam.c \
+       tool_getpass.c \
+       tool_help.c \
+       tool_helpers.c \
+       tool_homedir.c \
+       tool_hugehelp.c \
+       tool_libinfo.c \
+       tool_main.c \
+       tool_metalink.c \
+       tool_mfiles.c \
+       tool_msgs.c \
+       tool_operate.c \
+       tool_operhlp.c \
+       tool_panykey.c \
+       tool_paramhlp.c \
+       tool_parsecfg.c \
+       tool_setopt.c \
+       tool_sleep.c \
+       tool_urlglob.c \
+       tool_util.c \
+       tool_vms.c \
+       tool_writeenv.c \
+       tool_writeout.c \
+       tool_xattr.c
+
+CURL_HFILES = \
+       tool_binmode.h \
+       tool_bname.h \
+       tool_cb_dbg.h \
+       tool_cb_hdr.h \
+       tool_cb_prg.h \
+       tool_cb_rea.h \
+       tool_cb_see.h \
+       tool_cb_wrt.h \
+       tool_cfgable.h \
+       tool_convert.h \
+       tool_dirhie.h \
+       tool_doswin.h \
+       tool_easysrc.h \
+       tool_formparse.h \
+       tool_getparam.h \
+       tool_getpass.h \
+       tool_help.h \
+       tool_helpers.h \
+       tool_homedir.h \
+       tool_hugehelp.h \
+       tool_libinfo.h \
+       tool_main.h \
+       tool_metalink.h \
+       tool_mfiles.h \
+       tool_msgs.h \
+       tool_operate.h \
+       tool_operhlp.h \
+       tool_panykey.h \
+       tool_paramhlp.h \
+       tool_parsecfg.h \
+       tool_sdecls.h \
+       tool_setopt.h \
+       tool_setup.h \
+       tool_sleep.h \
+       tool_urlglob.h \
+       tool_util.h \
+       tool_version.h \
+       tool_vms.h \
+       tool_writeenv.h \
+       tool_writeout.h \
+       tool_xattr.h
 
 curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
-curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+@USE_EXPLICIT_LIB_DEPS_FALSE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
+@USE_EXPLICIT_LIB_DEPS_TRUE@curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
+curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
+curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
 curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-BUILT_SOURCES = hugehelp.c
-CLEANFILES = hugehelp.c
+
+# if unit tests are enabled, build a static library to link them with
+@BUILD_UNITTESTS_TRUE@noinst_LTLIBRARIES = libcurltool.la
+@BUILD_UNITTESTS_TRUE@libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS)
+@BUILD_UNITTESTS_TRUE@libcurltool_la_CFLAGS = -DUNITTESTS
+@BUILD_UNITTESTS_TRUE@libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
+@BUILD_UNITTESTS_TRUE@libcurltool_la_SOURCES = $(curl_SOURCES)
+BUILT_SOURCES = tool_hugehelp.c
+CLEANFILES = tool_hugehelp.c
 EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
-       curl_config.h.in macos/curl.mcp.xml.sit.hqx                       \
-       macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp vc6curlsrc.dsp \
-       macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc  \
-       Makefile.netware Makefile.inc Makefile.Watcom vc6curlsrc.dsw      \
-       CMakeLists.txt
+       macos/curl.mcp.xml.sit.hqx                                        \
+       macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp \
+       macos/src/macos_main.cpp makefile.amiga curl.rc                   \
+       Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
 
 MANPAGE = $(top_srcdir)/docs/curl.1
 README = $(top_srcdir)/docs/MANUAL
 MKHELP = $(top_srcdir)/src/mkhelp.pl
-HUGE = hugehelp.c
-all: $(BUILT_SOURCES) curl_config.h
+HUGE = tool_hugehelp.c
+all: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
@@ -364,14 +624,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  src/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -381,6 +641,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -389,54 +650,74 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-curl_config.h: stamp-h2
-       @if test ! -f $@; then \
-         rm -f stamp-h2; \
-         $(MAKE) stamp-h2; \
-       else :; fi
-
-stamp-h2: $(srcdir)/curl_config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h2
-       cd $(top_builddir) && $(SHELL) ./config.status src/curl_config.h
-$(srcdir)/curl_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       rm -f stamp-h2
-       touch $@
-
-distclean-hdr:
-       -rm -f curl_config.h stamp-h2
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+libcurltool.la: $(libcurltool_la_OBJECTS) $(libcurltool_la_DEPENDENCIES) $(EXTRA_libcurltool_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcurltool_la_LINK) $(am_libcurltool_la_rpath) $(libcurltool_la_OBJECTS) $(libcurltool_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p \
+        || test -f $$p1 \
+         ; then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' \
+           -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' \
+       `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
-curl$(EXEEXT): $(curl_OBJECTS) $(curl_DEPENDENCIES) 
+       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+curl$(EXEEXT): $(curl_OBJECTS) $(curl_DEPENDENCIES) $(EXTRA_curl_DEPENDENCIES) 
        @rm -f curl$(EXEEXT)
-       $(LINK) $(curl_LDFLAGS) $(curl_OBJECTS) $(curl_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(curl_LINK) $(curl_OBJECTS) $(curl_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -444,97 +725,993 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curlutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/homedir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hugehelp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonblock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os-specific.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoofft.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlglob.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writeenv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writeout.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-rawstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-strdup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_binmode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_bname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_dbg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_hdr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_prg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_rea.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_see.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cb_wrt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_cfgable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_convert.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_dirhie.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_doswin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_easysrc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_formparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_getparam.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_getpass.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_help.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_helpers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_homedir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_hugehelp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_libinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_metalink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_mfiles.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_msgs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_operate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_operhlp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_panykey.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_paramhlp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_parsecfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_setopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_urlglob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_vms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_writeenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_writeout.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl-tool_xattr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-nonblock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-rawstr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-strdup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-strtoofft.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_binmode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_bname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_dbg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_hdr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_prg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_rea.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_see.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cb_wrt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_cfgable.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_convert.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_dirhie.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_doswin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_easysrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_formparse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_getparam.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_getpass.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_help.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_helpers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_homedir.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_hugehelp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_libinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_main.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_metalink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_mfiles.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_msgs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_operate.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_operhlp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_panykey.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_paramhlp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_parsecfg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_setopt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_sleep.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_urlglob.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_vms.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_writeenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_writeout.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurltool_la-tool_xattr.Plo@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libcurltool_la-tool_binmode.lo: tool_binmode.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_binmode.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_binmode.Tpo -c -o libcurltool_la-tool_binmode.lo `test -f 'tool_binmode.c' || echo '$(srcdir)/'`tool_binmode.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_binmode.Tpo $(DEPDIR)/libcurltool_la-tool_binmode.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_binmode.c' object='libcurltool_la-tool_binmode.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_binmode.lo `test -f 'tool_binmode.c' || echo '$(srcdir)/'`tool_binmode.c
+
+libcurltool_la-tool_bname.lo: tool_bname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_bname.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_bname.Tpo -c -o libcurltool_la-tool_bname.lo `test -f 'tool_bname.c' || echo '$(srcdir)/'`tool_bname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_bname.Tpo $(DEPDIR)/libcurltool_la-tool_bname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_bname.c' object='libcurltool_la-tool_bname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_bname.lo `test -f 'tool_bname.c' || echo '$(srcdir)/'`tool_bname.c
+
+libcurltool_la-tool_cb_dbg.lo: tool_cb_dbg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_dbg.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_dbg.Tpo -c -o libcurltool_la-tool_cb_dbg.lo `test -f 'tool_cb_dbg.c' || echo '$(srcdir)/'`tool_cb_dbg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_dbg.Tpo $(DEPDIR)/libcurltool_la-tool_cb_dbg.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_dbg.c' object='libcurltool_la-tool_cb_dbg.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_dbg.lo `test -f 'tool_cb_dbg.c' || echo '$(srcdir)/'`tool_cb_dbg.c
+
+libcurltool_la-tool_cb_hdr.lo: tool_cb_hdr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_hdr.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_hdr.Tpo -c -o libcurltool_la-tool_cb_hdr.lo `test -f 'tool_cb_hdr.c' || echo '$(srcdir)/'`tool_cb_hdr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_hdr.Tpo $(DEPDIR)/libcurltool_la-tool_cb_hdr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_hdr.c' object='libcurltool_la-tool_cb_hdr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_hdr.lo `test -f 'tool_cb_hdr.c' || echo '$(srcdir)/'`tool_cb_hdr.c
+
+libcurltool_la-tool_cb_prg.lo: tool_cb_prg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_prg.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_prg.Tpo -c -o libcurltool_la-tool_cb_prg.lo `test -f 'tool_cb_prg.c' || echo '$(srcdir)/'`tool_cb_prg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_prg.Tpo $(DEPDIR)/libcurltool_la-tool_cb_prg.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_prg.c' object='libcurltool_la-tool_cb_prg.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_prg.lo `test -f 'tool_cb_prg.c' || echo '$(srcdir)/'`tool_cb_prg.c
+
+libcurltool_la-tool_cb_rea.lo: tool_cb_rea.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_rea.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_rea.Tpo -c -o libcurltool_la-tool_cb_rea.lo `test -f 'tool_cb_rea.c' || echo '$(srcdir)/'`tool_cb_rea.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_rea.Tpo $(DEPDIR)/libcurltool_la-tool_cb_rea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_rea.c' object='libcurltool_la-tool_cb_rea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_rea.lo `test -f 'tool_cb_rea.c' || echo '$(srcdir)/'`tool_cb_rea.c
+
+libcurltool_la-tool_cb_see.lo: tool_cb_see.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_see.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_see.Tpo -c -o libcurltool_la-tool_cb_see.lo `test -f 'tool_cb_see.c' || echo '$(srcdir)/'`tool_cb_see.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_see.Tpo $(DEPDIR)/libcurltool_la-tool_cb_see.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_see.c' object='libcurltool_la-tool_cb_see.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_see.lo `test -f 'tool_cb_see.c' || echo '$(srcdir)/'`tool_cb_see.c
+
+libcurltool_la-tool_cb_wrt.lo: tool_cb_wrt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cb_wrt.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cb_wrt.Tpo -c -o libcurltool_la-tool_cb_wrt.lo `test -f 'tool_cb_wrt.c' || echo '$(srcdir)/'`tool_cb_wrt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cb_wrt.Tpo $(DEPDIR)/libcurltool_la-tool_cb_wrt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_wrt.c' object='libcurltool_la-tool_cb_wrt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cb_wrt.lo `test -f 'tool_cb_wrt.c' || echo '$(srcdir)/'`tool_cb_wrt.c
+
+libcurltool_la-tool_cfgable.lo: tool_cfgable.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_cfgable.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_cfgable.Tpo -c -o libcurltool_la-tool_cfgable.lo `test -f 'tool_cfgable.c' || echo '$(srcdir)/'`tool_cfgable.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_cfgable.Tpo $(DEPDIR)/libcurltool_la-tool_cfgable.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cfgable.c' object='libcurltool_la-tool_cfgable.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_cfgable.lo `test -f 'tool_cfgable.c' || echo '$(srcdir)/'`tool_cfgable.c
+
+libcurltool_la-tool_convert.lo: tool_convert.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_convert.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_convert.Tpo -c -o libcurltool_la-tool_convert.lo `test -f 'tool_convert.c' || echo '$(srcdir)/'`tool_convert.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_convert.Tpo $(DEPDIR)/libcurltool_la-tool_convert.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_convert.c' object='libcurltool_la-tool_convert.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_convert.lo `test -f 'tool_convert.c' || echo '$(srcdir)/'`tool_convert.c
+
+libcurltool_la-tool_dirhie.lo: tool_dirhie.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_dirhie.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_dirhie.Tpo -c -o libcurltool_la-tool_dirhie.lo `test -f 'tool_dirhie.c' || echo '$(srcdir)/'`tool_dirhie.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_dirhie.Tpo $(DEPDIR)/libcurltool_la-tool_dirhie.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_dirhie.c' object='libcurltool_la-tool_dirhie.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_dirhie.lo `test -f 'tool_dirhie.c' || echo '$(srcdir)/'`tool_dirhie.c
+
+libcurltool_la-tool_doswin.lo: tool_doswin.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_doswin.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_doswin.Tpo -c -o libcurltool_la-tool_doswin.lo `test -f 'tool_doswin.c' || echo '$(srcdir)/'`tool_doswin.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_doswin.Tpo $(DEPDIR)/libcurltool_la-tool_doswin.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_doswin.c' object='libcurltool_la-tool_doswin.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_doswin.lo `test -f 'tool_doswin.c' || echo '$(srcdir)/'`tool_doswin.c
+
+libcurltool_la-tool_easysrc.lo: tool_easysrc.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_easysrc.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_easysrc.Tpo -c -o libcurltool_la-tool_easysrc.lo `test -f 'tool_easysrc.c' || echo '$(srcdir)/'`tool_easysrc.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_easysrc.Tpo $(DEPDIR)/libcurltool_la-tool_easysrc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_easysrc.c' object='libcurltool_la-tool_easysrc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_easysrc.lo `test -f 'tool_easysrc.c' || echo '$(srcdir)/'`tool_easysrc.c
+
+libcurltool_la-tool_formparse.lo: tool_formparse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_formparse.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_formparse.Tpo -c -o libcurltool_la-tool_formparse.lo `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_formparse.Tpo $(DEPDIR)/libcurltool_la-tool_formparse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_formparse.c' object='libcurltool_la-tool_formparse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_formparse.lo `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c
+
+libcurltool_la-tool_getparam.lo: tool_getparam.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_getparam.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_getparam.Tpo -c -o libcurltool_la-tool_getparam.lo `test -f 'tool_getparam.c' || echo '$(srcdir)/'`tool_getparam.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_getparam.Tpo $(DEPDIR)/libcurltool_la-tool_getparam.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getparam.c' object='libcurltool_la-tool_getparam.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_getparam.lo `test -f 'tool_getparam.c' || echo '$(srcdir)/'`tool_getparam.c
+
+libcurltool_la-tool_getpass.lo: tool_getpass.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_getpass.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_getpass.Tpo -c -o libcurltool_la-tool_getpass.lo `test -f 'tool_getpass.c' || echo '$(srcdir)/'`tool_getpass.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_getpass.Tpo $(DEPDIR)/libcurltool_la-tool_getpass.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getpass.c' object='libcurltool_la-tool_getpass.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_getpass.lo `test -f 'tool_getpass.c' || echo '$(srcdir)/'`tool_getpass.c
+
+libcurltool_la-tool_help.lo: tool_help.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_help.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_help.Tpo -c -o libcurltool_la-tool_help.lo `test -f 'tool_help.c' || echo '$(srcdir)/'`tool_help.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_help.Tpo $(DEPDIR)/libcurltool_la-tool_help.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_help.c' object='libcurltool_la-tool_help.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_help.lo `test -f 'tool_help.c' || echo '$(srcdir)/'`tool_help.c
+
+libcurltool_la-tool_helpers.lo: tool_helpers.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_helpers.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_helpers.Tpo -c -o libcurltool_la-tool_helpers.lo `test -f 'tool_helpers.c' || echo '$(srcdir)/'`tool_helpers.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_helpers.Tpo $(DEPDIR)/libcurltool_la-tool_helpers.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_helpers.c' object='libcurltool_la-tool_helpers.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_helpers.lo `test -f 'tool_helpers.c' || echo '$(srcdir)/'`tool_helpers.c
+
+libcurltool_la-tool_homedir.lo: tool_homedir.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_homedir.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_homedir.Tpo -c -o libcurltool_la-tool_homedir.lo `test -f 'tool_homedir.c' || echo '$(srcdir)/'`tool_homedir.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_homedir.Tpo $(DEPDIR)/libcurltool_la-tool_homedir.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_homedir.c' object='libcurltool_la-tool_homedir.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_homedir.lo `test -f 'tool_homedir.c' || echo '$(srcdir)/'`tool_homedir.c
+
+libcurltool_la-tool_hugehelp.lo: tool_hugehelp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_hugehelp.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_hugehelp.Tpo -c -o libcurltool_la-tool_hugehelp.lo `test -f 'tool_hugehelp.c' || echo '$(srcdir)/'`tool_hugehelp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_hugehelp.Tpo $(DEPDIR)/libcurltool_la-tool_hugehelp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_hugehelp.c' object='libcurltool_la-tool_hugehelp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_hugehelp.lo `test -f 'tool_hugehelp.c' || echo '$(srcdir)/'`tool_hugehelp.c
+
+libcurltool_la-tool_libinfo.lo: tool_libinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_libinfo.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_libinfo.Tpo -c -o libcurltool_la-tool_libinfo.lo `test -f 'tool_libinfo.c' || echo '$(srcdir)/'`tool_libinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_libinfo.Tpo $(DEPDIR)/libcurltool_la-tool_libinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_libinfo.c' object='libcurltool_la-tool_libinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_libinfo.lo `test -f 'tool_libinfo.c' || echo '$(srcdir)/'`tool_libinfo.c
+
+libcurltool_la-tool_main.lo: tool_main.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_main.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_main.Tpo -c -o libcurltool_la-tool_main.lo `test -f 'tool_main.c' || echo '$(srcdir)/'`tool_main.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_main.Tpo $(DEPDIR)/libcurltool_la-tool_main.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_main.c' object='libcurltool_la-tool_main.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_main.lo `test -f 'tool_main.c' || echo '$(srcdir)/'`tool_main.c
+
+libcurltool_la-tool_metalink.lo: tool_metalink.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_metalink.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_metalink.Tpo -c -o libcurltool_la-tool_metalink.lo `test -f 'tool_metalink.c' || echo '$(srcdir)/'`tool_metalink.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_metalink.Tpo $(DEPDIR)/libcurltool_la-tool_metalink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_metalink.c' object='libcurltool_la-tool_metalink.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_metalink.lo `test -f 'tool_metalink.c' || echo '$(srcdir)/'`tool_metalink.c
+
+libcurltool_la-tool_mfiles.lo: tool_mfiles.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_mfiles.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_mfiles.Tpo -c -o libcurltool_la-tool_mfiles.lo `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_mfiles.Tpo $(DEPDIR)/libcurltool_la-tool_mfiles.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_mfiles.c' object='libcurltool_la-tool_mfiles.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_mfiles.lo `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c
+
+libcurltool_la-tool_msgs.lo: tool_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_msgs.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_msgs.Tpo -c -o libcurltool_la-tool_msgs.lo `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_msgs.Tpo $(DEPDIR)/libcurltool_la-tool_msgs.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_msgs.c' object='libcurltool_la-tool_msgs.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_msgs.lo `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c
 
-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strtoofft.o -MD -MP -MF "$(DEPDIR)/strtoofft.Tpo" -c -o strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/strtoofft.Tpo" "$(DEPDIR)/strtoofft.Po"; else rm -f "$(DEPDIR)/strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='strtoofft.o' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_operate.lo: tool_operate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_operate.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_operate.Tpo -c -o libcurltool_la-tool_operate.lo `test -f 'tool_operate.c' || echo '$(srcdir)/'`tool_operate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_operate.Tpo $(DEPDIR)/libcurltool_la-tool_operate.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operate.c' object='libcurltool_la-tool_operate.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_operate.lo `test -f 'tool_operate.c' || echo '$(srcdir)/'`tool_operate.c
 
-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strtoofft.obj -MD -MP -MF "$(DEPDIR)/strtoofft.Tpo" -c -o strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/strtoofft.Tpo" "$(DEPDIR)/strtoofft.Po"; else rm -f "$(DEPDIR)/strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_operhlp.lo: tool_operhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_operhlp.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_operhlp.Tpo -c -o libcurltool_la-tool_operhlp.lo `test -f 'tool_operhlp.c' || echo '$(srcdir)/'`tool_operhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_operhlp.Tpo $(DEPDIR)/libcurltool_la-tool_operhlp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operhlp.c' object='libcurltool_la-tool_operhlp.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_operhlp.lo `test -f 'tool_operhlp.c' || echo '$(srcdir)/'`tool_operhlp.c
 
-strdup.o: $(top_srcdir)/lib/strdup.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strdup.o -MD -MP -MF "$(DEPDIR)/strdup.Tpo" -c -o strdup.o `test -f '$(top_srcdir)/lib/strdup.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strdup.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/strdup.Tpo" "$(DEPDIR)/strdup.Po"; else rm -f "$(DEPDIR)/strdup.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strdup.c' object='strdup.o' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_panykey.lo: tool_panykey.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_panykey.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_panykey.Tpo -c -o libcurltool_la-tool_panykey.lo `test -f 'tool_panykey.c' || echo '$(srcdir)/'`tool_panykey.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_panykey.Tpo $(DEPDIR)/libcurltool_la-tool_panykey.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_panykey.c' object='libcurltool_la-tool_panykey.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strdup.o `test -f '$(top_srcdir)/lib/strdup.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strdup.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_panykey.lo `test -f 'tool_panykey.c' || echo '$(srcdir)/'`tool_panykey.c
 
-strdup.obj: $(top_srcdir)/lib/strdup.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strdup.obj -MD -MP -MF "$(DEPDIR)/strdup.Tpo" -c -o strdup.obj `if test -f '$(top_srcdir)/lib/strdup.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strdup.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/strdup.Tpo" "$(DEPDIR)/strdup.Po"; else rm -f "$(DEPDIR)/strdup.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strdup.c' object='strdup.obj' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_paramhlp.lo: tool_paramhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_paramhlp.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_paramhlp.Tpo -c -o libcurltool_la-tool_paramhlp.lo `test -f 'tool_paramhlp.c' || echo '$(srcdir)/'`tool_paramhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_paramhlp.Tpo $(DEPDIR)/libcurltool_la-tool_paramhlp.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_paramhlp.c' object='libcurltool_la-tool_paramhlp.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strdup.obj `if test -f '$(top_srcdir)/lib/strdup.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strdup.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_paramhlp.lo `test -f 'tool_paramhlp.c' || echo '$(srcdir)/'`tool_paramhlp.c
 
-rawstr.o: $(top_srcdir)/lib/rawstr.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawstr.o -MD -MP -MF "$(DEPDIR)/rawstr.Tpo" -c -o rawstr.o `test -f '$(top_srcdir)/lib/rawstr.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/rawstr.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rawstr.Tpo" "$(DEPDIR)/rawstr.Po"; else rm -f "$(DEPDIR)/rawstr.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/rawstr.c' object='rawstr.o' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_parsecfg.lo: tool_parsecfg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_parsecfg.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_parsecfg.Tpo -c -o libcurltool_la-tool_parsecfg.lo `test -f 'tool_parsecfg.c' || echo '$(srcdir)/'`tool_parsecfg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_parsecfg.Tpo $(DEPDIR)/libcurltool_la-tool_parsecfg.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_parsecfg.c' object='libcurltool_la-tool_parsecfg.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawstr.o `test -f '$(top_srcdir)/lib/rawstr.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/rawstr.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_parsecfg.lo `test -f 'tool_parsecfg.c' || echo '$(srcdir)/'`tool_parsecfg.c
 
-rawstr.obj: $(top_srcdir)/lib/rawstr.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rawstr.obj -MD -MP -MF "$(DEPDIR)/rawstr.Tpo" -c -o rawstr.obj `if test -f '$(top_srcdir)/lib/rawstr.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/rawstr.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rawstr.Tpo" "$(DEPDIR)/rawstr.Po"; else rm -f "$(DEPDIR)/rawstr.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/rawstr.c' object='rawstr.obj' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_setopt.lo: tool_setopt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_setopt.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_setopt.Tpo -c -o libcurltool_la-tool_setopt.lo `test -f 'tool_setopt.c' || echo '$(srcdir)/'`tool_setopt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_setopt.Tpo $(DEPDIR)/libcurltool_la-tool_setopt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_setopt.c' object='libcurltool_la-tool_setopt.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rawstr.obj `if test -f '$(top_srcdir)/lib/rawstr.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/rawstr.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_setopt.lo `test -f 'tool_setopt.c' || echo '$(srcdir)/'`tool_setopt.c
 
-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonblock.o -MD -MP -MF "$(DEPDIR)/nonblock.Tpo" -c -o nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/nonblock.Tpo" "$(DEPDIR)/nonblock.Po"; else rm -f "$(DEPDIR)/nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='nonblock.o' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_sleep.lo: tool_sleep.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_sleep.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_sleep.Tpo -c -o libcurltool_la-tool_sleep.lo `test -f 'tool_sleep.c' || echo '$(srcdir)/'`tool_sleep.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_sleep.Tpo $(DEPDIR)/libcurltool_la-tool_sleep.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_sleep.c' object='libcurltool_la-tool_sleep.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_sleep.lo `test -f 'tool_sleep.c' || echo '$(srcdir)/'`tool_sleep.c
 
-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonblock.obj -MD -MP -MF "$(DEPDIR)/nonblock.Tpo" -c -o nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/nonblock.Tpo" "$(DEPDIR)/nonblock.Po"; else rm -f "$(DEPDIR)/nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='nonblock.obj' libtool=no @AMDEPBACKSLASH@
+libcurltool_la-tool_urlglob.lo: tool_urlglob.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_urlglob.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_urlglob.Tpo -c -o libcurltool_la-tool_urlglob.lo `test -f 'tool_urlglob.c' || echo '$(srcdir)/'`tool_urlglob.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_urlglob.Tpo $(DEPDIR)/libcurltool_la-tool_urlglob.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_urlglob.c' object='libcurltool_la-tool_urlglob.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_urlglob.lo `test -f 'tool_urlglob.c' || echo '$(srcdir)/'`tool_urlglob.c
+
+libcurltool_la-tool_util.lo: tool_util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_util.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_util.Tpo -c -o libcurltool_la-tool_util.lo `test -f 'tool_util.c' || echo '$(srcdir)/'`tool_util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_util.Tpo $(DEPDIR)/libcurltool_la-tool_util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_util.c' object='libcurltool_la-tool_util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_util.lo `test -f 'tool_util.c' || echo '$(srcdir)/'`tool_util.c
+
+libcurltool_la-tool_vms.lo: tool_vms.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_vms.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_vms.Tpo -c -o libcurltool_la-tool_vms.lo `test -f 'tool_vms.c' || echo '$(srcdir)/'`tool_vms.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_vms.Tpo $(DEPDIR)/libcurltool_la-tool_vms.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_vms.c' object='libcurltool_la-tool_vms.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_vms.lo `test -f 'tool_vms.c' || echo '$(srcdir)/'`tool_vms.c
+
+libcurltool_la-tool_writeenv.lo: tool_writeenv.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_writeenv.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_writeenv.Tpo -c -o libcurltool_la-tool_writeenv.lo `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_writeenv.Tpo $(DEPDIR)/libcurltool_la-tool_writeenv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeenv.c' object='libcurltool_la-tool_writeenv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_writeenv.lo `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c
+
+libcurltool_la-tool_writeout.lo: tool_writeout.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_writeout.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_writeout.Tpo -c -o libcurltool_la-tool_writeout.lo `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_writeout.Tpo $(DEPDIR)/libcurltool_la-tool_writeout.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeout.c' object='libcurltool_la-tool_writeout.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_writeout.lo `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c
+
+libcurltool_la-tool_xattr.lo: tool_xattr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-tool_xattr.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-tool_xattr.Tpo -c -o libcurltool_la-tool_xattr.lo `test -f 'tool_xattr.c' || echo '$(srcdir)/'`tool_xattr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-tool_xattr.Tpo $(DEPDIR)/libcurltool_la-tool_xattr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_xattr.c' object='libcurltool_la-tool_xattr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-tool_xattr.lo `test -f 'tool_xattr.c' || echo '$(srcdir)/'`tool_xattr.c
+
+libcurltool_la-strtoofft.lo: ../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-strtoofft.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-strtoofft.Tpo -c -o libcurltool_la-strtoofft.lo `test -f '../lib/strtoofft.c' || echo '$(srcdir)/'`../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-strtoofft.Tpo $(DEPDIR)/libcurltool_la-strtoofft.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strtoofft.c' object='libcurltool_la-strtoofft.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-strtoofft.lo `test -f '../lib/strtoofft.c' || echo '$(srcdir)/'`../lib/strtoofft.c
+
+libcurltool_la-strdup.lo: ../lib/strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-strdup.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-strdup.Tpo -c -o libcurltool_la-strdup.lo `test -f '../lib/strdup.c' || echo '$(srcdir)/'`../lib/strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-strdup.Tpo $(DEPDIR)/libcurltool_la-strdup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strdup.c' object='libcurltool_la-strdup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-strdup.lo `test -f '../lib/strdup.c' || echo '$(srcdir)/'`../lib/strdup.c
+
+libcurltool_la-rawstr.lo: ../lib/rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-rawstr.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-rawstr.Tpo -c -o libcurltool_la-rawstr.lo `test -f '../lib/rawstr.c' || echo '$(srcdir)/'`../lib/rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-rawstr.Tpo $(DEPDIR)/libcurltool_la-rawstr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/rawstr.c' object='libcurltool_la-rawstr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-rawstr.lo `test -f '../lib/rawstr.c' || echo '$(srcdir)/'`../lib/rawstr.c
+
+libcurltool_la-nonblock.lo: ../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -MT libcurltool_la-nonblock.lo -MD -MP -MF $(DEPDIR)/libcurltool_la-nonblock.Tpo -c -o libcurltool_la-nonblock.lo `test -f '../lib/nonblock.c' || echo '$(srcdir)/'`../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libcurltool_la-nonblock.Tpo $(DEPDIR)/libcurltool_la-nonblock.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/nonblock.c' object='libcurltool_la-nonblock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurltool_la_CPPFLAGS) $(CPPFLAGS) $(libcurltool_la_CFLAGS) $(CFLAGS) -c -o libcurltool_la-nonblock.lo `test -f '../lib/nonblock.c' || echo '$(srcdir)/'`../lib/nonblock.c
+
+curl-tool_binmode.o: tool_binmode.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_binmode.o -MD -MP -MF $(DEPDIR)/curl-tool_binmode.Tpo -c -o curl-tool_binmode.o `test -f 'tool_binmode.c' || echo '$(srcdir)/'`tool_binmode.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_binmode.Tpo $(DEPDIR)/curl-tool_binmode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_binmode.c' object='curl-tool_binmode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_binmode.o `test -f 'tool_binmode.c' || echo '$(srcdir)/'`tool_binmode.c
+
+curl-tool_binmode.obj: tool_binmode.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_binmode.obj -MD -MP -MF $(DEPDIR)/curl-tool_binmode.Tpo -c -o curl-tool_binmode.obj `if test -f 'tool_binmode.c'; then $(CYGPATH_W) 'tool_binmode.c'; else $(CYGPATH_W) '$(srcdir)/tool_binmode.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_binmode.Tpo $(DEPDIR)/curl-tool_binmode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_binmode.c' object='curl-tool_binmode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_binmode.obj `if test -f 'tool_binmode.c'; then $(CYGPATH_W) 'tool_binmode.c'; else $(CYGPATH_W) '$(srcdir)/tool_binmode.c'; fi`
+
+curl-tool_bname.o: tool_bname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_bname.o -MD -MP -MF $(DEPDIR)/curl-tool_bname.Tpo -c -o curl-tool_bname.o `test -f 'tool_bname.c' || echo '$(srcdir)/'`tool_bname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_bname.Tpo $(DEPDIR)/curl-tool_bname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_bname.c' object='curl-tool_bname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_bname.o `test -f 'tool_bname.c' || echo '$(srcdir)/'`tool_bname.c
+
+curl-tool_bname.obj: tool_bname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_bname.obj -MD -MP -MF $(DEPDIR)/curl-tool_bname.Tpo -c -o curl-tool_bname.obj `if test -f 'tool_bname.c'; then $(CYGPATH_W) 'tool_bname.c'; else $(CYGPATH_W) '$(srcdir)/tool_bname.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_bname.Tpo $(DEPDIR)/curl-tool_bname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_bname.c' object='curl-tool_bname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_bname.obj `if test -f 'tool_bname.c'; then $(CYGPATH_W) 'tool_bname.c'; else $(CYGPATH_W) '$(srcdir)/tool_bname.c'; fi`
+
+curl-tool_cb_dbg.o: tool_cb_dbg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_dbg.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_dbg.Tpo -c -o curl-tool_cb_dbg.o `test -f 'tool_cb_dbg.c' || echo '$(srcdir)/'`tool_cb_dbg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_dbg.Tpo $(DEPDIR)/curl-tool_cb_dbg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_dbg.c' object='curl-tool_cb_dbg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_dbg.o `test -f 'tool_cb_dbg.c' || echo '$(srcdir)/'`tool_cb_dbg.c
+
+curl-tool_cb_dbg.obj: tool_cb_dbg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_dbg.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_dbg.Tpo -c -o curl-tool_cb_dbg.obj `if test -f 'tool_cb_dbg.c'; then $(CYGPATH_W) 'tool_cb_dbg.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_dbg.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_dbg.Tpo $(DEPDIR)/curl-tool_cb_dbg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_dbg.c' object='curl-tool_cb_dbg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_dbg.obj `if test -f 'tool_cb_dbg.c'; then $(CYGPATH_W) 'tool_cb_dbg.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_dbg.c'; fi`
+
+curl-tool_cb_hdr.o: tool_cb_hdr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_hdr.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_hdr.Tpo -c -o curl-tool_cb_hdr.o `test -f 'tool_cb_hdr.c' || echo '$(srcdir)/'`tool_cb_hdr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_hdr.Tpo $(DEPDIR)/curl-tool_cb_hdr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_hdr.c' object='curl-tool_cb_hdr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_hdr.o `test -f 'tool_cb_hdr.c' || echo '$(srcdir)/'`tool_cb_hdr.c
+
+curl-tool_cb_hdr.obj: tool_cb_hdr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_hdr.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_hdr.Tpo -c -o curl-tool_cb_hdr.obj `if test -f 'tool_cb_hdr.c'; then $(CYGPATH_W) 'tool_cb_hdr.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_hdr.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_hdr.Tpo $(DEPDIR)/curl-tool_cb_hdr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_hdr.c' object='curl-tool_cb_hdr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_hdr.obj `if test -f 'tool_cb_hdr.c'; then $(CYGPATH_W) 'tool_cb_hdr.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_hdr.c'; fi`
+
+curl-tool_cb_prg.o: tool_cb_prg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_prg.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_prg.Tpo -c -o curl-tool_cb_prg.o `test -f 'tool_cb_prg.c' || echo '$(srcdir)/'`tool_cb_prg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_prg.Tpo $(DEPDIR)/curl-tool_cb_prg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_prg.c' object='curl-tool_cb_prg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_prg.o `test -f 'tool_cb_prg.c' || echo '$(srcdir)/'`tool_cb_prg.c
+
+curl-tool_cb_prg.obj: tool_cb_prg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_prg.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_prg.Tpo -c -o curl-tool_cb_prg.obj `if test -f 'tool_cb_prg.c'; then $(CYGPATH_W) 'tool_cb_prg.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_prg.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_prg.Tpo $(DEPDIR)/curl-tool_cb_prg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_prg.c' object='curl-tool_cb_prg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_prg.obj `if test -f 'tool_cb_prg.c'; then $(CYGPATH_W) 'tool_cb_prg.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_prg.c'; fi`
+
+curl-tool_cb_rea.o: tool_cb_rea.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_rea.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_rea.Tpo -c -o curl-tool_cb_rea.o `test -f 'tool_cb_rea.c' || echo '$(srcdir)/'`tool_cb_rea.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_rea.Tpo $(DEPDIR)/curl-tool_cb_rea.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_rea.c' object='curl-tool_cb_rea.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_rea.o `test -f 'tool_cb_rea.c' || echo '$(srcdir)/'`tool_cb_rea.c
+
+curl-tool_cb_rea.obj: tool_cb_rea.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_rea.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_rea.Tpo -c -o curl-tool_cb_rea.obj `if test -f 'tool_cb_rea.c'; then $(CYGPATH_W) 'tool_cb_rea.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_rea.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_rea.Tpo $(DEPDIR)/curl-tool_cb_rea.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_rea.c' object='curl-tool_cb_rea.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_rea.obj `if test -f 'tool_cb_rea.c'; then $(CYGPATH_W) 'tool_cb_rea.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_rea.c'; fi`
+
+curl-tool_cb_see.o: tool_cb_see.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_see.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_see.Tpo -c -o curl-tool_cb_see.o `test -f 'tool_cb_see.c' || echo '$(srcdir)/'`tool_cb_see.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_see.Tpo $(DEPDIR)/curl-tool_cb_see.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_see.c' object='curl-tool_cb_see.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_see.o `test -f 'tool_cb_see.c' || echo '$(srcdir)/'`tool_cb_see.c
+
+curl-tool_cb_see.obj: tool_cb_see.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_see.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_see.Tpo -c -o curl-tool_cb_see.obj `if test -f 'tool_cb_see.c'; then $(CYGPATH_W) 'tool_cb_see.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_see.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_see.Tpo $(DEPDIR)/curl-tool_cb_see.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_see.c' object='curl-tool_cb_see.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_see.obj `if test -f 'tool_cb_see.c'; then $(CYGPATH_W) 'tool_cb_see.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_see.c'; fi`
+
+curl-tool_cb_wrt.o: tool_cb_wrt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_wrt.o -MD -MP -MF $(DEPDIR)/curl-tool_cb_wrt.Tpo -c -o curl-tool_cb_wrt.o `test -f 'tool_cb_wrt.c' || echo '$(srcdir)/'`tool_cb_wrt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_wrt.Tpo $(DEPDIR)/curl-tool_cb_wrt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_wrt.c' object='curl-tool_cb_wrt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_wrt.o `test -f 'tool_cb_wrt.c' || echo '$(srcdir)/'`tool_cb_wrt.c
+
+curl-tool_cb_wrt.obj: tool_cb_wrt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cb_wrt.obj -MD -MP -MF $(DEPDIR)/curl-tool_cb_wrt.Tpo -c -o curl-tool_cb_wrt.obj `if test -f 'tool_cb_wrt.c'; then $(CYGPATH_W) 'tool_cb_wrt.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_wrt.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cb_wrt.Tpo $(DEPDIR)/curl-tool_cb_wrt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cb_wrt.c' object='curl-tool_cb_wrt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cb_wrt.obj `if test -f 'tool_cb_wrt.c'; then $(CYGPATH_W) 'tool_cb_wrt.c'; else $(CYGPATH_W) '$(srcdir)/tool_cb_wrt.c'; fi`
+
+curl-tool_cfgable.o: tool_cfgable.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cfgable.o -MD -MP -MF $(DEPDIR)/curl-tool_cfgable.Tpo -c -o curl-tool_cfgable.o `test -f 'tool_cfgable.c' || echo '$(srcdir)/'`tool_cfgable.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cfgable.Tpo $(DEPDIR)/curl-tool_cfgable.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cfgable.c' object='curl-tool_cfgable.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cfgable.o `test -f 'tool_cfgable.c' || echo '$(srcdir)/'`tool_cfgable.c
+
+curl-tool_cfgable.obj: tool_cfgable.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_cfgable.obj -MD -MP -MF $(DEPDIR)/curl-tool_cfgable.Tpo -c -o curl-tool_cfgable.obj `if test -f 'tool_cfgable.c'; then $(CYGPATH_W) 'tool_cfgable.c'; else $(CYGPATH_W) '$(srcdir)/tool_cfgable.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_cfgable.Tpo $(DEPDIR)/curl-tool_cfgable.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_cfgable.c' object='curl-tool_cfgable.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_cfgable.obj `if test -f 'tool_cfgable.c'; then $(CYGPATH_W) 'tool_cfgable.c'; else $(CYGPATH_W) '$(srcdir)/tool_cfgable.c'; fi`
+
+curl-tool_convert.o: tool_convert.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_convert.o -MD -MP -MF $(DEPDIR)/curl-tool_convert.Tpo -c -o curl-tool_convert.o `test -f 'tool_convert.c' || echo '$(srcdir)/'`tool_convert.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_convert.Tpo $(DEPDIR)/curl-tool_convert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_convert.c' object='curl-tool_convert.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_convert.o `test -f 'tool_convert.c' || echo '$(srcdir)/'`tool_convert.c
+
+curl-tool_convert.obj: tool_convert.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_convert.obj -MD -MP -MF $(DEPDIR)/curl-tool_convert.Tpo -c -o curl-tool_convert.obj `if test -f 'tool_convert.c'; then $(CYGPATH_W) 'tool_convert.c'; else $(CYGPATH_W) '$(srcdir)/tool_convert.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_convert.Tpo $(DEPDIR)/curl-tool_convert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_convert.c' object='curl-tool_convert.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_convert.obj `if test -f 'tool_convert.c'; then $(CYGPATH_W) 'tool_convert.c'; else $(CYGPATH_W) '$(srcdir)/tool_convert.c'; fi`
+
+curl-tool_dirhie.o: tool_dirhie.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_dirhie.o -MD -MP -MF $(DEPDIR)/curl-tool_dirhie.Tpo -c -o curl-tool_dirhie.o `test -f 'tool_dirhie.c' || echo '$(srcdir)/'`tool_dirhie.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_dirhie.Tpo $(DEPDIR)/curl-tool_dirhie.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_dirhie.c' object='curl-tool_dirhie.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_dirhie.o `test -f 'tool_dirhie.c' || echo '$(srcdir)/'`tool_dirhie.c
+
+curl-tool_dirhie.obj: tool_dirhie.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_dirhie.obj -MD -MP -MF $(DEPDIR)/curl-tool_dirhie.Tpo -c -o curl-tool_dirhie.obj `if test -f 'tool_dirhie.c'; then $(CYGPATH_W) 'tool_dirhie.c'; else $(CYGPATH_W) '$(srcdir)/tool_dirhie.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_dirhie.Tpo $(DEPDIR)/curl-tool_dirhie.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_dirhie.c' object='curl-tool_dirhie.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_dirhie.obj `if test -f 'tool_dirhie.c'; then $(CYGPATH_W) 'tool_dirhie.c'; else $(CYGPATH_W) '$(srcdir)/tool_dirhie.c'; fi`
+
+curl-tool_doswin.o: tool_doswin.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_doswin.o -MD -MP -MF $(DEPDIR)/curl-tool_doswin.Tpo -c -o curl-tool_doswin.o `test -f 'tool_doswin.c' || echo '$(srcdir)/'`tool_doswin.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_doswin.Tpo $(DEPDIR)/curl-tool_doswin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_doswin.c' object='curl-tool_doswin.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_doswin.o `test -f 'tool_doswin.c' || echo '$(srcdir)/'`tool_doswin.c
+
+curl-tool_doswin.obj: tool_doswin.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_doswin.obj -MD -MP -MF $(DEPDIR)/curl-tool_doswin.Tpo -c -o curl-tool_doswin.obj `if test -f 'tool_doswin.c'; then $(CYGPATH_W) 'tool_doswin.c'; else $(CYGPATH_W) '$(srcdir)/tool_doswin.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_doswin.Tpo $(DEPDIR)/curl-tool_doswin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_doswin.c' object='curl-tool_doswin.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_doswin.obj `if test -f 'tool_doswin.c'; then $(CYGPATH_W) 'tool_doswin.c'; else $(CYGPATH_W) '$(srcdir)/tool_doswin.c'; fi`
+
+curl-tool_easysrc.o: tool_easysrc.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_easysrc.o -MD -MP -MF $(DEPDIR)/curl-tool_easysrc.Tpo -c -o curl-tool_easysrc.o `test -f 'tool_easysrc.c' || echo '$(srcdir)/'`tool_easysrc.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_easysrc.Tpo $(DEPDIR)/curl-tool_easysrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_easysrc.c' object='curl-tool_easysrc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_easysrc.o `test -f 'tool_easysrc.c' || echo '$(srcdir)/'`tool_easysrc.c
+
+curl-tool_easysrc.obj: tool_easysrc.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_easysrc.obj -MD -MP -MF $(DEPDIR)/curl-tool_easysrc.Tpo -c -o curl-tool_easysrc.obj `if test -f 'tool_easysrc.c'; then $(CYGPATH_W) 'tool_easysrc.c'; else $(CYGPATH_W) '$(srcdir)/tool_easysrc.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_easysrc.Tpo $(DEPDIR)/curl-tool_easysrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_easysrc.c' object='curl-tool_easysrc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_easysrc.obj `if test -f 'tool_easysrc.c'; then $(CYGPATH_W) 'tool_easysrc.c'; else $(CYGPATH_W) '$(srcdir)/tool_easysrc.c'; fi`
+
+curl-tool_formparse.o: tool_formparse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_formparse.o -MD -MP -MF $(DEPDIR)/curl-tool_formparse.Tpo -c -o curl-tool_formparse.o `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_formparse.Tpo $(DEPDIR)/curl-tool_formparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_formparse.c' object='curl-tool_formparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_formparse.o `test -f 'tool_formparse.c' || echo '$(srcdir)/'`tool_formparse.c
+
+curl-tool_formparse.obj: tool_formparse.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_formparse.obj -MD -MP -MF $(DEPDIR)/curl-tool_formparse.Tpo -c -o curl-tool_formparse.obj `if test -f 'tool_formparse.c'; then $(CYGPATH_W) 'tool_formparse.c'; else $(CYGPATH_W) '$(srcdir)/tool_formparse.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_formparse.Tpo $(DEPDIR)/curl-tool_formparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_formparse.c' object='curl-tool_formparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_formparse.obj `if test -f 'tool_formparse.c'; then $(CYGPATH_W) 'tool_formparse.c'; else $(CYGPATH_W) '$(srcdir)/tool_formparse.c'; fi`
+
+curl-tool_getparam.o: tool_getparam.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_getparam.o -MD -MP -MF $(DEPDIR)/curl-tool_getparam.Tpo -c -o curl-tool_getparam.o `test -f 'tool_getparam.c' || echo '$(srcdir)/'`tool_getparam.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_getparam.Tpo $(DEPDIR)/curl-tool_getparam.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getparam.c' object='curl-tool_getparam.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_getparam.o `test -f 'tool_getparam.c' || echo '$(srcdir)/'`tool_getparam.c
+
+curl-tool_getparam.obj: tool_getparam.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_getparam.obj -MD -MP -MF $(DEPDIR)/curl-tool_getparam.Tpo -c -o curl-tool_getparam.obj `if test -f 'tool_getparam.c'; then $(CYGPATH_W) 'tool_getparam.c'; else $(CYGPATH_W) '$(srcdir)/tool_getparam.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_getparam.Tpo $(DEPDIR)/curl-tool_getparam.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getparam.c' object='curl-tool_getparam.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_getparam.obj `if test -f 'tool_getparam.c'; then $(CYGPATH_W) 'tool_getparam.c'; else $(CYGPATH_W) '$(srcdir)/tool_getparam.c'; fi`
+
+curl-tool_getpass.o: tool_getpass.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_getpass.o -MD -MP -MF $(DEPDIR)/curl-tool_getpass.Tpo -c -o curl-tool_getpass.o `test -f 'tool_getpass.c' || echo '$(srcdir)/'`tool_getpass.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_getpass.Tpo $(DEPDIR)/curl-tool_getpass.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getpass.c' object='curl-tool_getpass.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_getpass.o `test -f 'tool_getpass.c' || echo '$(srcdir)/'`tool_getpass.c
+
+curl-tool_getpass.obj: tool_getpass.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_getpass.obj -MD -MP -MF $(DEPDIR)/curl-tool_getpass.Tpo -c -o curl-tool_getpass.obj `if test -f 'tool_getpass.c'; then $(CYGPATH_W) 'tool_getpass.c'; else $(CYGPATH_W) '$(srcdir)/tool_getpass.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_getpass.Tpo $(DEPDIR)/curl-tool_getpass.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_getpass.c' object='curl-tool_getpass.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_getpass.obj `if test -f 'tool_getpass.c'; then $(CYGPATH_W) 'tool_getpass.c'; else $(CYGPATH_W) '$(srcdir)/tool_getpass.c'; fi`
+
+curl-tool_help.o: tool_help.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_help.o -MD -MP -MF $(DEPDIR)/curl-tool_help.Tpo -c -o curl-tool_help.o `test -f 'tool_help.c' || echo '$(srcdir)/'`tool_help.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_help.Tpo $(DEPDIR)/curl-tool_help.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_help.c' object='curl-tool_help.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_help.o `test -f 'tool_help.c' || echo '$(srcdir)/'`tool_help.c
+
+curl-tool_help.obj: tool_help.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_help.obj -MD -MP -MF $(DEPDIR)/curl-tool_help.Tpo -c -o curl-tool_help.obj `if test -f 'tool_help.c'; then $(CYGPATH_W) 'tool_help.c'; else $(CYGPATH_W) '$(srcdir)/tool_help.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_help.Tpo $(DEPDIR)/curl-tool_help.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_help.c' object='curl-tool_help.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_help.obj `if test -f 'tool_help.c'; then $(CYGPATH_W) 'tool_help.c'; else $(CYGPATH_W) '$(srcdir)/tool_help.c'; fi`
+
+curl-tool_helpers.o: tool_helpers.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_helpers.o -MD -MP -MF $(DEPDIR)/curl-tool_helpers.Tpo -c -o curl-tool_helpers.o `test -f 'tool_helpers.c' || echo '$(srcdir)/'`tool_helpers.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_helpers.Tpo $(DEPDIR)/curl-tool_helpers.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_helpers.c' object='curl-tool_helpers.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_helpers.o `test -f 'tool_helpers.c' || echo '$(srcdir)/'`tool_helpers.c
+
+curl-tool_helpers.obj: tool_helpers.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_helpers.obj -MD -MP -MF $(DEPDIR)/curl-tool_helpers.Tpo -c -o curl-tool_helpers.obj `if test -f 'tool_helpers.c'; then $(CYGPATH_W) 'tool_helpers.c'; else $(CYGPATH_W) '$(srcdir)/tool_helpers.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_helpers.Tpo $(DEPDIR)/curl-tool_helpers.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_helpers.c' object='curl-tool_helpers.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_helpers.obj `if test -f 'tool_helpers.c'; then $(CYGPATH_W) 'tool_helpers.c'; else $(CYGPATH_W) '$(srcdir)/tool_helpers.c'; fi`
+
+curl-tool_homedir.o: tool_homedir.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_homedir.o -MD -MP -MF $(DEPDIR)/curl-tool_homedir.Tpo -c -o curl-tool_homedir.o `test -f 'tool_homedir.c' || echo '$(srcdir)/'`tool_homedir.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_homedir.Tpo $(DEPDIR)/curl-tool_homedir.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_homedir.c' object='curl-tool_homedir.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_homedir.o `test -f 'tool_homedir.c' || echo '$(srcdir)/'`tool_homedir.c
+
+curl-tool_homedir.obj: tool_homedir.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_homedir.obj -MD -MP -MF $(DEPDIR)/curl-tool_homedir.Tpo -c -o curl-tool_homedir.obj `if test -f 'tool_homedir.c'; then $(CYGPATH_W) 'tool_homedir.c'; else $(CYGPATH_W) '$(srcdir)/tool_homedir.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_homedir.Tpo $(DEPDIR)/curl-tool_homedir.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_homedir.c' object='curl-tool_homedir.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_homedir.obj `if test -f 'tool_homedir.c'; then $(CYGPATH_W) 'tool_homedir.c'; else $(CYGPATH_W) '$(srcdir)/tool_homedir.c'; fi`
+
+curl-tool_hugehelp.o: tool_hugehelp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_hugehelp.o -MD -MP -MF $(DEPDIR)/curl-tool_hugehelp.Tpo -c -o curl-tool_hugehelp.o `test -f 'tool_hugehelp.c' || echo '$(srcdir)/'`tool_hugehelp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_hugehelp.Tpo $(DEPDIR)/curl-tool_hugehelp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_hugehelp.c' object='curl-tool_hugehelp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_hugehelp.o `test -f 'tool_hugehelp.c' || echo '$(srcdir)/'`tool_hugehelp.c
+
+curl-tool_hugehelp.obj: tool_hugehelp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_hugehelp.obj -MD -MP -MF $(DEPDIR)/curl-tool_hugehelp.Tpo -c -o curl-tool_hugehelp.obj `if test -f 'tool_hugehelp.c'; then $(CYGPATH_W) 'tool_hugehelp.c'; else $(CYGPATH_W) '$(srcdir)/tool_hugehelp.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_hugehelp.Tpo $(DEPDIR)/curl-tool_hugehelp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_hugehelp.c' object='curl-tool_hugehelp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_hugehelp.obj `if test -f 'tool_hugehelp.c'; then $(CYGPATH_W) 'tool_hugehelp.c'; else $(CYGPATH_W) '$(srcdir)/tool_hugehelp.c'; fi`
+
+curl-tool_libinfo.o: tool_libinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_libinfo.o -MD -MP -MF $(DEPDIR)/curl-tool_libinfo.Tpo -c -o curl-tool_libinfo.o `test -f 'tool_libinfo.c' || echo '$(srcdir)/'`tool_libinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_libinfo.Tpo $(DEPDIR)/curl-tool_libinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_libinfo.c' object='curl-tool_libinfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_libinfo.o `test -f 'tool_libinfo.c' || echo '$(srcdir)/'`tool_libinfo.c
+
+curl-tool_libinfo.obj: tool_libinfo.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_libinfo.obj -MD -MP -MF $(DEPDIR)/curl-tool_libinfo.Tpo -c -o curl-tool_libinfo.obj `if test -f 'tool_libinfo.c'; then $(CYGPATH_W) 'tool_libinfo.c'; else $(CYGPATH_W) '$(srcdir)/tool_libinfo.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_libinfo.Tpo $(DEPDIR)/curl-tool_libinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_libinfo.c' object='curl-tool_libinfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_libinfo.obj `if test -f 'tool_libinfo.c'; then $(CYGPATH_W) 'tool_libinfo.c'; else $(CYGPATH_W) '$(srcdir)/tool_libinfo.c'; fi`
+
+curl-tool_main.o: tool_main.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_main.o -MD -MP -MF $(DEPDIR)/curl-tool_main.Tpo -c -o curl-tool_main.o `test -f 'tool_main.c' || echo '$(srcdir)/'`tool_main.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_main.Tpo $(DEPDIR)/curl-tool_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_main.c' object='curl-tool_main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_main.o `test -f 'tool_main.c' || echo '$(srcdir)/'`tool_main.c
+
+curl-tool_main.obj: tool_main.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_main.obj -MD -MP -MF $(DEPDIR)/curl-tool_main.Tpo -c -o curl-tool_main.obj `if test -f 'tool_main.c'; then $(CYGPATH_W) 'tool_main.c'; else $(CYGPATH_W) '$(srcdir)/tool_main.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_main.Tpo $(DEPDIR)/curl-tool_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_main.c' object='curl-tool_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_main.obj `if test -f 'tool_main.c'; then $(CYGPATH_W) 'tool_main.c'; else $(CYGPATH_W) '$(srcdir)/tool_main.c'; fi`
+
+curl-tool_metalink.o: tool_metalink.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_metalink.o -MD -MP -MF $(DEPDIR)/curl-tool_metalink.Tpo -c -o curl-tool_metalink.o `test -f 'tool_metalink.c' || echo '$(srcdir)/'`tool_metalink.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_metalink.Tpo $(DEPDIR)/curl-tool_metalink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_metalink.c' object='curl-tool_metalink.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_metalink.o `test -f 'tool_metalink.c' || echo '$(srcdir)/'`tool_metalink.c
+
+curl-tool_metalink.obj: tool_metalink.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_metalink.obj -MD -MP -MF $(DEPDIR)/curl-tool_metalink.Tpo -c -o curl-tool_metalink.obj `if test -f 'tool_metalink.c'; then $(CYGPATH_W) 'tool_metalink.c'; else $(CYGPATH_W) '$(srcdir)/tool_metalink.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_metalink.Tpo $(DEPDIR)/curl-tool_metalink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_metalink.c' object='curl-tool_metalink.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_metalink.obj `if test -f 'tool_metalink.c'; then $(CYGPATH_W) 'tool_metalink.c'; else $(CYGPATH_W) '$(srcdir)/tool_metalink.c'; fi`
+
+curl-tool_mfiles.o: tool_mfiles.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_mfiles.o -MD -MP -MF $(DEPDIR)/curl-tool_mfiles.Tpo -c -o curl-tool_mfiles.o `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_mfiles.Tpo $(DEPDIR)/curl-tool_mfiles.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_mfiles.c' object='curl-tool_mfiles.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_mfiles.o `test -f 'tool_mfiles.c' || echo '$(srcdir)/'`tool_mfiles.c
+
+curl-tool_mfiles.obj: tool_mfiles.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_mfiles.obj -MD -MP -MF $(DEPDIR)/curl-tool_mfiles.Tpo -c -o curl-tool_mfiles.obj `if test -f 'tool_mfiles.c'; then $(CYGPATH_W) 'tool_mfiles.c'; else $(CYGPATH_W) '$(srcdir)/tool_mfiles.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_mfiles.Tpo $(DEPDIR)/curl-tool_mfiles.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_mfiles.c' object='curl-tool_mfiles.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_mfiles.obj `if test -f 'tool_mfiles.c'; then $(CYGPATH_W) 'tool_mfiles.c'; else $(CYGPATH_W) '$(srcdir)/tool_mfiles.c'; fi`
+
+curl-tool_msgs.o: tool_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_msgs.o -MD -MP -MF $(DEPDIR)/curl-tool_msgs.Tpo -c -o curl-tool_msgs.o `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_msgs.Tpo $(DEPDIR)/curl-tool_msgs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_msgs.c' object='curl-tool_msgs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_msgs.o `test -f 'tool_msgs.c' || echo '$(srcdir)/'`tool_msgs.c
+
+curl-tool_msgs.obj: tool_msgs.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_msgs.obj -MD -MP -MF $(DEPDIR)/curl-tool_msgs.Tpo -c -o curl-tool_msgs.obj `if test -f 'tool_msgs.c'; then $(CYGPATH_W) 'tool_msgs.c'; else $(CYGPATH_W) '$(srcdir)/tool_msgs.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_msgs.Tpo $(DEPDIR)/curl-tool_msgs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_msgs.c' object='curl-tool_msgs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_msgs.obj `if test -f 'tool_msgs.c'; then $(CYGPATH_W) 'tool_msgs.c'; else $(CYGPATH_W) '$(srcdir)/tool_msgs.c'; fi`
+
+curl-tool_operate.o: tool_operate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_operate.o -MD -MP -MF $(DEPDIR)/curl-tool_operate.Tpo -c -o curl-tool_operate.o `test -f 'tool_operate.c' || echo '$(srcdir)/'`tool_operate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_operate.Tpo $(DEPDIR)/curl-tool_operate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operate.c' object='curl-tool_operate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_operate.o `test -f 'tool_operate.c' || echo '$(srcdir)/'`tool_operate.c
+
+curl-tool_operate.obj: tool_operate.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_operate.obj -MD -MP -MF $(DEPDIR)/curl-tool_operate.Tpo -c -o curl-tool_operate.obj `if test -f 'tool_operate.c'; then $(CYGPATH_W) 'tool_operate.c'; else $(CYGPATH_W) '$(srcdir)/tool_operate.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_operate.Tpo $(DEPDIR)/curl-tool_operate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operate.c' object='curl-tool_operate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_operate.obj `if test -f 'tool_operate.c'; then $(CYGPATH_W) 'tool_operate.c'; else $(CYGPATH_W) '$(srcdir)/tool_operate.c'; fi`
+
+curl-tool_operhlp.o: tool_operhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_operhlp.o -MD -MP -MF $(DEPDIR)/curl-tool_operhlp.Tpo -c -o curl-tool_operhlp.o `test -f 'tool_operhlp.c' || echo '$(srcdir)/'`tool_operhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_operhlp.Tpo $(DEPDIR)/curl-tool_operhlp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operhlp.c' object='curl-tool_operhlp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_operhlp.o `test -f 'tool_operhlp.c' || echo '$(srcdir)/'`tool_operhlp.c
+
+curl-tool_operhlp.obj: tool_operhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_operhlp.obj -MD -MP -MF $(DEPDIR)/curl-tool_operhlp.Tpo -c -o curl-tool_operhlp.obj `if test -f 'tool_operhlp.c'; then $(CYGPATH_W) 'tool_operhlp.c'; else $(CYGPATH_W) '$(srcdir)/tool_operhlp.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_operhlp.Tpo $(DEPDIR)/curl-tool_operhlp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_operhlp.c' object='curl-tool_operhlp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_operhlp.obj `if test -f 'tool_operhlp.c'; then $(CYGPATH_W) 'tool_operhlp.c'; else $(CYGPATH_W) '$(srcdir)/tool_operhlp.c'; fi`
+
+curl-tool_panykey.o: tool_panykey.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_panykey.o -MD -MP -MF $(DEPDIR)/curl-tool_panykey.Tpo -c -o curl-tool_panykey.o `test -f 'tool_panykey.c' || echo '$(srcdir)/'`tool_panykey.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_panykey.Tpo $(DEPDIR)/curl-tool_panykey.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_panykey.c' object='curl-tool_panykey.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_panykey.o `test -f 'tool_panykey.c' || echo '$(srcdir)/'`tool_panykey.c
+
+curl-tool_panykey.obj: tool_panykey.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_panykey.obj -MD -MP -MF $(DEPDIR)/curl-tool_panykey.Tpo -c -o curl-tool_panykey.obj `if test -f 'tool_panykey.c'; then $(CYGPATH_W) 'tool_panykey.c'; else $(CYGPATH_W) '$(srcdir)/tool_panykey.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_panykey.Tpo $(DEPDIR)/curl-tool_panykey.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_panykey.c' object='curl-tool_panykey.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_panykey.obj `if test -f 'tool_panykey.c'; then $(CYGPATH_W) 'tool_panykey.c'; else $(CYGPATH_W) '$(srcdir)/tool_panykey.c'; fi`
+
+curl-tool_paramhlp.o: tool_paramhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_paramhlp.o -MD -MP -MF $(DEPDIR)/curl-tool_paramhlp.Tpo -c -o curl-tool_paramhlp.o `test -f 'tool_paramhlp.c' || echo '$(srcdir)/'`tool_paramhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_paramhlp.Tpo $(DEPDIR)/curl-tool_paramhlp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_paramhlp.c' object='curl-tool_paramhlp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_paramhlp.o `test -f 'tool_paramhlp.c' || echo '$(srcdir)/'`tool_paramhlp.c
+
+curl-tool_paramhlp.obj: tool_paramhlp.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_paramhlp.obj -MD -MP -MF $(DEPDIR)/curl-tool_paramhlp.Tpo -c -o curl-tool_paramhlp.obj `if test -f 'tool_paramhlp.c'; then $(CYGPATH_W) 'tool_paramhlp.c'; else $(CYGPATH_W) '$(srcdir)/tool_paramhlp.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_paramhlp.Tpo $(DEPDIR)/curl-tool_paramhlp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_paramhlp.c' object='curl-tool_paramhlp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_paramhlp.obj `if test -f 'tool_paramhlp.c'; then $(CYGPATH_W) 'tool_paramhlp.c'; else $(CYGPATH_W) '$(srcdir)/tool_paramhlp.c'; fi`
+
+curl-tool_parsecfg.o: tool_parsecfg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_parsecfg.o -MD -MP -MF $(DEPDIR)/curl-tool_parsecfg.Tpo -c -o curl-tool_parsecfg.o `test -f 'tool_parsecfg.c' || echo '$(srcdir)/'`tool_parsecfg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_parsecfg.Tpo $(DEPDIR)/curl-tool_parsecfg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_parsecfg.c' object='curl-tool_parsecfg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_parsecfg.o `test -f 'tool_parsecfg.c' || echo '$(srcdir)/'`tool_parsecfg.c
+
+curl-tool_parsecfg.obj: tool_parsecfg.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_parsecfg.obj -MD -MP -MF $(DEPDIR)/curl-tool_parsecfg.Tpo -c -o curl-tool_parsecfg.obj `if test -f 'tool_parsecfg.c'; then $(CYGPATH_W) 'tool_parsecfg.c'; else $(CYGPATH_W) '$(srcdir)/tool_parsecfg.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_parsecfg.Tpo $(DEPDIR)/curl-tool_parsecfg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_parsecfg.c' object='curl-tool_parsecfg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_parsecfg.obj `if test -f 'tool_parsecfg.c'; then $(CYGPATH_W) 'tool_parsecfg.c'; else $(CYGPATH_W) '$(srcdir)/tool_parsecfg.c'; fi`
+
+curl-tool_setopt.o: tool_setopt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_setopt.o -MD -MP -MF $(DEPDIR)/curl-tool_setopt.Tpo -c -o curl-tool_setopt.o `test -f 'tool_setopt.c' || echo '$(srcdir)/'`tool_setopt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_setopt.Tpo $(DEPDIR)/curl-tool_setopt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_setopt.c' object='curl-tool_setopt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_setopt.o `test -f 'tool_setopt.c' || echo '$(srcdir)/'`tool_setopt.c
+
+curl-tool_setopt.obj: tool_setopt.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_setopt.obj -MD -MP -MF $(DEPDIR)/curl-tool_setopt.Tpo -c -o curl-tool_setopt.obj `if test -f 'tool_setopt.c'; then $(CYGPATH_W) 'tool_setopt.c'; else $(CYGPATH_W) '$(srcdir)/tool_setopt.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_setopt.Tpo $(DEPDIR)/curl-tool_setopt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_setopt.c' object='curl-tool_setopt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_setopt.obj `if test -f 'tool_setopt.c'; then $(CYGPATH_W) 'tool_setopt.c'; else $(CYGPATH_W) '$(srcdir)/tool_setopt.c'; fi`
+
+curl-tool_sleep.o: tool_sleep.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_sleep.o -MD -MP -MF $(DEPDIR)/curl-tool_sleep.Tpo -c -o curl-tool_sleep.o `test -f 'tool_sleep.c' || echo '$(srcdir)/'`tool_sleep.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_sleep.Tpo $(DEPDIR)/curl-tool_sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_sleep.c' object='curl-tool_sleep.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_sleep.o `test -f 'tool_sleep.c' || echo '$(srcdir)/'`tool_sleep.c
+
+curl-tool_sleep.obj: tool_sleep.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_sleep.obj -MD -MP -MF $(DEPDIR)/curl-tool_sleep.Tpo -c -o curl-tool_sleep.obj `if test -f 'tool_sleep.c'; then $(CYGPATH_W) 'tool_sleep.c'; else $(CYGPATH_W) '$(srcdir)/tool_sleep.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_sleep.Tpo $(DEPDIR)/curl-tool_sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_sleep.c' object='curl-tool_sleep.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_sleep.obj `if test -f 'tool_sleep.c'; then $(CYGPATH_W) 'tool_sleep.c'; else $(CYGPATH_W) '$(srcdir)/tool_sleep.c'; fi`
+
+curl-tool_urlglob.o: tool_urlglob.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_urlglob.o -MD -MP -MF $(DEPDIR)/curl-tool_urlglob.Tpo -c -o curl-tool_urlglob.o `test -f 'tool_urlglob.c' || echo '$(srcdir)/'`tool_urlglob.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_urlglob.Tpo $(DEPDIR)/curl-tool_urlglob.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_urlglob.c' object='curl-tool_urlglob.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_urlglob.o `test -f 'tool_urlglob.c' || echo '$(srcdir)/'`tool_urlglob.c
+
+curl-tool_urlglob.obj: tool_urlglob.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_urlglob.obj -MD -MP -MF $(DEPDIR)/curl-tool_urlglob.Tpo -c -o curl-tool_urlglob.obj `if test -f 'tool_urlglob.c'; then $(CYGPATH_W) 'tool_urlglob.c'; else $(CYGPATH_W) '$(srcdir)/tool_urlglob.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_urlglob.Tpo $(DEPDIR)/curl-tool_urlglob.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_urlglob.c' object='curl-tool_urlglob.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_urlglob.obj `if test -f 'tool_urlglob.c'; then $(CYGPATH_W) 'tool_urlglob.c'; else $(CYGPATH_W) '$(srcdir)/tool_urlglob.c'; fi`
+
+curl-tool_util.o: tool_util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_util.o -MD -MP -MF $(DEPDIR)/curl-tool_util.Tpo -c -o curl-tool_util.o `test -f 'tool_util.c' || echo '$(srcdir)/'`tool_util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_util.Tpo $(DEPDIR)/curl-tool_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_util.c' object='curl-tool_util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_util.o `test -f 'tool_util.c' || echo '$(srcdir)/'`tool_util.c
+
+curl-tool_util.obj: tool_util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_util.obj -MD -MP -MF $(DEPDIR)/curl-tool_util.Tpo -c -o curl-tool_util.obj `if test -f 'tool_util.c'; then $(CYGPATH_W) 'tool_util.c'; else $(CYGPATH_W) '$(srcdir)/tool_util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_util.Tpo $(DEPDIR)/curl-tool_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_util.c' object='curl-tool_util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_util.obj `if test -f 'tool_util.c'; then $(CYGPATH_W) 'tool_util.c'; else $(CYGPATH_W) '$(srcdir)/tool_util.c'; fi`
+
+curl-tool_vms.o: tool_vms.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_vms.o -MD -MP -MF $(DEPDIR)/curl-tool_vms.Tpo -c -o curl-tool_vms.o `test -f 'tool_vms.c' || echo '$(srcdir)/'`tool_vms.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_vms.Tpo $(DEPDIR)/curl-tool_vms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_vms.c' object='curl-tool_vms.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_vms.o `test -f 'tool_vms.c' || echo '$(srcdir)/'`tool_vms.c
+
+curl-tool_vms.obj: tool_vms.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_vms.obj -MD -MP -MF $(DEPDIR)/curl-tool_vms.Tpo -c -o curl-tool_vms.obj `if test -f 'tool_vms.c'; then $(CYGPATH_W) 'tool_vms.c'; else $(CYGPATH_W) '$(srcdir)/tool_vms.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_vms.Tpo $(DEPDIR)/curl-tool_vms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_vms.c' object='curl-tool_vms.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_vms.obj `if test -f 'tool_vms.c'; then $(CYGPATH_W) 'tool_vms.c'; else $(CYGPATH_W) '$(srcdir)/tool_vms.c'; fi`
+
+curl-tool_writeenv.o: tool_writeenv.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeenv.o -MD -MP -MF $(DEPDIR)/curl-tool_writeenv.Tpo -c -o curl-tool_writeenv.o `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeenv.Tpo $(DEPDIR)/curl-tool_writeenv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeenv.c' object='curl-tool_writeenv.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeenv.o `test -f 'tool_writeenv.c' || echo '$(srcdir)/'`tool_writeenv.c
+
+curl-tool_writeenv.obj: tool_writeenv.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeenv.obj -MD -MP -MF $(DEPDIR)/curl-tool_writeenv.Tpo -c -o curl-tool_writeenv.obj `if test -f 'tool_writeenv.c'; then $(CYGPATH_W) 'tool_writeenv.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeenv.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeenv.Tpo $(DEPDIR)/curl-tool_writeenv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeenv.c' object='curl-tool_writeenv.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeenv.obj `if test -f 'tool_writeenv.c'; then $(CYGPATH_W) 'tool_writeenv.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeenv.c'; fi`
+
+curl-tool_writeout.o: tool_writeout.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeout.o -MD -MP -MF $(DEPDIR)/curl-tool_writeout.Tpo -c -o curl-tool_writeout.o `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeout.Tpo $(DEPDIR)/curl-tool_writeout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeout.c' object='curl-tool_writeout.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeout.o `test -f 'tool_writeout.c' || echo '$(srcdir)/'`tool_writeout.c
+
+curl-tool_writeout.obj: tool_writeout.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_writeout.obj -MD -MP -MF $(DEPDIR)/curl-tool_writeout.Tpo -c -o curl-tool_writeout.obj `if test -f 'tool_writeout.c'; then $(CYGPATH_W) 'tool_writeout.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeout.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_writeout.Tpo $(DEPDIR)/curl-tool_writeout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_writeout.c' object='curl-tool_writeout.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_writeout.obj `if test -f 'tool_writeout.c'; then $(CYGPATH_W) 'tool_writeout.c'; else $(CYGPATH_W) '$(srcdir)/tool_writeout.c'; fi`
+
+curl-tool_xattr.o: tool_xattr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_xattr.o -MD -MP -MF $(DEPDIR)/curl-tool_xattr.Tpo -c -o curl-tool_xattr.o `test -f 'tool_xattr.c' || echo '$(srcdir)/'`tool_xattr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_xattr.Tpo $(DEPDIR)/curl-tool_xattr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_xattr.c' object='curl-tool_xattr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_xattr.o `test -f 'tool_xattr.c' || echo '$(srcdir)/'`tool_xattr.c
+
+curl-tool_xattr.obj: tool_xattr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-tool_xattr.obj -MD -MP -MF $(DEPDIR)/curl-tool_xattr.Tpo -c -o curl-tool_xattr.obj `if test -f 'tool_xattr.c'; then $(CYGPATH_W) 'tool_xattr.c'; else $(CYGPATH_W) '$(srcdir)/tool_xattr.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-tool_xattr.Tpo $(DEPDIR)/curl-tool_xattr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tool_xattr.c' object='curl-tool_xattr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-tool_xattr.obj `if test -f 'tool_xattr.c'; then $(CYGPATH_W) 'tool_xattr.c'; else $(CYGPATH_W) '$(srcdir)/tool_xattr.c'; fi`
+
+curl-strtoofft.o: ../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-strtoofft.o -MD -MP -MF $(DEPDIR)/curl-strtoofft.Tpo -c -o curl-strtoofft.o `test -f '../lib/strtoofft.c' || echo '$(srcdir)/'`../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-strtoofft.Tpo $(DEPDIR)/curl-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strtoofft.c' object='curl-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-strtoofft.o `test -f '../lib/strtoofft.c' || echo '$(srcdir)/'`../lib/strtoofft.c
+
+curl-strtoofft.obj: ../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-strtoofft.obj -MD -MP -MF $(DEPDIR)/curl-strtoofft.Tpo -c -o curl-strtoofft.obj `if test -f '../lib/strtoofft.c'; then $(CYGPATH_W) '../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-strtoofft.Tpo $(DEPDIR)/curl-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strtoofft.c' object='curl-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-strtoofft.obj `if test -f '../lib/strtoofft.c'; then $(CYGPATH_W) '../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../lib/strtoofft.c'; fi`
+
+curl-strdup.o: ../lib/strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-strdup.o -MD -MP -MF $(DEPDIR)/curl-strdup.Tpo -c -o curl-strdup.o `test -f '../lib/strdup.c' || echo '$(srcdir)/'`../lib/strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-strdup.Tpo $(DEPDIR)/curl-strdup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strdup.c' object='curl-strdup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-strdup.o `test -f '../lib/strdup.c' || echo '$(srcdir)/'`../lib/strdup.c
+
+curl-strdup.obj: ../lib/strdup.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-strdup.obj -MD -MP -MF $(DEPDIR)/curl-strdup.Tpo -c -o curl-strdup.obj `if test -f '../lib/strdup.c'; then $(CYGPATH_W) '../lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/../lib/strdup.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-strdup.Tpo $(DEPDIR)/curl-strdup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/strdup.c' object='curl-strdup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-strdup.obj `if test -f '../lib/strdup.c'; then $(CYGPATH_W) '../lib/strdup.c'; else $(CYGPATH_W) '$(srcdir)/../lib/strdup.c'; fi`
+
+curl-rawstr.o: ../lib/rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-rawstr.o -MD -MP -MF $(DEPDIR)/curl-rawstr.Tpo -c -o curl-rawstr.o `test -f '../lib/rawstr.c' || echo '$(srcdir)/'`../lib/rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-rawstr.Tpo $(DEPDIR)/curl-rawstr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/rawstr.c' object='curl-rawstr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-rawstr.o `test -f '../lib/rawstr.c' || echo '$(srcdir)/'`../lib/rawstr.c
+
+curl-rawstr.obj: ../lib/rawstr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-rawstr.obj -MD -MP -MF $(DEPDIR)/curl-rawstr.Tpo -c -o curl-rawstr.obj `if test -f '../lib/rawstr.c'; then $(CYGPATH_W) '../lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/../lib/rawstr.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-rawstr.Tpo $(DEPDIR)/curl-rawstr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/rawstr.c' object='curl-rawstr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-rawstr.obj `if test -f '../lib/rawstr.c'; then $(CYGPATH_W) '../lib/rawstr.c'; else $(CYGPATH_W) '$(srcdir)/../lib/rawstr.c'; fi`
+
+curl-nonblock.o: ../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-nonblock.o -MD -MP -MF $(DEPDIR)/curl-nonblock.Tpo -c -o curl-nonblock.o `test -f '../lib/nonblock.c' || echo '$(srcdir)/'`../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-nonblock.Tpo $(DEPDIR)/curl-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/nonblock.c' object='curl-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-nonblock.o `test -f '../lib/nonblock.c' || echo '$(srcdir)/'`../lib/nonblock.c
+
+curl-nonblock.obj: ../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT curl-nonblock.obj -MD -MP -MF $(DEPDIR)/curl-nonblock.Tpo -c -o curl-nonblock.obj `if test -f '../lib/nonblock.c'; then $(CYGPATH_W) '../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/curl-nonblock.Tpo $(DEPDIR)/curl-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../lib/nonblock.c' object='curl-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(curl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o curl-nonblock.obj `if test -f '../lib/nonblock.c'; then $(CYGPATH_W) '../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../lib/nonblock.c'; fi`
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -542,93 +1719,96 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) curl_config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) curl_config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       $(mkdir_p) $(distdir)/macos $(distdir)/macos/src
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
 check-am: all-am
 check: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) curl_config.h
+@CURLDEBUG_FALSE@all-local:
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local
 installdirs:
        for dir in "$(DESTDIR)$(bindir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) install-am
@@ -641,10 +1821,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -652,6 +1837,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -659,13 +1845,14 @@ maintainer-clean-generic:
        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
 clean: clean-am
 
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+       clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-libtool distclean-tags
+       distclean-tags
 
 dvi: dvi-am
 
@@ -673,18 +1860,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -705,42 +1912,56 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-       clean-generic clean-libtool ctags distclean distclean-compile \
-       distclean-generic distclean-hdr distclean-libtool \
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+       clean-binPROGRAMS clean-generic clean-libtool \
+       clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+       distclean-compile distclean-generic distclean-libtool \
        distclean-tags distdir dvi dvi-am html html-am info info-am \
        install install-am install-binPROGRAMS install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-binPROGRAMS \
-       uninstall-info-am
+       tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
 
 
 # Here are the stuff to create a built-in manual
 
-# This generates the hugehelp.c file in both uncompressed and compressed formats
+# This generates the tool_hugehelp.c file in both uncompressed and
+# compressed formats
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE)  mkhelp.pl
-@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      echo '#include "setup.h"' > $(HUGE)
+@HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      echo '#include "tool_setup.h"' > $(HUGE)
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      echo '#ifndef HAVE_LIBZ' >> $(HUGE)
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      echo '#else' >> $(HUGE)
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
 @HAVE_LIBZ_TRUE@@USE_MANUAL_TRUE@      echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
-# This generates the hugehelp.c file uncompressed only
+# This generates the tool_hugehelp.c file uncompressed only
 @HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@$(HUGE): $(README) $(MANPAGE)  mkhelp.pl
-@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@     echo '#include "setup.h"' > $(HUGE)
+@HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@     echo '#include "tool_setup.h"' > $(HUGE)
 @HAVE_LIBZ_FALSE@@USE_MANUAL_TRUE@     $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
 
 # built-in manual has been disabled, make a blank file
 @USE_MANUAL_FALSE@$(HUGE):
 @USE_MANUAL_FALSE@     echo "/* built-in manual is disabled, blank function */" > $(HUGE)
-@USE_MANUAL_FALSE@     echo '#include "hugehelp.h"' >> $(HUGE)
+@USE_MANUAL_FALSE@     echo '#include "tool_hugehelp.h"' >> $(HUGE)
 @USE_MANUAL_FALSE@     echo "void hugehelp(void) {}" >>$(HUGE)
+
+# ignore tool_hugehelp.c since it is generated source code and it plays
+# by slightly different rules!
+checksrc:
+       @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/src -Wtool_hugehelp.c $(CURL_CFILES) $(CURL_HFILES)
+
+# for debug builds, we scan the sources on all regular make invokes
+@CURLDEBUG_TRUE@all-local: checksrc
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 058c6d2..cd890ac 100644 (file)
@@ -9,18 +9,94 @@
 
 # libcurl has sources that provide functions named curlx_* that aren't part of
 # the official API, but we re-use the code here to avoid duplication.
-CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
-       $(top_srcdir)/lib/strdup.c \
-       $(top_srcdir)/lib/rawstr.c \
-       $(top_srcdir)/lib/nonblock.c
+CURLX_ONES = \
+       ../lib/strtoofft.c \
+       ../lib/strdup.c \
+       ../lib/rawstr.c \
+       ../lib/nonblock.c
 
-CURL_CFILES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
-       getpass.c homedir.c curlutil.c os-specific.c xattr.c
+CURL_CFILES = \
+       tool_binmode.c \
+       tool_bname.c \
+       tool_cb_dbg.c \
+       tool_cb_hdr.c \
+       tool_cb_prg.c \
+       tool_cb_rea.c \
+       tool_cb_see.c \
+       tool_cb_wrt.c \
+       tool_cfgable.c \
+       tool_convert.c \
+       tool_dirhie.c \
+       tool_doswin.c \
+       tool_easysrc.c \
+       tool_formparse.c \
+       tool_getparam.c \
+       tool_getpass.c \
+       tool_help.c \
+       tool_helpers.c \
+       tool_homedir.c \
+       tool_hugehelp.c \
+       tool_libinfo.c \
+       tool_main.c \
+       tool_metalink.c \
+       tool_mfiles.c \
+       tool_msgs.c \
+       tool_operate.c \
+       tool_operhlp.c \
+       tool_panykey.c \
+       tool_paramhlp.c \
+       tool_parsecfg.c \
+       tool_setopt.c \
+       tool_sleep.c \
+       tool_urlglob.c \
+       tool_util.c \
+       tool_vms.c \
+       tool_writeenv.c \
+       tool_writeout.c \
+       tool_xattr.c
 
-CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
-       config-riscos.h urlglob.h version.h os-specific.h \
-       writeout.h writeenv.h getpass.h homedir.h curlutil.h \
-       xattr.h
+CURL_HFILES = \
+       tool_binmode.h \
+       tool_bname.h \
+       tool_cb_dbg.h \
+       tool_cb_hdr.h \
+       tool_cb_prg.h \
+       tool_cb_rea.h \
+       tool_cb_see.h \
+       tool_cb_wrt.h \
+       tool_cfgable.h \
+       tool_convert.h \
+       tool_dirhie.h \
+       tool_doswin.h \
+       tool_easysrc.h \
+       tool_formparse.h \
+       tool_getparam.h \
+       tool_getpass.h \
+       tool_help.h \
+       tool_helpers.h \
+       tool_homedir.h \
+       tool_hugehelp.h \
+       tool_libinfo.h \
+       tool_main.h \
+       tool_metalink.h \
+       tool_mfiles.h \
+       tool_msgs.h \
+       tool_operate.h \
+       tool_operhlp.h \
+       tool_panykey.h \
+       tool_paramhlp.h \
+       tool_parsecfg.h \
+       tool_sdecls.h \
+       tool_setopt.h \
+       tool_setup.h \
+       tool_sleep.h \
+       tool_urlglob.h \
+       tool_util.h \
+       tool_version.h \
+       tool_vms.h \
+       tool_writeenv.h \
+       tool_writeout.h \
+       tool_xattr.h
 
 curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
 
index f7d0d92..b4b1b0b 100644 (file)
-#########################################################################
+###########################################################################
 #
-## Makefile for building curl.exe with MingW32 (GCC-3.2 or later)
-## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
+## Makefile for building curl.exe with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3)
 ##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1]
+## Usage:   mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
 ##
 ## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.5
+## set ZLIB_PATH=c:/zlib-1.2.8
 ## set ZLIB=1
-##
-## Comments to: Troy Engel <tengel@sonic.net> or
-##              Joern Hartroth <hartroth@acm.org>
-#########################################################################
+#
+###########################################################################
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
 endif
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8q
+OPENSSL_PATH = ../../openssl-0.9.8y
 endif
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.4.3
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../librtmp-2.3
+endif
+# Edit the path below to point to the base of your libmetalink package.
+ifndef LIBMETALINK_PATH
+LIBMETALINK_PATH = ../../libmetalink-0.1.2
+endif
+# Edit the path below to point to the base of your libexpat package.
+ifndef LIBEXPAT_PATH
+LIBEXPAT_PATH = ../../expat-2.1.0
+endif
+# Edit the path below to point to the base of your libxml2 package.
+ifndef LIBXML2_PATH
+LIBXML2_PATH = ../../libxml2-2.9.0
 endif
 # Edit the path below to point to the base of your libidn package.
 ifndef LIBIDN_PATH
 LIBIDN_PATH = ../../libidn-1.18
 endif
-# Edit the path below to point to the base of your librtmp package.
-ifndef LIBRTMP_PATH
-LIBRTMP_PATH = ../../librtmp-2.3
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../Microsoft IDN Mitigation APIs
 endif
 # Edit the path below to point to the base of your Novell LDAP NDK.
 ifndef LDAP_SDK
 LDAP_SDK = c:/novell/ndk/cldapsdk/win32
 endif
 
+PROOT = ..
+
 # Edit the path below to point to the base of your c-ares package.
 ifndef LIBCARES_PATH
-LIBCARES_PATH = ../ares
+LIBCARES_PATH = $(PROOT)/ares
+endif
+
+# Edit the var below to set to your architecture or set environment var.
+ifndef ARCH
+ARCH = w32
 endif
 
-CC = gcc
-CFLAGS = -g -O2
+CC     = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
+ifeq ($(ARCH),w64)
+CFLAGS += -D_AMD64_
+endif
 # comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RC = windres
-RCFLAGS = --include-dir=../include -O COFF -i
-RM = del /q /f 2>NUL
-CP = copy
+LDFLAGS        = -s
+AR     = $(CROSSPREFIX)ar
+RC     = $(CROSSPREFIX)windres
+RCFLAGS        = --include-dir=$(PROOT)/include -O COFF -i
 
 # We may need these someday
 # PERL = perl
 # NROFF = nroff
 
+# Platform-dependent helper tool macros
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL    = rm -f $1
+RMDIR  = rm -fr $1
+MKDIR  = mkdir -p $1
+COPY   = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR  = -rsync -aC $1/* $2
+TOUCH  = touch $1
+CAT    = cat
+ECHONL = echo ""
+DL     = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL    = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR  = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL    = -del 2>NUL $(subst /,\,$1)
+RMDIR  = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR  = -md 2>NUL $(subst /,\,$1)
+COPY   = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR  = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH  = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT    = type
+ECHONL = $(ComSpec) /c echo.
+endif
+
 ########################################################
 ## Nothing more to do below this line!
 
-INCLUDES = -I. -I.. -I../include -I../lib
-LINK = $(CC) $(LDFLAGS) -o $@
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -sync,$(CFG)),-sync)
+SYNC = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+SPNEGO = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+METALINK = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+
+INCLUDES = -I. -I../include -I../lib
 
-curl_PROGRAMS = curl.exe
 ifdef DYN
-  curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
-  curl_LDADD = -L../lib -lcurldll
+  curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
+  curl_LDADD = -L$(PROOT)/lib -lcurldll
 else
-  curl_DEPENDENCIES = ../lib/libcurl.a
-  curl_LDADD = -L../lib -lcurl
+  curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
+  curl_LDADD = -L$(PROOT)/lib -lcurl
   CFLAGS += -DCURL_STATICLIB
+  LDFLAGS += -static
 endif
-ifdef ARES
-  ifndef DYN
-    curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
+ifdef SYNC
+  CFLAGS += -DUSE_SYNC_DNS
+else
+  ifdef ARES
+    ifndef DYN
+      curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
+    endif
+    CFLAGS += -DUSE_ARES -DCARES_STATICLIB
+    curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
   endif
-  CFLAGS += -DUSE_ARES
-  curl_LDADD += -L$(LIBCARES_PATH) -lcares
 endif
 ifdef RTMP
   CFLAGS += -DUSE_LIBRTMP
@@ -85,27 +193,76 @@ ifdef RTMP
 endif
 ifdef SSH2
   CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
-  curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
+  curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
 endif
 ifdef SSL
-  CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
-  curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
+  ifndef OPENSSL_INCLUDE
+    ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc"
+      OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
+    endif
+    ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include"
+      OPENSSL_INCLUDE = $(OPENSSL_PATH)/include
+    endif
+  endif
+  ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
+  $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+  endif
+  ifndef OPENSSL_LIBPATH
+    OPENSSL_LIBS = -lssl -lcrypto
+    ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+      ifdef DYN
+        OPENSSL_LIBS = -lssl32 -leay32
+      endif
+    endif
+    ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+      OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+    endif
+  endif
+  ifndef DYN
+    OPENSSL_LIBS += -lgdi32 -lcrypt32
+  endif
+  INCLUDES += -I"$(OPENSSL_INCLUDE)"
+  CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL
+  curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
 endif
 ifdef ZLIB
   INCLUDES += -I"$(ZLIB_PATH)"
   CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
-  curl_LDADD += -L$(ZLIB_PATH) -lz
+  curl_LDADD += -L"$(ZLIB_PATH)" -lz
 endif
 ifdef IDN
-  INCLUDES += -I"$(LIBIDN_PATH)/include"
   CFLAGS += -DUSE_LIBIDN
-  curl_LDADD += -L$(LIBIDN_PATH)/lib -lidn
+  curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+  CFLAGS += -DUSE_WIN32_IDN
+  curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
+endif
+endif
+ifdef METALINK
+  INCLUDES += -I"$(LIBMETALINK_PATH)/include"
+  CFLAGS += -DUSE_METALINK
+  curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink
+  ifndef DYN
+    ifeq ($(findstring libexpat_metalink_parser.o,$(shell $(AR) t "$(LIBMETALINK_PATH)/lib/libmetalink.a")),libexpat_metalink_parser.o)
+      curl_LDADD += -L"$(LIBEXPAT_PATH)/lib" -lexpat
+    else
+      curl_LDADD += -L"$(LIBXML2_PATH)/lib" -lxml2
+    endif
+  endif
 endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
+  ifdef WINSSL
+    CFLAGS += -DUSE_SCHANNEL
+  endif
+endif
+ifdef SPNEGO
+  CFLAGS += -DHAVE_SPNEGO
 endif
 ifdef IPV6
-  CFLAGS += -DENABLE_IPV6
+  CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
 endif
 ifdef LDAPS
   CFLAGS += -DHAVE_LDAP_SSL
@@ -124,49 +281,48 @@ curl_LDADD += -lwldap32
 endif
 endif
 curl_LDADD += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
 
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
 
+curl_PROGRAMS = curl.exe
 curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES)))
-ifdef DYN
 curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
+ifdef DYN
 curl_OBJECTS += $(curlx_OBJECTS)
-vpath %.c ../lib
+vpath %.c $(PROOT)/lib
 endif
 
 RESOURCE = curl.res
 
-.SUFFIXES: .rc .res
 
-all: curl.exe
+all: $(curl_PROGRAMS)
 
 curl.exe: $(RESOURCE) $(curl_OBJECTS) $(curl_DEPENDENCIES)
-       -$(RM) $@
-       $(LINK) $< $(curl_OBJECTS) $(curl_LDADD)
+       $(call DEL, $@)
+       $(CC) $(LDFLAGS) -o $@ $< $(curl_OBJECTS) $(curl_LDADD)
 
 # We don't have nroff normally under win32
-# hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
-#      -$(RM) hugehelp.c
-#      $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
+# tool_hugehelp.c: $(PROOT)/docs/MANUAL $(PROOT)/docs/curl.1 mkhelp.pl
+#      @$(call DEL, tool_hugehelp.c)
+#      $(NROFF) -man $(PROOT)/docs/curl.1 | $(PERL) mkhelp.pl $(PROOT)/docs/MANUAL > tool_hugehelp.c
 
-hugehelp.c:
+tool_hugehelp.c:
        @echo Creating $@
-       @$(CP) hugehelp.c.cvs $@
+       @$(call COPY, $@.cvs, $@)
 
-.c.o:
-       $(COMPILE) -c $<
+%.o: %.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c $<
 
-.rc.res:
+%.res: %.rc
        $(RC) $(RCFLAGS) $< -o $@
 
 clean:
-ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
-       -$(RM) hugehelp.c
+ifeq "$(wildcard tool_hugehelp.c.cvs)" "tool_hugehelp.c.cvs"
+       @$(call DEL, tool_hugehelp.c)
 endif
-       -$(RM) $(curl_OBJECTS) $(RESOURCE)
+       @$(call DEL, $(curl_OBJECTS) $(curlx_OBJECTS) $(RESOURCE))
 
 distclean vclean: clean
-       -$(RM) $(curl_PROGRAMS)
+       @$(call DEL, $(curl_PROGRAMS))
 
index 8148289..0ecc753 100644 (file)
@@ -14,17 +14,22 @@ endif
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
 endif
 
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8q
+OPENSSL_PATH = ../../openssl-0.9.8y
 endif
 
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.4.3
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../axTLS-1.2.7
 endif
 
 # Edit the path below to point to the base of your libidn package.
@@ -37,6 +42,26 @@ ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../librtmp-2.3
 endif
 
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
+# Edit the path below to point to the base of your libmetalink package.
+ifndef LIBMETALINK_PATH
+LIBMETALINK_PATH = ../../libmetalink-0.1.2
+endif
+
+# Edit the path below to point to the base of your libexpat package.
+ifndef LIBEXPAT_PATH
+LIBEXPAT_PATH = ../../expat-2.1.0
+endif
+
+# Edit the path below to point to the base of your libXML2 package.
+ifndef LIBXML2_PATH
+LIBXML2_PATH = ../../libxml2-2.8.0
+endif
+
 # Edit the path below to point to the base of your c-ares package.
 ifndef LIBCARES_PATH
 LIBCARES_PATH = ../ares
@@ -91,7 +116,7 @@ else
 endif
 PERL   = perl
 # Here you can find a native Win32 binary of the original awk:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
 AWK    = awk
 CP     = cp -afv
 MKDIR  = mkdir
@@ -135,7 +160,11 @@ else
 LD     = nlmconv
 LDFLAGS        = -T
 LIBEXT = a
-CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
+CFLAGS += -m32
+CFLAGS  += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS  += -fpcc-struct-return
+endif
 CFLAGS += -Wall # -pedantic
 ifeq ($(LIBARCH),LIBC)
 ifeq ($(POSIXFL),1)
@@ -167,6 +196,48 @@ CURL_LIB = ../lib
 
 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
 
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -spnego,$(CFG)),-spnego)
+WITH_SPNEGO = 1
+WITH_SSL = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+WITH_METALINK = 1
+WITH_SSL = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
 ifdef LINK_STATIC
        LDLIBS  = $(CURL_LIB)/libcurl.$(LIBEXT)
 ifdef WITH_ARES
@@ -177,7 +248,7 @@ else
        IMPORTS = @$(CURL_LIB)/libcurl.imp
 endif
 ifdef WITH_SSH2
-       INCLUDES += -I$(LIBSSH2_PATH)/include
+       INCLUDES += -I$(LIBSSH2_PATH)/include
 ifdef LINK_STATIC
        LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
 else
@@ -192,10 +263,24 @@ ifdef LINK_STATIC
 endif
 endif
 ifdef WITH_SSL
-       INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+       INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
        LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
        LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
        IMPORTS += GetProcessSwitchCount RunningProcess
+ifdef WITH_SPNEGO
+       # INCLUDES += -I$(FBOPENSSL_PATH)/include
+       LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT)
+endif
+else
+ifdef WITH_AXTLS
+       # INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+       LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+       MODULES += libaxtls.nlm
+       IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+endif
 endif
 ifdef WITH_ZLIB
        INCLUDES += -I$(ZLIB_PATH)
@@ -210,6 +295,26 @@ ifdef WITH_IDN
        # INCLUDES += -I$(LIBIDN_PATH)/include
        LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
 endif
+ifdef WITH_METALINK
+       CFLAGS += -DUSE_METALINK
+       INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+       INCLUDES += -I$(LIBMETALINK_PATH)/include
+       LDLIBS += $(LIBMETALINK_PATH)/lib/libmetalink.$(LIBEXT)
+ifdef WITH_LIBEXPAT
+       ifeq ($(LIBARCH),LIBC)
+               IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlbc.imp
+               MODULES += expatlbc
+       else
+               IMPORTS += @$(LIBEXPAT_PATH)/imports/expatlib.imp
+               MODULES += expatlib
+       endif
+else
+ifdef WITH_LIBXML2
+       IMPORTS += @$(LIBXML2_PATH)/lib/libxml2.imp
+       MODULES += libxml2
+endif
+endif
+endif
 
 ifeq ($(LIBARCH),LIBC)
        INCLUDES += -I$(NDK_LIBC)/include
@@ -258,7 +363,7 @@ vpath %.c $(CURL_LIB)
 
 all: prebuild $(TARGET).nlm
 
-prebuild: $(OBJDIR) $(OBJDIR)/version.inc curl_config.h
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc
 
 $(OBJDIR)/%.o: %.c
 #      @echo Compiling $<
@@ -274,10 +379,9 @@ install: $(INSTDIR) all
        @$(CP) $(TARGET).nlm $(INSTDIR)
 
 clean:
-ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
-       -$(RM) hugehelp.c
+ifeq "$(wildcard tool_hugehelp.c.cvs)" "tool_hugehelp.c.cvs"
+       -$(RM) tool_hugehelp.c
 endif
-       -$(RM) curl_config.h
        -$(RM) -r $(OBJDIR)
 
 distclean vclean: clean
@@ -384,205 +488,9 @@ endif
        @echo $(DL)output $(TARGET).nlm$(DL) >> $@
 endif
 
-curl_config.h: Makefile.netware
-       @echo Creating $@
-       @echo $(DL)/* $@ for NetWare target.$(DL) > $@
-       @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
-       @echo $(DL)** All your changes will be lost!!$(DL) >> $@
-       @echo $(DL)*/$(DL) >> $@
-       @echo $(DL)#ifndef NETWARE$(DL) >> $@
-       @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
-       @echo $(DL)#endif$(DL) >> $@
-       @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
-       @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
-ifeq ($(LIBARCH),CLIB)
-       @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
-       @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
-       @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
-       @echo $(DL)#define SIZEOF_SIZE_T 4$(DL) >> $@
-       @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
-else
-       @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
-       @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
-       @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
-       @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
-       @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
-       @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
-       @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
-       @echo $(DL)#define SIZEOF_SIZE_T 8$(DL) >> $@
-       @echo $(DL)#define _LARGEFILE 1$(DL) >> $@
-ifdef ENABLE_IPV6
-       @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
-       @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
-       @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
-       @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
-       @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
-endif
-endif
-       @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
-       @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
-       @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
-       @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
-       @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
-       @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
-       @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
-       @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
-       @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
-       @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
-       @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
-       @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
-       @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
-       @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
-ifdef DISABLE_LDAP
-       @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
-else
-       @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
-ifndef DISABLE_LDAPS
-       @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
-endif
-       @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
-endif
-ifdef NW_WINSOCK
-       @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
-else
-       @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
-endif
-ifdef WITH_ARES
-       @echo $(DL)#define USE_ARES 1$(DL) >> $@
-endif
-ifdef WITH_ZLIB
-       @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
-endif
-ifdef WITH_SSL
-       @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
-       @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
-       @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
-endif
-ifdef WITH_SSH2
-       @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
-       @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
-endif
-ifdef WITH_IDN
-       @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
-       @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
-endif
-ifdef WITH_RTMP
-       @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@
-endif
-       @echo $(DL)#ifdef __GNUC__$(DL) >> $@
-       @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
-       @echo $(DL)#else$(DL) >> $@
-       @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
-       @echo $(DL)#endif$(DL) >> $@
-ifdef CABUNDLE
-       @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
-else
-       @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
-endif
-
-hugehelp.c:
+tool_hugehelp.c:
        @echo Creating $@
-       @$(CP) hugehelp.c.cvs $@
+       @$(CP) tool_hugehelp.c.cvs $@
 
 $(LIBCARES_PATH)/libcares.$(LIBEXT):
        $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
index ebabb1a..54c100c 100644 (file)
@@ -1,3 +1,30 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-users.\r
+\r
 #############################################################\r
 #\r
 ## Makefile for building curl.exe with MSVC10\r
 ## "nmake -f makefile.vc10 CFG=release-ssl" statically links OpenSSL\r
 ## into curl.exe producing a standalone SSL-enabled executable.\r
 ##\r
-## Comments to: Troy Engel <tengel@sonic.net>\r
-## Updated by: Craig Davison <cd@securityfocus.com>\r
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>\r
 #\r
 #############################################################\r
 \r
 PROGRAM_NAME = curl.exe\r
 \r
+# -------------------------------------------\r
+# Verify that current subdir is curl's 'src'\r
+# -------------------------------------------\r
+\r
+!IF ! EXIST(.\tool_main.c)\r
+!  MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.\r
+!  MESSAGE Change to curl's 'src' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
+\r
+\r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH = ../../openssl-0.9.8o\r
+OPENSSL_PATH = ../../openssl-0.9.8y\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH = ../../zlib-1.2.5\r
+ZLIB_PATH = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -42,12 +83,13 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 ########################################################\r
 ## Nothing more to do below this line!\r
+\r
 ZLIB_CFLAGS   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
 ZLIB_LFLAGS   = "/LIBPATH:$(ZLIB_PATH)"\r
 ZLIB_LIBS     = zlib.lib\r
@@ -56,7 +98,10 @@ ZLIB_IMP_LIBS = zdll.lib
 SSL_CFLAGS     = /DUSE_SSLEAY\r
 SSL_LFLAGS     = /LIBPATH:"$(OPENSSL_PATH)/out32"\r
 SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"\r
-SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib\r
+SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib\r
+\r
+WINSSL_CFLAGS  = /DUSE_SCHANNEL\r
+#WINSSL_LIBS    = gdi32.lib user32.lib\r
 \r
 # Runtime library configuration\r
 RTLIB   = /MD\r
@@ -77,7 +122,7 @@ CCD   = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
 LINKD = link.exe /incremental:yes /debug /libpath:"../lib"\r
 RCD   = rc.exe /dDEBUGBUILD=1\r
 \r
-CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c\r
+CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
 LFLAGS   = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)\r
 RESFLAGS = /i../include\r
 \r
@@ -91,48 +136,106 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
 !ENDIF\r
 \r
 RELEASE_OBJS= \\r
-       curlutilr.obj \\r
-       getpassr.obj \\r
-       homedirr.obj \\r
-       hugehelpr.obj \\r
-       mainr.obj \\r
        nonblockr.obj \\r
-       os-specificr.obj \\r
        rawstrr.obj \\r
        strtoofftr.obj \\r
-       urlglobr.obj \\r
-       writeoutr.obj \\r
-       xattrr.obj \\r
+       tool_binmoder.obj \\r
+       tool_bnamer.obj \\r
+       tool_cb_dbgr.obj \\r
+       tool_cb_hdrr.obj \\r
+       tool_cb_prgr.obj \\r
+       tool_cb_rear.obj \\r
+       tool_cb_seer.obj \\r
+       tool_cb_wrtr.obj \\r
+       tool_cfgabler.obj \\r
+       tool_convertr.obj \\r
+       tool_dirhier.obj \\r
+       tool_doswinr.obj \\r
+       tool_easysrcr.obj \\r
+       tool_formparser.obj \\r
+       tool_getparamr.obj \\r
+       tool_getpassr.obj \\r
+       tool_helpr.obj \\r
+       tool_helpersr.obj \\r
+       tool_homedirr.obj \\r
+       tool_hugehelpr.obj \\r
+       tool_libinfor.obj \\r
+       tool_mainr.obj \\r
+       tool_metalinkr.obj \\r
+       tool_mfilesr.obj \\r
+       tool_msgsr.obj \\r
+       tool_operater.obj \\r
+       tool_operhlpr.obj \\r
+       tool_panykeyr.obj \\r
+       tool_paramhlpr.obj \\r
+       tool_parsecfgr.obj \\r
+       tool_setoptr.obj \\r
+       tool_sleepr.obj \\r
+       tool_urlglobr.obj \\r
+       tool_utilr.obj \\r
+       tool_vmsr.obj \\r
+       tool_writeenvr.obj \\r
+       tool_writeoutr.obj \\r
+       tool_xattrr.obj \\r
        curlr.res\r
 \r
 DEBUG_OBJS= \\r
-       curlutild.obj \\r
-       getpassd.obj \\r
-       homedird.obj \\r
-       hugehelpd.obj \\r
-       maind.obj \\r
        nonblockd.obj \\r
-       os-specificd.obj \\r
        rawstrd.obj \\r
        strtoofftd.obj \\r
-       urlglobd.obj \\r
-       writeoutd.obj \\r
-       xattrd.obj \\r
+       tool_binmoded.obj \\r
+       tool_bnamed.obj \\r
+       tool_cb_dbgd.obj \\r
+       tool_cb_hdrd.obj \\r
+       tool_cb_prgd.obj \\r
+       tool_cb_read.obj \\r
+       tool_cb_seed.obj \\r
+       tool_cb_wrtd.obj \\r
+       tool_cfgabled.obj \\r
+       tool_convertd.obj \\r
+       tool_dirhied.obj \\r
+       tool_doswind.obj \\r
+       tool_easysrcd.obj \\r
+       tool_formparsed.obj \\r
+       tool_getparamd.obj \\r
+       tool_getpassd.obj \\r
+       tool_helpd.obj \\r
+       tool_helpersd.obj \\r
+       tool_homedird.obj \\r
+       tool_hugehelpd.obj \\r
+       tool_libinfod.obj \\r
+       tool_maind.obj \\r
+       tool_metalinkd.obj \\r
+       tool_mfilesd.obj \\r
+       tool_msgsd.obj \\r
+       tool_operated.obj \\r
+       tool_operhlpd.obj \\r
+       tool_panykeyd.obj \\r
+       tool_paramhlpd.obj \\r
+       tool_parsecfgd.obj \\r
+       tool_setoptd.obj \\r
+       tool_sleepd.obj \\r
+       tool_urlglobd.obj \\r
+       tool_utild.obj \\r
+       tool_vmsd.obj \\r
+       tool_writeenvd.obj \\r
+       tool_writeoutd.obj \\r
+       tool_xattrd.obj \\r
        curld.res\r
 \r
 #################################################\r
 # If CFG not specified, use static libs\r
 \r
 CFLAGS         = $(CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib\r
-LINKLIBS_DEBUG = libcurld.lib\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)\r
 \r
 #################################################\r
 # release dynamic library\r
 \r
 !IF "$(CFG)" == "release-dll"\r
-LINKLIBS       = libcurl_imp.lib\r
-LINKLIBS_DEBUG = libcurld_imp.lib\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)\r
 !ENDIF\r
 \r
 #################################################\r
@@ -140,8 +243,8 @@ LINKLIBS_DEBUG = libcurld_imp.lib
 \r
 !IF "$(CFG)" == "release-zlib"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -150,8 +253,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)\r
 !ENDIF\r
 \r
@@ -160,8 +263,8 @@ LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -170,18 +273,28 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-zlib"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 #################################################\r
+# release static library with winssl and zlib\r
+\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+CFLAGS         = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LFLAGS         = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS)\r
+!ENDIF\r
+\r
+#################################################\r
 # release static library with dynamic ssl\r
 \r
 !IF "$(CFG)" == "release-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -190,8 +303,8 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -200,8 +313,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -210,8 +323,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -220,14 +333,14 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 \r
-LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib\r
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib\r
+LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib advapi32.lib\r
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib advapi32.lib\r
 \r
 all : release\r
 \r
@@ -240,58 +353,174 @@ debug: $(DEBUG_OBJS)
         $(MANIFESTTOOL)\r
 \r
 ## Release\r
-hugehelpr.obj: hugehelp.c\r
-       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutr.obj: writeout.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobr.obj: urlglob.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassr.obj: getpass.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" getpass.c\r
-homedirr.obj: homedir.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutilr.obj: curlutil.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificr.obj: os-specific.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockr.obj: ../lib/nonblock.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrr.obj: ../lib/rawstr.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftr.obj: ../lib/strtoofft.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrr.obj: xattr.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" xattr.c\r
-mainr.obj: main.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoder.obj: tool_binmode.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamer.obj: tool_bname.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgr.obj: tool_cb_dbg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrr.obj: tool_cb_hdr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgr.obj: tool_cb_prg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_rear.obj: tool_cb_rea.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seer.obj: tool_cb_see.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtr.obj: tool_cb_wrt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabler.obj: tool_cfgable.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertr.obj: tool_convert.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhier.obj: tool_dirhie.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswinr.obj: tool_doswin.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcr.obj: tool_easysrc.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparser.obj: tool_formparse.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamr.obj: tool_getparam.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassr.obj: tool_getpass.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpr.obj: tool_help.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersr.obj: tool_helpers.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedirr.obj: tool_homedir.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpr.obj: tool_hugehelp.c\r
+       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfor.obj: tool_libinfo.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_mainr.obj: tool_main.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkr.obj: tool_metalink.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesr.obj: tool_mfiles.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsr.obj: tool_msgs.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operater.obj: tool_operate.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpr.obj: tool_operhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyr.obj: tool_panykey.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpr.obj: tool_paramhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgr.obj: tool_parsecfg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptr.obj: tool_setopt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepr.obj: tool_sleep.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobr.obj: tool_urlglob.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utilr.obj: tool_util.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsr.obj: tool_vms.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvr.obj: tool_writeenv.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutr.obj: tool_writeout.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrr.obj: tool_xattr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curlr.res : curl.rc\r
        $(RCR) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
 ## Debug\r
-hugehelpd.obj: hugehelp.c\r
-       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutd.obj: writeout.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobd.obj: urlglob.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassd.obj: getpass.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" getpass.c\r
-homedird.obj: homedir.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutild.obj: curlutil.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificd.obj: os-specific.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockd.obj: ../lib/nonblock.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrd.obj: ../lib/rawstr.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftd.obj: ../lib/strtoofft.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrd.obj: xattr.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" xattr.c\r
-maind.obj: main.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoded.obj: tool_binmode.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamed.obj: tool_bname.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgd.obj: tool_cb_dbg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrd.obj: tool_cb_hdr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgd.obj: tool_cb_prg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_read.obj: tool_cb_rea.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seed.obj: tool_cb_see.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtd.obj: tool_cb_wrt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabled.obj: tool_cfgable.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertd.obj: tool_convert.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhied.obj: tool_dirhie.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswind.obj: tool_doswin.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcd.obj: tool_easysrc.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparsed.obj: tool_formparse.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamd.obj: tool_getparam.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassd.obj: tool_getpass.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpd.obj: tool_help.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersd.obj: tool_helpers.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedird.obj: tool_homedir.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpd.obj: tool_hugehelp.c\r
+       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfod.obj: tool_libinfo.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_maind.obj: tool_main.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkd.obj: tool_metalink.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesd.obj: tool_mfiles.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsd.obj: tool_msgs.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operated.obj: tool_operate.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpd.obj: tool_operhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyd.obj: tool_panykey.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpd.obj: tool_paramhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgd.obj: tool_parsecfg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptd.obj: tool_setopt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepd.obj: tool_sleep.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobd.obj: tool_urlglob.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utild.obj: tool_util.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsd.obj: tool_vms.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvd.obj: tool_writeenv.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutd.obj: tool_writeout.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrd.obj: tool_xattr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curld.res : curl.rc\r
        $(RCD) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
index da7a2a3..48331de 100644 (file)
@@ -1,3 +1,30 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-users.\r
+\r
 #############################################################\r
 #\r
 ## Makefile for building curl.exe with MSVC6\r
 ## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL\r
 ## into curl.exe producing a standalone SSL-enabled executable.\r
 ##\r
-## Comments to: Troy Engel <tengel@sonic.net>\r
-## Updated by: Craig Davison <cd@securityfocus.com>\r
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>\r
 #\r
 #############################################################\r
 \r
 PROGRAM_NAME = curl.exe\r
 \r
+# -------------------------------------------\r
+# Verify that current subdir is curl's 'src'\r
+# -------------------------------------------\r
+\r
+!IF ! EXIST(.\tool_main.c)\r
+!  MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.\r
+!  MESSAGE Change to curl's 'src' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
+\r
+\r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH = ../../openssl-0.9.8o\r
+OPENSSL_PATH = ../../openssl-0.9.8y\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH = ../../zlib-1.2.5\r
+ZLIB_PATH = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -42,12 +83,13 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 ########################################################\r
 ## Nothing more to do below this line!\r
+\r
 ZLIB_CFLAGS   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
 ZLIB_LFLAGS   = "/LIBPATH:$(ZLIB_PATH)"\r
 ZLIB_LIBS     = zlib.lib\r
@@ -56,7 +98,10 @@ ZLIB_IMP_LIBS = zdll.lib
 SSL_CFLAGS     = /DUSE_SSLEAY\r
 SSL_LFLAGS     = /LIBPATH:"$(OPENSSL_PATH)/out32"\r
 SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"\r
-SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib\r
+SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib\r
+\r
+WINSSL_CFLAGS  = /DUSE_SCHANNEL\r
+#WINSSL_LIBS    = gdi32.lib user32.lib\r
 \r
 # Runtime library configuration\r
 RTLIB   = /MD\r
@@ -77,7 +122,7 @@ CCD   = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /GZ
 LINKD = link.exe /incremental:yes /debug /libpath:"../lib"\r
 RCD   = rc.exe /dDEBUGBUILD=1\r
 \r
-CFLAGS   = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c\r
+CFLAGS   = /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
 LFLAGS   = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)\r
 RESFLAGS = /i../include\r
 \r
@@ -91,48 +136,106 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
 !ENDIF\r
 \r
 RELEASE_OBJS= \\r
-       curlutilr.obj \\r
-       getpassr.obj \\r
-       homedirr.obj \\r
-       hugehelpr.obj \\r
-       mainr.obj \\r
        nonblockr.obj \\r
-       os-specificr.obj \\r
        rawstrr.obj \\r
        strtoofftr.obj \\r
-       urlglobr.obj \\r
-       writeoutr.obj \\r
-       xattrr.obj \\r
+       tool_binmoder.obj \\r
+       tool_bnamer.obj \\r
+       tool_cb_dbgr.obj \\r
+       tool_cb_hdrr.obj \\r
+       tool_cb_prgr.obj \\r
+       tool_cb_rear.obj \\r
+       tool_cb_seer.obj \\r
+       tool_cb_wrtr.obj \\r
+       tool_cfgabler.obj \\r
+       tool_convertr.obj \\r
+       tool_dirhier.obj \\r
+       tool_doswinr.obj \\r
+       tool_easysrcr.obj \\r
+       tool_formparser.obj \\r
+       tool_getparamr.obj \\r
+       tool_getpassr.obj \\r
+       tool_helpr.obj \\r
+       tool_helpersr.obj \\r
+       tool_homedirr.obj \\r
+       tool_hugehelpr.obj \\r
+       tool_libinfor.obj \\r
+       tool_mainr.obj \\r
+       tool_metalinkr.obj \\r
+       tool_mfilesr.obj \\r
+       tool_msgsr.obj \\r
+       tool_operater.obj \\r
+       tool_operhlpr.obj \\r
+       tool_panykeyr.obj \\r
+       tool_paramhlpr.obj \\r
+       tool_parsecfgr.obj \\r
+       tool_setoptr.obj \\r
+       tool_sleepr.obj \\r
+       tool_urlglobr.obj \\r
+       tool_utilr.obj \\r
+       tool_vmsr.obj \\r
+       tool_writeenvr.obj \\r
+       tool_writeoutr.obj \\r
+       tool_xattrr.obj \\r
        curlr.res\r
 \r
 DEBUG_OBJS= \\r
-       curlutild.obj \\r
-       getpassd.obj \\r
-       homedird.obj \\r
-       hugehelpd.obj \\r
-       maind.obj \\r
        nonblockd.obj \\r
-       os-specificd.obj \\r
        rawstrd.obj \\r
        strtoofftd.obj \\r
-       urlglobd.obj \\r
-       writeoutd.obj \\r
-       xattrd.obj \\r
+       tool_binmoded.obj \\r
+       tool_bnamed.obj \\r
+       tool_cb_dbgd.obj \\r
+       tool_cb_hdrd.obj \\r
+       tool_cb_prgd.obj \\r
+       tool_cb_read.obj \\r
+       tool_cb_seed.obj \\r
+       tool_cb_wrtd.obj \\r
+       tool_cfgabled.obj \\r
+       tool_convertd.obj \\r
+       tool_dirhied.obj \\r
+       tool_doswind.obj \\r
+       tool_easysrcd.obj \\r
+       tool_formparsed.obj \\r
+       tool_getparamd.obj \\r
+       tool_getpassd.obj \\r
+       tool_helpd.obj \\r
+       tool_helpersd.obj \\r
+       tool_homedird.obj \\r
+       tool_hugehelpd.obj \\r
+       tool_libinfod.obj \\r
+       tool_maind.obj \\r
+       tool_metalinkd.obj \\r
+       tool_mfilesd.obj \\r
+       tool_msgsd.obj \\r
+       tool_operated.obj \\r
+       tool_operhlpd.obj \\r
+       tool_panykeyd.obj \\r
+       tool_paramhlpd.obj \\r
+       tool_parsecfgd.obj \\r
+       tool_setoptd.obj \\r
+       tool_sleepd.obj \\r
+       tool_urlglobd.obj \\r
+       tool_utild.obj \\r
+       tool_vmsd.obj \\r
+       tool_writeenvd.obj \\r
+       tool_writeoutd.obj \\r
+       tool_xattrd.obj \\r
        curld.res\r
 \r
 #################################################\r
 # If CFG not specified, use static libs\r
 \r
 CFLAGS         = $(CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib\r
-LINKLIBS_DEBUG = libcurld.lib\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)\r
 \r
 #################################################\r
 # release dynamic library\r
 \r
 !IF "$(CFG)" == "release-dll"\r
-LINKLIBS       = libcurl_imp.lib\r
-LINKLIBS_DEBUG = libcurld_imp.lib\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)\r
 !ENDIF\r
 \r
 #################################################\r
@@ -140,8 +243,8 @@ LINKLIBS_DEBUG = libcurld_imp.lib
 \r
 !IF "$(CFG)" == "release-zlib"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -150,8 +253,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)\r
 !ENDIF\r
 \r
@@ -160,8 +263,8 @@ LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -170,18 +273,28 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-zlib"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 #################################################\r
+# release static library with winssl and zlib\r
+\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+CFLAGS         = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LFLAGS         = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS)\r
+!ENDIF\r
+\r
+#################################################\r
 # release static library with dynamic ssl\r
 \r
 !IF "$(CFG)" == "release-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -190,8 +303,8 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -200,8 +313,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -210,8 +323,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -220,14 +333,14 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 \r
-LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib\r
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib\r
+LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib advapi32.lib\r
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib advapi32.lib\r
 \r
 all : release\r
 \r
@@ -240,58 +353,174 @@ debug: $(DEBUG_OBJS)
         $(MANIFESTTOOL)\r
 \r
 ## Release\r
-hugehelpr.obj: hugehelp.c\r
-       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutr.obj: writeout.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobr.obj: urlglob.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassr.obj: getpass.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" getpass.c\r
-homedirr.obj: homedir.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutilr.obj: curlutil.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificr.obj: os-specific.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockr.obj: ../lib/nonblock.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrr.obj: ../lib/rawstr.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftr.obj: ../lib/strtoofft.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrr.obj: xattr.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" xattr.c\r
-mainr.obj: main.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoder.obj: tool_binmode.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamer.obj: tool_bname.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgr.obj: tool_cb_dbg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrr.obj: tool_cb_hdr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgr.obj: tool_cb_prg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_rear.obj: tool_cb_rea.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seer.obj: tool_cb_see.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtr.obj: tool_cb_wrt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabler.obj: tool_cfgable.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertr.obj: tool_convert.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhier.obj: tool_dirhie.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswinr.obj: tool_doswin.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcr.obj: tool_easysrc.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparser.obj: tool_formparse.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamr.obj: tool_getparam.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassr.obj: tool_getpass.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpr.obj: tool_help.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersr.obj: tool_helpers.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedirr.obj: tool_homedir.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpr.obj: tool_hugehelp.c\r
+       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfor.obj: tool_libinfo.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_mainr.obj: tool_main.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkr.obj: tool_metalink.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesr.obj: tool_mfiles.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsr.obj: tool_msgs.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operater.obj: tool_operate.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpr.obj: tool_operhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyr.obj: tool_panykey.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpr.obj: tool_paramhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgr.obj: tool_parsecfg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptr.obj: tool_setopt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepr.obj: tool_sleep.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobr.obj: tool_urlglob.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utilr.obj: tool_util.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsr.obj: tool_vms.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvr.obj: tool_writeenv.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutr.obj: tool_writeout.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrr.obj: tool_xattr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curlr.res : curl.rc\r
        $(RCR) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
 ## Debug\r
-hugehelpd.obj: hugehelp.c\r
-       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutd.obj: writeout.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobd.obj: urlglob.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassd.obj: getpass.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" getpass.c\r
-homedird.obj: homedir.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutild.obj: curlutil.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificd.obj: os-specific.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockd.obj: ../lib/nonblock.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrd.obj: ../lib/rawstr.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftd.obj: ../lib/strtoofft.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrd.obj: xattr.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" xattr.c\r
-maind.obj: main.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoded.obj: tool_binmode.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamed.obj: tool_bname.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgd.obj: tool_cb_dbg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrd.obj: tool_cb_hdr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgd.obj: tool_cb_prg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_read.obj: tool_cb_rea.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seed.obj: tool_cb_see.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtd.obj: tool_cb_wrt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabled.obj: tool_cfgable.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertd.obj: tool_convert.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhied.obj: tool_dirhie.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswind.obj: tool_doswin.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcd.obj: tool_easysrc.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparsed.obj: tool_formparse.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamd.obj: tool_getparam.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassd.obj: tool_getpass.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpd.obj: tool_help.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersd.obj: tool_helpers.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedird.obj: tool_homedir.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpd.obj: tool_hugehelp.c\r
+       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfod.obj: tool_libinfo.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_maind.obj: tool_main.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkd.obj: tool_metalink.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesd.obj: tool_mfiles.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsd.obj: tool_msgs.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operated.obj: tool_operate.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpd.obj: tool_operhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyd.obj: tool_panykey.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpd.obj: tool_paramhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgd.obj: tool_parsecfg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptd.obj: tool_setopt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepd.obj: tool_sleep.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobd.obj: tool_urlglob.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utild.obj: tool_util.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsd.obj: tool_vms.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvd.obj: tool_writeenv.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutd.obj: tool_writeout.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrd.obj: tool_xattr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curld.res : curl.rc\r
        $(RCD) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
index 8ede3fe..c8f1587 100644 (file)
@@ -1,3 +1,30 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-users.\r
+\r
 #############################################################\r
 #\r
 ## Makefile for building curl.exe with MSVC8\r
 ## "nmake -f makefile.vc6 CFG=release-ssl" statically links OpenSSL\r
 ## into curl.exe producing a standalone SSL-enabled executable.\r
 ##\r
-## Comments to: Troy Engel <tengel@sonic.net>\r
-## Updated by: Craig Davison <cd@securityfocus.com>\r
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>\r
 #\r
 #############################################################\r
 \r
 PROGRAM_NAME = curl.exe\r
 \r
+# -------------------------------------------\r
+# Verify that current subdir is curl's 'src'\r
+# -------------------------------------------\r
+\r
+!IF ! EXIST(.\tool_main.c)\r
+!  MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.\r
+!  MESSAGE Change to curl's 'src' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
+\r
+\r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH = ../../openssl-0.9.8o\r
+OPENSSL_PATH = ../../openssl-0.9.8y\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH = ../../zlib-1.2.5\r
+ZLIB_PATH = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -42,12 +83,13 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 ########################################################\r
 ## Nothing more to do below this line!\r
+\r
 ZLIB_CFLAGS   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
 ZLIB_LFLAGS   = "/LIBPATH:$(ZLIB_PATH)"\r
 ZLIB_LIBS     = zlib.lib\r
@@ -56,7 +98,10 @@ ZLIB_IMP_LIBS = zdll.lib
 SSL_CFLAGS     = /DUSE_SSLEAY\r
 SSL_LFLAGS     = /LIBPATH:"$(OPENSSL_PATH)/out32"\r
 SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"\r
-SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib\r
+SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib\r
+\r
+WINSSL_CFLAGS  = /DUSE_SCHANNEL\r
+#WINSSL_LIBS    = gdi32.lib user32.lib\r
 \r
 # Runtime library configuration\r
 RTLIB   = /MD\r
@@ -77,7 +122,7 @@ CCD   = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
 LINKD = link.exe /incremental:yes /debug /libpath:"../lib"\r
 RCD   = rc.exe /dDEBUGBUILD=1\r
 \r
-CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c\r
+CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
 LFLAGS   = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)\r
 RESFLAGS = /i../include\r
 \r
@@ -91,48 +136,106 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
 !ENDIF\r
 \r
 RELEASE_OBJS= \\r
-       curlutilr.obj \\r
-       getpassr.obj \\r
-       homedirr.obj \\r
-       hugehelpr.obj \\r
-       mainr.obj \\r
        nonblockr.obj \\r
-       os-specificr.obj \\r
        rawstrr.obj \\r
        strtoofftr.obj \\r
-       urlglobr.obj \\r
-       writeoutr.obj \\r
-       xattrr.obj \\r
+       tool_binmoder.obj \\r
+       tool_bnamer.obj \\r
+       tool_cb_dbgr.obj \\r
+       tool_cb_hdrr.obj \\r
+       tool_cb_prgr.obj \\r
+       tool_cb_rear.obj \\r
+       tool_cb_seer.obj \\r
+       tool_cb_wrtr.obj \\r
+       tool_cfgabler.obj \\r
+       tool_convertr.obj \\r
+       tool_dirhier.obj \\r
+       tool_doswinr.obj \\r
+       tool_easysrcr.obj \\r
+       tool_formparser.obj \\r
+       tool_getparamr.obj \\r
+       tool_getpassr.obj \\r
+       tool_helpr.obj \\r
+       tool_helpersr.obj \\r
+       tool_homedirr.obj \\r
+       tool_hugehelpr.obj \\r
+       tool_libinfor.obj \\r
+       tool_mainr.obj \\r
+       tool_metalinkr.obj \\r
+       tool_mfilesr.obj \\r
+       tool_msgsr.obj \\r
+       tool_operater.obj \\r
+       tool_operhlpr.obj \\r
+       tool_panykeyr.obj \\r
+       tool_paramhlpr.obj \\r
+       tool_parsecfgr.obj \\r
+       tool_setoptr.obj \\r
+       tool_sleepr.obj \\r
+       tool_urlglobr.obj \\r
+       tool_utilr.obj \\r
+       tool_vmsr.obj \\r
+       tool_writeenvr.obj \\r
+       tool_writeoutr.obj \\r
+       tool_xattrr.obj \\r
        curlr.res\r
 \r
 DEBUG_OBJS= \\r
-       curlutild.obj \\r
-       getpassd.obj \\r
-       homedird.obj \\r
-       hugehelpd.obj \\r
-       maind.obj \\r
        nonblockd.obj \\r
-       os-specificd.obj \\r
        rawstrd.obj \\r
        strtoofftd.obj \\r
-       urlglobd.obj \\r
-       writeoutd.obj \\r
-       xattrd.obj \\r
+       tool_binmoded.obj \\r
+       tool_bnamed.obj \\r
+       tool_cb_dbgd.obj \\r
+       tool_cb_hdrd.obj \\r
+       tool_cb_prgd.obj \\r
+       tool_cb_read.obj \\r
+       tool_cb_seed.obj \\r
+       tool_cb_wrtd.obj \\r
+       tool_cfgabled.obj \\r
+       tool_convertd.obj \\r
+       tool_dirhied.obj \\r
+       tool_doswind.obj \\r
+       tool_easysrcd.obj \\r
+       tool_formparsed.obj \\r
+       tool_getparamd.obj \\r
+       tool_getpassd.obj \\r
+       tool_helpd.obj \\r
+       tool_helpersd.obj \\r
+       tool_homedird.obj \\r
+       tool_hugehelpd.obj \\r
+       tool_libinfod.obj \\r
+       tool_maind.obj \\r
+       tool_metalinkd.obj \\r
+       tool_mfilesd.obj \\r
+       tool_msgsd.obj \\r
+       tool_operated.obj \\r
+       tool_operhlpd.obj \\r
+       tool_panykeyd.obj \\r
+       tool_paramhlpd.obj \\r
+       tool_parsecfgd.obj \\r
+       tool_setoptd.obj \\r
+       tool_sleepd.obj \\r
+       tool_urlglobd.obj \\r
+       tool_utild.obj \\r
+       tool_vmsd.obj \\r
+       tool_writeenvd.obj \\r
+       tool_writeoutd.obj \\r
+       tool_xattrd.obj \\r
        curld.res\r
 \r
 #################################################\r
 # If CFG not specified, use static libs\r
 \r
 CFLAGS         = $(CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib\r
-LINKLIBS_DEBUG = libcurld.lib\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)\r
 \r
 #################################################\r
 # release dynamic library\r
 \r
 !IF "$(CFG)" == "release-dll"\r
-LINKLIBS       = libcurl_imp.lib\r
-LINKLIBS_DEBUG = libcurld_imp.lib\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)\r
 !ENDIF\r
 \r
 #################################################\r
@@ -140,8 +243,8 @@ LINKLIBS_DEBUG = libcurld_imp.lib
 \r
 !IF "$(CFG)" == "release-zlib"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -150,8 +253,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)\r
 !ENDIF\r
 \r
@@ -160,8 +263,8 @@ LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -170,18 +273,28 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-zlib"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 #################################################\r
+# release static library with winssl and zlib\r
+\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+CFLAGS         = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LFLAGS         = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS)\r
+!ENDIF\r
+\r
+#################################################\r
 # release static library with dynamic ssl\r
 \r
 !IF "$(CFG)" == "release-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -190,8 +303,8 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -200,8 +313,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -210,8 +323,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -220,14 +333,14 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 \r
-LINKLIBS       = $(LINKLIBS) ws2_32.lib bufferoverflowu.lib wldap32.lib\r
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib bufferoverflowu.lib wldap32.lib\r
+LINKLIBS       = $(LINKLIBS) ws2_32.lib bufferoverflowu.lib wldap32.lib advapi32.lib\r
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib bufferoverflowu.lib wldap32.lib advapi32.lib\r
 \r
 all : release\r
 \r
@@ -240,58 +353,174 @@ debug: $(DEBUG_OBJS)
         $(MANIFESTTOOL)\r
 \r
 ## Release\r
-hugehelpr.obj: hugehelp.c\r
-       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutr.obj: writeout.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobr.obj: urlglob.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassr.obj: getpass.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" getpass.c\r
-homedirr.obj: homedir.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutilr.obj: curlutil.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificr.obj: os-specific.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockr.obj: ../lib/nonblock.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrr.obj: ../lib/rawstr.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftr.obj: ../lib/strtoofft.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrr.obj: xattr.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" xattr.c\r
-mainr.obj: main.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoder.obj: tool_binmode.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamer.obj: tool_bname.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgr.obj: tool_cb_dbg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrr.obj: tool_cb_hdr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgr.obj: tool_cb_prg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_rear.obj: tool_cb_rea.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seer.obj: tool_cb_see.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtr.obj: tool_cb_wrt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabler.obj: tool_cfgable.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertr.obj: tool_convert.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhier.obj: tool_dirhie.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswinr.obj: tool_doswin.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcr.obj: tool_easysrc.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparser.obj: tool_formparse.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamr.obj: tool_getparam.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassr.obj: tool_getpass.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpr.obj: tool_help.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersr.obj: tool_helpers.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedirr.obj: tool_homedir.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpr.obj: tool_hugehelp.c\r
+       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfor.obj: tool_libinfo.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_mainr.obj: tool_main.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkr.obj: tool_metalink.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesr.obj: tool_mfiles.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsr.obj: tool_msgs.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operater.obj: tool_operate.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpr.obj: tool_operhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyr.obj: tool_panykey.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpr.obj: tool_paramhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgr.obj: tool_parsecfg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptr.obj: tool_setopt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepr.obj: tool_sleep.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobr.obj: tool_urlglob.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utilr.obj: tool_util.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsr.obj: tool_vms.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvr.obj: tool_writeenv.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutr.obj: tool_writeout.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrr.obj: tool_xattr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curlr.res : curl.rc\r
        $(RCR) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
 ## Debug\r
-hugehelpd.obj: hugehelp.c\r
-       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutd.obj: writeout.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobd.obj: urlglob.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassd.obj: getpass.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" getpass.c\r
-homedird.obj: homedir.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutild.obj: curlutil.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificd.obj: os-specific.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockd.obj: ../lib/nonblock.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrd.obj: ../lib/rawstr.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftd.obj: ../lib/strtoofft.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrd.obj: xattr.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" xattr.c\r
-maind.obj: main.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoded.obj: tool_binmode.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamed.obj: tool_bname.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgd.obj: tool_cb_dbg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrd.obj: tool_cb_hdr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgd.obj: tool_cb_prg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_read.obj: tool_cb_rea.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seed.obj: tool_cb_see.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtd.obj: tool_cb_wrt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabled.obj: tool_cfgable.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertd.obj: tool_convert.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhied.obj: tool_dirhie.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswind.obj: tool_doswin.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcd.obj: tool_easysrc.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparsed.obj: tool_formparse.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamd.obj: tool_getparam.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassd.obj: tool_getpass.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpd.obj: tool_help.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersd.obj: tool_helpers.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedird.obj: tool_homedir.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpd.obj: tool_hugehelp.c\r
+       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfod.obj: tool_libinfo.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_maind.obj: tool_main.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkd.obj: tool_metalink.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesd.obj: tool_mfiles.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsd.obj: tool_msgs.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operated.obj: tool_operate.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpd.obj: tool_operhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyd.obj: tool_panykey.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpd.obj: tool_paramhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgd.obj: tool_parsecfg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptd.obj: tool_setopt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepd.obj: tool_sleep.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobd.obj: tool_urlglob.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utild.obj: tool_util.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsd.obj: tool_vms.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvd.obj: tool_writeenv.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutd.obj: tool_writeout.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrd.obj: tool_xattr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curld.res : curl.rc\r
        $(RCD) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
index 2d93e8b..4c312e8 100644 (file)
@@ -1,3 +1,30 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+# All files in the Makefile.vc* series are generated automatically from the\r
+# one made for MSVC version 6. Alas, if you want to do changes to any of the\r
+# files and send back to the project, edit the version six, make your diff and\r
+# mail curl-users.\r
+\r
 #############################################################\r
 #\r
 ## Makefile for building curl.exe with MSVC9\r
 ## "nmake -f makefile.vc9 CFG=release-ssl" statically links OpenSSL\r
 ## into curl.exe producing a standalone SSL-enabled executable.\r
 ##\r
-## Comments to: Troy Engel <tengel@sonic.net>\r
-## Updated by: Craig Davison <cd@securityfocus.com>\r
-## release-ssl added by Miklos Nemeth <mnemeth@kfkisystems.com>\r
 #\r
 #############################################################\r
 \r
 PROGRAM_NAME = curl.exe\r
 \r
+# -------------------------------------------\r
+# Verify that current subdir is curl's 'src'\r
+# -------------------------------------------\r
+\r
+!IF ! EXIST(.\tool_main.c)\r
+!  MESSAGE Can not process this makefile from outside of curl's 'src' subdirectory.\r
+!  MESSAGE Change to curl's 'src' subdirectory, and try again.\r
+!  ERROR   See previous message.\r
+!ENDIF\r
+\r
+# ------------------------------------------------\r
+# Makefile.msvc.names provides libcurl file names\r
+# ------------------------------------------------\r
+\r
+!INCLUDE ..\winbuild\Makefile.msvc.names\r
+\r
+\r
 !IFNDEF OPENSSL_PATH\r
-OPENSSL_PATH = ../../openssl-0.9.8o\r
+OPENSSL_PATH = ../../openssl-0.9.8y\r
 !ENDIF\r
 \r
 !IFNDEF ZLIB_PATH\r
-ZLIB_PATH = ../../zlib-1.2.5\r
+ZLIB_PATH = ../../zlib-1.2.8\r
 !ENDIF\r
 \r
 !IFNDEF MACHINE\r
@@ -42,12 +83,13 @@ MACHINE  = X86
 \r
 !IFDEF WINDOWS_SSPI\r
 !IFNDEF WINDOWS_SDK_PATH\r
-WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"\r
+WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"\r
 !ENDIF\r
 !ENDIF\r
 \r
 ########################################################\r
 ## Nothing more to do below this line!\r
+\r
 ZLIB_CFLAGS   = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"\r
 ZLIB_LFLAGS   = "/LIBPATH:$(ZLIB_PATH)"\r
 ZLIB_LIBS     = zlib.lib\r
@@ -56,7 +98,10 @@ ZLIB_IMP_LIBS = zdll.lib
 SSL_CFLAGS     = /DUSE_SSLEAY\r
 SSL_LFLAGS     = /LIBPATH:"$(OPENSSL_PATH)/out32"\r
 SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"\r
-SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib\r
+SSL_LIBS       = libeay32.lib ssleay32.lib gdi32.lib user32.lib\r
+\r
+WINSSL_CFLAGS  = /DUSE_SCHANNEL\r
+#WINSSL_LIBS    = gdi32.lib user32.lib\r
 \r
 # Runtime library configuration\r
 RTLIB   = /MD\r
@@ -77,7 +122,7 @@ CCD   = cl.exe $(RTLIBD) /Gm /ZI /Od /D_DEBUG /RTC1
 LINKD = link.exe /incremental:yes /debug /libpath:"../lib"\r
 RCD   = rc.exe /dDEBUGBUILD=1\r
 \r
-CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c\r
+CFLAGS   = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /D_BIND_TO_CURRENT_VCLIBS_VERSION=1\r
 LFLAGS   = /nologo /out:$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)\r
 RESFLAGS = /i../include\r
 \r
@@ -91,48 +136,106 @@ CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
 !ENDIF\r
 \r
 RELEASE_OBJS= \\r
-       curlutilr.obj \\r
-       getpassr.obj \\r
-       homedirr.obj \\r
-       hugehelpr.obj \\r
-       mainr.obj \\r
        nonblockr.obj \\r
-       os-specificr.obj \\r
        rawstrr.obj \\r
        strtoofftr.obj \\r
-       urlglobr.obj \\r
-       writeoutr.obj \\r
-       xattrr.obj \\r
+       tool_binmoder.obj \\r
+       tool_bnamer.obj \\r
+       tool_cb_dbgr.obj \\r
+       tool_cb_hdrr.obj \\r
+       tool_cb_prgr.obj \\r
+       tool_cb_rear.obj \\r
+       tool_cb_seer.obj \\r
+       tool_cb_wrtr.obj \\r
+       tool_cfgabler.obj \\r
+       tool_convertr.obj \\r
+       tool_dirhier.obj \\r
+       tool_doswinr.obj \\r
+       tool_easysrcr.obj \\r
+       tool_formparser.obj \\r
+       tool_getparamr.obj \\r
+       tool_getpassr.obj \\r
+       tool_helpr.obj \\r
+       tool_helpersr.obj \\r
+       tool_homedirr.obj \\r
+       tool_hugehelpr.obj \\r
+       tool_libinfor.obj \\r
+       tool_mainr.obj \\r
+       tool_metalinkr.obj \\r
+       tool_mfilesr.obj \\r
+       tool_msgsr.obj \\r
+       tool_operater.obj \\r
+       tool_operhlpr.obj \\r
+       tool_panykeyr.obj \\r
+       tool_paramhlpr.obj \\r
+       tool_parsecfgr.obj \\r
+       tool_setoptr.obj \\r
+       tool_sleepr.obj \\r
+       tool_urlglobr.obj \\r
+       tool_utilr.obj \\r
+       tool_vmsr.obj \\r
+       tool_writeenvr.obj \\r
+       tool_writeoutr.obj \\r
+       tool_xattrr.obj \\r
        curlr.res\r
 \r
 DEBUG_OBJS= \\r
-       curlutild.obj \\r
-       getpassd.obj \\r
-       homedird.obj \\r
-       hugehelpd.obj \\r
-       maind.obj \\r
        nonblockd.obj \\r
-       os-specificd.obj \\r
        rawstrd.obj \\r
        strtoofftd.obj \\r
-       urlglobd.obj \\r
-       writeoutd.obj \\r
-       xattrd.obj \\r
+       tool_binmoded.obj \\r
+       tool_bnamed.obj \\r
+       tool_cb_dbgd.obj \\r
+       tool_cb_hdrd.obj \\r
+       tool_cb_prgd.obj \\r
+       tool_cb_read.obj \\r
+       tool_cb_seed.obj \\r
+       tool_cb_wrtd.obj \\r
+       tool_cfgabled.obj \\r
+       tool_convertd.obj \\r
+       tool_dirhied.obj \\r
+       tool_doswind.obj \\r
+       tool_easysrcd.obj \\r
+       tool_formparsed.obj \\r
+       tool_getparamd.obj \\r
+       tool_getpassd.obj \\r
+       tool_helpd.obj \\r
+       tool_helpersd.obj \\r
+       tool_homedird.obj \\r
+       tool_hugehelpd.obj \\r
+       tool_libinfod.obj \\r
+       tool_maind.obj \\r
+       tool_metalinkd.obj \\r
+       tool_mfilesd.obj \\r
+       tool_msgsd.obj \\r
+       tool_operated.obj \\r
+       tool_operhlpd.obj \\r
+       tool_panykeyd.obj \\r
+       tool_paramhlpd.obj \\r
+       tool_parsecfgd.obj \\r
+       tool_setoptd.obj \\r
+       tool_sleepd.obj \\r
+       tool_urlglobd.obj \\r
+       tool_utild.obj \\r
+       tool_vmsd.obj \\r
+       tool_writeenvd.obj \\r
+       tool_writeoutd.obj \\r
+       tool_xattrd.obj \\r
        curld.res\r
 \r
 #################################################\r
 # If CFG not specified, use static libs\r
 \r
 CFLAGS         = $(CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib\r
-LINKLIBS_DEBUG = libcurld.lib\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)\r
 \r
 #################################################\r
 # release dynamic library\r
 \r
 !IF "$(CFG)" == "release-dll"\r
-LINKLIBS       = libcurl_imp.lib\r
-LINKLIBS_DEBUG = libcurld_imp.lib\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG)\r
 !ENDIF\r
 \r
 #################################################\r
@@ -140,8 +243,8 @@ LINKLIBS_DEBUG = libcurld_imp.lib
 \r
 !IF "$(CFG)" == "release-zlib"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -150,8 +253,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)\r
 !ENDIF\r
 \r
@@ -160,8 +263,8 @@ LFLAGS         = $(LFLAGS) $(SSL_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -170,18 +273,28 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-zlib"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 #################################################\r
+# release static library with winssl and zlib\r
+\r
+!IF "$(CFG)" == "release-winssl-zlib"\r
+CFLAGS         = $(CFLAGS) $(WINSSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(WINSSL_LIBS) $(ZLIB_LIBS)\r
+LFLAGS         = $(LFLAGS) $(WINSSL_LFLAGS) $(ZLIB_LFLAGS)\r
+!ENDIF\r
+\r
+#################################################\r
 # release static library with dynamic ssl\r
 \r
 !IF "$(CFG)" == "release-ssl-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)\r
 !ENDIF\r
 \r
@@ -190,8 +303,8 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS)
 \r
 !IF "$(CFG)" == "release-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -200,8 +313,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -210,8 +323,8 @@ LFLAGS         = $(LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB\r
-LINKLIBS       = libcurl.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
@@ -220,14 +333,14 @@ LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
 \r
 !IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"\r
 CFLAGS         = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS)\r
-LINKLIBS       = libcurl_imp.lib  $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
-LINKLIBS_DEBUG = libcurld_imp.lib $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS       = $(LIBCURL_IMP_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
+LINKLIBS_DEBUG = $(LIBCURL_IMP_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)\r
 LFLAGS         = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)\r
 !ENDIF\r
 \r
 \r
-LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib\r
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib\r
+LINKLIBS       = $(LINKLIBS) ws2_32.lib wldap32.lib advapi32.lib\r
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib advapi32.lib\r
 \r
 all : release\r
 \r
@@ -240,58 +353,174 @@ debug: $(DEBUG_OBJS)
         $(MANIFESTTOOL)\r
 \r
 ## Release\r
-hugehelpr.obj: hugehelp.c\r
-       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutr.obj: writeout.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobr.obj: urlglob.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassr.obj: getpass.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" getpass.c\r
-homedirr.obj: homedir.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutilr.obj: curlutil.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificr.obj: os-specific.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockr.obj: ../lib/nonblock.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrr.obj: ../lib/rawstr.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftr.obj: ../lib/strtoofft.c\r
        $(CCR) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrr.obj: xattr.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" xattr.c\r
-mainr.obj: main.c\r
-       $(CCR) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoder.obj: tool_binmode.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamer.obj: tool_bname.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgr.obj: tool_cb_dbg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrr.obj: tool_cb_hdr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgr.obj: tool_cb_prg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_rear.obj: tool_cb_rea.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seer.obj: tool_cb_see.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtr.obj: tool_cb_wrt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabler.obj: tool_cfgable.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertr.obj: tool_convert.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhier.obj: tool_dirhie.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswinr.obj: tool_doswin.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcr.obj: tool_easysrc.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparser.obj: tool_formparse.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamr.obj: tool_getparam.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassr.obj: tool_getpass.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpr.obj: tool_help.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersr.obj: tool_helpers.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedirr.obj: tool_homedir.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpr.obj: tool_hugehelp.c\r
+       $(CCR) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfor.obj: tool_libinfo.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_mainr.obj: tool_main.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkr.obj: tool_metalink.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesr.obj: tool_mfiles.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsr.obj: tool_msgs.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operater.obj: tool_operate.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpr.obj: tool_operhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyr.obj: tool_panykey.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpr.obj: tool_paramhlp.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgr.obj: tool_parsecfg.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptr.obj: tool_setopt.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepr.obj: tool_sleep.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobr.obj: tool_urlglob.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utilr.obj: tool_util.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsr.obj: tool_vms.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvr.obj: tool_writeenv.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutr.obj: tool_writeout.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrr.obj: tool_xattr.c\r
+       $(CCR) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curlr.res : curl.rc\r
        $(RCR) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
 ## Debug\r
-hugehelpd.obj: hugehelp.c\r
-       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c\r
-writeoutd.obj: writeout.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" writeout.c\r
-urlglobd.obj: urlglob.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" urlglob.c\r
-getpassd.obj: getpass.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" getpass.c\r
-homedird.obj: homedir.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" homedir.c\r
-curlutild.obj: curlutil.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" curlutil.c\r
-os-specificd.obj: os-specific.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" os-specific.c\r
 nonblockd.obj: ../lib/nonblock.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/nonblock.c\r
 rawstrd.obj: ../lib/rawstr.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/rawstr.c\r
 strtoofftd.obj: ../lib/strtoofft.c\r
        $(CCD) $(CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
-xattrd.obj: xattr.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" xattr.c\r
-maind.obj: main.c\r
-       $(CCD) $(CFLAGS) /Fo"$@" main.c\r
+tool_binmoded.obj: tool_binmode.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_binmode.c\r
+tool_bnamed.obj: tool_bname.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_bname.c\r
+tool_cb_dbgd.obj: tool_cb_dbg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_dbg.c\r
+tool_cb_hdrd.obj: tool_cb_hdr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_hdr.c\r
+tool_cb_prgd.obj: tool_cb_prg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_prg.c\r
+tool_cb_read.obj: tool_cb_rea.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_rea.c\r
+tool_cb_seed.obj: tool_cb_see.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_see.c\r
+tool_cb_wrtd.obj: tool_cb_wrt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cb_wrt.c\r
+tool_cfgabled.obj: tool_cfgable.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_cfgable.c\r
+tool_convertd.obj: tool_convert.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_convert.c\r
+tool_dirhied.obj: tool_dirhie.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_dirhie.c\r
+tool_doswind.obj: tool_doswin.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_doswin.c\r
+tool_easysrcd.obj: tool_easysrc.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_easysrc.c\r
+tool_formparsed.obj: tool_formparse.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_formparse.c\r
+tool_getparamd.obj: tool_getparam.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getparam.c\r
+tool_getpassd.obj: tool_getpass.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_getpass.c\r
+tool_helpd.obj: tool_help.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_help.c\r
+tool_helpersd.obj: tool_helpers.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_helpers.c\r
+tool_homedird.obj: tool_homedir.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_homedir.c\r
+tool_hugehelpd.obj: tool_hugehelp.c\r
+       $(CCD) $(CFLAGS) /Zm200 /Fo"$@" tool_hugehelp.c\r
+tool_libinfod.obj: tool_libinfo.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c\r
+tool_maind.obj: tool_main.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_main.c\r
+tool_metalinkd.obj: tool_metalink.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c\r
+tool_mfilesd.obj: tool_mfiles.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c\r
+tool_msgsd.obj: tool_msgs.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_msgs.c\r
+tool_operated.obj: tool_operate.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operate.c\r
+tool_operhlpd.obj: tool_operhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_operhlp.c\r
+tool_panykeyd.obj: tool_panykey.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_panykey.c\r
+tool_paramhlpd.obj: tool_paramhlp.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_paramhlp.c\r
+tool_parsecfgd.obj: tool_parsecfg.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_parsecfg.c\r
+tool_setoptd.obj: tool_setopt.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_setopt.c\r
+tool_sleepd.obj: tool_sleep.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_sleep.c\r
+tool_urlglobd.obj: tool_urlglob.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_urlglob.c\r
+tool_utild.obj: tool_util.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_util.c\r
+tool_vmsd.obj: tool_vms.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_vms.c\r
+tool_writeenvd.obj: tool_writeenv.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeenv.c\r
+tool_writeoutd.obj: tool_writeout.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_writeout.c\r
+tool_xattrd.obj: tool_xattr.c\r
+       $(CCD) $(CFLAGS) /Fo"$@" tool_xattr.c\r
 curld.res : curl.rc\r
        $(RCD) $(RESFLAGS) /Fo"$@" curl.rc\r
 \r
diff --git a/src/config-amigaos.h b/src/config-amigaos.h
deleted file mode 100644 (file)
index fba875d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef CURL_CONFIG_AMIGAOS_H
-#define CURL_CONFIG_AMIGAOS_H
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2007, 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.
- *
- ***************************************************************************/
-
-#ifdef __AMIGA__ /* Any AmigaOS flavour */
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#define OS "AmigaOS"
-
-#define HAVE_CLOSESOCKET_CAMEL  1
-#define HAVE_UNISTD_H           1
-#define HAVE_STRDUP             1
-#define HAVE_UTIME              1
-#define HAVE_UTIME_H            1
-#define HAVE_SYS_TYPES_H        1
-#define HAVE_SYS_SOCKET_H       1
-#define HAVE_WRITABLE_ARGV      1
-#define HAVE_SYS_TIME_H         1
-#define HAVE_TIME_H             1
-#define TIME_WITH_SYS_TIME      1
-#define HAVE_STRUCT_TIMEVAL     1
-
-#if 0
-# define HAVE_TERMIOS_H         1
-# define HAVE_FTRUNCATE         1
-#endif
-
-#define HAVE_PWD_H              1
-
-#ifndef F_OK
-# define F_OK 0
-#endif
-#ifndef O_RDONLY
-# define       O_RDONLY        0x0000          /* open for reading only */
-#endif
-#ifndef LONG_MAX
-# define        LONG_MAX        0x7fffffffL             /* max value for a long */
-#endif
-#ifndef LONG_MIN
-# define        LONG_MIN        (-0x7fffffffL-1)        /* min value for a long */
-#endif
-
-#define SIZEOF_INT              4
-#define SIZEOF_SHORT            2
-
-#endif /* __AMIGA__ */
-#endif /* CURL_CONFIG_AMIGAOS_H */
diff --git a/src/config-mac.h b/src/config-mac.h
deleted file mode 100644 (file)
index dc7f767..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef __SRC_CONFIG_MAC_H
-#define __SRC_CONFIG_MAC_H
-
-/* =================================================================== */
-/*   src/config-mac.h - Hand crafted config file for Mac OS 9          */
-/* =================================================================== */
-/*  On Mac OS X you must run configure to generate curl_config.h file  */
-/* =================================================================== */
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#define HAVE_UNISTD_H           1
-#define HAVE_FCNTL_H            1
-#define HAVE_UTIME_H            1
-#define HAVE_SYS_UTIME_H        1
-
-#define HAVE_SETVBUF            1
-#define HAVE_UTIME              1
-#define HAVE_FTRUNCATE          1
-
-#define HAVE_TIME_H             1
-#define HAVE_SYS_TIME_H         1
-#define TIME_WITH_SYS_TIME      1
-#define HAVE_STRUCT_TIMEVAL     1
-
-#define SIZEOF_INT              4
-#define SIZEOF_SHORT            2
-
-#define main(x,y) curl_main(x,y)
-
-/* we provide our own strdup prototype */
-char *strdup(char *s1);
-
-#endif /* __SRC_CONFIG_MAC_H */
diff --git a/src/config-riscos.h b/src/config-riscos.h
deleted file mode 100644 (file)
index ba95f13..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-/* curl_config.h.in.  Generated automatically from configure.in by autoheader.  */
-/* Name of this package! */
-#undef PACKAGE
-
-/* Version number of this archive. */
-#undef VERSION
-
-/* Define if you have the getpass function.  */
-#undef HAVE_GETPASS
-
-/* Define cpu-machine-OS */
-#define OS "ARM-RISC OS"
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
-/* Define if you have the gethostbyname_r() function with 3 arguments */
-#undef HAVE_GETHOSTBYNAME_R_3
-
-/* Define if you have the gethostbyname_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYNAME_R_5
-
-/* Define if you have the gethostbyname_r() function with 6 arguments */
-#undef HAVE_GETHOSTBYNAME_R_6
-
-/* Define if you need the _REENTRANT define for some functions */
-#undef NEED_REENTRANT
-
-/* Define if you have the Kerberos4 libraries (including -ldes) */
-#undef HAVE_KRB4
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
-
-/* Define this to 'int' if ssize_t is not an available typedefed type */
-#undef ssize_t
-
-/* Define this as a suitable file to read random data from */
-#undef RANDOM_FILE
-
-/* Define this to your Entropy Gathering Daemon socket pathname */
-#undef EGD_SOCKET
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define if you have the <alloca.h> header file. */
-#define HAVE_ALLOCA_H
-
-/* Define if you have the <arpa/inet.h> header file. */
-#define HAVE_ARPA_INET_H
-
-/* Define if you have the `closesocket' function. */
-#undef HAVE_CLOSESOCKET
-
-/* Define if you have the <crypto.h> header file. */
-#undef HAVE_CRYPTO_H
-
-/* Define if you have the <des.h> header file. */
-#undef HAVE_DES_H
-
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H
-
-/* Define if you have the `ftruncate' function. */
-#define HAVE_FTRUNCATE
-
-/* Define if getaddrinfo exists and works */
-#define HAVE_GETADDRINFO
-
-/* Define if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#undef HAVE_GETHOSTBYADDR_R
-
-/* Define if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R
-
-/* Define if you have the `gethostname' function. */
-#define HAVE_GETHOSTNAME
-
-/* Define if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H
-
-/* Define if you have the `getpass_r' function. */
-#undef HAVE_GETPASS_R
-
-/* Define if you have the `getpwuid' function. */
-#undef HAVE_GETPWUID
-
-/* Define if you have the `getservbyname' function. */
-#undef HAVE_GETSERVBYNAME
-
-/* Define if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY
-
-/* Define if you have the `timeval' struct. */
-#define HAVE_STRUCT_TIMEVAL
-
-/* Define if you have the `inet_addr' function. */
-#undef HAVE_INET_ADDR
-
-/* Define if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H
-
-/* Define if you have the <io.h> header file. */
-#undef HAVE_IO_H
-
-/* Define if you have the `krb_get_our_ip_for_realm' function. */
-#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
-
-/* Define if you have the <krb.h> header file. */
-#undef HAVE_KRB_H
-
-/* Define if you have the `crypto' library (-lcrypto). */
-#undef HAVE_LIBCRYPTO
-
-/* Define if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define if you have the `resolve' library (-lresolve). */
-#undef HAVE_LIBRESOLVE
-
-/* Define if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define if you have the `ssl' library (-lssl). */
-#undef HAVE_LIBSSL
-
-/* Define if you have the `ucb' library (-lucb). */
-#undef HAVE_LIBUCB
-
-/* Define if you have the `localtime_r' function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H
-
-/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-/* #define NEED_MALLOC_H 1 */
-
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#undef HAVE_NETINET_IF_ETHER_H
-
-/* Define if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H
-
-/* Define if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H
-
-/* Define if you have the <openssl/crypto.h> header file. */
-#undef HAVE_OPENSSL_CRYPTO_H
-
-/* Define if you have the <openssl/err.h> header file. */
-#undef HAVE_OPENSSL_ERR_H
-
-/* Define if you have the <openssl/pem.h> header file. */
-#undef HAVE_OPENSSL_PEM_H
-
-/* Define if you have the <openssl/rsa.h> header file. */
-#undef HAVE_OPENSSL_RSA_H
-
-/* Define if you have the <openssl/ssl.h> header file. */
-#undef HAVE_OPENSSL_SSL_H
-
-/* Define if you have the <openssl/x509.h> header file. */
-#undef HAVE_OPENSSL_X509_H
-
-/* Define if you have the <pem.h> header file. */
-#undef HAVE_PEM_H
-
-/* Define if you have the `perror' function. */
-#undef HAVE_PERROR
-
-/* Define if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define if you have the `RAND_egd' function. */
-#undef HAVE_RAND_EGD
-
-/* Define if you have the `RAND_screen' function. */
-#undef HAVE_RAND_SCREEN
-
-/* Define if you have the `RAND_status' function. */
-#undef HAVE_RAND_STATUS
-
-/* Define if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
-/* Define if you have the `select' function. */
-#define HAVE_SELECT
-
-/* Define if you have the `setvbuf' function. */
-#undef HAVE_SETVBUF
-
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H
-
-/* Define if you have the `sigaction' function. */
-#undef HAVE_SIGACTION
-
-/* Define if you have the `signal' function. */
-#define HAVE_SIGNAL
-
-/* Define if you have the `socket' function. */
-#define HAVE_SOCKET
-
-/* Define if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
-/* Define if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H
-
-/* Define if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the `strcmpi' function. */
-#undef HAVE_STRCMPI
-
-/* Define if you have the `strdup' function. */
-#define HAVE_STRDUP
-
-/* Define if you have the `strftime' function. */
-#define HAVE_STRFTIME
-
-/* Define if you have the `stricmp' function. */
-#define HAVE_STRICMP
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H
-
-/* Define if you have the `strlcat' function. */
-#undef HAVE_STRLCAT
-
-/* Define if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define if you have the `strstr' function. */
-#define HAVE_STRSTR
-
-/* Define if you have the `strtok_r' function. */
-#undef HAVE_STRTOK_R
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H
-
-/* Define if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H
-
-/* Define if you have the `tcgetattr' function. */
-#define HAVE_TCGETATTR
-
-/* Define if you have the `tcsetattr' function. */
-#define HAVE_TCSETATTR
-
-/* Define if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H
-
-/* Define if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define if you have the `uname' function. */
-#define HAVE_UNAME
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H
-
-/* Define if you have the <winsock.h> header file. */
-#undef HAVE_WINSOCK_H
-
-/* Define if you have the <x509.h> header file. */
-#undef HAVE_X509_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#undef SIZEOF_LONG_DOUBLE
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Version number of package */
-#undef VERSION
-
-/* Define 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
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef ssize_t
-
-/* Define if you have the ioctl function. */
-#define HAVE_IOCTL
-
-/* Define if you have a working ioctl FIONBIO function. */
-#define HAVE_IOCTL_FIONBIO
diff --git a/src/config-win32.h b/src/config-win32.h
deleted file mode 100644 (file)
index 10a5eaf..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-#ifndef __SRC_CONFIG_WIN32_H
-#define __SRC_CONFIG_WIN32_H
-
-/* ================================================================ */
-/*    src/config-win32.h - Hand crafted config file for windows     */
-/* ================================================================ */
-
-/* ---------------------------------------------------------------- */
-/*                          HEADER FILES                            */
-/* ---------------------------------------------------------------- */
-
-/* Define if you have the <fcntl.h> header file.  */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <io.h> header file.  */
-#define HAVE_IO_H 1
-
-/* Define if you have the <limits.h> header file.  */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file.  */
-#define HAVE_LOCALE_H 1
-
-/* Define if you need the malloc.h header file even with stdlib.h  */
-#if !defined(__SALFORDC__) && !defined(__POCC__)
-#define NEED_MALLOC_H 1
-#endif
-
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <sys/time.h> header file */
-/* #define HAVE_SYS_TIME_H 1 */
-
-/* Define if you have the <sys/types.h> header file.  */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <sys/utime.h> header file.  */
-#ifndef __BORLANDC__
-#define HAVE_SYS_UTIME_H 1
-#endif
-
-/* Define if you have the <time.h> header file.  */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file.  */
-#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
-    defined(__POCC__)
-#define HAVE_UNISTD_H 1
-#endif
-
-/* Define if you have the <windows.h> header file.  */
-#define HAVE_WINDOWS_H 1
-
-/* Define if you have the <winsock.h> header file.  */
-#define HAVE_WINSOCK_H 1
-
-/* Define if you have the <winsock2.h> header file.  */
-#ifndef __SALFORDC__
-#define HAVE_WINSOCK2_H 1
-#endif
-
-/* Define if you have the <ws2tcpip.h> header file.  */
-#ifndef __SALFORDC__
-#define HAVE_WS2TCPIP_H 1
-#endif
-
-/* ---------------------------------------------------------------- */
-/*                        OTHER HEADER INFO                         */
-/* ---------------------------------------------------------------- */
-
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
-/* Define if you have the ANSI C header files.  */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-/* #define TIME_WITH_SYS_TIME 1 */
-
-/* ---------------------------------------------------------------- */
-/*                             FUNCTIONS                            */
-/* ---------------------------------------------------------------- */
-
-/* Define if you have the ftruncate function.  */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the ioctlsocket function. */
-#define HAVE_IOCTLSOCKET 1
-
-/* Define if you have a working ioctlsocket FIONBIO function. */
-#define HAVE_IOCTLSOCKET_FIONBIO 1
-
-/* Define if you have the setlocale function.  */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the setmode function. */
-#define HAVE_SETMODE 1
-
-/* Define if you have the strcasecmp function. */
-/* #define HAVE_STRCASECMP 1 */
-
-/* Define if you have the strdup function.  */
-#define HAVE_STRDUP 1
-
-/* Define if you have the stricmp function.  */
-#define HAVE_STRICMP 1
-
-/* Define if you have the strncasecmp function. */
-/* #define HAVE_STRNCASECMP 1 */
-
-/* Define if you have the strnicmp function. */
-#define HAVE_STRNICMP 1
-
-/* Define if you have the utime function */
-#ifndef __BORLANDC__
-#define HAVE_UTIME 1
-#endif
-
-/* Define if you have the recv function. */
-#define HAVE_RECV 1
-
-/* Define to the type of arg 1 for recv. */
-#define RECV_TYPE_ARG1 SOCKET
-
-/* Define to the type of arg 2 for recv. */
-#define RECV_TYPE_ARG2 char *
-
-/* Define to the type of arg 3 for recv. */
-#define RECV_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recv. */
-#define RECV_TYPE_ARG4 int
-
-/* Define to the function return type for recv. */
-#define RECV_TYPE_RETV int
-
-/* Define if you have the recvfrom function. */
-#define HAVE_RECVFROM 1
-
-/* Define to the type of arg 1 for recvfrom. */
-#define RECVFROM_TYPE_ARG1 SOCKET
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#define RECVFROM_TYPE_ARG2 char
-
-/* Define to the type of arg 3 for recvfrom. */
-#define RECVFROM_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recvfrom. */
-#define RECVFROM_TYPE_ARG4 int
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#define RECVFROM_TYPE_ARG6 int
-
-/* Define to the function return type for recvfrom. */
-#define RECVFROM_TYPE_RETV int
-
-/* Define if you have the send function. */
-#define HAVE_SEND 1
-
-/* Define to the type of arg 1 for send. */
-#define SEND_TYPE_ARG1 SOCKET
-
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
-/* Define to the type of arg 2 for send. */
-#define SEND_TYPE_ARG2 char *
-
-/* Define to the type of arg 3 for send. */
-#define SEND_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for send. */
-#define SEND_TYPE_ARG4 int
-
-/* Define to the function return type for send. */
-#define SEND_TYPE_RETV int
-
-/* ---------------------------------------------------------------- */
-/*                       TYPEDEF REPLACEMENTS                       */
-/* ---------------------------------------------------------------- */
-
-/* Define this if in_addr_t is not an available 'typedefed' type */
-#define in_addr_t unsigned long
-
-/* Define as the return type of signal handlers (int or void).  */
-#define RETSIGTYPE void
-
-/* Define ssize_t if it is not an available 'typedefed' type */
-#ifndef _SSIZE_T_DEFINED
-#  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
-      defined(__POCC__) || \
-      defined(__MINGW32__)
-#  elif defined(_WIN64)
-#    define _SSIZE_T_DEFINED
-#    define ssize_t __int64
-#  else
-#    define _SSIZE_T_DEFINED
-#    define ssize_t int
-#  endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/*                            TYPE SIZES                            */
-/* ---------------------------------------------------------------- */
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 16
-
-/* The size of `long long', as computed by sizeof. */
-/* #define SIZEOF_LONG_LONG 8 */
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* ---------------------------------------------------------------- */
-/*                          STRUCT RELATED                          */
-/* ---------------------------------------------------------------- */
-
-/* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-#endif
-
-/* Define this if you have struct timeval */
-#define HAVE_STRUCT_TIMEVAL 1
-
-/* Define this if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
-
-/* ---------------------------------------------------------------- */
-/*                        Watt-32 tcp/ip SPECIFIC                   */
-/* ---------------------------------------------------------------- */
-
-#ifdef USE_WATT32
-  #include <tcp.h>
-  #undef byte
-  #undef word
-  #undef USE_WINSOCK
-  #undef HAVE_WINSOCK_H
-  #undef HAVE_WINSOCK2_H
-  #undef HAVE_WS2TCPIP_H
-  #define HAVE_GETADDRINFO
-  #define HAVE_GETNAMEINFO
-  #define HAVE_SYS_IOCTL_H
-  #define HAVE_SYS_SOCKET_H
-  #define HAVE_NETINET_IN_H
-  #define HAVE_NETDB_H
-  #define HAVE_ARPA_INET_H
-  #define HAVE_FREEADDRINFO
-  #define SOCKET int
-#endif
-
-
-/* ---------------------------------------------------------------- */
-/*                        COMPILER SPECIFIC                         */
-/* ---------------------------------------------------------------- */
-
-/* Undef keyword 'const' if it does not work.  */
-/* #undef const */
-
-/* Windows should not have HAVE_GMTIME_R defined */
-/* #undef HAVE_GMTIME_R */
-
-/* Define if the compiler supports C99 variadic macro style. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#define HAVE_VARIADIC_MACROS_C99 1
-#endif
-
-/* Define if the compiler supports the 'long long' data type. */
-#if defined(__MINGW32__) || defined(__WATCOMC__)
-#define HAVE_LONGLONG 1
-#endif
-
-/* Define to avoid VS2005 complaining about portable C functions */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#define _CRT_SECURE_NO_DEPRECATE 1
-#define _CRT_NONSTDC_NO_DEPRECATE 1
-#endif
-
-/* VS2005 and later dafault size for time_t is 64-bit, unless */
-/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#  ifndef _USE_32BIT_TIME_T
-#    define SIZEOF_TIME_T 8
-#  else
-#    define SIZEOF_TIME_T 4
-#  endif
-#endif
-
-/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
-   2000 as a supported build target. VS2008 default installations provide an
-   embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
-   valid build target for VS2008. Popular belief is that binaries built using
-   Windows SDK versions 6.X and Windows 2000 as a build target are functional */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#  define VS2008_MINIMUM_TARGET 0x0500
-#endif
-
-/* When no build target is specified VS2008 default build target is Windows
-   Vista, which leaves out even Winsows XP. If no build target has been given
-   for VS2008 we will target the minimum Officially supported build target,
-   which happens to be Windows XP. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#  define VS2008_DEFAULT_TARGET  0x0501
-#endif
-
-/* VS2008 default target settings and minimum build target check */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
-#  ifndef _WIN32_WINNT
-#    define _WIN32_WINNT VS2008_DEFAULT_TARGET
-#  endif
-#  ifndef WINVER
-#    define WINVER VS2008_DEFAULT_TARGET
-#  endif
-#  if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
-#    error VS2008 does not support Windows build targets prior to Windows 2000
-#  endif
-#endif
-
-/* When no build target is specified Pelles C 5.00 and later default build
-   target is Windows Vista. We override default target to be Windows 2000. */
-#if defined(__POCC__) && (__POCC__ >= 500)
-#  ifndef _WIN32_WINNT
-#    define _WIN32_WINNT 0x0500
-#  endif
-#  ifndef WINVER
-#    define WINVER 0x0500
-#  endif
-#endif
-
-/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
-   quite convoluted, compiler dependent and even build target dependent. */
-#if defined(HAVE_WS2TCPIP_H)
-#  if defined(__POCC__)
-#    define HAVE_FREEADDRINFO           1
-#    define HAVE_GETADDRINFO            1
-#    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
-#  elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
-#    define HAVE_FREEADDRINFO           1
-#    define HAVE_GETADDRINFO            1
-#    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
-#  elif defined(_MSC_VER) && (_MSC_VER >= 1200)
-#    define HAVE_FREEADDRINFO           1
-#    define HAVE_GETADDRINFO            1
-#    define HAVE_GETADDRINFO_THREADSAFE 1
-#    define HAVE_GETNAMEINFO            1
-#  endif
-#endif
-
-#if defined(__POCC__)
-#  ifndef _MSC_VER
-#    error Microsoft extensions /Ze compiler option is required
-#  endif
-#  ifndef __POCC__OLDNAMES
-#    error Compatibility names /Go compiler option is required
-#  endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/*                        LARGE FILE SUPPORT                        */
-/* ---------------------------------------------------------------- */
-
-#if defined(_MSC_VER) && !defined(_WIN32_WCE)
-#  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
-#    define USE_WIN32_LARGE_FILES
-#  else
-#    define USE_WIN32_SMALL_FILES
-#  endif
-#endif
-
-#if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
-#  define USE_WIN32_LARGE_FILES
-#endif
-
-#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
-#  define USE_WIN32_LARGE_FILES
-#endif
-
-#if defined(__POCC__)
-#  undef USE_WIN32_LARGE_FILES
-#endif
-
-#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
-#  define USE_WIN32_SMALL_FILES
-#endif
-
-/* ---------------------------------------------------------------- */
-/*                       ADDITIONAL DEFINITIONS                     */
-/* ---------------------------------------------------------------- */
-
-/* Define cpu-machine-OS */
-#ifndef OS
-#define OS "i386-pc-win32"
-#endif
-
-/* Define to 1 if you want the built-in manual */
-#define USE_MANUAL 1
-
-#if defined(__POCC__)
-#  define ENABLE_IPV6 1
-#endif
-
-#endif /* __SRC_CONFIG_WIN32_H */
index 58e439d..3db59bd 100644 (file)
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 #include <winver.h>
-#include "version.h"
+#include "tool_version.h"
 
 LANGUAGE  0x09,0x01
 
diff --git a/src/curl_config.h.in b/src/curl_config.h.in
deleted file mode 100644 (file)
index aaea103..0000000
+++ /dev/null
@@ -1,1021 +0,0 @@
-/* lib/curl_config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* when building libcurl itself */
-#undef BUILDING_LIBCURL
-
-/* Location of default ca bundle */
-#undef CURL_CA_BUNDLE
-
-/* Location of default ca path */
-#undef CURL_CA_PATH
-
-/* to disable cookies support */
-#undef CURL_DISABLE_COOKIES
-
-/* to disable cryptographic authentication */
-#undef CURL_DISABLE_CRYPTO_AUTH
-
-/* 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 IMAP */
-#undef CURL_DISABLE_IMAP
-
-/* to disable LDAP */
-#undef CURL_DISABLE_LDAP
-
-/* to disable LDAPS */
-#undef CURL_DISABLE_LDAPS
-
-/* to disable POP3 */
-#undef CURL_DISABLE_POP3
-
-/* to disable proxies */
-#undef CURL_DISABLE_PROXY
-
-/* to disable RTSP */
-#undef CURL_DISABLE_RTSP
-
-/* to disable SMTP */
-#undef CURL_DISABLE_SMTP
-
-/* to disable TELNET */
-#undef CURL_DISABLE_TELNET
-
-/* to disable TFTP */
-#undef CURL_DISABLE_TFTP
-
-/* to disable verbose strings */
-#undef CURL_DISABLE_VERBOSE_STRINGS
-
-/* to make a symbol visible */
-#undef CURL_EXTERN_SYMBOL
-
-/* to enable hidden symbols */
-#undef CURL_HIDDEN_SYMBOLS
-
-/* Use Windows LDAP implementation */
-#undef CURL_LDAP_WIN
-
-/* when not building a shared library */
-#undef CURL_STATICLIB
-
-/* your Entropy Gathering Daemon socket pathname */
-#undef EGD_SOCKET
-
-/* Define if you want to enable IPv6 support */
-#undef ENABLE_IPV6
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_QUAL_ARG1
-
-/* Define to the type of arg 1 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG1
-
-/* Define to the type of arg 2 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG2
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG46
-
-/* Define to the type of arg 7 for getnameinfo. */
-#undef GETNAMEINFO_TYPE_ARG7
-
-/* Specifies the number of arguments to getservbyport_r */
-#undef GETSERVBYPORT_R_ARGS
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#undef GETSERVBYPORT_R_BUFSIZE
-
-/* Define to 1 if you have the alarm function. */
-#undef HAVE_ALARM
-
-/* 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. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the <arpa/tftp.h> header file. */
-#undef HAVE_ARPA_TFTP_H
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the basename function. */
-#undef HAVE_BASENAME
-
-/* Define to 1 if bool is an available type. */
-#undef HAVE_BOOL_T
-
-/* Define to 1 if you have the clock_gettime function and monotonic timer. */
-#undef HAVE_CLOCK_GETTIME_MONOTONIC
-
-/* Define to 1 if you have the closesocket function. */
-#undef HAVE_CLOSESOCKET
-
-/* Define to 1 if you have the CloseSocket camel case function. */
-#undef HAVE_CLOSESOCKET_CAMEL
-
-/* Define to 1 if you have the connect function. */
-#undef HAVE_CONNECT
-
-/* 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
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `ENGINE_cleanup' function. */
-#undef HAVE_ENGINE_CLEANUP
-
-/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
-#undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the fcntl function. */
-#undef HAVE_FCNTL
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
-#undef HAVE_FCNTL_O_NONBLOCK
-
-/* Define to 1 if you have the fdopen function. */
-#undef HAVE_FDOPEN
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the freeaddrinfo function. */
-#undef HAVE_FREEADDRINFO
-
-/* Define to 1 if you have the freeifaddrs function. */
-#undef HAVE_FREEIFADDRS
-
-/* Define to 1 if you have the fsetxattr function. */
-#undef HAVE_FSETXATTR
-
-/* fsetxattr() takes 5 args */
-#undef HAVE_FSETXATTR_5
-
-/* fsetxattr() takes 6 args */
-#undef HAVE_FSETXATTR_6
-
-/* Define to 1 if you have the ftruncate function. */
-#undef HAVE_FTRUNCATE
-
-/* Define to 1 if you have a working getaddrinfo function. */
-#undef HAVE_GETADDRINFO
-
-/* Define to 1 if the getaddrinfo function is threadsafe. */
-#undef HAVE_GETADDRINFO_THREADSAFE
-
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the gethostbyaddr function. */
-#undef HAVE_GETHOSTBYADDR
-
-/* 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 function. */
-#undef HAVE_GETHOSTBYNAME
-
-/* 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 gethostname function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define to 1 if you have a working getifaddrs function. */
-#undef HAVE_GETIFADDRS
-
-/* Define to 1 if you have the getnameinfo function. */
-#undef HAVE_GETNAMEINFO
-
-/* Define to 1 if you have the `getpass_r' function. */
-#undef HAVE_GETPASS_R
-
-/* Define to 1 if you have the `getppid' function. */
-#undef HAVE_GETPPID
-
-/* Define to 1 if you have the `getprotobyname' function. */
-#undef HAVE_GETPROTOBYNAME
-
-/* Define to 1 if you have the `getpwuid' function. */
-#undef HAVE_GETPWUID
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_GETRLIMIT
-
-/* Define to 1 if you have the getservbyport_r function. */
-#undef HAVE_GETSERVBYPORT_R
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have a working glibc-style strerror_r function. */
-#undef HAVE_GLIBC_STRERROR_R
-
-/* Define to 1 if you have a working gmtime_r function. */
-#undef HAVE_GMTIME_R
-
-/* if you have the gssapi libraries */
-#undef HAVE_GSSAPI
-
-/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
-
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_H
-
-/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
-#undef HAVE_GSSAPI_GSSAPI_KRB5_H
-
-/* if you have the GNU gssapi libraries */
-#undef HAVE_GSSGNU
-
-/* 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 `idna_strerror' function. */
-#undef HAVE_IDNA_STRERROR
-
-/* Define to 1 if you have the `idn_free' function. */
-#undef HAVE_IDN_FREE
-
-/* Define to 1 if you have the <idn-free.h> header file. */
-#undef HAVE_IDN_FREE_H
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#undef HAVE_IFADDRS_H
-
-/* Define to 1 if you have the `inet_addr' function. */
-#undef HAVE_INET_ADDR
-
-/* Define to 1 if you have the inet_ntoa_r function. */
-#undef HAVE_INET_NTOA_R
-
-/* inet_ntoa_r() takes 2 args */
-#undef HAVE_INET_NTOA_R_2
-
-/* inet_ntoa_r() takes 3 args */
-#undef HAVE_INET_NTOA_R_3
-
-/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
-#undef HAVE_INET_NTOP
-
-/* Define to 1 if you have a IPv6 capable working inet_pton function. */
-#undef HAVE_INET_PTON
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the ioctl function. */
-#undef HAVE_IOCTL
-
-/* Define to 1 if you have the ioctlsocket function. */
-#undef HAVE_IOCTLSOCKET
-
-/* Define to 1 if you have the IoctlSocket camel case function. */
-#undef HAVE_IOCTLSOCKET_CAMEL
-
-/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
-   */
-#undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-
-/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
-#undef HAVE_IOCTLSOCKET_FIONBIO
-
-/* Define to 1 if you have a working ioctl FIONBIO function. */
-#undef HAVE_IOCTL_FIONBIO
-
-/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
-#undef HAVE_IOCTL_SIOCGIFADDR
-
-/* 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 lber.h header file. */
-#undef HAVE_LBER_H
-
-/* Define to 1 if you have the ldapssl.h header file. */
-#undef HAVE_LDAPSSL_H
-
-/* Define to 1 if you have the ldap.h header file. */
-#undef HAVE_LDAP_H
-
-/* Define to 1 if you have the `ldap_init_fd' function. */
-#undef HAVE_LDAP_INIT_FD
-
-/* Use LDAPS implementation */
-#undef HAVE_LDAP_SSL
-
-/* Define to 1 if you have the ldap_ssl.h header file. */
-#undef HAVE_LDAP_SSL_H
-
-/* Define to 1 if you have the `ldap_url_parse' function. */
-#undef HAVE_LDAP_URL_PARSE
-
-/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
-#undef HAVE_LIBGCRYPT
-
-/* Define to 1 if you have the <libgen.h> header file. */
-#undef HAVE_LIBGEN_H
-
-/* Define to 1 if you have the `idn' library (-lidn). */
-#undef HAVE_LIBIDN
-
-/* 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 <librtmp/rtmp.h> header file. */
-#undef HAVE_LIBRTMP_RTMP_H
-
-/* Define to 1 if you have the `ssh2' library (-lssh2). */
-#undef HAVE_LIBSSH2
-
-/* Define to 1 if you have the `libssh2_exit' function. */
-#undef HAVE_LIBSSH2_EXIT
-
-/* Define to 1 if you have the <libssh2.h> header file. */
-#undef HAVE_LIBSSH2_H
-
-/* Define to 1 if you have the `libssh2_init' function. */
-#undef HAVE_LIBSSH2_INIT
-
-/* Define to 1 if you have the `libssh2_scp_send64' function. */
-#undef HAVE_LIBSSH2_SCP_SEND64
-
-/* Define to 1 if you have the `libssh2_session_handshake' function. */
-#undef HAVE_LIBSSH2_SESSION_HANDSHAKE
-
-/* Define to 1 if you have the `libssh2_version' function. */
-#undef HAVE_LIBSSH2_VERSION
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-#undef HAVE_LIBSSL
-
-/* if zlib is available */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* if your compiler supports LL */
-#undef HAVE_LL
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have a working localtime_r function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define to 1 if the compiler supports the 'long long' data type. */
-#undef HAVE_LONGLONG
-
-/* Define to 1 if you have the malloc.h header file. */
-#undef HAVE_MALLOC_H
-
-/* Define to 1 if you have the memory.h header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the memrchr function or macro. */
-#undef HAVE_MEMRCHR
-
-/* Define to 1 if you have the MSG_NOSIGNAL flag. */
-#undef HAVE_MSG_NOSIGNAL
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define to 1 if NI_WITHSCOPEID exists and works. */
-#undef HAVE_NI_WITHSCOPEID
-
-/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
-   */
-#undef HAVE_OLD_GSSMIT
-
-/* 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/pkcs12.h> header file. */
-#undef HAVE_OPENSSL_PKCS12_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
-
-/* 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 `pipe' function. */
-#undef HAVE_PIPE
-
-/* if you have the function PK11_CreateGenericObject */
-#undef HAVE_PK11_CREATEGENERICOBJECT
-
-/* Define to 1 if you have a working poll function. */
-#undef HAVE_POLL
-
-/* If you have a fine poll */
-#undef HAVE_POLL_FINE
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if you have a working POSIX-style strerror_r function. */
-#undef HAVE_POSIX_STRERROR_R
-
-/* if you have <pthread.h> */
-#undef HAVE_PTHREAD_H
-
-/* 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 recv function. */
-#undef HAVE_RECV
-
-/* Define to 1 if you have the recvfrom function. */
-#undef HAVE_RECVFROM
-
-/* Define to 1 if you have the <rsa.h> header file. */
-#undef HAVE_RSA_H
-
-/* Define to 1 if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if you have the send function. */
-#undef HAVE_SEND
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#undef HAVE_SETJMP_H
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the `setmode' function. */
-#undef HAVE_SETMODE
-
-/* Define to 1 if you have the `setrlimit' function. */
-#undef HAVE_SETRLIMIT
-
-/* Define to 1 if you have the setsockopt function. */
-#undef HAVE_SETSOCKOPT
-
-/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
-#undef HAVE_SETSOCKOPT_SO_NONBLOCK
-
-/* 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. */
-#undef HAVE_SIGNAL
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the sigsetjmp function or macro. */
-#undef HAVE_SIGSETJMP
-
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#undef HAVE_SIG_ATOMIC_T
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-#undef HAVE_SIG_ATOMIC_T_VOLATILE
-
-/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
-#undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-
-/* Define to 1 if you have the socket function. */
-#undef HAVE_SOCKET
-
-/* Define to 1 if you have the <socket.h> header file. */
-#undef HAVE_SOCKET_H
-
-/* Define this if you have the SPNEGO library fbopenssl */
-#undef HAVE_SPNEGO
-
-/* Define to 1 if you have the `SSL_get_shutdown' function. */
-#undef HAVE_SSL_GET_SHUTDOWN
-
-/* Define to 1 if you have the <ssl.h> header file. */
-#undef HAVE_SSL_H
-
-/* Define to 1 if you have the <stdbool.h> header file. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the strcasestr function. */
-#undef HAVE_STRCASESTR
-
-/* Define to 1 if you have the strcmpi function. */
-#undef HAVE_STRCMPI
-
-/* Define to 1 if you have the strdup function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the strerror_r function. */
-#undef HAVE_STRERROR_R
-
-/* 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. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the strlcat function. */
-#undef HAVE_STRLCAT
-
-/* Define to 1 if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define to 1 if you have the strncasecmp function. */
-#undef HAVE_STRNCASECMP
-
-/* Define to 1 if you have the strncmpi function. */
-#undef HAVE_STRNCMPI
-
-/* Define to 1 if you have the strnicmp function. */
-#undef HAVE_STRNICMP
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define to 1 if you have the strstr function. */
-#undef HAVE_STRSTR
-
-/* 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
-
-/* if struct sockaddr_storage is defined */
-#undef HAVE_STRUCT_SOCKADDR_STORAGE
-
-/* Define to 1 if you have the timeval struct. */
-#undef HAVE_STRUCT_TIMEVAL
-
-/* Define to 1 if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* 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/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
-/* Define to 1 if you have the <sys/utime.h> header file. */
-#undef HAVE_SYS_UTIME_H
-
-/* Define to 1 if you have the <sys/xattr.h> header file. */
-#undef HAVE_SYS_XATTR_H
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* 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. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <tld.h> header file. */
-#undef HAVE_TLD_H
-
-/* Define to 1 if you have the `tld_strerror' function. */
-#undef HAVE_TLD_STRERROR
-
-/* Define to 1 if you have the `uname' function. */
-#undef HAVE_UNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* 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 compiler supports C99 variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_C99
-
-/* Define to 1 if compiler supports old gcc variadic macro style. */
-#undef HAVE_VARIADIC_MACROS_GCC
-
-/* Define to 1 if you have the winber.h header file. */
-#undef HAVE_WINBER_H
-
-/* Define to 1 if you have the windows.h header file. */
-#undef HAVE_WINDOWS_H
-
-/* Define to 1 if you have the winldap.h header file. */
-#undef HAVE_WINLDAP_H
-
-/* Define to 1 if you have the winsock2.h header file. */
-#undef HAVE_WINSOCK2_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 writev function. */
-#undef HAVE_WRITEV
-
-/* Define to 1 if you have the ws2tcpip.h header file. */
-#undef HAVE_WS2TCPIP_H
-
-/* Define to 1 if you have the <x509.h> header file. */
-#undef HAVE_X509_H
-
-/* if you have the zlib.h header file */
-#undef HAVE_ZLIB_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Define to 1 if you are building a native Windows target. */
-#undef NATIVE_WINDOWS
-
-/* Define to 1 if you need the lber.h header file even with ldap.h */
-#undef NEED_LBER_H
-
-/* Define to 1 if you need the malloc.h header file even with stdlib.h */
-#undef NEED_MALLOC_H
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#undef NEED_MEMORY_H
-
-/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
-#undef NEED_REENTRANT
-
-/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
-#undef NEED_THREAD_SAFE
-
-/* cpu-machine-OS */
-#undef OS
-
-/* 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 home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* a suitable file to read random data from */
-#undef RANDOM_FILE
-
-/* Define to the type of arg 1 for recvfrom. */
-#undef RECVFROM_TYPE_ARG1
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#undef RECVFROM_TYPE_ARG2
-
-/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG2_IS_VOID
-
-/* Define to the type of arg 3 for recvfrom. */
-#undef RECVFROM_TYPE_ARG3
-
-/* Define to the type of arg 4 for recvfrom. */
-#undef RECVFROM_TYPE_ARG4
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#undef RECVFROM_TYPE_ARG5
-
-/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG5_IS_VOID
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#undef RECVFROM_TYPE_ARG6
-
-/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
-#undef RECVFROM_TYPE_ARG6_IS_VOID
-
-/* Define to the function return type for recvfrom. */
-#undef RECVFROM_TYPE_RETV
-
-/* Define to the type of arg 1 for recv. */
-#undef RECV_TYPE_ARG1
-
-/* Define to the type of arg 2 for recv. */
-#undef RECV_TYPE_ARG2
-
-/* Define to the type of arg 3 for recv. */
-#undef RECV_TYPE_ARG3
-
-/* Define to the type of arg 4 for recv. */
-#undef RECV_TYPE_ARG4
-
-/* Define to the function return type for recv. */
-#undef RECV_TYPE_RETV
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to the type qualifier of arg 5 for select. */
-#undef SELECT_QUAL_ARG5
-
-/* 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
-
-/* Define to the function return type for select. */
-#undef SELECT_TYPE_RETV
-
-/* Define to the type qualifier of arg 2 for send. */
-#undef SEND_QUAL_ARG2
-
-/* Define to the type of arg 1 for send. */
-#undef SEND_TYPE_ARG1
-
-/* Define to the type of arg 2 for send. */
-#undef SEND_TYPE_ARG2
-
-/* Define to the type of arg 3 for send. */
-#undef SEND_TYPE_ARG3
-
-/* Define to the type of arg 4 for send. */
-#undef SEND_TYPE_ARG4
-
-/* Define to the function return type for send. */
-#undef SEND_TYPE_RETV
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* The size of `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
-
-/* The size of `size_t', as computed by sizeof. */
-#undef SIZEOF_SIZE_T
-
-/* The size of `time_t', as computed by sizeof. */
-#undef SIZEOF_TIME_T
-
-/* The size of `void*', as computed by sizeof. */
-#undef SIZEOF_VOIDP
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to the type of arg 3 for strerror_r. */
-#undef STRERROR_R_TYPE_ARG3
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to enable c-ares support */
-#undef USE_ARES
-
-/* Define to disable non-blocking sockets. */
-#undef USE_BLOCKING_SOCKETS
-
-/* if GnuTLS is enabled */
-#undef USE_GNUTLS
-
-/* if librtmp is in use */
-#undef USE_LIBRTMP
-
-/* if libSSH2 is in use */
-#undef USE_LIBSSH2
-
-/* If you want to build curl with the built-in manual */
-#undef USE_MANUAL
-
-/* if NSS is enabled */
-#undef USE_NSS
-
-/* Use OpenLDAP-specific code */
-#undef USE_OPENLDAP
-
-/* if OpenSSL is in use */
-#undef USE_OPENSSL
-
-/* if PolarSSL is enabled */
-#undef USE_POLARSSL
-
-/* if SSL is enabled */
-#undef USE_SSLEAY
-
-/* if you want POSIX threaded DNS lookup */
-#undef USE_THREADS_POSIX
-
-/* Define to 1 if you are building a Windows target without large file
-   support. */
-#undef USE_WIN32_LARGE_FILES
-
-/* to enable SSPI support */
-#undef USE_WINDOWS_SSPI
-
-/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
-#undef USE_YASSLEMUL
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to avoid automatic inclusion of winsock.h */
-#undef WIN32_LEAN_AND_MEAN
-
-/* Define to 1 if OS is AIX. */
-#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 when system does not provide it. */
-#undef in_addr_t
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* the signed version of size_t */
-#undef ssize_t
diff --git a/src/hugehelp.c b/src/hugehelp.c
deleted file mode 100644 (file)
index 34bc301..0000000
+++ /dev/null
@@ -1,7115 +0,0 @@
-#include "setup.h"
-#ifndef HAVE_LIBZ
-/*
- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
- * Generation time: Wed Dec 15 15:06:02 2010
- */
-#include "setup.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
-void hugehelp(void)
-{
-   fputs(
-"                                  _   _ ____  _\n"
-"  Project                     ___| | | |  _ \\| |\n"
-"                             / __| | | | |_) | |\n"
-"                            | (__| |_| |  _ <| |___\n"
-"                             \\___|\\___/|_| \\_\\_____|\n"
-"\n"
-"NAME\n"
-"       curl - transfer a URL\n"
-"\n"
-"SYNOPSIS\n"
-"       curl [options] [URL...]\n"
-"\n"
-"DESCRIPTION\n"
-"       curl  is  a tool to transfer data from or to a server, using one of the\n"
-"       supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,  IMAP,\n"
-, stdout);
- fputs(
-"       IMAPS,  LDAP,  LDAPS,  POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,\n"
-"       TELNET and TFTP).  The command is designed to work without user  inter-\n"
-"       action.\n"
-"\n"
-"       curl offers a busload of useful tricks like proxy support, user authen-\n"
-"       tication, FTP upload, HTTP post, SSL connections, cookies, file  trans-\n"
-"       fer resume and more. As you will see below, the number of features will\n"
-"       make your head spin!\n"
-"\n"
-, stdout);
- fputs(
-"       curl is powered by  libcurl  for  all  transfer-related  features.  See\n"
-"       libcurl(3) for details.\n"
-"\n"
-"URL\n"
-"       The  URL  syntax is protocol-dependent. You'll find a detailed descrip-\n"
-"       tion in RFC 3986.\n"
-"\n"
-"       You can specify multiple URLs or parts of URLs  by  writing  part  sets\n"
-"       within braces as in:\n"
-"\n"
-"        http://site.{one,two,three}.com\n"
-"\n"
-"       or you can get sequences of alphanumeric series by using [] as in:\n"
-"\n"
-"        ftp://ftp.numericals.com/file[1-100].txt\n"
-, stdout);
- fputs(
-"        ftp://ftp.numericals.com/file[001-100].txt    (with leading zeros)\n"
-"        ftp://ftp.letters.com/file[a-z].txt\n"
-"\n"
-"       Nested  sequences  are not supported, but you can use several ones next\n"
-"       to each other:\n"
-"\n"
-"        http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html\n"
-"\n"
-"       You can specify any amount of URLs on the command line.  They  will  be\n"
-"       fetched in a sequential manner in the specified order.\n"
-"\n"
-, stdout);
- fputs(
-"       You  can  specify a step counter for the ranges to get every Nth number\n"
-"       or letter:\n"
-"\n"
-"        http://www.numericals.com/file[1-100:10].txt\n"
-"        http://www.letters.com/file[a-z:2].txt\n"
-"\n"
-"       If you specify URL without protocol:// prefix,  curl  will  attempt  to\n"
-"       guess  what  protocol  you might want. It will then default to HTTP but\n"
-"       try other protocols based on often-used host name prefixes.  For  exam-\n"
-, stdout);
- fputs(
-"       ple,  for  host names starting with \"ftp.\" curl will assume you want to\n"
-"       speak FTP.\n"
-"\n"
-"       curl will do its best to use what you pass to it as a URL.  It  is  not\n"
-"       trying  to  validate it as a syntactically correct URL by any means but\n"
-"       is instead very liberal with what it accepts.\n"
-"\n"
-"       Curl will attempt to re-use connections for multiple file transfers, so\n"
-"       that  getting many files from the same server will not do multiple con-\n"
-, stdout);
- fputs(
-"       nects / handshakes. This improves speed. Of course this is only done on\n"
-"       files  specified  on  a  single command line and cannot be used between\n"
-"       separate curl invokes.\n"
-"\n"
-"PROGRESS METER\n"
-"       curl normally displays a progress meter during  operations,  indicating\n"
-"       the  amount  of  transferred  data,  transfer speeds and estimated time\n"
-"       left, etc.\n"
-"\n"
-"       curl displays this data to the terminal by default, so  if  you  invoke\n"
-, stdout);
- fputs(
-"       curl  to do an operation and it is about to write data to the terminal,\n"
-"       it disables the progress meter as otherwise it would mess up the output\n"
-"       mixing progress meter and response data.\n"
-"\n"
-"       If you want a progress meter for HTTP POST or PUT requests, you need to\n"
-"       redirect the response output to a file, using shell  redirect  (>),  -o\n"
-"       [file] or similar.\n"
-"\n"
-"       It  is not the same case for FTP upload as that operation does not spit\n"
-, stdout);
- fputs(
-"       out any response data to the terminal.\n"
-"\n"
-"       If you prefer a progress \"bar\" instead of the regular meter, -# is your\n"
-"       friend.\n"
-"OPTIONS\n"
-"       In general, all boolean options are enabled with --option and yet again\n"
-"       disabled with --no-option. That is, you use the exact same option  name\n"
-"       but prefix it with \"no-\". However, in this list we mostly only list and\n"
-"       show the --option version of them. (This concept with --no options  was\n"
-, stdout);
- fputs(
-"       added  in  7.19.0.  Previously  most  options  were  toggled  on/off on\n"
-"       repeated use of the same command line option.)\n"
-"\n"
-"       -a/--append\n"
-"              (FTP/SFTP) When used in an upload, this will tell curl to append\n"
-"              to  the  target  file  instead  of  overwriting  it. If the file\n"
-"              doesn't exist, it will be  created.   Note  that  this  flag  is\n"
-"              ignored by some SSH servers (including OpenSSH).\n"
-"\n"
-"       -A/--user-agent <agent string>\n"
-, stdout);
- fputs(
-"              (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
-"              Some  badly  done  CGIs  fail  if  this  field  isn't   set   to\n"
-"              \"Mozilla/4.0\".  To  encode  blanks  in  the string, surround the\n"
-"              string with single quote marks. This can also be  set  with  the\n"
-"              -H/--header option of course.\n"
-"\n"
-"              If  this  option is set more than once, the last one will be the\n"
-"              one that's used.\n"
-"\n"
-"       --anyauth\n"
-, stdout);
- fputs(
-"              (HTTP) Tells curl to figure out authentication method by itself,\n"
-"              and  use  the most secure one the remote site claims to support.\n"
-"              This is done by first doing a request and checking the response-\n"
-"              headers,  thus  possibly  inducing  an extra network round-trip.\n"
-"              This is  used  instead  of  setting  a  specific  authentication\n"
-"              method,  which  you  can  do with --basic, --digest, --ntlm, and\n"
-, stdout);
- fputs(
-"              --negotiate.\n"
-"\n"
-"              Note that using --anyauth is not recommended if you  do  uploads\n"
-"              from  stdin, since it may require data to be sent twice and then\n"
-"              the client must be able to rewind. If the need should arise when\n"
-"              uploading from stdin, the upload operation will fail.\n"
-"\n"
-"       -b/--cookie <name=data>\n"
-"              (HTTP)  Pass the data to the HTTP server as a cookie. It is sup-\n"
-, stdout);
- fputs(
-"              posedly the data previously received from the server in a  \"Set-\n"
-"              Cookie:\"  line.  The data should be in the format \"NAME1=VALUE1;\n"
-"              NAME2=VALUE2\".\n"
-"\n"
-"              If no '=' symbol is used in the line, it is treated as  a  file-\n"
-"              name  to  use to read previously stored cookie lines from, which\n"
-"              should be used in this session if they match. Using this  method\n"
-, stdout);
- fputs(
-"              also  activates  the \"cookie parser\" which will make curl record\n"
-"              incoming cookies too, which may be handy if you're using this in\n"
-"              combination  with  the  -L/--location option. The file format of\n"
-"              the file to read cookies from should be plain  HTTP  headers  or\n"
-"              the Netscape/Mozilla cookie file format.\n"
-"\n"
-"              NOTE  that  the  file specified with -b/--cookie is only used as\n"
-, stdout);
- fputs(
-"              input. No cookies will be stored in the file. To store  cookies,\n"
-"              use  the  -c/--cookie-jar option or you could even save the HTTP\n"
-"              headers to a file using -D/--dump-header!\n"
-"\n"
-"              If this option is set more than once, the last one will  be  the\n"
-"              one that's used.\n"
-"\n"
-"       -B/--use-ascii\n"
-"              Enable  ASCII transfer when using FTP or LDAP. For FTP, this can\n"
-, stdout);
- fputs(
-"              also be enforced by using an URL that ends with \";type=A\".  This\n"
-"              option  causes  data sent to stdout to be in text mode for win32\n"
-"              systems.\n"
-"\n"
-"       --basic\n"
-"              (HTTP) Tells curl to use HTTP Basic authentication. This is  the\n"
-"              default  and this option is usually pointless, unless you use it\n"
-"              to override a  previously  set  option  that  sets  a  different\n"
-, stdout);
- fputs(
-"              authentication  method  (such  as --ntlm, --digest, or --negoti-\n"
-"              ate).\n"
-"\n"
-"       --ciphers <list of ciphers>\n"
-"              (SSL) Specifies which ciphers to use in the connection. The list\n"
-"              of  ciphers  must  specify  valid ciphers. Read up on SSL cipher\n"
-"              list          details           on           this           URL:\n"
-"              http://www.openssl.org/docs/apps/ciphers.html\n"
-"\n"
-, stdout);
- fputs(
-"              NSS  ciphers  are  done differently than OpenSSL and GnuTLS. The\n"
-"              full list of NSS ciphers is in the NSSCipherSuite entry at  this\n"
-"              URL: http://directory.fedora.redhat.com/docs/mod_nss.html#Direc-\n"
-"              tives\n"
-"\n"
-"              If this option is used several times, the last one will override\n"
-"              the others.\n"
-"\n"
-"       --compressed\n"
-"              (HTTP) Request a compressed response using one of the algorithms\n"
-, stdout);
- fputs(
-"              libcurl supports, and return the uncompressed document.  If this\n"
-"              option  is  used  and  the server sends an unsupported encoding,\n"
-"              curl will report an error.\n"
-"\n"
-"       --connect-timeout <seconds>\n"
-"              Maximum time in seconds that you allow  the  connection  to  the\n"
-"              server  to  take.   This  only limits the connection phase, once\n"
-"              curl has connected this option is of no more use. See  also  the\n"
-, stdout);
- fputs(
-"              -m/--max-time option.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -c/--cookie-jar <file name>\n"
-"              Specify to which file you want curl to write all cookies after a\n"
-"              completed operation. Curl writes  all  cookies  previously  read\n"
-"              from  a  specified  file  as  well  as all cookies received from\n"
-"              remote server(s). If no cookies are known, no file will be writ-\n"
-, stdout);
- fputs(
-"              ten.  The  file  will  be written using the Netscape cookie file\n"
-"              format. If you set the file name to  a  single  dash,  \"-\",  the\n"
-"              cookies will be written to stdout.\n"
-"\n"
-"              NOTE If the cookie jar can't be created or written to, the whole\n"
-"              curl operation won't fail or even report an error clearly. Using\n"
-"              -v  will  get  a warning displayed, but that is the only visible\n"
-, stdout);
- fputs(
-"              feedback you get about this possibly lethal situation.\n"
-"\n"
-"              If this option is used several times, the  last  specified  file\n"
-"              name will be used.\n"
-"\n"
-"       -C/--continue-at <offset>\n"
-"              Continue/Resume  a  previous  file transfer at the given offset.\n"
-"              The given offset is the exact  number  of  bytes  that  will  be\n"
-"              skipped,  counting  from the beginning of the source file before\n"
-, stdout);
- fputs(
-"              it is transferred to the destination.  If used with uploads, the\n"
-"              FTP server command SIZE will not be used by curl.\n"
-"\n"
-"              Use  \"-C  -\" to tell curl to automatically find out where/how to\n"
-"              resume the transfer. It then uses the given  output/input  files\n"
-"              to figure that out.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --create-dirs\n"
-, stdout);
- fputs(
-"              When  used  in  conjunction with the -o option, curl will create\n"
-"              the necessary local directory hierarchy as needed.  This  option\n"
-"              creates  the dirs mentioned with the -o option, nothing else. If\n"
-"              the -o file name uses no dir or if the dirs it mentions  already\n"
-"              exist, no dir will be created.\n"
-"\n"
-"              To  create remote directories when using FTP or SFTP, try --ftp-\n"
-"              create-dirs.\n"
-"\n"
-, stdout);
- fputs(
-"       --crlf (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).\n"
-"\n"
-"       --crlfile <file>\n"
-"              (HTTPS/FTPS) Provide a file using PEM format with a  Certificate\n"
-"              Revocation  List  that may specify peer certificates that are to\n"
-"              be considered revoked.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"              (Added in 7.19.7)\n"
-"\n"
-"       -d/--data <data>\n"
-, stdout);
- fputs(
-"              (HTTP) Sends the specified data in a POST request  to  the  HTTP\n"
-"              server,  in  the  same  way  that a browser does when a user has\n"
-"              filled in an HTML form and presses the submit button. This  will\n"
-"              cause curl to pass the data to the server using the content-type\n"
-"              application/x-www-form-urlencoded.  Compare to -F/--form.\n"
-"\n"
-"              -d/--data is the same  as  --data-ascii.  To  post  data  purely\n"
-, stdout);
- fputs(
-"              binary, you should instead use the --data-binary option. To URL-\n"
-"              encode the value of a form field you may use --data-urlencode.\n"
-"\n"
-"              If any of these options is used more than once on the same  com-\n"
-"              mand  line,  the  data  pieces specified will be merged together\n"
-"              with a separating  &-symbol.  Thus,  using  '-d  name=daniel  -d\n"
-"              skill=lousy'  would  generate  a  post  chunk  that  looks  like\n"
-, stdout);
- fputs(
-"              'name=daniel&skill=lousy'.\n"
-"\n"
-"              If you start the data with the letter @, the rest  should  be  a\n"
-"              file  name  to read the data from, or - if you want curl to read\n"
-"              the data from stdin.  The contents of the file must  already  be\n"
-"              URL-encoded.  Multiple files can also be specified. Posting data\n"
-"              from a file named 'foobar' would thus be done with --data  @foo-\n"
-"              bar.\n"
-"\n"
-"       --data-binary <data>\n"
-, stdout);
- fputs(
-"              (HTTP)  This  posts data exactly as specified with no extra pro-\n"
-"              cessing whatsoever.\n"
-"\n"
-"              If you start the data with the letter @, the rest  should  be  a\n"
-"              filename.   Data  is  posted in a similar manner as --data-ascii\n"
-"              does, except that newlines are  preserved  and  conversions  are\n"
-"              never done.\n"
-"\n"
-"              If  this  option  is  used several times, the ones following the\n"
-, stdout);
- fputs(
-"              first will append data as described in -d/--data.\n"
-"\n"
-"       --data-urlencode <data>\n"
-"              (HTTP) This posts data, similar to the other --data options with\n"
-"              the exception that this performs URL-encoding. (Added in 7.18.0)\n"
-"              To  be  CGI-compliant,  the <data> part should begin with a name\n"
-"              followed by a separator and a content specification. The  <data>\n"
-"              part can be passed to curl using one of the following syntaxes:\n"
-"\n"
-, stdout);
- fputs(
-"              content\n"
-"                     This  will make curl URL-encode the content and pass that\n"
-"                     on. Just be careful so that the content  doesn't  contain\n"
-"                     any  =  or  @  symbols, as that will then make the syntax\n"
-"                     match one of the other cases below!\n"
-"\n"
-"              =content\n"
-"                     This will make curl URL-encode the content and pass  that\n"
-"                     on. The preceding = symbol is not included in the data.\n"
-"\n"
-, stdout);
- fputs(
-"              name=content\n"
-"                     This  will make curl URL-encode the content part and pass\n"
-"                     that on. Note that the name part is expected to  be  URL-\n"
-"                     encoded already.\n"
-"\n"
-"              @filename\n"
-"                     This  will  make  curl  load  data  from  the  given file\n"
-"                     (including any newlines), URL-encode that data  and  pass\n"
-"                     it on in the POST.\n"
-"\n"
-"              name@filename\n"
-, stdout);
- fputs(
-"                     This  will  make  curl  load  data  from  the  given file\n"
-"                     (including any newlines), URL-encode that data  and  pass\n"
-"                     it  on  in  the  POST.  The  name part gets an equal sign\n"
-"                     appended, resulting in name=urlencoded-file-content. Note\n"
-"                     that the name is expected to be URL-encoded already.\n"
-"\n"
-"       --digest\n"
-"              (HTTP) Enables HTTP Digest authentication. This is a authentica-\n"
-, stdout);
- fputs(
-"              tion that prevents the password from being sent over the wire in\n"
-"              clear  text.  Use  this in combination with the normal -u/--user\n"
-"              option to set user name and password. See also --ntlm, --negoti-\n"
-"              ate and --anyauth for related options.\n"
-"\n"
-"              If  this option is used several times, the following occurrences\n"
-"              make no difference.\n"
-"\n"
-"       --disable-eprt\n"
-, stdout);
- fputs(
-"              (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
-"              when doing active FTP transfers. Curl will normally always first\n"
-"              attempt to use EPRT, then LPRT before using PORT, but with  this\n"
-"              option,  it  will  use PORT right away. EPRT and LPRT are exten-\n"
-"              sions to the original FTP protocol, and  may  not  work  on  all\n"
-"              servers, but they enable more functionality in a better way than\n"
-, stdout);
- fputs(
-"              the traditional PORT command.\n"
-"\n"
-"              --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
-"              is an alias for --disable-eprt.\n"
-"\n"
-"              Disabling  EPRT only changes the active behavior. If you want to\n"
-"              switch to passive mode you need  to  not  use  -P/--ftp-port  or\n"
-"              force it with --ftp-pasv.\n"
-"\n"
-"       --disable-epsv\n"
-"              (FTP)  Tell  curl  to  disable  the use of the EPSV command when\n"
-, stdout);
- fputs(
-"              doing passive FTP transfers. Curl  will  normally  always  first\n"
-"              attempt  to  use EPSV before PASV, but with this option, it will\n"
-"              not try using EPSV.\n"
-"\n"
-"              --epsv can be used to explicitly enable EPRT again and --no-epsv\n"
-"              is an alias for --disable-epsv.\n"
-"\n"
-"              Disabling EPSV only changes the passive behavior. If you want to\n"
-"              switch to active mode you need to use -P/--ftp-port.\n"
-"\n"
-"       -D/--dump-header <file>\n"
-, stdout);
- fputs(
-"              Write the protocol headers to the specified file.\n"
-"\n"
-"              This option is handy to use when you want to store  the  headers\n"
-"              that  a  HTTP  site sends to you. Cookies from the headers could\n"
-"              then  be  read  in  a  second  curl  invocation  by  using   the\n"
-"              -b/--cookie option! The -c/--cookie-jar option is however a bet-\n"
-"              ter way to store cookies.\n"
-"\n"
-, stdout);
- fputs(
-"              When used in FTP, the FTP server response lines  are  considered\n"
-"              being \"headers\" and thus are saved there.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -e/--referer <URL>\n"
-"              (HTTP)  Sends the \"Referer Page\" information to the HTTP server.\n"
-"              This can also be set with the -H/--header flag of course.   When\n"
-"              used  with -L/--location you can append \";auto\" to the --referer\n"
-, stdout);
- fputs(
-"              URL to make curl automatically set the previous URL when it fol-\n"
-"              lows  a  Location: header. The \";auto\" string can be used alone,\n"
-"              even if you don't set an initial --referer.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --engine <name>\n"
-"              Select the OpenSSL crypto engine to use for  cipher  operations.\n"
-"              Use  --engine  list  to  print  a  list  of build-time supported\n"
-, stdout);
- fputs(
-"              engines. Note that not all (or  none)  of  the  engines  may  be\n"
-"              available at run-time.\n"
-"\n"
-"       --environment\n"
-"              (RISC  OS ONLY) Sets a range of environment variables, using the\n"
-"              names the -w option supports, to allow easier extraction of use-\n"
-"              ful information after having run curl.\n"
-"\n"
-"       --egd-file <file>\n"
-"              (SSL)  Specify  the  path  name  to the Entropy Gathering Daemon\n"
-, stdout);
- fputs(
-"              socket. The socket is used to seed the  random  engine  for  SSL\n"
-"              connections. See also the --random-file option.\n"
-"\n"
-"       -E/--cert <certificate[:password]>\n"
-"              (SSL) Tells curl to use the specified certificate file when get-\n"
-"              ting a file with HTTPS or FTPS. The certificate must be  in  PEM\n"
-"              format.   If  the  optional password isn't specified, it will be\n"
-"              queried for on the terminal. Note that  this  option  assumes  a\n"
-, stdout);
- fputs(
-"              \"certificate\"  file that is the private key and the private cer-\n"
-"              tificate concatenated! See --cert  and  --key  to  specify  them\n"
-"              independently.\n"
-"\n"
-"              If  curl  is  built against the NSS SSL library then this option\n"
-"              tells curl the nickname of the certificate to use within the NSS\n"
-"              database  defined  by  the  environment  variable SSL_DIR (or by\n"
-, stdout);
- fputs(
-"              default /etc/pki/nssdb). If the NSS  PEM  PKCS#11  module  (lib-\n"
-"              nsspem.so) is available then PEM files may be loaded.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --cert-type <type>\n"
-"              (SSL)  Tells curl what certificate type the provided certificate\n"
-"              is in. PEM, DER and ENG are recognized types.  If not specified,\n"
-"              PEM is assumed.\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --cacert <CA certificate>\n"
-"              (SSL) Tells curl to use the specified certificate file to verify\n"
-"              the peer. The file may contain  multiple  CA  certificates.  The\n"
-"              certificate(s)  must be in PEM format. Normally curl is built to\n"
-"              use a default file for this, so this option is typically used to\n"
-"              alter that default file.\n"
-"\n"
-, stdout);
- fputs(
-"              curl  recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
-"              if it is set, and uses the given path as a path  to  a  CA  cert\n"
-"              bundle. This option overrides that variable.\n"
-"\n"
-"              The  windows  version  of  curl will automatically look for a CA\n"
-"              certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
-"              tory as curl.exe, or in the Current Working Directory, or in any\n"
-"              folder along your PATH.\n"
-"\n"
-, stdout);
- fputs(
-"              If curl is built against the NSS SSL library  then  this  option\n"
-"              tells  curl the nickname of the CA certificate to use within the\n"
-"              NSS database defined by the environment variable SSL_DIR (or  by\n"
-"              default  /etc/pki/nssdb).   If  the NSS PEM PKCS#11 module (lib-\n"
-"              nsspem.so) is available then PEM files may be loaded.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-, stdout);
- fputs(
-"       --capath <CA certificate directory>\n"
-"              (SSL) Tells curl to use the specified certificate  directory  to\n"
-"              verify the peer. The certificates must be in PEM format, and the\n"
-"              directory must have been processed using  the  c_rehash  utility\n"
-"              supplied  with  openssl.  Using  --capath can allow curl to make\n"
-"              SSL-connections much more efficiently than using --cacert if the\n"
-"              --cacert file contains many CA certificates.\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -f/--fail\n"
-"              (HTTP)  Fail  silently (no output at all) on server errors. This\n"
-"              is mostly done to better enable scripts etc to better deal  with\n"
-"              failed  attempts.  In  normal  cases when a HTTP server fails to\n"
-"              deliver a document, it  returns  an  HTML  document  stating  so\n"
-"              (which  often  also describes why and more). This flag will pre-\n"
-, stdout);
- fputs(
-"              vent curl from outputting that and return error 22.\n"
-"\n"
-"              This method is not fail-safe and there are occasions where  non-\n"
-"              successful  response  codes  will  slip through, especially when\n"
-"              authentication is involved (response codes 401 and 407).\n"
-"\n"
-"       --ftp-account [data]\n"
-"              (FTP) When an FTP server asks for \"account data\" after user name\n"
-"              and  password has been provided, this data is sent off using the\n"
-, stdout);
- fputs(
-"              ACCT command. (Added in 7.13.0)\n"
-"\n"
-"              If this option is used twice, the second will override the  pre-\n"
-"              vious use.\n"
-"\n"
-"       --ftp-create-dirs\n"
-"              (FTP/SFTP)  When  an  FTP or SFTP URL/operation uses a path that\n"
-"              doesn't currently exist on the server, the standard behavior  of\n"
-"              curl is to fail. Using this option, curl will instead attempt to\n"
-"              create missing directories.\n"
-"\n"
-"       --ftp-method [method]\n"
-, stdout);
- fputs(
-"              (FTP) Control what method curl should use to reach a file  on  a\n"
-"              FTP(S)  server. The method argument should be one of the follow-\n"
-"              ing alternatives:\n"
-"\n"
-"              multicwd\n"
-"                     curl does a single CWD operation for each  path  part  in\n"
-"                     the  given URL. For deep hierarchies this means very many\n"
-"                     commands. This is how RFC1738 says  it  should  be  done.\n"
-, stdout);
- fputs(
-"                     This is the default but the slowest behavior.\n"
-"\n"
-"              nocwd  curl  does  no  CWD at all. curl will do SIZE, RETR, STOR\n"
-"                     etc and give a full path to the server for all these com-\n"
-"                     mands. This is the fastest behavior.\n"
-"\n"
-"              singlecwd\n"
-"                     curl does one CWD with the full target directory and then\n"
-"                     operates on the file \"normally\"  (like  in  the  multicwd\n"
-, stdout);
- fputs(
-"                     case).  This  is  somewhat  more standards compliant than\n"
-"                     'nocwd' but without the full penalty of 'multicwd'.\n"
-"       (Added in 7.15.1)\n"
-"\n"
-"       --ftp-pasv\n"
-"              (FTP) Use passive mode for the data conection.  Passive  is  the\n"
-"              internal  default behavior, but using this option can be used to\n"
-"              override a previous -P/-ftp-port option. (Added in 7.11.0)\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is used several times, the following  occurrences\n"
-"              make  no  difference.  Undoing  an enforced passive really isn't\n"
-"              doable but you must then instead enforce the  correct  -P/--ftp-\n"
-"              port again.\n"
-"\n"
-"              Passive mode means that curl will try the EPSV command first and\n"
-"              then PASV, unless --disable-epsv is used.\n"
-"\n"
-"       --ftp-alternative-to-user <command>\n"
-, stdout);
- fputs(
-"              (FTP) If authenticating with the USER and PASS  commands  fails,\n"
-"              send  this  command.   When  connecting  to  Tumbleweed's Secure\n"
-"              Transport server over FTPS using  a  client  certificate,  using\n"
-"              \"SITE  AUTH\"  will tell the server to retrieve the username from\n"
-"              the certificate. (Added in 7.15.5)\n"
-"\n"
-"       --ftp-skip-pasv-ip\n"
-"              (FTP) Tell curl to not use the IP address the server suggests in\n"
-, stdout);
- fputs(
-"              its  response to curl's PASV command when curl connects the data\n"
-"              connection. Instead curl will re-use  the  same  IP  address  it\n"
-"              already uses for the control connection. (Added in 7.14.2)\n"
-"\n"
-"              This  option has no effect if PORT, EPRT or EPSV is used instead\n"
-"              of PASV.\n"
-"\n"
-"       --ftp-pret\n"
-"              (FTP) Tell curl to send a PRET command before PASV  (and  EPSV).\n"
-, stdout);
- fputs(
-"              Certain  FTP  servers,  mainly drftpd, require this non-standard\n"
-"              command for directory listings as well as up  and  downloads  in\n"
-"              PASV mode.  (Added in 7.20.x)\n"
-"\n"
-"       --ssl  (FTP,  POP3,  IMAP, SMTP) Try to use SSL/TLS for the connection.\n"
-"              Reverts to a non-secure connection if the server doesn't support\n"
-"              SSL/TLS.   See also --ftp-ssl-control and --ssl-reqd for differ-\n"
-, stdout);
- fputs(
-"              ent levels of encryption required. (Added in 7.20.0)\n"
-"\n"
-"              This option was formerly known as --ftp-ssl  (Added  in  7.11.0)\n"
-"              and  that can still be used but will be removed in a future ver-\n"
-"              sion.\n"
-"\n"
-"       --ftp-ssl-control\n"
-"              (FTP) Require SSL/TLS for the FTP  login,  clear  for  transfer.\n"
-"              Allows  secure  authentication, but non-encrypted data transfers\n"
-, stdout);
- fputs(
-"              for efficiency.  Fails the transfer if the server  doesn't  sup-\n"
-"              port SSL/TLS.  (Added in 7.16.0)\n"
-"\n"
-"       --ssl-reqd\n"
-"              (FTP,  POP3,  IMAP,  SMTP)  Require  SSL/TLS for the connection.\n"
-"              Terminates the connection if the server doesn't support SSL/TLS.\n"
-"              (Added in 7.20.0)\n"
-"\n"
-"              This  option  was  formerly  known  as  --ftp-ssl-reqd (added in\n"
-"              7.15.5) and that can still be used but  will  be  removed  in  a\n"
-, stdout);
- fputs(
-"              future version.\n"
-"\n"
-"       --ftp-ssl-ccc\n"
-"              (FTP)  Use  CCC  (Clear  Command Channel) Shuts down the SSL/TLS\n"
-"              layer after authenticating. The rest of the control channel com-\n"
-"              munication  will be unencrypted. This allows NAT routers to fol-\n"
-"              low the FTP transaction. The default mode is passive. See --ftp-\n"
-"              ssl-ccc-mode for other modes.  (Added in 7.16.1)\n"
-"\n"
-"       --ftp-ssl-ccc-mode [active/passive]\n"
-, stdout);
- fputs(
-"              (FTP)  Use  CCC  (Clear  Command Channel) Sets the CCC mode. The\n"
-"              passive mode will not initiate the shutdown,  but  instead  wait\n"
-"              for the server to do it, and will not reply to the shutdown from\n"
-"              the server. The active mode initiates the shutdown and waits for\n"
-"              a reply from the server.  (Added in 7.16.2)\n"
-"\n"
-"       -F/--form <name=content>\n"
-"              (HTTP)  This  lets curl emulate a filled-in form in which a user\n"
-, stdout);
- fputs(
-"              has pressed the submit button. This causes  curl  to  POST  data\n"
-"              using the Content-Type multipart/form-data according to RFC2388.\n"
-"              This enables uploading of binary files etc. To force  the  'con-\n"
-"              tent' part to be a file, prefix the file name with an @ sign. To\n"
-"              just get the content part from a file, prefix the file name with\n"
-"              the  symbol  <.  The  difference  between @ and < is then that @\n"
-, stdout);
- fputs(
-"              makes a file get attached in the post as a  file  upload,  while\n"
-"              the < makes a text field and just get the contents for that text\n"
-"              field from a file.\n"
-"\n"
-"              Example, to send your password file to the server, where  'pass-\n"
-"              word' is the name of the form-field to which /etc/passwd will be\n"
-"              the input:\n"
-"\n"
-"              curl -F password=@/etc/passwd www.mypasswords.com\n"
-"\n"
-, stdout);
- fputs(
-"              To read the file's content from stdin instead of a file,  use  -\n"
-"              where  the  file name should've been. This goes for both @ and <\n"
-"              constructs.\n"
-"\n"
-"              You can also  tell  curl  what  Content-Type  to  use  by  using\n"
-"              'type=', in a manner similar to:\n"
-"\n"
-"              curl -F \"web=@index.html;type=text/html\" url.com\n"
-"\n"
-"              or\n"
-"\n"
-"              curl -F \"name=daniel;type=text/foo\" url.com\n"
-"\n"
-, stdout);
- fputs(
-"              You  can  also explicitly change the name field of a file upload\n"
-"              part by setting filename=, like this:\n"
-"\n"
-"              curl -F \"file=@localfile;filename=nameinpost\" url.com\n"
-"\n"
-"              See further examples and details in the MANUAL.\n"
-"\n"
-"              This option can be used multiple times.\n"
-"\n"
-"       --form-string <name=string>\n"
-"              (HTTP) Similar to --form except that the value  string  for  the\n"
-, stdout);
- fputs(
-"              named  parameter  is used literally. Leading '@' and '<' charac-\n"
-"              ters, and the ';type=' string in the value have no special mean-\n"
-"              ing. Use this in preference to --form if there's any possibility\n"
-"              that the string value may accidentally trigger the  '@'  or  '<'\n"
-"              features of --form.\n"
-"\n"
-"       -g/--globoff\n"
-"              This option switches off the \"URL globbing parser\". When you set\n"
-, stdout);
- fputs(
-"              this option, you can specify URLs that contain the letters  {}[]\n"
-"              without  having them being interpreted by curl itself. Note that\n"
-"              these letters are not normal legal URL contents but they  should\n"
-"              be encoded according to the URI standard.\n"
-"\n"
-"       -G/--get\n"
-"              When  used,  this  option  will  make  all  data  specified with\n"
-"              -d/--data or --data-binary to be used  in  a  HTTP  GET  request\n"
-, stdout);
- fputs(
-"              instead  of  the  POST request that otherwise would be used. The\n"
-"              data will be appended to the URL with a '?' separator.\n"
-"\n"
-"              If used in combination with -I, the POST data  will  instead  be\n"
-"              appended to the URL with a HEAD request.\n"
-"\n"
-"              If  this option is used several times, the following occurrences\n"
-"              make no difference. This is because undoing a GET  doesn't  make\n"
-, stdout);
- fputs(
-"              sense,  but  you  should  then  instead  enforce the alternative\n"
-"              method you prefer.\n"
-"\n"
-"       -h/--help\n"
-"              Usage help.\n"
-"\n"
-"       -H/--header <header>\n"
-"              (HTTP) Extra header to use when getting  a  web  page.  You  may\n"
-"              specify any number of extra headers. Note that if you should add\n"
-"              a custom header that has the same name as one  of  the  internal\n"
-, stdout);
- fputs(
-"              ones  curl  would  use,  your externally set header will be used\n"
-"              instead of the internal one. This allows you to make even trick-\n"
-"              ier  stuff  than  curl would normally do. You should not replace\n"
-"              internally set  headers  without  knowing  perfectly  well  what\n"
-"              you're  doing. Remove an internal header by giving a replacement\n"
-"              without content on the right  side  of  the  colon,  as  in:  -H\n"
-"              \"Host:\".\n"
-"\n"
-, stdout);
- fputs(
-"              curl  will  make  sure  that each header you add/replace is sent\n"
-"              with the proper end-of-line marker, you should thus not add that\n"
-"              as a part of the header content: do not add newlines or carriage\n"
-"              returns, they will only mess things up for you.\n"
-"\n"
-"              See also the -A/--user-agent and -e/--referer options.\n"
-"\n"
-"              This option can be used  multiple  times  to  add/replace/remove\n"
-"              multiple headers.\n"
-"\n"
-, stdout);
- fputs(
-"       --hostpubmd5 <md5>\n"
-"              Pass  a  string  containing  32  hexadecimal  digits. The string\n"
-"              should be the 128 bit MD5 checksum of the remote  host's  public\n"
-"              key,  curl  will  refuse the connection with the host unless the\n"
-"              md5sums match. This option is only for SCP and  SFTP  transfers.\n"
-"              (Added in 7.17.1)\n"
-"\n"
-"       --ignore-content-length\n"
-"              (HTTP)  Ignore  the  Content-Length header. This is particularly\n"
-, stdout);
- fputs(
-"              useful for servers running Apache 1.x, which will report  incor-\n"
-"              rect Content-Length for files larger than 2 gigabytes.\n"
-"\n"
-"       -i/--include\n"
-"              (HTTP)  Include  the  HTTP-header in the output. The HTTP-header\n"
-"              includes things like server-name, date of  the  document,  HTTP-\n"
-"              version and more...\n"
-"\n"
-"       --interface <name>\n"
-"              Perform  an operation using a specified interface. You can enter\n"
-, stdout);
- fputs(
-"              interface name, IP address or host name. An example  could  look\n"
-"              like:\n"
-"\n"
-"               curl --interface eth0:1 http://www.netscape.com/\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -I/--head\n"
-"              (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature\n"
-"              the command HEAD which this uses to get nothing but  the  header\n"
-"              of  a  document.  When used on a FTP or FILE file, curl displays\n"
-, stdout);
- fputs(
-"              the file size and last modification time only.\n"
-"\n"
-"       -j/--junk-session-cookies\n"
-"              (HTTP) When curl is told to read cookies from a given file, this\n"
-"              option  will  make  it  discard all \"session cookies\". This will\n"
-"              basically have the same effect as if a new session  is  started.\n"
-"              Typical  browsers  always  discard  session cookies when they're\n"
-"              closed down.\n"
-"\n"
-"       -J/--remote-header-name\n"
-, stdout);
- fputs(
-"              (HTTP) This option tells the -O/--remote-name option to use  the\n"
-"              server-specified   Content-Disposition   filename   instead   of\n"
-"              extracting a filename from the URL.\n"
-"\n"
-"       -k/--insecure\n"
-"              (SSL) This option explicitly allows curl to  perform  \"insecure\"\n"
-"              SSL connections and transfers. All SSL connections are attempted\n"
-"              to be made secure by using the CA certificate  bundle  installed\n"
-, stdout);
- fputs(
-"              by  default.  This  makes  all connections considered \"insecure\"\n"
-"              fail unless -k/--insecure is used.\n"
-"\n"
-"              See    this    online    resource    for    further     details:\n"
-"              http://curl.haxx.se/docs/sslcerts.html\n"
-"\n"
-"       --keepalive-time <seconds>\n"
-"              This  option  sets  the  time  a connection needs to remain idle\n"
-"              before sending keepalive probes and the time between  individual\n"
-, stdout);
- fputs(
-"              keepalive probes. It is currently effective on operating systems\n"
-"              offering  the  TCP_KEEPIDLE  and  TCP_KEEPINTVL  socket  options\n"
-"              (meaning  Linux, recent AIX, HP-UX and more). This option has no\n"
-"              effect if --no-keepalive is used. (Added in 7.18.0)\n"
-"\n"
-"              If this option is used multiple times, the last occurrence  sets\n"
-"              the amount.\n"
-"       --key <key>\n"
-, stdout);
- fputs(
-"              (SSL/SSH) Private key file name. Allows you to provide your pri-\n"
-"              vate key in this separate file.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --key-type <type>\n"
-"              (SSL) Private key file type. Specify which type your --key  pro-\n"
-"              vided  private  key  is. DER, PEM, and ENG are supported. If not\n"
-"              specified, PEM is assumed.\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --krb <level>\n"
-"              (FTP) Enable Kerberos authentication and use. The level must  be\n"
-"              entered and should be one of 'clear', 'safe', 'confidential', or\n"
-"              'private'. Should you use a level that  is  not  one  of  these,\n"
-"              'private' will instead be used.\n"
-"\n"
-"              This  option  requires  a library built with kerberos4 or GSSAPI\n"
-, stdout);
- fputs(
-"              (GSS-Negotiate) support. This is not very common. Use  -V/--ver-\n"
-"              sion to see if your curl supports it.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -K/--config <config file>\n"
-"              Specify  which config file to read curl arguments from. The con-\n"
-"              fig file is a text file in which command line arguments  can  be\n"
-"              written  which  then will be used as if they were written on the\n"
-, stdout);
- fputs(
-"              actual command line. Options and their parameters must be speci-\n"
-"              fied  on  the  same  config  file line, separated by whitespace,\n"
-"              colon, the equals sign or any combination thereof (however,  the\n"
-"              preferred  separator is the equals sign). If the parameter is to\n"
-"              contain  whitespace,  the  parameter  must  be  enclosed  within\n"
-"              quotes. Within double quotes, the following escape sequences are\n"
-, stdout);
- fputs(
-"              available: \\\\, \\\", \\t, \\n, \\r and \\v. A backslash preceding  any\n"
-"              other letter is ignored. If the first column of a config line is\n"
-"              a '#' character, the rest of the line will be treated as a  com-\n"
-"              ment.  Only  write  one  option  per physical line in the config\n"
-"              file.\n"
-"\n"
-"              Specify the filename to -K/--config as '-' to make curl read the\n"
-"              file from stdin.\n"
-"\n"
-, stdout);
- fputs(
-"              Note  that  to  be able to specify a URL in the config file, you\n"
-"              need to specify it using the --url option,  and  not  by  simply\n"
-"              writing  the  URL  on its own line. So, it could look similar to\n"
-"              this:\n"
-"\n"
-"              url = \"http://curl.haxx.se/docs/\"\n"
-"\n"
-"              Long option names can optionally be given  in  the  config  file\n"
-"              without the initial double dashes.\n"
-"\n"
-, stdout);
- fputs(
-"              When curl is invoked, it always (unless -q is used) checks for a\n"
-"              default config file and uses it if  found.  The  default  config\n"
-"              file is checked for in the following places in this order:\n"
-"\n"
-"              1)  curl  tries  to find the \"home dir\": It first checks for the\n"
-"              CURL_HOME and then the HOME environment variables. Failing that,\n"
-"              it  uses getpwuid() on UNIX-like systems (which returns the home\n"
-, stdout);
- fputs(
-"              dir given the current user in your system). On Windows, it  then\n"
-"              checks for the APPDATA variable, or as a last resort the '%USER-\n"
-"              PROFILE%\\Application Data'.\n"
-"\n"
-"              2) On windows, if there is no _curlrc file in the home  dir,  it\n"
-"              checks for one in the same dir the curl executable is placed. On\n"
-"              UNIX-like systems, it will simply try to load .curlrc  from  the\n"
-"              determined home dir.\n"
-"\n"
-, stdout);
- fputs(
-"              # --- Example file ---\n"
-"              # this is a comment\n"
-"              url = \"curl.haxx.se\"\n"
-"              output = \"curlhere.html\"\n"
-"              user-agent = \"superagent/1.0\"\n"
-"\n"
-"              # and fetch another URL too\n"
-"              url = \"curl.haxx.se/docs/manpage.html\"\n"
-"              -O\n"
-"              referer = \"http://nowhereatall.com/\"\n"
-"              # --- End of example file ---\n"
-"\n"
-"              This  option  can be used multiple times to load multiple config\n"
-"              files.\n"
-"\n"
-, stdout);
- fputs(
-"       --libcurl <file>\n"
-"              Append this option to any ordinary curl command  line,  and  you\n"
-"              will  get  a  libcurl-using source code written to the file that\n"
-"              does the equivalent of what your command-line operation does!\n"
-"\n"
-"              NOTE: this does not properly support -F and the sending of  mul-\n"
-"              tipart  formposts,  so in those cases the output program will be\n"
-"              missing necessary calls to curl_formadd(3), and possibly more.\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is used several times, the last given  file  name\n"
-"              will be used. (Added in 7.16.1)\n"
-"\n"
-"       --limit-rate <speed>\n"
-"              Specify  the  maximum  transfer  rate you want curl to use. This\n"
-"              feature is useful if you have a limited pipe and you'd like your\n"
-"              transfer not to use your entire bandwidth.\n"
-"\n"
-"              The  given speed is measured in bytes/second, unless a suffix is\n"
-, stdout);
- fputs(
-"              appended.  Appending 'k' or 'K' will count the number  as  kilo-\n"
-"              bytes,  'm'  or M' makes it megabytes, while 'g' or 'G' makes it\n"
-"              gigabytes. Examples: 200K, 3m and 1G.\n"
-"\n"
-"              The given rate is the average speed counted  during  the  entire\n"
-"              transfer. It means that curl might use higher transfer speeds in\n"
-"              short bursts, but over time it uses no more than the given rate.\n"
-, stdout);
- fputs(
-"              If you also use the -Y/--speed-limit option,  that  option  will\n"
-"              take precedence and might cripple the rate-limiting slightly, to\n"
-"              help keeping the speed-limit logic working.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -l/--list-only\n"
-"              (FTP) When listing an FTP directory, this switch forces a  name-\n"
-"              only  view.   Especially useful if you want to machine-parse the\n"
-, stdout);
- fputs(
-"              contents of an FTP directory since  the  normal  directory  view\n"
-"              doesn't use a standard look or format.\n"
-"\n"
-"              This  option  causes  an  FTP NLST command to be sent.  Some FTP\n"
-"              servers list only files in their response to NLST; they  do  not\n"
-"              include subdirectories and symbolic links.\n"
-"\n"
-"       --local-port <num>[-num]\n"
-"              Set a preferred number or range of local port numbers to use for\n"
-, stdout);
- fputs(
-"              the connection(s).  Note that  port  numbers  by  nature  are  a\n"
-"              scarce resource that will be busy at times so setting this range\n"
-"              to something too narrow might cause unnecessary connection setup\n"
-"              failures. (Added in 7.15.2)\n"
-"\n"
-"       -L/--location\n"
-"              (HTTP/HTTPS)  If  the server reports that the requested page has\n"
-"              moved to a different location (indicated with a Location: header\n"
-, stdout);
- fputs(
-"              and  a  3XX  response code), this option will make curl redo the\n"
-"              request on the new place. If used together with -i/--include  or\n"
-"              -I/--head,  headers from all requested pages will be shown. When\n"
-"              authentication is used, curl only sends its credentials  to  the\n"
-"              initial  host.  If a redirect takes curl to a different host, it\n"
-"              won't be able to intercept the user+password. See  also  --loca-\n"
-, stdout);
- fputs(
-"              tion-trusted  on how to change this. You can limit the amount of\n"
-"              redirects to follow by using the --max-redirs option.\n"
-"\n"
-"              When curl follows a redirect and the request is not a plain  GET\n"
-"              (for example POST or PUT), it will do the following request with\n"
-"              a GET if the HTTP response was 301, 302, or 303. If the response\n"
-"              code  was  any  other  3xx code, curl will re-send the following\n"
-, stdout);
- fputs(
-"              request using the same unmodified method.\n"
-"\n"
-"       --location-trusted\n"
-"              (HTTP/HTTPS) Like -L/--location, but will allow sending the name\n"
-"              +  password to all hosts that the site may redirect to. This may\n"
-"              or may not introduce a security breach if the site redirects you\n"
-"              to  a  site to which you'll send your authentication info (which\n"
-"              is plaintext in the case of HTTP Basic authentication).\n"
-"\n"
-"       --mail-rcpt <address>\n"
-, stdout);
- fputs(
-"              (SMTP) Specify a single address that the given mail  should  get\n"
-"              sent  to. This option can be used multiple times to specify many\n"
-"              recipients.\n"
-"\n"
-"              (Added in 7.20.0)\n"
-"\n"
-"       --mail-from <address>\n"
-"              (SMTP) Specify a single address that the given mail  should  get\n"
-"              sent from.\n"
-"\n"
-"              (Added in 7.20.0)\n"
-"\n"
-"       --max-filesize <bytes>\n"
-"              Specify  the  maximum  size (in bytes) of a file to download. If\n"
-, stdout);
- fputs(
-"              the file requested is larger than this value, the transfer  will\n"
-"              not start and curl will return with exit code 63.\n"
-"\n"
-"              NOTE:  The  file size is not always known prior to download, and\n"
-"              for such files this option has no effect even if the file trans-\n"
-"              fer  ends  up  being larger than this given limit. This concerns\n"
-"              both FTP and HTTP transfers.\n"
-"\n"
-"       -m/--max-time <seconds>\n"
-, stdout);
- fputs(
-"              Maximum time in seconds that you allow the  whole  operation  to\n"
-"              take.   This is useful for preventing your batch jobs from hang-\n"
-"              ing for hours due to slow networks or  links  going  down.   See\n"
-"              also the --connect-timeout option.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -M/--manual\n"
-"              Manual. Display the huge help text.\n"
-"\n"
-"       -n/--netrc\n"
-, stdout);
- fputs(
-"              Makes  curl  scan  the  .netrc  (_netrc  on Windows) file in the\n"
-"              user's home directory for login name and password. This is typi-\n"
-"              cally  used for FTP on UNIX. If used with HTTP, curl will enable\n"
-"              user authentication. See netrc(4) or ftp(1) for details  on  the\n"
-"              file  format.  Curl  will not complain if that file doesn't have\n"
-"              the right permissions (it should not be either world- or  group-\n"
-, stdout);
- fputs(
-"              readable).  The  environment variable \"HOME\" is used to find the\n"
-"              home directory.\n"
-"\n"
-"              A quick and very simple example of how  to  setup  a  .netrc  to\n"
-"              allow  curl to FTP to the machine host.domain.com with user name\n"
-"              'myself' and password 'secret' should look similar to:\n"
-"\n"
-"              machine host.domain.com login myself password secret\n"
-"\n"
-"       --netrc-optional\n"
-, stdout);
- fputs(
-"              Very similar to --netrc, but this option makes the .netrc  usage\n"
-"              optional and not mandatory as the --netrc option does.\n"
-"\n"
-"       --negotiate\n"
-"              (HTTP)  Enables  GSS-Negotiate authentication. The GSS-Negotiate\n"
-"              method was designed by Microsoft and is used in their web appli-\n"
-"              cations.  It  is  primarily  meant  as  a  support for Kerberos5\n"
-"              authentication but may be also used along with another authenti-\n"
-, stdout);
- fputs(
-"              cation method. For more information see IETF draft draft-brezak-\n"
-"              spnego-http-04.txt.\n"
-"\n"
-"              If you want to enable Negotiate for your  proxy  authentication,\n"
-"              then use --proxy-negotiate.\n"
-"\n"
-"              This  option  requires a library built with GSSAPI support. This\n"
-"              is not very common. Use -V/--version to see if your version sup-\n"
-"              ports GSS-Negotiate.\n"
-"\n"
-, stdout);
- fputs(
-"              When  using  this option, you must also provide a fake -u/--user\n"
-"              option to activate the authentication code properly.  Sending  a\n"
-"              '-u  :'  is  enough  as  the  user name and password from the -u\n"
-"              option aren't actually used.\n"
-"\n"
-"              If this option is used several times, the following  occurrences\n"
-"              make no difference.\n"
-"\n"
-"       -N/--no-buffer\n"
-"              Disables the buffering of the output stream. In normal work sit-\n"
-, stdout);
- fputs(
-"              uations, curl will use a standard buffered  output  stream  that\n"
-"              will have the effect that it will output the data in chunks, not\n"
-"              necessarily exactly when the data arrives.   Using  this  option\n"
-"              will disable that buffering.\n"
-"\n"
-"              Note  that  this  is the negated option name documented. You can\n"
-"              thus use --buffer to enforce the buffering.\n"
-"\n"
-"       --no-keepalive\n"
-, stdout);
- fputs(
-"              Disables the use of keepalive messages on the TCP connection, as\n"
-"              by default curl enables them.\n"
-"\n"
-"              Note  that  this  is the negated option name documented. You can\n"
-"              thus use --keepalive to enforce keepalive.\n"
-"\n"
-"       --no-sessionid\n"
-"              (SSL) Disable curl's use of SSL session-ID caching.  By  default\n"
-"              all  transfers are done using the cache. Note that while nothing\n"
-, stdout);
- fputs(
-"              should ever get hurt by attempting  to  reuse  SSL  session-IDs,\n"
-"              there seem to be broken SSL implementations in the wild that may\n"
-"              require you to disable this in order for you to succeed.  (Added\n"
-"              in 7.16.0)\n"
-"\n"
-"              Note  that  this  is the negated option name documented. You can\n"
-"              thus use --sessionid to enforce session-ID caching.\n"
-"\n"
-"       --noproxy <no-proxy-list>\n"
-, stdout);
- fputs(
-"              Comma-separated list of hosts which do not use a proxy,  if  one\n"
-"              is  specified.  The only wildcard is a single * character, which\n"
-"              matches all hosts, and effectively disables the proxy. Each name\n"
-"              in  this  list  is matched as either a domain which contains the\n"
-"              hostname, or the hostname itself. For example,  local.com  would\n"
-"              match   local.com,  local.com:80,  and  www.local.com,  but  not\n"
-, stdout);
- fputs(
-"              www.notlocal.com.  (Added in 7.19.4).\n"
-"\n"
-"       --ntlm (HTTP) Enables  NTLM  authentication.  The  NTLM  authentication\n"
-"              method was designed by Microsoft and is used by IIS web servers.\n"
-"              It is a proprietary protocol, reverse-engineered by clever  peo-\n"
-"              ple and implemented in curl based on their efforts. This kind of\n"
-"              behavior should not be endorsed, you should  encourage  everyone\n"
-, stdout);
- fputs(
-"              who  uses  NTLM to switch to a public and documented authentica-\n"
-"              tion method instead, such as Digest.\n"
-"\n"
-"              If you want to enable NTLM for your proxy  authentication,  then\n"
-"              use --proxy-ntlm.\n"
-"\n"
-"              This  option  requires  a  library  built  with SSL support. Use\n"
-"              -V/--version to see if your curl supports NTLM.\n"
-"\n"
-"              If this option is used several times, the following  occurrences\n"
-"              make no difference.\n"
-"\n"
-, stdout);
- fputs(
-"       -o/--output <file>\n"
-"              Write output to <file> instead of stdout. If you are using {} or\n"
-"              [] to fetch multiple documents, you can use '#'  followed  by  a\n"
-"              number  in  the <file> specifier. That variable will be replaced\n"
-"              with the current string for the URL being fetched. Like in:\n"
-"\n"
-"                curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
-"\n"
-"              or use several variables like:\n"
-"\n"
-, stdout);
- fputs(
-"                curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
-"\n"
-"              You may use this option as many times as the number of URLs  you\n"
-"              have.\n"
-"\n"
-"              See  also  the --create-dirs option to create the local directo-\n"
-"              ries dynamically. Specifying the output as '-' (a  single  dash)\n"
-"              will force the output to be done to stdout.\n"
-"\n"
-"       -O/--remote-name\n"
-"              Write  output to a local file named like the remote file we get.\n"
-, stdout);
- fputs(
-"              (Only the file part of the remote file is used, the path is  cut\n"
-"              off.)\n"
-"\n"
-"              The  remote  file  name  to use for saving is extracted from the\n"
-"              given URL, nothing else.\n"
-"\n"
-"              You may use this option as many times as the number of URLs  you\n"
-"              have.\n"
-"\n"
-"       --remote-name-all\n"
-"              This  option changes the default action for all given URLs to be\n"
-, stdout);
- fputs(
-"              dealt with as if -O/--remote-name were used for each one. So  if\n"
-"              you want to disable that for a specific URL after --remote-name-\n"
-"              all has been used, you must  use  \"-o  -\"  or  --no-remote-name.\n"
-"              (Added in 7.19.0)\n"
-"\n"
-"       --pass <phrase>\n"
-"              (SSL/SSH) Passphrase for the private key\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --post301\n"
-, stdout);
- fputs(
-"              Tells  curl  to  respect  RFC  2616/10.3.2  and not convert POST\n"
-"              requests into GET requests when following a 301 redirection. The\n"
-"              non-RFC  behaviour  is  ubiquitous in web browsers, so curl does\n"
-"              the conversion by default to maintain  consistency.  However,  a\n"
-"              server  may  require  a POST to remain a POST after such a redi-\n"
-"              rection. This option is meaningful only when using -L/--location\n"
-, stdout);
- fputs(
-"              (Added in 7.17.1)\n"
-"\n"
-"       --post302\n"
-"              Tells  curl  to  respect  RFC  2616/10.3.2  and not convert POST\n"
-"              requests into GET requests when following a 302 redirection. The\n"
-"              non-RFC  behaviour  is  ubiquitous in web browsers, so curl does\n"
-"              the conversion by default to maintain  consistency.  However,  a\n"
-"              server  may  require  a POST to remain a POST after such a redi-\n"
-, stdout);
- fputs(
-"              rection. This option is meaningful only when using -L/--location\n"
-"              (Added in 7.19.1)\n"
-"\n"
-"       --proto <protocols>\n"
-"              Tells   curl  to  use  the  listed  protocols  for  its  initial\n"
-"              retrieval. Protocols are evaluated left to right, are comma sep-\n"
-"              arated,  and  are each a protocol name or 'all', optionally pre-\n"
-"              fixed by zero or more modifiers. Available modifiers are:\n"
-"\n"
-, stdout);
- fputs(
-"              +  Permit this protocol in addition to protocols already permit-\n"
-"                 ted (this is the default if no modifier is used).\n"
-"\n"
-"              -  Deny  this  protocol,  removing it from the list of protocols\n"
-"                 already permitted.\n"
-"\n"
-"              =  Permit only this protocol (ignoring the list already  permit-\n"
-"                 ted),  though  subject  to  later  modification by subsequent\n"
-"                 entries in the comma separated list.\n"
-"\n"
-, stdout);
- fputs(
-"              For example:\n"
-"\n"
-"              --proto -ftps  uses the default protocols, but disables ftps\n"
-"\n"
-"              --proto -all,https,+http\n"
-"                             only enables http and https\n"
-"\n"
-"              --proto =http,https\n"
-"                             also only enables http and https\n"
-"\n"
-"              Unknown protocols produce a  warning.  This  allows  scripts  to\n"
-"              safely  rely on being able to disable potentially dangerous pro-\n"
-, stdout);
- fputs(
-"              tocols, without relying upon support  for  that  protocol  being\n"
-"              built into curl to avoid an error.\n"
-"\n"
-"              This option can be used multiple times, in which case the effect\n"
-"              is the same as concatenating the protocols into one instance  of\n"
-"              the option.\n"
-"\n"
-"              (Added in 7.20.2)\n"
-"\n"
-"       --proto-redir <protocols>\n"
-"              Tells  curl  to  use  the listed protocols after a redirect. See\n"
-, stdout);
- fputs(
-"              --proto for how protocols are represented.\n"
-"\n"
-"              (Added in 7.20.2)\n"
-"\n"
-"       --proxy-anyauth\n"
-"              Tells curl to pick a suitable authentication method when  commu-\n"
-"              nicating  with  the  given  proxy.  This  might  cause  an extra\n"
-"              request/response round-trip. (Added in 7.13.2)\n"
-"\n"
-"       --proxy-basic\n"
-"              Tells curl to use HTTP Basic authentication  when  communicating\n"
-, stdout);
- fputs(
-"              with the given proxy. Use --basic for enabling HTTP Basic with a\n"
-"              remote host. Basic is the  default  authentication  method  curl\n"
-"              uses with proxies.\n"
-"\n"
-"       --proxy-digest\n"
-"              Tells  curl to use HTTP Digest authentication when communicating\n"
-"              with the given proxy. Use --digest for enabling HTTP Digest with\n"
-"              a remote host.\n"
-"\n"
-"       --proxy-negotiate\n"
-, stdout);
- fputs(
-"              Tells curl to use HTTP Negotiate authentication when communicat-\n"
-"              ing with the given proxy.  Use  --negotiate  for  enabling  HTTP\n"
-"              Negotiate with a remote host. (Added in 7.17.1)\n"
-"\n"
-"       --proxy-ntlm\n"
-"              Tells  curl  to  use HTTP NTLM authentication when communicating\n"
-"              with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
-"              host.\n"
-"\n"
-"       --proxy1.0 <proxyhost[:port]>\n"
-, stdout);
- fputs(
-"              Use  the  specified  HTTP  1.0  proxy. If the port number is not\n"
-"              specified, it is assumed at port 1080.\n"
-"\n"
-"              The only difference between  this  and  the  HTTP  proxy  option\n"
-"              (-x/--proxy),  is that attempts to use CONNECT through the proxy\n"
-"              will specify an HTTP 1.0 protocol instead of  the  default  HTTP\n"
-"              1.1.\n"
-"\n"
-"       -p/--proxytunnel\n"
-"              When  an HTTP proxy is used (-x/--proxy), this option will cause\n"
-, stdout);
- fputs(
-"              non-HTTP protocols  to  attempt  to  tunnel  through  the  proxy\n"
-"              instead  of merely using it to do HTTP-like operations. The tun-\n"
-"              nel approach is made with the HTTP  proxy  CONNECT  request  and\n"
-"              requires that the proxy allows direct connect to the remote port\n"
-"              number curl wants to tunnel through to.\n"
-"\n"
-"       --pubkey <key>\n"
-"              (SSH) Public key file name. Allows you to  provide  your  public\n"
-, stdout);
- fputs(
-"              key in this separate file.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -P/--ftp-port <address>\n"
-"              (FTP)  Reverses  the  default initiator/listener roles when con-\n"
-"              necting with FTP. This switch makes curl  use  active  mode.  In\n"
-"              practice,  curl  then  tells  the  server to connect back to the\n"
-"              client's specified address and port, while passive mode asks the\n"
-, stdout);
- fputs(
-"              server  to  setup  an  IP address and port for it to connect to.\n"
-"              <address> should be one of:\n"
-"\n"
-"              interface\n"
-"                     i.e \"eth0\" to specify which interface's  IP  address  you\n"
-"                     want to use (Unix only)\n"
-"\n"
-"              IP address\n"
-"                     i.e \"192.168.10.1\" to specify the exact IP address\n"
-"\n"
-"              host name\n"
-"                     i.e \"my.host.domain\" to specify the machine\n"
-"\n"
-, stdout);
- fputs(
-"              -      make  curl  pick the same IP address that is already used\n"
-"                     for the control connection\n"
-"\n"
-"       If this option is used several times, the last one will be  used.  Dis-\n"
-"       able  the  use  of PORT with --ftp-pasv. Disable the attempt to use the\n"
-"       EPRT command instead of PORT by using --disable-eprt.  EPRT  is  really\n"
-"       PORT++.\n"
-"\n"
-"       Starting in 7.19.5, you can append \":[start]-[end]\" to the right of the\n"
-, stdout);
- fputs(
-"       address, to tell curl what TCP port range to use. That means you  spec-\n"
-"       ify  a  port  range,  from  a lower to a higher number. A single number\n"
-"       works as well, but do note that it increases the risk of failure  since\n"
-"       the port may not be available.\n"
-"\n"
-"       -q     If  used  as the first parameter on the command line, the curlrc\n"
-"              config file will not be read and used. See the  -K/--config  for\n"
-"              details on the default config file search path.\n"
-"\n"
-, stdout);
- fputs(
-"       -Q/--quote <command>\n"
-"              (FTP/SFTP)  Send  an arbitrary command to the remote FTP or SFTP\n"
-"              server. Quote commands are sent BEFORE the transfer takes  place\n"
-"              (just  after  the  initial PWD command in an FTP transfer, to be\n"
-"              exact). To make commands take place after a successful transfer,\n"
-"              prefix  them  with  a  dash '-'.  To make commands be sent after\n"
-, stdout);
- fputs(
-"              libcurl has changed  the  working  directory,  just  before  the\n"
-"              transfer command(s), prefix the command with a '+' (this is only\n"
-"              supported for FTP). You may specify any number of  commands.  If\n"
-"              the  server  returns failure for one of the commands, the entire\n"
-"              operation will be aborted. You must send  syntactically  correct\n"
-"              FTP  commands  as  RFC959  defines to FTP servers, or one of the\n"
-, stdout);
- fputs(
-"              commands listed below to SFTP servers.  This option can be  used\n"
-"              multiple times.\n"
-"\n"
-"              SFTP  is  a  binary protocol. Unlike for FTP, libcurl interprets\n"
-"              SFTP quote commands before sending them to the server.   Follow-\n"
-"              ing is the list of all supported SFTP quote commands:\n"
-"\n"
-"              chgrp group file\n"
-"                     The  chgrp command sets the group ID of the file named by\n"
-, stdout);
- fputs(
-"                     the file operand to the group ID specified by  the  group\n"
-"                     operand. The group operand is a decimal integer group ID.\n"
-"\n"
-"              chmod mode file\n"
-"                     The  chmod  command  modifies  the  file mode bits of the\n"
-"                     specified file. The mode operand is an octal integer mode\n"
-"                     number.\n"
-"\n"
-"              chown user file\n"
-"                     The chown command sets the owner of the file named by the\n"
-, stdout);
- fputs(
-"                     file operand to the user ID specified by the  user  oper-\n"
-"                     and. The user operand is a decimal integer user ID.\n"
-"\n"
-"              ln source_file target_file\n"
-"                     The ln and symlink commands create a symbolic link at the\n"
-"                     target_file location pointing to  the  source_file  loca-\n"
-"                     tion.\n"
-"\n"
-"              mkdir directory_name\n"
-"                     The  mkdir  command  creates  the  directory named by the\n"
-, stdout);
- fputs(
-"                     directory_name operand.\n"
-"\n"
-"              pwd    The pwd command returns the absolute pathname of the cur-\n"
-"                     rent working directory.\n"
-"\n"
-"              rename source target\n"
-"                     The rename command renames the file or directory named by\n"
-"                     the source operand to the destination path named  by  the\n"
-"                     target operand.\n"
-"\n"
-"              rm file\n"
-, stdout);
- fputs(
-"                     The rm command removes the file specified by the file op-\n"
-"                     erand.\n"
-"\n"
-"              rmdir directory\n"
-"                     The rmdir command removes the directory  entry  specified\n"
-"                     by the directory operand, provided it is empty.\n"
-"\n"
-"              symlink source_file target_file\n"
-"                     See ln.\n"
-"\n"
-"       --random-file <file>\n"
-"              (SSL) Specify the path name to file containing what will be con-\n"
-, stdout);
- fputs(
-"              sidered as random data. The data is  used  to  seed  the  random\n"
-"              engine for SSL connections.  See also the --egd-file option.\n"
-"\n"
-"       -r/--range <range>\n"
-"              (HTTP/FTP/SFTP/FILE)  Retrieve a byte range (i.e a partial docu-\n"
-"              ment) from a HTTP/1.1, FTP or  SFTP  server  or  a  local  FILE.\n"
-"              Ranges can be specified in a number of ways.\n"
-"\n"
-"              0-499     specifies the first 500 bytes\n"
-"\n"
-, stdout);
- fputs(
-"              500-999   specifies the second 500 bytes\n"
-"\n"
-"              -500      specifies the last 500 bytes\n"
-"\n"
-"              9500-     specifies the bytes from offset 9500 and forward\n"
-"\n"
-"              0-0,-1    specifies the first and last byte only(*)(H)\n"
-"\n"
-"              500-700,600-799\n"
-"                        specifies 300 bytes from offset 500(H)\n"
-"\n"
-"              100-199,500-599\n"
-"                        specifies two separate 100-byte ranges(*)(H)\n"
-"\n"
-, stdout);
- fputs(
-"       (*)  =  NOTE  that this will cause the server to reply with a multipart\n"
-"       response!\n"
-"\n"
-"       Only digit characters (0-9) are valid in the 'start' and 'stop'  fields\n"
-"       of  the 'start-stop' range syntax. If a non-digit character is given in\n"
-"       the range, the server's response will be unspecified, depending on  the\n"
-"       server's configuration.\n"
-"\n"
-"       You  should  also  be aware that many HTTP/1.1 servers do not have this\n"
-, stdout);
- fputs(
-"       feature enabled, so that when  you  attempt  to  get  a  range,  you'll\n"
-"       instead get the whole document.\n"
-"\n"
-"       FTP  and SFTP range downloads only support the simple 'start-stop' syn-\n"
-"       tax (optionally with one of the numbers omitted). FTP  use  depends  on\n"
-"       the extended FTP command SIZE.\n"
-"\n"
-"       If this option is used several times, the last one will be used.\n"
-"\n"
-"       --raw  When  used, it disables all internal HTTP decoding of content or\n"
-, stdout);
- fputs(
-"              transfer encodings and instead makes them passed  on  unaltered,\n"
-"              raw. (Added in 7.16.2)\n"
-"\n"
-"       -R/--remote-time\n"
-"              When  used,  this  will  make  libcurl attempt to figure out the\n"
-"              timestamp of the remote file, and if that is available make  the\n"
-"              local file get that same timestamp.\n"
-"\n"
-"       --resolve <host:port:address>\n"
-"              Provide  a  custom  address  for  a specific host and port pair.\n"
-, stdout);
- fputs(
-"              Using this, you can make the curl requests(s)  use  a  specified\n"
-"              address  and  prevent the otherwise normally resolved address to\n"
-"              be used. Consider it a sort of /etc/hosts  alternative  provided\n"
-"              on  the  command line. The port number should be the number used\n"
-"              for the specific protocol the host will be used  for.  It  means\n"
-"              you  need several entries if you want to provide address for the\n"
-, stdout);
- fputs(
-"              same host but different ports.\n"
-"\n"
-"              This option can be used many times to add  many  host  names  to\n"
-"              resolve.\n"
-"\n"
-"              (Added in 7.21.3)\n"
-"\n"
-"       --retry <num>\n"
-"              If  a  transient  error is returned when curl tries to perform a\n"
-"              transfer, it will retry this number of times before  giving  up.\n"
-"              Setting  the  number to 0 makes curl do no retries (which is the\n"
-, stdout);
- fputs(
-"              default). Transient error means either: a timeout,  an  FTP  4xx\n"
-"              response code or an HTTP 5xx response code.\n"
-"\n"
-"              When  curl  is about to retry a transfer, it will first wait one\n"
-"              second and then for all forthcoming retries it will  double  the\n"
-"              waiting  time until it reaches 10 minutes which then will be the\n"
-"              delay between the rest of the retries.  By  using  --retry-delay\n"
-, stdout);
- fputs(
-"              you   disable  this  exponential  backoff  algorithm.  See  also\n"
-"              --retry-max-time to limit the total time  allowed  for  retries.\n"
-"              (Added in 7.12.3)\n"
-"\n"
-"              If  this  option  is  used  multiple  times, the last occurrence\n"
-"              decide the amount.\n"
-"\n"
-"       --retry-delay <seconds>\n"
-"              Make curl sleep this amount of time before  each  retry  when  a\n"
-"              transfer  has  failed  with  a  transient  error (it changes the\n"
-, stdout);
- fputs(
-"              default backoff time algorithm between retries). This option  is\n"
-"              only  interesting if --retry is also used. Setting this delay to\n"
-"              zero will make curl use the default  backoff  time.   (Added  in\n"
-"              7.12.3)\n"
-"\n"
-"              If  this  option  is  used  multiple  times, the last occurrence\n"
-"              determines the amount.\n"
-"\n"
-"       --retry-max-time <seconds>\n"
-"              The retry timer is reset  before  the  first  transfer  attempt.\n"
-, stdout);
- fputs(
-"              Retries will be done as usual (see --retry) as long as the timer\n"
-"              hasn't reached this given limit. Notice that if the timer hasn't\n"
-"              reached  the  limit, the request will be made and while perform-\n"
-"              ing, it may take longer than this given time period. To limit  a\n"
-"              single  request's  maximum  time,  use  -m/--max-time.  Set this\n"
-"              option to zero to not timeout retries. (Added in 7.12.3)\n"
-"\n"
-, stdout);
- fputs(
-"              If this option is  used  multiple  times,  the  last  occurrence\n"
-"              determines the amount.\n"
-"\n"
-"       -s/--silent\n"
-"              Silent  or  quiet  mode. Don't show progress meter or error mes-\n"
-"              sages.  Makes Curl mute.\n"
-"\n"
-"       -S/--show-error\n"
-"              When used with -s it makes curl show  an  error  message  if  it\n"
-"              fails.\n"
-"\n"
-"       --socks4 <host[:port]>\n"
-"              Use the specified SOCKS4 proxy. If the port number is not speci-\n"
-, stdout);
- fputs(
-"              fied, it is assumed at port 1080. (Added in 7.15.2)\n"
-"\n"
-"              This option overrides any previous use of  -x/--proxy,  as  they\n"
-"              are mutually exclusive.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --socks4a <host[:port]>\n"
-"              Use the specified SOCKS4a proxy. If the port number is not spec-\n"
-"              ified, it is assumed at port 1080. (Added in 7.18.0)\n"
-"\n"
-, stdout);
- fputs(
-"              This option overrides any previous use of  -x/--proxy,  as  they\n"
-"              are mutually exclusive.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --socks5-hostname <host[:port]>\n"
-"              Use  the  specified  SOCKS5 proxy (and let the proxy resolve the\n"
-"              host name). If the port number is not specified, it  is  assumed\n"
-"              at port 1080. (Added in 7.18.0)\n"
-"\n"
-, stdout);
- fputs(
-"              This  option  overrides  any previous use of -x/--proxy, as they\n"
-"              are mutually exclusive.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"              (This  option  was  previously  wrongly  documented  and used as\n"
-"              --socks without the number appended.)\n"
-"\n"
-"       --socks5 <host[:port]>\n"
-"              Use the specified SOCKS5 proxy  -  but  resolve  the  host  name\n"
-, stdout);
- fputs(
-"              locally.  If  the port number is not specified, it is assumed at\n"
-"              port 1080.\n"
-"\n"
-"              This option overrides any previous use of  -x/--proxy,  as  they\n"
-"              are mutually exclusive.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"              (This option was  previously  wrongly  documented  and  used  as\n"
-"              --socks without the number appended.)\n"
-"\n"
-, stdout);
- fputs(
-"              This  option (as well as --socks4) does not work with IPV6, FTPS\n"
-"              or LDAP.\n"
-"\n"
-"       --socks5-gssapi-service <servicename>\n"
-"              The default service name for a socks server is rcmd/server-fqdn.\n"
-"              This option allows you to change it.\n"
-"\n"
-"              Examples:\n"
-"               --socks5  proxy-name  --socks5-gssapi-service sockd   would use\n"
-"              sockd/proxy-name\n"
-"               --socks5  proxy-name  --socks5-gssapi-service   sockd/real-name\n"
-, stdout);
- fputs(
-"              would  use  sockd/real-name  for cases where the proxy-name does\n"
-"              not match the princpal name.\n"
-"               (Added in 7.19.4).\n"
-"\n"
-"       --socks5-gssapi-nec\n"
-"              As part of the gssapi negotiation a protection mode  is  negoti-\n"
-"              ated.  The  rfc1961  says  in  section 4.3/4.4 it should be pro-\n"
-"              tected, but the NEC  reference  implementation  does  not.   The\n"
-"              option  --socks5-gssapi-nec  allows  the unprotected exchange of\n"
-, stdout);
- fputs(
-"              the protection mode negotiation. (Added in 7.19.4).\n"
-"\n"
-"       --stderr <file>\n"
-"              Redirect all writes to stderr to the specified file instead.  If\n"
-"              the  file  name is a plain '-', it is instead written to stdout.\n"
-"              This option has no point when you're using a shell  with  decent\n"
-"              redirecting capabilities.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --tcp-nodelay\n"
-, stdout);
- fputs(
-"              Turn  on the TCP_NODELAY option. See the curl_easy_setopt(3) man\n"
-"              page for details about this option. (Added in 7.11.2)\n"
-"\n"
-"       -t/--telnet-option <OPT=val>\n"
-"              Pass options to the telnet protocol. Supported options are:\n"
-"\n"
-"              TTYPE=<term> Sets the terminal type.\n"
-"\n"
-"              XDISPLOC=<X display> Sets the X display location.\n"
-"\n"
-"              NEW_ENV=<var,val> Sets an environment variable.\n"
-"\n"
-"       --tftp-blksize <value>\n"
-, stdout);
- fputs(
-"              (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
-"              size  that curl will try to use when tranferring data to or from\n"
-"              a TFTP server. By default 512 bytes will be used.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"              (Added in 7.20.0)\n"
-"\n"
-"       -T/--upload-file <file>\n"
-"              This transfers the specified local file to the  remote  URL.  If\n"
-, stdout);
- fputs(
-"              there is no file part in the specified URL, Curl will append the\n"
-"              local file name. NOTE that you must use a trailing / on the last\n"
-"              directory  to really prove to Curl that there is no file name or\n"
-"              curl will think that your last directory name is the remote file\n"
-"              name to use. That will most likely cause the upload operation to\n"
-"              fail. If this is used on a HTTP(S) server, the PUT command  will\n"
-"              be used.\n"
-"\n"
-, stdout);
- fputs(
-"              Use  the file name \"-\" (a single dash) to use stdin instead of a\n"
-"              given file.  Alternately, the file name \".\"  (a  single  period)\n"
-"              may  be  specified  instead  of \"-\" to use stdin in non-blocking\n"
-"              mode to  allow  reading  server  output  while  stdin  is  being\n"
-"              uploaded.\n"
-"\n"
-"              You can specify one -T for each URL on the command line. Each -T\n"
-, stdout);
- fputs(
-"              + URL pair specifies what to upload and to where. curl also sup-\n"
-"              ports \"globbing\" of the -T argument, meaning that you can upload\n"
-"              multiple files to a single URL by using the  same  URL  globbing\n"
-"              style supported in the URL, like this:\n"
-"\n"
-"              curl -T \"{file1,file2}\" http://www.uploadtothissite.com\n"
-"\n"
-"              or even\n"
-"\n"
-"              curl -T \"img[1-1000].png\" ftp://ftp.picturemania.com/upload/\n"
-"\n"
-"       --trace <file>\n"
-, stdout);
- fputs(
-"              Enables  a  full  trace  dump of all incoming and outgoing data,\n"
-"              including descriptive information, to the given output file. Use\n"
-"              \"-\" as filename to have the output sent to stdout.\n"
-"\n"
-"              This  option overrides previous uses of -v/--verbose or --trace-\n"
-"              ascii.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --trace-ascii <file>\n"
-, stdout);
- fputs(
-"              Enables a full trace dump of all  incoming  and  outgoing  data,\n"
-"              including descriptive information, to the given output file. Use\n"
-"              \"-\" as filename to have the output sent to stdout.\n"
-"\n"
-"              This is very similar to --trace, but leaves out the hex part and\n"
-"              only  shows  the ASCII part of the dump. It makes smaller output\n"
-"              that might be easier to read for untrained humans.\n"
-"\n"
-, stdout);
- fputs(
-"              This option overrides previous uses of -v/--verbose or --trace.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --trace-time\n"
-"              Prepends a time stamp to each trace or verbose  line  that  curl\n"
-"              displays.  (Added in 7.14.0)\n"
-"\n"
-"       -u/--user <user:password>\n"
-"              Specify the user name and password to use for server authentica-\n"
-"              tion. Overrides -n/--netrc and --netrc-optional.\n"
-"\n"
-, stdout);
- fputs(
-"              If you just give the user name (without entering a  colon)  curl\n"
-"              will prompt for a password.\n"
-"\n"
-"              If  you  use an SSPI-enabled curl binary and do NTLM authentica-\n"
-"              tion, you can force curl to pick up the user name  and  password\n"
-"              from  your  environment by simply specifying a single colon with\n"
-"              this option: \"-u :\".\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-, stdout);
- fputs(
-"       -U/--proxy-user <user:password>\n"
-"              Specify the user name and password to use for proxy  authentica-\n"
-"              tion.\n"
-"\n"
-"              If  you  use an SSPI-enabled curl binary and do NTLM authentica-\n"
-"              tion, you can force curl to pick up the user name  and  password\n"
-"              from  your  environment by simply specifying a single colon with\n"
-"              this option: \"-U :\".\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-, stdout);
- fputs(
-"       --url <URL>\n"
-"              Specify a URL to fetch. This option is  mostly  handy  when  you\n"
-"              want to specify URL(s) in a config file.\n"
-"\n"
-"              This  option  may  be used any number of times. To control where\n"
-"              this URL is written, use the -o/--output or the -O/--remote-name\n"
-"              options.\n"
-"\n"
-"       -v/--verbose\n"
-"              Makes  the  fetching  more  verbose/talkative. Mostly useful for\n"
-, stdout);
- fputs(
-"              debugging. A line starting with '>' means \"header data\" sent  by\n"
-"              curl, '<' means \"header data\" received by curl that is hidden in\n"
-"              normal cases, and a line starting with '*' means additional info\n"
-"              provided by curl.\n"
-"\n"
-"              Note  that  if  you  only  want  HTTP  headers  in  the  output,\n"
-"              -i/--include might be the option you're looking for.\n"
-"\n"
-"              If you think this option still doesn't give you enough  details,\n"
-, stdout);
- fputs(
-"              consider using --trace or --trace-ascii instead.\n"
-"\n"
-"              This option overrides previous uses of --trace-ascii or --trace.\n"
-"\n"
-"              Use -S/--silent to make curl quiet.\n"
-"\n"
-"       -V/--version\n"
-"              Displays information about curl and the libcurl version it uses.\n"
-"              The  first  line  includes the full version of curl, libcurl and\n"
-"              other 3rd party libraries linked with the executable.\n"
-"\n"
-, stdout);
- fputs(
-"              The second line (starts with \"Protocols:\") shows  all  protocols\n"
-"              that libcurl reports to support.\n"
-"\n"
-"              The third line (starts with \"Features:\") shows specific features\n"
-"              libcurl reports to offer. Available features include:\n"
-"\n"
-"              IPv6   You can use IPv6 with this.\n"
-"\n"
-"              krb4   Krb4 for FTP is supported.\n"
-"\n"
-"              SSL    HTTPS and FTPS are supported.\n"
-"\n"
-, stdout);
- fputs(
-"              libz   Automatic decompression of compressed files over HTTP  is\n"
-"                     supported.\n"
-"\n"
-"              NTLM   NTLM authentication is supported.\n"
-"\n"
-"              GSS-Negotiate\n"
-"                     Negotiate authentication and krb5 for FTP is supported.\n"
-"\n"
-"              Debug  This  curl  uses a libcurl built with Debug. This enables\n"
-"                     more error-tracking and memory debugging etc.  For  curl-\n"
-"                     developers only!\n"
-"\n"
-"              AsynchDNS\n"
-, stdout);
- fputs(
-"                     This curl uses asynchronous name resolves.\n"
-"\n"
-"              SPNEGO SPNEGO Negotiate authentication is supported.\n"
-"\n"
-"              Largefile\n"
-"                     This curl supports transfers of large files, files larger\n"
-"                     than 2GB.\n"
-"\n"
-"              IDN    This curl supports IDN - international domain names.\n"
-"\n"
-"              SSPI   SSPI is supported. If you use NTLM and set a  blank  user\n"
-, stdout);
- fputs(
-"                     name,  curl  will authenticate with your current user and\n"
-"                     password.\n"
-"\n"
-"       -w/--write-out <format>\n"
-"              Defines what to display on stdout after a completed and success-\n"
-"              ful  operation.  The  format  is a string that may contain plain\n"
-"              text mixed with any number of variables. The string can be spec-\n"
-"              ified  as \"string\", to get read from a particular file you spec-\n"
-, stdout);
- fputs(
-"              ify it \"@filename\" and to tell curl  to  read  the  format  from\n"
-"              stdin you write \"@-\".\n"
-"\n"
-"              The  variables  present in the output format will be substituted\n"
-"              by the value or text that curl thinks fit, as  described  below.\n"
-"              All  variables are specified as %{variable_name} and to output a\n"
-"              normal % you just write them as %%. You can output a newline  by\n"
-, stdout);
- fputs(
-"              using \\n, a carriage return with \\r and a tab space with \\t.\n"
-"\n"
-"              NOTE: The %-symbol is a special symbol in the win32-environment,\n"
-"              where all occurrences of %  must  be  doubled  when  using  this\n"
-"              option.\n"
-"\n"
-"              The variables available at this point are:\n"
-"\n"
-"              url_effective  The URL that was fetched last. This is most mean-\n"
-"                             ingful if you've told curl  to  follow  location:\n"
-, stdout);
- fputs(
-"                             headers.\n"
-"\n"
-"              http_code      The numerical response code that was found in the\n"
-"                             last retrieved HTTP(S)  or  FTP(s)  transfer.  In\n"
-"                             7.18.2  the alias response_code was added to show\n"
-"                             the same info.\n"
-"\n"
-"              http_connect   The numerical code that was  found  in  the  last\n"
-"                             response   (from  a  proxy)  to  a  curl  CONNECT\n"
-, stdout);
- fputs(
-"                             request. (Added in 7.12.4)\n"
-"\n"
-"              time_total     The total time, in seconds, that the full  opera-\n"
-"                             tion lasted. The time will be displayed with mil-\n"
-"                             lisecond resolution.\n"
-"\n"
-"              time_namelookup\n"
-"                             The time, in seconds,  it  took  from  the  start\n"
-"                             until the name resolving was completed.\n"
-"\n"
-, stdout);
- fputs(
-"              time_connect   The  time,  in  seconds,  it  took from the start\n"
-"                             until the TCP connect  to  the  remote  host  (or\n"
-"                             proxy) was completed.\n"
-"\n"
-"              time_appconnect\n"
-"                             The  time,  in  seconds,  it  took from the start\n"
-"                             until the SSL/SSH/etc  connect/handshake  to  the\n"
-"                             remote host was completed. (Added in 7.19.0)\n"
-"\n"
-, stdout);
- fputs(
-"              time_pretransfer\n"
-"                             The  time,  in  seconds,  it  took from the start\n"
-"                             until the file transfer was just about to  begin.\n"
-"                             This includes all pre-transfer commands and nego-\n"
-"                             tiations that are specific to the particular pro-\n"
-"                             tocol(s) involved.\n"
-"\n"
-"              time_redirect  The time, in seconds, it took for all redirection\n"
-, stdout);
- fputs(
-"                             steps include name lookup,  connect,  pretransfer\n"
-"                             and  transfer  before  the  final transaction was\n"
-"                             started. time_redirect shows the complete  execu-\n"
-"                             tion  time  for  multiple redirections. (Added in\n"
-"                             7.12.3)\n"
-"\n"
-"              time_starttransfer\n"
-"                             The time, in seconds,  it  took  from  the  start\n"
-, stdout);
- fputs(
-"                             until  the first byte was just about to be trans-\n"
-"                             ferred. This includes time_pretransfer  and  also\n"
-"                             the  time  the  server  needed  to  calculate the\n"
-"                             result.\n"
-"\n"
-"              size_download  The total amount of bytes that were downloaded.\n"
-"\n"
-"              size_upload    The total amount of bytes that were uploaded.\n"
-"\n"
-, stdout);
- fputs(
-"              size_header    The total amount of bytes of the downloaded head-\n"
-"                             ers.\n"
-"\n"
-"              size_request   The  total  amount of bytes that were sent in the\n"
-"                             HTTP request.\n"
-"\n"
-"              speed_download The average download speed that curl measured for\n"
-"                             the complete download. Bytes per second.\n"
-"\n"
-"              speed_upload   The  average  upload speed that curl measured for\n"
-, stdout);
- fputs(
-"                             the complete upload. Bytes per second.\n"
-"\n"
-"              content_type   The Content-Type of the  requested  document,  if\n"
-"                             there was any.\n"
-"\n"
-"              num_connects   Number  of new connects made in the recent trans-\n"
-"                             fer. (Added in 7.12.3)\n"
-"\n"
-"              num_redirects  Number of redirects that  were  followed  in  the\n"
-"                             request. (Added in 7.12.3)\n"
-"\n"
-, stdout);
- fputs(
-"              redirect_url   When a HTTP request was made without -L to follow\n"
-"                             redirects, this variable will show the actual URL\n"
-"                             a redirect would take you to. (Added in 7.18.2)\n"
-"\n"
-"              ftp_entry_path The initial path libcurl ended up in when logging\n"
-"                             on to the remote FTP server. (Added in 7.15.4)\n"
-"\n"
-"              ssl_verify_result\n"
-, stdout);
- fputs(
-"                             The result of the SSL peer certificate  verifica-\n"
-"                             tion that was requested. 0 means the verification\n"
-"                             was successful. (Added in 7.19.0)\n"
-"\n"
-"       If this option is used several times, the last one will be used.\n"
-"\n"
-"       -x/--proxy <proxyhost[:port]>\n"
-"              Use the specified HTTP proxy. If the port number is  not  speci-\n"
-"              fied, it is assumed at port 1080.\n"
-"\n"
-, stdout);
- fputs(
-"              This  option  overrides  existing environment variables that set\n"
-"              the proxy to use. If there's an environment variable  setting  a\n"
-"              proxy, you can set proxy to \"\" to override it.\n"
-"\n"
-"              Note  that  all  operations that are performed over a HTTP proxy\n"
-"              will transparently be converted to HTTP. It means  that  certain\n"
-"              protocol specific operations might not be available. This is not\n"
-, stdout);
- fputs(
-"              the case if you can tunnel through the proxy, as done  with  the\n"
-"              -p/--proxytunnel option.\n"
-"\n"
-"              Starting  with 7.14.1, the proxy host can be specified the exact\n"
-"              same way as the proxy environment variables, including the  pro-\n"
-"              tocol prefix (http://) and the embedded user + password.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -X/--request <command>\n"
-, stdout);
- fputs(
-"              (HTTP) Specifies a custom request method to use when communicat-\n"
-"              ing with the HTTP server.  The specified request  will  be  used\n"
-"              instead  of  the  method otherwise used (which defaults to GET).\n"
-"              Read the HTTP 1.1 specification for  details  and  explanations.\n"
-"              Common  additional  HTTP  requests  include  PUT and DELETE, but\n"
-"              related technologies like WebDAV offers PROPFIND, COPY, MOVE and\n"
-"              more.\n"
-"\n"
-, stdout);
- fputs(
-"              (FTP) Specifies a custom FTP command to use instead of LIST when\n"
-"              doing file lists with FTP.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -y/--speed-time <time>\n"
-"              If a download is slower than speed-limit bytes per second during\n"
-"              a speed-time period, the download gets aborted. If speed-time is\n"
-"              used, the default speed-limit will be 1 unless set with -Y.\n"
-"\n"
-, stdout);
- fputs(
-"              This option controls transfers and thus  will  not  affect  slow\n"
-"              connects  etc.  If this is a concern for you, try the --connect-\n"
-"              timeout option.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -Y/--speed-limit <speed>\n"
-"              If a download is slower than this given speed (in bytes per sec-\n"
-"              ond)  for  speed-time seconds it gets aborted. speed-time is set\n"
-, stdout);
- fputs(
-"              with -y and is 30 if not set.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -z/--time-cond <date expression>\n"
-"              (HTTP/FTP) Request a file that has been modified later than  the\n"
-"              given  time  and date, or one that has been modified before that\n"
-"              time. The date expression can be all sorts of date strings or if\n"
-"              it  doesn't  match  any  internal ones, it tries to get the time\n"
-, stdout);
- fputs(
-"              from a given file name  instead!  See  the  curl_getdate(3)  man\n"
-"              pages for date expression details.\n"
-"\n"
-"              Start the date expression with a dash (-) to make it request for\n"
-"              a document that is older than the given date/time, default is  a\n"
-"              document that is newer than the specified date/time.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       --max-redirs <num>\n"
-, stdout);
- fputs(
-"              Set   maximum   number  of  redirection-followings  allowed.  If\n"
-"              -L/--location is used, this option can be used to  prevent  curl\n"
-"              from following redirections \"in absurdum\". By default, the limit\n"
-"              is set to 50 redirections. Set this option to -1 to make it lim-\n"
-"              itless.\n"
-"\n"
-"              If this option is used several times, the last one will be used.\n"
-"\n"
-"       -0/--http1.0\n"
-, stdout);
- fputs(
-"              (HTTP)  Forces curl to issue its requests using HTTP 1.0 instead\n"
-"              of using its internally preferred: HTTP 1.1.\n"
-"\n"
-"       -1/--tlsv1\n"
-"              (SSL) Forces curl to use TLS version 1 when negotiating  with  a\n"
-"              remote TLS server.\n"
-"\n"
-"       -2/--sslv2\n"
-"              (SSL)  Forces  curl to use SSL version 2 when negotiating with a\n"
-"              remote SSL server.\n"
-"\n"
-"       -3/--sslv3\n"
-"              (SSL) Forces curl to use SSL version 3 when negotiating  with  a\n"
-, stdout);
- fputs(
-"              remote SSL server.\n"
-"\n"
-"       -4/--ipv4\n"
-"              If  libcurl  is  capable  of resolving an address to multiple IP\n"
-"              versions (which it is if it is IPv6-capable), this option  tells\n"
-"              libcurl to resolve names to IPv4 addresses only.\n"
-"\n"
-"       -6/--ipv6\n"
-"              If  libcurl  is  capable  of resolving an address to multiple IP\n"
-"              versions (which it is if it is IPv6-capable), this option  tells\n"
-, stdout);
- fputs(
-"              libcurl to resolve names to IPv6 addresses only.\n"
-"\n"
-"       -#/--progress-bar\n"
-"              Make curl display progress information as a progress bar instead\n"
-"              of the default statistics.\n"
-"\n"
-"FILES\n"
-"       ~/.curlrc\n"
-"              Default config file, see -K/--config for details.\n"
-"\n"
-"ENVIRONMENT\n"
-"       The environment variables can be specified in lower case or upper case.\n"
-"       The lower case version has precedence. http_proxy is an exception as it\n"
-, stdout);
- fputs(
-"       is only available in lower case.\n"
-"\n"
-"       http_proxy [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use for HTTP.\n"
-"       HTTPS_PROXY [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use for HTTPS.\n"
-"\n"
-"       FTP_PROXY [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use for FTP.\n"
-"\n"
-"       ALL_PROXY [protocol://]<host>[:port]\n"
-"              Sets the proxy server to use if no  protocol-specific  proxy  is\n"
-"              set.\n"
-"\n"
-, stdout);
- fputs(
-"       NO_PROXY <comma-separated list of hosts>\n"
-"              list  of  host names that shouldn't go through any proxy. If set\n"
-"              to a asterisk '*' only, it matches all hosts.\n"
-"\n"
-"EXIT CODES\n"
-"       There are a bunch of different  error  codes  and  their  corresponding\n"
-"       error  messages  that  may appear during bad conditions. At the time of\n"
-"       this writing, the exit codes are:\n"
-"\n"
-"       1      Unsupported protocol. This build of curl has no support for this\n"
-, stdout);
- fputs(
-"              protocol.\n"
-"\n"
-"       2      Failed to initialize.\n"
-"\n"
-"       3      URL malformed. The syntax was not correct.\n"
-"\n"
-"       5      Couldn't  resolve  proxy.  The  given  proxy  host  could not be\n"
-"              resolved.\n"
-"\n"
-"       6      Couldn't resolve host. The given remote host was not resolved.\n"
-"\n"
-"       7      Failed to connect to host.\n"
-"\n"
-"       8      FTP weird server reply.  The  server  sent  data  curl  couldn't\n"
-"              parse.\n"
-"\n"
-, stdout);
- fputs(
-"       9      FTP  access  denied. The server denied login or denied access to\n"
-"              the particular resource or directory you wanted to  reach.  Most\n"
-"              often  you  tried to change to a directory that doesn't exist on\n"
-"              the server.\n"
-"\n"
-"       11     FTP weird PASS reply. Curl couldn't parse the reply sent to  the\n"
-"              PASS request.\n"
-"\n"
-"       13     FTP  weird PASV reply, Curl couldn't parse the reply sent to the\n"
-"              PASV request.\n"
-"\n"
-, stdout);
- fputs(
-"       14     FTP weird 227 format.  Curl  couldn't  parse  the  227-line  the\n"
-"              server sent.\n"
-"\n"
-"       15     FTP  can't  get host. Couldn't resolve the host IP we got in the\n"
-"              227-line.\n"
-"\n"
-"       17     FTP couldn't set binary.  Couldn't  change  transfer  method  to\n"
-"              binary.\n"
-"\n"
-"       18     Partial file. Only a part of the file was transferred.\n"
-"\n"
-"       19     FTP  couldn't download/access the given file, the RETR (or simi-\n"
-"              lar) command failed.\n"
-"\n"
-, stdout);
- fputs(
-"       21     FTP quote error. A quote command returned error from the server.\n"
-"       22     HTTP page not retrieved. The requested  url  was  not  found  or\n"
-"              returned  another  error  with  the HTTP error code being 400 or\n"
-"              above. This return code only appears if -f/--fail is used.\n"
-"\n"
-"       23     Write error. Curl couldn't write data to a local  filesystem  or\n"
-"              similar.\n"
-"\n"
-"       25     FTP  couldn't  STOR  file. The server denied the STOR operation,\n"
-, stdout);
- fputs(
-"              used for FTP uploading.\n"
-"\n"
-"       26     Read error. Various reading problems.\n"
-"\n"
-"       27     Out of memory. A memory allocation request failed.\n"
-"\n"
-"       28     Operation timeout. The specified  time-out  period  was  reached\n"
-"              according to the conditions.\n"
-"\n"
-"       30     FTP  PORT  failed.  The PORT command failed. Not all FTP servers\n"
-"              support the PORT  command,  try  doing  a  transfer  using  PASV\n"
-"              instead!\n"
-"\n"
-, stdout);
- fputs(
-"       31     FTP  couldn't use REST. The REST command failed. This command is\n"
-"              used for resumed FTP transfers.\n"
-"\n"
-"       33     HTTP range error. The range \"command\" didn't work.\n"
-"\n"
-"       34     HTTP post error. Internal post-request generation error.\n"
-"\n"
-"       35     SSL connect error. The SSL handshaking failed.\n"
-"\n"
-"       36     FTP bad download resume. Couldn't continue  an  earlier  aborted\n"
-"              download.\n"
-"\n"
-, stdout);
- fputs(
-"       37     FILE couldn't read file. Failed to open the file. Permissions?\n"
-"\n"
-"       38     LDAP cannot bind. LDAP bind operation failed.\n"
-"\n"
-"       39     LDAP search failed.\n"
-"\n"
-"       41     Function not found. A required LDAP function was not found.\n"
-"\n"
-"       42     Aborted by callback. An application told curl to abort the oper-\n"
-"              ation.\n"
-"\n"
-"       43     Internal error. A function was called with a bad parameter.\n"
-"\n"
-, stdout);
- fputs(
-"       45     Interface error. A specified outgoing  interface  could  not  be\n"
-"              used.\n"
-"\n"
-"       47     Too many redirects. When following redirects, curl hit the maxi-\n"
-"              mum amount.\n"
-"\n"
-"       48     Unknown TELNET option specified.\n"
-"\n"
-"       49     Malformed telnet option.\n"
-"\n"
-"       51     The peer's SSL certificate or SSH MD5 fingerprint was not ok.\n"
-"\n"
-"       52     The server didn't reply anything, which here  is  considered  an\n"
-"              error.\n"
-"\n"
-, stdout);
- fputs(
-"       53     SSL crypto engine not found.\n"
-"\n"
-"       54     Cannot set SSL crypto engine as default.\n"
-"\n"
-"       55     Failed sending network data.\n"
-"\n"
-"       56     Failure in receiving network data.\n"
-"\n"
-"       58     Problem with the local certificate.\n"
-"\n"
-"       59     Couldn't use specified SSL cipher.\n"
-"\n"
-"       60     Peer  certificate cannot be authenticated with known CA certifi-\n"
-"              cates.\n"
-"\n"
-"       61     Unrecognized transfer encoding.\n"
-"\n"
-"       62     Invalid LDAP URL.\n"
-"\n"
-, stdout);
- fputs(
-"       63     Maximum file size exceeded.\n"
-"\n"
-"       64     Requested FTP SSL level failed.\n"
-"\n"
-"       65     Sending the data requires a rewind that failed.\n"
-"\n"
-"       66     Failed to initialise SSL Engine.\n"
-"\n"
-"       67     The user name, password, or similar was not  accepted  and  curl\n"
-"              failed to log in.\n"
-"\n"
-"       68     File not found on TFTP server.\n"
-"\n"
-"       69     Permission problem on TFTP server.\n"
-"\n"
-"       70     Out of disk space on TFTP server.\n"
-"\n"
-"       71     Illegal TFTP operation.\n"
-"\n"
-, stdout);
- fputs(
-"       72     Unknown TFTP transfer ID.\n"
-"\n"
-"       73     File already exists (TFTP).\n"
-"\n"
-"       74     No such user (TFTP).\n"
-"\n"
-"       75     Character conversion failed.\n"
-"\n"
-"       76     Character conversion functions required.\n"
-"\n"
-"       77     Problem with reading the SSL CA cert (path? access rights?).\n"
-"\n"
-"       78     The resource referenced in the URL does not exist.\n"
-"\n"
-"       79     An unspecified error occurred during the SSH session.\n"
-"\n"
-"       80     Failed to shut down the SSL connection.\n"
-"\n"
-, stdout);
- fputs(
-"       82     Could  not  load  CRL  file,  missing  or wrong format (added in\n"
-"              7.19.0).\n"
-"\n"
-"       83     Issuer check failed (added in 7.19.0).\n"
-"\n"
-"       84     The FTP PRET command failed\n"
-"\n"
-"       85     RTSP: mismatch of CSeq numbers\n"
-"\n"
-"       86     RTSP: mismatch of Session Identifiers\n"
-"\n"
-"       87     unable to parse FTP file list\n"
-"\n"
-"       88     FTP chunk callback reported error\n"
-"\n"
-"       XX     More error codes will appear here in future releases. The exist-\n"
-, stdout);
- fputs(
-"              ing ones are meant to never change.\n"
-"\n"
-"AUTHORS / CONTRIBUTORS\n"
-"       Daniel  Stenberg is the main author, but the whole list of contributors\n"
-"       is found in the separate THANKS file.\n"
-"\n"
-"WWW\n"
-"       http://curl.haxx.se\n"
-"\n"
-"FTP\n"
-"       ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
-"\n"
-"SEE ALSO\n"
-"       ftp(1), wget(1)\n"
-"\n"
-"LATEST VERSION\n"
-"\n"
-"  You always find news about what's going on as well as the latest versions\n"
-"  from the curl web pages, located at:\n"
-"\n"
-"        http://curl.haxx.se\n"
-"\n"
-"SIMPLE USAGE\n"
-"\n"
-, stdout);
- fputs(
-"  Get the main page from Netscape's web-server:\n"
-"\n"
-"        curl http://www.netscape.com/\n"
-"\n"
-"  Get the README file the user's home directory at funet's ftp-server:\n"
-"\n"
-"        curl ftp://ftp.funet.fi/README\n"
-"\n"
-"  Get a web page from a server using port 8000:\n"
-"\n"
-"        curl http://www.weirdserver.com:8000/\n"
-"\n"
-"  Get a list of a directory of an FTP site:\n"
-"\n"
-"        curl ftp://cool.haxx.se/\n"
-"\n"
-"  Get the definition of curl from a dictionary:\n"
-"\n"
-"        curl dict://dict.org/m:curl\n"
-"\n"
-"  Fetch two documents at once:\n"
-"\n"
-, stdout);
- fputs(
-"        curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n"
-"\n"
-"  Get a file off an FTPS server:\n"
-"\n"
-"        curl ftps://files.are.secure.com/secrets.txt\n"
-"\n"
-"  or use the more appropriate FTPS way to get the same file:\n"
-"\n"
-"        curl --ftp-ssl ftp://files.are.secure.com/secrets.txt\n"
-"\n"
-"  Get a file from an SSH server using SFTP:\n"
-"\n"
-"        curl -u username sftp://shell.example.com/etc/issue\n"
-"\n"
-"  Get a file from an SSH server using SCP using a private key to authenticate:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \\\n"
-"            scp://shell.example.com/~/personal.txt\n"
-"\n"
-"  Get the main page from an IPv6 web server:\n"
-"\n"
-"        curl -g \"http://[2001:1890:1112:1::20]/\"\n"
-"\n"
-"DOWNLOAD TO A FILE\n"
-"\n"
-"  Get a web page and store in a local file:\n"
-"\n"
-"        curl -o thatpage.html http://www.netscape.com/\n"
-"\n"
-"  Get a web page and store in a local file, make the local file get the name\n"
-"  of the remote document (if no file name part is specified in the URL, this\n"
-, stdout);
- fputs(
-"  will fail):\n"
-"\n"
-"        curl -O http://www.netscape.com/index.html\n"
-"\n"
-"  Fetch two files and store them with their remote names:\n"
-"\n"
-"        curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n"
-"\n"
-"USING PASSWORDS\n"
-"\n"
-" FTP\n"
-"\n"
-"   To ftp files using name+passwd, include them in the URL like:\n"
-"\n"
-"        curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
-"\n"
-"   or specify them with the -u flag like\n"
-"\n"
-"        curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n"
-"\n"
-" FTPS\n"
-"\n"
-, stdout);
- fputs(
-"   It is just like for FTP, but you may also want to specify and use\n"
-"   SSL-specific options for certificates etc.\n"
-"\n"
-"   Note that using FTPS:// as prefix is the \"implicit\" way as described in the\n"
-"   standards while the recommended \"explicit\" way is done by using FTP:// and\n"
-"   the --ftp-ssl option.\n"
-"\n"
-" SFTP / SCP\n"
-"\n"
-"   This is similar to FTP, but you can specify a private key to use instead of\n"
-"   a password. Note that the private key may itself be protected by a password\n"
-, stdout);
- fputs(
-"   that is unrelated to the login password of the remote system.  If you\n"
-"   provide a private key file you must also provide a public key file.\n"
-"\n"
-" HTTP\n"
-"\n"
-"   Curl also supports user and password in HTTP URLs, thus you can pick a file\n"
-"   like:\n"
-"\n"
-"        curl http://name:passwd@machine.domain/full/path/to/file\n"
-"\n"
-"   or specify user and password separately like in\n"
-"\n"
-"        curl -u name:passwd http://machine.domain/full/path/to/file\n"
-"\n"
-, stdout);
- fputs(
-"   HTTP offers many different methods of authentication and curl supports\n"
-"   several: Basic, Digest, NTLM and Negotiate. Without telling which method to\n"
-"   use, curl defaults to Basic. You can also ask curl to pick the most secure\n"
-"   ones out of the ones that the server accepts for the given URL, by using\n"
-"   --anyauth.\n"
-"\n"
-"   NOTE! Since HTTP URLs don't support user and password, you can't use that\n"
-"   style when using Curl via a proxy. You _must_ use the -u style fetch\n"
-, stdout);
- fputs(
-"   during such circumstances.\n"
-"\n"
-" HTTPS\n"
-"\n"
-"   Probably most commonly used with private certificates, as explained below.\n"
-"\n"
-"PROXY\n"
-"\n"
-" Get an ftp file using a proxy named my-proxy that uses port 888:\n"
-"\n"
-"        curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n"
-"\n"
-" Get a file from a HTTP server that requires user and password, using the\n"
-" same proxy as above:\n"
-"\n"
-"        curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
-"\n"
-" Some proxies require special authentication. Specify by using -U as above:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
-"\n"
-" A comma-separated list of hosts and domains which do not use the proxy can\n"
-" be specified as:\n"
-"\n"
-"        curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/\n"
-"\n"
-" If the proxy is specified with --proxy1.0 instead of --proxy or -x, then\n"
-" curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.\n"
-"\n"
-" curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.\n"
-"\n"
-, stdout);
- fputs(
-" See also the environment variables Curl support that offer further proxy\n"
-" control.\n"
-"\n"
-"RANGES\n"
-"\n"
-"  With HTTP 1.1 byte-ranges were introduced. Using this, a client can request\n"
-"  to get only one or more subparts of a specified document. Curl supports\n"
-"  this with the -r flag.\n"
-"\n"
-"  Get the first 100 bytes of a document:\n"
-"\n"
-"        curl -r 0-99 http://www.get.this/\n"
-"\n"
-"  Get the last 500 bytes of a document:\n"
-"\n"
-"        curl -r -500 http://www.get.this/\n"
-"\n"
-, stdout);
- fputs(
-"  Curl also supports simple ranges for FTP files as well. Then you can only\n"
-"  specify start and stop position.\n"
-"\n"
-"  Get the first 100 bytes of a document using FTP:\n"
-"\n"
-"        curl -r 0-99 ftp://www.get.this/README\n"
-"\n"
-"UPLOADING\n"
-"\n"
-" FTP / FTPS / SFTP / SCP\n"
-"\n"
-"  Upload all data on stdin to a specified server:\n"
-"\n"
-"        curl -T - ftp://ftp.upload.com/myfile\n"
-"\n"
-"  Upload data from a specified file, login with user and password:\n"
-"\n"
-"        curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n"
-"\n"
-, stdout);
- fputs(
-"  Upload a local file to the remote site, and use the local file name remote\n"
-"  too:\n"
-"\n"
-"        curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n"
-"\n"
-"  Upload a local file to get appended to the remote file:\n"
-"\n"
-"        curl -T localfile -a ftp://ftp.upload.com/remotefile\n"
-"\n"
-"  Curl also supports ftp upload through a proxy, but only if the proxy is\n"
-"  configured to allow that kind of tunneling. If it does, you can run curl in\n"
-"  a fashion similar to:\n"
-"\n"
-, stdout);
- fputs(
-"        curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n"
-"\n"
-" HTTP\n"
-"\n"
-"  Upload all data on stdin to a specified http site:\n"
-"\n"
-"        curl -T - http://www.upload.com/myfile\n"
-"\n"
-"  Note that the http server must have been configured to accept PUT before\n"
-"  this can be done successfully.\n"
-"\n"
-"  For other ways to do http data upload, see the POST section below.\n"
-"\n"
-"VERBOSE / DEBUG\n"
-"\n"
-"  If curl fails where it isn't supposed to, if the servers don't let you in,\n"
-, stdout);
- fputs(
-"  if you can't understand the responses: use the -v flag to get verbose\n"
-"  fetching. Curl will output lots of info and what it sends and receives in\n"
-"  order to let the user see all client-server interaction (but it won't show\n"
-"  you the actual data).\n"
-"\n"
-"        curl -v ftp://ftp.upload.com/\n"
-"\n"
-"  To get even more details and information on what curl does, try using the\n"
-"  --trace or --trace-ascii options with a given file name to log to, like\n"
-"  this:\n"
-"\n"
-"        curl --trace trace.txt www.haxx.se\n"
-"\n"
-"\n"
-, stdout);
- fputs(
-"DETAILED INFORMATION\n"
-"\n"
-"  Different protocols provide different ways of getting detailed information\n"
-"  about specific files/documents. To get curl to show detailed information\n"
-"  about a single file, you should use -I/--head option. It displays all\n"
-"  available info on a single file for HTTP and FTP. The HTTP information is a\n"
-"  lot more extensive.\n"
-"\n"
-"  For HTTP, you can get the header information (the same as -I would show)\n"
-"  shown before the data by using -i/--include. Curl understands the\n"
-, stdout);
- fputs(
-"  -D/--dump-header option when getting files from both FTP and HTTP, and it\n"
-"  will then store the headers in the specified file.\n"
-"\n"
-"  Store the HTTP headers in a separate file (headers.txt in the example):\n"
-"\n"
-"        curl --dump-header headers.txt curl.haxx.se\n"
-"\n"
-"  Note that headers stored in a separate file can be very useful at a later\n"
-"  time if you want curl to use cookies sent by the server. More about that in\n"
-"  the cookies section.\n"
-"\n"
-"POST (HTTP)\n"
-"\n"
-, stdout);
- fputs(
-"  It's easy to post data using curl. This is done using the -d <data>\n"
-"  option.  The post data must be urlencoded.\n"
-"\n"
-"  Post a simple \"name\" and \"phone\" guestbook.\n"
-"\n"
-"        curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n"
-"                http://www.where.com/guest.cgi\n"
-"\n"
-"  How to post a form with curl, lesson #1:\n"
-"\n"
-"  Dig out all the <input> tags in the form that you want to fill in. (There's\n"
-"  a perl program called formfind.pl on the curl site that helps with this).\n"
-"\n"
-, stdout);
- fputs(
-"  If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n"
-"  string\", which is in the format\n"
-"\n"
-"        <variable1>=<data1>&<variable2>=<data2>&...\n"
-"\n"
-"  The 'variable' names are the names set with \"name=\" in the <input> tags, and\n"
-"  the data is the contents you want to fill in for the inputs. The data *must*\n"
-"  be properly URL encoded. That means you replace space with + and that you\n"
-"  write weird letters with %XX where XX is the hexadecimal representation of\n"
-, stdout);
- fputs(
-"  the letter's ASCII code.\n"
-"\n"
-"  Example:\n"
-"\n"
-"  (page located at http://www.formpost.com/getthis/\n"
-"\n"
-"        <form action=\"post.cgi\" method=\"post\">\n"
-"        <input name=user size=10>\n"
-"        <input name=pass type=password size=10>\n"
-"        <input name=id type=hidden value=\"blablabla\">\n"
-"        <input name=ding value=\"submit\">\n"
-"        </form>\n"
-"\n"
-"  We want to enter user 'foobar' with password '12345'.\n"
-"\n"
-"  To post to this, you enter a curl command line like:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -d \"user=foobar&pass=12345&id=blablabla&ding=submit\"  (continues)\n"
-"          http://www.formpost.com/getthis/post.cgi\n"
-"\n"
-"\n"
-"  While -d uses the application/x-www-form-urlencoded mime-type, generally\n"
-"  understood by CGI's and similar, curl also supports the more capable\n"
-"  multipart/form-data type. This latter type supports things like file upload.\n"
-"\n"
-"  -F accepts parameters like -F \"name=contents\". If you want the contents to\n"
-, stdout);
- fputs(
-"  be read from a file, use <@filename> as contents. When specifying a file,\n"
-"  you can also specify the file content type by appending ';type=<mime type>'\n"
-"  to the file name. You can also post the contents of several files in one\n"
-"  field.  For example, the field name 'coolfiles' is used to send three files,\n"
-"  with different content types using the following syntax:\n"
-"\n"
-"        curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n"
-"        http://www.post.com/postit.cgi\n"
-"\n"
-, stdout);
- fputs(
-"  If the content-type is not specified, curl will try to guess from the file\n"
-"  extension (it only knows a few), or use the previously specified type (from\n"
-"  an earlier file if several files are specified in a list) or else it will\n"
-"  using the default type 'text/plain'.\n"
-"\n"
-"  Emulate a fill-in form with -F. Let's say you fill in three fields in a\n"
-"  form. One field is a file name which to post, one field is your name and one\n"
-, stdout);
- fputs(
-"  field is a file description. We want to post the file we have written named\n"
-"  \"cooltext.txt\". To let curl do the posting of this data instead of your\n"
-"  favourite browser, you have to read the HTML source of the form page and\n"
-"  find the names of the input fields. In our example, the input field names\n"
-"  are 'file', 'yourname' and 'filedescription'.\n"
-"\n"
-"        curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
-"             -F \"filedescription=Cool text file with cool text inside\" \\\n"
-, stdout);
- fputs(
-"             http://www.post.com/postit.cgi\n"
-"\n"
-"  To send two files in one post you can do it in two ways:\n"
-"\n"
-"  1. Send multiple files in a single \"field\" with a single field name:\n"
-"\n"
-"        curl -F \"pictures=@dog.gif,cat.gif\"\n"
-"\n"
-"  2. Send two fields with two field names:\n"
-"\n"
-"        curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
-"\n"
-"  To send a field value literally without interpreting a leading '@'\n"
-"  or '<', or an embedded ';type=', use --form-string instead of\n"
-, stdout);
- fputs(
-"  -F. This is recommended when the value is obtained from a user or\n"
-"  some other unpredictable source. Under these circumstances, using\n"
-"  -F instead of --form-string would allow a user to trick curl into\n"
-"  uploading a file.\n"
-"\n"
-"REFERRER\n"
-"\n"
-"  A HTTP request has the option to include information about which address\n"
-"  that referred to actual page.  Curl allows you to specify the\n"
-"  referrer to be used on the command line. It is especially useful to\n"
-, stdout);
- fputs(
-"  fool or trick stupid servers or CGI scripts that rely on that information\n"
-"  being available or contain certain data.\n"
-"\n"
-"        curl -e www.coolsite.com http://www.showme.com/\n"
-"\n"
-"  NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.\n"
-"\n"
-"USER AGENT\n"
-"\n"
-"  A HTTP request has the option to include information about the browser\n"
-"  that generated the request. Curl allows it to be specified on the command\n"
-"  line. It is especially useful to fool or trick stupid servers or CGI\n"
-, stdout);
- fputs(
-"  scripts that only accept certain browsers.\n"
-"\n"
-"  Example:\n"
-"\n"
-"  curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n"
-"\n"
-"  Other common strings:\n"
-"    'Mozilla/3.0 (Win95; I)'     Netscape Version 3 for Windows 95\n"
-"    'Mozilla/3.04 (Win95; U)'    Netscape Version 3 for Windows 95\n"
-"    'Mozilla/2.02 (OS/2; U)'     Netscape Version 2 for OS/2\n"
-"    'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)'           NS for AIX\n"
-"    'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)'      NS for Linux\n"
-"\n"
-, stdout);
- fputs(
-"  Note that Internet Explorer tries hard to be compatible in every way:\n"
-"    'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)'    MSIE for W95\n"
-"\n"
-"  Mozilla is not the only possible User-Agent name:\n"
-"    'Konqueror/1.0'             KDE File Manager desktop client\n"
-"    'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
-"\n"
-"COOKIES\n"
-"\n"
-"  Cookies are generally used by web servers to keep state information at the\n"
-"  client's side. The server sets cookies by sending a response line in the\n"
-, stdout);
- fputs(
-"  headers that looks like 'Set-Cookie: <data>' where the data part then\n"
-"  typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
-"  like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
-"  path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
-"  cookie should expire (\"expire=DATE\"), for what domain to use it\n"
-"  (\"domain=NAME\") and if it should be used on secure connections only\n"
-"  (\"secure\").\n"
-"\n"
-, stdout);
- fputs(
-"  If you've received a page from a server that contains a header like:\n"
-"        Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
-"\n"
-"  it means the server wants that first pair passed on when we get anything in\n"
-"  a path beginning with \"/foo\".\n"
-"\n"
-"  Example, get a page that wants my name passed in a cookie:\n"
-"\n"
-"        curl -b \"name=Daniel\" www.sillypage.com\n"
-"\n"
-"  Curl also has the ability to use previously received cookies in following\n"
-"  sessions. If you get cookies from a server and store them in a file in a\n"
-, stdout);
- fputs(
-"  manner similar to:\n"
-"\n"
-"        curl --dump-header headers www.example.com\n"
-"\n"
-"  ... you can then in a second connect to that (or another) site, use the\n"
-"  cookies from the 'headers' file like:\n"
-"\n"
-"        curl -b headers www.example.com\n"
-"\n"
-"  While saving headers to a file is a working way to store cookies, it is\n"
-"  however error-prone and not the preferred way to do this. Instead, make curl\n"
-"  save the incoming cookies using the well-known netscape cookie format like\n"
-"  this:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -c cookies.txt www.example.com\n"
-"\n"
-"  Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
-"  you can make curl follow a location: (which often is used in combination\n"
-"  with cookies). So that if a site sends cookies and a location, you can\n"
-"  use a non-existing file to trigger the cookie awareness like:\n"
-"\n"
-"        curl -L -b empty.txt www.example.com\n"
-"\n"
-"  The file to read cookies from must be formatted using plain HTTP headers OR\n"
-, stdout);
- fputs(
-"  as netscape's cookie file. Curl will determine what kind it is based on the\n"
-"  file contents.  In the above command, curl will parse the header and store\n"
-"  the cookies received from www.example.com.  curl will send to the server the\n"
-"  stored cookies which match the request as it follows the location.  The\n"
-"  file \"empty.txt\" may be a nonexistent file.\n"
-"\n"
-"  Alas, to both read and write cookies from a netscape cookie file, you can\n"
-"  set both -b and -c to use the same file:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -b cookies.txt -c cookies.txt www.example.com\n"
-"\n"
-"PROGRESS METER\n"
-"\n"
-"  The progress meter exists to show a user that something actually is\n"
-"  happening. The different fields in the output have the following meaning:\n"
-"\n"
-"  % Total    % Received % Xferd  Average Speed          Time             Curr.\n"
-"                                 Dload  Upload Total    Current  Left    Speed\n"
-"  0  151M    0 38608    0     0   9406      0  4:41:43  0:00:04  4:41:39  9287\n"
-"\n"
-"  From left-to-right:\n"
-, stdout);
- fputs(
-"   %             - percentage completed of the whole transfer\n"
-"   Total         - total size of the whole expected transfer\n"
-"   %             - percentage completed of the download\n"
-"   Received      - currently downloaded amount of bytes\n"
-"   %             - percentage completed of the upload\n"
-"   Xferd         - currently uploaded amount of bytes\n"
-"   Average Speed\n"
-"   Dload         - the average transfer speed of the download\n"
-"   Average Speed\n"
-"   Upload        - the average transfer speed of the upload\n"
-, stdout);
- fputs(
-"   Time Total    - expected time to complete the operation\n"
-"   Time Current  - time passed since the invoke\n"
-"   Time Left     - expected time left to completion\n"
-"   Curr.Speed    - the average transfer speed the last 5 seconds (the first\n"
-"                   5 seconds of a transfer is based on less time of course.)\n"
-"\n"
-"  The -# option will display a totally different progress bar that doesn't\n"
-"  need much explanation!\n"
-"\n"
-"SPEED LIMIT\n"
-"\n"
-, stdout);
- fputs(
-"  Curl allows the user to set the transfer speed conditions that must be met\n"
-"  to let the transfer keep going. By using the switch -y and -Y you\n"
-"  can make curl abort transfers if the transfer speed is below the specified\n"
-"  lowest limit for a specified time.\n"
-"\n"
-"  To have curl abort the download if the speed is slower than 3000 bytes per\n"
-"  second for 1 minute, run:\n"
-"\n"
-"        curl -Y 3000 -y 60 www.far-away-site.com\n"
-"\n"
-"  This can very well be used in combination with the overall time limit, so\n"
-, stdout);
- fputs(
-"  that the above operation must be completed in whole within 30 minutes:\n"
-"\n"
-"        curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n"
-"\n"
-"  Forcing curl not to transfer data faster than a given rate is also possible,\n"
-"  which might be useful if you're using a limited bandwidth connection and you\n"
-"  don't want your transfer to use all of it (sometimes referred to as\n"
-"  \"bandwidth throttle\").\n"
-"\n"
-"  Make curl transfer data no faster than 10 kilobytes per second:\n"
-"\n"
-, stdout);
- fputs(
-"        curl --limit-rate 10K www.far-away-site.com\n"
-"\n"
-"    or\n"
-"\n"
-"        curl --limit-rate 10240 www.far-away-site.com\n"
-"\n"
-"  Or prevent curl from uploading data faster than 1 megabyte per second:\n"
-"\n"
-"        curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n"
-"\n"
-"  When using the --limit-rate option, the transfer rate is regulated on a\n"
-"  per-second basis, which will cause the total transfer speed to become lower\n"
-"  than the given number. Sometimes of course substantially lower, if your\n"
-, stdout);
- fputs(
-"  transfer stalls during periods.\n"
-"\n"
-"CONFIG FILE\n"
-"\n"
-"  Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
-"  systems) from the user's home dir on startup.\n"
-"\n"
-"  The config file could be made up with normal command line switches, but you\n"
-"  can also specify the long options without the dashes to make it more\n"
-"  readable. You can separate the options and the parameter with spaces, or\n"
-"  with = or :. Comments can be used within the file. If the first letter on a\n"
-, stdout);
- fputs(
-"  line is a '#'-symbol the rest of the line is treated as a comment.\n"
-"\n"
-"  If you want the parameter to contain spaces, you must enclose the entire\n"
-"  parameter within double quotes (\"). Within those quotes, you specify a\n"
-"  quote as \\\".\n"
-"\n"
-"  NOTE: You must specify options and their arguments on the same line.\n"
-"\n"
-"  Example, set default time out and proxy in a config file:\n"
-"\n"
-"        # We want a 30 minute timeout:\n"
-"        -m 1800\n"
-"        # ... and we use a proxy for all accesses:\n"
-, stdout);
- fputs(
-"        proxy = proxy.our.domain.com:8080\n"
-"\n"
-"  White spaces ARE significant at the end of lines, but all white spaces\n"
-"  leading up to the first characters of each line are ignored.\n"
-"\n"
-"  Prevent curl from reading the default file by using -q as the first command\n"
-"  line parameter, like:\n"
-"\n"
-"        curl -q www.thatsite.com\n"
-"\n"
-"  Force curl to get and display a local help page in case it is invoked\n"
-"  without URL by making a config file similar to:\n"
-"\n"
-"        # default url to get\n"
-, stdout);
- fputs(
-"        url = \"http://help.with.curl.com/curlhelp.html\"\n"
-"\n"
-"  You can specify another config file to be read by using the -K/--config\n"
-"  flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
-"  which can be handy if you want to hide options from being visible in process\n"
-"  tables etc:\n"
-"\n"
-"        echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n"
-"\n"
-"EXTRA HEADERS\n"
-"\n"
-"  When using curl in your own very special programs, you may end up needing\n"
-, stdout);
- fputs(
-"  to pass on your own custom headers when getting a web page. You can do\n"
-"  this by using the -H flag.\n"
-"\n"
-"  Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
-"  page:\n"
-"\n"
-"        curl -H \"X-you-and-me: yes\" www.love.com\n"
-"\n"
-"  This can also be useful in case you want curl to send a different text in a\n"
-"  header than it normally does. The -H header you specify then replaces the\n"
-"  header curl would normally send. If you replace an internal header with an\n"
-, stdout);
- fputs(
-"  empty one, you prevent that header from being sent. To prevent the Host:\n"
-"  header from being used:\n"
-"\n"
-"        curl -H \"Host:\" www.server.com\n"
-"\n"
-"FTP and PATH NAMES\n"
-"\n"
-"  Do note that when getting files with the ftp:// URL, the given path is\n"
-"  relative the directory you enter. To get the file 'README' from your home\n"
-"  directory at your ftp site, do:\n"
-"\n"
-"        curl ftp://user:passwd@my.site.com/README\n"
-"\n"
-"  But if you want the README file from the root directory of that very same\n"
-, stdout);
- fputs(
-"  site, you need to specify the absolute file name:\n"
-"\n"
-"        curl ftp://user:passwd@my.site.com//README\n"
-"\n"
-"  (I.e with an extra slash in front of the file name.)\n"
-"\n"
-"SFTP and SCP and PATH NAMES\n"
-"\n"
-"  With sftp: and scp: URLs, the path name given is the absolute name on the\n"
-"  server. To access a file relative to the remote user's home directory,\n"
-"  prefix the file with /~/ , such as:\n"
-"\n"
-"        curl -u $USER sftp://home.example.com/~/.bashrc\n"
-"\n"
-"FTP and firewalls\n"
-"\n"
-, stdout);
- fputs(
-"  The FTP protocol requires one of the involved parties to open a second\n"
-"  connection as soon as data is about to get transfered. There are two ways to\n"
-"  do this.\n"
-"\n"
-"  The default way for curl is to issue the PASV command which causes the\n"
-"  server to open another port and await another connection performed by the\n"
-"  client. This is good if the client is behind a firewall that don't allow\n"
-"  incoming connections.\n"
-"\n"
-"        curl ftp.download.com\n"
-"\n"
-, stdout);
- fputs(
-"  If the server for example, is behind a firewall that don't allow connections\n"
-"  on other ports than 21 (or if it just doesn't support the PASV command), the\n"
-"  other way to do it is to use the PORT command and instruct the server to\n"
-"  connect to the client on the given (as parameters to the PORT command) IP\n"
-"  number and port.\n"
-"\n"
-"  The -P flag to curl supports a few different options. Your machine may have\n"
-"  several IP-addresses and/or network interfaces and curl allows you to select\n"
-, stdout);
- fputs(
-"  which of them to use. Default address can also be used:\n"
-"\n"
-"        curl -P - ftp.download.com\n"
-"\n"
-"  Download with PORT but use the IP address of our 'le0' interface (this does\n"
-"  not work on windows):\n"
-"\n"
-"        curl -P le0 ftp.download.com\n"
-"\n"
-"  Download with PORT but use 192.168.0.10 as our IP address to use:\n"
-"\n"
-"        curl -P 192.168.0.10 ftp.download.com\n"
-"\n"
-"NETWORK INTERFACE\n"
-"\n"
-"  Get a web page from a server using a specified port for the interface:\n"
-"\n"
-, stdout);
- fputs(
-"        curl --interface eth0:1 http://www.netscape.com/\n"
-"\n"
-"  or\n"
-"\n"
-"        curl --interface 192.168.1.10 http://www.netscape.com/\n"
-"\n"
-"HTTPS\n"
-"\n"
-"  Secure HTTP requires SSL libraries to be installed and used when curl is\n"
-"  built. If that is done, curl is capable of retrieving and posting documents\n"
-"  using the HTTPS protocol.\n"
-"\n"
-"  Example:\n"
-"\n"
-"        curl https://www.secure-site.com\n"
-"\n"
-"  Curl is also capable of using your personal certificates to get/post files\n"
-, stdout);
- fputs(
-"  from sites that require valid certificates. The only drawback is that the\n"
-"  certificate needs to be in PEM-format. PEM is a standard and open format to\n"
-"  store certificates with, but it is not used by the most commonly used\n"
-"  browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n"
-"  want curl to use the certificates you use with your (favourite) browser, you\n"
-"  may need to download/compile a converter that can convert your browser's\n"
-, stdout);
- fputs(
-"  formatted certificates to PEM formatted ones. This kind of converter is\n"
-"  included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
-"  N. Henson has written a patch for SSLeay that adds this functionality. You\n"
-"  can get his patch (that requires an SSLeay installation) from his site at:\n"
-"  http://www.drh-consultancy.demon.co.uk/\n"
-"\n"
-"  Example on how to automatically retrieve a document using a certificate with\n"
-"  a personal password:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -E /path/to/cert.pem:password https://secure.site.com/\n"
-"\n"
-"  If you neglect to specify the password on the command line, you will be\n"
-"  prompted for the correct password before any data can be received.\n"
-"\n"
-"  Many older SSL-servers have problems with SSLv3 or TLS, that newer versions\n"
-"  of OpenSSL etc is using, therefore it is sometimes useful to specify what\n"
-"  SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n"
-"  version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n"
-, stdout);
- fputs(
-"\n"
-"        curl -2 https://secure.site.com/\n"
-"\n"
-"  Otherwise, curl will first attempt to use v3 and then v2.\n"
-"\n"
-"  To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
-"  formatted one that curl can use, do something like this (assuming netscape,\n"
-"  but IE is likely to work similarly):\n"
-"\n"
-"    You start with hitting the 'security' menu button in netscape.\n"
-"\n"
-"    Select 'certificates->yours' and then pick a certificate in the list\n"
-"\n"
-"    Press the 'export' button\n"
-"\n"
-, stdout);
- fputs(
-"    enter your PIN code for the certs\n"
-"\n"
-"    select a proper place to save it\n"
-"\n"
-"    Run the 'openssl' application to convert the certificate. If you cd to the\n"
-"    openssl installation, you can do it like:\n"
-"\n"
-"     # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n"
-"\n"
-"\n"
-"RESUMING FILE TRANSFERS\n"
-"\n"
-" To continue a file transfer where it was previously aborted, curl supports\n"
-" resume on http(s) downloads as well as ftp uploads and downloads.\n"
-"\n"
-" Continue downloading a document:\n"
-"\n"
-, stdout);
- fputs(
-"        curl -C - -o file ftp://ftp.server.com/path/file\n"
-"\n"
-" Continue uploading a document(*1):\n"
-"\n"
-"        curl -C - -T file ftp://ftp.server.com/path/file\n"
-"\n"
-" Continue downloading a document from a web server(*2):\n"
-"\n"
-"        curl -C - -o file http://www.server.com/\n"
-"\n"
-" (*1) = This requires that the ftp server supports the non-standard command\n"
-"        SIZE. If it doesn't, curl will say so.\n"
-"\n"
-" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n"
-"        doesn't, curl will say so.\n"
-"\n"
-, stdout);
- fputs(
-"TIME CONDITIONS\n"
-"\n"
-" HTTP allows a client to specify a time condition for the document it\n"
-" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to\n"
-" specify them with the -z/--time-cond flag.\n"
-"\n"
-" For example, you can easily make a download that only gets performed if the\n"
-" remote file is newer than a local copy. It would be made like:\n"
-"\n"
-"        curl -z local.html http://remote.server.com/remote.html\n"
-"\n"
-" Or you can download a file only if the local file is newer than the remote\n"
-, stdout);
- fputs(
-" one. Do this by prepending the date string with a '-', as in:\n"
-"\n"
-"        curl -z -local.html http://remote.server.com/remote.html\n"
-"\n"
-" You can specify a \"free text\" date as condition. Tell curl to only download\n"
-" the file if it was updated since January 12, 2012:\n"
-"\n"
-"        curl -z \"Jan 12 2012\" http://remote.server.com/remote.html\n"
-"\n"
-" Curl will then accept a wide range of date formats. You always make the date\n"
-" check the other way around by prepending it with a dash '-'.\n"
-"\n"
-"DICT\n"
-"\n"
-"  For fun try\n"
-"\n"
-, stdout);
- fputs(
-"        curl dict://dict.org/m:curl\n"
-"        curl dict://dict.org/d:heisenbug:jargon\n"
-"        curl dict://dict.org/d:daniel:web1913\n"
-"\n"
-"  Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
-"  and 'lookup'. For example,\n"
-"\n"
-"        curl dict://dict.org/find:curl\n"
-"\n"
-"  Commands that break the URL description of the RFC (but not the DICT\n"
-"  protocol) are\n"
-"\n"
-"        curl dict://dict.org/show:db\n"
-"        curl dict://dict.org/show:strat\n"
-"\n"
-, stdout);
- fputs(
-"  Authentication is still missing (but this is not required by the RFC)\n"
-"\n"
-"LDAP\n"
-"\n"
-"  If you have installed the OpenLDAP library, curl can take advantage of it\n"
-"  and offer ldap:// support.\n"
-"\n"
-"  LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
-"  advice you to dig up the syntax description for that elsewhere. Two places\n"
-"  that might suit you are:\n"
-"\n"
-"  Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n"
-"  Working with LDAP URLs\":\n"
-, stdout);
- fputs(
-"  http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n"
-"\n"
-"  RFC 2255, \"The LDAP URL Format\" http://curl.haxx.se/rfc/rfc2255.txt\n"
-"\n"
-"  To show you an example, this is now I can get all people from my local LDAP\n"
-"  server that has a certain sub-domain in their email address:\n"
-"\n"
-"        curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
-"\n"
-"  If I want the same info in HTML format, I can get it by not using the -B\n"
-"  (enforce ASCII) flag.\n"
-"\n"
-"ENVIRONMENT VARIABLES\n"
-"\n"
-, stdout);
- fputs(
-"  Curl reads and understands the following environment variables:\n"
-"\n"
-"        http_proxy, HTTPS_PROXY, FTP_PROXY\n"
-"\n"
-"  They should be set for protocol-specific proxies. General proxy should be\n"
-"  set with\n"
-"\n"
-"        ALL_PROXY\n"
-"\n"
-"  A comma-separated list of host names that shouldn't go through any proxy is\n"
-"  set in (only an asterisk, '*' matches all hosts)\n"
-"\n"
-"        NO_PROXY\n"
-"\n"
-"  If the host name matches one of these strings, or the host is within the\n"
-, stdout);
- fputs(
-"  domain of one of these strings, transactions with that node will not be\n"
-"  proxied.\n"
-"\n"
-"\n"
-"  The usage of the -x/--proxy flag overrides the environment variables.\n"
-"\n"
-"NETRC\n"
-"\n"
-"  Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
-"  to specify name and password for commonly visited ftp sites in a file so\n"
-"  that you don't have to type them in each time you visit those sites. You\n"
-"  realize this is a big security risk if someone else gets hold of your\n"
-, stdout);
- fputs(
-"  passwords, so therefore most unix programs won't read this file unless it is\n"
-"  only readable by yourself (curl doesn't care though).\n"
-"\n"
-"  Curl supports .netrc files if told so (using the -n/--netrc and\n"
-"  --netrc-optional options). This is not restricted to only ftp,\n"
-"  but curl can use it for all protocols where authentication is used.\n"
-"\n"
-"  A very simple .netrc file could look something like:\n"
-"\n"
-"        machine curl.haxx.se login iamdaniel password mysecret\n"
-"\n"
-"CUSTOM OUTPUT\n"
-"\n"
-, stdout);
- fputs(
-"  To better allow script programmers to get to know about the progress of\n"
-"  curl, the -w/--write-out option was introduced. Using this, you can specify\n"
-"  what information from the previous transfer you want to extract.\n"
-"\n"
-"  To display the amount of bytes downloaded together with some text and an\n"
-"  ending newline:\n"
-"\n"
-"        curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
-"\n"
-"KERBEROS FTP TRANSFER\n"
-"\n"
-"  Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need\n"
-, stdout);
- fputs(
-"  the kerberos package installed and used at curl build time for it to be\n"
-"  used.\n"
-"\n"
-"  First, get the krb-ticket the normal way, like with the kinit/kauth tool.\n"
-"  Then use curl in way similar to:\n"
-"\n"
-"        curl --krb private ftp://krb4site.com -u username:fakepwd\n"
-"\n"
-"  There's no use for a password on the -u switch, but a blank one will make\n"
-"  curl ask for one and you already entered the real password to kinit/kauth.\n"
-"\n"
-"TELNET\n"
-"\n"
-, stdout);
- fputs(
-"  The curl telnet support is basic and very easy to use. Curl passes all data\n"
-"  passed to it on stdin to the remote server. Connect to a remote telnet\n"
-"  server using a command line similar to:\n"
-"\n"
-"        curl telnet://remote.server.com\n"
-"\n"
-"  And enter the data to pass to the server on stdin. The result will be sent\n"
-"  to stdout or to the file you specify with -o.\n"
-"\n"
-"  You might want the -N/--no-buffer option to switch off the buffered output\n"
-"  for slow connections or similar.\n"
-"\n"
-, stdout);
- fputs(
-"  Pass options to the telnet protocol negotiation, by using the -t option. To\n"
-"  tell the server we use a vt100 terminal, try something like:\n"
-"\n"
-"        curl -tTTYPE=vt100 telnet://remote.server.com\n"
-"\n"
-"  Other interesting options for it -t include:\n"
-"\n"
-"   - XDISPLOC=<X display> Sets the X display location.\n"
-"\n"
-"   - NEW_ENV=<var,val> Sets an environment variable.\n"
-"\n"
-"  NOTE: the telnet protocol does not specify any way to login with a specified\n"
-, stdout);
- fputs(
-"  user and password so curl can't do that automatically. To do that, you need\n"
-"  to track when the login prompt is received and send the username and\n"
-"  password accordingly.\n"
-"\n"
-"PERSISTENT CONNECTIONS\n"
-"\n"
-"  Specifying multiple files on a single command line will make curl transfer\n"
-"  all of them, one after the other in the specified order.\n"
-"\n"
-"  libcurl will attempt to use persistent connections for the transfers so that\n"
-"  the second transfer to the same host can use the same connection that was\n"
-, stdout);
- fputs(
-"  already initiated and was left open in the previous transfer. This greatly\n"
-"  decreases connection time for all but the first transfer and it makes a far\n"
-"  better use of the network.\n"
-"\n"
-"  Note that curl cannot use persistent connections for transfers that are used\n"
-"  in subsequence curl invokes. Try to stuff as many URLs as possible on the\n"
-"  same command line if they are using the same host, as that'll make the\n"
-"  transfers faster. If you use a http proxy for file transfers, practically\n"
-, stdout);
- fputs(
-"  all transfers will be persistent.\n"
-"\n"
-"MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE\n"
-"\n"
-"  As is mentioned above, you can download multiple files with one command line\n"
-"  by simply adding more URLs. If you want those to get saved to a local file\n"
-"  instead of just printed to stdout, you need to add one save option for each\n"
-"  URL you specify. Note that this also goes for the -O option (but not\n"
-"  --remote-name-all).\n"
-"\n"
-"  For example: get two files and use -O for the first and a custom file\n"
-, stdout);
- fputs(
-"  name for the second:\n"
-"\n"
-"    curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg\n"
-"\n"
-"  You can also upload multiple files in a similar fashion:\n"
-"\n"
-"    curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt\n"
-"\n"
-"IPv6\n"
-"\n"
-"  curl will connect to a server with IPv6 when a host lookup returns an IPv6\n"
-"  address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6\n"
-"  options can specify which address to use when both are available. IPv6\n"
-, stdout);
- fputs(
-"  addresses can also be specified directly in URLs using the syntax:\n"
-"\n"
-"    http://[2001:1890:1112:1::20]/overview.html\n"
-"\n"
-"  When this style is used, the -g option must be given to stop curl from\n"
-"  interpreting the square brackets as special globbing characters.  Link local\n"
-"  and site local addresses including a scope identifier, such as fe80::1234%1,\n"
-"  may also be used, but the scope portion must be numeric and the percent\n"
-"  character must be URL escaped. The previous example in an SFTP URL might\n"
-, stdout);
- fputs(
-"  look like:\n"
-"\n"
-"    sftp://[fe80::1234%251]/\n"
-"\n"
-"  IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface\n"
-"  or --ftp-port options) should not be URL encoded.\n"
-"\n"
-"\n"
-"MAILING LISTS\n"
-"\n"
-"  For your convenience, we have several open mailing lists to discuss curl,\n"
-"  its development and things relevant to this. Get all info at\n"
-"  http://curl.haxx.se/mail/. Some of the lists available are:\n"
-"\n"
-"  curl-users\n"
-"\n"
-"    Users of the command line tool. How to use it, what doesn't work, new\n"
-, stdout);
- fputs(
-"    features, related tools, questions, news, installations, compilations,\n"
-"    running, porting etc.\n"
-"\n"
-"  curl-library\n"
-"\n"
-"    Developers using or developing libcurl. Bugs, extensions, improvements.\n"
-"\n"
-"  curl-announce\n"
-"\n"
-"    Low-traffic. Only receives announcements of new public versions. At worst,\n"
-"    that makes something like one or two mails per month, but usually only one\n"
-"    mail every second month.\n"
-"\n"
-"  curl-and-php\n"
-"\n"
-"    Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n"
-, stdout);
- fputs(
-"    with a curl angle.\n"
-"\n"
-"  curl-and-python\n"
-"\n"
-"    Python hackers using curl with or without the python binding pycurl.\n"
-"\n"
-"  Please direct curl questions, feature requests and trouble reports to one of\n"
-"  these mailing lists instead of mailing any individual.\n"
-, stdout) ;
-}
-#endif /* USE_MANUAL */
-#else
-/*
- * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
- * Generation time: Wed Dec 15 15:06:02 2010
- */
-#include "setup.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <zlib.h>
-static const unsigned char hugehelpgz[] = {
-  /* This mumbo-jumbo is the huge help text compressed with gzip.
-     Thanks to this operation, the size of this data shrunk from 133613
-     to 41166 bytes. You can disable the use of compressed help
-     texts by NOT passing -c to the mkhelp.pl tool. */
-  0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
-  0x69, 0x7b, 0x23, 0xc7, 0x91, 0x2e, 0xfa, 0x9d, 0xbf, 0xa2, 0x0c, 0x5d,
-  0x1b, 0xa4, 0x0d, 0x80, 0x4b, 0x2f, 0x52, 0xd3, 0xdd, 0x1a, 0x51, 0x24,
-  0x5b, 0xe2, 0x88, 0xdd, 0xe4, 0x21, 0xd8, 0x5a, 0x8e, 0xac, 0xa7, 0x9f,
-  0x02, 0x50, 0x24, 0xcb, 0x04, 0x50, 0x70, 0x55, 0x81, 0x24, 0xe4, 0xf1,
-  0xfc, 0xf6, 0x1b, 0xf1, 0x46, 0x44, 0x66, 0xd6, 0x02, 0x76, 0xcb, 0x96,
-  0x3c, 0xf7, 0x9c, 0xe7, 0x7a, 0x46, 0x4d, 0x12, 0xa8, 0xca, 0x35, 0x32,
-  0x32, 0xd6, 0x37, 0xa2, 0xe8, 0x43, 0xff, 0x7b, 0x8f, 0xff, 0xde, 0xd3,
-  0xff, 0xe8, 0xe7, 0x46, 0x14, 0x9d, 0xe7, 0xd9, 0x5f, 0x93, 0x71, 0xd9,
-  0xfe, 0xec, 0xfb, 0xf7, 0xff, 0x15, 0xc9, 0xff, 0xd1, 0x3b, 0x7f, 0xa1,
-  0x9f, 0x1b, 0x8f, 0xb6, 0xbd, 0x1d, 0xf9, 0x17, 0xfe, 0xeb, 0xfd, 0x56,
-  0xf4, 0xa1, 0x17, 0xfe, 0x2b, 0xda, 0xc4, 0x0b, 0xef, 0xb5, 0x87, 0x97,
-  0xfc, 0xfb, 0xfb, 0xf7, 0x8f, 0x77, 0xf2, 0x17, 0x1e, 0x15, 0xff, 0xb3,
-  0xcd, 0xef, 0xfd, 0xe5, 0x3d, 0xff, 0x4a, 0x9f, 0x6c, 0x6c, 0xbc, 0x3d,
-  0x78, 0x73, 0x6c, 0xaf, 0x8e, 0x97, 0xf9, 0x34, 0xea, 0x47, 0x65, 0x1e,
-  0xcf, 0x8b, 0xab, 0x24, 0x8f, 0xe2, 0xe8, 0xdd, 0xc5, 0xe9, 0xc6, 0xc6,
-  0xf0, 0x87, 0xb7, 0x67, 0xe7, 0xc3, 0x93, 0x61, 0xe5, 0xb1, 0x1f, 0xb3,
-  0x45, 0x99, 0x66, 0xf3, 0xe2, 0xa7, 0xe8, 0x47, 0x7a, 0x68, 0x30, 0x18,
-  0xfc, 0xb4, 0xb1, 0x71, 0x74, 0x3c, 0x3c, 0xbc, 0x38, 0x39, 0xbf, 0x3c,
-  0x39, 0x7b, 0x5b, 0x79, 0x36, 0x4a, 0x8b, 0x88, 0x1a, 0x2b, 0xb3, 0x6c,
-  0x4a, 0xff, 0xf8, 0xf6, 0x27, 0x71, 0x19, 0x47, 0x57, 0x79, 0x36, 0x8b,
-  0xb2, 0x9c, 0xbf, 0x88, 0xa3, 0x22, 0xc9, 0xef, 0x92, 0xbc, 0x17, 0x2d,
-  0x8b, 0x74, 0x7e, 0x1d, 0x65, 0xf3, 0x24, 0xca, 0xae, 0xa2, 0xf2, 0x26,
-  0xb1, 0xe6, 0x8a, 0xe5, 0x62, 0x91, 0xe5, 0x65, 0x32, 0x89, 0x16, 0x79,
-  0x56, 0x66, 0xe3, 0x6c, 0x5a, 0x44, 0x9b, 0x47, 0x27, 0x87, 0x97, 0xbd,
-  0xe8, 0xf5, 0xc9, 0xe9, 0x31, 0xfd, 0x7b, 0x79, 0x8e, 0x7f, 0x86, 0xbd,
-  0xe8, 0xab, 0xb3, 0xf3, 0xaf, 0x8f, 0x2f, 0x7a, 0xd1, 0xd7, 0x97, 0xfc,
-  0x19, 0xff, 0x4b, 0x1f, 0x46, 0x27, 0x6f, 0x0e, 0xce, 0x7b, 0xd6, 0x1c,
-  0xff, 0xc1, 0x1f, 0x9e, 0x1e, 0xd1, 0x87, 0xf2, 0x83, 0xff, 0x3c, 0x3f,
-  0x3b, 0x7f, 0xd2, 0xc3, 0xbf, 0xf4, 0xd7, 0xc5, 0xe5, 0x9b, 0x73, 0xfe,
-  0x77, 0x48, 0xff, 0x0e, 0x0f, 0xf9, 0x1f, 0xf4, 0x31, 0x7c, 0x63, 0xff,
-  0x0e, 0x5d, 0x73, 0x97, 0xc7, 0xa7, 0x6f, 0x8f, 0x2f, 0xa3, 0x78, 0x3e,
-  0x89, 0x2e, 0xe9, 0xa1, 0xad, 0x01, 0x7d, 0x74, 0x93, 0x44, 0xe3, 0x6c,
-  0x36, 0xe3, 0xcf, 0x68, 0x15, 0x26, 0x49, 0x91, 0x5e, 0xcf, 0x69, 0xf8,
-  0x34, 0xdb, 0xfb, 0x2c, 0xbf, 0x8d, 0xee, 0xd3, 0xf2, 0x26, 0x5b, 0x96,
-  0x34, 0x61, 0x5a, 0x8f, 0x28, 0x9d, 0x97, 0x49, 0xde, 0xb7, 0xe6, 0xe2,
-  0x31, 0xaf, 0xf0, 0x60, 0xa3, 0xb2, 0x96, 0xd9, 0x15, 0xad, 0x5c, 0x41,
-  0x4b, 0x35, 0x5a, 0x16, 0xd3, 0x2c, 0x9e, 0xf0, 0x02, 0xd1, 0xcb, 0x57,
-  0x4b, 0x5a, 0xda, 0x3c, 0x1d, 0xdf, 0x16, 0xd1, 0x34, 0xbd, 0x4d, 0x78,
-  0x79, 0x1e, 0x56, 0xb6, 0x5c, 0x3d, 0x69, 0x3e, 0x5e, 0xd2, 0x4a, 0xce,
-  0x5d, 0xf3, 0x65, 0x3a, 0x8e, 0xb9, 0x03, 0xac, 0x57, 0xb4, 0x5c, 0x70,
-  0x6b, 0xb2, 0x4e, 0xd1, 0x22, 0x2b, 0xe8, 0xa5, 0xe1, 0xf0, 0x94, 0xc6,
-  0x3e, 0x9f, 0x27, 0x18, 0x47, 0xd1, 0xa3, 0x3f, 0xb2, 0xdb, 0x34, 0xa1,
-  0x5f, 0xae, 0xd2, 0x69, 0x12, 0xc9, 0x3e, 0xba, 0xe6, 0x78, 0x43, 0xf3,
-  0xa4, 0x58, 0xce, 0x12, 0x2c, 0xc0, 0x2c, 0xcb, 0x93, 0x41, 0x74, 0x50,
-  0x44, 0xab, 0x6c, 0x49, 0xb3, 0x9c, 0x4e, 0x69, 0x6f, 0x93, 0x68, 0x94,
-  0x4c, 0xb3, 0xfb, 0x1e, 0xef, 0x68, 0x34, 0x5f, 0xce, 0x46, 0xf4, 0x0a,
-  0x0d, 0xff, 0x2a, 0x89, 0xcb, 0x25, 0xbd, 0x8a, 0xc7, 0xac, 0xb9, 0x59,
-  0x4c, 0xb3, 0xa0, 0x77, 0xf3, 0xe8, 0x26, 0xa1, 0x59, 0x16, 0x8b, 0x74,
-  0xfe, 0xbb, 0xea, 0x4a, 0xd0, 0x72, 0x2e, 0xb2, 0xfb, 0x24, 0xa7, 0xd5,
-  0x1c, 0xad, 0x22, 0x9a, 0xf6, 0x48, 0x88, 0xed, 0x8a, 0x88, 0x29, 0x8a,
-  0xa9, 0x43, 0x47, 0x68, 0xfd, 0x3c, 0x99, 0xc6, 0x4c, 0x34, 0xae, 0x2b,
-  0xda, 0x99, 0x61, 0xe2, 0xa8, 0x4a, 0x5f, 0xdd, 0x7c, 0xb2, 0x85, 0x97,
-  0x27, 0x49, 0x19, 0xa7, 0xd3, 0x82, 0x16, 0x9e, 0xc9, 0xdf, 0xf6, 0x96,
-  0x86, 0xcc, 0xc7, 0x81, 0x68, 0x70, 0x35, 0x2f, 0xe3, 0x07, 0x74, 0xaf,
-  0x34, 0xd8, 0x9f, 0x24, 0x8b, 0x64, 0x3e, 0x49, 0xe6, 0xe5, 0x20, 0xfa,
-  0x21, 0x5b, 0x76, 0xa9, 0xef, 0xab, 0x94, 0xd6, 0x20, 0xd6, 0xa6, 0xa8,
-  0x67, 0xda, 0xf8, 0x71, 0x9e, 0x2e, 0x82, 0xc5, 0xcf, 0xe6, 0xb4, 0xdd,
-  0xd1, 0xc5, 0xeb, 0xc3, 0xe8, 0xc9, 0x8b, 0xcf, 0x9e, 0xfb, 0x5d, 0xa6,
-  0x06, 0xa2, 0x71, 0x3c, 0xa7, 0x19, 0x27, 0xe3, 0xf4, 0x6a, 0x15, 0xcd,
-  0x96, 0xd3, 0x32, 0x5d, 0xd0, 0x7a, 0x53, 0xe7, 0x05, 0x1f, 0x94, 0x45,
-  0x9c, 0x97, 0x05, 0xaf, 0x1b, 0x3e, 0xc0, 0xdc, 0xef, 0xf3, 0xb4, 0xe4,
-  0x03, 0x83, 0xef, 0x68, 0x84, 0x49, 0x59, 0x58, 0x73, 0x4c, 0x60, 0xd4,
-  0xcf, 0x28, 0x8f, 0xc7, 0xb4, 0xc2, 0x71, 0x41, 0x9d, 0xee, 0xbb, 0xbe,
-  0xa2, 0x9b, 0xb2, 0x5c, 0xec, 0x6f, 0x6f, 0x17, 0x69, 0x99, 0x0c, 0xfe,
-  0x4e, 0xc7, 0xad, 0x57, 0xde, 0x67, 0xbd, 0xf2, 0x26, 0x4f, 0x92, 0x7f,
-  0x0c, 0x88, 0x6c, 0xdd, 0x83, 0xd4, 0xed, 0x4a, 0xc7, 0x75, 0x9d, 0x94,
-  0xd4, 0xc1, 0xdf, 0x96, 0xc9, 0x9c, 0x1b, 0xa4, 0x61, 0xc4, 0xd3, 0xc5,
-  0x4d, 0x4c, 0xbb, 0x99, 0x10, 0xf9, 0xf1, 0x01, 0x26, 0x0a, 0xe1, 0x41,
-  0xc9, 0x11, 0xfe, 0xf1, 0xa7, 0x46, 0x9f, 0x57, 0xe8, 0x92, 0xfe, 0x1d,
-  0xe8, 0x4b, 0x31, 0xad, 0x35, 0x75, 0xb6, 0xcd, 0x54, 0xf5, 0xe3, 0x6e,
-  0x7f, 0x77, 0x67, 0xe7, 0xa7, 0x41, 0xf9, 0x50, 0x7e, 0xe4, 0x0b, 0x3b,
-  0x3b, 0xfe, 0x15, 0x7e, 0x7a, 0x93, 0x67, 0x1c, 0x4d, 0x89, 0x68, 0xb8,
-  0xff, 0x9f, 0x93, 0x3c, 0x2b, 0xb6, 0x5a, 0x9a, 0x9a, 0x26, 0x25, 0x9d,
-  0xb5, 0xa0, 0x9d, 0xb8, 0xff, 0xb3, 0x74, 0x6b, 0x0f, 0xbf, 0x4d, 0x0a,
-  0xd0, 0x8c, 0x9f, 0x6c, 0x14, 0xe7, 0x44, 0xb7, 0x59, 0xe9, 0xd9, 0x50,
-  0x8f, 0x8e, 0x61, 0xe9, 0x96, 0x86, 0x4e, 0x19, 0x3d, 0x4d, 0x0c, 0x2c,
-  0x9e, 0x32, 0xef, 0x2a, 0xa2, 0x79, 0xe2, 0xa7, 0x41, 0x27, 0x3e, 0x89,
-  0xc7, 0x37, 0x51, 0x46, 0xc4, 0x9f, 0x37, 0xb7, 0x20, 0x9e, 0xaf, 0x06,
-  0x59, 0x7e, 0xbd, 0x1d, 0xe7, 0xe3, 0x9b, 0xf4, 0x8e, 0xd6, 0xe1, 0xc5,
-  0x8b, 0xe7, 0x7d, 0xfa, 0xe7, 0xc5, 0x4f, 0xdb, 0x77, 0xd9, 0x94, 0x96,
-  0xe5, 0xe9, 0x4f, 0xdb, 0xbc, 0xbb, 0x7f, 0x8f, 0x7b, 0xa3, 0xde, 0xf8,
-  0x1f, 0x83, 0x9b, 0x72, 0x36, 0x5d, 0x4b, 0x33, 0xd4, 0x58, 0x14, 0xcf,
-  0xb2, 0xe5, 0xbc, 0x74, 0x74, 0x42, 0xe4, 0x56, 0x06, 0xbc, 0x68, 0x9a,
-  0xce, 0x13, 0x61, 0x4f, 0x4c, 0x3e, 0x7c, 0x3c, 0xe9, 0x6c, 0xfa, 0xa3,
-  0x5c, 0x8e, 0x6f, 0x68, 0xea, 0x44, 0x37, 0xb1, 0x4e, 0xbf, 0x4c, 0x69,
-  0x4e, 0xf4, 0xe6, 0x9c, 0x8e, 0x6c, 0x2a, 0x4d, 0x49, 0x67, 0x29, 0x3d,
-  0x97, 0xe5, 0x93, 0x24, 0xaf, 0x52, 0x30, 0x86, 0xe3, 0xc7, 0x13, 0xd1,
-  0x52, 0x2e, 0xa8, 0xf3, 0x25, 0x33, 0x38, 0x1c, 0x32, 0x6e, 0x81, 0x8e,
-  0xe7, 0x35, 0xad, 0x12, 0xad, 0x0c, 0x13, 0x15, 0x2f, 0xdc, 0x2a, 0x7a,
-  0x4b, 0x9b, 0x27, 0xac, 0x21, 0xa0, 0x3d, 0xd9, 0xac, 0xe6, 0xa2, 0xdd,
-  0xdf, 0xdf, 0xaf, 0x27, 0xa2, 0xfd, 0xdd, 0x1a, 0x1d, 0x05, 0x2f, 0xb5,
-  0xed, 0xfe, 0xfe, 0x5e, 0x75, 0xff, 0x4f, 0xae, 0xb0, 0xb1, 0x36, 0x07,
-  0x3e, 0xfb, 0xc6, 0xad, 0xed, 0xe0, 0x53, 0x6b, 0xf4, 0x7b, 0x72, 0x95,
-  0x3e, 0xf4, 0xec, 0xaa, 0x93, 0xb5, 0x8c, 0xa9, 0xf9, 0xd9, 0xa2, 0xe4,
-  0x5d, 0xb7, 0xe6, 0xae, 0x97, 0x49, 0x41, 0x24, 0x74, 0x7f, 0x13, 0xd3,
-  0xc7, 0xd6, 0x40, 0x84, 0x2e, 0x66, 0xe9, 0xf5, 0x4d, 0x19, 0xdd, 0xc7,
-  0xcc, 0x3f, 0x4e, 0x4a, 0x69, 0x82, 0x59, 0x35, 0x71, 0x8d, 0xab, 0x98,
-  0x8e, 0x3f, 0xaf, 0x10, 0xf8, 0x32, 0x11, 0x9b, 0x23, 0x27, 0x5a, 0x2b,
-  0x90, 0x52, 0x70, 0x13, 0x8e, 0xe2, 0x82, 0x77, 0x63, 0x4e, 0x9b, 0x5e,
-  0x12, 0xa3, 0x5f, 0xf2, 0x5f, 0x37, 0xc4, 0xca, 0xa3, 0x79, 0x3c, 0x4b,
-  0x74, 0xa0, 0xe0, 0x7d, 0xaf, 0x99, 0x45, 0x26, 0x0f, 0xf1, 0xcc, 0xf1,
-  0x23, 0x62, 0x30, 0x3d, 0x65, 0x9d, 0xee, 0x8d, 0x82, 0x76, 0x8d, 0x28,
-  0x8e, 0x8f, 0x11, 0xce, 0x54, 0x87, 0xcf, 0x4d, 0x47, 0xe6, 0x89, 0x31,
-  0xc6, 0x05, 0xd8, 0x3d, 0x38, 0x3c, 0x0d, 0x3e, 0x98, 0x2c, 0x2d, 0x5a,
-  0x7c, 0xcb, 0xf7, 0x4a, 0xed, 0xf6, 0xc2, 0x6b, 0x93, 0x2c, 0x4a, 0x89,
-  0x83, 0x8d, 0xe8, 0x7c, 0xf1, 0xcc, 0xf8, 0xd4, 0x60, 0x55, 0xb8, 0x9d,
-  0x05, 0xb5, 0xc9, 0x1f, 0xa6, 0x25, 0xf3, 0x0d, 0x08, 0x20, 0x34, 0x5e,
-  0x5a, 0x14, 0xc8, 0x10, 0x74, 0xf6, 0x82, 0xf9, 0x83, 0xe3, 0xd1, 0xb3,
-  0xd1, 0x5d, 0x3c, 0x4d, 0x49, 0x96, 0x48, 0xdc, 0x5b, 0x60, 0xd1, 0x63,
-  0xbe, 0xe0, 0xa6, 0xd3, 0x15, 0x91, 0x5d, 0x9e, 0xb3, 0xb0, 0xc6, 0x3b,
-  0x38, 0x92, 0xc3, 0x31, 0x4b, 0xe8, 0x66, 0x08, 0x97, 0x33, 0x65, 0x26,
-  0x45, 0x44, 0x4a, 0x57, 0x0d, 0xc8, 0x90, 0xae, 0x04, 0x1c, 0x63, 0x4c,
-  0x1c, 0xa3, 0xe3, 0xb6, 0xc7, 0xe3, 0x64, 0x51, 0x16, 0x7e, 0x4e, 0x87,
-  0x7e, 0x29, 0x74, 0xc3, 0x69, 0x38, 0x79, 0xc2, 0x2b, 0x1f, 0xde, 0x9c,
-  0x58, 0x57, 0xc7, 0xc7, 0x71, 0x79, 0xda, 0xd5, 0x44, 0x97, 0x69, 0xe1,
-  0x56, 0xad, 0x04, 0x6d, 0xd0, 0x59, 0xc0, 0x9a, 0xcf, 0x78, 0xa0, 0xfc,
-  0x70, 0x21, 0x32, 0x12, 0xce, 0x1c, 0x6f, 0xa4, 0x08, 0x49, 0xd2, 0x2f,
-  0x73, 0x23, 0x5a, 0x4f, 0xd7, 0x38, 0xf5, 0xea, 0xf6, 0x94, 0xbb, 0x2f,
-  0x48, 0xbc, 0x24, 0xee, 0x3c, 0x29, 0x6e, 0xe8, 0x3e, 0xa5, 0xad, 0xbf,
-  0xbc, 0xe1, 0x99, 0xce, 0x88, 0x66, 0xee, 0x78, 0x7f, 0x17, 0x49, 0x32,
-  0x19, 0x44, 0x67, 0x57, 0x7c, 0x34, 0x73, 0x1a, 0x74, 0x89, 0xaf, 0x99,
-  0x5b, 0xd0, 0xba, 0x4d, 0x20, 0x7f, 0xcd, 0x1d, 0x57, 0xc0, 0x50, 0x82,
-  0x63, 0xcf, 0x94, 0x46, 0x8b, 0x1d, 0x31, 0xa3, 0x9f, 0x56, 0x59, 0x0b,
-  0x44, 0x00, 0x62, 0x01, 0x3c, 0xbc, 0x51, 0x12, 0x81, 0x12, 0x47, 0x49,
-  0x79, 0x9f, 0x24, 0xae, 0xb9, 0x22, 0x21, 0x76, 0xc6, 0x9b, 0x26, 0x97,
-  0xf9, 0xfc, 0x2e, 0xe3, 0x01, 0x6e, 0x6c, 0x9c, 0x5f, 0x9c, 0x7d, 0x75,
-  0x71, 0x3c, 0x1c, 0x46, 0x6f, 0x8e, 0x2f, 0x8f, 0x2f, 0x2a, 0xd4, 0x33,
-  0xcf, 0xf2, 0x19, 0x76, 0x74, 0x92, 0x16, 0x8b, 0x69, 0xbc, 0xe2, 0xad,
-  0xa6, 0x99, 0x5c, 0xe7, 0x7c, 0xb2, 0x66, 0x09, 0xb3, 0x96, 0xc9, 0x32,
-  0x07, 0x59, 0x64, 0x0b, 0xda, 0x3e, 0x15, 0x5b, 0xa8, 0xf1, 0x09, 0x64,
-  0x9d, 0xf9, 0xb5, 0x5f, 0x69, 0xba, 0xcd, 0x95, 0x43, 0x32, 0x8b, 0x74,
-  0xfb, 0xc1, 0xd2, 0x04, 0xe4, 0xd2, 0x9e, 0xff, 0x4c, 0x96, 0xa9, 0xc0,
-  0x9c, 0x88, 0x66, 0xd3, 0x19, 0x64, 0x09, 0xfa, 0xe9, 0x05, 0x88, 0xe4,
-  0x8a, 0xe4, 0x25, 0xe2, 0x9a, 0x35, 0x72, 0x77, 0xe3, 0xc4, 0xba, 0x42,
-  0xdc, 0x65, 0xf9, 0x97, 0x3a, 0xa7, 0xb1, 0xce, 0xd2, 0x39, 0x11, 0x18,
-  0x11, 0xa4, 0x9e, 0x72, 0xa6, 0x04, 0x1a, 0xeb, 0x95, 0xf0, 0x04, 0x5d,
-  0x91, 0xaa, 0x1c, 0x4d, 0x2f, 0xd3, 0x66, 0x13, 0x67, 0x75, 0xd3, 0xc3,
-  0xa0, 0x88, 0x34, 0xa9, 0xf9, 0x78, 0xc4, 0xac, 0x89, 0x05, 0x4b, 0x92,
-  0x06, 0x92, 0xd6, 0xde, 0x9c, 0xa4, 0x4a, 0x6f, 0xd0, 0xd8, 0xe2, 0x11,
-  0xef, 0x28, 0x3f, 0x50, 0x5b, 0x45, 0x3a, 0x44, 0xe0, 0x2d, 0xf7, 0x69,
-  0x81, 0x43, 0x75, 0x9f, 0x2d, 0xa7, 0x24, 0xd2, 0xf1, 0x03, 0xcb, 0x05,
-  0x5e, 0xa0, 0xae, 0x16, 0xfe, 0xf4, 0xcc, 0xd2, 0x07, 0x5e, 0xf5, 0x7a,
-  0x2b, 0x34, 0x34, 0xfa, 0x73, 0x41, 0x9b, 0x20, 0xc3, 0x19, 0xd4, 0x79,
-  0x2b, 0xb8, 0x46, 0x63, 0x0f, 0xf9, 0xb4, 0x80, 0xdd, 0x9d, 0x9f, 0x0d,
-  0x2f, 0x99, 0xfd, 0x9f, 0xbf, 0xbb, 0xa4, 0x86, 0xe8, 0x1a, 0x2a, 0x4a,
-  0xda, 0x4e, 0x7e, 0x71, 0x9e, 0x40, 0x86, 0xb6, 0xe6, 0x68, 0xd7, 0x52,
-  0x1c, 0x71, 0xdc, 0x2a, 0xd6, 0xa5, 0x8c, 0x51, 0x14, 0x0b, 0x26, 0x5e,
-  0x53, 0x2b, 0x8a, 0x9b, 0x84, 0x79, 0xb4, 0x7b, 0x29, 0xda, 0xfc, 0x7c,
-  0x8b, 0xb6, 0xbb, 0xef, 0x9a, 0xfb, 0x91, 0x9f, 0xfe, 0x89, 0x7b, 0x2e,
-  0xd2, 0x59, 0x3a, 0x8d, 0x83, 0xbb, 0x4d, 0x39, 0x11, 0xd3, 0xb5, 0x3b,
-  0x8f, 0x63, 0x62, 0xbb, 0x18, 0xb4, 0x97, 0xa3, 0x79, 0x05, 0x71, 0x9a,
-  0xfd, 0x46, 0x4d, 0xb2, 0x44, 0xde, 0x23, 0x51, 0xd6, 0x2d, 0x1c, 0xef,
-  0x18, 0x1f, 0xf3, 0xca, 0x32, 0xd5, 0x77, 0xad, 0xb1, 0x6c, 0xcc, 0xc9,
-  0xa1, 0x9e, 0xb9, 0x85, 0xeb, 0x8c, 0xe2, 0xbc, 0xe3, 0x38, 0x98, 0xe8,
-  0x4c, 0xd4, 0xe8, 0xf5, 0x92, 0x06, 0x2f, 0xab, 0xda, 0x8b, 0xfa, 0x9f,
-  0xf0, 0xc8, 0x59, 0xa4, 0x76, 0x27, 0x9a, 0x64, 0xb5, 0xf9, 0x64, 0xb0,
-  0x71, 0x06, 0x95, 0xcd, 0xe9, 0x77, 0x27, 0x2c, 0xe4, 0xcd, 0x99, 0xfd,
-  0xf5, 0x20, 0x47, 0x8f, 0x48, 0x6f, 0x4b, 0x40, 0x74, 0xc2, 0xcd, 0x58,
-  0x0a, 0x4a, 0xe6, 0x4c, 0x3c, 0x13, 0xe1, 0x8f, 0xfd, 0xbe, 0x7c, 0x85,
-  0x1d, 0x5f, 0xd1, 0x55, 0x1e, 0x5f, 0xc7, 0xa9, 0x3b, 0xe8, 0x4a, 0x68,
-  0xee, 0xd9, 0x79, 0xa6, 0x8f, 0x33, 0x37, 0x62, 0xc6, 0xaa, 0x7b, 0xba,
-  0x04, 0xff, 0x49, 0xf8, 0x5e, 0xa2, 0x4d, 0xc1, 0xca, 0x6a, 0xb3, 0xb8,
-  0x8d, 0xac, 0xb9, 0x11, 0xee, 0x5f, 0xbe, 0xca, 0x40, 0x99, 0xb8, 0x98,
-  0xa8, 0xc9, 0xce, 0x20, 0xfa, 0x9a, 0xb4, 0x01, 0x68, 0x8f, 0x10, 0x50,
-  0x52, 0xd6, 0x84, 0xe8, 0x86, 0xb9, 0x4f, 0x48, 0x17, 0x29, 0x4a, 0xe2,
-  0x1a, 0x60, 0x6a, 0xf8, 0x8c, 0xc6, 0xe9, 0xd8, 0xd0, 0x4d, 0x76, 0x8f,
-  0x6e, 0xdd, 0x24, 0xa8, 0x89, 0x22, 0xc5, 0x25, 0xca, 0x9f, 0xcf, 0x06,
-  0xd1, 0x26, 0x98, 0x26, 0x71, 0x56, 0xe6, 0xfe, 0x7e, 0x16, 0x6e, 0x3d,
-  0x88, 0x8c, 0x9d, 0xb8, 0x1d, 0x4f, 0x26, 0xcc, 0x41, 0x68, 0x04, 0xd1,
-  0xa7, 0x83, 0xdd, 0x17, 0x83, 0x9d, 0x01, 0x1b, 0x0b, 0x92, 0xbb, 0x34,
-  0x23, 0x75, 0x8d, 0x44, 0x2d, 0x1e, 0x4a, 0x14, 0xbc, 0x49, 0xea, 0x0b,
-  0x1f, 0xeb, 0xeb, 0xeb, 0xa9, 0x30, 0xd4, 0x6d, 0xd2, 0xef, 0x02, 0x9e,
-  0x9b, 0x93, 0x62, 0x01, 0x6e, 0xc3, 0x8b, 0xa3, 0xdb, 0x2a, 0x34, 0x17,
-  0x32, 0x5b, 0x5d, 0xce, 0x2d, 0x47, 0x27, 0xfd, 0x78, 0xbb, 0xdf, 0x8f,
-  0x17, 0xac, 0x94, 0xd4, 0xcc, 0x02, 0x9b, 0x44, 0xa3, 0xdb, 0xac, 0xc1,
-  0x6e, 0x45, 0xdf, 0xb1, 0x84, 0x01, 0xce, 0xcc, 0x72, 0xde, 0xdc, 0x69,
-  0x80, 0x58, 0x3a, 0x91, 0x41, 0xf8, 0x9c, 0x80, 0xf3, 0xf0, 0x19, 0x6a,
-  0x6b, 0x8e, 0x6f, 0x5f, 0xf0, 0x52, 0x12, 0x14, 0x58, 0x86, 0x53, 0xcd,
-  0xd0, 0x08, 0x11, 0xac, 0x95, 0x6e, 0x9a, 0xdc, 0x29, 0x28, 0x29, 0x8b,
-  0x38, 0x32, 0x0f, 0x7e, 0xb4, 0xd6, 0x1c, 0x9f, 0x91, 0x79, 0x97, 0x44,
-  0xc1, 0x87, 0x94, 0x15, 0xd0, 0x54, 0x65, 0x21, 0xba, 0x41, 0xa2, 0x71,
-  0x8e, 0x85, 0x18, 0xb0, 0x60, 0x9e, 0x95, 0x89, 0x5d, 0x96, 0x18, 0x6c,
-  0x74, 0x35, 0x8d, 0xb9, 0xed, 0xa2, 0xd6, 0x1c, 0xa9, 0xda, 0x99, 0xaa,
-  0x87, 0x45, 0x46, 0x8b, 0x36, 0x1c, 0x7e, 0xad, 0x97, 0x67, 0x11, 0x6d,
-  0xa6, 0xf3, 0xf1, 0x74, 0x09, 0x1d, 0xe1, 0x8c, 0x26, 0x46, 0x5f, 0x6d,
-  0xf9, 0x73, 0xd6, 0x3f, 0xa0, 0xf5, 0x63, 0x9d, 0xb9, 0x1f, 0xd3, 0x49,
-  0x28, 0xa3, 0x97, 0xf2, 0xa3, 0x28, 0xf9, 0x72, 0xf9, 0xbc, 0xbe, 0xa4,
-  0xcc, 0xab, 0xb6, 0xa2, 0xa1, 0xca, 0x89, 0x3c, 0xb5, 0x77, 0xfc, 0xea,
-  0x41, 0xf0, 0x0e, 0x2f, 0x54, 0x41, 0xcb, 0x67, 0x47, 0x1b, 0xec, 0x4d,
-  0x86, 0x32, 0xa8, 0x35, 0x37, 0xe4, 0x91, 0x92, 0x28, 0x37, 0x61, 0x72,
-  0xc1, 0x15, 0x1c, 0x1d, 0x7e, 0x75, 0xc2, 0x93, 0x24, 0x4d, 0x52, 0xee,
-  0x07, 0x9d, 0x74, 0x9a, 0x4c, 0x99, 0xd4, 0xb0, 0x62, 0x50, 0xfa, 0xa2,
-  0x50, 0xde, 0xd4, 0xff, 0x75, 0xde, 0x64, 0x3f, 0xd3, 0x1a, 0xc6, 0xdb,
-  0x4f, 0x07, 0x3b, 0x1d, 0x96, 0xf8, 0x69, 0xc7, 0x48, 0x9b, 0xc9, 0x26,
-  0xdc, 0xc9, 0x34, 0x9e, 0xdf, 0x16, 0x42, 0xad, 0xa0, 0x2c, 0x8c, 0x95,
-  0xee, 0xa1, 0x65, 0x9e, 0xd3, 0xd5, 0x38, 0x09, 0x2d, 0x2f, 0x76, 0x5c,
-  0x64, 0x3a, 0x38, 0x04, 0x7a, 0xef, 0xff, 0x6d, 0xc9, 0xfb, 0x31, 0x8b,
-  0xf3, 0x5b, 0x93, 0x2f, 0x58, 0xf6, 0x27, 0x79, 0x3c, 0xc3, 0xc6, 0x61,
-  0x5c, 0x78, 0xbe, 0xa5, 0xb9, 0xfe, 0xd7, 0xb4, 0xd0, 0xac, 0xe0, 0xb3,
-  0x25, 0x40, 0x8e, 0x5f, 0x66, 0xc2, 0x88, 0xdf, 0x0e, 0xcf, 0xfd, 0x74,
-  0xea, 0xfa, 0x28, 0xfd, 0xca, 0xad, 0xb3, 0xa9, 0x81, 0xc9, 0x81, 0xde,
-  0xa5, 0x23, 0x2a, 0xd6, 0x85, 0x69, 0x4c, 0xe7, 0x8c, 0x17, 0xcf, 0x08,
-  0xa8, 0xd9, 0x37, 0x7f, 0xcb, 0x44, 0xd4, 0x2d, 0x70, 0x0a, 0x82, 0xdd,
-  0xef, 0x13, 0x4b, 0x66, 0x63, 0x49, 0xfb, 0x46, 0x5f, 0xd2, 0xa9, 0x28,
-  0xdc, 0xb1, 0xb8, 0x4a, 0xaf, 0x97, 0x79, 0x22, 0x8c, 0x1c, 0xf6, 0x15,
-  0x33, 0xab, 0x30, 0xdb, 0xbd, 0xc9, 0x40, 0x7c, 0x24, 0xed, 0x26, 0xd3,
-  0xab, 0x5e, 0xad, 0x39, 0x3e, 0xbe, 0x38, 0xd7, 0x18, 0x30, 0x18, 0x43,
-  0x91, 0x8c, 0xd1, 0xd8, 0x3c, 0x51, 0x06, 0x3e, 0xe3, 0xa5, 0x65, 0xed,
-  0x3c, 0x1a, 0x4f, 0xe3, 0x74, 0x06, 0xd1, 0x58, 0x95, 0xcf, 0x3a, 0xdd,
-  0x5c, 0xaa, 0xe8, 0x06, 0x92, 0x19, 0xb1, 0xe4, 0x98, 0x17, 0x2c, 0x1b,
-  0xf2, 0x76, 0xc5, 0x76, 0x7d, 0x8a, 0x5c, 0x76, 0x93, 0x8c, 0x6f, 0x41,
-  0x94, 0xc1, 0x6d, 0xd9, 0xaf, 0x35, 0x27, 0x9b, 0xc2, 0xd2, 0x53, 0x79,
-  0xb3, 0xa4, 0x25, 0x5f, 0x64, 0x45, 0x91, 0x8e, 0x98, 0x26, 0x49, 0x9a,
-  0x5a, 0x8e, 0x71, 0x98, 0x69, 0xc5, 0x49, 0xc1, 0xcd, 0x63, 0xba, 0x8e,
-  0x4b, 0x58, 0xb3, 0x40, 0x35, 0x7d, 0x22, 0x91, 0xc5, 0xba, 0xd1, 0x09,
-  0xc3, 0xa9, 0x32, 0x88, 0x42, 0x05, 0x5e, 0xc8, 0x92, 0x22, 0x5d, 0x8e,
-  0xa3, 0xda, 0x6a, 0xd6, 0x9a, 0x93, 0xb5, 0xed, 0xb1, 0x3a, 0x95, 0x92,
-  0x4e, 0x2d, 0x12, 0x13, 0x54, 0x4e, 0x92, 0x8f, 0x94, 0x43, 0x93, 0x36,
-  0x94, 0x8e, 0xe9, 0xda, 0xeb, 0x4f, 0x52, 0xd2, 0x32, 0x4b, 0xfe, 0x6d,
-  0x5e, 0x4e, 0x67, 0xbd, 0x90, 0xfb, 0xbb, 0x1d, 0x9f, 0x27, 0xd7, 0x19,
-  0xe9, 0xb8, 0x65, 0x93, 0xea, 0xc0, 0x6d, 0xc0, 0x6c, 0x44, 0x7a, 0x70,
-  0xd4, 0x61, 0x72, 0x00, 0xc9, 0x10, 0xc4, 0x8c, 0xd9, 0xfe, 0x33, 0xe1,
-  0xd3, 0x89, 0xa1, 0xd0, 0x28, 0x94, 0x9f, 0xd6, 0x79, 0x12, 0x44, 0x79,
-  0x3a, 0x46, 0xc4, 0x79, 0x7a, 0x7c, 0x82, 0xc6, 0x10, 0xb0, 0x66, 0xf1,
-  0x0a, 0x5b, 0x44, 0x02, 0x89, 0x13, 0x01, 0x46, 0x2c, 0xe9, 0xb3, 0x56,
-  0x75, 0x9f, 0x8e, 0x45, 0xa0, 0xe6, 0x05, 0xa9, 0x33, 0x60, 0xd6, 0xe9,
-  0xa7, 0x29, 0x3f, 0x37, 0x5b, 0x16, 0x10, 0xb6, 0xf9, 0xb2, 0x15, 0x3d,
-  0xe4, 0x9e, 0xb6, 0xca, 0xb1, 0x5b, 0x88, 0x4c, 0x74, 0xdb, 0xb1, 0x24,
-  0x17, 0xe7, 0x29, 0x94, 0xae, 0x46, 0x73, 0x32, 0x66, 0x9e, 0x26, 0xc6,
-  0xa9, 0xc3, 0xe4, 0xd7, 0x55, 0xae, 0xf1, 0xf2, 0x0c, 0x0e, 0x16, 0xf3,
-  0xa4, 0xe0, 0xe0, 0x8c, 0xe8, 0x34, 0x8b, 0x91, 0x30, 0x7a, 0xc9, 0x77,
-  0xf6, 0x2b, 0x9e, 0xcb, 0x1a, 0x7e, 0x19, 0x9d, 0x43, 0xd5, 0xbb, 0xa9,
-  0xca, 0x3c, 0x01, 0x63, 0x14, 0x55, 0x4e, 0x9a, 0x83, 0x5e, 0xcc, 0xc7,
-  0x7d, 0xb9, 0xa8, 0x13, 0x2a, 0x11, 0x66, 0xc2, 0xbc, 0xd2, 0xb5, 0xb4,
-  0xf0, 0xd7, 0x2d, 0x6d, 0x4d, 0x92, 0xde, 0xd1, 0xbc, 0xbd, 0x02, 0x25,
-  0x4d, 0xc3, 0xb2, 0x11, 0x75, 0x86, 0x49, 0x59, 0x6f, 0xee, 0x10, 0xfd,
-  0xed, 0x77, 0xa2, 0xc0, 0x44, 0x22, 0xed, 0xea, 0xda, 0xd1, 0x0a, 0xab,
-  0x01, 0xe4, 0x8a, 0xd5, 0x91, 0x32, 0xea, 0xb0, 0x09, 0x7d, 0xf7, 0xd5,
-  0xb7, 0x07, 0xa7, 0xef, 0x8e, 0x77, 0xff, 0x5c, 0xa7, 0x1e, 0xfa, 0x6e,
-  0x4f, 0xbe, 0xdb, 0xeb, 0xb4, 0x71, 0x34, 0x92, 0x23, 0xba, 0xaf, 0xba,
-  0xa4, 0xb1, 0xce, 0x46, 0x19, 0x6c, 0x9a, 0x76, 0x23, 0x83, 0x8b, 0xd1,
-  0x10, 0x7a, 0x2a, 0xde, 0x97, 0x72, 0x01, 0xf2, 0xaa, 0xf0, 0xd8, 0xf9,
-  0xf6, 0xac, 0x8f, 0x1d, 0x6a, 0x3e, 0xee, 0x64, 0xc8, 0x52, 0x4c, 0x02,
-  0xf1, 0x24, 0x5c, 0x8f, 0xa2, 0xc4, 0x7d, 0xa8, 0x5b, 0xc4, 0xad, 0x8b,
-  0x6e, 0xd9, 0x93, 0x73, 0x54, 0xe7, 0xf5, 0x6e, 0xc2, 0x7e, 0x4c, 0x60,
-  0xb9, 0x05, 0xe4, 0xa3, 0x14, 0x74, 0x45, 0xba, 0x74, 0x5c, 0x8e, 0x6f,
-  0x06, 0x74, 0xe7, 0x09, 0x4b, 0xe1, 0x43, 0x2e, 0xc7, 0xb3, 0xce, 0xef,
-  0xf8, 0x46, 0x80, 0x51, 0xfb, 0x8e, 0x26, 0x52, 0x08, 0xed, 0x76, 0x74,
-  0x2c, 0xa4, 0x0b, 0xd2, 0xd6, 0x74, 0xf4, 0x3c, 0x83, 0xb6, 0x60, 0x01,
-  0x06, 0x9b, 0xe5, 0x13, 0x96, 0xd7, 0x9b, 0xa3, 0xa3, 0x93, 0xcd, 0xb8,
-  0x4b, 0xb5, 0x4a, 0xb3, 0x7b, 0x41, 0xe7, 0x81, 0xe3, 0x44, 0xc3, 0x66,
-  0xc5, 0x77, 0xa5, 0x67, 0xb2, 0x9b, 0x27, 0x7a, 0x80, 0x45, 0xc7, 0xad,
-  0x53, 0x3e, 0x35, 0x36, 0x22, 0x61, 0x5b, 0xe4, 0x4d, 0x77, 0x5d, 0x11,
-  0x4d, 0x9f, 0x12, 0x4d, 0x4f, 0x33, 0xe5, 0xe9, 0x5e, 0x70, 0x55, 0x3d,
-  0x5e, 0x69, 0x20, 0xbb, 0x6a, 0x39, 0x97, 0xa2, 0xe8, 0xeb, 0x2e, 0xd8,
-  0x28, 0xe5, 0x5c, 0xb9, 0x95, 0x25, 0xf5, 0x90, 0x6f, 0x5f, 0x90, 0xbd,
-  0xf1, 0x5c, 0x36, 0x79, 0xb5, 0x34, 0xf7, 0x36, 0x29, 0x8b, 0x71, 0xbc,
-  0x48, 0xb6, 0xf5, 0x46, 0xb7, 0x6d, 0x0c, 0xc6, 0xd1, 0x64, 0x5e, 0x67,
-  0x97, 0xc7, 0x5e, 0x54, 0x4a, 0x54, 0x3e, 0xf3, 0x2a, 0xbc, 0xb0, 0xca,
-  0xe0, 0xd8, 0x9a, 0xee, 0x8f, 0x1d, 0x8f, 0x1b, 0x02, 0xd5, 0x9c, 0x14,
-  0xaa, 0x01, 0xb1, 0x44, 0x37, 0x1d, 0xbb, 0x5e, 0x95, 0xb2, 0xec, 0x64,
-  0x50, 0x2f, 0x03, 0x16, 0x35, 0xf0, 0x71, 0xe4, 0x1c, 0x07, 0x75, 0x6e,
-  0x63, 0x97, 0x5f, 0xd4, 0x1f, 0xbb, 0x21, 0xf4, 0xff, 0x1a, 0x7b, 0x59,
-  0x40, 0xcd, 0xce, 0x58, 0x2d, 0x92, 0xed, 0xe7, 0x24, 0xfc, 0xde, 0x25,
-  0x8e, 0x51, 0xb4, 0x5f, 0x59, 0x5e, 0xe1, 0x33, 0x8e, 0x7d, 0x44, 0x8d,
-  0x4f, 0x96, 0xb3, 0x85, 0x4a, 0x1a, 0xbf, 0x6b, 0x39, 0x86, 0x20, 0x8a,
-  0x5f, 0x2a, 0x56, 0x40, 0xbe, 0xf9, 0x25, 0x82, 0xc5, 0x97, 0x22, 0x56,
-  0xf6, 0xe3, 0x62, 0x9c, 0xa6, 0xb5, 0xb7, 0x8e, 0xa1, 0x51, 0x45, 0xd1,
-  0xc1, 0xf0, 0xf0, 0xe4, 0xc4, 0xdb, 0x1e, 0xee, 0x45, 0x4a, 0xe7, 0x79,
-  0xb0, 0x7a, 0x49, 0x2b, 0xc2, 0x5e, 0xaa, 0x01, 0x4c, 0x78, 0x70, 0x44,
-  0x95, 0x2a, 0x71, 0xb5, 0x9d, 0xb6, 0x11, 0x2b, 0x6a, 0x44, 0x1a, 0x63,
-  0x11, 0x82, 0xa5, 0x19, 0x9a, 0x10, 0x5b, 0xc2, 0x40, 0x14, 0x74, 0x6b,
-  0x15, 0xaa, 0x43, 0xfd, 0xb9, 0x5c, 0x2d, 0x92, 0x57, 0x07, 0x90, 0x11,
-  0x6f, 0x1a, 0xa2, 0xb4, 0x69, 0x62, 0xe3, 0x98, 0xc6, 0x5f, 0x44, 0xca,
-  0x11, 0x71, 0x3d, 0xf1, 0x2e, 0x4f, 0xd4, 0xf4, 0xa0, 0xcc, 0x91, 0xa4,
-  0x02, 0x5a, 0xbe, 0x89, 0x68, 0xc5, 0x74, 0x0b, 0x3d, 0xd9, 0xab, 0xb3,
-  0x96, 0x15, 0xdd, 0xff, 0xb3, 0x22, 0x94, 0xb9, 0x70, 0x5d, 0x7f, 0x8c,
-  0xc4, 0xc5, 0x54, 0x83, 0xf3, 0xf2, 0x25, 0xbf, 0x51, 0x93, 0x13, 0x06,
-  0x5e, 0xd2, 0x68, 0x6e, 0x8c, 0x99, 0x53, 0xf5, 0x32, 0xad, 0xec, 0xf8,
-  0xb2, 0x58, 0xc2, 0xb4, 0xb4, 0x20, 0x81, 0xa9, 0x9c, 0x12, 0x8b, 0xeb,
-  0x45, 0xcb, 0x39, 0xff, 0x74, 0xba, 0xa9, 0xd7, 0xda, 0xbd, 0xf2, 0xc3,
-  0xba, 0x4d, 0x9e, 0xd2, 0x44, 0xe3, 0x28, 0xe4, 0xb3, 0x22, 0xf4, 0xda,
-  0x9a, 0xc9, 0xf1, 0x63, 0xa7, 0x0c, 0x38, 0xf7, 0x24, 0x65, 0x17, 0x1e,
-  0x0d, 0xb9, 0xbe, 0x63, 0x55, 0xf1, 0xd1, 0xe4, 0xc7, 0x68, 0xb3, 0x58,
-  0xb2, 0x88, 0x43, 0x7c, 0xdf, 0x04, 0x18, 0x2f, 0xd2, 0xd0, 0xf2, 0x9a,
-  0xec, 0x52, 0xbf, 0x0c, 0x88, 0xc7, 0x86, 0x1a, 0x4d, 0x7f, 0x9c, 0x2e,
-  0x6e, 0xf8, 0x74, 0xbc, 0x84, 0x06, 0xcc, 0x52, 0xb6, 0x7c, 0xd0, 0xb8,
-  0x9e, 0x87, 0xc3, 0x53, 0xd3, 0x66, 0x70, 0xc2, 0xc1, 0x51, 0xed, 0x6d,
-  0x5d, 0xff, 0xd4, 0xbc, 0x09, 0x66, 0xe3, 0x14, 0x96, 0xc8, 0x4d, 0xd7,
-  0x09, 0x87, 0x04, 0x3c, 0x7b, 0x59, 0x44, 0x14, 0x67, 0x51, 0x17, 0xbb,
-  0xad, 0x7d, 0x3b, 0x88, 0x2e, 0x98, 0x4f, 0x2e, 0x17, 0x6c, 0x56, 0x84,
-  0xeb, 0x11, 0x9f, 0xd7, 0x9a, 0xc3, 0xe0, 0x83, 0x0d, 0x85, 0xa7, 0xae,
-  0x72, 0xf6, 0x2a, 0x5c, 0x33, 0x0d, 0xbf, 0x23, 0xaa, 0xdf, 0xaf, 0xb3,
-  0x0c, 0xef, 0x12, 0x20, 0xc9, 0x66, 0x5e, 0x14, 0x53, 0x38, 0x61, 0x26,
-  0xd9, 0xb8, 0xd8, 0x26, 0x85, 0xb7, 0xd8, 0xb6, 0xc1, 0x55, 0xdc, 0x2d,
-  0xc6, 0x5c, 0x87, 0xc3, 0x60, 0x6e, 0x6c, 0x15, 0x11, 0xe1, 0xdb, 0x6d,
-  0x30, 0xa4, 0x12, 0x3a, 0x6e, 0xa2, 0x60, 0x9e, 0x82, 0xec, 0xbe, 0x9a,
-  0x2f, 0x2f, 0x4f, 0x87, 0x58, 0xae, 0xba, 0x64, 0xb8, 0x24, 0x96, 0x62,
-  0x9b, 0xc3, 0x6d, 0x5b, 0xd3, 0xb8, 0xae, 0xe4, 0x0a, 0x18, 0x0e, 0x0f,
-  0xf1, 0xe1, 0x70, 0xc9, 0x3a, 0x01, 0x75, 0x91, 0xaf, 0x22, 0x53, 0x83,
-  0x6b, 0xcd, 0xf1, 0x6c, 0x6d, 0x7e, 0x62, 0xe8, 0xca, 0xf2, 0xd5, 0xe0,
-  0x2a, 0x99, 0x64, 0x79, 0x3c, 0x20, 0x5e, 0x4d, 0x44, 0x09, 0xf7, 0x07,
-  0xe6, 0x4a, 0x87, 0xf5, 0x3d, 0xcd, 0x1e, 0xd3, 0xfc, 0xe4, 0x88, 0x9f,
-  0xae, 0x93, 0x13, 0xdd, 0xda, 0x49, 0xf1, 0x61, 0xc6, 0x89, 0x7b, 0xc3,
-  0x7c, 0x60, 0x6c, 0x22, 0x2d, 0xda, 0x18, 0xa7, 0x1d, 0x9b, 0x96, 0x5b,
-  0x0e, 0x76, 0xc7, 0x0a, 0x63, 0xa0, 0x41, 0x2e, 0xd8, 0xc8, 0x95, 0x4c,
-  0xda, 0xb9, 0xc3, 0x85, 0xa9, 0x36, 0x91, 0x7f, 0xd2, 0x1b, 0xd4, 0xea,
-  0x91, 0x04, 0xc4, 0x18, 0xaf, 0xb3, 0x9c, 0x38, 0xde, 0xac, 0x68, 0x90,
-  0x96, 0x38, 0x90, 0x55, 0xbf, 0x2a, 0x7a, 0x6a, 0xc0, 0x2c, 0x97, 0xb9,
-  0xac, 0xfe, 0x72, 0x1e, 0x74, 0x40, 0xcb, 0xb6, 0x9c, 0xc1, 0xe3, 0x6b,
-  0xab, 0xb0, 0x86, 0x63, 0x7a, 0xa5, 0x07, 0x0a, 0x5f, 0x20, 0x84, 0x16,
-  0xe0, 0xbe, 0x6c, 0x79, 0x99, 0xfb, 0xb8, 0x06, 0xe8, 0xe6, 0xac, 0x85,
-  0xd7, 0xe5, 0x13, 0xe7, 0x6a, 0xc8, 0x13, 0x7e, 0x14, 0xca, 0x17, 0xa9,
-  0xe9, 0x79, 0x75, 0xa9, 0x70, 0x1e, 0xfb, 0xbc, 0xf0, 0xcc, 0x91, 0x5f,
-  0x92, 0x42, 0x99, 0x51, 0x27, 0xf5, 0x33, 0xfe, 0x26, 0x7e, 0x48, 0x67,
-  0xcb, 0x19, 0x36, 0x88, 0x69, 0x4b, 0x1f, 0x13, 0x4e, 0xc5, 0xfc, 0x8e,
-  0x58, 0x61, 0x76, 0xaf, 0x77, 0xb3, 0x3f, 0xe4, 0xce, 0xde, 0x53, 0xe7,
-  0xe6, 0x32, 0x1f, 0xf9, 0x96, 0xa4, 0xb6, 0x81, 0x29, 0x7c, 0x66, 0x72,
-  0x9b, 0xb1, 0xbf, 0xa7, 0xca, 0x30, 0xa2, 0xc5, 0x4d, 0x5c, 0xd0, 0xad,
-  0xca, 0x77, 0x6b, 0xdb, 0x54, 0xe9, 0x5b, 0x7b, 0x3a, 0x69, 0x30, 0xeb,
-  0x0c, 0x72, 0x33, 0x2e, 0x68, 0x5a, 0xda, 0x01, 0xfb, 0xf2, 0x4d, 0xbe,
-  0x6c, 0xb1, 0x31, 0xcc, 0xe8, 0xd6, 0x9d, 0xc5, 0x0f, 0x58, 0x15, 0x93,
-  0xe0, 0x7e, 0x2d, 0x4a, 0x56, 0xe1, 0x38, 0xd8, 0x84, 0x9a, 0x24, 0xf3,
-  0x12, 0x82, 0x08, 0x4b, 0xe6, 0xf5, 0x4d, 0x70, 0x06, 0xa3, 0x4c, 0x79,
-  0x2c, 0x9e, 0x74, 0x66, 0x71, 0xbb, 0xee, 0xc4, 0x9a, 0xcf, 0x76, 0x58,
-  0x93, 0xb9, 0xe2, 0x2b, 0x58, 0xd7, 0x9b, 0x02, 0xec, 0x62, 0x9a, 0xf0,
-  0x62, 0x39, 0x1d, 0x6d, 0xa0, 0x0e, 0x2a, 0x6e, 0xa1, 0xd0, 0x98, 0x08,
-  0x6b, 0xa4, 0x72, 0x5d, 0xb1, 0x84, 0xda, 0xaa, 0xa7, 0xc6, 0x15, 0x7f,
-  0x8f, 0x18, 0xf7, 0x62, 0xd8, 0x2d, 0xe1, 0xe5, 0x2c, 0x2a, 0xe3, 0xaa,
-  0x68, 0x5b, 0xb5, 0xe6, 0xcc, 0x94, 0x01, 0x4a, 0xd9, 0x2c, 0xb6, 0x06,
-  0xaa, 0xfb, 0xb8, 0x39, 0xd1, 0x56, 0xde, 0xce, 0xb3, 0x7b, 0xd2, 0x36,
-  0xe7, 0x99, 0x74, 0x64, 0xeb, 0xcb, 0xc3, 0x6f, 0x70, 0xa3, 0x64, 0xae,
-  0xaa, 0x99, 0x0e, 0xca, 0xc9, 0x63, 0xfc, 0x74, 0xe9, 0x44, 0xa6, 0x50,
-  0x6e, 0x0e, 0xe5, 0xe5, 0xfa, 0x64, 0x45, 0x7a, 0x76, 0x2e, 0xdf, 0xa4,
-  0xf4, 0x02, 0x3c, 0x94, 0x2a, 0xa6, 0x6c, 0xef, 0xe9, 0x22, 0xe9, 0xa7,
-  0xb8, 0xe9, 0x91, 0xfe, 0xd8, 0xef, 0xf4, 0xda, 0x28, 0xae, 0x2e, 0x1c,
-  0xdb, 0x98, 0x9c, 0xa8, 0xd4, 0x2e, 0xa7, 0xab, 0xa2, 0xae, 0xc3, 0x64,
-  0xe2, 0x21, 0xb1, 0xae, 0x0b, 0x9d, 0x5e, 0xad, 0x9f, 0x7c, 0xdf, 0xfb,
-  0xc6, 0x84, 0x1e, 0xef, 0x6f, 0xb2, 0x69, 0xeb, 0x09, 0x0a, 0x54, 0xf5,
-  0x8c, 0x9b, 0x81, 0xfd, 0x90, 0x1a, 0x80, 0x1c, 0x5d, 0x63, 0x22, 0xd1,
-  0x78, 0x9a, 0xc4, 0xf9, 0x74, 0xa5, 0x6a, 0x5c, 0xfd, 0x04, 0xdd, 0xd9,
-  0x02, 0xc3, 0xc6, 0x1b, 0x13, 0x81, 0xe6, 0x73, 0x5e, 0x5e, 0xf5, 0x6f,
-  0x59, 0x1c, 0x44, 0x29, 0xe6, 0x7c, 0xe1, 0xe3, 0x7c, 0xf2, 0xef, 0x52,
-  0xb6, 0x19, 0x35, 0x56, 0x3b, 0x49, 0x26, 0xa3, 0x78, 0x7c, 0x8b, 0xb5,
-  0xe6, 0x16, 0xd5, 0x73, 0x75, 0x83, 0x88, 0x1e, 0x35, 0x33, 0x11, 0x29,
-  0xdf, 0xd0, 0xc1, 0x2b, 0xd2, 0x72, 0x19, 0xff, 0x8b, 0x27, 0x56, 0x8e,
-  0x6c, 0x9d, 0x90, 0xdb, 0x74, 0xe7, 0x35, 0x47, 0xfa, 0x10, 0x47, 0x9a,
-  0x44, 0xb3, 0xf9, 0x92, 0x64, 0x77, 0x62, 0xab, 0xd9, 0xd5, 0x15, 0xd1,
-  0xc8, 0xe7, 0x0d, 0xd3, 0x81, 0x3c, 0xb2, 0x7d, 0x21, 0x61, 0x50, 0xa1,
-  0x50, 0x18, 0x55, 0xdd, 0xbe, 0x7c, 0x69, 0xf3, 0xd0, 0xae, 0x53, 0xde,
-  0x0c, 0x69, 0xae, 0x69, 0x32, 0xab, 0x7e, 0x6f, 0x2b, 0x2b, 0xfe, 0x11,
-  0x8b, 0x9f, 0x82, 0x80, 0x35, 0x5a, 0xa9, 0x42, 0x1d, 0x97, 0xcd, 0x68,
-  0x0e, 0x63, 0xd2, 0xb7, 0xe9, 0x62, 0xc1, 0x3b, 0x25, 0x61, 0x18, 0x30,
-  0xb8, 0x39, 0xb3, 0xc8, 0x28, 0xb9, 0x4e, 0xe7, 0xd8, 0x52, 0x73, 0x32,
-  0x64, 0x4b, 0xd2, 0x1a, 0x64, 0xd0, 0xa3, 0x84, 0xce, 0x47, 0xbd, 0x39,
-  0x33, 0x4a, 0x78, 0xb7, 0xa9, 0x5a, 0x70, 0x26, 0xec, 0x22, 0x9d, 0x2b,
-  0xff, 0xe1, 0x5d, 0xc2, 0xb6, 0x40, 0xc7, 0x50, 0x8b, 0x58, 0xaf, 0xe5,
-  0xc8, 0xbc, 0xf6, 0x66, 0x1f, 0x73, 0x6d, 0x0c, 0x4f, 0xfe, 0xf7, 0xb1,
-  0x77, 0x72, 0x3b, 0x2f, 0xf2, 0x0a, 0xd4, 0xdd, 0x20, 0x87, 0x77, 0xac,
-  0x4b, 0x76, 0xfa, 0x87, 0xb4, 0x5d, 0x1d, 0x0c, 0xa5, 0xe2, 0xbb, 0x58,
-  0x96, 0x19, 0x1d, 0x70, 0x8d, 0x07, 0x40, 0x6c, 0x16, 0x53, 0x1c, 0xe9,
-  0x56, 0x79, 0xb2, 0x0d, 0x07, 0x50, 0xd6, 0xe0, 0x57, 0xd8, 0x42, 0xb8,
-  0xe1, 0x74, 0x8e, 0xb0, 0x41, 0x95, 0xea, 0x34, 0x29, 0x82, 0xed, 0x53,
-  0x47, 0xe3, 0x36, 0xb4, 0x63, 0xf5, 0x93, 0x37, 0x55, 0x05, 0x35, 0x14,
-  0x8b, 0x57, 0xb0, 0x85, 0x05, 0xfc, 0x7a, 0x37, 0x50, 0x5f, 0xb8, 0x05,
-  0x29, 0x09, 0x79, 0x7d, 0x1c, 0xf0, 0xf9, 0x38, 0x1b, 0x2c, 0xee, 0xf6,
-  0xbf, 0x92, 0x58, 0xa3, 0x06, 0x3d, 0xda, 0x22, 0x78, 0xc2, 0xcc, 0xb5,
-  0xd5, 0x0b, 0xa4, 0x0e, 0x69, 0xb3, 0x45, 0x60, 0xa3, 0x1b, 0x9a, 0x24,
-  0xa2, 0x98, 0x63, 0x26, 0x32, 0x5a, 0xdf, 0xc8, 0xc9, 0x9a, 0xd1, 0x4d,
-  0x4a, 0x23, 0xcf, 0xc7, 0x37, 0x2b, 0xbe, 0x28, 0xd8, 0xfc, 0x08, 0xf7,
-  0xcd, 0x65, 0x60, 0xc1, 0xaf, 0xb3, 0x2d, 0xf4, 0xa1, 0x96, 0x21, 0x1e,
-  0x7d, 0xc4, 0x12, 0x16, 0x3d, 0x67, 0x04, 0x54, 0x1b, 0x1d, 0xd1, 0xc5,
-  0x0d, 0xd3, 0x6c, 0x32, 0x65, 0x21, 0xe0, 0xa4, 0xcd, 0x06, 0xd3, 0xcf,
-  0x02, 0x2e, 0x8e, 0x7d, 0xa3, 0xeb, 0x85, 0x9a, 0x66, 0x46, 0x28, 0x06,
-  0x2c, 0xe9, 0x88, 0x6d, 0xb0, 0xd2, 0x17, 0x2e, 0x4a, 0xbe, 0x10, 0x57,
-  0xb5, 0xe6, 0xd4, 0x29, 0xa5, 0xef, 0xdb, 0xda, 0x9b, 0x5f, 0xaa, 0xbe,
-  0x9d, 0xec, 0x67, 0x91, 0xef, 0xec, 0xee, 0xb3, 0x85, 0x11, 0xa5, 0xaa,
-  0xae, 0xd5, 0x4b, 0x54, 0x29, 0xcb, 0xf3, 0xfd, 0xfe, 0x55, 0xd9, 0xb0,
-  0x72, 0x06, 0x5b, 0x5a, 0xdd, 0xe9, 0xe9, 0x15, 0x7c, 0x7a, 0x5b, 0xcc,
-  0x7d, 0x88, 0x52, 0xca, 0xe8, 0xf4, 0x35, 0x53, 0xdb, 0xe1, 0x05, 0xfd,
-  0x4c, 0xcd, 0xa9, 0xc7, 0x6c, 0x1d, 0x21, 0xa2, 0xac, 0x8f, 0xbf, 0xf9,
-  0x76, 0x18, 0x6d, 0x9e, 0x0d, 0xb7, 0x9f, 0xbc, 0xd8, 0xd9, 0xaa, 0xb7,
-  0xc5, 0x4b, 0x05, 0x89, 0xa5, 0xd5, 0x68, 0x3b, 0xdc, 0xe6, 0xc8, 0xda,
-  0x2d, 0x8e, 0x7e, 0xbe, 0x13, 0xa5, 0x37, 0xb0, 0xb2, 0x9c, 0x1f, 0xbf,
-  0x31, 0x6b, 0x18, 0xf6, 0x8a, 0x98, 0xdf, 0x21, 0x8d, 0x87, 0x8d, 0xf9,
-  0x4d, 0xc2, 0xb9, 0x48, 0xee, 0xcc, 0xa4, 0x16, 0x9d, 0x42, 0xa5, 0xc3,
-  0xb9, 0x60, 0xbb, 0x9d, 0x69, 0x87, 0x8b, 0x84, 0x79, 0x81, 0x6f, 0x41,
-  0xa5, 0x53, 0x16, 0x14, 0x1a, 0xa7, 0x75, 0x04, 0xc9, 0xb2, 0xa0, 0x31,
-  0xe5, 0x90, 0xfd, 0x39, 0x72, 0x62, 0xf2, 0xdb, 0x9d, 0x30, 0x5b, 0x93,
-  0x03, 0x38, 0x7b, 0x69, 0x95, 0xe1, 0xea, 0xfd, 0x34, 0xf0, 0xbf, 0x4e,
-  0xd8, 0xe2, 0xc4, 0x26, 0x92, 0x97, 0x8f, 0x58, 0xc0, 0x87, 0x89, 0xc8,
-  0xdc, 0xa1, 0x41, 0x0e, 0x2f, 0xc1, 0x3a, 0x8d, 0xe0, 0x07, 0x73, 0xdb,
-  0x78, 0x47, 0x6b, 0x8b, 0xdd, 0xcb, 0x82, 0xa6, 0x9d, 0x1f, 0x4f, 0x5c,
-  0xc4, 0x74, 0x4b, 0xaf, 0x74, 0x5d, 0xe3, 0x68, 0x94, 0x67, 0xf7, 0x1c,
-  0x03, 0x8c, 0x28, 0x04, 0x50, 0x5f, 0x2c, 0x41, 0xc1, 0x37, 0x0d, 0x23,
-  0x1f, 0xed, 0xe9, 0xd4, 0x39, 0x85, 0xbf, 0xbe, 0x7c, 0x73, 0x8a, 0x6d,
-  0x85, 0xf6, 0x22, 0xca, 0x8f, 0x8e, 0x79, 0x39, 0x22, 0xb1, 0x9e, 0xef,
-  0xfd, 0xd2, 0x99, 0x5d, 0x2a, 0x11, 0xbc, 0x46, 0xb9, 0x31, 0xa2, 0xa1,
-  0x94, 0x13, 0x2f, 0xda, 0x8c, 0xfe, 0xca, 0xf8, 0xbd, 0xc8, 0xc6, 0x97,
-  0x2d, 0x9d, 0xc6, 0x3e, 0x9b, 0xa4, 0xea, 0x66, 0x8d, 0xc5, 0x62, 0xaa,
-  0x26, 0x92, 0xed, 0x87, 0x3e, 0x29, 0xee, 0x7d, 0x1e, 0x5d, 0x9f, 0x9a,
-  0x17, 0xaf, 0x26, 0xb3, 0x98, 0x43, 0x12, 0x85, 0x85, 0x4e, 0xa2, 0xfe,
-  0x6b, 0xda, 0x09, 0x7e, 0xa2, 0xb1, 0x7b, 0x7e, 0x8f, 0xf4, 0x5e, 0x95,
-  0x45, 0x63, 0xe9, 0x56, 0x3e, 0x17, 0x2b, 0x9d, 0xba, 0x4c, 0x17, 0xf0,
-  0xdb, 0xe3, 0xf1, 0x68, 0x41, 0x7c, 0x7c, 0x5a, 0xe7, 0x0e, 0x6c, 0x3c,
-  0xce, 0x57, 0x12, 0xc9, 0xa0, 0xe6, 0x5d, 0x73, 0x72, 0x59, 0x60, 0x83,
-  0x36, 0x2b, 0x4f, 0x7a, 0x53, 0x72, 0xc6, 0xaa, 0x7a, 0xfd, 0xbc, 0xab,
-  0x8b, 0x96, 0x5f, 0xbb, 0x8b, 0xa7, 0x4b, 0x68, 0xaf, 0xb1, 0x6c, 0x84,
-  0xf8, 0x7d, 0x11, 0x37, 0x18, 0xc3, 0x50, 0x6b, 0x0d, 0xbb, 0x35, 0x68,
-  0xa3, 0x7c, 0x8e, 0x32, 0x91, 0xbb, 0xbd, 0x48, 0x5c, 0xfc, 0x81, 0x1d,
-  0x81, 0xaa, 0xa9, 0xd3, 0x62, 0x45, 0x65, 0x41, 0xe8, 0x3a, 0xae, 0x0f,
-  0x0e, 0xd7, 0xb3, 0x3a, 0x27, 0x84, 0xe0, 0x74, 0x61, 0x52, 0xbe, 0x0b,
-  0x2a, 0xe6, 0x65, 0x39, 0x3e, 0xb3, 0x24, 0xbf, 0x86, 0x84, 0x40, 0xd2,
-  0x5e, 0xd3, 0xa6, 0xa3, 0xec, 0x42, 0x03, 0xc2, 0x20, 0x98, 0xfc, 0xa1,
-  0x2f, 0x0e, 0x11, 0xdc, 0x17, 0x4b, 0xf6, 0x42, 0x0a, 0x71, 0x44, 0xdd,
-  0xfe, 0x44, 0x64, 0xb5, 0x57, 0x93, 0x78, 0x4e, 0x0b, 0xc1, 0xfb, 0xd8,
-  0x14, 0x74, 0xa6, 0xd3, 0x57, 0x53, 0x12, 0xba, 0x56, 0xdd, 0x48, 0x43,
-  0x97, 0x34, 0xa0, 0xa5, 0x54, 0xa1, 0x0c, 0x9b, 0x39, 0xbe, 0x59, 0xce,
-  0x6f, 0x4d, 0x68, 0x9a, 0x92, 0xd0, 0x5d, 0x44, 0x88, 0x9d, 0xaf, 0x35,
-  0xd7, 0x0d, 0x7a, 0xfb, 0x43, 0xd8, 0x76, 0xdb, 0x2a, 0x63, 0xf7, 0x39,
-  0x68, 0xd2, 0xd3, 0xb8, 0xbb, 0xb8, 0x24, 0xe6, 0x34, 0xfa, 0xa2, 0x67,
-  0x7e, 0xd7, 0xd2, 0xb9, 0x58, 0x60, 0x48, 0x8e, 0x9b, 0xe7, 0x30, 0x09,
-  0x7c, 0x3a, 0xf0, 0x22, 0xb8, 0x56, 0xc5, 0x6b, 0xc3, 0xe6, 0x3f, 0xf3,
-  0x39, 0x56, 0x94, 0xc6, 0x16, 0x85, 0xae, 0xf2, 0xaa, 0x78, 0xf6, 0x5c,
-  0x7e, 0x02, 0x4e, 0x5b, 0x61, 0xb2, 0x1f, 0x3a, 0x16, 0x53, 0x9d, 0xde,
-  0x84, 0x2d, 0xe2, 0x24, 0xd3, 0xac, 0x3f, 0x71, 0x6f, 0xc2, 0xe0, 0xc6,
-  0x6a, 0x00, 0x80, 0xa3, 0x86, 0x41, 0x74, 0x9e, 0x15, 0xd8, 0x5e, 0x1e,
-  0x46, 0x9b, 0xba, 0x19, 0xfb, 0xbb, 0x7a, 0x12, 0x75, 0xaf, 0xb2, 0x6c,
-  0x14, 0xe7, 0x5d, 0xdd, 0x41, 0x78, 0xa1, 0xa9, 0xb9, 0x89, 0xb0, 0x65,
-  0x78, 0x78, 0x85, 0xea, 0xbe, 0xa0, 0x07, 0xeb, 0x14, 0x3a, 0x8a, 0x2b,
-  0x76, 0x91, 0xf0, 0xdc, 0x3d, 0xc6, 0x91, 0x95, 0x8b, 0x31, 0x7d, 0x68,
-  0xb8, 0x1e, 0x84, 0xed, 0x29, 0x24, 0x98, 0x9a, 0xd7, 0x84, 0xe4, 0x00,
-  0x71, 0x7e, 0x2f, 0xf2, 0x46, 0xf7, 0x2c, 0x11, 0x21, 0x4c, 0x82, 0x68,
-  0xab, 0xc8, 0x92, 0xbb, 0x30, 0x3a, 0xfa, 0xb7, 0x23, 0x16, 0x5e, 0x37,
-  0x36, 0xbd, 0x1c, 0x61, 0x59, 0x6c, 0x22, 0x2e, 0x8e, 0x5b, 0x42, 0xd9,
-  0x2c, 0x88, 0x1b, 0xe6, 0x64, 0xcf, 0xe6, 0x5a, 0x02, 0x71, 0x7a, 0x34,
-  0x3f, 0x44, 0x3c, 0xe1, 0x84, 0xcc, 0x93, 0x7b, 0xf1, 0x17, 0xc2, 0xce,
-  0xc9, 0x17, 0x01, 0x33, 0x6d, 0xb3, 0x6a, 0x8d, 0x21, 0x7c, 0x14, 0x2a,
-  0x3e, 0x35, 0x94, 0x85, 0x39, 0x2f, 0x01, 0xb6, 0xee, 0xc3, 0x41, 0x1d,
-  0xde, 0x60, 0xd6, 0x72, 0x31, 0x23, 0xaa, 0xfe, 0x2a, 0x63, 0xeb, 0x94,
-  0xde, 0x15, 0x8d, 0x75, 0xe0, 0xa8, 0x07, 0x09, 0xc9, 0x45, 0xc0, 0x92,
-  0xac, 0x6b, 0x5c, 0x68, 0x06, 0xc6, 0x48, 0x96, 0xc3, 0x31, 0xff, 0x06,
-  0x95, 0x38, 0x26, 0xfa, 0x28, 0xa1, 0x5c, 0xaa, 0xae, 0xaa, 0x64, 0xd2,
-  0x73, 0xab, 0xab, 0x37, 0x9a, 0x44, 0x66, 0x2b, 0x85, 0x1a, 0xb7, 0xe5,
-  0xcd, 0x6d, 0x39, 0x94, 0xb2, 0xca, 0x29, 0x98, 0x6e, 0x6c, 0x6a, 0x70,
-  0x92, 0x33, 0xaf, 0x2f, 0xfc, 0x31, 0xa3, 0xe9, 0x0e, 0xaa, 0x12, 0xc7,
-  0x67, 0x83, 0x9d, 0xad, 0x16, 0xa1, 0x73, 0x24, 0x01, 0x43, 0x30, 0x9b,
-  0x4e, 0x53, 0x62, 0x0a, 0xca, 0xa3, 0x65, 0x3a, 0x92, 0x21, 0xe2, 0xfc,
-  0x8f, 0xa4, 0xf5, 0x19, 0xfb, 0x0d, 0x63, 0xec, 0x9c, 0x59, 0x84, 0x17,
-  0x5a, 0x94, 0x2e, 0xc7, 0x9f, 0x33, 0x09, 0xec, 0x8c, 0x8d, 0x6d, 0xb8,
-  0x90, 0x8d, 0xd8, 0xfb, 0x01, 0xda, 0xd7, 0x0e, 0x5d, 0x33, 0x6b, 0x60,
-  0xbf, 0x67, 0x0c, 0x2b, 0x2a, 0x2d, 0x17, 0x58, 0x56, 0xc3, 0x4a, 0xeb,
-  0xf7, 0x58, 0xd2, 0x6d, 0x92, 0x62, 0x7f, 0xa3, 0x61, 0x65, 0x41, 0xff,
-  0xed, 0x79, 0x6f, 0x5e, 0x1c, 0x09, 0xfc, 0xc8, 0x9e, 0x67, 0x85, 0x52,
-  0x86, 0x48, 0x36, 0x22, 0x97, 0xc4, 0x6b, 0x9a, 0xe3, 0x89, 0xfd, 0xa7,
-  0xc6, 0x57, 0x8c, 0x89, 0xbe, 0x59, 0x96, 0x2e, 0x32, 0xdb, 0x30, 0xdf,
-  0x94, 0x8b, 0x60, 0xc3, 0x27, 0x71, 0xc3, 0xcb, 0xec, 0x42, 0x7f, 0x88,
-  0xa5, 0xbe, 0x42, 0x6a, 0x43, 0xf4, 0x45, 0xa4, 0xce, 0x7f, 0x36, 0x38,
-  0xab, 0x90, 0xeb, 0x33, 0x00, 0x30, 0x78, 0x5c, 0xc6, 0x58, 0x86, 0xf6,
-  0xe6, 0xe0, 0x81, 0x0f, 0x57, 0x4f, 0xc8, 0x8f, 0xe3, 0x52, 0x0b, 0x49,
-  0xb9, 0x6a, 0xb8, 0x3c, 0x5f, 0x7d, 0x78, 0xf5, 0x7e, 0xe1, 0xe2, 0x7d,
-  0x60, 0xf5, 0x2e, 0x11, 0x65, 0x4c, 0xf2, 0x01, 0xa2, 0x4b, 0x5e, 0x05,
-  0x01, 0x0f, 0xac, 0xdd, 0x4b, 0x30, 0x9e, 0x77, 0x20, 0x57, 0x8f, 0x66,
-  0x60, 0xa2, 0x79, 0xf5, 0xab, 0xed, 0x3a, 0xa8, 0xd1, 0x46, 0xdf, 0xde,
-  0x9c, 0xe8, 0xea, 0xf3, 0x41, 0x10, 0x03, 0x04, 0x8d, 0x17, 0xd9, 0x14,
-  0xfc, 0x3a, 0xf5, 0x96, 0x3c, 0x2c, 0xd4, 0x44, 0xad, 0x67, 0xaf, 0x45,
-  0x98, 0xab, 0xc8, 0x74, 0x13, 0xbb, 0x54, 0x1b, 0xf3, 0xfb, 0xc2, 0x98,
-  0xf8, 0x07, 0x27, 0x27, 0xb3, 0xd3, 0xa0, 0x70, 0xc4, 0xe5, 0xa8, 0x04,
-  0x26, 0x56, 0x5b, 0x88, 0x64, 0x62, 0x9b, 0x68, 0xb1, 0x74, 0x19, 0x27,
-  0xf3, 0x01, 0x90, 0x4c, 0x8e, 0xc6, 0xdf, 0xb7, 0x7a, 0xd5, 0x05, 0xa3,
-  0x39, 0x4b, 0xd3, 0xe0, 0xf3, 0xeb, 0xd7, 0x2a, 0xe5, 0x95, 0xb2, 0xed,
-  0x63, 0xdd, 0xa5, 0x75, 0xfb, 0xfe, 0x4f, 0x9f, 0x22, 0xfc, 0x8b, 0x4e,
-  0xcd, 0xc2, 0x34, 0xd5, 0x0c, 0xed, 0x89, 0xe2, 0x9a, 0x1d, 0xbd, 0x6c,
-  0x58, 0xfd, 0xdb, 0x12, 0x06, 0xcc, 0xeb, 0x75, 0x4c, 0x00, 0xf7, 0x13,
-  0x5b, 0xe4, 0xd8, 0xd8, 0x34, 0x85, 0x64, 0x44, 0x4d, 0x83, 0xca, 0xbd,
-  0x3a, 0xd3, 0x47, 0xa0, 0x8f, 0x12, 0xad, 0x50, 0xe2, 0x23, 0xc4, 0xea,
-  0xc8, 0xb3, 0x46, 0x99, 0xa3, 0x24, 0x14, 0xd8, 0x9a, 0x14, 0x68, 0x1e,
-  0xe5, 0xf6, 0xdb, 0x4e, 0x42, 0x13, 0x0a, 0xf1, 0xba, 0x1f, 0xe1, 0xc1,
-  0xb5, 0x6e, 0xf7, 0x38, 0xf8, 0xa6, 0xe9, 0x43, 0xb4, 0x4b, 0x8e, 0xcd,
-  0xa2, 0x10, 0x39, 0x91, 0x7c, 0x40, 0x2b, 0x7e, 0x9f, 0xe5, 0x1a, 0xa5,
-  0x35, 0x4a, 0xc0, 0xf5, 0xf9, 0x88, 0xb2, 0x9b, 0x50, 0x6c, 0xdc, 0x1c,
-  0x17, 0xd7, 0x0c, 0xd9, 0x61, 0x9b, 0x75, 0x84, 0x68, 0x83, 0x81, 0x1a,
-  0x00, 0x35, 0xb6, 0xa7, 0x12, 0xcd, 0xe3, 0x64, 0x2a, 0x49, 0x1f, 0x89,
-  0xfa, 0x4b, 0x0d, 0xee, 0x6d, 0x77, 0xd8, 0x21, 0x52, 0x57, 0x13, 0x72,
-  0xb1, 0x94, 0xc6, 0x23, 0x78, 0x88, 0xe2, 0x6a, 0x82, 0x68, 0xeb, 0x9d,
-  0xf1, 0x6b, 0xfd, 0xef, 0x78, 0xd5, 0xc7, 0x0b, 0xb2, 0xf1, 0xc5, 0x32,
-  0x51, 0x55, 0x26, 0x58, 0x2f, 0x0e, 0x7d, 0xd8, 0x48, 0xe1, 0xaf, 0xc8,
-  0x6c, 0x4c, 0xc7, 0x24, 0x47, 0x8e, 0x62, 0x43, 0x53, 0xbb, 0x4d, 0xc4,
-  0x62, 0x25, 0x2e, 0xe9, 0x71, 0x52, 0xdd, 0x73, 0x44, 0xe6, 0xf7, 0x93,
-  0x45, 0x5e, 0xb6, 0xc4, 0x89, 0x4b, 0xe0, 0x85, 0xd3, 0x29, 0xf4, 0x69,
-  0x71, 0x85, 0xfa, 0x70, 0xf4, 0xe3, 0xf3, 0x0b, 0x49, 0x79, 0x3e, 0xe5,
-  0x5f, 0xd4, 0x78, 0x5b, 0x1f, 0x07, 0x2c, 0x0e, 0x1a, 0x8b, 0xca, 0x01,
-  0x60, 0x09, 0xcc, 0x5e, 0x2e, 0x09, 0x6a, 0x10, 0x64, 0x52, 0xb9, 0x24,
-  0x9f, 0x78, 0x7a, 0xcf, 0xa9, 0x33, 0x90, 0xe8, 0x1a, 0x6b, 0xeb, 0xb2,
-  0xad, 0x78, 0x24, 0x3c, 0x84, 0x9e, 0xdc, 0x97, 0x18, 0x84, 0x18, 0xac,
-  0xcd, 0x2e, 0x75, 0xc6, 0x5f, 0xb2, 0x7b, 0xc2, 0xa2, 0xba, 0xd6, 0xb8,
-  0x6a, 0x7b, 0x72, 0xc2, 0x85, 0xfb, 0x70, 0xb3, 0xfc, 0x66, 0x94, 0x23,
-  0x37, 0x2f, 0xa6, 0xa1, 0x0c, 0x6a, 0x53, 0x45, 0x1a, 0xc4, 0x43, 0x19,
-  0x64, 0x54, 0x9b, 0x02, 0x0a, 0x69, 0xcf, 0x24, 0x41, 0x6a, 0x00, 0x89,
-  0x3e, 0x3c, 0x61, 0x4b, 0xd5, 0x13, 0xd7, 0x32, 0xf4, 0x77, 0x5c, 0x7f,
-  0x92, 0x0b, 0x2e, 0xf9, 0x54, 0x0d, 0x03, 0x8a, 0x46, 0xac, 0x9b, 0x8b,
-  0x25, 0x59, 0x69, 0xf2, 0x85, 0x68, 0xed, 0x57, 0x6a, 0xbe, 0x8d, 0xa7,
-  0x69, 0xb9, 0x12, 0x49, 0x7f, 0x24, 0xba, 0x03, 0x9b, 0x7f, 0x58, 0xa7,
-  0x6f, 0x11, 0x39, 0x69, 0xe1, 0x27, 0xa9, 0xbc, 0x25, 0xb3, 0xd4, 0x6d,
-  0x6b, 0x1a, 0x49, 0x40, 0x1b, 0x26, 0xb4, 0x2d, 0x55, 0x64, 0x23, 0xce,
-  0x32, 0x4d, 0xc7, 0x29, 0xeb, 0x45, 0x3a, 0x14, 0x59, 0x19, 0xce, 0xfa,
-  0x50, 0x9a, 0x9f, 0x67, 0x6d, 0x54, 0x95, 0x82, 0x31, 0xd2, 0x50, 0x63,
-  0xc9, 0x89, 0xab, 0x92, 0x60, 0xa3, 0xf7, 0x23, 0x7c, 0x09, 0xbd, 0x1f,
-  0x1d, 0xc0, 0xa7, 0x34, 0xbe, 0xd1, 0xac, 0x51, 0xf6, 0xe5, 0x0b, 0x2d,
-  0x8d, 0x92, 0x9b, 0xf8, 0x2e, 0xcd, 0xf2, 0x41, 0x25, 0xaf, 0xa8, 0x61,
-  0x25, 0x2c, 0x88, 0x00, 0x48, 0x4e, 0x52, 0x2b, 0x14, 0xbf, 0x88, 0x18,
-  0x25, 0x97, 0x4f, 0x84, 0x2b, 0x1c, 0xdb, 0x81, 0xc0, 0xb4, 0xfe, 0xf9,
-  0xb6, 0x98, 0x62, 0xe1, 0x29, 0x6b, 0xc6, 0xe4, 0x21, 0xae, 0xca, 0xe5,
-  0xa0, 0xe8, 0xa3, 0x71, 0x71, 0xd7, 0x7e, 0xc2, 0x8a, 0xbb, 0xd6, 0x13,
-  0x26, 0x47, 0xcc, 0xa7, 0x77, 0xb9, 0x53, 0xd6, 0x3c, 0x66, 0xc3, 0x6f,
-  0x9d, 0x6b, 0xa4, 0x25, 0x72, 0x57, 0x0e, 0x97, 0x4d, 0xac, 0xed, 0x74,
-  0x29, 0x65, 0xbb, 0xf3, 0x65, 0x07, 0xec, 0xd1, 0x13, 0xe6, 0xa2, 0x49,
-  0xd1, 0xbf, 0x1e, 0xac, 0xf3, 0x83, 0xe1, 0xb7, 0xc1, 0x91, 0x0a, 0xf8,
-  0x95, 0xcb, 0xd9, 0xa8, 0xdf, 0xfd, 0x9c, 0x2f, 0x95, 0x5b, 0x04, 0x1a,
-  0xb7, 0xd5, 0x4a, 0x6a, 0xc5, 0xdd, 0x3f, 0x4b, 0x6a, 0x8d, 0xe5, 0x7d,
-  0x8c, 0xd4, 0xc2, 0x3d, 0x6a, 0x90, 0x1a, 0x26, 0xda, 0xa0, 0x34, 0x5b,
-  0xd8, 0x5f, 0x4c, 0x6a, 0x4a, 0xa2, 0x55, 0x4a, 0x53, 0xbe, 0x55, 0xa1,
-  0xb0, 0x80, 0x6c, 0x6a, 0xf1, 0x8a, 0xed, 0x16, 0xf9, 0xef, 0x10, 0x17,
-  0xa0, 0xc9, 0x7b, 0x92, 0x4c, 0x1c, 0x04, 0x40, 0x56, 0xad, 0xca, 0x88,
-  0xc7, 0xdc, 0x68, 0x0b, 0xc9, 0xf7, 0xd7, 0x8c, 0x04, 0xcb, 0xba, 0x7c,
-  0x5c, 0xe2, 0xa5, 0xc1, 0xf4, 0x2c, 0x90, 0x13, 0x62, 0x8f, 0x76, 0xb3,
-  0xd1, 0x22, 0x7f, 0xb0, 0x75, 0x4d, 0x62, 0x59, 0x91, 0xb4, 0x20, 0x11,
-  0x2e, 0xf4, 0x3a, 0x35, 0x35, 0xd0, 0xd0, 0xea, 0x20, 0x9b, 0xd5, 0xc6,
-  0x8b, 0xf8, 0xce, 0x26, 0x9b, 0x9a, 0x8b, 0x40, 0x0d, 0xc3, 0x17, 0x84,
-  0x2e, 0xf6, 0xc0, 0x23, 0x52, 0xc5, 0xe1, 0x8a, 0xcc, 0xbd, 0x1b, 0x81,
-  0x71, 0x10, 0xd4, 0x48, 0xd8, 0x16, 0x04, 0x12, 0xc4, 0xb8, 0xca, 0x9c,
-  0x7f, 0x07, 0xb9, 0x6d, 0x4d, 0xe0, 0x29, 0xaf, 0x87, 0x64, 0x93, 0x09,
-  0x3f, 0x6d, 0xc6, 0x1f, 0x28, 0x7f, 0xb5, 0x95, 0x51, 0x97, 0x7f, 0x63,
-  0x91, 0x2b, 0x49, 0x56, 0x1a, 0xaf, 0x99, 0x84, 0xde, 0x4e, 0x17, 0xa8,
-  0x24, 0xd6, 0x15, 0x31, 0xaf, 0x78, 0x67, 0x46, 0xc3, 0xd1, 0xc1, 0x13,
-  0xec, 0xe8, 0xc2, 0x75, 0x34, 0x90, 0x71, 0x29, 0x56, 0x19, 0x8e, 0x8d,
-  0x85, 0x89, 0x30, 0x4f, 0x7e, 0x43, 0xef, 0x62, 0x42, 0x0b, 0x86, 0xfc,
-  0x43, 0x26, 0x4c, 0x12, 0x2a, 0xd7, 0x99, 0xd2, 0xbc, 0x77, 0xa3, 0x73,
-  0xa1, 0x8f, 0x9f, 0xc7, 0xd7, 0x09, 0x67, 0x29, 0x8a, 0x9b, 0x48, 0x85,
-  0xad, 0x0f, 0xa4, 0x43, 0x35, 0x12, 0x8a, 0x58, 0x38, 0xf3, 0xce, 0xc0,
-  0x20, 0x7f, 0x08, 0x49, 0x60, 0x3e, 0x7b, 0x48, 0x17, 0xbf, 0x19, 0x72,
-  0x3c, 0x51, 0x8b, 0x73, 0x35, 0xb2, 0xdb, 0x30, 0x1c, 0xd4, 0x6a, 0xd4,
-  0xf9, 0x33, 0xfb, 0x8c, 0x3b, 0x36, 0x40, 0x37, 0xe5, 0xa6, 0x15, 0x94,
-  0x1f, 0xf1, 0xca, 0x66, 0xd5, 0xd3, 0x6c, 0x81, 0x24, 0x2e, 0x0a, 0x00,
-  0x20, 0x02, 0x4c, 0x12, 0xc4, 0x26, 0x49, 0x7e, 0xab, 0x93, 0x15, 0xc9,
-  0x73, 0x12, 0x23, 0x7a, 0xaa, 0xc3, 0xda, 0xd7, 0x33, 0x22, 0xfa, 0xb3,
-  0x0d, 0x4a, 0x93, 0xb0, 0x42, 0x56, 0x19, 0x4f, 0x19, 0xbd, 0xa3, 0xee,
-  0x44, 0x60, 0xf5, 0x48, 0xcd, 0xc3, 0x13, 0xc4, 0x80, 0xf0, 0x80, 0x62,
-  0x56, 0xd3, 0x52, 0x00, 0x3a, 0xb8, 0x69, 0xfd, 0x96, 0xde, 0xe8, 0x64,
-  0x7e, 0xcd, 0x49, 0x8a, 0x2f, 0x5b, 0x63, 0xa0, 0x92, 0xa9, 0xa5, 0xed,
-  0x5a, 0x90, 0xe4, 0x38, 0x5f, 0x2d, 0x98, 0xf1, 0xcb, 0x5b, 0xca, 0x8f,
-  0x00, 0x4c, 0x20, 0xf1, 0x90, 0x61, 0x6e, 0xf7, 0xa0, 0x2d, 0x08, 0xc0,
-  0xf5, 0xa8, 0xc1, 0xa2, 0x7c, 0x83, 0x2d, 0x68, 0xc1, 0x84, 0x3b, 0xc9,
-  0x67, 0x44, 0x26, 0xa3, 0x65, 0x3a, 0x9d, 0x48, 0x4c, 0x98, 0x8b, 0xbe,
-  0x6b, 0x38, 0x61, 0xb8, 0x9d, 0x22, 0xd4, 0xff, 0xf9, 0x22, 0xe3, 0x98,
-  0xa7, 0x4d, 0x1e, 0xd0, 0x9c, 0xa6, 0xbd, 0xa5, 0xf9, 0xe3, 0xcc, 0x18,
-  0xf5, 0x79, 0x15, 0xec, 0x1a, 0x26, 0xf3, 0xf8, 0x2e, 0x4e, 0xa7, 0xb8,
-  0xc3, 0xa8, 0xa1, 0x7c, 0x39, 0x47, 0xe7, 0xd5, 0x95, 0xba, 0x4b, 0xf3,
-  0x6c, 0x3e, 0x6b, 0xda, 0x37, 0x36, 0x2f, 0x4e, 0x86, 0x87, 0x51, 0x74,
-  0x36, 0x8c, 0xce, 0xde, 0x9e, 0xfe, 0xc0, 0xae, 0x43, 0xd6, 0x31, 0x05,
-  0x40, 0x83, 0xfb, 0x0f, 0xde, 0x8c, 0xee, 0xe2, 0x3c, 0x85, 0xbe, 0xd6,
-  0xf3, 0x1e, 0xb5, 0x16, 0x55, 0x5c, 0xce, 0x66, 0xff, 0xde, 0xb6, 0xd8,
-  0x87, 0x3d, 0xf2, 0xad, 0x85, 0xf8, 0xbf, 0x24, 0x2e, 0x52, 0x5a, 0x70,
-  0x98, 0xb9, 0xc7, 0x96, 0x9c, 0xb7, 0x6c, 0xe6, 0x8a, 0xb1, 0x35, 0x2c,
-  0x3c, 0xd5, 0x12, 0xa0, 0xc6, 0x17, 0x25, 0xf5, 0x4e, 0x13, 0xad, 0x45,
-  0x6c, 0xd0, 0x44, 0xaf, 0x45, 0xaf, 0x5d, 0xe3, 0x6b, 0x46, 0x04, 0xb2,
-  0x8b, 0x8f, 0x93, 0xb5, 0x5d, 0xc4, 0x2c, 0xbc, 0x3b, 0x6f, 0x08, 0x44,
-  0xa2, 0x79, 0x99, 0x67, 0x8b, 0x55, 0xf4, 0x55, 0xcc, 0x3c, 0x8f, 0xfb,
-  0x3a, 0x8a, 0x93, 0x59, 0x23, 0xaa, 0xa0, 0xc8, 0xc6, 0xb7, 0x49, 0x29,
-  0x27, 0x48, 0x7e, 0x77, 0xe4, 0x0c, 0x5d, 0x4f, 0x78, 0x66, 0xc4, 0x8b,
-  0x39, 0x61, 0xd3, 0x82, 0x51, 0x0f, 0x68, 0x8e, 0x86, 0xd2, 0x34, 0x3b,
-  0x1a, 0xae, 0x43, 0xa0, 0x0d, 0x2a, 0x93, 0x40, 0x13, 0x32, 0xb5, 0x7a,
-  0xa0, 0x61, 0xff, 0x98, 0x6f, 0x1a, 0xf6, 0xd0, 0xbf, 0x0c, 0xbc, 0xda,
-  0x3f, 0xee, 0x9b, 0x6a, 0xf9, 0x53, 0xfb, 0x32, 0x34, 0x63, 0xdf, 0xab,
-  0x57, 0x7b, 0xd0, 0x96, 0x86, 0xcd, 0x31, 0x7b, 0xb9, 0x6e, 0xb9, 0xb2,
-  0x24, 0x11, 0x50, 0x43, 0xeb, 0x68, 0x31, 0xe1, 0xd1, 0x8f, 0x24, 0x8d,
-  0x40, 0x02, 0x92, 0x2b, 0x8d, 0x59, 0x3a, 0x19, 0x6e, 0xde, 0xf3, 0xe3,
-  0x37, 0x6b, 0x42, 0xe6, 0x4c, 0x65, 0x4d, 0x4c, 0x8d, 0x22, 0xee, 0xe0,
-  0x14, 0x7a, 0xc9, 0x4d, 0x75, 0x83, 0x0d, 0x33, 0x7a, 0x6b, 0xcd, 0xfd,
-  0x6d, 0xc9, 0xc0, 0x41, 0x13, 0x2c, 0xba, 0xba, 0x1f, 0x5d, 0xfa, 0x7b,
-  0x70, 0xfc, 0x6a, 0xae, 0x02, 0x01, 0x20, 0x29, 0x9a, 0xee, 0x90, 0x4e,
-  0x30, 0x93, 0x8e, 0xc5, 0x5e, 0x05, 0xd1, 0x69, 0xc4, 0x0f, 0x38, 0x09,
-  0x29, 0xba, 0x4d, 0x56, 0x96, 0x59, 0xe7, 0x3e, 0x1b, 0x07, 0x10, 0x5c,
-  0x6e, 0xed, 0x74, 0x51, 0x38, 0x09, 0x9c, 0x7e, 0xce, 0x59, 0x87, 0xff,
-  0x1d, 0x76, 0x5f, 0xf7, 0x54, 0x14, 0xba, 0x7e, 0x9f, 0x1b, 0x04, 0xc7,
-  0x29, 0x02, 0xea, 0x9d, 0x35, 0xd2, 0x68, 0x1c, 0x60, 0xd4, 0x74, 0xd5,
-  0x6a, 0x02, 0xf0, 0xb0, 0x69, 0xcc, 0xa6, 0x34, 0xa1, 0xbe, 0x28, 0x2d,
-  0x08, 0x1c, 0xf1, 0xf1, 0xd3, 0x74, 0x94, 0xb3, 0x43, 0x0b, 0x92, 0x52,
-  0xc0, 0xac, 0x1b, 0xa2, 0x8a, 0x27, 0x20, 0x36, 0x82, 0xa4, 0xe3, 0x5b,
-  0x9c, 0x22, 0xd5, 0x2b, 0xc2, 0x2d, 0x37, 0xe1, 0x4f, 0x20, 0xa3, 0xb4,
-  0xaf, 0xba, 0x9e, 0x11, 0x97, 0x31, 0xe3, 0xcc, 0x20, 0x9b, 0x22, 0xe5,
-  0xc8, 0x1c, 0x48, 0x5e, 0xca, 0xff, 0x3c, 0x17, 0x72, 0x6c, 0x88, 0xc7,
-  0xfa, 0xfe, 0xe8, 0xe4, 0x02, 0x2c, 0x73, 0xb4, 0x5a, 0x93, 0x92, 0xb1,
-  0x9d, 0x94, 0xe3, 0xed, 0xc5, 0x6d, 0xba, 0x3d, 0x2f, 0x8a, 0xc9, 0x68,
-  0xcb, 0x65, 0x2d, 0x22, 0xc6, 0x9e, 0x43, 0x4b, 0xa2, 0xf3, 0x6f, 0x0e,
-  0x87, 0x9f, 0xec, 0xee, 0x72, 0x0a, 0xfd, 0x64, 0xc9, 0x0a, 0xd2, 0x26,
-  0x2d, 0x40, 0x23, 0x03, 0xae, 0xa0, 0x75, 0x9f, 0x0d, 0x8a, 0x6c, 0x0b,
-  0x0a, 0x80, 0x63, 0xb8, 0x58, 0x23, 0x44, 0xa8, 0xc0, 0x3f, 0xa9, 0xf9,
-  0x61, 0x6c, 0x56, 0xfc, 0x2d, 0xe3, 0x44, 0x84, 0x36, 0x10, 0xc5, 0x10,
-  0xbd, 0xe4, 0x7f, 0xd7, 0x70, 0xba, 0xe0, 0x8c, 0x03, 0x6a, 0xa6, 0xb2,
-  0x27, 0xfc, 0xb2, 0x4a, 0xf9, 0x1c, 0x74, 0x53, 0x39, 0xf1, 0x4d, 0x9d,
-  0x87, 0x9d, 0xba, 0x34, 0xcf, 0x5e, 0x74, 0x74, 0x7c, 0x01, 0x9a, 0x3c,
-  0x7e, 0xfb, 0x15, 0x84, 0x43, 0xce, 0xa1, 0xbb, 0x9e, 0xa7, 0x3f, 0x33,
-  0xb7, 0xa3, 0x26, 0x8b, 0x81, 0x66, 0x1f, 0x86, 0xc7, 0xb3, 0xd6, 0x1c,
-  0xaf, 0x17, 0xaf, 0x22, 0x0e, 0xd9, 0x6f, 0xbb, 0x4c, 0xb1, 0x30, 0xc6,
-  0xc3, 0x83, 0x70, 0x76, 0xbf, 0x12, 0x43, 0xa4, 0xa7, 0x68, 0x44, 0x74,
-  0x16, 0x5b, 0x0c, 0x21, 0x1c, 0x64, 0x14, 0x64, 0xf3, 0x31, 0x5d, 0xa8,
-  0xe3, 0x26, 0xf2, 0x98, 0x3a, 0x11, 0x0d, 0xab, 0x12, 0x89, 0x24, 0x36,
-  0xdf, 0x86, 0xcf, 0xd7, 0x3d, 0xb0, 0x59, 0x6c, 0x45, 0x8e, 0x7f, 0xa6,
-  0xf3, 0x20, 0x34, 0x8a, 0x79, 0x99, 0xaa, 0xdf, 0x86, 0x61, 0x27, 0x07,
-  0xbc, 0xa1, 0x41, 0xf2, 0xc4, 0x62, 0x77, 0x3c, 0x2c, 0xc7, 0x0f, 0x2b,
-  0xde, 0x13, 0xd7, 0x53, 0x65, 0xe9, 0x69, 0x4f, 0x55, 0xe6, 0xd4, 0x8b,
-  0xad, 0x91, 0x0e, 0x56, 0xc2, 0x96, 0xca, 0xb6, 0xee, 0xa0, 0xcd, 0xc6,
-  0xa6, 0x0a, 0xe3, 0x71, 0xc4, 0xa2, 0x11, 0xa7, 0x2d, 0xd2, 0x85, 0x79,
-  0xe9, 0x0f, 0x49, 0xa4, 0x7d, 0x7f, 0x78, 0xf0, 0xfe, 0xcb, 0x77, 0x6f,
-  0x8f, 0x4e, 0x8f, 0xbb, 0x75, 0x8a, 0xbc, 0xd2, 0x40, 0x51, 0x12, 0x3c,
-  0xc5, 0xe8, 0x55, 0x8b, 0x9d, 0xc4, 0xb5, 0x8e, 0x44, 0x5f, 0xb9, 0xe0,
-  0x35, 0xd0, 0xda, 0x56, 0xbc, 0xae, 0xfe, 0x2c, 0xe7, 0x13, 0x64, 0x16,
-  0x06, 0x93, 0xb7, 0x5c, 0x12, 0x75, 0x9d, 0xd9, 0xf8, 0x5a, 0xd4, 0x5d,
-  0x84, 0x89, 0xd3, 0x05, 0xcd, 0x32, 0xb6, 0x81, 0x7c, 0x48, 0x7e, 0x92,
-  0x87, 0x71, 0xaa, 0x88, 0xef, 0x1c, 0x14, 0x82, 0x55, 0x8f, 0x69, 0x40,
-  0x2d, 0xdb, 0x5d, 0x54, 0xe2, 0x15, 0xb8, 0x15, 0xa2, 0xe4, 0xbe, 0x0e,
-  0x72, 0x9c, 0x97, 0xdd, 0x5e, 0x94, 0xa4, 0x70, 0xc5, 0xa5, 0x41, 0x44,
-  0xcd, 0xa4, 0x35, 0xbd, 0x86, 0x03, 0x26, 0x63, 0xa1, 0xeb, 0x41, 0xf2,
-  0x90, 0x20, 0xb6, 0x43, 0xdf, 0x3a, 0x84, 0x71, 0xb7, 0x8c, 0xbe, 0xcb,
-  0x72, 0xa4, 0xed, 0x1f, 0x59, 0x84, 0xa5, 0x3d, 0x14, 0xcf, 0x57, 0x4d,
-  0xcf, 0x2d, 0xab, 0x44, 0xac, 0x15, 0x5c, 0x0b, 0x8a, 0xe2, 0xf9, 0xc1,
-  0xe5, 0xd7, 0x6d, 0x47, 0xb8, 0x4a, 0x86, 0x8f, 0xdd, 0x33, 0xaa, 0x92,
-  0x97, 0xeb, 0xe3, 0x37, 0xe5, 0xaa, 0x59, 0x7f, 0xd7, 0x54, 0x8f, 0x77,
-  0xf3, 0xba, 0x69, 0xc9, 0xaf, 0x72, 0xd7, 0x8d, 0xdd, 0x36, 0xa3, 0xd5,
-  0x7a, 0x92, 0x0c, 0x6f, 0x9a, 0xf5, 0x57, 0x4d, 0xf3, 0xae, 0xf1, 0x32,
-  0x0c, 0x77, 0xc9, 0xa7, 0xd5, 0x2e, 0x1b, 0xbd, 0x6b, 0xfe, 0x8f, 0xb8,
-  0x6a, 0x62, 0x9c, 0xa0, 0x1a, 0x0f, 0xf5, 0xe1, 0xb8, 0xff, 0x3a, 0x37,
-  0x0d, 0x42, 0x7b, 0x9b, 0x0c, 0x46, 0x58, 0x6c, 0x8d, 0xa9, 0x56, 0xc2,
-  0x37, 0x5b, 0x19, 0x62, 0xcf, 0xc4, 0xaf, 0xfa, 0x66, 0xb9, 0xae, 0xf0,
-  0xda, 0x4d, 0x0c, 0xdb, 0x1b, 0x33, 0x8c, 0x3c, 0x1b, 0x4b, 0x06, 0x96,
-  0x1a, 0x7b, 0x24, 0x47, 0xe9, 0x7d, 0x9e, 0xdc, 0xc4, 0x05, 0x31, 0x90,
-  0x65, 0x99, 0xb2, 0x25, 0xbc, 0xae, 0x03, 0x2c, 0x39, 0x6c, 0xd0, 0xa9,
-  0xfe, 0x91, 0x25, 0xfb, 0x45, 0x9a, 0xb6, 0xee, 0xd7, 0x4f, 0x4c, 0x0d,
-  0xac, 0xfd, 0xd8, 0xa2, 0xb0, 0x72, 0x5f, 0x57, 0x5b, 0x87, 0xa7, 0xfd,
-  0x10, 0xdf, 0x6d, 0xc6, 0x19, 0x9a, 0x30, 0xc7, 0x27, 0x57, 0x34, 0xdd,
-  0x34, 0xc8, 0xfd, 0x33, 0xd0, 0x08, 0xbd, 0xe2, 0xd2, 0xab, 0x36, 0xe3,
-  0x94, 0x7d, 0x0b, 0x76, 0xa2, 0x17, 0x50, 0x21, 0x00, 0x70, 0xd5, 0xed,
-  0x2c, 0x7e, 0x43, 0x0a, 0xba, 0x62, 0x63, 0x24, 0x51, 0xf1, 0x1a, 0x7b,
-  0xce, 0x6b, 0xc0, 0xcf, 0x14, 0xec, 0xbf, 0xe5, 0xc9, 0x6d, 0x32, 0x00,
-  0x92, 0x00, 0x6c, 0xc5, 0x50, 0x89, 0xb7, 0x58, 0x6e, 0x57, 0xa3, 0x16,
-  0x72, 0x4a, 0x14, 0x0d, 0xa6, 0x29, 0xa3, 0x28, 0x1c, 0x13, 0x22, 0xb9,
-  0xe0, 0x9b, 0x84, 0xbb, 0x42, 0xcd, 0xbb, 0x80, 0x49, 0x25, 0xce, 0x4a,
-  0x67, 0x34, 0xf8, 0x72, 0x92, 0xc4, 0xd3, 0xa8, 0x2d, 0x80, 0xe6, 0x4a,
-  0xe0, 0x55, 0xcd, 0x5e, 0x0d, 0xb1, 0x66, 0x6e, 0x46, 0xee, 0x48, 0x43,
-  0x20, 0x34, 0xde, 0x35, 0xc4, 0x96, 0xb8, 0x42, 0xde, 0x68, 0x83, 0x8a,
-  0x27, 0xc9, 0x34, 0x15, 0xa3, 0x9f, 0xe5, 0xf7, 0x41, 0x67, 0xd1, 0x2c,
-  0xc0, 0x02, 0x90, 0x27, 0x12, 0x13, 0xeb, 0x1e, 0x60, 0x30, 0x0f, 0x8d,
-  0x5a, 0x2c, 0xea, 0xcd, 0x6d, 0x2a, 0x3c, 0x09, 0xf0, 0x18, 0x35, 0x43,
-  0xcd, 0xe2, 0x90, 0x78, 0x58, 0x2b, 0x07, 0x95, 0xbb, 0xa5, 0x97, 0x1a,
-  0x8c, 0x58, 0xd8, 0xa0, 0x45, 0xde, 0xd0, 0xb3, 0xd9, 0x65, 0x2a, 0x64,
-  0x29, 0xa0, 0xc9, 0x58, 0xfe, 0x52, 0x54, 0xfc, 0xb8, 0x0c, 0xd3, 0x15,
-  0x25, 0xa9, 0x67, 0x6f, 0xaf, 0xdd, 0xe8, 0xab, 0x99, 0xc5, 0x1a, 0x7b,
-  0xc1, 0x4b, 0xd1, 0x2f, 0xe2, 0x2b, 0x87, 0x31, 0x42, 0x64, 0xcc, 0x12,
-  0x63, 0x36, 0xa6, 0xd5, 0x93, 0xc0, 0x25, 0x7c, 0xc6, 0xe6, 0x8e, 0x86,
-  0xab, 0x6b, 0x39, 0xe6, 0xd3, 0xc8, 0x06, 0x00, 0x6f, 0xc9, 0x8c, 0xd8,
-  0xc9, 0xec, 0xfc, 0xf8, 0xc5, 0x34, 0x65, 0xc8, 0xb8, 0x3c, 0x5b, 0x5e,
-  0xdf, 0xd0, 0x7d, 0x08, 0xd6, 0x82, 0xdb, 0xb5, 0xc5, 0x89, 0x51, 0x4b,
-  0x81, 0x86, 0x3c, 0x7b, 0x97, 0x4d, 0xd9, 0xac, 0xb9, 0xe9, 0x9a, 0x97,
-  0xd6, 0x9f, 0xee, 0xec, 0x62, 0xbc, 0x4f, 0x77, 0x3e, 0xad, 0x44, 0xb1,
-  0xb3, 0x39, 0x3d, 0x1e, 0x23, 0xc5, 0x25, 0xfa, 0x91, 0x6f, 0x8f, 0x9f,
-  0x5a, 0xfd, 0x2e, 0xb0, 0xcb, 0xc6, 0xf3, 0xd0, 0x12, 0x1b, 0x17, 0xb7,
-  0xe2, 0x2a, 0xe8, 0xd8, 0xfb, 0xfc, 0x7a, 0x47, 0xad, 0x19, 0xce, 0x1f,
-  0xdc, 0x86, 0xe2, 0xe3, 0x14, 0x5e, 0xce, 0x5a, 0x34, 0x36, 0x05, 0x69,
-  0xbd, 0x17, 0x40, 0xff, 0x41, 0x0c, 0x02, 0x24, 0xeb, 0xd5, 0x5a, 0xcb,
-  0xcc, 0xc1, 0xe1, 0xa1, 0xf7, 0xc6, 0x55, 0xe3, 0xbd, 0x9e, 0x70, 0xbc,
-  0xd7, 0xc7, 0x9d, 0x7e, 0x40, 0xc6, 0xf4, 0x34, 0xb6, 0x1a, 0x06, 0xf3,
-  0x4a, 0xda, 0xad, 0x5a, 0x54, 0x5a, 0x08, 0x0c, 0x46, 0xca, 0x65, 0x91,
-  0xd4, 0x57, 0x74, 0x7d, 0x46, 0x49, 0x00, 0x28, 0xa6, 0xd9, 0x25, 0x7c,
-  0x44, 0x82, 0xa4, 0x06, 0xb6, 0x79, 0x6e, 0xfb, 0x5c, 0x34, 0xc8, 0x7f,
-  0x2a, 0xed, 0xb5, 0x44, 0x0c, 0x59, 0xfc, 0x94, 0x38, 0xb4, 0xe1, 0xf6,
-  0x79, 0x40, 0x4a, 0xf4, 0x3c, 0x88, 0x14, 0xd7, 0x99, 0x95, 0xb4, 0x46,
-  0x71, 0x3e, 0x71, 0x3e, 0x99, 0xa8, 0x09, 0xc3, 0x61, 0xd2, 0x0d, 0xe7,
-  0xdf, 0x30, 0x54, 0x4d, 0x88, 0x52, 0xd2, 0xcc, 0x71, 0xb1, 0x80, 0x6d,
-  0xef, 0x5e, 0x6e, 0xcd, 0xc2, 0x88, 0x66, 0xa9, 0x84, 0x77, 0x06, 0x19,
-  0x1d, 0xf5, 0x05, 0xd3, 0x23, 0xf6, 0xa3, 0xfc, 0x6c, 0xa7, 0x41, 0xce,
-  0x17, 0xcb, 0x33, 0xd5, 0xf9, 0xf4, 0x05, 0xc9, 0x40, 0x96, 0xf0, 0x3c,
-  0x0f, 0xe2, 0x32, 0xbe, 0x31, 0xcb, 0x8d, 0xf8, 0x88, 0x9b, 0xc9, 0x53,
-  0x9b, 0xc3, 0x2d, 0xf3, 0x14, 0xcb, 0xd5, 0xab, 0xed, 0xc5, 0xf9, 0xb5,
-  0x70, 0x29, 0x0f, 0x39, 0xd2, 0x88, 0xb2, 0xeb, 0x37, 0xcc, 0x13, 0xd7,
-  0xa2, 0x2f, 0x70, 0x00, 0xc5, 0x5d, 0x4b, 0xe4, 0x1d, 0x34, 0xa3, 0xf1,
-  0xfd, 0xa4, 0x3d, 0x10, 0x45, 0x90, 0x2f, 0x33, 0x6c, 0xb3, 0x26, 0x4c,
-  0x1e, 0x7e, 0x77, 0x14, 0xa4, 0x23, 0xf2, 0x19, 0xc3, 0x9c, 0x54, 0xe6,
-  0x17, 0xd0, 0xea, 0x75, 0xb1, 0x72, 0x41, 0xa4, 0x0f, 0xc0, 0x60, 0x5f,
-  0x03, 0xa1, 0x3b, 0x59, 0xb8, 0xf4, 0x22, 0x60, 0xbf, 0x08, 0x5b, 0x63,
-  0x50, 0x57, 0xc0, 0xb7, 0xce, 0x9a, 0x22, 0xb1, 0x4f, 0x93, 0x45, 0x80,
-  0x82, 0x8f, 0x58, 0xe1, 0xfc, 0xaf, 0x8b, 0xd7, 0x87, 0xbb, 0x9f, 0x3e,
-  0xf9, 0x8c, 0x04, 0x74, 0x76, 0x88, 0xa6, 0xb5, 0x60, 0x5b, 0x09, 0x5c,
-  0x5d, 0x1f, 0xb1, 0xa4, 0x46, 0x25, 0x13, 0x30, 0xd5, 0x4f, 0x4f, 0x9c,
-  0x2f, 0xbb, 0x4f, 0x20, 0xf3, 0xa8, 0xcf, 0xb0, 0x11, 0x11, 0x95, 0xd1,
-  0x22, 0x9a, 0xce, 0x85, 0x15, 0xe3, 0x58, 0x0d, 0xac, 0x96, 0xdc, 0xa9,
-  0x83, 0x2a, 0x6a, 0x2e, 0x67, 0xc4, 0xf5, 0xa2, 0x8b, 0xe3, 0xcb, 0x8b,
-  0x5e, 0x34, 0xbc, 0x3c, 0xbb, 0x58, 0x13, 0x66, 0x46, 0x37, 0x27, 0x73,
-  0x25, 0x5e, 0x33, 0x26, 0x1b, 0x86, 0x15, 0x90, 0xe3, 0x56, 0xc9, 0xb6,
-  0x80, 0x5e, 0x23, 0x61, 0x86, 0x60, 0xaa, 0xb3, 0xfe, 0xba, 0xe0, 0xc2,
-  0xca, 0x6a, 0x81, 0x6c, 0x48, 0x92, 0x78, 0x74, 0x62, 0xb2, 0xed, 0x1f,
-  0x41, 0x21, 0x4c, 0x8b, 0x3c, 0x5d, 0xe7, 0xd0, 0xc1, 0x68, 0x15, 0x4c,
-  0xd0, 0xcb, 0x80, 0x6b, 0xc0, 0xaf, 0x5c, 0xf8, 0x06, 0x42, 0xfb, 0x1d,
-  0xc6, 0x35, 0x0e, 0x4a, 0xc7, 0xfc, 0xdc, 0x1d, 0x58, 0x8a, 0x6e, 0x93,
-  0x20, 0x6e, 0xeb, 0x03, 0xf4, 0x4b, 0x32, 0xc3, 0x96, 0x4b, 0x54, 0xe3,
-  0xff, 0x18, 0x3c, 0x50, 0x70, 0x9b, 0x21, 0xe3, 0x19, 0xe3, 0x29, 0x22,
-  0x17, 0x63, 0xdb, 0x16, 0x68, 0xe1, 0xf2, 0x07, 0x78, 0x97, 0xbb, 0xce,
-  0x5d, 0x9e, 0x29, 0x75, 0xc8, 0xbe, 0x90, 0xd4, 0x33, 0x2d, 0x91, 0x99,
-  0xd1, 0xb5, 0x51, 0x75, 0x1d, 0xa9, 0x55, 0xd8, 0xff, 0xb3, 0xc1, 0xee,
-  0x56, 0x8d, 0xc9, 0x70, 0xb4, 0x41, 0x2b, 0x67, 0x61, 0x3f, 0x48, 0x25,
-  0xc6, 0xc1, 0x10, 0xb7, 0x71, 0x0f, 0xd1, 0x85, 0x60, 0xa0, 0x1d, 0x00,
-  0xe1, 0xe2, 0xa7, 0xd6, 0x20, 0xa6, 0xa0, 0x20, 0x01, 0x9b, 0x74, 0x3d,
-  0x71, 0xeb, 0x9e, 0x8b, 0xff, 0x7f, 0x59, 0x67, 0xa7, 0x35, 0xff, 0x7d,
-  0x3d, 0xd0, 0xc6, 0xc3, 0xa5, 0x38, 0x97, 0x18, 0x3b, 0xc1, 0x5d, 0x94,
-  0x85, 0x25, 0xc5, 0x54, 0x66, 0xbe, 0xfb, 0xf1, 0x17, 0xdf, 0xa3, 0x61,
-  0x52, 0x1f, 0x8a, 0x93, 0xc2, 0xe1, 0x0b, 0x22, 0xa5, 0x48, 0x39, 0x98,
-  0x4b, 0x58, 0x05, 0xc2, 0xf9, 0x0c, 0x48, 0xc7, 0x16, 0x96, 0xf8, 0x32,
-  0x8b, 0x31, 0xb0, 0x71, 0x37, 0x6e, 0x31, 0xc8, 0xb2, 0x86, 0x0d, 0x0f,
-  0x15, 0x06, 0x7a, 0xa1, 0xdd, 0x30, 0xda, 0x98, 0x01, 0x2c, 0x08, 0x3e,
-  0xb5, 0x8f, 0x07, 0x68, 0x40, 0x9c, 0xe5, 0xaa, 0x9a, 0x37, 0x4e, 0xda,
-  0x79, 0xb8, 0xcb, 0xc2, 0x00, 0x21, 0x0b, 0x7a, 0xbe, 0x51, 0x8a, 0x89,
-  0xb8, 0x1a, 0x40, 0x22, 0x61, 0xf2, 0x4d, 0x20, 0x3c, 0x51, 0x5e, 0x11,
-  0xde, 0xa1, 0xe8, 0x37, 0xd5, 0xb8, 0x09, 0x5b, 0xe8, 0x86, 0xc4, 0xe5,
-  0xaf, 0x8b, 0x7e, 0x99, 0x21, 0xba, 0x2e, 0x7a, 0xa9, 0x9d, 0x7d, 0xde,
-  0x4a, 0xa2, 0x9c, 0x92, 0x14, 0x48, 0x7b, 0x86, 0x29, 0x09, 0xf4, 0xcc,
-  0xa1, 0xda, 0x2e, 0x69, 0x20, 0x43, 0xcf, 0xb1, 0x45, 0xd8, 0x6f, 0x80,
-  0x48, 0x01, 0x56, 0x53, 0xad, 0x12, 0x4e, 0x70, 0x32, 0x59, 0xc4, 0x94,
-  0x34, 0x43, 0x0a, 0xbf, 0x5c, 0xce, 0x68, 0x2a, 0xf7, 0x49, 0x32, 0xe9,
-  0x16, 0xd1, 0x10, 0x68, 0x8b, 0x75, 0x01, 0x99, 0xa3, 0x66, 0xb0, 0xe0,
-  0xca, 0x27, 0x11, 0x84, 0xc8, 0x2e, 0x12, 0x53, 0x38, 0xe3, 0xc8, 0x10,
-  0xf7, 0x42, 0xcd, 0xcc, 0x52, 0x94, 0xea, 0x8e, 0x88, 0xe1, 0x09, 0x23,
-  0x70, 0x1d, 0xbc, 0xbb, 0xfc, 0xba, 0x13, 0x05, 0xa8, 0xaa, 0x01, 0x23,
-  0xc6, 0x15, 0x5f, 0x92, 0x10, 0x71, 0xe7, 0x62, 0xeb, 0x72, 0x58, 0x4d,
-  0x5a, 0x60, 0x14, 0x6a, 0x16, 0xfb, 0x41, 0x9d, 0x45, 0x3c, 0xab, 0xb3,
-  0x08, 0xce, 0xfa, 0x06, 0x9f, 0xe8, 0xa7, 0x8b, 0x0f, 0x87, 0xf8, 0xb1,
-  0x3a, 0x60, 0x36, 0x80, 0x93, 0x73, 0x06, 0xb3, 0x05, 0xba, 0x70, 0x88,
-  0x59, 0xb2, 0xbc, 0xe6, 0xf0, 0xcf, 0x16, 0x00, 0x35, 0x86, 0xf8, 0xf0,
-  0x3a, 0x80, 0x06, 0xf6, 0xd3, 0x2a, 0x33, 0x35, 0x55, 0x02, 0x97, 0xa4,
-  0x37, 0xdd, 0x19, 0x9f, 0x0c, 0xb8, 0xd6, 0xcd, 0x36, 0x20, 0x8d, 0x4e,
-  0x4e, 0x4d, 0x88, 0x81, 0xd2, 0xf7, 0xe0, 0x61, 0x92, 0xa7, 0x46, 0xe3,
-  0x75, 0x03, 0x6e, 0x62, 0x35, 0x59, 0x22, 0x13, 0xc4, 0x4f, 0xe3, 0x86,
-  0x63, 0x15, 0xc0, 0xc2, 0xbe, 0x2a, 0x0b, 0xfa, 0x74, 0xb0, 0xb7, 0xd5,
-  0xaa, 0x41, 0x19, 0xdf, 0x61, 0x79, 0x9f, 0x13, 0x81, 0x88, 0x67, 0x8c,
-  0xa1, 0xdc, 0x4b, 0xb4, 0xa1, 0x44, 0xab, 0xe5, 0x72, 0xe6, 0x3c, 0xa6,
-  0x1f, 0x66, 0xd1, 0xc4, 0x47, 0xe2, 0x15, 0xaa, 0x1f, 0x28, 0x62, 0x8f,
-  0x1f, 0x11, 0x92, 0x09, 0xda, 0x8f, 0xa3, 0x73, 0x12, 0x09, 0xdc, 0x12,
-  0x07, 0x31, 0x5a, 0xf4, 0x0e, 0xd4, 0x13, 0x1e, 0xc6, 0x56, 0x5d, 0x80,
-  0xe1, 0xe4, 0x5c, 0xd8, 0xb9, 0x5f, 0x23, 0x5c, 0xc7, 0x82, 0x0c, 0x89,
-  0x15, 0xa6, 0x00, 0x7f, 0xcf, 0x69, 0x18, 0x88, 0x4d, 0x16, 0x54, 0x4a,
-  0x1c, 0x30, 0xd6, 0x00, 0xed, 0xf6, 0xdb, 0x68, 0x95, 0xab, 0xa4, 0x80,
-  0x8a, 0xbb, 0xb8, 0xd9, 0xdb, 0x4e, 0x87, 0x02, 0x85, 0x47, 0x80, 0x19,
-  0x12, 0x03, 0x41, 0x5c, 0xb4, 0xa6, 0x49, 0x76, 0x3f, 0x07, 0x20, 0x40,
-  0x8b, 0xf0, 0x87, 0xe1, 0x33, 0x53, 0x1b, 0x54, 0xaf, 0xc1, 0xbd, 0x9d,
-  0xc1, 0x43, 0x48, 0xe3, 0x45, 0x31, 0x95, 0x95, 0x71, 0x65, 0x7b, 0xa4,
-  0xc2, 0x0f, 0x2a, 0xf3, 0xd0, 0x6a, 0xe5, 0x2e, 0xa4, 0x69, 0x38, 0x3c,
-  0xdd, 0xbe, 0x3c, 0x1d, 0x86, 0x9b, 0x6f, 0x9b, 0xde, 0x4c, 0x4e, 0x86,
-  0x71, 0x17, 0x38, 0x72, 0x98, 0xb2, 0xc0, 0xb2, 0x06, 0xe0, 0x35, 0x9a,
-  0x3a, 0xae, 0x87, 0xc2, 0x94, 0x16, 0x75, 0xa1, 0x37, 0x8d, 0x45, 0xdb,
-  0x80, 0x7c, 0x8a, 0xc2, 0xe0, 0x61, 0x1c, 0xce, 0x62, 0xda, 0x37, 0x1a,
-  0x94, 0x58, 0x36, 0xfe, 0x84, 0x56, 0xdc, 0x96, 0x91, 0xaf, 0xa2, 0x66,
-  0x66, 0x68, 0x19, 0x4d, 0x69, 0x84, 0xd3, 0x42, 0x1c, 0xff, 0x88, 0x97,
-  0xe0, 0x31, 0xe9, 0x4e, 0xd5, 0xd4, 0x46, 0x5a, 0xb0, 0x9d, 0xad, 0xc7,
-  0x42, 0xbf, 0xee, 0x25, 0x40, 0x6e, 0x96, 0xe4, 0xb4, 0xeb, 0x80, 0x60,
-  0x91, 0xdc, 0x30, 0x1d, 0xa0, 0x5b, 0x7e, 0xc3, 0xb4, 0xde, 0x6d, 0xa6,
-  0x1d, 0x29, 0xb0, 0x51, 0x2c, 0x81, 0xa2, 0xb4, 0xe3, 0xde, 0xbe, 0xa4,
-  0x62, 0x8f, 0x7c, 0xc0, 0x89, 0xf0, 0x77, 0x96, 0x8f, 0x76, 0xb5, 0xe4,
-  0x4a, 0x3c, 0x2c, 0xae, 0xb7, 0xc5, 0xcf, 0xd6, 0xcf, 0x43, 0xb0, 0x54,
-  0xad, 0xc7, 0xe2, 0x42, 0xc9, 0xb4, 0xbe, 0xcb, 0x20, 0xee, 0x69, 0x76,
-  0xcd, 0x30, 0xa6, 0x16, 0x30, 0x0e, 0xc7, 0xbe, 0x43, 0x75, 0xa8, 0x2b,
-  0xe0, 0x53, 0x09, 0xc2, 0xd1, 0x3d, 0xaf, 0x99, 0x24, 0x44, 0xea, 0x61,
-  0x9a, 0xd0, 0x85, 0xb7, 0x94, 0x6d, 0x17, 0x6c, 0xd9, 0x74, 0x93, 0x3b,
-  0x9b, 0xe0, 0x78, 0x35, 0x10, 0x33, 0x5a, 0x51, 0xc1, 0x95, 0xa8, 0x11,
-  0x93, 0x4f, 0x21, 0x6a, 0x05, 0x3b, 0xa5, 0x8b, 0xc9, 0x13, 0x54, 0x85,
-  0x59, 0x3d, 0x0f, 0x37, 0xda, 0x93, 0x52, 0xcb, 0x72, 0xd5, 0xcf, 0x8a,
-  0x1e, 0x16, 0xb7, 0x88, 0xbf, 0xe0, 0xac, 0x5c, 0x8a, 0x93, 0xbe, 0x4c,
-  0x1a, 0xf8, 0x4e, 0x8f, 0x1e, 0x11, 0x37, 0x87, 0x47, 0x52, 0xea, 0xd7,
-  0x53, 0xae, 0xf3, 0xff, 0x33, 0xed, 0x7a, 0xe2, 0x55, 0xea, 0xd5, 0x14,
-  0x6e, 0xa3, 0x1a, 0x1c, 0xa7, 0xcd, 0x58, 0xdb, 0xad, 0x35, 0xa7, 0x97,
-  0xa6, 0x2a, 0x18, 0x6b, 0x09, 0x38, 0x80, 0x7b, 0x34, 0x1a, 0x96, 0x80,
-  0xc4, 0x46, 0x20, 0x8c, 0xd1, 0xf4, 0x5a, 0x1a, 0x1e, 0x8f, 0xdb, 0xe3,
-  0x80, 0x11, 0xba, 0x74, 0x78, 0x78, 0x48, 0x1f, 0x1c, 0x0a, 0x99, 0x1e,
-  0x2a, 0x47, 0x3d, 0xbc, 0xe1, 0x8c, 0xcd, 0xe9, 0x56, 0x34, 0xbc, 0x59,
-  0x72, 0xbe, 0x21, 0xcf, 0x91, 0x57, 0x56, 0x97, 0xb0, 0x1e, 0x42, 0x16,
-  0xaf, 0xd8, 0x96, 0x25, 0x10, 0x51, 0x15, 0x01, 0x4b, 0xec, 0x02, 0x48,
-  0x25, 0x35, 0xdf, 0xbf, 0xdd, 0x7f, 0xd2, 0x43, 0x6b, 0xaa, 0xf7, 0x72,
-  0xee, 0x00, 0x09, 0x9d, 0xdd, 0x78, 0xee, 0x88, 0x5f, 0xf5, 0xc2, 0x58,
-  0x0e, 0xcd, 0xdb, 0x83, 0x4b, 0x86, 0x80, 0x2e, 0x35, 0x06, 0xb5, 0x3d,
-  0xc0, 0xcd, 0x1d, 0x4b, 0xd0, 0x7f, 0x1c, 0xa0, 0x07, 0x9a, 0x8a, 0x01,
-  0x59, 0x96, 0x93, 0x20, 0x45, 0xb6, 0x1d, 0x68, 0x9c, 0x45, 0x8b, 0x60,
-  0xac, 0x2b, 0xda, 0x77, 0x3a, 0x8e, 0x24, 0xbe, 0xf1, 0x9f, 0x45, 0xf3,
-  0x78, 0x34, 0xf4, 0xa7, 0xca, 0xeb, 0x3f, 0x4a, 0xa4, 0xee, 0xb6, 0xf6,
-  0xfa, 0xd3, 0x3f, 0xbf, 0x4d, 0x89, 0x4a, 0x35, 0xfc, 0x98, 0x5c, 0x61,
-  0x4d, 0x6f, 0x71, 0x45, 0x3b, 0x73, 0x20, 0x37, 0x12, 0x97, 0xa7, 0x61,
-  0xbd, 0x05, 0x6d, 0xf7, 0x04, 0x88, 0x58, 0x42, 0x83, 0x0e, 0x33, 0xfb,
-  0x3e, 0x6e, 0x88, 0x37, 0x76, 0x50, 0xbd, 0x48, 0x89, 0x22, 0x3b, 0xe2,
-  0x5d, 0x71, 0xcd, 0xe7, 0xc9, 0x62, 0xba, 0x72, 0x66, 0x00, 0x6d, 0x7e,
-  0x9d, 0x98, 0x19, 0x1a, 0x93, 0xc2, 0x20, 0x66, 0x1b, 0x63, 0x51, 0x6d,
-  0x05, 0x1d, 0xc5, 0x2c, 0x04, 0x5e, 0x35, 0x22, 0xe5, 0x63, 0xed, 0xb9,
-  0x86, 0xc2, 0xdc, 0xdc, 0xa1, 0x40, 0xda, 0x72, 0xc0, 0x0d, 0x8a, 0x24,
-  0xad, 0x19, 0x50, 0x8f, 0x27, 0x6e, 0x4f, 0x79, 0xe9, 0x21, 0x1c, 0x25,
-  0xa4, 0x4d, 0x23, 0x03, 0x47, 0xe1, 0x2c, 0xfa, 0xe9, 0x5c, 0xd0, 0x13,
-  0x38, 0xe1, 0x15, 0x46, 0x79, 0xc1, 0xbf, 0xa8, 0xe3, 0x41, 0xc6, 0x45,
-  0x64, 0x08, 0x7f, 0xeb, 0x40, 0x2e, 0x0c, 0x02, 0xd5, 0xc7, 0xec, 0x03,
-  0xaa, 0xa3, 0x4d, 0x88, 0xf5, 0x88, 0x16, 0x87, 0x8a, 0x68, 0x71, 0xc9,
-  0xe1, 0x1c, 0x12, 0x59, 0x10, 0xe7, 0xe5, 0x36, 0xb0, 0x2b, 0x24, 0x43,
-  0x79, 0xcc, 0x18, 0xc7, 0x5a, 0x2a, 0xe0, 0xe2, 0xf5, 0xe1, 0xde, 0x93,
-  0xcf, 0x3e, 0x6b, 0x8d, 0x85, 0x4d, 0x34, 0x19, 0xcb, 0x43, 0x75, 0x73,
-  0x30, 0xa3, 0xe4, 0xb6, 0x8b, 0xcb, 0x91, 0xeb, 0xd0, 0x70, 0x2a, 0xb0,
-  0xa8, 0x98, 0x22, 0x23, 0x77, 0xc7, 0x4d, 0xe3, 0x3d, 0x0f, 0xa8, 0x2b,
-  0xd6, 0x37, 0x49, 0x11, 0xb3, 0x32, 0x29, 0x5a, 0x5e, 0xa3, 0x0a, 0x81,
-  0x26, 0x69, 0xc2, 0xf3, 0xe8, 0x0b, 0xa4, 0xb4, 0x71, 0x07, 0xb5, 0xe6,
-  0xfe, 0xca, 0x5a, 0xee, 0x75, 0x52, 0x36, 0xb3, 0x2c, 0x83, 0xe4, 0xfe,
-  0x47, 0x1a, 0x6f, 0xa1, 0x41, 0xcb, 0x12, 0x8d, 0x5e, 0x5a, 0x9a, 0x9d,
-  0x57, 0xcf, 0x23, 0x2b, 0x28, 0x44, 0x23, 0x62, 0xe2, 0x7b, 0xa9, 0xd6,
-  0x29, 0xcd, 0x30, 0xfb, 0xa2, 0x45, 0xc3, 0x2f, 0xcc, 0x8a, 0x0a, 0xd0,
-  0xb1, 0xb2, 0x8c, 0xad, 0xca, 0x19, 0xbc, 0x96, 0x0c, 0x0a, 0x81, 0x48,
-  0x04, 0xb5, 0xb4, 0x5a, 0x3d, 0x0c, 0xa6, 0x97, 0x69, 0x1b, 0xf2, 0xd1,
-  0x4b, 0xd7, 0x28, 0x00, 0x6f, 0x05, 0x97, 0x83, 0x87, 0xd2, 0xb6, 0x12,
-  0xa6, 0x75, 0x70, 0x92, 0x5e, 0x50, 0x15, 0xce, 0xa5, 0xad, 0xf3, 0xbb,
-  0xc1, 0x3a, 0x35, 0x14, 0xfd, 0xe3, 0x87, 0x78, 0x86, 0x22, 0x5d, 0x26,
-  0xf6, 0xc3, 0xab, 0xef, 0x53, 0xe7, 0x34, 0xd2, 0x25, 0x34, 0x92, 0xab,
-  0xdb, 0xa6, 0xcb, 0x0f, 0xd5, 0xf7, 0x9e, 0x5f, 0xea, 0x9a, 0x3d, 0x2f,
-  0xf4, 0xd1, 0x83, 0x22, 0x65, 0x38, 0x0e, 0x98, 0x50, 0x1c, 0xe6, 0xdc,
-  0xd5, 0x64, 0x4d, 0xf8, 0x1e, 0xbf, 0x09, 0xf8, 0xab, 0xfd, 0xd6, 0x80,
-  0x92, 0xfe, 0x6b, 0x37, 0xd2, 0x57, 0x5f, 0x54, 0x5a, 0xbb, 0xbf, 0x1f,
-  0xcc, 0x56, 0xf6, 0x5d, 0x51, 0xa9, 0x39, 0xe8, 0x73, 0xda, 0x1d, 0xf4,
-  0x05, 0xcf, 0xb2, 0x5b, 0x38, 0xe2, 0xf2, 0x48, 0x16, 0x61, 0xe9, 0x1b,
-  0x23, 0x34, 0xcd, 0xe2, 0x69, 0x66, 0xa2, 0xb9, 0x44, 0x06, 0x4f, 0x7f,
-  0x62, 0xed, 0xed, 0xaa, 0x93, 0x59, 0x0f, 0xfa, 0x75, 0xa6, 0xba, 0xe2,
-  0x88, 0xae, 0x15, 0xa3, 0xb2, 0xa6, 0x9a, 0x5a, 0x94, 0xf9, 0x72, 0x5c,
-  0x36, 0x3d, 0xb3, 0x56, 0x94, 0x4f, 0x71, 0x29, 0x83, 0x3c, 0x1f, 0xb1,
-  0x25, 0x56, 0x58, 0x82, 0xcb, 0xb3, 0xf1, 0x79, 0x0c, 0x75, 0x1c, 0x12,
-  0xe0, 0x33, 0x77, 0x7b, 0x22, 0x3d, 0x2b, 0x8a, 0x83, 0x87, 0x1d, 0x58,
-  0xbb, 0xf0, 0x9d, 0xfb, 0x64, 0xf4, 0xea, 0x0b, 0x0e, 0x39, 0x7c, 0x00,
-  0xbc, 0xab, 0xe0, 0x3c, 0x33, 0x0d, 0x6e, 0xf3, 0x9f, 0x9d, 0x88, 0x23,
-  0x4e, 0x5a, 0xd6, 0x9d, 0xb8, 0xf8, 0xba, 0x16, 0x03, 0x44, 0x94, 0xa0,
-  0xb5, 0xab, 0x2c, 0x5b, 0xdb, 0x98, 0x2f, 0x09, 0x88, 0xd5, 0x08, 0xb2,
-  0x7a, 0x24, 0xc9, 0xc6, 0x93, 0xa1, 0x90, 0x9e, 0xdb, 0x46, 0x3d, 0x85,
-  0x6d, 0x48, 0x02, 0xa3, 0x95, 0xab, 0x1c, 0x61, 0x59, 0xc5, 0xaf, 0x7a,
-  0x52, 0xfd, 0x94, 0x95, 0xd5, 0xf5, 0x0b, 0xc2, 0x4f, 0xbf, 0xfa, 0x02,
-  0x68, 0x65, 0xfc, 0xeb, 0x9f, 0xdd, 0xdb, 0xfc, 0x0f, 0x51, 0x31, 0x31,
-  0x82, 0xb5, 0x13, 0x61, 0x51, 0xe4, 0x6a, 0x99, 0x43, 0xcc, 0x48, 0xe4,
-  0x48, 0x4a, 0x61, 0x30, 0x83, 0x22, 0x56, 0x6e, 0xf2, 0xe6, 0xe0, 0xed,
-  0xbb, 0x83, 0xd3, 0x47, 0x73, 0x6e, 0x42, 0x4b, 0xa9, 0x8b, 0x35, 0x83,
-  0xe1, 0xb2, 0x22, 0x38, 0xf2, 0x79, 0xd4, 0x80, 0x7f, 0xb9, 0x09, 0x1f,
-  0xaf, 0x42, 0xe3, 0x71, 0x28, 0xf4, 0xfa, 0x0c, 0x41, 0x3c, 0x3c, 0x9c,
-  0x90, 0xe5, 0x10, 0xa8, 0x32, 0xd4, 0x1a, 0x21, 0x0e, 0xc7, 0x66, 0x1e,
-  0x4b, 0x51, 0x2e, 0x67, 0xc6, 0x98, 0xa6, 0x25, 0x9b, 0x58, 0x19, 0x2b,
-  0xf2, 0x54, 0x8b, 0x6c, 0x76, 0xbf, 0xe8, 0x62, 0x0d, 0xba, 0x2f, 0xbb,
-  0xbc, 0x9f, 0x79, 0x3c, 0x6e, 0xc9, 0x97, 0x29, 0x5c, 0xa8, 0x47, 0xd4,
-  0x15, 0xaa, 0xe9, 0xda, 0x20, 0x74, 0xcd, 0x64, 0x64, 0x08, 0xf5, 0x98,
-  0x67, 0x91, 0x3a, 0x8a, 0x61, 0xd4, 0x6c, 0xf1, 0x50, 0x01, 0xd2, 0xcc,
-  0xe5, 0xfb, 0x4a, 0x45, 0x2c, 0x5c, 0x0b, 0x7e, 0xe6, 0xa2, 0x81, 0xe4,
-  0xcc, 0x31, 0x38, 0x92, 0x42, 0xa0, 0x25, 0xdb, 0xa2, 0x43, 0xdc, 0xda,
-  0xe8, 0x78, 0x64, 0x20, 0x1c, 0xb9, 0x43, 0xb7, 0x72, 0xca, 0x61, 0xba,
-  0xb0, 0xf4, 0xd2, 0x97, 0xd7, 0xd7, 0x9a, 0x91, 0x8c, 0x39, 0x03, 0xbf,
-  0x81, 0x26, 0xdd, 0xc0, 0xb7, 0xd4, 0x7a, 0xb6, 0x44, 0xc5, 0x75, 0xf0,
-  0xa9, 0xfe, 0x35, 0x89, 0x35, 0xd7, 0xd3, 0x6c, 0x94, 0x5d, 0x5d, 0x3d,
-  0x42, 0x1b, 0x92, 0x3f, 0x86, 0x26, 0x84, 0x2d, 0x77, 0x38, 0x73, 0x84,
-  0xdf, 0x1b, 0x49, 0x9a, 0x1f, 0xaa, 0x25, 0x0c, 0xc4, 0xca, 0xa9, 0x90,
-  0xa5, 0x8d, 0x49, 0x05, 0x3e, 0xce, 0x55, 0xad, 0x40, 0x28, 0x4a, 0x82,
-  0x8a, 0xc2, 0xa3, 0xe1, 0x8e, 0x1e, 0x74, 0x86, 0x44, 0x9b, 0xbf, 0xff,
-  0xe3, 0xc7, 0x9f, 0x5a, 0x40, 0x9a, 0xd8, 0x75, 0x61, 0x61, 0xfd, 0x1c,
-  0xd6, 0xac, 0xe9, 0x48, 0x70, 0x12, 0xb0, 0xc1, 0xca, 0xc3, 0x33, 0x6a,
-  0xc9, 0x9b, 0x20, 0x74, 0xbb, 0x79, 0x61, 0x14, 0xbe, 0x43, 0xab, 0xab,
-  0xaa, 0x61, 0x1b, 0xd3, 0xe4, 0x3a, 0x06, 0x6e, 0x83, 0xbf, 0x3c, 0x5d,
-  0xee, 0xab, 0xb2, 0xea, 0x26, 0x00, 0x9c, 0xcb, 0x6d, 0x0f, 0x05, 0x29,
-  0x98, 0x93, 0x2f, 0x4e, 0x9c, 0xcb, 0x26, 0xd8, 0x88, 0xaf, 0x78, 0x23,
-  0x1a, 0xab, 0xe6, 0x01, 0x12, 0x7b, 0xf5, 0x60, 0xf3, 0x10, 0x96, 0x00,
-  0x50, 0xba, 0x02, 0x1a, 0x50, 0x85, 0x05, 0x5a, 0x0b, 0x32, 0x96, 0xe5,
-  0x35, 0x1c, 0x22, 0x11, 0xb9, 0x3c, 0x14, 0xa3, 0xcb, 0x9c, 0xfb, 0xea,
-  0xf8, 0x32, 0x32, 0xe0, 0xb7, 0x06, 0xdd, 0x07, 0x65, 0x73, 0x1c, 0x04,
-  0x81, 0x43, 0x89, 0x13, 0xbc, 0x0a, 0x57, 0xb8, 0xef, 0x3e, 0x2c, 0xdf,
-  0xd1, 0xa6, 0x84, 0x28, 0xe4, 0x90, 0x68, 0x75, 0x06, 0x47, 0xe0, 0x97,
-  0xed, 0xd4, 0xa0, 0x61, 0xba, 0xff, 0xd1, 0xf5, 0xe8, 0x2f, 0x6d, 0x11,
-  0x48, 0x96, 0xe0, 0xd6, 0x48, 0xbb, 0xef, 0x9f, 0xf4, 0x1c, 0x20, 0x84,
-  0xae, 0x97, 0x2c, 0xa3, 0x9b, 0xc9, 0xa8, 0x05, 0xe0, 0x6d, 0xdd, 0x38,
-  0xbe, 0x3e, 0x3e, 0x38, 0xb2, 0xc9, 0xfe, 0x0f, 0x64, 0xce, 0x3b, 0x1f,
-  0xe8, 0x28, 0x11, 0x50, 0xbb, 0xe5, 0xdc, 0xca, 0x2b, 0x61, 0xcf, 0x9c,
-  0xe1, 0xa6, 0x25, 0x62, 0x8c, 0x44, 0x36, 0x46, 0xbb, 0x16, 0x4d, 0x0e,
-  0x25, 0x82, 0xcc, 0xc1, 0x2c, 0x51, 0x95, 0x6e, 0x3d, 0x42, 0xcf, 0x50,
-  0xe0, 0x55, 0x69, 0xad, 0x7f, 0x14, 0x14, 0x03, 0x0c, 0x08, 0xfb, 0x06,
-  0x29, 0x71, 0xd3, 0x45, 0x23, 0x37, 0x2a, 0xbe, 0xe6, 0x94, 0xcb, 0xe9,
-  0x22, 0x78, 0x36, 0x48, 0x9f, 0x7b, 0x29, 0x3f, 0xd7, 0xdc, 0x2b, 0xc7,
-  0x80, 0xba, 0xd2, 0x47, 0xc3, 0x24, 0xd1, 0xeb, 0xa0, 0x78, 0x13, 0x49,
-  0x1a, 0x7c, 0x65, 0x5c, 0xb3, 0xd1, 0x16, 0x37, 0x3e, 0xb1, 0xd0, 0xfa,
-  0x3a, 0x04, 0x15, 0x8a, 0x7d, 0x05, 0xf0, 0x24, 0x68, 0xbd, 0x92, 0x6e,
-  0xa5, 0xc9, 0x6b, 0x56, 0xb6, 0x68, 0xd2, 0xa8, 0x29, 0x43, 0xdc, 0xa6,
-  0x28, 0x49, 0x0a, 0xb4, 0x91, 0xf1, 0x4b, 0x37, 0x71, 0x00, 0xe8, 0x27,
-  0x10, 0x0e, 0xe2, 0x69, 0xf6, 0xc7, 0xc6, 0xfc, 0x9a, 0xcd, 0xca, 0x1d,
-  0x4e, 0xb1, 0x53, 0xe0, 0xb8, 0x25, 0xb6, 0x0d, 0xc2, 0x36, 0x27, 0xfb,
-  0xf3, 0x4b, 0x9a, 0xd8, 0xa7, 0x5d, 0x86, 0xd1, 0x74, 0x6b, 0x8e, 0xab,
-  0x8a, 0xd6, 0xce, 0x99, 0xca, 0xe1, 0x04, 0x15, 0xc3, 0x09, 0xcf, 0xd1,
-  0xd2, 0x08, 0x91, 0xb4, 0x87, 0x52, 0xee, 0x8d, 0x5b, 0x8f, 0xaf, 0xe1,
-  0xa2, 0x5c, 0x5e, 0x61, 0x16, 0x2c, 0x4c, 0x89, 0x43, 0x04, 0x03, 0xf5,
-  0xb5, 0x51, 0x33, 0x14, 0x21, 0xb7, 0x35, 0x33, 0xbd, 0x3f, 0x1e, 0xaf,
-  0xf3, 0xed, 0xea, 0x74, 0x7c, 0xf5, 0x19, 0xc7, 0xea, 0xd9, 0x9e, 0x26,
-  0x65, 0xc5, 0x93, 0x9c, 0x1d, 0x1c, 0x6c, 0x63, 0x13, 0xe4, 0xef, 0xfb,
-  0x26, 0x47, 0xd7, 0x1a, 0x3b, 0x92, 0x88, 0xce, 0xc5, 0x1c, 0xd8, 0x4e,
-  0x26, 0xc9, 0x86, 0x3a, 0x6d, 0x5d, 0x30, 0xba, 0x22, 0xae, 0xd3, 0x3b,
-  0x2b, 0x4b, 0x86, 0x91, 0xb5, 0x64, 0xbc, 0xd9, 0x20, 0x4c, 0xd6, 0x57,
-  0xdf, 0xbe, 0xc0, 0x31, 0x44, 0x9c, 0x1d, 0x1b, 0x6c, 0xe7, 0x38, 0x9b,
-  0x02, 0xbf, 0x21, 0x86, 0x2b, 0x61, 0x9f, 0x09, 0xbb, 0xee, 0x87, 0xfb,
-  0x9a, 0xa4, 0xba, 0xfd, 0xce, 0x9a, 0x78, 0xf7, 0x90, 0xb5, 0x17, 0xcb,
-  0xdc, 0xaa, 0x0b, 0x22, 0x48, 0x45, 0x47, 0x0d, 0x54, 0xfc, 0xc9, 0x64,
-  0x5b, 0x47, 0x6c, 0xc1, 0x5c, 0x6d, 0x50, 0x86, 0x9a, 0xad, 0xb1, 0x40,
-  0x50, 0xe3, 0xa4, 0x9f, 0x5d, 0xf5, 0x51, 0xa5, 0x91, 0x2b, 0xe4, 0xb1,
-  0x5a, 0x16, 0x10, 0x34, 0x52, 0x77, 0x91, 0x52, 0x38, 0x99, 0xb4, 0xdd,
-  0x92, 0x1a, 0x18, 0x9f, 0x3b, 0x8b, 0x9d, 0x0e, 0x46, 0x17, 0x65, 0x9f,
-  0xad, 0x3c, 0xf6, 0xba, 0x03, 0x68, 0x63, 0x34, 0xef, 0x38, 0xcf, 0x53,
-  0x3a, 0x87, 0x0d, 0x50, 0x63, 0x44, 0x31, 0xf6, 0xe4, 0x26, 0x95, 0x90,
-  0x30, 0xf6, 0xf5, 0xcc, 0xc4, 0xc9, 0x07, 0x47, 0xcd, 0x72, 0x01, 0x91,
-  0x90, 0x13, 0xb6, 0xdb, 0x64, 0x5f, 0x9f, 0xec, 0x56, 0x2b, 0x91, 0x08,
-  0xff, 0x45, 0x98, 0x1b, 0xbc, 0x0e, 0xe1, 0x64, 0x9d, 0x08, 0x1c, 0xe4,
-  0x5b, 0x80, 0x55, 0x6b, 0x2e, 0x80, 0x5f, 0xf2, 0x6d, 0x31, 0xbd, 0xb6,
-  0xc5, 0x22, 0xf1, 0x5b, 0xc6, 0x3d, 0x02, 0xd9, 0x99, 0x2b, 0x59, 0x2f,
-  0x96, 0xa3, 0xd9, 0xe4, 0x59, 0xf4, 0x92, 0xfe, 0xf9, 0xbc, 0xc5, 0x77,
-  0x2e, 0x49, 0xe5, 0x2a, 0x0b, 0xab, 0x2c, 0x84, 0xdf, 0x9f, 0xec, 0xf1,
-  0x89, 0x78, 0xa0, 0x36, 0xc7, 0x29, 0x42, 0x49, 0x27, 0xe9, 0x75, 0x5a,
-  0x16, 0x9a, 0x46, 0x88, 0x17, 0xd6, 0x96, 0xcb, 0xe2, 0xf5, 0xd9, 0xdd,
-  0xfb, 0x2c, 0x1a, 0xa5, 0x65, 0xf4, 0xe6, 0xe8, 0x99, 0x14, 0xdc, 0x2b,
-  0x96, 0x33, 0x5f, 0x98, 0x15, 0x80, 0xc0, 0xa8, 0xb4, 0xdd, 0x65, 0x98,
-  0xbe, 0xe5, 0x68, 0xda, 0xa8, 0x7d, 0x73, 0x9b, 0xac, 0x6a, 0x45, 0xc5,
-  0x19, 0x76, 0xac, 0x48, 0xea, 0x76, 0x76, 0x47, 0x72, 0xa8, 0xdb, 0xad,
-  0x5e, 0xfb, 0xa6, 0x40, 0x4f, 0xf3, 0xa7, 0x11, 0x14, 0x56, 0xad, 0xab,
-  0x96, 0xfc, 0x0f, 0x32, 0xe0, 0x7d, 0x1f, 0x1e, 0x9e, 0x8b, 0x3b, 0x07,
-  0xa1, 0x7b, 0x01, 0x86, 0xc4, 0x63, 0xd8, 0xb7, 0x9f, 0x56, 0x4d, 0xab,
-  0x52, 0x76, 0xd3, 0x30, 0x8b, 0xfa, 0xa4, 0x5c, 0x5d, 0xaf, 0xab, 0xa5,
-  0x18, 0x9d, 0xe0, 0x59, 0x3d, 0xc6, 0xa6, 0x11, 0x9f, 0xe2, 0x8d, 0x20,
-  0xf5, 0x59, 0xae, 0x5d, 0x3e, 0x08, 0xe9, 0x98, 0x4b, 0xda, 0x36, 0xd0,
-  0x57, 0x97, 0x1e, 0xde, 0xd8, 0x0a, 0x7c, 0xe6, 0x4b, 0x01, 0x34, 0x3f,
-  0x58, 0xb0, 0x99, 0x27, 0xda, 0x1d, 0x3c, 0xf4, 0xc2, 0xea, 0x62, 0x0a,
-  0x80, 0x8f, 0x32, 0x62, 0x0d, 0x0f, 0x14, 0xc2, 0x31, 0x6a, 0xa3, 0xe1,
-  0xb6, 0xc5, 0xbe, 0x36, 0xe5, 0xf0, 0xa4, 0x5c, 0x58, 0xf0, 0x1e, 0xf1,
-  0xb2, 0xeb, 0x18, 0xf8, 0xeb, 0x01, 0xe5, 0xa5, 0x74, 0x0e, 0x14, 0xd2,
-  0x6c, 0xdd, 0xbc, 0xe5, 0xdb, 0x00, 0xd4, 0xd7, 0xee, 0x61, 0x95, 0xc5,
-  0x25, 0xb8, 0x57, 0xc8, 0x2d, 0xf8, 0xba, 0x59, 0x04, 0x8d, 0x9b, 0x71,
-  0xa7, 0x17, 0xda, 0xaf, 0xac, 0x40, 0x9f, 0x6f, 0xbe, 0x5e, 0x84, 0xba,
-  0xe8, 0x8e, 0x51, 0xfa, 0xa8, 0x66, 0x69, 0xb4, 0x19, 0xc4, 0x5f, 0x58,
-  0x1d, 0x5f, 0x0e, 0x75, 0x1a, 0x0c, 0xc2, 0xe3, 0x04, 0x46, 0x7e, 0xc5,
-  0xcc, 0xaf, 0x35, 0x97, 0xfb, 0x5c, 0x30, 0x0b, 0xa3, 0x6a, 0x7d, 0x6a,
-  0xad, 0x39, 0x15, 0x88, 0xc9, 0xae, 0x99, 0x81, 0x33, 0x91, 0x24, 0xfc,
-  0x51, 0xdb, 0xf5, 0x84, 0xde, 0x64, 0x22, 0x41, 0x3c, 0x02, 0xed, 0x84,
-  0x2b, 0x52, 0x3f, 0x88, 0x0e, 0xe6, 0xa6, 0x89, 0x47, 0x5a, 0x29, 0x0c,
-  0x89, 0x3b, 0x8d, 0xea, 0x2e, 0xb7, 0x49, 0xc3, 0x24, 0xa0, 0x36, 0x81,
-  0x60, 0x66, 0x24, 0x57, 0xed, 0xec, 0xef, 0x86, 0x75, 0x81, 0xe6, 0x5a,
-  0x3e, 0x02, 0xc5, 0x72, 0x7e, 0xbb, 0xe8, 0xfb, 0x13, 0x95, 0xc4, 0xda,
-  0xe8, 0x85, 0x61, 0xb7, 0xb7, 0x5f, 0x9f, 0x9c, 0x1e, 0x6f, 0x45, 0xaf,
-  0x13, 0xe0, 0x8a, 0x54, 0x89, 0x02, 0xc7, 0xf7, 0x77, 0xf2, 0x89, 0x91,
-  0xbf, 0x2a, 0xa1, 0x6d, 0xf1, 0x23, 0xea, 0xb0, 0x80, 0x34, 0x2d, 0x27,
-  0x02, 0x73, 0x90, 0xcc, 0xac, 0x0c, 0x86, 0x4b, 0x43, 0x56, 0x87, 0xb8,
-  0x1a, 0x80, 0x7e, 0xb4, 0x14, 0x77, 0x8a, 0xa3, 0xb0, 0x16, 0x8e, 0xc7,
-  0xbb, 0x60, 0x32, 0xb2, 0x38, 0x60, 0x1e, 0xbb, 0x5a, 0xe5, 0x2a, 0x75,
-  0xd1, 0xd7, 0x15, 0xcd, 0x2b, 0xd2, 0x9f, 0x25, 0x1a, 0x1d, 0xab, 0x36,
-  0xcb, 0x26, 0x0e, 0x5f, 0x52, 0x4a, 0xd6, 0xf0, 0x7c, 0x83, 0xb5, 0xfb,
-  0x2b, 0xad, 0xdd, 0x5f, 0x97, 0xf3, 0xdb, 0xbe, 0x96, 0x26, 0x54, 0x40,
-  0x8f, 0xa2, 0xfd, 0xec, 0x7d, 0xe7, 0x62, 0x50, 0x10, 0x18, 0x2c, 0x86,
-  0xce, 0x66, 0x8d, 0xbe, 0x38, 0x80, 0x97, 0xeb, 0x3d, 0x56, 0xe0, 0x27,
-  0x14, 0x1e, 0x38, 0x72, 0x94, 0x26, 0x37, 0xe6, 0xb0, 0x64, 0xd6, 0x11,
-  0x3b, 0x56, 0x2c, 0x51, 0x9b, 0xee, 0x0c, 0x3c, 0xb6, 0x62, 0x03, 0xb2,
-  0xb6, 0xd0, 0xb4, 0xb3, 0x1b, 0xab, 0x71, 0x07, 0x01, 0x56, 0x63, 0x4b,
-  0x48, 0x14, 0x48, 0xd9, 0x28, 0x46, 0xd7, 0xbc, 0xab, 0xc0, 0x28, 0xc1,
-  0x89, 0x8c, 0x20, 0xcb, 0xa4, 0x54, 0xbb, 0x66, 0x25, 0x21, 0x30, 0x32,
-  0xe4, 0xef, 0xc2, 0xe3, 0xfd, 0xd8, 0x00, 0xa3, 0xda, 0xe0, 0x44, 0xa0,
-  0x67, 0xd9, 0xa0, 0xdb, 0x20, 0x9c, 0xf1, 0x34, 0x93, 0xaa, 0x47, 0xf7,
-  0xa1, 0x5b, 0xf3, 0x3f, 0x71, 0xdf, 0xf3, 0x65, 0xa6, 0x94, 0xd8, 0x6f,
-  0x89, 0x90, 0x0f, 0x21, 0x53, 0x0d, 0x63, 0x0d, 0x59, 0x47, 0x10, 0x23,
-  0xce, 0x7c, 0x13, 0xf3, 0xa0, 0xe4, 0xb7, 0xaa, 0x18, 0x6b, 0x8b, 0x0d,
-  0xf5, 0x83, 0x6a, 0x1e, 0x8e, 0x53, 0x1f, 0x11, 0x59, 0x65, 0x45, 0x2a,
-  0xdb, 0xe2, 0x8c, 0x82, 0xa1, 0xde, 0xdc, 0x8c, 0x10, 0x37, 0x70, 0x03,
-  0x97, 0x1c, 0xef, 0x42, 0xaf, 0x4c, 0xfb, 0x0c, 0xe6, 0x7b, 0x0b, 0xbe,
-  0x5e, 0xb4, 0xc5, 0x8d, 0x69, 0x3a, 0x55, 0x30, 0xc9, 0xc0, 0xc8, 0xa9,
-  0x62, 0xbe, 0x85, 0xed, 0x18, 0xbc, 0x2b, 0x89, 0xa5, 0xd6, 0x5a, 0xa7,
-  0x19, 0x34, 0x12, 0x22, 0x0d, 0x88, 0xe9, 0xcc, 0x03, 0x3a, 0x1d, 0x10,
-  0x6d, 0x35, 0x1e, 0xe1, 0xbc, 0x0d, 0x89, 0x5c, 0x4f, 0x5a, 0xea, 0x74,
-  0x33, 0x0c, 0x37, 0x6d, 0x91, 0x05, 0x36, 0xb8, 0x72, 0x80, 0x2d, 0x89,
-  0x79, 0x9a, 0x67, 0x29, 0xeb, 0x16, 0xb3, 0xfb, 0xac, 0x4e, 0xab, 0x2b,
-  0x17, 0x10, 0xea, 0x02, 0x65, 0xc5, 0x17, 0xa2, 0x05, 0x81, 0xfc, 0xa8,
-  0x02, 0x5c, 0xfe, 0xb5, 0x93, 0x45, 0x65, 0x1a, 0x8b, 0x37, 0x0c, 0xd7,
-  0xb8, 0x19, 0x6e, 0x18, 0x88, 0xa2, 0x91, 0x2f, 0xf0, 0x46, 0xfc, 0x00,
-  0x90, 0x0d, 0x08, 0x40, 0x93, 0xca, 0x25, 0xea, 0x14, 0x85, 0x53, 0x5e,
-  0xcc, 0xb5, 0x92, 0xdf, 0x03, 0x2b, 0xed, 0x9a, 0x32, 0x70, 0x48, 0xbe,
-  0xbc, 0x89, 0x1f, 0x1e, 0x06, 0x45, 0x22, 0x75, 0xd1, 0x8a, 0x62, 0x8a,
-  0x44, 0xcf, 0x6a, 0xfd, 0x37, 0x4e, 0xf3, 0x4f, 0x16, 0xf1, 0x14, 0xd1,
-  0x8e, 0xcc, 0x8f, 0xd6, 0xd5, 0xd9, 0xaa, 0x46, 0x2b, 0x48, 0x05, 0x40,
-  0x29, 0x97, 0x9e, 0x4a, 0x7d, 0x98, 0x40, 0x8e, 0x63, 0x60, 0xa8, 0x42,
-  0x58, 0x11, 0x87, 0x60, 0x45, 0xe9, 0xa4, 0xe1, 0x74, 0xd2, 0xd0, 0x2e,
-  0x76, 0xff, 0xf0, 0xce, 0xb9, 0x41, 0xb0, 0xb6, 0x31, 0x52, 0x3b, 0x34,
-  0x22, 0x4b, 0xb8, 0x75, 0xf3, 0x8e, 0x31, 0xda, 0x00, 0xa9, 0x5b, 0x93,
-  0x65, 0x43, 0xdb, 0xad, 0xbf, 0x6f, 0x45, 0x76, 0x83, 0xdc, 0x0b, 0xf0,
-  0x1e, 0x7e, 0x22, 0x73, 0x77, 0x3a, 0x20, 0x79, 0x51, 0xbd, 0xb1, 0x71,
-  0x19, 0x5c, 0x09, 0x0a, 0x87, 0x4c, 0xf1, 0xf2, 0xf0, 0xfc, 0xfd, 0x37,
-  0xc7, 0xc7, 0xe7, 0x27, 0x47, 0xc4, 0xfb, 0x45, 0xa6, 0x74, 0x1f, 0xbd,
-  0xbd, 0xfc, 0xf6, 0xd4, 0x80, 0x39, 0x6c, 0x7d, 0x1a, 0xdc, 0x9a, 0x0d,
-  0xbf, 0x68, 0xee, 0x34, 0x9d, 0x2f, 0x1f, 0x7a, 0x28, 0x2f, 0x45, 0x8a,
-  0xc6, 0xc1, 0xc9, 0xf7, 0xbd, 0xe8, 0xeb, 0xf3, 0xfe, 0xbb, 0xef, 0x1b,
-  0xc9, 0x53, 0x95, 0xa0, 0xbc, 0xfa, 0x39, 0x77, 0x21, 0x7a, 0x40, 0x0c,
-  0xf3, 0x73, 0x37, 0x12, 0x6b, 0x01, 0x57, 0xfe, 0xb8, 0xcb, 0xbe, 0x6a,
-  0xbb, 0x0f, 0x6f, 0x7b, 0x67, 0x5c, 0x92, 0xbd, 0x6f, 0xb9, 0xed, 0xe2,
-  0x19, 0x27, 0x1a, 0x0d, 0x42, 0xc2, 0x5a, 0x45, 0x2f, 0xe9, 0x9f, 0xb6,
-  0x6c, 0xcd, 0x6d, 0x2e, 0x52, 0x1f, 0x9d, 0x07, 0xd0, 0x15, 0xce, 0x81,
-  0x35, 0xb0, 0xb8, 0x25, 0xb5, 0x24, 0x68, 0xfa, 0x91, 0x3a, 0x09, 0xf3,
-  0x06, 0x38, 0xa5, 0x6b, 0xc1, 0x17, 0xf5, 0x85, 0x79, 0x2f, 0x69, 0x77,
-  0x3e, 0xfe, 0x8a, 0x69, 0xaa, 0xd4, 0xe9, 0x07, 0x01, 0x11, 0x1a, 0x53,
-  0xe4, 0x47, 0x07, 0x0e, 0x10, 0x46, 0x65, 0x16, 0x6e, 0x04, 0xf3, 0x53,
-  0xd4, 0x8d, 0x16, 0x1c, 0x76, 0x01, 0x4c, 0x70, 0xc8, 0x1e, 0x68, 0x90,
-  0x46, 0x3f, 0x60, 0x74, 0x84, 0x9e, 0xe0, 0x24, 0x84, 0x18, 0x09, 0x0e,
-  0x07, 0x48, 0xab, 0x93, 0x95, 0xad, 0xc6, 0x2b, 0x00, 0x99, 0xfc, 0xfb,
-  0xb0, 0x11, 0x6e, 0xf3, 0x51, 0xf4, 0x12, 0x01, 0x7f, 0xed, 0x81, 0xd4,
-  0x5a, 0x37, 0xf6, 0x9b, 0x24, 0x1f, 0x25, 0x79, 0x56, 0xd4, 0x73, 0xe8,
-  0x34, 0xe7, 0x5e, 0xeb, 0x73, 0x72, 0x33, 0x0a, 0xed, 0xdf, 0x30, 0xbc,
-  0x42, 0x08, 0x4f, 0xc4, 0x83, 0xdd, 0xc8, 0x16, 0xea, 0x22, 0x76, 0xae,
-  0xdb, 0x8b, 0xba, 0x9c, 0x29, 0xc8, 0x3f, 0x89, 0x75, 0x5d, 0xc1, 0x37,
-  0x92, 0xc6, 0xd3, 0x6e, 0xaf, 0x09, 0x8f, 0xd8, 0xd5, 0x55, 0xef, 0xd2,
-  0xc6, 0x49, 0x6b, 0x56, 0x48, 0x35, 0xd6, 0x71, 0x08, 0xa2, 0x4b, 0x5a,
-  0x28, 0xe8, 0x62, 0x68, 0xa1, 0x2b, 0x1a, 0x58, 0x56, 0xae, 0xb9, 0x6a,
-  0xaa, 0xd6, 0xba, 0xda, 0x2c, 0x55, 0xce, 0xab, 0xa1, 0x91, 0xd0, 0xf6,
-  0x2d, 0x9d, 0x5d, 0x12, 0xde, 0xa1, 0x3d, 0xdf, 0xea, 0xda, 0x3d, 0x65,
-  0x59, 0xf5, 0xab, 0xe1, 0xf0, 0xe0, 0xfc, 0xa4, 0xbe, 0xd4, 0xf4, 0x69,
-  0xff, 0xad, 0xd5, 0x88, 0xdf, 0x32, 0x4a, 0xf1, 0xba, 0x29, 0xcf, 0x00,
-  0x99, 0x47, 0x2c, 0x5d, 0x73, 0xa8, 0x88, 0x40, 0x51, 0x7d, 0x4b, 0x97,
-  0xd9, 0x9a, 0x08, 0x47, 0x05, 0x1f, 0x52, 0x13, 0x67, 0x1e, 0x55, 0x6a,
-  0x4f, 0x92, 0x20, 0xf9, 0x1b, 0xd2, 0xd4, 0x37, 0x52, 0xcf, 0xec, 0x2a,
-  0xbd, 0xe6, 0x20, 0x7d, 0xfc, 0x6c, 0xc3, 0x61, 0x72, 0x00, 0x4c, 0x5a,
-  0x02, 0xd6, 0x3f, 0xe9, 0x25, 0x66, 0x60, 0x9e, 0x69, 0x8e, 0x99, 0x08,
-  0xce, 0x03, 0xab, 0x29, 0xd1, 0x40, 0x89, 0xb2, 0x97, 0xd3, 0x20, 0x64,
-  0x62, 0x9a, 0xf8, 0x88, 0x1c, 0x53, 0x4c, 0x70, 0x97, 0xfb, 0x46, 0xc5,
-  0x6f, 0xdc, 0x20, 0x57, 0xab, 0x83, 0xa7, 0x2f, 0x8b, 0x1d, 0x3d, 0x9c,
-  0xb0, 0x8a, 0xcc, 0x62, 0xeb, 0x62, 0xa7, 0xbf, 0xbd, 0x91, 0xb5, 0x81,
-  0x0d, 0x90, 0x0c, 0xc8, 0x70, 0xcd, 0xe1, 0x18, 0x06, 0xd1, 0xd9, 0x22,
-  0x90, 0xbe, 0x6e, 0x92, 0x34, 0xf7, 0x0e, 0x51, 0x9f, 0xcf, 0x0e, 0xae,
-  0xd0, 0x9c, 0x2c, 0x33, 0x9e, 0xac, 0x5a, 0x90, 0x47, 0x57, 0x50, 0xa6,
-  0x2d, 0xe5, 0x53, 0x8c, 0xef, 0xc2, 0x73, 0x46, 0x33, 0x29, 0x93, 0x62,
-  0x41, 0x7a, 0x68, 0xa3, 0xfa, 0xa7, 0x18, 0x38, 0x81, 0x7c, 0xc0, 0xb0,
-  0xd2, 0x05, 0x82, 0x70, 0x22, 0x60, 0xf1, 0xaf, 0x2a, 0x6e, 0x17, 0x78,
-  0x3c, 0xe9, 0x14, 0x6d, 0x2a, 0x7e, 0x61, 0x6b, 0x81, 0x42, 0xf1, 0x19,
-  0xf0, 0x61, 0x0f, 0x50, 0xfd, 0xad, 0xbc, 0x9c, 0x6f, 0xdf, 0xc3, 0xf0,
-  0x78, 0x3f, 0x70, 0xda, 0x92, 0x35, 0xed, 0x20, 0x53, 0x82, 0x09, 0x38,
-  0xd8, 0x2e, 0xe7, 0x40, 0x36, 0xb6, 0x03, 0x20, 0x74, 0x51, 0x27, 0x14,
-  0xfb, 0xa1, 0x81, 0x05, 0x95, 0x01, 0x64, 0xe5, 0x3b, 0x01, 0x86, 0x98,
-  0x64, 0x4b, 0x66, 0x70, 0xf2, 0x69, 0xdd, 0x81, 0x93, 0x48, 0x69, 0xc7,
-  0x82, 0x9d, 0x42, 0xec, 0xc5, 0x69, 0x29, 0x3e, 0xe1, 0xa0, 0x19, 0xf6,
-  0xa3, 0xbf, 0xfc, 0xa5, 0x17, 0xfd, 0xa5, 0x43, 0xff, 0x95, 0xf4, 0x1f,
-  0xad, 0xe7, 0x5f, 0xa4, 0x96, 0xc1, 0x5f, 0xee, 0xe8, 0xfe, 0x8c, 0xb8,
-  0x24, 0x61, 0x31, 0x65, 0x10, 0x01, 0x8f, 0x53, 0xdf, 0x02, 0xad, 0x21,
-  0x21, 0x86, 0x5a, 0x9f, 0x83, 0x0f, 0x3f, 0x2c, 0x58, 0x13, 0xb7, 0x54,
-  0x92, 0x5a, 0x43, 0x1b, 0xb6, 0x9c, 0xcd, 0x25, 0x8e, 0x41, 0xb7, 0x1d,
-  0x64, 0xdd, 0xd0, 0x22, 0xe3, 0xa8, 0xfb, 0x89, 0x79, 0xcd, 0x4b, 0x4b,
-  0x6d, 0x0d, 0x83, 0x34, 0xf1, 0x9a, 0xd1, 0x75, 0xa9, 0x75, 0x20, 0x25,
-  0x4e, 0xa9, 0x2d, 0x5e, 0x53, 0xd4, 0xf0, 0xb3, 0x39, 0x6c, 0xf5, 0x80,
-  0x08, 0x55, 0xc6, 0xaa, 0xac, 0x90, 0xad, 0xd2, 0x8b, 0x9b, 0x15, 0x74,
-  0x4d, 0x1d, 0x92, 0xab, 0xe5, 0x4c, 0xa3, 0x6c, 0x29, 0x2b, 0xd2, 0x14,
-  0xbe, 0xad, 0x70, 0xa9, 0xaa, 0xeb, 0x56, 0x21, 0x33, 0xe4, 0x2b, 0x34,
-  0xc0, 0x6e, 0xbf, 0x5b, 0xc5, 0x46, 0xb4, 0x30, 0x9e, 0xb6, 0x3a, 0x37,
-  0x41, 0x51, 0x9a, 0x46, 0x6d, 0x4c, 0xd8, 0x4a, 0x15, 0xfe, 0x4b, 0x40,
-  0xf6, 0x05, 0x68, 0x23, 0xf3, 0xde, 0x24, 0x78, 0x09, 0x2b, 0x13, 0x51,
-  0xbd, 0x9d, 0x58, 0x6b, 0xa3, 0x16, 0x89, 0x02, 0xbf, 0xe9, 0xbb, 0x69,
-  0x19, 0x28, 0x42, 0xfd, 0xbe, 0x54, 0xce, 0x54, 0x3c, 0x68, 0x48, 0xad,
-  0xb8, 0x9c, 0x58, 0xe3, 0x29, 0xd2, 0xd9, 0xa2, 0x61, 0x79, 0xe4, 0x35,
-  0xf6, 0x42, 0x2f, 0x0f, 0x03, 0x38, 0xf8, 0x5c, 0x4d, 0xe7, 0x7e, 0xae,
-  0x6c, 0x64, 0x98, 0x01, 0x45, 0x40, 0x8c, 0x53, 0x00, 0x95, 0xf1, 0x71,
-  0x3b, 0x2d, 0x5e, 0xfb, 0x86, 0x99, 0x8a, 0xc7, 0xf4, 0x2a, 0xea, 0xac,
-  0xd5, 0x52, 0x3a, 0xf5, 0x17, 0x4e, 0x19, 0xf6, 0x45, 0x77, 0x5c, 0xb0,
-  0xfe, 0xc6, 0x30, 0xca, 0x09, 0x3e, 0xdb, 0x14, 0x88, 0x24, 0x5a, 0xbb,
-  0xd0, 0x25, 0x45, 0x86, 0xcc, 0x69, 0x8d, 0x2f, 0x46, 0x9c, 0x58, 0x02,
-  0x1d, 0xa9, 0xa7, 0x92, 0x2b, 0xa1, 0xae, 0x83, 0x3d, 0x35, 0x1b, 0x0b,
-  0xe7, 0xf0, 0xdf, 0x2a, 0xfa, 0x9b, 0xda, 0x20, 0x36, 0x4d, 0xdb, 0xfb,
-  0x9b, 0xdd, 0x63, 0x5b, 0x6a, 0x25, 0x97, 0xbc, 0xd4, 0x35, 0xd0, 0x2d,
-  0xe1, 0x15, 0xe4, 0xc0, 0x84, 0x52, 0x48, 0xf5, 0xf4, 0xde, 0x72, 0x3e,
-  0x71, 0x61, 0x82, 0x86, 0xf5, 0xb2, 0x96, 0xaa, 0xa1, 0xe8, 0x70, 0x8f,
-  0x0a, 0x3a, 0xa7, 0xc4, 0xe3, 0x39, 0x0b, 0x7c, 0x0e, 0x85, 0x13, 0x90,
-  0xb3, 0x9c, 0x94, 0xd8, 0xc6, 0xce, 0xec, 0x6e, 0xb9, 0x38, 0x50, 0xd4,
-  0xf5, 0x93, 0x42, 0x8f, 0xaa, 0x86, 0x75, 0x6e, 0x32, 0x81, 0xfb, 0xe9,
-  0xec, 0xb3, 0x66, 0xa5, 0x8c, 0xc1, 0xcf, 0xb2, 0x79, 0x14, 0x00, 0xa6,
-  0xf4, 0xf5, 0xd9, 0x9b, 0x63, 0x97, 0xf1, 0x2a, 0xa6, 0x3e, 0xfe, 0xa4,
-  0x15, 0xe2, 0x71, 0x80, 0x7c, 0x02, 0x43, 0x80, 0xe8, 0x35, 0x6b, 0x74,
-  0xca, 0x12, 0x5d, 0x27, 0xe5, 0xe2, 0x7e, 0x99, 0x4e, 0x36, 0x01, 0xd2,
-  0xf1, 0xee, 0xed, 0xc9, 0xf7, 0x7d, 0xb1, 0x14, 0x8b, 0x22, 0x67, 0x38,
-  0x15, 0x86, 0x72, 0x21, 0xde, 0x84, 0x59, 0x0b, 0x26, 0x8b, 0x52, 0x0d,
-  0x8e, 0x99, 0xa2, 0x12, 0x21, 0xd7, 0x2f, 0x9d, 0x8b, 0x10, 0x23, 0x0d,
-  0xd2, 0xbd, 0x71, 0x36, 0x27, 0xf6, 0x0d, 0xac, 0x25, 0x01, 0xd0, 0x68,
-  0xc9, 0xde, 0xad, 0xae, 0x44, 0x74, 0x70, 0x7e, 0x7e, 0x74, 0x70, 0x79,
-  0xe0, 0xe6, 0x06, 0x70, 0x23, 0xf0, 0x39, 0x88, 0x33, 0xac, 0xd8, 0x6b,
-  0xa5, 0xa4, 0xee, 0xef, 0x39, 0x43, 0xb0, 0xce, 0xf9, 0xce, 0x2f, 0xce,
-  0xd8, 0xcc, 0xf8, 0xfb, 0xbf, 0x1c, 0xf8, 0x0a, 0x71, 0x28, 0x85, 0xd4,
-  0x2c, 0xd4, 0xb5, 0xb7, 0xc5, 0xe3, 0xbb, 0x77, 0xe3, 0xd3, 0x38, 0x21,
-  0x91, 0xe3, 0xa2, 0xf7, 0xbc, 0xa1, 0xf9, 0xd8, 0x09, 0x27, 0xb6, 0x1a,
-  0x58, 0x80, 0x5e, 0x4b, 0x6e, 0x59, 0x30, 0x91, 0xcc, 0xf3, 0x53, 0xc3,
-  0x7a, 0xb2, 0xc5, 0x9a, 0x46, 0xc9, 0x43, 0x32, 0x5e, 0x96, 0xe0, 0x5d,
-  0xec, 0xcd, 0x60, 0xfa, 0x9a, 0xf0, 0x4a, 0xd5, 0x1d, 0xf5, 0xf5, 0xed,
-  0xf1, 0xb0, 0x89, 0xc2, 0x81, 0x24, 0xa5, 0x33, 0x93, 0xaa, 0x18, 0x03,
-  0x1d, 0xad, 0xaf, 0x8b, 0xd1, 0x38, 0x3b, 0x02, 0xa4, 0x48, 0x74, 0x6e,
-  0xf4, 0xd8, 0x58, 0x90, 0x4f, 0x88, 0xf1, 0xf5, 0x2d, 0xc4, 0x54, 0x26,
-  0x4e, 0x1f, 0x34, 0x1e, 0x2a, 0x5d, 0x8d, 0x07, 0x16, 0x93, 0x9a, 0xde,
-  0x4f, 0xe5, 0x53, 0x21, 0x83, 0xaa, 0x9b, 0x7a, 0x14, 0x32, 0x46, 0x9f,
-  0x02, 0x54, 0x31, 0xa2, 0x10, 0x9b, 0xfe, 0x1c, 0x73, 0x2c, 0xd2, 0xa3,
-  0x24, 0x15, 0x93, 0x88, 0xcb, 0x7f, 0x6d, 0xef, 0x0e, 0x76, 0x3a, 0xcd,
-  0xd1, 0x23, 0xf1, 0x0c, 0x96, 0xf1, 0x78, 0x2e, 0xf7, 0xb3, 0x00, 0xf3,
-  0x66, 0x1f, 0x1e, 0xa0, 0x70, 0x50, 0x92, 0xf9, 0x10, 0xb7, 0xd0, 0x36,
-  0x96, 0xfe, 0x59, 0xc3, 0x3b, 0x24, 0x1e, 0x4e, 0xcf, 0x92, 0xe7, 0x19,
-  0xc2, 0x4a, 0x63, 0x36, 0x96, 0xc1, 0x4f, 0xd0, 0x69, 0x5f, 0xe0, 0xf9,
-  0x44, 0xa2, 0x1d, 0x6a, 0xeb, 0xfc, 0xa8, 0xee, 0xb2, 0x3e, 0x4c, 0xd0,
-  0xd1, 0x80, 0xfb, 0x78, 0x2d, 0xb7, 0xab, 0xb8, 0x45, 0xad, 0xd0, 0x7d,
-  0x2b, 0xf8, 0xea, 0x81, 0xe0, 0x1f, 0x87, 0x9a, 0x06, 0xe7, 0xc1, 0x71,
-  0xf5, 0x40, 0x8e, 0xaa, 0x62, 0xcd, 0x49, 0xf3, 0x37, 0x67, 0x95, 0x32,
-  0x80, 0xf8, 0xbd, 0x79, 0xdb, 0x56, 0xca, 0x46, 0x47, 0xda, 0x73, 0x5f,
-  0x2e, 0x5c, 0xb5, 0xd4, 0xa1, 0x0a, 0x4b, 0x50, 0x22, 0xdb, 0x79, 0x01,
-  0xd6, 0xc0, 0x83, 0x98, 0x94, 0x4a, 0xea, 0xe0, 0x54, 0xe0, 0x54, 0x24,
-  0xa0, 0x56, 0xb4, 0x28, 0x19, 0x96, 0x78, 0xdc, 0xbd, 0x17, 0x8a, 0xdf,
-  0xfb, 0x5d, 0x5b, 0xd1, 0xed, 0x7d, 0xc5, 0x67, 0xc9, 0x12, 0xd1, 0xe1,
-  0xc4, 0x6f, 0xcf, 0x21, 0x11, 0x9a, 0xa8, 0xd4, 0x7f, 0xed, 0xcc, 0x6a,
-  0x66, 0x77, 0x63, 0x1d, 0x95, 0x96, 0xbc, 0x09, 0x12, 0x2a, 0x40, 0x16,
-  0x6c, 0xd9, 0x45, 0x69, 0xb0, 0x1e, 0x9b, 0xb8, 0x84, 0x1d, 0x64, 0x0c,
-  0xb1, 0x10, 0x1b, 0xf4, 0x9d, 0x1e, 0x02, 0xea, 0xeb, 0x9a, 0xa4, 0xe3,
-  0x35, 0x21, 0xd5, 0x06, 0x32, 0xe2, 0xeb, 0xeb, 0xb2, 0x77, 0xa0, 0xb0,
-  0xcc, 0xda, 0xf7, 0xc0, 0xcf, 0x9a, 0x4c, 0x36, 0x9f, 0x6c, 0x89, 0x11,
-  0xc3, 0x55, 0xce, 0x86, 0xe3, 0xee, 0x5f, 0x54, 0x1e, 0x55, 0x38, 0xf0,
-  0x25, 0x08, 0xdb, 0xb6, 0xd5, 0x45, 0x96, 0x3d, 0x96, 0x67, 0x33, 0x25,
-  0x49, 0xa7, 0xec, 0xc3, 0xb4, 0xf4, 0x92, 0x44, 0xae, 0x64, 0xb2, 0x56,
-  0xcb, 0x14, 0x68, 0x86, 0xf8, 0x21, 0x9d, 0x2d, 0x67, 0xde, 0xf3, 0xcc,
-  0xb8, 0xbc, 0x65, 0xd2, 0xac, 0x70, 0xa8, 0x36, 0x8d, 0x86, 0x3c, 0xad,
-  0x7e, 0x2f, 0x9d, 0x21, 0x90, 0x89, 0x25, 0x86, 0x08, 0x5e, 0x15, 0x56,
-  0xff, 0x69, 0x3c, 0x9c, 0xc5, 0x9f, 0x2e, 0x44, 0x86, 0xe0, 0xb8, 0x95,
-  0x89, 0x38, 0x4e, 0x99, 0x82, 0xea, 0x9b, 0x6a, 0xc3, 0x40, 0x05, 0x03,
-  0x71, 0x4a, 0x48, 0x30, 0xd0, 0xbc, 0xe4, 0x54, 0xb9, 0x11, 0x35, 0x71,
-  0x9f, 0x4e, 0xca, 0x9b, 0x76, 0xbc, 0x41, 0x59, 0x47, 0xcc, 0x3b, 0x12,
-  0x84, 0x12, 0x0e, 0x2f, 0xc1, 0x52, 0xc1, 0x67, 0xbc, 0x2d, 0x86, 0x63,
-  0x97, 0x6d, 0x1f, 0x13, 0xdd, 0x5d, 0x71, 0x7a, 0x44, 0x53, 0x4f, 0xd0,
-  0xb0, 0xb8, 0x81, 0x1d, 0x51, 0x04, 0xde, 0xde, 0x76, 0xf9, 0x96, 0xec,
-  0x7e, 0xa3, 0x56, 0x11, 0x81, 0x2d, 0x42, 0x2c, 0xb5, 0x56, 0x07, 0xe7,
-  0x88, 0x98, 0xdb, 0x74, 0xda, 0x2c, 0x90, 0xb8, 0x82, 0x32, 0x15, 0x75,
-  0x67, 0x12, 0xc6, 0xfa, 0xa6, 0xab, 0x06, 0x7c, 0x14, 0x42, 0x56, 0x8f,
-  0x76, 0x4f, 0x52, 0x1f, 0xa2, 0xee, 0xb5, 0x74, 0xf3, 0x95, 0x7f, 0xa8,
-  0xd6, 0x9c, 0x77, 0x82, 0xdb, 0x2d, 0x52, 0xec, 0x47, 0x7b, 0x3b, 0x3b,
-  0xdf, 0xf4, 0xa2, 0x27, 0x52, 0x3a, 0x76, 0xf7, 0xab, 0xd6, 0x15, 0x92,
-  0x05, 0xc2, 0x16, 0xab, 0xfe, 0x19, 0xdf, 0x81, 0xd7, 0xeb, 0xa2, 0x61,
-  0x46, 0xac, 0x29, 0x4e, 0x96, 0x81, 0x6d, 0x59, 0x16, 0x7f, 0xcd, 0x56,
-  0xc1, 0x8c, 0x5d, 0x87, 0x42, 0x98, 0x21, 0x6e, 0x88, 0x77, 0xef, 0x86,
-  0x7e, 0x63, 0xef, 0xbd, 0x6d, 0x2c, 0xfa, 0x69, 0xc9, 0x67, 0x2f, 0x6e,
-  0xf8, 0xf8, 0x8f, 0x96, 0x39, 0x4e, 0x32, 0x3b, 0x42, 0xa5, 0x1c, 0x11,
-  0xdb, 0xd6, 0xa1, 0x33, 0x48, 0x2d, 0x69, 0x5f, 0x3a, 0xb5, 0xac, 0x4c,
-  0x67, 0xd0, 0x5e, 0xef, 0x11, 0xf1, 0x33, 0xae, 0x20, 0xec, 0x0f, 0xa4,
-  0x30, 0xa1, 0x7f, 0x39, 0x26, 0x5e, 0xf1, 0x10, 0x6d, 0x27, 0xf4, 0x30,
-  0xd6, 0x27, 0xcb, 0x5a, 0x95, 0xe8, 0xa9, 0x30, 0x30, 0xc3, 0x14, 0x8e,
-  0x39, 0x32, 0x7e, 0xda, 0x42, 0xcb, 0xf4, 0xf0, 0x40, 0xa4, 0x69, 0xf0,
-  0xdb, 0x29, 0x3f, 0x30, 0x5d, 0xf5, 0x9a, 0x6a, 0x07, 0x87, 0x05, 0xc2,
-  0x1f, 0x60, 0x8a, 0x50, 0x38, 0x2a, 0x4e, 0x9f, 0x1d, 0xa3, 0x44, 0x0d,
-  0x47, 0x76, 0xfd, 0x76, 0x66, 0xa9, 0x29, 0xe3, 0xf1, 0xa7, 0x45, 0xd9,
-  0x67, 0xf7, 0xee, 0x7a, 0xd4, 0x2e, 0xcd, 0x29, 0x37, 0xf4, 0xae, 0x89,
-  0x47, 0xc3, 0x14, 0x4b, 0xb6, 0x94, 0xde, 0x40, 0x14, 0x25, 0xb4, 0x64,
-  0x66, 0x5f, 0xfd, 0x46, 0xa0, 0x1f, 0xeb, 0xc7, 0x77, 0x69, 0x72, 0xcf,
-  0x69, 0xd9, 0xc7, 0x1e, 0x94, 0xac, 0xca, 0x33, 0xac, 0xfa, 0xc5, 0x2c,
-  0x1e, 0xdf, 0xd0, 0x85, 0xd2, 0x47, 0xdc, 0x75, 0x8b, 0x8c, 0x15, 0x56,
-  0x50, 0xad, 0x0f, 0x8b, 0xc1, 0x70, 0x5c, 0x1a, 0x96, 0xe1, 0xd2, 0x05,
-  0x48, 0x8a, 0x3c, 0x88, 0x35, 0x20, 0x58, 0x62, 0x2c, 0x75, 0x38, 0x57,
-  0xd0, 0x1c, 0xb3, 0xdc, 0xa0, 0x64, 0x3f, 0x24, 0x36, 0x48, 0x96, 0x9a,
-  0xa1, 0x71, 0xbd, 0x3d, 0x1d, 0x7a, 0x8c, 0x80, 0x52, 0x2b, 0x29, 0xc0,
-  0x56, 0x30, 0x64, 0xa9, 0xf0, 0xf5, 0x9a, 0xaa, 0xd2, 0x85, 0x00, 0xe6,
-  0x4b, 0x7c, 0x10, 0xa2, 0x5f, 0x44, 0xbc, 0x4d, 0xf3, 0x0a, 0xd6, 0x03,
-  0xb7, 0xfe, 0x67, 0x0d, 0xd0, 0x9e, 0x48, 0x15, 0x9d, 0xf6, 0x48, 0x15,
-  0xce, 0xa8, 0x0b, 0x0b, 0xa1, 0xc3, 0xd8, 0x8c, 0x24, 0x2f, 0x22, 0x31,
-  0xba, 0xb4, 0x6f, 0xab, 0x92, 0x0a, 0xe7, 0x68, 0x08, 0x32, 0xcc, 0x4b,
-  0xe2, 0x68, 0x9f, 0xff, 0xd8, 0xa7, 0x7f, 0x7f, 0x6a, 0xf8, 0x02, 0x4b,
-  0xc1, 0x93, 0x51, 0x93, 0x96, 0x85, 0x95, 0xe6, 0x1e, 0x1e, 0x5f, 0x2a,
-  0xd3, 0xa3, 0x1d, 0xf9, 0xb6, 0x08, 0x0a, 0x0b, 0xb4, 0x86, 0x48, 0x98,
-  0x5b, 0x6e, 0xb3, 0x60, 0x28, 0xa0, 0x00, 0x80, 0x5c, 0xa2, 0x86, 0xac,
-  0x15, 0xd8, 0x05, 0xe6, 0x72, 0xe3, 0x48, 0xe9, 0x8e, 0xba, 0xea, 0xca,
-  0xae, 0xf6, 0x71, 0xe2, 0xfd, 0x92, 0xbe, 0xbe, 0xe3, 0x88, 0x01, 0x62,
-  0x8a, 0x15, 0x43, 0x3d, 0x89, 0x38, 0x57, 0x64, 0x2e, 0xa1, 0x05, 0x94,
-  0x8c, 0xe1, 0x37, 0x1d, 0xb9, 0x8c, 0x46, 0x24, 0xd1, 0x19, 0x24, 0xe0,
-  0x52, 0xe7, 0x79, 0x9e, 0xdd, 0xdb, 0xd9, 0xd7, 0xb0, 0xe4, 0x40, 0x66,
-  0xf0, 0x0e, 0x46, 0x6a, 0x7b, 0xb9, 0x68, 0xf1, 0xbc, 0x72, 0xaa, 0x42,
-  0x03, 0x48, 0x24, 0xcc, 0xc4, 0x0c, 0xeb, 0x64, 0xb4, 0x86, 0xa7, 0x00,
-  0x49, 0x7e, 0xcb, 0xa3, 0xa8, 0xba, 0xd2, 0x26, 0x62, 0xcb, 0x76, 0xe9,
-  0x15, 0x1a, 0xba, 0x0d, 0x0c, 0x1d, 0x8e, 0x45, 0x6e, 0x94, 0x1e, 0x97,
-  0xd4, 0x6a, 0xe0, 0x2e, 0x58, 0xdc, 0x75, 0x19, 0xb9, 0x12, 0x1d, 0x9b,
-  0xec, 0xc9, 0x1c, 0xc3, 0xfe, 0xa5, 0x01, 0xe1, 0xf5, 0x32, 0x19, 0x6d,
-  0xb8, 0x04, 0xc4, 0x01, 0x9e, 0x7c, 0xff, 0x7d, 0x00, 0x4d, 0xc2, 0xf2,
-  0xe6, 0x56, 0xaf, 0xc2, 0xb4, 0x6a, 0x15, 0x23, 0x89, 0x8a, 0xb2, 0x96,
-  0x53, 0x6e, 0x61, 0xf6, 0x1a, 0x8a, 0xca, 0x91, 0x18, 0x50, 0xe2, 0x06,
-  0x2e, 0x04, 0xde, 0x0a, 0x5c, 0x6b, 0xf0, 0x7b, 0x10, 0x06, 0xd6, 0x52,
-  0x3f, 0xca, 0x85, 0xfc, 0xf4, 0x7c, 0xec, 0xad, 0x44, 0x9e, 0x20, 0x3c,
-  0x2d, 0x5c, 0xaa, 0xc2, 0x51, 0x0c, 0xdd, 0x4a, 0xf7, 0xf3, 0x41, 0x5b,
-  0x65, 0x93, 0x26, 0x76, 0xa2, 0x64, 0x31, 0x60, 0x46, 0x38, 0xbf, 0x52,
-  0x8d, 0x87, 0x4d, 0x53, 0xe3, 0x3c, 0x51, 0xcf, 0x4d, 0xe1, 0x4a, 0xcb,
-  0x37, 0xce, 0xab, 0xd8, 0x79, 0x10, 0x69, 0x25, 0x60, 0xe1, 0x1c, 0xae,
-  0x2b, 0x67, 0x17, 0xd7, 0x8f, 0x8f, 0x67, 0x08, 0x77, 0x8b, 0x1f, 0xef,
-  0x35, 0x05, 0x84, 0x7b, 0x94, 0x1f, 0x09, 0x4c, 0x77, 0x08, 0xb9, 0xd2,
-  0xcc, 0x24, 0xc1, 0xbc, 0xf9, 0x53, 0xb5, 0xc8, 0x9e, 0xe6, 0xcd, 0x09,
-  0xe9, 0xb5, 0x55, 0x12, 0xec, 0x97, 0xf9, 0x12, 0x2b, 0xc4, 0x1b, 0xc2,
-  0x20, 0x6e, 0x2c, 0x19, 0x5b, 0x36, 0x19, 0x3b, 0xf9, 0x2c, 0xba, 0x4c,
-  0x6e, 0x31, 0xef, 0x6e, 0x6d, 0x06, 0x81, 0xd8, 0xbc, 0x2c, 0x6d, 0x9d,
-  0xd3, 0xd4, 0x2b, 0x01, 0x12, 0xfd, 0x3e, 0x09, 0xa6, 0x7d, 0x3c, 0x56,
-  0x34, 0x2a, 0x3b, 0x34, 0x6c, 0x5e, 0xd2, 0x42, 0x11, 0x2e, 0x98, 0xe9,
-  0x10, 0x46, 0x43, 0xea, 0x32, 0x8a, 0x99, 0x82, 0xd8, 0x04, 0xf7, 0xd5,
-  0xf1, 0x65, 0xfd, 0x68, 0x01, 0x3a, 0x42, 0x55, 0x45, 0xe4, 0x4f, 0xd0,
-  0xdf, 0xe7, 0xef, 0x2e, 0xb7, 0xbc, 0x39, 0x60, 0x92, 0xd5, 0x6c, 0x56,
-  0xd6, 0x7a, 0x4b, 0x26, 0x8a, 0xe4, 0x28, 0x28, 0x28, 0x03, 0x12, 0x4d,
-  0xdc, 0x81, 0x60, 0x14, 0x85, 0x27, 0x3b, 0xbb, 0x24, 0xaa, 0xed, 0xec,
-  0xc1, 0xea, 0xf2, 0x64, 0xe7, 0x89, 0x33, 0x67, 0xdb, 0x53, 0x8d, 0x1b,
-  0x8f, 0x69, 0x1a, 0xf8, 0x0b, 0x28, 0x66, 0x2b, 0x5a, 0x77, 0xf4, 0xe4,
-  0xe1, 0x01, 0x5f, 0xf5, 0xaa, 0x58, 0x3d, 0x45, 0xa2, 0xd3, 0x77, 0x43,
-  0x5d, 0x73, 0xb4, 0xfc, 0x8a, 0xc3, 0x7c, 0xb2, 0x9c, 0x4b, 0xec, 0x17,
-  0xab, 0xbe, 0xc8, 0x78, 0xa8, 0x5f, 0x0e, 0x21, 0x1d, 0x3c, 0xc6, 0x9a,
-  0x4e, 0x59, 0xbc, 0xaf, 0x30, 0xb2, 0x9e, 0x47, 0x26, 0x11, 0xb8, 0x5f,
-  0xd3, 0xee, 0x2c, 0x13, 0xb1, 0xd6, 0xdc, 0x9f, 0x02, 0x94, 0x4f, 0x29,
-  0x90, 0x02, 0x52, 0x0f, 0xb8, 0x1b, 0x2a, 0x5e, 0x71, 0xd2, 0x98, 0x3f,
-  0x25, 0x99, 0x3a, 0x08, 0x9b, 0x79, 0x10, 0x59, 0x8e, 0x47, 0x25, 0xe9,
-  0xbf, 0xcc, 0xb3, 0xc9, 0x72, 0x8c, 0xbb, 0x9e, 0xc3, 0x5e, 0xb8, 0x90,
-  0xdf, 0x48, 0x50, 0x1f, 0x0d, 0x44, 0x83, 0x9b, 0xf6, 0x44, 0xda, 0x54,
-  0xb3, 0x15, 0x36, 0x1d, 0xcf, 0xb9, 0xb4, 0x5d, 0xd6, 0x6c, 0xd8, 0x68,
-  0xe4, 0xb2, 0x85, 0xeb, 0x2c, 0x62, 0x7e, 0x95, 0xa9, 0xe9, 0xaf, 0x09,
-  0xd2, 0x0b, 0xba, 0x84, 0x93, 0xce, 0xcc, 0xea, 0xb1, 0x14, 0xa3, 0x03,
-  0xed, 0x7c, 0xc9, 0xc1, 0x6a, 0xb5, 0xf6, 0x2a, 0x30, 0xac, 0x33, 0x06,
-  0x95, 0xcd, 0xc7, 0x74, 0xbc, 0x5f, 0x6a, 0xd4, 0x66, 0xd3, 0xd5, 0x0f,
-  0xd0, 0x91, 0xa1, 0x33, 0xe1, 0x2b, 0x56, 0xa4, 0x07, 0x9d, 0xd2, 0x75,
-  0x15, 0x99, 0x7a, 0x26, 0xf0, 0xc3, 0x9a, 0x34, 0xd3, 0x4c, 0xdc, 0x02,
-  0xb2, 0xaa, 0x5f, 0xf1, 0x0f, 0xe6, 0x58, 0x86, 0x2e, 0x80, 0x16, 0xb4,
-  0x48, 0x5a, 0xe8, 0x74, 0xc1, 0x20, 0x5f, 0x4d, 0xdb, 0xf6, 0x7a, 0x8c,
-  0x12, 0x9d, 0x36, 0x98, 0xf8, 0xbf, 0x73, 0xda, 0x70, 0xbb, 0xfe, 0xb2,
-  0x61, 0x3e, 0xa0, 0x48, 0x0d, 0xe2, 0x2c, 0x5f, 0x42, 0x71, 0xfb, 0x48,
-  0xb5, 0x1c, 0x6f, 0x6c, 0x9a, 0xfa, 0xba, 0x15, 0x24, 0xea, 0x02, 0x73,
-  0x42, 0x00, 0x9d, 0x98, 0x79, 0xac, 0x0b, 0xed, 0xf4, 0x17, 0x5b, 0x5a,
-  0x8d, 0xa4, 0xc6, 0x7d, 0x8c, 0xcc, 0xcb, 0x5e, 0x15, 0x1e, 0x67, 0x5d,
-  0x3d, 0x41, 0x04, 0x3e, 0x82, 0xb1, 0x86, 0xbc, 0x06, 0xf0, 0xc7, 0xb8,
-  0x7e, 0x93, 0x07, 0xf8, 0x5c, 0x88, 0x4f, 0x3d, 0x7f, 0x32, 0x68, 0xb7,
-  0xfd, 0x88, 0x92, 0xee, 0x43, 0x4e, 0x8d, 0x2b, 0x8b, 0x93, 0x42, 0xe0,
-  0x64, 0x16, 0x39, 0x43, 0xcb, 0x06, 0xb3, 0xeb, 0xb5, 0xe0, 0xe6, 0x21,
-  0xf0, 0x9c, 0x41, 0xc0, 0x45, 0x46, 0x2e, 0x1b, 0xd1, 0x48, 0x16, 0x7f,
-  0x64, 0x25, 0xb9, 0xbc, 0x91, 0x8b, 0xa7, 0xd9, 0xf0, 0x1e, 0xf3, 0xb4,
-  0x71, 0x5b, 0x03, 0x2d, 0x4b, 0xd2, 0x2c, 0x1b, 0x8b, 0x25, 0x14, 0x82,
-  0xdb, 0xcd, 0xa0, 0x29, 0x32, 0x52, 0x35, 0xf2, 0x46, 0x28, 0x15, 0xf2,
-  0xd7, 0x59, 0x09, 0x40, 0xd8, 0xef, 0x65, 0xa5, 0x36, 0xa4, 0xa7, 0x8a,
-  0xd9, 0xb6, 0x10, 0xc6, 0xa3, 0x11, 0x6d, 0x6f, 0x94, 0x10, 0x44, 0x0d,
-  0x9e, 0x2b, 0xbc, 0xb0, 0x92, 0xad, 0x28, 0xb8, 0x86, 0xf1, 0x42, 0x5c,
-  0x28, 0x03, 0x62, 0xad, 0xb3, 0xc2, 0xb5, 0xb8, 0xbb, 0x48, 0x8e, 0x18,
-  0x04, 0x30, 0xaa, 0x41, 0x1c, 0xbf, 0x96, 0x08, 0x4e, 0xad, 0x80, 0xc1,
-  0x08, 0x45, 0xce, 0xff, 0x9a, 0x8d, 0x54, 0x4a, 0xe2, 0x9b, 0xbe, 0x0d,
-  0xb9, 0xf6, 0x0a, 0xd1, 0xe1, 0xa4, 0xb6, 0x47, 0x93, 0xa5, 0x38, 0x09,
-  0x79, 0x40, 0xf3, 0xa4, 0x64, 0x05, 0x16, 0xb1, 0xe3, 0xa2, 0x67, 0xd0,
-  0x69, 0x12, 0x6c, 0x47, 0xc4, 0xb4, 0x4a, 0x4c, 0x61, 0x03, 0x34, 0xce,
-  0x55, 0x76, 0x52, 0x39, 0x1a, 0x8b, 0xc3, 0xae, 0xb0, 0x35, 0x32, 0xc0,
-  0xaf, 0xa7, 0x0c, 0xbf, 0xc1, 0x6e, 0xcc, 0x9b, 0x51, 0x7b, 0x6f, 0xf0,
-  0xe1, 0x80, 0x2b, 0x56, 0x72, 0x0c, 0xb5, 0xb8, 0x27, 0x96, 0x9a, 0xda,
-  0x27, 0xc5, 0x90, 0x7d, 0x2b, 0xf3, 0x6d, 0x2e, 0x4f, 0x5c, 0xe6, 0xe3,
-  0x46, 0x23, 0xb7, 0x3e, 0xd3, 0xad, 0x40, 0x80, 0x05, 0xb6, 0x6c, 0x80,
-  0x87, 0x89, 0x79, 0xbc, 0xd7, 0x5f, 0x32, 0xe7, 0xc7, 0xd9, 0x0a, 0x1d,
-  0x22, 0x2d, 0xe6, 0xfa, 0x6e, 0xe1, 0xfc, 0x0b, 0xaa, 0xda, 0xf2, 0x4e,
-  0x00, 0x7a, 0xab, 0xad, 0x8e, 0xb2, 0xc3, 0x93, 0x5d, 0x2d, 0x1a, 0xc1,
-  0x13, 0x12, 0x06, 0x2d, 0x4b, 0x77, 0x25, 0x05, 0xaa, 0xcc, 0x6f, 0xe5,
-  0x65, 0x6d, 0x57, 0xc3, 0x2a, 0x94, 0x35, 0x04, 0x1c, 0xa5, 0x65, 0x74,
-  0x8d, 0x7a, 0xd5, 0x2c, 0x62, 0x62, 0x8e, 0x9b, 0x4f, 0xb7, 0xa0, 0x54,
-  0x97, 0x8b, 0xcd, 0xdd, 0x2d, 0xc1, 0x5d, 0xd3, 0x54, 0x7e, 0x0b, 0xdf,
-  0x68, 0xf3, 0x1e, 0xfa, 0xfa, 0x57, 0x41, 0x6d, 0x55, 0xe6, 0x1d, 0x80,
-  0x84, 0x45, 0xfc, 0xe6, 0x95, 0x1c, 0x0a, 0x3c, 0x6e, 0x1a, 0x3d, 0x1b,
-  0x21, 0x5b, 0x38, 0xa3, 0x64, 0xb5, 0x2d, 0xd8, 0x4f, 0x53, 0x08, 0xe4,
-  0xfa, 0x66, 0x5a, 0x86, 0x19, 0x7c, 0x9c, 0xdf, 0x2c, 0x95, 0x44, 0x68,
-  0xf5, 0xa6, 0x93, 0x3e, 0xc8, 0xf8, 0x3a, 0xcf, 0x9a, 0x08, 0x61, 0xec,
-  0x64, 0xe7, 0x35, 0xd8, 0x32, 0x57, 0x68, 0x6b, 0xa5, 0x8c, 0x0e, 0xbb,
-  0x14, 0x3b, 0x61, 0x1d, 0x34, 0xf3, 0x5a, 0xd6, 0x0d, 0x43, 0x95, 0x2d,
-  0x6d, 0xd0, 0xfb, 0x41, 0xf4, 0xb7, 0x65, 0x3a, 0xbe, 0xc5, 0xde, 0x22,
-  0xfc, 0x09, 0x1e, 0xaa, 0xc4, 0xc9, 0xad, 0x74, 0x3d, 0xb0, 0x64, 0x2e,
-  0x15, 0xb1, 0x58, 0xff, 0x84, 0x98, 0x62, 0x54, 0xd6, 0x52, 0xa5, 0x86,
-  0xcf, 0xaa, 0xd3, 0x2b, 0x80, 0x12, 0x25, 0x27, 0x50, 0x2d, 0x30, 0xa2,
-  0x8d, 0x4c, 0x32, 0x8e, 0x90, 0x65, 0x47, 0x8b, 0x50, 0xc1, 0x3a, 0x6c,
-  0xf6, 0xee, 0x6c, 0xc5, 0x59, 0xe8, 0xdd, 0x0a, 0xe9, 0x45, 0x5d, 0xe2,
-  0x59, 0x74, 0x4f, 0x74, 0x6d, 0x7d, 0x6b, 0x0e, 0xf9, 0x26, 0xda, 0xf5,
-  0x9a, 0xae, 0x85, 0xb4, 0xa5, 0x0b, 0xdf, 0xba, 0x34, 0x1e, 0xdc, 0xb5,
-  0x98, 0x6b, 0xdf, 0x7c, 0xef, 0xb5, 0xb6, 0xbf, 0xd5, 0x35, 0xf3, 0x98,
-  0x0d, 0x78, 0xdc, 0x6a, 0x3d, 0x7b, 0x4e, 0x22, 0x76, 0x57, 0x5e, 0x09,
-  0x5b, 0xbc, 0x65, 0xd1, 0x4c, 0xf0, 0x73, 0x15, 0xd8, 0x78, 0xc2, 0x4c,
-  0x37, 0x6c, 0xed, 0x89, 0xad, 0xb6, 0x8c, 0x70, 0x32, 0x79, 0x5d, 0x9b,
-  0x65, 0xba, 0x1c, 0x54, 0x06, 0xab, 0x21, 0x6e, 0x6b, 0xd2, 0x96, 0xac,
-  0x12, 0x7c, 0x54, 0x89, 0x87, 0x6b, 0x29, 0x06, 0x9f, 0x54, 0x9f, 0x68,
-  0x4f, 0x5f, 0x66, 0xf5, 0x61, 0x92, 0x70, 0xa4, 0x91, 0xc4, 0x3f, 0xbd,
-  0x49, 0xc7, 0x79, 0x56, 0x64, 0x57, 0x72, 0xab, 0x7b, 0xdc, 0x4c, 0x35,
-  0x38, 0x71, 0x7a, 0x71, 0xcc, 0xce, 0xdd, 0x26, 0xbf, 0xd0, 0x72, 0x7c,
-  0x6c, 0xf9, 0x45, 0x40, 0x21, 0x5d, 0xda, 0x33, 0xa2, 0x75, 0xe6, 0x22,
-  0x6c, 0x09, 0x2e, 0xc5, 0x10, 0x1e, 0x47, 0xce, 0xad, 0xc3, 0xe7, 0xdc,
-  0x42, 0x26, 0x9f, 0x3d, 0xae, 0x49, 0xf3, 0x56, 0x68, 0x15, 0x17, 0xb3,
-  0xde, 0x4e, 0xb4, 0xb2, 0x8e, 0x62, 0x22, 0x89, 0xf2, 0x63, 0xaf, 0xb5,
-  0x8f, 0xce, 0x14, 0x18, 0xe0, 0x97, 0xc3, 0x68, 0x1c, 0x56, 0x4c, 0xe4,
-  0x40, 0xc0, 0x93, 0xe3, 0xcb, 0xd7, 0xd1, 0x24, 0x8f, 0x69, 0xfa, 0xf8,
-  0xb7, 0x4f, 0x3a, 0xc0, 0xcf, 0x71, 0x23, 0x0b, 0xb8, 0x58, 0xf0, 0x26,
-  0xf5, 0xd9, 0xf3, 0xd8, 0xdf, 0x79, 0x3a, 0x28, 0x1f, 0x5a, 0x23, 0x05,
-  0x43, 0xeb, 0xa5, 0x56, 0xd6, 0xf0, 0xdb, 0xa5, 0x09, 0x9e, 0x39, 0x62,
-  0x66, 0x1f, 0x56, 0x0d, 0x90, 0xc3, 0x36, 0x50, 0x60, 0xd4, 0x2b, 0xee,
-  0xe3, 0x79, 0x4f, 0x25, 0x1f, 0x1b, 0x76, 0xd9, 0x1a, 0x75, 0x29, 0x81,
-  0x96, 0xd5, 0x50, 0xca, 0xa6, 0x1e, 0xd2, 0x1a, 0x58, 0x69, 0x71, 0x95,
-  0x6d, 0x71, 0x94, 0xf6, 0xf1, 0x1a, 0xf4, 0xc4, 0xa2, 0x4a, 0x98, 0xed,
-  0x5a, 0xbc, 0xaf, 0x2d, 0x53, 0xc3, 0xd0, 0x40, 0x0c, 0x1b, 0xa8, 0xc0,
-  0x22, 0xac, 0x49, 0xfa, 0x65, 0xbb, 0x51, 0x7f, 0xa9, 0xe9, 0xb0, 0xed,
-  0x49, 0x42, 0x56, 0x08, 0xda, 0xb0, 0xdd, 0x6a, 0x24, 0x06, 0x29, 0xd5,
-  0x5c, 0x8f, 0x03, 0xa9, 0x9d, 0x2b, 0xe1, 0x67, 0x75, 0x8e, 0xd6, 0x5f,
-  0x46, 0xd1, 0x7e, 0x57, 0x88, 0x3c, 0x99, 0x73, 0x4d, 0x0d, 0x21, 0x6d,
-  0xdc, 0xde, 0x8e, 0x0f, 0x56, 0x19, 0x9e, 0x4b, 0x66, 0xe9, 0x2f, 0xdb,
-  0x47, 0x17, 0xe7, 0x09, 0x5f, 0x4e, 0x12, 0x02, 0xa9, 0x25, 0xc4, 0x06,
-  0xff, 0x0e, 0xc4, 0xed, 0x2a, 0xbe, 0x82, 0xe7, 0x43, 0x6f, 0xb7, 0x11,
-  0xa4, 0x3f, 0x5a, 0xf2, 0x77, 0xad, 0x95, 0xba, 0x95, 0x19, 0xca, 0x13,
-  0xea, 0x94, 0x0d, 0x5c, 0xab, 0x05, 0x07, 0xca, 0xcd, 0x18, 0x39, 0xd8,
-  0x4c, 0xee, 0x2c, 0xfd, 0xb1, 0x7e, 0x5c, 0xa7, 0x89, 0xa5, 0xf0, 0x8e,
-  0x50, 0x88, 0xa8, 0x99, 0xdd, 0xa5, 0x0f, 0xd8, 0x99, 0xa4, 0x71, 0x6d,
-  0x3d, 0x6a, 0x73, 0x50, 0xa3, 0x01, 0x97, 0xc0, 0xa5, 0x42, 0xbf, 0x40,
-  0x19, 0xa8, 0xb5, 0x41, 0x1b, 0x71, 0x68, 0xec, 0x0c, 0x9b, 0x71, 0xb3,
-  0x24, 0x81, 0xb4, 0xd7, 0x62, 0x35, 0x37, 0x43, 0x6e, 0x8a, 0x42, 0x18,
-  0x31, 0x52, 0xf0, 0x2d, 0x4b, 0x4b, 0x5e, 0xe7, 0x4c, 0xef, 0x3b, 0xa0,
-  0x1d, 0x5a, 0x29, 0xa3, 0x47, 0x0a, 0x74, 0x89, 0xd5, 0x48, 0x2b, 0xcc,
-  0x63, 0x54, 0x6e, 0x01, 0x1f, 0x0f, 0xbb, 0x33, 0x28, 0x7c, 0xb1, 0x7b,
-  0x5e, 0xc3, 0x06, 0x1b, 0xc4, 0x97, 0xb9, 0x0c, 0x40, 0xf6, 0x4f, 0xaa,
-  0xd9, 0xad, 0xc1, 0x44, 0xa4, 0xb2, 0x08, 0x31, 0x11, 0xe9, 0x53, 0x38,
-  0x93, 0x07, 0xbb, 0x68, 0x19, 0x49, 0x35, 0x53, 0xe3, 0x31, 0x3a, 0x58,
-  0x8a, 0x6d, 0xc2, 0x67, 0x75, 0x70, 0x4a, 0x3b, 0x0c, 0xa7, 0x6a, 0xac,
-  0xbd, 0x3c, 0x3c, 0x0f, 0x6c, 0xe1, 0xa4, 0xc2, 0x15, 0xcd, 0x94, 0x26,
-  0x17, 0x65, 0x86, 0x60, 0x9d, 0xb9, 0x6b, 0x7d, 0xf6, 0x6f, 0x5c, 0x1b,
-  0x3f, 0x83, 0x60, 0x79, 0xdc, 0x87, 0xb5, 0xa5, 0xd1, 0xfc, 0xbd, 0x74,
-  0xd2, 0x9a, 0x45, 0xa1, 0x0b, 0x64, 0x38, 0xdc, 0xba, 0x44, 0x9c, 0x35,
-  0x66, 0x69, 0x92, 0x27, 0x47, 0x34, 0x18, 0x16, 0x6e, 0xae, 0x89, 0x7c,
-  0xbe, 0xf4, 0x39, 0x5d, 0x4d, 0xa9, 0x2c, 0xc8, 0x04, 0x87, 0x9b, 0x03,
-  0xb5, 0x9b, 0xbc, 0xb1, 0x8e, 0x5b, 0x49, 0x42, 0xdc, 0x0e, 0xf1, 0x1b,
-  0x6b, 0x16, 0x69, 0x7b, 0x9e, 0x3c, 0x8a, 0xab, 0x73, 0x60, 0xc8, 0xcd,
-  0x52, 0xc0, 0xbc, 0x34, 0x77, 0xcd, 0x61, 0xb5, 0xe7, 0x09, 0x32, 0x00,
-  0x79, 0xc0, 0xc1, 0x88, 0x8b, 0x96, 0xdb, 0x09, 0x39, 0x51, 0xc9, 0x4c,
-  0xdd, 0x5a, 0xa3, 0x3c, 0xbb, 0xa5, 0x13, 0xc2, 0xef, 0x41, 0x18, 0xe5,
-  0xb5, 0x97, 0x43, 0x6e, 0xa6, 0x2c, 0x3a, 0x06, 0x0a, 0xf7, 0xda, 0x34,
-  0xcc, 0x19, 0xde, 0xb5, 0x26, 0xd2, 0xf8, 0xc3, 0x22, 0x40, 0x53, 0x08,
-  0x03, 0xb4, 0x0b, 0x14, 0x57, 0x0f, 0x57, 0x40, 0x82, 0x5b, 0x5e, 0x0c,
-  0x2e, 0x0d, 0x8d, 0xb4, 0x01, 0xcd, 0xfb, 0x9b, 0xd3, 0x90, 0x23, 0x8b,
-  0x90, 0x86, 0x5a, 0xf6, 0xbc, 0x42, 0x4c, 0x22, 0x09, 0xbc, 0x24, 0xaa,
-  0x92, 0x3b, 0x9e, 0xdd, 0x7e, 0x75, 0xe5, 0x1f, 0x50, 0xa7, 0x7d, 0x1f,
-  0xb2, 0x2e, 0xae, 0xc1, 0x2b, 0x35, 0x84, 0x8a, 0xd1, 0x71, 0xe2, 0x51,
-  0xe4, 0x63, 0x11, 0x2f, 0x7a, 0x28, 0x03, 0xc9, 0xba, 0x6e, 0xf3, 0x76,
-  0xf7, 0x29, 0x35, 0xaa, 0xae, 0xc0, 0x51, 0xc1, 0xfb, 0x83, 0x0c, 0xd5,
-  0x34, 0xa8, 0x21, 0xf3, 0xc7, 0x30, 0x48, 0xba, 0xcd, 0x68, 0x09, 0x64,
-  0x83, 0xa4, 0xf0, 0xa6, 0x59, 0x89, 0x8b, 0x71, 0x39, 0x6c, 0x8c, 0x8d,
-  0x12, 0xf2, 0x0c, 0x0c, 0x6e, 0x10, 0x1d, 0xb3, 0x9d, 0xb5, 0x45, 0x79,
-  0x48, 0x5d, 0xad, 0x43, 0x29, 0x19, 0x9e, 0x2a, 0x76, 0x82, 0x44, 0x5f,
-  0xab, 0x36, 0xc6, 0x75, 0xc2, 0x90, 0xad, 0xe7, 0x52, 0x24, 0xa4, 0x74,
-  0x5b, 0x9b, 0x22, 0x55, 0x94, 0x92, 0xc8, 0xae, 0xf1, 0x8e, 0xf6, 0x81,
-  0x83, 0xca, 0x7a, 0xed, 0xed, 0xfd, 0xbd, 0x48, 0x5c, 0x96, 0xd0, 0x33,
-  0x04, 0xe0, 0xa5, 0x6d, 0xb2, 0x51, 0xf0, 0x58, 0xf8, 0xca, 0xfe, 0x67,
-  0x3b, 0x16, 0x91, 0xc5, 0x19, 0xec, 0xe1, 0x33, 0x48, 0xe8, 0x6e, 0xde,
-  0x33, 0x48, 0x74, 0xcf, 0x4a, 0xf7, 0x64, 0x1d, 0x9a, 0xf5, 0xc5, 0xe0,
-  0x69, 0xc5, 0xbc, 0x3b, 0x2f, 0xa7, 0x33, 0x07, 0x0d, 0x64, 0x3a, 0xc1,
-  0xdb, 0xcb, 0xd3, 0x37, 0x51, 0x43, 0x17, 0x10, 0x2d, 0xb4, 0xed, 0xbb,
-  0x7f, 0x45, 0x29, 0xa0, 0x2f, 0x4e, 0x4e, 0x86, 0x50, 0x09, 0xd4, 0x51,
-  0xdd, 0x08, 0xb8, 0x28, 0x85, 0x7c, 0x58, 0xac, 0xca, 0x53, 0x52, 0xe9,
-  0x49, 0x86, 0xa4, 0xdf, 0xcb, 0x6c, 0x9c, 0x4d, 0x39, 0x99, 0x90, 0xdf,
-  0x49, 0xb4, 0x54, 0x3c, 0xae, 0x77, 0x86, 0x2e, 0x9b, 0x82, 0x2b, 0x91,
-  0x26, 0xde, 0x08, 0x98, 0x59, 0x68, 0xc8, 0xb1, 0x63, 0x29, 0x8a, 0x78,
-  0xc5, 0x77, 0x05, 0x17, 0xa8, 0x9c, 0xe8, 0x4d, 0x93, 0x02, 0xef, 0x9b,
-  0x05, 0x4d, 0xb5, 0x71, 0xdc, 0xa6, 0x88, 0xfa, 0x6b, 0xa4, 0x72, 0x6a,
-  0xcd, 0xaa, 0x9a, 0x92, 0x3f, 0x9f, 0x64, 0x39, 0xdc, 0x76, 0x01, 0x4a,
-  0x0c, 0xa0, 0xcd, 0x96, 0x08, 0x8a, 0x01, 0xd7, 0x5c, 0x35, 0x8f, 0xd2,
-  0xfd, 0x4d, 0xa6, 0xa1, 0xbe, 0xb2, 0xd2, 0xcc, 0x98, 0x24, 0x0e, 0x02,
-  0xee, 0x39, 0x01, 0x18, 0x11, 0x9c, 0x42, 0xc7, 0x49, 0x82, 0xdd, 0x68,
-  0x73, 0xaf, 0xb9, 0x2a, 0x71, 0x92, 0x69, 0xd5, 0x13, 0xfb, 0x26, 0x6d,
-  0xce, 0x51, 0x7a, 0xbd, 0x06, 0x7f, 0xab, 0x4d, 0xe9, 0xe0, 0xd1, 0x38,
-  0x7d, 0xa3, 0x5d, 0xdd, 0x68, 0x8d, 0x0e, 0xae, 0xe8, 0x1b, 0x44, 0x6d,
-  0xbf, 0x20, 0xc3, 0xcb, 0x57, 0x2c, 0x15, 0x6d, 0x43, 0xd4, 0x0d, 0x5c,
-  0x7c, 0xa6, 0x6b, 0xbc, 0x6b, 0x38, 0xb4, 0x1e, 0x53, 0x29, 0xaa, 0xa9,
-  0x59, 0x3c, 0xa5, 0xff, 0x51, 0xe9, 0x38, 0xa3, 0x91, 0xaa, 0x14, 0xd9,
-  0x1a, 0xc2, 0xf9, 0x1d, 0xd2, 0x3e, 0x4c, 0xce, 0xcc, 0xf4, 0xa1, 0x10,
-  0x8d, 0xaa, 0x28, 0x27, 0x19, 0x83, 0x8b, 0x58, 0x50, 0x52, 0x6e, 0x97,
-  0xf9, 0xdf, 0xff, 0xd1, 0xf4, 0x53, 0xff, 0xf8, 0x13, 0xec, 0x43, 0x08,
-  0xaf, 0x75, 0x3e, 0x14, 0x23, 0xa3, 0xc2, 0x63, 0x0b, 0xf2, 0x8e, 0x71,
-  0x2e, 0x8b, 0xce, 0xd0, 0x2a, 0x83, 0xd7, 0x55, 0x18, 0x8b, 0x4c, 0xb3,
-  0xc4, 0x03, 0x1d, 0x9d, 0x5d, 0x04, 0xc0, 0x7b, 0x09, 0xea, 0xf8, 0x06,
-  0xc5, 0x03, 0x24, 0x62, 0x7a, 0x1d, 0xe2, 0x92, 0xc5, 0xa3, 0x2b, 0x98,
-  0x8f, 0x85, 0x95, 0x73, 0x20, 0xb0, 0xd8, 0xcf, 0x31, 0x03, 0xbe, 0x68,
-  0xe0, 0x0c, 0x4c, 0xe7, 0x4d, 0x34, 0x10, 0xd9, 0x68, 0x8d, 0xe9, 0xfd,
-  0x3b, 0x9d, 0xb2, 0x5e, 0x79, 0x9f, 0xfd, 0x63, 0xc0, 0x5e, 0x35, 0x70,
-  0xe2, 0x7e, 0x26, 0xe0, 0xa1, 0xef, 0x3f, 0xd9, 0x65, 0xbd, 0xbb, 0xd3,
-  0x84, 0x4c, 0xc5, 0x22, 0xd8, 0xa6, 0xbb, 0x28, 0xfd, 0x35, 0xe0, 0x23,
-  0xd5, 0xee, 0xb8, 0x97, 0x1e, 0x5f, 0x0a, 0xff, 0x18, 0xf0, 0xbf, 0x3f,
-  0xee, 0xf6, 0x9f, 0xfd, 0xe4, 0x7a, 0xfd, 0x64, 0xf7, 0xfd, 0x27, 0x7b,
-  0x9d, 0x36, 0x54, 0x55, 0xb6, 0x4c, 0x2c, 0x0d, 0x09, 0xd3, 0xf4, 0x39,
-  0xad, 0x1d, 0x2a, 0x8e, 0x2e, 0xb5, 0xfc, 0x78, 0xb4, 0x35, 0x80, 0x3f,
-  0xb6, 0x38, 0x11, 0x59, 0x6d, 0x69, 0xcf, 0xb4, 0x57, 0x08, 0x5b, 0xb1,
-  0x84, 0xfb, 0x52, 0x80, 0x81, 0x76, 0xab, 0x95, 0xf1, 0x60, 0xd9, 0x46,
-  0xb0, 0x8d, 0xda, 0x0c, 0x1b, 0xe6, 0x49, 0x0e, 0xfa, 0x99, 0xac, 0xe8,
-  0xe2, 0x13, 0xb0, 0x0b, 0x97, 0xd5, 0x6b, 0xa2, 0xa4, 0xd5, 0x14, 0x95,
-  0xfc, 0xa1, 0xcd, 0xd8, 0x8a, 0x89, 0x45, 0x48, 0x35, 0xd9, 0x6a, 0x53,
-  0x68, 0xbc, 0x0e, 0xe1, 0x69, 0x7e, 0x94, 0xb8, 0xfa, 0xa2, 0x4a, 0xec,
-  0xfe, 0xfc, 0xd4, 0x20, 0x27, 0x5a, 0x4f, 0x4f, 0xd0, 0x54, 0xac, 0x33,
-  0x0a, 0x6a, 0x3d, 0x2b, 0xc8, 0xac, 0x43, 0x72, 0xc2, 0x57, 0xf7, 0xc0,
-  0x95, 0x6e, 0x00, 0x25, 0x21, 0x15, 0xcb, 0xb9, 0x7b, 0x42, 0x30, 0xaf,
-  0xf0, 0x65, 0x17, 0xae, 0x21, 0xd9, 0x76, 0x44, 0xd3, 0xa8, 0x67, 0xb4,
-  0x2c, 0x9b, 0x49, 0xf6, 0x83, 0xad, 0xd6, 0x50, 0x53, 0x03, 0x95, 0xf2,
-  0x31, 0xbb, 0x51, 0x10, 0xe4, 0x14, 0x15, 0x02, 0xdb, 0xc9, 0x00, 0xe2,
-  0x82, 0x78, 0x91, 0x78, 0xc3, 0x40, 0x23, 0x98, 0x53, 0x8b, 0xed, 0xf5,
-  0x1c, 0x0e, 0x4c, 0x32, 0x2d, 0x92, 0xc1, 0xbf, 0x95, 0xfc, 0x2a, 0x5b,
-  0xd4, 0x8f, 0x1b, 0x1e, 0xc0, 0x0a, 0xfb, 0x97, 0xb0, 0x8f, 0x6a, 0x15,
-  0x3e, 0xa9, 0x2c, 0xe0, 0xca, 0xdc, 0xb9, 0x49, 0x15, 0x42, 0x1e, 0x8d,
-  0x2c, 0x89, 0xd8, 0xec, 0x52, 0x92, 0x36, 0xda, 0x00, 0x26, 0x41, 0x0a,
-  0xa9, 0x73, 0x49, 0xc0, 0x3b, 0x9f, 0x49, 0x72, 0x17, 0xcb, 0xb7, 0x4d,
-  0x30, 0x3c, 0x77, 0x13, 0x56, 0xf4, 0x6d, 0xa9, 0x26, 0xae, 0xcc, 0x6e,
-  0x0c, 0xee, 0x24, 0xb5, 0x1a, 0xaa, 0xf3, 0x6d, 0xd1, 0xc0, 0x5c, 0x69,
-  0xd1, 0xa5, 0x93, 0x0f, 0x24, 0xa3, 0x12, 0x5a, 0x52, 0xa7, 0xcf, 0xb1,
-  0x32, 0x1d, 0x81, 0xa4, 0x85, 0x72, 0x18, 0x34, 0xf7, 0x28, 0x78, 0xd7,
-  0x8b, 0xaa, 0x6b, 0x98, 0xad, 0x46, 0xd1, 0xcb, 0xc5, 0x4d, 0x4e, 0x32,
-  0xcd, 0x23, 0x20, 0x04, 0xf4, 0x94, 0x3c, 0xe3, 0x18, 0xed, 0xc2, 0x27,
-  0xed, 0xff, 0x86, 0xd9, 0xf0, 0x1c, 0x58, 0xff, 0x64, 0x67, 0xb7, 0x51,
-  0x85, 0xc4, 0x17, 0x1e, 0x57, 0xdd, 0x91, 0x97, 0x98, 0x16, 0xe7, 0xe2,
-  0xf5, 0x61, 0x14, 0xed, 0x3d, 0xdf, 0x7d, 0xbe, 0xbd, 0xbb, 0x33, 0x78,
-  0x32, 0xd8, 0x8b, 0x9c, 0x69, 0x9c, 0x64, 0x75, 0x2e, 0xf3, 0x83, 0xd0,
-  0x9a, 0xf6, 0x68, 0x14, 0x56, 0xf8, 0xa8, 0x31, 0x8e, 0x9b, 0x71, 0x9f,
-  0xc0, 0xf8, 0xe2, 0xaf, 0xf0, 0x98, 0x03, 0x67, 0x5c, 0x64, 0x86, 0xd9,
-  0xbe, 0x1b, 0xce, 0xea, 0x79, 0x1f, 0xe3, 0x50, 0xa1, 0x6f, 0x29, 0x68,
-  0xca, 0xd1, 0x72, 0x94, 0x92, 0xd0, 0x52, 0x72, 0x11, 0x3c, 0xd6, 0x20,
-  0x48, 0x94, 0x35, 0xac, 0x9e, 0x1e, 0xc7, 0x02, 0xba, 0x2a, 0x89, 0xed,
-  0x01, 0x8a, 0x26, 0xab, 0x04, 0x86, 0x0b, 0x44, 0xaa, 0xa6, 0x9a, 0x8b,
-  0x0b, 0xe0, 0x15, 0xba, 0xf1, 0xa5, 0xec, 0xcc, 0xd7, 0x2e, 0x1b, 0x38,
-  0x6e, 0x8d, 0xf3, 0x04, 0x56, 0xa7, 0xd7, 0x7e, 0xb9, 0xa8, 0x14, 0x87,
-  0x1c, 0x79, 0x38, 0x12, 0xfd, 0x40, 0x88, 0x55, 0x44, 0x41, 0xcc, 0xbb,
-  0x0d, 0x3a, 0x2d, 0x75, 0xb5, 0x12, 0xfc, 0x8e, 0x2b, 0x9a, 0x07, 0x7b,
-  0x77, 0x45, 0xc7, 0x13, 0xa3, 0x32, 0x8a, 0x63, 0x3f, 0x16, 0x60, 0xf8,
-  0x08, 0xce, 0x9c, 0xd0, 0xc2, 0xde, 0xff, 0x97, 0x68, 0x61, 0xef, 0xff,
-  0xa7, 0x85, 0x7f, 0x13, 0x2d, 0xbc, 0xa8, 0xd1, 0x02, 0x6b, 0x76, 0xc4,
-  0xb7, 0x54, 0xc1, 0x6b, 0x22, 0xf1, 0x08, 0x55, 0x04, 0x64, 0xe1, 0xeb,
-  0xc7, 0xb1, 0x7e, 0x2f, 0x30, 0x21, 0xfa, 0xb2, 0x42, 0x07, 0xa1, 0xa2,
-  0x9d, 0xc6, 0x41, 0x36, 0x91, 0x34, 0xb9, 0x60, 0x1f, 0xfb, 0xe1, 0xcf,
-  0xdd, 0x5b, 0x2c, 0x46, 0xf3, 0x67, 0x4b, 0x31, 0x8e, 0x24, 0x57, 0xd8,
-  0x05, 0xf8, 0x76, 0x7b, 0xf8, 0x12, 0xe1, 0xd7, 0x9c, 0x71, 0xdf, 0xe0,
-  0xef, 0xb0, 0xa7, 0x98, 0xce, 0x8e, 0x76, 0xa4, 0xe6, 0xaf, 0x0d, 0x49,
-  0x4b, 0x34, 0xe4, 0x51, 0x97, 0xae, 0x02, 0x46, 0xdb, 0xf0, 0xa9, 0xbc,
-  0x2d, 0x65, 0x9c, 0xaf, 0xd2, 0x07, 0xd1, 0x67, 0x7f, 0x4e, 0xf2, 0x2c,
-  0x32, 0x7f, 0x93, 0x86, 0xd2, 0x01, 0x3e, 0xca, 0x52, 0xe2, 0xfd, 0x87,
-  0xdc, 0x6b, 0x43, 0x44, 0xfd, 0x13, 0x50, 0xfd, 0x24, 0x7a, 0x92, 0x63,
-  0xc2, 0x6c, 0x34, 0x4c, 0x03, 0x93, 0x49, 0x6a, 0xc2, 0x9f, 0x5f, 0x38,
-  0x2b, 0xb3, 0x07, 0x57, 0x76, 0xd9, 0x52, 0x51, 0x96, 0x57, 0x66, 0xb3,
-  0x6c, 0x29, 0x9a, 0x9b, 0x5e, 0x49, 0x36, 0x85, 0x0c, 0xc7, 0x65, 0x05,
-  0x37, 0x84, 0x8e, 0x7e, 0x14, 0x1d, 0x25, 0xf3, 0x95, 0xd9, 0x66, 0xbc,
-  0x46, 0x2f, 0x95, 0x99, 0x20, 0xe3, 0x94, 0xde, 0xe5, 0x61, 0x26, 0x2a,
-  0x37, 0xc4, 0xe6, 0x90, 0xaa, 0x63, 0x2e, 0x5b, 0x5c, 0x1f, 0xaf, 0xdc,
-  0x32, 0x64, 0x22, 0xcc, 0x85, 0x6b, 0xb1, 0x09, 0x00, 0x00, 0x13, 0x5f,
-  0xd1, 0x9f, 0xb5, 0xf8, 0xe8, 0x32, 0x6c, 0x41, 0xef, 0x15, 0x0f, 0x4e,
-  0xb1, 0x1c, 0xfd, 0x15, 0x2c, 0x8a, 0x09, 0x93, 0xeb, 0xd6, 0xf0, 0x19,
-  0x0c, 0x51, 0xef, 0xb8, 0xd6, 0xc1, 0x72, 0x24, 0x28, 0x07, 0x65, 0xb3,
-  0x39, 0xfa, 0x10, 0x82, 0xb5, 0xcb, 0x80, 0x57, 0x3a, 0x0b, 0xec, 0x74,
-  0x8d, 0x49, 0x05, 0xe6, 0xa6, 0xc6, 0xbe, 0xdb, 0x79, 0xe2, 0x2a, 0x49,
-  0x85, 0x1a, 0x16, 0xc2, 0xcd, 0x72, 0xab, 0x29, 0x8e, 0x6a, 0x67, 0x56,
-  0xe3, 0xc7, 0xd7, 0xb6, 0x45, 0xd4, 0xda, 0x63, 0x65, 0xa7, 0xe8, 0xfd,
-  0x89, 0x7f, 0xb4, 0x57, 0xcb, 0xad, 0x24, 0x68, 0x98, 0x0d, 0x9e, 0x1f,
-  0xc7, 0xd1, 0xc0, 0xeb, 0xeb, 0x3a, 0x78, 0xc5, 0xdf, 0x4a, 0x0f, 0x8f,
-  0xb7, 0x0d, 0x6d, 0xe6, 0x17, 0x74, 0xf0, 0x6e, 0x6e, 0x91, 0x60, 0x46,
-  0xe6, 0x0b, 0x17, 0xb0, 0x49, 0x52, 0x5e, 0x3e, 0x17, 0x03, 0xba, 0x48,
-  0xa4, 0xb1, 0xd5, 0x8f, 0xe3, 0x3c, 0x1c, 0xe0, 0x7d, 0xd5, 0x83, 0x1c,
-  0x18, 0x40, 0x67, 0x0a, 0xfe, 0x4a, 0xff, 0xf2, 0xde, 0x42, 0x3b, 0xb5,
-  0xb8, 0x68, 0x93, 0x16, 0x17, 0x59, 0x29, 0x11, 0xda, 0x6c, 0xb6, 0x64,
-  0xe9, 0x36, 0xe7, 0xbb, 0xa1, 0x05, 0xe3, 0xc8, 0x36, 0xc2, 0x92, 0xf4,
-  0xb9, 0x59, 0x6e, 0x70, 0xb9, 0x10, 0x27, 0xa8, 0x24, 0x2c, 0x68, 0x99,
-  0x07, 0x64, 0x30, 0x18, 0xe5, 0x4a, 0xcf, 0x75, 0xc3, 0x14, 0x4c, 0x26,
-  0xb8, 0xec, 0x5c, 0x78, 0xf7, 0x5d, 0x96, 0x4e, 0x50, 0x02, 0x37, 0xcf,
-  0x5b, 0xf0, 0xdf, 0x3f, 0x2e, 0xde, 0xb2, 0x17, 0xe0, 0xbc, 0xc4, 0x45,
-  0xe8, 0x1e, 0x6b, 0x5a, 0x85, 0x5d, 0xfc, 0x6f, 0x2c, 0x21, 0x6d, 0x44,
-  0xc4, 0xf3, 0xb8, 0xb4, 0x23, 0xe6, 0xb7, 0x01, 0xa3, 0x94, 0x94, 0x6b,
-  0xf6, 0xd6, 0x8d, 0x93, 0x16, 0x7c, 0x3f, 0xa8, 0x85, 0xed, 0xc1, 0x5a,
-  0xb5, 0x08, 0xc9, 0xbd, 0xc6, 0x7d, 0x22, 0x01, 0xdf, 0x1f, 0xbe, 0x55,
-  0x5a, 0x2e, 0x15, 0xbd, 0x53, 0x02, 0xce, 0x28, 0x15, 0xd9, 0x9c, 0x7c,
-  0x30, 0x68, 0x89, 0x37, 0x33, 0x4a, 0x96, 0x10, 0xb6, 0xfb, 0xf0, 0xed,
-  0x1c, 0x06, 0x10, 0x12, 0x65, 0xc4, 0x09, 0xf0, 0x0b, 0xa7, 0xf2, 0xb0,
-  0xea, 0x93, 0x42, 0xc6, 0x66, 0xb7, 0xd6, 0x09, 0xd8, 0x46, 0x2f, 0x10,
-  0xca, 0x43, 0x44, 0x93, 0x4a, 0x96, 0x7a, 0xcd, 0x4b, 0x6d, 0x06, 0x5a,
-  0xad, 0xac, 0x3b, 0x9b, 0x2d, 0xeb, 0xb4, 0x38, 0xb7, 0x5a, 0xbe, 0xa2,
-  0x49, 0x85, 0xb5, 0xdb, 0xcd, 0xdc, 0x6e, 0x68, 0x81, 0x82, 0xe3, 0x2d,
-  0x09, 0x2b, 0xa0, 0x2d, 0xd6, 0x4a, 0xdb, 0x65, 0xaf, 0x6d, 0x17, 0xa9,
-  0x9e, 0x33, 0xc6, 0x43, 0x9f, 0x78, 0xdd, 0xa2, 0x96, 0xb0, 0xf2, 0xa4,
-  0x6d, 0xca, 0x40, 0xd4, 0x7c, 0x74, 0xc2, 0xdc, 0xf9, 0xda, 0x78, 0xe6,
-  0x28, 0x9c, 0xa9, 0xcd, 0x6c, 0x9d, 0xf5, 0x49, 0x26, 0xa9, 0x73, 0x7c,
-  0x27, 0x6e, 0x4e, 0xb4, 0x09, 0x65, 0x91, 0xd9, 0x0c, 0x2f, 0x4b, 0xd0,
-  0x97, 0xa8, 0x9a, 0x8d, 0x09, 0x43, 0x87, 0x97, 0x94, 0x0b, 0x79, 0x4e,
-  0x8f, 0x83, 0x47, 0xb4, 0xa8, 0x0f, 0x52, 0x77, 0x05, 0x73, 0x6a, 0xda,
-  0x50, 0x0b, 0xe9, 0x88, 0x07, 0x96, 0x56, 0x43, 0x7d, 0x64, 0x8d, 0x26,
-  0x30, 0xe6, 0x3e, 0x42, 0xd6, 0xe1, 0x2a, 0x89, 0xe5, 0xb7, 0x3e, 0x02,
-  0xa9, 0xe9, 0xfb, 0x4f, 0x2e, 0x92, 0xf4, 0xdf, 0xb2, 0x4a, 0xda, 0x57,
-  0x6b, 0x26, 0x43, 0xb8, 0x4c, 0x8d, 0x19, 0xad, 0x0b, 0x61, 0x5a, 0xb3,
-  0xf3, 0xeb, 0x82, 0x98, 0xea, 0xd3, 0x6a, 0x0b, 0x35, 0x6d, 0x9f, 0x98,
-  0x42, 0x7f, 0xf9, 0x81, 0x28, 0xf7, 0x75, 0xf3, 0x43, 0xc7, 0x75, 0x6f,
-  0xa0, 0x7b, 0x58, 0x53, 0x9b, 0x2a, 0xa4, 0xf0, 0xa8, 0x16, 0xe4, 0x4c,
-  0xe4, 0x1f, 0xc3, 0x9c, 0x64, 0xce, 0x6c, 0x94, 0xff, 0x35, 0x77, 0x11,
-  0xee, 0xa0, 0xca, 0x1e, 0xa2, 0x8b, 0xca, 0x54, 0x5a, 0xfc, 0x61, 0x8d,
-  0xcd, 0xdb, 0x1d, 0xec, 0x80, 0xdb, 0x3e, 0xac, 0x60, 0x02, 0xdd, 0xe7,
-  0xbb, 0xeb, 0xa7, 0xcf, 0x1b, 0x85, 0x2c, 0x5c, 0xe1, 0x67, 0x8f, 0x01,
-  0x2b, 0xa5, 0x53, 0xf8, 0x7d, 0x1b, 0x99, 0x21, 0x57, 0xf9, 0xa4, 0x3f,
-  0x0d, 0x27, 0x5a, 0x0f, 0xea, 0x97, 0x96, 0x01, 0xa6, 0x1f, 0xe7, 0xe5,
-  0xe1, 0xe5, 0xdd, 0x9d, 0xcf, 0x76, 0x5a, 0x73, 0x97, 0x21, 0x42, 0x04,
-  0x05, 0xe9, 0x1c, 0xe2, 0xa6, 0x88, 0xa6, 0x5a, 0x15, 0x37, 0xb1, 0xc1,
-  0xa9, 0xf3, 0xa3, 0x35, 0x30, 0x63, 0xb3, 0xff, 0xb0, 0xad, 0x6b, 0xc0,
-  0x72, 0x61, 0xaa, 0x01, 0xd5, 0xea, 0x12, 0x77, 0xd9, 0x8a, 0x87, 0x67,
-  0x6f, 0xdf, 0x1e, 0x1f, 0x92, 0x2a, 0x76, 0x93, 0x43, 0x70, 0x74, 0x6e,
-  0xcc, 0x36, 0xb3, 0xa8, 0x2f, 0xb5, 0x21, 0x03, 0xe0, 0xc5, 0x09, 0x24,
-  0x78, 0xe7, 0x0c, 0xa8, 0xf1, 0x97, 0x16, 0xe2, 0xdc, 0x1d, 0xec, 0x06,
-  0x5b, 0xb5, 0xb0, 0x91, 0x96, 0x9c, 0x68, 0x38, 0x6d, 0x8d, 0x9f, 0xb2,
-  0x3e, 0x65, 0xce, 0x66, 0xf0, 0xa9, 0xce, 0xb2, 0x91, 0x80, 0x87, 0xcb,
-  0xa0, 0x45, 0x5f, 0xb6, 0x96, 0x4c, 0x39, 0x43, 0xb2, 0x8b, 0xac, 0x8c,
-  0x66, 0xaf, 0x61, 0x20, 0x91, 0x5b, 0x16, 0x85, 0x1e, 0x6b, 0x59, 0x98,
-  0xb0, 0x80, 0xce, 0x2c, 0x81, 0x04, 0x26, 0x7a, 0x67, 0x5a, 0x6a, 0xd1,
-  0x4c, 0x80, 0x68, 0xc3, 0xbe, 0xeb, 0xe2, 0xd6, 0x15, 0xf4, 0x9f, 0x7a,
-  0x69, 0xdc, 0x77, 0xd4, 0x6b, 0xbc, 0xa0, 0x8e, 0x90, 0xab, 0x53, 0x08,
-  0xc0, 0xae, 0x3b, 0x28, 0x95, 0x6d, 0xb7, 0xad, 0x73, 0xa9, 0x4e, 0x2d,
-  0x59, 0x04, 0xce, 0x89, 0xe5, 0x92, 0x40, 0xe4, 0x65, 0x95, 0x29, 0x35,
-  0xab, 0x48, 0xc3, 0x58, 0x2c, 0x32, 0x56, 0x19, 0x45, 0x4b, 0xe1, 0x69,
-  0xa5, 0x7a, 0x09, 0x6c, 0x8a, 0xe7, 0x42, 0x46, 0xba, 0x56, 0x8e, 0x82,
-  0xb2, 0xca, 0x21, 0x5c, 0x8e, 0x1e, 0x01, 0x20, 0x65, 0xbb, 0x9f, 0x38,
-  0x12, 0x1f, 0xc5, 0x1e, 0x75, 0xa1, 0x71, 0x16, 0x63, 0xb8, 0xa6, 0xba,
-  0xc1, 0xbf, 0x1d, 0x7b, 0xf4, 0x7c, 0x5b, 0x6b, 0xab, 0x23, 0x9f, 0x78,
-  0x5d, 0x7e, 0xce, 0x6b, 0x2d, 0x85, 0x0c, 0xff, 0x70, 0x51, 0x3b, 0x1d,
-  0x5a, 0xfc, 0x34, 0xcb, 0xb7, 0x21, 0xe0, 0x71, 0x09, 0xbe, 0x3c, 0x9b,
-  0x1a, 0x74, 0x76, 0x0b, 0xe8, 0x21, 0x02, 0x8e, 0xec, 0xaa, 0xa0, 0xa6,
-  0xd5, 0x16, 0xa2, 0xce, 0xd9, 0x99, 0x4f, 0xa3, 0x14, 0xd1, 0x51, 0x0b,
-  0xad, 0x5a, 0xe5, 0xf3, 0x93, 0x79, 0x03, 0xb8, 0x8f, 0x9f, 0x00, 0xbc,
-  0x9e, 0xf2, 0x75, 0x1c, 0x37, 0xc1, 0xd3, 0x56, 0xa6, 0xe8, 0x4a, 0xc0,
-  0x1a, 0xa1, 0x30, 0xb0, 0x9d, 0x52, 0x4b, 0x03, 0xd5, 0x9b, 0x53, 0x9c,
-  0xba, 0x45, 0xc0, 0x49, 0x2d, 0x0f, 0x49, 0x20, 0x45, 0xf2, 0xd2, 0x30,
-  0x20, 0x2a, 0x05, 0x6b, 0xe3, 0xe2, 0xb6, 0x58, 0x0b, 0xcd, 0x5d, 0x8d,
-  0xf6, 0xa6, 0xd1, 0x05, 0xc8, 0xfd, 0xd6, 0xaa, 0x40, 0x6e, 0x95, 0xe1,
-  0x28, 0x99, 0x12, 0xab, 0xcd, 0xb9, 0x2d, 0x6a, 0xc0, 0x91, 0x36, 0x14,
-  0x56, 0x07, 0xe0, 0xdf, 0xae, 0xf9, 0xa5, 0x83, 0x24, 0xea, 0x30, 0xb4,
-  0x7f, 0x27, 0x4c, 0xfb, 0x12, 0x6d, 0xc4, 0xbd, 0xca, 0x95, 0x38, 0x68,
-  0xa8, 0x6e, 0xac, 0x2d, 0x2e, 0x0a, 0x63, 0xaf, 0x6a, 0xd9, 0xe7, 0x2d,
-  0xdb, 0x7c, 0x37, 0x4f, 0x1f, 0x70, 0x15, 0x34, 0xf1, 0x82, 0xdd, 0xbc,
-  0x1f, 0x19, 0xd5, 0xee, 0x8b, 0xbd, 0xc1, 0xee, 0xf3, 0xcf, 0x06, 0xbb,
-  0x3b, 0x83, 0xdd, 0xca, 0xe8, 0xa0, 0x20, 0x71, 0xc8, 0x5f, 0xd8, 0x4e,
-  0xcb, 0x25, 0xda, 0x16, 0xbb, 0x12, 0x76, 0x30, 0x5b, 0x0d, 0x82, 0xc8,
-  0xf5, 0x46, 0x17, 0x1a, 0xdd, 0xde, 0x62, 0x66, 0x71, 0x7e, 0x68, 0x25,
-  0x35, 0x68, 0x07, 0x4e, 0x35, 0x0b, 0x36, 0x55, 0xc2, 0x1b, 0xbd, 0xf1,
-  0xa7, 0xa5, 0x12, 0x52, 0x90, 0x26, 0x55, 0x29, 0x3c, 0xed, 0x22, 0xf2,
-  0x5c, 0xff, 0xff, 0xc2, 0x71, 0x57, 0x34, 0x1a, 0x0e, 0x7c, 0x73, 0xc7,
-  0x10, 0x7a, 0x8c, 0x8b, 0x8e, 0x05, 0xdf, 0x3f, 0x3f, 0xbb, 0xb8, 0xd4,
-  0x04, 0x6d, 0x61, 0x07, 0x71, 0x71, 0x37, 0x70, 0xd1, 0x72, 0x88, 0xce,
-  0xd5, 0xcb, 0xa5, 0x74, 0x50, 0x1d, 0xd6, 0xdc, 0xf1, 0xf9, 0x85, 0x47,
-  0x51, 0x08, 0xee, 0x50, 0xb4, 0xe9, 0x32, 0x86, 0x59, 0xac, 0x45, 0x6b,
-  0x7d, 0x52, 0xd9, 0x38, 0x47, 0x04, 0xaf, 0xc1, 0xce, 0x4b, 0x2b, 0x34,
-  0xf5, 0xe0, 0x16, 0xfc, 0xda, 0x9f, 0xfe, 0xe4, 0x59, 0xd4, 0x90, 0x53,
-  0xda, 0xb4, 0x22, 0x22, 0x6c, 0x9c, 0xcf, 0xbc, 0x7b, 0x5d, 0x00, 0x60,
-  0xa2, 0xce, 0xfe, 0x8f, 0x48, 0x7c, 0xfb, 0xa9, 0xff, 0x23, 0xfd, 0xf9,
-  0x53, 0xc7, 0x5d, 0x03, 0x50, 0xa8, 0xc4, 0xb3, 0xe8, 0x26, 0x2f, 0x1b,
-  0x84, 0x9a, 0xb1, 0xa8, 0x3f, 0x2a, 0x57, 0x01, 0x6f, 0x17, 0xc7, 0x43,
-  0xe2, 0x20, 0x0a, 0x46, 0x82, 0x07, 0xd4, 0x89, 0x0d, 0x3b, 0x45, 0x8a,
-  0x94, 0x11, 0xa5, 0xb8, 0xb5, 0x44, 0x3a, 0x60, 0x6c, 0x10, 0x08, 0x78,
-  0xb1, 0x67, 0xb8, 0x63, 0xec, 0x24, 0xbd, 0x17, 0xb6, 0x13, 0x1b, 0xc4,
-  0x8a, 0xdc, 0x3f, 0x0c, 0xad, 0xa9, 0x2e, 0x5c, 0xf9, 0x60, 0xc3, 0xa5,
-  0x84, 0x73, 0x3e, 0x16, 0xa9, 0xf8, 0x5c, 0x52, 0x4a, 0x0d, 0x49, 0x08,
-  0x1e, 0x4b, 0x5c, 0xc0, 0x6c, 0x3a, 0x67, 0xbf, 0xb2, 0x59, 0x9f, 0xf2,
-  0xb4, 0xb8, 0xe5, 0x19, 0x2a, 0x68, 0x41, 0x24, 0xc8, 0x1a, 0x1b, 0x81,
-  0xa2, 0x8f, 0x91, 0x59, 0x5e, 0x2d, 0xc7, 0xeb, 0x9b, 0x9d, 0x33, 0xb8,
-  0x05, 0xfe, 0x66, 0x64, 0xa6, 0x65, 0x87, 0xd4, 0x3f, 0x29, 0xe8, 0x7c,
-  0x1e, 0xae, 0x34, 0x9b, 0x57, 0x8a, 0x65, 0x08, 0xca, 0x95, 0x41, 0xb9,
-  0x35, 0xf2, 0xa9, 0x42, 0x60, 0x42, 0x97, 0x0a, 0x84, 0xa0, 0x85, 0x78,
-  0x62, 0x48, 0x85, 0x9a, 0xd7, 0x0e, 0x5a, 0x0c, 0xa1, 0x32, 0x5b, 0x30,
-  0x28, 0x2c, 0x03, 0x49, 0x07, 0xd1, 0x06, 0x7f, 0x58, 0x24, 0x71, 0x4e,
-  0xdc, 0x8b, 0x5d, 0xc5, 0xc1, 0xe4, 0xfe, 0x17, 0x35, 0x0b, 0xa0, 0x54,
-  0x06, 0xf6, 0xc5, 0xc8, 0xdb, 0xee, 0xb7, 0xed, 0xa1, 0x5c, 0x72, 0x1c,
-  0x66, 0x0e, 0x16, 0x1d, 0xe7, 0xa3, 0xb4, 0xcc, 0x63, 0x8d, 0xb2, 0x57,
-  0x84, 0x90, 0x40, 0xb8, 0xd0, 0x32, 0x1e, 0xc3, 0x75, 0x28, 0x21, 0x83,
-  0xe8, 0x7f, 0xa1, 0x53, 0x7d, 0x5b, 0xec, 0x15, 0x48, 0x4d, 0xfd, 0xf2,
-  0xf8, 0xf5, 0xd9, 0xc5, 0x71, 0x35, 0xa1, 0x53, 0xc0, 0x03, 0xa2, 0xb6,
-  0x9a, 0x64, 0x9b, 0x28, 0x9d, 0xac, 0xc6, 0x12, 0x2b, 0xd5, 0x26, 0x40,
-  0x04, 0xe7, 0xdf, 0x1d, 0x05, 0x27, 0xcf, 0x60, 0x56, 0xac, 0xd1, 0x5e,
-  0xab, 0x57, 0x17, 0xfc, 0x73, 0x0b, 0xc5, 0xb0, 0x05, 0xdd, 0xc1, 0xc6,
-  0x27, 0xf0, 0x39, 0x28, 0xe4, 0x65, 0x86, 0x19, 0x04, 0x72, 0x16, 0x05,
-  0x3b, 0x25, 0x5c, 0xa3, 0x2d, 0xb0, 0xb9, 0xc4, 0xec, 0xa5, 0xf6, 0xa5,
-  0x9a, 0x38, 0x62, 0x09, 0x4c, 0xe0, 0x68, 0x85, 0x41, 0xd4, 0xec, 0x48,
-  0x61, 0x56, 0xa4, 0x97, 0x46, 0x49, 0x1a, 0xc1, 0x61, 0x63, 0xcf, 0xae,
-  0x78, 0xb0, 0x4d, 0x61, 0x50, 0xac, 0x9d, 0x28, 0x04, 0xb7, 0x91, 0xaa,
-  0xd2, 0x56, 0x03, 0xa0, 0xe5, 0xf6, 0x75, 0xeb, 0xab, 0x9d, 0x6f, 0x16,
-  0x5b, 0x95, 0x6a, 0xdb, 0xb6, 0x78, 0x56, 0xd4, 0xf1, 0x4f, 0x5d, 0x6f,
-  0x89, 0x6f, 0x41, 0xdc, 0x71, 0x60, 0xe8, 0x96, 0x82, 0xb7, 0x35, 0x70,
-  0x1e, 0xff, 0xf6, 0x2a, 0x7e, 0x6e, 0xd6, 0x80, 0x8b, 0x68, 0x2d, 0xe7,
-  0xad, 0x02, 0x82, 0x01, 0x4d, 0xda, 0x49, 0x36, 0xe8, 0x44, 0x0d, 0x8c,
-  0xb0, 0x76, 0x14, 0xf0, 0xb8, 0x0d, 0xec, 0xc9, 0x27, 0x95, 0xba, 0xfa,
-  0x95, 0x23, 0x85, 0x6e, 0xff, 0xc1, 0x3c, 0xe3, 0x48, 0x7c, 0x8f, 0x8a,
-  0xd5, 0xbc, 0x84, 0xd0, 0x24, 0x49, 0x85, 0xe3, 0x2c, 0xcf, 0x9b, 0x46,
-  0x47, 0x14, 0xbb, 0x72, 0x9b, 0x86, 0x8c, 0x8a, 0x8b, 0xd7, 0x87, 0x2f,
-  0x9e, 0xbd, 0x80, 0xe8, 0x87, 0xb2, 0x6a, 0x9a, 0x8f, 0xa6, 0xd1, 0x86,
-  0x08, 0xe3, 0xf4, 0x43, 0x6e, 0xb0, 0x03, 0x6d, 0x49, 0xcd, 0x80, 0xa3,
-  0x64, 0x2a, 0xf8, 0x14, 0xc3, 0xa0, 0x89, 0x41, 0xab, 0xe9, 0xb4, 0xed,
-  0xf6, 0x5c, 0x57, 0x1d, 0xd8, 0x6e, 0x0d, 0x8c, 0x3e, 0x95, 0xd8, 0x37,
-  0xad, 0x2e, 0x6a, 0xea, 0x12, 0x69, 0xe8, 0x73, 0x68, 0x33, 0xba, 0x89,
-  0x3d, 0x47, 0x75, 0xae, 0x6a, 0x6b, 0xd1, 0xd6, 0xdc, 0xdf, 0xaa, 0xe7,
-  0xb9, 0x56, 0x79, 0x02, 0x07, 0xa0, 0x52, 0x6d, 0x7c, 0x00, 0x8f, 0x02,
-  0xeb, 0x01, 0x6d, 0x86, 0x12, 0x35, 0x62, 0x99, 0x33, 0x86, 0xc3, 0x19,
-  0x3c, 0x79, 0xb5, 0xf4, 0xd7, 0xac, 0xdd, 0x7c, 0x73, 0x9d, 0x2f, 0x24,
-  0xe1, 0xb1, 0x0d, 0xa0, 0x36, 0x8c, 0x83, 0x91, 0x47, 0x8d, 0xd8, 0x51,
-  0x73, 0x03, 0x56, 0x0b, 0xbc, 0x7b, 0x72, 0xe4, 0xea, 0x9c, 0xfb, 0x68,
-  0x9e, 0xd1, 0xaa, 0xbd, 0x39, 0xf7, 0x18, 0x88, 0xcd, 0x33, 0x45, 0xd7,
-  0x94, 0x97, 0x9a, 0x47, 0x96, 0x28, 0x8f, 0xef, 0xda, 0x9b, 0xd3, 0x56,
-  0x44, 0x99, 0x94, 0x36, 0xac, 0x61, 0x04, 0xaa, 0x5a, 0xa5, 0x39, 0xde,
-  0x18, 0x4e, 0xf4, 0xb6, 0x6e, 0x9a, 0x35, 0x0b, 0x6f, 0x48, 0x08, 0x17,
-  0x41, 0xfc, 0x83, 0x6b, 0x31, 0x83, 0x69, 0xd0, 0xb0, 0x1a, 0xd5, 0xbd,
-  0x56, 0x84, 0xf5, 0xcf, 0xd1, 0xce, 0x28, 0x15, 0xf0, 0xaa, 0x26, 0x29,
-  0xd7, 0xad, 0x24, 0xa2, 0xa4, 0xa1, 0x79, 0xbc, 0x19, 0x4e, 0x61, 0x1e,
-  0x65, 0xe3, 0x32, 0x98, 0x01, 0x3f, 0xd0, 0xde, 0x9c, 0x8a, 0x06, 0xcd,
-  0x99, 0xb1, 0x9f, 0x05, 0x69, 0x4c, 0x8f, 0xcf, 0x4c, 0x1e, 0x6c, 0x6c,
-  0x32, 0x7d, 0x28, 0xac, 0xa8, 0xb1, 0xc3, 0xeb, 0x67, 0xd6, 0xb6, 0xc3,
-  0x18, 0x41, 0x7d, 0x83, 0x7d, 0x8a, 0x15, 0x1e, 0xef, 0xb7, 0x37, 0xe7,
-  0x76, 0x18, 0x4f, 0x3e, 0xba, 0xc1, 0xda, 0x4b, 0x63, 0x15, 0xa6, 0x73,
-  0x85, 0xc6, 0x7c, 0x2f, 0x08, 0x01, 0x9c, 0xf7, 0x5f, 0xbe, 0x7f, 0x7c,
-  0x41, 0xa6, 0x73, 0x83, 0xd2, 0xe2, 0xe4, 0x76, 0x7f, 0x70, 0x35, 0x2e,
-  0x2f, 0xae, 0x82, 0x6c, 0x45, 0x62, 0x5e, 0x58, 0x43, 0xf6, 0xbe, 0x3f,
-  0x8f, 0xbd, 0xb4, 0xc8, 0x52, 0xc9, 0xc5, 0x57, 0xb4, 0xa0, 0xa8, 0x32,
-  0xc4, 0xa8, 0x0d, 0xa3, 0x27, 0x88, 0x25, 0x6e, 0x4c, 0x71, 0x76, 0xcb,
-  0x8e, 0x15, 0x77, 0xbb, 0xbd, 0x5f, 0xaf, 0xc3, 0x80, 0x8e, 0xe5, 0x71,
-  0x4f, 0xc7, 0x32, 0x2b, 0xa7, 0x9c, 0xbb, 0x8c, 0xf3, 0x0f, 0xef, 0x76,
-  0xb5, 0x4b, 0x77, 0x26, 0xeb, 0xe3, 0x5b, 0xdc, 0x4f, 0xac, 0x73, 0xfe,
-  0xd5, 0x3a, 0x0e, 0x01, 0x92, 0xe3, 0x51, 0x91, 0x4d, 0x97, 0xa5, 0x44,
-  0xeb, 0x49, 0x63, 0x57, 0x26, 0x20, 0xae, 0x59, 0x0a, 0xc4, 0xa7, 0xda,
-  0xdd, 0xbe, 0x3e, 0xa9, 0x3a, 0x17, 0x44, 0x75, 0x03, 0x0c, 0xc3, 0x76,
-  0xac, 0x5f, 0x1c, 0x7d, 0xda, 0x0f, 0x51, 0x00, 0xbf, 0x3d, 0xf3, 0xca,
-  0x5b, 0x16, 0x68, 0x3d, 0xc3, 0xd3, 0x5e, 0x6b, 0x07, 0x62, 0x92, 0x30,
-  0xe6, 0x9e, 0x92, 0x02, 0x47, 0x27, 0x6a, 0x7d, 0x78, 0xe5, 0x7b, 0x8f,
-  0x11, 0xd2, 0xda, 0x35, 0xce, 0x67, 0x1f, 0x38, 0xe4, 0xf4, 0x80, 0x9f,
-  0x15, 0x43, 0x83, 0x05, 0xb3, 0x6a, 0x9c, 0x4c, 0x3d, 0xc6, 0x6b, 0x56,
-  0x7e, 0xdd, 0x08, 0x2a, 0x54, 0xf8, 0xd8, 0x48, 0xf8, 0xc1, 0xb6, 0xc1,
-  0x04, 0x40, 0x7e, 0xec, 0x84, 0x5f, 0x05, 0x9c, 0xb2, 0xbd, 0x39, 0x1d,
-  0xae, 0x7f, 0x4f, 0x97, 0xa7, 0x67, 0x66, 0xb3, 0x89, 0x9a, 0xa1, 0x59,
-  0x03, 0x6d, 0xd2, 0x86, 0x1d, 0xf0, 0x5f, 0xc4, 0x20, 0x58, 0xed, 0x98,
-  0xce, 0x2b, 0xb1, 0x95, 0xd4, 0x63, 0x36, 0x03, 0x06, 0x4c, 0x7b, 0x0c,
-  0xb9, 0xa4, 0x90, 0x85, 0x48, 0xff, 0x6e, 0xdb, 0x05, 0x2d, 0x40, 0xd0,
-  0x86, 0xad, 0x5c, 0xea, 0x7d, 0x88, 0x6a, 0xd7, 0x62, 0x06, 0xb3, 0x12,
-  0x60, 0x31, 0x50, 0xed, 0xa8, 0x6b, 0x24, 0x2f, 0x0a, 0xa3, 0x94, 0x2c,
-  0xc8, 0xc2, 0xf4, 0x31, 0x31, 0x1e, 0x39, 0x51, 0x58, 0x1e, 0x6f, 0x94,
-  0xaa, 0xe1, 0xac, 0x0d, 0x29, 0x58, 0x5a, 0xad, 0x82, 0x36, 0xa8, 0x97,
-  0xa9, 0xed, 0x27, 0xd7, 0x93, 0xbe, 0x12, 0x47, 0x95, 0x15, 0xf5, 0xf3,
-  0x6d, 0x2c, 0x04, 0xa9, 0xbf, 0x2f, 0xf1, 0xe3, 0xf3, 0xb5, 0xb5, 0x17,
-  0x87, 0xbe, 0x00, 0x63, 0x74, 0x21, 0xa1, 0x3f, 0xcc, 0x53, 0x19, 0x03,
-  0x47, 0x15, 0xe8, 0x4d, 0xb6, 0xb5, 0x48, 0xad, 0x5e, 0x41, 0xc7, 0x1f,
-  0x2f, 0xdb, 0x4a, 0x33, 0x6c, 0x59, 0x6d, 0x41, 0x34, 0xbd, 0x3b, 0xd8,
-  0xed, 0x99, 0x6e, 0xa5, 0x52, 0x9c, 0x49, 0xc8, 0xfc, 0x49, 0xac, 0x29,
-  0x3d, 0x11, 0xea, 0x27, 0xd6, 0xad, 0x63, 0x17, 0x12, 0xf2, 0xaa, 0x62,
-  0x63, 0x58, 0x5e, 0x93, 0xab, 0x04, 0x3a, 0xa1, 0x9c, 0x91, 0x6c, 0x1a,
-  0x54, 0xb4, 0xd3, 0x7f, 0xfa, 0xe2, 0x45, 0xe5, 0x5e, 0x0f, 0x95, 0xe0,
-  0x67, 0x3b, 0x3b, 0x02, 0xef, 0x53, 0x7f, 0x8d, 0xbe, 0xe8, 0xbf, 0xc0,
-  0x8b, 0xd5, 0xd7, 0x04, 0x04, 0x66, 0xfd, 0x7b, 0x7d, 0xfe, 0xa6, 0xa5,
-  0x3b, 0x58, 0x70, 0xd6, 0xbe, 0xf5, 0x82, 0xbb, 0x6b, 0x79, 0x0b, 0x0f,
-  0xcb, 0x3a, 0x66, 0x57, 0x57, 0x5c, 0xba, 0x9a, 0x9f, 0x14, 0x0c, 0xf0,
-  0x2c, 0xbf, 0x8f, 0xf3, 0x49, 0x73, 0xba, 0x3b, 0xbd, 0xfe, 0xee, 0xba,
-  0xe9, 0xba, 0x3a, 0x93, 0xd8, 0x4e, 0xd6, 0x84, 0x36, 0xff, 0xb8, 0xb5,
-  0xf9, 0xf5, 0x56, 0xdb, 0xec, 0x3f, 0xdd, 0xd9, 0xe9, 0x3d, 0xe7, 0x9f,
-  0x2f, 0x5e, 0xac, 0x8d, 0x31, 0xf1, 0x7d, 0x3c, 0xb1, 0xa9, 0x55, 0x46,
-  0x4b, 0xed, 0xb4, 0xb4, 0xbe, 0x4b, 0xad, 0xee, 0xbe, 0x78, 0xd1, 0xe3,
-  0x5e, 0x9e, 0x7d, 0x54, 0xeb, 0xe5, 0x7d, 0xe6, 0x4d, 0xe7, 0xfc, 0xba,
-  0x27, 0xc7, 0xa2, 0x36, 0x03, 0xfa, 0x13, 0x51, 0x4c, 0x8c, 0x7a, 0x14,
-  0x99, 0x77, 0x41, 0xcb, 0x50, 0xaa, 0x0f, 0x3e, 0xc0, 0x6d, 0x44, 0xa0,
-  0xdf, 0x02, 0x79, 0x78, 0xd0, 0x14, 0x45, 0xfd, 0x88, 0xbd, 0x7f, 0xc1,
-  0xfc, 0xf1, 0x1e, 0x51, 0xfb, 0x4c, 0x5c, 0x61, 0xd7, 0x8c, 0xb8, 0x64,
-  0x59, 0x7a, 0x45, 0xb4, 0x49, 0xe4, 0xb2, 0x05, 0x5b, 0xc0, 0x5d, 0x3c,
-  0x4d, 0x0d, 0xc9, 0x21, 0xea, 0xc2, 0x80, 0x25, 0xa8, 0x1c, 0xf4, 0x7b,
-  0xb6, 0xe8, 0xa2, 0x5e, 0xce, 0x74, 0xe2, 0x34, 0x11, 0xf3, 0x4a, 0xc9,
-  0x93, 0x7d, 0x79, 0x46, 0x0e, 0x1a, 0xd4, 0xb9, 0x87, 0x81, 0xe0, 0x11,
-  0xb2, 0x77, 0xa8, 0xd6, 0x6b, 0xe4, 0x80, 0x91, 0x3c, 0xa2, 0xaf, 0x40,
-  0xe1, 0xc2, 0x5c, 0xe5, 0xa7, 0xd9, 0x2d, 0x02, 0x04, 0x3c, 0x73, 0x18,
-  0xcc, 0x03, 0x6f, 0xe0, 0x24, 0x31, 0x98, 0xe5, 0x1a, 0x0e, 0x8c, 0x7b,
-  0x5f, 0xec, 0x31, 0x4b, 0x51, 0x44, 0xfd, 0x21, 0xfb, 0x01, 0x96, 0x33,
-  0xcd, 0xdd, 0x92, 0xd4, 0x09, 0xd6, 0x4f, 0xef, 0xe3, 0x3c, 0xb1, 0xac,
-  0x53, 0xd2, 0x9b, 0x8d, 0x03, 0x38, 0xa0, 0x55, 0xcd, 0x9c, 0xd4, 0xe4,
-  0x71, 0x8f, 0x85, 0x60, 0x88, 0xd6, 0x12, 0xac, 0x34, 0x41, 0x3c, 0xa8,
-  0x26, 0xd9, 0xb2, 0xed, 0x1f, 0x76, 0xba, 0x8a, 0x3b, 0xcc, 0xd0, 0xd6,
-  0xcd, 0x42, 0x27, 0x38, 0x70, 0x1b, 0x35, 0x17, 0x18, 0x3f, 0x85, 0x64,
-  0x58, 0xa0, 0x34, 0xb9, 0x12, 0xae, 0x6e, 0x16, 0x60, 0x47, 0xbc, 0x45,
-  0x60, 0x4c, 0xb2, 0xf8, 0x06, 0x81, 0xa5, 0x05, 0xa3, 0x2d, 0xba, 0x48,
-  0x20, 0xea, 0x00, 0xf8, 0x52, 0xd9, 0x31, 0xda, 0x2b, 0xc7, 0x04, 0x69,
-  0xd3, 0xa2, 0xcd, 0x20, 0x6c, 0x11, 0xb4, 0x15, 0xe8, 0xfc, 0x86, 0xa8,
-  0x9a, 0x49, 0x0c, 0xde, 0xd6, 0x40, 0x06, 0x00, 0xa3, 0xad, 0xec, 0x04,
-  0x00, 0x79, 0xc2, 0x2d, 0x4d, 0x1e, 0x4a, 0x40, 0x62, 0xe3, 0x49, 0xbb,
-  0x9c, 0x87, 0x27, 0xff, 0xfb, 0x78, 0xf0, 0x6b, 0x58, 0x93, 0xeb, 0x91,
-  0xe7, 0x79, 0x7c, 0xef, 0xd1, 0x21, 0xd4, 0x5b, 0xec, 0x02, 0xdf, 0xe2,
-  0xe9, 0xd4, 0xd7, 0xb9, 0x87, 0xdf, 0x8f, 0x84, 0xfd, 0xcc, 0xd0, 0xe2,
-  0x5d, 0x0d, 0xfb, 0xb5, 0xe8, 0xe2, 0x9c, 0xe1, 0x37, 0x41, 0x05, 0xe7,
-  0xd0, 0xb0, 0xec, 0x40, 0x5f, 0x66, 0x70, 0xbf, 0x58, 0x45, 0xa9, 0x25,
-  0x75, 0x82, 0x52, 0x6d, 0x75, 0xfb, 0x14, 0x0d, 0xb1, 0x01, 0xc6, 0x1e,
-  0xc6, 0xc5, 0x5c, 0xf8, 0x94, 0x06, 0x9e, 0xf9, 0x1a, 0xe4, 0x0b, 0x04,
-  0xa2, 0x8a, 0x0b, 0x3b, 0x2c, 0x6d, 0x6b, 0x76, 0x83, 0xc0, 0x38, 0x0e,
-  0xe2, 0x47, 0xd6, 0x4d, 0x9b, 0x39, 0x8a, 0xd7, 0xb6, 0x8c, 0x67, 0x8b,
-  0x96, 0x74, 0x17, 0xc9, 0xcc, 0x35, 0x84, 0x24, 0x56, 0x8e, 0x7c, 0x40,
-  0x2a, 0x3a, 0x6b, 0x36, 0x17, 0xe4, 0xe0, 0x08, 0xe5, 0xd2, 0x8b, 0x70,
-  0x44, 0xb8, 0x7e, 0xaa, 0xb9, 0x23, 0x24, 0x9c, 0xd3, 0x39, 0x7a, 0xc9,
-  0xae, 0x0f, 0x84, 0x11, 0xec, 0xaf, 0xf1, 0xf7, 0x9d, 0x9b, 0xb3, 0x92,
-  0xeb, 0x29, 0x2d, 0x89, 0x6e, 0x67, 0x81, 0x07, 0xe8, 0x4a, 0xae, 0x61,
-  0x97, 0xae, 0x01, 0x7f, 0x8b, 0xf3, 0x61, 0x2d, 0x62, 0x2e, 0xa5, 0x51,
-  0x0f, 0x4e, 0x30, 0xf8, 0x5e, 0x6f, 0xb9, 0xc7, 0x94, 0x5c, 0x15, 0x10,
-  0x0b, 0x1f, 0xdf, 0x2c, 0xb6, 0xcc, 0xe9, 0xb7, 0x5e, 0x68, 0x74, 0x23,
-  0x81, 0xda, 0xa3, 0x90, 0x68, 0xa2, 0xea, 0x72, 0xfe, 0xf1, 0x7d, 0x5a,
-  0x24, 0x0a, 0x70, 0x31, 0x5d, 0x45, 0x3a, 0x69, 0xef, 0xc3, 0x6b, 0x84,
-  0x1e, 0x3a, 0xc4, 0xfe, 0x43, 0xad, 0xca, 0x8a, 0x92, 0x3c, 0x11, 0x2a,
-  0xab, 0xd0, 0x2e, 0x6d, 0x27, 0xe5, 0x78, 0x5b, 0x92, 0xb9, 0x23, 0x90,
-  0x18, 0x4b, 0xfc, 0x77, 0x89, 0xf3, 0xe8, 0x4e, 0x1a, 0x28, 0xda, 0xae,
-  0x76, 0x50, 0x58, 0x35, 0xed, 0xb2, 0x16, 0x76, 0xe1, 0xbd, 0x77, 0x41,
-  0x22, 0x50, 0x8b, 0x99, 0xcb, 0xbc, 0x43, 0x6e, 0xb9, 0x5d, 0xb4, 0x82,
-  0x2b, 0x6f, 0x5f, 0xa9, 0xef, 0xc6, 0x2f, 0x28, 0xe6, 0x0f, 0x5c, 0x16,
-  0x2d, 0x39, 0x38, 0x52, 0xed, 0xc9, 0x8e, 0xbb, 0x0b, 0x93, 0xad, 0xa6,
-  0xaa, 0x3a, 0x28, 0x17, 0x5d, 0xb6, 0xf6, 0xda, 0x3c, 0x20, 0x36, 0x0c,
-  0x42, 0x42, 0x5e, 0x0d, 0xf0, 0x16, 0x49, 0xa1, 0x1f, 0x1f, 0x14, 0xe9,
-  0x13, 0xa3, 0xd8, 0x55, 0x32, 0x61, 0xa3, 0x0c, 0x00, 0x54, 0xd1, 0xb2,
-  0x16, 0x6b, 0x6a, 0x6e, 0x9c, 0x6e, 0xed, 0xe3, 0x71, 0x7f, 0xbb, 0x83,
-  0x27, 0x5b, 0x95, 0x33, 0xc0, 0xfa, 0x08, 0x70, 0xb3, 0x9b, 0x2e, 0x75,
-  0x26, 0x3a, 0x70, 0x9f, 0x14, 0xb8, 0x99, 0x88, 0xec, 0xe4, 0x83, 0x28,
-  0x1a, 0x6e, 0xa2, 0x51, 0x7e, 0x12, 0x2d, 0x85, 0x35, 0xe3, 0x75, 0xd2,
-  0xaa, 0xc5, 0xf1, 0x1a, 0x2e, 0xe6, 0x81, 0x69, 0xa5, 0x6b, 0xf0, 0x10,
-  0x2f, 0x89, 0xca, 0xac, 0xcd, 0x7e, 0x4d, 0x77, 0x34, 0x2c, 0xdc, 0xcb,
-  0xc5, 0xa0, 0x89, 0xe7, 0x1d, 0x54, 0xd4, 0xd2, 0xf7, 0xa9, 0xfb, 0x9d,
-  0xd0, 0x5d, 0x8e, 0xcb, 0x52, 0xc3, 0xf0, 0x5d, 0xfd, 0xa2, 0xb4, 0x68,
-  0xad, 0x7f, 0x03, 0xe7, 0x09, 0x7b, 0x01, 0xdc, 0x7c, 0x65, 0xba, 0xe2,
-  0xe7, 0x92, 0x4c, 0xfe, 0x7d, 0x2e, 0x49, 0x28, 0xd8, 0x7e, 0x3d, 0x0f,
-  0x9a, 0x1e, 0x3d, 0x7d, 0x78, 0x68, 0xee, 0x84, 0x87, 0x91, 0x96, 0x02,
-  0x7c, 0xc2, 0xf0, 0x9f, 0x3d, 0x3c, 0x54, 0xbf, 0x5c, 0x03, 0x2d, 0x24,
-  0xce, 0x54, 0xe6, 0x79, 0xa3, 0x4c, 0x12, 0x0c, 0x65, 0xb5, 0xe2, 0x96,
-  0x75, 0x14, 0x01, 0xf5, 0x3e, 0x46, 0xe4, 0x79, 0xd3, 0xdb, 0x0e, 0xa9,
-  0xdb, 0x55, 0x8a, 0xb2, 0x4c, 0x37, 0x4e, 0x3e, 0xbf, 0xa1, 0x13, 0x29,
-  0x80, 0xc0, 0x4a, 0xf1, 0xda, 0xa0, 0x95, 0xed, 0x6a, 0x59, 0x27, 0xee,
-  0x45, 0x96, 0x3d, 0x05, 0xf2, 0x6e, 0x99, 0x4e, 0xf9, 0x35, 0xe0, 0xd0,
-  0x52, 0x0b, 0xbb, 0xb4, 0xfc, 0xe9, 0x7c, 0x59, 0x26, 0x85, 0xab, 0x19,
-  0x1f, 0xd4, 0x5b, 0x6c, 0x5b, 0xf6, 0x29, 0x30, 0xb3, 0x24, 0x24, 0xaa,
-  0x5e, 0xd4, 0x4e, 0xc7, 0xa5, 0xb0, 0x23, 0x8a, 0xb6, 0xa4, 0x24, 0xdb,
-  0xc7, 0xab, 0x6d, 0x87, 0xd9, 0x05, 0x47, 0xeb, 0xf5, 0x94, 0x3c, 0xd0,
-  0x6a, 0x4b, 0x94, 0x74, 0x84, 0x28, 0x07, 0x92, 0xb0, 0x99, 0x73, 0x5d,
-  0x67, 0x39, 0x6d, 0xea, 0x6c, 0x10, 0x64, 0xaf, 0x36, 0x22, 0x6d, 0xa5,
-  0x2b, 0x87, 0x77, 0xc9, 0xa5, 0x74, 0x1c, 0x4c, 0x74, 0x99, 0x95, 0x2a,
-  0x1c, 0x68, 0x3c, 0xb7, 0x32, 0x9b, 0xc8, 0x8d, 0xfb, 0xb1, 0xcc, 0x94,
-  0xbd, 0xf0, 0x18, 0x06, 0x27, 0xae, 0xac, 0x24, 0xac, 0x7b, 0x85, 0xd7,
-  0x59, 0xf7, 0x1f, 0x29, 0x20, 0xdc, 0x58, 0xdc, 0x31, 0x33, 0xac, 0xb0,
-  0x82, 0x70, 0xed, 0xdc, 0xcb, 0x22, 0x3e, 0x02, 0xe3, 0x69, 0x58, 0xe7,
-  0xc5, 0x34, 0x49, 0x16, 0x32, 0x36, 0x87, 0x8e, 0x6d, 0x05, 0xa4, 0xe5,
-  0xa4, 0x22, 0x15, 0x45, 0x89, 0x54, 0x65, 0xce, 0x75, 0x1c, 0x20, 0x82,
-  0x2f, 0x0b, 0x6e, 0x1d, 0xab, 0xee, 0xd8, 0xce, 0x69, 0x36, 0x45, 0x64,
-  0xb7, 0xa4, 0xcd, 0x35, 0xe5, 0xde, 0x6c, 0x4b, 0x31, 0x1c, 0xb7, 0xad,
-  0x8e, 0xa8, 0x74, 0x33, 0x6a, 0xd5, 0x9f, 0x9b, 0xa5, 0x53, 0xa4, 0xd8,
-  0x03, 0xc4, 0xb3, 0x44, 0x4a, 0x47, 0xa0, 0x0a, 0xb4, 0xcc, 0x08, 0x71,
-  0x0b, 0x8a, 0xea, 0x36, 0x70, 0xbc, 0x47, 0x8a, 0x02, 0x61, 0x09, 0x1b,
-  0xbc, 0x18, 0x49, 0x35, 0x35, 0xc4, 0x78, 0xd3, 0xa0, 0x5c, 0x14, 0x9d,
-  0xa3, 0x46, 0x1e, 0xfb, 0xc0, 0x93, 0x48, 0xb3, 0xce, 0xc8, 0xbf, 0x8b,
-  0x62, 0xb4, 0x0a, 0x58, 0xf1, 0x28, 0xd5, 0x7c, 0x10, 0xff, 0xf5, 0x52,
-  0x0f, 0xaf, 0x5c, 0x62, 0x7a, 0x65, 0xb0, 0x56, 0x1b, 0x3a, 0x26, 0x23,
-  0x65, 0x5c, 0x01, 0x5d, 0xa8, 0xd4, 0xd8, 0x30, 0x62, 0x28, 0x7f, 0x32,
-  0x3e, 0x82, 0x9c, 0xed, 0x98, 0xa5, 0x74, 0x2e, 0xc6, 0xba, 0xc9, 0x20,
-  0x0c, 0x3a, 0xb4, 0x2d, 0xfe, 0x18, 0xa0, 0x7b, 0xea, 0xb0, 0x47, 0xff,
-  0x8d, 0x14, 0x62, 0xa0, 0x6c, 0x0a, 0xcf, 0x9a, 0xb4, 0xa0, 0xe4, 0xbe,
-  0xcd, 0x38, 0x7a, 0x4a, 0xc5, 0xce, 0x2b, 0xdf, 0x8e, 0xbe, 0xd9, 0xc4,
-  0xd2, 0x44, 0x3b, 0x96, 0x26, 0x46, 0x4d, 0xf4, 0x2a, 0x28, 0xee, 0x36,
-  0x6c, 0xc4, 0xfd, 0xc1, 0xb7, 0x2a, 0xb1, 0x52, 0x72, 0x51, 0xb6, 0x78,
-  0xc2, 0xc0, 0xda, 0xd9, 0x83, 0x0a, 0x07, 0x34, 0x4f, 0xa7, 0x05, 0xd1,
-  0x17, 0x1b, 0x40, 0x6d, 0xa4, 0x0c, 0x17, 0x78, 0x69, 0x8c, 0xa9, 0x99,
-  0xac, 0xa7, 0x79, 0xf1, 0x3a, 0x18, 0x0e, 0x5f, 0xf2, 0xd5, 0x93, 0x52,
-  0x46, 0x9a, 0x11, 0xf1, 0xb2, 0x02, 0xec, 0x3b, 0x90, 0x7a, 0x19, 0x65,
-  0x13, 0x6b, 0xcf, 0xe7, 0xf2, 0x83, 0xc0, 0x4b, 0xd1, 0x46, 0x0d, 0xef,
-  0xd6, 0x31, 0xec, 0x8f, 0x61, 0x75, 0x35, 0x95, 0x6b, 0x1d, 0xd5, 0xea,
-  0xb2, 0x32, 0xdd, 0xfe, 0xf3, 0x84, 0x5b, 0x70, 0x09, 0x1d, 0x2e, 0x42,
-  0x5a, 0xdf, 0xbc, 0x21, 0x3e, 0x14, 0x4b, 0xda, 0xdf, 0x96, 0x29, 0x93,
-  0xa8, 0x44, 0xd5, 0x1d, 0xa1, 0x14, 0x41, 0xa1, 0x09, 0x16, 0xd7, 0x10,
-  0xf9, 0x34, 0xe6, 0x23, 0x77, 0x92, 0x41, 0x03, 0x92, 0x19, 0x68, 0x62,
-  0x03, 0x43, 0xce, 0x05, 0xe8, 0xeb, 0x6c, 0x19, 0xe2, 0x07, 0xf6, 0x87,
-  0x3c, 0x12, 0x6a, 0xb5, 0x8f, 0x36, 0xda, 0xee, 0x7e, 0x8f, 0x5b, 0xdb,
-  0x97, 0x42, 0x4b, 0x5e, 0x9e, 0xc1, 0x70, 0x20, 0x77, 0xc8, 0x08, 0x0c,
-  0xc0, 0x4c, 0xb0, 0x93, 0x1a, 0xe5, 0x14, 0x98, 0xc3, 0x56, 0xa2, 0xf9,
-  0x8b, 0x6c, 0x7c, 0x5b, 0x3c, 0x15, 0x7d, 0xe7, 0x91, 0xb8, 0xe9, 0x40,
-  0xbc, 0x66, 0xcf, 0xeb, 0xd9, 0xe1, 0x37, 0xc3, 0xa7, 0x1f, 0x0c, 0x98,
-  0x5e, 0x5f, 0xe1, 0xf8, 0xd1, 0x90, 0xe9, 0x47, 0x4a, 0x8a, 0xb4, 0x08,
-  0xc9, 0x5c, 0x5c, 0x29, 0xa7, 0x4b, 0xad, 0x40, 0x50, 0x01, 0x6b, 0x3a,
-  0x69, 0xb6, 0x74, 0xa8, 0x65, 0x91, 0x8f, 0x1c, 0xee, 0x39, 0xc0, 0xc3,
-  0x55, 0x23, 0x8b, 0x32, 0xe1, 0x3d, 0x11, 0x0c, 0xc3, 0xe4, 0x61, 0x3c,
-  0x5d, 0x16, 0xe9, 0xdd, 0x6f, 0x5a, 0xcc, 0x5e, 0x56, 0x3d, 0xfe, 0xa7,
-  0x96, 0x3d, 0xfe, 0xb8, 0x75, 0x6f, 0x30, 0x91, 0x5f, 0xb8, 0xee, 0x9f,
-  0xb5, 0x40, 0x8f, 0xfd, 0xdf, 0xb1, 0xee, 0xcf, 0xfa, 0x0e, 0x42, 0xeb,
-  0xe5, 0x2f, 0x4d, 0x17, 0xc0, 0x16, 0x3c, 0xd3, 0xf0, 0xea, 0x4d, 0xa8,
-  0xae, 0x49, 0x18, 0x71, 0x6d, 0xf6, 0x83, 0x76, 0x1c, 0x2f, 0xa8, 0x69,
-  0x5b, 0x1f, 0x3c, 0x31, 0x6e, 0xa7, 0x24, 0x36, 0x43, 0xf6, 0xaa, 0xbe,
-  0x76, 0xff, 0xc4, 0xce, 0x39, 0x89, 0xc0, 0xef, 0x5d, 0xeb, 0xe6, 0x85,
-  0x7b, 0x27, 0x97, 0xe6, 0xff, 0xd4, 0xce, 0xd5, 0xa4, 0xe5, 0xea, 0x2c,
-  0x50, 0x44, 0xc4, 0xc6, 0x2e, 0x65, 0xab, 0xe9, 0x5e, 0x9c, 0xa2, 0x92,
-  0x94, 0xc3, 0xaa, 0x72, 0x41, 0x74, 0x4d, 0xe4, 0x46, 0x25, 0x87, 0x4a,
-  0x95, 0x62, 0xdd, 0x0d, 0x57, 0x34, 0x6f, 0xab, 0x41, 0x3c, 0xff, 0xcc,
-  0x99, 0x35, 0x82, 0xe1, 0xe8, 0x58, 0x00, 0xa9, 0x19, 0x99, 0x08, 0x7d,
-  0x79, 0x15, 0xbe, 0xcd, 0x76, 0x05, 0x60, 0x57, 0xab, 0x90, 0xf4, 0x41,
-  0x92, 0xa9, 0x1c, 0xee, 0x16, 0x18, 0xdb, 0x75, 0x59, 0x29, 0xff, 0x47,
-  0x1e, 0xec, 0x36, 0xf2, 0xb0, 0xc4, 0x90, 0x8f, 0x26, 0x0e, 0x17, 0xce,
-  0xf9, 0x2f, 0x91, 0x47, 0xdb, 0x39, 0xdb, 0xd4, 0x18, 0x55, 0x5e, 0x26,
-  0xe3, 0xf9, 0x5b, 0xbe, 0x64, 0x28, 0x90, 0x65, 0x71, 0xab, 0x9f, 0x9c,
-  0x7f, 0xfb, 0x1c, 0x0e, 0xbd, 0x61, 0x13, 0x18, 0xea, 0xf4, 0xe8, 0xe0,
-  0xbc, 0x85, 0x85, 0x5d, 0xd3, 0x2d, 0xbf, 0x48, 0xfb, 0xec, 0x03, 0x60,
-  0xc1, 0xf4, 0xa5, 0xfe, 0xc2, 0x44, 0xd4, 0x26, 0x7a, 0x9b, 0x7e, 0x61,
-  0xcf, 0x83, 0xfb, 0x29, 0xa6, 0x0c, 0x66, 0xa9, 0x2e, 0x1c, 0x16, 0xcb,
-  0xc7, 0xb3, 0xc9, 0xb6, 0xfc, 0xd9, 0xbf, 0xfa, 0xdb, 0x64, 0x3e, 0x78,
-  0x84, 0x56, 0xe2, 0x4a, 0x02, 0x87, 0x16, 0x51, 0x4a, 0x9b, 0x39, 0xe3,
-  0xae, 0xb6, 0x63, 0xdd, 0x3d, 0xe5, 0x4e, 0x55, 0xa4, 0xe9, 0x68, 0x80,
-  0x1f, 0x5a, 0x37, 0x4b, 0xfe, 0x74, 0x12, 0x29, 0xb0, 0x61, 0xd4, 0x4c,
-  0xfa, 0xc1, 0xf7, 0xdb, 0xbe, 0xa5, 0x7f, 0xad, 0x37, 0x6b, 0x8f, 0x43,
-  0xaf, 0xdb, 0x9a, 0x93, 0x51, 0x88, 0xac, 0x5c, 0x7b, 0x52, 0xb4, 0x7e,
-  0x29, 0xdc, 0x8a, 0x0a, 0xbf, 0xfe, 0x8a, 0xe8, 0x2b, 0x2e, 0x67, 0x03,
-  0x92, 0x43, 0x60, 0xd7, 0xcb, 0xb1, 0x65, 0x67, 0xa5, 0xf3, 0xf1, 0x22,
-  0x16, 0x00, 0x87, 0xfa, 0x16, 0x3c, 0x8e, 0xb1, 0x58, 0x9d, 0xcd, 0x3c,
-  0xa9, 0xc7, 0x1c, 0x1f, 0x14, 0x15, 0x34, 0x29, 0x79, 0x2e, 0xb2, 0xac,
-  0x43, 0x6c, 0x2b, 0x2c, 0xa8, 0x5a, 0xfe, 0x0d, 0xd1, 0x5a, 0xb8, 0x89,
-  0xe4, 0x91, 0x06, 0x06, 0x45, 0xe9, 0x40, 0x38, 0xa3, 0xfc, 0x6a, 0xbc,
-  0xfb, 0xe2, 0xf9, 0x2e, 0x4b, 0xbd, 0xab, 0x42, 0xa0, 0xda, 0x0a, 0x6d,
-  0xe6, 0xe9, 0xe0, 0xc9, 0xf6, 0xd3, 0xc1, 0xd3, 0xc8, 0xd7, 0x27, 0x18,
-  0x25, 0xad, 0x69, 0xe9, 0xc9, 0x18, 0x90, 0x16, 0x23, 0x3d, 0x72, 0x6f,
-  0x8f, 0x0f, 0xad, 0x72, 0x32, 0x12, 0xb5, 0xab, 0xd0, 0xac, 0x5a, 0xd9,
-  0x97, 0x17, 0x4f, 0xca, 0x81, 0xb4, 0x23, 0xdb, 0xb7, 0x2e, 0x8b, 0xcf,
-  0xb9, 0x47, 0xe8, 0xd6, 0x5c, 0xe7, 0x4c, 0xeb, 0x4a, 0x2c, 0xeb, 0x46,
-  0x4b, 0x00, 0xb6, 0x44, 0xa3, 0xd6, 0xd7, 0x26, 0x58, 0xb9, 0xc1, 0x07,
-  0x76, 0xa6, 0x9c, 0x10, 0x6f, 0x6d, 0x0f, 0x9c, 0xb8, 0x70, 0x15, 0xbf,
-  0x88, 0x61, 0x70, 0x55, 0x63, 0x2d, 0x35, 0x24, 0xaf, 0x58, 0xcc, 0x64,
-  0x25, 0x9a, 0xce, 0xfc, 0x3d, 0x6b, 0xc3, 0x66, 0x03, 0x48, 0x2f, 0x81,
-  0xb4, 0x44, 0x81, 0x89, 0x6e, 0xbf, 0x6b, 0x57, 0x85, 0x39, 0x8c, 0x82,
-  0x2a, 0xca, 0x86, 0x7a, 0xb6, 0xfe, 0xd0, 0x6b, 0x61, 0x1a, 0x44, 0x76,
-  0x89, 0x5d, 0x87, 0x1d, 0x85, 0x0e, 0x0a, 0x90, 0x38, 0xca, 0x0d, 0x33,
-  0x3d, 0xb5, 0xe2, 0x4c, 0x92, 0x71, 0x53, 0xc7, 0x72, 0x60, 0x37, 0xf4,
-  0xfc, 0x38, 0x5e, 0xc4, 0xa3, 0x74, 0x9a, 0x96, 0x69, 0x4b, 0x88, 0xea,
-  0xaf, 0x28, 0xfb, 0x95, 0xe3, 0x45, 0x7f, 0x9e, 0xb5, 0xd9, 0x08, 0x2f,
-  0xb9, 0xf4, 0x4f, 0x00, 0xf8, 0xfc, 0xfe, 0xed, 0xd9, 0xd1, 0xf1, 0xe9,
-  0xc1, 0x0f, 0x16, 0xf9, 0xe1, 0xc2, 0xef, 0x51, 0x3f, 0x39, 0x89, 0x8b,
-  0xd5, 0xfb, 0x22, 0x29, 0xe9, 0xcb, 0xcd, 0x27, 0x5b, 0x6c, 0x85, 0xaf,
-  0x5f, 0xb3, 0xac, 0x7e, 0x85, 0xf5, 0x40, 0xd4, 0x60, 0xeb, 0xe7, 0x51,
-  0x23, 0x93, 0xdd, 0x8a, 0xb3, 0xad, 0xa4, 0xfb, 0xb5, 0x4c, 0xa6, 0xf3,
-  0xa4, 0xd4, 0xe2, 0x0f, 0xd1, 0xcb, 0xb3, 0xf3, 0xcb, 0x57, 0x77, 0xf1,
-  0xb4, 0xe1, 0x82, 0x62, 0xc8, 0x2d, 0x79, 0xa6, 0x30, 0x0a, 0x91, 0x37,
-  0x83, 0x30, 0xde, 0xa1, 0x8b, 0x97, 0xb5, 0x27, 0xdb, 0x00, 0x5b, 0x2e,
-  0x2f, 0x7f, 0x38, 0x3f, 0x7e, 0xf5, 0x92, 0x55, 0xe6, 0xcf, 0x59, 0xd1,
-  0x57, 0x53, 0x09, 0x34, 0x68, 0x5e, 0xe7, 0xd5, 0xa2, 0x79, 0x7d, 0x7f,
-  0x7f, 0x74, 0x32, 0x3c, 0x3f, 0x3d, 0x3b, 0x7c, 0xf5, 0xf2, 0x7b, 0x36,
-  0xb0, 0x72, 0x51, 0x99, 0xe0, 0x5d, 0xf7, 0x99, 0x8b, 0x05, 0x6c, 0xa2,
-  0x61, 0x1f, 0x7f, 0xf7, 0xfe, 0xf8, 0xed, 0xb7, 0xaf, 0x5e, 0xde, 0xc5,
-  0x79, 0x8f, 0xe7, 0x27, 0x6f, 0x73, 0x52, 0x7f, 0x4b, 0xed, 0x91, 0xca,
-  0x5e, 0x72, 0xfe, 0xcd, 0x68, 0x7a, 0x2b, 0x75, 0xa8, 0x50, 0xfc, 0xa9,
-  0x11, 0x84, 0x73, 0x89, 0x5c, 0x05, 0x36, 0x5a, 0xf0, 0x6f, 0xd1, 0x97,
-  0xa7, 0xdf, 0xb0, 0x8b, 0xd7, 0xdd, 0xcd, 0x88, 0xf4, 0x26, 0x32, 0xf9,
-  0xfc, 0xd9, 0xee, 0xde, 0x56, 0x50, 0x56, 0x86, 0x03, 0x45, 0x68, 0xc4,
-  0xb7, 0x0d, 0xa3, 0xc9, 0xcf, 0x86, 0xba, 0xec, 0x01, 0xdf, 0x61, 0xce,
-  0x92, 0x5c, 0x1f, 0x01, 0x57, 0xcf, 0xe3, 0x39, 0x17, 0x13, 0x45, 0x98,
-  0x1e, 0x47, 0x27, 0x95, 0x40, 0xd1, 0xe1, 0x20, 0x8e, 0x46, 0x2e, 0xfa,
-  0xa5, 0x8f, 0xe8, 0x1e, 0xb0, 0x31, 0xdb, 0x6e, 0x68, 0x1a, 0x8e, 0xc6,
-  0x7e, 0xb4, 0x13, 0xf2, 0xaf, 0x7d, 0x30, 0xda, 0x81, 0x20, 0x42, 0x68,
-  0xb7, 0x4b, 0xae, 0x50, 0xb0, 0x60, 0xf7, 0xfd, 0x23, 0x71, 0x5f, 0x58,
-  0x3f, 0x8f, 0xf5, 0x5d, 0x65, 0x56, 0x81, 0x0f, 0x56, 0xc9, 0xd4, 0xa1,
-  0x0e, 0xbe, 0xbb, 0x38, 0x5d, 0xc3, 0xbe, 0x72, 0x2d, 0xab, 0x15, 0xe0,
-  0x1f, 0x6a, 0x1c, 0x88, 0x6f, 0x18, 0x58, 0x83, 0x87, 0x6e, 0x3f, 0x62,
-  0xab, 0x41, 0xff, 0x88, 0x13, 0x58, 0x32, 0x4f, 0x11, 0xd0, 0xe2, 0x6a,
-  0x4f, 0x81, 0x16, 0x04, 0x79, 0x9a, 0xa6, 0x90, 0x22, 0x11, 0x7d, 0xdb,
-  0x18, 0x02, 0xaf, 0xdf, 0xc6, 0x9a, 0x60, 0xd0, 0x48, 0xdc, 0x30, 0x8a,
-  0xa7, 0x94, 0x09, 0xfa, 0x3a, 0xc6, 0x63, 0x99, 0xb8, 0xd5, 0x59, 0x28,
-  0x1a, 0xd3, 0x46, 0x0b, 0x9c, 0xa7, 0x10, 0xd4, 0x0d, 0xc7, 0xe8, 0x95,
-  0xae, 0x2a, 0x3d, 0xf6, 0xae, 0x1a, 0x85, 0x69, 0x44, 0x1a, 0x78, 0xc5,
-  0xeb, 0x82, 0x84, 0xc6, 0xda, 0xf9, 0xc4, 0x2c, 0x31, 0x3a, 0xb3, 0x96,
-  0xc1, 0x21, 0xfd, 0xd3, 0x55, 0x10, 0xba, 0x23, 0x1b, 0x1b, 0xa4, 0x45,
-  0x34, 0xcc, 0xd6, 0x6c, 0x32, 0x1a, 0x38, 0x7a, 0x33, 0x42, 0x83, 0x94,
-  0xc0, 0xfe, 0xab, 0xcd, 0xe1, 0x96, 0x92, 0xb1, 0x90, 0xdb, 0xf9, 0x3b,
-  0x9f, 0xe8, 0xd6, 0x56, 0x81, 0x6d, 0x1d, 0x01, 0x3a, 0x75, 0xdb, 0x2f,
-  0x54, 0xa7, 0xdf, 0x61, 0x20, 0x4f, 0xb5, 0x57, 0x02, 0xc6, 0xd3, 0x8e,
-  0x1b, 0xdd, 0x52, 0x5c, 0x2a, 0xc9, 0x27, 0xd2, 0xc5, 0xad, 0x58, 0x94,
-  0x12, 0x73, 0x1e, 0x1d, 0xa8, 0x4f, 0x3a, 0x41, 0x0d, 0xeb, 0x6a, 0x1f,
-  0x83, 0x4e, 0x54, 0x41, 0x0b, 0x15, 0xfb, 0xe9, 0x56, 0x03, 0x57, 0x77,
-  0x85, 0xa1, 0x87, 0xb6, 0x80, 0x30, 0x27, 0x9c, 0x87, 0x5a, 0x1b, 0x1a,
-  0x82, 0x8c, 0xc0, 0x4a, 0x9a, 0x98, 0x08, 0x90, 0x1b, 0x90, 0x8e, 0x2e,
-  0x85, 0x8b, 0x38, 0xdd, 0x0b, 0xae, 0x2c, 0x17, 0xc6, 0xa7, 0x15, 0x23,
-  0xc4, 0x2e, 0xac, 0x6d, 0x42, 0x08, 0x6b, 0xc3, 0xde, 0x91, 0x4d, 0x6c,
-  0x59, 0x54, 0xab, 0x64, 0x6a, 0x79, 0x37, 0xcc, 0x06, 0xfa, 0x97, 0x1e,
-  0x88, 0x92, 0x61, 0x24, 0x5b, 0x12, 0xd6, 0x14, 0xdc, 0xbc, 0x7f, 0xd9,
-  0x80, 0xf5, 0xe2, 0x17, 0x38, 0x7c, 0x21, 0x08, 0x27, 0x43, 0x08, 0x27,
-  0xcf, 0x5d, 0x28, 0x49, 0x83, 0x7f, 0x21, 0xf5, 0x0e, 0x84, 0xb4, 0xe1,
-  0x27, 0x59, 0x5b, 0x56, 0xa5, 0x73, 0x3d, 0xcd, 0x46, 0x23, 0x9a, 0x54,
-  0xc7, 0x24, 0x52, 0x1a, 0x61, 0x9c, 0x5f, 0x43, 0x49, 0xeb, 0x19, 0xe6,
-  0x9b, 0x3f, 0xac, 0x80, 0x0c, 0x46, 0x5f, 0xeb, 0xb2, 0x5d, 0xb4, 0x96,
-  0x5e, 0xe6, 0x31, 0xe0, 0x01, 0xe6, 0x1b, 0xd6, 0x65, 0x15, 0xaf, 0x3c,
-  0x3e, 0x8f, 0xac, 0xff, 0x3a, 0xc7, 0x2f, 0x57, 0x1c, 0x2f, 0xec, 0xae,
-  0x4f, 0x65, 0x3e, 0x60, 0x39, 0x8a, 0xe3, 0x9a, 0xb6, 0x24, 0x9c, 0xf0,
-  0x84, 0x69, 0x02, 0x9d, 0xbf, 0xf3, 0x28, 0x76, 0x7b, 0xfc, 0xef, 0xde,
-  0x3f, 0x3a, 0x86, 0xd6, 0xcb, 0x78, 0xe9, 0x32, 0xf8, 0x92, 0x11, 0x52,
-  0x0b, 0x83, 0x08, 0x6e, 0x41, 0x04, 0xe6, 0x90, 0x8d, 0xb5, 0xad, 0xa7,
-  0xb3, 0xeb, 0x1f, 0x77, 0xfb, 0xbb, 0x3b, 0x3b, 0x3b, 0x3f, 0x0d, 0x16,
-  0xbc, 0x74, 0x57, 0x68, 0x9e, 0xfe, 0x1d, 0x2c, 0xd2, 0x31, 0x87, 0x7d,
-  0xd1, 0x66, 0xa6, 0x31, 0x37, 0xbd, 0x2d, 0xfd, 0x6d, 0x87, 0xd7, 0x67,
-  0xce, 0x09, 0x6c, 0xad, 0x7c, 0xdc, 0x81, 0xb2, 0xd3, 0x91, 0xb8, 0x5a,
-  0x6a, 0x01, 0x07, 0x96, 0xbb, 0x27, 0x4b, 0x89, 0xc8, 0x91, 0x88, 0x25,
-  0x75, 0x13, 0xf3, 0x66, 0x13, 0xa9, 0x4a, 0x41, 0x3c, 0xbe, 0xf1, 0x7a,
-  0xad, 0xd5, 0xbb, 0xf1, 0x6d, 0x22, 0xc8, 0x56, 0x1c, 0x17, 0x12, 0x54,
-  0x30, 0xea, 0xb9, 0xe4, 0x18, 0x1c, 0x58, 0xa5, 0x7b, 0x39, 0xb7, 0x4d,
-  0xb0, 0x6d, 0x3e, 0x66, 0x24, 0x7d, 0xf2, 0xd7, 0xc6, 0xe5, 0x5c, 0xcd,
-  0x14, 0xab, 0xe0, 0x92, 0x48, 0x70, 0x46, 0x1d, 0xbd, 0xb7, 0x4d, 0x41,
-  0xf7, 0xa6, 0x8e, 0xd0, 0xcc, 0x81, 0x84, 0x96, 0xfe, 0x9d, 0xc0, 0x7a,
-  0x8f, 0xb2, 0x02, 0xde, 0x7a, 0x5d, 0xb4, 0x86, 0xf2, 0x53, 0x8c, 0xd3,
-  0xf4, 0x37, 0x95, 0x5a, 0xd1, 0x2b, 0xba, 0x79, 0x7c, 0xc3, 0x62, 0xd9,
-  0x2e, 0xd9, 0xad, 0x70, 0xb3, 0xfc, 0x6e, 0x89, 0xb9, 0xc3, 0xed, 0xd7,
-  0xff, 0x41, 0x1b, 0xc6, 0x15, 0x3e, 0x1b, 0x15, 0xcf, 0x30, 0x55, 0x51,
-  0x14, 0xa7, 0x49, 0xcc, 0x81, 0xf5, 0x66, 0xa6, 0xb9, 0x49, 0x1e, 0x44,
-  0x60, 0x68, 0x42, 0x65, 0x88, 0x4f, 0x97, 0xbd, 0x26, 0xaa, 0xf7, 0x1d,
-  0x0c, 0x0f, 0x4f, 0x4e, 0x2a, 0x0a, 0x31, 0x2f, 0xde, 0x80, 0xa3, 0x83,
-  0xc4, 0xcd, 0x52, 0x70, 0x90, 0x14, 0x3b, 0x79, 0x30, 0xdc, 0x86, 0x9c,
-  0xc2, 0x61, 0x99, 0x48, 0xa1, 0x66, 0x14, 0xfe, 0xb8, 0x48, 0x2d, 0x0e,
-  0x36, 0x96, 0xfc, 0xc7, 0xe5, 0x9c, 0x25, 0x0a, 0x0e, 0x8c, 0xb9, 0x59,
-  0xd2, 0x91, 0x2c, 0x3e, 0xd2, 0xf4, 0xf6, 0xb1, 0xf4, 0xf8, 0xdb, 0x93,
-  0x5e, 0x4b, 0xc0, 0xdf, 0x79, 0xae, 0x71, 0x95, 0x12, 0xfa, 0x12, 0x49,
-  0xb4, 0x1e, 0x63, 0xf7, 0xf3, 0xad, 0x21, 0x14, 0x98, 0xa1, 0xa0, 0x16,
-  0x46, 0x8b, 0x2b, 0xc5, 0x40, 0xe4, 0x5a, 0xd0, 0xa6, 0x54, 0x4f, 0x28,
-  0xea, 0xb5, 0x23, 0x9e, 0x56, 0xa4, 0x50, 0xab, 0x93, 0x15, 0xbd, 0xe4,
-  0x7f, 0xf7, 0xad, 0x48, 0xd5, 0xba, 0xf2, 0xb3, 0x2e, 0x1b, 0xab, 0x59,
-  0xd6, 0x2a, 0x04, 0xb7, 0x96, 0xeb, 0xf6, 0xf1, 0x82, 0x06, 0x83, 0xe8,
-  0xcc, 0xed, 0x8b, 0x2f, 0x8c, 0x89, 0x36, 0xeb, 0x55, 0xfa, 0xd6, 0x15,
-  0x37, 0x40, 0x0a, 0xee, 0x75, 0xaa, 0x84, 0xef, 0xc7, 0xb5, 0x69, 0xc6,
-  0x45, 0xb6, 0x47, 0xe6, 0xa2, 0x3d, 0xd3, 0x4d, 0x3c, 0xcd, 0xe6, 0x5b,
-  0xad, 0x4b, 0x85, 0xad, 0x22, 0x41, 0x93, 0xe3, 0x28, 0xc5, 0x7a, 0xe7,
-  0x0a, 0x63, 0xb6, 0xc5, 0x01, 0x20, 0xf8, 0x05, 0x72, 0x2d, 0x97, 0xb5,
-  0x39, 0x3f, 0xe9, 0x6b, 0x28, 0xb0, 0x56, 0x9f, 0x90, 0x8c, 0x4f, 0x29,
-  0xee, 0x50, 0xc7, 0x76, 0x6a, 0x5b, 0x08, 0x1f, 0x99, 0x28, 0xc8, 0xe9,
-  0x15, 0xf8, 0xb7, 0xe5, 0xa2, 0x36, 0x37, 0x0d, 0x3d, 0xd4, 0xf1, 0xd5,
-  0x85, 0x4a, 0x24, 0xff, 0x0b, 0xce, 0x4b, 0xa8, 0xec, 0x8d, 0xb4, 0x12,
-  0xa4, 0x4b, 0x15, 0x56, 0x8b, 0x82, 0x5c, 0xe3, 0x58, 0x99, 0x36, 0x68,
-  0xaf, 0x80, 0xe4, 0xf7, 0x89, 0xe7, 0x2c, 0xa3, 0xfd, 0xce, 0x6f, 0x78,
-  0x32, 0xde, 0x99, 0x05, 0xfc, 0xd7, 0x27, 0xc8, 0x46, 0xa1, 0x8b, 0x56,
-  0x82, 0xfc, 0xff, 0xf7, 0xda, 0xef, 0xf5, 0xbb, 0xdf, 0x76, 0xaf, 0xfb,
-  0x3c, 0xef, 0x97, 0x24, 0xf4, 0xad, 0xdb, 0xd7, 0x18, 0x42, 0xa4, 0x15,
-  0xba, 0x68, 0x40, 0x16, 0x43, 0xed, 0xe2, 0x2b, 0xe7, 0x86, 0x96, 0xc8,
-  0xc5, 0x41, 0x35, 0x11, 0x62, 0x2c, 0xa6, 0xd4, 0x24, 0x75, 0x6a, 0x94,
-  0x03, 0x7d, 0x91, 0x94, 0x13, 0xc0, 0x37, 0x7c, 0xa0, 0x9a, 0x89, 0xa9,
-  0x29, 0xe2, 0xf0, 0xaa, 0x24, 0xd9, 0x4b, 0x0a, 0x38, 0x87, 0x85, 0x18,
-  0x88, 0x0a, 0x44, 0xf4, 0xb6, 0xc5, 0xe5, 0x09, 0x71, 0x92, 0x87, 0x18,
-  0x05, 0x7b, 0x2e, 0x48, 0x29, 0x2c, 0x20, 0xa2, 0x21, 0xb7, 0x1f, 0xa8,
-  0x89, 0xa0, 0x26, 0xa7, 0x60, 0x3d, 0x83, 0x6b, 0xac, 0xbd, 0xb4, 0xb0,
-  0x18, 0x2e, 0x79, 0x2d, 0x21, 0xa3, 0x00, 0x81, 0xd8, 0xae, 0x92, 0xed,
-  0x32, 0x9e, 0xde, 0x22, 0xb4, 0x78, 0x10, 0xbd, 0x91, 0x75, 0xf5, 0x85,
-  0x9f, 0x1b, 0xf1, 0x1f, 0xa3, 0xe5, 0xf5, 0x35, 0x10, 0x56, 0x0f, 0xe4,
-  0x06, 0x2a, 0x0c, 0x24, 0x05, 0x86, 0xc9, 0xee, 0xe7, 0x5d, 0x0d, 0xe4,
-  0xec, 0xdc, 0xd0, 0x65, 0x4d, 0x8b, 0xc4, 0xe2, 0x50, 0x47, 0xeb, 0xc1,
-  0x37, 0x32, 0x1d, 0x99, 0xfe, 0x7b, 0x51, 0xf7, 0x65, 0xfb, 0x4b, 0xa4,
-  0xa0, 0x27, 0xe9, 0x9d, 0xd6, 0x02, 0x72, 0xea, 0x3f, 0xad, 0xe1, 0x4d,
-  0x4a, 0x17, 0xda, 0xbc, 0x19, 0xbc, 0xa5, 0xc5, 0x05, 0xe1, 0x21, 0x90,
-  0xa0, 0xf6, 0xb8, 0x75, 0x90, 0x7f, 0xb4, 0xfe, 0x0c, 0x36, 0x19, 0x69,
-  0xc0, 0x57, 0x59, 0x03, 0x60, 0x42, 0x53, 0x00, 0xb5, 0xff, 0x47, 0x0b,
-  0xcf, 0xa5, 0xc6, 0x2d, 0x44, 0x16, 0x02, 0xe5, 0x29, 0xe6, 0x98, 0x4c,
-  0xaa, 0xf0, 0x45, 0x56, 0x54, 0xea, 0xa9, 0x4b, 0x89, 0xfd, 0x94, 0xb6,
-  0x51, 0x44, 0xc5, 0xc4, 0x8b, 0x3f, 0x1e, 0x32, 0xd5, 0x2c, 0xc2, 0x5c,
-  0x22, 0x57, 0x8b, 0xaa, 0xac, 0xbb, 0x1a, 0xcd, 0xe4, 0xe1, 0x4f, 0x4d,
-  0x51, 0xa2, 0xda, 0xa0, 0x56, 0x3e, 0xc6, 0xad, 0xc9, 0x0f, 0x5a, 0xd5,
-  0x4a, 0xb5, 0xaa, 0xf6, 0x9a, 0x48, 0x2a, 0x12, 0x99, 0x6e, 0x50, 0x3a,
-  0x4e, 0x0e, 0xa9, 0x0a, 0xd1, 0x66, 0x33, 0xff, 0x67, 0xe5, 0xb0, 0x4a,
-  0x63, 0x8f, 0x08, 0x62, 0x00, 0x38, 0x1c, 0xba, 0x20, 0x23, 0xc1, 0x55,
-  0xb7, 0xb0, 0x3f, 0xc4, 0x15, 0x05, 0xa7, 0x22, 0xa8, 0x21, 0xd4, 0xac,
-  0x56, 0x08, 0xe1, 0xa8, 0x52, 0xf5, 0x55, 0x0c, 0xca, 0xa2, 0x5b, 0x8b,
-  0xbd, 0xcb, 0x65, 0x59, 0x18, 0xa2, 0x7b, 0x0a, 0x83, 0x56, 0x31, 0x68,
-  0xab, 0xf8, 0xa1, 0x41, 0x76, 0x22, 0x96, 0xe9, 0x2e, 0x6a, 0x62, 0x1b,
-  0xab, 0x10, 0xd6, 0x04, 0x27, 0xa0, 0x80, 0xea, 0x5d, 0x06, 0x47, 0x53,
-  0x9a, 0x46, 0x31, 0xb3, 0x27, 0xf9, 0x04, 0x02, 0xf4, 0x4a, 0x0b, 0x28,
-  0xa5, 0xa8, 0x5c, 0x33, 0xbf, 0xb5, 0xa0, 0x25, 0xc9, 0xb9, 0x49, 0xc6,
-  0xcb, 0xb2, 0x6a, 0xc7, 0x0d, 0xc6, 0xa4, 0x31, 0xc9, 0x18, 0xd2, 0x26,
-  0xce, 0x80, 0x02, 0x90, 0x76, 0x1c, 0x4c, 0xfa, 0x7e, 0x67, 0xcb, 0xe4,
-  0x76, 0xa8, 0x35, 0xeb, 0x90, 0xb9, 0x41, 0xe4, 0x36, 0x64, 0x92, 0x54,
-  0x61, 0x64, 0x40, 0xc1, 0x3d, 0xa9, 0xe1, 0xd4, 0xd6, 0x3d, 0x91, 0x5f,
-  0xde, 0xda, 0xfb, 0x6b, 0xc9, 0xa1, 0x0a, 0x3a, 0x77, 0x49, 0x06, 0x9a,
-  0x5e, 0x55, 0xac, 0x01, 0x67, 0x09, 0x7a, 0xce, 0x38, 0xe4, 0x3f, 0x04,
-  0x4f, 0xb7, 0x57, 0x6d, 0xf1, 0xf7, 0x9b, 0x08, 0x60, 0x77, 0xcf, 0x03,
-  0xf3, 0x0d, 0x33, 0x60, 0x7c, 0xa4, 0xcb, 0x99, 0x36, 0xd5, 0x88, 0xdb,
-  0x7c, 0xf4, 0x94, 0x7e, 0x7c, 0xc3, 0x3f, 0xac, 0xf4, 0x39, 0xe3, 0xc5,
-  0x99, 0xf9, 0xa2, 0x09, 0xfe, 0xc1, 0xe5, 0x11, 0xe5, 0xdc, 0x0f, 0x41,
-  0x45, 0xaf, 0xf1, 0x4b, 0x9e, 0x3c, 0xf2, 0x0e, 0xcd, 0xed, 0x67, 0x76,
-  0x20, 0x2e, 0xcb, 0x8c, 0x29, 0x71, 0x8c, 0x64, 0xa5, 0x19, 0xa3, 0x0b,
-  0x3b, 0x82, 0xd1, 0x3f, 0xd5, 0x43, 0x55, 0xe0, 0x28, 0x29, 0x73, 0x49,
-  0xd7, 0xc0, 0x99, 0xad, 0xef, 0x4f, 0x8a, 0xbf, 0xb5, 0xc2, 0x8e, 0x3e,
-  0x3a, 0xb7, 0xc7, 0x4a, 0x48, 0x37, 0x70, 0x53, 0x6b, 0x0d, 0xf3, 0x52,
-  0xd0, 0x62, 0x3e, 0xfb, 0xb8, 0x55, 0x3c, 0xe2, 0x5b, 0xc6, 0x6e, 0x61,
-  0x87, 0xc7, 0xa7, 0x85, 0x8b, 0x45, 0xf2, 0xf2, 0x85, 0x8b, 0xf1, 0xb0,
-  0x4a, 0x08, 0x8a, 0x20, 0xde, 0x3e, 0x38, 0x5c, 0x7a, 0x88, 0xe7, 0x03,
-  0x73, 0xb9, 0x35, 0x53, 0xcb, 0x8c, 0x2e, 0xda, 0x7c, 0xe5, 0xaf, 0xb6,
-  0x88, 0xae, 0xc9, 0x81, 0x20, 0xb2, 0xa3, 0xf3, 0x35, 0x49, 0xec, 0x13,
-  0x12, 0x7b, 0xa6, 0x6c, 0xe1, 0x95, 0xf4, 0xbb, 0xdf, 0x35, 0x8a, 0xb1,
-  0x17, 0xab, 0xf9, 0xf8, 0xe6, 0xe8, 0xed, 0x70, 0x5d, 0x22, 0x7b, 0x5a,
-  0xb8, 0x68, 0x65, 0x0e, 0x2f, 0xe1, 0xa7, 0x49, 0x88, 0x63, 0xb6, 0x08,
-  0xe9, 0x4f, 0xa3, 0x59, 0x5a, 0x00, 0x66, 0xce, 0xdf, 0x1e, 0x7f, 0x75,
-  0x66, 0x3f, 0xd6, 0x2e, 0xf9, 0xa3, 0x2b, 0x7c, 0xca, 0x49, 0xea, 0x8f,
-  0xe5, 0xfb, 0xdb, 0xe0, 0x5c, 0x9d, 0x35, 0xef, 0x85, 0x20, 0x82, 0x9c,
-  0xf2, 0xeb, 0x42, 0x8b, 0x3d, 0x25, 0x49, 0x7c, 0x94, 0xaf, 0x43, 0x32,
-  0xa0, 0xe3, 0xb6, 0xf7, 0xd5, 0x97, 0xcd, 0xdb, 0xea, 0xe8, 0xed, 0x9a,
-  0xee, 0xf8, 0x9b, 0xbe, 0x25, 0xf1, 0xe9, 0x15, 0xad, 0xc5, 0x1d, 0x91,
-  0x95, 0xd3, 0x72, 0xf2, 0xce, 0x4f, 0xec, 0x47, 0x65, 0xea, 0x76, 0x25,
-  0xf2, 0x71, 0x17, 0x9a, 0x17, 0x8c, 0x12, 0xc0, 0xf3, 0x4c, 0x63, 0xba,
-  0x26, 0xa3, 0x96, 0x4a, 0xd1, 0x81, 0xd5, 0xdf, 0xa1, 0x3b, 0x8a, 0x37,
-  0xc4, 0xaf, 0xb2, 0x82, 0x8b, 0x5a, 0x51, 0x3a, 0xe4, 0x1f, 0x41, 0x7a,
-  0x6f, 0xb2, 0x74, 0xe7, 0xc4, 0xac, 0xeb, 0x95, 0xfd, 0x7b, 0xba, 0xa4,
-  0xe0, 0x98, 0x66, 0x19, 0x30, 0x7a, 0x29, 0xd7, 0xd1, 0xe7, 0x8d, 0x03,
-  0x21, 0xa8, 0x47, 0x66, 0x15, 0x36, 0x27, 0x20, 0xee, 0x75, 0x36, 0xf0,
-  0x38, 0xdc, 0x2c, 0x66, 0x15, 0xd3, 0x04, 0xf5, 0x04, 0x79, 0x9a, 0x82,
-  0xa2, 0xd5, 0x08, 0x16, 0x25, 0xd9, 0xce, 0x3b, 0x27, 0x2c, 0xcc, 0x40,
-  0xba, 0x8e, 0xb4, 0xcc, 0x67, 0x99, 0x3b, 0xfb, 0x30, 0xcb, 0xbf, 0x8a,
-  0x2e, 0x20, 0xce, 0xee, 0x46, 0x70, 0xc1, 0x03, 0x9b, 0x6b, 0x1e, 0xec,
-  0x66, 0xaa, 0x8a, 0xc8, 0xae, 0xee, 0x9a, 0xa4, 0xa2, 0x69, 0xc3, 0x41,
-  0xa2, 0x7c, 0x6b, 0x4c, 0x25, 0xa2, 0xa0, 0x3a, 0xf2, 0x70, 0x07, 0xd6,
-  0x31, 0xce, 0x33, 0x14, 0x03, 0x90, 0xe4, 0xec, 0x23, 0xb9, 0x7f, 0xbc,
-  0x64, 0xc3, 0x15, 0x1c, 0x0f, 0x28, 0xd1, 0xd8, 0xda, 0xdc, 0x8a, 0xef,
-  0xed, 0xce, 0x17, 0x66, 0x2e, 0xeb, 0x98, 0x35, 0xdd, 0x83, 0xf0, 0x69,
-  0x65, 0x9a, 0xd8, 0x82, 0xcb, 0x6d, 0x29, 0x5a, 0x7c, 0x8c, 0xe2, 0x34,
-  0x40, 0xc2, 0x1a, 0x4a, 0x93, 0x75, 0xbe, 0xe8, 0x77, 0x5a, 0x6f, 0xbf,
-  0xa0, 0xe0, 0x5c, 0xa4, 0x50, 0xf1, 0x66, 0xed, 0x36, 0xf3, 0x9e, 0xf4,
-  0x62, 0x3a, 0x12, 0x97, 0x94, 0x28, 0xd3, 0x72, 0x59, 0x36, 0xc2, 0x12,
-  0x15, 0xa5, 0x02, 0x1e, 0x59, 0xe8, 0x08, 0xbc, 0xe0, 0xde, 0x6b, 0x0a,
-  0x61, 0x8f, 0xcd, 0x81, 0x25, 0x22, 0x0b, 0xd5, 0xc6, 0x38, 0x02, 0x22,
-  0x08, 0x43, 0x5d, 0xd5, 0xc5, 0x95, 0x03, 0xbe, 0xe8, 0xfd, 0xe8, 0x70,
-  0x3b, 0x79, 0xc4, 0xd1, 0x22, 0xfa, 0xfd, 0xdf, 0xed, 0x4b, 0xc0, 0xb2,
-  0xfc, 0xc3, 0xd6, 0xcb, 0x8a, 0xc1, 0xb5, 0x4b, 0xdd, 0xbf, 0xf7, 0x36,
-  0x19, 0x59, 0x19, 0x64, 0xca, 0x72, 0x73, 0xbf, 0x77, 0x55, 0x72, 0x5d,
-  0x13, 0xd1, 0x3c, 0xb9, 0x17, 0x49, 0xa9, 0xa1, 0x13, 0x88, 0xa4, 0xf9,
-  0x17, 0xae, 0x0a, 0x4d, 0xaf, 0x90, 0xc4, 0xc8, 0x8e, 0x7f, 0x49, 0x84,
-  0x13, 0xf2, 0xfa, 0x4b, 0xae, 0xa2, 0x3d, 0x09, 0x3e, 0x34, 0x70, 0x96,
-  0x47, 0xe5, 0xf3, 0xa6, 0x14, 0xc2, 0x0e, 0xc9, 0x7d, 0xec, 0xc6, 0xef,
-  0xfb, 0x02, 0xb9, 0xa3, 0xd4, 0xcd, 0xd3, 0xa5, 0x31, 0xdb, 0x67, 0x56,
-  0x88, 0x78, 0xfe, 0x64, 0xaf, 0x1f, 0x28, 0xd3, 0xbd, 0x46, 0x5d, 0x4f,
-  0xf6, 0x3c, 0xb2, 0x9c, 0x14, 0xd4, 0x8a, 0x64, 0x1a, 0xff, 0x7d, 0xa4,
-  0xd5, 0xbf, 0xd8, 0x99, 0x25, 0x49, 0x5d, 0x13, 0xd3, 0x4a, 0x83, 0xe2,
-  0xf5, 0xad, 0x7a, 0x5c, 0x2b, 0xf1, 0x04, 0xbb, 0xe3, 0xe4, 0x1b, 0x83,
-  0x09, 0x90, 0x10, 0x91, 0xb6, 0x78, 0x03, 0x04, 0x52, 0x58, 0x81, 0x5d,
-  0x69, 0x08, 0x6a, 0x34, 0xbc, 0x95, 0x6c, 0x30, 0x96, 0x9a, 0x8b, 0x50,
-  0xcf, 0xbd, 0x73, 0x1e, 0x2e, 0x4c, 0xd6, 0x87, 0xfa, 0x8f, 0x17, 0xea,
-  0xd0, 0x1a, 0x41, 0x92, 0xae, 0xd9, 0x85, 0x57, 0x76, 0x3a, 0x09, 0xce,
-  0x8f, 0xd4, 0x5e, 0x8a, 0x5c, 0x64, 0xc2, 0xfe, 0xe3, 0xcd, 0xa9, 0x56,
-  0xd4, 0x98, 0x3e, 0xfb, 0x74, 0xde, 0x23, 0x9d, 0xcf, 0xad, 0x06, 0x31,
-  0x93, 0x24, 0x67, 0xc8, 0xb8, 0x5a, 0xbe, 0x9f, 0x9f, 0x18, 0x57, 0x22,
-  0xd0, 0x6d, 0x7c, 0xbc, 0x57, 0x58, 0x26, 0xb4, 0x5e, 0x10, 0xad, 0x84,
-  0xf9, 0x5a, 0x91, 0x97, 0x40, 0x72, 0x09, 0xd2, 0x80, 0xed, 0xaa, 0x6b,
-  0x83, 0xfc, 0x8d, 0x1a, 0xe9, 0x42, 0x9f, 0x71, 0xe9, 0x2a, 0x24, 0x43,
-  0x4c, 0xd3, 0xd8, 0xa3, 0x18, 0xc8, 0x14, 0x78, 0x70, 0x31, 0xac, 0xaf,
-  0x2c, 0x2b, 0x93, 0xa8, 0xfb, 0x78, 0x73, 0x0e, 0xcf, 0x95, 0xf5, 0x92,
-  0x75, 0x2b, 0x23, 0x00, 0xbd, 0xf5, 0x95, 0xa9, 0x2e, 0x88, 0xae, 0x88,
-  0xd7, 0x38, 0x5b, 0xfc, 0xed, 0xd1, 0x9a, 0x54, 0xca, 0x28, 0xda, 0x34,
-  0x14, 0x51, 0xb1, 0x9c, 0x6d, 0x29, 0xc8, 0xb7, 0xdd, 0x83, 0x0a, 0x9e,
-  0xfd, 0xa1, 0xe6, 0x90, 0x07, 0xd3, 0x48, 0x51, 0x79, 0xda, 0x88, 0xee,
-  0x64, 0x1b, 0xca, 0x7b, 0x49, 0xf2, 0x73, 0x9a, 0x83, 0x4b, 0xf9, 0x43,
-  0xa1, 0x12, 0xcd, 0x7e, 0xea, 0x79, 0x24, 0x6e, 0x71, 0xa2, 0xe1, 0x0a,
-  0xfb, 0x00, 0xd5, 0x42, 0x16, 0xe2, 0xd9, 0x27, 0x8a, 0x04, 0x06, 0xe3,
-  0xba, 0xcb, 0x70, 0x92, 0x8b, 0xd4, 0x6e, 0xae, 0x59, 0x3a, 0xfd, 0x40,
-  0x73, 0xd3, 0x54, 0x95, 0x2a, 0x88, 0x67, 0xcb, 0xd6, 0x03, 0x8c, 0x09,
-  0x31, 0xe7, 0x64, 0x45, 0x7d, 0xf9, 0x81, 0xd2, 0x3a, 0x36, 0xa4, 0xea,
-  0x44, 0x11, 0xa7, 0x5e, 0xd2, 0xeb, 0x66, 0xe8, 0x13, 0xf7, 0x6a, 0x19,
-  0xe7, 0x1f, 0xd8, 0x45, 0xc9, 0x14, 0x45, 0x54, 0xad, 0x17, 0x22, 0x61,
-  0xf9, 0x40, 0xf5, 0x16, 0x15, 0x0e, 0xda, 0x87, 0x5c, 0x25, 0x2d, 0xcb,
-  0x5a, 0xd2, 0x70, 0xc3, 0xfa, 0xb8, 0x5c, 0x4d, 0xa7, 0x5f, 0x34, 0x28,
-  0x06, 0xba, 0x75, 0xdd, 0x38, 0xf0, 0x32, 0x0b, 0x5b, 0x91, 0x90, 0xed,
-  0xcd, 0x2c, 0x7f, 0xbc, 0x39, 0x25, 0xca, 0x8f, 0x98, 0x51, 0xbc, 0x58,
-  0x68, 0x6f, 0x1f, 0xde, 0x84, 0xdf, 0x64, 0xbe, 0x5a, 0xa2, 0x91, 0x53,
-  0xf9, 0x23, 0x9b, 0xf8, 0x36, 0x1b, 0x2d, 0x8b, 0x1b, 0x41, 0x56, 0xc8,
-  0xa2, 0x0f, 0xf3, 0xac, 0xa0, 0xf8, 0x44, 0x6d, 0xd2, 0x8f, 0xd4, 0x8e,
-  0x0c, 0x97, 0x81, 0x71, 0x25, 0x95, 0xa7, 0xfd, 0x0f, 0xad, 0x83, 0x44,
-  0x29, 0x59, 0xfe, 0x21, 0x4f, 0x02, 0x82, 0x82, 0x4b, 0xba, 0xa6, 0xb3,
-  0x48, 0xaa, 0xd7, 0xe0, 0x43, 0xa3, 0x4b, 0x0b, 0x6f, 0x59, 0x89, 0xe1,
-  0xb4, 0x49, 0xfa, 0x75, 0xa0, 0x55, 0x01, 0xed, 0xe0, 0xf0, 0xd1, 0x0f,
-  0x72, 0x86, 0x58, 0x83, 0xfc, 0x50, 0xdc, 0x21, 0x0f, 0xa0, 0x0e, 0xd4,
-  0x19, 0x1b, 0x88, 0x98, 0x2d, 0x31, 0xb5, 0xf5, 0xe6, 0xd8, 0x6c, 0x22,
-  0xd6, 0xe5, 0x3b, 0x00, 0x3f, 0xb4, 0x93, 0xa4, 0x05, 0x69, 0xae, 0x3b,
-  0xf9, 0x80, 0x61, 0xe7, 0x75, 0xd6, 0xfc, 0xf1, 0xa0, 0x82, 0xe1, 0xe3,
-  0xfd, 0x13, 0x87, 0x5b, 0xb8, 0xe5, 0x91, 0xd3, 0x2f, 0xfc, 0xa7, 0xe7,
-  0x28, 0xaf, 0x07, 0x49, 0xf4, 0xe3, 0x48, 0x41, 0xea, 0x65, 0xb8, 0x8c,
-  0xd1, 0x5a, 0x3e, 0x29, 0xc2, 0x17, 0xf9, 0x4b, 0xad, 0xeb, 0x7a, 0x1f,
-  0x17, 0x1f, 0x1a, 0x5d, 0x2c, 0xda, 0x58, 0x75, 0x11, 0xc4, 0xfa, 0xa3,
-  0x91, 0x32, 0x20, 0xea, 0x48, 0x8c, 0x5a, 0x1f, 0xc3, 0xd5, 0x35, 0x27,
-  0x1c, 0xa9, 0xe0, 0x2e, 0x4c, 0x25, 0x58, 0xaf, 0x30, 0x3f, 0xf2, 0x83,
-  0xd7, 0x78, 0x5b, 0xf2, 0x24, 0xc6, 0x8a, 0x91, 0x7f, 0xfc, 0xf1, 0xf9,
-  0xd5, 0x79, 0x79, 0x80, 0x8d, 0x05, 0x48, 0xa9, 0xe6, 0xe1, 0x19, 0xe9,
-  0xd1, 0xfa, 0xc0, 0x9a, 0x71, 0x0c, 0xa5, 0x5c, 0x82, 0xe1, 0x31, 0xaa,
-  0x33, 0x08, 0xab, 0x7a, 0xd8, 0xcc, 0xd2, 0x6f, 0x91, 0x55, 0x74, 0x07,
-  0x2a, 0x68, 0xc2, 0x8c, 0xf1, 0x61, 0xc8, 0x71, 0x24, 0x98, 0xf0, 0xf1,
-  0x29, 0x93, 0x8f, 0x61, 0x72, 0x05, 0x6d, 0x61, 0x13, 0x61, 0x2f, 0xfd,
-  0x39, 0x79, 0x6f, 0x40, 0x47, 0xa1, 0x70, 0xe0, 0xd3, 0xe3, 0x25, 0xae,
-  0x53, 0x44, 0x1f, 0x96, 0xcf, 0xed, 0xe9, 0x96, 0x13, 0x88, 0xd6, 0x34,
-  0xa4, 0x2a, 0xfa, 0xb8, 0xd6, 0xd6, 0x46, 0x81, 0xa1, 0x2d, 0xf5, 0x57,
-  0x3c, 0xda, 0x96, 0x05, 0x40, 0xb8, 0x61, 0x41, 0xf4, 0xfd, 0xc0, 0x66,
-  0xb5, 0x49, 0xc6, 0xe8, 0xd1, 0x15, 0x2c, 0x51, 0x66, 0x2d, 0x72, 0xd3,
-  0xfa, 0xf1, 0x07, 0x7a, 0xe7, 0xe3, 0x3d, 0xc2, 0x9c, 0x68, 0x52, 0xdb,
-  0x46, 0xb3, 0x2c, 0x4f, 0x32, 0xf1, 0xfb, 0xc0, 0x5d, 0xc7, 0xec, 0xf5,
-  0x0b, 0x50, 0xa8, 0xe4, 0x99, 0x40, 0x2d, 0x25, 0x95, 0xa2, 0x58, 0xe6,
-  0x82, 0x58, 0xfd, 0x61, 0x52, 0x72, 0xe7, 0xdf, 0xda, 0xe3, 0xf8, 0x5d,
-  0x9e, 0xca, 0x82, 0x31, 0x6b, 0x70, 0x96, 0xd6, 0x8c, 0xca, 0xed, 0x27,
-  0x16, 0xc4, 0x86, 0x65, 0x91, 0x73, 0xbf, 0xd2, 0xa8, 0xa4, 0xb5, 0x8f,
-  0x18, 0x93, 0xa2, 0x4b, 0xbd, 0xe7, 0xe0, 0x6e, 0x1d, 0xd3, 0xa1, 0x7c,
-  0xd4, 0xbf, 0xe4, 0x8f, 0x94, 0x1a, 0x6c, 0xa5, 0xf9, 0xa4, 0x58, 0xee,
-  0x54, 0xaf, 0xa5, 0x74, 0x75, 0xd4, 0x16, 0xc1, 0x0b, 0xad, 0x62, 0xde,
-  0x84, 0xa3, 0x24, 0x6d, 0xc0, 0x84, 0x38, 0xae, 0xae, 0xfa, 0x56, 0x6c,
-  0x30, 0xdc, 0x25, 0xa9, 0xdb, 0x91, 0xfb, 0x06, 0xf9, 0xf1, 0xa9, 0xc1,
-  0x80, 0x8c, 0xe1, 0x47, 0xf9, 0x38, 0xfe, 0xf1, 0x11, 0x09, 0xe7, 0x3c,
-  0x06, 0xe3, 0xc1, 0x85, 0x1b, 0x03, 0x0d, 0xc1, 0x7f, 0x28, 0x0e, 0x33,
-  0x50, 0xa7, 0x2a, 0x8d, 0x89, 0x57, 0x55, 0xfe, 0x39, 0xad, 0xa2, 0x39,
-  0x0e, 0xeb, 0xee, 0x3d, 0x54, 0x16, 0xc9, 0xf8, 0x8e, 0x2b, 0x44, 0x8e,
-  0x65, 0x74, 0x35, 0x82, 0x98, 0x97, 0xf6, 0xc5, 0xe5, 0x8c, 0x21, 0x7d,
-  0x68, 0x1c, 0x3a, 0x19, 0x2d, 0x9c, 0x64, 0xfa, 0xba, 0xd6, 0x7a, 0xe2,
-  0xf4, 0x71, 0xa8, 0x84, 0x63, 0x4e, 0xd7, 0x63, 0x25, 0xfc, 0x03, 0x97,
-  0xad, 0x6b, 0x50, 0xf3, 0x9f, 0x00, 0x48, 0x20, 0x09, 0x60, 0x8d, 0x3c,
-  0xd4, 0x66, 0xe6, 0xf6, 0x15, 0xe9, 0x85, 0xc0, 0x3b, 0x7d, 0x0f, 0x58,
-  0x50, 0xa6, 0x39, 0xc3, 0xe9, 0xc7, 0x07, 0x66, 0x35, 0x17, 0x7c, 0xb6,
-  0xe5, 0x42, 0x8a, 0x3f, 0x32, 0x0e, 0x43, 0x06, 0x8b, 0xf7, 0x87, 0x8a,
-  0x7f, 0xb6, 0xd4, 0x1f, 0xb0, 0x18, 0xfb, 0x5a, 0x56, 0x79, 0x53, 0xbb,
-  0x2b, 0x8a, 0xe9, 0x7b, 0x7a, 0x32, 0xbd, 0x5a, 0xbd, 0x17, 0x16, 0xff,
-  0xe1, 0x2b, 0x54, 0x9e, 0xb3, 0x93, 0xc2, 0x2e, 0x15, 0x3a, 0xc3, 0x24,
-  0xdf, 0x25, 0x24, 0x8d, 0x5d, 0x89, 0xe1, 0x35, 0x42, 0x93, 0xe9, 0xf8,
-  0xa3, 0xb4, 0x3f, 0xa7, 0x15, 0xbb, 0x33, 0x37, 0x60, 0xf8, 0x22, 0x78,
-  0x80, 0x61, 0x57, 0xd3, 0xb6, 0x3e, 0x2c, 0x63, 0x71, 0x23, 0xbe, 0x32,
-  0xc1, 0x63, 0xe2, 0xf7, 0xaf, 0x17, 0x2b, 0xe1, 0x32, 0x43, 0x3f, 0xae,
-  0x16, 0x5b, 0x35, 0x94, 0xdf, 0x97, 0xfd, 0x5a, 0x97, 0x1f, 0x8d, 0x0c,
-  0xb9, 0x7f, 0x12, 0x53, 0xe0, 0xa3, 0xf3, 0xa1, 0x93, 0x87, 0x54, 0xa0,
-  0x5e, 0xda, 0x52, 0x50, 0x94, 0x21, 0x14, 0x49, 0xd9, 0x9e, 0x16, 0xf6,
-  0xb0, 0x72, 0x71, 0xf7, 0x32, 0x85, 0x9c, 0x8b, 0x03, 0xad, 0xc9, 0x67,
-  0x41, 0xa9, 0x23, 0x41, 0x4e, 0x8a, 0x37, 0x5a, 0xd4, 0x46, 0x1f, 0x81,
-  0x53, 0x48, 0x42, 0x8f, 0xb4, 0xde, 0x41, 0xa0, 0xb9, 0x8d, 0xb8, 0x2d,
-  0xd9, 0x32, 0xf4, 0xf5, 0xc7, 0xd3, 0xd0, 0x7e, 0x1e, 0x28, 0x10, 0x0a,
-  0x35, 0xc2, 0x91, 0xfc, 0x88, 0x80, 0x0b, 0xd6, 0xbf, 0x2d, 0xe6, 0x0c,
-  0x5c, 0x97, 0x94, 0x0c, 0x9a, 0xc0, 0x74, 0xa5, 0x58, 0xbd, 0x5c, 0xf9,
-  0x5c, 0xcc, 0x45, 0xfc, 0xae, 0x44, 0x4c, 0x82, 0x52, 0x2d, 0xd4, 0x8f,
-  0xbe, 0x6f, 0x9a, 0xe0, 0x1d, 0x36, 0x9b, 0x53, 0x61, 0x82, 0xe1, 0x49,
-  0x28, 0x41, 0xa3, 0x08, 0x8b, 0x33, 0x00, 0x36, 0xab, 0xf0, 0xe1, 0xea,
-  0xe3, 0xba, 0xb0, 0x8a, 0xcd, 0xc6, 0xeb, 0x55, 0x2f, 0x55, 0x66, 0x9b,
-  0x03, 0x9b, 0x33, 0x90, 0x62, 0x7c, 0x99, 0xd1, 0x7a, 0x60, 0x43, 0xad,
-  0x48, 0xdd, 0x3a, 0xcb, 0xa7, 0x2b, 0xb8, 0x23, 0x2d, 0x21, 0x5a, 0x71,
-  0xb7, 0x17, 0xd0, 0x01, 0x54, 0xe0, 0x06, 0xc6, 0xae, 0xab, 0xcd, 0xd4,
-  0x86, 0x11, 0x77, 0x1f, 0xaf, 0x0c, 0xa3, 0x46, 0xda, 0x68, 0x25, 0xc1,
-  0x5e, 0x10, 0xa2, 0x6b, 0xe5, 0xea, 0x5a, 0x4b, 0xfb, 0x5a, 0x09, 0x8f,
-  0x4d, 0x0d, 0x3d, 0xdf, 0x72, 0xb1, 0x02, 0x09, 0x9d, 0x28, 0x70, 0x03,
-  0xb8, 0x80, 0xfe, 0xf4, 0x68, 0x0c, 0xe1, 0xaf, 0xc4, 0x1a, 0xbe, 0x47,
-  0x98, 0x90, 0x5c, 0x66, 0x6b, 0x2b, 0xcc, 0x30, 0x19, 0x19, 0x76, 0x74,
-  0x0a, 0x27, 0xaa, 0x02, 0x2b, 0xda, 0x9b, 0x5a, 0xb2, 0x34, 0x4c, 0xb9,
-  0xfa, 0xc8, 0x42, 0x9b, 0xa0, 0x6e, 0x57, 0x71, 0xe2, 0xb2, 0xc2, 0x79,
-  0x9c, 0x9c, 0x2a, 0x48, 0x67, 0x6b, 0x6a, 0x69, 0x84, 0xd9, 0x1e, 0xb2,
-  0xf0, 0x3a, 0x1a, 0x0f, 0xa8, 0x28, 0xb5, 0x0a, 0x05, 0xe5, 0x4c, 0xd3,
-  0xb9, 0xe0, 0xff, 0xff, 0xea, 0xf8, 0x72, 0xab, 0x09, 0x60, 0x14, 0x4f,
-  0xfc, 0xc8, 0x00, 0xe7, 0xaa, 0xe7, 0x41, 0x7c, 0xa2, 0x50, 0x15, 0x2d,
-  0x81, 0x50, 0x14, 0x9d, 0xe4, 0x61, 0x31, 0x8d, 0xe7, 0x5a, 0x59, 0xb0,
-  0xd6, 0xdc, 0x21, 0x2d, 0x03, 0x73, 0xb2, 0x20, 0x4c, 0x48, 0xbd, 0xee,
-  0x06, 0x1b, 0xe9, 0x22, 0x3d, 0x22, 0xa4, 0xe8, 0x70, 0x8b, 0x47, 0xc7,
-  0xa7, 0xc7, 0x97, 0xc7, 0x88, 0xa0, 0x6e, 0x88, 0x24, 0x53, 0x14, 0x00,
-  0x2f, 0x93, 0xf1, 0xcd, 0x3c, 0xa3, 0xbb, 0x57, 0x42, 0x3a, 0xe8, 0xa6,
-  0xff, 0x2e, 0x19, 0x1d, 0x1d, 0x7c, 0x2b, 0x21, 0x0d, 0x45, 0x74, 0x7e,
-  0x71, 0x76, 0xfe, 0xfa, 0xe4, 0xed, 0x51, 0x2f, 0x3a, 0x3c, 0x3b, 0xff,
-  0xa1, 0x17, 0xbd, 0x39, 0xfb, 0xf6, 0xb8, 0xc5, 0xa7, 0xc8, 0xfe, 0xec,
-  0x66, 0xc6, 0xd9, 0xeb, 0x35, 0xbb, 0x1d, 0xa2, 0xb2, 0xea, 0x56, 0x07,
-  0x89, 0x3e, 0xa7, 0x27, 0xc3, 0x4b, 0x6c, 0x7d, 0x3d, 0xde, 0x0b, 0x31,
-  0xed, 0x52, 0x7c, 0x20, 0x2d, 0x2c, 0x80, 0x83, 0x2b, 0xe7, 0xfd, 0x76,
-  0x54, 0xbd, 0xe2, 0xf0, 0x1e, 0x96, 0xda, 0x15, 0xfb, 0x8a, 0xff, 0x6d,
-  0xc1, 0x4c, 0x8c, 0xbd, 0xe6, 0xc1, 0xfe, 0x5e, 0x2d, 0x78, 0x75, 0x23,
-  0x79, 0x39, 0xf4, 0xb2, 0xe0, 0x34, 0x8d, 0x6a, 0xf2, 0x7a, 0x34, 0x59,
-  0xe6, 0x4d, 0x89, 0x27, 0x8e, 0x82, 0x0e, 0x25, 0x57, 0xa9, 0x57, 0x51,
-  0xda, 0xd8, 0xfb, 0x58, 0xf8, 0xa2, 0x36, 0xd4, 0x7d, 0xf0, 0x42, 0xc3,
-  0xb1, 0x23, 0xa8, 0xad, 0x21, 0x02, 0x59, 0x38, 0x24, 0x9b, 0xf6, 0x2e,
-  0x29, 0xf8, 0x53, 0x86, 0x3b, 0xe2, 0x9b, 0x48, 0x70, 0x88, 0x7e, 0x78,
-  0x1c, 0xb9, 0x52, 0x42, 0x0c, 0x43, 0x5f, 0xbc, 0x30, 0x9f, 0xa5, 0x03,
-  0x87, 0xc5, 0x65, 0x1e, 0xc3, 0x05, 0x14, 0x61, 0x4d, 0x9a, 0xda, 0x89,
-  0x6a, 0x07, 0x12, 0xe4, 0x10, 0x24, 0xa0, 0x21, 0x22, 0x92, 0x6e, 0x17,
-  0x39, 0x25, 0xc4, 0xf5, 0x7b, 0x92, 0x89, 0x09, 0xd8, 0x76, 0x7d, 0xaf,
-  0xdf, 0x62, 0x20, 0x61, 0xc1, 0x79, 0x0d, 0x3f, 0xff, 0xf5, 0x68, 0xe2,
-  0x07, 0x47, 0x13, 0xb2, 0x86, 0x2f, 0xf1, 0xc7, 0x2f, 0xa2, 0x8a, 0x00,
-  0xd2, 0x4b, 0x74, 0xc2, 0x4d, 0x12, 0xdb, 0x2a, 0xe4, 0xd1, 0x6f, 0x64,
-  0x35, 0x4c, 0xb6, 0xd4, 0xbc, 0x14, 0xec, 0xb6, 0xda, 0x75, 0x58, 0x2e,
-  0xaa, 0x12, 0x45, 0x85, 0x22, 0x5a, 0xc4, 0x19, 0xd9, 0x62, 0x09, 0x17,
-  0x4e, 0x19, 0x8e, 0x9c, 0x6f, 0x57, 0x60, 0x8d, 0x24, 0xe5, 0x6f, 0xb8,
-  0x74, 0x3f, 0x73, 0xe6, 0x33, 0x3d, 0xde, 0x07, 0xf9, 0xbf, 0x9c, 0xb0,
-  0xf8, 0x4c, 0x4c, 0x4f, 0xc3, 0x8b, 0xd6, 0xa2, 0xec, 0x6f, 0x11, 0x33,
-  0x15, 0x0e, 0x1e, 0xab, 0xf5, 0x96, 0xc5, 0x0f, 0xce, 0x52, 0x1f, 0x31,
-  0xda, 0x9f, 0xd6, 0xae, 0x61, 0x5f, 0x62, 0x69, 0x2b, 0xdc, 0x72, 0xf3,
-  0x6b, 0xb5, 0x71, 0x05, 0x6f, 0xe4, 0xe3, 0x47, 0x8f, 0xbb, 0x6a, 0x4d,
-  0x6b, 0x9a, 0x54, 0x5b, 0x23, 0x7f, 0xdb, 0x42, 0x6f, 0xae, 0x4c, 0x41,
-  0x38, 0x0d, 0x13, 0x0a, 0x50, 0xcb, 0x08, 0x01, 0x24, 0xc4, 0xd4, 0xf0,
-  0x8c, 0x84, 0x10, 0x14, 0xdc, 0x65, 0x43, 0xb9, 0x66, 0xc3, 0x9c, 0x45,
-  0x44, 0x2a, 0x4a, 0x04, 0x82, 0x17, 0x3c, 0x78, 0x34, 0x8d, 0x52, 0x6d,
-  0xb2, 0x06, 0xbb, 0x6a, 0x40, 0xdd, 0x2d, 0x19, 0x1c, 0x1a, 0x98, 0xe0,
-  0x93, 0x24, 0x35, 0x8c, 0x5b, 0xf9, 0xec, 0xef, 0x14, 0x00, 0x53, 0x30,
-  0x7a, 0xd9, 0x57, 0x4b, 0x6d, 0xf1, 0x18, 0x39, 0xe1, 0x7d, 0x4d, 0xc6,
-  0xbb, 0xc0, 0xdf, 0xd6, 0x27, 0xab, 0x37, 0x58, 0xbb, 0xfc, 0x24, 0x7c,
-  0xa7, 0xf6, 0x86, 0x62, 0xc7, 0xa3, 0x36, 0xda, 0x66, 0x7f, 0xcb, 0xc5,
-  0x4d, 0x02, 0x52, 0x54, 0xb6, 0xb9, 0x69, 0x0f, 0x89, 0x9d, 0x65, 0xc2,
-  0x45, 0xde, 0x66, 0xd3, 0x89, 0x3f, 0x4f, 0x96, 0xad, 0xc4, 0x9d, 0x6d,
-  0x8b, 0xdd, 0xd3, 0x55, 0x66, 0x2d, 0x9a, 0xf2, 0x77, 0xa3, 0xb1, 0x79,
-  0x72, 0x1f, 0x36, 0xe6, 0x65, 0x07, 0xd7, 0xe0, 0x6f, 0x19, 0x82, 0xce,
-  0x18, 0x7c, 0xd0, 0xba, 0x8b, 0x56, 0x54, 0x5e, 0x4e, 0x71, 0x0f, 0x20,
-  0xfc, 0x4c, 0x63, 0x82, 0xa0, 0x12, 0xd8, 0x98, 0xfb, 0x62, 0x2d, 0x00,
-  0x89, 0x19, 0x3a, 0x69, 0x5b, 0xea, 0x75, 0xff, 0x94, 0x8e, 0xa1, 0xab,
-  0xdf, 0xa3, 0xe3, 0xae, 0x56, 0x5d, 0x0e, 0x81, 0x89, 0xa5, 0x70, 0xaf,
-  0xe0, 0x4b, 0xb7, 0xa5, 0xac, 0x80, 0xd4, 0x5c, 0xd7, 0x15, 0xa3, 0x77,
-  0xd4, 0xe1, 0xf0, 0xf6, 0x51, 0xb1, 0xcc, 0x27, 0xcb, 0x59, 0x27, 0xcc,
-  0x82, 0xd7, 0x85, 0x61, 0x06, 0x5a, 0x3f, 0x08, 0x72, 0x09, 0x51, 0xaf,
-  0xcf, 0x76, 0x6a, 0x16, 0x74, 0xc3, 0x27, 0x0c, 0x10, 0x09, 0xfb, 0xbb,
-  0x21, 0xfd, 0x50, 0x7b, 0x0d, 0x21, 0xb1, 0xe4, 0x7b, 0xed, 0x37, 0xdc,
-  0xbc, 0x1d, 0x5a, 0x4c, 0x16, 0xc0, 0x77, 0x07, 0x3b, 0xed, 0xe2, 0x2e,
-  0x47, 0xef, 0x8d, 0x13, 0x5f, 0x60, 0x3e, 0x25, 0xf5, 0x95, 0x47, 0x5b,
-  0x78, 0xc9, 0x4d, 0xe2, 0x32, 0x5c, 0x2d, 0x6e, 0x3d, 0xa4, 0xf5, 0x2b,
-  0xe0, 0xca, 0x55, 0xa4, 0x2e, 0x1c, 0x57, 0x40, 0x5a, 0x7a, 0x22, 0xe6,
-  0xf4, 0x7d, 0x27, 0x6a, 0x06, 0xc3, 0xdb, 0x65, 0x96, 0x3b, 0x2d, 0xee,
-  0x76, 0x5b, 0xcb, 0xb8, 0xd4, 0x86, 0xc6, 0x92, 0xd8, 0xe5, 0xe9, 0xd0,
-  0x05, 0x08, 0xef, 0x8a, 0x08, 0xee, 0xf0, 0x4f, 0x9c, 0x3a, 0xd4, 0x38,
-  0x50, 0x6a, 0x8e, 0xe1, 0x97, 0x55, 0x08, 0xf7, 0x43, 0xd8, 0xe3, 0x0b,
-  0xb3, 0x98, 0xde, 0xed, 0xb5, 0x0e, 0xc1, 0xc6, 0x50, 0x19, 0x04, 0x1b,
-  0x5a, 0x6c, 0x10, 0x7b, 0xcd, 0x41, 0x08, 0x0b, 0x69, 0x1f, 0x02, 0xbf,
-  0xda, 0x18, 0xc2, 0x13, 0x1d, 0xc2, 0x93, 0x8f, 0x5d, 0x85, 0x70, 0x00,
-  0x4f, 0x7e, 0xe9, 0x2a, 0xb4, 0x0e, 0xe1, 0x29, 0x07, 0xd4, 0x2f, 0xee,
-  0x9e, 0xb6, 0x64, 0xf6, 0x98, 0x4d, 0x0c, 0xac, 0x0a, 0x68, 0x29, 0x53,
-  0x29, 0x48, 0xeb, 0x5d, 0xe6, 0x5c, 0x8a, 0xd3, 0x61, 0xb7, 0x7b, 0x0f,
-  0xd3, 0x49, 0xbd, 0xea, 0xa6, 0x8e, 0xd9, 0x03, 0x5f, 0x0b, 0x0a, 0xcc,
-  0x95, 0xfe, 0xc2, 0x31, 0xc6, 0x7d, 0xed, 0xa1, 0x56, 0x68, 0x5d, 0x4a,
-  0x45, 0xaf, 0x89, 0x75, 0x46, 0xc2, 0xa3, 0x20, 0x9a, 0x69, 0x11, 0xa9,
-  0x8c, 0xdb, 0x7a, 0x6a, 0x83, 0x4a, 0x24, 0xf0, 0x34, 0x98, 0xee, 0x73,
-  0x99, 0xee, 0xf3, 0xff, 0x9b, 0xa6, 0xfb, 0x7c, 0xfd, 0x74, 0x3f, 0x11,
-  0xab, 0x02, 0x30, 0x43, 0xfb, 0xa3, 0x38, 0x5f, 0x8b, 0xaa, 0x6c, 0xe1,
-  0x92, 0x0e, 0x60, 0xb4, 0x12, 0xf6, 0x5f, 0x08, 0x32, 0x93, 0x7c, 0x43,
-  0xcd, 0xac, 0x67, 0x05, 0x15, 0x89, 0x9e, 0xa1, 0x92, 0x8a, 0x32, 0x1d,
-  0x33, 0x9f, 0xe3, 0x8a, 0x40, 0x2e, 0xce, 0xf7, 0xbf, 0xb7, 0x07, 0xad,
-  0x55, 0x69, 0x8f, 0x9a, 0x75, 0x63, 0x7b, 0x11, 0x30, 0x75, 0x83, 0xf2,
-  0xb3, 0x01, 0xc2, 0x0d, 0xb5, 0x7b, 0xfc, 0xf6, 0xdb, 0x93, 0x8b, 0xb3,
-  0xb7, 0x6f, 0x8e, 0xdf, 0xba, 0x68, 0x9b, 0x4b, 0xd4, 0xe0, 0x6c, 0xb3,
-  0xa2, 0xb5, 0xd5, 0x1e, 0x12, 0xf9, 0x17, 0xa6, 0x1c, 0x4e, 0x9b, 0x5d,
-  0x2c, 0xf4, 0xaf, 0x41, 0xd8, 0x5c, 0xf0, 0x90, 0x1d, 0x3f, 0x16, 0xca,
-  0x16, 0xec, 0x1b, 0x98, 0x70, 0x8c, 0xdb, 0x40, 0x42, 0x8f, 0xc4, 0x7e,
-  0x22, 0xa5, 0x05, 0x93, 0x87, 0x71, 0xb2, 0xb0, 0xf5, 0xf3, 0xf7, 0x89,
-  0x16, 0x2f, 0x0d, 0xa2, 0xd6, 0x2a, 0x83, 0xf0, 0x9b, 0x17, 0x34, 0xf8,
-  0xa3, 0x19, 0xaf, 0xf6, 0xb7, 0xb7, 0x7f, 0x02, 0x0e, 0xe0, 0xe7, 0x6a,
-  0xdf, 0x6c, 0x5e, 0xc9, 0xa1, 0x21, 0xc7, 0xd7, 0xc7, 0xb1, 0x3c, 0x3f,
-  0x58, 0xcc, 0x36, 0x02, 0x7f, 0xd6, 0xf0, 0x3d, 0xe9, 0xd2, 0xdf, 0xff,
-  0xf0, 0x2b, 0x77, 0x31, 0xac, 0x94, 0x65, 0xf9, 0xd5, 0xbb, 0xa8, 0x68,
-  0xd7, 0x07, 0xa7, 0xa7, 0xbf, 0x6a, 0x07, 0x50, 0x39, 0xbc, 0xbd, 0xb0,
-  0xef, 0xec, 0x85, 0x96, 0x24, 0xd9, 0x50, 0x66, 0x2b, 0xda, 0xc9, 0xdb,
-  0x33, 0x1d, 0x8d, 0x98, 0x9b, 0xfa, 0x56, 0xf1, 0x68, 0xe2, 0xaa, 0x89,
-  0xa2, 0x60, 0xc5, 0xe7, 0x8d, 0x33, 0x0e, 0x54, 0xe1, 0xab, 0x00, 0xb0,
-  0xd3, 0xac, 0xbe, 0x40, 0x2d, 0x43, 0x4a, 0x52, 0xe6, 0x6c, 0x8b, 0x02,
-  0x91, 0x68, 0x46, 0xeb, 0x16, 0xc3, 0x30, 0x83, 0x50, 0x70, 0x48, 0x17,
-  0x6a, 0x50, 0x73, 0x3a, 0x17, 0x13, 0x9d, 0xa2, 0x39, 0x97, 0x00, 0xc8,
-  0x67, 0x45, 0x00, 0x43, 0xe1, 0x53, 0xf4, 0xfd, 0xc9, 0x65, 0x74, 0x78,
-  0x76, 0xe4, 0x8f, 0xe8, 0xa5, 0x04, 0x72, 0xe6, 0x28, 0x1b, 0xb6, 0x9c,
-  0x13, 0x13, 0x63, 0x75, 0xc1, 0x15, 0x91, 0x30, 0xd4, 0x5f, 0x8e, 0xa9,
-  0x33, 0x3b, 0x11, 0x2d, 0xa8, 0x14, 0x3d, 0xcc, 0x25, 0x50, 0x6e, 0x12,
-  0x58, 0x11, 0xaa, 0x20, 0xc1, 0xce, 0x54, 0xcb, 0x71, 0xd3, 0x0c, 0x9e,
-  0x43, 0x2c, 0x45, 0xac, 0x0e, 0xc4, 0x5d, 0xb8, 0x7a, 0xe1, 0x5c, 0xac,
-  0x49, 0x24, 0x5c, 0x1d, 0x78, 0x5d, 0x22, 0x40, 0x45, 0x93, 0x62, 0x50,
-  0x39, 0x0a, 0x00, 0x68, 0xd1, 0xdd, 0x07, 0x46, 0x68, 0xc7, 0x68, 0x2a,
-  0x71, 0x9f, 0xbb, 0x6a, 0xf7, 0x9f, 0x7b, 0x40, 0x0d, 0x8f, 0x51, 0x05,
-  0xd3, 0x01, 0x27, 0x4a, 0x4c, 0x2c, 0xe9, 0xc8, 0x40, 0xc6, 0xac, 0x52,
-  0x90, 0x94, 0xd6, 0x68, 0xec, 0xb8, 0x6b, 0xc2, 0xf5, 0xb3, 0xa7, 0xd4,
-  0x2e, 0x48, 0xf2, 0x2c, 0x4f, 0x89, 0x7b, 0x29, 0xfd, 0x39, 0x38, 0xd2,
-  0x4f, 0x74, 0x30, 0x17, 0xa7, 0x34, 0xf3, 0xa9, 0xd8, 0xc1, 0x35, 0xe6,
-  0x1b, 0x55, 0xa2, 0xe0, 0x3d, 0x61, 0x7d, 0x57, 0x8b, 0xfe, 0xfa, 0x37,
-  0x9f, 0x99, 0xb9, 0x4d, 0x49, 0xc1, 0x23, 0x79, 0x2a, 0x15, 0x88, 0x6b,
-  0x57, 0x95, 0x49, 0x25, 0x54, 0x09, 0x16, 0x1b, 0xc3, 0x5d, 0x26, 0xb6,
-  0xed, 0xf6, 0x2a, 0x1d, 0x81, 0xdc, 0xf8, 0xbc, 0xd6, 0x8f, 0x75, 0xc3,
-  0x4d, 0x69, 0x21, 0x58, 0x74, 0x51, 0x0f, 0xb8, 0xe2, 0xe6, 0x9b, 0xad,
-  0x7d, 0x5a, 0x5f, 0x14, 0x0b, 0x6c, 0x63, 0x38, 0x86, 0x2c, 0x74, 0xa2,
-  0x7f, 0xe6, 0x98, 0x45, 0x74, 0x9f, 0x70, 0x4e, 0x94, 0x9e, 0x49, 0xd4,
-  0xf5, 0xb2, 0xd9, 0x59, 0xfc, 0x84, 0xa4, 0x4a, 0x02, 0xe8, 0x4a, 0xe3,
-  0x2d, 0xc7, 0x3a, 0xde, 0x86, 0x7e, 0x98, 0x87, 0x1c, 0xf5, 0x85, 0xef,
-  0x24, 0x8a, 0xe1, 0xa2, 0x62, 0x53, 0xe7, 0x3c, 0x75, 0x9b, 0x20, 0xed,
-  0xcb, 0x47, 0xec, 0xf9, 0x23, 0xce, 0x9c, 0xb9, 0xbf, 0xf5, 0x8d, 0x06,
-  0x4e, 0x51, 0x2d, 0x0c, 0x8a, 0x57, 0x41, 0x2a, 0x52, 0x86, 0x75, 0x2c,
-  0xad, 0x7c, 0x8b, 0x2a, 0x2e, 0x00, 0x6a, 0x67, 0x70, 0xee, 0xac, 0x11,
-  0x73, 0x9a, 0x5d, 0x95, 0xae, 0x4a, 0x16, 0xab, 0xd4, 0x93, 0x00, 0xe1,
-  0x12, 0xa7, 0xda, 0x37, 0x8a, 0x33, 0x64, 0xda, 0x39, 0x1c, 0x48, 0x51,
-  0xc3, 0x3d, 0x17, 0x54, 0x3c, 0xf6, 0x67, 0x62, 0xb7, 0xb6, 0xd8, 0xe7,
-  0x07, 0xc3, 0xa1, 0x2d, 0x35, 0x50, 0xa4, 0x6c, 0x3d, 0x65, 0x05, 0xd5,
-  0xb3, 0x89, 0x8c, 0x69, 0x4d, 0x29, 0x6c, 0x31, 0x64, 0x68, 0x23, 0xb5,
-  0xe8, 0x88, 0xdd, 0x27, 0x7e, 0xcd, 0x5d, 0x67, 0xdf, 0x4a, 0x6b, 0xbd,
-  0x8f, 0xec, 0xac, 0xb5, 0xaf, 0x6f, 0x5b, 0xfa, 0x7a, 0x5a, 0x9b, 0xd7,
-  0xde, 0xde, 0xa7, 0x9a, 0x42, 0x40, 0x6b, 0x7d, 0x58, 0xa1, 0x14, 0x25,
-  0x0e, 0xb5, 0x35, 0xd0, 0x83, 0x7d, 0x43, 0x8b, 0x48, 0x5a, 0x2b, 0xc6,
-  0x63, 0x30, 0x41, 0x57, 0xcf, 0xfc, 0xb4, 0x48, 0xaa, 0xe0, 0xf6, 0xd8,
-  0xec, 0x21, 0xc7, 0xa4, 0x71, 0x7a, 0x5c, 0x39, 0xa0, 0x13, 0x1e, 0x19,
-  0xf1, 0xf1, 0x35, 0xf1, 0x26, 0x36, 0x8c, 0xa0, 0x9f, 0x4f, 0x5d, 0x3f,
-  0x6e, 0xe4, 0xac, 0x87, 0x4a, 0x5e, 0xfd, 0x20, 0xe4, 0x08, 0x4a, 0x23,
-  0x41, 0x44, 0x9a, 0x3a, 0x0a, 0x5a, 0xca, 0x2a, 0xc9, 0xdb, 0xbe, 0x17,
-  0x39, 0x7e, 0xe7, 0x5a, 0x0c, 0x52, 0x40, 0x55, 0x50, 0x22, 0x2f, 0xae,
-  0x20, 0x94, 0xc0, 0x62, 0xc3, 0xc7, 0xdd, 0xfa, 0xc8, 0xc3, 0xd3, 0xbe,
-  0xfb, 0x22, 0x58, 0x13, 0x1b, 0x96, 0xd9, 0x1a, 0xb7, 0xed, 0xf8, 0x38,
-  0x16, 0x22, 0xd2, 0x1d, 0xff, 0x7d, 0x71, 0x7c, 0x79, 0xc1, 0x31, 0xad,
-  0x80, 0x59, 0xa9, 0x6b, 0xca, 0x74, 0xa6, 0xb6, 0x9c, 0x59, 0x5e, 0x0a,
-  0x75, 0x04, 0x5c, 0xd7, 0x53, 0xb2, 0x14, 0xe4, 0xc6, 0x3d, 0xc3, 0x99,
-  0xd7, 0x95, 0xfa, 0xdc, 0xbe, 0x4a, 0x90, 0xdc, 0x43, 0x3e, 0x42, 0x53,
-  0x4f, 0x86, 0x5b, 0x7f, 0x1f, 0xe7, 0x03, 0x34, 0x45, 0x61, 0x6b, 0x1a,
-  0x0a, 0x3f, 0x50, 0xd7, 0xbb, 0x8b, 0x4a, 0x91, 0x94, 0xa7, 0xd8, 0x3c,
-  0xc4, 0x1a, 0x50, 0xde, 0x30, 0x12, 0xb9, 0xce, 0xe9, 0x9a, 0x94, 0xc4,
-  0x55, 0xbb, 0x0e, 0x9d, 0x37, 0x50, 0xba, 0x94, 0x4f, 0x11, 0xa6, 0x0e,
-  0xb4, 0xad, 0xe8, 0xe9, 0xce, 0x4e, 0xb3, 0xb9, 0x78, 0x94, 0xdd, 0x99,
-  0x6b, 0x52, 0x93, 0x3e, 0xa4, 0xb4, 0x0f, 0xf6, 0x0b, 0x97, 0x29, 0x74,
-  0x8d, 0xfe, 0x15, 0xc9, 0xcc, 0xbc, 0x60, 0x66, 0x46, 0x08, 0x96, 0x4d,
-  0x0e, 0xe5, 0x77, 0x48, 0x42, 0xd1, 0x25, 0xab, 0x1e, 0x45, 0xc9, 0x4f,
-  0x31, 0x2c, 0xc1, 0xd8, 0xea, 0x7a, 0x22, 0x91, 0x6d, 0x45, 0xb3, 0x9f,
-  0xb5, 0xcc, 0x53, 0x41, 0x72, 0x82, 0x6e, 0x9e, 0xb5, 0x10, 0x44, 0x34,
-  0xbc, 0x3c, 0xbb, 0x88, 0x82, 0xaa, 0xdc, 0x55, 0xae, 0x8b, 0x78, 0x06,
-  0x7e, 0xc2, 0x79, 0x67, 0x7b, 0x2d, 0xae, 0x03, 0x97, 0x24, 0x29, 0x41,
-  0x47, 0x9c, 0x6d, 0xef, 0x7b, 0x7d, 0xee, 0x1d, 0x5d, 0x3a, 0xb7, 0x6f,
-  0x49, 0x03, 0xe0, 0xac, 0x41, 0x83, 0x3b, 0xa3, 0xfb, 0x91, 0x04, 0xef,
-  0x59, 0x60, 0x7f, 0xd9, 0x93, 0x73, 0x76, 0xb6, 0x04, 0xad, 0x4b, 0xbe,
-  0x23, 0x93, 0x91, 0x66, 0x3e, 0xb2, 0xd9, 0x4a, 0x0d, 0x53, 0xce, 0x18,
-  0x58, 0x27, 0x45, 0x39, 0x43, 0x67, 0x1e, 0xd0, 0x4e, 0x2c, 0xff, 0x83,
-  0x9a, 0xd7, 0x0f, 0x9f, 0x23, 0x93, 0x4d, 0xdd, 0x28, 0x4a, 0x42, 0x5a,
-  0xbb, 0xa3, 0xbe, 0xd9, 0x63, 0x12, 0x05, 0x26, 0x5a, 0xc7, 0x5a, 0xc2,
-  0xad, 0x9c, 0x6c, 0xe4, 0xc5, 0x8a, 0x1d, 0xbf, 0xce, 0xe7, 0x67, 0x17,
-  0x97, 0x56, 0xd0, 0x46, 0xef, 0x4d, 0x7c, 0x54, 0x3b, 0x41, 0xec, 0xac,
-  0x87, 0x04, 0xe8, 0x23, 0x55, 0x1a, 0x52, 0x6d, 0x50, 0x2c, 0x51, 0x5a,
-  0xd5, 0x36, 0xb8, 0x10, 0x46, 0xbe, 0x32, 0xcf, 0x97, 0x2b, 0x97, 0x03,
-  0x96, 0xa3, 0xa9, 0x3c, 0xcc, 0x9f, 0xdb, 0xfd, 0x98, 0x3e, 0x09, 0xf4,
-  0xc9, 0x6e, 0x0b, 0x75, 0xb0, 0x00, 0x7e, 0x71, 0x3c, 0xbc, 0x94, 0x55,
-  0xe3, 0xdf, 0x1a, 0x23, 0x97, 0x54, 0x48, 0xfd, 0xb0, 0xd5, 0xb1, 0x04,
-  0xea, 0xe0, 0x10, 0x99, 0x99, 0xd6, 0x5a, 0x74, 0xde, 0xa0, 0x60, 0xcd,
-  0x9e, 0x04, 0x21, 0x7d, 0x60, 0x9c, 0x4a, 0x2b, 0x97, 0x56, 0x7b, 0x33,
-  0xea, 0x68, 0x27, 0x1d, 0xba, 0x72, 0xe5, 0x50, 0x64, 0xf9, 0x6d, 0xd0,
-  0xc2, 0xd3, 0x80, 0x59, 0x30, 0x73, 0xd7, 0x06, 0x4e, 0xcc, 0x32, 0xce,
-  0x1f, 0x3a, 0xe7, 0xf3, 0x75, 0x32, 0x37, 0xc2, 0x90, 0xe7, 0x7c, 0x3b,
-  0xcf, 0x5c, 0x5e, 0xb4, 0x89, 0x47, 0xc1, 0x50, 0xf8, 0x63, 0x8b, 0x86,
-  0x87, 0xa3, 0xb1, 0x46, 0x76, 0x4f, 0x9e, 0xbb, 0x55, 0x64, 0xd1, 0xd9,
-  0xb9, 0x76, 0x64, 0xfa, 0xc1, 0x5d, 0xc4, 0xae, 0xb1, 0x74, 0xbe, 0x4c,
-  0xb4, 0x68, 0x47, 0x9c, 0x4f, 0x53, 0x84, 0xb2, 0x8a, 0x6f, 0xa6, 0x61,
-  0x88, 0xd6, 0x08, 0x43, 0xdf, 0x8f, 0x5e, 0x44, 0xa4, 0xc6, 0xfb, 0xdd,
-  0x92, 0x64, 0x43, 0x9c, 0x64, 0x2f, 0xe3, 0xd1, 0xc1, 0x9d, 0xbb, 0xdb,
-  0x62, 0x10, 0x9d, 0x33, 0x96, 0x2b, 0x4c, 0xec, 0xc5, 0x7f, 0xf8, 0xd6,
-  0xe4, 0xb0, 0x30, 0xc6, 0x38, 0x5f, 0x9f, 0x10, 0x4e, 0x53, 0x2e, 0x44,
-  0x8f, 0x4f, 0xf8, 0xd7, 0x00, 0x19, 0xb2, 0x31, 0xe5, 0x17, 0xfe, 0xe5,
-  0x82, 0x26, 0x42, 0xba, 0x49, 0xfd, 0x91, 0xa7, 0x4a, 0x5b, 0xa4, 0xb8,
-  0xa0, 0x09, 0xee, 0x00, 0xec, 0x99, 0xcf, 0x34, 0x6f, 0x49, 0xca, 0xf1,
-  0x8d, 0x68, 0xe1, 0xca, 0x9e, 0x31, 0x31, 0x56, 0x9e, 0xf3, 0x4d, 0xc9,
-  0x9d, 0x70, 0x20, 0xeb, 0x04, 0xa0, 0x0b, 0x3a, 0x37, 0x5c, 0x2e, 0x89,
-  0xda, 0x9a, 0x33, 0xc3, 0x9d, 0x9a, 0xef, 0xdc, 0x67, 0x7b, 0x31, 0xcf,
-  0x1c, 0xd9, 0xe1, 0xe1, 0x99, 0x34, 0xc1, 0xab, 0x2b, 0xde, 0xc0, 0xa7,
-  0x42, 0x8d, 0x8e, 0x74, 0xdc, 0x35, 0x56, 0x19, 0x1d, 0x77, 0xec, 0x32,
-  0x48, 0xb1, 0xdd, 0xac, 0x5a, 0xa2, 0x14, 0x4c, 0xd0, 0xd4, 0x33, 0xdf,
-  0xd4, 0x15, 0x67, 0xfe, 0xb9, 0xb6, 0x3c, 0x0f, 0xf2, 0x50, 0x6c, 0xa9,
-  0x7b, 0x4c, 0xf5, 0x04, 0xb9, 0xca, 0x1a, 0x9a, 0x42, 0xf5, 0xfe, 0x78,
-  0x2a, 0xc4, 0x70, 0x99, 0x65, 0x52, 0x0c, 0xd0, 0xc5, 0xfa, 0x0d, 0x24,
-  0x8a, 0xb0, 0x69, 0x76, 0x2f, 0x7a, 0xaa, 0x5e, 0x69, 0xc5, 0x32, 0xf6,
-  0x1a, 0x34, 0xea, 0x4d, 0x2f, 0x67, 0x8d, 0x72, 0x39, 0x4f, 0x3f, 0x53,
-  0xf5, 0xed, 0x76, 0x4e, 0x24, 0x19, 0x5d, 0x1e, 0x9f, 0xbe, 0x3d, 0xbe,
-  0x74, 0x80, 0x1d, 0x36, 0xa1, 0xe0, 0xf9, 0x17, 0x6a, 0xd8, 0x52, 0xed,
-  0xca, 0x70, 0x89, 0xeb, 0xee, 0xd7, 0x67, 0xbb, 0xce, 0xb6, 0xc3, 0x91,
-  0x73, 0xdd, 0x42, 0xce, 0x5f, 0x10, 0x3f, 0x87, 0x52, 0xdd, 0x5f, 0x47,
-  0x6f, 0x8e, 0x9e, 0x71, 0x30, 0xff, 0x75, 0x92, 0x33, 0x32, 0xba, 0x57,
-  0x76, 0xb2, 0x80, 0x13, 0x3c, 0xdb, 0x0b, 0xf0, 0x24, 0xe4, 0x32, 0x4b,
-  0xf5, 0x7c, 0xb0, 0x18, 0x4b, 0x2b, 0xc4, 0xf9, 0xa7, 0xa4, 0xa8, 0x8a,
-  0x35, 0x10, 0x9a, 0xb5, 0x58, 0x19, 0x15, 0x3b, 0x44, 0x64, 0x83, 0x7a,
-  0xcd, 0xf0, 0x2a, 0x9b, 0x78, 0xf6, 0xc4, 0xb3, 0x89, 0x7c, 0xb5, 0x60,
-  0xd4, 0x33, 0x29, 0x2a, 0xde, 0x42, 0xb3, 0xcf, 0x84, 0x35, 0x1d, 0xca,
-  0xc9, 0x62, 0x79, 0xb1, 0xf9, 0x1a, 0x87, 0x24, 0x89, 0xb9, 0x2d, 0x78,
-  0xef, 0x59, 0xa8, 0xaf, 0x15, 0x5a, 0x4d, 0x98, 0xd6, 0x0f, 0x25, 0x03,
-  0x50, 0x01, 0xdd, 0x3f, 0xfb, 0xdc, 0x3d, 0xcb, 0x35, 0x55, 0xd3, 0xb9,
-  0x82, 0xd1, 0x3c, 0xf2, 0x86, 0x4a, 0x99, 0x72, 0xf9, 0xfa, 0x18, 0x19,
-  0x91, 0x2d, 0x82, 0xb5, 0x0f, 0x5e, 0x79, 0x51, 0x55, 0x47, 0x81, 0x73,
-  0xea, 0x6b, 0x5c, 0xf0, 0xa4, 0xd2, 0xc5, 0x4d, 0x48, 0xfe, 0xcf, 0xe5,
-  0x2e, 0x3c, 0xe7, 0x70, 0xc8, 0xca, 0x7e, 0x1a, 0x9b, 0xa9, 0xa0, 0x00,
-  0xd8, 0x69, 0x12, 0xea, 0x3a, 0x3c, 0xb0, 0x37, 0xea, 0xa4, 0xc9, 0x8f,
-  0x06, 0x97, 0xc7, 0xf3, 0x5d, 0xa5, 0x4a, 0x9a, 0x72, 0x76, 0x3d, 0x27,
-  0x1d, 0x7f, 0xd2, 0x2c, 0x8d, 0x1b, 0x3c, 0xbe, 0xa7, 0x47, 0x52, 0xaa,
-  0x4a, 0x83, 0xed, 0x30, 0xfe, 0xb0, 0x7f, 0xe0, 0x89, 0x52, 0xad, 0xb8,
-  0xd2, 0x20, 0x66, 0x03, 0xf8, 0x99, 0x6d, 0x88, 0x49, 0x25, 0xb4, 0xfe,
-  0xf9, 0x53, 0x95, 0x6e, 0x4c, 0x0a, 0x65, 0xce, 0xcf, 0x0b, 0x31, 0x65,
-  0xb0, 0x85, 0x06, 0x23, 0x7c, 0xae, 0x97, 0x8b, 0x6e, 0x65, 0x69, 0xe5,
-  0xeb, 0x95, 0x07, 0x16, 0x88, 0xab, 0xbd, 0x4f, 0xe7, 0x1a, 0xff, 0xdd,
-  0x78, 0xfd, 0xf9, 0x1a, 0xab, 0x86, 0xfa, 0x22, 0x8e, 0x41, 0x4b, 0xc1,
-  0xf3, 0x9f, 0xba, 0x93, 0xe0, 0x40, 0xba, 0x7a, 0x2e, 0xce, 0x0b, 0x5e,
-  0x6d, 0x83, 0x52, 0xb4, 0x83, 0x04, 0xbd, 0x7a, 0xe1, 0xab, 0x62, 0xb4,
-  0xb9, 0xf2, 0x5c, 0xf7, 0xa4, 0x93, 0x47, 0x69, 0x70, 0x8c, 0x9f, 0x0b,
-  0x49, 0xbd, 0x86, 0x27, 0xd9, 0xce, 0x01, 0x87, 0xe3, 0x86, 0x28, 0xd7,
-  0xfe, 0xe9, 0x17, 0x4a, 0x1b, 0x76, 0x23, 0x99, 0x20, 0xb8, 0xf6, 0x8d,
-  0x4f, 0x77, 0x42, 0xb1, 0x70, 0xc2, 0xb6, 0x34, 0x49, 0xa7, 0x5e, 0xfb,
-  0x82, 0x50, 0xc6, 0x09, 0x31, 0xea, 0x6b, 0x22, 0x6a, 0x3c, 0xe3, 0x61,
-  0x04, 0xfc, 0x63, 0x7b, 0x55, 0xb6, 0x16, 0x0a, 0x29, 0xd1, 0xc9, 0x51,
-  0xf0, 0xe0, 0x13, 0x3f, 0xc1, 0x78, 0xca, 0xf7, 0xed, 0x4a, 0x34, 0xfd,
-  0x42, 0x81, 0xc6, 0x83, 0x47, 0x9f, 0x6a, 0x14, 0x26, 0xc7, 0xdf, 0xde,
-  0xc8, 0xfa, 0x37, 0x9e, 0x11, 0x72, 0x38, 0x74, 0xc5, 0xc7, 0x25, 0x9c,
-  0xb2, 0x68, 0xbb, 0x66, 0x3f, 0x7d, 0xfe, 0xc8, 0xb3, 0x7a, 0x2d, 0x15,
-  0xee, 0x32, 0x0d, 0xde, 0xfb, 0xb4, 0x79, 0xcc, 0x4d, 0xf0, 0xb6, 0x68,
-  0x65, 0x3d, 0x69, 0xd1, 0x26, 0x07, 0x5f, 0xff, 0x87, 0x99, 0x56, 0x72,
-  0x8e, 0xc2, 0x2c, 0xfe, 0x23, 0x1c, 0xef, 0x67, 0x61, 0xc8, 0xb3, 0xd8,
-  0x55, 0x5c, 0x4d, 0x86, 0x10, 0x1a, 0xd7, 0x57, 0x37, 0xc1, 0xea, 0x04,
-  0x2d, 0xc8, 0x9e, 0xd3, 0x4d, 0x1d, 0xd4, 0x4a, 0x57, 0x4d, 0x4b, 0x53,
-  0xd4, 0x2d, 0xe2, 0x49, 0x47, 0xf7, 0x35, 0x6d, 0x2a, 0xa8, 0x23, 0xb0,
-  0x4e, 0xed, 0xd4, 0x8e, 0x41, 0x71, 0xb3, 0x14, 0xd5, 0xd6, 0xcd, 0x48,
-  0x45, 0xb7, 0xea, 0x6b, 0x7b, 0x9e, 0x7b, 0xe9, 0xc5, 0x2a, 0x79, 0x18,
-  0x87, 0x0c, 0xff, 0x2b, 0xfa, 0x6f, 0x04, 0x52, 0xe4, 0xab, 0x98, 0x06,
-  0x84, 0x5a, 0x31, 0x06, 0x7a, 0xb0, 0x19, 0xb7, 0x27, 0x66, 0x69, 0x1c,
-  0x75, 0xd0, 0x8d, 0x0a, 0x0f, 0xec, 0xc0, 0xa5, 0x5d, 0xba, 0x49, 0xc6,
-  0xb7, 0x76, 0x64, 0x5c, 0x1b, 0x2d, 0x6f, 0x3d, 0x75, 0x4b, 0xcb, 0xd4,
-  0x77, 0x4e, 0x4a, 0x78, 0x4d, 0xd4, 0xf6, 0x8f, 0x0a, 0xd5, 0x5c, 0x5c,
-  0x0e, 0xcf, 0xf7, 0x79, 0xbc, 0x12, 0x07, 0x42, 0x07, 0xe2, 0x70, 0x98,
-  0xfc, 0xcd, 0x0a, 0xa1, 0xfb, 0xa7, 0x9f, 0xaf, 0x79, 0x7a, 0xa8, 0x91,
-  0x16, 0x27, 0x13, 0xe6, 0xbe, 0xb4, 0x0f, 0xe1, 0x4b, 0x9f, 0x6a, 0x3e,
-  0x17, 0x3c, 0x22, 0x8c, 0xf7, 0x07, 0xeb, 0x0c, 0x8f, 0xcc, 0x85, 0xd6,
-  0xf9, 0x87, 0x3f, 0xf3, 0x46, 0x91, 0x9b, 0xe5, 0xfc, 0xd6, 0x49, 0x64,
-  0x0a, 0x7e, 0x64, 0x1b, 0xec, 0x5e, 0xf8, 0xfe, 0x7b, 0xe1, 0xaf, 0x0e,
-  0xde, 0x46, 0x2d, 0xc5, 0x0e, 0xbc, 0x9d, 0xf8, 0x91, 0x40, 0xa6, 0x33,
-  0x69, 0xa3, 0x78, 0x7d, 0x9e, 0x4c, 0x13, 0x06, 0x49, 0x13, 0x29, 0x1c,
-  0x44, 0xd5, 0x16, 0xe8, 0xc9, 0xd1, 0x2f, 0x52, 0x76, 0x28, 0x51, 0x20,
-  0xbd, 0x39, 0xfb, 0xea, 0xd5, 0x18, 0x43, 0xab, 0x7d, 0xf0, 0xee, 0xf2,
-  0xeb, 0xb3, 0x8b, 0x61, 0xb4, 0xcd, 0x39, 0xe1, 0x97, 0x17, 0x27, 0x5f,
-  0xbe, 0x23, 0xe5, 0xd6, 0x59, 0xd9, 0x8f, 0x62, 0x52, 0x7a, 0xa7, 0x1c,
-  0x96, 0x92, 0xcc, 0x69, 0x11, 0xaf, 0x0d, 0x64, 0x1d, 0x28, 0x2e, 0x7c,
-  0x4f, 0x65, 0xb9, 0xaf, 0x48, 0x22, 0x85, 0xef, 0xcd, 0x8b, 0x80, 0x50,
-  0xb7, 0x94, 0xbe, 0xcb, 0xbc, 0xe6, 0x96, 0x56, 0xf3, 0xfc, 0x23, 0xf3,
-  0x3d, 0x44, 0x97, 0x5f, 0x1f, 0xbc, 0xfd, 0x66, 0x68, 0x48, 0x7e, 0xdf,
-  0x7d, 0xf7, 0x5d, 0xe8, 0x64, 0xda, 0xdf, 0xde, 0x06, 0x76, 0xdb, 0x4d,
-  0xfc, 0xf0, 0x30, 0x28, 0x92, 0x8d, 0x0d, 0x5a, 0xd8, 0x0d, 0x9f, 0x37,
-  0xa1, 0xf0, 0xce, 0xc5, 0x92, 0x6e, 0x75, 0xfa, 0x7a, 0x7b, 0xb1, 0x1c,
-  0x31, 0x9c, 0xf4, 0xf6, 0xb2, 0xd4, 0xe2, 0x19, 0x78, 0x7b, 0x7b, 0x63,
-  0x63, 0x78, 0x7c, 0x1c, 0x1d, 0x9c, 0x0e, 0xcf, 0x82, 0x77, 0x37, 0x77,
-  0xb7, 0x48, 0xea, 0xb9, 0x4e, 0x4a, 0xfa, 0x65, 0x63, 0xe3, 0xf4, 0xe0,
-  0x92, 0x15, 0xba, 0x6f, 0x8f, 0x2f, 0x86, 0x27, 0x67, 0x6f, 0x79, 0x77,
-  0x18, 0xf4, 0x22, 0x9e, 0xde, 0x33, 0xce, 0xd8, 0x55, 0x8a, 0x9c, 0xd4,
-  0x7b, 0x2b, 0x5b, 0xc1, 0x40, 0x2e, 0x24, 0x96, 0x89, 0x9c, 0x2a, 0x4e,
-  0x34, 0xab, 0x69, 0x24, 0xf1, 0x0f, 0x25, 0xab, 0x55, 0xe6, 0x69, 0xdd,
-  0x88, 0xbc, 0x51, 0x47, 0x60, 0xed, 0x93, 0x91, 0x84, 0x07, 0xf5, 0x04,
-  0x6d, 0x01, 0x81, 0xf9, 0x01, 0x1c, 0x44, 0xeb, 0xc4, 0x87, 0x27, 0x6f,
-  0xce, 0x49, 0xbf, 0x79, 0x37, 0x3c, 0xf8, 0xea, 0x98, 0x1f, 0xfd, 0x2a,
-  0x29, 0xfd, 0x76, 0x48, 0x79, 0x0d, 0xee, 0xe4, 0x6d, 0x52, 0x16, 0xe3,
-  0x78, 0xc1, 0x31, 0xf6, 0xd4, 0x4d, 0x5f, 0xee, 0x80, 0xa0, 0x6d, 0x91,
-  0x74, 0x3d, 0xf0, 0xf6, 0x5c, 0x9f, 0x07, 0x2a, 0x76, 0xd8, 0xee, 0xc5,
-  0xf1, 0xc1, 0xd1, 0x9b, 0x63, 0x0b, 0x1e, 0x93, 0x3b, 0x93, 0x1a, 0xbd,
-  0xc9, 0xb8, 0x52, 0x8f, 0x33, 0xf3, 0xf2, 0xbd, 0xcc, 0x8b, 0x4f, 0xdf,
-  0x70, 0xf9, 0x89, 0xf6, 0xee, 0xfc, 0x46, 0xe1, 0xd9, 0xc1, 0x55, 0xba,
-  0x2d, 0xad, 0x5b, 0x7f, 0xb1, 0x5b, 0x12, 0x8b, 0xc2, 0x52, 0x59, 0x55,
-  0x54, 0x76, 0xa8, 0xfa, 0x9f, 0xed, 0xec, 0xec, 0x3c, 0x32, 0x0f, 0x18,
-  0x55, 0xf5, 0xc6, 0xa3, 0xa9, 0xec, 0xf3, 0xe3, 0xdb, 0xbe, 0x7d, 0xa3,
-  0xcc, 0xd0, 0x44, 0xcd, 0x7f, 0xce, 0xc5, 0xc8, 0x90, 0x96, 0x49, 0xfb,
-  0xa0, 0xc7, 0x59, 0xe6, 0xf6, 0xa0, 0xb2, 0x3c, 0x13, 0xc6, 0xf4, 0x49,
-  0xcb, 0x00, 0x13, 0xce, 0x86, 0x3e, 0x49, 0xc1, 0x6a, 0xe3, 0x7c, 0x55,
-  0x6f, 0x92, 0xbf, 0xa1, 0x36, 0xf9, 0xc7, 0x20, 0xcb, 0xaf, 0xb7, 0x67,
-  0xfb, 0x10, 0x28, 0xe8, 0xa1, 0xd7, 0x09, 0x6a, 0x1c, 0xdd, 0x67, 0x2e,
-  0xcc, 0xaa, 0xe0, 0xa5, 0xe5, 0x88, 0xce, 0x8f, 0x18, 0xd7, 0x2f, 0x58,
-  0x07, 0x6c, 0x27, 0xd7, 0xd2, 0x95, 0x99, 0x5b, 0xe8, 0x49, 0x4b, 0x27,
-  0x05, 0x6f, 0x19, 0x9b, 0xd4, 0x06, 0xc4, 0x42, 0xa8, 0x17, 0xfa, 0x5c,
-  0x88, 0x84, 0x7e, 0xcd, 0x89, 0x68, 0x06, 0xe5, 0x03, 0xb8, 0x5e, 0x96,
-  0x3b, 0x2c, 0x4c, 0x40, 0x74, 0x11, 0xcb, 0xca, 0x33, 0xd2, 0x47, 0x62,
-  0x49, 0x35, 0x1a, 0x22, 0x84, 0x3f, 0x88, 0xbc, 0x43, 0x58, 0x3f, 0x37,
-  0x5c, 0xef, 0xb3, 0xdf, 0x07, 0x05, 0x15, 0x8e, 0x5e, 0x3e, 0xa2, 0xf3,
-  0x60, 0x52, 0xb2, 0xfa, 0x73, 0xbd, 0x24, 0x03, 0xea, 0x19, 0xd2, 0x28,
-  0x1a, 0x7d, 0x01, 0x50, 0x2a, 0x47, 0x80, 0x5f, 0x21, 0xdd, 0xa1, 0x40,
-  0xcf, 0x20, 0x91, 0xa2, 0x5c, 0xe8, 0x8b, 0xf6, 0x64, 0x1b, 0x91, 0x47,
-  0x1f, 0xdd, 0xd3, 0xe1, 0xb9, 0xab, 0xf7, 0x43, 0x2b, 0x70, 0xc7, 0x4b,
-  0x70, 0x9b, 0x60, 0xf6, 0xa1, 0x5c, 0xff, 0xc8, 0x60, 0xf6, 0x69, 0x15,
-  0xf8, 0x8d, 0xff, 0xde, 0x1e, 0x14, 0xc5, 0xcd, 0x76, 0x3a, 0x79, 0x3f,
-  0x29, 0x62, 0xfa, 0x8c, 0xf8, 0x5a, 0xe3, 0xe3, 0x01, 0x7d, 0x18, 0xfd,
-  0xa5, 0xc2, 0xf7, 0x8b, 0x71, 0xfb, 0x4c, 0xfe, 0x7b, 0x9b, 0x81, 0xce,
-  0x00, 0xc6, 0x1c, 0x2c, 0x5c, 0x0b, 0xf7, 0xa0, 0x59, 0x09, 0xa6, 0x1e,
-  0x1d, 0xc7, 0x76, 0xca, 0xe8, 0x5f, 0x47, 0x1d, 0x25, 0xb7, 0x1f, 0xf7,
-  0x76, 0x76, 0x76, 0xf7, 0x77, 0x3f, 0x7b, 0xb1, 0xb3, 0xbf, 0xbb, 0xbb,
-  0xbb, 0xb7, 0xbf, 0xbb, 0xbf, 0xbf, 0xb7, 0xf3, 0xd3, 0x76, 0x67, 0x63,
-  0xe3, 0xe8, 0xec, 0xbb, 0xb7, 0xa7, 0x67, 0x07, 0x47, 0xd1, 0xe5, 0x19,
-  0xe9, 0xf6, 0x6c, 0x97, 0x69, 0x39, 0xe9, 0x40, 0xb8, 0x2a, 0x33, 0xb9,
-  0xd9, 0xe2, 0xa0, 0x1c, 0x49, 0xa3, 0xcb, 0x0c, 0x0a, 0x00, 0xbf, 0x34,
-  0xb8, 0x29, 0x67, 0x1f, 0x66, 0x5f, 0x1f, 0xd3, 0x49, 0x4f, 0x22, 0xe0,
-  0xbc, 0x8e, 0x87, 0xad, 0x35, 0x22, 0x55, 0xd8, 0x56, 0x57, 0x60, 0x1d,
-  0x0e, 0x45, 0x17, 0x01, 0xb9, 0x29, 0x6e, 0x78, 0x1f, 0x23, 0x2a, 0x85,
-  0x58, 0x8a, 0x6a, 0xf0, 0x86, 0x2b, 0x8c, 0xa0, 0x3e, 0x5a, 0x29, 0x42,
-  0x4f, 0xd2, 0xcb, 0x56, 0x63, 0x82, 0x67, 0x6b, 0xa7, 0x44, 0x17, 0x4f,
-  0xf2, 0x80, 0x59, 0x57, 0xd9, 0x84, 0xa0, 0xb6, 0xf9, 0xd9, 0x01, 0xad,
-  0xc9, 0xb4, 0xd6, 0x34, 0xb7, 0x21, 0xc3, 0x55, 0xdf, 0xd2, 0x1d, 0xf7,
-  0x63, 0xdc, 0xc3, 0x77, 0xc1, 0xdf, 0x84, 0x97, 0xce, 0xb6, 0x33, 0xb5,
-  0xc9, 0x00, 0xde, 0x0d, 0x4f, 0xde, 0x7e, 0x05, 0x5f, 0xda, 0x77, 0x67,
-  0x17, 0x47, 0x43, 0x6a, 0x96, 0x6f, 0xe3, 0x0d, 0x58, 0x5b, 0xf8, 0xd0,
-  0xea, 0xa8, 0xe4, 0x08, 0x70, 0xd7, 0x7f, 0x82, 0x76, 0x35, 0xe9, 0xb9,
-  0x34, 0x0b, 0x0c, 0x33, 0x90, 0x8c, 0x39, 0x7d, 0xa2, 0x9d, 0xc1, 0xe1,
-  0x34, 0xc8, 0xeb, 0x5f, 0xcc, 0x62, 0x06, 0xbe, 0x4d, 0x06, 0x82, 0x20,
-  0x87, 0xa8, 0x89, 0x6d, 0x86, 0x90, 0xd9, 0x66, 0x09, 0x7d, 0xbb, 0xcc,
-  0xc0, 0x2a, 0xd0, 0x4a, 0x96, 0x3b, 0xb0, 0xe0, 0xca, 0x8a, 0xf0, 0x19,
-  0xbb, 0x9a, 0xc6, 0xd7, 0xe8, 0xb0, 0x79, 0xfc, 0x82, 0xce, 0xb4, 0xfb,
-  0x8f, 0xed, 0x12, 0xf5, 0x09, 0xb9, 0xbd, 0x13, 0x10, 0x00, 0x32, 0xfb,
-  0x91, 0x13, 0xa2, 0x4e, 0x00, 0x91, 0x90, 0x50, 0x4f, 0x87, 0xc3, 0x09,
-  0xb8, 0xe8, 0x47, 0x1d, 0xd5, 0x58, 0x8b, 0x71, 0x6e, 0x88, 0x01, 0xa5,
-  0x1f, 0xa4, 0x80, 0x89, 0x16, 0x83, 0xaa, 0x79, 0xde, 0x58, 0x50, 0x20,
-  0xf6, 0x1f, 0x7d, 0x22, 0xa9, 0x0d, 0xba, 0xb1, 0x2c, 0x39, 0x0f, 0x86,
-  0xc6, 0x1e, 0x49, 0xf4, 0x0f, 0xe7, 0x39, 0xa9, 0xc8, 0xd6, 0x61, 0x48,
-  0xe9, 0x74, 0x9c, 0x96, 0x1d, 0x4b, 0xa8, 0xf2, 0x20, 0x63, 0xde, 0xd9,
-  0x57, 0x94, 0x34, 0x94, 0x98, 0x6e, 0x0f, 0xad, 0xb0, 0xa2, 0x09, 0xc6,
-  0x24, 0x77, 0x4b, 0xe6, 0x69, 0x87, 0x93, 0x6d, 0x7c, 0x2b, 0xa9, 0xe6,
-  0x8d, 0xb9, 0x1a, 0x22, 0xcc, 0x67, 0xb9, 0x77, 0x49, 0x75, 0x91, 0xcc,
-  0x03, 0x63, 0xe9, 0xde, 0xc6, 0xc5, 0xec, 0x98, 0x24, 0x4e, 0xe2, 0x95,
-  0x42, 0x39, 0x9a, 0xbf, 0x10, 0x54, 0x31, 0xa8, 0x2c, 0x5b, 0x58, 0xa9,
-  0xa5, 0xc1, 0x55, 0xab, 0x69, 0x30, 0x1b, 0x08, 0x7a, 0x76, 0x89, 0x5b,
-  0xc1, 0xf2, 0x68, 0xf1, 0x40, 0xf7, 0x2a, 0xef, 0x45, 0x5a, 0x16, 0xc9,
-  0xf4, 0x4a, 0x0b, 0xee, 0x69, 0x8d, 0xbb, 0xd1, 0x2a, 0x68, 0x40, 0x26,
-  0x21, 0xb1, 0xce, 0xcb, 0xb9, 0xcb, 0xfe, 0xc9, 0x94, 0x67, 0x5c, 0x83,
-  0x71, 0x2a, 0x5a, 0x79, 0x95, 0x51, 0x88, 0x17, 0x6a, 0x60, 0x70, 0xbe,
-  0x1b, 0x91, 0x03, 0x23, 0xae, 0x4d, 0xc1, 0x21, 0xdf, 0x01, 0x7e, 0x0c,
-  0xd4, 0x11, 0x3c, 0xb8, 0x1c, 0xd1, 0x6a, 0xbb, 0xe7, 0x78, 0xed, 0xd8,
-  0x9e, 0x8f, 0x55, 0x3b, 0x0c, 0x4b, 0xc8, 0x08, 0xe4, 0xa2, 0x41, 0x17,
-  0xfa, 0x41, 0xd1, 0x00, 0xe1, 0x00, 0xa0, 0x83, 0x86, 0xc0, 0xdc, 0x65,
-  0xe1, 0x56, 0x14, 0x88, 0xe5, 0xb1, 0x2b, 0x94, 0xd4, 0x76, 0x0c, 0x95,
-  0x23, 0xad, 0x3f, 0x87, 0x1f, 0x3e, 0x82, 0xcd, 0x21, 0x99, 0xd0, 0x3f,
-  0x5d, 0xc9, 0x29, 0x49, 0xe7, 0x8f, 0x1f, 0x46, 0x1d, 0xc4, 0x47, 0x75,
-  0x8c, 0xb9, 0x6a, 0x0e, 0x16, 0x2c, 0xbf, 0x3e, 0x22, 0x48, 0x9c, 0xcd,
-  0xc8, 0x2a, 0x68, 0x41, 0x36, 0xad, 0x40, 0x57, 0xe2, 0x20, 0x48, 0x48,
-  0xf3, 0x7e, 0xf4, 0x65, 0x5c, 0xa4, 0xe3, 0x5e, 0x74, 0x94, 0x92, 0xac,
-  0x5e, 0xf6, 0x3c, 0xfe, 0xa4, 0x43, 0xed, 0x1c, 0x44, 0xdf, 0x59, 0x25,
-  0x54, 0xba, 0x73, 0x11, 0x67, 0x0b, 0x33, 0xaa, 0x4b, 0xca, 0xdb, 0x10,
-  0xfb, 0xb4, 0x5a, 0x98, 0xc3, 0x04, 0x38, 0xb4, 0xed, 0xa1, 0xf5, 0xb0,
-  0x99, 0x71, 0x71, 0x5b, 0x05, 0x95, 0x17, 0xa9, 0xaa, 0x60, 0x3b, 0x29,
-  0x8b, 0x40, 0x58, 0xdf, 0xb9, 0x16, 0xf5, 0x50, 0x9a, 0xcb, 0xe6, 0x16,
-  0x8c, 0xe5, 0x9d, 0xc6, 0x6a, 0xb7, 0x2a, 0x34, 0x44, 0xc8, 0xbc, 0xda,
-  0xb8, 0x8d, 0xec, 0xb8, 0x6e, 0x20, 0x8c, 0x9e, 0xd6, 0x89, 0x57, 0x44,
-  0xf9, 0xc9, 0xd9, 0xe5, 0xf1, 0xef, 0xa2, 0x61, 0xca, 0x35, 0x25, 0x1d,
-  0xe5, 0xf0, 0x21, 0x67, 0xc7, 0xbe, 0x7a, 0xdc, 0x1a, 0x7b, 0xea, 0x52,
-  0x72, 0xd5, 0x04, 0x6a, 0x79, 0x1f, 0x52, 0x2a, 0xe8, 0x5e, 0x4a, 0xb5,
-  0xf3, 0xca, 0x80, 0x66, 0xef, 0xd2, 0x38, 0x72, 0xc5, 0xba, 0x79, 0xee,
-  0xef, 0x99, 0xf4, 0xdf, 0x7b, 0x38, 0xf5, 0xa5, 0xbe, 0x08, 0xb0, 0x3b,
-  0x6e, 0x47, 0xed, 0x1f, 0xb0, 0x1b, 0x8d, 0xd3, 0x9c, 0xae, 0x60, 0xe6,
-  0x53, 0x63, 0x31, 0x79, 0x22, 0x9e, 0x0f, 0x63, 0x67, 0x93, 0x0e, 0xe9,
-  0xe7, 0x2b, 0x59, 0xae, 0x31, 0x52, 0xff, 0x04, 0x0a, 0x5d, 0xcd, 0xa8,
-  0x76, 0xee, 0x42, 0x56, 0x8a, 0xe4, 0x57, 0xa4, 0x10, 0xa2, 0x1a, 0x89,
-  0xc2, 0x2d, 0x6e, 0x20, 0x46, 0x8e, 0x5a, 0x85, 0x2c, 0x31, 0x77, 0x37,
-  0x5b, 0x20, 0xdb, 0x71, 0x08, 0x13, 0xd3, 0xe9, 0x24, 0x9a, 0xad, 0x34,
-  0xbd, 0x5b, 0xf9, 0x30, 0xe7, 0x23, 0x41, 0x5d, 0xf9, 0xec, 0xb3, 0xc6,
-  0xbd, 0xfb, 0xe0, 0x9e, 0xde, 0xa7, 0xaf, 0x03, 0xb5, 0x68, 0xca, 0xfe,
-  0x55, 0x2b, 0x7b, 0xe4, 0x75, 0xa3, 0x86, 0xcc, 0x19, 0xa6, 0x6c, 0x4a,
-  0x87, 0xce, 0x56, 0xda, 0xb2, 0x2f, 0xae, 0xb2, 0xd3, 0x86, 0x08, 0xdd,
-  0x32, 0xce, 0xb8, 0x10, 0x2f, 0xfd, 0x1a, 0x29, 0xd4, 0x4e, 0x5e, 0x7d,
-  0xb0, 0x81, 0x80, 0x42, 0x42, 0xd2, 0x80, 0x65, 0x1a, 0x96, 0xb7, 0x86,
-  0x99, 0x36, 0xcc, 0xf9, 0x35, 0x3a, 0x18, 0x87, 0xcf, 0x58, 0x3d, 0x6b,
-  0x03, 0x57, 0x1e, 0xc0, 0xdd, 0x18, 0xfd, 0x77, 0xeb, 0x87, 0xf3, 0xee,
-  0x9f, 0x19, 0xce, 0x41, 0xf4, 0x68, 0x60, 0xa3, 0xd6, 0x7a, 0x60, 0x26,
-  0x52, 0xe8, 0x49, 0x9d, 0x64, 0x30, 0x7e, 0x19, 0xfd, 0xc9, 0x1a, 0x8d,
-  0xd9, 0xe1, 0x31, 0xaa, 0xe2, 0x6a, 0x36, 0xd5, 0x95, 0x79, 0x26, 0x4f,
-  0x43, 0x7e, 0xe4, 0xf6, 0x7b, 0x36, 0x94, 0x8f, 0x1d, 0xae, 0xe5, 0xf4,
-  0x5b, 0x64, 0xae, 0xef, 0x4f, 0xb2, 0xcd, 0xa4, 0x85, 0x20, 0xbf, 0x41,
-  0xd0, 0xd6, 0xe5, 0x79, 0xc6, 0x59, 0x7f, 0x40, 0x90, 0x0a, 0x0d, 0xd6,
-  0x97, 0xcb, 0xe3, 0x99, 0x20, 0x0b, 0xac, 0xf6, 0x9a, 0x7e, 0xb6, 0x2b,
-  0xd0, 0x54, 0xc4, 0x1e, 0x15, 0x07, 0x90, 0xf4, 0x4c, 0xba, 0xac, 0x16,
-  0x08, 0xb5, 0xac, 0x96, 0x26, 0x93, 0x7b, 0x05, 0xc5, 0xba, 0x9f, 0x62,
-  0xe5, 0x82, 0xba, 0xdd, 0x28, 0x72, 0x26, 0x63, 0x94, 0x1a, 0xce, 0x5a,
-  0xfa, 0x45, 0x0a, 0xca, 0xe2, 0x9e, 0x4f, 0x12, 0x69, 0xa9, 0x5c, 0x1b,
-  0xf2, 0x7c, 0x18, 0x30, 0x5e, 0x21, 0x67, 0xb0, 0xef, 0xe8, 0x6a, 0x99,
-  0x23, 0x14, 0x45, 0x33, 0xef, 0x35, 0x71, 0x92, 0x1a, 0xbd, 0x38, 0x78,
-  0xfb, 0xd5, 0x31, 0xce, 0x3b, 0xb3, 0x5d, 0x9f, 0x26, 0xcc, 0x79, 0x80,
-  0x7d, 0x38, 0xc6, 0x0b, 0x01, 0x26, 0x49, 0xf9, 0x8d, 0xc9, 0x72, 0xcc,
-  0x3e, 0xf9, 0x77, 0x7a, 0x0c, 0xd2, 0x02, 0x98, 0xa4, 0xd3, 0x94, 0x07,
-  0xc1, 0x2c, 0x57, 0xdd, 0xdf, 0x1b, 0x91, 0xa9, 0xa7, 0xe0, 0x18, 0x2c,
-  0xd2, 0xd0, 0x0a, 0x41, 0x97, 0x2d, 0x96, 0xa3, 0x45, 0xac, 0xe9, 0x68,
-  0x71, 0x98, 0xe1, 0xa4, 0x9a, 0xc0, 0xa0, 0x32, 0x05, 0xbe, 0x3b, 0x24,
-  0xf8, 0xd3, 0x49, 0x9d, 0x39, 0xa4, 0xce, 0x41, 0xa8, 0x71, 0x09, 0x16,
-  0xd4, 0xee, 0xce, 0x8e, 0xc7, 0x17, 0xf2, 0x99, 0x5a, 0x0d, 0x22, 0xcb,
-  0xa3, 0x9d, 0xfe, 0x8b, 0x17, 0xeb, 0xe8, 0xc7, 0x35, 0x8a, 0x8c, 0x9b,
-  0x67, 0x1f, 0xdd, 0x66, 0x9f, 0x1f, 0x5d, 0xd7, 0x66, 0x8b, 0x6c, 0x81,
-  0x92, 0x24, 0x1a, 0x7a, 0x50, 0xb8, 0xf8, 0x16, 0xd5, 0x41, 0xc4, 0xf6,
-  0x05, 0x5b, 0xe4, 0xdc, 0x09, 0x18, 0xbc, 0x94, 0x1b, 0x91, 0x93, 0x04,
-  0x00, 0x97, 0x65, 0xea, 0xca, 0x82, 0xa3, 0x0f, 0x52, 0x67, 0x8e, 0xfe,
-  0xa8, 0x85, 0x09, 0x44, 0xcc, 0x35, 0x4b, 0x74, 0xd5, 0x9c, 0x8d, 0x31,
-  0xd2, 0x77, 0xe7, 0xac, 0x8c, 0x92, 0xee, 0x22, 0x02, 0x3b, 0x49, 0x9f,
-  0x30, 0x4c, 0x6c, 0xd7, 0x64, 0xd1, 0x77, 0x5a, 0xac, 0x8f, 0x0b, 0x2d,
-  0xb0, 0x1f, 0x4a, 0xe0, 0x99, 0xd3, 0xb9, 0x56, 0xcd, 0x73, 0xbb, 0xbf,
-  0x46, 0x31, 0xbe, 0x8c, 0xfa, 0x01, 0x4b, 0x57, 0xc4, 0x21, 0xe6, 0xe7,
-  0xb3, 0x95, 0xc9, 0x28, 0xda, 0x03, 0x5a, 0x37, 0x43, 0x57, 0xa5, 0x7a,
-  0x71, 0x4f, 0x05, 0x4b, 0x50, 0x50, 0x83, 0xa5, 0xb7, 0x74, 0x29, 0xdd,
-  0xe0, 0x8a, 0xa8, 0x31, 0xf0, 0x8f, 0x1b, 0x4a, 0xdc, 0x52, 0x87, 0xd4,
-  0xa4, 0xd8, 0x94, 0x73, 0x3d, 0x55, 0x3b, 0xa9, 0x2b, 0xca, 0x0a, 0x4f,
-  0xc9, 0x0f, 0xe2, 0xfc, 0x64, 0xff, 0xfa, 0xd8, 0x1e, 0x19, 0x15, 0x1f,
-  0x4e, 0xab, 0x2f, 0x5f, 0x1b, 0x65, 0xab, 0xc1, 0xe0, 0x52, 0xde, 0x97,
-  0xae, 0xe3, 0xf6, 0xee, 0xe4, 0x7d, 0x5b, 0x8e, 0x16, 0xa2, 0xe7, 0x6b,
-  0x5f, 0x51, 0xa8, 0x5c, 0x64, 0xbb, 0x61, 0x66, 0xb0, 0x76, 0x02, 0x6e,
-  0x91, 0x56, 0x39, 0xf8, 0x46, 0xa4, 0xf9, 0x21, 0xc0, 0xa8, 0x62, 0xba,
-  0x01, 0xa8, 0x2e, 0x78, 0xdb, 0x2d, 0x22, 0x47, 0xae, 0x14, 0x89, 0x03,
-  0x45, 0x58, 0x4e, 0x90, 0x75, 0xc3, 0xee, 0x21, 0x0f, 0x6c, 0x92, 0x2f,
-  0xe7, 0x32, 0x0b, 0x38, 0x57, 0x68, 0xf0, 0x71, 0x71, 0x83, 0x80, 0x02,
-  0xa7, 0x20, 0x35, 0x6f, 0xa2, 0x10, 0x9c, 0x83, 0xae, 0x1e, 0xb9, 0x77,
-  0xc0, 0x55, 0x2b, 0x4b, 0x51, 0x5d, 0x81, 0x40, 0x9f, 0xf8, 0x58, 0xca,
-  0x67, 0x96, 0xd1, 0x6a, 0x2c, 0x05, 0xf1, 0x37, 0xca, 0x39, 0xd6, 0x48,
-  0xae, 0xaa, 0x8f, 0x49, 0x5b, 0x22, 0xca, 0x40, 0xfd, 0x41, 0x0d, 0x3c,
-  0xa4, 0x12, 0xd7, 0x96, 0x10, 0xb2, 0x2c, 0x00, 0x1a, 0x24, 0xb5, 0xd8,
-  0xd8, 0xac, 0x66, 0xcc, 0x40, 0x09, 0xf5, 0xb0, 0x3e, 0x9a, 0x63, 0xc4,
-  0xf8, 0xff, 0x12, 0xd0, 0x08, 0x0b, 0x3e, 0xa3, 0xae, 0x67, 0xd2, 0x27,
-  0x66, 0x28, 0x03, 0x94, 0x04, 0x1e, 0x09, 0x22, 0x1b, 0x5e, 0xba, 0xb2,
-  0xec, 0x26, 0x07, 0x7e, 0x7b, 0x7c, 0xf1, 0xe5, 0xd9, 0xf0, 0x98, 0x38,
-  0xc4, 0xd1, 0xf1, 0x97, 0xef, 0x98, 0x7b, 0xf0, 0x8e, 0x89, 0x91, 0x02,
-  0x18, 0x14, 0x82, 0x28, 0x8d, 0xc4, 0x29, 0x27, 0x23, 0x4b, 0xfe, 0x67,
-  0xcf, 0x28, 0x43, 0xe3, 0xd7, 0x54, 0x8a, 0x9e, 0x26, 0xa2, 0xd5, 0xa6,
-  0x88, 0x1c, 0xf4, 0xf0, 0x2c, 0x2c, 0x3b, 0xcf, 0x19, 0x4f, 0xb9, 0x34,
-  0x3c, 0x12, 0xc3, 0xf3, 0x2d, 0xf6, 0xbd, 0x6c, 0x7c, 0x27, 0x36, 0x0c,
-  0x3d, 0x10, 0xbe, 0x62, 0x90, 0x55, 0x06, 0x1a, 0x04, 0x65, 0x7f, 0x15,
-  0xaa, 0x7b, 0x9a, 0xc9, 0xed, 0xc5, 0x29, 0x53, 0x38, 0xcb, 0xc0, 0xa0,
-  0x4f, 0x51, 0x61, 0x50, 0xb1, 0x36, 0xb5, 0x4e, 0x4f, 0x21, 0x04, 0x47,
-  0x6c, 0x46, 0xd2, 0x4d, 0xa6, 0xca, 0x96, 0xc1, 0x85, 0x8a, 0x44, 0x92,
-  0xb3, 0xe5, 0xf6, 0x54, 0x33, 0xbf, 0x04, 0xe8, 0x28, 0x84, 0xe4, 0x26,
-  0x1f, 0x09, 0x86, 0x47, 0x10, 0x6d, 0x41, 0xb0, 0x92, 0xa5, 0x96, 0x8d,
-  0x03, 0xd2, 0xe2, 0x95, 0x0f, 0xbc, 0x7c, 0x4a, 0x3a, 0x77, 0xeb, 0xd9,
-  0xc1, 0xa5, 0xcc, 0x94, 0x13, 0x69, 0xe5, 0x42, 0x76, 0xd5, 0xc3, 0xe1,
-  0x47, 0xf2, 0x59, 0x60, 0x1c, 0x84, 0xe4, 0x30, 0xe2, 0xe4, 0x3c, 0x71,
-  0x18, 0x60, 0x20, 0x01, 0xaf, 0x2f, 0x7e, 0x63, 0x76, 0x16, 0x0d, 0x5d,
-  0xaa, 0xe7, 0x7f, 0xab, 0x67, 0x9f, 0xb7, 0x14, 0xc6, 0xa3, 0xa8, 0x5e,
-  0xe3, 0x54, 0xcf, 0xa0, 0xb4, 0x2e, 0x75, 0x6f, 0xca, 0x87, 0x32, 0x34,
-  0xb1, 0x6d, 0x6c, 0x6c, 0x1c, 0x1d, 0x5f, 0x1e, 0x9c, 0x9c, 0x1e, 0x1f,
-  0x45, 0x27, 0x6f, 0x5f, 0x9f, 0x5d, 0xbc, 0x39, 0xb8, 0x54, 0x27, 0xd3,
-  0x91, 0xd3, 0x51, 0x5d, 0xe9, 0x16, 0x67, 0x02, 0xf0, 0xfa, 0x2b, 0x48,
-  0x98, 0x76, 0xf1, 0x5a, 0xc1, 0x91, 0x64, 0x19, 0x92, 0xca, 0x1a, 0x6c,
-  0x44, 0xea, 0x9c, 0xf2, 0xc5, 0x58, 0xf8, 0x7e, 0xde, 0x76, 0x0e, 0x85,
-  0x81, 0x2d, 0xa7, 0x69, 0x98, 0xc0, 0x39, 0x7b, 0xb4, 0x29, 0x57, 0x78,
-  0x4c, 0xee, 0x26, 0x60, 0xf4, 0x23, 0xe3, 0x07, 0x34, 0xd9, 0x3f, 0xe1,
-  0x3c, 0x5e, 0x88, 0x97, 0x5a, 0xc1, 0xfd, 0xa4, 0x74, 0x85, 0x0b, 0x99,
-  0x5c, 0xb8, 0x9d, 0x20, 0x93, 0x8c, 0x28, 0x10, 0x15, 0x92, 0x83, 0x36,
-  0x5d, 0x52, 0x96, 0x55, 0x5b, 0x11, 0x97, 0x26, 0x3e, 0x09, 0xf7, 0x97,
-  0xb3, 0xd6, 0x36, 0xd8, 0x43, 0x5d, 0x6a, 0x1d, 0x90, 0x87, 0x32, 0x99,
-  0x17, 0x5c, 0xf3, 0xca, 0xce, 0x3a, 0xbf, 0xe2, 0x99, 0xa8, 0xd9, 0x71,
-  0x15, 0xe0, 0x31, 0x6c, 0x6a, 0xd3, 0x39, 0x21, 0x48, 0x72, 0xe9, 0x9f,
-  0x28, 0x62, 0x1b, 0xaf, 0x05, 0xd7, 0x37, 0xe6, 0x9f, 0x73, 0x0f, 0x61,
-  0xa0, 0x11, 0x29, 0x5e, 0x61, 0x09, 0x6a, 0x3c, 0xe9, 0x69, 0xf3, 0xe7,
-  0xb6, 0x30, 0x4a, 0x3b, 0xa2, 0x87, 0xb8, 0x60, 0x66, 0x5f, 0xbb, 0xd7,
-  0x90, 0x30, 0xe8, 0xc2, 0xb6, 0x85, 0x22, 0x3c, 0x41, 0x08, 0x18, 0x65,
-  0x02, 0xca, 0x82, 0x35, 0x90, 0x79, 0x80, 0xbe, 0x4b, 0x33, 0x1a, 0xb3,
-  0x88, 0xef, 0xed, 0xbc, 0xae, 0x20, 0x55, 0xa3, 0xf2, 0xb7, 0x2b, 0x86,
-  0x36, 0x74, 0xcf, 0x62, 0x25, 0x83, 0x17, 0x62, 0xef, 0x77, 0xc5, 0xfa,
-  0x6f, 0x1a, 0x8e, 0x3b, 0x93, 0xac, 0x36, 0xa8, 0x9e, 0x83, 0xa6, 0x99,
-  0xba, 0x32, 0xa9, 0xf0, 0xc5, 0xaa, 0xa7, 0x32, 0xe4, 0xf4, 0xd6, 0x35,
-  0x46, 0x3f, 0x69, 0x1b, 0x81, 0x72, 0x71, 0x94, 0x32, 0xd5, 0xc2, 0x65,
-  0x31, 0x3c, 0x76, 0x8c, 0x4c, 0xb1, 0xa1, 0xe0, 0x13, 0xca, 0x29, 0x61,
-  0x3a, 0x0d, 0x73, 0x8e, 0xc7, 0x5c, 0x4b, 0x8b, 0xeb, 0x91, 0x6a, 0xed,
-  0xbc, 0x20, 0x6e, 0x5e, 0x3c, 0xea, 0x8a, 0xb2, 0x0a, 0xa6, 0x37, 0xdf,
-  0x30, 0x54, 0x48, 0x7b, 0xc9, 0x62, 0x22, 0xc0, 0xfd, 0x25, 0xf7, 0x1c,
-  0x4c, 0x9e, 0xdd, 0x99, 0x49, 0x5c, 0xc0, 0xc6, 0x88, 0xf0, 0x59, 0xb9,
-  0x33, 0x40, 0x02, 0x98, 0xab, 0x33, 0x5b, 0xe2, 0xf2, 0xf1, 0x25, 0x94,
-  0xfb, 0x02, 0xd1, 0x11, 0x73, 0x06, 0x9d, 0x1d, 0x0a, 0x09, 0xe4, 0x73,
-  0xad, 0xe0, 0xae, 0xe3, 0x9c, 0xf8, 0x7c, 0x8a, 0x68, 0x2c, 0x0d, 0x4f,
-  0x39, 0xcf, 0x0a, 0x39, 0x6f, 0x90, 0xb4, 0x3b, 0xbe, 0xd2, 0x45, 0x67,
-  0x71, 0x43, 0x7d, 0x74, 0xa2, 0x6b, 0xd6, 0x55, 0x46, 0x59, 0x18, 0xdb,
-  0xa7, 0xdb, 0x32, 0x91, 0xc7, 0x5f, 0x5d, 0xc4, 0x57, 0x71, 0x32, 0xfd,
-  0xfd, 0xde, 0xce, 0x30, 0xbe, 0x5e, 0x4e, 0xe3, 0x3f, 0xe0, 0xc5, 0x57,
-  0x4f, 0x9e, 0xec, 0xed, 0x7c, 0xfa, 0xd9, 0x4e, 0xa7, 0xe6, 0x2a, 0x0a,
-  0xfc, 0xcc, 0x70, 0x1b, 0xa2, 0x34, 0x35, 0xf3, 0x5d, 0xf4, 0x33, 0x18,
-  0x5f, 0xa7, 0xdc, 0xcd, 0xd7, 0x2c, 0xbc, 0xe8, 0x1a, 0xc4, 0x08, 0xfe,
-  0x10, 0x36, 0xa9, 0x35, 0xb0, 0xe8, 0xc6, 0x25, 0xba, 0xfe, 0x64, 0x77,
-  0x5f, 0x58, 0xd9, 0x35, 0xec, 0x52, 0xb1, 0x50, 0x6c, 0xf4, 0x32, 0x9d,
-  0xd3, 0x0d, 0xf4, 0x79, 0x54, 0xc6, 0xd7, 0x8e, 0x56, 0xd1, 0x82, 0xab,
-  0x5a, 0x6d, 0x96, 0xf0, 0xab, 0x14, 0xf5, 0x93, 0x07, 0xd1, 0xe6, 0xa5,
-  0xc0, 0xc3, 0x41, 0xf0, 0x59, 0x24, 0xf9, 0x54, 0x32, 0x7b, 0xe3, 0x99,
-  0x85, 0x97, 0xf2, 0xfb, 0xec, 0x8c, 0x1f, 0x2c, 0xa6, 0xae, 0x46, 0x37,
-  0x34, 0xb0, 0xd4, 0x13, 0xdc, 0x74, 0x51, 0xf8, 0x9a, 0x50, 0x72, 0xdd,
-  0x84, 0xc0, 0x73, 0xb4, 0x58, 0xa8, 0x78, 0xd1, 0xc1, 0xac, 0x7a, 0xae,
-  0xb8, 0x4c, 0x7f, 0x62, 0x33, 0x1d, 0xe0, 0x77, 0x54, 0xde, 0xd3, 0x02,
-  0xc2, 0x9d, 0x85, 0xe4, 0x42, 0xb9, 0x82, 0x26, 0x9a, 0x3a, 0x5d, 0x99,
-  0x57, 0xec, 0x83, 0x40, 0xa2, 0x97, 0xa6, 0xe4, 0xee, 0x7e, 0xfe, 0x0a,
-  0x04, 0xb1, 0xfb, 0xf9, 0x1f, 0xdc, 0x67, 0x7b, 0xfa, 0xd9, 0xde, 0xe7,
-  0x7f, 0x18, 0x0c, 0x30, 0x3e, 0xa6, 0x90, 0xae, 0x7d, 0xdd, 0xd5, 0x04,
-  0xcb, 0x58, 0x8f, 0xb0, 0xfc, 0xe5, 0x50, 0x86, 0x64, 0xaf, 0x3b, 0xd6,
-  0x73, 0xb8, 0xca, 0x3d, 0xb5, 0xbd, 0x3b, 0xbe, 0x95, 0x1a, 0x38, 0x33,
-  0x10, 0x4c, 0x8b, 0xb6, 0x45, 0x77, 0x26, 0x42, 0xb4, 0x53, 0x38, 0x78,
-  0x96, 0x38, 0xfa, 0x23, 0x53, 0xea, 0x1f, 0x37, 0x22, 0x35, 0x91, 0xf3,
-  0x76, 0xa0, 0x04, 0x63, 0x64, 0x64, 0x4b, 0x8f, 0xc6, 0x06, 0x6f, 0xc7,
-  0x2d, 0x73, 0x44, 0x29, 0xdf, 0x81, 0x41, 0x51, 0x8f, 0x3f, 0x29, 0xc4,
-  0x91, 0x6c, 0x38, 0xf3, 0x33, 0xe4, 0x6e, 0x48, 0x06, 0x14, 0x49, 0x18,
-  0x25, 0xf3, 0x06, 0x3c, 0xf9, 0xfb, 0xef, 0xbf, 0x57, 0x71, 0x8a, 0x7e,
-  0xd1, 0x71, 0xdf, 0x10, 0x27, 0x9a, 0x10, 0x73, 0x9b, 0xa1, 0x74, 0x84,
-  0x56, 0x61, 0xd1, 0x0b, 0xff, 0x4a, 0xe7, 0x29, 0x8d, 0xd0, 0xc6, 0x4a,
-  0xcd, 0x62, 0x1e, 0x19, 0x96, 0xf4, 0x58, 0x98, 0x18, 0x28, 0x73, 0x13,
-  0xae, 0x40, 0x1f, 0x6a, 0x11, 0x12, 0x3e, 0xef, 0x1c, 0x36, 0x1d, 0xb4,
-  0x4f, 0x8d, 0x99, 0x1a, 0xac, 0x1b, 0x09, 0x8a, 0x15, 0x19, 0xe7, 0x55,
-  0x47, 0x1e, 0xbc, 0x4e, 0x3b, 0x6a, 0xe0, 0x95, 0x4f, 0x3a, 0x3e, 0x5f,
-  0x56, 0x76, 0x03, 0x5b, 0xf6, 0x4a, 0x04, 0xa7, 0xf4, 0xe7, 0xe4, 0xd5,
-  0xee, 0x4e, 0xfb, 0x13, 0xac, 0x0d, 0x45, 0x8c, 0x34, 0xfb, 0xca, 0x1b,
-  0xc8, 0x1f, 0x7b, 0x3e, 0x9d, 0xc8, 0xd3, 0x5a, 0x40, 0x11, 0x05, 0x65,
-  0x5e, 0x75, 0x46, 0x7c, 0xbf, 0xf2, 0xff, 0xaf, 0x19, 0x07, 0x82, 0xdb,
-  0xf4, 0xd9, 0x62, 0x39, 0x9a, 0xa5, 0x95, 0x01, 0x6f, 0xf3, 0x04, 0x3f,
-  0x87, 0x49, 0x25, 0x71, 0xb4, 0x81, 0xca, 0xbb, 0x22, 0xf9, 0x75, 0xaf,
-  0xb2, 0x6c, 0x14, 0xe7, 0x5d, 0x35, 0xa2, 0xda, 0x38, 0xbb, 0xbb, 0x7b,
-  0x4f, 0x9e, 0x3e, 0xeb, 0x0e, 0x54, 0x4a, 0x03, 0x83, 0x80, 0x62, 0x96,
-  0xaa, 0x2a, 0x23, 0x4d, 0xc4, 0x72, 0x3c, 0x2d, 0x76, 0x0b, 0x69, 0x6c,
-  0x6d, 0xce, 0x06, 0xe6, 0x61, 0xdc, 0xdd, 0x2b, 0xe9, 0xed, 0x0f, 0xdc,
-  0xcf, 0x2b, 0x74, 0xf1, 0x87, 0x74, 0xf2, 0xca, 0xcd, 0xf0, 0x0f, 0x3c,
-  0x97, 0x57, 0x3a, 0x09, 0xda, 0x57, 0xcb, 0x1b, 0x28, 0xb6, 0x36, 0x5a,
-  0xb9, 0x5a, 0xeb, 0xe6, 0xda, 0x26, 0x6e, 0x60, 0xd2, 0xf0, 0x74, 0xf5,
-  0x27, 0x62, 0xb9, 0x85, 0xac, 0xea, 0x83, 0xe6, 0xb7, 0x1f, 0xfa, 0xd4,
-  0x4a, 0x9f, 0x5b, 0xe9, 0x7b, 0x76, 0x1d, 0xcd, 0x38, 0x49, 0x86, 0x37,
-  0xa2, 0xa7, 0x99, 0x13, 0x53, 0xd8, 0x3a, 0x54, 0x10, 0xc8, 0x32, 0xf8,
-  0x91, 0x0e, 0xbf, 0x3a, 0xe9, 0xaa, 0x83, 0x56, 0x14, 0xb7, 0x5e, 0x9b,
-  0x71, 0xcd, 0x45, 0x4d, 0x28, 0xe2, 0xc2, 0x86, 0x41, 0xa1, 0xc7, 0xec,
-  0x6f, 0xe4, 0x7e, 0x25, 0xcd, 0x89, 0x3a, 0xd3, 0x3b, 0x67, 0xca, 0xe6,
-  0xba, 0x1c, 0x9f, 0x84, 0xcd, 0x00, 0xc1, 0x46, 0x1c, 0x8f, 0xb0, 0x54,
-  0x2f, 0x5c, 0x86, 0x44, 0xff, 0xb5, 0xf3, 0x06, 0xb8, 0x88, 0x7c, 0x7d,
-  0x94, 0xbe, 0x12, 0x6e, 0x62, 0x0c, 0xa2, 0xe3, 0xca, 0x6d, 0x09, 0x25,
-  0x84, 0xbc, 0x03, 0xbe, 0x8c, 0x51, 0x52, 0x29, 0xe2, 0x24, 0x62, 0x21,
-  0x73, 0xcf, 0x97, 0xae, 0x3e, 0xd3, 0xe7, 0x11, 0x6a, 0x1c, 0xc8, 0x5b,
-  0x1a, 0x73, 0x5f, 0xa9, 0x65, 0x8b, 0x97, 0x54, 0x39, 0x70, 0x9e, 0x8f,
-  0xc0, 0x6b, 0xab, 0x62, 0x81, 0xb4, 0x20, 0x13, 0x1d, 0xad, 0x54, 0xfd,
-  0xe7, 0x16, 0xba, 0x7f, 0xc6, 0x21, 0x78, 0xc9, 0xdb, 0x80, 0xaf, 0x3f,
-  0xef, 0x8a, 0x09, 0xcf, 0xbd, 0xcb, 0xc3, 0xa8, 0x79, 0x56, 0x84, 0x40,
-  0xc3, 0xf9, 0x64, 0x57, 0x0e, 0xba, 0x46, 0x64, 0x31, 0x4e, 0xa8, 0x9d,
-  0x43, 0x9d, 0x4a, 0x93, 0xe9, 0x44, 0x4b, 0xc8, 0xa9, 0x2c, 0xd4, 0xd3,
-  0xc6, 0x13, 0xce, 0x56, 0x66, 0xd9, 0xb1, 0xcb, 0x01, 0x38, 0x78, 0xaf,
-  0xeb, 0x90, 0x70, 0x58, 0xa4, 0x4e, 0xc0, 0xee, 0xf2, 0xc4, 0xca, 0xab,
-  0x6d, 0x68, 0x22, 0x9d, 0x97, 0xe5, 0xc3, 0x89, 0x15, 0x81, 0xe8, 0xe0,
-  0xf3, 0x12, 0x24, 0xdf, 0xba, 0x71, 0x44, 0x5e, 0x73, 0xd2, 0x8f, 0x76,
-  0xfa, 0x8a, 0x97, 0x7b, 0x77, 0x70, 0x9d, 0x5e, 0xc9, 0x62, 0x10, 0x8b,
-  0xbc, 0x4e, 0xb6, 0xe9, 0xcf, 0x1e, 0x7d, 0xbe, 0xc7, 0x32, 0x19, 0xff,
-  0xf2, 0x04, 0x7e, 0xfb, 0xf0, 0xe6, 0x0f, 0xce, 0x86, 0x3b, 0x17, 0xfc,
-  0x4b, 0xea, 0x6e, 0x7c, 0x35, 0x49, 0xeb, 0x28, 0x41, 0xe6, 0x0a, 0x32,
-  0xea, 0x05, 0xcd, 0x5e, 0x60, 0x6e, 0x06, 0xc8, 0x5c, 0x06, 0xe9, 0xa4,
-  0xf0, 0x61, 0x6e, 0xea, 0x58, 0x54, 0x31, 0x9d, 0xa5, 0xee, 0x54, 0x0d,
-  0x26, 0x1c, 0x54, 0x8c, 0x7b, 0x35, 0xb9, 0xdf, 0xea, 0x85, 0xc1, 0x43,
-  0x56, 0x55, 0xd4, 0x95, 0x3e, 0x46, 0xc6, 0x1d, 0x77, 0xbf, 0xa9, 0x75,
-  0xbc, 0x18, 0xb7, 0x42, 0x53, 0x83, 0xb0, 0xcd, 0x69, 0x7d, 0x07, 0xab,
-  0xa5, 0xb0, 0x24, 0xe0, 0x23, 0x2d, 0xca, 0x2d, 0xee, 0x26, 0x99, 0x16,
-  0xd0, 0xd4, 0x79, 0xd0, 0x1b, 0x51, 0xb0, 0xee, 0x86, 0x08, 0x82, 0xae,
-  0xba, 0x5c, 0x9b, 0x6b, 0x1b, 0xfe, 0x20, 0xe1, 0x6d, 0xc7, 0x33, 0x01,
-  0xc0, 0x07, 0xd9, 0x4e, 0xfb, 0x72, 0x5f, 0xaa, 0x10, 0xd4, 0x7f, 0x3d,
-  0x88, 0x4e, 0x11, 0xfa, 0x56, 0xc4, 0x92, 0x45, 0x6d, 0x77, 0xaa, 0x51,
-  0x00, 0x91, 0x8b, 0x48, 0xdd, 0x1b, 0x52, 0x94, 0x8c, 0x13, 0x57, 0x8d,
-  0x8c, 0x80, 0xd9, 0xe7, 0xd5, 0x4c, 0x91, 0x28, 0x54, 0x02, 0xe9, 0xc1,
-  0x0a, 0xed, 0x9e, 0x43, 0x89, 0x3a, 0x57, 0x22, 0x3b, 0x20, 0xd2, 0xa0,
-  0x11, 0x71, 0xe8, 0xab, 0xc8, 0x19, 0xb0, 0x72, 0x47, 0xf8, 0x92, 0x1f,
-  0x9b, 0x88, 0x99, 0x45, 0xcb, 0x18, 0x8b, 0x0f, 0x8b, 0x5a, 0x03, 0x65,
-  0xf1, 0xdc, 0x99, 0x74, 0x3a, 0xd0, 0x14, 0xa7, 0x89, 0x53, 0xa7, 0x15,
-  0x78, 0x58, 0x30, 0x80, 0x33, 0x85, 0x81, 0x12, 0x01, 0xc3, 0xfb, 0x17,
-  0x78, 0x90, 0x3c, 0xae, 0xf8, 0x8e, 0x7e, 0xe1, 0x4b, 0x7e, 0x94, 0xd3,
-  0x4e, 0x27, 0xb9, 0x5c, 0x07, 0xe8, 0x15, 0x18, 0x31, 0x0e, 0xe2, 0xf3,
-  0xcd, 0x69, 0x64, 0xd9, 0xe8, 0x57, 0x5e, 0x38, 0xb4, 0xa8, 0x1d, 0x4c,
-  0x51, 0x6d, 0x21, 0x22, 0x01, 0xe9, 0x53, 0x72, 0xb3, 0xc9, 0xda, 0x72,
-  0x42, 0x5b, 0xc4, 0x8b, 0x53, 0x39, 0xa6, 0xc1, 0x13, 0xf2, 0x2a, 0xd3,
-  0x0e, 0x91, 0x46, 0x97, 0x97, 0xa0, 0xdb, 0x8b, 0xba, 0x3c, 0x54, 0xfe,
-  0xa2, 0x8b, 0xf5, 0xc4, 0xc7, 0xc1, 0xf2, 0x75, 0x07, 0x2d, 0x27, 0x8f,
-  0x9f, 0x79, 0xf5, 0x45, 0x65, 0x95, 0xf0, 0xb9, 0x35, 0xf5, 0x4a, 0xa2,
-  0x65, 0x1b, 0x52, 0xb6, 0xbd, 0x1b, 0xb4, 0xff, 0xea, 0x90, 0x5a, 0x91,
-  0x22, 0x70, 0xb2, 0x27, 0x10, 0xa8, 0xdd, 0x67, 0x29, 0xd2, 0x6e, 0x1a,
-  0x0d, 0x7d, 0xf8, 0xe4, 0x5e, 0x1a, 0xfb, 0x71, 0xe1, 0x41, 0xc2, 0xd1,
-  0x84, 0x04, 0x8c, 0xdb, 0xd2, 0x6e, 0xa6, 0xa2, 0xe9, 0xdd, 0x67, 0xb0,
-  0x2b, 0x80, 0xcf, 0xec, 0x0e, 0x90, 0x86, 0xe1, 0x61, 0x83, 0x5c, 0x03,
-  0x4e, 0x5d, 0xef, 0x60, 0x41, 0x3b, 0x66, 0x26, 0x71, 0x4a, 0xbc, 0xad,
-  0x72, 0x1b, 0xbf, 0x5a, 0xa4, 0x63, 0xd4, 0x74, 0x7d, 0xf5, 0xc5, 0x24,
-  0xbb, 0x66, 0x6e, 0xd5, 0xa3, 0x8b, 0x95, 0x7f, 0x76, 0xf8, 0xe1, 0x3d,
-  0xed, 0x54, 0x06, 0x8c, 0xb3, 0x22, 0x72, 0xbb, 0xfd, 0xbd, 0x26, 0x7c,
-  0x89, 0x1a, 0x9e, 0x64, 0x63, 0x6d, 0xdb, 0x35, 0x2d, 0xfb, 0x41, 0xed,
-  0xbb, 0x2f, 0xc2, 0xbe, 0x6c, 0x71, 0x62, 0x6d, 0x59, 0x8a, 0xf1, 0x4d,
-  0xd3, 0x52, 0xae, 0x6f, 0x87, 0x21, 0x0f, 0x93, 0x16, 0xd7, 0xd3, 0x90,
-  0xbb, 0x6a, 0xaa, 0xb9, 0x01, 0xdd, 0x2f, 0xba, 0x12, 0xea, 0xd8, 0x7d,
-  0xd9, 0x05, 0xd7, 0x62, 0x5e, 0x64, 0x88, 0xc1, 0x7a, 0x21, 0x75, 0xe5,
-  0x26, 0xec, 0x8b, 0xbc, 0xa0, 0x85, 0x12, 0x2b, 0xd1, 0x29, 0xcc, 0x30,
-  0x4c, 0x71, 0x0c, 0x03, 0x6b, 0x60, 0x18, 0xf0, 0x25, 0x02, 0x19, 0x85,
-  0x67, 0x54, 0x8a, 0x4b, 0x5a, 0x2f, 0x5a, 0x88, 0x62, 0x48, 0x6a, 0x2e,
-  0xd8, 0xe1, 0x2a, 0x86, 0xcd, 0xe5, 0x7c, 0xc1, 0x29, 0x6c, 0x63, 0x54,
-  0x10, 0xd6, 0xb3, 0x34, 0x88, 0xde, 0xcd, 0x05, 0xe3, 0x2f, 0x61, 0xf5,
-  0x38, 0xf4, 0x97, 0xf7, 0x9c, 0xdf, 0x9f, 0x16, 0xaa, 0xe2, 0x4f, 0x0c,
-  0x07, 0x2c, 0xe6, 0x10, 0x31, 0x5b, 0x6b, 0xbf, 0x7c, 0xb5, 0xe6, 0x1c,
-  0x8d, 0xa0, 0x66, 0x69, 0x48, 0x02, 0x2e, 0xb9, 0x59, 0x19, 0x10, 0x7b,
-  0xe7, 0x8e, 0x5f, 0x1f, 0x5f, 0x5c, 0x1c, 0x5f, 0xf0, 0x7a, 0x1f, 0x54,
-  0xb1, 0xfa, 0x6f, 0x34, 0x32, 0xda, 0xa3, 0xd0, 0x59, 0x44, 0x58, 0xb3,
-  0x84, 0xb3, 0x70, 0x42, 0x85, 0x8d, 0xda, 0x88, 0xcc, 0xcf, 0x2d, 0x19,
-  0xfd, 0x62, 0x10, 0x86, 0x35, 0x11, 0xf1, 0x80, 0xce, 0x72, 0x3f, 0xe5,
-  0x6b, 0x45, 0x20, 0xf7, 0x43, 0x61, 0x62, 0x23, 0xb2, 0x57, 0x73, 0xad,
-  0xb5, 0x82, 0xab, 0xda, 0x74, 0xc7, 0x40, 0x2e, 0x1d, 0x68, 0x08, 0x57,
-  0xa2, 0xde, 0x6b, 0x5f, 0x47, 0x1d, 0xf3, 0xbd, 0xe2, 0x03, 0xca, 0xaa,
-  0x12, 0x56, 0xa2, 0x28, 0x97, 0x8b, 0x74, 0xe2, 0x8c, 0xbb, 0xf4, 0x39,
-  0xc9, 0x7b, 0x91, 0x1c, 0xf1, 0xc2, 0x46, 0x0c, 0x67, 0xa2, 0xd9, 0x1e,
-  0x42, 0xe3, 0x9a, 0x24, 0xd0, 0x7b, 0xd3, 0x18, 0x62, 0xfe, 0xa5, 0x40,
-  0xa7, 0xe2, 0x83, 0xd7, 0xb2, 0xd3, 0x94, 0xf0, 0x13, 0x18, 0x15, 0x99,
-  0x55, 0x58, 0xac, 0x40, 0xc8, 0x16, 0xd8, 0x74, 0x35, 0xf3, 0x81, 0x90,
-  0xbe, 0x78, 0xe2, 0x05, 0x92, 0x52, 0xf2, 0xfd, 0xe8, 0xc7, 0x22, 0x1d,
-  0xff, 0xe4, 0x6f, 0x0e, 0x84, 0x30, 0xfb, 0x58, 0x45, 0x89, 0x2d, 0xa0,
-  0xc9, 0xeb, 0x42, 0xa9, 0xee, 0x2b, 0xc9, 0x60, 0xef, 0x86, 0xc7, 0x17,
-  0xd1, 0xc1, 0x57, 0x8c, 0x64, 0xf5, 0xaf, 0xed, 0x2e, 0x3f, 0xa7, 0x37,
-  0x83, 0xed, 0xad, 0xa6, 0x1f, 0x27, 0x66, 0xf8, 0xd6, 0x1a, 0x11, 0xe1,
-  0xc6, 0xa6, 0x56, 0x29, 0x27, 0xc8, 0x13, 0xad, 0x6c, 0xe1, 0x46, 0xf4,
-  0xc1, 0x4d, 0xfc, 0x98, 0x2d, 0xe4, 0x03, 0x16, 0x6e, 0xa2, 0xe0, 0x16,
-  0x88, 0x03, 0xc2, 0xb6, 0x46, 0x47, 0x5f, 0x34, 0xd4, 0x4c, 0xd9, 0xa4,
-  0x83, 0xa8, 0xfb, 0x26, 0xfb, 0x99, 0x04, 0x81, 0x78, 0xfb, 0xc9, 0x60,
-  0x27, 0xda, 0xfc, 0x2e, 0x9d, 0xbf, 0x78, 0xf6, 0xe7, 0xe8, 0x64, 0xab,
-  0x5b, 0x09, 0xf2, 0x14, 0xc8, 0xea, 0x51, 0x3c, 0xbf, 0x75, 0x3b, 0x76,
-  0x86, 0x53, 0x2d, 0xa1, 0x2b, 0x06, 0x7c, 0x2a, 0x55, 0x18, 0xd7, 0xb6,
-  0x88, 0xa4, 0x2a, 0x8d, 0x17, 0x8d, 0xbe, 0x75, 0xe0, 0x7b, 0xac, 0xd3,
-  0xd3, 0x53, 0x13, 0x5e, 0xba, 0x17, 0xcf, 0x1a, 0x4d, 0x3c, 0x75, 0x6d,
-  0xbc, 0x93, 0x36, 0x7e, 0x61, 0x13, 0x7b, 0x83, 0x9d, 0xbd, 0x68, 0xf3,
-  0x6c, 0xb8, 0xbd, 0xe7, 0x5a, 0x68, 0x36, 0xb1, 0x87, 0x26, 0xf8, 0xa1,
-  0xea, 0xcb, 0x4f, 0xb9, 0xff, 0x1f, 0x93, 0xf9, 0x4f, 0xd1, 0xe6, 0xf7,
-  0xbb, 0xbb, 0xd4, 0xc0, 0x9f, 0xa3, 0x83, 0x93, 0xef, 0xa3, 0xa7, 0x03,
-  0x6a, 0xec, 0x6d, 0x7c, 0xa7, 0xcd, 0x29, 0x5e, 0xd5, 0x10, 0x8d, 0xd0,
-  0xf7, 0x8d, 0x36, 0x9e, 0xd5, 0xda, 0x38, 0x25, 0x3d, 0xf0, 0x81, 0xae,
-  0x94, 0x9d, 0xc1, 0x93, 0xbd, 0x28, 0x7d, 0xf6, 0xd9, 0x73, 0x6b, 0x48,
-  0xdb, 0xc0, 0xf7, 0x55, 0xdb, 0xa4, 0x64, 0x34, 0x93, 0x98, 0x73, 0xfc,
-  0x40, 0xcc, 0x0c, 0x1c, 0x02, 0x30, 0xb1, 0x37, 0x71, 0x3e, 0x51, 0x72,
-  0xe3, 0x02, 0x32, 0xb4, 0x53, 0x8a, 0x84, 0x96, 0xc0, 0x48, 0x49, 0x97,
-  0xe6, 0x7e, 0x63, 0x38, 0xac, 0x8b, 0xda, 0xa3, 0x7f, 0x8e, 0xde, 0x0c,
-  0x4f, 0x8e, 0x69, 0x46, 0x3b, 0x34, 0x34, 0xbf, 0x86, 0x32, 0x20, 0x7c,
-  0x85, 0xc5, 0xa5, 0x55, 0xdd, 0xe0, 0xbc, 0x1f, 0xb4, 0x61, 0x32, 0xb6,
-  0x44, 0x74, 0x31, 0x44, 0x65, 0x56, 0x14, 0xe8, 0xf7, 0x1d, 0xd1, 0x5a,
-  0xff, 0xe0, 0x9a, 0x55, 0x06, 0xb9, 0x66, 0xd1, 0xf5, 0x37, 0xd9, 0x9c,
-  0x8e, 0x49, 0x9e, 0xe5, 0x1c, 0xe6, 0xd1, 0xad, 0x48, 0x0a, 0xdf, 0x1c,
-  0x1d, 0x4b, 0x4e, 0xde, 0x9b, 0x78, 0x4e, 0x2c, 0x92, 0xd1, 0x2b, 0x8a,
-  0x5b, 0xf6, 0xba, 0x8b, 0xf3, 0x46, 0xde, 0x3f, 0x5d, 0xcd, 0x1f, 0x68,
-  0x1f, 0x3f, 0x1d, 0xec, 0x32, 0x82, 0x1f, 0x6b, 0xb9, 0xaf, 0xdf, 0xd0,
-  0xdf, 0xbb, 0x4f, 0xbb, 0x11, 0x7f, 0x55, 0xd5, 0xd8, 0xed, 0xbc, 0x6e,
-  0x1c, 0x9e, 0x9d, 0x7d, 0x73, 0x22, 0x01, 0x18, 0x87, 0x6a, 0x44, 0x65,
-  0xc1, 0xca, 0x69, 0xc1, 0xc2, 0x5c, 0x49, 0x5b, 0xf3, 0xf1, 0xe3, 0x70,
-  0xbd, 0xdd, 0x26, 0xc9, 0x02, 0x90, 0x7b, 0x35, 0x8e, 0x50, 0x2a, 0x8b,
-  0x96, 0x91, 0xb1, 0x20, 0x9d, 0x4e, 0xaa, 0xc8, 0x1b, 0x05, 0xa3, 0xa1,
-  0x99, 0xc1, 0x76, 0xb4, 0x72, 0x79, 0xbf, 0xb1, 0x2f, 0x78, 0x89, 0x21,
-  0xba, 0x28, 0x56, 0x33, 0x38, 0x4b, 0xc5, 0x7b, 0x7a, 0x51, 0x75, 0xdd,
-  0xee, 0x30, 0x29, 0xfb, 0x32, 0xe8, 0x7d, 0xb5, 0xd1, 0x76, 0xd5, 0xe0,
-  0xe4, 0xcc, 0x65, 0x0b, 0xc5, 0xdf, 0x85, 0xa1, 0x78, 0xb5, 0xe0, 0xc2,
-  0x9c, 0x53, 0x57, 0x3b, 0x19, 0x85, 0x67, 0x13, 0xc4, 0x12, 0xbd, 0x3d,
-  0x78, 0x73, 0xfc, 0xea, 0xdb, 0x83, 0xd3, 0x77, 0xc7, 0xf4, 0x0a, 0x23,
-  0xd0, 0x6e, 0xfa, 0x78, 0x23, 0x8c, 0x71, 0x96, 0x8e, 0xb3, 0x29, 0xfb,
-  0x94, 0xba, 0x7f, 0xee, 0x6e, 0x48, 0x78, 0x65, 0xd4, 0xe1, 0xb7, 0x76,
-  0xe5, 0x35, 0xa2, 0x0b, 0xfe, 0x6b, 0x4f, 0xfe, 0xda, 0xfb, 0x73, 0x67,
-  0xab, 0x32, 0xe9, 0x86, 0x56, 0xcc, 0xf4, 0x72, 0x2f, 0x71, 0x75, 0xa8,
-  0x08, 0x83, 0x98, 0x5e, 0x59, 0x95, 0x8e, 0x79, 0x64, 0xec, 0x6a, 0xe3,
-  0x67, 0x37, 0x47, 0xab, 0x50, 0xe7, 0xee, 0xf0, 0x4b, 0xaf, 0x20, 0x5c,
-  0x74, 0x38, 0xe7, 0x49, 0xc5, 0x0d, 0x38, 0xab, 0xb9, 0x0d, 0x6b, 0x22,
-  0x79, 0x58, 0x70, 0xf8, 0xd6, 0x66, 0x47, 0x7e, 0x79, 0x75, 0x74, 0x70,
-  0x79, 0xcc, 0x2f, 0x58, 0xf7, 0x56, 0xc2, 0xdb, 0x22, 0x6f, 0x79, 0x3c,
-  0x9b, 0x1d, 0xf9, 0xf0, 0x15, 0x4f, 0xa8, 0x23, 0xf5, 0x14, 0x04, 0x4c,
-  0xb2, 0x36, 0xae, 0x6c, 0xae, 0x41, 0x8c, 0x41, 0x3a, 0x62, 0x61, 0x71,
-  0x22, 0x9b, 0x1d, 0xf9, 0xae, 0xe3, 0xec, 0xb5, 0x5a, 0xa4, 0x56, 0x9d,
-  0x93, 0x13, 0xc4, 0xe5, 0x36, 0xd2, 0x83, 0xa4, 0x2e, 0x94, 0xdf, 0x1f,
-  0x75, 0x4d, 0x88, 0x85, 0x29, 0x00, 0xd4, 0x73, 0x1b, 0xaf, 0xd9, 0x93,
-  0x6c, 0x53, 0xca, 0xb2, 0xdd, 0xbd, 0x27, 0x7f, 0xc6, 0x7a, 0xbe, 0xea,
-  0x6c, 0xd3, 0xdd, 0xd0, 0xf9, 0x33, 0x77, 0x9d, 0x96, 0x41, 0x69, 0x19,
-  0xed, 0x86, 0x75, 0x29, 0xa5, 0x28, 0x09, 0x52, 0xe1, 0x5d, 0x87, 0x2d,
-  0x4c, 0xe6, 0x85, 0x05, 0xbd, 0x97, 0xec, 0x01, 0x4b, 0xa8, 0x37, 0xf7,
-  0x3d, 0xf6, 0x0b, 0xe5, 0x11, 0xe7, 0x0e, 0x86, 0x55, 0xba, 0x0b, 0xef,
-  0x8f, 0x9e, 0xbc, 0x2b, 0x73, 0xd4, 0x82, 0x37, 0xdc, 0xe7, 0x6c, 0x65,
-  0x09, 0x06, 0xe8, 0x0b, 0xf2, 0xb8, 0xec, 0x59, 0x43, 0x2a, 0x1e, 0xa9,
-  0x2d, 0xc7, 0x14, 0x11, 0x88, 0x04, 0xc4, 0x5a, 0x56, 0x90, 0x93, 0xc4,
-  0xdf, 0x1f, 0x84, 0x39, 0xd8, 0x9d, 0x1d, 0x8f, 0x38, 0x53, 0xce, 0x45,
-  0x53, 0x07, 0x5a, 0xb8, 0x5b, 0x7a, 0x3b, 0x7e, 0x69, 0x00, 0x9e, 0xc0,
-  0x17, 0xa5, 0xac, 0x65, 0xe1, 0x6c, 0x46, 0xf0, 0x2d, 0xea, 0xb3, 0xd5,
-  0x7d, 0xaa, 0xe5, 0x29, 0x60, 0x1a, 0xa2, 0xc2, 0x8b, 0x6e, 0x4c, 0xac,
-  0x66, 0x9e, 0xe4, 0x8f, 0x86, 0x38, 0xb4, 0xb8, 0x9e, 0x30, 0xc5, 0x20,
-  0xcd, 0x85, 0xdf, 0x19, 0x0c, 0x06, 0xbe, 0xe4, 0x09, 0x6f, 0x8b, 0x7a,
-  0x9c, 0x80, 0x9e, 0x1e, 0x20, 0xbc, 0x61, 0x8d, 0x37, 0x21, 0xc8, 0x43,
-  0x98, 0xde, 0xd2, 0x70, 0x17, 0xb5, 0x46, 0xb8, 0xa3, 0x11, 0xd8, 0x34,
-  0xba, 0xda, 0x6d, 0xd7, 0xb2, 0x3e, 0x6f, 0xdb, 0x36, 0xe1, 0x91, 0xb1,
-  0x89, 0xad, 0xb1, 0x88, 0x01, 0x43, 0xe0, 0xf8, 0x54, 0xe6, 0xd6, 0x82,
-  0x29, 0x98, 0xa1, 0x09, 0xa4, 0xde, 0x2b, 0xb6, 0x44, 0x16, 0x4d, 0x87,
-  0xa2, 0xc5, 0x7c, 0x98, 0xc9, 0x65, 0xf7, 0xc8, 0xe4, 0x44, 0xbe, 0x28,
-  0x47, 0x7f, 0xcc, 0xc5, 0x34, 0x60, 0x37, 0x88, 0xc3, 0x37, 0xb6, 0x76,
-  0x26, 0x62, 0x9a, 0x65, 0x7d, 0x19, 0x72, 0xbf, 0x66, 0xbf, 0x68, 0x3e,
-  0x7b, 0x11, 0x2b, 0x0e, 0x18, 0x89, 0x6d, 0xd9, 0x0c, 0x4e, 0x2e, 0x9d,
-  0xbc, 0x37, 0x93, 0x70, 0x8c, 0x57, 0x5f, 0x32, 0xc2, 0x2d, 0x41, 0xc5,
-  0xb8, 0x87, 0xe6, 0x04, 0x3f, 0xe6, 0x1d, 0x1f, 0x5b, 0x8b, 0xce, 0x35,
-  0x5e, 0x5b, 0x1b, 0x7f, 0x2b, 0x57, 0x59, 0x17, 0xad, 0xa8, 0x58, 0x93,
-  0x25, 0xf7, 0xd6, 0xf3, 0xbd, 0x28, 0xbe, 0xe7, 0xca, 0x3b, 0x44, 0x83,
-  0xe2, 0x26, 0x13, 0x8b, 0xcc, 0x69, 0x60, 0x57, 0x74, 0x33, 0xb4, 0xd2,
-  0xd6, 0xb1, 0xaf, 0x6d, 0x6d, 0xe0, 0xb7, 0x02, 0x68, 0x67, 0x06, 0xbc,
-  0x14, 0xa5, 0x53, 0x18, 0x80, 0x4c, 0x05, 0x75, 0x53, 0xcd, 0x79, 0xe4,
-  0xc4, 0xa2, 0x87, 0x4a, 0x37, 0x29, 0xa2, 0x01, 0xd9, 0xc6, 0x21, 0x51,
-  0x14, 0xb6, 0x5a, 0x52, 0xd7, 0xdc, 0x3a, 0x71, 0xde, 0x68, 0x98, 0x9b,
-  0x58, 0x9e, 0x9e, 0x67, 0xf3, 0xbe, 0xab, 0xa5, 0xe4, 0x22, 0xae, 0xf2,
-  0xf4, 0xfa, 0x5a, 0x34, 0xb6, 0xa8, 0x3e, 0xb5, 0x76, 0x22, 0x3b, 0xe5,
-  0x55, 0xe1, 0x90, 0xcd, 0xd5, 0xba, 0xd5, 0xbc, 0x74, 0x35, 0x5b, 0xd5,
-  0xe2, 0x52, 0x21, 0x66, 0xf3, 0x40, 0xca, 0xbe, 0x95, 0xa8, 0x79, 0x83,
-  0x34, 0x4b, 0x36, 0x7b, 0x55, 0x3d, 0xc6, 0x67, 0x17, 0xcc, 0xc4, 0x0a,
-  0xb7, 0xe5, 0xdd, 0xc2, 0x6d, 0x3a, 0x00, 0x74, 0x7c, 0xbc, 0xc9, 0x84,
-  0xed, 0xca, 0x33, 0xbe, 0x8a, 0xef, 0x5d, 0xb0, 0x93, 0x20, 0x0a, 0x8f,
-  0x62, 0xaf, 0x71, 0x6d, 0x44, 0x15, 0xeb, 0x6e, 0x81, 0x1a, 0xdd, 0xca,
-  0x87, 0xb2, 0xbb, 0xc4, 0xa3, 0x38, 0x79, 0x03, 0xa3, 0x07, 0xde, 0xd3,
-  0xd3, 0xef, 0x98, 0x49, 0xcd, 0x9d, 0xeb, 0xf8, 0x15, 0x26, 0x59, 0x5b,
-  0x95, 0x41, 0x14, 0x34, 0x29, 0x66, 0x92, 0x2c, 0x64, 0xf1, 0x32, 0x36,
-  0xf5, 0x52, 0x5b, 0x8b, 0x1a, 0xcb, 0x8f, 0x1c, 0xf1, 0x40, 0x35, 0x11,
-  0xcc, 0x5c, 0xa5, 0xaa, 0xc2, 0x45, 0xc6, 0x79, 0x6f, 0xaf, 0xcd, 0xb2,
-  0xe3, 0x36, 0xa9, 0x83, 0x94, 0x93, 0x91, 0x12, 0x01, 0x68, 0x80, 0x05,
-  0x3a, 0xe7, 0xb0, 0x3f, 0x98, 0xc6, 0x1c, 0xb2, 0x92, 0x49, 0x2c, 0x00,
-  0xb6, 0x0c, 0x44, 0x0d, 0x43, 0x5a, 0x8d, 0xa7, 0x36, 0x8e, 0x9f, 0x8b,
-  0xcd, 0x10, 0x5a, 0x03, 0x04, 0x1f, 0x37, 0x43, 0x54, 0x82, 0xa0, 0xdc,
-  0xb1, 0x31, 0xf7, 0xc7, 0xd3, 0x2f, 0x47, 0x95, 0x33, 0xfa, 0xa1, 0x23,
-  0x7b, 0x7e, 0x71, 0xf6, 0xd5, 0xc5, 0xf1, 0x70, 0x18, 0xbd, 0x39, 0xbe,
-  0x14, 0x95, 0xff, 0x52, 0xe2, 0xe0, 0x04, 0x88, 0x19, 0x6e, 0x06, 0x43,
-  0x83, 0xb0, 0x58, 0x13, 0xb3, 0x27, 0x00, 0x39, 0x36, 0x63, 0x17, 0x1a,
-  0x44, 0x39, 0xa8, 0xf3, 0x53, 0x0d, 0x9f, 0xbb, 0x81, 0xa1, 0x1f, 0xc1,
-  0x4c, 0xf0, 0x44, 0x3a, 0xbb, 0xb9, 0xb7, 0xa6, 0x42, 0x46, 0x96, 0xf0,
-  0xa6, 0x1b, 0xe3, 0x5c, 0xde, 0x7a, 0xce, 0xb7, 0x37, 0xfd, 0xc4, 0xf4,
-  0x7e, 0x1f, 0x5d, 0x5a, 0x61, 0xf2, 0xdf, 0x93, 0x1a, 0xac, 0xf4, 0xf1,
-  0xfb, 0xe8, 0x7b, 0x6a, 0x73, 0x42, 0xab, 0xae, 0xc5, 0x26, 0x87, 0x28,
-  0x28, 0xe2, 0x8b, 0xb6, 0xa0, 0xdc, 0x45, 0x58, 0x48, 0x68, 0x99, 0xe7,
-  0x1f, 0x28, 0x6e, 0x8c, 0x84, 0x79, 0x01, 0x50, 0xd0, 0x60, 0x3a, 0xd7,
-  0x33, 0xbf, 0x0d, 0x50, 0xd0, 0xd3, 0xe4, 0xaa, 0x84, 0x40, 0xc2, 0xdd,
-  0x51, 0x73, 0x3b, 0x0c, 0xd5, 0xb8, 0xfb, 0x86, 0x3f, 0xda, 0x89, 0x9e,
-  0x7c, 0xf6, 0x7c, 0xe7, 0x33, 0xf9, 0xd5, 0xfe, 0x7d, 0xf1, 0x74, 0x47,
-  0x21, 0x4f, 0xe9, 0xaf, 0xa7, 0xfb, 0x4f, 0x77, 0xf7, 0x19, 0x8a, 0x69,
-  0x67, 0x7f, 0x87, 0xfe, 0xff, 0xa9, 0x7e, 0xc2, 0x78, 0x53, 0x2f, 0xf6,
-  0x3e, 0xfb, 0x14, 0x61, 0x30, 0x4c, 0x1f, 0x53, 0xea, 0xa4, 0x5f, 0x66,
-  0x7d, 0xe0, 0x55, 0x40, 0x08, 0xfa, 0x7d, 0xd5, 0x20, 0xc9, 0x7e, 0x75,
-  0x2e, 0x1a, 0xc9, 0x13, 0x77, 0xa5, 0xa8, 0xcd, 0xb8, 0x2a, 0x69, 0xfc,
-  0x61, 0xb9, 0x5c, 0x37, 0x0d, 0x7d, 0x5b, 0x2a, 0x96, 0x02, 0x00, 0xa6,
-  0xf2, 0x0e, 0x89, 0x8c, 0x92, 0x43, 0x15, 0xbe, 0xfc, 0x4b, 0xba, 0xb6,
-  0x5c, 0xc3, 0x0d, 0x20, 0xc8, 0xe8, 0x56, 0xe9, 0x7b, 0x63, 0x59, 0x42,
-  0xa2, 0x91, 0xa0, 0x0c, 0x6b, 0xad, 0x68, 0xea, 0x2f, 0xed, 0x4f, 0x0c,
-  0x58, 0xfc, 0x96, 0x52, 0x43, 0xd4, 0xec, 0xcd, 0xaa, 0xc7, 0xb6, 0xf5,
-  0x55, 0x21, 0x9e, 0x0d, 0xbf, 0xfd, 0x7e, 0xa5, 0x82, 0x2a, 0xab, 0x0e,
-  0x3f, 0x45, 0x6a, 0xd7, 0xb4, 0x4c, 0xb9, 0xd1, 0xdc, 0xbb, 0x45, 0xd8,
-  0xde, 0xc7, 0x34, 0xe7, 0x67, 0x04, 0x0a, 0x76, 0x3b, 0xd7, 0x0f, 0x36,
-  0x27, 0x95, 0x88, 0x36, 0x57, 0x18, 0xd5, 0x30, 0xc0, 0x5c, 0xf5, 0x44,
-  0xbc, 0xea, 0x48, 0xb6, 0x2f, 0x6f, 0xa8, 0xf8, 0x59, 0x20, 0x33, 0x48,
-  0x04, 0x85, 0xbb, 0x0c, 0xb7, 0xbd, 0x3c, 0x6f, 0x94, 0xdd, 0xe8, 0x8a,
-  0xa9, 0x31, 0xe8, 0x4f, 0xfb, 0xc0, 0x79, 0x72, 0x87, 0xee, 0xd1, 0xa9,
-  0xf9, 0xe0, 0x76, 0x57, 0xb9, 0x67, 0xd3, 0x05, 0x8b, 0xb7, 0x1d, 0x49,
-  0xff, 0x1c, 0xe2, 0xc7, 0x5d, 0x73, 0xe1, 0x45, 0x84, 0xb2, 0x4d, 0x8a,
-  0xda, 0xcc, 0xd0, 0x62, 0x0c, 0xc4, 0xbb, 0x65, 0x2c, 0xac, 0xff, 0x89,
-  0x8b, 0xd7, 0xc2, 0xbd, 0xa6, 0xe0, 0xf3, 0xb1, 0x50, 0xfe, 0x34, 0x4c,
-  0x2b, 0xab, 0xc0, 0xce, 0x87, 0x80, 0xb7, 0x1b, 0x52, 0x47, 0x99, 0x6e,
-  0x5a, 0xba, 0x39, 0x82, 0x12, 0x65, 0xbf, 0xdb, 0xd8, 0x18, 0x9e, 0x1f,
-  0x1f, 0x1f, 0x45, 0xa7, 0x27, 0x6f, 0x4e, 0x2e, 0x03, 0x81, 0xdc, 0x5d,
-  0x24, 0x66, 0x70, 0x2d, 0xac, 0x4e, 0x4d, 0x75, 0x39, 0x3c, 0xc2, 0xa2,
-  0xf4, 0x67, 0x57, 0xf9, 0x2c, 0xd1, 0x34, 0x86, 0x69, 0xfd, 0x3d, 0xa8,
-  0xde, 0x00, 0xaa, 0x40, 0x2d, 0x11, 0x2f, 0xd0, 0x15, 0x24, 0xdc, 0x8c,
-  0x5d, 0x45, 0xa3, 0xfe, 0x0f, 0x1a, 0xa0, 0x51, 0x95, 0x9c, 0x14, 0x28,
-  0xce, 0x15, 0xac, 0xd2, 0xa0, 0xd6, 0xda, 0xa8, 0x78, 0x6d, 0x93, 0xa9,
-  0x16, 0x4d, 0x75, 0x16, 0x3a, 0xc4, 0xeb, 0xdd, 0x27, 0x48, 0x88, 0x9d,
-  0xa5, 0x02, 0x57, 0x1d, 0x06, 0x13, 0xbb, 0x0a, 0x31, 0x97, 0x99, 0xf0,
-  0xf1, 0xb0, 0xc7, 0xb0, 0x78, 0x97, 0x45, 0xd2, 0x5a, 0x5f, 0x61, 0x59,
-  0xa8, 0x27, 0x3b, 0x2e, 0x5f, 0x60, 0x01, 0x9e, 0xa3, 0xa2, 0x3e, 0x77,
-  0xb6, 0x1b, 0x91, 0x3c, 0xb2, 0x64, 0xa9, 0x3e, 0x5f, 0xce, 0x1b, 0xd7,
-  0xdd, 0x0f, 0xf2, 0x2e, 0xcd, 0xff, 0xf9, 0x0e, 0xae, 0xb7, 0xab, 0x38,
-  0xef, 0x93, 0xe4, 0xb5, 0xea, 0x9b, 0x71, 0x55, 0x28, 0x42, 0x03, 0x8d,
-  0xc5, 0xf4, 0x93, 0xf8, 0x7a, 0x26, 0x35, 0x69, 0xd1, 0x27, 0x7d, 0x64,
-  0x70, 0x49, 0x4e, 0xf5, 0x00, 0xf0, 0xd4, 0x7b, 0x11, 0xaa, 0x71, 0xbb,
-  0xd0, 0x67, 0x91, 0x75, 0x3c, 0x88, 0xa0, 0xed, 0xa2, 0xe7, 0x51, 0xa8,
-  0xf0, 0x9a, 0xa9, 0x73, 0x28, 0xe5, 0x69, 0xea, 0x5c, 0x9a, 0xa2, 0xf5,
-  0x2c, 0xda, 0xfd, 0x8c, 0xe7, 0xf1, 0x71, 0xf3, 0xe1, 0xba, 0x1d, 0x16,
-  0xc5, 0x26, 0xea, 0x42, 0xe6, 0x77, 0x53, 0xf2, 0x12, 0x80, 0xcc, 0x2e,
-  0xab, 0x6b, 0xd1, 0xb0, 0x88, 0xd6, 0x63, 0xfd, 0x44, 0x5d, 0xe9, 0xb0,
-  0x4c, 0xc1, 0xb7, 0x2d, 0x12, 0x12, 0x2a, 0x54, 0xca, 0xba, 0xb0, 0xad,
-  0x55, 0xa2, 0xf5, 0xba, 0xb9, 0xcf, 0x98, 0xc3, 0x32, 0xb0, 0x75, 0x84,
-  0x68, 0xed, 0x3e, 0x9d, 0x40, 0xaa, 0x36, 0x23, 0x00, 0xe8, 0x4f, 0x88,
-  0x4f, 0x82, 0xa4, 0xe1, 0xba, 0x84, 0xcf, 0xd3, 0x8d, 0x4c, 0x05, 0x18,
-  0x5e, 0xd6, 0x0c, 0xc6, 0x85, 0x4d, 0xc8, 0x0f, 0x5c, 0x72, 0xa6, 0xea,
-  0x1a, 0x60, 0xd6, 0xdc, 0xf1, 0xbd, 0x70, 0xe0, 0x7e, 0x59, 0x4e, 0xcd,
-  0xae, 0xe0, 0x6b, 0x4a, 0x54, 0xe7, 0xcc, 0xc9, 0xfc, 0xc1, 0xb4, 0x77,
-  0x77, 0x48, 0x7e, 0x9d, 0x66, 0xf5, 0xe2, 0x73, 0x4d, 0xa5, 0x14, 0xd3,
-  0xea, 0x63, 0x75, 0x76, 0x77, 0xbe, 0x59, 0xbf, 0xea, 0x00, 0xa4, 0x7d,
-  0xf4, 0xe5, 0xbd, 0xa7, 0x8f, 0x6c, 0xda, 0x59, 0xee, 0xaa, 0x09, 0x79,
-  0xa0, 0x11, 0xef, 0x80, 0x69, 0x6c, 0x1b, 0x11, 0x7e, 0x72, 0x1d, 0xa3,
-  0xdc, 0xfc, 0x23, 0xa3, 0xb7, 0x04, 0x8d, 0xda, 0x50, 0xde, 0x68, 0x38,
-  0xb6, 0x7c, 0x59, 0xb0, 0x85, 0x6c, 0x01, 0xb8, 0x21, 0xaf, 0xc6, 0xba,
-  0x94, 0x4e, 0xc9, 0xf1, 0x0e, 0xde, 0x16, 0xce, 0xd9, 0xab, 0x32, 0x09,
-  0xa3, 0x9e, 0x3c, 0xb9, 0x5e, 0x4a, 0x12, 0x75, 0x26, 0x6a, 0x3f, 0x63,
-  0x4f, 0xea, 0x79, 0x25, 0xde, 0xcc, 0x91, 0x43, 0x42, 0x4f, 0x60, 0xbc,
-  0xe3, 0xd8, 0x44, 0x56, 0x11, 0x39, 0xea, 0x17, 0x03, 0xdb, 0x67, 0xc7,
-  0xec, 0x0c, 0x03, 0x37, 0x90, 0xe3, 0x15, 0x96, 0xb5, 0x12, 0xe8, 0xa7,
-  0x01, 0x32, 0x14, 0x85, 0x50, 0x1c, 0xb3, 0xe7, 0xbc, 0x2e, 0x76, 0x8a,
-  0x95, 0xe2, 0x21, 0x40, 0x03, 0x3d, 0xa5, 0x5a, 0xb4, 0xe4, 0xba, 0x62,
-  0x8e, 0x5f, 0x58, 0x0a, 0xaa, 0x40, 0xe2, 0xb2, 0xdd, 0xff, 0xf0, 0xec,
-  0xed, 0xeb, 0x93, 0xaf, 0x1c, 0xb0, 0x85, 0x30, 0xf1, 0x65, 0x99, 0xb1,
-  0x5d, 0x53, 0x8c, 0x86, 0xae, 0xe0, 0x98, 0x73, 0x78, 0x6b, 0x55, 0x11,
-  0x0d, 0xbb, 0x25, 0xf6, 0xf4, 0x3e, 0xfc, 0x00, 0x0c, 0x64, 0xfe, 0x84,
-  0x6d, 0xe5, 0x92, 0x3d, 0x5e, 0x6c, 0x79, 0xcb, 0x43, 0x0d, 0x7a, 0x47,
-  0xd2, 0x33, 0xe2, 0xbc, 0x5c, 0x2e, 0x5c, 0xf4, 0x60, 0x50, 0x95, 0x44,
-  0xc1, 0x32, 0xf9, 0x56, 0xe0, 0xea, 0xd8, 0xcb, 0x85, 0xb0, 0x26, 0x89,
-  0x7a, 0xac, 0x1a, 0x76, 0xe5, 0x0e, 0x60, 0xcb, 0x82, 0xa6, 0xdb, 0xeb,
-  0x05, 0xd0, 0x08, 0xc9, 0x99, 0x32, 0xf6, 0x57, 0x18, 0x28, 0x6f, 0xae,
-  0x1c, 0x2e, 0x49, 0x26, 0x13, 0xb5, 0x82, 0x52, 0x33, 0xd1, 0xcc, 0x78,
-  0xde, 0x52, 0xa7, 0xf6, 0x07, 0x57, 0xb1, 0x57, 0xc3, 0x7e, 0xbd, 0xab,
-  0xa8, 0x70, 0xe5, 0x57, 0x5d, 0x68, 0x92, 0x0c, 0x16, 0x21, 0x84, 0x45,
-  0x4f, 0x5c, 0x9e, 0xf8, 0xe4, 0x15, 0x7b, 0x68, 0xf6, 0x07, 0x28, 0xea,
-  0x89, 0xf8, 0x9d, 0xb0, 0xde, 0x96, 0x72, 0x49, 0x0f, 0xec, 0x7a, 0x72,
-  0x15, 0xa4, 0x94, 0x49, 0x88, 0xa0, 0x11, 0x9d, 0x98, 0x8b, 0xd9, 0xd6,
-  0xd2, 0xfd, 0xa4, 0xdb, 0x2f, 0x56, 0xb3, 0x51, 0x36, 0xb5, 0x8c, 0x0b,
-  0x97, 0x54, 0x6d, 0x0f, 0x95, 0x34, 0x0d, 0xc4, 0x0c, 0x4a, 0x81, 0x45,
-  0x74, 0x1d, 0x58, 0x28, 0x7d, 0x98, 0x94, 0x1f, 0xbf, 0x54, 0x12, 0x80,
-  0xa7, 0xc8, 0x66, 0xe1, 0x32, 0xfc, 0x93, 0xf9, 0x78, 0x9a, 0x29, 0x55,
-  0x73, 0x62, 0x2c, 0x56, 0xaa, 0x3a, 0x75, 0xf6, 0xfd, 0x65, 0x4b, 0x36,
-  0x76, 0x00, 0x25, 0x9c, 0xc4, 0x1d, 0x36, 0x0e, 0x7f, 0x67, 0x13, 0xe4,
-  0xb7, 0xe5, 0x0b, 0x0d, 0xc7, 0x37, 0x68, 0x04, 0x6a, 0x48, 0x60, 0xc5,
-  0x69, 0xa8, 0x7f, 0x11, 0xdb, 0xa2, 0x78, 0x00, 0x7f, 0xb0, 0xce, 0xed,
-  0xd1, 0xda, 0xd2, 0x13, 0x3d, 0xc5, 0xf9, 0xb5, 0x62, 0x0e, 0xa9, 0x53,
-  0x0d, 0x4a, 0xa2, 0x03, 0x7b, 0x77, 0x36, 0x4a, 0x16, 0x4a, 0x5c, 0xb8,
-  0x0c, 0xc4, 0xa7, 0xa5, 0x24, 0xf5, 0x69, 0xfa, 0x93, 0x58, 0x27, 0x1d,
-  0x21, 0x06, 0x1c, 0xe7, 0x13, 0x17, 0x92, 0x12, 0xfb, 0xbb, 0xcc, 0x50,
-  0xa8, 0xbd, 0xa9, 0x56, 0x2f, 0xb3, 0xe0, 0x35, 0xb6, 0xe7, 0x41, 0x13,
-  0x4e, 0xd4, 0x86, 0x22, 0x5d, 0x41, 0x96, 0x60, 0xc0, 0x2d, 0x64, 0xfd,
-  0x24, 0x85, 0x6f, 0x42, 0xbe, 0x7f, 0xa5, 0x29, 0xe6, 0x74, 0x9e, 0x15,
-  0x34, 0x40, 0xc1, 0x90, 0x3e, 0xdb, 0x51, 0x4b, 0x5c, 0xa9, 0x71, 0xaa,
-  0x45, 0x74, 0x70, 0x71, 0x4c, 0x92, 0xed, 0xf5, 0x1c, 0x49, 0xe1, 0x3c,
-  0xc2, 0x52, 0xf7, 0x07, 0x82, 0x35, 0xaf, 0x82, 0x9e, 0x0f, 0xee, 0xf0,
-  0x3e, 0x78, 0x93, 0x89, 0x49, 0xe3, 0x03, 0xe8, 0x90, 0xb9, 0x00, 0x34,
-  0x26, 0xb9, 0xb1, 0x01, 0x13, 0x82, 0xeb, 0x70, 0x76, 0xb7, 0x90, 0x14,
-  0x7b, 0x4b, 0xa8, 0xab, 0xcc, 0x40, 0x09, 0xcf, 0x1b, 0x6c, 0x3d, 0x44,
-  0x23, 0xb4, 0xb5, 0xc6, 0xa9, 0xf6, 0x39, 0x08, 0x7f, 0x33, 0x9c, 0x31,
-  0xed, 0xab, 0xe2, 0x01, 0xf5, 0xe4, 0xd4, 0x6b, 0xb7, 0x1e, 0xfd, 0x0d,
-  0xf7, 0x0c, 0xcb, 0x22, 0x75, 0xb9, 0x20, 0x71, 0xa1, 0xf5, 0x62, 0xc8,
-  0x9e, 0x04, 0xc2, 0xaf, 0xe4, 0xe3, 0x71, 0x70, 0xb5, 0xd8, 0xa8, 0x59,
-  0xf8, 0x89, 0x8b, 0xc4, 0xaa, 0x47, 0x41, 0x1d, 0x98, 0xe8, 0x59, 0x65,
-  0xaa, 0xe0, 0x38, 0xe1, 0x11, 0x03, 0x6d, 0xdc, 0x8a, 0x00, 0x10, 0xf2,
-  0xa7, 0x56, 0x33, 0xef, 0x27, 0x6e, 0xb6, 0x7e, 0x0c, 0xee, 0x4b, 0xfe,
-  0xe8, 0x95, 0xc3, 0x1d, 0xe2, 0x51, 0x0c, 0xb8, 0x23, 0xb0, 0x54, 0xb8,
-  0x4f, 0xf9, 0x17, 0x7c, 0x8c, 0x80, 0x37, 0x43, 0x6f, 0xab, 0x60, 0x87,
-  0x28, 0xbc, 0x7d, 0x38, 0x10, 0xf1, 0xf1, 0x81, 0x43, 0x8f, 0x42, 0xd1,
-  0x38, 0xa8, 0xe8, 0xc4, 0xa6, 0x1c, 0xce, 0xe0, 0xb5, 0x03, 0x5f, 0x24,
-  0x95, 0x0a, 0x50, 0x2e, 0x45, 0xa8, 0xd3, 0xef, 0xd0, 0x5a, 0x74, 0xa7,
-  0x53, 0xcf, 0xf0, 0xed, 0x31, 0xde, 0x55, 0x64, 0xd3, 0x79, 0x81, 0x49,
-  0x79, 0x17, 0x63, 0x67, 0xaf, 0x2a, 0xb9, 0x0d, 0x5c, 0x7b, 0x84, 0x53,
-  0x7f, 0x1c, 0xf6, 0x0b, 0xf2, 0x43, 0x10, 0x2e, 0x70, 0x97, 0x16, 0xe6,
-  0x87, 0x24, 0xda, 0x1e, 0x6b, 0x6c, 0x84, 0x24, 0x52, 0x27, 0xe5, 0x38,
-  0x58, 0xca, 0x64, 0x7c, 0x93, 0x49, 0x38, 0x2d, 0x2d, 0x5a, 0x90, 0x76,
-  0xd9, 0x89, 0xfe, 0x4b, 0x69, 0xe0, 0x1b, 0x9f, 0xad, 0xc7, 0x84, 0x30,
-  0x10, 0x54, 0xad, 0x81, 0x27, 0x88, 0xe3, 0xef, 0x2f, 0x2f, 0x0e, 0xa2,
-  0xaf, 0x8f, 0x0f, 0x8e, 0x8e, 0x2f, 0x86, 0xb5, 0x4b, 0x5f, 0xa3, 0x40,
-  0x44, 0x42, 0x63, 0x7b, 0x30, 0x44, 0x63, 0xcb, 0xf9, 0xd7, 0x80, 0x7d,
-  0xe3, 0x7a, 0xf1, 0x0a, 0x07, 0x89, 0xce, 0x07, 0x2b, 0x44, 0xe2, 0x38,
-  0x00, 0x82, 0x62, 0x01, 0x66, 0xe3, 0xda, 0xd0, 0x32, 0xc7, 0xce, 0x7a,
-  0x1e, 0xa6, 0xca, 0x78, 0x38, 0x27, 0x7f, 0x99, 0x4c, 0x32, 0xcb, 0x02,
-  0xac, 0xee, 0xdc, 0xd7, 0x3e, 0xe1, 0x3a, 0x60, 0x5b, 0x7a, 0xc9, 0xa8,
-  0x01, 0xb1, 0xf3, 0x7d, 0x9f, 0xfa, 0xed, 0xd3, 0xe2, 0xf7, 0x19, 0x71,
-  0x6b, 0x95, 0x14, 0x9d, 0x9a, 0x35, 0xb0, 0xda, 0xfd, 0x86, 0x14, 0xf3,
-  0x6c, 0x9c, 0xa4, 0xaf, 0x5b, 0x5b, 0xe2, 0xd3, 0x35, 0xe5, 0x2a, 0x08,
-  0x75, 0x0d, 0x02, 0x97, 0x6a, 0x20, 0x24, 0xeb, 0x09, 0x6a, 0xe4, 0xb5,
-  0x68, 0x9c, 0x92, 0x57, 0x33, 0x35, 0x2c, 0x0c, 0x03, 0xd1, 0x29, 0x40,
-  0xd6, 0x49, 0x4b, 0xbd, 0xd4, 0x61, 0x17, 0x31, 0x38, 0x48, 0x1a, 0x96,
-  0x3e, 0x14, 0xde, 0x0f, 0xf0, 0x85, 0x68, 0x80, 0x7e, 0x51, 0x71, 0x95,
-  0xaa, 0x5d, 0x54, 0x0b, 0xf1, 0x68, 0x73, 0x3c, 0x06, 0x47, 0xf3, 0x16,
-  0xd7, 0xcf, 0x5d, 0x1a, 0x08, 0xb8, 0xbe, 0x2b, 0xc1, 0x60, 0xac, 0xd4,
-  0xc3, 0xd4, 0xc9, 0xe1, 0x66, 0xb2, 0xf1, 0x26, 0xaf, 0x06, 0x49, 0x40,
-  0x21, 0x31, 0xa3, 0x60, 0x09, 0x02, 0xc7, 0xdd, 0x73, 0x49, 0xf4, 0x75,
-  0x56, 0xe0, 0x2e, 0x68, 0x3e, 0xce, 0x97, 0x7c, 0xdb, 0xf2, 0xe3, 0x0d,
-  0x75, 0x75, 0x39, 0xc8, 0x3b, 0x60, 0x44, 0x82, 0x7d, 0x9d, 0x1f, 0x5c,
-  0x7e, 0x0d, 0x47, 0x2b, 0x48, 0xf8, 0x08, 0x48, 0x0f, 0xe6, 0x5e, 0x6b,
-  0xe6, 0x62, 0x39, 0x05, 0x4e, 0xe4, 0x5f, 0xc3, 0xee, 0x32, 0x79, 0x12,
-  0x8e, 0x3c, 0x98, 0x28, 0x01, 0x05, 0x94, 0xaa, 0xe1, 0xb1, 0x5a, 0x46,
-  0x07, 0x51, 0xef, 0x2e, 0xd1, 0xce, 0x85, 0x5d, 0x76, 0x25, 0x13, 0xbd,
-  0x2b, 0x73, 0x02, 0xd1, 0xb3, 0x30, 0xc7, 0x1a, 0x4f, 0x88, 0xa4, 0x88,
-  0x2f, 0xae, 0x34, 0xc5, 0xb6, 0x47, 0x7b, 0xda, 0x0e, 0x8d, 0x15, 0x1c,
-  0xe9, 0x2f, 0x66, 0xab, 0x41, 0x13, 0x37, 0x24, 0xfa, 0x72, 0x59, 0x56,
-  0xd9, 0x4a, 0x0d, 0xcf, 0xd1, 0x49, 0x96, 0x79, 0x96, 0x95, 0x55, 0x44,
-  0x44, 0xac, 0x8e, 0x9c, 0x68, 0xc1, 0x40, 0x93, 0xb1, 0x70, 0x53, 0x73,
-  0x95, 0xbb, 0x43, 0xc1, 0x30, 0x1e, 0x15, 0xd9, 0x74, 0x59, 0x06, 0x81,
-  0xd7, 0xbf, 0x6c, 0xcc, 0xc1, 0xa0, 0x37, 0x4f, 0x06, 0x89, 0x11, 0x14,
-  0x47, 0x0e, 0xe7, 0x31, 0x69, 0xfa, 0x5c, 0xf1, 0x96, 0xfd, 0x8e, 0x79,
-  0x36, 0xaf, 0x56, 0x7a, 0x41, 0x8c, 0xf7, 0xd6, 0xc6, 0xc6, 0xd0, 0x36,
-  0x9b, 0xc1, 0xf7, 0x9a, 0x9b, 0x0e, 0x9c, 0x08, 0x20, 0xfc, 0x89, 0xdf,
-  0x60, 0x4c, 0xbf, 0x18, 0x1e, 0x52, 0x22, 0x7b, 0x0a, 0x16, 0x2e, 0x7b,
-  0x9c, 0x16, 0xd5, 0x49, 0xe1, 0x2b, 0xe7, 0xb9, 0xb0, 0xc4, 0xb2, 0xcb,
-  0xcc, 0x40, 0x81, 0xd5, 0x73, 0xe7, 0x09, 0xa2, 0x92, 0x9a, 0xde, 0x8a,
-  0x98, 0xc9, 0x97, 0x80, 0x82, 0x73, 0xf9, 0xa8, 0x5c, 0x1e, 0xe4, 0xf6,
-  0x7f, 0x6f, 0x47, 0x3d, 0x81, 0xb9, 0x69, 0x01, 0x1b, 0x59, 0x46, 0xff,
-  0x0f, 0x42, 0xb0, 0x14, 0xac, 0x90, 0xdb, 0xac, 0x21, 0xfc, 0x0d, 0x48,
-  0x85, 0xba, 0xc9, 0xc7, 0x9e, 0xfa, 0x49, 0x3a, 0x48, 0xee, 0x59, 0x7f,
-  0x31, 0x1d, 0x81, 0xbf, 0xb0, 0x2c, 0x53, 0x0f, 0x1c, 0x03, 0xbc, 0x8b,
-  0x2b, 0x67, 0xd5, 0xe3, 0x22, 0x59, 0x52, 0x32, 0x4a, 0xc4, 0x7a, 0x54,
-  0x4c, 0x30, 0x0f, 0xea, 0x46, 0x54, 0xd1, 0xdb, 0x8b, 0xa8, 0xc8, 0xe4,
-  0xa7, 0x65, 0x1b, 0x69, 0x8c, 0x97, 0x92, 0xbf, 0xaa, 0x51, 0x5a, 0x9d,
-  0x46, 0x4b, 0xb6, 0x59, 0xdc, 0xa9, 0x84, 0xd5, 0x99, 0x63, 0xd2, 0xc6,
-  0x68, 0x42, 0x00, 0xfb, 0x2d, 0x01, 0x7c, 0x86, 0xcb, 0xa6, 0xf0, 0x45,
-  0x60, 0x91, 0xac, 0xcd, 0x15, 0x96, 0x4c, 0x91, 0xb1, 0x1b, 0xd5, 0x12,
-  0x38, 0xdc, 0x46, 0xf9, 0xd1, 0xeb, 0xd5, 0x8f, 0x84, 0x78, 0xf8, 0xe8,
-  0xee, 0xe3, 0xb4, 0x0c, 0x25, 0x02, 0x9b, 0x11, 0x69, 0x78, 0x0a, 0xcd,
-  0x3f, 0x5a, 0x55, 0x42, 0x53, 0x7c, 0xdc, 0xe6, 0x35, 0xe7, 0x77, 0xa8,
-  0x45, 0x4a, 0xb1, 0x44, 0x60, 0xfe, 0xba, 0x49, 0x35, 0xba, 0x54, 0x16,
-  0xdd, 0xcc, 0x81, 0x6c, 0xcf, 0x80, 0x79, 0x8f, 0x43, 0x0b, 0xbc, 0x77,
-  0xd5, 0x05, 0x40, 0x0c, 0x9a, 0xa7, 0x65, 0xe0, 0x50, 0xf7, 0xf4, 0x06,
-  0x39, 0x09, 0x33, 0xc9, 0xb1, 0x2a, 0x2e, 0xdc, 0xf9, 0xa3, 0xba, 0x0e,
-  0xfb, 0xe3, 0x28, 0xd6, 0x79, 0xe4, 0xd7, 0xa3, 0x90, 0xab, 0x64, 0x6f,
-  0x17, 0x2a, 0xa9, 0x04, 0x6e, 0x00, 0xc4, 0xce, 0x4a, 0x77, 0x55, 0x2a,
-  0xad, 0x04, 0xeb, 0x8e, 0xda, 0xa0, 0xc0, 0x48, 0xb4, 0x24, 0x7b, 0xf5,
-  0x33, 0x8b, 0x44, 0x18, 0x78, 0x9c, 0x2a, 0x25, 0x5e, 0x24, 0x71, 0xbb,
-  0x28, 0xf3, 0xe5, 0xb8, 0x02, 0x58, 0x05, 0x62, 0xa8, 0xf8, 0xe7, 0xdd,
-  0xf2, 0x66, 0xa1, 0x56, 0xbf, 0x19, 0x57, 0xd2, 0x58, 0xf4, 0xc9, 0xb0,
-  0x8b, 0x2d, 0x29, 0x79, 0xaa, 0x05, 0x9f, 0xa1, 0x9d, 0xd0, 0xf8, 0x1d,
-  0x81, 0xf5, 0xcf, 0x5d, 0x12, 0x7d, 0x05, 0xf7, 0x4b, 0x52, 0x12, 0x82,
-  0x5b, 0x57, 0x45, 0x30, 0x88, 0x1c, 0x79, 0xa4, 0x08, 0x64, 0x10, 0x68,
-  0xd8, 0x58, 0xb9, 0xe1, 0x50, 0xc2, 0xa8, 0xbb, 0xbe, 0xaf, 0x71, 0x4a,
-  0xfd, 0x6d, 0xd3, 0x42, 0x5a, 0x91, 0x01, 0x57, 0xc2, 0xa2, 0xf0, 0x48,
-  0x63, 0xb5, 0x58, 0xd5, 0x64, 0x4a, 0x53, 0x76, 0x92, 0xa1, 0x9c, 0xc4,
-  0x99, 0xae, 0xdf, 0xc0, 0x55, 0x1d, 0xb5, 0xd2, 0xae, 0x35, 0x41, 0xa2,
-  0x79, 0x2b, 0x9e, 0x0b, 0x0a, 0x49, 0x83, 0x88, 0x8e, 0xcc, 0x9a, 0x0a,
-  0x66, 0x83, 0x05, 0x63, 0x9d, 0xc6, 0x36, 0xe9, 0xe4, 0xdc, 0x75, 0x41,
-  0x43, 0xe0, 0x19, 0x77, 0xa7, 0xc9, 0x4e, 0x37, 0xa8, 0xc1, 0xb1, 0x29,
-  0x51, 0xff, 0x19, 0xf4, 0x1e, 0xb6, 0x1c, 0x62, 0x82, 0x62, 0xb7, 0xe0,
-  0x08, 0xb7, 0xad, 0x96, 0xa1, 0x50, 0x13, 0xbf, 0x74, 0x30, 0xbb, 0x2f,
-  0xf6, 0x06, 0xbb, 0xcf, 0x3f, 0x1b, 0xec, 0x0c, 0x76, 0x77, 0x98, 0xb3,
-  0xf0, 0x50, 0x82, 0xc1, 0xc9, 0xba, 0xb4, 0x74, 0x55, 0x79, 0xaf, 0xd9,
-  0xe7, 0xdb, 0xe3, 0xcb, 0xef, 0xce, 0x2e, 0xbe, 0x89, 0x4e, 0xde, 0x5e,
-  0x1e, 0x5f, 0xbc, 0x3e, 0x38, 0xfc, 0x58, 0xe8, 0xe1, 0xd0, 0x60, 0x1d,
-  0x14, 0x5d, 0x4c, 0xfc, 0xc2, 0x34, 0xad, 0x82, 0x7e, 0xcd, 0x92, 0xf2,
-  0x66, 0x67, 0x7f, 0xf7, 0x51, 0xbc, 0xd2, 0x16, 0xc3, 0xa0, 0x7f, 0xdf,
-  0x26, 0xb5, 0xcb, 0x93, 0x5a, 0xdf, 0x8a, 0x43, 0x41, 0x1b, 0x4a, 0x80,
-  0x95, 0x0b, 0xce, 0x05, 0x83, 0x47, 0x01, 0x86, 0x74, 0x94, 0xc7, 0x66,
-  0x92, 0x1a, 0x09, 0x68, 0xa2, 0x64, 0xd4, 0x2a, 0xbe, 0x8b, 0x06, 0xa1,
-  0x2b, 0xbb, 0xe5, 0x18, 0xe5, 0x65, 0x3a, 0x2d, 0xd5, 0x90, 0x22, 0x18,
-  0x88, 0x13, 0x08, 0x77, 0xc6, 0x90, 0xad, 0x08, 0x31, 0x6a, 0x10, 0xa3,
-  0x08, 0x99, 0x14, 0x21, 0x9e, 0xb8, 0x44, 0x11, 0x07, 0x3c, 0x50, 0x49,
-  0xb7, 0xc1, 0x58, 0xab, 0x35, 0x2a, 0xc3, 0x18, 0xda, 0x1a, 0x00, 0x61,
-  0x61, 0xb1, 0xcd, 0x98, 0x58, 0xc5, 0x28, 0x7a, 0xa8, 0x03, 0xc1, 0x69,
-  0x08, 0x46, 0x23, 0x5d, 0x41, 0x94, 0x32, 0xd0, 0xdb, 0x2a, 0x7c, 0xa6,
-  0xdc, 0x4e, 0x48, 0x9e, 0x10, 0xc9, 0xcf, 0xf0, 0xb9, 0xb9, 0xf5, 0xa2,
-  0x02, 0xab, 0x16, 0x49, 0x51, 0x8c, 0xf0, 0x75, 0x11, 0xb2, 0x11, 0xa2,
-  0x39, 0xc9, 0xe3, 0x7b, 0x20, 0xbb, 0xa7, 0x1e, 0x80, 0x6f, 0xa3, 0x5a,
-  0xd8, 0x83, 0x45, 0x26, 0xbf, 0xe6, 0xd1, 0xf9, 0xf1, 0x9b, 0xbe, 0xd5,
-  0xfc, 0xa3, 0xdf, 0xc5, 0x0c, 0x65, 0xb0, 0x9b, 0x92, 0xdc, 0xb3, 0x48,
-  0xe6, 0x16, 0x50, 0x03, 0x9e, 0xa8, 0x11, 0x40, 0xe1, 0x04, 0xf8, 0xd0,
-  0x88, 0x45, 0x42, 0x78, 0xad, 0xe2, 0x97, 0xd9, 0xa5, 0xd5, 0x82, 0x80,
-  0xc7, 0xfb, 0xa9, 0x51, 0xcb, 0xd1, 0xa6, 0x8b, 0xd4, 0xe5, 0xfe, 0x10,
-  0x8e, 0x8a, 0x68, 0x01, 0x17, 0x20, 0x90, 0x59, 0xb2, 0xf5, 0xf9, 0x37,
-  0x87, 0xc3, 0x4f, 0x76, 0xf7, 0x74, 0x38, 0x5b, 0x03, 0x0f, 0x67, 0xd9,
-  0xc8, 0xc3, 0x07, 0xbb, 0x0e, 0xc7, 0x68, 0x59, 0xd5, 0x38, 0xe0, 0xd8,
-  0x8c, 0x4d, 0x97, 0x19, 0xb4, 0x55, 0x49, 0x0d, 0xda, 0x90, 0x4a, 0xab,
-  0x26, 0x5c, 0xba, 0x9a, 0x7c, 0xec, 0x0c, 0x41, 0x65, 0x09, 0xad, 0xed,
-  0x50, 0xba, 0x78, 0xbf, 0x78, 0x6e, 0x1f, 0x49, 0xcb, 0xda, 0x1a, 0xd2,
-  0xc6, 0x7d, 0x4c, 0x4b, 0x7d, 0xcf, 0x79, 0xbd, 0xfd, 0xb7, 0x8c, 0x9a,
-  0xa8, 0x97, 0xba, 0xe1, 0xf2, 0xf8, 0x6e, 0x70, 0x00, 0x34, 0x84, 0x7d,
-  0x62, 0xd5, 0x63, 0xe6, 0x1e, 0xd0, 0x9d, 0x9f, 0x3e, 0xa3, 0x8d, 0xa2,
-  0x93, 0x25, 0x50, 0x0d, 0xcc, 0x14, 0xb2, 0x29, 0x2b, 0x2d, 0xee, 0x91,
-  0xa3, 0x9c, 0x81, 0xf3, 0x17, 0x12, 0x4c, 0xfa, 0x76, 0x10, 0x7d, 0x9d,
-  0xcc, 0x0b, 0xad, 0xcc, 0x6c, 0xc9, 0x57, 0x08, 0x0e, 0xe4, 0x02, 0x51,
-  0x28, 0xe7, 0x73, 0x9a, 0xc4, 0x0a, 0x22, 0x48, 0xbc, 0xae, 0x10, 0xdd,
-  0xd6, 0x4a, 0x59, 0xc4, 0x1c, 0xa2, 0x87, 0x9b, 0x48, 0x0d, 0xb4, 0xa8,
-  0xe7, 0x98, 0x16, 0xda, 0xc0, 0x66, 0x15, 0x0a, 0x10, 0xd0, 0xd4, 0x68,
-  0x4e, 0x8f, 0x39, 0xbc, 0x4c, 0x6a, 0x4f, 0xbe, 0x01, 0xd6, 0x2a, 0xdb,
-  0x09, 0x45, 0xd7, 0xf2, 0x4c, 0x65, 0x92, 0xdf, 0xb0, 0xd1, 0xa3, 0xa0,
-  0xeb, 0x26, 0x9e, 0x8f, 0x57, 0x83, 0x09, 0x49, 0xb1, 0x6c, 0x36, 0x1b,
-  0x2c, 0x6f, 0xb7, 0x83, 0x63, 0xca, 0x2c, 0xff, 0x46, 0x60, 0x01, 0xaa,
-  0x26, 0x6f, 0xab, 0x45, 0xd8, 0x44, 0xed, 0x8a, 0x2b, 0x67, 0x82, 0x49,
-  0xc2, 0x12, 0xfc, 0xe5, 0x78, 0xae, 0xc5, 0xb7, 0x3a, 0x8e, 0x1c, 0xcc,
-  0x27, 0xb7, 0x30, 0x58, 0x24, 0xb3, 0x7d, 0x97, 0x82, 0x6c, 0xfc, 0x41,
-  0xd1, 0xc1, 0x9d, 0x4a, 0x11, 0x98, 0x67, 0xe7, 0xc9, 0xf5, 0x54, 0x05,
-  0x8a, 0x50, 0x69, 0xf1, 0xb0, 0xad, 0xcd, 0x34, 0x10, 0x51, 0x75, 0xe0,
-  0x81, 0x40, 0xa1, 0x29, 0xe2, 0x54, 0x33, 0x54, 0x80, 0x31, 0xc6, 0xaf,
-  0xe5, 0x6f, 0x7d, 0x23, 0x0a, 0x16, 0x02, 0xc4, 0x51, 0x16, 0x83, 0xd5,
-  0xb8, 0x63, 0xe1, 0x48, 0xea, 0x78, 0xa2, 0x6f, 0x85, 0x42, 0x80, 0xf1,
-  0xab, 0xa1, 0xd1, 0x70, 0x7b, 0x5a, 0xc1, 0x3f, 0x39, 0x2b, 0xf4, 0xf5,
-  0xdd, 0x13, 0xb6, 0x75, 0x5f, 0x9e, 0x0e, 0x7b, 0x42, 0x0f, 0xf3, 0xe4,
-  0x3e, 0xa0, 0x2c, 0x81, 0xa5, 0x56, 0xf2, 0x63, 0xcb, 0x8f, 0x84, 0xaf,
-  0x59, 0xb1, 0xe1, 0x5c, 0x46, 0x23, 0x9c, 0xc1, 0x3b, 0xc9, 0x7c, 0x16,
-  0x84, 0x2d, 0x84, 0xc6, 0x13, 0xf3, 0x70, 0xac, 0x72, 0x8a, 0x08, 0x44,
-  0x0e, 0xe0, 0x85, 0xa1, 0xf3, 0x48, 0x60, 0x7a, 0xd2, 0x8b, 0xfa, 0x7b,
-  0x80, 0xcd, 0xd9, 0xad, 0x2e, 0x64, 0xcc, 0x05, 0x4d, 0xe2, 0x31, 0x0a,
-  0x38, 0x6d, 0xb8, 0xc2, 0xf2, 0xc6, 0x12, 0x36, 0x95, 0xac, 0xef, 0xe8,
-  0x7d, 0xfe, 0xb1, 0xa7, 0x93, 0xba, 0xdb, 0x45, 0xe8, 0x36, 0xcb, 0xa3,
-  0x77, 0xc9, 0x74, 0xd5, 0x14, 0x1b, 0xf6, 0x1e, 0xdd, 0x59, 0x24, 0x49,
-  0xdc, 0xa7, 0x0e, 0x52, 0x55, 0x50, 0xb5, 0x61, 0x08, 0x55, 0x20, 0x43,
-  0x1b, 0x00, 0x2d, 0xa3, 0x9a, 0xb8, 0xe7, 0xd1, 0xdd, 0x9e, 0x79, 0x9a,
-  0xf9, 0x1b, 0x5b, 0x3c, 0x31, 0xd5, 0x7b, 0x46, 0xd2, 0xc8, 0x5d, 0xe4,
-  0x70, 0xb7, 0x80, 0x72, 0x39, 0xf5, 0x89, 0xe8, 0x96, 0x38, 0x49, 0x85,
-  0xd3, 0xb0, 0x06, 0x55, 0x3a, 0xf4, 0x21, 0xde, 0x7e, 0x20, 0xbe, 0x92,
-  0x2c, 0xec, 0x83, 0x9c, 0x10, 0x02, 0x8e, 0x33, 0x4d, 0x12, 0x6c, 0xb1,
-  0x9c, 0x69, 0x25, 0x2a, 0x30, 0xe2, 0x1e, 0xae, 0xdb, 0x32, 0x22, 0x4e,
-  0x9c, 0x4a, 0xc8, 0xdf, 0x14, 0xc2, 0x34, 0x04, 0x2c, 0x35, 0x96, 0xfa,
-  0x85, 0x62, 0x0b, 0x98, 0xc0, 0xe9, 0x81, 0x5e, 0x6e, 0x52, 0xb1, 0x61,
-  0x20, 0x42, 0x15, 0x0b, 0x46, 0xac, 0xa2, 0x1b, 0xd1, 0xe9, 0x5b, 0x72,
-  0xa3, 0x65, 0x86, 0x10, 0x58, 0x27, 0x30, 0x48, 0x1b, 0x43, 0x08, 0x9d,
-  0x51, 0x37, 0xe4, 0x91, 0xfd, 0xcf, 0x79, 0x0d, 0x8a, 0xae, 0x5f, 0x34,
-  0x05, 0x09, 0xae, 0xae, 0x80, 0xba, 0x47, 0xac, 0xe2, 0xc9, 0x79, 0x6e,
-  0x85, 0x53, 0xbb, 0xc9, 0x03, 0x0b, 0x48, 0x5d, 0xed, 0x55, 0xbe, 0x16,
-  0x14, 0x00, 0x2c, 0xee, 0xf9, 0xc9, 0x5b, 0xa9, 0x05, 0xea, 0x0e, 0x52,
-  0xc2, 0x90, 0x89, 0x1b, 0x52, 0xc6, 0x16, 0xe3, 0x89, 0x15, 0x67, 0x22,
-  0x12, 0x7b, 0x13, 0x13, 0x1b, 0x1f, 0x90, 0x54, 0xfb, 0xba, 0x58, 0x4a,
-  0xef, 0x5d, 0xbe, 0x24, 0x8b, 0x62, 0xda, 0xad, 0x15, 0xb8, 0x73, 0x9b,
-  0x59, 0xbb, 0x8d, 0x9c, 0x21, 0x6b, 0x3c, 0x09, 0x2b, 0xf6, 0x6a, 0x2b,
-  0x15, 0x26, 0xd9, 0xab, 0xe5, 0x49, 0x86, 0x16, 0xf4, 0x4f, 0xa2, 0xc1,
-  0x36, 0x75, 0x58, 0x6c, 0xdb, 0x8b, 0x8b, 0xdb, 0x71, 0x41, 0xd7, 0x23,
-  0x27, 0x05, 0xff, 0xe8, 0x90, 0x9c, 0x79, 0xc4, 0x93, 0x9f, 0xa2, 0xfe,
-  0x78, 0x8a, 0xf9, 0x45, 0xa8, 0xa6, 0xf9, 0x23, 0x91, 0x0c, 0x3f, 0xf1,
-  0xd3, 0x06, 0x67, 0xc9, 0x0d, 0xdf, 0xbd, 0x61, 0x1c, 0x75, 0x94, 0x2b,
-  0xbc, 0xbc, 0x38, 0x78, 0x3b, 0x7c, 0x2d, 0x46, 0xd6, 0xcb, 0xcc, 0x17,
-  0x42, 0x54, 0xcb, 0x82, 0xf3, 0x44, 0x3a, 0xa4, 0xb1, 0x7b, 0x01, 0xf7,
-  0xb6, 0x20, 0x6d, 0x2d, 0x91, 0xd8, 0xab, 0x83, 0x18, 0x4b, 0x89, 0x45,
-  0xf0, 0x6a, 0x3a, 0x4c, 0x9b, 0xc5, 0x96, 0xbb, 0x58, 0x8b, 0xb0, 0x5a,
-  0x89, 0xc7, 0xb8, 0x33, 0x6c, 0x54, 0x7d, 0x88, 0x09, 0xe5, 0xd0, 0x06,
-  0x63, 0x9f, 0x0a, 0x2f, 0x5f, 0x8b, 0x2b, 0x79, 0x48, 0xaa, 0x47, 0x5f,
-  0x61, 0xf1, 0x83, 0xda, 0x2c, 0xce, 0x30, 0x27, 0xbc, 0x5c, 0xd1, 0xe0,
-  0x5c, 0xe3, 0x61, 0x22, 0xa1, 0x35, 0xbd, 0xf9, 0xc7, 0xdd, 0xad, 0xf6,
-  0xe6, 0x2f, 0x7f, 0x69, 0xf3, 0xed, 0x63, 0x37, 0x59, 0xdf, 0xe7, 0xa9,
-  0x6c, 0xfe, 0x71, 0x6f, 0xeb, 0xd1, 0x19, 0x85, 0x99, 0x76, 0xbe, 0x4f,
-  0x7a, 0x83, 0x07, 0x1b, 0xbd, 0xb2, 0x9a, 0xb7, 0x7a, 0x07, 0xbb, 0x58,
-  0x8f, 0x2b, 0x8f, 0x72, 0x57, 0x41, 0x7d, 0xe0, 0x58, 0x60, 0x27, 0xf9,
-  0x79, 0x17, 0x8e, 0xa6, 0x2c, 0x9c, 0xfc, 0xef, 0xe3, 0x10, 0x1d, 0x90,
-  0x14, 0xf1, 0x90, 0xdd, 0x71, 0xba, 0x79, 0x91, 0x0d, 0xd0, 0xf7, 0xde,
-  0x23, 0x7d, 0xfb, 0xd9, 0x05, 0x6a, 0x2e, 0xfb, 0x43, 0x39, 0xa0, 0xca,
-  0xf0, 0x60, 0xb5, 0x9f, 0x0d, 0x5f, 0x5e, 0x73, 0x7d, 0x7f, 0x97, 0x27,
-  0x6f, 0x8e, 0x19, 0x37, 0xf6, 0xe8, 0x84, 0xf1, 0xcb, 0x86, 0x8a, 0x20,
-  0x68, 0x1a, 0xad, 0x03, 0x57, 0x0d, 0xc1, 0xed, 0xc5, 0x51, 0xe8, 0xe2,
-  0x96, 0xdc, 0xe9, 0x77, 0x3b, 0xc1, 0x5d, 0x6b, 0x60, 0x6d, 0x61, 0xe9,
-  0x7b, 0x27, 0x57, 0xfd, 0x37, 0xd9, 0x04, 0x5a, 0x57, 0x5f, 0xe0, 0xa8,
-  0xe9, 0x2d, 0xfa, 0xf0, 0xdd, 0x7c, 0x56, 0xf9, 0x38, 0x4c, 0x12, 0x54,
-  0x85, 0x7a, 0x63, 0x5d, 0x01, 0x80, 0x9f, 0xb7, 0xfb, 0x7d, 0x94, 0xb7,
-  0x95, 0xf8, 0x20, 0xf5, 0x12, 0x54, 0x30, 0x1e, 0xec, 0xec, 0xd3, 0xfa,
-  0xa4, 0xd3, 0x95, 0x78, 0xb4, 0x63, 0x1f, 0x87, 0xe4, 0x33, 0x02, 0xaf,
-  0x39, 0x2b, 0xc9, 0x1b, 0x8b, 0xc4, 0x1c, 0xb4, 0x11, 0x42, 0x52, 0x42,
-  0x2e, 0x4f, 0xee, 0x7d, 0x20, 0x8d, 0x16, 0x12, 0xcc, 0x16, 0x2b, 0x4c,
-  0xf2, 0xbe, 0xe2, 0xa3, 0x6f, 0x75, 0xd4, 0xfd, 0x2c, 0xef, 0x54, 0x4a,
-  0x5e, 0x48, 0x0f, 0x21, 0x01, 0xea, 0x27, 0x5a, 0x21, 0xe2, 0x2c, 0x0f,
-  0x18, 0x98, 0x0e, 0xdb, 0x8a, 0xbe, 0x04, 0x70, 0x95, 0x01, 0xba, 0x66,
-  0x75, 0x9c, 0xde, 0x7a, 0xb9, 0xc1, 0xd7, 0xda, 0x80, 0x8d, 0xe6, 0xe6,
-  0x65, 0x21, 0xae, 0xb3, 0xa8, 0x96, 0xea, 0x4b, 0x22, 0x4b, 0x1a, 0x96,
-  0x9c, 0xf0, 0x6e, 0xbf, 0x0b, 0x44, 0xed, 0x74, 0xde, 0x32, 0x99, 0xfe,
-  0x2f, 0x9f, 0x4d, 0xc3, 0x87, 0x17, 0x75, 0xae, 0x18, 0x58, 0x81, 0x1d,
-  0x22, 0x1d, 0x19, 0x80, 0x60, 0x8d, 0x08, 0x6d, 0x91, 0x3c, 0xcf, 0x6c,
-  0xcd, 0xf4, 0x12, 0xd1, 0xd1, 0x5c, 0x88, 0xa5, 0xb3, 0xb6, 0x8a, 0x91,
-  0x8b, 0xf9, 0xe8, 0x72, 0x31, 0x81, 0x77, 0x5f, 0xe2, 0x1a, 0xff, 0x33,
-  0x9e, 0x2f, 0xe3, 0x7c, 0x15, 0xed, 0xee, 0xf5, 0xa2, 0xbd, 0x9d, 0xdd,
-  0xbd, 0x96, 0x39, 0x74, 0xfe, 0x93, 0xa3, 0x6b, 0xf6, 0xf0, 0x75, 0xe7,
-  0x63, 0x67, 0xe1, 0x63, 0xe4, 0x71, 0xab, 0x6a, 0x36, 0x29, 0xf1, 0x1e,
-  0x76, 0xf4, 0x49, 0x35, 0x5f, 0xae, 0xdf, 0x07, 0x40, 0x34, 0xc8, 0x14,
-  0x62, 0x73, 0xb2, 0xda, 0x53, 0xae, 0x4c, 0x09, 0x3f, 0xb1, 0xa1, 0x25,
-  0xd4, 0x10, 0x42, 0xe1, 0x0c, 0x6f, 0x71, 0x8e, 0xc2, 0x5a, 0xd5, 0x3d,
-  0x4a, 0x4b, 0xdb, 0x16, 0x8e, 0xd1, 0xe0, 0xbd, 0x21, 0x7a, 0x3f, 0x3a,
-  0x39, 0xbc, 0x34, 0xc4, 0xbc, 0x2b, 0xbe, 0x4e, 0xf3, 0xd5, 0xc7, 0xd5,
-  0x28, 0x7a, 0xf4, 0x99, 0xc9, 0xfe, 0x4d, 0x42, 0x12, 0xd9, 0x7c, 0xb4,
-  0xbc, 0xde, 0xff, 0x6b, 0x9c, 0x5f, 0x67, 0xf3, 0x0f, 0x3d, 0x3f, 0x41,
-  0x92, 0xd2, 0x3e, 0x31, 0xa8, 0xdd, 0x17, 0xbb, 0x4f, 0x24, 0x02, 0x3e,
-  0xe5, 0x92, 0x66, 0xe0, 0x0f, 0xdd, 0x59, 0x57, 0x00, 0x1b, 0x10, 0x7a,
-  0xef, 0x50, 0x1a, 0xe6, 0x93, 0xae, 0xa8, 0x5b, 0x71, 0xf8, 0xec, 0x44,
-  0x9f, 0x95, 0x6c, 0xe6, 0xee, 0x86, 0x94, 0x6a, 0xec, 0x72, 0xea, 0xdf,
-  0x72, 0xd1, 0x1d, 0x54, 0x4e, 0xf8, 0x07, 0xe6, 0xca, 0x5d, 0xb8, 0x92,
-  0x4c, 0x87, 0xc2, 0x93, 0x95, 0x9d, 0x8e, 0xf2, 0x24, 0xbe, 0xf5, 0x05,
-  0xfd, 0x3c, 0x9a, 0x83, 0xd9, 0xce, 0x2f, 0x5e, 0x1f, 0x0a, 0x06, 0xa6,
-  0xe5, 0xe0, 0x60, 0xa9, 0x23, 0x67, 0xe9, 0xd8, 0xe2, 0x51, 0x7e, 0xa0,
-  0x7f, 0x0e, 0x92, 0xdf, 0x9f, 0x8c, 0x3e, 0xe2, 0x21, 0x3a, 0x77, 0x02,
-  0x37, 0x76, 0x50, 0x2d, 0x67, 0xc0, 0x32, 0x7f, 0xc9, 0xa4, 0x66, 0x95,
-  0xfb, 0x36, 0xa5, 0x40, 0x9b, 0xd8, 0xae, 0xa5, 0x62, 0xbc, 0x16, 0x18,
-  0x56, 0x63, 0x01, 0x8d, 0x9b, 0xab, 0x9f, 0x1d, 0x1d, 0x9c, 0x07, 0x7a,
-  0x13, 0xf4, 0x12, 0x6f, 0x23, 0xe2, 0xe7, 0x58, 0x66, 0x46, 0x71, 0x50,
-  0x31, 0x25, 0xad, 0x7a, 0x5e, 0xda, 0x2d, 0xc1, 0x27, 0x27, 0x77, 0xb1,
-  0x44, 0x5a, 0x67, 0x7a, 0x9d, 0xc0, 0x9c, 0x01, 0x3c, 0xef, 0xe9, 0x24,
-  0x86, 0x47, 0x4d, 0x2f, 0x21, 0x08, 0xa1, 0x68, 0x2b, 0xd5, 0xb0, 0x1a,
-  0xda, 0x9b, 0x87, 0x48, 0xb3, 0x01, 0x34, 0xed, 0x41, 0x7e, 0x97, 0xc7,
-  0x38, 0xd3, 0x75, 0x65, 0x13, 0x10, 0xfe, 0x4c, 0x83, 0x8f, 0x8b, 0x5b,
-  0x62, 0xa5, 0xe2, 0x09, 0xa6, 0xde, 0xd3, 0x71, 0x62, 0x36, 0xd5, 0x49,
-  0x2a, 0x11, 0x19, 0x6c, 0xcd, 0x00, 0x96, 0x4e, 0x65, 0xc3, 0xe4, 0x06,
-  0x62, 0xe5, 0x65, 0x5a, 0x24, 0x82, 0x7b, 0x17, 0x5d, 0xde, 0x67, 0x22,
-  0x74, 0x3a, 0xc0, 0x01, 0x89, 0x69, 0x2c, 0x96, 0xa9, 0x40, 0x67, 0xd0,
-  0xe6, 0x81, 0x1f, 0x04, 0xe5, 0xd5, 0x3a, 0xce, 0x90, 0x72, 0xe4, 0x1c,
-  0x68, 0xc3, 0xa3, 0x6f, 0x22, 0xce, 0xd1, 0xe6, 0x3e, 0x0e, 0xb9, 0x26,
-  0x01, 0xfb, 0xc2, 0x67, 0x50, 0x24, 0xbe, 0x5a, 0xf2, 0x79, 0x3f, 0xbc,
-  0x89, 0x17, 0x2c, 0x12, 0xef, 0xee, 0xb0, 0xf6, 0xfd, 0x9d, 0x65, 0x7b,
-  0xf1, 0x41, 0xb5, 0xd2, 0xab, 0x45, 0x27, 0x50, 0xcc, 0x27, 0x5c, 0x39,
-  0x95, 0x65, 0xe2, 0xaa, 0xcd, 0x8f, 0x6e, 0xcf, 0x62, 0x7b, 0xc6, 0x0c,
-  0x6b, 0x5a, 0x10, 0x69, 0xe4, 0xc5, 0xe4, 0x76, 0x7b, 0x4c, 0xff, 0x3c,
-  0xd9, 0xd9, 0x06, 0x14, 0x63, 0x09, 0x13, 0x19, 0xd3, 0xe4, 0xde, 0xde,
-  0xb3, 0x67, 0xbd, 0xa8, 0xc3, 0x46, 0x2b, 0xeb, 0x80, 0x8f, 0x04, 0x9d,
-  0xac, 0x4e, 0x5b, 0x9d, 0xb9, 0xed, 0xfc, 0x6a, 0xcc, 0xff, 0xf1, 0x6b,
-  0x56, 0x2b, 0xea, 0x52, 0xd3, 0x37, 0xb0, 0x0e, 0xf3, 0x10, 0x6b, 0xc5,
-  0xc8, 0xea, 0x9e, 0xf6, 0xc1, 0xcc, 0x12, 0xec, 0x81, 0x58, 0x24, 0xd9,
-  0xc2, 0xdc, 0x8c, 0x33, 0x05, 0xc8, 0x47, 0xf7, 0x81, 0x73, 0x06, 0x8e,
-  0x61, 0x89, 0xab, 0xd2, 0xc4, 0xfa, 0x62, 0x39, 0xea, 0x6b, 0x86, 0xa9,
-  0xe8, 0x19, 0x29, 0x9d, 0x5c, 0xfa, 0x73, 0x6a, 0xd6, 0xdf, 0x06, 0x47,
-  0xfe, 0x32, 0xea, 0x28, 0x6d, 0xf1, 0x8f, 0x01, 0xbc, 0x84, 0xc9, 0x98,
-  0xa7, 0x91, 0xbd, 0xd2, 0x3f, 0xfe, 0xe3, 0x3f, 0xa8, 0xd9, 0xff, 0xe0,
-  0x56, 0x5e, 0xfd, 0xb1, 0x28, 0x6f, 0x82, 0x67, 0x3a, 0x4a, 0xf0, 0x27,
-  0xde, 0x47, 0x8a, 0xb8, 0x27, 0x00, 0x95, 0x22, 0x11, 0xea, 0xcd, 0xa9,
-  0x72, 0xe4, 0x5e, 0x30, 0xbf, 0x14, 0x29, 0x6a, 0x62, 0x73, 0x73, 0x61,
-  0x07, 0x5f, 0xb2, 0xff, 0x32, 0xe1, 0xd4, 0x66, 0xa2, 0x42, 0x20, 0xd1,
-  0x6d, 0x99, 0x88, 0x71, 0xfc, 0xf6, 0xdb, 0x93, 0x8b, 0xb3, 0xb7, 0x6f,
-  0x8e, 0xdf, 0x5e, 0x46, 0xdf, 0x1e, 0x5c, 0x9c, 0x1c, 0x7c, 0x79, 0xaa,
-  0x19, 0xd4, 0x3c, 0x05, 0x8e, 0x16, 0x11, 0xd1, 0xbb, 0x86, 0x23, 0x1a,
-  0x64, 0xb4, 0xb4, 0x82, 0xe7, 0xd7, 0xca, 0x05, 0xbe, 0x57, 0x60, 0x6a,
-  0x98, 0x57, 0xdf, 0xa3, 0x80, 0x45, 0x8f, 0x1d, 0x7e, 0xef, 0xad, 0x96,
-  0x05, 0x9b, 0x2d, 0x57, 0x41, 0x4e, 0x2e, 0x07, 0xb2, 0x30, 0x95, 0x1a,
-  0x7f, 0xf2, 0x75, 0x87, 0x14, 0xde, 0x7f, 0x10, 0x7d, 0x25, 0x69, 0xdd,
-  0x1a, 0x52, 0xe5, 0x5e, 0xd5, 0x14, 0x23, 0x98, 0x71, 0xdc, 0x18, 0x0e,
-  0x4e, 0x4f, 0x7d, 0x57, 0x8f, 0x57, 0x61, 0x50, 0x38, 0x1f, 0xc9, 0x02,
-  0xba, 0xb1, 0xea, 0xc9, 0xd7, 0x99, 0x47, 0xd9, 0x9e, 0xaf, 0x42, 0x40,
-  0x6d, 0xee, 0x8c, 0xb6, 0x63, 0x53, 0xb0, 0x18, 0xd8, 0xdd, 0x48, 0x07,
-  0x28, 0x2d, 0x6e, 0x7b, 0x51, 0xf7, 0x8f, 0x5d, 0xc9, 0xce, 0x4a, 0x00,
-  0x37, 0x2b, 0x35, 0x1e, 0xb6, 0xfc, 0xa0, 0xde, 0x9e, 0xf9, 0x31, 0xa9,
-  0x13, 0xcd, 0x0d, 0xc0, 0xbd, 0xe8, 0xfd, 0x9f, 0x85, 0xc9, 0x33, 0x08,
-  0x3c, 0xf4, 0x8f, 0x2b, 0xa2, 0xbf, 0x4b, 0x31, 0x57, 0x1a, 0x65, 0x3f,
-  0x49, 0xeb, 0xbb, 0x50, 0xda, 0xe2, 0x71, 0x80, 0x2a, 0x2c, 0x66, 0x1c,
-  0x56, 0x7e, 0x21, 0x07, 0x48, 0xad, 0x67, 0xb9, 0x1c, 0x1e, 0xa4, 0x44,
-  0xf8, 0x86, 0x15, 0x26, 0x56, 0x0e, 0x0a, 0xaa, 0x7a, 0xd8, 0xb6, 0x5a,
-  0x0f, 0x70, 0x59, 0x71, 0x60, 0x79, 0x9e, 0x4e, 0x14, 0xa7, 0xae, 0x95,
-  0x2a, 0x06, 0xf0, 0x74, 0x5c, 0x1c, 0x02, 0xd4, 0x7b, 0xce, 0x05, 0xa0,
-  0x5c, 0x21, 0x04, 0x09, 0x42, 0x25, 0x2e, 0x92, 0x73, 0x66, 0xd7, 0x5c,
-  0x85, 0x10, 0x04, 0x76, 0x42, 0x44, 0x8f, 0xaf, 0x33, 0x13, 0xbf, 0x63,
-  0xe7, 0x7e, 0x95, 0x8c, 0x2d, 0x89, 0xd9, 0x31, 0x29, 0xcc, 0x01, 0x51,
-  0x39, 0x0b, 0x18, 0x1c, 0xb5, 0x66, 0x6f, 0xe6, 0x38, 0x25, 0xd8, 0xcb,
-  0x34, 0x8e, 0xa1, 0x08, 0xd2, 0x7d, 0x7d, 0x18, 0x3c, 0xf3, 0x12, 0x71,
-  0x51, 0x1a, 0x32, 0x14, 0xf0, 0xb7, 0x2c, 0x3d, 0x18, 0x11, 0x73, 0x18,
-  0x16, 0x3f, 0x88, 0x26, 0x35, 0xf8, 0x11, 0x4d, 0x9a, 0x29, 0x94, 0x4e,
-  0xcf, 0x94, 0x33, 0x91, 0x8c, 0x13, 0xc5, 0xd1, 0x28, 0xbd, 0x8e, 0xcc,
-  0x0a, 0x12, 0x31, 0x95, 0x00, 0x25, 0x2c, 0x9b, 0x25, 0xbc, 0x55, 0xc0,
-  0x00, 0x83, 0xec, 0x7e, 0x93, 0x4d, 0x43, 0xd0, 0x2a, 0x9b, 0x49, 0xc1,
-  0x91, 0xfa, 0x81, 0x15, 0x0d, 0x96, 0xf4, 0x25, 0xaf, 0xa3, 0x85, 0x35,
-  0x29, 0xbe, 0xb5, 0x06, 0x79, 0xb1, 0x89, 0x16, 0x70, 0x7b, 0x73, 0xa4,
-  0x94, 0x58, 0x7a, 0x2e, 0xd6, 0xc1, 0x02, 0x60, 0x99, 0x5b, 0xc0, 0xb2,
-  0xc2, 0xd5, 0xa6, 0x36, 0x1d, 0x40, 0x35, 0xb7, 0x32, 0x16, 0x88, 0x4f,
-  0x26, 0x7a, 0x89, 0x4f, 0xaf, 0x54, 0x93, 0xb0, 0xcd, 0x52, 0x28, 0x26,
-  0xa2, 0x09, 0x1e, 0x34, 0x8d, 0x6f, 0x33, 0x60, 0x3c, 0x73, 0x22, 0x11,
-  0x79, 0x4c, 0xf4, 0x47, 0xfd, 0xab, 0x2f, 0xde, 0xcb, 0xd8, 0x0a, 0x6f,
-  0x15, 0x5b, 0xde, 0x83, 0x2d, 0x52, 0x00, 0x53, 0xeb, 0x58, 0x0b, 0x5a,
-  0x61, 0xbc, 0xb4, 0x5f, 0x66, 0x88, 0x0a, 0xed, 0x58, 0x91, 0x65, 0x6e,
-  0x4c, 0xa7, 0x01, 0x44, 0xb5, 0x98, 0x23, 0xe2, 0x86, 0xf0, 0xc1, 0xce,
-  0x06, 0x49, 0x68, 0xd4, 0x18, 0x12, 0x81, 0xb3, 0x0d, 0x66, 0xa2, 0xd1,
-  0xc9, 0x2c, 0x9e, 0xd5, 0xcc, 0x63, 0x01, 0x47, 0x33, 0x6f, 0x6b, 0x78,
-  0x33, 0x69, 0x65, 0x84, 0x34, 0x9e, 0x89, 0xf0, 0xe8, 0xc9, 0x6f, 0xb6,
-  0x92, 0xf8, 0xb5, 0x8d, 0x8d, 0xc3, 0x77, 0xc3, 0xcb, 0xb3, 0x37, 0xd1,
-  0xd9, 0xbb, 0xcb, 0xf3, 0x77, 0x97, 0x7a, 0x75, 0x8d, 0x24, 0xfa, 0x57,
-  0x74, 0x44, 0x91, 0x02, 0x6c, 0x37, 0x67, 0xea, 0x42, 0x46, 0xb0, 0x42,
-  0x06, 0x68, 0xba, 0x00, 0xa5, 0xc6, 0x65, 0xf7, 0x00, 0xbb, 0x49, 0x10,
-  0x6f, 0xb1, 0xe6, 0xf7, 0xb4, 0xe6, 0xc8, 0xcc, 0x84, 0x6d, 0xc7, 0x92,
-  0x85, 0xa0, 0xf7, 0xb4, 0x57, 0x1d, 0xa9, 0xd5, 0x31, 0x83, 0xb3, 0xb7,
-  0x0a, 0x0a, 0xe4, 0x23, 0x72, 0xcc, 0xb6, 0xe3, 0x4d, 0x3f, 0x61, 0x70,
-  0x20, 0xc2, 0x62, 0xc6, 0xa5, 0x19, 0x33, 0x2d, 0x3e, 0x13, 0x41, 0x2b,
-  0xd5, 0x14, 0xb5, 0x30, 0x53, 0xae, 0xcc, 0x68, 0x86, 0x37, 0x2e, 0xb6,
-  0x9a, 0xe3, 0x51, 0x10, 0x53, 0x26, 0x0e, 0x79, 0x0e, 0xde, 0x12, 0x95,
-  0x81, 0x14, 0x41, 0x36, 0x81, 0x37, 0xae, 0xd9, 0xfb, 0xa8, 0xfb, 0x5d,
-  0x12, 0x36, 0xf8, 0xfb, 0xbf, 0x73, 0x02, 0xe0, 0x7b, 0xfb, 0xe4, 0x1f,
-  0xd2, 0xe5, 0x5f, 0xe6, 0x5d, 0x84, 0x62, 0x55, 0x3d, 0xaf, 0xdf, 0x1c,
-  0x5f, 0x7c, 0x79, 0x7c, 0x71, 0x36, 0x44, 0xf8, 0x89, 0x99, 0xbb, 0x9a,
-  0xc4, 0x7e, 0x9b, 0xe4, 0xa3, 0x24, 0xcf, 0xb4, 0x90, 0x8c, 0xfd, 0xf5,
-  0x6c, 0xfb, 0xab, 0xe1, 0xf0, 0xe0, 0xfc, 0xc4, 0xd5, 0x1c, 0x71, 0xa9,
-  0x48, 0xa2, 0x23, 0xcd, 0x25, 0x59, 0x8e, 0xe7, 0x6f, 0xaf, 0x10, 0x5d,
-  0x8c, 0x6f, 0x25, 0x44, 0xb5, 0xe1, 0xe3, 0x34, 0x1b, 0x2d, 0x3b, 0x37,
-  0x35, 0x43, 0x8d, 0x1b, 0x36, 0x74, 0x21, 0x49, 0xd4, 0x16, 0x02, 0x7e,
-  0xcd, 0x26, 0xe5, 0x9e, 0x0b, 0xe3, 0xba, 0xcd, 0x47, 0x7d, 0x22, 0xf4,
-  0x5b, 0xab, 0x0f, 0x29, 0xc1, 0xf4, 0xc4, 0x26, 0x25, 0xca, 0xd6, 0xdb,
-  0x19, 0x6e, 0xb9, 0x2a, 0xec, 0xf6, 0x2d, 0x1f, 0x0d, 0x2e, 0x8b, 0x31,
-  0x1d, 0x08, 0x67, 0x97, 0xb3, 0x64, 0xa1, 0x93, 0xcc, 0x5e, 0x1f, 0x03,
-  0x3b, 0xa0, 0xde, 0x5c, 0xbd, 0x2a, 0x31, 0x75, 0xd1, 0x27, 0x4f, 0x1d,
-  0xe8, 0x53, 0x58, 0x30, 0xf4, 0x8a, 0x84, 0xef, 0xc5, 0xfd, 0x44, 0x2f,
-  0x10, 0x40, 0x1c, 0xcf, 0xc5, 0xca, 0x2d, 0xfc, 0xbb, 0xee, 0xeb, 0xe0,
-  0x02, 0x5b, 0x88, 0xfa, 0xd7, 0x98, 0xe6, 0x68, 0x34, 0x8d, 0xe7, 0xb7,
-  0xb8, 0xc9, 0x70, 0x37, 0xb1, 0xba, 0x69, 0x58, 0x46, 0x5c, 0x8e, 0x0c,
-  0xae, 0x2d, 0x85, 0x17, 0x80, 0x00, 0x68, 0x85, 0xde, 0xd9, 0xb2, 0xeb,
-  0x20, 0x9b, 0x02, 0x27, 0x0e, 0x4e, 0x92, 0x5f, 0x04, 0xb6, 0x1a, 0x1d,
-  0x9f, 0xd2, 0xa5, 0xe4, 0x32, 0x15, 0xa0, 0x9e, 0x27, 0x53, 0x06, 0xde,
-  0xb1, 0xe0, 0x12, 0x49, 0xce, 0x4b, 0xc1, 0xc4, 0x84, 0x71, 0x18, 0xfa,
-  0x36, 0xdc, 0x10, 0xa0, 0x14, 0xe4, 0x20, 0x16, 0xae, 0x46, 0x85, 0x72,
-  0x6d, 0x61, 0x60, 0x00, 0x97, 0xf4, 0x25, 0x2b, 0xc2, 0x22, 0x26, 0x1a,
-  0xb3, 0x75, 0xe8, 0x43, 0x4b, 0x62, 0xfb, 0x4e, 0x06, 0xe1, 0x45, 0x52,
-  0xe7, 0xac, 0xaa, 0xa4, 0x48, 0xac, 0xdd, 0x26, 0x79, 0xbd, 0xcd, 0x00,
-  0x00, 0x06, 0x48, 0x0d, 0x88, 0xf5, 0xdb, 0xc1, 0xcb, 0x58, 0xdc, 0x6b,
-  0x35, 0xd6, 0xd4, 0x06, 0x3e, 0xb0, 0x4a, 0xf2, 0x08, 0x7f, 0x12, 0xff,
-  0x13, 0xe2, 0x24, 0xf5, 0xf6, 0x2d, 0x27, 0xe0, 0x36, 0x79, 0x05, 0xe9,
-  0x34, 0x0c, 0xf1, 0x14, 0x04, 0x04, 0x98, 0x05, 0x25, 0xe8, 0x1f, 0x1a,
-  0x8c, 0x93, 0x6d, 0xfb, 0x6f, 0xf9, 0xaa, 0xc8, 0xfa, 0xa3, 0x25, 0x74,
-  0x32, 0x8f, 0xd5, 0xa5, 0x89, 0x80, 0x5c, 0x14, 0x18, 0xe0, 0x5c, 0xf8,
-  0x9e, 0xdd, 0x1a, 0x48, 0xb1, 0x16, 0x4f, 0x07, 0x72, 0xee, 0xaa, 0xc0,
-  0x2d, 0x0e, 0xae, 0x43, 0x02, 0xd9, 0x11, 0xd0, 0xab, 0x51, 0xcb, 0x3a,
-  0x42, 0xdd, 0x64, 0x17, 0x72, 0x36, 0xd7, 0xaa, 0x79, 0xb0, 0xb3, 0x57,
-  0xc3, 0x76, 0x4b, 0x87, 0x96, 0x7e, 0x09, 0x11, 0x21, 0x51, 0x0c, 0x71,
-  0x8b, 0xc7, 0xb5, 0xe8, 0xff, 0xbb, 0x92, 0xeb, 0x03, 0x09, 0xd2, 0x40,
-  0x3c, 0x95, 0x22, 0x0f, 0x6b, 0x6f, 0x11, 0x39, 0x4c, 0xe5, 0xe5, 0xe5,
-  0x0f, 0xe7, 0xc7, 0xaf, 0xec, 0xcd, 0xc7, 0xf6, 0x4c, 0x00, 0xb8, 0x10,
-  0x7e, 0x91, 0x28, 0xd8, 0x65, 0x50, 0x83, 0x93, 0x88, 0xac, 0x5f, 0x9a,
-  0x5b, 0x58, 0xba, 0xe9, 0x47, 0xdf, 0x1f, 0x9d, 0x0c, 0xcf, 0x4f, 0xcf,
-  0x0e, 0x5f, 0xbd, 0xfc, 0xde, 0xb8, 0xf1, 0xe7, 0x8c, 0x38, 0x23, 0x32,
-  0x9a, 0xfb, 0xcc, 0x03, 0x04, 0xe8, 0x7b, 0x6f, 0x8f, 0xbf, 0x7b, 0x4f,
-  0x9a, 0xc1, 0x2b, 0x06, 0x05, 0xef, 0xdd, 0xc5, 0x53, 0x7d, 0x89, 0xd5,
-  0xab, 0x16, 0xb9, 0x2e, 0x48, 0xe7, 0x68, 0x5b, 0x58, 0x96, 0x27, 0x02,
-  0x84, 0xd6, 0x15, 0x24, 0x68, 0x8d, 0xc8, 0x0a, 0xea, 0x09, 0xc5, 0x95,
-  0xdc, 0xcc, 0x96, 0xe2, 0x8c, 0x99, 0xbb, 0xf9, 0xbb, 0xa5, 0x44, 0xe6,
-  0xb1, 0x37, 0x3a, 0x74, 0xf2, 0x22, 0xf8, 0x51, 0xbf, 0xf1, 0x41, 0xa1,
-  0x0a, 0xbf, 0x9b, 0x73, 0x2c, 0x84, 0xc3, 0x32, 0xd4, 0x0a, 0x99, 0x70,
-  0x9f, 0x2a, 0xe0, 0xa1, 0x22, 0xf9, 0x70, 0x1c, 0xa6, 0x85, 0x64, 0xbb,
-  0x2a, 0xcc, 0x22, 0xbe, 0xb8, 0xb1, 0xc4, 0xe3, 0x31, 0xfd, 0x60, 0x8c,
-  0x49, 0x2e, 0xe7, 0x72, 0xce, 0x55, 0xd9, 0x87, 0x97, 0xac, 0x42, 0x69,
-  0xd5, 0x32, 0x35, 0x3f, 0x5b, 0x49, 0x39, 0x24, 0xfe, 0x57, 0xb1, 0x2b,
-  0xc3, 0x52, 0x13, 0x95, 0x13, 0xed, 0xd8, 0x5c, 0x35, 0x13, 0x90, 0xad,
-  0x08, 0x92, 0x5e, 0xc8, 0x42, 0xa8, 0x20, 0xb0, 0xc6, 0x57, 0x76, 0x80,
-  0x33, 0x25, 0x8d, 0x5a, 0xc5, 0x05, 0x54, 0x4b, 0xc1, 0xee, 0x4c, 0xd3,
-  0x91, 0x37, 0x98, 0xd7, 0x3c, 0x91, 0xec, 0xe8, 0x56, 0xc4, 0x87, 0xf0,
-  0x08, 0x99, 0x29, 0xdc, 0xa7, 0xd7, 0x16, 0x99, 0x95, 0x4f, 0x14, 0xe2,
-  0x87, 0xa9, 0x3a, 0x4c, 0x82, 0x74, 0x4a, 0x2a, 0x14, 0x13, 0x13, 0xd1,
-  0xdc, 0xa7, 0x41, 0x28, 0xa3, 0x82, 0x08, 0x01, 0xfb, 0x54, 0x59, 0x36,
-  0xea, 0x95, 0x4b, 0x3a, 0x13, 0x1b, 0x59, 0x48, 0x60, 0x41, 0x7a, 0x36,
-  0x42, 0x4e, 0x74, 0x66, 0x0d, 0xe9, 0x43, 0xc5, 0xc6, 0x6b, 0xce, 0x83,
-  0x02, 0x52, 0xd3, 0x84, 0x45, 0x2d, 0x58, 0xdf, 0xc2, 0xce, 0xec, 0x26,
-  0xe5, 0x15, 0x1c, 0x2d, 0xc3, 0x7a, 0x5e, 0x6e, 0xf4, 0x52, 0xd2, 0x02,
-  0x0b, 0x8f, 0x60, 0xbb, 0x38, 0x07, 0x12, 0x62, 0xa9, 0x48, 0xe3, 0xa6,
-  0xf4, 0x68, 0xe4, 0xdc, 0xa0, 0x0a, 0x0a, 0x63, 0x74, 0x69, 0xa5, 0xfa,
-  0x1e, 0x5b, 0x51, 0xb7, 0x9a, 0x42, 0xbe, 0x79, 0x62, 0x21, 0x30, 0x62,
-  0x62, 0x28, 0xd8, 0xd7, 0x30, 0x1f, 0xbb, 0xcb, 0x98, 0x33, 0x57, 0x38,
-  0x14, 0x24, 0x57, 0xc0, 0x9d, 0x25, 0x17, 0x47, 0xd7, 0x0a, 0xa2, 0xa8,
-  0x7f, 0xc9, 0x0e, 0x37, 0x03, 0x63, 0xf3, 0xb1, 0xc0, 0xb2, 0xdc, 0x01,
-  0x59, 0x89, 0x69, 0x7d, 0xa5, 0x1d, 0xba, 0x2c, 0x6b, 0xdb, 0xac, 0x9e,
-  0x24, 0xed, 0xc4, 0xc8, 0x11, 0x31, 0x9b, 0x6e, 0x90, 0x6b, 0x58, 0x68,
-  0x06, 0xa7, 0x73, 0x56, 0x0a, 0xc3, 0x43, 0xc5, 0x22, 0x9f, 0xf3, 0x54,
-  0x71, 0x0a, 0x92, 0x64, 0xb9, 0x40, 0xf9, 0x9d, 0xb1, 0x22, 0x90, 0x23,
-  0xf8, 0xd3, 0xb5, 0x67, 0x77, 0x88, 0x5f, 0x2b, 0x5a, 0xd4, 0x37, 0xef,
-  0x4e, 0x2f, 0x4f, 0xce, 0x43, 0xc7, 0x63, 0xf4, 0xdd, 0xc9, 0xe5, 0xd7,
-  0x24, 0xaf, 0x73, 0x6d, 0xe7, 0x53, 0xf6, 0xee, 0xbc, 0x79, 0x73, 0xf0,
-  0x96, 0x33, 0xd4, 0xdf, 0x22, 0x46, 0xee, 0x00, 0x3a, 0x03, 0x73, 0x23,
-  0x5a, 0x61, 0x26, 0x1d, 0xce, 0x5d, 0xee, 0x35, 0xbd, 0x0c, 0xb5, 0xd3,
-  0x07, 0x86, 0xc3, 0x47, 0x28, 0x5c, 0x23, 0xde, 0x70, 0xd5, 0x09, 0x56,
-  0x6c, 0xd3, 0xc1, 0xa9, 0x65, 0x3d, 0x8b, 0xd7, 0xb9, 0x0e, 0x3d, 0x8e,
-  0x3c, 0x39, 0x91, 0xcd, 0xe1, 0x53, 0x95, 0xab, 0xdb, 0x7b, 0x2e, 0xb0,
-  0xa1, 0x0e, 0xc4, 0x14, 0x31, 0xab, 0x24, 0x32, 0xcd, 0x55, 0xa5, 0x91,
-  0xeb, 0xb2, 0x1a, 0xb7, 0x4e, 0x3d, 0x62, 0x48, 0x70, 0x2a, 0x67, 0xde,
-  0x18, 0xc8, 0xca, 0x26, 0xeb, 0xcb, 0x17, 0xa7, 0xe1, 0x7d, 0x5a, 0xad,
-  0x1f, 0x6c, 0x81, 0x66, 0xd7, 0x59, 0xe2, 0x0f, 0x6e, 0xff, 0xcc, 0x9a,
-  0x31, 0xcb, 0x2f, 0x34, 0x30, 0xb9, 0x5b, 0xfa, 0xcc, 0xd6, 0xfa, 0xb4,
-  0x25, 0x5b, 0xae, 0x46, 0x8d, 0x5a, 0xce, 0xf6, 0x45, 0xaa, 0xac, 0x54,
-  0xf1, 0x06, 0x72, 0xec, 0x99, 0x6b, 0x59, 0x03, 0x1a, 0x10, 0xd7, 0xab,
-  0xa9, 0x31, 0x3a, 0x67, 0x30, 0x4b, 0x7b, 0xac, 0x92, 0xd9, 0x5b, 0x2b,
-  0x25, 0x6e, 0xa9, 0x51, 0x48, 0x88, 0x64, 0x08, 0x17, 0xef, 0x33, 0x45,
-  0x59, 0xae, 0x2c, 0x1b, 0x24, 0x0f, 0x09, 0xbb, 0x37, 0xf9, 0xd7, 0xbf,
-  0x2e, 0xae, 0xc3, 0xac, 0x29, 0xcc, 0x55, 0xd3, 0x83, 0xdb, 0x31, 0x81,
-  0x45, 0x2a, 0xd2, 0xe2, 0x64, 0x95, 0x11, 0x68, 0xc5, 0xb1, 0xdd, 0x75,
-  0x1d, 0xea, 0xf7, 0x7b, 0xcd, 0xef, 0xf7, 0xc4, 0xe2, 0xc8, 0x15, 0xe8,
-  0x1d, 0x9e, 0xa6, 0xe4, 0x02, 0x87, 0xd2, 0x9b, 0xc9, 0x04, 0x4c, 0x61,
-  0x52, 0xac, 0x1e, 0x6e, 0x15, 0x61, 0x89, 0x62, 0xf6, 0xe7, 0x58, 0xa4,
-  0x65, 0x8e, 0x1c, 0x47, 0x3c, 0x02, 0x0b, 0xb1, 0x04, 0x90, 0x22, 0x5c,
-  0x0b, 0x6c, 0x8a, 0x6f, 0x2b, 0x6a, 0x90, 0xbe, 0x7f, 0xea, 0x02, 0xba,
-  0x3d, 0x4b, 0x43, 0x81, 0x2f, 0xcd, 0xa8, 0xe9, 0xa7, 0x8b, 0x3b, 0x2b,
-  0x70, 0x49, 0xbf, 0x3e, 0x77, 0xc5, 0x5d, 0x8a, 0x8a, 0x7b, 0xaa, 0x02,
-  0x5c, 0x6b, 0xbc, 0x1f, 0x83, 0x43, 0x80, 0x1d, 0x33, 0x06, 0x87, 0xf9,
-  0x3a, 0xa8, 0x8d, 0x2b, 0xa9, 0x86, 0xf6, 0x06, 0xa5, 0x26, 0x61, 0x5b,
-  0x9e, 0x22, 0xbb, 0x12, 0xec, 0x28, 0xe0, 0x2d, 0x21, 0x4e, 0xbc, 0xee,
-  0xfa, 0x8f, 0x7b, 0x3b, 0x3b, 0xbb, 0xfb, 0xbb, 0x9f, 0xbd, 0xd8, 0xd9,
-  0xdf, 0xdd, 0xdd, 0xdd, 0xdb, 0xdf, 0xdd, 0xdf, 0xdf, 0xdb, 0xf9, 0x69,
-  0x9b, 0x4d, 0x47, 0x77, 0x69, 0x72, 0xef, 0x2a, 0xc9, 0x7f, 0x27, 0xd7,
-  0x34, 0xfc, 0x05, 0x2b, 0x71, 0x03, 0x32, 0x97, 0x54, 0x0d, 0xd7, 0x04,
-  0x1f, 0x87, 0x4c, 0x20, 0xc1, 0xd7, 0x02, 0x48, 0xb6, 0xf0, 0xd9, 0x8a,
-  0x38, 0x83, 0x01, 0x60, 0x32, 0x46, 0xf5, 0xb7, 0x25, 0xcf, 0x74, 0xc4,
-  0xd2, 0x00, 0x44, 0x9a, 0xc2, 0xe5, 0x86, 0x5d, 0x4f, 0xb3, 0xd1, 0x08,
-  0x01, 0xf0, 0x2e, 0x3d, 0x72, 0x10, 0x31, 0x32, 0xe7, 0xad, 0x90, 0x84,
-  0x3a, 0x0d, 0x10, 0x9e, 0x26, 0x07, 0xdd, 0xaf, 0x8e, 0xc8, 0x5d, 0x1a,
-  0x92, 0x3b, 0xce, 0x18, 0x95, 0x7e, 0xc2, 0x4c, 0x89, 0x16, 0x29, 0x77,
-  0x69, 0x13, 0xd1, 0x55, 0xf2, 0xd9, 0xce, 0xfe, 0x3e, 0x17, 0x8e, 0xf8,
-  0xfd, 0x6e, 0x4f, 0x23, 0x0b, 0xc3, 0x70, 0xe9, 0x9e, 0xbb, 0x9d, 0xa4,
-  0x0d, 0xd6, 0x3e, 0xc2, 0x79, 0xce, 0x97, 0xb3, 0x24, 0x57, 0x3d, 0x04,
-  0xf7, 0xa1, 0x00, 0xc8, 0x30, 0x31, 0xda, 0x90, 0xdd, 0xb3, 0x28, 0x85,
-  0x02, 0x93, 0xbc, 0xe4, 0x37, 0xf8, 0xcb, 0x53, 0xcf, 0x39, 0x8e, 0xca,
-  0x5c, 0x8a, 0x4c, 0xf2, 0xc3, 0x10, 0xc8, 0x81, 0x8a, 0x91, 0xdd, 0x86,
-  0xb2, 0xaa, 0xe6, 0x74, 0xfc, 0x18, 0x0c, 0x7e, 0xef, 0xd9, 0xee, 0x4f,
-  0x12, 0xc8, 0xc6, 0x04, 0xee, 0x57, 0x41, 0x4b, 0x83, 0x4d, 0x54, 0x1e,
-  0x91, 0x34, 0x30, 0x25, 0x8c, 0xcd, 0x64, 0x70, 0x3d, 0x30, 0x21, 0x41,
-  0x0d, 0x87, 0xbd, 0x30, 0x9c, 0x58, 0x10, 0xac, 0xa5, 0x26, 0x3b, 0xd4,
-  0x2e, 0xb3, 0x0d, 0x99, 0x6d, 0x57, 0xec, 0x92, 0x95, 0x1a, 0x2f, 0x1b,
-  0x74, 0x65, 0x1c, 0x9c, 0x9c, 0x72, 0xbc, 0xca, 0x29, 0x49, 0x60, 0x43,
-  0x63, 0x65, 0x08, 0xe9, 0x41, 0xbc, 0xcd, 0x3c, 0xe5, 0xdb, 0xb4, 0xe7,
-  0xa0, 0xe5, 0x2d, 0x2c, 0x1e, 0x62, 0x05, 0xdb, 0xdd, 0x45, 0x32, 0x57,
-  0x1c, 0x28, 0x92, 0x87, 0x89, 0x9f, 0x15, 0x62, 0x4e, 0x01, 0xdc, 0x22,
-  0xe3, 0x10, 0xc3, 0xc7, 0x01, 0x89, 0x57, 0x16, 0x1e, 0xd5, 0x2c, 0xf2,
-  0x64, 0x9a, 0xdc, 0xa9, 0xdd, 0x43, 0xc0, 0xeb, 0xbe, 0x52, 0xf7, 0x82,
-  0x14, 0xb3, 0x2b, 0xbd, 0x97, 0xa4, 0xe2, 0xc1, 0xe0, 0x3e, 0xb7, 0x25,
-  0xef, 0xdf, 0xa7, 0x73, 0xa3, 0xf8, 0xaf, 0x03, 0x5c, 0x36, 0x6f, 0x0e,
-  0xbf, 0xd7, 0x67, 0x11, 0x54, 0xe3, 0x90, 0xde, 0x15, 0x9a, 0xb1, 0x5b,
-  0x8f, 0x0a, 0x14, 0x55, 0xde, 0xca, 0x21, 0x89, 0x59, 0xac, 0x67, 0x98,
-  0x98, 0x62, 0xcc, 0x63, 0xa9, 0xa5, 0xc7, 0x26, 0x14, 0xb4, 0x74, 0x45,
-  0xf2, 0x12, 0x23, 0x9f, 0xf7, 0x22, 0x5f, 0x38, 0x3e, 0x9b, 0xd2, 0x9f,
-  0x08, 0x74, 0xe0, 0x55, 0xc7, 0xb3, 0x8c, 0xe9, 0x17, 0x84, 0x1f, 0xd1,
-  0x9f, 0x12, 0xf6, 0xaa, 0x7f, 0xa1, 0xa9, 0x7c, 0x09, 0xe8, 0xc8, 0x9e,
-  0x10, 0x2b, 0xfb, 0x03, 0xca, 0xf1, 0xc0, 0x8d, 0x5e, 0xdd, 0x71, 0x32,
-  0xfe, 0x23, 0xf3, 0x16, 0x19, 0x9b, 0xc8, 0x72, 0x5b, 0x5d, 0xd9, 0x85,
-  0x91, 0x54, 0xaf, 0xfa, 0x72, 0xc9, 0x76, 0x6a, 0x57, 0x9d, 0x81, 0x47,
-  0x31, 0x63, 0xd2, 0x4a, 0xa4, 0x50, 0x9c, 0x6b, 0x9c, 0x05, 0xae, 0x25,
-  0xed, 0xae, 0xb4, 0x7e, 0x9a, 0xdd, 0x73, 0x95, 0xbb, 0xab, 0x2b, 0xae,
-  0x5b, 0x7e, 0x36, 0xf7, 0x10, 0x91, 0xcc, 0x55, 0xe5, 0xc1, 0x99, 0x95,
-  0xd6, 0xa0, 0xb9, 0x59, 0x01, 0x7b, 0x0b, 0x5c, 0x1c, 0x44, 0x07, 0x58,
-  0x25, 0x92, 0x85, 0xd0, 0x9c, 0xb8, 0xd9, 0x20, 0x0e, 0xd6, 0xe2, 0xe4,
-  0xb4, 0x04, 0x2f, 0xdf, 0x90, 0x33, 0x94, 0xfb, 0xe3, 0x98, 0xb0, 0x59,
-  0x36, 0xb7, 0xb0, 0xe7, 0x65, 0x21, 0x80, 0x61, 0x56, 0xaf, 0x77, 0x43,
-  0x6c, 0x86, 0xe9, 0x54, 0x11, 0x7a, 0x55, 0x70, 0xc6, 0x1b, 0xe1, 0x64,
-  0x26, 0xfd, 0xc5, 0xcd, 0xc2, 0x76, 0xda, 0xf8, 0x95, 0x30, 0x33, 0x0d,
-  0xb4, 0xc5, 0xf5, 0x76, 0xfe, 0xf5, 0xf9, 0x20, 0x3a, 0xe6, 0x96, 0x64,
-  0x4c, 0x7a, 0x0f, 0x41, 0x83, 0xa2, 0xef, 0x68, 0xb2, 0xd7, 0xcc, 0xc0,
-  0xcf, 0x72, 0xfe, 0x0b, 0xad, 0xe9, 0x97, 0x62, 0x34, 0xc1, 0xb7, 0xd5,
-  0x5e, 0xa9, 0x21, 0x8b, 0x88, 0x3b, 0xc7, 0xef, 0x74, 0x54, 0x88, 0x3b,
-  0xba, 0x6d, 0xf2, 0x3d, 0x64, 0x79, 0x05, 0x5e, 0x41, 0xde, 0x8c, 0x88,
-  0x69, 0x82, 0xf5, 0x2d, 0x56, 0xd8, 0x3f, 0x28, 0xdc, 0xc0, 0xe4, 0xd0,
-  0xeb, 0x41, 0x1a, 0x08, 0x48, 0x4b, 0xc9, 0xcf, 0x05, 0xd6, 0xc8, 0xb9,
-  0xca, 0x05, 0x58, 0x20, 0x4f, 0x34, 0x0c, 0x29, 0x53, 0x07, 0x86, 0xe8,
-  0x1b, 0x45, 0x52, 0x3b, 0xae, 0x81, 0x78, 0x65, 0x5f, 0xb0, 0x50, 0xcc,
-  0x63, 0x21, 0x26, 0x44, 0x5b, 0x30, 0xd8, 0xf8, 0x7f, 0x01, 0xee, 0x5f,
-  0x84, 0x44, 0xed, 0x09, 0x02, 0x00,
-};
-#define BUF_SIZE 0x10000
-/* Decompress and send to stdout a gzip-compressed buffer */
-void hugehelp(void)
-{
-  unsigned char* buf;
-  int status,headerlen;
-  z_stream z;
-
-  /* Make sure no gzip options are set */
-  if (hugehelpgz[3] & 0xfe)
-    return;
-
-  headerlen = 10;
-  z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
-  z.next_in = (unsigned char *)hugehelpgz + headerlen;
-  z.zalloc = (alloc_func)Z_NULL;
-  z.zfree = (free_func)Z_NULL;
-  z.opaque = 0;
-
-  if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
-    return;
-
-  buf = malloc(BUF_SIZE);
-  if (buf) {
-    while(1) {
-      z.avail_out = BUF_SIZE;
-      z.next_out = buf;
-      status = inflate(&z, Z_SYNC_FLUSH);
-      if (status == Z_OK || status == Z_STREAM_END) {
-        fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
-        if (status == Z_STREAM_END)
-          break;
-      }
-      else
-        break;    /* Error */
-    }
-    free(buf);
-  }
-  inflateEnd(&z);
-}
-#endif /* USE_MANUAL */
-#endif /* HAVE_LIBZ */
index 17da133..7dffa9d 100644 (file)
@@ -1 +1 @@
-MACOS (not MACOS X)\r===================\rThis is the first attempt at porting cURL to MacOS.\rhttp, ftp, dict and telnet seems to work fine, other protocols and advanced \rfeatures have not been all tested.\r\rThis port is heavily based on the GUSI library from Matthias Neeracher.\rGUSI (Grand Unified Socket Interface) is a POSIX/Pthreads/Sockets library \rbringing some of the comforts of UNIX 98 to traditional MacOS.\rThe latest GUSI release can be downloaded from sourceforge \rat <http://sourceforge.net/projects/gusi/>\r\rI have also write a few functions to help port UNIX applications to MacOS.\rThese functions are part of the GUSI Extra library that can be downloaded at\r<http://perso.wanadoo.fr/ela/resources.html#gusiextra>\r\rOpenSSL support is still experimental but I hope to deliver a version \rincluding SSL soon.\r\rcURL for MacOS requires using the CodeWarrior compiler from Metrowerks.\r\rFirst download GUSI, GUSI Extra and cURL. Access paths have been setup so that\rGUSI, GUSI Extra and cURL directories should have the same parent directory.\r\rFollow the instructions in GUSI Extra "readme.txt" mainly the ones related to\rSIOUX and GUSI patches. If you do not apply these patches curl will not behave \rcorrectly.\r\rIn the 'curl/src/macos' directory, decode "curl.mcp.xml.sit.hqx" (This is a \rstuffit binhexed file)\rFrom the CodeWarrior IDE, import 'curl/src/macos/curl.xml', adjust the access \rpaths if required. Then you should be able to build:\r- the libcurl libraries for PPC and 68K.\r- the curl application (also available for PPC and 68K) which is the command\r  line version of cURL.\r\rIf the file "hugehelp.c" is missing rename "curl/src/hugehelp.c.cvs" to \r"hugehelp.c" and make sure its file type is 'TEXT'\r
\ No newline at end of file
+MACOS (not MACOS X)\r===================\rThis is the first attempt at porting cURL to MacOS.\rhttp, ftp, dict and telnet seems to work fine, other protocols and advanced \rfeatures have not been all tested.\r\rThis port is heavily based on the GUSI library from Matthias Neeracher.\rGUSI (Grand Unified Socket Interface) is a POSIX/Pthreads/Sockets library \rbringing some of the comforts of UNIX 98 to traditional MacOS.\rThe latest GUSI release can be downloaded from sourceforge \rat <http://sourceforge.net/projects/gusi/>\r\rI have also write a few functions to help port UNIX applications to MacOS.\rThese functions are part of the GUSI Extra library that can be downloaded at\r<http://perso.wanadoo.fr/ela/resources.html#gusiextra>\r\rOpenSSL support is still experimental but I hope to deliver a version \rincluding SSL soon.\r\rcURL for MacOS requires using the CodeWarrior compiler from Metrowerks.\r\rFirst download GUSI, GUSI Extra and cURL. Access paths have been setup so that\rGUSI, GUSI Extra and cURL directories should have the same parent directory.\r\rFollow the instructions in GUSI Extra "readme.txt" mainly the ones related to\rSIOUX and GUSI patches. If you do not apply these patches curl will not behave \rcorrectly.\r\rIn the 'curl/src/macos' directory, decode "curl.mcp.xml.sit.hqx" (This is a \rstuffit binhexed file)\rFrom the CodeWarrior IDE, import 'curl/src/macos/curl.xml', adjust the access \rpaths if required. Then you should be able to build:\r- the libcurl libraries for PPC and 68K.\r- the curl application (also available for PPC and 68K) which is the command\r  line version of cURL.\r\rIf the file "tool_hugehelp.c" is missing rename "curl/src/tool_hugehelp.c.cvs"\rto "tool_hugehelp.c" and make sure its file type is 'TEXT'\r
diff --git a/src/main.c b/src/main.c
deleted file mode 100644 (file)
index a38ad62..0000000
+++ /dev/null
@@ -1,6115 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, 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 "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <errno.h>
-
-#if defined(MSDOS) || defined(WIN32)
-#  if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
-#    include <libgen.h>
-#  endif
-#endif
-
-#include <curl/curl.h>
-
-#include "urlglob.h"
-#include "writeout.h"
-#include "getpass.h"
-#include "homedir.h"
-#include "curlutil.h"
-#ifdef USE_MANUAL
-#include "hugehelp.h"
-#endif
-#ifdef USE_ENVIRONMENT
-#include "writeenv.h"
-#endif
-#include "rawstr.h"
-
-#include "xattr.h"
-
-#define CURLseparator   "--_curl_--"
-
-#ifdef NETWARE
-#ifdef __NOVELL_LIBC__
-#include <screen.h>
-#else
-#include <nwconio.h>
-#define mkdir mkdir_510
-#endif
-#endif
-
-#include "version.h"
-
-#ifdef HAVE_IO_H /* typical win32 habit */
-#include <io.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#else
-#ifdef HAVE_SYS_UTIME_H
-#include <sys/utime.h>
-#endif
-
-#endif /* HAVE_UTIME_H */
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
-#include <poll.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-#include <locale.h> /* for setlocale() */
-#endif
-
-#define ENABLE_CURLX_PRINTF
-/* make the curlx header define all printf() functions to use the curlx_*
-   versions instead */
-#include "curlx.h" /* header from the libcurl directory */
-
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-#include <iconv.h>
-/* set default codesets for iconv */
-#ifndef CURL_ICONV_CODESET_OF_NETWORK
-#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-#endif
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h> /* for IPPROTO_TCP */
-#endif
-#ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h> /* for TCP_KEEPIDLE, TCP_KEEPINTVL */
-#endif
-
-#include "os-specific.h"
-
-/* The last #include file should be: */
-#ifdef CURLDEBUG
-#ifndef CURLTOOLDEBUG
-#define MEMDEBUG_NODEFINES
-#endif
-/* This is low-level hard-hacking memory leak tracking and similar. Using
-   the library level code from this client-side is ugly, but we do this
-   anyway for convenience. */
-#include "memdebug.h"
-#endif
-
-#ifdef __VMS
-static int vms_show = 0;
-#endif
-
-#if defined(NETWARE)
-#define PRINT_LINES_PAUSE 23
-#endif
-
-#if defined(__SYMBIAN32__)
-#define PRINT_LINES_PAUSE 16
-#define pressanykey() getchar()
-#endif
-
-#define DEFAULT_MAXREDIRS  50L
-
-#if defined(O_BINARY) && defined(HAVE_SETMODE)
-#ifdef __HIGHC__
-#define SET_BINMODE(file) _setmode(file,O_BINARY)
-#else
-#define SET_BINMODE(file) setmode(fileno(file),O_BINARY)
-#endif
-#else
-#define SET_BINMODE(file)   ((void)0)
-#endif
-
-#ifndef O_BINARY
-/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in
-   source code but yet it doesn't ruin anything */
-#define O_BINARY 0
-#endif
-
-#if defined(MSDOS) || defined(WIN32)
-
-static const char *msdosify(const char *);
-static char *rename_if_dos_device_name(char *);
-static char *sanitize_dos_name(char *);
-
-#ifndef S_ISCHR
-#  ifdef S_IFCHR
-#    define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#  else
-#    define S_ISCHR(m) (0) /* cannot tell if file is a device */
-#  endif
-#endif
-
-#ifdef WIN32
-#  define _use_lfn(f) (1)  /* long file names always available */
-#elif !defined(__DJGPP__) || (__DJGPP__ < 2)  /* DJGPP 2.0 has _use_lfn() */
-#  define _use_lfn(f) (0)  /* long file names never available */
-#endif
-
-#endif /* MSDOS || WIN32 */
-
-#ifdef MSDOS
-#define USE_WATT32
-#include <dos.h>
-
-#ifdef DJGPP
-/* we want to glob our own argv[] */
-char **__crt0_glob_function (char *arg)
-{
-  (void)arg;
-  return (char**)0;
-}
-#endif /* __DJGPP__ */
-#endif /* MSDOS */
-
-#ifndef STDIN_FILENO
-#define STDIN_FILENO  fileno(stdin)
-#endif
-
-#ifndef STDOUT_FILENO
-#define STDOUT_FILENO  fileno(stdout)
-#endif
-
-#ifndef STDERR_FILENO
-#define STDERR_FILENO  fileno(stderr)
-#endif
-
-#define CURL_PROGRESS_STATS 0 /* default progress display */
-#define CURL_PROGRESS_BAR   1
-
-typedef enum {
-  HTTPREQ_UNSPEC,
-  HTTPREQ_GET,
-  HTTPREQ_HEAD,
-  HTTPREQ_POST,
-  HTTPREQ_SIMPLEPOST,
-  HTTPREQ_CUSTOM,
-  HTTPREQ_LAST
-} HttpReq;
-
-/*
- * Large file support (>2Gb) using WIN32 functions.
- */
-
-#ifdef USE_WIN32_LARGE_FILES
-#  include <io.h>
-#  include <sys/types.h>
-#  include <sys/stat.h>
-#  define lseek(fdes,offset,whence)  _lseeki64(fdes, offset, whence)
-#  define fstat(fdes,stp)            _fstati64(fdes, stp)
-#  define stat(fname,stp)            _stati64(fname, stp)
-#  define struct_stat                struct _stati64
-#  define LSEEK_ERROR                (__int64)-1
-#endif
-
-/*
- * Small file support (<2Gb) using WIN32 functions.
- */
-
-#ifdef USE_WIN32_SMALL_FILES
-#  include <io.h>
-#  include <sys/types.h>
-#  include <sys/stat.h>
-#  define lseek(fdes,offset,whence)  _lseek(fdes, (long)offset, whence)
-#  define fstat(fdes,stp)            _fstat(fdes, stp)
-#  define stat(fname,stp)            _stat(fname, stp)
-#  define struct_stat                struct _stat
-#  define LSEEK_ERROR                (long)-1
-#endif
-
-#ifndef struct_stat
-#  define struct_stat struct stat
-#endif
-
-#ifndef LSEEK_ERROR
-#  define LSEEK_ERROR (off_t)-1
-#endif
-
-#ifdef WIN32
-#  include <direct.h>
-#  define mkdir(x,y) (mkdir)(x)
-#  undef  PATH_MAX
-#  define PATH_MAX MAX_PATH
-#  ifndef __POCC__
-#    define F_OK 0
-#  endif
-#endif
-
-/*
- * Default sizeof(off_t) in case it hasn't been defined in config file.
- */
-
-#ifndef SIZEOF_OFF_T
-#  if defined(__VMS) && !defined(__VAX)
-#    if defined(_LARGEFILE)
-#      define SIZEOF_OFF_T 8
-#    endif
-#  elif defined(__OS400__) && defined(__ILEC400__)
-#    if defined(_LARGE_FILES)
-#      define SIZEOF_OFF_T 8
-#    endif
-#  elif defined(__MVS__) && defined(__IBMC__)
-#    if defined(_LP64) || defined(_LARGE_FILES)
-#      define SIZEOF_OFF_T 8
-#    endif
-#  elif defined(__370__) && defined(__IBMC__)
-#    if defined(_LP64) || defined(_LARGE_FILES)
-#      define SIZEOF_OFF_T 8
-#    endif
-#  elif defined(TPF)
-#    define SIZEOF_OFF_T 8
-#  endif
-#  ifndef SIZEOF_OFF_T
-#    define SIZEOF_OFF_T 4
-#  endif
-#endif
-
-#ifdef CURL_DOES_CONVERSIONS
-#ifdef HAVE_ICONV
-iconv_t inbound_cd  = (iconv_t)-1;
-iconv_t outbound_cd = (iconv_t)-1;
-
-/*
- * convert_to_network() is an internal function to convert
- * from the host encoding to ASCII on non-ASCII platforms.
- */
-static CURLcode
-convert_to_network(char *buffer, size_t length)
-{
-  CURLcode rc;
-
-  /* translate from the host encoding to the network encoding */
-  char *input_ptr, *output_ptr;
-  size_t in_bytes, out_bytes;
-
-  /* open an iconv conversion descriptor if necessary */
-  if(outbound_cd == (iconv_t)-1) {
-    outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
-                             CURL_ICONV_CODESET_OF_HOST);
-    if(outbound_cd == (iconv_t)-1) {
-      return CURLE_CONV_FAILED;
-    }
-  }
-  /* call iconv */
-  input_ptr = output_ptr = buffer;
-  in_bytes = out_bytes = length;
-  rc = iconv(outbound_cd, &input_ptr,  &in_bytes,
-             &output_ptr, &out_bytes);
-  if((rc == -1) || (in_bytes != 0)) {
-    return CURLE_CONV_FAILED;
-  }
-
-  return CURLE_OK;
-}
-
-/*
- * convert_from_network() is an internal function
- * for performing ASCII conversions on non-ASCII platforms.
- */
-static CURLcode
-convert_from_network(char *buffer, size_t length)
-{
-  CURLcode rc;
-
-  /* translate from the network encoding to the host encoding */
-  char *input_ptr, *output_ptr;
-  size_t in_bytes, out_bytes;
-
-  /* open an iconv conversion descriptor if necessary */
-  if(inbound_cd == (iconv_t)-1) {
-    inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
-                            CURL_ICONV_CODESET_OF_NETWORK);
-    if(inbound_cd == (iconv_t)-1) {
-      return CURLE_CONV_FAILED;
-    }
-  }
-  /* call iconv */
-  input_ptr = output_ptr = buffer;
-  in_bytes = out_bytes = length;
-  rc = iconv(inbound_cd, &input_ptr,  &in_bytes,
-             &output_ptr, &out_bytes);
-  if((rc == -1) || (in_bytes != 0)) {
-    return CURLE_CONV_FAILED;
-  }
-
-  return CURLE_OK;
-}
-#endif /* HAVE_ICONV */
-
-static
-char convert_char(curl_infotype infotype, char this_char)
-{
-/* determine how this specific character should be displayed */
-  switch(infotype) {
-  case CURLINFO_DATA_IN:
-  case CURLINFO_DATA_OUT:
-  case CURLINFO_SSL_DATA_IN:
-  case CURLINFO_SSL_DATA_OUT:
-    /* data, treat as ASCII */
-    if((this_char >= 0x20) && (this_char < 0x7f)) {
-      /* printable ASCII hex value: convert to host encoding */
-      convert_from_network(&this_char, 1);
-    }
-    else {
-      /* non-printable ASCII, use a replacement character */
-      return UNPRINTABLE_CHAR;
-    }
-    /* fall through to default */
-  default:
-    /* treat as host encoding */
-    if(ISPRINT(this_char)
-       &&  (this_char != '\t')
-       &&  (this_char != '\r')
-       &&  (this_char != '\n')) {
-      /* printable characters excluding tabs and line end characters */
-      return this_char;
-    }
-    break;
-  }
-  /* non-printable, use a replacement character  */
-  return UNPRINTABLE_CHAR;
-}
-#endif /* CURL_DOES_CONVERSIONS */
-
-#ifdef WIN32
-
-#ifdef __BORLANDC__
-/* 64-bit lseek-like function unavailable */
-#  define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
-#endif
-
-#ifdef __POCC__
-#  if(__POCC__ < 450)
-/* 64-bit lseek-like function unavailable */
-#    define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
-#  else
-#    define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
-#  endif
-#endif
-
-#ifndef HAVE_FTRUNCATE
-#define HAVE_FTRUNCATE 1
-#endif
-
-/*
- * Truncate a file handle at a 64-bit position 'where'.
- */
-
-static int ftruncate64(int fd, curl_off_t where)
-{
-  if(_lseeki64(fd, where, SEEK_SET) < 0)
-    return -1;
-
-  if(!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
-    return -1;
-
-  return 0;
-}
-#define ftruncate(fd,where) ftruncate64(fd,where)
-
-#endif /* WIN32 */
-
-typedef enum {
-  TRACE_NONE,  /* no trace/verbose output at all! */
-  TRACE_BIN,   /* tcpdump inspired look */
-  TRACE_ASCII, /* like *BIN but without the hex output */
-  TRACE_PLAIN  /* -v/--verbose type */
-} trace;
-
-struct OutStruct {
-  char *filename;
-  FILE *stream;
-  struct Configurable *config;
-  curl_off_t bytes; /* amount written so far */
-  curl_off_t init;  /* original size (non-zero when appending) */
-};
-
-struct Configurable {
-  CURL *easy; /* once we have one, we keep it here */
-  bool remote_time;
-  char *random_file;
-  char *egd_file;
-  char *useragent;
-  char *cookie;     /* single line with specified cookies */
-  char *cookiejar;  /* write to this file */
-  char *cookiefile; /* read from this file */
-  bool cookiesession; /* new session? */
-  bool encoding;    /* Accept-Encoding please */
-  long authtype;    /* auth bitmask */
-  bool use_resume;
-  bool resume_from_current;
-  bool disable_epsv;
-  bool disable_eprt;
-  bool ftp_pret;
-  long proto;
-  bool proto_present;
-  long proto_redir;
-  bool proto_redir_present;
-  curl_off_t resume_from;
-  char *postfields;
-  curl_off_t postfieldsize;
-  char *referer;
-  long timeout;
-  long connecttimeout;
-  long maxredirs;
-  curl_off_t max_filesize;
-  char *headerfile;
-  char *ftpport;
-  char *iface;
-  int localport;
-  int localportrange;
-  unsigned short porttouse;
-  char *range;
-  long low_speed_limit;
-  long low_speed_time;
-  bool showerror;
-  char *userpwd;
-  char *proxyuserpwd;
-  char *proxy;
-  int proxyver;     /* set to CURLPROXY_HTTP* define */
-  char *noproxy;
-  char *mail_from;
-  struct curl_slist *mail_rcpt;
-  bool proxytunnel;
-  bool ftp_append;         /* APPE on ftp */
-  bool mute;               /* shutup */
-  bool use_ascii;          /* select ascii or text transfer */
-  bool autoreferer;        /* automatically set referer */
-  bool failonerror;        /* fail on (HTTP) errors */
-  bool include_headers;    /* send headers to data output */
-  bool no_body;            /* don't get the body */
-  bool dirlistonly;        /* only get the FTP dir list */
-  bool followlocation;     /* follow http redirects */
-  bool unrestricted_auth;  /* Continue to send authentication (user+password)
-                              when following ocations, even when hostname
-                              changed */
-  bool netrc_opt;
-  bool netrc;
-  bool noprogress;
-  bool isatty;             /* updated internally only if the output is a tty */
-  struct getout *url_list; /* point to the first node */
-  struct getout *url_last; /* point to the last/current node */
-  struct getout *url_get;  /* point to the node to fill in URL */
-  struct getout *url_out;  /* point to the node to fill in outfile */
-  char *cipher_list;
-  char *cert;
-  char *cert_type;
-  char *cacert;
-  char *capath;
-  char *crlfile;
-  char *key;
-  char *key_type;
-  char *key_passwd;
-  char *pubkey;
-  char *hostpubmd5;
-  char *engine;
-  bool list_engines;
-  bool crlf;
-  char *customrequest;
-  char *krblevel;
-  char *trace_dump; /* file to dump the network trace to, or NULL */
-  FILE *trace_stream;
-  bool trace_fopened;
-  trace tracetype;
-  bool tracetime; /* include timestamp? */
-  long httpversion;
-  int progressmode;
-  bool nobuffer;
-  bool readbusy; /* set when reading input returns EAGAIN */
-  bool globoff;
-  bool use_httpget;
-  bool insecure_ok; /* set TRUE to allow insecure SSL connects */
-  bool create_dirs;
-  bool ftp_create_dirs;
-  bool ftp_skip_ip;
-  bool proxynegotiate;
-  bool proxyntlm;
-  bool proxydigest;
-  bool proxybasic;
-  bool proxyanyauth;
-  char *writeout; /* %-styled format string to output */
-  bool writeenv; /* write results to environment, if available */
-  FILE *errors; /* if stderr redirect is requested */
-  bool errors_fopened;
-  struct curl_slist *quote;
-  struct curl_slist *postquote;
-  struct curl_slist *prequote;
-  long ssl_version;
-  long ip_version;
-  curl_TimeCond timecond;
-  time_t condtime;
-  struct curl_slist *headers;
-  struct curl_httppost *httppost;
-  struct curl_httppost *last_post;
-  struct curl_slist *telnet_options;
-  struct curl_slist *resolve;
-  HttpReq httpreq;
-
-  /* for bandwidth limiting features: */
-  curl_off_t sendpersecond; /* send to peer */
-  curl_off_t recvpersecond; /* receive from peer */
-
-  bool ftp_ssl;
-  bool ftp_ssl_reqd;
-  bool ftp_ssl_control;
-  bool ftp_ssl_ccc;
-  int ftp_ssl_ccc_mode;
-
-  char *socksproxy; /* set to server string */
-  int socksver;     /* set to CURLPROXY_SOCKS* define */
-  char *socks5_gssapi_service;  /* set service name for gssapi principal
-                                 * default rcmd */
-  int socks5_gssapi_nec ;  /* The NEC reference server does not protect
-                            * the encryption type exchange */
-
-  bool tcp_nodelay;
-  long req_retry;   /* number of retries */
-  long retry_delay; /* delay between retries (in seconds) */
-  long retry_maxtime; /* maximum time to keep retrying */
-
-  char *ftp_account; /* for ACCT */
-  char *ftp_alternative_to_user; /* send command if USER/PASS fails */
-  int ftp_filemethod;
-  long tftp_blksize; /* TFTP BLKSIZE option */
-  bool ignorecl; /* --ignore-content-length */
-  bool disable_sessionid;
-
-  char *libcurl; /* output libcurl code to this file name */
-  bool raw;
-  bool post301;
-  bool post302;
-  bool nokeepalive; /* for keepalive needs */
-  long alivetime;
-  bool content_disposition; /* use Content-disposition filename */
-
-  int default_node_flags; /* default flags to seach for each 'node', which is
-                             basically each given URL to transfer */
-  struct OutStruct *outs;
-  bool xattr; /* store metadata in extended attributes */
-};
-
-#define WARN_PREFIX "Warning: "
-#define WARN_TEXTWIDTH (79 - (int)strlen(WARN_PREFIX))
-/* produce this text message to the user unless mute was selected */
-static void warnf(struct Configurable *config, const char *fmt, ...)
-{
-  if(!config->mute) {
-    va_list ap;
-    int len;
-    char *ptr;
-    char print_buffer[256];
-
-    va_start(ap, fmt);
-    len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
-    va_end(ap);
-
-    ptr = print_buffer;
-    while(len > 0) {
-      fputs(WARN_PREFIX, config->errors);
-
-      if(len > (int)WARN_TEXTWIDTH) {
-        int cut = WARN_TEXTWIDTH-1;
-
-        while(!ISSPACE(ptr[cut]) && cut) {
-          cut--;
-        }
-        if(0 == cut)
-          /* not a single cutting position was found, just cut it at the
-             max text width then! */
-          cut = WARN_TEXTWIDTH-1;
-
-        (void)fwrite(ptr, cut + 1, 1, config->errors);
-        fputs("\n", config->errors);
-        ptr += cut+1; /* skip the space too */
-        len -= cut;
-      }
-      else {
-        fputs(ptr, config->errors);
-        len = 0;
-      }
-    }
-  }
-}
-
-/*
- * This is the main global constructor for the app. Call this before
- * _any_ libcurl usage. If this fails, *NO* libcurl functions may be
- * used, or havoc may be the result.
- */
-static CURLcode main_init(void)
-{
-#ifdef DJGPP
-  /* stop stat() wasting time */
-  _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
-#endif
-
-  return curl_global_init(CURL_GLOBAL_DEFAULT);
-}
-
-/*
- * This is the main global destructor for the app. Call this after
- * _all_ libcurl usage is done.
- */
-static void main_free(void)
-{
-  curl_global_cleanup();
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-  /* close iconv conversion descriptor */
-  if(inbound_cd != (iconv_t)-1)
-    iconv_close(inbound_cd);
-  if(outbound_cd != (iconv_t)-1)
-    iconv_close(outbound_cd);
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
-}
-
-static int SetHTTPrequest(struct Configurable *config,
-                          HttpReq req, HttpReq *store)
-{
-  if((*store == HTTPREQ_UNSPEC) ||
-     (*store == req)) {
-    *store = req;
-    return 0;
-  }
-  warnf(config, "You can only select one HTTP request!\n");
-  return 1;
-}
-
-static void helpf(FILE *errors, const char *fmt, ...)
-{
-  va_list ap;
-  if(fmt) {
-    va_start(ap, fmt);
-    fputs("curl: ", errors); /* prefix it */
-    vfprintf(errors, fmt, ap);
-    va_end(ap);
-  }
-  fprintf(errors, "curl: try 'curl --help' "
-#ifdef USE_MANUAL
-          "or 'curl --manual' "
-#endif
-          "for more information\n");
-}
-
-/*
- * A chain of these nodes contain URL to get and where to put the URL's
- * contents.
- */
-struct getout {
-  struct getout *next; /* next one */
-  char *url;     /* the URL we deal with */
-  char *outfile; /* where to store the output */
-  char *infile;  /* file to upload, if GETOUT_UPLOAD is set */
-  int flags;     /* options */
-};
-#define GETOUT_OUTFILE (1<<0)   /* set when outfile is deemed done */
-#define GETOUT_URL     (1<<1)   /* set when URL is deemed done */
-#define GETOUT_USEREMOTE (1<<2) /* use remote file name locally */
-#define GETOUT_UPLOAD  (1<<3)   /* if set, -T has been used */
-#define GETOUT_NOUPLOAD  (1<<4) /* if set, -T "" has been used */
-
-static void help(void)
-{
-  int i;
-  /* A few of these source lines are >80 columns wide, but that's only because
-     breaking the strings narrower makes this chunk look even worse!
-
-     Starting with 7.18.0, this list of command line options is sorted based
-     on the long option name. It is not done automatically, although a command
-     line like the following can help out:
-
-     curl --help | cut -c5- | grep "^-" | sort
-  */
-  static const char * const helptext[]={
-    "Usage: curl [options...] <url>",
-    "Options: (H) means HTTP/HTTPS only, (F) means FTP only",
-    "    --anyauth       Pick \"any\" authentication method (H)",
-    " -a/--append        Append to target file when uploading (F/SFTP)",
-    "    --basic         Use HTTP Basic Authentication (H)",
-    "    --cacert <file> CA certificate to verify peer against (SSL)",
-    "    --capath <directory> CA directory to verify peer against (SSL)",
-    " -E/--cert <cert[:passwd]> Client certificate file and password (SSL)",
-    "    --cert-type <type> Certificate file type (DER/PEM/ENG) (SSL)",
-    "    --ciphers <list> SSL ciphers to use (SSL)",
-    "    --compressed    Request compressed response (using deflate or gzip)",
-    " -K/--config <file> Specify which config file to read",
-    "    --connect-timeout <seconds> Maximum time allowed for connection",
-    " -C/--continue-at <offset> Resumed transfer offset",
-    " -b/--cookie <name=string/file> Cookie string or file to read cookies from (H)",
-    " -c/--cookie-jar <file> Write cookies to this file after operation (H)",
-    "    --create-dirs   Create necessary local directory hierarchy",
-    "    --crlf          Convert LF to CRLF in upload",
-    "    --crlfile <file> Get a CRL list in PEM format from the given file",
-    " -d/--data <data>   HTTP POST data (H)",
-    "    --data-ascii <data>  HTTP POST ASCII data (H)",
-    "    --data-binary <data> HTTP POST binary data (H)",
-    "    --data-urlencode <name=data/name@filename> HTTP POST data url encoded (H)",
-    "    --digest        Use HTTP Digest Authentication (H)",
-    "    --disable-eprt  Inhibit using EPRT or LPRT (F)",
-    "    --disable-epsv  Inhibit using EPSV (F)",
-    " -D/--dump-header <file> Write the headers to this file",
-    "    --egd-file <file> EGD socket path for random data (SSL)",
-    "    --engine <eng>  Crypto engine to use (SSL). \"--engine list\" for list",
-#ifdef USE_ENVIRONMENT
-    "    --environment   Write results to environment variables (RISC OS)",
-#endif
-    " -f/--fail          Fail silently (no output at all) on HTTP errors (H)",
-    " -F/--form <name=content> Specify HTTP multipart POST data (H)",
-    "    --form-string <name=string> Specify HTTP multipart POST data (H)",
-    "    --ftp-account <data> Account data to send when requested by server (F)",
-    "    --ftp-alternative-to-user <cmd> String to replace \"USER [name]\" (F)",
-    "    --ftp-create-dirs Create the remote dirs if not present (F)",
-    "    --ftp-method [multicwd/nocwd/singlecwd] Control CWD usage (F)",
-    "    --ftp-pasv      Use PASV/EPSV instead of PORT (F)",
-    " -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
-    "    --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n"
-    "    --ftp-pret      Send PRET before PASV (for drftpd) (F)",
-    "    --ftp-ssl-ccc   Send CCC after authenticating (F)",
-    "    --ftp-ssl-ccc-mode [active/passive] Set CCC mode (F)",
-    "    --ftp-ssl-control Require SSL/TLS for ftp login, clear for transfer (F)",
-    " -G/--get           Send the -d data with a HTTP GET (H)",
-    " -g/--globoff       Disable URL sequences and ranges using {} and []",
-    " -H/--header <line> Custom header to pass to server (H)",
-    " -I/--head          Show document info only",
-    " -h/--help          This help text",
-    "    --hostpubmd5 <md5> Hex encoded MD5 string of the host public key. (SSH)",
-    " -0/--http1.0       Use HTTP 1.0 (H)",
-    "    --ignore-content-length  Ignore the HTTP Content-Length header",
-    " -i/--include       Include protocol headers in the output (H/F)",
-    " -k/--insecure      Allow connections to SSL sites without certs (H)",
-    "    --interface <interface> Specify network interface/address to use",
-    " -4/--ipv4          Resolve name to IPv4 address",
-    " -6/--ipv6          Resolve name to IPv6 address",
-    " -j/--junk-session-cookies Ignore session cookies read from file (H)",
-    "    --keepalive-time <seconds> Interval between keepalive probes",
-    "    --key <key>     Private key file name (SSL/SSH)",
-    "    --key-type <type> Private key file type (DER/PEM/ENG) (SSL)",
-    "    --krb <level>   Enable Kerberos with specified security level (F)",
-    "    --libcurl <file> Dump libcurl equivalent code of this command line",
-    "    --limit-rate <rate> Limit transfer speed to this rate",
-    " -J/--remote-header-name Use the header-provided filename (H)",
-    " -l/--list-only     List only names of an FTP directory (F)",
-    "    --local-port <num>[-num] Force use of these local port numbers",
-    " -L/--location      Follow Location: hints (H)",
-    "    --location-trusted Follow Location: and send auth to other hosts (H)",
-    " -M/--manual        Display the full manual",
-    "    --mail-from <from> Mail from this address",
-    "    --mail-rcpt <to> Mail to this receiver(s)",
-    "    --max-filesize <bytes> Maximum file size to download (H/F)",
-    "    --max-redirs <num> Maximum number of redirects allowed (H)",
-    " -m/--max-time <seconds> Maximum time allowed for the transfer",
-    "    --negotiate     Use HTTP Negotiate Authentication (H)",
-    " -n/--netrc         Must read .netrc for user name and password",
-    "    --netrc-optional Use either .netrc or URL; overrides -n",
-    " -N/--no-buffer     Disable buffering of the output stream",
-    "    --no-keepalive  Disable keepalive use on the connection",
-    "    --no-sessionid  Disable SSL session-ID reusing (SSL)",
-    "    --noproxy       Comma-separated list of hosts which do not use proxy",
-    "    --ntlm          Use HTTP NTLM authentication (H)",
-    " -o/--output <file> Write output to <file> instead of stdout",
-    "    --pass  <pass>  Pass phrase for the private key (SSL/SSH)",
-    "    --post301       Do not switch to GET after following a 301 redirect (H)",
-    "    --post302       Do not switch to GET after following a 302 redirect (H)",
-    " -#/--progress-bar  Display transfer progress as a progress bar",
-    "    --proto <protocols>       Enable/disable specified protocols",
-    "    --proto-redir <protocols> Enable/disable specified protocols on redirect",
-    " -x/--proxy <host[:port]> Use HTTP proxy on given port",
-    "    --proxy-anyauth Pick \"any\" proxy authentication method (H)",
-    "    --proxy-basic   Use Basic authentication on the proxy (H)",
-    "    --proxy-digest  Use Digest authentication on the proxy (H)",
-    "    --proxy-negotiate Use Negotiate authentication on the proxy (H)",
-    "    --proxy-ntlm    Use NTLM authentication on the proxy (H)",
-    " -U/--proxy-user <user[:password]> Set proxy user and password",
-    "    --proxy1.0 <host[:port]> Use HTTP/1.0 proxy on given port",
-    " -p/--proxytunnel   Operate through a HTTP proxy tunnel (using CONNECT)",
-    "    --pubkey <key>  Public key file name (SSH)",
-    " -Q/--quote <cmd>   Send command(s) to server before file transfer (F/SFTP)",
-    "    --random-file <file> File for reading random data from (SSL)",
-    " -r/--range <range> Retrieve only the bytes within a range",
-    "    --raw           Pass HTTP \"raw\", without any transfer decoding (H)",
-    " -e/--referer       Referer URL (H)",
-    " -O/--remote-name   Write output to a file named as the remote file",
-    "    --remote-name-all Use the remote file name for all URLs",
-    " -R/--remote-time   Set the remote file's time on the local output",
-    " -X/--request <command> Specify request command to use",
-    "    --resolve <host:port:address> Force resolve of HOST:PORT to ADDRESS",
-    "    --retry <num>   Retry request <num> times if transient problems occur",
-    "    --retry-delay <seconds> When retrying, wait this many seconds between each",
-    "    --retry-max-time <seconds> Retry only within this period",
-    " -S/--show-error    Show error. With -s, make curl show errors when they occur",
-    " -s/--silent        Silent mode. Don't output anything",
-    "    --socks4 <host[:port]> SOCKS4 proxy on given host + port",
-    "    --socks4a <host[:port]> SOCKS4a proxy on given host + port",
-    "    --socks5 <host[:port]> SOCKS5 proxy on given host + port",
-    "    --socks5-hostname <host[:port]> SOCKS5 proxy, pass host name to proxy",
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-    "    --socks5-gssapi-service <name> SOCKS5 proxy service name for gssapi",
-    "    --socks5-gssapi-nec  Compatibility with NEC SOCKS5 server",
-#endif
-    " -Y/--speed-limit   Stop transfer if below speed-limit for 'speed-time' secs",
-    " -y/--speed-time    Time needed to trig speed-limit abort. Defaults to 30",
-    "    --ssl           Try SSL/TLS (FTP, IMAP, POP3, SMTP)",
-    "    --ssl-reqd      Require SSL/TLS (FTP, IMAP, POP3, SMTP)",
-    " -2/--sslv2         Use SSLv2 (SSL)",
-    " -3/--sslv3         Use SSLv3 (SSL)",
-    "    --stderr <file> Where to redirect stderr. - means stdout",
-    "    --tcp-nodelay   Use the TCP_NODELAY option",
-    " -t/--telnet-option <OPT=val> Set telnet option",
-    "    --tftp-blksize <value> Set TFTP BLKSIZE option (must be >512)",
-    " -z/--time-cond <time> Transfer based on a time condition",
-    " -1/--tlsv1         Use TLSv1 (SSL)",
-    "    --trace <file>  Write a debug trace to the given file",
-    "    --trace-ascii <file> Like --trace but without the hex output",
-    "    --trace-time    Add time stamps to trace/verbose output",
-    " -T/--upload-file <file> Transfer <file> to remote site",
-    "    --url <URL>     Set URL to work with",
-    " -B/--use-ascii     Use ASCII/text transfer",
-    " -u/--user <user[:password]> Set server user and password",
-    " -A/--user-agent <string> User-Agent to send to server (H)",
-    " -v/--verbose       Make the operation more talkative",
-    " -V/--version       Show version number and quit",
-
-#ifdef USE_WATT32
-    "    --wdebug        Turn on Watt-32 debugging",
-#endif
-    " -w/--write-out <format> What to output after completion",
-    "    --xattr         Store metadata in extended file attributes",
-    " -q                 If used as the first parameter disables .curlrc",
-    NULL
-  };
-  for(i=0; helptext[i]; i++) {
-    puts(helptext[i]);
-#ifdef PRINT_LINES_PAUSE
-    if(i && ((i % PRINT_LINES_PAUSE) == 0))
-      pressanykey();
-#endif
-  }
-}
-
-struct LongShort {
-  const char *letter;
-  const char *lname;
-  bool extraparam;
-};
-
-/* global variable to hold info about libcurl */
-static curl_version_info_data *curlinfo;
-
-static int parseconfig(const char *filename,
-                       struct Configurable *config);
-static char *my_get_line(FILE *fp);
-static int create_dir_hierarchy(const char *outfile, FILE *errors);
-
-static void GetStr(char **string,
-                   const char *value)
-{
-  if(*string)
-    free(*string);
-  if(value)
-    *string = strdup(value);
-  else
-    *string = NULL;
-}
-
-static void clean_getout(struct Configurable *config)
-{
-  struct getout *node=config->url_list;
-  struct getout *next;
-
-  while(node) {
-    next = node->next;
-    if(node->url)
-      free(node->url);
-    if(node->outfile)
-      free(node->outfile);
-    if(node->infile)
-      free(node->infile);
-    free(node);
-
-    node = next; /* GOTO next */
-  }
-}
-
-static struct getout *new_getout(struct Configurable *config)
-{
-  struct getout *node =malloc(sizeof(struct getout));
-  struct getout *last= config->url_last;
-  if(node) {
-    /* clear the struct */
-    memset(node, 0, sizeof(struct getout));
-
-    /* append this new node last in the list */
-    if(last)
-      last->next = node;
-    else
-      config->url_list = node; /* first node */
-
-    /* move the last pointer */
-    config->url_last = node;
-
-    node->flags = config->default_node_flags;
-  }
-  return node;
-}
-
-/* Structure for storing the information needed to build a multiple files
- * section
- */
-struct multi_files {
-  struct curl_forms   form;
-  struct multi_files *next;
-};
-
-/* Add a new list entry possibly with a type_name
- */
-static struct multi_files *
-AddMultiFiles(const char *file_name,
-              const char *type_name,
-              const char *show_filename,
-              struct multi_files **multi_start,
-              struct multi_files **multi_current)
-{
-  struct multi_files *multi;
-  struct multi_files *multi_type = NULL;
-  struct multi_files *multi_name = NULL;
-  multi = malloc(sizeof(struct multi_files));
-  if(multi) {
-    memset(multi, 0, sizeof(struct multi_files));
-    multi->form.option = CURLFORM_FILE;
-    multi->form.value = file_name;
-  }
-  else
-    return NULL;
-
-  if(!*multi_start)
-    *multi_start = multi;
-
-  if(type_name) {
-    multi_type = malloc(sizeof(struct multi_files));
-    if(multi_type) {
-      memset(multi_type, 0, sizeof(struct multi_files));
-      multi_type->form.option = CURLFORM_CONTENTTYPE;
-      multi_type->form.value = type_name;
-      multi->next = multi_type;
-
-      multi = multi_type;
-    }
-    else {
-      free(multi);
-      return NULL;
-    }
-  }
-  if(show_filename) {
-    multi_name = malloc(sizeof(struct multi_files));
-    if(multi_name) {
-      memset(multi_name, 0, sizeof(struct multi_files));
-      multi_name->form.option = CURLFORM_FILENAME;
-      multi_name->form.value = show_filename;
-      multi->next = multi_name;
-
-      multi = multi_name;
-    }
-    else {
-      free(multi);
-      return NULL;
-    }
-  }
-
-  if(*multi_current)
-    (*multi_current)->next = multi;
-
-  *multi_current = multi;
-
-  return *multi_current;
-}
-
-/* Free the items of the list.
- */
-static void FreeMultiInfo(struct multi_files *multi_start)
-{
-  struct multi_files *multi;
-  while(multi_start) {
-    multi = multi_start;
-    multi_start = multi_start->next;
-    free(multi);
-  }
-}
-
-/* Print list of OpenSSL engines supported.
- */
-static void list_engines(const struct curl_slist *engines)
-{
-  puts("Build-time engines:");
-  if(!engines) {
-    puts("  <none>");
-    return;
-  }
-  for( ; engines; engines = engines->next)
-    printf("  %s\n", engines->data);
-}
-
-/***************************************************************************
- *
- * formparse()
- *
- * Reads a 'name=value' parameter and builds the appropriate linked list.
- *
- * Specify files to upload with 'name=@filename'. Supports specified
- * given Content-Type of the files. Such as ';type=<content-type>'.
- *
- * If literal_value is set, any initial '@' or '<' in the value string
- * loses its special meaning, as does any embedded ';type='.
- *
- * You may specify more than one file for a single name (field). Specify
- * multiple files by writing it like:
- *
- * 'name=@filename,filename2,filename3'
- *
- * If you want content-types specified for each too, write them like:
- *
- * 'name=@filename;type=image/gif,filename2,filename3'
- *
- * If you want custom headers added for a single part, write them in a separate
- * file and do like this:
- *
- * 'name=foo;headers=@headerfile' or why not
- * 'name=@filemame;headers=@headerfile'
- *
- * To upload a file, but to fake the file name that will be included in the
- * formpost, do like this:
- *
- * 'name=@filename;filename=/dev/null'
- *
- * This function uses curl_formadd to fulfill it's job. Is heavily based on
- * the old curl_formparse code.
- *
- ***************************************************************************/
-
-#define FORM_FILE_SEPARATOR ','
-#define FORM_TYPE_SEPARATOR ';'
-
-static int formparse(struct Configurable *config,
-                     const char *input,
-                     struct curl_httppost **httppost,
-                     struct curl_httppost **last_post,
-                     bool literal_value)
-{
-  /* nextarg MUST be a string in the format 'name=contents' and we'll
-     build a linked list with the info */
-  char name[256];
-  char *contents;
-  char major[128];
-  char minor[128];
-  char *contp;
-  const char *type = NULL;
-  char *sep;
-  char *sep2;
-
-  if((1 == sscanf(input, "%255[^=]=", name)) &&
-     ((contp = strchr(input, '=')) != NULL)) {
-    /* the input was using the correct format */
-
-    /* Allocate the contents */
-    contents = strdup(contp+1);
-    if(!contents) {
-      fprintf(config->errors, "out of memory\n");
-      return 1;
-    }
-    contp = contents;
-
-    if('@' == contp[0] && !literal_value) {
-      struct multi_files *multi_start = NULL, *multi_current = NULL;
-      /* we use the @-letter to indicate file name(s) */
-      contp++;
-
-      multi_start = multi_current=NULL;
-
-      do {
-        /* since this was a file, it may have a content-type specifier
-           at the end too, or a filename. Or both. */
-        char *ptr;
-        char *filename=NULL;
-
-        sep=strchr(contp, FORM_TYPE_SEPARATOR);
-        sep2=strchr(contp, FORM_FILE_SEPARATOR);
-
-        /* pick the closest */
-        if(sep2 && (sep2 < sep)) {
-          sep = sep2;
-
-          /* no type was specified! */
-        }
-
-        type = NULL;
-
-        if(sep) {
-
-          /* if we got here on a comma, don't do much */
-          if(FORM_FILE_SEPARATOR == *sep)
-            ptr = NULL;
-          else
-            ptr = sep+1;
-
-          *sep=0; /* terminate file name at separator */
-
-          while(ptr && (FORM_FILE_SEPARATOR!= *ptr)) {
-
-            /* pass all white spaces */
-            while(ISSPACE(*ptr))
-              ptr++;
-
-            if(checkprefix("type=", ptr)) {
-              /* set type pointer */
-              type = &ptr[5];
-
-              /* verify that this is a fine type specifier */
-              if(2 != sscanf(type, "%127[^/]/%127[^;,\n]",
-                             major, minor)) {
-                warnf(config, "Illegally formatted content-type field!\n");
-                free(contents);
-                FreeMultiInfo(multi_start);
-                return 2; /* illegal content-type syntax! */
-              }
-
-              /* now point beyond the content-type specifier */
-              sep = (char *)type + strlen(major)+strlen(minor)+1;
-
-              /* there's a semicolon following - we check if it is a filename
-                 specified and if not we simply assume that it is text that
-                 the user wants included in the type and include that too up
-                 to the next zero or semicolon. */
-              if((*sep==';') && !checkprefix(";filename=", sep)) {
-                sep2 = strchr(sep+1, ';');
-                if(sep2)
-                  sep = sep2;
-                else
-                  sep = sep+strlen(sep); /* point to end of string */
-              }
-
-              if(*sep) {
-                *sep=0; /* zero terminate type string */
-
-                ptr=sep+1;
-              }
-              else
-                ptr = NULL; /* end */
-            }
-            else if(checkprefix("filename=", ptr)) {
-              filename = &ptr[9];
-              ptr=strchr(filename, FORM_TYPE_SEPARATOR);
-              if(!ptr) {
-                ptr=strchr(filename, FORM_FILE_SEPARATOR);
-              }
-              if(ptr) {
-                *ptr=0; /* zero terminate */
-                ptr++;
-              }
-            }
-            else
-              /* confusion, bail out of loop */
-              break;
-          }
-          /* find the following comma */
-          if(ptr)
-            sep=strchr(ptr, FORM_FILE_SEPARATOR);
-          else
-            sep=NULL;
-        }
-        else {
-          sep=strchr(contp, FORM_FILE_SEPARATOR);
-        }
-        if(sep) {
-          /* the next file name starts here */
-          *sep =0;
-          sep++;
-        }
-        /* if type == NULL curl_formadd takes care of the problem */
-
-        if(!AddMultiFiles(contp, type, filename, &multi_start,
-                          &multi_current)) {
-          warnf(config, "Error building form post!\n");
-          free(contents);
-          FreeMultiInfo(multi_start);
-          return 3;
-        }
-        contp = sep; /* move the contents pointer to after the separator */
-
-      } while(sep && *sep); /* loop if there's another file name */
-
-      /* now we add the multiple files section */
-      if(multi_start) {
-        struct curl_forms *forms = NULL;
-        struct multi_files *ptr = multi_start;
-        unsigned int i, count = 0;
-        while(ptr) {
-          ptr = ptr->next;
-          ++count;
-        }
-        forms = malloc((count+1)*sizeof(struct curl_forms));
-        if(!forms)
-        {
-          fprintf(config->errors, "Error building form post!\n");
-          free(contents);
-          FreeMultiInfo(multi_start);
-          return 4;
-        }
-        for(i = 0, ptr = multi_start; i < count; ++i, ptr = ptr->next)
-        {
-          forms[i].option = ptr->form.option;
-          forms[i].value = ptr->form.value;
-        }
-        forms[count].option = CURLFORM_END;
-        FreeMultiInfo(multi_start);
-        if(curl_formadd(httppost, last_post,
-                        CURLFORM_COPYNAME, name,
-                        CURLFORM_ARRAY, forms, CURLFORM_END) != 0) {
-          warnf(config, "curl_formadd failed!\n");
-          free(forms);
-          free(contents);
-          return 5;
-        }
-        free(forms);
-      }
-    }
-    else {
-      struct curl_forms info[4];
-      int i = 0;
-      char *ct = literal_value? NULL: strstr(contp, ";type=");
-
-      info[i].option = CURLFORM_COPYNAME;
-      info[i].value = name;
-      i++;
-
-      if(ct) {
-        info[i].option = CURLFORM_CONTENTTYPE;
-        info[i].value = &ct[6];
-        i++;
-        ct[0]=0; /* zero terminate here */
-      }
-
-      if( contp[0]=='<' && !literal_value) {
-        info[i].option = CURLFORM_FILECONTENT;
-        info[i].value = contp+1;
-        i++;
-        info[i].option = CURLFORM_END;
-
-        if(curl_formadd(httppost, last_post,
-                        CURLFORM_ARRAY, info, CURLFORM_END ) != 0) {
-          warnf(config, "curl_formadd failed, possibly the file %s is bad!\n",
-                contp+1);
-          free(contents);
-          return 6;
-        }
-      }
-      else {
-#ifdef CURL_DOES_CONVERSIONS
-        convert_to_network(contp, strlen(contp));
-#endif
-        info[i].option = CURLFORM_COPYCONTENTS;
-        info[i].value = contp;
-        i++;
-        info[i].option = CURLFORM_END;
-        if(curl_formadd(httppost, last_post,
-                        CURLFORM_ARRAY, info, CURLFORM_END) != 0) {
-          warnf(config, "curl_formadd failed!\n");
-          free(contents);
-          return 7;
-        }
-      }
-    }
-
-  }
-  else {
-    warnf(config, "Illegally formatted input field!\n");
-    return 1;
-  }
-  free(contents);
-  return 0;
-}
-
-
-typedef enum {
-  PARAM_OK,
-  PARAM_OPTION_AMBIGUOUS,
-  PARAM_OPTION_UNKNOWN,
-  PARAM_REQUIRES_PARAMETER,
-  PARAM_BAD_USE,
-  PARAM_HELP_REQUESTED,
-  PARAM_GOT_EXTRA_PARAMETER,
-  PARAM_BAD_NUMERIC,
-  PARAM_LIBCURL_DOESNT_SUPPORT,
-  PARAM_NO_MEM,
-  PARAM_LAST
-} ParameterError;
-
-static const char *param2text(int res)
-{
-  ParameterError error = (ParameterError)res;
-  switch(error) {
-  case PARAM_GOT_EXTRA_PARAMETER:
-    return "had unsupported trailing garbage";
-  case PARAM_OPTION_UNKNOWN:
-    return "is unknown";
-  case PARAM_OPTION_AMBIGUOUS:
-    return "is ambiguous";
-  case PARAM_REQUIRES_PARAMETER:
-    return "requires parameter";
-  case PARAM_BAD_USE:
-    return "is badly used here";
-  case PARAM_BAD_NUMERIC:
-    return "expected a proper numerical parameter";
-  case PARAM_LIBCURL_DOESNT_SUPPORT:
-    return "the installed libcurl version doesn't support this";
-  case PARAM_NO_MEM:
-    return "out of memory";
-  default:
-    return "unknown error";
-  }
-}
-
-static ParameterError file2string(char **bufp, FILE *file)
-{
-  char buffer[256];
-  char *ptr;
-  char *string = NULL;
-  size_t stringlen = 0;
-  size_t buflen;
-
-  if(file) {
-    while(fgets(buffer, sizeof(buffer), file)) {
-      if((ptr = strchr(buffer, '\r')) != NULL)
-        *ptr = '\0';
-      if((ptr = strchr(buffer, '\n')) != NULL)
-        *ptr = '\0';
-      buflen = strlen(buffer);
-      if((ptr = realloc(string, stringlen+buflen+1)) == NULL) {
-        if(string)
-          free(string);
-        return PARAM_NO_MEM;
-      }
-      string = ptr;
-      strcpy(string+stringlen, buffer);
-      stringlen += buflen;
-    }
-  }
-  *bufp = string;
-  return PARAM_OK;
-}
-
-static ParameterError file2memory(char **bufp, size_t *size, FILE *file)
-{
-  char *newbuf;
-  char *buffer = NULL;
-  size_t alloc = 512;
-  size_t nused = 0;
-  size_t nread;
-
-  if(file) {
-    do {
-      if(!buffer || (alloc == nused)) {
-        /* size_t overflow detection for huge files */
-        if(alloc+1 > ((size_t)-1)/2) {
-          if(buffer)
-            free(buffer);
-          return PARAM_NO_MEM;
-        }
-        alloc *= 2;
-        /* allocate an extra char, reserved space, for null termination */
-        if((newbuf = realloc(buffer, alloc+1)) == NULL) {
-          if(buffer)
-            free(buffer);
-          return PARAM_NO_MEM;
-        }
-        buffer = newbuf;
-      }
-      nread = fread(buffer+nused, 1, alloc-nused, file);
-      nused += nread;
-    } while(nread);
-    /* null terminate the buffer in case it's used as a string later */
-    buffer[nused] = '\0';
-    /* free trailing slack space, if possible */
-    if(alloc != nused) {
-      if((newbuf = realloc(buffer, nused+1)) != NULL)
-        buffer = newbuf;
-    }
-    /* discard buffer if nothing was read */
-    if(!nused) {
-      free(buffer);
-      buffer = NULL; /* no string */
-    }
-  }
-  *size = nused;
-  *bufp = buffer;
-  return PARAM_OK;
-}
-
-static void cleanarg(char *str)
-{
-#ifdef HAVE_WRITABLE_ARGV
-  /* now that GetStr has copied the contents of nextarg, wipe the next
-   * argument out so that the username:password isn't displayed in the
-   * system process list */
-  if(str) {
-    size_t len = strlen(str);
-    memset(str, ' ', len);
-  }
-#else
-  (void)str;
-#endif
-}
-
-/*
- * Parse the string and write the integer in the given address. Return
- * non-zero on failure, zero on success.
- *
- * The string must start with a digit to be valid.
- *
- * Since this function gets called with the 'nextarg' pointer from within the
- * getparameter a lot, we must check it for NULL before accessing the str
- * data.
- */
-
-static int str2num(long *val, const char *str)
-{
-  if(str && ISDIGIT(*str)) {
-    char *endptr;
-    long num = strtol(str, &endptr, 10);
-    if((endptr != str) && (endptr == str + strlen(str))) {
-      *val = num;
-      return 0;  /* Ok */
-    }
-  }
-  return 1; /* badness */
-}
-
-/*
- * Parse the string and modify the long in the given address. Return
- * non-zero on failure, zero on success.
- *
- * The string is a list of protocols
- *
- * Since this function gets called with the 'nextarg' pointer from within the
- * getparameter a lot, we must check it for NULL before accessing the str
- * data.
- */
-
-static long proto2num(struct Configurable *config, long *val, const char *str)
-{
-  char *buffer;
-  const char *sep = ",";
-  char *token;
-
-  static struct sprotos {
-    const char *name;
-    long bit;
-  } const protos[] = {
-    { "all", CURLPROTO_ALL },
-    { "http", CURLPROTO_HTTP },
-    { "https", CURLPROTO_HTTPS },
-    { "ftp", CURLPROTO_FTP },
-    { "ftps", CURLPROTO_FTPS },
-    { "scp", CURLPROTO_SCP },
-    { "sftp", CURLPROTO_SFTP },
-    { "telnet", CURLPROTO_TELNET },
-    { "ldap", CURLPROTO_LDAP },
-    { "ldaps", CURLPROTO_LDAPS },
-    { "dict", CURLPROTO_DICT },
-    { "file", CURLPROTO_FILE },
-    { "tftp", CURLPROTO_TFTP },
-    { "imap", CURLPROTO_IMAP },
-    { "imaps", CURLPROTO_IMAPS },
-    { "pop3", CURLPROTO_POP3 },
-    { "pop3s", CURLPROTO_POP3S },
-    { "smtp", CURLPROTO_SMTP },
-    { "smtps", CURLPROTO_SMTPS },
-    { "rtsp", CURLPROTO_RTSP },
-    { "gopher", CURLPROTO_GOPHER },
-    { NULL, 0 }
-  };
-
-  if(!str)
-    return 1;
-
-  buffer = strdup(str); /* because strtok corrupts it */
-
-  for(token = strtok(buffer, sep);
-      token;
-      token = strtok(NULL, sep)) {
-    enum e_action { allow, deny, set } action = allow;
-
-    struct sprotos const *pp;
-
-    /* Process token modifiers */
-    while(!ISALNUM(*token)) { /* may be NULL if token is all modifiers */
-      switch (*token++) {
-      case '=':
-        action = set;
-        break;
-      case '-':
-        action = deny;
-        break;
-      case '+':
-        action = allow;
-        break;
-      default: /* Includes case of terminating NULL */
-        free(buffer);
-        return 1;
-      }
-    }
-
-    for(pp=protos; pp->name; pp++) {
-      if(curlx_raw_equal(token, pp->name)) {
-        switch (action) {
-        case deny:
-          *val &= ~(pp->bit);
-          break;
-        case allow:
-          *val |= pp->bit;
-          break;
-        case set:
-          *val = pp->bit;
-          break;
-        }
-        break;
-      }
-    }
-
-    if(!(pp->name)) { /* unknown protocol */
-      /* If they have specified only this protocol, we say treat it as
-         if no protocols are allowed */
-      if(action == set)
-        *val = 0;
-      warnf(config, "unrecognized protocol '%s'\n", token);
-    }
-  }
-  free(buffer);
-  return 0;
-}
-
-/**
- * Parses the given string looking for an offset (which may be
- * a larger-than-integer value).
- *
- * @param val  the offset to populate
- * @param str  the buffer containing the offset
- * @return zero if successful, non-zero if failure.
- */
-static int str2offset(curl_off_t *val, const char *str)
-{
-#if(CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
-  *val = curlx_strtoofft(str, NULL, 0);
-  if((*val == CURL_OFF_T_MAX || *val == CURL_OFF_T_MIN) && (ERRNO == ERANGE))
-    return 1;
-#else
-  *val = strtol(str, NULL, 0);
-  if((*val == LONG_MIN || *val == LONG_MAX) && ERRNO == ERANGE)
-    return 1;
-#endif
-  return 0;
-}
-
-static void checkpasswd(const char *kind, /* for what purpose */
-                        char **userpwd) /* pointer to allocated string */
-{
-  char *ptr;
-  if(!*userpwd)
-    return;
-
-  ptr = strchr(*userpwd, ':');
-  if(!ptr) {
-    /* no password present, prompt for one */
-    char passwd[256]="";
-    char prompt[256];
-    size_t passwdlen;
-    size_t userlen = strlen(*userpwd);
-    char *passptr;
-
-    /* build a nice-looking prompt */
-    curlx_msnprintf(prompt, sizeof(prompt),
-                    "Enter %s password for user '%s':",
-                    kind, *userpwd);
-
-    /* get password */
-    getpass_r(prompt, passwd, sizeof(passwd));
-    passwdlen = strlen(passwd);
-
-    /* extend the allocated memory area to fit the password too */
-    passptr = realloc(*userpwd,
-                      passwdlen + 1 + /* an extra for the colon */
-                      userlen + 1);   /* an extra for the zero */
-
-    if(passptr) {
-      /* append the password separated with a colon */
-      passptr[userlen]=':';
-      memcpy(&passptr[userlen+1], passwd, passwdlen+1);
-      *userpwd = passptr;
-    }
-  }
-}
-
-static ParameterError add2list(struct curl_slist **list,
-                               const char *ptr)
-{
-  struct curl_slist *newlist = curl_slist_append(*list, ptr);
-  if(newlist)
-    *list = newlist;
-  else
-    return PARAM_NO_MEM;
-
-  return PARAM_OK;
-}
-
-static int ftpfilemethod(struct Configurable *config, const char *str)
-{
-  if(curlx_raw_equal("singlecwd", str))
-    return CURLFTPMETHOD_SINGLECWD;
-  if(curlx_raw_equal("nocwd", str))
-    return CURLFTPMETHOD_NOCWD;
-  if(curlx_raw_equal("multicwd", str))
-    return CURLFTPMETHOD_MULTICWD;
-  warnf(config, "unrecognized ftp file method '%s', using default\n", str);
-  return CURLFTPMETHOD_MULTICWD;
-}
-
-static int ftpcccmethod(struct Configurable *config, const char *str)
-{
-  if(curlx_raw_equal("passive", str))
-    return CURLFTPSSL_CCC_PASSIVE;
-  if(curlx_raw_equal("active", str))
-    return CURLFTPSSL_CCC_ACTIVE;
-  warnf(config, "unrecognized ftp CCC method '%s', using default\n", str);
-  return CURLFTPSSL_CCC_PASSIVE;
-}
-
-
-static int sockoptcallback(void *clientp, curl_socket_t curlfd,
-                           curlsocktype purpose)
-{
-  struct Configurable *config = (struct Configurable *)clientp;
-  int onoff = 1; /* this callback is only used if we ask for keepalives on the
-                    connection */
-#if defined(TCP_KEEPIDLE) || defined(TCP_KEEPINTVL)
-  int keepidle = (int)config->alivetime;
-#endif
-
-  switch(purpose) {
-  case CURLSOCKTYPE_IPCXN:
-    if(setsockopt(curlfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&onoff,
-                  sizeof(onoff)) < 0) {
-      /* don't abort operation, just issue a warning */
-      SET_SOCKERRNO(0);
-      warnf(clientp, "Could not set SO_KEEPALIVE!\n");
-      return 0;
-    }
-    else {
-      if(config->alivetime) {
-#ifdef TCP_KEEPIDLE
-        if(setsockopt(curlfd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&keepidle,
-                      sizeof(keepidle)) < 0) {
-          /* don't abort operation, just issue a warning */
-          SET_SOCKERRNO(0);
-          warnf(clientp, "Could not set TCP_KEEPIDLE!\n");
-          return 0;
-        }
-#endif
-#ifdef TCP_KEEPINTVL
-        if(setsockopt(curlfd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepidle,
-                      sizeof(keepidle)) < 0) {
-          /* don't abort operation, just issue a warning */
-          SET_SOCKERRNO(0);
-          warnf(clientp, "Could not set TCP_KEEPINTVL!\n");
-          return 0;
-        }
-#endif
-      }
-    }
-    break;
-  default:
-    break;
-  }
-
-  return 0;
-}
-
-
-static ParameterError getparameter(char *flag, /* f or -long-flag */
-                                   char *nextarg, /* NULL if unset */
-                                   bool *usedarg, /* set to TRUE if the arg
-                                                     has been used */
-                                   struct Configurable *config)
-{
-  char letter;
-  char subletter=0; /* subletters can only occur on long options */
-  int rc; /* generic return code variable */
-  const char *parse=NULL;
-  unsigned int j;
-  time_t now;
-  int hit=-1;
-  bool longopt=FALSE;
-  bool singleopt=FALSE; /* when true means '-o foo' used '-ofoo' */
-  ParameterError err;
-  bool toggle=TRUE; /* how to switch boolean options, on or off. Controlled
-                       by using --OPTION or --no-OPTION */
-
-  /* single-letter,
-     long-name,
-     boolean whether it takes an additional argument
-  */
-  static const struct LongShort aliases[]= {
-    /* all these ones, starting with "*" or "$" as a short-option have *no*
-       short option to mention. */
-    {"*", "url",         TRUE},
-    {"*a", "random-file", TRUE},
-    {"*b", "egd-file",   TRUE},
-    {"*c", "connect-timeout", TRUE},
-    {"*d", "ciphers",    TRUE},
-    {"*e", "disable-epsv", FALSE},
-    {"*E", "epsv", FALSE}, /* made like this to make --no-epsv and --epsv to
-                              work although --disable-epsv is the documented
-                              option */
-#ifdef USE_ENVIRONMENT
-    {"*f", "environment", FALSE},
-#endif
-    {"*g", "trace",      TRUE},
-    {"*h", "trace-ascii", TRUE},
-    {"*i", "limit-rate", TRUE},
-    {"*j", "compressed",  FALSE}, /* might take an arg someday */
-    {"*k", "digest",     FALSE},
-    {"*l", "negotiate",  FALSE},
-    {"*m", "ntlm",       FALSE},
-    {"*n", "basic",      FALSE},
-    {"*o", "anyauth",    FALSE},
-#ifdef USE_WATT32
-    {"*p", "wdebug",     FALSE},
-#endif
-    {"*q", "ftp-create-dirs", FALSE},
-    {"*r", "create-dirs", FALSE},
-    {"*s", "max-redirs",   TRUE},
-    {"*t", "proxy-ntlm",   FALSE},
-    {"*u", "crlf",        FALSE},
-    {"*v", "stderr",      TRUE},
-    {"*w", "interface",   TRUE},
-    {"*x", "krb" ,        TRUE},
-    {"*x", "krb4" ,       TRUE}, /* this is the previous name */
-    {"*y", "max-filesize", TRUE},
-    {"*z", "disable-eprt", FALSE},
-    {"*Z", "eprt", FALSE}, /* made like this to make --no-eprt and --eprt to
-                              work although --disable-eprt is the documented
-                              option */
-    {"$a", "ftp-ssl",    FALSE}, /* deprecated name since 7.20.0 */
-    {"$a", "ssl",        FALSE}, /* new option name in 7.20.0, previously this
-                                    was ftp-ssl */
-    {"$b", "ftp-pasv",   FALSE},
-    {"$c", "socks5",   TRUE},
-    {"$c", "socks",      TRUE}, /* this is how the option once was documented
-                                   but we prefer the --socks5 version for
-                                   explicit version */
-    {"$d", "tcp-nodelay",FALSE},
-    {"$e", "proxy-digest", FALSE},
-    {"$f", "proxy-basic", FALSE},
-    {"$g", "retry",      TRUE},
-    {"$h", "retry-delay", TRUE},
-    {"$i", "retry-max-time", TRUE},
-    {"$k", "proxy-negotiate",   FALSE},
-    {"$m", "ftp-account", TRUE},
-    {"$n", "proxy-anyauth", FALSE},
-    {"$o", "trace-time", FALSE},
-    {"$p", "ignore-content-length", FALSE},
-    {"$q", "ftp-skip-pasv-ip", FALSE},
-    {"$r", "ftp-method", TRUE},
-    {"$s", "local-port", TRUE},
-    {"$t", "socks4",     TRUE},
-    {"$T", "socks4a",    TRUE},
-    {"$u", "ftp-alternative-to-user", TRUE},
-    {"$v", "ftp-ssl-reqd", FALSE}, /* deprecated name since 7.20.0 */
-    {"$v", "ssl-reqd", FALSE},  /* new option name in 7.20.0, previously this
-                                   was ftp-ssl-reqd */
-    {"$w", "sessionid", FALSE}, /* listed as --no-sessionid in the help */
-    {"$x", "ftp-ssl-control", FALSE},
-    {"$y", "ftp-ssl-ccc", FALSE},
-    {"$j", "ftp-ssl-ccc-mode", TRUE},
-    {"$z", "libcurl",    TRUE},
-    {"$#", "raw",        FALSE},
-    {"$0", "post301",    FALSE},
-    {"$1", "keepalive",   FALSE}, /* listed as --no-keepalive in the help */
-    {"$2", "socks5-hostname", TRUE},
-    {"$3", "keepalive-time",  TRUE},
-    {"$4", "post302",    FALSE},
-    {"$5", "noproxy",    TRUE},
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-    {"$6", "socks5-gssapi-service",  TRUE},
-    {"$7", "socks5-gssapi-nec",  FALSE},
-#endif
-    {"$8", "proxy1.0",   TRUE},
-    {"$9", "tftp-blksize", TRUE},
-    {"$A", "mail-from", TRUE},
-    {"$B", "mail-rcpt", TRUE},
-    {"$C", "ftp-pret",   FALSE},
-    {"$D", "proto",      TRUE},
-    {"$E", "proto-redir", TRUE},
-    {"$F", "resolve",    TRUE},
-    {"0", "http1.0",     FALSE},
-    {"1", "tlsv1",       FALSE},
-    {"2", "sslv2",       FALSE},
-    {"3", "sslv3",       FALSE},
-    {"4", "ipv4",       FALSE},
-    {"6", "ipv6",       FALSE},
-    {"a", "append",      FALSE},
-    {"A", "user-agent",  TRUE},
-    {"b", "cookie",      TRUE},
-    {"B", "use-ascii",   FALSE},
-    {"c", "cookie-jar",  TRUE},
-    {"C", "continue-at", TRUE},
-    {"d", "data",        TRUE},
-    {"da", "data-ascii", TRUE},
-    {"db", "data-binary", TRUE},
-    {"de", "data-urlencode", TRUE},
-    {"D", "dump-header", TRUE},
-    {"e", "referer",     TRUE},
-    {"E", "cert",        TRUE},
-    {"Ea", "cacert",     TRUE},
-    {"Eb","cert-type",   TRUE},
-    {"Ec","key",         TRUE},
-    {"Ed","key-type",    TRUE},
-    {"Ee","pass",        TRUE},
-    {"Ef","engine",      TRUE},
-    {"Eg","capath ",     TRUE},
-    {"Eh","pubkey",      TRUE},
-    {"Ei", "hostpubmd5", TRUE},
-    {"Ej","crlfile",     TRUE},
-    {"f", "fail",        FALSE},
-    {"F", "form",        TRUE},
-    {"Fs","form-string", TRUE},
-    {"g", "globoff",     FALSE},
-    {"G", "get",         FALSE},
-    {"h", "help",        FALSE},
-    {"H", "header",      TRUE},
-    {"i", "include",     FALSE},
-    {"I", "head",        FALSE},
-    {"j", "junk-session-cookies", FALSE},
-    {"J", "remote-header-name", FALSE},
-    {"k", "insecure",    FALSE},
-    {"K", "config",      TRUE},
-    {"l", "list-only",   FALSE},
-    {"L", "location",    FALSE},
-    {"Lt", "location-trusted", FALSE},
-    {"m", "max-time",    TRUE},
-    {"M", "manual",      FALSE},
-    {"n", "netrc",       FALSE},
-    {"no", "netrc-optional", FALSE},
-    {"N", "buffer",   FALSE}, /* listed as --no-buffer in the help */
-    {"o", "output",      TRUE},
-    {"O",  "remote-name", FALSE},
-    {"Oa", "remote-name-all", FALSE},
-    {"p", "proxytunnel", FALSE},
-    {"P", "ftpport",     TRUE}, /* older version */
-    {"P", "ftp-port",    TRUE},
-    {"q", "disable",     FALSE},
-    {"Q", "quote",       TRUE},
-    {"r", "range",       TRUE},
-    {"R", "remote-time", FALSE},
-    {"s", "silent",      FALSE},
-    {"S", "show-error",  FALSE},
-    {"t", "telnet-options", TRUE}, /* this is documented as telnet-option */
-    {"T", "upload-file", TRUE},
-    {"u", "user",        TRUE},
-    {"U", "proxy-user",  TRUE},
-    {"v", "verbose",     FALSE},
-    {"V", "version",     FALSE},
-    {"w", "write-out",   TRUE},
-    {"x", "proxy",       TRUE},
-    {"X", "request",     TRUE},
-    {"X", "http-request", TRUE}, /* OBSOLETE VERSION */
-    {"Y", "speed-limit",  TRUE},
-    {"y", "speed-time", TRUE},
-    {"z", "time-cond",   TRUE},
-    {"#", "progress-bar",FALSE},
-    {"~", "xattr",FALSE},
-  };
-
-  if(('-' != flag[0]) ||
-     (('-' == flag[0]) && ('-' == flag[1]))) {
-    /* this should be a long name */
-    char *word=('-' == flag[0])?flag+2:flag;
-    size_t fnam=strlen(word);
-    int numhits=0;
-
-    if(!strncmp(word, "no-", 3)) {
-      /* disable this option but ignore the "no-" part when looking for it */
-      word += 3;
-      toggle = FALSE;
-    }
-
-    for(j=0; j< sizeof(aliases)/sizeof(aliases[0]); j++) {
-      if(curlx_strnequal(aliases[j].lname, word, fnam)) {
-        longopt = TRUE;
-        numhits++;
-        if(curlx_raw_equal(aliases[j].lname, word)) {
-          parse = aliases[j].letter;
-          hit = j;
-          numhits = 1; /* a single unique hit */
-          break;
-        }
-        parse = aliases[j].letter;
-        hit = j;
-      }
-    }
-    if(numhits>1) {
-      /* this is at least the second match! */
-      return PARAM_OPTION_AMBIGUOUS;
-    }
-    if(hit < 0) {
-      return PARAM_OPTION_UNKNOWN;
-    }
-  }
-  else {
-    flag++; /* prefixed with one dash, pass it */
-    hit=-1;
-    parse = flag;
-  }
-
-  do {
-    /* we can loop here if we have multiple single-letters */
-
-    if(!longopt) {
-      if(NULL != parse) {
-        letter = (char)*parse;
-      }
-      else {
-        letter = '\0';
-      }
-      subletter='\0';
-    }
-    else {
-      letter = parse[0];
-      subletter = parse[1];
-    }
-    *usedarg = FALSE; /* default is that we don't use the arg */
-
-    if(hit < 0) {
-      for(j=0; j< sizeof(aliases)/sizeof(aliases[0]); j++) {
-        if(letter == aliases[j].letter[0]) {
-          hit = j;
-          break;
-        }
-      }
-      if(hit < 0) {
-        return PARAM_OPTION_UNKNOWN;
-      }
-    }
-
-    if(aliases[hit].extraparam) {
-      /* this option requires an extra parameter */
-      if(!longopt && parse[1]) {
-        nextarg=(char *)&parse[1]; /* this is the actual extra parameter */
-        singleopt=TRUE;   /* don't loop anymore after this */
-      }
-      else if(!nextarg)
-        return PARAM_REQUIRES_PARAMETER;
-      else
-        *usedarg = TRUE; /* mark it as used */
-    }
-
-    switch(letter) {
-    case '*': /* options without a short option */
-      switch(subletter) {
-      case 'a': /* random-file */
-        GetStr(&config->random_file, nextarg);
-        break;
-      case 'b': /* egd-file */
-        GetStr(&config->egd_file, nextarg);
-        break;
-      case 'c': /* connect-timeout */
-        if(str2num(&config->connecttimeout, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-      case 'd': /* ciphers */
-        GetStr(&config->cipher_list, nextarg);
-        break;
-      case 'e': /* --disable-epsv */
-        config->disable_epsv = toggle;
-        break;
-      case 'E': /* --epsv */
-        config->disable_epsv = (bool)(!toggle);
-        break;
-#ifdef USE_ENVIRONMENT
-      case 'f':
-        config->writeenv = toggle;
-        break;
-#endif
-      case 'g': /* --trace */
-        GetStr(&config->trace_dump, nextarg);
-        if(config->tracetype && (config->tracetype != TRACE_BIN))
-          warnf(config, "--trace overrides an earlier trace/verbose option\n");
-        config->tracetype = TRACE_BIN;
-        break;
-      case 'h': /* --trace-ascii */
-        GetStr(&config->trace_dump, nextarg);
-        if(config->tracetype && (config->tracetype != TRACE_ASCII))
-          warnf(config,
-                "--trace-ascii overrides an earlier trace/verbose option\n");
-        config->tracetype = TRACE_ASCII;
-        break;
-      case 'i': /* --limit-rate */
-      {
-        /* We support G, M, K too */
-        char *unit;
-        curl_off_t value = curlx_strtoofft(nextarg, &unit, 0);
-
-        if(!*unit)
-          unit=(char *)"b";
-        else if(strlen(unit) > 1)
-          unit=(char *)"w"; /* unsupported */
-
-        switch(*unit) {
-        case 'G':
-        case 'g':
-          value *= 1024*1024*1024;
-          break;
-        case 'M':
-        case 'm':
-          value *= 1024*1024;
-          break;
-        case 'K':
-        case 'k':
-          value *= 1024;
-          break;
-        case 'b':
-        case 'B':
-          /* for plain bytes, leave as-is */
-          break;
-        default:
-          warnf(config, "unsupported rate unit. Use G, M, K or B!\n");
-          return PARAM_BAD_USE;
-        }
-        config->recvpersecond = value;
-        config->sendpersecond = value;
-      }
-      break;
-
-      case 'j': /* --compressed */
-        if(toggle && !(curlinfo->features & CURL_VERSION_LIBZ))
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        config->encoding = toggle;
-        break;
-
-      case 'k': /* --digest */
-        if(toggle)
-          config->authtype |= CURLAUTH_DIGEST;
-        else
-          config->authtype &= ~CURLAUTH_DIGEST;
-        break;
-
-      case 'l': /* --negotiate */
-        if(toggle) {
-          if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
-            config->authtype |= CURLAUTH_GSSNEGOTIATE;
-          else
-            return PARAM_LIBCURL_DOESNT_SUPPORT;
-        }
-        else
-          config->authtype &= ~CURLAUTH_GSSNEGOTIATE;
-        break;
-
-      case 'm': /* --ntlm */
-        if(toggle) {
-          if(curlinfo->features & CURL_VERSION_NTLM)
-            config->authtype |= CURLAUTH_NTLM;
-          else
-            return PARAM_LIBCURL_DOESNT_SUPPORT;
-        }
-        else
-          config->authtype &= ~CURLAUTH_NTLM;
-        break;
-
-      case 'n': /* --basic for completeness */
-        if(toggle)
-          config->authtype |= CURLAUTH_BASIC;
-        else
-          config->authtype &= ~CURLAUTH_BASIC;
-        break;
-
-      case 'o': /* --anyauth, let libcurl pick it */
-        if(toggle)
-          config->authtype = CURLAUTH_ANY;
-        /* --no-anyauth simply doesn't touch it */
-        break;
-
-#ifdef USE_WATT32
-      case 'p': /* --wdebug */
-        dbug_init();
-        break;
-#endif
-      case 'q': /* --ftp-create-dirs */
-        config->ftp_create_dirs = toggle;
-        break;
-
-      case 'r': /* --create-dirs */
-        config->create_dirs = TRUE;
-        break;
-
-      case 's': /* --max-redirs */
-        /* specified max no of redirects (http(s)) */
-        if(str2num(&config->maxredirs, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-
-      case 't': /* --proxy-ntlm */
-        if(curlinfo->features & CURL_VERSION_NTLM)
-          config->proxyntlm = toggle;
-        else
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        break;
-
-      case 'u': /* --crlf */
-        /* LF -> CRLF conversion? */
-        config->crlf = TRUE;
-        break;
-
-      case 'v': /* --stderr */
-        if(strcmp(nextarg, "-")) {
-          FILE *newfile = fopen(nextarg, "wt");
-          if(!newfile)
-            warnf(config, "Failed to open %s!\n", nextarg);
-          else {
-            if(config->errors_fopened)
-              fclose(config->errors);
-            config->errors = newfile;
-            config->errors_fopened = TRUE;
-          }
-        }
-        else
-          config->errors = stdout;
-        break;
-      case 'w': /* --interface */
-        /* interface */
-        GetStr(&config->iface, nextarg);
-        break;
-      case 'x': /* --krb */
-        /* kerberos level string */
-        if(curlinfo->features & (CURL_VERSION_KERBEROS4 |
-                                 CURL_VERSION_GSSNEGOTIATE))
-          GetStr(&config->krblevel, nextarg);
-        else
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        break;
-      case 'y': /* --max-filesize */
-        if(str2offset(&config->max_filesize, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-      case 'z': /* --disable-eprt */
-        config->disable_eprt = toggle;
-        break;
-      case 'Z': /* --eprt */
-        config->disable_eprt = (bool)(!toggle);
-        break;
-
-      default: /* the URL! */
-      {
-        struct getout *url;
-        if(config->url_get || ((config->url_get = config->url_list) != NULL)) {
-          /* there's a node here, if it already is filled-in continue to find
-             an "empty" node */
-          while(config->url_get && (config->url_get->flags&GETOUT_URL))
-            config->url_get = config->url_get->next;
-        }
-
-        /* now there might or might not be an available node to fill in! */
-
-        if(config->url_get)
-          /* existing node */
-          url = config->url_get;
-        else
-          /* there was no free node, create one! */
-          url=new_getout(config);
-
-        if(url) {
-          /* fill in the URL */
-          GetStr(&url->url, nextarg);
-          url->flags |= GETOUT_URL;
-        }
-      }
-      }
-      break;
-    case '$': /* more options without a short option */
-      switch(subletter) {
-      case 'a': /* --ftp-ssl */
-        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        config->ftp_ssl = toggle;
-        break;
-      case 'b': /* --ftp-pasv */
-        if(config->ftpport)
-          free(config->ftpport);
-        config->ftpport = NULL;
-        break;
-      case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves
-                   the name locally and passes on the resolved address */
-        GetStr(&config->socksproxy, nextarg);
-        config->socksver = CURLPROXY_SOCKS5;
-        break;
-      case 't': /* --socks4 specifies a socks4 proxy to use */
-        GetStr(&config->socksproxy, nextarg);
-        config->socksver = CURLPROXY_SOCKS4;
-        break;
-      case 'T': /* --socks4a specifies a socks4a proxy to use */
-        GetStr(&config->socksproxy, nextarg);
-        config->socksver = CURLPROXY_SOCKS4A;
-        break;
-      case '2': /* --socks5-hostname specifies a socks5 proxy and enables name
-                   resolving with the proxy */
-        GetStr(&config->socksproxy, nextarg);
-        config->socksver = CURLPROXY_SOCKS5_HOSTNAME;
-        break;
-      case 'd': /* --tcp-nodelay option */
-        config->tcp_nodelay = toggle;
-        break;
-      case 'e': /* --proxy-digest */
-        config->proxydigest = toggle;
-        break;
-      case 'f': /* --proxy-basic */
-        config->proxybasic = toggle;
-        break;
-      case 'g': /* --retry */
-        if(str2num(&config->req_retry, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-      case 'h': /* --retry-delay */
-        if(str2num(&config->retry_delay, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-      case 'i': /* --retry-max-time */
-        if(str2num(&config->retry_maxtime, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-
-      case 'k': /* --proxy-negotiate */
-        if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
-          config->proxynegotiate = toggle;
-        else
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        break;
-      case 'm': /* --ftp-account */
-        GetStr(&config->ftp_account, nextarg);
-        break;
-      case 'n': /* --proxy-anyauth */
-        config->proxyanyauth = toggle;
-        break;
-      case 'o': /* --trace-time */
-        config->tracetime = toggle;
-        break;
-      case 'p': /* --ignore-content-length */
-        config->ignorecl = toggle;
-        break;
-      case 'q': /* --ftp-skip-pasv-ip */
-        config->ftp_skip_ip = toggle;
-        break;
-      case 'r': /* --ftp-method (undocumented at this point) */
-        config->ftp_filemethod = ftpfilemethod(config, nextarg);
-        break;
-      case 's': /* --local-port */
-        rc = sscanf(nextarg, "%d - %d",
-                    &config->localport,
-                    &config->localportrange);
-        if(!rc)
-          return PARAM_BAD_USE;
-        else if(rc == 1)
-          config->localportrange = 1; /* default number of ports to try */
-        else {
-          config->localportrange -= config->localport;
-          if(config->localportrange < 1) {
-            warnf(config, "bad range input\n");
-            return PARAM_BAD_USE;
-          }
-        }
-        break;
-      case 'u': /* --ftp-alternative-to-user */
-        GetStr(&config->ftp_alternative_to_user, nextarg);
-        break;
-      case 'v': /* --ftp-ssl-reqd */
-        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        config->ftp_ssl_reqd = toggle;
-        break;
-      case 'w': /* --no-sessionid */
-        config->disable_sessionid = (bool)(!toggle);
-        break;
-      case 'x': /* --ftp-ssl-control */
-        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
-          return PARAM_LIBCURL_DOESNT_SUPPORT;
-        config->ftp_ssl_control = toggle;
-        break;
-      case 'y': /* --ftp-ssl-ccc */
-        config->ftp_ssl_ccc = toggle;
-        if(!config->ftp_ssl_ccc_mode)
-          config->ftp_ssl_ccc_mode = CURLFTPSSL_CCC_PASSIVE;
-        break;
-      case 'j': /* --ftp-ssl-ccc-mode */
-        config->ftp_ssl_ccc = TRUE;
-        config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
-        break;
-      case 'z': /* --libcurl */
-        GetStr(&config->libcurl, nextarg);
-        break;
-      case '#': /* --raw */
-        config->raw = toggle;
-        break;
-      case '0': /* --post301 */
-        config->post301 = toggle;
-        break;
-      case '1': /* --no-keepalive */
-        config->nokeepalive = (bool)(!toggle);
-        break;
-      case '3': /* --keepalive-time */
-        if(str2num(&config->alivetime, nextarg))
-          return PARAM_BAD_NUMERIC;
-        break;
-      case '4': /* --post302 */
-        config->post302 = toggle;
-        break;
-      case '5': /* --noproxy */
-        /* This specifies the noproxy list */
-        GetStr(&config->noproxy, nextarg);
-        break;
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-      case '6': /* --socks5-gssapi-service */
-        GetStr(&config->socks5_gssapi_service, nextarg);
-        break;
-      case '7': /* --socks5-gssapi-nec*/
-        config->socks5_gssapi_nec = TRUE;
-        break;
-#endif
-      case '8': /* --proxy1.0 */
-        /* http 1.0 proxy */
-        GetStr(&config->proxy, nextarg);
-        config->proxyver = CURLPROXY_HTTP_1_0;
-        break;
-      case '9': /* --tftp-blksize */
-        str2num(&config->tftp_blksize, nextarg);
-        break;
-      case 'A': /* --mail-from */
-        GetStr(&config->mail_from, nextarg);
-        break;
-      case 'B': /* --mail-rcpt */
-        /* append receiver to a list */
-        err = add2list(&config->mail_rcpt, nextarg);
-        if(err)
-          return err;
-        break;
-      case 'C': /* --ftp-pret */
-        config->ftp_pret = toggle;
-        break;
-      case 'D': /* --proto */
-        config->proto_present = TRUE;
-        if(proto2num(config, &config->proto, nextarg))
-          return PARAM_BAD_USE;
-        break;
-      case 'E': /* --proto-redir */
-        config->proto_redir_present = TRUE;
-        if(proto2num(config, &config->proto_redir, nextarg))
-          return PARAM_BAD_USE;
-        break;
-      case 'F': /* --resolve */
-        err = add2list(&config->resolve, nextarg);
-        break;
-      }
-      break;
-    case '#': /* --progress-bar */
-      if(toggle)
-        config->progressmode = CURL_PROGRESS_BAR;
-      else
-        config->progressmode = CURL_PROGRESS_STATS;
-      break;
-    case '~': /* --xattr */
-      config->xattr = toggle;
-      break;
-    case '0':
-      /* HTTP version 1.0 */
-      config->httpversion = CURL_HTTP_VERSION_1_0;
-      break;
-    case '1':
-      /* TLS version 1 */
-      config->ssl_version = CURL_SSLVERSION_TLSv1;
-      break;
-    case '2':
-      /* SSL version 2 */
-      config->ssl_version = CURL_SSLVERSION_SSLv2;
-      break;
-    case '3':
-      /* SSL version 3 */
-      config->ssl_version = CURL_SSLVERSION_SSLv3;
-      break;
-    case '4':
-      /* IPv4 */
-      config->ip_version = 4;
-      break;
-    case '6':
-      /* IPv6 */
-      config->ip_version = 6;
-      break;
-    case 'a':
-      /* This makes the FTP sessions use APPE instead of STOR */
-      config->ftp_append = toggle;
-      break;
-    case 'A':
-      /* This specifies the User-Agent name */
-      GetStr(&config->useragent, nextarg);
-      break;
-    case 'b': /* cookie string coming up: */
-      if(nextarg[0] == '@') {
-        nextarg++;
-      }
-      else if(strchr(nextarg, '=')) {
-        /* A cookie string must have a =-letter */
-        GetStr(&config->cookie, nextarg);
-        break;
-      }
-      /* We have a cookie file to read from! */
-      GetStr(&config->cookiefile, nextarg);
-      break;
-    case 'B':
-      /* use ASCII/text when transfering */
-      config->use_ascii = toggle;
-      break;
-    case 'c':
-      /* get the file name to dump all cookies in */
-      GetStr(&config->cookiejar, nextarg);
-      break;
-    case 'C':
-      /* This makes us continue an ftp transfer at given position */
-      if(!curlx_strequal(nextarg, "-")) {
-        if(str2offset(&config->resume_from, nextarg))
-          return PARAM_BAD_NUMERIC;
-        config->resume_from_current = FALSE;
-      }
-      else {
-        config->resume_from_current = TRUE;
-        config->resume_from = 0;
-      }
-      config->use_resume=TRUE;
-      break;
-    case 'd':
-      /* postfield data */
-    {
-      char *postdata=NULL;
-      FILE *file;
-
-      if(subletter == 'e') { /* --data-urlencode*/
-        /* [name]=[content], we encode the content part only
-         * [name]@[file name]
-         *
-         * Case 2: we first load the file using that name and then encode
-         * the content.
-         */
-        const char *p = strchr(nextarg, '=');
-        size_t size = 0;
-        size_t nlen;
-        char is_file;
-        if(!p)
-          /* there was no '=' letter, check for a '@' instead */
-          p = strchr(nextarg, '@');
-        if(p) {
-          nlen = p - nextarg; /* length of the name part */
-          is_file = *p++; /* pass the separator */
-        }
-        else {
-          /* neither @ nor =, so no name and it isn't a file */
-          nlen = is_file = 0;
-          p = nextarg;
-        }
-        if('@' == is_file) {
-          /* a '@' letter, it means that a file name or - (stdin) follows */
-
-          if(curlx_strequal("-", p)) {
-            file = stdin;
-            SET_BINMODE(stdin);
-          }
-          else {
-            file = fopen(p, "rb");
-            if(!file)
-              warnf(config,
-                    "Couldn't read data from file \"%s\", this makes "
-                    "an empty POST.\n", nextarg);
-          }
-
-          err = file2memory(&postdata, &size, file);
-
-          if(file && (file != stdin))
-            fclose(file);
-          if(err)
-            return err;
-        }
-        else {
-          GetStr(&postdata, p);
-          size = strlen(postdata);
-        }
-
-        if(!postdata) {
-          /* no data from the file, point to a zero byte string to make this
-             get sent as a POST anyway */
-          postdata=strdup("");
-        }
-        else {
-          char *enc = curl_easy_escape(config->easy, postdata, (int)size);
-          free(postdata); /* no matter if it worked or not */
-          if(enc) {
-            /* now make a string with the name from above and append the
-               encoded string */
-            size_t outlen = nlen + strlen(enc) + 2;
-            char *n = malloc(outlen);
-            if(!n) {
-              curl_free(enc);
-              return PARAM_NO_MEM;
-            }
-            if(nlen > 0) /* only append '=' if we have a name */
-              snprintf(n, outlen, "%.*s=%s", nlen, nextarg, enc);
-            else
-              strcpy(n, enc);
-            curl_free(enc);
-            postdata = n;
-          }
-          else
-            return PARAM_NO_MEM;
-        }
-      }
-      else if('@' == *nextarg) {
-        size_t size = 0;
-        /* the data begins with a '@' letter, it means that a file name
-           or - (stdin) follows */
-        nextarg++; /* pass the @ */
-
-        if(curlx_strequal("-", nextarg)) {
-          file = stdin;
-          if(subletter == 'b') /* forced data-binary */
-            SET_BINMODE(stdin);
-        }
-        else {
-          file = fopen(nextarg, "rb");
-          if(!file)
-            warnf(config, "Couldn't read data from file \"%s\", this makes "
-                  "an empty POST.\n", nextarg);
-        }
-
-        if(subletter == 'b') {
-          /* forced binary */
-          err = file2memory(&postdata, &size, file);
-          config->postfieldsize = (curl_off_t)size;
-        }
-        else
-          err = file2string(&postdata, file);
-
-        if(file && (file != stdin))
-          fclose(file);
-        if(err)
-          return err;
-
-        if(!postdata) {
-          /* no data from the file, point to a zero byte string to make this
-             get sent as a POST anyway */
-          postdata=strdup("");
-        }
-      }
-      else {
-        GetStr(&postdata, nextarg);
-      }
-
-#ifdef CURL_DOES_CONVERSIONS
-      if(subletter != 'b') { /* NOT forced binary, convert to ASCII */
-        convert_to_network(postdata, strlen(postdata));
-      }
-#endif
-
-      if(config->postfields) {
-        /* we already have a string, we append this one
-           with a separating &-letter */
-        char *oldpost=config->postfields;
-        size_t newlen = strlen(oldpost) + strlen(postdata) + 2;
-        config->postfields=malloc(newlen);
-        if(!config->postfields) {
-          free(postdata);
-          return PARAM_NO_MEM;
-        }
-        /* use ASCII value 0x26 for '&' to accommodate non-ASCII platforms */
-        snprintf(config->postfields, newlen, "%s\x26%s", oldpost, postdata);
-        free(oldpost);
-        free(postdata);
-      }
-      else
-        config->postfields=postdata;
-    }
-    /*
-      We can't set the request type here, as this data might be used in
-      a simple GET if -G is used. Already or soon.
-
-      if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq))
-      return PARAM_BAD_USE;
-    */
-    break;
-    case 'D':
-      /* dump-header to given file name */
-      GetStr(&config->headerfile, nextarg);
-      break;
-    case 'e':
-    {
-      char *ptr = strstr(nextarg, ";auto");
-      if(ptr) {
-        /* Automatic referer requested, this may be combined with a
-           set initial one */
-        config->autoreferer = TRUE;
-        *ptr = 0; /* zero terminate here */
-      }
-      else
-        config->autoreferer = FALSE;
-      GetStr(&config->referer, nextarg);
-    }
-    break;
-    case 'E':
-      switch(subletter) {
-      case 'a': /* CA info PEM file */
-        /* CA info PEM file */
-        GetStr(&config->cacert, nextarg);
-        break;
-      case 'b': /* cert file type */
-        GetStr(&config->cert_type, nextarg);
-        break;
-      case 'c': /* private key file */
-        GetStr(&config->key, nextarg);
-        break;
-      case 'd': /* private key file type */
-        GetStr(&config->key_type, nextarg);
-        break;
-      case 'e': /* private key passphrase */
-        GetStr(&config->key_passwd, nextarg);
-        cleanarg(nextarg);
-        break;
-      case 'f': /* crypto engine */
-        GetStr(&config->engine, nextarg);
-        if(config->engine && curlx_raw_equal(config->engine,"list"))
-          config->list_engines = TRUE;
-        break;
-      case 'g': /* CA info PEM file */
-        /* CA cert directory */
-        GetStr(&config->capath, nextarg);
-        break;
-      case 'h': /* --pubkey public key file */
-        GetStr(&config->pubkey, nextarg);
-        break;
-      case 'i': /* --hostpubmd5 md5 of the host public key */
-        GetStr(&config->hostpubmd5, nextarg);
-        if(!config->hostpubmd5 || strlen(config->hostpubmd5) != 32)
-          return PARAM_BAD_USE;
-        break;
-      case 'j': /* CRL info PEM file */
-        /* CRL file */
-        GetStr(&config->crlfile, nextarg);
-        break;
-      default: /* certificate file */
-      {
-        char *ptr = strchr(nextarg, ':');
-        /* Since we live in a world of weirdness and confusion, the win32
-           dudes can use : when using drive letters and thus
-           c:\file:password needs to work. In order not to break
-           compatibility, we still use : as separator, but we try to detect
-           when it is used for a file name! On windows. */
-#ifdef WIN32
-        if(ptr &&
-           (ptr == &nextarg[1]) &&
-           (nextarg[2] == '\\' || nextarg[2] == '/') &&
-           (ISALPHA(nextarg[0])) )
-          /* colon in the second column, followed by a backslash, and the
-             first character is an alphabetic letter:
-
-             this is a drive letter colon */
-          ptr = strchr(&nextarg[3], ':'); /* find the next one instead */
-#endif
-        if(ptr) {
-          /* we have a password too */
-          *ptr=0;
-          ptr++;
-          GetStr(&config->key_passwd, ptr);
-        }
-        GetStr(&config->cert, nextarg);
-        cleanarg(nextarg);
-      }
-      }
-      break;
-    case 'f':
-      /* fail hard on errors  */
-      config->failonerror = toggle;
-      break;
-    case 'F':
-      /* "form data" simulation, this is a little advanced so lets do our best
-         to sort this out slowly and carefully */
-      if(formparse(config,
-                   nextarg,
-                   &config->httppost,
-                   &config->last_post,
-                   (bool) (subletter=='s'))) /* 's' means literal string */
-        return PARAM_BAD_USE;
-      if(SetHTTPrequest(config, HTTPREQ_POST, &config->httpreq))
-        return PARAM_BAD_USE;
-      break;
-
-    case 'g': /* g disables URLglobbing */
-      config->globoff = toggle;
-      break;
-
-    case 'G': /* HTTP GET */
-      config->use_httpget = TRUE;
-      break;
-
-    case 'h': /* h for help */
-      if(toggle) {
-        help();
-        return PARAM_HELP_REQUESTED;
-      }
-      /* we now actually support --no-help too! */
-      break;
-    case 'H':
-      /* A custom header to append to a list */
-      err = add2list(&config->headers, nextarg);
-      if(err)
-        return err;
-      break;
-    case 'i':
-      config->include_headers = toggle; /* include the headers as well in the
-                                           general output stream */
-      break;
-    case 'j':
-      config->cookiesession = toggle;
-      break;
-    case 'I':
-      /*
-       * no_body will imply include_headers later on
-       */
-      config->no_body = toggle;
-      if(SetHTTPrequest(config,
-                        (config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
-                        &config->httpreq))
-        return PARAM_BAD_USE;
-      break;
-    case 'J': /* --remote-header-name */
-      if(config->include_headers) {
-        warnf(config,
-              "--include and --remote-header-name cannot be combined.\n");
-        return PARAM_BAD_USE;
-      }
-      config->content_disposition = toggle;
-      break;
-    case 'k': /* allow insecure SSL connects */
-      config->insecure_ok = toggle;
-      break;
-    case 'K': /* parse config file */
-      if(parseconfig(nextarg, config))
-        warnf(config, "error trying read config from the '%s' file\n",
-              nextarg);
-      break;
-    case 'l':
-      config->dirlistonly = toggle; /* only list the names of the FTP dir */
-      break;
-    case 'L':
-      config->followlocation = toggle; /* Follow Location: HTTP headers */
-      switch (subletter) {
-      case 't':
-        /* Continue to send authentication (user+password) when following
-         * locations, even when hostname changed */
-        config->unrestricted_auth = toggle;
-        break;
-      }
-      break;
-    case 'm':
-      /* specified max time */
-      if(str2num(&config->timeout, nextarg))
-        return PARAM_BAD_NUMERIC;
-      break;
-    case 'M': /* M for manual, huge help */
-      if(toggle) { /* --no-manual shows no manual... */
-#ifdef USE_MANUAL
-        hugehelp();
-        return PARAM_HELP_REQUESTED;
-#else
-        warnf(config,
-              "built-in manual was disabled at build-time!\n");
-        return PARAM_OPTION_UNKNOWN;
-#endif
-      }
-      break;
-    case 'n':
-      switch(subletter) {
-      case 'o': /* CA info PEM file */
-        /* use .netrc or URL */
-        config->netrc_opt = toggle;
-        break;
-      default:
-        /* pick info from .netrc, if this is used for http, curl will
-           automatically enfore user+password with the request */
-        config->netrc = toggle;
-        break;
-      }
-      break;
-    case 'N':
-      /* disable the output I/O buffering. note that the option is called
-         --buffer but is mostly used in the negative form: --no-buffer */
-      if(longopt)
-        config->nobuffer = (bool)(!toggle);
-      else
-        config->nobuffer = toggle;
-      break;
-    case 'O': /* --remote-name */
-      if(subletter == 'a') { /* --remote-name-all */
-        config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
-        break;
-      }
-      /* fall-through! */
-    case 'o': /* --output */
-      /* output file */
-    {
-      struct getout *url;
-      if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
-        /* there's a node here, if it already is filled-in continue to find
-           an "empty" node */
-        while(config->url_out && (config->url_out->flags&GETOUT_OUTFILE))
-          config->url_out = config->url_out->next;
-      }
-
-      /* now there might or might not be an available node to fill in! */
-
-      if(config->url_out)
-        /* existing node */
-        url = config->url_out;
-      else
-        /* there was no free node, create one! */
-        url=new_getout(config);
-
-      if(url) {
-        /* fill in the outfile */
-        if('o' == letter) {
-          GetStr(&url->outfile, nextarg);
-          url->flags &= ~GETOUT_USEREMOTE; /* switch off */
-        }
-        else {
-          url->outfile=NULL; /* leave it */
-          if(toggle)
-            url->flags |= GETOUT_USEREMOTE;  /* switch on */
-          else
-            url->flags &= ~GETOUT_USEREMOTE; /* switch off */
-        }
-        url->flags |= GETOUT_OUTFILE;
-      }
-    }
-    break;
-    case 'P':
-      /* This makes the FTP sessions use PORT instead of PASV */
-      /* use <eth0> or <192.168.10.10> style addresses. Anything except
-         this will make us try to get the "default" address.
-         NOTE: this is a changed behaviour since the released 4.1!
-      */
-      GetStr(&config->ftpport, nextarg);
-      break;
-    case 'p':
-      /* proxy tunnel for non-http protocols */
-      config->proxytunnel = toggle;
-      break;
-
-    case 'q': /* if used first, already taken care of, we do it like
-                 this so we don't cause an error! */
-      break;
-    case 'Q':
-      /* QUOTE command to send to FTP server */
-      switch(nextarg[0]) {
-      case '-':
-        /* prefixed with a dash makes it a POST TRANSFER one */
-        nextarg++;
-        err = add2list(&config->postquote, nextarg);
-        break;
-      case '+':
-        /* prefixed with a plus makes it a just-before-transfer one */
-        nextarg++;
-        err = add2list(&config->prequote, nextarg);
-        break;
-      default:
-        err = add2list(&config->quote, nextarg);
-        break;
-      }
-      if(err)
-        return err;
-      break;
-    case 'r':
-      /* Specifying a range WITHOUT A DASH will create an illegal HTTP range
-         (and won't actually be range by definition). The man page previously
-         claimed that to be a good way, why this code is added to work-around
-         it. */
-      if(ISDIGIT(*nextarg) && !strchr(nextarg, '-')) {
-        char buffer[32];
-        curl_off_t off;
-        warnf(config,
-              "A specified range MUST include at least one dash (-). "
-              "Appending one for you!\n");
-        off = curlx_strtoofft(nextarg, NULL, 10);
-        snprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off);
-        GetStr(&config->range, buffer);
-      }
-      {
-        /* byte range requested */
-        char* tmp_range;
-        tmp_range=nextarg;
-        while(*tmp_range != '\0') {
-          if(!ISDIGIT(*tmp_range)&&*tmp_range!='-'&&*tmp_range!=',') {
-            warnf(config,"Invalid character is found in given range. "
-                  "A specified range MUST have only digits in "
-                  "\'start\'-\'stop\'. The server's response to this "
-                  "request is uncertain.\n");
-            break;
-          }
-          tmp_range++;
-        }
-        /* byte range requested */
-        GetStr(&config->range, nextarg);
-      }
-      break;
-    case 'R':
-      /* use remote file's time */
-      config->remote_time = toggle;
-      break;
-    case 's':
-      /* don't show progress meter, don't show errors : */
-      if(toggle)
-        config->mute = config->noprogress = TRUE;
-      else
-        config->mute = config->noprogress = FALSE;
-      config->showerror = (bool)(!toggle); /* toggle off */
-      break;
-    case 'S':
-      /* show errors */
-      config->showerror = toggle; /* toggle on if used with -s */
-      break;
-    case 't':
-      /* Telnet options */
-      err = add2list(&config->telnet_options, nextarg);
-      if(err)
-        return err;
-      break;
-    case 'T':
-      /* we are uploading */
-    {
-      struct getout *url;
-      if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
-        /* there's a node here, if it already is filled-in continue to find
-           an "empty" node */
-        while(config->url_out && (config->url_out->flags&GETOUT_UPLOAD))
-          config->url_out = config->url_out->next;
-      }
-
-      /* now there might or might not be an available node to fill in! */
-
-      if(config->url_out)
-        /* existing node */
-        url = config->url_out;
-      else
-        /* there was no free node, create one! */
-        url=new_getout(config);
-
-      if(url) {
-        url->flags |= GETOUT_UPLOAD; /* mark -T used */
-        if(!*nextarg)
-          url->flags |= GETOUT_NOUPLOAD;
-        else {
-          /* "-" equals stdin, but keep the string around for now */
-          GetStr(&url->infile, nextarg);
-        }
-      }
-    }
-    break;
-    case 'u':
-      /* user:password  */
-      GetStr(&config->userpwd, nextarg);
-      cleanarg(nextarg);
-      checkpasswd("host", &config->userpwd);
-      break;
-    case 'U':
-      /* Proxy user:password  */
-      GetStr(&config->proxyuserpwd, nextarg);
-      cleanarg(nextarg);
-      checkpasswd("proxy", &config->proxyuserpwd);
-      break;
-    case 'v':
-      if(toggle) {
-        /* the '%' thing here will cause the trace get sent to stderr */
-        GetStr(&config->trace_dump, (char *)"%");
-        if(config->tracetype && (config->tracetype != TRACE_PLAIN))
-          warnf(config,
-                "-v/--verbose overrides an earlier trace/verbose option\n");
-        config->tracetype = TRACE_PLAIN;
-      }
-      else
-        /* verbose is disabled here */
-        config->tracetype = TRACE_NONE;
-      break;
-    case 'V':
-    {
-      const char * const *proto;
-
-      if(!toggle)
-        /* --no-version yields no output! */
-        break;
-
-      printf(CURL_ID "%s\n", curl_version());
-      if(curlinfo->protocols) {
-        printf("Protocols: ");
-        for(proto=curlinfo->protocols; *proto; ++proto) {
-          printf("%s ", *proto);
-        }
-        puts(""); /* newline */
-      }
-      if(curlinfo->features) {
-        unsigned int i;
-        struct feat {
-          const char *name;
-          int bitmask;
-        };
-        static const struct feat feats[] = {
-          {"AsynchDNS", CURL_VERSION_ASYNCHDNS},
-          {"Debug", CURL_VERSION_DEBUG},
-          {"TrackMemory", CURL_VERSION_CURLDEBUG},
-          {"GSS-Negotiate", CURL_VERSION_GSSNEGOTIATE},
-          {"IDN", CURL_VERSION_IDN},
-          {"IPv6", CURL_VERSION_IPV6},
-          {"Largefile", CURL_VERSION_LARGEFILE},
-          {"NTLM", CURL_VERSION_NTLM},
-          {"SPNEGO", CURL_VERSION_SPNEGO},
-          {"SSL",  CURL_VERSION_SSL},
-          {"SSPI",  CURL_VERSION_SSPI},
-          {"krb4", CURL_VERSION_KERBEROS4},
-          {"libz", CURL_VERSION_LIBZ},
-          {"CharConv", CURL_VERSION_CONV}
-        };
-        printf("Features: ");
-        for(i=0; i<sizeof(feats)/sizeof(feats[0]); i++) {
-          if(curlinfo->features & feats[i].bitmask)
-            printf("%s ", feats[i].name);
-        }
-        puts(""); /* newline */
-      }
-    }
-    return PARAM_HELP_REQUESTED;
-    case 'w':
-      /* get the output string */
-      if('@' == *nextarg) {
-        /* the data begins with a '@' letter, it means that a file name
-           or - (stdin) follows */
-        FILE *file;
-        const char *fname;
-        nextarg++; /* pass the @ */
-        if(curlx_strequal("-", nextarg)) {
-          fname = "<stdin>";
-          file = stdin;
-        }
-        else {
-          fname = nextarg;
-          file = fopen(nextarg, "r");
-        }
-        err = file2string(&config->writeout, file);
-        if(file && (file != stdin))
-          fclose(file);
-        if(err)
-          return err;
-        if(!config->writeout)
-          warnf(config, "Failed to read %s", fname);
-      }
-      else
-        GetStr(&config->writeout, nextarg);
-      break;
-    case 'x':
-      /* proxy */
-      GetStr(&config->proxy, nextarg);
-      config->proxyver = CURLPROXY_HTTP;
-      break;
-    case 'X':
-      /* set custom request */
-      GetStr(&config->customrequest, nextarg);
-      break;
-    case 'y':
-      /* low speed time */
-      if(str2num(&config->low_speed_time, nextarg))
-        return PARAM_BAD_NUMERIC;
-      if(!config->low_speed_limit)
-        config->low_speed_limit = 1;
-      break;
-    case 'Y':
-      /* low speed limit */
-      if(str2num(&config->low_speed_limit, nextarg))
-        return PARAM_BAD_NUMERIC;
-      if(!config->low_speed_time)
-        config->low_speed_time=30;
-      break;
-    case 'z': /* time condition coming up */
-      switch(*nextarg) {
-      case '+':
-        nextarg++;
-      default:
-        /* If-Modified-Since: (section 14.28 in RFC2068) */
-        config->timecond = CURL_TIMECOND_IFMODSINCE;
-        break;
-      case '-':
-        /* If-Unmodified-Since:  (section 14.24 in RFC2068) */
-        config->timecond = CURL_TIMECOND_IFUNMODSINCE;
-        nextarg++;
-        break;
-      case '=':
-        /* Last-Modified:  (section 14.29 in RFC2068) */
-        config->timecond = CURL_TIMECOND_LASTMOD;
-        nextarg++;
-        break;
-      }
-      now=time(NULL);
-      config->condtime=curl_getdate(nextarg, &now);
-      if(-1 == (int)config->condtime) {
-        /* now let's see if it is a file name to get the time from instead! */
-        struct_stat statbuf;
-        if(-1 == stat(nextarg, &statbuf)) {
-          /* failed, remove time condition */
-          config->timecond = CURL_TIMECOND_NONE;
-          warnf(config,
-                "Illegal date format for -z/--timecond (and not "
-                "a file name). Disabling time condition. "
-                "See curl_getdate(3) for valid date syntax.\n");
-        }
-        else {
-          /* pull the time out from the file */
-          config->condtime = statbuf.st_mtime;
-        }
-      }
-      break;
-    default: /* unknown flag */
-      return PARAM_OPTION_UNKNOWN;
-    }
-    hit = -1;
-
-  } while(!longopt && !singleopt && *++parse && !*usedarg);
-
-  return PARAM_OK;
-}
-
-/*
- * Copies the string from line to the buffer at param, unquoting
- * backslash-quoted characters and NUL-terminating the output string.
- * Stops at the first non-backslash-quoted double quote character or the
- * end of the input string. param must be at least as long as the input
- * string.  Returns the pointer after the last handled input character.
- */
-static const char *unslashquote(const char *line, char *param)
-{
-  while(*line && (*line != '\"')) {
-    if(*line == '\\') {
-      char out;
-      line++;
-
-      /* default is to output the letter after the backslash */
-      switch(out = *line) {
-      case '\0':
-        continue; /* this'll break out of the loop */
-      case 't':
-        out='\t';
-        break;
-      case 'n':
-        out='\n';
-        break;
-      case 'r':
-        out='\r';
-        break;
-      case 'v':
-        out='\v';
-        break;
-      }
-      *param++=out;
-      line++;
-    }
-    else
-      *param++=*line++;
-  }
-  *param=0; /* always zero terminate */
-  return line;
-}
-
-/* return 0 on everything-is-fine, and non-zero otherwise */
-static int parseconfig(const char *filename,
-                       struct Configurable *config)
-{
-  int res;
-  FILE *file;
-  char filebuffer[512];
-  bool usedarg;
-  char *home;
-  int rc = 0;
-
-  if(!filename || !*filename) {
-    /* NULL or no file name attempts to load .curlrc from the homedir! */
-
-#define CURLRC DOT_CHAR "curlrc"
-
-#ifndef __AMIGA__
-    filename = CURLRC;   /* sensible default */
-    home = homedir();    /* portable homedir finder */
-    if(home) {
-      if(strlen(home)<(sizeof(filebuffer)-strlen(CURLRC))) {
-        snprintf(filebuffer, sizeof(filebuffer),
-                 "%s%s%s", home, DIR_CHAR, CURLRC);
-
-#ifdef WIN32
-        /* Check if the file exists - if not, try CURLRC in the same
-         * directory as our executable
-         */
-        file = fopen(filebuffer, "r");
-        if(file != NULL) {
-          fclose(file);
-          filename = filebuffer;
-        }
-        else {
-          /* Get the filename of our executable. GetModuleFileName is
-           * already declared via inclusions done in setup header file.
-           * We assume that we are using the ASCII version here.
-           */
-          int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
-          if(n > 0 && n < (int)sizeof(filebuffer)) {
-            /* We got a valid filename - get the directory part */
-            char *lastdirchar = strrchr(filebuffer, '\\');
-            if(lastdirchar) {
-              size_t remaining;
-              *lastdirchar = 0;
-              /* If we have enough space, build the RC filename */
-              remaining = sizeof(filebuffer) - strlen(filebuffer);
-              if(strlen(CURLRC) < remaining - 1) {
-                snprintf(lastdirchar, remaining,
-                         "%s%s", DIR_CHAR, CURLRC);
-                /* Don't bother checking if it exists - we do
-                 * that later
-                 */
-                filename = filebuffer;
-              }
-            }
-          }
-        }
-#else /* WIN32 */
-        filename = filebuffer;
-#endif /* WIN32 */
-      }
-      free(home); /* we've used it, now free it */
-    }
-
-# else /* __AMIGA__ */
-    /* On AmigaOS all the config files are into env:
-     */
-    filename = "ENV:" CURLRC;
-
-#endif
-  }
-
-  if(strcmp(filename,"-"))
-    file = fopen(filename, "r");
-  else
-    file = stdin;
-
-  if(file) {
-    char *line;
-    char *aline;
-    char *option;
-    char *param;
-    int lineno=0;
-    bool alloced_param;
-
-#define ISSEP(x) (((x)=='=') || ((x) == ':'))
-
-    while(NULL != (aline = my_get_line(file))) {
-      lineno++;
-      line = aline;
-      alloced_param=FALSE;
-
-      /* line with # in the first non-blank column is a comment! */
-      while(*line && ISSPACE(*line))
-        line++;
-
-      switch(*line) {
-      case '#':
-      case '/':
-      case '\r':
-      case '\n':
-      case '*':
-      case '\0':
-        free(aline);
-        continue;
-      }
-
-      /* the option keywords starts here */
-      option = line;
-      while(*line && !ISSPACE(*line) && !ISSEP(*line))
-        line++;
-      /* ... and has ended here */
-
-      if(*line)
-        *line++=0; /* zero terminate, we have a local copy of the data */
-
-#ifdef DEBUG_CONFIG
-      fprintf(stderr, "GOT: %s\n", option);
-#endif
-
-      /* pass spaces and separator(s) */
-      while(*line && (ISSPACE(*line) || ISSEP(*line)))
-        line++;
-
-      /* the parameter starts here (unless quoted) */
-      if(*line == '\"') {
-        /* quoted parameter, do the quote dance */
-        line++;
-        param=malloc(strlen(line)+1); /* parameter */
-        if(!param) {
-          /* out of memory */
-          free(aline);
-          rc = 1;
-          break;
-        }
-        alloced_param=TRUE;
-        (void)unslashquote(line, param);
-      }
-      else {
-        param=line; /* parameter starts here */
-        while(*line && !ISSPACE(*line))
-          line++;
-        *line=0; /* zero terminate */
-      }
-
-      if(param && !*param) {
-        /* do this so getparameter can check for required parameters.
-           Otherwise it always thinks there's a parameter. */
-        if(alloced_param)
-          free(param);
-        param = NULL;
-      }
-
-#ifdef DEBUG_CONFIG
-      fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
-#endif
-      res = getparameter(option, param, &usedarg, config);
-
-      if(param && *param && !usedarg)
-        /* we passed in a parameter that wasn't used! */
-        res = PARAM_GOT_EXTRA_PARAMETER;
-
-      if(res != PARAM_OK) {
-        /* the help request isn't really an error */
-        if(!strcmp(filename, "-")) {
-          filename=(char *)"<stdin>";
-        }
-        if(PARAM_HELP_REQUESTED != res) {
-          const char *reason = param2text(res);
-          warnf(config, "%s:%d: warning: '%s' %s\n",
-                filename, lineno, option, reason);
-        }
-      }
-
-      if(alloced_param)
-      {
-        free(param);
-        param = NULL;
-      }
-
-      free(aline);
-    }
-    if(file != stdin)
-      fclose(file);
-  }
-  else
-    rc = 1; /* couldn't open the file */
-  return rc;
-}
-
-static void go_sleep(long ms)
-{
-#ifdef HAVE_POLL_FINE
-  /* portable subsecond "sleep" */
-  poll((void *)0, 0, (int)ms);
-#else
-  /* systems without poll() need other solutions */
-
-#ifdef WIN32
-  /* Windows offers a millisecond sleep */
-  Sleep(ms);
-#elif defined(MSDOS)
-  delay(ms);
-#else
-  /* Other systems must use select() for this */
-  struct timeval timeout;
-
-  timeout.tv_sec = ms/1000;
-  ms = ms%1000;
-  timeout.tv_usec = ms * 1000;
-
-  select(0, NULL,  NULL, NULL, &timeout);
-#endif
-
-#endif
-}
-
-static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
-{
-  size_t rc;
-  struct OutStruct *out=(struct OutStruct *)stream;
-  struct Configurable *config = out->config;
-
-  /*
-   * Once that libcurl has called back my_fwrite() the returned value
-   * is checked against the amount that was intended to be written, if
-   * it does not match then it fails with CURLE_WRITE_ERROR. So at this
-   * point returning a value different from sz*nmemb indicates failure.
-   */
-  const size_t err_rc = (sz * nmemb) ? 0 : 1;
-
-  if(!out->stream) {
-    out->bytes = 0; /* nothing written yet */
-    if(!out->filename) {
-      warnf(config, "Remote filename has no length!\n");
-      return err_rc; /* Failure */
-    }
-
-    if(config->content_disposition) {
-      /* don't overwrite existing files */
-      FILE* f = fopen(out->filename, "r");
-      if(f) {
-        fclose(f);
-        warnf(config, "Refusing to overwrite %s: %s\n", out->filename,
-              strerror(EEXIST));
-        return err_rc; /* Failure */
-      }
-    }
-
-    /* open file for writing */
-    out->stream=fopen(out->filename, "wb");
-    if(!out->stream) {
-      warnf(config, "Failed to create the file %s: %s\n", out->filename,
-            strerror(errno));
-      return err_rc; /* failure */
-    }
-  }
-
-  rc = fwrite(buffer, sz, nmemb, out->stream);
-
-  if((sz * nmemb) == rc)
-    /* we added this amount of data to the output */
-    out->bytes += (sz * nmemb);
-
-  if(config->readbusy) {
-    config->readbusy = FALSE;
-    curl_easy_pause(config->easy, CURLPAUSE_CONT);
-  }
-
-  if(config->nobuffer) {
-    /* disable output buffering */
-    int res = fflush(out->stream);
-    if(res) {
-      /* return a value that isn't the same as sz * nmemb */
-      return err_rc; /* failure */
-    }
-  }
-
-  return rc;
-}
-
-struct InStruct {
-  int fd;
-  struct Configurable *config;
-};
-
-#define MAX_SEEK 2147483647
-
-/*
- * my_seek() is the CURLOPT_SEEKFUNCTION we use
- */
-static int my_seek(void *stream, curl_off_t offset, int whence)
-{
-  struct InStruct *in=(struct InStruct *)stream;
-
-#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
-  /* The offset check following here is only interesting if curl_off_t is
-     larger than off_t and we are not using the WIN32 large file support
-     macros that provide the support to do 64bit seeks correctly */
-
-  if(offset > MAX_SEEK) {
-    /* Some precaution code to work around problems with different data sizes
-       to allow seeking >32bit even if off_t is 32bit. Should be very rare and
-       is really valid on weirdo-systems. */
-    curl_off_t left = offset;
-
-    if(whence != SEEK_SET)
-      /* this code path doesn't support other types */
-      return 1;
-
-    if(LSEEK_ERROR == lseek(in->fd, 0, SEEK_SET))
-      /* couldn't rewind to beginning */
-      return 1;
-
-    while(left) {
-      long step = (left>MAX_SEEK ? MAX_SEEK : (long)left);
-      if(LSEEK_ERROR == lseek(in->fd, step, SEEK_CUR))
-        /* couldn't seek forwards the desired amount */
-        return 1;
-      left -= step;
-    }
-    return 0;
-  }
-#endif
-  if(LSEEK_ERROR == lseek(in->fd, offset, whence))
-    /* couldn't rewind, the reason is in errno but errno is just not portable
-       enough and we don't actually care that much why we failed. We'll let
-       libcurl know that it may try other means if it wants to. */
-    return CURL_SEEKFUNC_CANTSEEK;
-
-  return 0;
-}
-
-static size_t my_fread(void *buffer, size_t sz, size_t nmemb, void *userp)
-{
-  ssize_t rc;
-  struct InStruct *in=(struct InStruct *)userp;
-
-  rc = read(in->fd, buffer, sz*nmemb);
-  if(rc < 0) {
-    if(errno == EAGAIN) {
-      errno = 0;
-      in->config->readbusy = TRUE;
-      return CURL_READFUNC_PAUSE;
-    }
-    /* since size_t is unsigned we can't return negative values fine */
-    rc = 0;
-  }
-  in->config->readbusy = FALSE;
-  return (size_t)rc;
-}
-
-struct ProgressData {
-  int calls;
-  curl_off_t prev;
-  int width;
-  FILE *out; /* where to write everything to */
-  curl_off_t initial_size;
-};
-
-static int myprogress (void *clientp,
-                       double dltotal,
-                       double dlnow,
-                       double ultotal,
-                       double ulnow)
-{
-  /* The original progress-bar source code was written for curl by Lars Aas,
-     and this new edition inherits some of his concepts. */
-
-  char line[256];
-  char outline[256];
-  char format[40];
-  double frac;
-  double percent;
-  int barwidth;
-  int num;
-  int i;
-
-  struct ProgressData *bar = (struct ProgressData *)clientp;
-  curl_off_t total = (curl_off_t)dltotal + (curl_off_t)ultotal +
-    bar->initial_size; /* expected transfer size */
-  curl_off_t point = (curl_off_t)dlnow + (curl_off_t)ulnow +
-    bar->initial_size; /* we've come this far */
-
-  if(point > total)
-    /* we have got more than the expected total! */
-    total = point;
-
-  bar->calls++; /* simply count invokes */
-
-  if(total < 1) {
-    curl_off_t prevblock = bar->prev / 1024;
-    curl_off_t thisblock = point / 1024;
-    while( thisblock > prevblock ) {
-      fprintf( bar->out, "#" );
-      prevblock++;
-    }
-  }
-  else {
-    frac = (double)point / (double)total;
-    percent = frac * 100.0f;
-    barwidth = bar->width - 7;
-    num = (int) (((double)barwidth) * frac);
-    for( i = 0; i < num; i++ ) {
-      line[i] = '#';
-    }
-    line[i] = '\0';
-    snprintf( format, sizeof(format), "%%-%ds %%5.1f%%%%", barwidth );
-    snprintf( outline, sizeof(outline), format, line, percent );
-    fprintf( bar->out, "\r%s", outline );
-  }
-  fflush(bar->out);
-  bar->prev = point;
-
-  return 0;
-}
-
-static
-void progressbarinit(struct ProgressData *bar,
-                     struct Configurable *config)
-{
-#ifdef __EMX__
-  /* 20000318 mgs */
-  int scr_size [2];
-#endif
-  char *colp;
-
-  memset(bar, 0, sizeof(struct ProgressData));
-
-  /* pass this through to progress function so
-   * it can display progress towards total file
-   * not just the part that's left. (21-may-03, dbyron) */
-  if(config->use_resume)
-    bar->initial_size = config->resume_from;
-
-/* TODO: get terminal width through ansi escapes or something similar.
-   try to update width when xterm is resized... - 19990617 larsa */
-#ifndef __EMX__
-  /* 20000318 mgs
-   * OS/2 users most likely won't have this env var set, and besides that
-   * we're using our own way to determine screen width */
-  colp = curlx_getenv("COLUMNS");
-  if(colp != NULL) {
-    char *endptr;
-    long num = strtol(colp, &endptr, 10);
-    if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 0))
-      bar->width = (int)num;
-    else
-      bar->width = 79;
-    curl_free(colp);
-  }
-  else
-    bar->width = 79;
-#else
-  /* 20000318 mgs
-   * We use this emx library call to get the screen width, and subtract
-   * one from what we got in order to avoid a problem with the cursor
-   * advancing to the next line if we print a string that is as long as
-   * the screen is wide. */
-
-  _scrsize(scr_size);
-  bar->width = scr_size[0] - 1;
-#endif
-
-  bar->out = config->errors;
-}
-
-
-static
-void dump(const char *timebuf, const char *text,
-          FILE *stream, const unsigned char *ptr, size_t size,
-          trace tracetype, curl_infotype infotype)
-{
-  size_t i;
-  size_t c;
-
-  unsigned int width=0x10;
-
-  if(tracetype == TRACE_ASCII)
-    /* without the hex output, we can fit more on screen */
-    width = 0x40;
-
-  fprintf(stream, "%s%s, %zd bytes (0x%zx)\n", timebuf, text, size, size);
-
-  for(i=0; i<size; i+= width) {
-
-    fprintf(stream, "%04zx: ", i);
-
-    if(tracetype == TRACE_BIN) {
-      /* hex not disabled, show it */
-      for(c = 0; c < width; c++)
-        if(i+c < size)
-          fprintf(stream, "%02x ", ptr[i+c]);
-        else
-          fputs("   ", stream);
-    }
-
-    for(c = 0; (c < width) && (i+c < size); c++) {
-      /* check for 0D0A; if found, skip past and start a new line of output */
-      if((tracetype == TRACE_ASCII) &&
-         (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
-        i+=(c+2-width);
-        break;
-      }
-#ifdef CURL_DOES_CONVERSIONS
-      /* repeat the 0D0A check above but use the host encoding for CRLF */
-      if((tracetype == TRACE_ASCII) &&
-         (i+c+1 < size) && ptr[i+c]=='\r' && ptr[i+c+1]=='\n') {
-        i+=(c+2-width);
-        break;
-      }
-      /* convert to host encoding and print this character */
-      fprintf(stream, "%c", convert_char(infotype, ptr[i+c]));
-#else
-      (void)infotype;
-      fprintf(stream, "%c",
-              (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:UNPRINTABLE_CHAR);
-#endif /* CURL_DOES_CONVERSIONS */
-      /* check again for 0D0A, to avoid an extra \n if it's at width */
-      if((tracetype == TRACE_ASCII) &&
-         (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
-        i+=(c+3-width);
-        break;
-      }
-    }
-    fputc('\n', stream); /* newline */
-  }
-  fflush(stream);
-}
-
-static
-int my_trace(CURL *handle, curl_infotype type,
-             unsigned char *data, size_t size,
-             void *userp)
-{
-  struct Configurable *config = (struct Configurable *)userp;
-  FILE *output=config->errors;
-  const char *text;
-  struct timeval tv;
-  struct tm *now;
-  char timebuf[20];
-  time_t secs;
-  static time_t epoch_offset;
-  static int    known_offset;
-
-  (void)handle; /* prevent compiler warning */
-
-  if(config->tracetime) {
-    tv = cutil_tvnow();
-    if(!known_offset) {
-      epoch_offset = time(NULL) - tv.tv_sec;
-      known_offset = 1;
-    }
-    secs = epoch_offset + tv.tv_sec;
-    now = localtime(&secs);  /* not thread safe but we don't care */
-    snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
-             now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
-  }
-  else
-    timebuf[0]=0;
-
-  if(!config->trace_stream) {
-    /* open for append */
-    if(curlx_strequal("-", config->trace_dump))
-      config->trace_stream = stdout;
-    else if(curlx_strequal("%", config->trace_dump))
-      /* Ok, this is somewhat hackish but we do it undocumented for now */
-      config->trace_stream = config->errors;  /* aka stderr */
-    else {
-      config->trace_stream = fopen(config->trace_dump, "w");
-      config->trace_fopened = TRUE;
-    }
-  }
-
-  if(config->trace_stream)
-    output = config->trace_stream;
-
-  if(!output) {
-    warnf(config, "Failed to create/open output");
-    return 0;
-  }
-
-  if(config->tracetype == TRACE_PLAIN) {
-    /*
-     * This is the trace look that is similar to what libcurl makes on its
-     * own.
-     */
-    static const char * const s_infotype[] = {
-      "*", "<", ">", "{", "}", "{", "}"
-    };
-    size_t i;
-    size_t st=0;
-    static bool newl = FALSE;
-    static bool traced_data = FALSE;
-
-    switch(type) {
-    case CURLINFO_HEADER_OUT:
-      for(i=0; i<size-1; i++) {
-        if(data[i] == '\n') { /* LF */
-          if(!newl) {
-            fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-          }
-          (void)fwrite(data+st, i-st+1, 1, output);
-          st = i+1;
-          newl = FALSE;
-        }
-      }
-      if(!newl)
-        fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-      (void)fwrite(data+st, i-st+1, 1, output);
-      newl = (bool)(size && (data[size-1] != '\n'));
-      traced_data = FALSE;
-      break;
-    case CURLINFO_TEXT:
-    case CURLINFO_HEADER_IN:
-      if(!newl)
-        fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-      (void)fwrite(data, size, 1, output);
-      newl = (bool)(size && (data[size-1] != '\n'));
-      traced_data = FALSE;
-      break;
-    case CURLINFO_DATA_OUT:
-    case CURLINFO_DATA_IN:
-    case CURLINFO_SSL_DATA_IN:
-    case CURLINFO_SSL_DATA_OUT:
-      if(!traced_data) {
-        /* if the data is output to a tty and we're sending this debug trace
-           to stderr or stdout, we don't display the alert about the data not
-           being shown as the data _is_ shown then just not via this
-           function */
-        if(!config->isatty ||
-           ((output != stderr) && (output != stdout))) {
-          if(!newl)
-            fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-          fprintf(output, "[data not shown]\n");
-          newl = FALSE;
-          traced_data = TRUE;
-        }
-      }
-      break;
-    default: /* nada */
-      newl = FALSE;
-      traced_data = FALSE;
-      break;
-    }
-
-    return 0;
-  }
-
-#ifdef CURL_DOES_CONVERSIONS
-  /* Special processing is needed for CURLINFO_HEADER_OUT blocks
-   * if they contain both headers and data (separated by CRLFCRLF).
-   * We dump the header text and then switch type to CURLINFO_DATA_OUT.
-   */
-  if((type == CURLINFO_HEADER_OUT) && (size > 4)) {
-    size_t i;
-    for(i = 0; i < size - 4; i++) {
-      if(memcmp(&data[i], "\r\n\r\n", 4) == 0) {
-        /* dump everthing through the CRLFCRLF as a sent header */
-        text = "=> Send header";
-        dump(timebuf, text, output, data, i+4, config->tracetype, type);
-        data += i + 3;
-        size -= i + 4;
-        type = CURLINFO_DATA_OUT;
-        data += 1;
-        break;
-      }
-    }
-  }
-#endif /* CURL_DOES_CONVERSIONS */
-
-  switch (type) {
-  case CURLINFO_TEXT:
-    fprintf(output, "%s== Info: %s", timebuf, data);
-  default: /* in case a new one is introduced to shock us */
-    return 0;
-
-  case CURLINFO_HEADER_OUT:
-    text = "=> Send header";
-    break;
-  case CURLINFO_DATA_OUT:
-    text = "=> Send data";
-    break;
-  case CURLINFO_HEADER_IN:
-    text = "<= Recv header";
-    break;
-  case CURLINFO_DATA_IN:
-    text = "<= Recv data";
-    break;
-  case CURLINFO_SSL_DATA_IN:
-    text = "<= Recv SSL data";
-    break;
-  case CURLINFO_SSL_DATA_OUT:
-    text = "=> Send SSL data";
-    break;
-  }
-
-  dump(timebuf, text, output, data, size, config->tracetype, type);
-  return 0;
-}
-
-static void free_config_fields(struct Configurable *config)
-{
-  if(config->random_file)
-    free(config->random_file);
-  if(config->egd_file)
-    free(config->egd_file);
-  if(config->trace_dump)
-    free(config->trace_dump);
-  if(config->cipher_list)
-    free(config->cipher_list);
-  if(config->userpwd)
-    free(config->userpwd);
-  if(config->postfields)
-    free(config->postfields);
-  if(config->proxy)
-    free(config->proxy);
-  if(config->proxyuserpwd)
-    free(config->proxyuserpwd);
-  if(config->noproxy)
-    free(config->noproxy);
-  if(config->cookie)
-    free(config->cookie);
-  if(config->cookiefile)
-    free(config->cookiefile);
-  if(config->krblevel)
-    free(config->krblevel);
-  if(config->headerfile)
-    free(config->headerfile);
-  if(config->ftpport)
-    free(config->ftpport);
-  if(config->range)
-    free(config->range);
-  if(config->customrequest)
-    free(config->customrequest);
-  if(config->writeout)
-    free(config->writeout);
-  if(config->httppost)
-    curl_formfree(config->httppost);
-  if(config->cert)
-    free(config->cert);
-  if(config->cacert)
-    free(config->cacert);
-  if(config->cert_type)
-    free(config->cert_type);
-  if(config->capath)
-    free(config->capath);
-  if(config->crlfile)
-    free(config->crlfile);
-  if(config->cookiejar)
-    free(config->cookiejar);
-  if(config->ftp_account)
-    free(config->ftp_account);
-  if(config->ftp_alternative_to_user)
-    free(config->ftp_alternative_to_user);
-  if(config->iface)
-    free(config->iface);
-  if(config->socksproxy)
-    free(config->socksproxy);
-  if(config->libcurl)
-    free(config->libcurl);
-  if(config->key_passwd)
-    free(config->key_passwd);
-  if(config->key)
-    free(config->key);
-  if(config->key_type)
-    free(config->key_type);
-  if(config->pubkey)
-    free(config->pubkey);
-  if(config->referer)
-    free(config->referer);
-  if(config->hostpubmd5)
-    free(config->hostpubmd5);
-  if(config->mail_from)
-    free(config->mail_from);
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-  if(config->socks5_gssapi_service)
-    free(config->socks5_gssapi_service);
-#endif
-
-  curl_slist_free_all(config->quote); /* checks for config->quote == NULL */
-  curl_slist_free_all(config->prequote);
-  curl_slist_free_all(config->postquote);
-  curl_slist_free_all(config->headers);
-  curl_slist_free_all(config->telnet_options);
-  curl_slist_free_all(config->mail_rcpt);
-  curl_slist_free_all(config->resolve);
-
-  if(config->easy)
-    curl_easy_cleanup(config->easy);
-}
-
-#ifdef WIN32
-
-/* Function to find CACert bundle on a Win32 platform using SearchPath.
- * (SearchPath is already declared via inclusions done in setup header file)
- * (Use the ASCII version instead of the unicode one!)
- * The order of the directories it searches is:
- *  1. application's directory
- *  2. current working directory
- *  3. Windows System directory (e.g. C:\windows\system32)
- *  4. Windows Directory (e.g. C:\windows)
- *  5. all directories along %PATH%
- */
-static void FindWin32CACert(struct Configurable *config,
-                            const char *bundle_file)
-{
-  /* only check for cert file if "we" support SSL */
-  if(curlinfo->features & CURL_VERSION_SSL) {
-    DWORD buflen;
-    char *ptr = NULL;
-    char *retval = malloc(sizeof (TCHAR) * (MAX_PATH + 1));
-    if(!retval)
-      return;
-    retval[0] = '\0';
-    buflen = SearchPathA(NULL, bundle_file, NULL, MAX_PATH+2, retval, &ptr);
-    if(buflen > 0) {
-      GetStr(&config->cacert, retval);
-    }
-    free(retval);
-  }
-}
-
-#endif
-
-#define RETRY_SLEEP_DEFAULT 1000  /* ms */
-#define RETRY_SLEEP_MAX     600000 /* ms == 10 minutes */
-
-static bool
-output_expected(const char* url, const char* uploadfile)
-{
-  if(!uploadfile)
-    return TRUE;  /* download */
-  if(checkprefix("http://", url) || checkprefix("https://", url))
-    return TRUE;   /* HTTP(S) upload */
-
-  return FALSE; /* non-HTTP upload, probably no output should be expected */
-}
-
-#define my_setopt(x,y,z) _my_setopt(x, FALSE, config, #y, y, z)
-#define my_setopt_str(x,y,z) _my_setopt(x, TRUE, config, #y, y, z)
-
-static struct curl_slist *easycode;
-static struct curl_slist *easycode_remarks;
-
-static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
-                           const char *name, CURLoption tag, ...);
-
-static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
-                           const char *name, CURLoption tag, ...)
-{
-  va_list arg;
-  CURLcode ret;
-  char *bufp;
-  char value[256];
-  bool remark=FALSE;
-  bool skip=FALSE;
-
-  va_start(arg, tag);
-
-  if(tag < CURLOPTTYPE_OBJECTPOINT) {
-    long lval = va_arg(arg, long);
-    snprintf(value, sizeof(value), "%ld", lval);
-    ret = curl_easy_setopt(curl, tag, lval);
-    if(!lval)
-      skip = TRUE;
-  }
-  else if(tag < CURLOPTTYPE_OFF_T) {
-    void *pval = va_arg(arg, void *);
-    unsigned char *ptr = (unsigned char *)pval;
-
-    /* function pointers are never printable */
-    if(tag >= CURLOPTTYPE_FUNCTIONPOINT) {
-      if(pval) {
-        strcpy(value, "functionpointer"); /* 'value' fits 256 bytes */
-        remark = TRUE;
-      }
-      else
-        skip = TRUE;
-    }
-
-    else if(pval && str)
-      snprintf(value, sizeof(value), "\"%s\"", (char *)ptr);
-    else if(pval) {
-      strcpy(value, "objectpointer"); /* 'value' fits 256 bytes */
-      remark = TRUE;
-    }
-    else
-      skip = TRUE;
-
-    ret = curl_easy_setopt(curl, tag, pval);
-
-  }
-  else {
-    curl_off_t oval = va_arg(arg, curl_off_t);
-    snprintf(value, sizeof(value),
-             "(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
-    ret = curl_easy_setopt(curl, tag, oval);
-
-    if(!oval)
-      skip = TRUE;
-  }
-
-  if(config->libcurl && !skip) {
-    /* we only use this for real if --libcurl was used */
-
-    if(remark)
-      bufp = curlx_maprintf("%s set to a %s", name, value);
-    else
-      bufp = curlx_maprintf("curl_easy_setopt(hnd, %s, %s);", name, value);
-
-    if(!bufp)
-      ret = CURLE_OUT_OF_MEMORY;
-    else {
-      struct curl_slist *list =
-        curl_slist_append(remark?easycode_remarks:easycode, bufp);
-
-      if(remark)
-        easycode_remarks = list;
-      else
-        easycode = list;
-    }
-    if(bufp)
-      curl_free(bufp);
-  }
-  va_end(arg);
-
-  return ret;
-}
-
-static const char * const srchead[]={
-  "/********* Sample code generated by the curl command line tool **********",
-  " * All curl_easy_setopt() options are documented at:",
-  " * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html",
-  " ************************************************************************/",
-  "#include <curl/curl.h>",
-  "",
-  "int main(int argc, char *argv[])",
-  "{",
-  "  CURLcode ret;",
-  NULL
-};
-
-static void dumpeasycode(struct Configurable *config)
-{
-  struct curl_slist *ptr;
-  char *o = config->libcurl;
-
-  if(o) {
-    FILE *out;
-    bool fopened = FALSE;
-    if(strcmp(o, "-")) {
-      out = fopen(o, "wt");
-      fopened = TRUE;
-    }
-    else
-      out= stdout;
-    if(!out)
-      warnf(config, "Failed to open %s to write libcurl code!\n", o);
-    else {
-      int i;
-      const char *c;
-
-      for(i=0; ((c = srchead[i]) != '\0'); i++)
-        fprintf(out, "%s\n", c);
-
-      ptr = easycode;
-      while(ptr) {
-        fprintf(out, "  %s\n", ptr->data);
-        ptr = ptr->next;
-      }
-
-      ptr = easycode_remarks;
-      if(ptr) {
-        fprintf(out,
-                "\n  /* Here is a list of options the curl code"
-                " used that cannot get generated\n"
-                "     as source easily. You may select to either"
-                " not use them or implement\n     them yourself.\n"
-                "\n");
-        while(ptr) {
-          fprintf(out, "  %s\n", ptr->data);
-          ptr = ptr->next;
-        }
-        fprintf(out, "\n  */\n");
-      }
-
-      fprintf(out,
-              "  return (int)ret;\n"
-              "}\n"
-              "/**** End of sample code ****/\n");
-      if(fopened)
-        fclose(out);
-    }
-  }
-  curl_slist_free_all(easycode);
-}
-
-static bool stdin_upload(const char *uploadfile)
-{
-  return (bool)(curlx_strequal(uploadfile, "-") ||
-                curlx_strequal(uploadfile, "."));
-}
-
-/* Adds the file name to the URL if it doesn't already have one.
- * url will be freed before return if the returned pointer is different
- */
-static char *add_file_name_to_url(CURL *curl, char *url, const char *filename)
-{
-  /* If no file name part is given in the URL, we add this file name */
-  char *ptr=strstr(url, "://");
-  if(ptr)
-    ptr+=3;
-  else
-    ptr=url;
-  ptr = strrchr(ptr, '/');
-  if(!ptr || !strlen(++ptr)) {
-    /* The URL has no file name part, add the local file name. In order
-       to be able to do so, we have to create a new URL in another
-       buffer.*/
-
-    /* We only want the part of the local path that is on the right
-       side of the rightmost slash and backslash. */
-    const char *filep = strrchr(filename, '/');
-    char *file2 = strrchr(filep?filep:filename, '\\');
-    char *encfile;
-
-    if(file2)
-      filep = file2+1;
-    else if(filep)
-      filep++;
-    else
-      filep = filename;
-
-    /* URL encode the file name */
-    encfile = curl_easy_escape(curl, filep, 0 /* use strlen */);
-    if(encfile) {
-      char *urlbuffer = malloc(strlen(url) + strlen(encfile) + 3);
-      if(!urlbuffer) {
-        free(url);
-        return NULL;
-      }
-      if(ptr)
-        /* there is a trailing slash on the URL */
-        sprintf(urlbuffer, "%s%s", url, encfile);
-      else
-        /* there is no trailing slash on the URL */
-        sprintf(urlbuffer, "%s/%s", url, encfile);
-
-      curl_free(encfile);
-
-      free(url);
-      url = urlbuffer; /* use our new URL instead! */
-    }
-  }
-  return url;
-}
-
-/* Extracts the name portion of the URL.
- * Returns a heap-allocated string, or NULL if no name part
- */
-static char *get_url_file_name(const char *url)
-{
-  char *fn = NULL;
-
-  /* Find and get the remote file name */
-  const char * pc =strstr(url, "://");
-  if(pc)
-    pc+=3;
-  else
-    pc=url;
-  pc = strrchr(pc, '/');
-
-  if(pc) {
-    /* duplicate the string beyond the slash */
-    pc++;
-    fn = *pc ? strdup(pc): NULL;
-  }
-  return fn;
-}
-
-static char*
-parse_filename(char *ptr, size_t len)
-{
-  char* copy;
-  char* p;
-  char* q;
-  char quote = 0;
-
-  /* simple implementation of strndup() */
-  copy = malloc(len+1);
-  if(!copy)
-    return NULL;
-  strncpy(copy, ptr, len);
-  copy[len] = 0;
-
-  p = copy;
-  if(*p == '\'' || *p == '"') {
-    /* store the starting quote */
-    quote = *p;
-    p++;
-  }
-
-  /* if the filename contains a path, only use filename portion */
-  q = strrchr(copy, '/');
-  if(q) {
-    p=q+1;
-    if(!*p) {
-      free(copy);
-      return NULL;
-    }
-  }
-
-  /* If the filename contains a backslash, only use filename portion. The idea
-     is that even systems that don't handle backslashes as path separators
-     probably want the path removed for convenience. */
-  q = strrchr(p, '\\');
-  if (q) {
-    p = q+1;
-    if (!*p) {
-      free(copy);
-      return NULL;
-    }
-  }
-
-  if(quote) {
-    /* if the file name started with a quote, then scan for the end quote and
-       stop there */
-    q = strrchr(p, quote);
-    if(q)
-      *q = 0;
-  }
-  else
-    q = NULL; /* no start quote, so no end has been found */
-
-  if(!q) {
-    /* make sure the file name doesn't end in \r or \n */
-    q = strchr(p, '\r');
-    if(q)
-      *q  = 0;
-
-    q = strchr(p, '\n');
-    if(q)
-      *q  = 0;
-  }
-
-  if(copy!=p)
-    memmove(copy, p, strlen(p)+1);
-
-  return copy;
-}
-
-static size_t
-header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
-{
-  struct OutStruct* outs = (struct OutStruct*)stream;
-  const char* str = (char*)ptr;
-  const size_t cb = size*nmemb;
-  const char* end = (char*)ptr + cb;
-  size_t len;
-
-  if(cb > 20 && checkprefix("Content-disposition:", str)) {
-    char *p = (char*)str + 20;
-
-    /* look for the 'filename=' parameter
-       (encoded filenames (*=) are not supported) */
-    for(;;) {
-      char *filename;
-      char *semi;
-
-      while(*p && (p < end) && !ISALPHA(*p))
-        p++;
-      if(p > end-9)
-        break;
-
-      if(memcmp(p, "filename=", 9)) {
-        /* no match, find next parameter */
-        while((p < end) && (*p != ';'))
-          p++;
-        continue;
-      }
-      p+=9;
-      semi = strchr(p, ';');
-
-      /* this expression below typecasts 'cb' only to avoid
-         warning: signed and unsigned type in conditional expression
-      */
-      len = semi ? (semi - p) : (ssize_t)cb - (p - str);
-      filename = parse_filename(p, len);
-      if(filename) {
-        outs->filename = filename;
-        break;
-      }
-    }
-  }
-
-  return cb;
-}
-
-static int
-operate(struct Configurable *config, int argc, argv_item_t argv[])
-{
-  char errorbuffer[CURL_ERROR_SIZE];
-  char useragent[256]; /* buah, we don't want a larger default user agent */
-  struct ProgressData progressbar;
-  struct getout *urlnode;
-  struct getout *nextnode;
-
-  struct OutStruct outs;
-  struct OutStruct heads;
-  struct InStruct input;
-
-  URLGlob *urls=NULL;
-  URLGlob *inglob=NULL;
-  int urlnum;
-  int infilenum;
-  char *uploadfile=NULL; /* a single file, never a glob */
-
-  curl_off_t uploadfilesize; /* -1 means unknown */
-  bool stillflags=TRUE;
-
-  bool allocuseragent=FALSE;
-
-  char *httpgetfields=NULL;
-
-  CURL *curl;
-  int res = 0;
-  int i;
-  long retry_sleep_default;
-  long retry_sleep;
-
-  char *env;
-
-  memset(&heads, 0, sizeof(struct OutStruct));
-
-#ifdef CURLDEBUG
-  /* this sends all memory debug messages to a logfile named memdump */
-  env = curlx_getenv("CURL_MEMDEBUG");
-  if(env) {
-    /* use the value as file name */
-    char *s = strdup(env);
-    curl_free(env);
-    curl_memdebug(s);
-    free(s);
-    /* this weird strdup() and stuff here is to make the curl_free() get
-       called before the memdebug() as otherwise the memdebug tracing will
-       with tracing a free() without an alloc! */
-  }
-  env = curlx_getenv("CURL_MEMLIMIT");
-  if(env) {
-    char *endptr;
-    long num = strtol(env, &endptr, 10);
-    if((endptr != env) && (endptr == env + strlen(env)) && (num > 0))
-      curl_memlimit(num);
-    curl_free(env);
-  }
-#endif
-
-  /* Initialize curl library - do not call any libcurl functions before.
-     Note that the CURLDEBUG magic above is an exception, but then that's not
-     part of the official public API.
-  */
-  if(main_init() != CURLE_OK) {
-    helpf(config->errors, "error initializing curl library\n");
-    return CURLE_FAILED_INIT;
-  }
-
-  /*
-   * Get a curl handle to use for all forthcoming curl transfers.  Cleanup
-   * when all transfers are done.
-   */
-  curl = curl_easy_init();
-  if(!curl) {
-    clean_getout(config);
-    return CURLE_FAILED_INIT;
-  }
-  config->easy = curl;
-
-  memset(&outs,0,sizeof(outs));
-
-  config->outs = &outs;
-
-  /* we get libcurl info right away */
-  curlinfo = curl_version_info(CURLVERSION_NOW);
-
-  errorbuffer[0]=0; /* prevent junk from being output */
-
-  /* setup proper locale from environment */
-#ifdef HAVE_SETLOCALE
-  setlocale(LC_ALL, "");
-#endif
-
-  /* inits */
-  config->postfieldsize = -1;
-  config->showerror=TRUE;
-  config->use_httpget=FALSE;
-  config->create_dirs=FALSE;
-  config->maxredirs = DEFAULT_MAXREDIRS;
-  config->proto = CURLPROTO_ALL; /* FIXME: better to read from library */
-  config->proto_present = FALSE;
-  config->proto_redir =
-    CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
-  config->proto_redir_present = FALSE;
-
-  if(argc>1 &&
-     (!curlx_strnequal("--", argv[1], 2) && (argv[1][0] == '-')) &&
-     strchr(argv[1], 'q')) {
-    /*
-     * The first flag, that is not a verbose name, but a shortname
-     * and it includes the 'q' flag!
-     */
-    ;
-  }
-  else {
-    parseconfig(NULL, config); /* ignore possible failure */
-  }
-
-  if((argc < 2)  && !config->url_list) {
-    helpf(config->errors, NULL);
-    return CURLE_FAILED_INIT;
-  }
-
-  /* Parse options */
-  for(i = 1; i < argc; i++) {
-    if(stillflags &&
-       ('-' == argv[i][0])) {
-      char *nextarg;
-      bool passarg;
-      char *origopt=argv[i];
-
-      char *flag = argv[i];
-
-      if(curlx_strequal("--", argv[i]))
-        /* this indicates the end of the flags and thus enables the
-           following (URL) argument to start with -. */
-        stillflags=FALSE;
-      else {
-        nextarg= (i < argc - 1)? argv[i+1]: NULL;
-
-        res = getparameter(flag, nextarg, &passarg, config);
-        if(res) {
-          int retval = CURLE_OK;
-          if(res != PARAM_HELP_REQUESTED) {
-            const char *reason = param2text(res);
-            helpf(config->errors, "option %s: %s\n", origopt, reason);
-            retval = CURLE_FAILED_INIT;
-          }
-          clean_getout(config);
-          return retval;
-        }
-
-        if(passarg) /* we're supposed to skip this */
-          i++;
-      }
-    }
-    else {
-      bool used;
-      /* just add the URL please */
-      res = getparameter((char *)"--url", argv[i], &used, config);
-      if(res)
-        return res;
-    }
-  }
-
-  retry_sleep_default = config->retry_delay?
-    config->retry_delay*1000:RETRY_SLEEP_DEFAULT; /* ms */
-  retry_sleep = retry_sleep_default;
-
-  if((!config->url_list || !config->url_list->url) && !config->list_engines) {
-    clean_getout(config);
-    helpf(config->errors, "no URL specified!\n");
-    return CURLE_FAILED_INIT;
-  }
-  if(NULL == config->useragent) {
-    /* set non-zero default values: */
-    snprintf(useragent, sizeof(useragent),
-             CURL_NAME "/" CURL_VERSION " (" OS ") " "%s", curl_version());
-    config->useragent= useragent;
-  }
-  else
-    allocuseragent = TRUE;
-
-  /* On WIN32 we can't set the path to curl-ca-bundle.crt
-   * at compile time. So we look here for the file in two ways:
-   * 1: look at the environment variable CURL_CA_BUNDLE for a path
-   * 2: if #1 isn't found, use the windows API function SearchPath()
-   *    to find it along the app's path (includes app's dir and CWD)
-   *
-   * We support the environment variable thing for non-Windows platforms
-   * too. Just for the sake of it.
-   */
-  if(!config->cacert &&
-     !config->capath &&
-     !config->insecure_ok) {
-    env = curlx_getenv("CURL_CA_BUNDLE");
-    if(env)
-      GetStr(&config->cacert, env);
-    else {
-      env = curlx_getenv("SSL_CERT_DIR");
-      if(env)
-        GetStr(&config->capath, env);
-      else {
-        env = curlx_getenv("SSL_CERT_FILE");
-        if(env)
-          GetStr(&config->cacert, env);
-      }
-    }
-
-    if(env)
-      curl_free(env);
-#ifdef WIN32
-    else
-      FindWin32CACert(config, "curl-ca-bundle.crt");
-#endif
-  }
-
-  if(config->postfields) {
-    if(config->use_httpget) {
-      /* Use the postfields data for a http get */
-      httpgetfields = strdup(config->postfields);
-      free(config->postfields);
-      config->postfields = NULL;
-      if(SetHTTPrequest(config,
-                        (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
-                        &config->httpreq)) {
-        free(httpgetfields);
-        return PARAM_BAD_USE;
-      }
-    }
-    else {
-      if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq))
-        return PARAM_BAD_USE;
-    }
-  }
-
-  /* This is the first entry added to easycode and it initializes the slist */
-  easycode = curl_slist_append(easycode, "CURL *hnd = curl_easy_init();");
-  if(!easycode) {
-    clean_getout(config);
-    res = CURLE_OUT_OF_MEMORY;
-    goto quit_curl;
-  }
-
-  if(config->list_engines) {
-    struct curl_slist *engines = NULL;
-
-    curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
-    list_engines(engines);
-    curl_slist_free_all(engines);
-    res = CURLE_OK;
-    goto quit_curl;
-  }
-
-  /* After this point, we should call curl_easy_cleanup() if we decide to bail
-   * out from this function! */
-
-  urlnode = config->url_list;
-
-  if(config->headerfile) {
-    /* open file for output: */
-    if(strcmp(config->headerfile,"-")) {
-      heads.filename = config->headerfile;
-    }
-    else
-      heads.stream=stdout;
-    heads.config = config;
-  }
-
-  /* loop through the list of given URLs */
-  while(urlnode) {
-    int up; /* upload file counter within a single upload glob */
-    char *dourl;
-    char *url;
-    char *infiles; /* might be a glob pattern */
-    char *outfiles=NULL;
-
-    /* get the full URL (it might be NULL) */
-    dourl=urlnode->url;
-
-    url = dourl;
-
-    if(NULL == url) {
-      /* This node had no URL, skip it and continue to the next */
-      if(urlnode->outfile)
-        free(urlnode->outfile);
-
-      /* move on to the next URL */
-      nextnode=urlnode->next;
-      free(urlnode); /* free the node */
-      urlnode = nextnode;
-      continue; /* next please */
-    }
-
-    /* default output stream is stdout */
-    outs.stream = stdout;
-    outs.config = config;
-    outs.bytes = 0; /* nothing written yet */
-
-    /* save outfile pattern before expansion */
-    if(urlnode->outfile) {
-      outfiles = strdup(urlnode->outfile);
-      if(!outfiles) {
-        clean_getout(config);
-        break;
-      }
-    }
-
-    infiles = urlnode->infile;
-
-    if(!config->globoff && infiles) {
-      /* Unless explicitly shut off */
-      res = glob_url(&inglob, infiles, &infilenum,
-                     config->showerror?config->errors:NULL);
-      if(res != CURLE_OK) {
-        clean_getout(config);
-        if(outfiles)
-          free(outfiles);
-        break;
-      }
-    }
-
-    /* Here's the loop for uploading multiple files within the same
-       single globbed string. If no upload, we enter the loop once anyway. */
-    for(up = 0;
-        (!up && !infiles) ||
-          ((uploadfile = inglob?
-           glob_next_url(inglob):
-           (!up?strdup(infiles):NULL)) != NULL);
-        up++) {
-      int separator = 0;
-      long retry_numretries;
-      uploadfilesize=-1;
-
-      if(!config->globoff) {
-        /* Unless explicitly shut off, we expand '{...}' and '[...]'
-           expressions and return total number of URLs in pattern set */
-        res = glob_url(&urls, dourl, &urlnum,
-                       config->showerror?config->errors:NULL);
-        if(res != CURLE_OK) {
-          break;
-        }
-      }
-      else
-        urlnum = 1; /* without globbing, this is a single URL */
-
-      /* if multiple files extracted to stdout, insert separators! */
-      separator= ((!outfiles || curlx_strequal(outfiles, "-")) && urlnum > 1);
-
-      /* Here's looping around each globbed URL */
-      for(i = 0;
-          ((url = urls?glob_next_url(urls):(i?NULL:strdup(url))) != NULL);
-          i++) {
-        /* NOTE: In the condition expression in the for() statement above, the
-           'url' variable is only ever strdup()ed if(i == 0) and thus never
-           when this loops later on. Further down in this function we call
-           free(url) and then the code loops. Static code parsers may thus get
-           tricked into believing that we have a potential access-after-free
-           here.  I can however not spot any such case. */
-
-        int infd = STDIN_FILENO;
-        bool infdopen;
-        char *outfile;
-        struct timeval retrystart;
-        outfile = outfiles?strdup(outfiles):NULL;
-
-        if((urlnode->flags&GETOUT_USEREMOTE) ||
-           (outfile && !curlx_strequal("-", outfile)) ) {
-
-          /*
-           * We have specified a file name to store the result in, or we have
-           * decided we want to use the remote file name.
-           */
-
-          if(!outfile) {
-            /* extract the file name from the URL */
-            outfile = get_url_file_name(url);
-            if((!outfile || !*outfile) && !config->content_disposition) {
-              helpf(config->errors, "Remote file name has no length!\n");
-              res = CURLE_WRITE_ERROR;
-              free(url);
-              break;
-            }
-#if defined(MSDOS) || defined(WIN32)
-            /* For DOS and WIN32, we do some major replacing of
-               bad characters in the file name before using it */
-            outfile = sanitize_dos_name(outfile);
-            if(!outfile) {
-              res = CURLE_OUT_OF_MEMORY;
-              break;
-            }
-#endif /* MSDOS || WIN32 */
-          }
-          else if(urls) {
-            /* fill '#1' ... '#9' terms from URL pattern */
-            char *storefile = outfile;
-            outfile = glob_match_url(storefile, urls);
-            free(storefile);
-            if(!outfile) {
-              /* bad globbing */
-              warnf(config, "bad output glob!\n");
-              free(url);
-              res = CURLE_FAILED_INIT;
-              break;
-            }
-          }
-
-          /* Create the directory hierarchy, if not pre-existant to a multiple
-             file output call */
-
-          if(config->create_dirs &&
-             (-1 == create_dir_hierarchy(outfile, config->errors))) {
-            free(url);
-            res = CURLE_WRITE_ERROR;
-            break;
-          }
-
-          if(config->resume_from_current) {
-            /* We're told to continue from where we are now. Get the
-               size of the file as it is now and open it for append instead */
-
-            struct_stat fileinfo;
-
-            /* VMS -- Danger, the filesize is only valid for stream files */
-            if(0 == stat(outfile, &fileinfo))
-              /* set offset to current file size: */
-              config->resume_from = fileinfo.st_size;
-            else
-              /* let offset be 0 */
-              config->resume_from = 0;
-          }
-
-          outs.filename = outfile;
-
-          if(config->resume_from) {
-            outs.init = config->resume_from;
-            /* open file for output: */
-            outs.stream=(FILE *) fopen(outfile, config->resume_from?"ab":"wb");
-            if(!outs.stream) {
-              helpf(config->errors, "Can't open '%s'!\n", outfile);
-              free(url);
-              res = CURLE_WRITE_ERROR;
-              break;
-            }
-          }
-          else {
-            outs.stream = NULL; /* open when needed */
-            outs.bytes = 0;     /* reset byte counter */
-          }
-        }
-        infdopen=FALSE;
-        if(uploadfile && !stdin_upload(uploadfile)) {
-          /*
-           * We have specified a file to upload and it isn't "-".
-           */
-          struct_stat fileinfo;
-
-          url = add_file_name_to_url(curl, url, uploadfile);
-          if(!url) {
-            helpf(config->errors, "out of memory\n");
-            res = CURLE_OUT_OF_MEMORY;
-            break;
-          }
-          /* VMS Note:
-           *
-           * Reading binary from files can be a problem...  Only FIXED, VAR
-           * etc WITHOUT implied CC will work Others need a \n appended to a
-           * line
-           *
-           * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a
-           * fixed file with implied CC needs to have a byte added for every
-           * record processed, this can by derived from Filesize & recordsize
-           * for VARiable record files the records need to be counted!  for
-           * every record add 1 for linefeed and subtract 2 for the record
-           * header for VARIABLE header files only the bare record data needs
-           * to be considered with one appended if implied CC
-           */
-
-          infd= open(uploadfile, O_RDONLY | O_BINARY);
-          if((infd == -1) || fstat(infd, &fileinfo)) {
-            helpf(config->errors, "Can't open '%s'!\n", uploadfile);
-            if(infd != -1)
-              close(infd);
-
-            /* Free the list of remaining URLs and globbed upload files
-             * to force curl to exit immediately
-             */
-            if(urls) {
-              glob_cleanup(urls);
-              urls = NULL;
-            }
-            if(inglob) {
-              glob_cleanup(inglob);
-              inglob = NULL;
-            }
-
-            res = CURLE_READ_ERROR;
-            goto quit_urls;
-          }
-          infdopen=TRUE;
-
-          /* we ignore file size for char/block devices, sockets, etc. */
-          if(S_ISREG(fileinfo.st_mode))
-            uploadfilesize=fileinfo.st_size;
-
-        }
-        else if(uploadfile && stdin_upload(uploadfile)) {
-          /* count to see if there are more than one auth bit set
-             in the authtype field */
-          int authbits = 0;
-          int bitcheck = 0;
-          while(bitcheck < 32) {
-            if(config->authtype & (1 << bitcheck++)) {
-              authbits++;
-              if(authbits > 1) {
-                /* more than one, we're done! */
-                break;
-              }
-            }
-          }
-
-          /*
-           * If the user has also selected --anyauth or --proxy-anyauth
-           * we should warn him/her.
-           */
-          if(config->proxyanyauth || (authbits>1)) {
-            warnf(config,
-                  "Using --anyauth or --proxy-anyauth with upload from stdin"
-                  " involves a big risk of it not working. Use a temporary"
-                  " file or a fixed auth type instead!\n");
-          }
-
-          SET_BINMODE(stdin);
-          infd = STDIN_FILENO;
-          if(curlx_strequal(uploadfile, ".")) {
-            if(curlx_nonblock((curl_socket_t)infd, TRUE) < 0)
-              warnf(config,
-                    "fcntl failed on fd=%d: %s\n", infd, strerror(errno));
-          }
-        }
-
-        if(uploadfile && config->resume_from_current)
-          config->resume_from = -1; /* -1 will then force get-it-yourself */
-
-        if(output_expected(url, uploadfile)
-           && outs.stream && isatty(fileno(outs.stream)))
-          /* we send the output to a tty, therefore we switch off the progress
-             meter */
-          config->noprogress = config->isatty = TRUE;
-
-        if(urlnum > 1 && !(config->mute)) {
-          fprintf(config->errors, "\n[%d/%d]: %s --> %s\n",
-                  i+1, urlnum, url, outfile ? outfile : "<stdout>");
-          if(separator)
-            printf("%s%s\n", CURLseparator, url);
-        }
-        if(httpgetfields) {
-          char *urlbuffer;
-          /* Find out whether the url contains a file name */
-          const char *pc =strstr(url, "://");
-          char sep='?';
-          if(pc)
-            pc+=3;
-          else
-            pc=url;
-
-          pc = strrchr(pc, '/'); /* check for a slash */
-
-          if(pc) {
-            /* there is a slash present in the URL */
-
-            if(strchr(pc, '?'))
-              /* Ouch, there's already a question mark in the URL string, we
-                 then append the data with an ampersand separator instead! */
-              sep='&';
-          }
-          /*
-           * Then append ? followed by the get fields to the url.
-           */
-          urlbuffer = malloc(strlen(url) + strlen(httpgetfields) + 3);
-          if(!urlbuffer) {
-            helpf(config->errors, "out of memory\n");
-
-            /* Free the list of remaining URLs and globbed upload files
-             * to force curl to exit immediately
-             */
-            if(urls) {
-              glob_cleanup(urls);
-              urls = NULL;
-            }
-            if(inglob) {
-              glob_cleanup(inglob);
-              inglob = NULL;
-            }
-
-            res = CURLE_OUT_OF_MEMORY;
-            goto quit_urls;
-          }
-          if(pc)
-            sprintf(urlbuffer, "%s%c%s", url, sep, httpgetfields);
-          else
-            /* Append  / before the ? to create a well-formed url
-               if the url contains a hostname only
-            */
-            sprintf(urlbuffer, "%s/?%s", url, httpgetfields);
-
-          free(url); /* free previous URL */
-          url = urlbuffer; /* use our new URL instead! */
-        }
-
-        if(!config->errors)
-          config->errors = stderr;
-
-        if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) {
-          /* We get the output to stdout and we have not got the ASCII/text
-             flag, then set stdout to be binary */
-          SET_BINMODE(stdout);
-        }
-
-        if(1 == config->tcp_nodelay)
-          my_setopt(curl, CURLOPT_TCP_NODELAY, 1);
-
-        /* where to store */
-        my_setopt(curl, CURLOPT_WRITEDATA, &outs);
-        /* what call to write */
-        my_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
-
-        /* for uploads */
-        input.fd = infd;
-        input.config = config;
-        my_setopt(curl, CURLOPT_READDATA, &input);
-        /* what call to read */
-        if((outfile && !curlx_strequal("-", outfile)) ||
-           !checkprefix("telnet:", url))
-          my_setopt(curl, CURLOPT_READFUNCTION, my_fread);
-
-        /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what
-           CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */
-        my_setopt(curl, CURLOPT_SEEKDATA, &input);
-        my_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek);
-
-        if(config->recvpersecond)
-          /* tell libcurl to use a smaller sized buffer as it allows us to
-             make better sleeps! 7.9.9 stuff! */
-          my_setopt(curl, CURLOPT_BUFFERSIZE, config->recvpersecond);
-
-        /* size of uploaded file: */
-        if(uploadfilesize != -1)
-          my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
-        my_setopt_str(curl, CURLOPT_URL, url);     /* what to fetch */
-        my_setopt_str(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
-        if(config->proxy)
-          my_setopt(curl, CURLOPT_PROXYTYPE, config->proxyver);
-        my_setopt(curl, CURLOPT_NOPROGRESS, config->noprogress);
-        if(config->no_body) {
-          my_setopt(curl, CURLOPT_NOBODY, 1);
-          my_setopt(curl, CURLOPT_HEADER, 1);
-        }
-        else
-          my_setopt(curl, CURLOPT_HEADER, config->include_headers);
-
-        my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror);
-        my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE);
-        my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly);
-        my_setopt(curl, CURLOPT_APPEND, config->ftp_append);
-
-        if(config->netrc_opt)
-          my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
-        else if(config->netrc)
-          my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED);
-        else
-          my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED);
-
-        my_setopt(curl, CURLOPT_FOLLOWLOCATION, config->followlocation);
-        my_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, config->unrestricted_auth);
-        my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii);
-        my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
-        my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
-        my_setopt(curl, CURLOPT_NOPROXY, config->noproxy);
-        my_setopt_str(curl, CURLOPT_RANGE, config->range);
-        my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
-        my_setopt(curl, CURLOPT_TIMEOUT, config->timeout);
-
-        switch(config->httpreq) {
-        case HTTPREQ_SIMPLEPOST:
-          my_setopt_str(curl, CURLOPT_POSTFIELDS, config->postfields);
-          my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, config->postfieldsize);
-          break;
-        case HTTPREQ_POST:
-          my_setopt(curl, CURLOPT_HTTPPOST, config->httppost);
-          break;
-        default:
-          break;
-        }
-        my_setopt_str(curl, CURLOPT_REFERER, config->referer);
-        my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer);
-        my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
-        my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
-        my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT,
-                  config->low_speed_limit);
-        my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
-        my_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE,
-                  config->sendpersecond);
-        my_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE,
-                  config->recvpersecond);
-        my_setopt(curl, CURLOPT_RESUME_FROM_LARGE,
-                  config->use_resume?config->resume_from:0);
-        my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
-        my_setopt(curl, CURLOPT_HTTPHEADER, config->headers);
-        my_setopt(curl, CURLOPT_SSLCERT, config->cert);
-        my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
-        my_setopt(curl, CURLOPT_SSLKEY, config->key);
-        my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
-        my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
-
-        /* SSH private key uses the same command-line option as SSL private
-           key */
-        my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
-        my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
-
-        /* SSH host key md5 checking allows us to fail if we are
-         * not talking to who we think we should
-         */
-        my_setopt_str(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
-                      config->hostpubmd5);
-
-        /* default to strict verifyhost */
-        /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2); */
-        if(config->cacert || config->capath) {
-          if(config->cacert)
-            my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
-
-          if(config->capath)
-            my_setopt_str(curl, CURLOPT_CAPATH, config->capath);
-          my_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
-        }
-        if(config->crlfile)
-          my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile);
-        if(config->insecure_ok) {
-          /* new stuff needed for libcurl 7.10 */
-          my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
-          my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
-        }
-        else {
-          char *home = homedir();
-          char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
-          if(home)
-            free(home);
-
-          if(file) {
-            my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
-            curl_free(file);
-          }
-          else {
-            /* Free the list of remaining URLs and globbed upload files
-             * to force curl to exit immediately
-             */
-            if(urls) {
-              glob_cleanup(urls);
-              urls = NULL;
-            }
-            if(inglob) {
-              glob_cleanup(inglob);
-              inglob = NULL;
-            }
-
-            res = CURLE_OUT_OF_MEMORY;
-            goto quit_urls;
-          }
-        }
-
-        if(config->no_body || config->remote_time) {
-          /* no body or use remote time */
-          my_setopt(curl, CURLOPT_FILETIME, TRUE);
-        }
-
-        my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
-        my_setopt(curl, CURLOPT_CRLF, config->crlf);
-        my_setopt(curl, CURLOPT_QUOTE, config->quote);
-        my_setopt(curl, CURLOPT_POSTQUOTE, config->postquote);
-        my_setopt(curl, CURLOPT_PREQUOTE, config->prequote);
-        my_setopt(curl, CURLOPT_HEADERDATA,
-                  config->headerfile?&heads:NULL);
-        my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
-        /* cookie jar was added in 7.9 */
-        if(config->cookiejar)
-          my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
-        /* cookie session added in 7.9.7 */
-        my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession);
-
-        my_setopt(curl, CURLOPT_SSLVERSION, config->ssl_version);
-        my_setopt(curl, CURLOPT_TIMECONDITION, config->timecond);
-        my_setopt(curl, CURLOPT_TIMEVALUE, config->condtime);
-        my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
-        my_setopt(curl, CURLOPT_STDERR, config->errors);
-
-        /* three new ones in libcurl 7.3: */
-        my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel);
-        my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
-        my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
-
-        progressbarinit(&progressbar, config);
-        if((config->progressmode == CURL_PROGRESS_BAR) &&
-           !config->noprogress && !config->mute) {
-          /* we want the alternative style, then we have to implement it
-             ourselves! */
-          my_setopt(curl, CURLOPT_PROGRESSFUNCTION, myprogress);
-          my_setopt(curl, CURLOPT_PROGRESSDATA, &progressbar);
-        }
-
-        /* new in libcurl 7.6.2: */
-        my_setopt(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
-
-        /* new in libcurl 7.7: */
-        my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
-        my_setopt(curl, CURLOPT_EGDSOCKET, config->egd_file);
-        my_setopt(curl, CURLOPT_CONNECTTIMEOUT, config->connecttimeout);
-
-        if(config->cipher_list)
-          my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
-
-        if(config->httpversion)
-          my_setopt(curl, CURLOPT_HTTP_VERSION, config->httpversion);
-
-        /* new in libcurl 7.9.2: */
-        if(config->disable_epsv)
-          /* disable it */
-          my_setopt(curl, CURLOPT_FTP_USE_EPSV, FALSE);
-
-        /* new in libcurl 7.10.5 */
-        if(config->disable_eprt)
-          /* disable it */
-          my_setopt(curl, CURLOPT_FTP_USE_EPRT, FALSE);
-
-        /* new in libcurl 7.10.6 (default is Basic) */
-        if(config->authtype)
-          my_setopt(curl, CURLOPT_HTTPAUTH, config->authtype);
-
-        if(config->tracetype != TRACE_NONE) {
-          my_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
-          my_setopt(curl, CURLOPT_DEBUGDATA, config);
-          my_setopt(curl, CURLOPT_VERBOSE, TRUE);
-        }
-
-        res = CURLE_OK;
-
-        /* new in curl ?? */
-        if(config->engine) {
-          res = my_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
-          my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1);
-        }
-
-        if(res != CURLE_OK)
-          goto show_error;
-
-        /* new in curl 7.10 */
-        my_setopt_str(curl, CURLOPT_ENCODING,
-                      (config->encoding) ? "" : NULL);
-
-        /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */
-        my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
-                  config->ftp_create_dirs);
-        if(config->proxyanyauth)
-          my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
-        else if(config->proxynegotiate)
-          my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_GSSNEGOTIATE);
-        else if(config->proxyntlm)
-          my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
-        else if(config->proxydigest)
-          my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST);
-        else if(config->proxybasic)
-          my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
-
-        /* new in curl 7.10.8 */
-        if(config->max_filesize)
-          my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
-                    config->max_filesize);
-
-        if(4 == config->ip_version)
-          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
-        else if(6 == config->ip_version)
-          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
-        else
-          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
-
-        /* new in curl 7.15.5 */
-        if(config->ftp_ssl_reqd)
-          my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
-
-        /* new in curl 7.11.0 */
-        else if(config->ftp_ssl)
-          my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
-
-        /* new in curl 7.16.0 */
-        else if(config->ftp_ssl_control)
-          my_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
-
-        /* new in curl 7.16.1 */
-        if(config->ftp_ssl_ccc)
-          my_setopt(curl, CURLOPT_FTP_SSL_CCC, config->ftp_ssl_ccc_mode);
-
-        /* new in curl 7.11.1, modified in 7.15.2 */
-        if(config->socksproxy) {
-          my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
-          my_setopt(curl, CURLOPT_PROXYTYPE, config->socksver);
-        }
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-        /* new in curl 7.19.4 */
-        if(config->socks5_gssapi_service)
-          my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE,
-                        config->socks5_gssapi_service);
-
-        /* new in curl 7.19.4 */
-        if(config->socks5_gssapi_nec)
-          my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_NEC,
-                        config->socks5_gssapi_nec);
-#endif
-        /* curl 7.13.0 */
-        my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
-
-        my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl);
-
-        /* curl 7.14.2 */
-        my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip);
-
-        /* curl 7.15.1 */
-        my_setopt(curl, CURLOPT_FTP_FILEMETHOD, config->ftp_filemethod);
-
-        /* curl 7.15.2 */
-        if(config->localport) {
-          my_setopt(curl, CURLOPT_LOCALPORT, config->localport);
-          my_setopt_str(curl, CURLOPT_LOCALPORTRANGE,
-                        config->localportrange);
-        }
-
-        /* curl 7.15.5 */
-        my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER,
-                      config->ftp_alternative_to_user);
-
-        /* curl 7.16.0 */
-        if(config->disable_sessionid)
-          my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE,
-                    !config->disable_sessionid);
-
-        /* curl 7.16.2 */
-        if(config->raw) {
-          my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, FALSE);
-          my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, FALSE);
-        }
-
-        /* curl 7.17.1 */
-        if(!config->nokeepalive) {
-          my_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockoptcallback);
-          my_setopt(curl, CURLOPT_SOCKOPTDATA, config);
-        }
-
-        /* curl 7.19.1 (the 301 version existed in 7.18.2) */
-        my_setopt(curl, CURLOPT_POSTREDIR, config->post301 |
-                  (config->post302 ? CURL_REDIR_POST_302 : FALSE));
-
-        /* curl 7.20.0 */
-        if(config->tftp_blksize)
-          my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
-
-        if(config->mail_from)
-          my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
-
-        if(config->mail_rcpt)
-          my_setopt(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
-
-        /* curl 7.20.x */
-        if(config->ftp_pret)
-          my_setopt(curl, CURLOPT_FTP_USE_PRET, TRUE);
-
-        if(config->proto_present)
-          my_setopt(curl, CURLOPT_PROTOCOLS, config->proto);
-        if(config->proto_redir_present)
-          my_setopt(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
-
-        if((urlnode->flags & GETOUT_USEREMOTE)
-           && config->content_disposition) {
-          my_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
-          my_setopt(curl, CURLOPT_HEADERDATA, &outs);
-        }
-
-        if(config->resolve)
-          /* new in 7.21.3 */
-          my_setopt(curl, CURLOPT_RESOLVE, config->resolve);
-
-        retry_numretries = config->req_retry;
-
-        retrystart = cutil_tvnow();
-
-        for(;;) {
-          res = curl_easy_perform(curl);
-          if(!curl_slist_append(easycode, "ret = curl_easy_perform(hnd);")) {
-            res = CURLE_OUT_OF_MEMORY;
-            break;
-          }
-
-          if(config->content_disposition && outs.stream && !config->mute &&
-             outs.filename)
-            printf("curl: Saved to filename '%s'\n", outs.filename);
-
-          /* if retry-max-time is non-zero, make sure we haven't exceeded the
-             time */
-          if(retry_numretries &&
-             (!config->retry_maxtime ||
-              (cutil_tvdiff(cutil_tvnow(), retrystart)<
-               config->retry_maxtime*1000)) ) {
-            enum {
-              RETRY_NO,
-              RETRY_TIMEOUT,
-              RETRY_HTTP,
-              RETRY_FTP,
-              RETRY_LAST /* not used */
-            } retry = RETRY_NO;
-            long response;
-            if(CURLE_OPERATION_TIMEDOUT == res)
-              /* retry timeout always */
-              retry = RETRY_TIMEOUT;
-            else if((CURLE_OK == res) ||
-                    (config->failonerror &&
-                     (CURLE_HTTP_RETURNED_ERROR == res))) {
-              /* If it returned OK. _or_ failonerror was enabled and it
-                 returned due to such an error, check for HTTP transient
-                 errors to retry on. */
-              char *this_url=NULL;
-              curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &this_url);
-              if(this_url &&
-                 checkprefix("http", this_url)) {
-                /* This was HTTP(S) */
-                curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
-
-                switch(response) {
-                case 500: /* Internal Server Error */
-                case 502: /* Bad Gateway */
-                case 503: /* Service Unavailable */
-                case 504: /* Gateway Timeout */
-                  retry = RETRY_HTTP;
-                  /*
-                   * At this point, we have already written data to the output
-                   * file (or terminal). If we write to a file, we must rewind
-                   * or close/re-open the file so that the next attempt starts
-                   * over from the beginning.
-                   *
-                   * TODO: similar action for the upload case. We might need
-                   * to start over reading from a previous point if we have
-                   * uploaded something when this was returned.
-                   */
-                  break;
-                }
-              }
-            } /* if CURLE_OK */
-            else if(res) {
-              curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
-
-              if(response/100 == 4)
-                /*
-                 * This is typically when the FTP server only allows a certain
-                 * amount of users and we are not one of them.  All 4xx codes
-                 * are transient.
-                 */
-                retry = RETRY_FTP;
-            }
-
-            if(retry) {
-              static const char * const m[]={
-                NULL, "timeout", "HTTP error", "FTP error"
-              };
-              warnf(config, "Transient problem: %s "
-                    "Will retry in %ld seconds. "
-                    "%ld retries left.\n",
-                    m[retry], retry_sleep/1000, retry_numretries);
-
-              go_sleep(retry_sleep);
-              retry_numretries--;
-              if(!config->retry_delay) {
-                retry_sleep *= 2;
-                if(retry_sleep > RETRY_SLEEP_MAX)
-                  retry_sleep = RETRY_SLEEP_MAX;
-              }
-              if(outs.bytes && outs.filename) {
-                /* We have written data to a output file, we truncate file
-                 */
-                if(!config->mute)
-                  fprintf(config->errors, "Throwing away %"
-                          CURL_FORMAT_CURL_OFF_T " bytes\n",
-                          outs.bytes);
-                fflush(outs.stream);
-                /* truncate file at the position where we started appending */
-#ifdef HAVE_FTRUNCATE
-                if(ftruncate( fileno(outs.stream), outs.init)) {
-                  /* when truncate fails, we can't just append as then we'll
-                     create something strange, bail out */
-                  if(!config->mute)
-                    fprintf(config->errors,
-                            "failed to truncate, exiting\n");
-                  break;
-                }
-                /* now seek to the end of the file, the position where we
-                   just truncated the file in a large file-safe way */
-                fseek(outs.stream, 0, SEEK_END);
-#else
-                /* ftruncate is not available, so just reposition the file
-                   to the location we would have truncated it. This won't
-                   work properly with large files on 32-bit systems, but
-                   most of those will have ftruncate. */
-                fseek(outs.stream, (long)outs.init, SEEK_SET);
-#endif
-                outs.bytes = 0; /* clear for next round */
-              }
-              continue;
-            }
-          } /* if retry_numretries */
-
-          /* In all ordinary cases, just break out of loop here */
-          retry_sleep = retry_sleep_default;
-          break;
-
-        }
-
-        if((config->progressmode == CURL_PROGRESS_BAR) &&
-           progressbar.calls)
-          /* if the custom progress bar has been displayed, we output a
-             newline here */
-          fputs("\n", progressbar.out);
-
-        if(config->writeout)
-          ourWriteOut(curl, config->writeout);
-#ifdef USE_ENVIRONMENT
-        if(config->writeenv)
-          ourWriteEnv(curl);
-#endif
-
-        show_error:
-
-#ifdef __VMS
-        if(is_vms_shell()) {
-          /* VMS DCL shell behavior */
-          if(!config->showerror) {
-            vms_show = VMSSTS_HIDE;
-          }
-        }
-        else
-#endif
-        {
-          if((res!=CURLE_OK) && config->showerror) {
-            fprintf(config->errors, "curl: (%d) %s\n", res,
-                    errorbuffer[0]? errorbuffer:
-                    curl_easy_strerror((CURLcode)res));
-            if(CURLE_SSL_CACERT == res) {
-#define CURL_CA_CERT_ERRORMSG1                                          \
-              "More details here: http://curl.haxx.se/docs/sslcerts.html\n\n" \
-                "curl performs SSL certificate verification by default, using a \"bundle\"\n" \
-                " of Certificate Authority (CA) public keys (CA certs). If the default\n" \
-                " bundle file isn't adequate, you can specify an alternate file\n" \
-                " using the --cacert option.\n"
-
-#define CURL_CA_CERT_ERRORMSG2                                          \
-              "If this HTTPS server uses a certificate signed by a CA represented in\n" \
-                " the bundle, the certificate verification probably failed due to a\n" \
-                " problem with the certificate (it might be expired, or the name might\n" \
-                " not match the domain name in the URL).\n"             \
-                "If you'd like to turn off curl's verification of the certificate, use\n" \
-                " the -k (or --insecure) option.\n"
-
-              fprintf(config->errors, "%s%s",
-                      CURL_CA_CERT_ERRORMSG1,
-                      CURL_CA_CERT_ERRORMSG2 );
-            }
-          }
-        }
-        if(outfile && !curlx_strequal(outfile, "-") && outs.stream) {
-          int rc;
-
-          if(config->xattr) {
-            rc = fwrite_xattr(curl, fileno(outs.stream) );
-            if(rc)
-              warnf(config, "Error setting extended attributes: %s\n",
-                    strerror(errno) );
-          }
-
-          rc = fclose(outs.stream);
-          if(!res && rc) {
-            /* something went wrong in the writing process */
-            res = CURLE_WRITE_ERROR;
-            fprintf(config->errors, "(%d) Failed writing body\n", res);
-          }
-        }
-
-#ifdef HAVE_UTIME
-        /* Important that we set the time _after_ the file has been
-           closed, as is done above here */
-        if(config->remote_time && outs.filename) {
-          /* ask libcurl if we got a time. Pretty please */
-          long filetime;
-          curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-          if(filetime >= 0) {
-            struct utimbuf times;
-            times.actime = (time_t)filetime;
-            times.modtime = (time_t)filetime;
-            utime(outs.filename, &times); /* set the time we got */
-          }
-        }
-#endif
-#ifdef __AMIGA__
-        /* Set the url as comment for the file. (up to 80 chars are allowed)
-         */
-        if( strlen(url) > 78 )
-          url[79] = '\0';
-
-        SetComment( outs.filename, url);
-#endif
-
-        quit_urls:
-        if(url)
-          free(url);
-
-        if(outfile)
-          free(outfile);
-
-        if(infdopen)
-          close(infd);
-
-      } /* loop to the next URL */
-
-      if(urls) {
-        /* cleanup memory used for URL globbing patterns */
-        glob_cleanup(urls);
-        urls = NULL;
-      }
-
-      if(uploadfile)
-        free(uploadfile);
-
-    } /* loop to the next globbed upload file */
-
-    if(inglob) {
-      glob_cleanup(inglob);
-      inglob = NULL;
-    }
-
-    if(outfiles)
-      free(outfiles);
-
-    /* empty this urlnode struct */
-    if(urlnode->url)
-      free(urlnode->url);
-    if(urlnode->outfile)
-      free(urlnode->outfile);
-    if(urlnode->infile)
-      free(urlnode->infile);
-
-    /* move on to the next URL */
-    nextnode=urlnode->next;
-    free(urlnode); /* free the node */
-    urlnode = nextnode;
-
-  } /* while-loop through all URLs */
-
-  quit_curl:
-  if(httpgetfields)
-    free(httpgetfields);
-
-  if(config->engine)
-    free(config->engine);
-
-  /* cleanup the curl handle! */
-  curl_easy_cleanup(curl);
-  config->easy = NULL; /* cleanup now */
-  if(easycode)
-    curl_slist_append(easycode, "curl_easy_cleanup(hnd);");
-
-  if(heads.stream && (heads.stream != stdout))
-    fclose(heads.stream);
-
-  if(allocuseragent)
-    free(config->useragent);
-
-  if(config->trace_fopened && config->trace_stream)
-    fclose(config->trace_stream);
-
-  /* Dump the libcurl code if previously enabled.
-     NOTE: that this function relies on config->errors amongst other things
-     so not everything can be closed and cleaned before this is called */
-  dumpeasycode(config);
-
-  if(config->errors_fopened)
-    fclose(config->errors);
-
-  main_free(); /* cleanup */
-
-  return res;
-}
-
-/* Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are
-   open before starting to run.  Otherwise, the first three network
-   sockets opened by curl could be used for input sources, downloaded data
-   or error logs as they will effectively be stdin, stdout and/or stderr.
-*/
-static void checkfds(void)
-{
-#ifdef HAVE_PIPE
-  int fd[2] = { STDIN_FILENO, STDIN_FILENO };
-  while( fd[0] == STDIN_FILENO ||
-         fd[0] == STDOUT_FILENO ||
-         fd[0] == STDERR_FILENO ||
-         fd[1] == STDIN_FILENO ||
-         fd[1] == STDOUT_FILENO ||
-         fd[1] == STDERR_FILENO )
-    if(pipe(fd) < 0)
-      return;   /* Out of handles. This isn't really a big problem now, but
-                   will be when we try to create a socket later. */
-  close(fd[0]);
-  close(fd[1]);
-#endif
-}
-
-
-
-int main(int argc, char *argv[])
-{
-  int res;
-  struct Configurable config;
-
-  memset(&config, 0, sizeof(struct Configurable));
-
-  config.errors = stderr; /* default errors to stderr */
-
-  checkfds();
-
-  res = operate(&config, argc, argv);
-#ifdef __SYMBIAN32__
-  if(config.showerror)
-    pressanykey();
-#endif
-  free_config_fields(&config);
-
-#ifdef __NOVELL_LIBC__
-  if(getenv("_IN_NETWARE_BASH_") == NULL)
-    pressanykey();
-#endif
-#ifdef __VMS
-  vms_special_exit(res, vms_show);
-#else
-  return res;
-#endif
-}
-
-/*
- * Reads a line from the given file, ensuring is NUL terminated.
- * The pointer must be freed by the caller.
- * NULL is returned on an out of memory condition.
- */
-static char *my_get_line(FILE *fp)
-{
-  char buf[4096];
-  char *nl = NULL;
-  char *retval = NULL;
-
-  do {
-    if(NULL == fgets(buf, sizeof(buf), fp))
-      break;
-    if(NULL == retval) {
-      retval = strdup(buf);
-      if(!retval)
-        return NULL;
-    }
-    else {
-      char *ptr;
-      ptr = realloc(retval, strlen(retval) + strlen(buf) + 1);
-      if(NULL == ptr) {
-        free(retval);
-        return NULL;
-      }
-      retval = ptr;
-      strcat(retval, buf);
-    }
-  }
-  while(NULL == (nl = strchr(retval, '\n')));
-
-  if(NULL != nl)
-    *nl = '\0';
-
-  return retval;
-}
-
-static void show_dir_errno(FILE *errors, const char *name)
-{
-  switch (ERRNO) {
-#ifdef EACCES
-  case EACCES:
-    fprintf(errors,"You don't have permission to create %s.\n", name);
-    break;
-#endif
-#ifdef ENAMETOOLONG
-  case ENAMETOOLONG:
-    fprintf(errors,"The directory name %s is too long.\n", name);
-    break;
-#endif
-#ifdef EROFS
-  case EROFS:
-    fprintf(errors,"%s resides on a read-only file system.\n", name);
-    break;
-#endif
-#ifdef ENOSPC
-  case ENOSPC:
-    fprintf(errors,"No space left on the file system that will "
-            "contain the directory %s.\n", name);
-    break;
-#endif
-#ifdef EDQUOT
-  case EDQUOT:
-    fprintf(errors,"Cannot create directory %s because you "
-            "exceeded your quota.\n", name);
-    break;
-#endif
-  default :
-    fprintf(errors,"Error creating directory %s.\n", name);
-    break;
-  }
-}
-
-/* Create the needed directory hierarchy recursively in order to save
-   multi-GETs in file output, ie:
-   curl "http://my.site/dir[1-5]/file[1-5].txt" -o "dir#1/file#2.txt"
-   should create all the dir* automagically
-*/
-static int create_dir_hierarchy(const char *outfile, FILE *errors)
-{
-  char *tempdir;
-  char *tempdir2;
-  char *outdup;
-  char *dirbuildup;
-  int result=0;
-
-  outdup = strdup(outfile);
-  if(!outdup)
-    return -1;
-
-  dirbuildup = malloc(sizeof(char) * strlen(outfile));
-  if(!dirbuildup) {
-    free(outdup);
-    return -1;
-  }
-  dirbuildup[0] = '\0';
-
-  tempdir = strtok(outdup, DIR_CHAR);
-
-  while(tempdir != NULL) {
-    tempdir2 = strtok(NULL, DIR_CHAR);
-    /* since strtok returns a token for the last word even
-       if not ending with DIR_CHAR, we need to prune it */
-    if(tempdir2 != NULL) {
-      size_t dlen = strlen(dirbuildup);
-      if(dlen)
-        sprintf(&dirbuildup[dlen], "%s%s", DIR_CHAR, tempdir);
-      else {
-        if(0 != strncmp(outdup, DIR_CHAR, 1))
-          strcpy(dirbuildup, tempdir);
-        else
-          sprintf(dirbuildup, "%s%s", DIR_CHAR, tempdir);
-      }
-      if(access(dirbuildup, F_OK) == -1) {
-        result = mkdir(dirbuildup,(mode_t)0000750);
-        if(-1 == result) {
-          show_dir_errno(errors, dirbuildup);
-          break; /* get out of loop */
-        }
-      }
-    }
-    tempdir = tempdir2;
-  }
-  free(dirbuildup);
-  free(outdup);
-
-  return result; /* 0 is fine, -1 is badness */
-}
-
-#if defined(MSDOS) || defined(WIN32)
-
-#ifndef HAVE_BASENAME
-/* basename() returns a pointer to the last component of a pathname.
- * Ripped from lib/formdata.c.
- */
-static char *Curl_basename(char *path)
-{
-  /* Ignore all the details above for now and make a quick and simple
-     implementaion here */
-  char *s1;
-  char *s2;
-
-  s1=strrchr(path, '/');
-  s2=strrchr(path, '\\');
-
-  if(s1 && s2) {
-    path = (s1 > s2? s1 : s2)+1;
-  }
-  else if(s1)
-    path = s1 + 1;
-  else if(s2)
-    path = s2 + 1;
-
-  return path;
-}
-#define basename(x) Curl_basename((x))
-#endif /* HAVE_BASENAME */
-
-/* The following functions are taken with modification from the DJGPP
- * port of tar 1.12. They use algorithms originally from DJTAR. */
-
-static const char *
-msdosify (const char *file_name)
-{
-  static char dos_name[PATH_MAX];
-  static const char illegal_chars_dos[] = ".+, ;=[]" /* illegal in DOS */
-    "|<>\\\":?*"; /* illegal in DOS & W95 */
-  static const char *illegal_chars_w95 = &illegal_chars_dos[8];
-  int idx, dot_idx;
-  const char *s = file_name;
-  char *d = dos_name;
-  const char * const dlimit = dos_name + sizeof(dos_name) - 1;
-  const char *illegal_aliens = illegal_chars_dos;
-  size_t len = sizeof (illegal_chars_dos) - 1;
-
-  /* Support for Windows 9X VFAT systems, when available. */
-  if(_use_lfn (file_name)) {
-    illegal_aliens = illegal_chars_w95;
-    len -= (illegal_chars_w95 - illegal_chars_dos);
-  }
-
-  /* Get past the drive letter, if any. */
-  if(s[0] >= 'A' && s[0] <= 'z' && s[1] == ':') {
-    *d++ = *s++;
-    *d++ = *s++;
-  }
-
-  for(idx = 0, dot_idx = -1; *s && d < dlimit; s++, d++) {
-    if(memchr (illegal_aliens, *s, len)) {
-      /* Dots are special: DOS doesn't allow them as the leading character,
-         and a file name cannot have more than a single dot.  We leave the
-         first non-leading dot alone, unless it comes too close to the
-         beginning of the name: we want sh.lex.c to become sh_lex.c, not
-         sh.lex-c.  */
-      if(*s == '.') {
-        if(idx == 0 && (s[1] == '/' || (s[1] == '.' && s[2] == '/'))) {
-          /* Copy "./" and "../" verbatim.  */
-          *d++ = *s++;
-          if(*s == '.')
-            *d++ = *s++;
-          *d = *s;
-        }
-        else if(idx == 0)
-          *d = '_';
-        else if(dot_idx >= 0) {
-          if(dot_idx < 5) { /* 5 is a heuristic ad-hoc'ery */
-            d[dot_idx - idx] = '_'; /* replace previous dot */
-            *d = '.';
-          }
-          else
-            *d = '-';
-        }
-        else
-          *d = '.';
-
-        if(*s == '.')
-          dot_idx = idx;
-      }
-      else if(*s == '+' && s[1] == '+') {
-        if(idx - 2 == dot_idx) { /* .c++, .h++ etc. */
-          *d++ = 'x';
-          *d   = 'x';
-        }
-        else {
-          /* libg++ etc.  */
-          memcpy (d, "plus", 4);
-          d += 3;
-        }
-        s++;
-        idx++;
-      }
-      else
-        *d = '_';
-    }
-    else
-      *d = *s;
-    if(*s == '/') {
-      idx = 0;
-      dot_idx = -1;
-    }
-    else
-      idx++;
-  }
-
-  *d = '\0';
-  return dos_name;
-}
-
-static char *
-rename_if_dos_device_name (char *file_name)
-{
-  /* We could have a file whose name is a device on MS-DOS.  Trying to
-   * retrieve such a file would fail at best and wedge us at worst.  We need
-   * to rename such files. */
-  char *base;
-  struct_stat st_buf;
-  char fname[PATH_MAX];
-
-  strncpy(fname, file_name, PATH_MAX-1);
-  fname[PATH_MAX-1] = 0;
-  base = basename(fname);
-  if(((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
-    size_t blen = strlen (base);
-
-    if(strlen(fname) >= PATH_MAX-1) {
-      /* Make room for the '_' */
-      blen--;
-      base[blen] = 0;
-    }
-    /* Prepend a '_'.  */
-    memmove (base + 1, base, blen + 1);
-    base[0] = '_';
-    strcpy (file_name, fname);
-  }
-  return file_name;
-}
-
-/* Replace bad characters in the file name before using it.
- * fn will always be freed before return
- * The returned pointer must be freed by the caller if not NULL
- */
-static char *sanitize_dos_name(char *fn)
-{
-  char tmpfn[PATH_MAX];
-  if(strlen(fn) >= PATH_MAX)
-    fn[PATH_MAX-1]=0; /* truncate it */
-  strcpy(tmpfn, msdosify(fn));
-  free(fn);
-  return strdup(rename_if_dos_device_name(tmpfn));
-}
-#endif /* MSDOS || WIN32 */
index dc98481..7b9b1c0 100644 (file)
@@ -14,18 +14,16 @@ MANPAGE =   ../docs/curl.1
 README =       ../docs/MANUAL
 MKHELP =       ../src/mkhelp.pl
 
-top_srcdir = ..
-
 include Makefile.inc
 
 OBJS = $(CURL_CFILES:.c=.o) $(CURLX_ONES:.c=.o)
 
-all:   hugehelp.c $(OBJS)
+all:   tool_hugehelp.c $(OBJS)
        $(CC) $(CFLAGS) -o cURL $(OBJS) $(LIBS) -Wl,-Map,cURL.map,--cref
 
-hugehelp.c: $(README) $(MANPAGE)  mkhelp.pl
-       rm -f hugehelp.c
-       /bin/nroff -man $(MANPAGE) | /bin/perl $(MKHELP) -c $(README) > hugehelp.c
+tool_hugehelp.c: $(README) $(MANPAGE)  mkhelp.pl
+       rm -f tool_hugehelp.c
+       /bin/nroff -man $(MANPAGE) | /bin/perl $(MKHELP) -c $(README) > tool_hugehelp.c
 
 install:
        $(INSTALL) -c cURL /c/cURL
index 4992908..d342859 100644 (file)
@@ -1,12 +1,10 @@
 #
-#
 #  Adapted for djgpp2 / Watt-32 / DOS by
-#  Gisle Vanem <giva@bgnett.no>
+#  Gisle Vanem <gvanem@broadpark.no>
 #
 
-DEPEND_PREREQ = curl_config.h hugehelp.c
+DEPEND_PREREQ = # tool_hugehelp.c
 
-top_srcdir = ..
 TOPDIR = ..
 
 include ../packages/DOS/common.dj
@@ -38,31 +36,23 @@ CFLAGS += -DUSE_ENVIRONMENT
 PROGRAM  = curl.exe
 OBJECTS += $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
 
-all: $(OBJ_DIR) curl_config.h $(PROGRAM)
+all: $(OBJ_DIR) $(PROGRAM)
        @echo Welcome to cURL
 
 $(PROGRAM): $(OBJECTS) ../lib/libcurl.a
        $(CC) -o $@ $^ $(LDFLAGS) $(EX_LIBS)
 
-curl_config.h:
-ifeq ($(IS_UNIX_SHELL),1)
-       @echo '#include "../lib/config-dos.h"' > $@
-else
-       @echo #include "../lib/config-dos.h" > $@
-endif
-
 #
 # groff 1.18+ requires "-P -c"
 #
-hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
+tool_hugehelp.c: ../docs/MANUAL ../docs/curl.1 mkhelp.pl
        groff -Tascii -man ../docs/curl.1 | \
        perl -w mkhelp.pl ../docs/MANUAL > $@
 
 # clean generated files
 #
 genclean:
-       - $(DELETE) curl_config.h
-       - $(DELETE) hugehelp.c
+       - $(DELETE) tool_hugehelp.c
 
 # clean object files and subdir
 #
index 03c884f..444b669 100644 (file)
@@ -1,4 +1,25 @@
 #!/usr/local/bin/perl
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 
 # Yeah, I know, probably 1000 other persons already wrote a script like
 # this, but I'll tell ya:
@@ -40,7 +61,7 @@ while (<STDIN>) {
     }
 
     my $text = $line;
-    $text =~ s/^\s+//g; # cut off preceeding...
+    $text =~ s/^\s+//g; # cut off preceding...
     $text =~ s/\s+$//g; # and trailing whitespaces
 
     $tlen = length($text);
@@ -112,16 +133,14 @@ print <<HEAD
  * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
  * Generation time: $now
  */
-#include "setup.h"
 #ifdef USE_MANUAL
-#include "hugehelp.h"
-#include <stdio.h>
+#include "tool_hugehelp.h"
 HEAD
     ;
 if($c) {
     print <<HEAD
-#include <stdlib.h>
 #include <zlib.h>
+#include "memdebug.h" /* keep this as LAST include */
 static const unsigned char hugehelpgz[] = {
   /* This mumbo-jumbo is the huge help text compressed with gzip.
      Thanks to this operation, the size of this data shrunk from $gzip
@@ -146,6 +165,17 @@ HEAD
 
     print <<EOF
 #define BUF_SIZE 0x10000
+static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
+{
+  (void) opaque;
+  /* not a typo, keep it calloc() */
+  return (voidpf) calloc(items, size);
+}
+static void zfree_func(voidpf opaque, voidpf ptr)
+{
+  (void) opaque;
+  free(ptr);
+}
 /* Decompress and send to stdout a gzip-compressed buffer */
 void hugehelp(void)
 {
@@ -158,11 +188,11 @@ void hugehelp(void)
     return;
 
   headerlen = 10;
+  memset(&z, 0, sizeof(z_stream));
+  z.zalloc = (alloc_func)zalloc_func;
+  z.zfree = (free_func)zfree_func;
   z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
   z.next_in = (unsigned char *)hugehelpgz + headerlen;
-  z.zalloc = (alloc_func)Z_NULL;
-  z.zfree = (free_func)Z_NULL;
-  z.opaque = 0;
 
   if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
     return;
diff --git a/src/setup.h b/src/setup.h
deleted file mode 100644 (file)
index 0d2a99f..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef HEADER_CURL_SRC_SETUP_H
-#define HEADER_CURL_SRC_SETUP_H
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2010, 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.
- *
- ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-/*
- * Define WIN32 when build target is Win32 API
- */
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
-#define WIN32
-#endif
-
-/*
- * Include configuration script results or hand-crafted
- * configuration file for platforms which lack config tool.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "curl_config.h"
-#else
-
-#ifdef WIN32
-#include "config-win32.h"
-#endif
-
-#if defined(macintosh) && defined(__MRC__)
-#  include "config-mac.h"
-#endif
-
-#ifdef __riscos__
-#include "config-riscos.h"
-#endif
-
-#ifdef __AMIGA__
-#include "config-amigaos.h"
-#endif
-
-#ifdef __SYMBIAN32__
-#include "config-symbian.h"
-#endif
-
-#ifdef TPF
-#include "config-tpf.h"
-#endif
-
-#endif /* HAVE_CONFIG_H */
-
-/*
- * AIX 4.3 and newer needs _THREAD_SAFE defined to build
- * proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_THREAD_SAFE
-#  ifndef _THREAD_SAFE
-#    define _THREAD_SAFE
-#  endif
-#endif
-
-/*
- * Tru64 needs _REENTRANT set for a few function prototypes and
- * things to appear in the system header files. Unixware needs it
- * to build proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_REENTRANT
-#  ifndef _REENTRANT
-#    define _REENTRANT
-#  endif
-#endif
-
-/*
- * Include header files for windows builds before redefining anything.
- * Use this preproessor block only to include or exclude windows.h,
- * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independent block.  Under Cygwin things work
- * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
- * never be included when __CYGWIN__ is defined.  configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
- * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
- */
-
-#ifdef HAVE_WINDOWS_H
-#  ifndef WIN32_LEAN_AND_MEAN
-#    define WIN32_LEAN_AND_MEAN
-#  endif
-#  include <windows.h>
-#  ifdef HAVE_WINSOCK2_H
-#    include <winsock2.h>
-#    ifdef HAVE_WS2TCPIP_H
-#       include <ws2tcpip.h>
-#    endif
-#  else
-#    ifdef HAVE_WINSOCK_H
-#      include <winsock.h>
-#    endif
-#  endif
-#endif
-
-/*
- * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * define USE_WINSOCK to 1 if we have and use WINSOCK  API, else
- * undefine USE_WINSOCK.
- */
-
-#undef USE_WINSOCK
-
-#ifdef HAVE_WINSOCK2_H
-#  define USE_WINSOCK 2
-#else
-#  ifdef HAVE_WINSOCK_H
-#    define USE_WINSOCK 1
-#  endif
-#endif
-
-#ifdef TPF
-#  include <sys/socket.h>
-   /* change which select is used for the curl command line tool */
-#  define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
-   /* and turn off the progress meter */
-#  define CONF_DEFAULT (0|CONF_NOPROGRESS)
-#endif
-
-#include <stdio.h>
-
-#ifdef __TANDEM
-#include <floss.h>
-#endif
-
-
-#ifndef OS
-#define OS "unknown"
-#endif
-
-#if !defined(fileno) && !defined(WIN32) /* sunos 4 have this as a macro! */
-int fileno( FILE *stream);
-#endif
-
-#ifdef WIN32
-#define DIR_CHAR      "\\"
-#define DOT_CHAR      "_"
-#else
-#ifdef __EMX__
-/* 20000318 mgs
- * OS/2 supports leading dots in filenames if the volume is formatted
- * with JFS or HPFS. */
-#define DIR_CHAR      "\\"
-#define DOT_CHAR      "."
-#else
-
-#ifdef DJGPP
-#include <tcp.h>
-#ifdef word
-#undef word
-#endif
-#define DIR_CHAR      "/"
-#define DOT_CHAR      "_"
-#else
-
-#define DIR_CHAR      "/"
-#define DOT_CHAR      "."
-
-#endif /* !DJGPP */
-#endif /* !__EMX__ */
-#endif /* !WIN32 */
-
-#ifdef __riscos__
-#define USE_ENVIRONMENT
-#endif
-
-#ifdef __BEOS__
-#define typedef_bool
-#endif
-
-#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
-#include <sys/timeval.h>
-#endif
-
-#ifndef UNPRINTABLE_CHAR
-/* define what to use for unprintable characters */
-#define UNPRINTABLE_CHAR '.'
-#endif
-
-#ifndef HAVE_STRDUP
-#include "strdup.h"
-#define strdup(ptr) curlx_strdup(ptr)
-#endif
-
-/* Define S_ISREG if not defined by system headers, f.e. MSVC */
-#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-/*
- * Include macros and defines that should only be processed once.
- */
-
-#ifndef __SETUP_ONCE_H
-#include "setup_once.h"
-#endif
-
-#endif /* HEADER_CURL_SRC_SETUP_H */
diff --git a/src/tool_binmode.c b/src/tool_binmode.c
new file mode 100644 (file)
index 0000000..92033ac
--- /dev/null
@@ -0,0 +1,52 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef HAVE_SETMODE
+
+#ifdef HAVE_IO_H
+#  include <io.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+#  include <fcntl.h>
+#endif
+
+#include "tool_binmode.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void set_binmode(FILE *stream)
+{
+#ifdef O_BINARY
+#  ifdef __HIGHC__
+  _setmode(stream, O_BINARY);
+#  else
+  setmode(fileno(stream), O_BINARY);
+#  endif
+#else
+  (void)stream;
+#endif
+}
+
+#endif /* HAVE_SETMODE */
+
diff --git a/src/tool_binmode.h b/src/tool_binmode.h
new file mode 100644 (file)
index 0000000..b5cb08d
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef HEADER_CURL_TOOL_BINMODE_H
+#define HEADER_CURL_TOOL_BINMODE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef HAVE_SETMODE
+
+void set_binmode(FILE *stream);
+
+#else
+
+#define set_binmode(x) Curl_nop_stmt
+
+#endif /* HAVE_SETMODE */
+
+#endif /* HEADER_CURL_TOOL_BINMODE_H */
+
diff --git a/src/tool_bname.c b/src/tool_bname.c
new file mode 100644 (file)
index 0000000..2778305
--- /dev/null
@@ -0,0 +1,50 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "tool_bname.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifndef HAVE_BASENAME
+
+char *tool_basename(char *path)
+{
+  char *s1;
+  char *s2;
+
+  s1 = strrchr(path, '/');
+  s2 = strrchr(path, '\\');
+
+  if(s1 && s2) {
+    path = (s1 > s2) ? s1 + 1 : s2 + 1;
+  }
+  else if(s1)
+    path = s1 + 1;
+  else if(s2)
+    path = s2 + 1;
+
+  return path;
+}
+
+#endif /* HAVE_BASENAME */
+
diff --git a/src/tool_bname.h b/src/tool_bname.h
new file mode 100644 (file)
index 0000000..69cf92c
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_BNAME_H
+#define HEADER_CURL_TOOL_BNAME_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifndef HAVE_BASENAME
+
+char *tool_basename(char *path);
+
+#define basename(x) tool_basename((x))
+
+#endif /* HAVE_BASENAME */
+
+#endif /* HEADER_CURL_TOOL_BNAME_H */
+
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
new file mode 100644 (file)
index 0000000..1850ba0
--- /dev/null
@@ -0,0 +1,275 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_dbg.h"
+#include "tool_util.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static void dump(const char *timebuf, const char *text,
+                 FILE *stream, const unsigned char *ptr, size_t size,
+                 trace tracetype, curl_infotype infotype);
+
+/*
+** callback for CURLOPT_DEBUGFUNCTION
+*/
+
+int tool_debug_cb(CURL *handle, curl_infotype type,
+                  unsigned char *data, size_t size,
+                  void *userdata)
+{
+  struct Configurable *config = userdata;
+  FILE *output = config->errors;
+  const char *text;
+  struct timeval tv;
+  struct tm *now;
+  char timebuf[20];
+  time_t secs;
+  static time_t epoch_offset;
+  static int    known_offset;
+
+  (void)handle; /* not used */
+
+  if(config->tracetime) {
+    tv = tvnow();
+    if(!known_offset) {
+      epoch_offset = time(NULL) - tv.tv_sec;
+      known_offset = 1;
+    }
+    secs = epoch_offset + tv.tv_sec;
+    now = localtime(&secs);  /* not thread safe but we don't care */
+    snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
+             now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+  }
+  else
+    timebuf[0] = 0;
+
+  if(!config->trace_stream) {
+    /* open for append */
+    if(curlx_strequal("-", config->trace_dump))
+      config->trace_stream = stdout;
+    else if(curlx_strequal("%", config->trace_dump))
+      /* Ok, this is somewhat hackish but we do it undocumented for now */
+      config->trace_stream = config->errors;  /* aka stderr */
+    else {
+      config->trace_stream = fopen(config->trace_dump, "w");
+      config->trace_fopened = TRUE;
+    }
+  }
+
+  if(config->trace_stream)
+    output = config->trace_stream;
+
+  if(!output) {
+    warnf(config, "Failed to create/open output");
+    return 0;
+  }
+
+  if(config->tracetype == TRACE_PLAIN) {
+    /*
+     * This is the trace look that is similar to what libcurl makes on its
+     * own.
+     */
+    static const char * const s_infotype[] = {
+      "*", "<", ">", "{", "}", "{", "}"
+    };
+    size_t i;
+    size_t st = 0;
+    static bool newl = FALSE;
+    static bool traced_data = FALSE;
+
+    switch(type) {
+    case CURLINFO_HEADER_OUT:
+      if(size > 0) {
+        for(i = 0; i < size - 1; i++) {
+          if(data[i] == '\n') { /* LF */
+            if(!newl) {
+              fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+            }
+            (void)fwrite(data + st, i - st + 1, 1, output);
+            st = i + 1;
+            newl = FALSE;
+          }
+        }
+        if(!newl)
+          fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+        (void)fwrite(data + st, i - st + 1, 1, output);
+      }
+      newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
+      traced_data = FALSE;
+      break;
+    case CURLINFO_TEXT:
+    case CURLINFO_HEADER_IN:
+      if(!newl)
+        fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+      (void)fwrite(data, size, 1, output);
+      newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
+      traced_data = FALSE;
+      break;
+    case CURLINFO_DATA_OUT:
+    case CURLINFO_DATA_IN:
+    case CURLINFO_SSL_DATA_IN:
+    case CURLINFO_SSL_DATA_OUT:
+      if(!traced_data) {
+        /* if the data is output to a tty and we're sending this debug trace
+           to stderr or stdout, we don't display the alert about the data not
+           being shown as the data _is_ shown then just not via this
+           function */
+        if(!config->isatty ||
+           ((output != stderr) && (output != stdout))) {
+          if(!newl)
+            fprintf(output, "%s%s ", timebuf, s_infotype[type]);
+          fprintf(output, "[data not shown]\n");
+          newl = FALSE;
+          traced_data = TRUE;
+        }
+      }
+      break;
+    default: /* nada */
+      newl = FALSE;
+      traced_data = FALSE;
+      break;
+    }
+
+    return 0;
+  }
+
+#ifdef CURL_DOES_CONVERSIONS
+  /* Special processing is needed for CURLINFO_HEADER_OUT blocks
+   * if they contain both headers and data (separated by CRLFCRLF).
+   * We dump the header text and then switch type to CURLINFO_DATA_OUT.
+   */
+  if((type == CURLINFO_HEADER_OUT) && (size > 4)) {
+    size_t i;
+    for(i = 0; i < size - 4; i++) {
+      if(memcmp(&data[i], "\r\n\r\n", 4) == 0) {
+        /* dump everything through the CRLFCRLF as a sent header */
+        text = "=> Send header";
+        dump(timebuf, text, output, data, i + 4, config->tracetype, type);
+        data += i + 3;
+        size -= i + 4;
+        type = CURLINFO_DATA_OUT;
+        data += 1;
+        break;
+      }
+    }
+  }
+#endif /* CURL_DOES_CONVERSIONS */
+
+  switch (type) {
+  case CURLINFO_TEXT:
+    fprintf(output, "%s== Info: %s", timebuf, data);
+  default: /* in case a new one is introduced to shock us */
+    return 0;
+
+  case CURLINFO_HEADER_OUT:
+    text = "=> Send header";
+    break;
+  case CURLINFO_DATA_OUT:
+    text = "=> Send data";
+    break;
+  case CURLINFO_HEADER_IN:
+    text = "<= Recv header";
+    break;
+  case CURLINFO_DATA_IN:
+    text = "<= Recv data";
+    break;
+  case CURLINFO_SSL_DATA_IN:
+    text = "<= Recv SSL data";
+    break;
+  case CURLINFO_SSL_DATA_OUT:
+    text = "=> Send SSL data";
+    break;
+  }
+
+  dump(timebuf, text, output, data, size, config->tracetype, type);
+  return 0;
+}
+
+static void dump(const char *timebuf, const char *text,
+                 FILE *stream, const unsigned char *ptr, size_t size,
+                 trace tracetype, curl_infotype infotype)
+{
+  size_t i;
+  size_t c;
+
+  unsigned int width = 0x10;
+
+  if(tracetype == TRACE_ASCII)
+    /* without the hex output, we can fit more on screen */
+    width = 0x40;
+
+  fprintf(stream, "%s%s, %zd bytes (0x%zx)\n", timebuf, text, size, size);
+
+  for(i = 0; i < size; i += width) {
+
+    fprintf(stream, "%04zx: ", i);
+
+    if(tracetype == TRACE_BIN) {
+      /* hex not disabled, show it */
+      for(c = 0; c < width; c++)
+        if(i+c < size)
+          fprintf(stream, "%02x ", ptr[i+c]);
+        else
+          fputs("   ", stream);
+    }
+
+    for(c = 0; (c < width) && (i+c < size); c++) {
+      /* check for 0D0A; if found, skip past and start a new line of output */
+      if((tracetype == TRACE_ASCII) &&
+         (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) {
+        i += (c+2-width);
+        break;
+      }
+#ifdef CURL_DOES_CONVERSIONS
+      /* repeat the 0D0A check above but use the host encoding for CRLF */
+      if((tracetype == TRACE_ASCII) &&
+         (i+c+1 < size) && (ptr[i+c] == '\r') && (ptr[i+c+1] == '\n')) {
+        i += (c+2-width);
+        break;
+      }
+      /* convert to host encoding and print this character */
+      fprintf(stream, "%c", convert_char(infotype, ptr[i+c]));
+#else
+      (void)infotype;
+      fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ?
+              ptr[i+c] : UNPRINTABLE_CHAR);
+#endif /* CURL_DOES_CONVERSIONS */
+      /* check again for 0D0A, to avoid an extra \n if it's at width */
+      if((tracetype == TRACE_ASCII) &&
+         (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) {
+        i += (c+3-width);
+        break;
+      }
+    }
+    fputc('\n', stream); /* newline */
+  }
+  fflush(stream);
+}
+
diff --git a/src/tool_cb_dbg.h b/src/tool_cb_dbg.h
new file mode 100644 (file)
index 0000000..d0ed7b0
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_CB_DBG_H
+#define HEADER_CURL_TOOL_CB_DBG_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/*
+** callback for CURLOPT_DEBUGFUNCTION
+*/
+
+int tool_debug_cb(CURL *handle, curl_infotype type,
+                  unsigned char *data, size_t size,
+                  void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_DBG_H */
+
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
new file mode 100644 (file)
index 0000000..ef340f7
--- /dev/null
@@ -0,0 +1,225 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_hdr.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static char *parse_filename(const char *ptr, size_t len);
+
+/*
+** callback for CURLOPT_HEADERFUNCTION
+*/
+
+size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+  struct HdrCbData *hdrcbdata = userdata;
+  struct OutStruct *outs = hdrcbdata->outs;
+  struct OutStruct *heads = hdrcbdata->heads;
+  const char *str = ptr;
+  const size_t cb = size * nmemb;
+  const char *end = (char*)ptr + cb;
+
+  /*
+   * Once that libcurl has called back tool_header_cb() the returned value
+   * is checked against the amount that was intended to be written, if
+   * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+   * point returning a value different from sz*nmemb indicates failure.
+   */
+  size_t failure = (size * nmemb) ? 0 : 1;
+
+  if(!heads->config)
+    return failure;
+
+#ifdef DEBUGBUILD
+  if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
+    warnf(heads->config, "Header data exceeds single call write limit!\n");
+    return failure;
+  }
+#endif
+
+  /*
+   * Write header data when curl option --dump-header (-D) is given.
+   */
+
+  if(heads->config->headerfile && heads->stream) {
+    size_t rc = fwrite(ptr, size, nmemb, heads->stream);
+    if(rc != cb)
+      return rc;
+  }
+
+  /*
+   * This callback sets the filename where output shall be written when
+   * curl options --remote-name (-O) and --remote-header-name (-J) have
+   * been simultaneously given and additionally server returns an HTTP
+   * Content-Disposition header specifying a filename property.
+   */
+
+  if(hdrcbdata->honor_cd_filename &&
+     (cb > 20) && checkprefix("Content-disposition:", str)) {
+    const char *p = str + 20;
+
+    /* look for the 'filename=' parameter
+       (encoded filenames (*=) are not supported) */
+    for(;;) {
+      char *filename;
+      size_t len;
+
+      while(*p && (p < end) && !ISALPHA(*p))
+        p++;
+      if(p > end - 9)
+        break;
+
+      if(memcmp(p, "filename=", 9)) {
+        /* no match, find next parameter */
+        while((p < end) && (*p != ';'))
+          p++;
+        continue;
+      }
+      p += 9;
+
+      /* this expression below typecasts 'cb' only to avoid
+         warning: signed and unsigned type in conditional expression
+      */
+      len = (ssize_t)cb - (p - str);
+      filename = parse_filename(p, len);
+      if(filename) {
+        outs->filename = filename;
+        outs->alloc_filename = TRUE;
+        outs->is_cd_filename = TRUE;
+        outs->s_isreg = TRUE;
+        outs->fopened = FALSE;
+        outs->stream = NULL;
+        hdrcbdata->honor_cd_filename = FALSE;
+        break;
+      }
+      else
+        return failure;
+    }
+  }
+
+  return cb;
+}
+
+/*
+ * Copies a file name part and returns an ALLOCATED data buffer.
+ */
+static char *parse_filename(const char *ptr, size_t len)
+{
+  char *copy;
+  char *p;
+  char *q;
+  char  stop = '\0';
+
+  /* simple implementation of strndup() */
+  copy = malloc(len+1);
+  if(!copy)
+    return NULL;
+  memcpy(copy, ptr, len);
+  copy[len] = '\0';
+
+  p = copy;
+  if(*p == '\'' || *p == '"') {
+    /* store the starting quote */
+    stop = *p;
+    p++;
+  }
+  else
+    stop = ';';
+
+  /* if the filename contains a path, only use filename portion */
+  q = strrchr(copy, '/');
+  if(q) {
+    p = q + 1;
+    if(!*p) {
+      Curl_safefree(copy);
+      return NULL;
+    }
+  }
+
+  /* If the filename contains a backslash, only use filename portion. The idea
+     is that even systems that don't handle backslashes as path separators
+     probably want the path removed for convenience. */
+  q = strrchr(p, '\\');
+  if(q) {
+    p = q + 1;
+    if(!*p) {
+      Curl_safefree(copy);
+      return NULL;
+    }
+  }
+
+  /* scan for the end letter and stop there */
+  q = p;
+  while(*q) {
+    if(q[1] && (q[0] == '\\'))
+      q++;
+    else if(q[0] == stop)
+      break;
+    q++;
+  }
+  *q = '\0';
+
+  /* make sure the file name doesn't end in \r or \n */
+  q = strchr(p, '\r');
+  if(q)
+    *q = '\0';
+
+  q = strchr(p, '\n');
+  if(q)
+    *q = '\0';
+
+  if(copy != p)
+    memmove(copy, p, strlen(p) + 1);
+
+  /* in case we built debug enabled, we allow an evironment variable
+   * named CURL_TESTDIR to prefix the given file name to put it into a
+   * specific directory
+   */
+#ifdef DEBUGBUILD
+  {
+    char *tdir = curlx_getenv("CURL_TESTDIR");
+    if(tdir) {
+      char buffer[512]; /* suitably large */
+      snprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy);
+      Curl_safefree(copy);
+      copy = strdup(buffer); /* clone the buffer, we don't use the libcurl
+                                aprintf() or similar since we want to use the
+                                same memory code as the "real" parse_filename
+                                function */
+      curl_free(tdir);
+    }
+  }
+#endif
+
+  return copy;
+}
+
diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h
new file mode 100644 (file)
index 0000000..bd50431
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef HEADER_CURL_TOOL_CB_HDR_H
+#define HEADER_CURL_TOOL_CB_HDR_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/*
+ * curl operates using a single HdrCbData struct variable, a
+ * pointer to this is passed as userdata pointer to tool_header_cb.
+ *
+ * 'outs' member is a pointer to the OutStruct variable used to keep
+ * track of information relative to curl's output writing.
+ *
+ * 'heads' member is a pointer to the OutStruct variable used to keep
+ * track of information relative to header response writing.
+ *
+ * 'honor_cd_filename' member is TRUE when tool_header_cb is allowed
+ * to honor Content-Disposition filename property and accordingly
+ * set 'outs' filename, otherwise FALSE;
+ */
+
+struct HdrCbData {
+  struct OutStruct *outs;
+  struct OutStruct *heads;
+  bool honor_cd_filename;
+};
+
+/*
+** callback for CURLOPT_HEADERFUNCTION
+*/
+
+size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_HDR_H */
+
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
new file mode 100644 (file)
index 0000000..b049377
--- /dev/null
@@ -0,0 +1,150 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_prg.h"
+#include "tool_util.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** callback for CURLOPT_PROGRESSFUNCTION
+*/
+
+#define MAX_BARLENGTH 256
+
+int tool_progress_cb(void *clientp,
+                     double dltotal, double dlnow,
+                     double ultotal, double ulnow)
+{
+  /* The original progress-bar source code was written for curl by Lars Aas,
+     and this new edition inherits some of his concepts. */
+
+  char line[MAX_BARLENGTH+1];
+  char format[40];
+  double frac;
+  double percent;
+  int barwidth;
+  int num;
+  struct timeval now = tvnow();
+  struct ProgressData *bar = (struct ProgressData *)clientp;
+  curl_off_t total;
+  curl_off_t point;
+
+  if(bar->calls && (tvdiff(now, bar->prevtime) < 200L))
+    /* after first call, limit progress-bar updating to 5 Hz */
+    return 0;
+
+  /* expected transfer size */
+  total = (curl_off_t)dltotal + (curl_off_t)ultotal + bar->initial_size;
+
+  /* we've come this far */
+  point = (curl_off_t)dlnow + (curl_off_t)ulnow + bar->initial_size;
+
+  if(point > total)
+    /* we have got more than the expected total! */
+    total = point;
+
+  /* simply count invokes */
+  bar->calls++;
+
+  if(total < 1) {
+    curl_off_t prevblock = bar->prev / 1024;
+    curl_off_t thisblock = point / 1024;
+    while(thisblock > prevblock) {
+      fprintf(bar->out, "#");
+      prevblock++;
+    }
+  }
+  else if(point != bar->prev) {
+    frac = (double)point / (double)total;
+    percent = frac * 100.0f;
+    barwidth = bar->width - 7;
+    num = (int) (((double)barwidth) * frac);
+    if(num > MAX_BARLENGTH)
+      num = MAX_BARLENGTH;
+    memset(line, '#', num);
+    line[num] = '\0';
+    snprintf(format, sizeof(format), "\r%%-%ds %%5.1f%%%%", barwidth);
+    fprintf(bar->out, format, line, percent);
+  }
+  fflush(bar->out);
+  bar->prev = point;
+  bar->prevtime = now;
+
+  return 0;
+}
+
+void progressbarinit(struct ProgressData *bar,
+                     struct Configurable *config)
+{
+#ifdef __EMX__
+  /* 20000318 mgs */
+  int scr_size[2];
+#endif
+  char *colp;
+
+  memset(bar, 0, sizeof(struct ProgressData));
+
+  /* pass this through to progress function so
+   * it can display progress towards total file
+   * not just the part that's left. (21-may-03, dbyron) */
+  if(config->use_resume)
+    bar->initial_size = config->resume_from;
+
+/* TODO: get terminal width through ansi escapes or something similar.
+   try to update width when xterm is resized... - 19990617 larsa */
+#ifndef __EMX__
+  /* 20000318 mgs
+   * OS/2 users most likely won't have this env var set, and besides that
+   * we're using our own way to determine screen width */
+  colp = curlx_getenv("COLUMNS");
+  if(colp) {
+    char *endptr;
+    long num = strtol(colp, &endptr, 10);
+    if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 0))
+      bar->width = (int)num;
+    else
+      bar->width = 79;
+    curl_free(colp);
+  }
+  else
+    bar->width = 79;
+#else
+  /* 20000318 mgs
+   * We use this emx library call to get the screen width, and subtract
+   * one from what we got in order to avoid a problem with the cursor
+   * advancing to the next line if we print a string that is as long as
+   * the screen is wide. */
+
+  _scrsize(scr_size);
+  bar->width = scr_size[0] - 1;
+#endif
+
+  bar->out = config->errors;
+}
+
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h
new file mode 100644 (file)
index 0000000..a20645e
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef HEADER_CURL_TOOL_CB_PRG_H
+#define HEADER_CURL_TOOL_CB_PRG_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#define CURL_PROGRESS_STATS 0 /* default progress display */
+#define CURL_PROGRESS_BAR   1
+
+struct ProgressData {
+  int         calls;
+  curl_off_t  prev;
+  struct timeval prevtime;
+  int         width;
+  FILE       *out;  /* where to write everything to */
+  curl_off_t  initial_size;
+};
+
+void progressbarinit(struct ProgressData *bar,
+                     struct Configurable *config);
+
+/*
+** callback for CURLOPT_PROGRESSFUNCTION
+*/
+
+int tool_progress_cb(void *clientp,
+                     double dltotal, double dlnow,
+                     double ultotal, double ulnow);
+
+#endif /* HEADER_CURL_TOOL_CB_PRG_H */
+
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
new file mode 100644 (file)
index 0000000..4565a15
--- /dev/null
@@ -0,0 +1,55 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_rea.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** callback for CURLOPT_READFUNCTION
+*/
+
+size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+{
+  ssize_t rc;
+  struct InStruct *in = userdata;
+
+  rc = read(in->fd, buffer, sz*nmemb);
+  if(rc < 0) {
+    if(errno == EAGAIN) {
+      errno = 0;
+      in->config->readbusy = TRUE;
+      return CURL_READFUNC_PAUSE;
+    }
+    /* since size_t is unsigned we can't return negative values fine */
+    rc = 0;
+  }
+  in->config->readbusy = FALSE;
+  return (size_t)rc;
+}
+
diff --git a/src/tool_cb_rea.h b/src/tool_cb_rea.h
new file mode 100644 (file)
index 0000000..4294166
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef HEADER_CURL_TOOL_CB_REA_H
+#define HEADER_CURL_TOOL_CB_REA_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/*
+** callback for CURLOPT_READFUNCTION
+*/
+
+size_t tool_read_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_REA_H */
+
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
new file mode 100644 (file)
index 0000000..2f49e1d
--- /dev/null
@@ -0,0 +1,131 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_cb_see.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* OUR_MAX_SEEK_L has 'long' data type, OUR_MAX_SEEK_O has 'curl_off_t,
+   both represent the same value. Maximum offset used here when we lseek
+   using a 'long' data type offset */
+
+#define OUR_MAX_SEEK_L  2147483647L - 1L
+#define OUR_MAX_SEEK_O  CURL_OFF_T_C(0x7FFFFFFF) - CURL_OFF_T_C(0x1)
+
+/*
+** callback for CURLOPT_SEEKFUNCTION
+**
+** Notice that this is not supposed to return the resulting offset. This
+** shall only return CURL_SEEKFUNC_* return codes.
+*/
+
+int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
+{
+  struct InStruct *in = userdata;
+
+#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
+
+  /* The offset check following here is only interesting if curl_off_t is
+     larger than off_t and we are not using the WIN32 large file support
+     macros that provide the support to do 64bit seeks correctly */
+
+  if(offset > OUR_MAX_SEEK_O) {
+    /* Some precaution code to work around problems with different data sizes
+       to allow seeking >32bit even if off_t is 32bit. Should be very rare and
+       is really valid on weirdo-systems. */
+    curl_off_t left = offset;
+
+    if(whence != SEEK_SET)
+      /* this code path doesn't support other types */
+      return CURL_SEEKFUNC_FAIL;
+
+    if(LSEEK_ERROR == lseek(in->fd, 0, SEEK_SET))
+      /* couldn't rewind to beginning */
+      return CURL_SEEKFUNC_FAIL;
+
+    while(left) {
+      long step = (left > OUR_MAX_SEEK_O) ? OUR_MAX_SEEK_L : (long)left;
+      if(LSEEK_ERROR == lseek(in->fd, step, SEEK_CUR))
+        /* couldn't seek forwards the desired amount */
+        return CURL_SEEKFUNC_FAIL;
+      left -= step;
+    }
+    return CURL_SEEKFUNC_OK;
+  }
+#endif
+
+  if(LSEEK_ERROR == lseek(in->fd, offset, whence))
+    /* couldn't rewind, the reason is in errno but errno is just not portable
+       enough and we don't actually care that much why we failed. We'll let
+       libcurl know that it may try other means if it wants to. */
+    return CURL_SEEKFUNC_CANTSEEK;
+
+  return CURL_SEEKFUNC_OK;
+}
+
+#if defined(WIN32) && !defined(__MINGW64__)
+
+#ifdef __BORLANDC__
+/* 64-bit lseek-like function unavailable */
+#  define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
+#endif
+
+#ifdef __POCC__
+#  if(__POCC__ < 450)
+/* 64-bit lseek-like function unavailable */
+#    define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
+#  else
+#    define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
+#  endif
+#endif
+
+#ifdef _WIN32_WCE
+/* 64-bit lseek-like function unavailable */
+#  undef _lseeki64
+#  define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
+#  undef _get_osfhandle
+#  define _get_osfhandle(fd) (fd)
+#endif
+
+/*
+ * Truncate a file handle at a 64-bit position 'where'.
+ */
+
+int tool_ftruncate64(int fd, curl_off_t where)
+{
+  if(_lseeki64(fd, where, SEEK_SET) < 0)
+    return -1;
+
+  if(!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
+    return -1;
+
+  return 0;
+}
+
+#endif /* WIN32  && ! __MINGW64__ */
+
diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h
new file mode 100644 (file)
index 0000000..ceb22d6
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_TOOL_CB_SEE_H
+#define HEADER_CURL_TOOL_CB_SEE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#if defined(WIN32) && !defined(__MINGW64__)
+
+int tool_ftruncate64(int fd, curl_off_t where);
+
+#undef  ftruncate
+#define ftruncate(fd,where) tool_ftruncate64(fd,where)
+
+#ifndef HAVE_FTRUNCATE
+#  define HAVE_FTRUNCATE 1
+#endif
+
+#endif /* WIN32  && ! __MINGW64__ */
+
+/*
+** callback for CURLOPT_SEEKFUNCTION
+*/
+
+int tool_seek_cb(void *userdata, curl_off_t offset, int whence);
+
+#endif /* HEADER_CURL_TOOL_CB_SEE_H */
+
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
new file mode 100644 (file)
index 0000000..d668811
--- /dev/null
@@ -0,0 +1,152 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_cb_wrt.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** callback for CURLOPT_WRITEFUNCTION
+*/
+
+size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+{
+  size_t rc;
+  struct OutStruct *outs = userdata;
+  struct Configurable *config = outs->config;
+
+  /*
+   * Once that libcurl has called back tool_write_cb() the returned value
+   * is checked against the amount that was intended to be written, if
+   * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+   * point returning a value different from sz*nmemb indicates failure.
+   */
+  const size_t failure = (sz * nmemb) ? 0 : 1;
+
+  if(!config)
+    return failure;
+
+#ifdef DEBUGBUILD
+  if(config->include_headers) {
+    if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
+      warnf(config, "Header data size exceeds single call write limit!\n");
+      return failure;
+    }
+  }
+  else {
+    if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
+      warnf(config, "Data size exceeds single call write limit!\n");
+      return failure;
+    }
+  }
+
+  {
+    /* Some internal congruency checks on received OutStruct */
+    bool check_fails = FALSE;
+    if(outs->filename) {
+      /* regular file */
+      if(!*outs->filename)
+        check_fails = TRUE;
+      if(!outs->s_isreg)
+        check_fails = TRUE;
+      if(outs->fopened && !outs->stream)
+        check_fails = TRUE;
+      if(!outs->fopened && outs->stream)
+        check_fails = TRUE;
+      if(!outs->fopened && outs->bytes)
+        check_fails = TRUE;
+    }
+    else {
+      /* standard stream */
+      if(!outs->stream || outs->s_isreg || outs->fopened)
+        check_fails = TRUE;
+      if(outs->alloc_filename || outs->is_cd_filename || outs->init)
+        check_fails = TRUE;
+    }
+    if(check_fails) {
+      warnf(config, "Invalid output struct data for write callback\n");
+      return failure;
+    }
+  }
+#endif
+
+  if(!outs->stream) {
+    FILE *file;
+
+    if(!outs->filename || !*outs->filename) {
+      warnf(config, "Remote filename has no length!\n");
+      return failure;
+    }
+
+    if(outs->is_cd_filename) {
+      /* don't overwrite existing files */
+      file = fopen(outs->filename, "rb");
+      if(file) {
+        fclose(file);
+        warnf(config, "Refusing to overwrite %s: %s\n", outs->filename,
+              strerror(EEXIST));
+        return failure;
+      }
+    }
+
+    /* open file for writing */
+    file = fopen(outs->filename, "wb");
+    if(!file) {
+      warnf(config, "Failed to create the file %s: %s\n", outs->filename,
+            strerror(errno));
+      return failure;
+    }
+    outs->s_isreg = TRUE;
+    outs->fopened = TRUE;
+    outs->stream = file;
+    outs->bytes = 0;
+    outs->init = 0;
+  }
+
+  rc = fwrite(buffer, sz, nmemb, outs->stream);
+
+  if((sz * nmemb) == rc)
+    /* we added this amount of data to the output */
+    outs->bytes += (sz * nmemb);
+
+  if(config->readbusy) {
+    config->readbusy = FALSE;
+    curl_easy_pause(config->easy, CURLPAUSE_CONT);
+  }
+
+  if(config->nobuffer) {
+    /* output buffering disabled */
+    int res = fflush(outs->stream);
+    if(res)
+      return failure;
+  }
+
+  return rc;
+}
+
diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
new file mode 100644 (file)
index 0000000..380d8dd
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef HEADER_CURL_TOOL_CB_WRT_H
+#define HEADER_CURL_TOOL_CB_WRT_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/*
+** callback for CURLOPT_WRITEFUNCTION
+*/
+
+size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+
+#endif /* HEADER_CURL_TOOL_CB_WRT_H */
+
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
new file mode 100644 (file)
index 0000000..da11f4a
--- /dev/null
@@ -0,0 +1,128 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "tool_cfgable.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void free_config_fields(struct Configurable *config)
+{
+  struct getout *urlnode;
+
+  if(config->easy) {
+    curl_easy_cleanup(config->easy);
+    config->easy = NULL;
+  }
+
+  Curl_safefree(config->random_file);
+  Curl_safefree(config->egd_file);
+  Curl_safefree(config->useragent);
+  Curl_safefree(config->cookie);
+  Curl_safefree(config->cookiejar);
+  Curl_safefree(config->cookiefile);
+
+  Curl_safefree(config->postfields);
+  Curl_safefree(config->referer);
+
+  Curl_safefree(config->headerfile);
+  Curl_safefree(config->ftpport);
+  Curl_safefree(config->iface);
+
+  Curl_safefree(config->range);
+
+  Curl_safefree(config->userpwd);
+  Curl_safefree(config->tls_username);
+  Curl_safefree(config->tls_password);
+  Curl_safefree(config->tls_authtype);
+  Curl_safefree(config->proxyuserpwd);
+  Curl_safefree(config->proxy);
+
+  Curl_safefree(config->noproxy);
+
+  Curl_safefree(config->mail_from);
+  curl_slist_free_all(config->mail_rcpt);
+  Curl_safefree(config->mail_auth);
+
+  Curl_safefree(config->netrc_file);
+
+  urlnode = config->url_list;
+  while(urlnode) {
+    struct getout *next = urlnode->next;
+    Curl_safefree(urlnode->url);
+    Curl_safefree(urlnode->outfile);
+    Curl_safefree(urlnode->infile);
+    Curl_safefree(urlnode);
+    urlnode = next;
+  }
+  config->url_list = NULL;
+  config->url_last = NULL;
+  config->url_get = NULL;
+  config->url_out = NULL;
+
+  Curl_safefree(config->cipher_list);
+  Curl_safefree(config->cert);
+  Curl_safefree(config->cert_type);
+  Curl_safefree(config->cacert);
+  Curl_safefree(config->capath);
+  Curl_safefree(config->crlfile);
+  Curl_safefree(config->key);
+  Curl_safefree(config->key_type);
+  Curl_safefree(config->key_passwd);
+  Curl_safefree(config->pubkey);
+  Curl_safefree(config->hostpubmd5);
+  Curl_safefree(config->engine);
+
+  Curl_safefree(config->customrequest);
+  Curl_safefree(config->krblevel);
+  Curl_safefree(config->trace_dump);
+
+  config->trace_stream = NULL; /* closed elsewhere when appropriate */
+
+  Curl_safefree(config->writeout);
+
+  config->errors = NULL; /* closed elsewhere when appropriate */
+
+  curl_slist_free_all(config->quote);
+  curl_slist_free_all(config->postquote);
+  curl_slist_free_all(config->prequote);
+
+  curl_slist_free_all(config->headers);
+
+  if(config->httppost) {
+    curl_formfree(config->httppost);
+    config->httppost = NULL;
+  }
+  config->last_post = NULL;
+
+  curl_slist_free_all(config->telnet_options);
+  curl_slist_free_all(config->resolve);
+
+  Curl_safefree(config->socksproxy);
+  Curl_safefree(config->socks5_gssapi_service);
+
+  Curl_safefree(config->ftp_account);
+  Curl_safefree(config->ftp_alternative_to_user);
+
+  Curl_safefree(config->libcurl);
+}
+
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
new file mode 100644 (file)
index 0000000..9a9b6d8
--- /dev/null
@@ -0,0 +1,213 @@
+#ifndef HEADER_CURL_TOOL_CFGABLE_H
+#define HEADER_CURL_TOOL_CFGABLE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "tool_sdecls.h"
+
+#include "tool_metalink.h"
+
+struct Configurable {
+  CURL *easy;               /* once we have one, we keep it here */
+  bool remote_time;
+  char *random_file;
+  char *egd_file;
+  char *useragent;
+  char *cookie;             /* single line with specified cookies */
+  char *cookiejar;          /* write to this file */
+  char *cookiefile;         /* read from this file */
+  bool cookiesession;       /* new session? */
+  bool encoding;            /* Accept-Encoding please */
+  bool tr_encoding;         /* Transfer-Encoding please */
+  unsigned long authtype;   /* auth bitmask */
+  bool use_resume;
+  bool resume_from_current;
+  bool disable_epsv;
+  bool disable_eprt;
+  bool ftp_pret;
+  long proto;
+  bool proto_present;
+  long proto_redir;
+  bool proto_redir_present;
+  curl_off_t resume_from;
+  char *postfields;
+  curl_off_t postfieldsize;
+  char *referer;
+  double timeout;
+  double connecttimeout;
+  long maxredirs;
+  curl_off_t max_filesize;
+  char *headerfile;
+  char *ftpport;
+  char *iface;
+  int localport;
+  int localportrange;
+  unsigned short porttouse;
+  char *range;
+  long low_speed_limit;
+  long low_speed_time;
+  int showerror; /* -1 == unset, default => show errors
+                    0 => -s is used to NOT show errors
+                    1 => -S has been used to show errors */
+  char *userpwd;
+  char *tls_username;
+  char *tls_password;
+  char *tls_authtype;
+  char *proxyuserpwd;
+  char *proxy;
+  int proxyver;             /* set to CURLPROXY_HTTP* define */
+  char *noproxy;
+  char *mail_from;
+  struct curl_slist *mail_rcpt;
+  char *mail_auth;
+  bool sasl_ir;             /* Enable/disable SASL initial response */
+  bool proxytunnel;
+  bool ftp_append;          /* APPE on ftp */
+  bool mute;                /* don't show messages, --silent given */
+  bool use_ascii;           /* select ascii or text transfer */
+  bool autoreferer;         /* automatically set referer */
+  bool failonerror;         /* fail on (HTTP) errors */
+  bool include_headers;     /* send headers to data output */
+  bool no_body;             /* don't get the body */
+  bool dirlistonly;         /* only get the FTP dir list */
+  bool followlocation;      /* follow http redirects */
+  bool unrestricted_auth;   /* Continue to send authentication (user+password)
+                               when following ocations, even when hostname
+                               changed */
+  bool netrc_opt;
+  bool netrc;
+  char *netrc_file;
+  bool noprogress;          /* don't show progress meter, --silent given */
+  bool isatty;              /* updated internally only if output is a tty */
+  struct getout *url_list;  /* point to the first node */
+  struct getout *url_last;  /* point to the last/current node */
+  struct getout *url_get;   /* point to the node to fill in URL */
+  struct getout *url_out;   /* point to the node to fill in outfile */
+  char *cipher_list;
+  char *cert;
+  char *cert_type;
+  char *cacert;
+  char *capath;
+  char *crlfile;
+  char *key;
+  char *key_type;
+  char *key_passwd;
+  char *pubkey;
+  char *hostpubmd5;
+  char *engine;
+  bool list_engines;
+  bool crlf;
+  char *customrequest;
+  char *krblevel;
+  char *trace_dump;         /* file to dump the network trace to, or NULL */
+  FILE *trace_stream;
+  bool trace_fopened;
+  trace tracetype;
+  bool tracetime;           /* include timestamp? */
+  long httpversion;
+  int progressmode;         /* CURL_PROGRESS_BAR or CURL_PROGRESS_STATS */
+  bool nobuffer;
+  bool readbusy;            /* set when reading input returns EAGAIN */
+  bool globoff;
+  bool use_httpget;
+  bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
+  bool create_dirs;
+  bool ftp_create_dirs;
+  bool ftp_skip_ip;
+  bool proxynegotiate;
+  bool proxyntlm;
+  bool proxydigest;
+  bool proxybasic;
+  bool proxyanyauth;
+  char *writeout;           /* %-styled format string to output */
+  bool writeenv;            /* write results to environment, if available */
+  FILE *errors;             /* errors stream, defaults to stderr */
+  bool errors_fopened;      /* whether errors stream isn't stderr */
+  struct curl_slist *quote;
+  struct curl_slist *postquote;
+  struct curl_slist *prequote;
+  long ssl_version;
+  long ip_version;
+  curl_TimeCond timecond;
+  time_t condtime;
+  struct curl_slist *headers;
+  struct curl_httppost *httppost;
+  struct curl_httppost *last_post;
+  struct curl_slist *telnet_options;
+  struct curl_slist *resolve;
+  HttpReq httpreq;
+
+  /* for bandwidth limiting features: */
+  curl_off_t sendpersecond; /* send to peer */
+  curl_off_t recvpersecond; /* receive from peer */
+
+  bool ftp_ssl;
+  bool ftp_ssl_reqd;
+  bool ftp_ssl_control;
+  bool ftp_ssl_ccc;
+  int ftp_ssl_ccc_mode;
+
+  char *socksproxy;         /* set to server string */
+  int socksver;             /* set to CURLPROXY_SOCKS* define */
+  char *socks5_gssapi_service;  /* set service name for gssapi principal
+                                 * default rcmd */
+  int socks5_gssapi_nec ;   /* The NEC reference server does not protect
+                             * the encryption type exchange */
+
+  bool tcp_nodelay;
+  long req_retry;           /* number of retries */
+  long retry_delay;         /* delay between retries (in seconds) */
+  long retry_maxtime;       /* maximum time to keep retrying */
+
+  char *ftp_account;        /* for ACCT */
+  char *ftp_alternative_to_user;  /* send command if USER/PASS fails */
+  int ftp_filemethod;
+  long tftp_blksize;        /* TFTP BLKSIZE option */
+  bool ignorecl;            /* --ignore-content-length */
+  bool disable_sessionid;
+
+  char *libcurl;            /* output libcurl code to this file name */
+  bool raw;
+  bool post301;
+  bool post302;
+  bool post303;
+  bool nokeepalive;         /* for keepalive needs */
+  long alivetime;
+  bool content_disposition; /* use Content-disposition filename */
+
+  int default_node_flags;   /* default flags to search for each 'node', which
+                               is basically each given URL to transfer */
+
+  bool xattr;               /* store metadata in extended attributes */
+  long gssapi_delegation;
+  bool ssl_allow_beast;     /* allow this SSL vulnerability */
+
+  bool use_metalink;        /* process given URLs as metalink XML file */
+  metalinkfile *metalinkfile_list; /* point to the first node */
+  metalinkfile *metalinkfile_last; /* point to the last/current node */
+}; /* struct Configurable */
+
+void free_config_fields(struct Configurable *config);
+
+#endif /* HEADER_CURL_TOOL_CFGABLE_H */
+
diff --git a/src/tool_convert.c b/src/tool_convert.c
new file mode 100644 (file)
index 0000000..ecce036
--- /dev/null
@@ -0,0 +1,150 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#ifdef HAVE_ICONV
+#  include <iconv.h>
+#endif
+
+#include "tool_convert.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef HAVE_ICONV
+
+/* curl tool iconv conversion descriptors */
+static iconv_t inbound_cd  = (iconv_t)-1;
+static iconv_t outbound_cd = (iconv_t)-1;
+
+/* set default codesets for iconv */
+#ifndef CURL_ICONV_CODESET_OF_NETWORK
+#  define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+#endif
+
+/*
+ * convert_to_network() is a curl tool function to convert
+ * from the host encoding to ASCII on non-ASCII platforms.
+ */
+CURLcode convert_to_network(char *buffer, size_t length)
+{
+  /* translate from the host encoding to the network encoding */
+  char *input_ptr, *output_ptr;
+  size_t res, in_bytes, out_bytes;
+
+  /* open an iconv conversion descriptor if necessary */
+  if(outbound_cd == (iconv_t)-1) {
+    outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
+                             CURL_ICONV_CODESET_OF_HOST);
+    if(outbound_cd == (iconv_t)-1) {
+      return CURLE_CONV_FAILED;
+    }
+  }
+  /* call iconv */
+  input_ptr = output_ptr = buffer;
+  in_bytes = out_bytes = length;
+  res = iconv(outbound_cd, &input_ptr,  &in_bytes,
+              &output_ptr, &out_bytes);
+  if((res == (size_t)-1) || (in_bytes != 0)) {
+    return CURLE_CONV_FAILED;
+  }
+
+  return CURLE_OK;
+}
+
+/*
+ * convert_from_network() is a curl tool function
+ * for performing ASCII conversions on non-ASCII platforms.
+ */
+CURLcode convert_from_network(char *buffer, size_t length)
+{
+  /* translate from the network encoding to the host encoding */
+  char *input_ptr, *output_ptr;
+  size_t res, in_bytes, out_bytes;
+
+  /* open an iconv conversion descriptor if necessary */
+  if(inbound_cd == (iconv_t)-1) {
+    inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
+                            CURL_ICONV_CODESET_OF_NETWORK);
+    if(inbound_cd == (iconv_t)-1) {
+      return CURLE_CONV_FAILED;
+    }
+  }
+  /* call iconv */
+  input_ptr = output_ptr = buffer;
+  in_bytes = out_bytes = length;
+  res = iconv(inbound_cd, &input_ptr,  &in_bytes,
+              &output_ptr, &out_bytes);
+  if((res == (size_t)-1) || (in_bytes != 0)) {
+    return CURLE_CONV_FAILED;
+  }
+
+  return CURLE_OK;
+}
+
+void convert_cleanup(void)
+{
+  /* close iconv conversion descriptors */
+  if(inbound_cd != (iconv_t)-1)
+    (void)iconv_close(inbound_cd);
+  if(outbound_cd != (iconv_t)-1)
+    (void)iconv_close(outbound_cd);
+}
+
+#endif /* HAVE_ICONV */
+
+char convert_char(curl_infotype infotype, char this_char)
+{
+/* determine how this specific character should be displayed */
+  switch(infotype) {
+  case CURLINFO_DATA_IN:
+  case CURLINFO_DATA_OUT:
+  case CURLINFO_SSL_DATA_IN:
+  case CURLINFO_SSL_DATA_OUT:
+    /* data, treat as ASCII */
+    if((this_char >= 0x20) && (this_char < 0x7f)) {
+      /* printable ASCII hex value: convert to host encoding */
+      (void)convert_from_network(&this_char, 1);
+    }
+    else {
+      /* non-printable ASCII, use a replacement character */
+      return UNPRINTABLE_CHAR;
+    }
+    /* fall through to default */
+  default:
+    /* treat as host encoding */
+    if(ISPRINT(this_char)
+       &&  (this_char != '\t')
+       &&  (this_char != '\r')
+       &&  (this_char != '\n')) {
+      /* printable characters excluding tabs and line end characters */
+      return this_char;
+    }
+    break;
+  }
+  /* non-printable, use a replacement character  */
+  return UNPRINTABLE_CHAR;
+}
+
+#endif /* CURL_DOES_CONVERSIONS */
+
diff --git a/src/tool_convert.h b/src/tool_convert.h
new file mode 100644 (file)
index 0000000..32d473f
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef HEADER_CURL_TOOL_CONVERT_H
+#define HEADER_CURL_TOOL_CONVERT_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef CURL_DOES_CONVERSIONS
+
+#ifdef HAVE_ICONV
+
+CURLcode convert_to_network(char *buffer, size_t length);
+CURLcode convert_from_network(char *buffer, size_t length);
+void convert_cleanup(void);
+
+#endif /* HAVE_ICONV */
+
+char convert_char(curl_infotype infotype, char this_char);
+
+#endif /* CURL_DOES_CONVERSIONS */
+
+#if !defined(CURL_DOES_CONVERSIONS) || !defined(HAVE_ICONV)
+#define convert_cleanup() Curl_nop_stmt
+#endif
+
+#endif /* HEADER_CURL_TOOL_CONVERT_H */
+
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
new file mode 100644 (file)
index 0000000..5965f7a
--- /dev/null
@@ -0,0 +1,147 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include <sys/stat.h>
+
+#ifdef WIN32
+#  include <direct.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_dirhie.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef NETWARE
+#  ifndef __NOVELL_LIBC__
+#    define mkdir mkdir_510
+#  endif
+#endif
+
+#ifdef WIN32
+#  define mkdir(x,y) (mkdir)((x))
+#  ifndef __POCC__
+#    define F_OK 0
+#  endif
+#endif
+
+static void show_dir_errno(FILE *errors, const char *name)
+{
+  switch(ERRNO) {
+#ifdef EACCES
+  case EACCES:
+    fprintf(errors, "You don't have permission to create %s.\n", name);
+    break;
+#endif
+#ifdef ENAMETOOLONG
+  case ENAMETOOLONG:
+    fprintf(errors, "The directory name %s is too long.\n", name);
+    break;
+#endif
+#ifdef EROFS
+  case EROFS:
+    fprintf(errors, "%s resides on a read-only file system.\n", name);
+    break;
+#endif
+#ifdef ENOSPC
+  case ENOSPC:
+    fprintf(errors, "No space left on the file system that will "
+            "contain the directory %s.\n", name);
+    break;
+#endif
+#ifdef EDQUOT
+  case EDQUOT:
+    fprintf(errors, "Cannot create directory %s because you "
+            "exceeded your quota.\n", name);
+    break;
+#endif
+  default :
+    fprintf(errors, "Error creating directory %s.\n", name);
+    break;
+  }
+}
+
+/*
+ * Create the needed directory hierarchy recursively in order to save
+ *  multi-GETs in file output, ie:
+ *  curl "http://my.site/dir[1-5]/file[1-5].txt" -o "dir#1/file#2.txt"
+ *  should create all the dir* automagically
+ */
+
+CURLcode create_dir_hierarchy(const char *outfile, FILE *errors)
+{
+  char *tempdir;
+  char *tempdir2;
+  char *outdup;
+  char *dirbuildup;
+  CURLcode result = CURLE_OK;
+  size_t outlen;
+
+  outlen = strlen(outfile);
+  outdup = strdup(outfile);
+  if(!outdup)
+    return CURLE_OUT_OF_MEMORY;
+
+  dirbuildup = malloc(outlen + 1);
+  if(!dirbuildup) {
+    Curl_safefree(outdup);
+    return CURLE_OUT_OF_MEMORY;
+  }
+  dirbuildup[0] = '\0';
+
+  tempdir = strtok(outdup, DIR_CHAR);
+
+  while(tempdir != NULL) {
+    tempdir2 = strtok(NULL, DIR_CHAR);
+    /* since strtok returns a token for the last word even
+       if not ending with DIR_CHAR, we need to prune it */
+    if(tempdir2 != NULL) {
+      size_t dlen = strlen(dirbuildup);
+      if(dlen)
+        snprintf(&dirbuildup[dlen], outlen - dlen, "%s%s", DIR_CHAR, tempdir);
+      else {
+        if(0 != strncmp(outdup, DIR_CHAR, 1))
+          strcpy(dirbuildup, tempdir);
+        else
+          snprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
+      }
+      if(access(dirbuildup, F_OK) == -1) {
+        if(-1 == mkdir(dirbuildup,(mode_t)0000750)) {
+          show_dir_errno(errors, dirbuildup);
+          result = CURLE_WRITE_ERROR;
+          break; /* get out of loop */
+        }
+      }
+    }
+    tempdir = tempdir2;
+  }
+
+  Curl_safefree(dirbuildup);
+  Curl_safefree(outdup);
+
+  return result;
+}
+
diff --git a/src/tool_dirhie.h b/src/tool_dirhie.h
new file mode 100644 (file)
index 0000000..5f19575
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_DIRHIE_H
+#define HEADER_CURL_TOOL_DIRHIE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+CURLcode create_dir_hierarchy(const char *outfile, FILE *errors);
+
+#endif /* HEADER_CURL_TOOL_DIRHIE_H */
+
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
new file mode 100644 (file)
index 0000000..4fae91d
--- /dev/null
@@ -0,0 +1,299 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#if defined(MSDOS) || defined(WIN32)
+
+#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
+#  include <libgen.h>
+#endif
+
+#ifdef WIN32
+#  include "tool_cfgable.h"
+#  include "tool_libinfo.h"
+#endif
+
+#include "tool_bname.h"
+#include "tool_doswin.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+ * Macros ALWAYS_TRUE and ALWAYS_FALSE are used to avoid compiler warnings.
+ */
+
+#define ALWAYS_TRUE   (1)
+#define ALWAYS_FALSE  (0)
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+#  undef ALWAYS_TRUE
+#  undef ALWAYS_FALSE
+#  if (_MSC_VER < 1500)
+#    define ALWAYS_TRUE   (0, 1)
+#    define ALWAYS_FALSE  (1, 0)
+#  else
+#    define ALWAYS_TRUE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+(1) \
+__pragma(warning(pop))
+#    define ALWAYS_FALSE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+(0) \
+__pragma(warning(pop))
+#  endif
+#endif
+
+#ifdef WIN32
+#  undef  PATH_MAX
+#  define PATH_MAX MAX_PATH
+#endif
+
+#ifndef S_ISCHR
+#  ifdef S_IFCHR
+#    define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#  else
+#    define S_ISCHR(m) (0) /* cannot tell if file is a device */
+#  endif
+#endif
+
+#ifdef WIN32
+#  define _use_lfn(f) ALWAYS_TRUE   /* long file names always available */
+#elif !defined(__DJGPP__) || (__DJGPP__ < 2)  /* DJGPP 2.0 has _use_lfn() */
+#  define _use_lfn(f) ALWAYS_FALSE  /* long file names never available */
+#elif defined(__DJGPP__)
+#  include <fcntl.h>                /* _use_lfn(f) prototype */
+#endif
+
+static const char *msdosify (const char *file_name);
+static char *rename_if_dos_device_name (char *file_name);
+
+/*
+ * sanitize_dos_name: returns a newly allocated string holding a
+ * valid file name which will be a transformation of given argument
+ * in case this wasn't already a valid file name.
+ *
+ * This function takes ownership of given argument, free'ing it before
+ * returning. Caller is responsible of free'ing returned string. Upon
+ * out of memory condition function returns NULL.
+ */
+
+char *sanitize_dos_name(char *file_name)
+{
+  char new_name[PATH_MAX];
+
+  if(!file_name)
+    return NULL;
+
+  if(strlen(file_name) >= PATH_MAX)
+    file_name[PATH_MAX-1] = '\0'; /* truncate it */
+
+  strcpy(new_name, msdosify(file_name));
+
+  Curl_safefree(file_name);
+
+  return strdup(rename_if_dos_device_name(new_name));
+}
+
+/* The following functions are taken with modification from the DJGPP
+ * port of tar 1.12. They use algorithms originally from DJTAR. */
+
+static const char *msdosify (const char *file_name)
+{
+  static char dos_name[PATH_MAX];
+  static const char illegal_chars_dos[] = ".+, ;=[]" /* illegal in DOS */
+    "|<>\\\":?*"; /* illegal in DOS & W95 */
+  static const char *illegal_chars_w95 = &illegal_chars_dos[8];
+  int idx, dot_idx;
+  const char *s = file_name;
+  char *d = dos_name;
+  const char *const dlimit = dos_name + sizeof(dos_name) - 1;
+  const char *illegal_aliens = illegal_chars_dos;
+  size_t len = sizeof(illegal_chars_dos) - 1;
+
+  /* Support for Windows 9X VFAT systems, when available. */
+  if(_use_lfn(file_name)) {
+    illegal_aliens = illegal_chars_w95;
+    len -= (illegal_chars_w95 - illegal_chars_dos);
+  }
+
+  /* Get past the drive letter, if any. */
+  if(s[0] >= 'A' && s[0] <= 'z' && s[1] == ':') {
+    *d++ = *s++;
+    *d++ = *s++;
+  }
+
+  for(idx = 0, dot_idx = -1; *s && d < dlimit; s++, d++) {
+    if(memchr(illegal_aliens, *s, len)) {
+      /* Dots are special: DOS doesn't allow them as the leading character,
+         and a file name cannot have more than a single dot.  We leave the
+         first non-leading dot alone, unless it comes too close to the
+         beginning of the name: we want sh.lex.c to become sh_lex.c, not
+         sh.lex-c.  */
+      if(*s == '.') {
+        if(idx == 0 && (s[1] == '/' || (s[1] == '.' && s[2] == '/'))) {
+          /* Copy "./" and "../" verbatim.  */
+          *d++ = *s++;
+          if(*s == '.')
+            *d++ = *s++;
+          *d = *s;
+        }
+        else if(idx == 0)
+          *d = '_';
+        else if(dot_idx >= 0) {
+          if(dot_idx < 5) { /* 5 is a heuristic ad-hoc'ery */
+            d[dot_idx - idx] = '_'; /* replace previous dot */
+            *d = '.';
+          }
+          else
+            *d = '-';
+        }
+        else
+          *d = '.';
+
+        if(*s == '.')
+          dot_idx = idx;
+      }
+      else if(*s == '+' && s[1] == '+') {
+        if(idx - 2 == dot_idx) { /* .c++, .h++ etc. */
+          *d++ = 'x';
+          *d   = 'x';
+        }
+        else {
+          /* libg++ etc.  */
+          memcpy (d, "plus", 4);
+          d += 3;
+        }
+        s++;
+        idx++;
+      }
+      else
+        *d = '_';
+    }
+    else
+      *d = *s;
+    if(*s == '/') {
+      idx = 0;
+      dot_idx = -1;
+    }
+    else
+      idx++;
+  }
+
+  *d = '\0';
+  return dos_name;
+}
+
+static char *rename_if_dos_device_name (char *file_name)
+{
+  /* We could have a file whose name is a device on MS-DOS.  Trying to
+   * retrieve such a file would fail at best and wedge us at worst.  We need
+   * to rename such files. */
+  char *base;
+  struct_stat st_buf;
+  char fname[PATH_MAX];
+
+  strncpy(fname, file_name, PATH_MAX-1);
+  fname[PATH_MAX-1] = '\0';
+  base = basename(fname);
+  if(((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
+    size_t blen = strlen(base);
+
+    if(strlen(fname) >= PATH_MAX-1) {
+      /* Make room for the '_' */
+      blen--;
+      base[blen] = '\0';
+    }
+    /* Prepend a '_'.  */
+    memmove(base + 1, base, blen + 1);
+    base[0] = '_';
+    strcpy(file_name, fname);
+  }
+  return file_name;
+}
+
+#if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
+
+/*
+ * Disable program default argument globbing. We do it on our own.
+ */
+char **__crt0_glob_function(char *arg)
+{
+  (void)arg;
+  return (char**)0;
+}
+
+#endif /* MSDOS && (__DJGPP__ || __GO32__) */
+
+#ifdef WIN32
+
+/*
+ * Function to find CACert bundle on a Win32 platform using SearchPath.
+ * (SearchPath is already declared via inclusions done in setup header file)
+ * (Use the ASCII version instead of the unicode one!)
+ * The order of the directories it searches is:
+ *  1. application's directory
+ *  2. current working directory
+ *  3. Windows System directory (e.g. C:\windows\system32)
+ *  4. Windows Directory (e.g. C:\windows)
+ *  5. all directories along %PATH%
+ *
+ * For WinXP and later search order actually depends on registry value:
+ * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
+ */
+
+CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file)
+{
+  CURLcode result = CURLE_OK;
+
+  /* search and set cert file only if libcurl supports SSL */
+  if(curlinfo->features & CURL_VERSION_SSL) {
+
+    DWORD res_len;
+    DWORD buf_tchar_size = PATH_MAX + 1;
+    DWORD buf_bytes_size = sizeof(TCHAR) * buf_tchar_size;
+    char *ptr = NULL;
+
+    char *buf = malloc(buf_bytes_size);
+    if(!buf)
+      return CURLE_OUT_OF_MEMORY;
+    buf[0] = '\0';
+
+    res_len = SearchPathA(NULL, bundle_file, NULL, buf_tchar_size, buf, &ptr);
+    if(res_len > 0) {
+      Curl_safefree(config->cacert);
+      config->cacert = strdup(buf);
+      if(!config->cacert)
+        result = CURLE_OUT_OF_MEMORY;
+    }
+
+    Curl_safefree(buf);
+  }
+
+  return result;
+}
+
+#endif /* WIN32 */
+
+#endif /* MSDOS || WIN32 */
+
diff --git a/src/tool_doswin.h b/src/tool_doswin.h
new file mode 100644 (file)
index 0000000..955ce8d
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef HEADER_CURL_TOOL_DOSWIN_H
+#define HEADER_CURL_TOOL_DOSWIN_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#if defined(MSDOS) || defined(WIN32)
+
+char *sanitize_dos_name(char *file_name);
+
+#if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
+
+char **__crt0_glob_function(char *arg);
+
+#endif /* MSDOS && (__DJGPP__ || __GO32__) */
+
+#ifdef WIN32
+
+CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file);
+
+#endif /* WIN32 */
+
+#endif /* MSDOS || WIN32 */
+
+#endif /* HEADER_CURL_TOOL_DOSWIN_H */
+
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
new file mode 100644 (file)
index 0000000..339dde5
--- /dev/null
@@ -0,0 +1,227 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_easysrc.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* global variable definitions, for easy-interface source code generation */
+
+struct curl_slist *easysrc_decl = NULL; /* Variable declarations */
+struct curl_slist *easysrc_data = NULL; /* Build slists, forms etc. */
+struct curl_slist *easysrc_code = NULL; /* Setopt calls */
+struct curl_slist *easysrc_toohard = NULL; /* Unconvertible setopt */
+struct curl_slist *easysrc_clean = NULL;  /* Clean up allocated data */
+int easysrc_form_count = 0;
+int easysrc_slist_count = 0;
+
+static const char *const srchead[]={
+  "/********* Sample code generated by the curl command line tool **********",
+  " * All curl_easy_setopt() options are documented at:",
+  " * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html",
+  " ************************************************************************/",
+  "#include <curl/curl.h>",
+  "",
+  "int main(int argc, char *argv[])",
+  "{",
+  "  CURLcode ret;",
+  "  CURL *hnd;",
+  NULL
+};
+/* easysrc_decl declarations come here */
+/* easysrc_data initialisations come here */
+/* easysrc_code statements come here */
+static const char *const srchard[]={
+  "/* Here is a list of options the curl code used that cannot get generated",
+  "   as source easily. You may select to either not use them or implement",
+  "   them yourself.",
+  "",
+  NULL
+};
+static const char *const srcend[]={
+  "",
+  "  return (int)ret;",
+  "}",
+  "/**** End of sample code ****/",
+  NULL
+};
+
+/* Clean up all source code if we run out of memory */
+static void easysrc_free(void)
+{
+  curl_slist_free_all(easysrc_decl);
+  easysrc_decl = NULL;
+  curl_slist_free_all(easysrc_data);
+  easysrc_data = NULL;
+  curl_slist_free_all(easysrc_code);
+  easysrc_code = NULL;
+  curl_slist_free_all(easysrc_toohard);
+  easysrc_toohard = NULL;
+  curl_slist_free_all(easysrc_clean);
+  easysrc_clean = NULL;
+}
+
+/* Add a source line to the main code or remarks */
+CURLcode easysrc_add(struct curl_slist **plist, const char *line)
+{
+  CURLcode ret = CURLE_OK;
+  struct curl_slist *list =
+    curl_slist_append(*plist, line);
+  if(!list) {
+    easysrc_free();
+    ret = CURLE_OUT_OF_MEMORY;
+  }
+  else
+    *plist = list;
+  return ret;
+}
+
+CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...)
+{
+  CURLcode ret;
+  char *bufp;
+  va_list ap;
+  va_start(ap, fmt);
+  bufp = curlx_mvaprintf(fmt, ap);
+  va_end(ap);
+  if(! bufp) {
+    ret = CURLE_OUT_OF_MEMORY;
+  }
+  else {
+    ret = easysrc_add(plist, bufp);
+    curl_free(bufp);
+  }
+  return ret;
+}
+
+#define CHKRET(v) do {CURLcode ret = (v); if(ret) return ret;} WHILE_FALSE
+
+CURLcode easysrc_init(void)
+{
+  CHKRET(easysrc_add(&easysrc_code,
+                     "hnd = curl_easy_init();"));
+  return CURLE_OK;
+}
+
+CURLcode easysrc_perform(void)
+{
+  /* Note any setopt calls which we could not convert */
+  if(easysrc_toohard) {
+    int i;
+    struct curl_slist *ptr;
+    const char *c;
+    CHKRET(easysrc_add(&easysrc_code, ""));
+    /* Preamble comment */
+    for(i=0; ((c = srchard[i]) != NULL); i++)
+      CHKRET(easysrc_add(&easysrc_code, c));
+    /* Each unconverted option */
+    for(ptr=easysrc_toohard; ptr; ptr = ptr->next)
+      CHKRET(easysrc_add(&easysrc_code, ptr->data));
+    CHKRET(easysrc_add(&easysrc_code, ""));
+    CHKRET(easysrc_add(&easysrc_code, "*/"));
+
+    curl_slist_free_all(easysrc_toohard);
+    easysrc_toohard = NULL;
+  }
+
+  CHKRET(easysrc_add(&easysrc_code, ""));
+  CHKRET(easysrc_add(&easysrc_code, "ret = curl_easy_perform(hnd);"));
+  return CURLE_OK;
+}
+
+CURLcode easysrc_cleanup(void)
+{
+  CHKRET(easysrc_add(&easysrc_code, ""));
+  CHKRET(easysrc_add(&easysrc_code, "curl_easy_cleanup(hnd);"));
+  CHKRET(easysrc_add(&easysrc_code, "hnd = NULL;"));
+  return CURLE_OK;
+}
+
+void dumpeasysrc(struct Configurable *config)
+{
+  struct curl_slist *ptr;
+  char *o = config->libcurl;
+
+  if(o) {
+    FILE *out;
+    bool fopened = FALSE;
+    if(strcmp(o, "-")) {
+      out = fopen(o, "w");
+      fopened = TRUE;
+    }
+    else
+      out = stdout;
+    if(!out)
+      warnf(config, "Failed to open %s to write libcurl code!\n", o);
+    else {
+      int i;
+      const char *c;
+
+      for(i=0; ((c = srchead[i]) != NULL); i++)
+        fprintf(out, "%s\n", c);
+
+      /* Declare variables used for complex setopt values */
+      for(ptr=easysrc_decl; ptr; ptr = ptr->next)
+        fprintf(out, "  %s\n", ptr->data);
+
+      /* Set up complex values for setopt calls */
+      if(easysrc_data) {
+        fprintf(out, "\n");
+
+        for(ptr=easysrc_data; ptr; ptr = ptr->next)
+          fprintf(out, "  %s\n", ptr->data);
+      }
+
+      fprintf(out, "\n");
+      for(ptr=easysrc_code; ptr; ptr = ptr->next) {
+        if(ptr->data[0]) {
+          fprintf(out, "  %s\n", ptr->data);
+        }
+        else {
+          fprintf(out, "\n");
+        }
+      }
+
+      for(ptr=easysrc_clean; ptr; ptr = ptr->next)
+        fprintf(out, "  %s\n", ptr->data);
+
+      for(i=0; ((c = srcend[i]) != NULL); i++)
+        fprintf(out, "%s\n", c);
+
+      if(fopened)
+        fclose(out);
+    }
+  }
+
+  easysrc_free();
+}
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h
new file mode 100644 (file)
index 0000000..fa97cdc
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef HEADER_CURL_TOOL_EASYSRC_H
+#define HEADER_CURL_TOOL_EASYSRC_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+
+/* global variable declarations, for easy-interface source code generation */
+
+extern struct curl_slist *easysrc_decl; /* Variable declarations */
+extern struct curl_slist *easysrc_data; /* Build slists, forms etc. */
+extern struct curl_slist *easysrc_code; /* Setopt calls etc. */
+extern struct curl_slist *easysrc_toohard; /* Unconvertible setopt */
+extern struct curl_slist *easysrc_clean;  /* Clean up (reverse order) */
+
+extern int easysrc_form_count;  /* Number of curl_httppost variables */
+extern int easysrc_slist_count; /* Number of curl_slist variables */
+
+extern CURLcode easysrc_init(void);
+extern CURLcode easysrc_add(struct curl_slist **plist, const char *bupf);
+extern CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...);
+extern CURLcode easysrc_perform(void);
+extern CURLcode easysrc_cleanup(void);
+void dumpeasysrc(struct Configurable *config);
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
+
+#endif /* HEADER_CURL_TOOL_EASYSRC_H */
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
new file mode 100644 (file)
index 0000000..fe357f5
--- /dev/null
@@ -0,0 +1,361 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_mfiles.h"
+#include "tool_msgs.h"
+#include "tool_formparse.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+
+/*
+ * helper function to get a word from form param
+ * after call get_parm_word, str either point to string end
+ * or point to any of end chars.
+ */
+static char *get_param_word(char **str, char **end_pos)
+{
+  char *ptr = *str;
+  char *word_begin = NULL;
+  char *ptr2;
+  char *escape = NULL;
+  const char *end_chars = ";,";
+
+  /* the first non-space char is here */
+  word_begin = ptr;
+  if(*ptr == '"') {
+    ++ptr;
+    while(*ptr) {
+      if(*ptr == '\\') {
+        if(ptr[1] == '\\' || ptr[1] == '"') {
+          /* remember the first escape position */
+          if(!escape)
+            escape = ptr;
+          /* skip escape of back-slash or double-quote */
+          ptr += 2;
+          continue;
+        }
+      }
+      if(*ptr == '"') {
+        *end_pos = ptr;
+        if(escape) {
+          /* has escape, we restore the unescaped string here */
+          ptr = ptr2 = escape;
+          do {
+            if(*ptr == '\\' && (ptr[1] == '\\' || ptr[1] == '"'))
+              ++ptr;
+            *ptr2++ = *ptr++;
+          }
+          while(ptr < *end_pos);
+          *end_pos = ptr2;
+        }
+        while(*ptr && NULL==strchr(end_chars, *ptr))
+          ++ptr;
+        *str = ptr;
+        return word_begin+1;
+      }
+      ++ptr;
+    }
+    /* end quote is missing, treat it as non-quoted. */
+    ptr = word_begin;
+  }
+
+  while(*ptr && NULL==strchr(end_chars, *ptr))
+    ++ptr;
+  *str = *end_pos = ptr;
+  return word_begin;
+}
+
+/***************************************************************************
+ *
+ * formparse()
+ *
+ * Reads a 'name=value' parameter and builds the appropriate linked list.
+ *
+ * Specify files to upload with 'name=@filename', or 'name=@"filename"'
+ * in case the filename contain ',' or ';'. Supports specified
+ * given Content-Type of the files. Such as ';type=<content-type>'.
+ *
+ * If literal_value is set, any initial '@' or '<' in the value string
+ * loses its special meaning, as does any embedded ';type='.
+ *
+ * You may specify more than one file for a single name (field). Specify
+ * multiple files by writing it like:
+ *
+ * 'name=@filename,filename2,filename3'
+ *
+ * or use double-quotes quote the filename:
+ *
+ * 'name=@"filename","filename2","filename3"'
+ *
+ * If you want content-types specified for each too, write them like:
+ *
+ * 'name=@filename;type=image/gif,filename2,filename3'
+ *
+ * If you want custom headers added for a single part, write them in a separate
+ * file and do like this:
+ *
+ * 'name=foo;headers=@headerfile' or why not
+ * 'name=@filemame;headers=@headerfile'
+ *
+ * To upload a file, but to fake the file name that will be included in the
+ * formpost, do like this:
+ *
+ * 'name=@filename;filename=/dev/null' or quote the faked filename like:
+ * 'name=@filename;filename="play, play, and play.txt"'
+ *
+ * If filename/path contains ',' or ';', it must be quoted by double-quotes,
+ * else curl will fail to figure out the correct filename. if the filename
+ * tobe quoted contains '"' or '\', '"' and '\' must be escaped by backslash.
+ *
+ * This function uses curl_formadd to fulfill it's job. Is heavily based on
+ * the old curl_formparse code.
+ *
+ ***************************************************************************/
+
+int formparse(struct Configurable *config,
+              const char *input,
+              struct curl_httppost **httppost,
+              struct curl_httppost **last_post,
+              bool literal_value)
+{
+  /* nextarg MUST be a string in the format 'name=contents' and we'll
+     build a linked list with the info */
+  char name[256];
+  char *contents = NULL;
+  char type_major[128];
+  char type_minor[128];
+  char *contp;
+  const char *type = NULL;
+  char *sep;
+
+  if((1 == sscanf(input, "%255[^=]=", name)) &&
+     ((contp = strchr(input, '=')) != NULL)) {
+    /* the input was using the correct format */
+
+    /* Allocate the contents */
+    contents = strdup(contp+1);
+    if(!contents) {
+      fprintf(config->errors, "out of memory\n");
+      return 1;
+    }
+    contp = contents;
+
+    if('@' == contp[0] && !literal_value) {
+
+      /* we use the @-letter to indicate file name(s) */
+
+      struct multi_files *multi_start = NULL;
+      struct multi_files *multi_current = NULL;
+
+      char *ptr = contp;
+      char *end = ptr + strlen(ptr);
+
+      do {
+        /* since this was a file, it may have a content-type specifier
+           at the end too, or a filename. Or both. */
+        char *filename = NULL;
+        char *word_end;
+        bool semicolon;
+
+        type = NULL;
+
+        ++ptr;
+        contp = get_param_word(&ptr, &word_end);
+        semicolon = (';' == *ptr) ? TRUE : FALSE;
+        *word_end = '\0'; /* terminate the contp */
+
+        /* have other content, continue parse */
+        while(semicolon) {
+          /* have type or filename field */
+          ++ptr;
+          while(*ptr && (ISSPACE(*ptr)))
+            ++ptr;
+
+          if(checkprefix("type=", ptr)) {
+            /* set type pointer */
+            type = &ptr[5];
+
+            /* verify that this is a fine type specifier */
+            if(2 != sscanf(type, "%127[^/]/%127[^;,\n]",
+                           type_major, type_minor)) {
+              warnf(config, "Illegally formatted content-type field!\n");
+              Curl_safefree(contents);
+              FreeMultiInfo(&multi_start, &multi_current);
+              return 2; /* illegal content-type syntax! */
+            }
+
+            /* now point beyond the content-type specifier */
+            sep = (char *)type + strlen(type_major)+strlen(type_minor)+1;
+
+            /* there's a semicolon following - we check if it is a filename
+               specified and if not we simply assume that it is text that
+               the user wants included in the type and include that too up
+               to the next sep. */
+            ptr = sep;
+            if(*sep==';') {
+              if(!checkprefix(";filename=", sep)) {
+                ptr = sep + 1;
+                (void)get_param_word(&ptr, &sep);
+                semicolon = (';' == *ptr) ? TRUE : FALSE;
+              }
+            }
+            else
+              semicolon = FALSE;
+
+            if(*sep)
+              *sep = '\0'; /* zero terminate type string */
+          }
+          else if(checkprefix("filename=", ptr)) {
+            ptr += 9;
+            filename = get_param_word(&ptr, &word_end);
+            semicolon = (';' == *ptr) ? TRUE : FALSE;
+            *word_end = '\0';
+          }
+          else {
+            /* unknown prefix, skip to next block */
+            char *unknown = NULL;
+            unknown = get_param_word(&ptr, &word_end);
+            semicolon = (';' == *ptr) ? TRUE : FALSE;
+            if(*unknown) {
+              *word_end = '\0';
+              warnf(config, "skip unknown form field: %s\n", unknown);
+            }
+          }
+        }
+        /* now ptr point to comma or string end */
+
+
+        /* if type == NULL curl_formadd takes care of the problem */
+
+        if(*contp && !AddMultiFiles(contp, type, filename, &multi_start,
+                          &multi_current)) {
+          warnf(config, "Error building form post!\n");
+          Curl_safefree(contents);
+          FreeMultiInfo(&multi_start, &multi_current);
+          return 3;
+        }
+
+        /* *ptr could be '\0', so we just check with the string end */
+      } while(ptr < end); /* loop if there's another file name */
+
+      /* now we add the multiple files section */
+      if(multi_start) {
+        struct curl_forms *forms = NULL;
+        struct multi_files *start = multi_start;
+        unsigned int i, count = 0;
+        while(start) {
+          start = start->next;
+          ++count;
+        }
+        forms = malloc((count+1)*sizeof(struct curl_forms));
+        if(!forms) {
+          fprintf(config->errors, "Error building form post!\n");
+          Curl_safefree(contents);
+          FreeMultiInfo(&multi_start, &multi_current);
+          return 4;
+        }
+        for(i = 0, start = multi_start; i < count; ++i, start = start->next) {
+          forms[i].option = start->form.option;
+          forms[i].value = start->form.value;
+        }
+        forms[count].option = CURLFORM_END;
+        FreeMultiInfo(&multi_start, &multi_current);
+        if(curl_formadd(httppost, last_post,
+                        CURLFORM_COPYNAME, name,
+                        CURLFORM_ARRAY, forms, CURLFORM_END) != 0) {
+          warnf(config, "curl_formadd failed!\n");
+          Curl_safefree(forms);
+          Curl_safefree(contents);
+          return 5;
+        }
+        Curl_safefree(forms);
+      }
+    }
+    else {
+      struct curl_forms info[4];
+      int i = 0;
+      char *ct = literal_value ? NULL : strstr(contp, ";type=");
+
+      info[i].option = CURLFORM_COPYNAME;
+      info[i].value = name;
+      i++;
+
+      if(ct) {
+        info[i].option = CURLFORM_CONTENTTYPE;
+        info[i].value = &ct[6];
+        i++;
+        ct[0] = '\0'; /* zero terminate here */
+      }
+
+      if(contp[0]=='<' && !literal_value) {
+        info[i].option = CURLFORM_FILECONTENT;
+        info[i].value = contp+1;
+        i++;
+        info[i].option = CURLFORM_END;
+
+        if(curl_formadd(httppost, last_post,
+                        CURLFORM_ARRAY, info, CURLFORM_END ) != 0) {
+          warnf(config, "curl_formadd failed, possibly the file %s is bad!\n",
+                contp+1);
+          Curl_safefree(contents);
+          return 6;
+        }
+      }
+      else {
+#ifdef CURL_DOES_CONVERSIONS
+        if(convert_to_network(contp, strlen(contp))) {
+          warnf(config, "curl_formadd failed!\n");
+          Curl_safefree(contents);
+          return 7;
+        }
+#endif
+        info[i].option = CURLFORM_COPYCONTENTS;
+        info[i].value = contp;
+        i++;
+        info[i].option = CURLFORM_END;
+        if(curl_formadd(httppost, last_post,
+                        CURLFORM_ARRAY, info, CURLFORM_END) != 0) {
+          warnf(config, "curl_formadd failed!\n");
+          Curl_safefree(contents);
+          return 8;
+        }
+      }
+    }
+
+  }
+  else {
+    warnf(config, "Illegally formatted input field!\n");
+    return 1;
+  }
+  Curl_safefree(contents);
+  return 0;
+}
+
diff --git a/src/tool_formparse.h b/src/tool_formparse.h
new file mode 100644 (file)
index 0000000..3cd915f
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef HEADER_CURL_TOOL_FORMPARSE_H
+#define HEADER_CURL_TOOL_FORMPARSE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+int formparse(struct Configurable *config,
+              const char *input,
+              struct curl_httppost **httppost,
+              struct curl_httppost **last_post,
+              bool literal_value);
+
+#endif /* HEADER_CURL_TOOL_FORMPARSE_H */
+
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
new file mode 100644 (file)
index 0000000..5eb2c9f
--- /dev/null
@@ -0,0 +1,1784 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#ifdef USE_MANUAL
+#  include "tool_hugehelp.h"
+#endif
+
+#include "tool_binmode.h"
+#include "tool_cfgable.h"
+#include "tool_cb_prg.h"
+#include "tool_formparse.h"
+#include "tool_getparam.h"
+#include "tool_help.h"
+#include "tool_helpers.h"
+#include "tool_libinfo.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+#include "tool_paramhlp.h"
+#include "tool_parsecfg.h"
+#include "tool_version.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef MSDOS
+#  define USE_WATT32
+#endif
+
+#define GetStr(str,val) do { \
+  if(*(str)) { \
+    free(*(str)); \
+    *(str) = NULL; \
+  } \
+  if((val)) {              \
+    *(str) = strdup((val)); \
+    if(!(*(str)))          \
+      return PARAM_NO_MEM; \
+  } \
+} WHILE_FALSE
+
+struct LongShort {
+  const char *letter; /* short name option */
+  const char *lname;  /* long name option */
+  bool extraparam;    /* whether it takes an additional argument */
+};
+
+static const struct LongShort aliases[]= {
+  /* all these ones, starting with "*" or "$" as a short-option have *no*
+     short option to mention. */
+  {"*",  "url",                      TRUE},
+  {"*a", "random-file",              TRUE},
+  {"*b", "egd-file",                 TRUE},
+  {"*c", "connect-timeout",          TRUE},
+  {"*d", "ciphers",                  TRUE},
+  {"*e", "disable-epsv",             FALSE},
+  {"*E", "epsv",                     FALSE},
+         /* 'epsv' made like this to make --no-epsv and --epsv to work
+             although --disable-epsv is the documented option */
+#ifdef USE_ENVIRONMENT
+  {"*f", "environment",              FALSE},
+#endif
+  {"*g", "trace",                    TRUE},
+  {"*h", "trace-ascii",              TRUE},
+  {"*i", "limit-rate",               TRUE},
+  {"*j", "compressed",               FALSE},
+  {"*J", "tr-encoding",              FALSE},
+  {"*k", "digest",                   FALSE},
+  {"*l", "negotiate",                FALSE},
+  {"*m", "ntlm",                     FALSE},
+  {"*M", "ntlm-wb",                  FALSE},
+  {"*n", "basic",                    FALSE},
+  {"*o", "anyauth",                  FALSE},
+#ifdef USE_WATT32
+  {"*p", "wdebug",                   FALSE},
+#endif
+  {"*q", "ftp-create-dirs",          FALSE},
+  {"*r", "create-dirs",              FALSE},
+  {"*s", "max-redirs",               TRUE},
+  {"*t", "proxy-ntlm",               FALSE},
+  {"*u", "crlf",                     FALSE},
+  {"*v", "stderr",                   TRUE},
+  {"*w", "interface",                TRUE},
+  {"*x", "krb" ,                     TRUE},
+  {"*x", "krb4" ,                    TRUE},
+         /* 'krb4' is the previous name */
+  {"*y", "max-filesize",             TRUE},
+  {"*z", "disable-eprt",             FALSE},
+  {"*Z", "eprt",                     FALSE},
+         /* 'eprt' made like this to make --no-eprt and --eprt to work
+             although --disable-eprt is the documented option */
+  {"$a", "ftp-ssl",                  FALSE},
+         /* 'ftp-ssl' deprecated name since 7.20.0 */
+  {"$a", "ssl",                      FALSE},
+         /* 'ssl' new option name in 7.20.0, previously this was ftp-ssl */
+  {"$b", "ftp-pasv",                 FALSE},
+  {"$c", "socks5",                   TRUE},
+  {"$c", "socks",                    TRUE},
+         /* 'socks' is how the option once was documented but we prefer
+            the --socks5 version for explicit version */
+  {"$d", "tcp-nodelay",              FALSE},
+  {"$e", "proxy-digest",             FALSE},
+  {"$f", "proxy-basic",              FALSE},
+  {"$g", "retry",                    TRUE},
+  {"$h", "retry-delay",              TRUE},
+  {"$i", "retry-max-time",           TRUE},
+  {"$k", "proxy-negotiate",          FALSE},
+  {"$m", "ftp-account",              TRUE},
+  {"$n", "proxy-anyauth",            FALSE},
+  {"$o", "trace-time",               FALSE},
+  {"$p", "ignore-content-length",    FALSE},
+  {"$q", "ftp-skip-pasv-ip",         FALSE},
+  {"$r", "ftp-method",               TRUE},
+  {"$s", "local-port",               TRUE},
+  {"$t", "socks4",                   TRUE},
+  {"$T", "socks4a",                  TRUE},
+  {"$u", "ftp-alternative-to-user",  TRUE},
+  {"$v", "ftp-ssl-reqd",             FALSE},
+         /* 'ftp-ssl-reqd' deprecated name since 7.20.0 */
+  {"$v", "ssl-reqd",                 FALSE},
+         /* 'ssl-reqd' new in 7.20.0, previously this was ftp-ssl-reqd */
+  {"$w", "sessionid",                FALSE},
+         /* ¡sessionid' listed as --no-sessionid in the help */
+  {"$x", "ftp-ssl-control",          FALSE},
+  {"$y", "ftp-ssl-ccc",              FALSE},
+  {"$j", "ftp-ssl-ccc-mode",         TRUE},
+  {"$z", "libcurl",                  TRUE},
+  {"$#", "raw",                      FALSE},
+  {"$0", "post301",                  FALSE},
+  {"$1", "keepalive",                FALSE},
+         /* 'keepalive' listed as --no-keepalive in the help */
+  {"$2", "socks5-hostname",          TRUE},
+  {"$3", "keepalive-time",           TRUE},
+  {"$4", "post302",                  FALSE},
+  {"$5", "noproxy",                  TRUE},
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+  {"$6", "socks5-gssapi-service",    TRUE},
+  {"$7", "socks5-gssapi-nec",        FALSE},
+#endif
+  {"$8", "proxy1.0",                 TRUE},
+  {"$9", "tftp-blksize",             TRUE},
+  {"$A", "mail-from",                TRUE},
+  {"$B", "mail-rcpt",                TRUE},
+  {"$C", "ftp-pret",                 FALSE},
+  {"$D", "proto",                    TRUE},
+  {"$E", "proto-redir",              TRUE},
+  {"$F", "resolve",                  TRUE},
+  {"$G", "delegation",               TRUE},
+  {"$H", "mail-auth",                TRUE},
+  {"$I", "post303",                  FALSE},
+  {"$J", "metalink",                 FALSE},
+  {"$K", "sasl-ir",                  FALSE},
+  {"0",  "http1.0",                  FALSE},
+  {"1",  "tlsv1",                    FALSE},
+  {"2",  "sslv2",                    FALSE},
+  {"3",  "sslv3",                    FALSE},
+  {"4",  "ipv4",                     FALSE},
+  {"6",  "ipv6",                     FALSE},
+  {"a",  "append",                   FALSE},
+  {"A",  "user-agent",               TRUE},
+  {"b",  "cookie",                   TRUE},
+  {"B",  "use-ascii",                FALSE},
+  {"c",  "cookie-jar",               TRUE},
+  {"C",  "continue-at",              TRUE},
+  {"d",  "data",                     TRUE},
+  {"da", "data-ascii",               TRUE},
+  {"db", "data-binary",              TRUE},
+  {"de", "data-urlencode",           TRUE},
+  {"D",  "dump-header",              TRUE},
+  {"e",  "referer",                  TRUE},
+  {"E",  "cert",                     TRUE},
+  {"Ea", "cacert",                   TRUE},
+  {"Eb", "cert-type",                TRUE},
+  {"Ec", "key",                      TRUE},
+  {"Ed", "key-type",                 TRUE},
+  {"Ee", "pass",                     TRUE},
+  {"Ef", "engine",                   TRUE},
+  {"Eg", "capath ",                  TRUE},
+  {"Eh", "pubkey",                   TRUE},
+  {"Ei", "hostpubmd5",               TRUE},
+  {"Ej", "crlfile",                  TRUE},
+  {"Ek", "tlsuser",                  TRUE},
+  {"El", "tlspassword",              TRUE},
+  {"Em", "tlsauthtype",              TRUE},
+  {"En", "ssl-allow-beast",          FALSE},
+  {"f",  "fail",                     FALSE},
+  {"F",  "form",                     TRUE},
+  {"Fs", "form-string",              TRUE},
+  {"g",  "globoff",                  FALSE},
+  {"G",  "get",                      FALSE},
+  {"h",  "help",                     FALSE},
+  {"H",  "header",                   TRUE},
+  {"i",  "include",                  FALSE},
+  {"I",  "head",                     FALSE},
+  {"j",  "junk-session-cookies",     FALSE},
+  {"J",  "remote-header-name",       FALSE},
+  {"k",  "insecure",                 FALSE},
+  {"K",  "config",                   TRUE},
+  {"l",  "list-only",                FALSE},
+  {"L",  "location",                 FALSE},
+  {"Lt", "location-trusted",         FALSE},
+  {"m",  "max-time",                 TRUE},
+  {"M",  "manual",                   FALSE},
+  {"n",  "netrc",                    FALSE},
+  {"no", "netrc-optional",           FALSE},
+  {"ne", "netrc-file",               TRUE},
+  {"N",  "buffer",                   FALSE},
+         /* 'buffer' listed as --no-buffer in the help */
+  {"o",  "output",                   TRUE},
+  {"O",  "remote-name",              FALSE},
+  {"Oa", "remote-name-all",          FALSE},
+  {"p",  "proxytunnel",              FALSE},
+  {"P",  "ftpport",                  TRUE},
+         /* 'ftpport' old version */
+  {"P",  "ftp-port",                 TRUE},
+  {"q",  "disable",                  FALSE},
+  {"Q",  "quote",                    TRUE},
+  {"r",  "range",                    TRUE},
+  {"R",  "remote-time",              FALSE},
+  {"s",  "silent",                   FALSE},
+  {"S",  "show-error",               FALSE},
+  {"t",  "telnet-options",           TRUE},
+         /* 'telnet-options' documented as telnet-option */
+  {"T",  "upload-file",              TRUE},
+  {"u",  "user",                     TRUE},
+  {"U",  "proxy-user",               TRUE},
+  {"v",  "verbose",                  FALSE},
+  {"V",  "version",                  FALSE},
+  {"w",  "write-out",                TRUE},
+  {"x",  "proxy",                    TRUE},
+  {"X",  "request",                  TRUE},
+  {"X",  "http-request",             TRUE},
+         /* 'http-request' OBSOLETE VERSION */
+  {"Y",  "speed-limit",              TRUE},
+  {"y",  "speed-time",               TRUE},
+  {"z",  "time-cond",                TRUE},
+  {"#",  "progress-bar",             FALSE},
+  {"~",  "xattr",                    FALSE},
+};
+
+struct feat {
+  const char *name;
+  int bitmask;
+};
+
+static const struct feat feats[] = {
+  {"AsynchDNS",      CURL_VERSION_ASYNCHDNS},
+  {"Debug",          CURL_VERSION_DEBUG},
+  {"TrackMemory",    CURL_VERSION_CURLDEBUG},
+  {"GSS-Negotiate",  CURL_VERSION_GSSNEGOTIATE},
+  {"IDN",            CURL_VERSION_IDN},
+  {"IPv6",           CURL_VERSION_IPV6},
+  {"Largefile",      CURL_VERSION_LARGEFILE},
+  {"NTLM",           CURL_VERSION_NTLM},
+  {"NTLM_WB",        CURL_VERSION_NTLM_WB},
+  {"SPNEGO",         CURL_VERSION_SPNEGO},
+  {"SSL",            CURL_VERSION_SSL},
+  {"SSPI",           CURL_VERSION_SSPI},
+  {"krb4",           CURL_VERSION_KERBEROS4},
+  {"libz",           CURL_VERSION_LIBZ},
+  {"CharConv",       CURL_VERSION_CONV},
+  {"TLS-SRP",        CURL_VERSION_TLSAUTH_SRP}
+};
+
+/* Split the argument of -E to 'certname' and 'passphrase' separated by colon.
+ * We allow ':' and '\' to be escaped by '\' so that we can use certificate
+ * nicknames containing ':'.  See <https://sourceforge.net/p/curl/bugs/1196/>
+ * for details. */
+#ifndef UNITTESTS
+static
+#endif
+void parse_cert_parameter(const char *cert_parameter,
+                          char **certname,
+                          char **passphrase)
+{
+  size_t param_length = strlen(cert_parameter);
+  size_t span;
+  const char *param_place = NULL;
+  char *certname_place = NULL;
+  *certname = NULL;
+  *passphrase = NULL;
+
+  /* most trivial assumption: cert_parameter is empty */
+  if(param_length == 0)
+    return;
+
+  /* next less trivial: cert_parameter contains no colon nor backslash; this
+   * means no passphrase was given and no characters escaped */
+  if(!strpbrk(cert_parameter, ":\\")) {
+    *certname = strdup(cert_parameter);
+    return;
+  }
+  /* deal with escaped chars; find unescaped colon if it exists */
+  certname_place = malloc(param_length + 1);
+  if(!certname_place)
+    return;
+
+  *certname = certname_place;
+  param_place = cert_parameter;
+  while(*param_place) {
+    span = strcspn(param_place, ":\\");
+    strncpy(certname_place, param_place, span);
+    param_place += span;
+    certname_place += span;
+    /* we just ate all the non-special chars. now we're on either a special
+     * char or the end of the string. */
+    switch(*param_place) {
+    case '\0':
+      break;
+    case '\\':
+      param_place++;
+      switch(*param_place) {
+        case '\0':
+          *certname_place++ = '\\';
+          break;
+        case '\\':
+          *certname_place++ = '\\';
+          param_place++;
+          break;
+        case ':':
+          *certname_place++ = ':';
+          param_place++;
+          break;
+        default:
+          *certname_place++ = '\\';
+          *certname_place++ = *param_place;
+          param_place++;
+          break;
+      }
+      break;
+    case ':':
+      /* Since we live in a world of weirdness and confusion, the win32
+         dudes can use : when using drive letters and thus c:\file:password
+         needs to work. In order not to break compatibility, we still use : as
+         separator, but we try to detect when it is used for a file name! On
+         windows. */
+#ifdef WIN32
+      if(param_place &&
+          (param_place == &cert_parameter[1]) &&
+          (cert_parameter[2] == '\\' || cert_parameter[2] == '/') &&
+          (ISALPHA(cert_parameter[0])) ) {
+        /* colon in the second column, followed by a backslash, and the
+           first character is an alphabetic letter:
+
+           this is a drive letter colon */
+        *certname_place++ = ':';
+        param_place++;
+        break;
+      }
+#endif
+      /* escaped colons and Windows drive letter colons were handled
+       * above; if we're still here, this is a separating colon */
+      param_place++;
+      if(strlen(param_place) > 0) {
+        *passphrase = strdup(param_place);
+      }
+      goto done;
+    }
+  }
+done:
+  *certname_place = '\0';
+}
+
+ParameterError getparameter(char *flag,    /* f or -long-flag */
+                            char *nextarg, /* NULL if unset */
+                            bool *usedarg, /* set to TRUE if the arg
+                                              has been used */
+                            struct Configurable *config)
+{
+  char letter;
+  char subletter = '\0'; /* subletters can only occur on long options */
+  int rc;
+  const char *parse = NULL;
+  unsigned int j;
+  time_t now;
+  int hit = -1;
+  bool longopt = FALSE;
+  bool singleopt = FALSE; /* when true means '-o foo' used '-ofoo' */
+  ParameterError err;
+  bool toggle = TRUE; /* how to switch boolean options, on or off. Controlled
+                         by using --OPTION or --no-OPTION */
+
+
+  if(('-' != flag[0]) ||
+     (('-' == flag[0]) && ('-' == flag[1]))) {
+    /* this should be a long name */
+    char *word = ('-' == flag[0]) ? flag+2 : flag;
+    size_t fnam = strlen(word);
+    int numhits = 0;
+
+    if(!strncmp(word, "no-", 3)) {
+      /* disable this option but ignore the "no-" part when looking for it */
+      word += 3;
+      toggle = FALSE;
+    }
+
+    for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {
+      if(curlx_strnequal(aliases[j].lname, word, fnam)) {
+        longopt = TRUE;
+        numhits++;
+        if(curlx_raw_equal(aliases[j].lname, word)) {
+          parse = aliases[j].letter;
+          hit = j;
+          numhits = 1; /* a single unique hit */
+          break;
+        }
+        parse = aliases[j].letter;
+        hit = j;
+      }
+    }
+    if(numhits > 1) {
+      /* this is at least the second match! */
+      return PARAM_OPTION_AMBIGUOUS;
+    }
+    if(hit < 0) {
+      return PARAM_OPTION_UNKNOWN;
+    }
+  }
+  else {
+    flag++; /* prefixed with one dash, pass it */
+    hit = -1;
+    parse = flag;
+  }
+
+  do {
+    /* we can loop here if we have multiple single-letters */
+
+    if(!longopt) {
+      if(NULL != parse) {
+        letter = (char)*parse;
+      }
+      else {
+        letter = '\0';
+      }
+      subletter='\0';
+    }
+    else {
+      letter = parse[0];
+      subletter = parse[1];
+    }
+    *usedarg = FALSE; /* default is that we don't use the arg */
+
+    if(hit < 0) {
+      for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {
+        if(letter == aliases[j].letter[0]) {
+          hit = j;
+          break;
+        }
+      }
+      if(hit < 0) {
+        return PARAM_OPTION_UNKNOWN;
+      }
+    }
+
+    if(aliases[hit].extraparam) {
+      /* this option requires an extra parameter */
+      if(!longopt && parse[1]) {
+        nextarg = (char *)&parse[1]; /* this is the actual extra parameter */
+        singleopt = TRUE;   /* don't loop anymore after this */
+      }
+      else if(!nextarg)
+        return PARAM_REQUIRES_PARAMETER;
+      else
+        *usedarg = TRUE; /* mark it as used */
+    }
+
+    switch(letter) {
+    case '*': /* options without a short option */
+      switch(subletter) {
+      case 'a': /* random-file */
+        GetStr(&config->random_file, nextarg);
+        break;
+      case 'b': /* egd-file */
+        GetStr(&config->egd_file, nextarg);
+        break;
+      case 'c': /* connect-timeout */
+        err = str2udouble(&config->connecttimeout, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'd': /* ciphers */
+        GetStr(&config->cipher_list, nextarg);
+        break;
+      case 'e': /* --disable-epsv */
+        config->disable_epsv = toggle;
+        break;
+      case 'E': /* --epsv */
+        config->disable_epsv = (!toggle)?TRUE:FALSE;
+        break;
+#ifdef USE_ENVIRONMENT
+      case 'f':
+        config->writeenv = toggle;
+        break;
+#endif
+      case 'g': /* --trace */
+        GetStr(&config->trace_dump, nextarg);
+        if(config->tracetype && (config->tracetype != TRACE_BIN))
+          warnf(config, "--trace overrides an earlier trace/verbose option\n");
+        config->tracetype = TRACE_BIN;
+        break;
+      case 'h': /* --trace-ascii */
+        GetStr(&config->trace_dump, nextarg);
+        if(config->tracetype && (config->tracetype != TRACE_ASCII))
+          warnf(config,
+                "--trace-ascii overrides an earlier trace/verbose option\n");
+        config->tracetype = TRACE_ASCII;
+        break;
+      case 'i': /* --limit-rate */
+      {
+        /* We support G, M, K too */
+        char *unit;
+        curl_off_t value = curlx_strtoofft(nextarg, &unit, 0);
+
+        if(!*unit)
+          unit = (char *)"b";
+        else if(strlen(unit) > 1)
+          unit = (char *)"w"; /* unsupported */
+
+        switch(*unit) {
+        case 'G':
+        case 'g':
+          value *= 1024*1024*1024;
+          break;
+        case 'M':
+        case 'm':
+          value *= 1024*1024;
+          break;
+        case 'K':
+        case 'k':
+          value *= 1024;
+          break;
+        case 'b':
+        case 'B':
+          /* for plain bytes, leave as-is */
+          break;
+        default:
+          warnf(config, "unsupported rate unit. Use G, M, K or B!\n");
+          return PARAM_BAD_USE;
+        }
+        config->recvpersecond = value;
+        config->sendpersecond = value;
+      }
+      break;
+
+      case 'j': /* --compressed */
+        if(toggle && !(curlinfo->features & CURL_VERSION_LIBZ))
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        config->encoding = toggle;
+        break;
+
+      case 'J': /* --tr-encoding */
+        config->tr_encoding = toggle;
+        break;
+
+      case 'k': /* --digest */
+        if(toggle)
+          config->authtype |= CURLAUTH_DIGEST;
+        else
+          config->authtype &= ~CURLAUTH_DIGEST;
+        break;
+
+      case 'l': /* --negotiate */
+        if(toggle) {
+          if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
+            config->authtype |= CURLAUTH_GSSNEGOTIATE;
+          else
+            return PARAM_LIBCURL_DOESNT_SUPPORT;
+        }
+        else
+          config->authtype &= ~CURLAUTH_GSSNEGOTIATE;
+        break;
+
+      case 'm': /* --ntlm */
+        if(toggle) {
+          if(curlinfo->features & CURL_VERSION_NTLM)
+            config->authtype |= CURLAUTH_NTLM;
+          else
+            return PARAM_LIBCURL_DOESNT_SUPPORT;
+        }
+        else
+          config->authtype &= ~CURLAUTH_NTLM;
+        break;
+
+      case 'M': /* --ntlm-wb */
+        if(toggle) {
+          if(curlinfo->features & CURL_VERSION_NTLM_WB)
+            config->authtype |= CURLAUTH_NTLM_WB;
+          else
+            return PARAM_LIBCURL_DOESNT_SUPPORT;
+        }
+        else
+          config->authtype &= ~CURLAUTH_NTLM_WB;
+        break;
+
+      case 'n': /* --basic for completeness */
+        if(toggle)
+          config->authtype |= CURLAUTH_BASIC;
+        else
+          config->authtype &= ~CURLAUTH_BASIC;
+        break;
+
+      case 'o': /* --anyauth, let libcurl pick it */
+        if(toggle)
+          config->authtype = CURLAUTH_ANY;
+        /* --no-anyauth simply doesn't touch it */
+        break;
+
+#ifdef USE_WATT32
+      case 'p': /* --wdebug */
+        dbug_init();
+        break;
+#endif
+      case 'q': /* --ftp-create-dirs */
+        config->ftp_create_dirs = toggle;
+        break;
+
+      case 'r': /* --create-dirs */
+        config->create_dirs = TRUE;
+        break;
+
+      case 's': /* --max-redirs */
+        /* specified max no of redirects (http(s)), this accepts -1 as a
+           special condition */
+        err = str2num(&config->maxredirs, nextarg);
+        if(err)
+          return err;
+        if(config->maxredirs < -1)
+          return PARAM_BAD_NUMERIC;
+        break;
+
+      case 't': /* --proxy-ntlm */
+        if(curlinfo->features & CURL_VERSION_NTLM)
+          config->proxyntlm = toggle;
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+
+      case 'u': /* --crlf */
+        /* LF -> CRLF conversion? */
+        config->crlf = TRUE;
+        break;
+
+      case 'v': /* --stderr */
+        if(strcmp(nextarg, "-")) {
+          FILE *newfile = fopen(nextarg, "wt");
+          if(!newfile)
+            warnf(config, "Failed to open %s!\n", nextarg);
+          else {
+            if(config->errors_fopened)
+              fclose(config->errors);
+            config->errors = newfile;
+            config->errors_fopened = TRUE;
+          }
+        }
+        else
+          config->errors = stdout;
+        break;
+      case 'w': /* --interface */
+        /* interface */
+        GetStr(&config->iface, nextarg);
+        break;
+      case 'x': /* --krb */
+        /* kerberos level string */
+        if(curlinfo->features & (CURL_VERSION_KERBEROS4 |
+                                 CURL_VERSION_GSSNEGOTIATE))
+          GetStr(&config->krblevel, nextarg);
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+      case 'y': /* --max-filesize */
+        err = str2offset(&config->max_filesize, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'z': /* --disable-eprt */
+        config->disable_eprt = toggle;
+        break;
+      case 'Z': /* --eprt */
+        config->disable_eprt = (!toggle)?TRUE:FALSE;
+        break;
+
+      default: /* the URL! */
+      {
+        struct getout *url;
+        if(config->url_get || ((config->url_get = config->url_list) != NULL)) {
+          /* there's a node here, if it already is filled-in continue to find
+             an "empty" node */
+          while(config->url_get && (config->url_get->flags & GETOUT_URL))
+            config->url_get = config->url_get->next;
+        }
+
+        /* now there might or might not be an available node to fill in! */
+
+        if(config->url_get)
+          /* existing node */
+          url = config->url_get;
+        else
+          /* there was no free node, create one! */
+          url = new_getout(config);
+
+        if(!url)
+          return PARAM_NO_MEM;
+        else {
+          /* fill in the URL */
+          GetStr(&url->url, nextarg);
+          url->flags |= GETOUT_URL;
+        }
+      }
+      }
+      break;
+    case '$': /* more options without a short option */
+      switch(subletter) {
+      case 'a': /* --ftp-ssl */
+        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        config->ftp_ssl = toggle;
+        break;
+      case 'b': /* --ftp-pasv */
+        Curl_safefree(config->ftpport);
+        break;
+      case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves
+                   the name locally and passes on the resolved address */
+        GetStr(&config->socksproxy, nextarg);
+        config->socksver = CURLPROXY_SOCKS5;
+        break;
+      case 't': /* --socks4 specifies a socks4 proxy to use */
+        GetStr(&config->socksproxy, nextarg);
+        config->socksver = CURLPROXY_SOCKS4;
+        break;
+      case 'T': /* --socks4a specifies a socks4a proxy to use */
+        GetStr(&config->socksproxy, nextarg);
+        config->socksver = CURLPROXY_SOCKS4A;
+        break;
+      case '2': /* --socks5-hostname specifies a socks5 proxy and enables name
+                   resolving with the proxy */
+        GetStr(&config->socksproxy, nextarg);
+        config->socksver = CURLPROXY_SOCKS5_HOSTNAME;
+        break;
+      case 'd': /* --tcp-nodelay option */
+        config->tcp_nodelay = toggle;
+        break;
+      case 'e': /* --proxy-digest */
+        config->proxydigest = toggle;
+        break;
+      case 'f': /* --proxy-basic */
+        config->proxybasic = toggle;
+        break;
+      case 'g': /* --retry */
+        err = str2unum(&config->req_retry, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'h': /* --retry-delay */
+        err = str2unum(&config->retry_delay, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'i': /* --retry-max-time */
+        err = str2unum(&config->retry_maxtime, nextarg);
+        if(err)
+          return err;
+        break;
+
+      case 'k': /* --proxy-negotiate */
+        if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
+          config->proxynegotiate = toggle;
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+      case 'm': /* --ftp-account */
+        GetStr(&config->ftp_account, nextarg);
+        break;
+      case 'n': /* --proxy-anyauth */
+        config->proxyanyauth = toggle;
+        break;
+      case 'o': /* --trace-time */
+        config->tracetime = toggle;
+        break;
+      case 'p': /* --ignore-content-length */
+        config->ignorecl = toggle;
+        break;
+      case 'q': /* --ftp-skip-pasv-ip */
+        config->ftp_skip_ip = toggle;
+        break;
+      case 'r': /* --ftp-method (undocumented at this point) */
+        config->ftp_filemethod = ftpfilemethod(config, nextarg);
+        break;
+      case 's': /* --local-port */
+        rc = sscanf(nextarg, "%d - %d",
+                    &config->localport,
+                    &config->localportrange);
+        if(!rc)
+          return PARAM_BAD_USE;
+        else if(rc == 1)
+          config->localportrange = 1; /* default number of ports to try */
+        else {
+          config->localportrange -= config->localport;
+          if(config->localportrange < 1) {
+            warnf(config, "bad range input\n");
+            return PARAM_BAD_USE;
+          }
+        }
+        break;
+      case 'u': /* --ftp-alternative-to-user */
+        GetStr(&config->ftp_alternative_to_user, nextarg);
+        break;
+      case 'v': /* --ftp-ssl-reqd */
+        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        config->ftp_ssl_reqd = toggle;
+        break;
+      case 'w': /* --no-sessionid */
+        config->disable_sessionid = (!toggle)?TRUE:FALSE;
+        break;
+      case 'x': /* --ftp-ssl-control */
+        if(toggle && !(curlinfo->features & CURL_VERSION_SSL))
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        config->ftp_ssl_control = toggle;
+        break;
+      case 'y': /* --ftp-ssl-ccc */
+        config->ftp_ssl_ccc = toggle;
+        if(!config->ftp_ssl_ccc_mode)
+          config->ftp_ssl_ccc_mode = CURLFTPSSL_CCC_PASSIVE;
+        break;
+      case 'j': /* --ftp-ssl-ccc-mode */
+        config->ftp_ssl_ccc = TRUE;
+        config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
+        break;
+      case 'z': /* --libcurl */
+#ifdef CURL_DISABLE_LIBCURL_OPTION
+        warnf(config,
+              "--libcurl option was disabled at build-time!\n");
+        return PARAM_OPTION_UNKNOWN;
+#else
+        GetStr(&config->libcurl, nextarg);
+        break;
+#endif
+      case '#': /* --raw */
+        config->raw = toggle;
+        break;
+      case '0': /* --post301 */
+        config->post301 = toggle;
+        break;
+      case '1': /* --no-keepalive */
+        config->nokeepalive = (!toggle)?TRUE:FALSE;
+        break;
+      case '3': /* --keepalive-time */
+        err = str2unum(&config->alivetime, nextarg);
+        if(err)
+          return err;
+        break;
+      case '4': /* --post302 */
+        config->post302 = toggle;
+        break;
+      case 'I': /* --post303 */
+        config->post303 = toggle;
+        break;
+      case '5': /* --noproxy */
+        /* This specifies the noproxy list */
+        GetStr(&config->noproxy, nextarg);
+        break;
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+      case '6': /* --socks5-gssapi-service */
+        GetStr(&config->socks5_gssapi_service, nextarg);
+        break;
+      case '7': /* --socks5-gssapi-nec*/
+        config->socks5_gssapi_nec = TRUE;
+        break;
+#endif
+      case '8': /* --proxy1.0 */
+        /* http 1.0 proxy */
+        GetStr(&config->proxy, nextarg);
+        config->proxyver = CURLPROXY_HTTP_1_0;
+        break;
+      case '9': /* --tftp-blksize */
+        err = str2unum(&config->tftp_blksize, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'A': /* --mail-from */
+        GetStr(&config->mail_from, nextarg);
+        break;
+      case 'B': /* --mail-rcpt */
+        /* append receiver to a list */
+        err = add2list(&config->mail_rcpt, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'C': /* --ftp-pret */
+        config->ftp_pret = toggle;
+        break;
+      case 'D': /* --proto */
+        config->proto_present = TRUE;
+        if(proto2num(config, &config->proto, nextarg))
+          return PARAM_BAD_USE;
+        break;
+      case 'E': /* --proto-redir */
+        config->proto_redir_present = TRUE;
+        if(proto2num(config, &config->proto_redir, nextarg))
+          return PARAM_BAD_USE;
+        break;
+      case 'F': /* --resolve */
+        err = add2list(&config->resolve, nextarg);
+        if(err)
+          return err;
+        break;
+      case 'G': /* --delegation LEVEL */
+        config->gssapi_delegation = delegation(config, nextarg);
+        break;
+      case 'H': /* --mail-auth */
+        GetStr(&config->mail_auth, nextarg);
+        break;
+      case 'J': /* --metalink */
+        {
+#ifdef USE_METALINK
+          int mlmaj, mlmin, mlpatch;
+          metalink_get_version(&mlmaj, &mlmin, &mlpatch);
+          if((mlmaj*10000)+(mlmin*100)+mlpatch < CURL_REQ_LIBMETALINK_VERS) {
+            warnf(config,
+                  "--metalink option cannot be used because the version of "
+                  "the linked libmetalink library is too old. "
+                  "Required: %d.%d.%d, found %d.%d.%d\n",
+                  CURL_REQ_LIBMETALINK_MAJOR,
+                  CURL_REQ_LIBMETALINK_MINOR,
+                  CURL_REQ_LIBMETALINK_PATCH,
+                  mlmaj, mlmin, mlpatch);
+            return PARAM_BAD_USE;
+          }
+          else
+            config->use_metalink = toggle;
+#else
+          warnf(config, "--metalink option is ignored because the binary is "
+                "built without the Metalink support.\n");
+#endif
+          break;
+        }
+      case 'K': /* --sasl-ir */
+        config->sasl_ir = TRUE;
+        break;
+      }
+      break;
+    case '#': /* --progress-bar */
+      if(toggle)
+        config->progressmode = CURL_PROGRESS_BAR;
+      else
+        config->progressmode = CURL_PROGRESS_STATS;
+      break;
+    case '~': /* --xattr */
+      config->xattr = toggle;
+      break;
+    case '0':
+      /* HTTP version 1.0 */
+      config->httpversion = CURL_HTTP_VERSION_1_0;
+      break;
+    case '1':
+      /* TLS version 1 */
+      config->ssl_version = CURL_SSLVERSION_TLSv1;
+      break;
+    case '2':
+      /* SSL version 2 */
+      config->ssl_version = CURL_SSLVERSION_SSLv2;
+      break;
+    case '3':
+      /* SSL version 3 */
+      config->ssl_version = CURL_SSLVERSION_SSLv3;
+      break;
+    case '4':
+      /* IPv4 */
+      config->ip_version = 4;
+      break;
+    case '6':
+      /* IPv6 */
+      config->ip_version = 6;
+      break;
+    case 'a':
+      /* This makes the FTP sessions use APPE instead of STOR */
+      config->ftp_append = toggle;
+      break;
+    case 'A':
+      /* This specifies the User-Agent name */
+      GetStr(&config->useragent, nextarg);
+      break;
+    case 'b': /* cookie string coming up: */
+      if(nextarg[0] == '@') {
+        nextarg++;
+      }
+      else if(strchr(nextarg, '=')) {
+        /* A cookie string must have a =-letter */
+        GetStr(&config->cookie, nextarg);
+        break;
+      }
+      /* We have a cookie file to read from! */
+      GetStr(&config->cookiefile, nextarg);
+      break;
+    case 'B':
+      /* use ASCII/text when transferring */
+      config->use_ascii = toggle;
+      break;
+    case 'c':
+      /* get the file name to dump all cookies in */
+      GetStr(&config->cookiejar, nextarg);
+      break;
+    case 'C':
+      /* This makes us continue an ftp transfer at given position */
+      if(!curlx_strequal(nextarg, "-")) {
+        err = str2offset(&config->resume_from, nextarg);
+        if(err)
+          return err;
+        config->resume_from_current = FALSE;
+      }
+      else {
+        config->resume_from_current = TRUE;
+        config->resume_from = 0;
+      }
+      config->use_resume=TRUE;
+      break;
+    case 'd':
+      /* postfield data */
+    {
+      char *postdata = NULL;
+      FILE *file;
+      size_t size = 0;
+
+      if(subletter == 'e') { /* --data-urlencode*/
+        /* [name]=[content], we encode the content part only
+         * [name]@[file name]
+         *
+         * Case 2: we first load the file using that name and then encode
+         * the content.
+         */
+        const char *p = strchr(nextarg, '=');
+        size_t nlen;
+        char is_file;
+        if(!p)
+          /* there was no '=' letter, check for a '@' instead */
+          p = strchr(nextarg, '@');
+        if(p) {
+          nlen = p - nextarg; /* length of the name part */
+          is_file = *p++; /* pass the separator */
+        }
+        else {
+          /* neither @ nor =, so no name and it isn't a file */
+          nlen = is_file = 0;
+          p = nextarg;
+        }
+        if('@' == is_file) {
+          /* a '@' letter, it means that a file name or - (stdin) follows */
+
+          if(curlx_strequal("-", p)) {
+            file = stdin;
+            set_binmode(stdin);
+          }
+          else {
+            file = fopen(p, "rb");
+            if(!file)
+              warnf(config,
+                    "Couldn't read data from file \"%s\", this makes "
+                    "an empty POST.\n", nextarg);
+          }
+
+          err = file2memory(&postdata, &size, file);
+
+          if(file && (file != stdin))
+            fclose(file);
+          if(err)
+            return err;
+        }
+        else {
+          GetStr(&postdata, p);
+          if(postdata)
+            size = strlen(postdata);
+        }
+
+        if(!postdata) {
+          /* no data from the file, point to a zero byte string to make this
+             get sent as a POST anyway */
+          postdata = strdup("");
+          if(!postdata)
+            return PARAM_NO_MEM;
+          size = 0;
+        }
+        else {
+          char *enc = curl_easy_escape(config->easy, postdata, (int)size);
+          Curl_safefree(postdata); /* no matter if it worked or not */
+          if(enc) {
+            /* now make a string with the name from above and append the
+               encoded string */
+            size_t outlen = nlen + strlen(enc) + 2;
+            char *n = malloc(outlen);
+            if(!n) {
+              curl_free(enc);
+              return PARAM_NO_MEM;
+            }
+            if(nlen > 0) { /* only append '=' if we have a name */
+              snprintf(n, outlen, "%.*s=%s", nlen, nextarg, enc);
+              size = outlen-1;
+            }
+            else {
+              strcpy(n, enc);
+              size = outlen-2; /* since no '=' was inserted */
+            }
+            curl_free(enc);
+            postdata = n;
+          }
+          else
+            return PARAM_NO_MEM;
+        }
+      }
+      else if('@' == *nextarg) {
+        /* the data begins with a '@' letter, it means that a file name
+           or - (stdin) follows */
+        nextarg++; /* pass the @ */
+
+        if(curlx_strequal("-", nextarg)) {
+          file = stdin;
+          if(subletter == 'b') /* forced data-binary */
+            set_binmode(stdin);
+        }
+        else {
+          file = fopen(nextarg, "rb");
+          if(!file)
+            warnf(config, "Couldn't read data from file \"%s\", this makes "
+                  "an empty POST.\n", nextarg);
+        }
+
+        if(subletter == 'b')
+          /* forced binary */
+          err = file2memory(&postdata, &size, file);
+        else {
+          err = file2string(&postdata, file);
+          if(postdata)
+            size = strlen(postdata);
+        }
+
+        if(file && (file != stdin))
+          fclose(file);
+        if(err)
+          return err;
+
+        if(!postdata) {
+          /* no data from the file, point to a zero byte string to make this
+             get sent as a POST anyway */
+          postdata = strdup("");
+          if(!postdata)
+            return PARAM_NO_MEM;
+        }
+      }
+      else {
+        GetStr(&postdata, nextarg);
+        if(postdata)
+          size = strlen(postdata);
+      }
+
+#ifdef CURL_DOES_CONVERSIONS
+      if(subletter != 'b') {
+        /* NOT forced binary, convert to ASCII */
+        if(convert_to_network(postdata, strlen(postdata))) {
+          Curl_safefree(postdata);
+          return PARAM_NO_MEM;
+        }
+      }
+#endif
+
+      if(config->postfields) {
+        /* we already have a string, we append this one with a separating
+           &-letter */
+        char *oldpost = config->postfields;
+        curl_off_t oldlen = config->postfieldsize;
+        curl_off_t newlen = oldlen + size + 2;
+        config->postfields = malloc((size_t)newlen);
+        if(!config->postfields) {
+          Curl_safefree(oldpost);
+          Curl_safefree(postdata);
+          return PARAM_NO_MEM;
+        }
+        memcpy(config->postfields, oldpost, (size_t)oldlen);
+        /* use byte value 0x26 for '&' to accommodate non-ASCII platforms */
+        config->postfields[oldlen] = '\x26';
+        memcpy(&config->postfields[oldlen+1], postdata, size);
+        config->postfields[oldlen+1+size] = '\0';
+        Curl_safefree(oldpost);
+        Curl_safefree(postdata);
+        config->postfieldsize += size+1;
+      }
+      else {
+        config->postfields = postdata;
+        config->postfieldsize = size;
+      }
+    }
+    /*
+      We can't set the request type here, as this data might be used in
+      a simple GET if -G is used. Already or soon.
+
+      if(SetHTTPrequest(HTTPREQ_SIMPLEPOST, &config->httpreq)) {
+        Curl_safefree(postdata);
+        return PARAM_BAD_USE;
+      }
+    */
+    break;
+    case 'D':
+      /* dump-header to given file name */
+      GetStr(&config->headerfile, nextarg);
+      break;
+    case 'e':
+    {
+      char *ptr = strstr(nextarg, ";auto");
+      if(ptr) {
+        /* Automatic referer requested, this may be combined with a
+           set initial one */
+        config->autoreferer = TRUE;
+        *ptr = 0; /* zero terminate here */
+      }
+      else
+        config->autoreferer = FALSE;
+      GetStr(&config->referer, nextarg);
+    }
+    break;
+    case 'E':
+      switch(subletter) {
+      case 'a': /* CA info PEM file */
+        /* CA info PEM file */
+        GetStr(&config->cacert, nextarg);
+        break;
+      case 'b': /* cert file type */
+        GetStr(&config->cert_type, nextarg);
+        break;
+      case 'c': /* private key file */
+        GetStr(&config->key, nextarg);
+        break;
+      case 'd': /* private key file type */
+        GetStr(&config->key_type, nextarg);
+        break;
+      case 'e': /* private key passphrase */
+        GetStr(&config->key_passwd, nextarg);
+        cleanarg(nextarg);
+        break;
+      case 'f': /* crypto engine */
+        GetStr(&config->engine, nextarg);
+        if(config->engine && curlx_raw_equal(config->engine,"list"))
+          config->list_engines = TRUE;
+        break;
+      case 'g': /* CA info PEM file */
+        /* CA cert directory */
+        GetStr(&config->capath, nextarg);
+        break;
+      case 'h': /* --pubkey public key file */
+        GetStr(&config->pubkey, nextarg);
+        break;
+      case 'i': /* --hostpubmd5 md5 of the host public key */
+        GetStr(&config->hostpubmd5, nextarg);
+        if(!config->hostpubmd5 || strlen(config->hostpubmd5) != 32)
+          return PARAM_BAD_USE;
+        break;
+      case 'j': /* CRL info PEM file */
+        /* CRL file */
+        GetStr(&config->crlfile, nextarg);
+        break;
+      case 'k': /* TLS username */
+        if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP)
+          GetStr(&config->tls_username, nextarg);
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+      case 'l': /* TLS password */
+        if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP)
+          GetStr(&config->tls_password, nextarg);
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+      case 'm': /* TLS authentication type */
+        if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) {
+          GetStr(&config->tls_authtype, nextarg);
+          if(!strequal(config->tls_authtype, "SRP"))
+            return PARAM_LIBCURL_DOESNT_SUPPORT; /* only support TLS-SRP */
+        }
+        else
+          return PARAM_LIBCURL_DOESNT_SUPPORT;
+        break;
+      case 'n': /* no empty SSL fragments */
+        if(curlinfo->features & CURL_VERSION_SSL)
+          config->ssl_allow_beast = toggle;
+        break;
+      default: /* certificate file */
+      {
+        char *certname, *passphrase;
+        parse_cert_parameter(nextarg, &certname, &passphrase);
+        Curl_safefree(config->cert);
+        config->cert = certname;
+        if(passphrase) {
+          Curl_safefree(config->key_passwd);
+          config->key_passwd = passphrase;
+        }
+        cleanarg(nextarg);
+      }
+      }
+      break;
+    case 'f':
+      /* fail hard on errors  */
+      config->failonerror = toggle;
+      break;
+    case 'F':
+      /* "form data" simulation, this is a little advanced so lets do our best
+         to sort this out slowly and carefully */
+      if(formparse(config,
+                   nextarg,
+                   &config->httppost,
+                   &config->last_post,
+                   (subletter=='s')?TRUE:FALSE)) /* 's' means literal string */
+        return PARAM_BAD_USE;
+      if(SetHTTPrequest(config, HTTPREQ_POST, &config->httpreq))
+        return PARAM_BAD_USE;
+      break;
+
+    case 'g': /* g disables URLglobbing */
+      config->globoff = toggle;
+      break;
+
+    case 'G': /* HTTP GET */
+      config->use_httpget = TRUE;
+      break;
+
+    case 'h': /* h for help */
+      if(toggle) {
+        tool_help();
+        return PARAM_HELP_REQUESTED;
+      }
+      /* we now actually support --no-help too! */
+      break;
+    case 'H':
+      /* A custom header to append to a list */
+      err = add2list(&config->headers, nextarg);
+      if(err)
+        return err;
+      break;
+    case 'i':
+      config->include_headers = toggle; /* include the headers as well in the
+                                           general output stream */
+      break;
+    case 'j':
+      config->cookiesession = toggle;
+      break;
+    case 'I':
+      /*
+       * no_body will imply include_headers later on
+       */
+      config->no_body = toggle;
+      if(SetHTTPrequest(config,
+                        (config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
+                        &config->httpreq))
+        return PARAM_BAD_USE;
+      break;
+    case 'J': /* --remote-header-name */
+      if(config->include_headers) {
+        warnf(config,
+              "--include and --remote-header-name cannot be combined.\n");
+        return PARAM_BAD_USE;
+      }
+      config->content_disposition = toggle;
+      break;
+    case 'k': /* allow insecure SSL connects */
+      config->insecure_ok = toggle;
+      break;
+    case 'K': /* parse config file */
+      if(parseconfig(nextarg, config))
+        warnf(config, "error trying read config from the '%s' file\n",
+              nextarg);
+      break;
+    case 'l':
+      config->dirlistonly = toggle; /* only list the names of the FTP dir */
+      break;
+    case 'L':
+      config->followlocation = toggle; /* Follow Location: HTTP headers */
+      switch (subletter) {
+      case 't':
+        /* Continue to send authentication (user+password) when following
+         * locations, even when hostname changed */
+        config->unrestricted_auth = toggle;
+        break;
+      }
+      break;
+    case 'm':
+      /* specified max time */
+      err = str2udouble(&config->timeout, nextarg);
+      if(err)
+        return err;
+      break;
+    case 'M': /* M for manual, huge help */
+      if(toggle) { /* --no-manual shows no manual... */
+#ifdef USE_MANUAL
+        hugehelp();
+        return PARAM_HELP_REQUESTED;
+#else
+        warnf(config,
+              "built-in manual was disabled at build-time!\n");
+        return PARAM_OPTION_UNKNOWN;
+#endif
+      }
+      break;
+    case 'n':
+      switch(subletter) {
+      case 'o': /* CA info PEM file */
+        /* use .netrc or URL */
+        config->netrc_opt = toggle;
+        break;
+      case 'e': /* netrc-file */
+        GetStr(&config->netrc_file, nextarg);
+        break;
+      default:
+        /* pick info from .netrc, if this is used for http, curl will
+           automatically enfore user+password with the request */
+        config->netrc = toggle;
+        break;
+      }
+      break;
+    case 'N':
+      /* disable the output I/O buffering. note that the option is called
+         --buffer but is mostly used in the negative form: --no-buffer */
+      if(longopt)
+        config->nobuffer = (!toggle)?TRUE:FALSE;
+      else
+        config->nobuffer = toggle;
+      break;
+    case 'O': /* --remote-name */
+      if(subletter == 'a') { /* --remote-name-all */
+        config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
+        break;
+      }
+      /* fall-through! */
+    case 'o': /* --output */
+      /* output file */
+    {
+      struct getout *url;
+      if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
+        /* there's a node here, if it already is filled-in continue to find
+           an "empty" node */
+        while(config->url_out && (config->url_out->flags & GETOUT_OUTFILE))
+          config->url_out = config->url_out->next;
+      }
+
+      /* now there might or might not be an available node to fill in! */
+
+      if(config->url_out)
+        /* existing node */
+        url = config->url_out;
+      else
+        /* there was no free node, create one! */
+        url = new_getout(config);
+
+      if(!url)
+        return PARAM_NO_MEM;
+      else {
+        /* fill in the outfile */
+        if('o' == letter) {
+          GetStr(&url->outfile, nextarg);
+          url->flags &= ~GETOUT_USEREMOTE; /* switch off */
+        }
+        else {
+          url->outfile = NULL; /* leave it */
+          if(toggle)
+            url->flags |= GETOUT_USEREMOTE;  /* switch on */
+          else
+            url->flags &= ~GETOUT_USEREMOTE; /* switch off */
+        }
+        url->flags |= GETOUT_OUTFILE;
+      }
+    }
+    break;
+    case 'P':
+      /* This makes the FTP sessions use PORT instead of PASV */
+      /* use <eth0> or <192.168.10.10> style addresses. Anything except
+         this will make us try to get the "default" address.
+         NOTE: this is a changed behaviour since the released 4.1!
+      */
+      GetStr(&config->ftpport, nextarg);
+      break;
+    case 'p':
+      /* proxy tunnel for non-http protocols */
+      config->proxytunnel = toggle;
+      break;
+
+    case 'q': /* if used first, already taken care of, we do it like
+                 this so we don't cause an error! */
+      break;
+    case 'Q':
+      /* QUOTE command to send to FTP server */
+      switch(nextarg[0]) {
+      case '-':
+        /* prefixed with a dash makes it a POST TRANSFER one */
+        nextarg++;
+        err = add2list(&config->postquote, nextarg);
+        break;
+      case '+':
+        /* prefixed with a plus makes it a just-before-transfer one */
+        nextarg++;
+        err = add2list(&config->prequote, nextarg);
+        break;
+      default:
+        err = add2list(&config->quote, nextarg);
+        break;
+      }
+      if(err)
+        return err;
+      break;
+    case 'r':
+      /* Specifying a range WITHOUT A DASH will create an illegal HTTP range
+         (and won't actually be range by definition). The man page previously
+         claimed that to be a good way, why this code is added to work-around
+         it. */
+      if(ISDIGIT(*nextarg) && !strchr(nextarg, '-')) {
+        char buffer[32];
+        curl_off_t off;
+        warnf(config,
+              "A specified range MUST include at least one dash (-). "
+              "Appending one for you!\n");
+        off = curlx_strtoofft(nextarg, NULL, 10);
+        snprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", off);
+        Curl_safefree(config->range);
+        config->range = strdup(buffer);
+        if(!config->range)
+          return PARAM_NO_MEM;
+      }
+      {
+        /* byte range requested */
+        char *tmp_range;
+        tmp_range = nextarg;
+        while(*tmp_range != '\0') {
+          if(!ISDIGIT(*tmp_range) && *tmp_range != '-' && *tmp_range != ',') {
+            warnf(config,"Invalid character is found in given range. "
+                  "A specified range MUST have only digits in "
+                  "\'start\'-\'stop\'. The server's response to this "
+                  "request is uncertain.\n");
+            break;
+          }
+          tmp_range++;
+        }
+        /* byte range requested */
+        GetStr(&config->range, nextarg);
+      }
+      break;
+    case 'R':
+      /* use remote file's time */
+      config->remote_time = toggle;
+      break;
+    case 's':
+      /* don't show progress meter, don't show errors : */
+      if(toggle)
+        config->mute = config->noprogress = TRUE;
+      else
+        config->mute = config->noprogress = FALSE;
+      if(config->showerror < 0)
+        /* if still on the default value, set showerror to the reverse of
+           toggle. This is to allow -S and -s to be used in an independent
+           order but still have the same effect. */
+        config->showerror = (!toggle)?TRUE:FALSE; /* toggle off */
+      break;
+    case 'S':
+      /* show errors */
+      config->showerror = toggle?1:0; /* toggle on if used with -s */
+      break;
+    case 't':
+      /* Telnet options */
+      err = add2list(&config->telnet_options, nextarg);
+      if(err)
+        return err;
+      break;
+    case 'T':
+      /* we are uploading */
+    {
+      struct getout *url;
+      if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
+        /* there's a node here, if it already is filled-in continue to find
+           an "empty" node */
+        while(config->url_out && (config->url_out->flags & GETOUT_UPLOAD))
+          config->url_out = config->url_out->next;
+      }
+
+      /* now there might or might not be an available node to fill in! */
+
+      if(config->url_out)
+        /* existing node */
+        url = config->url_out;
+      else
+        /* there was no free node, create one! */
+        url = new_getout(config);
+
+      if(!url)
+        return PARAM_NO_MEM;
+      else {
+        url->flags |= GETOUT_UPLOAD; /* mark -T used */
+        if(!*nextarg)
+          url->flags |= GETOUT_NOUPLOAD;
+        else {
+          /* "-" equals stdin, but keep the string around for now */
+          GetStr(&url->infile, nextarg);
+        }
+      }
+    }
+    break;
+    case 'u':
+      /* user:password  */
+      GetStr(&config->userpwd, nextarg);
+      cleanarg(nextarg);
+      err = checkpasswd("host", &config->userpwd);
+      if(err)
+        return err;
+      break;
+    case 'U':
+      /* Proxy user:password  */
+      GetStr(&config->proxyuserpwd, nextarg);
+      cleanarg(nextarg);
+      err = checkpasswd("proxy", &config->proxyuserpwd);
+      if(err)
+        return err;
+      break;
+    case 'v':
+      if(toggle) {
+        /* the '%' thing here will cause the trace get sent to stderr */
+        Curl_safefree(config->trace_dump);
+        config->trace_dump = strdup("%");
+        if(!config->trace_dump)
+          return PARAM_NO_MEM;
+        if(config->tracetype && (config->tracetype != TRACE_PLAIN))
+          warnf(config,
+                "-v, --verbose overrides an earlier trace/verbose option\n");
+        config->tracetype = TRACE_PLAIN;
+      }
+      else
+        /* verbose is disabled here */
+        config->tracetype = TRACE_NONE;
+      break;
+    case 'V':
+    {
+      const char *const *proto;
+
+      if(!toggle)
+        /* --no-version yields no output! */
+        break;
+
+      printf(CURL_ID "%s\n", curl_version());
+      if(curlinfo->protocols) {
+        printf("Protocols: ");
+        for(proto = curlinfo->protocols; *proto; ++proto) {
+          printf("%s ", *proto);
+        }
+        puts(""); /* newline */
+      }
+      if(curlinfo->features) {
+        unsigned int i;
+        printf("Features: ");
+        for(i = 0; i < sizeof(feats)/sizeof(feats[0]); i++) {
+          if(curlinfo->features & feats[i].bitmask)
+            printf("%s ", feats[i].name);
+        }
+#ifdef USE_METALINK
+        printf("Metalink ");
+#endif
+        puts(""); /* newline */
+      }
+    }
+    return PARAM_HELP_REQUESTED;
+    case 'w':
+      /* get the output string */
+      if('@' == *nextarg) {
+        /* the data begins with a '@' letter, it means that a file name
+           or - (stdin) follows */
+        FILE *file;
+        const char *fname;
+        nextarg++; /* pass the @ */
+        if(curlx_strequal("-", nextarg)) {
+          fname = "<stdin>";
+          file = stdin;
+        }
+        else {
+          fname = nextarg;
+          file = fopen(nextarg, "r");
+        }
+        err = file2string(&config->writeout, file);
+        if(file && (file != stdin))
+          fclose(file);
+        if(err)
+          return err;
+        if(!config->writeout)
+          warnf(config, "Failed to read %s", fname);
+      }
+      else
+        GetStr(&config->writeout, nextarg);
+      break;
+    case 'x':
+      /* proxy */
+      GetStr(&config->proxy, nextarg);
+      config->proxyver = CURLPROXY_HTTP;
+      break;
+    case 'X':
+      /* set custom request */
+      GetStr(&config->customrequest, nextarg);
+      break;
+    case 'y':
+      /* low speed time */
+      err = str2unum(&config->low_speed_time, nextarg);
+      if(err)
+        return err;
+      if(!config->low_speed_limit)
+        config->low_speed_limit = 1;
+      break;
+    case 'Y':
+      /* low speed limit */
+      err = str2unum(&config->low_speed_limit, nextarg);
+      if(err)
+        return err;
+      if(!config->low_speed_time)
+        config->low_speed_time = 30;
+      break;
+    case 'z': /* time condition coming up */
+      switch(*nextarg) {
+      case '+':
+        nextarg++;
+      default:
+        /* If-Modified-Since: (section 14.28 in RFC2068) */
+        config->timecond = CURL_TIMECOND_IFMODSINCE;
+        break;
+      case '-':
+        /* If-Unmodified-Since:  (section 14.24 in RFC2068) */
+        config->timecond = CURL_TIMECOND_IFUNMODSINCE;
+        nextarg++;
+        break;
+      case '=':
+        /* Last-Modified:  (section 14.29 in RFC2068) */
+        config->timecond = CURL_TIMECOND_LASTMOD;
+        nextarg++;
+        break;
+      }
+      now = time(NULL);
+      config->condtime=curl_getdate(nextarg, &now);
+      if(-1 == (int)config->condtime) {
+        /* now let's see if it is a file name to get the time from instead! */
+        struct_stat statbuf;
+        if(-1 == stat(nextarg, &statbuf)) {
+          /* failed, remove time condition */
+          config->timecond = CURL_TIMECOND_NONE;
+          warnf(config,
+                "Illegal date format for -z, --timecond (and not "
+                "a file name). Disabling time condition. "
+                "See curl_getdate(3) for valid date syntax.\n");
+        }
+        else {
+          /* pull the time out from the file */
+          config->condtime = statbuf.st_mtime;
+        }
+      }
+      break;
+    default: /* unknown flag */
+      return PARAM_OPTION_UNKNOWN;
+    }
+    hit = -1;
+
+  } while(!longopt && !singleopt && *++parse && !*usedarg);
+
+  return PARAM_OK;
+}
+
diff --git a/src/tool_getparam.h b/src/tool_getparam.h
new file mode 100644 (file)
index 0000000..a86bfce
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef HEADER_CURL_TOOL_GETPARAM_H
+#define HEADER_CURL_TOOL_GETPARAM_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+typedef enum {
+  PARAM_OK = 0,
+  PARAM_OPTION_AMBIGUOUS,
+  PARAM_OPTION_UNKNOWN,
+  PARAM_REQUIRES_PARAMETER,
+  PARAM_BAD_USE,
+  PARAM_HELP_REQUESTED,
+  PARAM_GOT_EXTRA_PARAMETER,
+  PARAM_BAD_NUMERIC,
+  PARAM_NEGATIVE_NUMERIC,
+  PARAM_LIBCURL_DOESNT_SUPPORT,
+  PARAM_NO_MEM,
+  PARAM_LAST
+} ParameterError;
+
+struct Configurable;
+
+ParameterError getparameter(char *flag,
+                            char *nextarg,
+                            bool *usedarg,
+                            struct Configurable *config);
+
+#ifdef UNITTESTS
+void parse_cert_parameter(const char *cert_parameter,
+                          char **certname,
+                          char **passphrase);
+#endif
+
+#endif /* HEADER_CURL_TOOL_GETPARAM_H */
+
similarity index 72%
rename from src/getpass.c
rename to src/tool_getpass.c
index b441a5a..0ac7dcb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-/* This file is a reimplementation of the previous one, due to license
-   problems. */
-
-#include "setup.h"
+#include "tool_setup.h"
 
 #ifndef HAVE_GETPASS_R
 /* this file is only for systems without getpass_r() */
 
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "getpass.h"
-
 #ifdef HAVE_FCNTL_H
-#include <fcntl.h>
+#  include <fcntl.h>
 #endif
+
 #ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#else
-#ifdef HAVE_TERMIO_H
-#include <termio.h>
+#  include <termios.h>
+#elif defined(HAVE_TERMIO_H)
+#  include <termio.h>
 #endif
+
+#ifdef __VMS
+#  include descrip
+#  include starlet
+#  include iodef
 #endif
 
-/* The last #include file should be: */
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
+#ifdef WIN32
+#  include <conio.h>
 #endif
 
+#ifdef NETWARE
+#  ifdef __NOVELL_LIBC__
+#    include <screen.h>
+#  else
+#    include <nwconio.h>
+#  endif
+#endif
+
+#define _MPRINTF_REPLACE
+#include <curl/mprintf.h>
+
+#include "tool_getpass.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
 #ifdef __VMS
 /* VMS implementation */
-#include descrip
-#include starlet
-#include iodef
-/* #include iosbdef */
 char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 {
   long sts;
@@ -76,15 +78,15 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 
   $DESCRIPTOR(ttdesc, "TT");
 
-  buffer[0]='\0';
-  sts = sys$assign(&ttdesc, &chan,0,0);
-  if (sts & 1) {
+  buffer[0] = '\0';
+  sts = sys$assign(&ttdesc, &chan, 0, 0);
+  if(sts & 1) {
     sts = sys$qiow(0, chan,
                    IO$_READPROMPT | IO$M_NOECHO,
                    &iosb, 0, 0, buffer, buflen, 0, 0,
                    prompt, strlen(prompt));
 
-    if((sts & 1) && (iosb.iosb$w_status&1))
+    if((sts & 1) && (iosb.iosb$w_status & 1))
       buffer[iosb.iosb$w_bcnt] = '\0';
 
     sts = sys$dassgn(chan);
@@ -94,14 +96,8 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 #define DONE
 #endif /* __VMS */
 
-
-#ifdef WIN32
-/* Windows implementation */
-#include <conio.h>
-#endif
-
 #ifdef __SYMBIAN32__
-#define getch() getchar()
+#  define getch() getchar()
 #endif
 
 #if defined(WIN32) || defined(__SYMBIAN32__)
@@ -111,25 +107,25 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
   size_t i;
   fputs(prompt, stderr);
 
-  for(i=0; i<buflen; i++) {
+  for(i = 0; i < buflen; i++) {
     buffer[i] = (char)getch();
-    if ( buffer[i] == '\r' || buffer[i] == '\n' ) {
-      buffer[i] = 0;
+    if(buffer[i] == '\r' || buffer[i] == '\n') {
+      buffer[i] = '\0';
       break;
     }
     else
-      if ( buffer[i] == '\b')
+      if(buffer[i] == '\b')
         /* remove this letter and if this is not the first key, remove the
            previous one as well */
-        i = i - (i>=1?2:1);
+        i = i - (i >= 1) ? 2 : 1;
   }
 #ifndef __SYMBIAN32__
   /* since echo is disabled, print a newline */
   fputs("\n", stderr);
 #endif
   /* if user didn't hit ENTER, terminate buffer */
-  if (i==buflen)
-    buffer[buflen-1]=0;
+  if(i == buflen)
+    buffer[buflen-1] = '\0';
 
   return buffer; /* we always return success */
 }
@@ -139,13 +135,11 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 #ifdef NETWARE
 /* NetWare implementation */
 #ifdef __NOVELL_LIBC__
-#include <screen.h>
 char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 {
   return getpassword(prompt, buffer, buflen);
 }
 #else
-#include <nwconio.h>
 char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 {
   size_t i = 0;
@@ -153,21 +147,23 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
   printf("%s", prompt);
   do {
     buffer[i++] = getch();
-    if (buffer[i-1] == '\b') {
+    if(buffer[i-1] == '\b') {
       /* remove this letter and if this is not the first key,
          remove the previous one as well */
-      if (i > 1) {
+      if(i > 1) {
         printf("\b \b");
         i = i - 2;
-      } else {
+      }
+      else {
         RingTheBell();
         i = i - 1;
       }
-    } else if (buffer[i-1] != 13) {
-      putchar('*');
     }
-  } while ((buffer[i-1] != 13) && (i < buflen));
-  buffer[i-1] = 0;
+    else if(buffer[i-1] != 13)
+      putchar('*');
+
+  } while((buffer[i-1] != 13) && (i < buflen));
+  buffer[i-1] = '\0';
   printf("\r\n");
   return buffer;
 }
@@ -178,13 +174,11 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
 #ifndef DONE /* not previously provided */
 
 #ifdef HAVE_TERMIOS_H
-#define struct_term struct termios
+#  define struct_term  struct termios
+#elif defined(HAVE_TERMIO_H)
+#  define struct_term  struct termio
 #else
-#ifdef HAVE_TERMIO_H
-#define struct_term  struct termio
-#else
-#undef struct_term
-#endif
+#  undef  struct_term
 #endif
 
 static bool ttyecho(bool enable, int fd)
@@ -194,25 +188,23 @@ static bool ttyecho(bool enable, int fd)
   static struct_term noecho;
 #endif
   if(!enable) {
-  /* disable echo by extracting the current 'withecho' mode and remove the
-     ECHO bit and set back the struct */
+    /* disable echo by extracting the current 'withecho' mode and remove the
+       ECHO bit and set back the struct */
 #ifdef HAVE_TERMIOS_H
     tcgetattr(fd, &withecho);
     noecho = withecho;
     noecho.c_lflag &= ~ECHO;
     tcsetattr(fd, TCSANOW, &noecho);
-#else /* HAVE_TERMIOS_H */
-#ifdef HAVE_TERMIO_H
+#elif defined(HAVE_TERMIO_H)
     ioctl(fd, TCGETA, &withecho);
     noecho = withecho;
     noecho.c_lflag &= ~ECHO;
     ioctl(fd, TCSETA, &noecho);
-#else /* HAVE_TERMIO_H */
-/* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we can't disable echo! */
-    (void)fd; /* prevent compiler warning on unused variable */
+#else
+    /* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H, we can't disable echo! */
+    (void)fd;
     return FALSE; /* not disabled */
 #endif
-#endif
     return TRUE; /* disabled */
   }
   else {
@@ -220,14 +212,11 @@ static bool ttyecho(bool enable, int fd)
        now use to reset the terminal status) */
 #ifdef HAVE_TERMIOS_H
     tcsetattr(fd, TCSAFLUSH, &withecho);
-#else /* HAVE_TERMIOS_H */
-#ifdef HAVE_TERMIO_H
+#elif defined(HAVE_TERMIO_H)
     ioctl(fd, TCSETA, &withecho);
 #else
-/* neither HAVE_TERMIO_H nor HAVE_TERMIOS_H */
     return FALSE; /* not enabled */
 #endif
-#endif
     return TRUE; /* enabled */
   }
 }
@@ -238,18 +227,18 @@ char *getpass_r(const char *prompt, /* prompt to display */
 {
   ssize_t nread;
   bool disabled;
-  int fd=open("/dev/tty", O_RDONLY);
+  int fd = open("/dev/tty", O_RDONLY);
   if(-1 == fd)
     fd = 1; /* use stdin if the tty couldn't be used */
 
   disabled = ttyecho(FALSE, fd); /* disable terminal echo */
 
   fputs(prompt, stderr);
-  nread=read(fd, password, buflen);
+  nread = read(fd, password, buflen);
   if(nread > 0)
-    password[--nread]=0; /* zero terminate where enter is stored */
+    password[--nread] = '\0'; /* zero terminate where enter is stored */
   else
-    password[0]=0; /* got nothing */
+    password[0] = '\0'; /* got nothing */
 
   if(disabled) {
     /* if echo actually was disabled, add a newline */
similarity index 81%
rename from src/getpass.h
rename to src/tool_getpass.h
index 3b29d47..d4fc7e2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __GETPASS_H
-#define __GETPASS_H
+#ifndef HEADER_CURL_TOOL_GETPASS_H
+#define HEADER_CURL_TOOL_GETPASS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,8 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
+
 #ifndef HAVE_GETPASS_R
 /* If there's a system-provided function named like this, we trust it is
    also found in one of the standard headers. */
@@ -28,7 +30,7 @@
 /*
  * Returning NULL will abort the continued operation!
  */
-char* getpass_r(const char *prompt, char* buffer, size_t buflen );
+char* getpass_r(const char *prompt, char* buffer, size_t buflen);
 #endif
 
-#endif
+#endif /* HEADER_CURL_TOOL_GETPASS_H */
diff --git a/src/tool_help.c b/src/tool_help.c
new file mode 100644 (file)
index 0000000..64534ac
--- /dev/null
@@ -0,0 +1,246 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include "tool_panykey.h"
+#include "tool_help.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef MSDOS
+#  define USE_WATT32
+#endif
+
+/*
+ * A few of these source lines are >80 columns wide, but that's only because
+ * breaking the strings narrower makes this chunk look even worse!
+ *
+ *  Starting with 7.18.0, this list of command line options is sorted based
+ *  on the long option name. It is not done automatically, although a command
+ *  line like the following can help out:
+ *
+ *  curl --help | cut -c5- | grep "^-" | sort
+ */
+
+static const char *const helptext[] = {
+  "Usage: curl [options...] <url>",
+  "Options: (H) means HTTP/HTTPS only, (F) means FTP only",
+  "     --anyauth       Pick \"any\" authentication method (H)",
+  " -a, --append        Append to target file when uploading (F/SFTP)",
+  "     --basic         Use HTTP Basic Authentication (H)",
+  "     --cacert FILE   CA certificate to verify peer against (SSL)",
+  "     --capath DIR    CA directory to verify peer against (SSL)",
+  " -E, --cert CERT[:PASSWD] Client certificate file and password (SSL)",
+  "     --cert-type TYPE Certificate file type (DER/PEM/ENG) (SSL)",
+  "     --ciphers LIST  SSL ciphers to use (SSL)",
+  "     --compressed    Request compressed response (using deflate or gzip)",
+  " -K, --config FILE   Specify which config file to read",
+  "     --connect-timeout SECONDS  Maximum time allowed for connection",
+  " -C, --continue-at OFFSET  Resumed transfer offset",
+  " -b, --cookie STRING/FILE  String or file to read cookies from (H)",
+  " -c, --cookie-jar FILE  Write cookies to this file after operation (H)",
+  "     --create-dirs   Create necessary local directory hierarchy",
+  "     --crlf          Convert LF to CRLF in upload",
+  "     --crlfile FILE  Get a CRL list in PEM format from the given file",
+  " -d, --data DATA     HTTP POST data (H)",
+  "     --data-ascii DATA  HTTP POST ASCII data (H)",
+  "     --data-binary DATA  HTTP POST binary data (H)",
+  "     --data-urlencode DATA  HTTP POST data url encoded (H)",
+  "     --delegation STRING GSS-API delegation permission",
+  "     --digest        Use HTTP Digest Authentication (H)",
+  "     --disable-eprt  Inhibit using EPRT or LPRT (F)",
+  "     --disable-epsv  Inhibit using EPSV (F)",
+  " -D, --dump-header FILE  Write the headers to this file",
+  "     --egd-file FILE  EGD socket path for random data (SSL)",
+  "     --engine ENGINE  Crypto engine (SSL). \"--engine list\" for list",
+#ifdef USE_ENVIRONMENT
+  "     --environment   Write results to environment variables (RISC OS)",
+#endif
+  " -f, --fail          Fail silently (no output at all) on HTTP errors (H)",
+  " -F, --form CONTENT  Specify HTTP multipart POST data (H)",
+  "     --form-string STRING  Specify HTTP multipart POST data (H)",
+  "     --ftp-account DATA  Account data string (F)",
+  "     --ftp-alternative-to-user COMMAND  "
+  "String to replace \"USER [name]\" (F)",
+  "     --ftp-create-dirs  Create the remote dirs if not present (F)",
+  "     --ftp-method [MULTICWD/NOCWD/SINGLECWD] Control CWD usage (F)",
+  "     --ftp-pasv      Use PASV/EPSV instead of PORT (F)",
+  " -P, --ftp-port ADR  Use PORT with given address instead of PASV (F)",
+  "     --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n"
+  "     --ftp-pret      Send PRET before PASV (for drftpd) (F)",
+  "     --ftp-ssl-ccc   Send CCC after authenticating (F)",
+  "     --ftp-ssl-ccc-mode ACTIVE/PASSIVE  Set CCC mode (F)",
+  "     --ftp-ssl-control Require SSL/TLS for ftp login, "
+  "clear for transfer (F)",
+  " -G, --get           Send the -d data with a HTTP GET (H)",
+  " -g, --globoff       Disable URL sequences and ranges using {} and []",
+  " -H, --header LINE   Custom header to pass to server (H)",
+  " -I, --head          Show document info only",
+  " -h, --help          This help text",
+  "     --hostpubmd5 MD5  "
+  "Hex encoded MD5 string of the host public key. (SSH)",
+  " -0, --http1.0       Use HTTP 1.0 (H)",
+  "     --ignore-content-length  Ignore the HTTP Content-Length header",
+  " -i, --include       Include protocol headers in the output (H/F)",
+  " -k, --insecure      Allow connections to SSL sites without certs (H)",
+  "     --interface INTERFACE  Specify network interface/address to use",
+  " -4, --ipv4          Resolve name to IPv4 address",
+  " -6, --ipv6          Resolve name to IPv6 address",
+  " -j, --junk-session-cookies Ignore session cookies read from file (H)",
+  "     --keepalive-time SECONDS  Interval between keepalive probes",
+  "     --key KEY       Private key file name (SSL/SSH)",
+  "     --key-type TYPE Private key file type (DER/PEM/ENG) (SSL)",
+  "     --krb LEVEL     Enable Kerberos with specified security level (F)",
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+  "     --libcurl FILE  Dump libcurl equivalent code of this command line",
+#endif
+  "     --limit-rate RATE  Limit transfer speed to this rate",
+  " -l, --list-only     List only names of an FTP directory (F)",
+  "     --local-port RANGE  Force use of these local port numbers",
+  " -L, --location      Follow redirects (H)",
+  "     --location-trusted like --location and send auth to other hosts (H)",
+  " -M, --manual        Display the full manual",
+  "     --mail-from FROM  Mail from this address",
+  "     --mail-rcpt TO  Mail to this receiver(s)",
+  "     --mail-auth AUTH  Originator address of the original email",
+  "     --max-filesize BYTES  Maximum file size to download (H/F)",
+  "     --max-redirs NUM  Maximum number of redirects allowed (H)",
+  " -m, --max-time SECONDS  Maximum time allowed for the transfer",
+  "     --metalink      Process given URLs as metalink XML file",
+  "     --negotiate     Use HTTP Negotiate Authentication (H)",
+  " -n, --netrc         Must read .netrc for user name and password",
+  "     --netrc-optional Use either .netrc or URL; overrides -n",
+  "     --netrc-file FILE  Set up the netrc filename to use",
+  " -N, --no-buffer     Disable buffering of the output stream",
+  "     --no-keepalive  Disable keepalive use on the connection",
+  "     --no-sessionid  Disable SSL session-ID reusing (SSL)",
+  "     --noproxy       List of hosts which do not use proxy",
+  "     --ntlm          Use HTTP NTLM authentication (H)",
+  " -o, --output FILE   Write output to <file> instead of stdout",
+  "     --pass PASS     Pass phrase for the private key (SSL/SSH)",
+  "     --post301       "
+  "Do not switch to GET after following a 301 redirect (H)",
+  "     --post302       "
+  "Do not switch to GET after following a 302 redirect (H)",
+  "     --post303       "
+  "Do not switch to GET after following a 303 redirect (H)",
+  " -#, --progress-bar  Display transfer progress as a progress bar",
+  "     --proto PROTOCOLS  Enable/disable specified protocols",
+  "     --proto-redir PROTOCOLS  "
+  "Enable/disable specified protocols on redirect",
+  " -x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port",
+  "     --proxy-anyauth Pick \"any\" proxy authentication method (H)",
+  "     --proxy-basic   Use Basic authentication on the proxy (H)",
+  "     --proxy-digest  Use Digest authentication on the proxy (H)",
+  "     --proxy-negotiate Use Negotiate authentication on the proxy (H)",
+  "     --proxy-ntlm    Use NTLM authentication on the proxy (H)",
+  " -U, --proxy-user USER[:PASSWORD]  Proxy user and password",
+  "     --proxy1.0 HOST[:PORT]  Use HTTP/1.0 proxy on given port",
+  " -p, --proxytunnel   Operate through a HTTP proxy tunnel (using CONNECT)",
+  "     --pubkey KEY    Public key file name (SSH)",
+  " -Q, --quote CMD     Send command(s) to server before transfer (F/SFTP)",
+  "     --random-file FILE  File for reading random data from (SSL)",
+  " -r, --range RANGE   Retrieve only the bytes within a range",
+  "     --raw           Do HTTP \"raw\", without any transfer decoding (H)",
+  " -e, --referer       Referer URL (H)",
+  " -J, --remote-header-name Use the header-provided filename (H)",
+  " -O, --remote-name   Write output to a file named as the remote file",
+  "     --remote-name-all Use the remote file name for all URLs",
+  " -R, --remote-time   Set the remote file's time on the local output",
+  " -X, --request COMMAND  Specify request command to use",
+  "     --resolve HOST:PORT:ADDRESS  Force resolve of HOST:PORT to ADDRESS",
+  "     --retry NUM   "
+  "Retry request NUM times if transient problems occur",
+  "     --retry-delay SECONDS "
+  "When retrying, wait this many seconds between each",
+  "     --retry-max-time SECONDS  Retry only within this period",
+  "     --sasl-ir       Enable initial response in SASL authentication"
+  " -S, --show-error    "
+  "Show error. With -s, make curl show errors when they occur",
+  " -s, --silent        Silent mode. Don't output anything",
+  "     --socks4 HOST[:PORT]  SOCKS4 proxy on given host + port",
+  "     --socks4a HOST[:PORT]  SOCKS4a proxy on given host + port",
+  "     --socks5 HOST[:PORT]  SOCKS5 proxy on given host + port",
+  "     --socks5-hostname HOST[:PORT] "
+  "SOCKS5 proxy, pass host name to proxy",
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+  "     --socks5-gssapi-service NAME  SOCKS5 proxy service name for gssapi",
+  "     --socks5-gssapi-nec  Compatibility with NEC SOCKS5 server",
+#endif
+  " -Y, --speed-limit RATE  "
+  "Stop transfers below speed-limit for 'speed-time' secs",
+  " -y, --speed-time SECONDS  "
+  "Time for trig speed-limit abort. Defaults to 30",
+  "     --ssl           Try SSL/TLS (FTP, IMAP, POP3, SMTP)",
+  "     --ssl-reqd      Require SSL/TLS (FTP, IMAP, POP3, SMTP)",
+  " -2, --sslv2         Use SSLv2 (SSL)",
+  " -3, --sslv3         Use SSLv3 (SSL)",
+  "     --ssl-allow-beast Allow security flaw to improve interop (SSL)",
+  "     --stderr FILE   Where to redirect stderr. - means stdout",
+  "     --tcp-nodelay   Use the TCP_NODELAY option",
+  " -t, --telnet-option OPT=VAL  Set telnet option",
+  "     --tftp-blksize VALUE  Set TFTP BLKSIZE option (must be >512)",
+  " -z, --time-cond TIME  Transfer based on a time condition",
+  " -1, --tlsv1         Use TLSv1 (SSL)",
+  "     --trace FILE    Write a debug trace to the given file",
+  "     --trace-ascii FILE  Like --trace but without the hex output",
+  "     --trace-time    Add time stamps to trace/verbose output",
+  "     --tr-encoding   Request compressed transfer encoding (H)",
+  " -T, --upload-file FILE  Transfer FILE to destination",
+  "     --url URL       URL to work with",
+  " -B, --use-ascii     Use ASCII/text transfer",
+  " -u, --user USER[:PASSWORD]  Server user and password",
+  "     --tlsuser USER  TLS username",
+  "     --tlspassword STRING TLS password",
+  "     --tlsauthtype STRING  TLS authentication type (default SRP)",
+  " -A, --user-agent STRING  User-Agent to send to server (H)",
+  " -v, --verbose       Make the operation more talkative",
+  " -V, --version       Show version number and quit",
+#ifdef USE_WATT32
+  "     --wdebug        Turn on Watt-32 debugging",
+#endif
+  " -w, --write-out FORMAT  What to output after completion",
+  "     --xattr        Store metadata in extended file attributes",
+  " -q                 If used as the first parameter disables .curlrc",
+  NULL
+};
+
+#ifdef NETWARE
+#  define PRINT_LINES_PAUSE 23
+#endif
+
+#ifdef __SYMBIAN32__
+#  define PRINT_LINES_PAUSE 16
+#endif
+
+void tool_help(void)
+{
+  int i;
+  for(i = 0; helptext[i]; i++) {
+    puts(helptext[i]);
+#ifdef PRINT_LINES_PAUSE
+    if(i && ((i % PRINT_LINES_PAUSE) == 0))
+      tool_pressanykey();
+#endif
+  }
+}
+
similarity index 82%
rename from lib/curl_rand.h
rename to src/tool_help.h
index 26cfb7f..1b757dc 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_RAND_H
-#define HEADER_CURL_RAND_H
+#ifndef HEADER_CURL_TOOL_HELP_H
+#define HEADER_CURL_TOOL_HELP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,9 +21,9 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-void Curl_srand(void);
+void tool_help(void);
 
-unsigned int Curl_rand(void);
+#endif /* HEADER_CURL_TOOL_HELP_H */
 
-#endif /* HEADER_CURL_RAND_H */
diff --git a/src/tool_helpers.c b/src/tool_helpers.c
new file mode 100644 (file)
index 0000000..ae8aaaf
--- /dev/null
@@ -0,0 +1,78 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+** Helper functions that are used from more tha one source file.
+*/
+
+const char *param2text(int res)
+{
+  ParameterError error = (ParameterError)res;
+  switch(error) {
+  case PARAM_GOT_EXTRA_PARAMETER:
+    return "had unsupported trailing garbage";
+  case PARAM_OPTION_UNKNOWN:
+    return "is unknown";
+  case PARAM_OPTION_AMBIGUOUS:
+    return "is ambiguous";
+  case PARAM_REQUIRES_PARAMETER:
+    return "requires parameter";
+  case PARAM_BAD_USE:
+    return "is badly used here";
+  case PARAM_BAD_NUMERIC:
+    return "expected a proper numerical parameter";
+  case PARAM_NEGATIVE_NUMERIC:
+    return "expected a positive numerical parameter";
+  case PARAM_LIBCURL_DOESNT_SUPPORT:
+    return "the installed libcurl version doesn't support this";
+  case PARAM_NO_MEM:
+    return "out of memory";
+  default:
+    return "unknown error";
+  }
+}
+
+int SetHTTPrequest(struct Configurable *config, HttpReq req, HttpReq *store)
+{
+  if((*store == HTTPREQ_UNSPEC) ||
+     (*store == req)) {
+    *store = req;
+    return 0;
+  }
+  warnf(config, "You can only select one HTTP request!\n");
+  return 1;
+}
+
diff --git a/src/tool_helpers.h b/src/tool_helpers.h
new file mode 100644 (file)
index 0000000..c0bcd89
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef HEADER_CURL_TOOL_HELPERS_H
+#define HEADER_CURL_TOOL_HELPERS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+const char *param2text(int res);
+
+int SetHTTPrequest(struct Configurable *config, HttpReq req, HttpReq *store);
+
+#endif /* HEADER_CURL_TOOL_HELPERS_H */
+
similarity index 71%
rename from src/homedir.c
rename to src/tool_homedir.c
index ab1d369..11bb4ef 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "tool_setup.h"
 
 #ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef __VMS
-#include <unixlib.h>
+#  include <pwd.h>
 #endif
 
-#include "homedir.h"
+#include "tool_homedir.h"
 
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
+#include "memdebug.h" /* keep this as LAST include */
 
-static
-char *GetEnv(const char *variable, char do_expand)
+static char *GetEnv(const char *variable, char do_expand)
 {
   char *env = NULL;
 #ifdef WIN32
@@ -54,30 +40,23 @@ char *GetEnv(const char *variable, char do_expand)
    * started. Don't accept truncated results (i.e. rc >= sizeof(buf1)).  */
 
   rc = GetEnvironmentVariable(variable, buf1, sizeof(buf1));
-  if (rc > 0 && rc < sizeof(buf1)) {
+  if(rc > 0 && rc < sizeof(buf1)) {
     env = buf1;
     variable = buf1;
   }
-  if (do_expand && strchr(variable,'%')) {
+  if(do_expand && strchr(variable,'%')) {
     /* buf2 == variable if not expanded */
     rc = ExpandEnvironmentStrings (variable, buf2, sizeof(buf2));
-    if (rc > 0 && rc < sizeof(buf2) &&
-        !strchr(buf2,'%'))    /* no vars still unexpanded */
+    if(rc > 0 && rc < sizeof(buf2) &&
+       !strchr(buf2,'%'))    /* no vars still unexpanded */
       env = buf2;
   }
 #else
   (void)do_expand;
-#ifdef __VMS
-  env = getenv(variable);
-  if (env && strcmp("HOME",variable) == 0) {
-        env = decc_translate_vms(env);
-  }
-#else
   /* no length control */
   env = getenv(variable);
 #endif
-#endif
-  return (env && env[0])?strdup(env):NULL;
+  return (env && env[0]) ? strdup(env) : NULL;
 }
 
 /* return the home directory of the current user as an allocated string */
@@ -97,13 +76,9 @@ char *homedir(void)
  {
    struct passwd *pw = getpwuid(geteuid());
 
-   if (pw) {
-#ifdef __VMS
-     home = decc_translate_vms(pw->pw_dir);
-#else
+   if(pw) {
      home = pw->pw_dir;
-#endif
-     if (home && home[0])
+     if(home && home[0])
        home = strdup(home);
      else
        home = NULL;
similarity index 83%
rename from src/homedir.h
rename to src/tool_homedir.h
index c88d517..d588615 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_HOMEDIR_H
-#define HEADER_CURL_HOMEDIR_H
+#ifndef HEADER_CURL_TOOL_HOMEDIR_H
+#define HEADER_CURL_TOOL_HOMEDIR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,8 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
 char *homedir(void);
 
-#endif /* HEADER_CURL_HOMEDIR_H */
+#endif /* HEADER_CURL_TOOL_HOMEDIR_H */
diff --git a/src/tool_hugehelp.c b/src/tool_hugehelp.c
new file mode 100644 (file)
index 0000000..4ef2f48
--- /dev/null
@@ -0,0 +1,7836 @@
+#include "tool_setup.h"
+#ifndef HAVE_LIBZ
+/*
+ * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
+ * Generation time: Mon Aug  5 13:11:08 2013
+ */
+#ifdef USE_MANUAL
+#include "tool_hugehelp.h"
+void hugehelp(void)
+{
+   fputs(
+"                                  _   _ ____  _\n"
+"  Project                     ___| | | |  _ \\| |\n"
+"                             / __| | | | |_) | |\n"
+"                            | (__| |_| |  _ <| |___\n"
+"                             \\___|\\___/|_| \\_\\_____|\n"
+"\n"
+"NAME\n"
+"       curl - transfer a URL\n"
+"\n"
+"SYNOPSIS\n"
+"       curl [options] [URL...]\n"
+"\n"
+"DESCRIPTION\n"
+"       curl  is  a tool to transfer data from or to a server, using one of the\n"
+"       supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,  IMAP,\n"
+, stdout);
+ fputs(
+"       IMAPS,  LDAP,  LDAPS,  POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS,\n"
+"       TELNET and TFTP).  The command is designed to work without user  inter-\n"
+"       action.\n"
+"\n"
+"       curl offers a busload of useful tricks like proxy support, user authen-\n"
+"       tication, FTP upload, HTTP post, SSL connections, cookies, file  trans-\n"
+"       fer  resume,  Metalink,  and more. As you will see below, the number of\n"
+"       features will make your head spin!\n"
+"\n"
+, stdout);
+ fputs(
+"       curl is powered by  libcurl  for  all  transfer-related  features.  See\n"
+"       libcurl(3) for details.\n"
+"\n"
+"URL\n"
+"       The  URL  syntax is protocol-dependent. You'll find a detailed descrip-\n"
+"       tion in RFC 3986.\n"
+"\n"
+"       You can specify multiple URLs or parts of URLs  by  writing  part  sets\n"
+"       within braces as in:\n"
+"\n"
+"        http://site.{one,two,three}.com\n"
+"\n"
+"       or you can get sequences of alphanumeric series by using [] as in:\n"
+"\n"
+"        ftp://ftp.numericals.com/file[1-100].txt\n"
+, stdout);
+ fputs(
+"        ftp://ftp.numericals.com/file[001-100].txt    (with leading zeros)\n"
+"        ftp://ftp.letters.com/file[a-z].txt\n"
+"\n"
+"       Nested  sequences  are not supported, but you can use several ones next\n"
+"       to each other:\n"
+"\n"
+"        http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html\n"
+"\n"
+"       You can specify any amount of URLs on the command line.  They  will  be\n"
+"       fetched in a sequential manner in the specified order.\n"
+"\n"
+, stdout);
+ fputs(
+"       You  can  specify a step counter for the ranges to get every Nth number\n"
+"       or letter:\n"
+"\n"
+"        http://www.numericals.com/file[1-100:10].txt\n"
+"        http://www.letters.com/file[a-z:2].txt\n"
+"\n"
+"       If you specify URL without protocol:// prefix,  curl  will  attempt  to\n"
+"       guess  what  protocol  you might want. It will then default to HTTP but\n"
+"       try other protocols based on often-used host name prefixes.  For  exam-\n"
+, stdout);
+ fputs(
+"       ple,  for  host names starting with \"ftp.\" curl will assume you want to\n"
+"       speak FTP.\n"
+"\n"
+"       curl will do its best to use what you pass to it as a URL.  It  is  not\n"
+"       trying  to  validate it as a syntactically correct URL by any means but\n"
+"       is instead very liberal with what it accepts.\n"
+"\n"
+"       curl will attempt to re-use connections for multiple file transfers, so\n"
+"       that  getting many files from the same server will not do multiple con-\n"
+, stdout);
+ fputs(
+"       nects / handshakes. This improves speed. Of course this is only done on\n"
+"       files  specified  on  a  single command line and cannot be used between\n"
+"       separate curl invokes.\n"
+"\n"
+"PROGRESS METER\n"
+"       curl normally displays a progress meter during  operations,  indicating\n"
+"       the  amount  of  transferred  data,  transfer speeds and estimated time\n"
+"       left, etc.\n"
+"\n"
+"       curl displays this data to the terminal by default, so  if  you  invoke\n"
+, stdout);
+ fputs(
+"       curl  to do an operation and it is about to write data to the terminal,\n"
+"       it disables the progress meter as otherwise it would mess up the output\n"
+"       mixing progress meter and response data.\n"
+"\n"
+"       If you want a progress meter for HTTP POST or PUT requests, you need to\n"
+"       redirect the response output to a file, using shell  redirect  (>),  -o\n"
+"       [file] or similar.\n"
+"\n"
+"       It  is not the same case for FTP upload as that operation does not spit\n"
+, stdout);
+ fputs(
+"       out any response data to the terminal.\n"
+"\n"
+"       If you prefer a progress \"bar\" instead of the regular meter, -# is your\n"
+"       friend.\n"
+"OPTIONS\n"
+"       In general, all boolean options are enabled with --option and yet again\n"
+"       disabled with --no-option. That is, you use the exact same option  name\n"
+"       but prefix it with \"no-\". However, in this list we mostly only list and\n"
+"       show the --option version of them. (This concept with --no options  was\n"
+, stdout);
+ fputs(
+"       added  in  7.19.0.  Previously  most  options  were  toggled  on/off on\n"
+"       repeated use of the same command line option.)\n"
+"\n"
+"       -#, --progress-bar\n"
+"              Make curl display progress as a simple progress bar  instead  of\n"
+"              the standard, more informational, meter.\n"
+"\n"
+"       -0, --http1.0\n"
+"              (HTTP)  Forces curl to issue its requests using HTTP 1.0 instead\n"
+"              of using its internally preferred: HTTP 1.1.\n"
+"\n"
+"       -1, --tlsv1\n"
+, stdout);
+ fputs(
+"              (SSL) Forces curl to use TLS version 1 when negotiating  with  a\n"
+"              remote TLS server.\n"
+"\n"
+"       -2, --sslv2\n"
+"              (SSL)  Forces  curl to use SSL version 2 when negotiating with a\n"
+"              remote SSL server.\n"
+"\n"
+"       -3, --sslv3\n"
+"              (SSL) Forces curl to use SSL version 3 when negotiating  with  a\n"
+"              remote SSL server.\n"
+"\n"
+"       -4, --ipv4\n"
+"              If  curl  is capable of resolving an address to multiple IP ver-\n"
+, stdout);
+ fputs(
+"              sions (which it is if it is  IPv6-capable),  this  option  tells\n"
+"              curl to resolve names to IPv4 addresses only.\n"
+"\n"
+"       -6, --ipv6\n"
+"              If  curl  is capable of resolving an address to multiple IP ver-\n"
+"              sions (which it is if it is  IPv6-capable),  this  option  tells\n"
+"              curl to resolve names to IPv6 addresses only.\n"
+"\n"
+"       -a, --append\n"
+"              (FTP/SFTP) When used in an upload, this will tell curl to append\n"
+, stdout);
+ fputs(
+"              to the target file  instead  of  overwriting  it.  If  the  file\n"
+"              doesn't  exist,  it  will  be  created.   Note that this flag is\n"
+"              ignored by some SSH servers (including OpenSSH).\n"
+"\n"
+"       -A, --user-agent <agent string>\n"
+"              (HTTP) Specify the User-Agent string to send to the HTTP server.\n"
+"              Some   badly   done  CGIs  fail  if  this  field  isn't  set  to\n"
+"              \"Mozilla/4.0\". To encode blanks  in  the  string,  surround  the\n"
+, stdout);
+ fputs(
+"              string  with  single  quote marks. This can also be set with the\n"
+"              -H, --header option of course.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --anyauth\n"
+"              (HTTP) Tells curl to figure out authentication method by itself,\n"
+"              and  use  the most secure one the remote site claims to support.\n"
+"              This is done by first doing a request and checking the response-\n"
+, stdout);
+ fputs(
+"              headers,  thus  possibly  inducing  an extra network round-trip.\n"
+"              This is  used  instead  of  setting  a  specific  authentication\n"
+"              method,  which  you  can  do with --basic, --digest, --ntlm, and\n"
+"              --negotiate.\n"
+"\n"
+"              Note that using --anyauth is not recommended if you  do  uploads\n"
+"              from  stdin, since it may require data to be sent twice and then\n"
+, stdout);
+ fputs(
+"              the client must be able to rewind. If the need should arise when\n"
+"              uploading from stdin, the upload operation will fail.\n"
+"\n"
+"       -b, --cookie <name=data>\n"
+"              (HTTP)  Pass the data to the HTTP server as a cookie. It is sup-\n"
+"              posedly the data previously received from the server in a  \"Set-\n"
+"              Cookie:\"  line.  The data should be in the format \"NAME1=VALUE1;\n"
+"              NAME2=VALUE2\".\n"
+"\n"
+, stdout);
+ fputs(
+"              If no '=' symbol is used in the line, it is treated as  a  file-\n"
+"              name  to  use to read previously stored cookie lines from, which\n"
+"              should be used in this session if they match. Using this  method\n"
+"              also  activates  the \"cookie parser\" which will make curl record\n"
+"              incoming cookies too, which may be handy if you're using this in\n"
+"              combination  with  the -L, --location option. The file format of\n"
+, stdout);
+ fputs(
+"              the file to read cookies from should be plain  HTTP  headers  or\n"
+"              the Netscape/Mozilla cookie file format.\n"
+"\n"
+"              NOTE  that  the file specified with -b, --cookie is only used as\n"
+"              input. No cookies will be stored in the file. To store  cookies,\n"
+"              use  the -c, --cookie-jar option or you could even save the HTTP\n"
+"              headers to a file using -D, --dump-header!\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -B, --use-ascii\n"
+"              (FTP/LDAP) Enable ASCII transfer. For  FTP,  this  can  also  be\n"
+"              enforced  by  using an URL that ends with \";type=A\". This option\n"
+"              causes data sent to stdout to be in text mode for win32 systems.\n"
+"\n"
+"       --basic\n"
+"              (HTTP) Tells curl to use HTTP Basic authentication. This is  the\n"
+, stdout);
+ fputs(
+"              default  and this option is usually pointless, unless you use it\n"
+"              to override a  previously  set  option  that  sets  a  different\n"
+"              authentication  method  (such  as --ntlm, --digest, or --negoti-\n"
+"              ate).\n"
+"\n"
+"       -c, --cookie-jar <file name>\n"
+"              (HTTP) Specify to which file you want curl to write all  cookies\n"
+"              after  a completed operation. Curl writes all cookies previously\n"
+, stdout);
+ fputs(
+"              read from a specified file as well as all cookies received  from\n"
+"              remote server(s). If no cookies are known, no file will be writ-\n"
+"              ten. The file will be written using  the  Netscape  cookie  file\n"
+"              format.  If  you  set  the  file name to a single dash, \"-\", the\n"
+"              cookies will be written to stdout.\n"
+"\n"
+"              This command line option will activate the  cookie  engine  that\n"
+, stdout);
+ fputs(
+"              makes curl record and use cookies. Another way to activate it is\n"
+"              to use the -b, --cookie option.\n"
+"\n"
+"              If the cookie jar can't be created or written to, the whole curl\n"
+"              operation  won't  fail or even report an error clearly. Using -v\n"
+"              will get a warning displayed, but that is the only visible feed-\n"
+"              back you get about this possibly lethal situation.\n"
+"\n"
+, stdout);
+ fputs(
+"              If  this  option  is used several times, the last specified file\n"
+"              name will be used.\n"
+"\n"
+"       -C, --continue-at <offset>\n"
+"              Continue/Resume a previous file transfer at  the  given  offset.\n"
+"              The  given  offset  is  the  exact  number of bytes that will be\n"
+"              skipped, counting from the beginning of the source  file  before\n"
+"              it is transferred to the destination.  If used with uploads, the\n"
+, stdout);
+ fputs(
+"              FTP server command SIZE will not be used by curl.\n"
+"\n"
+"              Use \"-C -\" to tell curl to automatically find out  where/how  to\n"
+"              resume  the  transfer. It then uses the given output/input files\n"
+"              to figure that out.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --ciphers <list of ciphers>\n"
+"              (SSL) Specifies which ciphers to use in the connection. The list\n"
+, stdout);
+ fputs(
+"              of  ciphers  must  specify  valid ciphers. Read up on SSL cipher\n"
+"              list          details           on           this           URL:\n"
+"              http://www.openssl.org/docs/apps/ciphers.html\n"
+"\n"
+"              NSS  ciphers  are  done differently than OpenSSL and GnuTLS. The\n"
+"              full list of NSS ciphers is in the NSSCipherSuite entry at  this\n"
+"              URL:                                          http://git.fedora-\n"
+, stdout);
+ fputs(
+"              hosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --compressed\n"
+"              (HTTP) Request a compressed response using one of the algorithms\n"
+"              curl  supports,  and  save  the  uncompressed document.  If this\n"
+"              option is used and the server  sends  an  unsupported  encoding,\n"
+"              curl will report an error.\n"
+"\n"
+"       --connect-timeout <seconds>\n"
+, stdout);
+ fputs(
+"              Maximum  time  in  seconds  that you allow the connection to the\n"
+"              server to take.  This only limits  the  connection  phase,  once\n"
+"              curl has connected this option is of no more use.  Since 7.32.0,\n"
+"              this option accepts decimal values, but the actual timeout  will\n"
+"              decrease in accuracy as the specified timeout increases in deci-\n"
+"              mal precision. See also the -m, --max-time option.\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --create-dirs\n"
+"              When used in conjunction with the -o option,  curl  will  create\n"
+"              the  necessary  local directory hierarchy as needed. This option\n"
+"              creates the dirs mentioned with the -o option, nothing else.  If\n"
+"              the  -o file name uses no dir or if the dirs it mentions already\n"
+"              exist, no dir will be created.\n"
+"\n"
+, stdout);
+ fputs(
+"              To create remote directories when using FTP or SFTP, try  --ftp-\n"
+"              create-dirs.\n"
+"\n"
+"       --crlf (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).\n"
+"\n"
+"       --crlfile <file>\n"
+"              (HTTPS/FTPS)  Provide a file using PEM format with a Certificate\n"
+"              Revocation List that may specify peer certificates that  are  to\n"
+"              be considered revoked.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+, stdout);
+ fputs(
+"              (Added in 7.19.7)\n"
+"       -d, --data <data>\n"
+"              (HTTP)  Sends  the  specified data in a POST request to the HTTP\n"
+"              server, in the same way that a browser  does  when  a  user  has\n"
+"              filled  in an HTML form and presses the submit button. This will\n"
+"              cause curl to pass the data to the server using the content-type\n"
+"              application/x-www-form-urlencoded.  Compare to -F, --form.\n"
+"\n"
+, stdout);
+ fputs(
+"              -d,  --data  is  the  same  as --data-ascii. To post data purely\n"
+"              binary, you should instead use the --data-binary option. To URL-\n"
+"              encode the value of a form field you may use --data-urlencode.\n"
+"\n"
+"              If  any of these options is used more than once on the same com-\n"
+"              mand line, the data pieces specified  will  be  merged  together\n"
+"              with  a  separating  &-symbol.  Thus,  using  '-d name=daniel -d\n"
+, stdout);
+ fputs(
+"              skill=lousy'  would  generate  a  post  chunk  that  looks  like\n"
+"              'name=daniel&skill=lousy'.\n"
+"\n"
+"              If  you  start  the data with the letter @, the rest should be a\n"
+"              file name to read the data from, or - if you want curl  to  read\n"
+"              the  data  from stdin.  The contents of the file must already be\n"
+"              URL-encoded. Multiple files can also be specified. Posting  data\n"
+, stdout);
+ fputs(
+"              from  a file named 'foobar' would thus be done with --data @foo-\n"
+"              bar.\n"
+"\n"
+"       -D, --dump-header <file>\n"
+"              Write the protocol headers to the specified file.\n"
+"\n"
+"              This option is handy to use when you want to store  the  headers\n"
+"              that  an  HTTP site sends to you. Cookies from the headers could\n"
+"              then be read in a  second  curl  invocation  by  using  the  -b,\n"
+, stdout);
+ fputs(
+"              --cookie option! The -c, --cookie-jar option is however a better\n"
+"              way to store cookies.\n"
+"\n"
+"              When used in FTP, the FTP server response lines  are  considered\n"
+"              being \"headers\" and thus are saved there.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --data-ascii <data>\n"
+"              See -d, --data.\n"
+"\n"
+"       --data-binary <data>\n"
+"              (HTTP)  This  posts data exactly as specified with no extra pro-\n"
+, stdout);
+ fputs(
+"              cessing whatsoever.\n"
+"\n"
+"              If you start the data with the letter @, the rest  should  be  a\n"
+"              filename.   Data  is  posted in a similar manner as --data-ascii\n"
+"              does, except that newlines are  preserved  and  conversions  are\n"
+"              never done.\n"
+"\n"
+"              If  this  option  is  used several times, the ones following the\n"
+"              first will append data as described in -d, --data.\n"
+"\n"
+"       --data-urlencode <data>\n"
+, stdout);
+ fputs(
+"              (HTTP) This posts data, similar to the other --data options with\n"
+"              the exception that this performs URL-encoding. (Added in 7.18.0)\n"
+"              To  be  CGI-compliant,  the <data> part should begin with a name\n"
+"              followed by a separator and a content specification. The  <data>\n"
+"              part can be passed to curl using one of the following syntaxes:\n"
+"\n"
+"              content\n"
+"                     This  will make curl URL-encode the content and pass that\n"
+, stdout);
+ fputs(
+"                     on. Just be careful so that the content  doesn't  contain\n"
+"                     any  =  or  @  symbols, as that will then make the syntax\n"
+"                     match one of the other cases below!\n"
+"\n"
+"              =content\n"
+"                     This will make curl URL-encode the content and pass  that\n"
+"                     on. The preceding = symbol is not included in the data.\n"
+"\n"
+"              name=content\n"
+, stdout);
+ fputs(
+"                     This  will make curl URL-encode the content part and pass\n"
+"                     that on. Note that the name part is expected to  be  URL-\n"
+"                     encoded already.\n"
+"\n"
+"              @filename\n"
+"                     This  will  make  curl  load  data  from  the  given file\n"
+"                     (including any newlines), URL-encode that data  and  pass\n"
+"                     it on in the POST.\n"
+"\n"
+"              name@filename\n"
+, stdout);
+ fputs(
+"                     This  will  make  curl  load  data  from  the  given file\n"
+"                     (including any newlines), URL-encode that data  and  pass\n"
+"                     it  on  in  the  POST.  The  name part gets an equal sign\n"
+"                     appended, resulting in name=urlencoded-file-content. Note\n"
+"                     that the name is expected to be URL-encoded already.\n"
+"\n"
+"       --delegation LEVEL\n"
+"              Set LEVEL to tell the server what it is allowed to delegate when\n"
+, stdout);
+ fputs(
+"              it comes to user credentials. Used with GSS/kerberos.\n"
+"\n"
+"              none   Don't allow any delegation.\n"
+"\n"
+"              policy Delegates if and only if the OK-AS-DELEGATE flag  is  set\n"
+"                     in  the  Kerberos  service  ticket,  which is a matter of\n"
+"                     realm policy.\n"
+"\n"
+"              always Unconditionally allow the server to delegate.\n"
+"\n"
+"       --digest\n"
+"              (HTTP) Enables HTTP Digest authentication. This is an  authenti-\n"
+, stdout);
+ fputs(
+"              cation  scheme  that  prevents the password from being sent over\n"
+"              the wire in clear text. Use this in combination with the  normal\n"
+"              -u,  --user  option  to  set  user  name  and password. See also\n"
+"              --ntlm, --negotiate and --anyauth for related options.\n"
+"\n"
+"              If this option is used several times,  only  the  first  one  is\n"
+"              used.\n"
+"\n"
+"       --disable-eprt\n"
+, stdout);
+ fputs(
+"              (FTP) Tell curl to disable the use of the EPRT and LPRT commands\n"
+"              when doing active FTP transfers. Curl will normally always first\n"
+"              attempt  to use EPRT, then LPRT before using PORT, but with this\n"
+"              option, it will use PORT right away. EPRT and  LPRT  are  exten-\n"
+"              sions  to  the  original  FTP  protocol, and may not work on all\n"
+"              servers, but they enable more functionality in a better way than\n"
+, stdout);
+ fputs(
+"              the traditional PORT command.\n"
+"\n"
+"              --eprt can be used to explicitly enable EPRT again and --no-eprt\n"
+"              is an alias for --disable-eprt.\n"
+"\n"
+"              Disabling EPRT only changes the active behavior. If you want  to\n"
+"              switch  to  passive  mode  you need to not use -P, --ftp-port or\n"
+"              force it with --ftp-pasv.\n"
+"\n"
+"       --disable-epsv\n"
+"              (FTP) Tell curl to disable the use  of  the  EPSV  command  when\n"
+, stdout);
+ fputs(
+"              doing  passive  FTP  transfers.  Curl will normally always first\n"
+"              attempt to use EPSV before PASV, but with this option,  it  will\n"
+"              not try using EPSV.\n"
+"\n"
+"              --epsv can be used to explicitly enable EPSV again and --no-epsv\n"
+"              is an alias for --disable-epsv.\n"
+"\n"
+"              Disabling EPSV only changes the passive behavior. If you want to\n"
+"              switch to active mode you need to use -P, --ftp-port.\n"
+"\n"
+"       -e, --referer <URL>\n"
+, stdout);
+ fputs(
+"              (HTTP)  Sends the \"Referer Page\" information to the HTTP server.\n"
+"              This can also be set with the -H, --header flag of course.  When\n"
+"              used with -L, --location you can append \";auto\" to the --referer\n"
+"              URL to make curl automatically set the previous URL when it fol-\n"
+"              lows  a  Location: header. The \";auto\" string can be used alone,\n"
+"              even if you don't set an initial --referer.\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -E, --cert <certificate[:password]>\n"
+"              (SSL) Tells curl to use the specified  client  certificate  file\n"
+"              when getting a file with HTTPS, FTPS or another SSL-based proto-\n"
+"              col. The certificate must be in PEM  format.   If  the  optional\n"
+"              password  isn't  specified, it will be queried for on the termi-\n"
+, stdout);
+ fputs(
+"              nal. Note that this option assumes a \"certificate\" file that  is\n"
+"              the  private  key  and the private certificate concatenated! See\n"
+"              --cert and --key to specify them independently.\n"
+"\n"
+"              If curl is built against the NSS SSL library  then  this  option\n"
+"              can  tell curl the nickname of the certificate to use within the\n"
+"              NSS database defined by the environment variable SSL_DIR (or  by\n"
+, stdout);
+ fputs(
+"              default  /etc/pki/nssdb).  If  the  NSS PEM PKCS#11 module (lib-\n"
+"              nsspem.so) is available then PEM files may  be  loaded.  If  you\n"
+"              want to use a file from the current directory, please precede it\n"
+"              with \"./\" prefix, in order to avoid confusion with  a  nickname.\n"
+"              If  the nickname contains \":\", it needs to be preceded by \"\\\" so\n"
+"              that it is not recognized as password delimiter.  If  the  nick-\n"
+, stdout);
+ fputs(
+"              name  contains \"\\\", it needs to be escaped as \"\\\\\" so that it is\n"
+"              not recognized as an escape character.\n"
+"\n"
+"              (iOS and Mac OS X only) If curl is built against  Secure  Trans-\n"
+"              port,  then the certificate string must match the name of a cer-\n"
+"              tificate that's in the system or user keychain. The private  key\n"
+"              corresponding  to  the  certificate,  and  certificate chain (if\n"
+, stdout);
+ fputs(
+"              any),  must also be present in the keychain.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --engine <name>\n"
+"              Select the OpenSSL crypto engine to use for  cipher  operations.\n"
+"              Use  --engine  list  to  print  a  list  of build-time supported\n"
+"              engines. Note that not all (or  none)  of  the  engines  may  be\n"
+"              available at run-time.\n"
+"\n"
+"       --environment\n"
+, stdout);
+ fputs(
+"              (RISC  OS ONLY) Sets a range of environment variables, using the\n"
+"              names the -w option supports, to allow easier extraction of use-\n"
+"              ful information after having run curl.\n"
+"\n"
+"       --egd-file <file>\n"
+"              (SSL)  Specify  the  path  name  to the Entropy Gathering Daemon\n"
+"              socket. The socket is used to seed the  random  engine  for  SSL\n"
+"              connections. See also the --random-file option.\n"
+"\n"
+"       --cert-type <type>\n"
+, stdout);
+ fputs(
+"              (SSL)  Tells curl what certificate type the provided certificate\n"
+"              is in. PEM, DER and ENG are recognized types.  If not specified,\n"
+"              PEM is assumed.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --cacert <CA certificate>\n"
+"              (SSL) Tells curl to use the specified certificate file to verify\n"
+"              the peer. The file may contain  multiple  CA  certificates.  The\n"
+, stdout);
+ fputs(
+"              certificate(s)  must be in PEM format. Normally curl is built to\n"
+"              use a default file for this, so this option is typically used to\n"
+"              alter that default file.\n"
+"\n"
+"              curl  recognizes the environment variable named 'CURL_CA_BUNDLE'\n"
+"              if it is set, and uses the given path as a path  to  a  CA  cert\n"
+"              bundle. This option overrides that variable.\n"
+"\n"
+"              The  windows  version  of  curl will automatically look for a CA\n"
+, stdout);
+ fputs(
+"              certs file named 'curl-ca-bundle.crt', either in the same direc-\n"
+"              tory as curl.exe, or in the Current Working Directory, or in any\n"
+"              folder along your PATH.\n"
+"\n"
+"              If curl is built against  the  NSS  SSL  library,  the  NSS  PEM\n"
+"              PKCS#11  module  (libnsspem.so)  needs  to be available for this\n"
+"              option to work properly.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+, stdout);
+ fputs(
+"       --capath <CA certificate directory>\n"
+"              (SSL) Tells curl to use the specified certificate  directory  to\n"
+"              verify  the  peer.  Multiple paths can be provided by separating\n"
+"              them with \":\" (e.g.  \"path1:path2:path3\"). The certificates must\n"
+"              be  in  PEM  format,  and  if curl is built against OpenSSL, the\n"
+"              directory must have been processed using  the  c_rehash  utility\n"
+, stdout);
+ fputs(
+"              supplied  with OpenSSL. Using --capath can allow OpenSSL-powered\n"
+"              curl to make SSL-connections much more  efficiently  than  using\n"
+"              --cacert if the --cacert file contains many CA certificates.\n"
+"\n"
+"              If this option is set, the default capath value will be ignored,\n"
+"              and if it is used several times, the last one will be used.\n"
+"\n"
+"       -f, --fail\n"
+"              (HTTP) Fail silently (no output at all) on server  errors.  This\n"
+, stdout);
+ fputs(
+"              is  mostly done to better enable scripts etc to better deal with\n"
+"              failed attempts. In normal cases when an HTTP  server  fails  to\n"
+"              deliver  a  document,  it  returns  an  HTML document stating so\n"
+"              (which often also describes why and more). This flag  will  pre-\n"
+"              vent curl from outputting that and return error 22.\n"
+"\n"
+"              This  method is not fail-safe and there are occasions where non-\n"
+, stdout);
+ fputs(
+"              successful response codes will  slip  through,  especially  when\n"
+"              authentication is involved (response codes 401 and 407).\n"
+"\n"
+"       -F, --form <name=content>\n"
+"              (HTTP)  This  lets curl emulate a filled-in form in which a user\n"
+"              has pressed the submit button. This causes  curl  to  POST  data\n"
+"              using  the  Content-Type  multipart/form-data  according  to RFC\n"
+"              2388. This enables uploading of binary files etc. To  force  the\n"
+, stdout);
+ fputs(
+"              'content'  part  to  be  a  file, prefix the file name with an @\n"
+"              sign. To just get the content part from a file, prefix the  file\n"
+"              name  with  the symbol <. The difference between @ and < is then\n"
+"              that @ makes a file get attached in the post as a  file  upload,\n"
+"              while  the  <  makes  a text field and just get the contents for\n"
+"              that text field from a file.\n"
+"\n"
+, stdout);
+ fputs(
+"              Example, to send your password file to the server, where  'pass-\n"
+"              word' is the name of the form-field to which /etc/passwd will be\n"
+"              the input:\n"
+"\n"
+"              curl -F password=@/etc/passwd www.mypasswords.com\n"
+"\n"
+"              To read content from stdin instead of a file, use - as the file-\n"
+"              name. This goes for both @ and < constructs.\n"
+"\n"
+"              You  can  also  tell  curl  what  Content-Type  to  use by using\n"
+, stdout);
+ fputs(
+"              'type=', in a manner similar to:\n"
+"\n"
+"              curl -F \"web=@index.html;type=text/html\" url.com\n"
+"\n"
+"              or\n"
+"\n"
+"              curl -F \"name=daniel;type=text/foo\" url.com\n"
+"\n"
+"              You can also explicitly change the name field of a  file  upload\n"
+"              part by setting filename=, like this:\n"
+"\n"
+"              curl -F \"file=@localfile;filename=nameinpost\" url.com\n"
+"\n"
+"              If  filename/path contains ',' or ';', it must be quoted by dou-\n"
+"              ble-quotes like:\n"
+, stdout);
+ fputs(
+"\n"
+"              curl -F \"file=@\\\"localfile\\\";filename=\\\"nameinpost\\\"\" url.com\n"
+"\n"
+"              or\n"
+"\n"
+"              curl -F 'file=@\"localfile\";filename=\"nameinpost\"' url.com\n"
+"\n"
+"              Note that if a filename/path is  quoted  by  double-quotes,  any\n"
+"              double-quote or backslash within the filename must be escaped by\n"
+"              backslash.\n"
+"\n"
+"              See further examples and details in the MANUAL.\n"
+"\n"
+"              This option can be used multiple times.\n"
+"\n"
+"       --ftp-account [data]\n"
+, stdout);
+ fputs(
+"              (FTP) When an FTP server asks for \"account data\" after user name\n"
+"              and  password has been provided, this data is sent off using the\n"
+"              ACCT command. (Added in 7.13.0)\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --ftp-alternative-to-user <command>\n"
+"              (FTP) If authenticating with the USER and PASS  commands  fails,\n"
+"              send  this  command.   When  connecting  to  Tumbleweed's Secure\n"
+, stdout);
+ fputs(
+"              Transport server over FTPS using  a  client  certificate,  using\n"
+"              \"SITE  AUTH\"  will tell the server to retrieve the username from\n"
+"              the certificate. (Added in 7.15.5)\n"
+"\n"
+"       --ftp-create-dirs\n"
+"              (FTP/SFTP) When an FTP or SFTP URL/operation uses  a  path  that\n"
+"              doesn't  currently exist on the server, the standard behavior of\n"
+"              curl is to fail. Using this option, curl will instead attempt to\n"
+, stdout);
+ fputs(
+"              create missing directories.\n"
+"\n"
+"       --ftp-method [method]\n"
+"              (FTP)  Control what method curl should use to reach a file on an\n"
+"              FTP(S) server. The method argument should be one of the  follow-\n"
+"              ing alternatives:\n"
+"\n"
+"              multicwd\n"
+"                     curl  does  a  single CWD operation for each path part in\n"
+"                     the given URL. For deep hierarchies this means very  many\n"
+, stdout);
+ fputs(
+"                     commands.  This  is  how RFC 1738 says it should be done.\n"
+"                     This is the default but the slowest behavior.\n"
+"\n"
+"              nocwd  curl does no CWD at all. curl will do  SIZE,  RETR,  STOR\n"
+"                     etc and give a full path to the server for all these com-\n"
+"                     mands. This is the fastest behavior.\n"
+"\n"
+"              singlecwd\n"
+"                     curl does one CWD with the full target directory and then\n"
+, stdout);
+ fputs(
+"                     operates  on  the  file  \"normally\" (like in the multicwd\n"
+"                     case). This is somewhat  more  standards  compliant  than\n"
+"                     'nocwd' but without the full penalty of 'multicwd'.\n"
+"       (Added in 7.15.1)\n"
+"\n"
+"       --ftp-pasv\n"
+"              (FTP)  Use  passive mode for the data connection. Passive is the\n"
+"              internal default behavior, but using this option can be used  to\n"
+, stdout);
+ fputs(
+"              override a previous -P/-ftp-port option. (Added in 7.11.0)\n"
+"\n"
+"              If  this  option  is  used  several times, only the first one is\n"
+"              used. Undoing an enforced passive really isn't  doable  but  you\n"
+"              must then instead enforce the correct -P, --ftp-port again.\n"
+"\n"
+"              Passive mode means that curl will try the EPSV command first and\n"
+"              then PASV, unless --disable-epsv is used.\n"
+"\n"
+"       --ftp-skip-pasv-ip\n"
+, stdout);
+ fputs(
+"              (FTP) Tell curl to not use the IP address the server suggests in\n"
+"              its  response to curl's PASV command when curl connects the data\n"
+"              connection. Instead curl will re-use  the  same  IP  address  it\n"
+"              already uses for the control connection. (Added in 7.14.2)\n"
+"\n"
+"              This  option has no effect if PORT, EPRT or EPSV is used instead\n"
+"              of PASV.\n"
+"\n"
+"       --ftp-pret\n"
+, stdout);
+ fputs(
+"              (FTP) Tell curl to send a PRET command before PASV  (and  EPSV).\n"
+"              Certain  FTP  servers,  mainly drftpd, require this non-standard\n"
+"              command for directory listings as well as up  and  downloads  in\n"
+"              PASV mode.  (Added in 7.20.x)\n"
+"\n"
+"       --ftp-ssl-ccc\n"
+"              (FTP)  Use  CCC  (Clear  Command Channel) Shuts down the SSL/TLS\n"
+"              layer after authenticating. The rest of the control channel com-\n"
+, stdout);
+ fputs(
+"              munication  will be unencrypted. This allows NAT routers to fol-\n"
+"              low the FTP transaction. The default mode is passive. See --ftp-\n"
+"              ssl-ccc-mode for other modes.  (Added in 7.16.1)\n"
+"\n"
+"       --ftp-ssl-ccc-mode [active/passive]\n"
+"              (FTP)  Use  CCC  (Clear  Command Channel) Sets the CCC mode. The\n"
+"              passive mode will not initiate the shutdown,  but  instead  wait\n"
+, stdout);
+ fputs(
+"              for the server to do it, and will not reply to the shutdown from\n"
+"              the server. The active mode initiates the shutdown and waits for\n"
+"              a reply from the server.  (Added in 7.16.2)\n"
+"\n"
+"       --ftp-ssl-control\n"
+"              (FTP)  Require  SSL/TLS  for  the FTP login, clear for transfer.\n"
+"              Allows secure authentication, but non-encrypted  data  transfers\n"
+"              for  efficiency.   Fails the transfer if the server doesn't sup-\n"
+, stdout);
+ fputs(
+"              port SSL/TLS.  (Added in 7.16.0) that can still be used but will\n"
+"              be removed in a future version.\n"
+"\n"
+"       --form-string <name=string>\n"
+"              (HTTP)  Similar  to  --form except that the value string for the\n"
+"              named parameter is used literally. Leading '@' and  '<'  charac-\n"
+"              ters, and the ';type=' string in the value have no special mean-\n"
+"              ing. Use this in preference to --form if there's any possibility\n"
+, stdout);
+ fputs(
+"              that  the  string  value may accidentally trigger the '@' or '<'\n"
+"              features of --form.\n"
+"\n"
+"       -g, --globoff\n"
+"              This option switches off the \"URL globbing parser\". When you set\n"
+"              this  option, you can specify URLs that contain the letters {}[]\n"
+"              without having them being interpreted by curl itself. Note  that\n"
+"              these  letters are not normal legal URL contents but they should\n"
+, stdout);
+ fputs(
+"              be encoded according to the URI standard.\n"
+"\n"
+"       -G, --get\n"
+"              When used, this option will make all  data  specified  with  -d,\n"
+"              --data  or  --data-binary  to  be  used  in  an HTTP GET request\n"
+"              instead of the POST request that otherwise would  be  used.  The\n"
+"              data will be appended to the URL with a '?' separator.\n"
+"\n"
+"              If  used  in  combination with -I, the POST data will instead be\n"
+, stdout);
+ fputs(
+"              appended to the URL with a HEAD request.\n"
+"\n"
+"              If this option is used several times,  only  the  first  one  is\n"
+"              used.  This is because undoing a GET doesn't make sense, but you\n"
+"              should then instead enforce the alternative method you prefer.\n"
+"\n"
+"       -H, --header <header>\n"
+"              (HTTP) Extra header to use when getting  a  web  page.  You  may\n"
+"              specify any number of extra headers. Note that if you should add\n"
+, stdout);
+ fputs(
+"              a custom header that has the same name as one  of  the  internal\n"
+"              ones  curl  would  use,  your externally set header will be used\n"
+"              instead of the internal one. This allows you to make even trick-\n"
+"              ier  stuff  than  curl would normally do. You should not replace\n"
+"              internally set  headers  without  knowing  perfectly  well  what\n"
+"              you're  doing. Remove an internal header by giving a replacement\n"
+, stdout);
+ fputs(
+"              without content on the right  side  of  the  colon,  as  in:  -H\n"
+"              \"Host:\".  If  you  send the custom header with no-value then its\n"
+"              header must be terminated with a semicolon, such as  -H  \"X-Cus-\n"
+"              tom-Header;\" to send \"X-Custom-Header:\".\n"
+"\n"
+"              curl  will  make  sure  that each header you add/replace is sent\n"
+"              with the proper end-of-line marker, you should thus not add that\n"
+, stdout);
+ fputs(
+"              as a part of the header content: do not add newlines or carriage\n"
+"              returns, they will only mess things up for you.\n"
+"\n"
+"              See also the -A, --user-agent and -e, --referer options.\n"
+"\n"
+"              This option can be used  multiple  times  to  add/replace/remove\n"
+"              multiple headers.\n"
+"\n"
+"       --hostpubmd5 <md5>\n"
+"              (SCP/SFTP)  Pass  a string containing 32 hexadecimal digits. The\n"
+, stdout);
+ fputs(
+"              string should be the 128 bit MD5 checksum of the  remote  host's\n"
+"              public key, curl will refuse the connection with the host unless\n"
+"              the md5sums match. (Added in 7.17.1)\n"
+"\n"
+"       --ignore-content-length\n"
+"              (HTTP) Ignore the Content-Length header.  This  is  particularly\n"
+"              useful  for servers running Apache 1.x, which will report incor-\n"
+"              rect Content-Length for files larger than 2 gigabytes.\n"
+"\n"
+"       -i, --include\n"
+, stdout);
+ fputs(
+"              (HTTP) Include the HTTP-header in the  output.  The  HTTP-header\n"
+"              includes  things  like  server-name, date of the document, HTTP-\n"
+"              version and more...\n"
+"\n"
+"       -I, --head\n"
+"              (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature\n"
+"              the  command  HEAD which this uses to get nothing but the header\n"
+"              of a document. When used on an FTP or FILE file,  curl  displays\n"
+, stdout);
+ fputs(
+"              the file size and last modification time only.\n"
+"\n"
+"       --interface <name>\n"
+"              Perform  an operation using a specified interface. You can enter\n"
+"              interface name, IP address or host name. An example  could  look\n"
+"              like:\n"
+"\n"
+"               curl --interface eth0:1 http://www.netscape.com/\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -j, --junk-session-cookies\n"
+, stdout);
+ fputs(
+"              (HTTP) When curl is told to read cookies from a given file, this\n"
+"              option will make it discard all  \"session  cookies\".  This  will\n"
+"              basically  have  the same effect as if a new session is started.\n"
+"              Typical browsers always discard  session  cookies  when  they're\n"
+"              closed down.\n"
+"\n"
+"       -J, --remote-header-name\n"
+"              (HTTP) This option tells the -O, --remote-name option to use the\n"
+, stdout);
+ fputs(
+"              server-specified   Content-Disposition   filename   instead   of\n"
+"              extracting a filename from the URL.\n"
+"\n"
+"       -k, --insecure\n"
+"              (SSL)  This  option explicitly allows curl to perform \"insecure\"\n"
+"              SSL connections and transfers. All SSL connections are attempted\n"
+"              to  be  made secure by using the CA certificate bundle installed\n"
+"              by default. This makes  all  connections  considered  \"insecure\"\n"
+, stdout);
+ fputs(
+"              fail unless -k, --insecure is used.\n"
+"\n"
+"              See     this    online    resource    for    further    details:\n"
+"              http://curl.haxx.se/docs/sslcerts.html\n"
+"\n"
+"       -K, --config <config file>\n"
+"              Specify which config file to read curl arguments from. The  con-\n"
+"              fig  file  is a text file in which command line arguments can be\n"
+"              written which then will be used as if they were written  on  the\n"
+, stdout);
+ fputs(
+"              actual command line. Options and their parameters must be speci-\n"
+"              fied on the same config  file  line,  separated  by  whitespace,\n"
+"              colon,  the equals sign or any combination thereof (however, the\n"
+"              preferred separator is the equals sign). If the parameter is  to\n"
+"              contain  whitespace,  the  parameter  must  be  enclosed  within\n"
+"              quotes. Within double quotes, the following escape sequences are\n"
+, stdout);
+ fputs(
+"              available:  \\\\, \\\", \\t, \\n, \\r and \\v. A backslash preceding any\n"
+"              other letter is ignored. If the first column of a config line is\n"
+"              a  '#' character, the rest of the line will be treated as a com-\n"
+"              ment. Only write one option per  physical  line  in  the  config\n"
+"              file.\n"
+"\n"
+"              Specify  the  filename  to -K, --config as '-' to make curl read\n"
+"              the file from stdin.\n"
+"\n"
+, stdout);
+ fputs(
+"              Note that to be able to specify a URL in the  config  file,  you\n"
+"              need  to  specify  it  using the --url option, and not by simply\n"
+"              writing the URL on its own line. So, it could  look  similar  to\n"
+"              this:\n"
+"\n"
+"              url = \"http://curl.haxx.se/docs/\"\n"
+"\n"
+"              Long  option  names  can  optionally be given in the config file\n"
+"              without the initial double dashes.\n"
+"\n"
+, stdout);
+ fputs(
+"              When curl is invoked, it always (unless -q is used) checks for a\n"
+"              default  config  file  and  uses it if found. The default config\n"
+"              file is checked for in the following places in this order:\n"
+"\n"
+"              1) curl tries to find the \"home dir\": It first  checks  for  the\n"
+"              CURL_HOME and then the HOME environment variables. Failing that,\n"
+"              it uses getpwuid() on UNIX-like systems (which returns the  home\n"
+, stdout);
+ fputs(
+"              dir  given the current user in your system). On Windows, it then\n"
+"              checks for the APPDATA variable, or as a last resort the '%USER-\n"
+"              PROFILE%\\Application Data'.\n"
+"\n"
+"              2)  On  windows, if there is no _curlrc file in the home dir, it\n"
+"              checks for one in the same dir the curl executable is placed. On\n"
+"              UNIX-like  systems,  it will simply try to load .curlrc from the\n"
+"              determined home dir.\n"
+"\n"
+, stdout);
+ fputs(
+"              # --- Example file ---\n"
+"              # this is a comment\n"
+"              url = \"curl.haxx.se\"\n"
+"              output = \"curlhere.html\"\n"
+"              user-agent = \"superagent/1.0\"\n"
+"\n"
+"              # and fetch another URL too\n"
+"              url = \"curl.haxx.se/docs/manpage.html\"\n"
+"              -O\n"
+"              referer = \"http://nowhereatall.com/\"\n"
+"              # --- End of example file ---\n"
+"\n"
+"              This option can be used multiple times to load  multiple  config\n"
+"              files.\n"
+"\n"
+, stdout);
+ fputs(
+"       --keepalive-time <seconds>\n"
+"              This  option  sets  the  time  a connection needs to remain idle\n"
+"              before sending keepalive probes and the time between  individual\n"
+"              keepalive probes. It is currently effective on operating systems\n"
+"              offering  the  TCP_KEEPIDLE  and  TCP_KEEPINTVL  socket  options\n"
+"              (meaning  Linux, recent AIX, HP-UX and more). This option has no\n"
+"              effect if --no-keepalive is used. (Added in 7.18.0)\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"              If unspecified, the option defaults to 60 seconds.\n"
+"\n"
+"       --key <key>\n"
+"              (SSL/SSH) Private key file name. Allows you to provide your pri-\n"
+"              vate key in this separate file.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --key-type <type>\n"
+"              (SSL) Private key file type. Specify which type your --key  pro-\n"
+, stdout);
+ fputs(
+"              vided  private  key  is. DER, PEM, and ENG are supported. If not\n"
+"              specified, PEM is assumed.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --krb <level>\n"
+"              (FTP) Enable Kerberos authentication and use. The level must  be\n"
+"              entered and should be one of 'clear', 'safe', 'confidential', or\n"
+"              'private'. Should you use a level that  is  not  one  of  these,\n"
+, stdout);
+ fputs(
+"              'private' will instead be used.\n"
+"\n"
+"              This  option  requires  a library built with kerberos4 or GSSAPI\n"
+"              (GSS-Negotiate) support. This is not very common. Use -V, --ver-\n"
+"              sion to see if your curl supports it.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -l, --list-only\n"
+"              (FTP)  When listing an FTP directory, this switch forces a name-\n"
+, stdout);
+ fputs(
+"              only view.  Especially useful if you want to  machine-parse  the\n"
+"              contents  of  an  FTP  directory since the normal directory view\n"
+"              doesn't use a standard look or format.\n"
+"\n"
+"              This option causes an FTP NLST command to  be  sent.   Some  FTP\n"
+"              servers  list  only files in their response to NLST; they do not\n"
+"              include subdirectories and symbolic links.\n"
+"\n"
+"       -L, --location\n"
+, stdout);
+ fputs(
+"              (HTTP/HTTPS) If the server reports that the requested  page  has\n"
+"              moved to a different location (indicated with a Location: header\n"
+"              and a 3XX response code), this option will make  curl  redo  the\n"
+"              request on the new place. If used together with -i, --include or\n"
+"              -I, --head, headers from all requested pages will be shown. When\n"
+"              authentication  is  used, curl only sends its credentials to the\n"
+, stdout);
+ fputs(
+"              initial host. If a redirect takes curl to a different  host,  it\n"
+"              won't  be  able to intercept the user+password. See also --loca-\n"
+"              tion-trusted on how to change this. You can limit the amount  of\n"
+"              redirects to follow by using the --max-redirs option.\n"
+"\n"
+"              When  curl follows a redirect and the request is not a plain GET\n"
+"              (for example POST or PUT), it will do the following request with\n"
+, stdout);
+ fputs(
+"              a GET if the HTTP response was 301, 302, or 303. If the response\n"
+"              code was any other 3xx code, curl  will  re-send  the  following\n"
+"              request using the same unmodified method.\n"
+"\n"
+"       --libcurl <file>\n"
+"              Append  this  option  to any ordinary curl command line, and you\n"
+"              will get a libcurl-using C source code written to the file  that\n"
+"              does the equivalent of what your command-line operation does!\n"
+"\n"
+, stdout);
+ fputs(
+"              If  this  option is used several times, the last given file name\n"
+"              will be used. (Added in 7.16.1)\n"
+"\n"
+"       --limit-rate <speed>\n"
+"              Specify the maximum transfer rate you want  curl  to  use.  This\n"
+"              feature is useful if you have a limited pipe and you'd like your\n"
+"              transfer not to use your entire bandwidth.\n"
+"\n"
+"              The given speed is measured in bytes/second, unless a suffix  is\n"
+, stdout);
+ fputs(
+"              appended.   Appending  'k' or 'K' will count the number as kilo-\n"
+"              bytes, 'm' or M' makes it megabytes, while 'g' or 'G'  makes  it\n"
+"              gigabytes. Examples: 200K, 3m and 1G.\n"
+"\n"
+"              The  given  rate  is the average speed counted during the entire\n"
+"              transfer. It means that curl might use higher transfer speeds in\n"
+"              short bursts, but over time it uses no more than the given rate.\n"
+, stdout);
+ fputs(
+"              If  you  also use the -Y, --speed-limit option, that option will\n"
+"              take precedence and might cripple the rate-limiting slightly, to\n"
+"              help keeping the speed-limit logic working.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --local-port <num>[-num]\n"
+"              Set a preferred number or range of local port numbers to use for\n"
+"              the connection(s).  Note that  port  numbers  by  nature  are  a\n"
+, stdout);
+ fputs(
+"              scarce resource that will be busy at times so setting this range\n"
+"              to something too narrow might cause unnecessary connection setup\n"
+"              failures. (Added in 7.15.2)\n"
+"\n"
+"       --location-trusted\n"
+"              (HTTP/HTTPS)  Like  -L,  --location,  but will allow sending the\n"
+"              name + password to all hosts that the site may redirect to. This\n"
+"              may or may not introduce a security breach if the site redirects\n"
+, stdout);
+ fputs(
+"              you to a site to which  you'll  send  your  authentication  info\n"
+"              (which is plaintext in the case of HTTP Basic authentication).\n"
+"\n"
+"       -m, --max-time <seconds>\n"
+"              Maximum  time  in  seconds that you allow the whole operation to\n"
+"              take.  This is useful for preventing your batch jobs from  hang-\n"
+"              ing  for  hours due to slow networks or links going down.  Since\n"
+, stdout);
+ fputs(
+"              7.32.0, this option accepts decimal values, but the actual time-\n"
+"              out will decrease in accuracy as the specified timeout increases\n"
+"              in decimal precision.  See also the --connect-timeout option.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --mail-auth <address>\n"
+"              (SMTP) Specify a single address. This will be  used  to  specify\n"
+, stdout);
+ fputs(
+"              the  authentication  address  (identity)  of a submitted message\n"
+"              that is being relayed to another server.\n"
+"\n"
+"              (Added in 7.25.0)\n"
+"\n"
+"       --mail-from <address>\n"
+"              (SMTP) Specify a single address that the given mail  should  get\n"
+"              sent from.\n"
+"\n"
+"              (Added in 7.20.0)\n"
+"\n"
+"       --max-filesize <bytes>\n"
+"              Specify  the  maximum  size (in bytes) of a file to download. If\n"
+, stdout);
+ fputs(
+"              the file requested is larger than this value, the transfer  will\n"
+"              not start and curl will return with exit code 63.\n"
+"\n"
+"              NOTE:  The  file size is not always known prior to download, and\n"
+"              for such files this option has no effect even if the file trans-\n"
+"              fer  ends  up  being larger than this given limit. This concerns\n"
+"              both FTP and HTTP transfers.\n"
+"\n"
+"       --mail-rcpt <address>\n"
+, stdout);
+ fputs(
+"              (SMTP) Specify a single address that the given mail  should  get\n"
+"              sent  to. This option can be used multiple times to specify many\n"
+"              recipients.\n"
+"\n"
+"              (Added in 7.20.0)\n"
+"\n"
+"       --max-redirs <num>\n"
+"              Set maximum number of  redirection-followings  allowed.  If  -L,\n"
+"              --location is used, this option can be used to prevent curl from\n"
+"              following redirections \"in absurdum\". By default, the  limit  is\n"
+, stdout);
+ fputs(
+"              set  to 50 redirections. Set this option to -1 to make it limit-\n"
+"              less.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --metalink\n"
+"              This option can tell curl to parse and process a  given  URI  as\n"
+"              Metalink  file  (both  version 3 and 4 (RFC 5854) are supported)\n"
+"              and make use of the mirrors listed within for failover if  there\n"
+, stdout);
+ fputs(
+"              are  errors (such as the file or server not being available). It\n"
+"              will also verify the hash of the file after  the  download  com-\n"
+"              pletes.  The Metalink file itself is downloaded and processed in\n"
+"              memory and not stored in the local file system.\n"
+"\n"
+"              Example to use a remote Metalink file:\n"
+"\n"
+"              curl --metalink http://www.example.com/example.metalink\n"
+"\n"
+, stdout);
+ fputs(
+"              To use a Metalink file in the local file system, use FILE proto-\n"
+"              col (file://):\n"
+"\n"
+"              curl --metalink file://example.metalink\n"
+"\n"
+"              Please  note  that if FILE protocol is disabled, there is no way\n"
+"              to use a local Metalink file at the time of this  writing.  Also\n"
+"              note  that  if  --metalink  and  --include  are  used  together,\n"
+"              --include will be ignored. This is because including headers  in\n"
+, stdout);
+ fputs(
+"              the  response  will break Metalink parser and if the headers are\n"
+"              included in the file described in Metalink file, hash check will\n"
+"              fail.\n"
+"\n"
+"              (Added in 7.27.0, if built against the libmetalink library.)\n"
+"\n"
+"       -n, --netrc\n"
+"              Makes  curl  scan  the  .netrc  (_netrc  on Windows) file in the\n"
+"              user's home directory for login name and password. This is typi-\n"
+, stdout);
+ fputs(
+"              cally  used for FTP on UNIX. If used with HTTP, curl will enable\n"
+"              user authentication. See netrc(4) or ftp(1) for details  on  the\n"
+"              file  format.  Curl  will not complain if that file doesn't have\n"
+"              the right permissions (it should not be either world- or  group-\n"
+"              readable).  The  environment variable \"HOME\" is used to find the\n"
+"              home directory.\n"
+"\n"
+, stdout);
+ fputs(
+"              A quick and very simple example of how  to  setup  a  .netrc  to\n"
+"              allow  curl to FTP to the machine host.domain.com with user name\n"
+"              'myself' and password 'secret' should look similar to:\n"
+"\n"
+"              machine host.domain.com login myself password secret\n"
+"\n"
+"       -N, --no-buffer\n"
+"              Disables the buffering of the output stream. In normal work sit-\n"
+"              uations,  curl  will  use a standard buffered output stream that\n"
+, stdout);
+ fputs(
+"              will have the effect that it will output the data in chunks, not\n"
+"              necessarily  exactly  when  the data arrives.  Using this option\n"
+"              will disable that buffering.\n"
+"\n"
+"              Note that this is the negated option name  documented.  You  can\n"
+"              thus use --buffer to enforce the buffering.\n"
+"\n"
+"       --netrc-file\n"
+"              This  option  is similar to --netrc, except that you provide the\n"
+, stdout);
+ fputs(
+"              path (absolute or relative) to the netrc file that  Curl  should\n"
+"              use.   You  can  only  specify one netrc file per invocation. If\n"
+"              several --netrc-file options are provided,  only  the  last  one\n"
+"              will be used.  (Added in 7.21.5)\n"
+"\n"
+"              This  option  overrides  any use of --netrc as they are mutually\n"
+"              exclusive.  It will also abide by --netrc-optional if specified.\n"
+"\n"
+"       --netrc-optional\n"
+, stdout);
+ fputs(
+"              Very similar to --netrc, but this option makes the .netrc  usage\n"
+"              optional and not mandatory as the --netrc option does.\n"
+"\n"
+"       --negotiate\n"
+"              (HTTP)  Enables  GSS-Negotiate authentication. The GSS-Negotiate\n"
+"              method was designed by Microsoft and is used in their web appli-\n"
+"              cations.  It  is  primarily  meant  as  a  support for Kerberos5\n"
+"              authentication but may be also used along with another authenti-\n"
+, stdout);
+ fputs(
+"              cation method. For more information see IETF draft draft-brezak-\n"
+"              spnego-http-04.txt.\n"
+"\n"
+"              If you want to enable Negotiate for your  proxy  authentication,\n"
+"              then use --proxy-negotiate.\n"
+"\n"
+"              This  option  requires a library built with GSSAPI support. This\n"
+"              is not very common. Use -V, --version to  see  if  your  version\n"
+"              supports GSS-Negotiate.\n"
+"\n"
+, stdout);
+ fputs(
+"              When  using this option, you must also provide a fake -u, --user\n"
+"              option to activate the authentication code properly.  Sending  a\n"
+"              '-u  :'  is  enough  as  the  user name and password from the -u\n"
+"              option aren't actually used.\n"
+"\n"
+"              If this option is used several times,  only  the  first  one  is\n"
+"              used.\n"
+"\n"
+"       --no-keepalive\n"
+"              Disables the use of keepalive messages on the TCP connection, as\n"
+, stdout);
+ fputs(
+"              by default curl enables them.\n"
+"\n"
+"              Note that this is the negated option name  documented.  You  can\n"
+"              thus use --keepalive to enforce keepalive.\n"
+"\n"
+"       --no-sessionid\n"
+"              (SSL)  Disable curl's use of SSL session-ID caching.  By default\n"
+"              all transfers are done using the cache. Note that while  nothing\n"
+"              should  ever  get  hurt  by attempting to reuse SSL session-IDs,\n"
+, stdout);
+ fputs(
+"              there seem to be broken SSL implementations in the wild that may\n"
+"              require  you to disable this in order for you to succeed. (Added\n"
+"              in 7.16.0)\n"
+"\n"
+"              Note that this is the negated option name  documented.  You  can\n"
+"              thus use --sessionid to enforce session-ID caching.\n"
+"\n"
+"       --noproxy <no-proxy-list>\n"
+"              Comma-separated  list  of hosts which do not use a proxy, if one\n"
+, stdout);
+ fputs(
+"              is specified.  The only wildcard is a single * character,  which\n"
+"              matches all hosts, and effectively disables the proxy. Each name\n"
+"              in this list is matched as either a domain  which  contains  the\n"
+"              hostname,  or  the hostname itself. For example, local.com would\n"
+"              match  local.com,  local.com:80,  and  www.local.com,  but   not\n"
+"              www.notlocal.com.  (Added in 7.19.4).\n"
+"\n"
+, stdout);
+ fputs(
+"       --ntlm (HTTP)  Enables  NTLM  authentication.  The  NTLM authentication\n"
+"              method was designed by Microsoft and is used by IIS web servers.\n"
+"              It  is a proprietary protocol, reverse-engineered by clever peo-\n"
+"              ple and implemented in curl based on their efforts. This kind of\n"
+"              behavior  should  not be endorsed, you should encourage everyone\n"
+"              who uses NTLM to switch to a public and  documented  authentica-\n"
+, stdout);
+ fputs(
+"              tion method instead, such as Digest.\n"
+"\n"
+"              If  you  want to enable NTLM for your proxy authentication, then\n"
+"              use --proxy-ntlm.\n"
+"\n"
+"              This option requires a library built with SSL support.  Use  -V,\n"
+"              --version to see if your curl supports NTLM.\n"
+"\n"
+"              If  this  option  is  used  several times, only the first one is\n"
+"              used.\n"
+"\n"
+"       -o, --output <file>\n"
+, stdout);
+ fputs(
+"              Write output to <file> instead of stdout. If you are using {} or\n"
+"              []  to  fetch  multiple documents, you can use '#' followed by a\n"
+"              number in the <file> specifier. That variable will  be  replaced\n"
+"              with the current string for the URL being fetched. Like in:\n"
+"\n"
+"                curl http://{one,two}.site.com -o \"file_#1.txt\"\n"
+"\n"
+"              or use several variables like:\n"
+"\n"
+"                curl http://{site,host}.host[1-5].com -o \"#1_#2\"\n"
+"\n"
+, stdout);
+ fputs(
+"              You  may use this option as many times as the number of URLs you\n"
+"              have.\n"
+"\n"
+"              See also the --create-dirs option to create the  local  directo-\n"
+"              ries  dynamically.  Specifying the output as '-' (a single dash)\n"
+"              will force the output to be done to stdout.\n"
+"\n"
+"       -O, --remote-name\n"
+"              Write output to a local file named like the remote file we  get.\n"
+"              (Only  the file part of the remote file is used, the path is cut\n"
+, stdout);
+ fputs(
+"              off.)\n"
+"\n"
+"              The remote file name to use for saving  is  extracted  from  the\n"
+"              given URL, nothing else.\n"
+"\n"
+"              Consequentially,  the  file will be saved in the current working\n"
+"              directory. If you want the file saved in a different  directory,\n"
+"              make sure you change current working directory before you invoke\n"
+"              curl with the -O, --remote-name flag!\n"
+"\n"
+, stdout);
+ fputs(
+"              You may use this option as many times as the number of URLs  you\n"
+"              have.\n"
+"\n"
+"       -p, --proxytunnel\n"
+"              When an HTTP proxy is used (-x, --proxy), this option will cause\n"
+"              non-HTTP protocols  to  attempt  to  tunnel  through  the  proxy\n"
+"              instead  of merely using it to do HTTP-like operations. The tun-\n"
+"              nel approach is made with the HTTP  proxy  CONNECT  request  and\n"
+, stdout);
+ fputs(
+"              requires that the proxy allows direct connect to the remote port\n"
+"              number curl wants to tunnel through to.\n"
+"\n"
+"       -P, --ftp-port <address>\n"
+"              (FTP) Reverses the default initiator/listener  roles  when  con-\n"
+"              necting  with  FTP.  This  switch makes curl use active mode. In\n"
+"              practice, curl then tells the server  to  connect  back  to  the\n"
+"              client's specified address and port, while passive mode asks the\n"
+, stdout);
+ fputs(
+"              server to setup an IP address and port for  it  to  connect  to.\n"
+"              <address> should be one of:\n"
+"\n"
+"              interface\n"
+"                     i.e  \"eth0\"  to  specify which interface's IP address you\n"
+"                     want to use (Unix only)\n"
+"\n"
+"              IP address\n"
+"                     i.e \"192.168.10.1\" to specify the exact IP address\n"
+"\n"
+"              host name\n"
+"                     i.e \"my.host.domain\" to specify the machine\n"
+"\n"
+, stdout);
+ fputs(
+"              -      make curl pick the same IP address that is  already  used\n"
+"                     for the control connection\n"
+"\n"
+"       If  this  option is used several times, the last one will be used. Dis-\n"
+"       able the use of PORT with --ftp-pasv. Disable the attempt  to  use  the\n"
+"       EPRT  command  instead  of PORT by using --disable-eprt. EPRT is really\n"
+"       PORT++.\n"
+"\n"
+"       Starting in 7.19.5, you can append \":[start]-[end]\" to the right of the\n"
+, stdout);
+ fputs(
+"       address,  to tell curl what TCP port range to use. That means you spec-\n"
+"       ify a port range, from a lower to a  higher  number.  A  single  number\n"
+"       works  as well, but do note that it increases the risk of failure since\n"
+"       the port may not be available.\n"
+"\n"
+"       --pass <phrase>\n"
+"              (SSL/SSH) Passphrase for the private key\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --post301\n"
+, stdout);
+ fputs(
+"              (HTTP) Tells curl to respect RFC  2616/10.3.2  and  not  convert\n"
+"              POST  requests  into GET requests when following a 301 redirect-\n"
+"              ion. The non-RFC behaviour is ubiquitous  in  web  browsers,  so\n"
+"              curl  does  the  conversion  by default to maintain consistency.\n"
+"              However, a server may require a POST to remain a POST after such\n"
+"              a  redirection.  This  option  is meaningful only when using -L,\n"
+, stdout);
+ fputs(
+"              --location (Added in 7.17.1)\n"
+"\n"
+"       --post302\n"
+"              (HTTP) Tells curl to respect RFC  2616/10.3.2  and  not  convert\n"
+"              POST  requests  into GET requests when following a 302 redirect-\n"
+"              ion. The non-RFC behaviour is ubiquitous  in  web  browsers,  so\n"
+"              curl  does  the  conversion  by default to maintain consistency.\n"
+"              However, a server may require a POST to remain a POST after such\n"
+, stdout);
+ fputs(
+"              a  redirection.  This  option  is meaningful only when using -L,\n"
+"              --location (Added in 7.19.1)\n"
+"\n"
+"       --post303\n"
+"              (HTTP) Tells curl to respect RFC  2616/10.3.2  and  not  convert\n"
+"              POST  requests  into GET requests when following a 303 redirect-\n"
+"              ion. The non-RFC behaviour is ubiquitous  in  web  browsers,  so\n"
+"              curl  does  the  conversion  by default to maintain consistency.\n"
+, stdout);
+ fputs(
+"              However, a server may require a POST to remain a POST after such\n"
+"              a  redirection.  This  option  is meaningful only when using -L,\n"
+"              --location (Added in 7.26.0)\n"
+"\n"
+"       --proto <protocols>\n"
+"              Tells  curl  to  use  the  listed  protocols  for  its   initial\n"
+"              retrieval. Protocols are evaluated left to right, are comma sep-\n"
+"              arated, and are each a protocol name or 'all',  optionally  pre-\n"
+, stdout);
+ fputs(
+"              fixed by zero or more modifiers. Available modifiers are:\n"
+"\n"
+"              +  Permit this protocol in addition to protocols already permit-\n"
+"                 ted (this is the default if no modifier is used).\n"
+"\n"
+"              -  Deny this protocol, removing it from the  list  of  protocols\n"
+"                 already permitted.\n"
+"\n"
+"              =  Permit  only this protocol (ignoring the list already permit-\n"
+"                 ted), though subject  to  later  modification  by  subsequent\n"
+, stdout);
+ fputs(
+"                 entries in the comma separated list.\n"
+"\n"
+"              For example:\n"
+"\n"
+"              --proto -ftps  uses the default protocols, but disables ftps\n"
+"\n"
+"              --proto -all,https,+http\n"
+"                             only enables http and https\n"
+"\n"
+"              --proto =http,https\n"
+"                             also only enables http and https\n"
+"\n"
+"              Unknown  protocols  produce  a  warning.  This allows scripts to\n"
+, stdout);
+ fputs(
+"              safely rely on being able to disable potentially dangerous  pro-\n"
+"              tocols,  without  relying  upon  support for that protocol being\n"
+"              built into curl to avoid an error.\n"
+"\n"
+"              This option can be used multiple times, in which case the effect\n"
+"              is  the same as concatenating the protocols into one instance of\n"
+"              the option.\n"
+"\n"
+"              (Added in 7.20.2)\n"
+"\n"
+"       --proto-redir <protocols>\n"
+, stdout);
+ fputs(
+"              Tells curl to use the listed protocols  after  a  redirect.  See\n"
+"              --proto for how protocols are represented.\n"
+"\n"
+"              (Added in 7.20.2)\n"
+"\n"
+"       --proxy-anyauth\n"
+"              Tells  curl to pick a suitable authentication method when commu-\n"
+"              nicating with  the  given  proxy.  This  might  cause  an  extra\n"
+"              request/response round-trip. (Added in 7.13.2)\n"
+"\n"
+"       --proxy-basic\n"
+, stdout);
+ fputs(
+"              Tells  curl  to use HTTP Basic authentication when communicating\n"
+"              with the given proxy. Use --basic for enabling HTTP Basic with a\n"
+"              remote  host.  Basic  is  the default authentication method curl\n"
+"              uses with proxies.\n"
+"\n"
+"       --proxy-digest\n"
+"              Tells curl to use HTTP Digest authentication when  communicating\n"
+"              with the given proxy. Use --digest for enabling HTTP Digest with\n"
+"              a remote host.\n"
+"\n"
+, stdout);
+ fputs(
+"       --proxy-negotiate\n"
+"              Tells curl to use HTTP Negotiate authentication when communicat-\n"
+"              ing  with  the  given  proxy.  Use --negotiate for enabling HTTP\n"
+"              Negotiate with a remote host. (Added in 7.17.1)\n"
+"\n"
+"       --proxy-ntlm\n"
+"              Tells curl to use HTTP NTLM  authentication  when  communicating\n"
+"              with the given proxy. Use --ntlm for enabling NTLM with a remote\n"
+"              host.\n"
+"\n"
+"       --proxy1.0 <proxyhost[:port]>\n"
+, stdout);
+ fputs(
+"              Use the specified HTTP 1.0 proxy. If  the  port  number  is  not\n"
+"              specified, it is assumed at port 1080.\n"
+"\n"
+"              The  only difference between this and the HTTP proxy option (-x,\n"
+"              --proxy), is that attempts to use CONNECT through the proxy will\n"
+"              specify an HTTP 1.0 protocol instead of the default HTTP 1.1.\n"
+"\n"
+"       --pubkey <key>\n"
+"              (SSH)  Public  key  file name. Allows you to provide your public\n"
+, stdout);
+ fputs(
+"              key in this separate file.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -q     If used as the first parameter on the command line,  the  curlrc\n"
+"              config  file will not be read and used. See the -K, --config for\n"
+"              details on the default config file search path.\n"
+"\n"
+"       -Q, --quote <command>\n"
+"              (FTP/SFTP) Send an arbitrary command to the remote FTP  or  SFTP\n"
+, stdout);
+ fputs(
+"              server.  Quote commands are sent BEFORE the transfer takes place\n"
+"              (just after the initial PWD command in an FTP  transfer,  to  be\n"
+"              exact). To make commands take place after a successful transfer,\n"
+"              prefix them with a dash '-'.  To make  commands  be  sent  after\n"
+"              curl has changed the working directory, just before the transfer\n"
+"              command(s), prefix the command with a '+'  (this  is  only  sup-\n"
+, stdout);
+ fputs(
+"              ported  for FTP). You may specify any number of commands. If the\n"
+"              server returns failure for one of the commands, the entire oper-\n"
+"              ation  will  be aborted. You must send syntactically correct FTP\n"
+"              commands as RFC 959 defines to FTP servers, or one of  the  com-\n"
+"              mands  listed  below  to  SFTP servers.  This option can be used\n"
+"              multiple times. When speaking to an FTP server, prefix the  com-\n"
+, stdout);
+ fputs(
+"              mand with an asterisk (*) to make curl continue even if the com-\n"
+"              mand fails as by default curl will stop at first failure.\n"
+"\n"
+"              SFTP is a binary protocol. Unlike for FTP, curl interprets  SFTP\n"
+"              quote  commands  itself before sending them to the server.  File\n"
+"              names may be quoted shell-style to embed spaces or special char-\n"
+"              acters.   Following is the list of all supported SFTP quote com-\n"
+"              mands:\n"
+"\n"
+, stdout);
+ fputs(
+"              chgrp group file\n"
+"                     The chgrp command sets the group ID of the file named  by\n"
+"                     the  file  operand to the group ID specified by the group\n"
+"                     operand. The group operand is a decimal integer group ID.\n"
+"\n"
+"              chmod mode file\n"
+"                     The chmod command modifies the  file  mode  bits  of  the\n"
+"                     specified file. The mode operand is an octal integer mode\n"
+"                     number.\n"
+"\n"
+, stdout);
+ fputs(
+"              chown user file\n"
+"                     The chown command sets the owner of the file named by the\n"
+"                     file  operand  to the user ID specified by the user oper-\n"
+"                     and. The user operand is a decimal integer user ID.\n"
+"\n"
+"              ln source_file target_file\n"
+"                     The ln and symlink commands create a symbolic link at the\n"
+"                     target_file  location  pointing  to the source_file loca-\n"
+"                     tion.\n"
+"\n"
+, stdout);
+ fputs(
+"              mkdir directory_name\n"
+"                     The mkdir command creates  the  directory  named  by  the\n"
+"                     directory_name operand.\n"
+"\n"
+"              pwd    The pwd command returns the absolute pathname of the cur-\n"
+"                     rent working directory.\n"
+"\n"
+"              rename source target\n"
+"                     The rename command renames the file or directory named by\n"
+"                     the  source  operand to the destination path named by the\n"
+, stdout);
+ fputs(
+"                     target operand.\n"
+"\n"
+"              rm file\n"
+"                     The rm command removes the file specified by the file op-\n"
+"                     erand.\n"
+"\n"
+"              rmdir directory\n"
+"                     The  rmdir  command removes the directory entry specified\n"
+"                     by the directory operand, provided it is empty.\n"
+"\n"
+"              symlink source_file target_file\n"
+"                     See ln.\n"
+"\n"
+"       -r, --range <range>\n"
+, stdout);
+ fputs(
+"              (HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial  docu-\n"
+"              ment)  from  a  HTTP/1.1,  FTP  or  SFTP server or a local FILE.\n"
+"              Ranges can be specified in a number of ways.\n"
+"\n"
+"              0-499     specifies the first 500 bytes\n"
+"\n"
+"              500-999   specifies the second 500 bytes\n"
+"\n"
+"              -500      specifies the last 500 bytes\n"
+"\n"
+"              9500-     specifies the bytes from offset 9500 and forward\n"
+"\n"
+, stdout);
+ fputs(
+"              0-0,-1    specifies the first and last byte only(*)(H)\n"
+"\n"
+"              500-700,600-799\n"
+"                        specifies 300 bytes from offset 500(H)\n"
+"\n"
+"              100-199,500-599\n"
+"                        specifies two separate 100-byte ranges(*)(H)\n"
+"\n"
+"       (*) = NOTE that this will cause the server to reply  with  a  multipart\n"
+"       response!\n"
+"\n"
+"       Only  digit characters (0-9) are valid in the 'start' and 'stop' fields\n"
+, stdout);
+ fputs(
+"       of the 'start-stop' range syntax. If a non-digit character is given  in\n"
+"       the  range, the server's response will be unspecified, depending on the\n"
+"       server's configuration.\n"
+"\n"
+"       You should also be aware that many HTTP/1.1 servers do  not  have  this\n"
+"       feature  enabled,  so  that  when  you  attempt  to get a range, you'll\n"
+"       instead get the whole document.\n"
+"\n"
+"       FTP and SFTP range downloads only support the simple 'start-stop'  syn-\n"
+, stdout);
+ fputs(
+"       tax  (optionally  with  one of the numbers omitted). FTP use depends on\n"
+"       the extended FTP command SIZE.\n"
+"\n"
+"       If this option is used several times, the last one will be used.\n"
+"\n"
+"       -R, --remote-time\n"
+"              When used, this will make curl attempt to figure out  the  time-\n"
+"              stamp  of  the  remote  file,  and if that is available make the\n"
+"              local file get that same timestamp.\n"
+"\n"
+"       --random-file <file>\n"
+, stdout);
+ fputs(
+"              (SSL) Specify the path name to file containing what will be con-\n"
+"              sidered  as  random  data.  The  data is used to seed the random\n"
+"              engine for SSL connections.  See also the --egd-file option.\n"
+"\n"
+"       --raw  (HTTP) When used, it disables all internal HTTP decoding of con-\n"
+"              tent  or  transfer  encodings  and  instead makes them passed on\n"
+"              unaltered, raw. (Added in 7.16.2)\n"
+"\n"
+"       --remote-name-all\n"
+, stdout);
+ fputs(
+"              This option changes the default action for all given URLs to  be\n"
+"              dealt with as if -O, --remote-name were used for each one. So if\n"
+"              you want to disable that for a specific URL after --remote-name-\n"
+"              all  has  been  used,  you  must use \"-o -\" or --no-remote-name.\n"
+"              (Added in 7.19.0)\n"
+"\n"
+"       --resolve <host:port:address>\n"
+"              Provide a custom address for a  specific  host  and  port  pair.\n"
+, stdout);
+ fputs(
+"              Using  this,  you  can make the curl requests(s) use a specified\n"
+"              address and prevent the otherwise normally resolved  address  to\n"
+"              be  used.  Consider it a sort of /etc/hosts alternative provided\n"
+"              on the command line. The port number should be the  number  used\n"
+"              for  the  specific  protocol the host will be used for. It means\n"
+"              you need several entries if you want to provide address for  the\n"
+, stdout);
+ fputs(
+"              same host but different ports.\n"
+"\n"
+"              This  option  can  be  used many times to add many host names to\n"
+"              resolve.\n"
+"\n"
+"              (Added in 7.21.3)\n"
+"\n"
+"       --retry <num>\n"
+"              If a transient error is returned when curl tries  to  perform  a\n"
+"              transfer,  it  will retry this number of times before giving up.\n"
+"              Setting the number to 0 makes curl do no retries (which  is  the\n"
+, stdout);
+ fputs(
+"              default).  Transient  error  means either: a timeout, an FTP 4xx\n"
+"              response code or an HTTP 5xx response code.\n"
+"\n"
+"              When curl is about to retry a transfer, it will first  wait  one\n"
+"              second  and  then for all forthcoming retries it will double the\n"
+"              waiting time until it reaches 10 minutes which then will be  the\n"
+"              delay  between  the rest of the retries.  By using --retry-delay\n"
+, stdout);
+ fputs(
+"              you  disable  this  exponential  backoff  algorithm.  See   also\n"
+"              --retry-max-time  to  limit  the total time allowed for retries.\n"
+"              (Added in 7.12.3)\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --retry-delay <seconds>\n"
+"              Make curl sleep this amount of time before  each  retry  when  a\n"
+"              transfer  has  failed  with  a  transient  error (it changes the\n"
+, stdout);
+ fputs(
+"              default backoff time algorithm between retries). This option  is\n"
+"              only  interesting if --retry is also used. Setting this delay to\n"
+"              zero will make curl use the default  backoff  time.   (Added  in\n"
+"              7.12.3)\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --retry-max-time <seconds>\n"
+"              The  retry  timer  is  reset  before the first transfer attempt.\n"
+, stdout);
+ fputs(
+"              Retries will be done as usual (see --retry) as long as the timer\n"
+"              hasn't reached this given limit. Notice that if the timer hasn't\n"
+"              reached the limit, the request will be made and  while  perform-\n"
+"              ing,  it may take longer than this given time period. To limit a\n"
+"              single request's maximum time, use  -m,  --max-time.   Set  this\n"
+"              option to zero to not timeout retries. (Added in 7.12.3)\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -s, --silent\n"
+"              Silent  or  quiet  mode. Don't show progress meter or error mes-\n"
+"              sages.  Makes Curl mute. It will still output the data  you  ask\n"
+"              for, potentially even to the terminal/stdout unless you redirect\n"
+"              it.\n"
+"\n"
+"       --sasl-ir\n"
+"              Enable initial  response  in  SASL  authentication.   (Added  in\n"
+"              7.31.0)\n"
+"\n"
+"       -S, --show-error\n"
+, stdout);
+ fputs(
+"              When  used  with  -s  it  makes curl show an error message if it\n"
+"              fails.\n"
+"\n"
+"       --ssl  (FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for  the  connection.\n"
+"              Reverts to a non-secure connection if the server doesn't support\n"
+"              SSL/TLS.  See also --ftp-ssl-control and --ssl-reqd for  differ-\n"
+"              ent levels of encryption required. (Added in 7.20.0)\n"
+"\n"
+"              This  option  was formerly known as --ftp-ssl (Added in 7.11.0).\n"
+, stdout);
+ fputs(
+"              That option name can still be used but  will  be  removed  in  a\n"
+"              future version.\n"
+"\n"
+"       --ssl-reqd\n"
+"              (FTP,  POP3,  IMAP,  SMTP)  Require  SSL/TLS for the connection.\n"
+"              Terminates the connection if the server doesn't support SSL/TLS.\n"
+"              (Added in 7.20.0)\n"
+"\n"
+"              This  option  was  formerly  known  as  --ftp-ssl-reqd (added in\n"
+"              7.15.5). That option name can still be used but will be  removed\n"
+, stdout);
+ fputs(
+"              in a future version.\n"
+"\n"
+"       --ssl-allow-beast\n"
+"              (SSL)  This option tells curl to not work around a security flaw\n"
+"              in the SSL3 and TLS1.0 protocols known as BEAST.  If this option\n"
+"              isn't  used,  the  SSL layer may use work-arounds known to cause\n"
+"              interoperability problems with some older  SSL  implementations.\n"
+"              WARNING: this option loosens the SSL security, and by using this\n"
+, stdout);
+ fputs(
+"              flag you ask for exactly that.  (Added in 7.25.0)\n"
+"\n"
+"       --socks4 <host[:port]>\n"
+"              Use the specified SOCKS4 proxy. If the port number is not speci-\n"
+"              fied, it is assumed at port 1080. (Added in 7.15.2)\n"
+"\n"
+"              This  option  overrides any previous use of -x, --proxy, as they\n"
+"              are mutually exclusive.\n"
+"\n"
+"              Since 7.21.7, this option is superfluous since you can specify a\n"
+, stdout);
+ fputs(
+"              socks4 proxy with -x, --proxy using a socks4:// protocol prefix.\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --socks4a <host[:port]>\n"
+"              Use the specified SOCKS4a proxy. If the port number is not spec-\n"
+"              ified, it is assumed at port 1080. (Added in 7.18.0)\n"
+"\n"
+"              This option overrides any previous use of -x, --proxy,  as  they\n"
+"              are mutually exclusive.\n"
+"\n"
+, stdout);
+ fputs(
+"              Since 7.21.7, this option is superfluous since you can specify a\n"
+"              socks4a proxy with -x, --proxy using a socks4a:// protocol  pre-\n"
+"              fix.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --socks5-hostname <host[:port]>\n"
+"              Use  the  specified  SOCKS5 proxy (and let the proxy resolve the\n"
+"              host name). If the port number is not specified, it  is  assumed\n"
+, stdout);
+ fputs(
+"              at port 1080. (Added in 7.18.0)\n"
+"\n"
+"              This  option  overrides any previous use of -x, --proxy, as they\n"
+"              are mutually exclusive.\n"
+"\n"
+"              Since 7.21.7, this option is superfluous since you can specify a\n"
+"              socks5 hostname proxy with -x, --proxy using a socks5h:// proto-\n"
+"              col prefix.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+, stdout);
+ fputs(
+"              (This  option  was  previously  wrongly  documented  and used as\n"
+"              --socks without the number appended.)\n"
+"\n"
+"       --socks5 <host[:port]>\n"
+"              Use the specified SOCKS5 proxy  -  but  resolve  the  host  name\n"
+"              locally.  If  the port number is not specified, it is assumed at\n"
+"              port 1080.\n"
+"\n"
+"              This option overrides any previous use of -x, --proxy,  as  they\n"
+"              are mutually exclusive.\n"
+"\n"
+, stdout);
+ fputs(
+"              Since 7.21.7, this option is superfluous since you can specify a\n"
+"              socks5 proxy with -x, --proxy using a socks5:// protocol prefix.\n"
+"              If this option is used several times, the last one will be used.\n"
+"              (This  option  was  previously  wrongly  documented  and used as\n"
+"              --socks without the number appended.)\n"
+"\n"
+"              This option (as well as --socks4) does not work with IPV6,  FTPS\n"
+"              or LDAP.\n"
+"\n"
+, stdout);
+ fputs(
+"       --socks5-gssapi-service <servicename>\n"
+"              The default service name for a socks server is rcmd/server-fqdn.\n"
+"              This option allows you to change it.\n"
+"\n"
+"              Examples:  --socks5  proxy-name  --socks5-gssapi-service   sockd\n"
+"              would  use sockd/proxy-name --socks5 proxy-name --socks5-gssapi-\n"
+"              service sockd/real-name  would  use  sockd/real-name  for  cases\n"
+"              where  the proxy-name does not match the principal name.  (Added\n"
+, stdout);
+ fputs(
+"              in 7.19.4).\n"
+"\n"
+"       --socks5-gssapi-nec\n"
+"              As part of the gssapi negotiation a protection mode  is  negoti-\n"
+"              ated.  RFC  1961 says in section 4.3/4.4 it should be protected,\n"
+"              but the NEC  reference  implementation  does  not.   The  option\n"
+"              --socks5-gssapi-nec  allows the unprotected exchange of the pro-\n"
+"              tection mode negotiation. (Added in 7.19.4).\n"
+"\n"
+"       --stderr <file>\n"
+, stdout);
+ fputs(
+"              Redirect all writes to stderr to the specified file instead.  If\n"
+"              the file name is a plain '-', it is instead written to stdout.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -t, --telnet-option <OPT=val>\n"
+"              Pass options to the telnet protocol. Supported options are:\n"
+"\n"
+"              TTYPE=<term> Sets the terminal type.\n"
+"\n"
+"              XDISPLOC=<X display> Sets the X display location.\n"
+"\n"
+, stdout);
+ fputs(
+"              NEW_ENV=<var,val> Sets an environment variable.\n"
+"\n"
+"       -T, --upload-file <file>\n"
+"              This  transfers  the  specified local file to the remote URL. If\n"
+"              there is no file part in the specified URL, Curl will append the\n"
+"              local file name. NOTE that you must use a trailing / on the last\n"
+"              directory to really prove to Curl that there is no file name  or\n"
+"              curl will think that your last directory name is the remote file\n"
+, stdout);
+ fputs(
+"              name to use. That will most likely cause the upload operation to\n"
+"              fail. If this is used on an HTTP(S) server, the PUT command will\n"
+"              be used.\n"
+"\n"
+"              Use the file name \"-\" (a single dash) to use stdin instead of  a\n"
+"              given  file.   Alternately,  the file name \".\" (a single period)\n"
+"              may be specified instead of \"-\" to  use  stdin  in  non-blocking\n"
+"              mode  to  allow  reading  server  output  while  stdin  is being\n"
+, stdout);
+ fputs(
+"              uploaded.\n"
+"\n"
+"              You can specify one -T for each URL on the command line. Each -T\n"
+"              + URL pair specifies what to upload and to where. curl also sup-\n"
+"              ports \"globbing\" of the -T argument, meaning that you can upload\n"
+"              multiple  files  to  a single URL by using the same URL globbing\n"
+"              style supported in the URL, like this:\n"
+"\n"
+"              curl -T \"{file1,file2}\" http://www.uploadtothissite.com\n"
+"\n"
+"              or even\n"
+"\n"
+, stdout);
+ fputs(
+"              curl -T \"img[1-1000].png\" ftp://ftp.picturemania.com/upload/\n"
+"\n"
+"       --tcp-nodelay\n"
+"              Turn on the TCP_NODELAY option. See the curl_easy_setopt(3)  man\n"
+"              page for details about this option. (Added in 7.11.2)\n"
+"\n"
+"       --tftp-blksize <value>\n"
+"              (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block\n"
+"              size that curl will try to use when transferring data to or from\n"
+"              a TFTP server. By default 512 bytes will be used.\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"              (Added in 7.20.0)\n"
+"\n"
+"       --tlsauthtype <authtype>\n"
+"              Set  TLS  authentication  type.  Currently,  the  only supported\n"
+"              option is \"SRP\",  for  TLS-SRP  (RFC  5054).  If  --tlsuser  and\n"
+"              --tlspassword  are specified but --tlsauthtype is not, then this\n"
+"              option defaults to \"SRP\".  (Added in 7.21.4)\n"
+"\n"
+"       --tlsuser <user>\n"
+, stdout);
+ fputs(
+"              Set username for use with the TLS authentication  method  speci-\n"
+"              fied  with  --tlsauthtype.  Requires  that --tlspassword also be\n"
+"              set.  (Added in 7.21.4)\n"
+"\n"
+"       --tlspassword <password>\n"
+"              Set password for use with the TLS authentication  method  speci-\n"
+"              fied  with  --tlsauthtype.  Requires that --tlsuser also be set.\n"
+"              (Added in 7.21.4)\n"
+"\n"
+"       --tr-encoding\n"
+, stdout);
+ fputs(
+"              (HTTP) Request a compressed Transfer-Encoding response using one\n"
+"              of  the  algorithms curl supports, and uncompress the data while\n"
+"              receiving it.\n"
+"\n"
+"              (Added in 7.21.6)\n"
+"\n"
+"       --trace <file>\n"
+"              Enables a full trace dump of all  incoming  and  outgoing  data,\n"
+"              including descriptive information, to the given output file. Use\n"
+"              \"-\" as filename to have the output sent to stdout.\n"
+"\n"
+, stdout);
+ fputs(
+"              This option overrides previous uses of -v, --verbose or --trace-\n"
+"              ascii.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --trace-ascii <file>\n"
+"              Enables  a  full  trace  dump of all incoming and outgoing data,\n"
+"              including descriptive information, to the given output file. Use\n"
+"              \"-\" as filename to have the output sent to stdout.\n"
+"\n"
+, stdout);
+ fputs(
+"              This is very similar to --trace, but leaves out the hex part and\n"
+"              only shows the ASCII part of the dump. It makes  smaller  output\n"
+"              that might be easier to read for untrained humans.\n"
+"\n"
+"              This option overrides previous uses of -v, --verbose or --trace.\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --trace-time\n"
+"              Prepends  a  time  stamp to each trace or verbose line that curl\n"
+, stdout);
+ fputs(
+"              displays.  (Added in 7.14.0)\n"
+"\n"
+"       -u, --user <user:password>\n"
+"              Specify the user name and password to use for server authentica-\n"
+"              tion. Overrides -n, --netrc and --netrc-optional.\n"
+"\n"
+"              If  you  just give the user name (without entering a colon) curl\n"
+"              will prompt for a password.\n"
+"\n"
+"              If you use an SSPI-enabled curl binary and do  NTLM  authentica-\n"
+, stdout);
+ fputs(
+"              tion,  you  can force curl to pick up the user name and password\n"
+"              from your environment by simply specifying a single  colon  with\n"
+"              this option: \"-u :\".\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -U, --proxy-user <user:password>\n"
+"              Specify  the user name and password to use for proxy authentica-\n"
+"              tion.\n"
+"\n"
+"              If you use an SSPI-enabled curl binary and do  NTLM  authentica-\n"
+, stdout);
+ fputs(
+"              tion,  you  can force curl to pick up the user name and password\n"
+"              from your environment by simply specifying a single  colon  with\n"
+"              this option: \"-U :\".\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --url <URL>\n"
+"              Specify  a  URL  to  fetch. This option is mostly handy when you\n"
+"              want to specify URL(s) in a config file.\n"
+"\n"
+, stdout);
+ fputs(
+"              This option may be used any number of times.  To  control  where\n"
+"              this  URL  is written, use the -o, --output or the -O, --remote-\n"
+"              name options.\n"
+"       -v, --verbose\n"
+"              Makes the fetching more  verbose/talkative.  Mostly  useful  for\n"
+"              debugging.  A line starting with '>' means \"header data\" sent by\n"
+"              curl, '<' means \"header data\" received by curl that is hidden in\n"
+, stdout);
+ fputs(
+"              normal cases, and a line starting with '*' means additional info\n"
+"              provided by curl.\n"
+"\n"
+"              Note that if you only want  HTTP  headers  in  the  output,  -i,\n"
+"              --include might be the option you're looking for.\n"
+"\n"
+"              If  you think this option still doesn't give you enough details,\n"
+"              consider using --trace or --trace-ascii instead.\n"
+"\n"
+"              This option overrides previous uses of --trace-ascii or --trace.\n"
+"\n"
+, stdout);
+ fputs(
+"              Use -s, --silent to make curl quiet.\n"
+"\n"
+"       -w, --write-out <format>\n"
+"              Defines what to display on stdout after a completed and success-\n"
+"              ful  operation.  The  format  is a string that may contain plain\n"
+"              text mixed with any number of variables. The string can be spec-\n"
+"              ified  as \"string\", to get read from a particular file you spec-\n"
+"              ify it \"@filename\" and to tell curl  to  read  the  format  from\n"
+, stdout);
+ fputs(
+"              stdin you write \"@-\".\n"
+"\n"
+"              The  variables  present in the output format will be substituted\n"
+"              by the value or text that curl thinks fit, as  described  below.\n"
+"              All  variables are specified as %{variable_name} and to output a\n"
+"              normal % you just write them as %%. You can output a newline  by\n"
+"              using \\n, a carriage return with \\r and a tab space with \\t.\n"
+"\n"
+, stdout);
+ fputs(
+"              NOTE: The %-symbol is a special symbol in the win32-environment,\n"
+"              where all occurrences of %  must  be  doubled  when  using  this\n"
+"              option.\n"
+"\n"
+"              The variables available are:\n"
+"\n"
+"              content_type   The  Content-Type  of  the requested document, if\n"
+"                             there was any.\n"
+"\n"
+"              filename_effective\n"
+"                             The ultimate filename that curl  writes  out  to.\n"
+, stdout);
+ fputs(
+"                             This  is only meaningful if curl is told to write\n"
+"                             to a file  with  the  --remote-name  or  --output\n"
+"                             option.  It's most useful in combination with the\n"
+"                             --remote-header-name option. (Added in 7.25.1)\n"
+"\n"
+"              ftp_entry_path The initial path curl ended up in when logging on\n"
+"                             to the remote FTP server. (Added in 7.15.4)\n"
+"\n"
+, stdout);
+ fputs(
+"              http_code      The numerical response code that was found in the\n"
+"                             last retrieved HTTP(S)  or  FTP(s)  transfer.  In\n"
+"                             7.18.2  the alias response_code was added to show\n"
+"                             the same info.\n"
+"\n"
+"              http_connect   The numerical code that was  found  in  the  last\n"
+"                             response   (from  a  proxy)  to  a  curl  CONNECT\n"
+"                             request. (Added in 7.12.4)\n"
+"\n"
+, stdout);
+ fputs(
+"              local_ip       The IP address of  the  local  end  of  the  most\n"
+"                             recently  done connection - can be either IPv4 or\n"
+"                             IPv6 (Added in 7.29.0)\n"
+"\n"
+"              local_port     The local port number of the most  recently  done\n"
+"                             connection (Added in 7.29.0)\n"
+"\n"
+"              num_connects   Number  of new connects made in the recent trans-\n"
+"                             fer. (Added in 7.12.3)\n"
+"\n"
+, stdout);
+ fputs(
+"              num_redirects  Number of redirects that  were  followed  in  the\n"
+"                             request. (Added in 7.12.3)\n"
+"\n"
+"              redirect_url   When  an HTTP request was made without -L to fol-\n"
+"                             low redirects, this variable will show the actual\n"
+"                             URL  a  redirect  would  take  you  to. (Added in\n"
+"                             7.18.2)\n"
+"\n"
+"              remote_ip      The remote IP address of the most  recently  done\n"
+, stdout);
+ fputs(
+"                             connection - can be either IPv4 or IPv6 (Added in\n"
+"                             7.29.0)\n"
+"\n"
+"              remote_port    The remote port number of the most recently  done\n"
+"                             connection (Added in 7.29.0)\n"
+"\n"
+"              size_download  The total amount of bytes that were downloaded.\n"
+"\n"
+"              size_header    The total amount of bytes of the downloaded head-\n"
+"                             ers.\n"
+"\n"
+, stdout);
+ fputs(
+"              size_request   The total amount of bytes that were sent  in  the\n"
+"                             HTTP request.\n"
+"\n"
+"              size_upload    The total amount of bytes that were uploaded.\n"
+"\n"
+"              speed_download The average download speed that curl measured for\n"
+"                             the complete download. Bytes per second.\n"
+"\n"
+"              speed_upload   The average upload speed that curl  measured  for\n"
+"                             the complete upload. Bytes per second.\n"
+"\n"
+, stdout);
+ fputs(
+"              ssl_verify_result\n"
+"                             The  result of the SSL peer certificate verifica-\n"
+"                             tion that was requested. 0 means the verification\n"
+"                             was successful. (Added in 7.19.0)\n"
+"\n"
+"              time_appconnect\n"
+"                             The  time,  in  seconds,  it  took from the start\n"
+"                             until the SSL/SSH/etc  connect/handshake  to  the\n"
+, stdout);
+ fputs(
+"                             remote host was completed. (Added in 7.19.0)\n"
+"\n"
+"              time_connect   The  time,  in  seconds,  it  took from the start\n"
+"                             until the TCP connect  to  the  remote  host  (or\n"
+"                             proxy) was completed.\n"
+"\n"
+"              time_namelookup\n"
+"                             The  time,  in  seconds,  it  took from the start\n"
+"                             until the name resolving was completed.\n"
+"\n"
+"              time_pretransfer\n"
+, stdout);
+ fputs(
+"                             The time, in seconds,  it  took  from  the  start\n"
+"                             until  the file transfer was just about to begin.\n"
+"                             This includes all pre-transfer commands and nego-\n"
+"                             tiations that are specific to the particular pro-\n"
+"                             tocol(s) involved.\n"
+"\n"
+"              time_redirect  The time, in seconds, it took for all redirection\n"
+, stdout);
+ fputs(
+"                             steps  include  name lookup, connect, pretransfer\n"
+"                             and transfer before  the  final  transaction  was\n"
+"                             started.  time_redirect shows the complete execu-\n"
+"                             tion time for multiple  redirections.  (Added  in\n"
+"                             7.12.3)\n"
+"\n"
+"              time_starttransfer\n"
+"                             The  time,  in  seconds,  it  took from the start\n"
+, stdout);
+ fputs(
+"                             until the first byte was just about to be  trans-\n"
+"                             ferred.  This  includes time_pretransfer and also\n"
+"                             the time  the  server  needed  to  calculate  the\n"
+"                             result.\n"
+"\n"
+"              time_total     The  total time, in seconds, that the full opera-\n"
+"                             tion lasted. The time will be displayed with mil-\n"
+"                             lisecond resolution.\n"
+"\n"
+, stdout);
+ fputs(
+"              url_effective  The URL that was fetched last. This is most mean-\n"
+"                             ingful if you've told curl  to  follow  location:\n"
+"                             headers.\n"
+"\n"
+"       If this option is used several times, the last one will be used.\n"
+"\n"
+"       -x, --proxy <[protocol://][user:password@]proxyhost[:port]>\n"
+"              Use  the  specified HTTP proxy. If the port number is not speci-\n"
+"              fied, it is assumed at port 1080.\n"
+"\n"
+, stdout);
+ fputs(
+"              This option overrides existing environment  variables  that  set\n"
+"              the  proxy  to use. If there's an environment variable setting a\n"
+"              proxy, you can set proxy to \"\" to override it.\n"
+"\n"
+"              All operations that are performed over an HTTP proxy will trans-\n"
+"              parently  be  converted  to HTTP. It means that certain protocol\n"
+"              specific operations might not be available. This is not the case\n"
+, stdout);
+ fputs(
+"              if you can tunnel through the proxy, as one with the -p, --prox-\n"
+"              ytunnel option.\n"
+"\n"
+"              User and password that might be provided in the proxy string are\n"
+"              URL  decoded by curl. This allows you to pass in special charac-\n"
+"              ters such as @ by using %40 or pass in a colon with %3a.\n"
+"\n"
+"              The proxy host can be specified the exact same way as the  proxy\n"
+"              environment  variables,  including the protocol prefix (http://)\n"
+, stdout);
+ fputs(
+"              and the embedded user + password.\n"
+"\n"
+"              From 7.21.7, the proxy string may be  specified  with  a  proto-\n"
+"              col://  prefix  to  specify  alternative  proxy  protocols.  Use\n"
+"              socks4://, socks4a://, socks5:// or socks5h://  to  request  the\n"
+"              specific  SOCKS  version  to  be  used.  No  protocol specified,\n"
+"              http:// and all others will be treated as HTTP proxies.\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -X, --request <command>\n"
+"              (HTTP) Specifies a custom request method to use when communicat-\n"
+"              ing  with  the  HTTP server.  The specified request will be used\n"
+"              instead of the method otherwise used (which  defaults  to  GET).\n"
+"              Read  the  HTTP  1.1 specification for details and explanations.\n"
+, stdout);
+ fputs(
+"              Common additional HTTP requests  include  PUT  and  DELETE,  but\n"
+"              related technologies like WebDAV offers PROPFIND, COPY, MOVE and\n"
+"              more.\n"
+"\n"
+"              Normally you don't need this option. All  sorts  of  GET,  HEAD,\n"
+"              POST and PUT requests are rather invoked by using dedicated com-\n"
+"              mand line options.\n"
+"\n"
+"              This option only changes  the  actual  word  used  in  the  HTTP\n"
+, stdout);
+ fputs(
+"              request,  it does not alter the way curl behaves. So for example\n"
+"              if you want to make a proper HEAD request, using  -X  HEAD  will\n"
+"              not suffice. You need to use the -I, --head option.\n"
+"\n"
+"              (FTP) Specifies a custom FTP command to use instead of LIST when\n"
+"              doing file lists with FTP.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       --xattr\n"
+, stdout);
+ fputs(
+"              When saving output to a file, this option tells  curl  to  store\n"
+"              certain  file  metadata  in extended file attributes. Currently,\n"
+"              the URL is stored in the xdg.origin.url attribute and, for HTTP,\n"
+"              the  content  type  is stored in the mime_type attribute. If the\n"
+"              file system does not support extended attributes, a  warning  is\n"
+"              issued.\n"
+"\n"
+"       -y, --speed-time <time>\n"
+, stdout);
+ fputs(
+"              If a download is slower than speed-limit bytes per second during\n"
+"              a speed-time period, the download gets aborted. If speed-time is\n"
+"              used, the default speed-limit will be 1 unless set with -Y.\n"
+"\n"
+"              This  option  controls  transfers  and thus will not affect slow\n"
+"              connects etc. If this is a concern for you, try  the  --connect-\n"
+"              timeout option.\n"
+"\n"
+, stdout);
+ fputs(
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -Y, --speed-limit <speed>\n"
+"              If a download is slower than this given speed (in bytes per sec-\n"
+"              ond) for speed-time seconds it gets aborted. speed-time  is  set\n"
+"              with -y and is 30 if not set.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -z, --time-cond <date expression>|<file>\n"
+, stdout);
+ fputs(
+"              (HTTP/FTP)  Request a file that has been modified later than the\n"
+"              given time and date, or one that has been modified  before  that\n"
+"              time.  The <date expression> can be all sorts of date strings or\n"
+"              if it doesn't match any internal ones, it is taken as a filename\n"
+"              and  tries  to  get  the  modification  date (mtime) from <file>\n"
+"              instead. See the curl_getdate(3) man pages for  date  expression\n"
+"              details.\n"
+"\n"
+, stdout);
+ fputs(
+"              Start the date expression with a dash (-) to make it request for\n"
+"              a document that is older than the given date/time, default is  a\n"
+"              document that is newer than the specified date/time.\n"
+"\n"
+"              If this option is used several times, the last one will be used.\n"
+"\n"
+"       -h, --help\n"
+"              Usage help.\n"
+"\n"
+"       -M, --manual\n"
+"              Manual. Display the huge help text.\n"
+"\n"
+"       -V, --version\n"
+, stdout);
+ fputs(
+"              Displays information about curl and the libcurl version it uses.\n"
+"              The  first  line  includes the full version of curl, libcurl and\n"
+"              other 3rd party libraries linked with the executable.\n"
+"\n"
+"              The second line (starts with \"Protocols:\") shows  all  protocols\n"
+"              that libcurl reports to support.\n"
+"\n"
+"              The third line (starts with \"Features:\") shows specific features\n"
+, stdout);
+ fputs(
+"              libcurl reports to offer. Available features include:\n"
+"\n"
+"              IPv6   You can use IPv6 with this.\n"
+"\n"
+"              krb4   Krb4 for FTP is supported.\n"
+"\n"
+"              SSL    HTTPS and FTPS are supported.\n"
+"\n"
+"              libz   Automatic decompression of compressed files over HTTP  is\n"
+"                     supported.\n"
+"\n"
+"              NTLM   NTLM authentication is supported.\n"
+"\n"
+"              GSS-Negotiate\n"
+"                     Negotiate authentication and krb5 for FTP is supported.\n"
+"\n"
+, stdout);
+ fputs(
+"              Debug  This  curl  uses a libcurl built with Debug. This enables\n"
+"                     more error-tracking and memory debugging etc.  For  curl-\n"
+"                     developers only!\n"
+"\n"
+"              AsynchDNS\n"
+"                     This curl uses asynchronous name resolves.\n"
+"\n"
+"              SPNEGO SPNEGO Negotiate authentication is supported.\n"
+"\n"
+"              Largefile\n"
+"                     This curl supports transfers of large files, files larger\n"
+"                     than 2GB.\n"
+"\n"
+, stdout);
+ fputs(
+"              IDN    This curl supports IDN - international domain names.\n"
+"\n"
+"              SSPI   SSPI is supported. If you use NTLM and set a  blank  user\n"
+"                     name,  curl  will authenticate with your current user and\n"
+"                     password.\n"
+"\n"
+"              TLS-SRP\n"
+"                     SRP (Secure Remote Password) authentication is  supported\n"
+"                     for TLS.\n"
+"              Metalink\n"
+"                     This  curl  supports  Metalink (both version 3 and 4 (RFC\n"
+, stdout);
+ fputs(
+"                     5854)), which describes mirrors and  hashes.   curl  will\n"
+"                     use mirrors for failover if there are errors (such as the\n"
+"                     file or server not being available).\n"
+"\n"
+"FILES\n"
+"       ~/.curlrc\n"
+"              Default config file, see -K, --config for details.\n"
+"\n"
+"ENVIRONMENT\n"
+"       The environment variables can be specified in lower case or upper case.\n"
+"       The lower case version has precedence. http_proxy is an exception as it\n"
+, stdout);
+ fputs(
+"       is only available in lower case.\n"
+"\n"
+"       Using an environment variable to set the proxy has the same  effect  as\n"
+"       using the --proxy option.\n"
+"\n"
+"       http_proxy [protocol://]<host>[:port]\n"
+"              Sets the proxy server to use for HTTP.\n"
+"       HTTPS_PROXY [protocol://]<host>[:port]\n"
+"              Sets the proxy server to use for HTTPS.\n"
+"\n"
+"       [url-protocol]_PROXY [protocol://]<host>[:port]\n"
+"              Sets  the proxy server to use for [url-protocol], where the pro-\n"
+, stdout);
+ fputs(
+"              tocol is a protocol that curl supports and  as  specified  in  a\n"
+"              URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.\n"
+"\n"
+"       ALL_PROXY [protocol://]<host>[:port]\n"
+"              Sets  the  proxy  server to use if no protocol-specific proxy is\n"
+"              set.\n"
+"\n"
+"       NO_PROXY <comma-separated list of hosts>\n"
+"              list of host names that shouldn't go through any proxy.  If  set\n"
+"              to a asterisk '*' only, it matches all hosts.\n"
+"\n"
+"PROXY PROTOCOL PREFIXES\n"
+, stdout);
+ fputs(
+"       Since  curl  version  7.21.7,  the proxy string may be specified with a\n"
+"       protocol:// prefix to specify alternative proxy protocols.\n"
+"\n"
+"       If no protocol is specified in  the  proxy  string  or  if  the  string\n"
+"       doesn't  match  a  supported  one, the proxy will be treated as an HTTP\n"
+"       proxy.\n"
+"\n"
+"       The supported proxy protocol prefixes are as follows:\n"
+"\n"
+"       socks4://\n"
+"              Makes it the equivalent of --socks4\n"
+"\n"
+"       socks4a://\n"
+, stdout);
+ fputs(
+"              Makes it the equivalent of --socks4a\n"
+"\n"
+"       socks5://\n"
+"              Makes it the equivalent of --socks5\n"
+"\n"
+"       socks5h://\n"
+"              Makes it the equivalent of --socks5-hostname\n"
+"\n"
+"EXIT CODES\n"
+"       There are a bunch of different  error  codes  and  their  corresponding\n"
+"       error  messages  that  may appear during bad conditions. At the time of\n"
+"       this writing, the exit codes are:\n"
+"\n"
+"       1      Unsupported protocol. This build of curl has no support for this\n"
+, stdout);
+ fputs(
+"              protocol.\n"
+"\n"
+"       2      Failed to initialize.\n"
+"\n"
+"       3      URL malformed. The syntax was not correct.\n"
+"\n"
+"       4      A  feature  or  option  that  was  needed to perform the desired\n"
+"              request was not enabled or was  explicitly  disabled  at  build-\n"
+"              time.  To  make  curl able to do this, you probably need another\n"
+"              build of libcurl!\n"
+"\n"
+"       5      Couldn't resolve proxy.  The  given  proxy  host  could  not  be\n"
+"              resolved.\n"
+"\n"
+, stdout);
+ fputs(
+"       6      Couldn't resolve host. The given remote host was not resolved.\n"
+"\n"
+"       7      Failed to connect to host.\n"
+"\n"
+"       8      FTP  weird  server  reply.  The  server  sent data curl couldn't\n"
+"              parse.\n"
+"\n"
+"       9      FTP access denied. The server denied login or denied  access  to\n"
+"              the  particular  resource or directory you wanted to reach. Most\n"
+"              often you tried to change to a directory that doesn't  exist  on\n"
+"              the server.\n"
+"\n"
+, stdout);
+ fputs(
+"       11     FTP  weird PASS reply. Curl couldn't parse the reply sent to the\n"
+"              PASS request.\n"
+"\n"
+"       13     FTP weird PASV reply, Curl couldn't parse the reply sent to  the\n"
+"              PASV request.\n"
+"\n"
+"       14     FTP  weird  227  format.  Curl  couldn't  parse the 227-line the\n"
+"              server sent.\n"
+"\n"
+"       15     FTP can't get host. Couldn't resolve the host IP we got  in  the\n"
+"              227-line.\n"
+"\n"
+, stdout);
+ fputs(
+"       17     FTP  couldn't  set  binary.  Couldn't  change transfer method to\n"
+"              binary.\n"
+"\n"
+"       18     Partial file. Only a part of the file was transferred.\n"
+"\n"
+"       19     FTP couldn't download/access the given file, the RETR (or  simi-\n"
+"              lar) command failed.\n"
+"\n"
+"       21     FTP quote error. A quote command returned error from the server.\n"
+"       22     HTTP  page  not  retrieved.  The  requested url was not found or\n"
+, stdout);
+ fputs(
+"              returned another error with the HTTP error  code  being  400  or\n"
+"              above. This return code only appears if -f, --fail is used.\n"
+"\n"
+"       23     Write  error.  Curl couldn't write data to a local filesystem or\n"
+"              similar.\n"
+"\n"
+"       25     FTP couldn't STOR file. The server denied  the  STOR  operation,\n"
+"              used for FTP uploading.\n"
+"\n"
+"       26     Read error. Various reading problems.\n"
+"\n"
+"       27     Out of memory. A memory allocation request failed.\n"
+"\n"
+, stdout);
+ fputs(
+"       28     Operation  timeout.  The  specified  time-out period was reached\n"
+"              according to the conditions.\n"
+"\n"
+"       30     FTP PORT failed. The PORT command failed. Not  all  FTP  servers\n"
+"              support  the  PORT  command,  try  doing  a  transfer using PASV\n"
+"              instead!\n"
+"\n"
+"       31     FTP couldn't use REST. The REST command failed. This command  is\n"
+"              used for resumed FTP transfers.\n"
+"\n"
+"       33     HTTP range error. The range \"command\" didn't work.\n"
+"\n"
+, stdout);
+ fputs(
+"       34     HTTP post error. Internal post-request generation error.\n"
+"\n"
+"       35     SSL connect error. The SSL handshaking failed.\n"
+"\n"
+"       36     FTP  bad  download  resume. Couldn't continue an earlier aborted\n"
+"              download.\n"
+"\n"
+"       37     FILE couldn't read file. Failed to open the file. Permissions?\n"
+"\n"
+"       38     LDAP cannot bind. LDAP bind operation failed.\n"
+"\n"
+"       39     LDAP search failed.\n"
+"\n"
+"       41     Function not found. A required LDAP function was not found.\n"
+"\n"
+, stdout);
+ fputs(
+"       42     Aborted by callback. An application told curl to abort the oper-\n"
+"              ation.\n"
+"\n"
+"       43     Internal error. A function was called with a bad parameter.\n"
+"\n"
+"       45     Interface  error.  A  specified  outgoing interface could not be\n"
+"              used.\n"
+"\n"
+"       47     Too many redirects. When following redirects, curl hit the maxi-\n"
+"              mum amount.\n"
+"\n"
+"       48     Unknown  option  specified  to  libcurl. This indicates that you\n"
+, stdout);
+ fputs(
+"              passed a weird option to curl that was passed on to libcurl  and\n"
+"              rejected. Read up in the manual!\n"
+"\n"
+"       49     Malformed telnet option.\n"
+"\n"
+"       51     The peer's SSL certificate or SSH MD5 fingerprint was not OK.\n"
+"\n"
+"       52     The  server  didn't  reply anything, which here is considered an\n"
+"              error.\n"
+"\n"
+"       53     SSL crypto engine not found.\n"
+"\n"
+"       54     Cannot set SSL crypto engine as default.\n"
+"\n"
+"       55     Failed sending network data.\n"
+"\n"
+, stdout);
+ fputs(
+"       56     Failure in receiving network data.\n"
+"\n"
+"       58     Problem with the local certificate.\n"
+"\n"
+"       59     Couldn't use specified SSL cipher.\n"
+"\n"
+"       60     Peer certificate cannot be authenticated with known CA  certifi-\n"
+"              cates.\n"
+"\n"
+"       61     Unrecognized transfer encoding.\n"
+"\n"
+"       62     Invalid LDAP URL.\n"
+"\n"
+"       63     Maximum file size exceeded.\n"
+"\n"
+"       64     Requested FTP SSL level failed.\n"
+"\n"
+"       65     Sending the data requires a rewind that failed.\n"
+"\n"
+, stdout);
+ fputs(
+"       66     Failed to initialise SSL Engine.\n"
+"\n"
+"       67     The  user  name,  password, or similar was not accepted and curl\n"
+"              failed to log in.\n"
+"\n"
+"       68     File not found on TFTP server.\n"
+"\n"
+"       69     Permission problem on TFTP server.\n"
+"\n"
+"       70     Out of disk space on TFTP server.\n"
+"\n"
+"       71     Illegal TFTP operation.\n"
+"\n"
+"       72     Unknown TFTP transfer ID.\n"
+"\n"
+"       73     File already exists (TFTP).\n"
+"\n"
+"       74     No such user (TFTP).\n"
+"\n"
+, stdout);
+ fputs(
+"       75     Character conversion failed.\n"
+"\n"
+"       76     Character conversion functions required.\n"
+"\n"
+"       77     Problem with reading the SSL CA cert (path? access rights?).\n"
+"\n"
+"       78     The resource referenced in the URL does not exist.\n"
+"\n"
+"       79     An unspecified error occurred during the SSH session.\n"
+"\n"
+"       80     Failed to shut down the SSL connection.\n"
+"\n"
+"       82     Could not load CRL file,  missing  or  wrong  format  (added  in\n"
+"              7.19.0).\n"
+"\n"
+, stdout);
+ fputs(
+"       83     Issuer check failed (added in 7.19.0).\n"
+"\n"
+"       84     The FTP PRET command failed\n"
+"\n"
+"       85     RTSP: mismatch of CSeq numbers\n"
+"\n"
+"       86     RTSP: mismatch of Session Identifiers\n"
+"\n"
+"       87     unable to parse FTP file list\n"
+"\n"
+"       88     FTP chunk callback reported error\n"
+"\n"
+"       XX     More error codes will appear here in future releases. The exist-\n"
+"              ing ones are meant to never change.\n"
+"\n"
+"AUTHORS / CONTRIBUTORS\n"
+, stdout);
+ fputs(
+"       Daniel Stenberg is the main author, but the whole list of  contributors\n"
+"       is found in the separate THANKS file.\n"
+"\n"
+"WWW\n"
+"       http://curl.haxx.se\n"
+"\n"
+"FTP\n"
+"       ftp://ftp.sunet.se/pub/www/utilities/curl/\n"
+"\n"
+"SEE ALSO\n"
+"       ftp(1), wget(1)\n"
+"\n"
+"LATEST VERSION\n"
+"\n"
+"  You always find news about what's going on as well as the latest versions\n"
+"  from the curl web pages, located at:\n"
+"\n"
+"        http://curl.haxx.se\n"
+"\n"
+"SIMPLE USAGE\n"
+"\n"
+"  Get the main page from Netscape's web-server:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl http://www.netscape.com/\n"
+"\n"
+"  Get the README file the user's home directory at funet's ftp-server:\n"
+"\n"
+"        curl ftp://ftp.funet.fi/README\n"
+"\n"
+"  Get a web page from a server using port 8000:\n"
+"\n"
+"        curl http://www.weirdserver.com:8000/\n"
+"\n"
+"  Get a directory listing of an FTP site:\n"
+"\n"
+"        curl ftp://cool.haxx.se/\n"
+"\n"
+"  Get the definition of curl from a dictionary:\n"
+"\n"
+"        curl dict://dict.org/m:curl\n"
+"\n"
+"  Fetch two documents at once:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n"
+"\n"
+"  Get a file off an FTPS server:\n"
+"\n"
+"        curl ftps://files.are.secure.com/secrets.txt\n"
+"\n"
+"  or use the more appropriate FTPS way to get the same file:\n"
+"\n"
+"        curl --ftp-ssl ftp://files.are.secure.com/secrets.txt\n"
+"\n"
+"  Get a file from an SSH server using SFTP:\n"
+"\n"
+"        curl -u username sftp://shell.example.com/etc/issue\n"
+"\n"
+"  Get a file from an SSH server using SCP using a private key to authenticate:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \\\n"
+"            scp://shell.example.com/~/personal.txt\n"
+"\n"
+"  Get the main page from an IPv6 web server:\n"
+"\n"
+"        curl -g \"http://[2001:1890:1112:1::20]/\"\n"
+"\n"
+"DOWNLOAD TO A FILE\n"
+"\n"
+"  Get a web page and store in a local file with a specific name:\n"
+"\n"
+"        curl -o thatpage.html http://www.netscape.com/\n"
+"\n"
+"  Get a web page and store in a local file, make the local file get the name\n"
+, stdout);
+ fputs(
+"  of the remote document (if no file name part is specified in the URL, this\n"
+"  will fail):\n"
+"\n"
+"        curl -O http://www.netscape.com/index.html\n"
+"\n"
+"  Fetch two files and store them with their remote names:\n"
+"\n"
+"        curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n"
+"\n"
+"USING PASSWORDS\n"
+"\n"
+" FTP\n"
+"\n"
+"   To ftp files using name+passwd, include them in the URL like:\n"
+"\n"
+"        curl ftp://name:passwd@machine.domain:port/full/path/to/file\n"
+"\n"
+"   or specify them with the -u flag like\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n"
+"\n"
+" FTPS\n"
+"\n"
+"   It is just like for FTP, but you may also want to specify and use\n"
+"   SSL-specific options for certificates etc.\n"
+"\n"
+"   Note that using FTPS:// as prefix is the \"implicit\" way as described in the\n"
+"   standards while the recommended \"explicit\" way is done by using FTP:// and\n"
+"   the --ftp-ssl option.\n"
+"\n"
+" SFTP / SCP\n"
+"\n"
+"   This is similar to FTP, but you can specify a private key to use instead of\n"
+, stdout);
+ fputs(
+"   a password. Note that the private key may itself be protected by a password\n"
+"   that is unrelated to the login password of the remote system.  If you\n"
+"   provide a private key file you must also provide a public key file.\n"
+"\n"
+" HTTP\n"
+"\n"
+"   Curl also supports user and password in HTTP URLs, thus you can pick a file\n"
+"   like:\n"
+"\n"
+"        curl http://name:passwd@machine.domain/full/path/to/file\n"
+"\n"
+"   or specify user and password separately like in\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -u name:passwd http://machine.domain/full/path/to/file\n"
+"\n"
+"   HTTP offers many different methods of authentication and curl supports\n"
+"   several: Basic, Digest, NTLM and Negotiate. Without telling which method to\n"
+"   use, curl defaults to Basic. You can also ask curl to pick the most secure\n"
+"   ones out of the ones that the server accepts for the given URL, by using\n"
+"   --anyauth.\n"
+"\n"
+"   NOTE! According to the URL specification, HTTP URLs can not contain a user\n"
+, stdout);
+ fputs(
+"   and password, so that style will not work when using curl via a proxy, even\n"
+"   though curl allows it at other times. When using a proxy, you _must_ use\n"
+"   the -u style for user and password.\n"
+"\n"
+" HTTPS\n"
+"\n"
+"   Probably most commonly used with private certificates, as explained below.\n"
+"\n"
+"PROXY\n"
+"\n"
+" curl supports both HTTP and SOCKS proxy servers, with optional authentication.\n"
+" It does not have special support for FTP proxy servers since there are no\n"
+, stdout);
+ fputs(
+" standards for those, but it can still be made to work with many of them. You\n"
+" can also use both HTTP and SOCKS proxies to transfer files to and from FTP\n"
+" servers.\n"
+"\n"
+" Get an ftp file using an HTTP proxy named my-proxy that uses port 888:\n"
+"\n"
+"        curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n"
+"\n"
+" Get a file from an HTTP server that requires user and password, using the\n"
+" same proxy as above:\n"
+"\n"
+"        curl -u user:passwd -x my-proxy:888 http://www.get.this/\n"
+"\n"
+, stdout);
+ fputs(
+" Some proxies require special authentication. Specify by using -U as above:\n"
+"\n"
+"        curl -U user:passwd -x my-proxy:888 http://www.get.this/\n"
+"\n"
+" A comma-separated list of hosts and domains which do not use the proxy can\n"
+" be specified as:\n"
+"\n"
+"        curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/\n"
+"\n"
+" If the proxy is specified with --proxy1.0 instead of --proxy or -x, then\n"
+" curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.\n"
+"\n"
+, stdout);
+ fputs(
+" curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.\n"
+"\n"
+" See also the environment variables Curl supports that offer further proxy\n"
+" control.\n"
+"\n"
+" Most FTP proxy servers are set up to appear as a normal FTP server from the\n"
+" client's perspective, with special commands to select the remote FTP server.\n"
+" curl supports the -u, -Q and --ftp-account options that can be used to\n"
+" set up transfers through many FTP proxies. For example, a file can be\n"
+, stdout);
+ fputs(
+" uploaded to a remote FTP server using a Blue Coat FTP proxy with the\n"
+" options:\n"
+"\n"
+"   curl -u \"Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass\" \\\n"
+"    --ftp-account Proxy-Password --upload-file local-file \\\n"
+"    ftp://my-ftp.proxy.server:21/remote/upload/path/\n"
+"\n"
+" See the manual for your FTP proxy to determine the form it expects to set up\n"
+" transfers, and curl's -v option to see exactly what curl is sending.\n"
+"\n"
+"RANGES\n"
+"\n"
+"  HTTP 1.1 introduced byte-ranges. Using this, a client can request\n"
+, stdout);
+ fputs(
+"  to get only one or more subparts of a specified document. Curl supports\n"
+"  this with the -r flag.\n"
+"\n"
+"  Get the first 100 bytes of a document:\n"
+"\n"
+"        curl -r 0-99 http://www.get.this/\n"
+"\n"
+"  Get the last 500 bytes of a document:\n"
+"\n"
+"        curl -r -500 http://www.get.this/\n"
+"\n"
+"  Curl also supports simple ranges for FTP files as well. Then you can only\n"
+"  specify start and stop position.\n"
+"\n"
+"  Get the first 100 bytes of a document using FTP:\n"
+"\n"
+"        curl -r 0-99 ftp://www.get.this/README\n"
+"\n"
+"UPLOADING\n"
+"\n"
+, stdout);
+ fputs(
+" FTP / FTPS / SFTP / SCP\n"
+"\n"
+"  Upload all data on stdin to a specified server:\n"
+"\n"
+"        curl -T - ftp://ftp.upload.com/myfile\n"
+"\n"
+"  Upload data from a specified file, login with user and password:\n"
+"\n"
+"        curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n"
+"\n"
+"  Upload a local file to the remote site, and use the local file name at the remote\n"
+"  site too:\n"
+"\n"
+"        curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n"
+"\n"
+"  Upload a local file to get appended to the remote file:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -T localfile -a ftp://ftp.upload.com/remotefile\n"
+"\n"
+"  Curl also supports ftp upload through a proxy, but only if the proxy is\n"
+"  configured to allow that kind of tunneling. If it does, you can run curl in\n"
+"  a fashion similar to:\n"
+"\n"
+"        curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n"
+"\n"
+" HTTP\n"
+"\n"
+"  Upload all data on stdin to a specified HTTP site:\n"
+"\n"
+"        curl -T - http://www.upload.com/myfile\n"
+"\n"
+"  Note that the HTTP server must have been configured to accept PUT before\n"
+, stdout);
+ fputs(
+"  this can be done successfully.\n"
+"\n"
+"  For other ways to do HTTP data upload, see the POST section below.\n"
+"\n"
+"VERBOSE / DEBUG\n"
+"\n"
+"  If curl fails where it isn't supposed to, if the servers don't let you in,\n"
+"  if you can't understand the responses: use the -v flag to get verbose\n"
+"  fetching. Curl will output lots of info and what it sends and receives in\n"
+"  order to let the user see all client-server interaction (but it won't show\n"
+"  you the actual data).\n"
+"\n"
+"        curl -v ftp://ftp.upload.com/\n"
+"\n"
+, stdout);
+ fputs(
+"  To get even more details and information on what curl does, try using the\n"
+"  --trace or --trace-ascii options with a given file name to log to, like\n"
+"  this:\n"
+"\n"
+"        curl --trace trace.txt www.haxx.se\n"
+"\n"
+"\n"
+"DETAILED INFORMATION\n"
+"\n"
+"  Different protocols provide different ways of getting detailed information\n"
+"  about specific files/documents. To get curl to show detailed information\n"
+"  about a single file, you should use -I/--head option. It displays all\n"
+, stdout);
+ fputs(
+"  available info on a single file for HTTP and FTP. The HTTP information is a\n"
+"  lot more extensive.\n"
+"\n"
+"  For HTTP, you can get the header information (the same as -I would show)\n"
+"  shown before the data by using -i/--include. Curl understands the\n"
+"  -D/--dump-header option when getting files from both FTP and HTTP, and it\n"
+"  will then store the headers in the specified file.\n"
+"\n"
+"  Store the HTTP headers in a separate file (headers.txt in the example):\n"
+"\n"
+, stdout);
+ fputs(
+"        curl --dump-header headers.txt curl.haxx.se\n"
+"\n"
+"  Note that headers stored in a separate file can be very useful at a later\n"
+"  time if you want curl to use cookies sent by the server. More about that in\n"
+"  the cookies section.\n"
+"\n"
+"POST (HTTP)\n"
+"\n"
+"  It's easy to post data using curl. This is done using the -d <data>\n"
+"  option.  The post data must be urlencoded.\n"
+"\n"
+"  Post a simple \"name\" and \"phone\" guestbook.\n"
+"\n"
+"        curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n"
+, stdout);
+ fputs(
+"                http://www.where.com/guest.cgi\n"
+"\n"
+"  How to post a form with curl, lesson #1:\n"
+"\n"
+"  Dig out all the <input> tags in the form that you want to fill in. (There's\n"
+"  a perl program called formfind.pl on the curl site that helps with this).\n"
+"\n"
+"  If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n"
+"  string\", which is in the format\n"
+"\n"
+"        <variable1>=<data1>&<variable2>=<data2>&...\n"
+"\n"
+"  The 'variable' names are the names set with \"name=\" in the <input> tags, and\n"
+, stdout);
+ fputs(
+"  the data is the contents you want to fill in for the inputs. The data *must*\n"
+"  be properly URL encoded. That means you replace space with + and that you\n"
+"  replace weird letters with %XX where XX is the hexadecimal representation of\n"
+"  the letter's ASCII code.\n"
+"\n"
+"  Example:\n"
+"\n"
+"  (page located at http://www.formpost.com/getthis/\n"
+"\n"
+"        <form action=\"post.cgi\" method=\"post\">\n"
+"        <input name=user size=10>\n"
+"        <input name=pass type=password size=10>\n"
+, stdout);
+ fputs(
+"        <input name=id type=hidden value=\"blablabla\">\n"
+"        <input name=ding value=\"submit\">\n"
+"        </form>\n"
+"\n"
+"  We want to enter user 'foobar' with password '12345'.\n"
+"\n"
+"  To post to this, you enter a curl command line like:\n"
+"\n"
+"        curl -d \"user=foobar&pass=12345&id=blablabla&ding=submit\"  (continues)\n"
+"          http://www.formpost.com/getthis/post.cgi\n"
+"\n"
+"\n"
+"  While -d uses the application/x-www-form-urlencoded mime-type, generally\n"
+, stdout);
+ fputs(
+"  understood by CGI's and similar, curl also supports the more capable\n"
+"  multipart/form-data type. This latter type supports things like file upload.\n"
+"\n"
+"  -F accepts parameters like -F \"name=contents\". If you want the contents to\n"
+"  be read from a file, use <@filename> as contents. When specifying a file,\n"
+"  you can also specify the file content type by appending ';type=<mime type>'\n"
+"  to the file name. You can also post the contents of several files in one\n"
+, stdout);
+ fputs(
+"  field.  For example, the field name 'coolfiles' is used to send three files,\n"
+"  with different content types using the following syntax:\n"
+"\n"
+"        curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n"
+"        http://www.post.com/postit.cgi\n"
+"\n"
+"  If the content-type is not specified, curl will try to guess from the file\n"
+"  extension (it only knows a few), or use the previously specified type (from\n"
+"  an earlier file if several files are specified in a list) or else it will\n"
+, stdout);
+ fputs(
+"  use the default type 'application/octet-stream'.\n"
+"\n"
+"  Emulate a fill-in form with -F. Let's say you fill in three fields in a\n"
+"  form. One field is a file name which to post, one field is your name and one\n"
+"  field is a file description. We want to post the file we have written named\n"
+"  \"cooltext.txt\". To let curl do the posting of this data instead of your\n"
+"  favourite browser, you have to read the HTML source of the form page and\n"
+, stdout);
+ fputs(
+"  find the names of the input fields. In our example, the input field names\n"
+"  are 'file', 'yourname' and 'filedescription'.\n"
+"\n"
+"        curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n"
+"             -F \"filedescription=Cool text file with cool text inside\" \\\n"
+"             http://www.post.com/postit.cgi\n"
+"\n"
+"  To send two files in one post you can do it in two ways:\n"
+"\n"
+"  1. Send multiple files in a single \"field\" with a single field name:\n"
+"\n"
+"        curl -F \"pictures=@dog.gif,cat.gif\"\n"
+"\n"
+, stdout);
+ fputs(
+"  2. Send two fields with two field names:\n"
+"\n"
+"        curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\"\n"
+"\n"
+"  To send a field value literally without interpreting a leading '@'\n"
+"  or '<', or an embedded ';type=', use --form-string instead of\n"
+"  -F. This is recommended when the value is obtained from a user or\n"
+"  some other unpredictable source. Under these circumstances, using\n"
+"  -F instead of --form-string would allow a user to trick curl into\n"
+"  uploading a file.\n"
+"\n"
+"REFERRER\n"
+"\n"
+, stdout);
+ fputs(
+"  An HTTP request has the option to include information about which address\n"
+"  referred it to the actual page.  Curl allows you to specify the\n"
+"  referrer to be used on the command line. It is especially useful to\n"
+"  fool or trick stupid servers or CGI scripts that rely on that information\n"
+"  being available or contain certain data.\n"
+"\n"
+"        curl -e www.coolsite.com http://www.showme.com/\n"
+"\n"
+"  NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.\n"
+"\n"
+"USER AGENT\n"
+"\n"
+, stdout);
+ fputs(
+"  An HTTP request has the option to include information about the browser\n"
+"  that generated the request. Curl allows it to be specified on the command\n"
+"  line. It is especially useful to fool or trick stupid servers or CGI\n"
+"  scripts that only accept certain browsers.\n"
+"\n"
+"  Example:\n"
+"\n"
+"  curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n"
+"\n"
+"  Other common strings:\n"
+"    'Mozilla/3.0 (Win95; I)'     Netscape Version 3 for Windows 95\n"
+, stdout);
+ fputs(
+"    'Mozilla/3.04 (Win95; U)'    Netscape Version 3 for Windows 95\n"
+"    'Mozilla/2.02 (OS/2; U)'     Netscape Version 2 for OS/2\n"
+"    'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)'           NS for AIX\n"
+"    'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)'      NS for Linux\n"
+"\n"
+"  Note that Internet Explorer tries hard to be compatible in every way:\n"
+"    'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)'    MSIE for W95\n"
+"\n"
+"  Mozilla is not the only possible User-Agent name:\n"
+, stdout);
+ fputs(
+"    'Konqueror/1.0'             KDE File Manager desktop client\n"
+"    'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
+"\n"
+"COOKIES\n"
+"\n"
+"  Cookies are generally used by web servers to keep state information at the\n"
+"  client's side. The server sets cookies by sending a response line in the\n"
+"  headers that looks like 'Set-Cookie: <data>' where the data part then\n"
+"  typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
+, stdout);
+ fputs(
+"  like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
+"  path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
+"  cookie should expire (\"expire=DATE\"), for what domain to use it\n"
+"  (\"domain=NAME\") and if it should be used on secure connections only\n"
+"  (\"secure\").\n"
+"\n"
+"  If you've received a page from a server that contains a header like:\n"
+"        Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
+"\n"
+, stdout);
+ fputs(
+"  it means the server wants that first pair passed on when we get anything in\n"
+"  a path beginning with \"/foo\".\n"
+"\n"
+"  Example, get a page that wants my name passed in a cookie:\n"
+"\n"
+"        curl -b \"name=Daniel\" www.sillypage.com\n"
+"\n"
+"  Curl also has the ability to use previously received cookies in following\n"
+"  sessions. If you get cookies from a server and store them in a file in a\n"
+"  manner similar to:\n"
+"\n"
+"        curl --dump-header headers www.example.com\n"
+"\n"
+, stdout);
+ fputs(
+"  ... you can then in a second connect to that (or another) site, use the\n"
+"  cookies from the 'headers' file like:\n"
+"\n"
+"        curl -b headers www.example.com\n"
+"\n"
+"  While saving headers to a file is a working way to store cookies, it is\n"
+"  however error-prone and not the preferred way to do this. Instead, make curl\n"
+"  save the incoming cookies using the well-known netscape cookie format like\n"
+"  this:\n"
+"\n"
+"        curl -c cookies.txt www.example.com\n"
+"\n"
+, stdout);
+ fputs(
+"  Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
+"  you can make curl follow a location: (which often is used in combination\n"
+"  with cookies). So that if a site sends cookies and a location, you can\n"
+"  use a non-existing file to trigger the cookie awareness like:\n"
+"\n"
+"        curl -L -b empty.txt www.example.com\n"
+"\n"
+"  The file to read cookies from must be formatted using plain HTTP headers OR\n"
+"  as netscape's cookie file. Curl will determine what kind it is based on the\n"
+, stdout);
+ fputs(
+"  file contents.  In the above command, curl will parse the header and store\n"
+"  the cookies received from www.example.com.  curl will send to the server the\n"
+"  stored cookies which match the request as it follows the location.  The\n"
+"  file \"empty.txt\" may be a nonexistent file.\n"
+"\n"
+"  Alas, to both read and write cookies from a netscape cookie file, you can\n"
+"  set both -b and -c to use the same file:\n"
+"\n"
+"        curl -b cookies.txt -c cookies.txt www.example.com\n"
+"\n"
+"PROGRESS METER\n"
+"\n"
+, stdout);
+ fputs(
+"  The progress meter exists to show a user that something actually is\n"
+"  happening. The different fields in the output have the following meaning:\n"
+"\n"
+"  % Total    % Received % Xferd  Average Speed          Time             Curr.\n"
+"                                 Dload  Upload Total    Current  Left    Speed\n"
+"  0  151M    0 38608    0     0   9406      0  4:41:43  0:00:04  4:41:39  9287\n"
+"\n"
+"  From left-to-right:\n"
+"   %             - percentage completed of the whole transfer\n"
+, stdout);
+ fputs(
+"   Total         - total size of the whole expected transfer\n"
+"   %             - percentage completed of the download\n"
+"   Received      - currently downloaded amount of bytes\n"
+"   %             - percentage completed of the upload\n"
+"   Xferd         - currently uploaded amount of bytes\n"
+"   Average Speed\n"
+"   Dload         - the average transfer speed of the download\n"
+"   Average Speed\n"
+"   Upload        - the average transfer speed of the upload\n"
+"   Time Total    - expected time to complete the operation\n"
+, stdout);
+ fputs(
+"   Time Current  - time passed since the invoke\n"
+"   Time Left     - expected time left to completion\n"
+"   Curr.Speed    - the average transfer speed the last 5 seconds (the first\n"
+"                   5 seconds of a transfer is based on less time of course.)\n"
+"\n"
+"  The -# option will display a totally different progress bar that doesn't\n"
+"  need much explanation!\n"
+"\n"
+"SPEED LIMIT\n"
+"\n"
+"  Curl allows the user to set the transfer speed conditions that must be met\n"
+, stdout);
+ fputs(
+"  to let the transfer keep going. By using the switch -y and -Y you\n"
+"  can make curl abort transfers if the transfer speed is below the specified\n"
+"  lowest limit for a specified time.\n"
+"\n"
+"  To have curl abort the download if the speed is slower than 3000 bytes per\n"
+"  second for 1 minute, run:\n"
+"\n"
+"        curl -Y 3000 -y 60 www.far-away-site.com\n"
+"\n"
+"  This can very well be used in combination with the overall time limit, so\n"
+"  that the above operation must be completed in whole within 30 minutes:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n"
+"\n"
+"  Forcing curl not to transfer data faster than a given rate is also possible,\n"
+"  which might be useful if you're using a limited bandwidth connection and you\n"
+"  don't want your transfer to use all of it (sometimes referred to as\n"
+"  \"bandwidth throttle\").\n"
+"\n"
+"  Make curl transfer data no faster than 10 kilobytes per second:\n"
+"\n"
+"        curl --limit-rate 10K www.far-away-site.com\n"
+"\n"
+"    or\n"
+"\n"
+"        curl --limit-rate 10240 www.far-away-site.com\n"
+"\n"
+, stdout);
+ fputs(
+"  Or prevent curl from uploading data faster than 1 megabyte per second:\n"
+"\n"
+"        curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n"
+"\n"
+"  When using the --limit-rate option, the transfer rate is regulated on a\n"
+"  per-second basis, which will cause the total transfer speed to become lower\n"
+"  than the given number. Sometimes of course substantially lower, if your\n"
+"  transfer stalls during periods.\n"
+"\n"
+"CONFIG FILE\n"
+"\n"
+"  Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
+, stdout);
+ fputs(
+"  systems) from the user's home dir on startup.\n"
+"\n"
+"  The config file could be made up with normal command line switches, but you\n"
+"  can also specify the long options without the dashes to make it more\n"
+"  readable. You can separate the options and the parameter with spaces, or\n"
+"  with = or :. Comments can be used within the file. If the first letter on a\n"
+"  line is a '#'-symbol the rest of the line is treated as a comment.\n"
+"\n"
+"  If you want the parameter to contain spaces, you must enclose the entire\n"
+, stdout);
+ fputs(
+"  parameter within double quotes (\"). Within those quotes, you specify a\n"
+"  quote as \\\".\n"
+"\n"
+"  NOTE: You must specify options and their arguments on the same line.\n"
+"\n"
+"  Example, set default time out and proxy in a config file:\n"
+"\n"
+"        # We want a 30 minute timeout:\n"
+"        -m 1800\n"
+"        # ... and we use a proxy for all accesses:\n"
+"        proxy = proxy.our.domain.com:8080\n"
+"\n"
+"  White spaces ARE significant at the end of lines, but all white spaces\n"
+, stdout);
+ fputs(
+"  leading up to the first characters of each line are ignored.\n"
+"\n"
+"  Prevent curl from reading the default file by using -q as the first command\n"
+"  line parameter, like:\n"
+"\n"
+"        curl -q www.thatsite.com\n"
+"\n"
+"  Force curl to get and display a local help page in case it is invoked\n"
+"  without URL by making a config file similar to:\n"
+"\n"
+"        # default url to get\n"
+"        url = \"http://help.with.curl.com/curlhelp.html\"\n"
+"\n"
+"  You can specify another config file to be read by using the -K/--config\n"
+, stdout);
+ fputs(
+"  flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
+"  which can be handy if you want to hide options from being visible in process\n"
+"  tables etc:\n"
+"\n"
+"        echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n"
+"\n"
+"EXTRA HEADERS\n"
+"\n"
+"  When using curl in your own very special programs, you may end up needing\n"
+"  to pass on your own custom headers when getting a web page. You can do\n"
+"  this by using the -H flag.\n"
+"\n"
+, stdout);
+ fputs(
+"  Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
+"  page:\n"
+"\n"
+"        curl -H \"X-you-and-me: yes\" www.love.com\n"
+"\n"
+"  This can also be useful in case you want curl to send a different text in a\n"
+"  header than it normally does. The -H header you specify then replaces the\n"
+"  header curl would normally send. If you replace an internal header with an\n"
+"  empty one, you prevent that header from being sent. To prevent the Host:\n"
+"  header from being used:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -H \"Host:\" www.server.com\n"
+"\n"
+"FTP and PATH NAMES\n"
+"\n"
+"  Do note that when getting files with the ftp:// URL, the given path is\n"
+"  relative the directory you enter. To get the file 'README' from your home\n"
+"  directory at your ftp site, do:\n"
+"\n"
+"        curl ftp://user:passwd@my.site.com/README\n"
+"\n"
+"  But if you want the README file from the root directory of that very same\n"
+"  site, you need to specify the absolute file name:\n"
+"\n"
+"        curl ftp://user:passwd@my.site.com//README\n"
+"\n"
+, stdout);
+ fputs(
+"  (I.e with an extra slash in front of the file name.)\n"
+"\n"
+"SFTP and SCP and PATH NAMES\n"
+"\n"
+"  With sftp: and scp: URLs, the path name given is the absolute name on the\n"
+"  server. To access a file relative to the remote user's home directory,\n"
+"  prefix the file with /~/ , such as:\n"
+"\n"
+"        curl -u $USER sftp://home.example.com/~/.bashrc\n"
+"\n"
+"FTP and firewalls\n"
+"\n"
+"  The FTP protocol requires one of the involved parties to open a second\n"
+, stdout);
+ fputs(
+"  connection as soon as data is about to get transferred. There are two ways to\n"
+"  do this.\n"
+"\n"
+"  The default way for curl is to issue the PASV command which causes the\n"
+"  server to open another port and await another connection performed by the\n"
+"  client. This is good if the client is behind a firewall that doesn't allow\n"
+"  incoming connections.\n"
+"\n"
+"        curl ftp.download.com\n"
+"\n"
+"  If the server, for example, is behind a firewall that doesn't allow connections\n"
+, stdout);
+ fputs(
+"  on ports other than 21 (or if it just doesn't support the PASV command), the\n"
+"  other way to do it is to use the PORT command and instruct the server to\n"
+"  connect to the client on the given IP number and port (as parameters to the\n"
+"  PORT command).\n"
+"\n"
+"  The -P flag to curl supports a few different options. Your machine may have\n"
+"  several IP-addresses and/or network interfaces and curl allows you to select\n"
+"  which of them to use. Default address can also be used:\n"
+"\n"
+, stdout);
+ fputs(
+"        curl -P - ftp.download.com\n"
+"\n"
+"  Download with PORT but use the IP address of our 'le0' interface (this does\n"
+"  not work on windows):\n"
+"\n"
+"        curl -P le0 ftp.download.com\n"
+"\n"
+"  Download with PORT but use 192.168.0.10 as our IP address to use:\n"
+"\n"
+"        curl -P 192.168.0.10 ftp.download.com\n"
+"\n"
+"NETWORK INTERFACE\n"
+"\n"
+"  Get a web page from a server using a specified port for the interface:\n"
+"\n"
+"        curl --interface eth0:1 http://www.netscape.com/\n"
+"\n"
+"  or\n"
+"\n"
+, stdout);
+ fputs(
+"        curl --interface 192.168.1.10 http://www.netscape.com/\n"
+"\n"
+"HTTPS\n"
+"\n"
+"  Secure HTTP requires SSL libraries to be installed and used when curl is\n"
+"  built. If that is done, curl is capable of retrieving and posting documents\n"
+"  using the HTTPS protocol.\n"
+"\n"
+"  Example:\n"
+"\n"
+"        curl https://www.secure-site.com\n"
+"\n"
+"  Curl is also capable of using your personal certificates to get/post files\n"
+"  from sites that require valid certificates. The only drawback is that the\n"
+, stdout);
+ fputs(
+"  certificate needs to be in PEM-format. PEM is a standard and open format to\n"
+"  store certificates with, but it is not used by the most commonly used\n"
+"  browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n"
+"  want curl to use the certificates you use with your (favourite) browser, you\n"
+"  may need to download/compile a converter that can convert your browser's\n"
+"  formatted certificates to PEM formatted ones. This kind of converter is\n"
+, stdout);
+ fputs(
+"  included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
+"  N. Henson has written a patch for SSLeay that adds this functionality. You\n"
+"  can get his patch (that requires an SSLeay installation) from his site at:\n"
+"  http://www.drh-consultancy.demon.co.uk/\n"
+"\n"
+"  Example on how to automatically retrieve a document using a certificate with\n"
+"  a personal password:\n"
+"\n"
+"        curl -E /path/to/cert.pem:password https://secure.site.com/\n"
+"\n"
+, stdout);
+ fputs(
+"  If you neglect to specify the password on the command line, you will be\n"
+"  prompted for the correct password before any data can be received.\n"
+"\n"
+"  Many older SSL-servers have problems with SSLv3 or TLS, which newer versions\n"
+"  of OpenSSL etc use, therefore it is sometimes useful to specify what\n"
+"  SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n"
+"  version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n"
+"\n"
+"        curl -2 https://secure.site.com/\n"
+"\n"
+, stdout);
+ fputs(
+"  Otherwise, curl will first attempt to use v3 and then v2.\n"
+"\n"
+"  To use OpenSSL to convert your favourite browser's certificate into a PEM\n"
+"  formatted one that curl can use, do something like this:\n"
+"\n"
+"    In Netscape, you start with hitting the 'Security' menu button.\n"
+"\n"
+"    Select 'certificates->yours' and then pick a certificate in the list\n"
+"\n"
+"    Press the 'Export' button\n"
+"\n"
+"    enter your PIN code for the certs\n"
+"\n"
+"    select a proper place to save it\n"
+"\n"
+, stdout);
+ fputs(
+"    Run the 'openssl' application to convert the certificate. If you cd to the\n"
+"    openssl installation, you can do it like:\n"
+"\n"
+"     # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n"
+"\n"
+"    In Firefox, select Options, then Advanced, then the Encryption tab,\n"
+"    View Certificates. This opens the Certificate Manager, where you can\n"
+"    Export. Be sure to select PEM for the Save as type.\n"
+"\n"
+"    In Internet Explorer, select Internet Options, then the Content tab, then\n"
+, stdout);
+ fputs(
+"    Certificates. Then you can Export, and depending on the format you may\n"
+"    need to convert to PEM.\n"
+"\n"
+"    In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL\n"
+"    select Manage Certificates.\n"
+"\n"
+"RESUMING FILE TRANSFERS\n"
+"\n"
+" To continue a file transfer where it was previously aborted, curl supports\n"
+" resume on HTTP(S) downloads as well as FTP uploads and downloads.\n"
+"\n"
+" Continue downloading a document:\n"
+"\n"
+"        curl -C - -o file ftp://ftp.server.com/path/file\n"
+"\n"
+, stdout);
+ fputs(
+" Continue uploading a document(*1):\n"
+"\n"
+"        curl -C - -T file ftp://ftp.server.com/path/file\n"
+"\n"
+" Continue downloading a document from a web server(*2):\n"
+"\n"
+"        curl -C - -o file http://www.server.com/\n"
+"\n"
+" (*1) = This requires that the FTP server supports the non-standard command\n"
+"        SIZE. If it doesn't, curl will say so.\n"
+"\n"
+" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n"
+"        doesn't, curl will say so.\n"
+"\n"
+"TIME CONDITIONS\n"
+"\n"
+, stdout);
+ fputs(
+" HTTP allows a client to specify a time condition for the document it\n"
+" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to\n"
+" specify them with the -z/--time-cond flag.\n"
+"\n"
+" For example, you can easily make a download that only gets performed if the\n"
+" remote file is newer than a local copy. It would be made like:\n"
+"\n"
+"        curl -z local.html http://remote.server.com/remote.html\n"
+"\n"
+" Or you can download a file only if the local file is newer than the remote\n"
+, stdout);
+ fputs(
+" one. Do this by prepending the date string with a '-', as in:\n"
+"\n"
+"        curl -z -local.html http://remote.server.com/remote.html\n"
+"\n"
+" You can specify a \"free text\" date as condition. Tell curl to only download\n"
+" the file if it was updated since January 12, 2012:\n"
+"\n"
+"        curl -z \"Jan 12 2012\" http://remote.server.com/remote.html\n"
+"\n"
+" Curl will then accept a wide range of date formats. You always make the date\n"
+" check the other way around by prepending it with a dash '-'.\n"
+"\n"
+"DICT\n"
+"\n"
+"  For fun try\n"
+"\n"
+, stdout);
+ fputs(
+"        curl dict://dict.org/m:curl\n"
+"        curl dict://dict.org/d:heisenbug:jargon\n"
+"        curl dict://dict.org/d:daniel:web1913\n"
+"\n"
+"  Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
+"  and 'lookup'. For example,\n"
+"\n"
+"        curl dict://dict.org/find:curl\n"
+"\n"
+"  Commands that break the URL description of the RFC (but not the DICT\n"
+"  protocol) are\n"
+"\n"
+"        curl dict://dict.org/show:db\n"
+"        curl dict://dict.org/show:strat\n"
+"\n"
+, stdout);
+ fputs(
+"  Authentication is still missing (but this is not required by the RFC)\n"
+"\n"
+"LDAP\n"
+"\n"
+"  If you have installed the OpenLDAP library, curl can take advantage of it\n"
+"  and offer ldap:// support.\n"
+"\n"
+"  LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
+"  advise you to dig up the syntax description for that elsewhere. Two places\n"
+"  that might suit you are:\n"
+"\n"
+"  Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n"
+"  Working with LDAP URLs\":\n"
+, stdout);
+ fputs(
+"  http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n"
+"\n"
+"  RFC 2255, \"The LDAP URL Format\" http://curl.haxx.se/rfc/rfc2255.txt\n"
+"\n"
+"  To show you an example, this is how I can get all people from my local LDAP\n"
+"  server that has a certain sub-domain in their email address:\n"
+"\n"
+"        curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
+"\n"
+"  If I want the same info in HTML format, I can get it by not using the -B\n"
+"  (enforce ASCII) flag.\n"
+"\n"
+"ENVIRONMENT VARIABLES\n"
+"\n"
+, stdout);
+ fputs(
+"  Curl reads and understands the following environment variables:\n"
+"\n"
+"        http_proxy, HTTPS_PROXY, FTP_PROXY\n"
+"\n"
+"  They should be set for protocol-specific proxies. General proxy should be\n"
+"  set with\n"
+"\n"
+"        ALL_PROXY\n"
+"\n"
+"  A comma-separated list of host names that shouldn't go through any proxy is\n"
+"  set in (only an asterisk, '*' matches all hosts)\n"
+"\n"
+"        NO_PROXY\n"
+"\n"
+"  If the host name matches one of these strings, or the host is within the\n"
+, stdout);
+ fputs(
+"  domain of one of these strings, transactions with that node will not be\n"
+"  proxied.\n"
+"\n"
+"\n"
+"  The usage of the -x/--proxy flag overrides the environment variables.\n"
+"\n"
+"NETRC\n"
+"\n"
+"  Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
+"  to specify name and password for commonly visited FTP sites in a file so\n"
+"  that you don't have to type them in each time you visit those sites. You\n"
+"  realize this is a big security risk if someone else gets hold of your\n"
+, stdout);
+ fputs(
+"  passwords, so therefore most unix programs won't read this file unless it is\n"
+"  only readable by yourself (curl doesn't care though).\n"
+"\n"
+"  Curl supports .netrc files if told to (using the -n/--netrc and\n"
+"  --netrc-optional options). This is not restricted to just FTP,\n"
+"  so curl can use it for all protocols where authentication is used.\n"
+"\n"
+"  A very simple .netrc file could look something like:\n"
+"\n"
+"        machine curl.haxx.se login iamdaniel password mysecret\n"
+"\n"
+"CUSTOM OUTPUT\n"
+"\n"
+, stdout);
+ fputs(
+"  To better allow script programmers to get to know about the progress of\n"
+"  curl, the -w/--write-out option was introduced. Using this, you can specify\n"
+"  what information from the previous transfer you want to extract.\n"
+"\n"
+"  To display the amount of bytes downloaded together with some text and an\n"
+"  ending newline:\n"
+"\n"
+"        curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
+"\n"
+"KERBEROS FTP TRANSFER\n"
+"\n"
+"  Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need\n"
+, stdout);
+ fputs(
+"  the kerberos package installed and used at curl build time for it to be\n"
+"  available.\n"
+"\n"
+"  First, get the krb-ticket the normal way, like with the kinit/kauth tool.\n"
+"  Then use curl in way similar to:\n"
+"\n"
+"        curl --krb private ftp://krb4site.com -u username:fakepwd\n"
+"\n"
+"  There's no use for a password on the -u switch, but a blank one will make\n"
+"  curl ask for one and you already entered the real password to kinit/kauth.\n"
+"\n"
+"TELNET\n"
+"\n"
+, stdout);
+ fputs(
+"  The curl telnet support is basic and very easy to use. Curl passes all data\n"
+"  passed to it on stdin to the remote server. Connect to a remote telnet\n"
+"  server using a command line similar to:\n"
+"\n"
+"        curl telnet://remote.server.com\n"
+"\n"
+"  And enter the data to pass to the server on stdin. The result will be sent\n"
+"  to stdout or to the file you specify with -o.\n"
+"\n"
+"  You might want the -N/--no-buffer option to switch off the buffered output\n"
+"  for slow connections or similar.\n"
+"\n"
+, stdout);
+ fputs(
+"  Pass options to the telnet protocol negotiation, by using the -t option. To\n"
+"  tell the server we use a vt100 terminal, try something like:\n"
+"\n"
+"        curl -tTTYPE=vt100 telnet://remote.server.com\n"
+"\n"
+"  Other interesting options for it -t include:\n"
+"\n"
+"   - XDISPLOC=<X display> Sets the X display location.\n"
+"\n"
+"   - NEW_ENV=<var,val> Sets an environment variable.\n"
+"\n"
+"  NOTE: The telnet protocol does not specify any way to login with a specified\n"
+, stdout);
+ fputs(
+"  user and password so curl can't do that automatically. To do that, you need\n"
+"  to track when the login prompt is received and send the username and\n"
+"  password accordingly.\n"
+"\n"
+"PERSISTENT CONNECTIONS\n"
+"\n"
+"  Specifying multiple files on a single command line will make curl transfer\n"
+"  all of them, one after the other in the specified order.\n"
+"\n"
+"  libcurl will attempt to use persistent connections for the transfers so that\n"
+"  the second transfer to the same host can use the same connection that was\n"
+, stdout);
+ fputs(
+"  already initiated and was left open in the previous transfer. This greatly\n"
+"  decreases connection time for all but the first transfer and it makes a far\n"
+"  better use of the network.\n"
+"\n"
+"  Note that curl cannot use persistent connections for transfers that are used\n"
+"  in subsequence curl invokes. Try to stuff as many URLs as possible on the\n"
+"  same command line if they are using the same host, as that'll make the\n"
+"  transfers faster. If you use an HTTP proxy for file transfers, practically\n"
+, stdout);
+ fputs(
+"  all transfers will be persistent.\n"
+"\n"
+"MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE\n"
+"\n"
+"  As is mentioned above, you can download multiple files with one command line\n"
+"  by simply adding more URLs. If you want those to get saved to a local file\n"
+"  instead of just printed to stdout, you need to add one save option for each\n"
+"  URL you specify. Note that this also goes for the -O option (but not\n"
+"  --remote-name-all).\n"
+"\n"
+"  For example: get two files and use -O for the first and a custom file\n"
+, stdout);
+ fputs(
+"  name for the second:\n"
+"\n"
+"    curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg\n"
+"\n"
+"  You can also upload multiple files in a similar fashion:\n"
+"\n"
+"    curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt\n"
+"\n"
+"IPv6\n"
+"\n"
+"  curl will connect to a server with IPv6 when a host lookup returns an IPv6\n"
+"  address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6\n"
+"  options can specify which address to use when both are available. IPv6\n"
+, stdout);
+ fputs(
+"  addresses can also be specified directly in URLs using the syntax:\n"
+"\n"
+"    http://[2001:1890:1112:1::20]/overview.html\n"
+"\n"
+"  When this style is used, the -g option must be given to stop curl from\n"
+"  interpreting the square brackets as special globbing characters.  Link local\n"
+"  and site local addresses including a scope identifier, such as fe80::1234%1,\n"
+"  may also be used, but the scope portion must be numeric and the percent\n"
+"  character must be URL escaped. The previous example in an SFTP URL might\n"
+, stdout);
+ fputs(
+"  look like:\n"
+"\n"
+"    sftp://[fe80::1234%251]/\n"
+"\n"
+"  IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface\n"
+"  or --ftp-port options) should not be URL encoded.\n"
+"\n"
+"METALINK\n"
+"\n"
+"  Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way\n"
+"  to list multiple URIs and hashes for a file. Curl will make use of the mirrors\n"
+"  listed within for failover if there are errors (such as the file or server not\n"
+, stdout);
+ fputs(
+"  being available). It will also verify the hash of the file after the download\n"
+"  completes. The Metalink file itself is downloaded and processed in memory and\n"
+"  not stored in the local file system.\n"
+"\n"
+"  Example to use a remote Metalink file:\n"
+"\n"
+"    curl --metalink http://www.example.com/example.metalink\n"
+"\n"
+"  To use a Metalink file in the local file system, use FILE protocol (file://):\n"
+"\n"
+"    curl --metalink file://example.metalink\n"
+"\n"
+, stdout);
+ fputs(
+"  Please note that if FILE protocol is disabled, there is no way to use a local\n"
+"  Metalink file at the time of this writing. Also note that if --metalink and\n"
+"  --include are used together, --include will be ignored. This is because including\n"
+"  headers in the response will break Metalink parser and if the headers are included\n"
+"  in the file described in Metalink file, hash check will fail.\n"
+"\n"
+"MAILING LISTS\n"
+"\n"
+"  For your convenience, we have several open mailing lists to discuss curl,\n"
+, stdout);
+ fputs(
+"  its development and things relevant to this. Get all info at\n"
+"  http://curl.haxx.se/mail/. Some of the lists available are:\n"
+"\n"
+"  curl-users\n"
+"\n"
+"    Users of the command line tool. How to use it, what doesn't work, new\n"
+"    features, related tools, questions, news, installations, compilations,\n"
+"    running, porting etc.\n"
+"\n"
+"  curl-library\n"
+"\n"
+"    Developers using or developing libcurl. Bugs, extensions, improvements.\n"
+"\n"
+"  curl-announce\n"
+"\n"
+, stdout);
+ fputs(
+"    Low-traffic. Only receives announcements of new public versions. At worst,\n"
+"    that makes something like one or two mails per month, but usually only one\n"
+"    mail every second month.\n"
+"\n"
+"  curl-and-php\n"
+"\n"
+"    Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n"
+"    with a curl angle.\n"
+"\n"
+"  curl-and-python\n"
+"\n"
+"    Python hackers using curl with or without the python binding pycurl.\n"
+"\n"
+"  Please direct curl questions, feature requests and trouble reports to one of\n"
+, stdout);
+ fputs(
+"  these mailing lists instead of mailing any individual.\n"
+, stdout) ;
+}
+#endif /* USE_MANUAL */
+#else
+/*
+ * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
+ * Generation time: Mon Aug  5 13:11:08 2013
+ */
+#ifdef USE_MANUAL
+#include "tool_hugehelp.h"
+#include <zlib.h>
+#include "memdebug.h" /* keep this as LAST include */
+static const unsigned char hugehelpgz[] = {
+  /* This mumbo-jumbo is the huge help text compressed with gzip.
+     Thanks to this operation, the size of this data shrunk from 148877
+     to 45488 bytes. You can disable the use of compressed help
+     texts by NOT passing -c to the mkhelp.pl tool. */
+  0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xed, 0xbd,
+  0xfd, 0x7b, 0xdb, 0x56, 0x92, 0x26, 0xfa, 0xbb, 0xfe, 0x0a, 0x0c, 0xfb,
+  0xf6, 0x48, 0x9a, 0x26, 0xa9, 0x0f, 0xdb, 0x49, 0xac, 0xb6, 0x33, 0x51,
+  0x64, 0x39, 0xd1, 0x46, 0xb6, 0xb4, 0xa2, 0x9c, 0xa4, 0x37, 0xc9, 0xe3,
+  0x07, 0x24, 0x21, 0x09, 0x2d, 0x92, 0x60, 0x03, 0xa0, 0x64, 0xf5, 0xec,
+  0xec, 0xdf, 0x7e, 0xab, 0xde, 0xaa, 0x3a, 0xe7, 0x00, 0x07, 0x94, 0x9d,
+  0x4c, 0xa7, 0xef, 0xde, 0x7d, 0xb6, 0x77, 0xc7, 0xb1, 0x25, 0xe0, 0xe0,
+  0x7c, 0xd6, 0xa9, 0x8f, 0xb7, 0xde, 0x4a, 0x92, 0x8f, 0xfd, 0xef, 0x3d,
+  0xfe, 0xef, 0x3d, 0xfd, 0x8f, 0xfe, 0xbb, 0x91, 0x24, 0xe7, 0x65, 0xf1,
+  0xd7, 0x6c, 0x52, 0x77, 0x3f, 0xfb, 0xfe, 0xfd, 0xff, 0x4c, 0xe4, 0xff,
+  0xd1, 0x3b, 0x3f, 0xd3, 0x7f, 0x37, 0x1e, 0x6d, 0x7b, 0x27, 0xf1, 0x2f,
+  0xfc, 0xcf, 0xf7, 0xdb, 0xc9, 0xc7, 0x5e, 0xf8, 0x9f, 0xc9, 0x16, 0x5e,
+  0x78, 0xaf, 0x5f, 0x78, 0xc1, 0x7f, 0x7f, 0xff, 0xfe, 0xf1, 0x8f, 0xfc,
+  0xcc, 0xbd, 0xe2, 0x3f, 0x76, 0xf8, 0xbd, 0x9f, 0xdf, 0xf3, 0x5f, 0xe9,
+  0x27, 0x1b, 0x1b, 0x6f, 0x0f, 0xdf, 0x1c, 0xdb, 0xab, 0x93, 0x55, 0x39,
+  0x4b, 0x06, 0x49, 0x5d, 0xa6, 0x8b, 0xea, 0x2a, 0x2b, 0x93, 0x34, 0x79,
+  0x77, 0x71, 0xba, 0xb1, 0x31, 0xfa, 0xcb, 0xdb, 0xb3, 0xf3, 0xd1, 0xc9,
+  0xa8, 0xf1, 0xd8, 0x4f, 0xc5, 0xb2, 0xce, 0x8b, 0x45, 0xf5, 0x4b, 0xf2,
+  0x13, 0x3d, 0x34, 0x1c, 0x0e, 0x7f, 0xd9, 0xd8, 0x78, 0x75, 0x3c, 0x3a,
+  0xba, 0x38, 0x39, 0xbf, 0x3c, 0x39, 0x7b, 0xdb, 0x78, 0x36, 0xc9, 0xab,
+  0x84, 0x1a, 0xab, 0x8b, 0x62, 0x46, 0x7f, 0xf8, 0xf6, 0xa7, 0x69, 0x9d,
+  0x26, 0x57, 0x65, 0x31, 0x4f, 0x8a, 0x92, 0x7f, 0x91, 0x26, 0x55, 0x56,
+  0xde, 0x65, 0x65, 0x3f, 0x59, 0x55, 0xf9, 0xe2, 0x3a, 0x29, 0x16, 0x59,
+  0x52, 0x5c, 0x25, 0xf5, 0x4d, 0x66, 0xcd, 0x55, 0xab, 0xe5, 0xb2, 0x28,
+  0xeb, 0x6c, 0x9a, 0x2c, 0xcb, 0xa2, 0x2e, 0x26, 0xc5, 0xac, 0x4a, 0xb6,
+  0x5e, 0x9d, 0x1c, 0x5d, 0xf6, 0x93, 0xd7, 0x27, 0xa7, 0xc7, 0xf4, 0xe7,
+  0xe5, 0x39, 0xfe, 0x18, 0xf5, 0x93, 0x6f, 0xce, 0xce, 0xbf, 0x3d, 0xbe,
+  0xe8, 0x27, 0xdf, 0x5e, 0xf2, 0xcf, 0xf8, 0x4f, 0xfa, 0x61, 0x72, 0xf2,
+  0xe6, 0xf0, 0xbc, 0x6f, 0xcd, 0xf1, 0x3f, 0xf8, 0x87, 0xa7, 0xaf, 0xe8,
+  0x87, 0xf2, 0x1f, 0xfe, 0xe7, 0xf9, 0xd9, 0xf9, 0x93, 0x3e, 0xfe, 0xa4,
+  0x7f, 0x5d, 0x5c, 0xbe, 0x39, 0xe7, 0x3f, 0x47, 0xf4, 0xe7, 0xe8, 0x88,
+  0xff, 0xc0, 0x37, 0x46, 0x6f, 0xec, 0xcf, 0x91, 0x6b, 0xee, 0xf2, 0xf8,
+  0xf4, 0xed, 0xf1, 0x65, 0x92, 0x2e, 0xa6, 0xc9, 0x25, 0x3d, 0xb4, 0x3d,
+  0xa4, 0x1f, 0xdd, 0x64, 0xc9, 0xa4, 0x98, 0xcf, 0xf9, 0x67, 0x34, 0x0b,
+  0xd3, 0xac, 0xca, 0xaf, 0x17, 0xd4, 0x7d, 0x1a, 0xed, 0x7d, 0x51, 0xde,
+  0x26, 0xf7, 0x79, 0x7d, 0x53, 0xac, 0x6a, 0x1a, 0x30, 0xcd, 0x47, 0x92,
+  0x2f, 0xea, 0xac, 0x1c, 0x58, 0x73, 0xe9, 0x84, 0x67, 0x78, 0xb8, 0xd1,
+  0x98, 0xcb, 0xe2, 0x8a, 0x66, 0xae, 0xa2, 0xa9, 0x1a, 0xaf, 0xaa, 0x59,
+  0x91, 0x4e, 0x79, 0x82, 0xe8, 0xe5, 0xab, 0x15, 0x4d, 0x6d, 0x99, 0x4f,
+  0x6e, 0xab, 0x64, 0x96, 0xdf, 0x66, 0x3c, 0x3d, 0x1f, 0x1e, 0x6c, 0xba,
+  0xfa, 0xd2, 0x7c, 0xba, 0xa2, 0x99, 0x5c, 0xb8, 0xe6, 0xeb, 0x7c, 0x92,
+  0xf2, 0x07, 0x30, 0x5f, 0xc9, 0x6a, 0xc9, 0xad, 0xc9, 0x3c, 0x25, 0xcb,
+  0xa2, 0xa2, 0x97, 0x46, 0xa3, 0x53, 0xea, 0xfb, 0x62, 0x91, 0xa1, 0x1f,
+  0x55, 0x9f, 0xfe, 0x51, 0xdc, 0xe6, 0x19, 0xfd, 0xe5, 0x2a, 0x9f, 0x65,
+  0x89, 0xac, 0xa3, 0x6b, 0x8e, 0x17, 0x34, 0x29, 0xb3, 0x6a, 0x35, 0xcf,
+  0x68, 0x0a, 0xdf, 0x64, 0x75, 0x3a, 0xcb, 0x17, 0xb7, 0xf4, 0x57, 0x1e,
+  0xfa, 0xbc, 0x28, 0xb3, 0x61, 0x72, 0x58, 0x25, 0x0f, 0xc5, 0x8a, 0xc6,
+  0x3c, 0x9b, 0xd1, 0x4a, 0x67, 0xc9, 0x38, 0x9b, 0x15, 0xf7, 0x7d, 0x5e,
+  0xdf, 0x64, 0xb1, 0x9a, 0x8f, 0xa9, 0x81, 0xe2, 0xca, 0x37, 0x97, 0xd6,
+  0x2b, 0x6a, 0x4e, 0x9e, 0x9e, 0xa7, 0x34, 0x26, 0x7a, 0xb7, 0x4c, 0x6e,
+  0x32, 0x1a, 0x73, 0xb5, 0xcc, 0x17, 0xff, 0xd2, 0x9c, 0x17, 0x9a, 0xdc,
+  0x65, 0x71, 0x9f, 0x95, 0x34, 0xb7, 0xe3, 0x87, 0x84, 0x26, 0x61, 0x2c,
+  0x5b, 0xef, 0x8a, 0xb6, 0x56, 0x92, 0x52, 0x13, 0x6e, 0xdb, 0x0d, 0xca,
+  0x6c, 0x96, 0xf2, 0x16, 0x72, 0xdf, 0xa0, 0x75, 0x1a, 0x65, 0x6e, 0x8f,
+  0xe9, 0xab, 0x5b, 0x4f, 0xb6, 0xf1, 0xf2, 0x94, 0x46, 0x92, 0xcf, 0x2a,
+  0x5a, 0x06, 0x3e, 0x0c, 0xb6, 0xd2, 0xd4, 0x65, 0x3e, 0x1c, 0xb4, 0x23,
+  0x1f, 0x16, 0x75, 0xfa, 0x01, 0x9f, 0xd7, 0x1d, 0x39, 0x98, 0x66, 0xcb,
+  0x6c, 0x31, 0xcd, 0x16, 0xf5, 0x30, 0xf9, 0x4b, 0xb1, 0xda, 0xa4, 0x6f,
+  0x5f, 0xe5, 0x34, 0x07, 0xa9, 0x36, 0x45, 0x5f, 0xa6, 0x6d, 0x30, 0x29,
+  0xf3, 0x65, 0xb0, 0x14, 0xc5, 0x82, 0x16, 0x3f, 0xb9, 0x78, 0x7d, 0x94,
+  0x3c, 0x79, 0xfe, 0xc5, 0x67, 0x7e, 0xcd, 0xa9, 0x81, 0x64, 0x92, 0x2e,
+  0x68, 0xc4, 0xd9, 0x24, 0xbf, 0x7a, 0x48, 0xe6, 0xab, 0x59, 0x9d, 0x2f,
+  0x69, 0xf6, 0xe9, 0xe3, 0x15, 0x1f, 0x9b, 0x65, 0x5a, 0xd6, 0x15, 0x6f,
+  0x02, 0xfc, 0x00, 0x63, 0xbf, 0x2f, 0xf3, 0x9a, 0x8f, 0x0f, 0x7e, 0x47,
+  0x3d, 0xcc, 0xea, 0xca, 0x9a, 0xe3, 0xed, 0x46, 0xdf, 0x19, 0x97, 0xe9,
+  0x84, 0xa6, 0x36, 0xad, 0xe8, 0xa3, 0x07, 0xee, 0x5b, 0xc9, 0x4d, 0x5d,
+  0x2f, 0x0f, 0x76, 0x76, 0xaa, 0xbc, 0xce, 0x86, 0xff, 0x41, 0x87, 0xaf,
+  0x5f, 0xdf, 0x17, 0xfd, 0xfa, 0xa6, 0xcc, 0xb2, 0xff, 0x1c, 0xd2, 0x26,
+  0x76, 0x0f, 0xd2, 0x67, 0x1f, 0xb4, 0x5f, 0xd7, 0x59, 0x4d, 0x1f, 0xf8,
+  0xdb, 0x2a, 0x5b, 0x70, 0x83, 0xd4, 0x8d, 0x74, 0xb6, 0xbc, 0x49, 0x69,
+  0x35, 0x33, 0xda, 0x8c, 0x7c, 0x9c, 0x69, 0xbf, 0x70, 0xa7, 0xe4, 0x40,
+  0xff, 0xf4, 0x4b, 0xf4, 0xcd, 0x2b, 0x7c, 0x92, 0xfe, 0x1c, 0xea, 0x4b,
+  0x29, 0xcd, 0x35, 0x7d, 0x6c, 0x87, 0xf7, 0xd8, 0x4f, 0x7b, 0x83, 0xbd,
+  0xdd, 0xdd, 0x5f, 0x86, 0xf5, 0x87, 0xfa, 0x13, 0x5f, 0xd8, 0xdd, 0xf5,
+  0xaf, 0xf0, 0xd3, 0x5b, 0x3c, 0xe2, 0x64, 0x46, 0x9b, 0x86, 0xbf, 0xff,
+  0xf7, 0xac, 0x2c, 0xaa, 0xed, 0x8e, 0xa6, 0x66, 0x59, 0x4d, 0x27, 0x2f,
+  0x68, 0x27, 0x1d, 0xfc, 0x5d, 0x3e, 0x6b, 0x0f, 0xbf, 0xcd, 0x2a, 0xec,
+  0x19, 0x3f, 0xd8, 0x24, 0x2d, 0x69, 0xdf, 0x16, 0xb5, 0x17, 0x4a, 0x7d,
+  0x3a, 0x94, 0xb5, 0x9b, 0x1a, 0x3a, 0x73, 0xf4, 0x34, 0x89, 0xb3, 0x74,
+  0xc6, 0x92, 0xac, 0x4a, 0x16, 0x99, 0x1f, 0x06, 0x9d, 0xff, 0x2c, 0x9d,
+  0xdc, 0x24, 0x05, 0x6d, 0xfe, 0x32, 0x5e, 0x82, 0x74, 0xf1, 0x30, 0x2c,
+  0xca, 0xeb, 0x9d, 0xb4, 0x9c, 0xdc, 0xe4, 0x77, 0x34, 0x0f, 0xcf, 0x9f,
+  0x7f, 0x36, 0xa0, 0x3f, 0x9e, 0xff, 0xb2, 0x73, 0x57, 0xcc, 0x68, 0x5a,
+  0x9e, 0xfe, 0xb2, 0xc3, 0xab, 0xfb, 0x1f, 0x69, 0x7f, 0xdc, 0x9f, 0xfc,
+  0xe7, 0xf0, 0xa6, 0x9e, 0xcf, 0xd6, 0xee, 0x19, 0x6a, 0x2c, 0x49, 0xe7,
+  0xc5, 0x6a, 0x51, 0xbb, 0x7d, 0x42, 0xdb, 0xad, 0x0e, 0x24, 0x13, 0x9d,
+  0xd4, 0x4c, 0x84, 0x15, 0x6f, 0x1f, 0x3e, 0x70, 0x74, 0x36, 0xfd, 0x49,
+  0xac, 0x27, 0x37, 0x34, 0x74, 0xda, 0x37, 0xa9, 0x0e, 0xbf, 0xce, 0x53,
+  0x3e, 0x93, 0x24, 0x1a, 0x4a, 0xfe, 0x31, 0x37, 0x25, 0x1f, 0xcb, 0xe9,
+  0xb9, 0xa2, 0x9c, 0x66, 0x65, 0x73, 0x07, 0xa3, 0x3b, 0xbe, 0x3f, 0x09,
+  0x4d, 0xe5, 0x92, 0x3e, 0xbe, 0x62, 0x71, 0x87, 0x43, 0xc6, 0x2d, 0xd0,
+  0xf1, 0xbc, 0xa6, 0x59, 0xa2, 0x99, 0xe1, 0x4d, 0xc5, 0x13, 0xf7, 0x90,
+  0xbc, 0xa5, 0xc5, 0x13, 0xd1, 0x10, 0xec, 0x3d, 0x59, 0xac, 0x78, 0xd2,
+  0xee, 0xef, 0xef, 0xd7, 0x6f, 0xa2, 0x83, 0xbd, 0xd6, 0x3e, 0x0a, 0x5e,
+  0xea, 0x5a, 0xfd, 0x83, 0xfd, 0xe6, 0xfa, 0x9f, 0x5c, 0x61, 0x61, 0x6d,
+  0x0c, 0x7c, 0xf6, 0x4d, 0x76, 0xdb, 0xc1, 0xa7, 0xd6, 0xe8, 0xef, 0xd9,
+  0x55, 0xfe, 0xa1, 0x6f, 0x17, 0x9f, 0xcc, 0x65, 0x4a, 0xcd, 0xcf, 0x97,
+  0x35, 0xaf, 0xba, 0x35, 0x77, 0xbd, 0xca, 0x2a, 0xda, 0x42, 0xf7, 0x37,
+  0x29, 0xfd, 0xd8, 0x1a, 0x48, 0xf0, 0x89, 0x79, 0x7e, 0x7d, 0x53, 0x27,
+  0xf7, 0x29, 0xcb, 0x8f, 0x93, 0x5a, 0x9a, 0x60, 0xc1, 0x4d, 0x52, 0xe3,
+  0x2a, 0xa5, 0xe3, 0xcf, 0x33, 0x04, 0x29, 0x4d, 0x9b, 0xcd, 0x6d, 0x27,
+  0x9a, 0x2b, 0x6c, 0xa5, 0xe0, 0x5e, 0x1c, 0xa7, 0x15, 0xaf, 0xc6, 0x82,
+  0x16, 0xbd, 0x26, 0xb1, 0xbf, 0xe2, 0x7f, 0xdd, 0x90, 0x60, 0x4f, 0x16,
+  0xe9, 0x3c, 0xd3, 0x8e, 0x42, 0xf6, 0xbd, 0x66, 0x11, 0x99, 0x7d, 0x48,
+  0xe7, 0x4e, 0x1e, 0x91, 0x80, 0xe9, 0xab, 0xe8, 0x74, 0x6f, 0x54, 0xb4,
+  0x6a, 0xb4, 0xe3, 0xf8, 0x18, 0xe1, 0x4c, 0xf5, 0xf8, 0xdc, 0xf4, 0x64,
+  0x9c, 0xe8, 0x63, 0x5a, 0xb1, 0xec, 0x17, 0x09, 0x4f, 0x9d, 0x0f, 0x06,
+  0x4b, 0x93, 0x96, 0xde, 0xf2, 0x2d, 0xd3, 0xba, 0xcb, 0xf0, 0xda, 0xb4,
+  0x48, 0x72, 0x92, 0x60, 0x63, 0x3a, 0x5f, 0x3c, 0x32, 0x3e, 0x35, 0x98,
+  0x15, 0x6e, 0x67, 0x49, 0x6d, 0xf2, 0x0f, 0xf3, 0x9a, 0xe5, 0x06, 0xd4,
+  0x11, 0xea, 0x2f, 0x4d, 0x0a, 0x34, 0x0a, 0x3a, 0x7b, 0xc1, 0xf8, 0x21,
+  0xf1, 0xe8, 0xd9, 0xe4, 0x8e, 0x2e, 0x1e, 0xd2, 0x2c, 0x32, 0xf7, 0x16,
+  0x44, 0xf4, 0x84, 0xaf, 0xbb, 0xd9, 0xec, 0x81, 0xb6, 0x5d, 0x59, 0xb2,
+  0xea, 0xc6, 0x2b, 0x38, 0x96, 0xc3, 0x31, 0xcf, 0xe8, 0x66, 0x08, 0xa7,
+  0x33, 0x67, 0x21, 0x45, 0x9b, 0x94, 0xae, 0x1a, 0x6c, 0x43, 0xba, 0x12,
+  0x70, 0x8c, 0x31, 0x70, 0xf4, 0x8e, 0xdb, 0x9e, 0x4c, 0xb2, 0x65, 0x5d,
+  0x75, 0x8d, 0xc9, 0x16, 0x9c, 0xba, 0x53, 0x66, 0x3c, 0xf3, 0xe1, 0x3d,
+  0x8a, 0x79, 0x75, 0x72, 0x1c, 0x57, 0xa9, 0x5d, 0x4d, 0x74, 0xb5, 0x56,
+  0x6e, 0xd6, 0x6a, 0xec, 0x0d, 0x3a, 0x0b, 0x98, 0xf3, 0x39, 0x77, 0x94,
+  0x1f, 0xae, 0x44, 0x63, 0xc2, 0x99, 0xe3, 0x85, 0x14, 0x95, 0x49, 0xbe,
+  0xcb, 0xd2, 0x88, 0xe6, 0xd3, 0x35, 0x4e, 0x5f, 0x75, 0x6b, 0xca, 0x9f,
+  0xaf, 0x48, 0xd9, 0x24, 0xe9, 0x3c, 0xad, 0x6e, 0xe8, 0x3e, 0xa5, 0xa5,
+  0xbf, 0xbc, 0xe1, 0x91, 0xce, 0x69, 0xcf, 0xdc, 0xf1, 0xfa, 0x2e, 0xb3,
+  0x6c, 0x3a, 0x4c, 0xce, 0xae, 0xf8, 0x68, 0x96, 0xd4, 0xe9, 0x1a, 0xbf,
+  0x66, 0x69, 0x41, 0xf3, 0x36, 0x85, 0x36, 0xb6, 0x70, 0x52, 0x01, 0x5d,
+  0x09, 0x8e, 0x3d, 0xef, 0x34, 0x9a, 0xec, 0x84, 0x05, 0xfd, 0xac, 0x29,
+  0x5a, 0xa0, 0x02, 0x90, 0x08, 0xe0, 0xee, 0x8d, 0xb3, 0x04, 0x3b, 0x71,
+  0x9c, 0xd5, 0xf7, 0x59, 0xe6, 0x9a, 0xab, 0x32, 0x12, 0x67, 0xbc, 0x68,
+  0x72, 0x99, 0x2f, 0xee, 0x0a, 0xee, 0xe0, 0xc6, 0xc6, 0xf9, 0xc5, 0xd9,
+  0x37, 0x17, 0xc7, 0xa3, 0x51, 0xf2, 0xe6, 0xf8, 0xf2, 0xf8, 0xa2, 0x31,
+  0xd3, 0x8b, 0xa2, 0x9c, 0x63, 0x45, 0xa7, 0x79, 0xb5, 0x9c, 0xa5, 0x0f,
+  0xbc, 0xd4, 0x34, 0x92, 0xeb, 0x92, 0x4f, 0xd6, 0x3c, 0x63, 0xd1, 0x32,
+  0x5d, 0x95, 0xd8, 0x16, 0xc5, 0x92, 0x96, 0x4f, 0x95, 0x18, 0x6a, 0x7c,
+  0x0a, 0xcd, 0x67, 0x71, 0xed, 0x67, 0x9a, 0x6e, 0x73, 0x95, 0x90, 0x2c,
+  0x22, 0xdd, 0x7a, 0xb0, 0x36, 0x01, 0x2d, 0xb5, 0xef, 0x7f, 0x26, 0xd3,
+  0x54, 0x61, 0x4c, 0xb4, 0x67, 0xf3, 0x39, 0x74, 0x09, 0xfa, 0xaf, 0x57,
+  0x20, 0xb2, 0x2b, 0xd2, 0x9e, 0x48, 0x6a, 0xb6, 0xb6, 0x86, 0xeb, 0x27,
+  0xe6, 0x15, 0xca, 0x2f, 0x6b, 0xc3, 0xf4, 0x71, 0xea, 0xeb, 0x3c, 0x5f,
+  0xd0, 0x06, 0xa3, 0x0d, 0xa9, 0xa7, 0x9c, 0x77, 0x02, 0xf5, 0xf5, 0x4a,
+  0x64, 0x82, 0xce, 0x48, 0x53, 0xab, 0xa6, 0x97, 0x69, 0xb1, 0x49, 0xb2,
+  0xba, 0xe1, 0xa1, 0x53, 0xb4, 0x35, 0xa9, 0xf9, 0x74, 0xcc, 0xa2, 0x89,
+  0xd5, 0x4c, 0xd2, 0x06, 0xb2, 0xce, 0xaf, 0x39, 0xbd, 0x95, 0xde, 0xa0,
+  0xbe, 0xa5, 0x63, 0x5e, 0x51, 0x7e, 0xa0, 0x35, 0x8b, 0x74, 0x88, 0x20,
+  0x5b, 0xee, 0xf3, 0x0a, 0x87, 0xea, 0xbe, 0x58, 0xcd, 0x48, 0xa5, 0xe3,
+  0x07, 0x56, 0x4b, 0xbc, 0x40, 0x9f, 0x5a, 0xfa, 0xd3, 0x33, 0xcf, 0x3f,
+  0xf0, 0xac, 0xb7, 0x5b, 0xa1, 0xae, 0xd1, 0x3f, 0x97, 0xb4, 0x08, 0xd2,
+  0x9d, 0x61, 0x5b, 0xb6, 0x42, 0x6a, 0x44, 0x6b, 0xc8, 0xa7, 0x05, 0xe2,
+  0xee, 0xfc, 0x6c, 0x74, 0xc9, 0xe2, 0xff, 0xfc, 0xdd, 0x25, 0x35, 0x44,
+  0xd7, 0x50, 0x55, 0xd3, 0x72, 0xf2, 0x8b, 0x8b, 0x0c, 0x1a, 0xb5, 0x35,
+  0x47, 0xab, 0x96, 0xe3, 0x88, 0xe3, 0x56, 0xb1, 0x4f, 0x4a, 0x1f, 0xc5,
+  0xcc, 0xe0, 0xcd, 0x6b, 0x46, 0x46, 0x75, 0x93, 0xb1, 0x8c, 0x76, 0x2f,
+  0x25, 0x5b, 0x5f, 0x6e, 0xd3, 0x72, 0x0f, 0x5c, 0x73, 0x3f, 0xf1, 0xd3,
+  0xbf, 0xf0, 0x97, 0xab, 0x7c, 0x9e, 0xcf, 0xd2, 0xe0, 0x6e, 0x53, 0x49,
+  0xc4, 0xfb, 0xda, 0x9d, 0xc7, 0x09, 0x89, 0x5d, 0x74, 0xda, 0x6b, 0xd5,
+  0x3c, 0x83, 0x38, 0xcd, 0x7e, 0xa1, 0xa6, 0x45, 0x26, 0xef, 0x91, 0x2a,
+  0xeb, 0x26, 0x8e, 0x57, 0x8c, 0x8f, 0x79, 0x63, 0x9a, 0xda, 0xab, 0x16,
+  0x4d, 0x1b, 0x4b, 0x72, 0x18, 0x6b, 0x6e, 0xe2, 0x7a, 0xe3, 0xb4, 0xec,
+  0x39, 0x09, 0x26, 0x16, 0x14, 0x35, 0x7a, 0xbd, 0xa2, 0xce, 0xcb, 0xac,
+  0xf6, 0x93, 0xc1, 0x1f, 0xb8, 0xe7, 0xac, 0x52, 0xbb, 0x13, 0x4d, 0xba,
+  0xda, 0x62, 0x3a, 0xdc, 0x38, 0x83, 0x01, 0xe7, 0xac, 0xbd, 0x13, 0x56,
+  0xf2, 0x16, 0x2c, 0xfe, 0xfa, 0xd0, 0xa3, 0xc7, 0x64, 0xc5, 0x65, 0xd8,
+  0x74, 0x22, 0xcd, 0x58, 0x0b, 0xca, 0x16, 0xbc, 0x79, 0xa6, 0x22, 0x1f,
+  0x07, 0x03, 0xf9, 0x15, 0x56, 0xfc, 0x81, 0xae, 0xf2, 0xf4, 0x3a, 0xcd,
+  0xdd, 0x41, 0xd7, 0x8d, 0xe6, 0x9e, 0x5d, 0x14, 0xfa, 0x38, 0x4b, 0x23,
+  0x16, 0xac, 0xba, 0xa6, 0x2b, 0xc8, 0x9f, 0x8c, 0xef, 0x25, 0x5a, 0x14,
+  0xcc, 0xac, 0x36, 0x8b, 0xdb, 0xc8, 0x9a, 0x1b, 0xe3, 0xfe, 0xe5, 0xab,
+  0x0c, 0x3b, 0x13, 0x17, 0x13, 0x35, 0xd9, 0x1b, 0x26, 0xdf, 0x92, 0x35,
+  0x00, 0x5b, 0x12, 0x0a, 0x4a, 0xce, 0x76, 0x11, 0xdd, 0x30, 0xf7, 0x19,
+  0xd9, 0x22, 0x55, 0x4d, 0x52, 0x03, 0x42, 0x0d, 0x3f, 0xa3, 0x7e, 0x3a,
+  0x31, 0x74, 0x53, 0xdc, 0xe3, 0xb3, 0x6e, 0x10, 0xd4, 0x44, 0x95, 0xe3,
+  0x12, 0xe5, 0x9f, 0xcf, 0x87, 0xc9, 0x16, 0x84, 0x26, 0x49, 0x56, 0x96,
+  0xfe, 0x7e, 0x14, 0x6e, 0x3e, 0x68, 0x1b, 0x3b, 0x75, 0x3b, 0x9d, 0x4e,
+  0x59, 0x82, 0x50, 0x0f, 0x92, 0xcf, 0x87, 0x7b, 0xcf, 0x87, 0xbb, 0x43,
+  0x76, 0x1d, 0x64, 0x77, 0x79, 0x41, 0xc6, 0x1b, 0xa9, 0x5a, 0xdc, 0x95,
+  0x24, 0x78, 0x93, 0xcc, 0x17, 0x3e, 0xd6, 0xd7, 0xd7, 0x33, 0x11, 0xa8,
+  0x3b, 0x64, 0xed, 0x05, 0x32, 0xb7, 0x24, 0xc3, 0x02, 0xd2, 0x86, 0x27,
+  0x47, 0x97, 0x55, 0xf6, 0x5c, 0x28, 0x6c, 0x75, 0x3a, 0xb7, 0xdd, 0x3e,
+  0x19, 0xfc, 0x81, 0x96, 0x7b, 0x60, 0xbb, 0x63, 0x40, 0x9b, 0xa3, 0xe5,
+  0x2b, 0x78, 0xc3, 0xd6, 0x55, 0x28, 0xa2, 0xfc, 0x56, 0x92, 0x0b, 0x94,
+  0xae, 0x88, 0x59, 0x20, 0x16, 0xa8, 0x85, 0xc4, 0x6d, 0xaf, 0xc0, 0x66,
+  0x0b, 0xc4, 0x29, 0xe9, 0x0a, 0x8b, 0x69, 0x5a, 0x92, 0x4a, 0xcc, 0xa6,
+  0x1f, 0x3d, 0x7c, 0xc5, 0xd2, 0x9a, 0x3b, 0xc6, 0xfb, 0x08, 0x7b, 0xd0,
+  0x6f, 0xe4, 0xc1, 0x2e, 0x77, 0x90, 0x15, 0xb2, 0xbd, 0xe1, 0x6e, 0xab,
+  0xb1, 0x2d, 0x3e, 0xfb, 0xdb, 0x50, 0x52, 0x58, 0xe9, 0x46, 0x2f, 0x59,
+  0x23, 0x20, 0x65, 0x23, 0x83, 0xe2, 0x60, 0xa2, 0x40, 0x8f, 0x33, 0x44,
+  0x05, 0x35, 0x63, 0xfd, 0x6b, 0x35, 0x07, 0x6b, 0x99, 0x9f, 0xe3, 0x57,
+  0x61, 0x6e, 0x2f, 0x70, 0x87, 0xc8, 0x21, 0x22, 0x21, 0x70, 0x60, 0x2d,
+  0xec, 0x05, 0xfd, 0xdb, 0xe3, 0xfe, 0xd5, 0xb3, 0xea, 0x6e, 0xaf, 0xdd,
+  0x3b, 0xb2, 0x91, 0xb7, 0xdb, 0x7d, 0xe3, 0xd5, 0xb9, 0x3c, 0x1d, 0xb9,
+  0xad, 0xb3, 0x47, 0x2a, 0x03, 0xa9, 0x6f, 0x8b, 0xec, 0xba, 0x20, 0xc5,
+  0x59, 0x4c, 0x33, 0xec, 0x9b, 0x24, 0x6d, 0x35, 0x57, 0x66, 0xf3, 0xa2,
+  0x96, 0x97, 0xe5, 0x5a, 0x0f, 0xfa, 0xb0, 0xcf, 0x7d, 0xa8, 0xaa, 0xd9,
+  0xdd, 0x7e, 0x67, 0x1f, 0xac, 0x13, 0x8d, 0x5e, 0xb0, 0x05, 0x6f, 0xbd,
+  0xd8, 0x8f, 0x7b, 0x81, 0x4e, 0xac, 0xe9, 0x03, 0xbf, 0x1a, 0xf5, 0xe1,
+  0x89, 0xf5, 0xe1, 0xc9, 0xa7, 0xce, 0x43, 0xd8, 0x83, 0x27, 0xbf, 0x76,
+  0x1e, 0x3a, 0xfb, 0xf0, 0x94, 0xfb, 0x90, 0x2f, 0xef, 0x9e, 0xb6, 0xde,
+  0x21, 0x69, 0xe8, 0xbd, 0x4d, 0x93, 0x74, 0xc9, 0x52, 0x86, 0x97, 0x9b,
+  0x76, 0x6c, 0x31, 0xbb, 0xe3, 0x8f, 0x91, 0xd0, 0xa2, 0x03, 0x89, 0x1d,
+  0x5c, 0x07, 0x4a, 0xd2, 0xc9, 0x39, 0xf7, 0x70, 0xd0, 0x6a, 0xae, 0xc2,
+  0x91, 0xdc, 0xba, 0xbf, 0xc9, 0xc9, 0x4a, 0x93, 0x2b, 0x95, 0x2e, 0x63,
+  0xf9, 0x0b, 0xbd, 0x72, 0xf7, 0xd9, 0x40, 0xbf, 0xc1, 0x97, 0x05, 0xe4,
+  0x8b, 0x93, 0x4f, 0x35, 0x5d, 0x28, 0x55, 0xab, 0x39, 0x9b, 0x13, 0xe9,
+  0x4d, 0xa6, 0x1a, 0x35, 0xfd, 0x80, 0x9a, 0x7a, 0x6a, 0xdd, 0xca, 0x44,
+  0xd5, 0x0a, 0x06, 0xfb, 0x99, 0x0e, 0xf6, 0xb3, 0xff, 0x63, 0x06, 0xfb,
+  0xd9, 0xfa, 0xc1, 0xa6, 0x3c, 0xd8, 0x74, 0xc9, 0xce, 0x93, 0xf6, 0xf6,
+  0xa2, 0xbb, 0x74, 0x87, 0xfd, 0x6e, 0xdb, 0xc9, 0x0f, 0xbc, 0x85, 0xa0,
+  0x41, 0xb2, 0x3d, 0xba, 0x70, 0x7e, 0x2b, 0xf4, 0x4a, 0x6c, 0x25, 0xbe,
+  0xcf, 0xad, 0x0b, 0x9d, 0xcd, 0xd9, 0x8d, 0x9a, 0x96, 0x6c, 0x69, 0x8a,
+  0x33, 0x2b, 0x10, 0x67, 0xf4, 0x7f, 0x34, 0x47, 0xce, 0x8b, 0x92, 0xd7,
+  0x43, 0x99, 0x70, 0xa8, 0x89, 0xfc, 0x74, 0xab, 0x39, 0xbe, 0xcb, 0x17,
+  0x9b, 0x35, 0xdb, 0x50, 0x39, 0xfb, 0xcd, 0x78, 0xe2, 0x9c, 0x15, 0x4d,
+  0xb3, 0x51, 0x42, 0x68, 0x0f, 0xd9, 0x89, 0xc0, 0xbb, 0x1a, 0x9a, 0x00,
+  0xba, 0x7b, 0x35, 0x4b, 0x49, 0x10, 0xb5, 0x67, 0x2f, 0xbf, 0x26, 0xcd,
+  0x56, 0xdc, 0x58, 0x55, 0x31, 0xe7, 0x53, 0xf0, 0xad, 0x9e, 0x02, 0x5a,
+  0xa2, 0x7c, 0x31, 0x99, 0xad, 0xe0, 0xcb, 0x38, 0xa3, 0x81, 0xd1, 0xaf,
+  0xb6, 0x83, 0x09, 0x3c, 0xe4, 0x09, 0x64, 0x57, 0xdf, 0x20, 0xa5, 0x2b,
+  0xbb, 0x4e, 0x5e, 0xc8, 0x7f, 0xaa, 0x9a, 0xb5, 0xe0, 0x2f, 0xbb, 0x05,
+  0xeb, 0x48, 0x0d, 0x5a, 0x1e, 0xdc, 0x3b, 0x7e, 0xf5, 0x30, 0x78, 0x87,
+  0x67, 0xaa, 0xa2, 0xf9, 0xb3, 0x19, 0x83, 0x68, 0xb4, 0x13, 0xd9, 0x6c,
+  0x6e, 0xc4, 0x5d, 0xa5, 0x01, 0xa7, 0x53, 0xbe, 0xd8, 0xc4, 0x5a, 0x48,
+  0x8e, 0xbe, 0x39, 0xa1, 0xad, 0x72, 0x95, 0xe6, 0x33, 0x51, 0x65, 0x65,
+  0xeb, 0x90, 0xb9, 0x30, 0xe3, 0x5b, 0x51, 0x26, 0xad, 0xca, 0x1a, 0x86,
+  0xb1, 0xfe, 0xaf, 0xf7, 0xa6, 0xf8, 0x3b, 0xcd, 0x60, 0xba, 0xf3, 0x74,
+  0xb8, 0x4b, 0x97, 0xf9, 0x65, 0x41, 0x3a, 0xc6, 0xa4, 0x98, 0x66, 0xc9,
+  0x78, 0x96, 0x2e, 0x6e, 0x2b, 0xb9, 0x53, 0xb1, 0x20, 0xd2, 0xd3, 0x3e,
+  0xfb, 0x86, 0xcb, 0x92, 0x54, 0xf8, 0x69, 0x12, 0x3a, 0x8c, 0x6d, 0x83,
+  0xcb, 0x70, 0x54, 0xdc, 0xa8, 0x89, 0x92, 0xfc, 0x6d, 0xc5, 0xeb, 0x31,
+  0x4f, 0xcb, 0x5b, 0xb3, 0x85, 0xd8, 0x4f, 0x91, 0xce, 0x48, 0xf3, 0x1e,
+  0x67, 0xe8, 0x18, 0x9e, 0x8f, 0x9b, 0x1b, 0x7c, 0x8b, 0x0b, 0x8b, 0xf6,
+  0x0b, 0xfb, 0x2c, 0xe5, 0x24, 0x14, 0x66, 0x36, 0xf9, 0x05, 0xf1, 0x87,
+  0x15, 0x03, 0xd7, 0x07, 0xf3, 0x4a, 0xf6, 0xaf, 0xf9, 0x86, 0xd8, 0x74,
+  0xa8, 0xc4, 0x0b, 0x3a, 0x4b, 0x49, 0x1f, 0xe0, 0x99, 0xc3, 0xee, 0x51,
+  0x53, 0x29, 0x58, 0xe0, 0x01, 0x69, 0x87, 0xec, 0xc5, 0xed, 0x5e, 0xca,
+  0x4b, 0x3e, 0x8a, 0x6e, 0xe7, 0x5f, 0xe5, 0xd7, 0xab, 0x32, 0x13, 0x9d,
+  0x12, 0x8e, 0x5f, 0xf3, 0xf7, 0xf2, 0xed, 0x7b, 0x53, 0x60, 0x7f, 0xd1,
+  0x25, 0x98, 0xcd, 0xae, 0xfa, 0xad, 0xe6, 0x58, 0x93, 0x80, 0xf0, 0x46,
+  0x9f, 0xa0, 0xa3, 0x54, 0xd9, 0x04, 0x8d, 0x2d, 0x32, 0xd5, 0x25, 0x21,
+  0x9f, 0xd9, 0x51, 0x98, 0x4c, 0x66, 0x69, 0x3e, 0xc7, 0xe9, 0x56, 0x3f,
+  0x58, 0x7b, 0x67, 0x5c, 0xaa, 0x15, 0x89, 0x2d, 0x31, 0x66, 0x23, 0xb6,
+  0xac, 0xd8, 0x4c, 0x85, 0x94, 0xb2, 0xeb, 0x5b, 0x4c, 0xc4, 0x9b, 0x6c,
+  0x72, 0x8b, 0x6d, 0x17, 0x28, 0xee, 0x6d, 0x59, 0x25, 0xb3, 0x5e, 0x41,
+  0x10, 0xad, 0x68, 0x23, 0x2c, 0x8b, 0xaa, 0xca, 0xc7, 0xbc, 0xe9, 0xc8,
+  0xb0, 0x5b, 0x4d, 0xb0, 0xcc, 0xb4, 0x8a, 0xd9, 0x07, 0x32, 0xd8, 0xe8,
+  0xae, 0xa9, 0xe1, 0x66, 0xc7, 0xc6, 0x18, 0xd0, 0x26, 0x58, 0xae, 0xeb,
+  0x9d, 0xac, 0x49, 0x53, 0x0c, 0x54, 0x6a, 0x7b, 0xc3, 0xac, 0x15, 0x43,
+  0x77, 0x92, 0xb4, 0x66, 0xb3, 0xd5, 0x9c, 0xcc, 0x6d, 0x9f, 0x3d, 0x3b,
+  0x2c, 0x4b, 0xc5, 0x78, 0x83, 0xf7, 0x8b, 0x4c, 0x35, 0x55, 0x16, 0xc7,
+  0x69, 0x95, 0x4f, 0x78, 0x03, 0x4d, 0xf3, 0xeb, 0x8c, 0x05, 0x06, 0xe9,
+  0x8f, 0xf5, 0x6c, 0xde, 0x0f, 0x15, 0x51, 0xb7, 0xe2, 0x76, 0x5b, 0xc6,
+  0xdb, 0xca, 0x0b, 0x13, 0xd1, 0x68, 0xdc, 0xee, 0x30, 0x93, 0x84, 0xcc,
+  0x19, 0xd2, 0x0b, 0xd9, 0x15, 0x3d, 0xe5, 0xd3, 0x87, 0xae, 0x50, 0x2f,
+  0x54, 0x64, 0xb6, 0xc5, 0x0e, 0xbc, 0x0a, 0x74, 0x50, 0x48, 0xb8, 0xf4,
+  0xf9, 0x84, 0x4c, 0x60, 0xeb, 0xcd, 0xd3, 0x07, 0x2c, 0x11, 0xd9, 0x46,
+  0xce, 0x1a, 0xc1, 0xd9, 0x60, 0x07, 0xcf, 0x7d, 0x3e, 0x11, 0xdb, 0x9e,
+  0x27, 0xa4, 0x43, 0x09, 0x9c, 0xcc, 0x72, 0x7e, 0x6e, 0xbe, 0xaa, 0x60,
+  0xf7, 0xe3, 0x92, 0xc2, 0xb5, 0x70, 0x4f, 0x4b, 0x35, 0x94, 0x73, 0x91,
+  0x89, 0xf5, 0x46, 0x8a, 0x37, 0x1b, 0x95, 0x69, 0x99, 0xc3, 0xff, 0x13,
+  0x35, 0x27, 0x7d, 0xe6, 0x61, 0xa2, 0x9f, 0xda, 0x4d, 0x7e, 0x5d, 0x4d,
+  0x2c, 0x6f, 0x5a, 0xe1, 0xec, 0xb0, 0xcc, 0x09, 0x0e, 0xce, 0x98, 0x27,
+  0x59, 0xc2, 0x17, 0xc9, 0x0b, 0xbe, 0x8e, 0x5e, 0xf2, 0x60, 0xd6, 0x88,
+  0xc4, 0xe4, 0x1c, 0x6e, 0xa7, 0x9b, 0xa6, 0xfd, 0x15, 0xc8, 0x3e, 0xd1,
+  0x8a, 0xa5, 0x39, 0xf8, 0xe8, 0x68, 0xc2, 0x69, 0xf3, 0xb7, 0x77, 0x2a,
+  0xed, 0xcc, 0x8c, 0xa5, 0xa1, 0x6b, 0x69, 0xe9, 0x55, 0x7f, 0x5a, 0x9b,
+  0x2c, 0xbf, 0xa3, 0x81, 0x7b, 0x67, 0x8e, 0x34, 0x0d, 0x2f, 0x6b, 0xd2,
+  0x1b, 0x65, 0x75, 0xbb, 0xb9, 0x23, 0x7c, 0xef, 0xa0, 0x97, 0x04, 0xee,
+  0x5a, 0x69, 0x57, 0x27, 0x6f, 0x9c, 0x99, 0x33, 0x56, 0x94, 0xed, 0xa4,
+  0xc7, 0xc1, 0xbd, 0xbd, 0x97, 0xdf, 0x1f, 0x9e, 0xbe, 0x3b, 0xde, 0xfb,
+  0x73, 0x7b, 0xfb, 0xd0, 0xef, 0xf6, 0xe5, 0x77, 0xfb, 0xbd, 0x2e, 0x99,
+  0x45, 0x36, 0xcd, 0xe6, 0xcb, 0xcd, 0xa4, 0x7a, 0x98, 0x8f, 0x8b, 0x99,
+  0x93, 0x5a, 0xfa, 0x05, 0xee, 0x42, 0x5f, 0x35, 0x84, 0x5a, 0x2e, 0x38,
+  0x9e, 0x15, 0xee, 0x3b, 0xdf, 0x90, 0xed, 0xbe, 0xc3, 0xe5, 0x08, 0xef,
+  0x1c, 0xec, 0x3a, 0xde, 0x03, 0xe9, 0x34, 0x9c, 0x8f, 0xaa, 0xc6, 0x9d,
+  0xa7, 0x4b, 0xc4, 0xad, 0x8b, 0x9f, 0xab, 0x2f, 0x07, 0xa9, 0x2d, 0xce,
+  0xdd, 0x80, 0x7d, 0x9f, 0x78, 0x0d, 0x48, 0xad, 0x80, 0x84, 0xc5, 0xc6,
+  0x7a, 0xa0, 0xcd, 0x5b, 0x4f, 0x6e, 0x86, 0x74, 0xad, 0x89, 0x4c, 0xe1,
+  0x53, 0x2e, 0xe7, 0xb3, 0x2d, 0xf0, 0x58, 0xe2, 0x23, 0xdc, 0x76, 0x47,
+  0x03, 0xa9, 0x64, 0xf3, 0xf6, 0xb4, 0x2f, 0xcb, 0x94, 0x64, 0x3a, 0x99,
+  0xd3, 0x72, 0xa0, 0x7d, 0x34, 0x0a, 0x72, 0x96, 0x8f, 0x58, 0xd9, 0x6e,
+  0x8e, 0xce, 0x4e, 0x31, 0xe7, 0x4f, 0x6a, 0xbc, 0x8c, 0x03, 0x9f, 0x3a,
+  0x0e, 0x9c, 0x27, 0xea, 0x36, 0x3b, 0xe1, 0x1e, 0xf4, 0x50, 0x6e, 0x96,
+  0x99, 0x9e, 0x60, 0xf1, 0xb7, 0xb5, 0xb7, 0x3e, 0x35, 0x36, 0x26, 0xc3,
+  0x5f, 0xd4, 0x2d, 0xb9, 0xc0, 0x60, 0xa1, 0x9e, 0xf2, 0x9e, 0x9e, 0x15,
+  0x2a, 0xd4, 0xbd, 0x11, 0xad, 0x3e, 0x45, 0xdd, 0x03, 0x9d, 0xd6, 0x99,
+  0x38, 0x1d, 0x75, 0x15, 0xac, 0x97, 0x72, 0xb0, 0xdc, 0xcc, 0x92, 0x1d,
+  0xc8, 0x77, 0x2c, 0xb6, 0xbd, 0x09, 0x5d, 0x76, 0xbf, 0x77, 0x34, 0xf7,
+  0x36, 0xab, 0x2b, 0x52, 0x10, 0xb3, 0x1d, 0xbd, 0xb4, 0x6d, 0x19, 0x83,
+  0x7e, 0xc4, 0xd2, 0xeb, 0xec, 0xf2, 0xd8, 0x7c, 0x9c, 0xae, 0x4b, 0xde,
+  0x9b, 0x28, 0xa2, 0x32, 0x3c, 0xb6, 0xe6, 0x87, 0xc4, 0x8a, 0xa7, 0x91,
+  0xd2, 0xb4, 0x58, 0xae, 0x48, 0x4f, 0x7b, 0x5b, 0xb8, 0xe1, 0xd8, 0x15,
+  0xaa, 0x3b, 0xcb, 0x4e, 0x06, 0x7d, 0x06, 0xea, 0x04, 0x7e, 0x9c, 0xb8,
+  0x90, 0x66, 0x5b, 0xdc, 0xd8, 0xed, 0x37, 0x98, 0xf8, 0x2e, 0x0c, 0xfe,
+  0x9a, 0xfa, 0xdb, 0x5e, 0x43, 0x60, 0x98, 0x2d, 0xba, 0xc8, 0x17, 0x64,
+  0x88, 0xdf, 0x65, 0x4e, 0x50, 0x74, 0xdf, 0x59, 0xde, 0xf9, 0x64, 0x22,
+  0xfb, 0x15, 0xae, 0x81, 0xd5, 0x7c, 0xa9, 0xca, 0xc4, 0xbf, 0xfc, 0x7e,
+  0xba, 0xc3, 0xd7, 0xaa, 0x1c, 0x0e, 0xd2, 0x6a, 0x92, 0xe7, 0x5d, 0x0a,
+  0x36, 0x87, 0xbf, 0xb7, 0x93, 0x63, 0xf8, 0x72, 0x92, 0xc3, 0xd1, 0xd1,
+  0xc9, 0x89, 0x73, 0x7a, 0x0e, 0x25, 0x48, 0x80, 0xc8, 0xb7, 0x9e, 0x24,
+  0x5c, 0x6a, 0x72, 0x72, 0xc6, 0x6d, 0xfd, 0x28, 0x63, 0x73, 0x7f, 0xc2,
+  0xf7, 0x29, 0xc7, 0x23, 0x65, 0xac, 0xf4, 0x38, 0xbb, 0xdc, 0xb1, 0xe2,
+  0x74, 0x27, 0x55, 0xea, 0xac, 0xf9, 0x73, 0xfd, 0xb0, 0xcc, 0x5e, 0x1e,
+  0xf6, 0x54, 0x01, 0x93, 0x71, 0xb6, 0x4f, 0x40, 0xba, 0x62, 0x73, 0x41,
+  0x64, 0x1d, 0x6e, 0x1e, 0x5e, 0xbf, 0xa9, 0x3a, 0x38, 0x55, 0xec, 0xd1,
+  0x85, 0x4f, 0xba, 0xca, 0x54, 0x7c, 0x6f, 0x74, 0xc1, 0x3c, 0xd9, 0x27,
+  0xd1, 0x45, 0x97, 0xf9, 0xbc, 0x0a, 0x15, 0x28, 0xdc, 0xbd, 0x9f, 0xa2,
+  0x3e, 0xf1, 0x0e, 0xc0, 0xde, 0xff, 0x9a, 0xdf, 0x68, 0x5d, 0xfa, 0x43,
+  0xaf, 0x36, 0xc4, 0xca, 0xa1, 0x85, 0x69, 0xf4, 0x66, 0x6c, 0x2d, 0xde,
+  0x4a, 0xdc, 0x0d, 0xa4, 0xfd, 0xd4, 0x33, 0x12, 0x57, 0xfd, 0x64, 0xb5,
+  0xe0, 0xff, 0x3a, 0x9f, 0x97, 0xf7, 0x06, 0x7a, 0x63, 0x85, 0xcd, 0x91,
+  0x32, 0xa7, 0xa1, 0xa5, 0x49, 0x28, 0x33, 0x45, 0x75, 0x76, 0x86, 0x18,
+  0x8e, 0x12, 0x07, 0x7b, 0x21, 0x85, 0xa7, 0x39, 0x03, 0x05, 0xa8, 0xcb,
+  0x6d, 0x59, 0xd7, 0xd4, 0x05, 0x4d, 0x19, 0x4c, 0xb6, 0xaa, 0x15, 0xeb,
+  0x2b, 0x24, 0xc3, 0x4d, 0x1b, 0xf1, 0xfa, 0x09, 0x4d, 0xa8, 0x29, 0x22,
+  0x6d, 0xc1, 0x4e, 0xf2, 0x32, 0xb4, 0x40, 0xda, 0xa7, 0xe5, 0x05, 0x36,
+  0x3b, 0x4b, 0xff, 0x8f, 0x99, 0x1f, 0x85, 0x0a, 0x48, 0xbc, 0xe0, 0xbc,
+  0xc1, 0xb6, 0x1a, 0xe2, 0xc4, 0x46, 0x18, 0x5f, 0x4f, 0x6c, 0xbb, 0x1f,
+  0x57, 0xec, 0x2b, 0xc6, 0xad, 0xcc, 0xbe, 0x2a, 0xbe, 0x8e, 0x9c, 0x46,
+  0x30, 0x4c, 0x8e, 0x10, 0x99, 0xe1, 0x36, 0x2a, 0x34, 0x62, 0x32, 0xc2,
+  0x4f, 0x66, 0xe4, 0x80, 0x48, 0xf5, 0x6a, 0x4e, 0x03, 0xa1, 0x84, 0xbe,
+  0xd1, 0x0c, 0xdd, 0x67, 0x08, 0x77, 0x35, 0x9a, 0x72, 0x17, 0x3a, 0x5e,
+  0xeb, 0xf6, 0x67, 0xc8, 0x15, 0xbf, 0x55, 0x6d, 0x0f, 0xf5, 0x7e, 0xb5,
+  0x97, 0xd9, 0x87, 0x7a, 0xbb, 0x28, 0xee, 0x49, 0xa5, 0x59, 0x14, 0xf2,
+  0x19, 0x3b, 0xc5, 0xdc, 0xeb, 0xf6, 0xa4, 0xd7, 0x59, 0x28, 0xe8, 0xc3,
+  0x27, 0x6b, 0x18, 0xc7, 0x12, 0x0a, 0x63, 0xe3, 0xc8, 0x24, 0xb3, 0x4d,
+  0x5b, 0xa7, 0xfd, 0xaa, 0x12, 0x5a, 0x8c, 0x5c, 0x68, 0x89, 0x62, 0x93,
+  0x99, 0xb9, 0x2b, 0xb7, 0xb7, 0xe0, 0x73, 0xc4, 0x72, 0x9a, 0xa6, 0xd5,
+  0x4d, 0x3f, 0xe9, 0x0d, 0x7a, 0xfd, 0x8e, 0xfd, 0xdf, 0x16, 0xc0, 0xd6,
+  0x2f, 0x77, 0x68, 0xa3, 0xbb, 0x40, 0x3d, 0xaa, 0x91, 0x0f, 0x53, 0x83,
+  0x69, 0x7a, 0x2f, 0x4b, 0x87, 0x6c, 0x1c, 0xd9, 0xe2, 0x9a, 0x1f, 0xc4,
+  0xb6, 0x6f, 0xeb, 0xe0, 0x1c, 0xdc, 0x0a, 0xef, 0x67, 0x9c, 0x44, 0x89,
+  0xc2, 0xa1, 0x6b, 0xc3, 0xe4, 0x70, 0x21, 0xd1, 0xd2, 0xfb, 0x14, 0x5b,
+  0xcf, 0x7d, 0x02, 0x0a, 0x4d, 0x7c, 0x00, 0xcd, 0x19, 0xdd, 0xb8, 0x90,
+  0xf4, 0xc6, 0xed, 0x94, 0xd8, 0xf6, 0xa9, 0x84, 0x0f, 0x01, 0x49, 0xca,
+  0x4d, 0x28, 0xc0, 0xea, 0x09, 0xe0, 0xf3, 0xe4, 0x27, 0x45, 0xa4, 0xf7,
+  0xfd, 0x4d, 0x31, 0x13, 0x9d, 0xa2, 0xed, 0xb0, 0x74, 0x7a, 0x6d, 0x72,
+  0x5f, 0xc0, 0x60, 0x86, 0x39, 0x4d, 0x4d, 0xe0, 0xd6, 0x29, 0x33, 0x36,
+  0xb9, 0x60, 0xf0, 0x90, 0xf5, 0x4b, 0xdf, 0x9a, 0x65, 0x69, 0x39, 0x7b,
+  0x30, 0xa5, 0x67, 0x70, 0xd7, 0x6a, 0x0e, 0x33, 0xca, 0x5e, 0x8f, 0x94,
+  0xc6, 0x5e, 0x2e, 0xf8, 0x19, 0xf5, 0xf9, 0x1a, 0x7c, 0xa1, 0x16, 0x2f,
+  0xbc, 0xc4, 0x75, 0xf8, 0xc2, 0xbd, 0xcb, 0xd9, 0xbe, 0xa2, 0xcd, 0x46,
+  0x7a, 0x7a, 0x7b, 0x27, 0x8e, 0xd3, 0xc9, 0x2d, 0xb6, 0x0c, 0x9a, 0x94,
+  0x90, 0xd3, 0x0d, 0xa0, 0x38, 0x6a, 0x94, 0xd1, 0x51, 0xbc, 0xa1, 0x7b,
+  0x8a, 0x2c, 0xc5, 0x55, 0xba, 0x6e, 0xba, 0x5a, 0x1e, 0xa5, 0x8f, 0xdd,
+  0x71, 0xcd, 0xf3, 0xd8, 0xa5, 0x68, 0xae, 0xb9, 0x01, 0x8f, 0x64, 0xf1,
+  0x48, 0xf8, 0x2d, 0x56, 0x74, 0x0d, 0xd6, 0xc9, 0x8b, 0xe2, 0xea, 0x8a,
+  0xb6, 0xfa, 0x97, 0x91, 0xa2, 0x2d, 0x8f, 0xec, 0x5c, 0x00, 0xcd, 0x94,
+  0x78, 0xc5, 0xbd, 0x19, 0xad, 0x4d, 0x4c, 0x77, 0x49, 0xae, 0x73, 0x5e,
+  0x8b, 0x44, 0x9a, 0x8b, 0x2d, 0xcc, 0xf6, 0x13, 0x89, 0xdd, 0x1c, 0x89,
+  0x86, 0x37, 0x3c, 0xfc, 0x89, 0x2e, 0xcc, 0x3a, 0xd3, 0x68, 0x91, 0x0e,
+  0xa3, 0xad, 0xfb, 0xde, 0xe6, 0xcb, 0x25, 0x2f, 0x16, 0xf0, 0x13, 0xce,
+  0x22, 0xe2, 0xd6, 0xc6, 0x19, 0x9d, 0x09, 0xac, 0xa9, 0x05, 0x07, 0x8a,
+  0x15, 0x5d, 0xc3, 0x7a, 0x8a, 0xe9, 0xd7, 0x74, 0xd2, 0xdb, 0xcd, 0x99,
+  0x0a, 0xef, 0x03, 0x9e, 0x6a, 0xef, 0x4c, 0x39, 0xb8, 0xb9, 0x50, 0x01,
+  0xca, 0xcb, 0x84, 0x45, 0xc1, 0xa5, 0xad, 0x06, 0x64, 0xd7, 0xe1, 0x7f,
+  0xed, 0x8d, 0x24, 0x3b, 0xd0, 0xa3, 0x93, 0xff, 0x71, 0xec, 0xc3, 0xd3,
+  0x2e, 0xfe, 0xfb, 0x80, 0xdd, 0x1e, 0xed, 0x87, 0x77, 0x74, 0xd4, 0x7a,
+  0x83, 0xa3, 0x64, 0xd0, 0x43, 0x47, 0x1a, 0xbe, 0xbc, 0x55, 0x5d, 0x70,
+  0x0c, 0x41, 0xe2, 0xf8, 0xc0, 0x54, 0xf1, 0x86, 0x63, 0x73, 0xb1, 0xcc,
+  0x76, 0x38, 0x72, 0x13, 0xfb, 0x91, 0x04, 0x90, 0xa6, 0x93, 0xed, 0xb5,
+  0x99, 0x93, 0x5a, 0x20, 0x15, 0xd0, 0x2b, 0xf8, 0x77, 0xb2, 0x3e, 0x12,
+  0x23, 0xdc, 0x81, 0x32, 0x29, 0x11, 0xee, 0x58, 0x16, 0xa8, 0x5f, 0x45,
+  0xe2, 0x79, 0x1d, 0xc2, 0xec, 0x1f, 0xe8, 0xed, 0x99, 0xe4, 0xcb, 0x1b,
+  0x56, 0x1b, 0x5f, 0x20, 0x4c, 0xc5, 0x0e, 0x26, 0xf9, 0xc1, 0x97, 0x9d,
+  0xde, 0xf7, 0x91, 0x9e, 0x8b, 0x4a, 0x6f, 0x52, 0x7b, 0x5b, 0xe5, 0x57,
+  0x6e, 0x90, 0x1f, 0x03, 0x22, 0xc8, 0x15, 0xc2, 0x4d, 0xc7, 0x31, 0x12,
+  0xf7, 0xb2, 0x18, 0xef, 0x0e, 0xf6, 0x22, 0xe0, 0x0a, 0xfb, 0xed, 0x30,
+  0xb9, 0xe0, 0x7b, 0x72, 0xb5, 0xe4, 0xd8, 0x3f, 0xd0, 0x82, 0xf8, 0x79,
+  0xab, 0x39, 0x74, 0x3e, 0xd0, 0x8e, 0x00, 0xa7, 0x0b, 0x3f, 0xb7, 0x68,
+  0x98, 0x13, 0x79, 0xf8, 0x3b, 0xd2, 0x18, 0x0f, 0xda, 0xba, 0xb4, 0xc7,
+  0xed, 0x90, 0x6c, 0x5c, 0x54, 0xd5, 0x0c, 0x48, 0xa9, 0x69, 0x31, 0xa9,
+  0x76, 0xd2, 0xe5, 0xb2, 0xda, 0xb1, 0xce, 0x35, 0x30, 0x51, 0x66, 0x75,
+  0x8c, 0x46, 0xc1, 0xd8, 0xf8, 0xda, 0x15, 0xb7, 0x94, 0xd3, 0x96, 0x60,
+  0xae, 0x93, 0x34, 0x15, 0xef, 0xea, 0x29, 0x6e, 0x8e, 0x6f, 0x16, 0xab,
+  0xcb, 0xd3, 0x11, 0xa6, 0xab, 0x7d, 0x73, 0xae, 0x68, 0xe1, 0x6c, 0x71,
+  0xb8, 0x6d, 0x6b, 0x1a, 0x76, 0x9c, 0xd8, 0x46, 0xa3, 0xd1, 0x11, 0x7e,
+  0x38, 0x5a, 0xb1, 0x0a, 0x43, 0x9f, 0x28, 0x1f, 0x54, 0x70, 0x44, 0x37,
+  0x0d, 0x8f, 0x36, 0xf9, 0xe4, 0xff, 0xe9, 0x44, 0x5c, 0xe7, 0xf5, 0xf0,
+  0x2a, 0x9b, 0x16, 0x65, 0x1a, 0x79, 0xca, 0x0a, 0x86, 0xac, 0x61, 0x76,
+  0x26, 0xf4, 0xd4, 0x0e, 0x69, 0xc7, 0xef, 0x69, 0xbe, 0x86, 0xfc, 0x77,
+  0x58, 0x77, 0x32, 0x69, 0xf6, 0x63, 0x9e, 0xaf, 0x3f, 0xbc, 0x42, 0x10,
+  0x9c, 0x0e, 0x43, 0xf5, 0x7b, 0xee, 0x6b, 0xd2, 0xd1, 0x10, 0x02, 0x98,
+  0x76, 0x2b, 0x85, 0x17, 0xe6, 0x13, 0x4c, 0xfc, 0x93, 0x3e, 0x28, 0xde,
+  0xc6, 0x06, 0x93, 0x1a, 0x76, 0x5d, 0xd0, 0x75, 0x7a, 0x33, 0xef, 0x8c,
+  0x43, 0x98, 0x5b, 0xb2, 0x52, 0x28, 0xaa, 0x18, 0x6a, 0x22, 0x10, 0x56,
+  0x8b, 0xe0, 0x03, 0x34, 0x19, 0x24, 0x2a, 0x16, 0xaa, 0x08, 0x75, 0x2c,
+  0x4f, 0x6b, 0xe4, 0xea, 0xf8, 0x32, 0x71, 0x07, 0x47, 0x79, 0x05, 0xdf,
+  0x23, 0xb5, 0xeb, 0x81, 0xca, 0xe2, 0xb8, 0x66, 0x17, 0x75, 0x57, 0xef,
+  0x30, 0x45, 0xad, 0x4b, 0xbc, 0x39, 0x55, 0x38, 0xae, 0x03, 0x9e, 0x5e,
+  0x16, 0x76, 0x2f, 0x2a, 0xd2, 0x68, 0xe8, 0x3b, 0x5f, 0x46, 0x21, 0xdc,
+  0x0f, 0xf9, 0x7c, 0x35, 0x4f, 0xb0, 0x0e, 0xe2, 0x1d, 0xd7, 0x27, 0xd5,
+  0x32, 0xe0, 0x4b, 0x9a, 0xe4, 0xa6, 0x86, 0xb7, 0xbd, 0x14, 0x50, 0x71,
+  0xdf, 0xbe, 0x64, 0x64, 0x4c, 0xfc, 0x3b, 0x52, 0xa6, 0x86, 0xaa, 0xa2,
+  0x69, 0xc8, 0x7c, 0xce, 0xb1, 0x53, 0xd3, 0xc6, 0x5c, 0x3b, 0xc9, 0xf2,
+  0x26, 0xad, 0x18, 0x36, 0xc6, 0x91, 0xf1, 0xae, 0xa1, 0xd2, 0xaf, 0xed,
+  0xf9, 0x2c, 0x32, 0x8c, 0x0a, 0xe8, 0xc3, 0x88, 0x15, 0xd3, 0xe4, 0x32,
+  0x20, 0x17, 0x1e, 0xc8, 0xcf, 0x87, 0x4f, 0xf6, 0x87, 0xbb, 0xfd, 0xc8,
+  0xe7, 0xe0, 0xdf, 0x55, 0x14, 0x16, 0xc9, 0x95, 0x49, 0x3e, 0xa7, 0x7d,
+  0x48, 0x02, 0x6a, 0xc5, 0x1b, 0x51, 0x54, 0x99, 0x8c, 0x55, 0xbb, 0x95,
+  0x6e, 0x4f, 0xb9, 0x2c, 0x68, 0xc2, 0x23, 0x83, 0x8d, 0x15, 0x33, 0x11,
+  0x91, 0xd4, 0xdc, 0xaa, 0x4c, 0x27, 0x0f, 0x02, 0xd9, 0x08, 0x3d, 0x12,
+  0xd6, 0x02, 0xf5, 0x0b, 0x4f, 0xe3, 0x84, 0xf3, 0x57, 0x07, 0x91, 0xfa,
+  0x39, 0x63, 0x85, 0x61, 0x92, 0x57, 0x10, 0xb2, 0xa3, 0x2c, 0x13, 0x33,
+  0x19, 0x0a, 0x24, 0xec, 0xaa, 0x79, 0xfa, 0x01, 0x0b, 0xfa, 0xa8, 0x0a,
+  0xf9, 0x0f, 0x3a, 0x6a, 0x50, 0x39, 0xc9, 0x92, 0x2b, 0xdb, 0xbb, 0xb9,
+  0x11, 0x48, 0xa3, 0x75, 0xf9, 0x2b, 0x1d, 0x06, 0x55, 0xba, 0x25, 0xe6,
+  0x91, 0x0c, 0x0c, 0xd4, 0xd0, 0x82, 0x33, 0x4a, 0x9b, 0x1d, 0x7e, 0x20,
+  0xc6, 0x98, 0xd1, 0x59, 0x4a, 0x4b, 0x06, 0x60, 0x17, 0x74, 0x4d, 0x27,
+  0x82, 0xa9, 0x29, 0xe8, 0x07, 0x37, 0x39, 0xf5, 0xbd, 0x9c, 0xdc, 0x60,
+  0x66, 0xd9, 0xe5, 0xcb, 0x11, 0xb1, 0x47, 0x4c, 0x7e, 0x7c, 0x43, 0xbd,
+  0xb0, 0xd4, 0xf9, 0x84, 0x4f, 0x26, 0x3d, 0x66, 0x2a, 0x48, 0xab, 0x7f,
+  0xac, 0xce, 0xb3, 0x54, 0xc8, 0x66, 0xd8, 0x3c, 0x27, 0x5d, 0x4e, 0x2f,
+  0x7e, 0xde, 0x9b, 0x33, 0xb8, 0xf9, 0x69, 0xcb, 0x51, 0xe3, 0xac, 0x4c,
+  0x8b, 0xcb, 0x50, 0x3e, 0xc5, 0x6e, 0x6f, 0xf9, 0x1a, 0x9b, 0x78, 0x6c,
+  0x0a, 0xb6, 0xcd, 0x43, 0x0d, 0xf4, 0xe9, 0xeb, 0x36, 0xf7, 0x16, 0xe8,
+  0x8b, 0xcc, 0x9b, 0x42, 0x7f, 0x65, 0x76, 0xa0, 0xcd, 0x8a, 0xdc, 0xd5,
+  0xce, 0x64, 0x63, 0xdd, 0x89, 0xba, 0x22, 0xf9, 0x05, 0x7c, 0x4d, 0xd0,
+  0xfa, 0x5d, 0xd5, 0x91, 0x5b, 0x39, 0x58, 0xd2, 0xe6, 0x4a, 0xcf, 0xae,
+  0xe0, 0xc7, 0xd9, 0x66, 0x05, 0x96, 0x76, 0x4a, 0x9d, 0x9c, 0xbe, 0xe6,
+  0x13, 0x7c, 0x74, 0x41, 0xff, 0xcd, 0x2d, 0x52, 0xca, 0x96, 0x01, 0xb2,
+  0x05, 0xd8, 0x4d, 0xf2, 0xe6, 0xfb, 0x51, 0xb2, 0x75, 0x36, 0xda, 0x79,
+  0xf2, 0x7c, 0x77, 0xbb, 0xdd, 0x16, 0xcf, 0x14, 0xcc, 0xf7, 0x4e, 0xcb,
+  0x7d, 0xb4, 0xc3, 0x49, 0x16, 0xdb, 0xc8, 0x84, 0xb9, 0x13, 0xd7, 0x44,
+  0xe0, 0xd7, 0x3a, 0x3f, 0x7e, 0x63, 0xfe, 0x47, 0xc1, 0x18, 0x24, 0x47,
+  0xd4, 0x1f, 0x0e, 0x9f, 0xc4, 0x1b, 0xe7, 0x22, 0xbb, 0x33, 0x1f, 0xe6,
+  0x29, 0xdf, 0xa4, 0x90, 0x56, 0xec, 0x26, 0x35, 0x9d, 0x63, 0x99, 0xb1,
+  0x32, 0xe9, 0xdf, 0x57, 0xed, 0x58, 0x6e, 0xef, 0x48, 0xe1, 0x1b, 0x43,
+  0xb8, 0x55, 0xd4, 0xa5, 0x12, 0x97, 0x06, 0xc3, 0xe6, 0xa6, 0xbf, 0xdf,
+  0x09, 0xb3, 0x39, 0x39, 0x04, 0xd2, 0x87, 0x66, 0x19, 0x38, 0x9f, 0xcf,
+  0x1d, 0xc6, 0x7c, 0x30, 0x85, 0x23, 0x85, 0x3d, 0x57, 0x2f, 0x1e, 0x0b,
+  0x39, 0x8c, 0x32, 0x15, 0xd5, 0x59, 0x88, 0xa9, 0xc4, 0x7b, 0x88, 0x08,
+  0x00, 0xfc, 0x66, 0xb1, 0xb2, 0x20, 0x22, 0xd1, 0x29, 0xb7, 0xfb, 0x0e,
+  0x94, 0x0d, 0x6b, 0x28, 0x7d, 0x90, 0x19, 0x4b, 0x93, 0x71, 0x59, 0xdc,
+  0x23, 0xd1, 0x04, 0xf0, 0x33, 0xd9, 0x7b, 0xec, 0x2c, 0x92, 0xec, 0x93,
+  0x9b, 0xc8, 0xab, 0x4a, 0x4b, 0x3a, 0x53, 0x00, 0x13, 0x5d, 0x4e, 0xdf,
+  0x5e, 0xbe, 0x39, 0xc5, 0xb2, 0xe2, 0xea, 0x5b, 0x6a, 0x10, 0x1f, 0xdf,
+  0x59, 0x8d, 0xe9, 0x52, 0x60, 0x99, 0x5b, 0x3b, 0xe7, 0x58, 0x87, 0xa0,
+  0x85, 0x1f, 0xcf, 0xa9, 0xf3, 0xcb, 0xae, 0x28, 0x8b, 0x5e, 0x3c, 0xe6,
+  0x0f, 0xc7, 0x62, 0x92, 0x9d, 0x4c, 0x17, 0xe0, 0xc3, 0xb2, 0xbd, 0x73,
+  0x48, 0xdb, 0x9b, 0xa9, 0x1f, 0x6b, 0xe7, 0xc3, 0x80, 0x14, 0xc2, 0x01,
+  0x77, 0x6e, 0x40, 0xcd, 0x4b, 0xac, 0x98, 0x43, 0xee, 0x47, 0x74, 0xbf,
+  0xf3, 0x46, 0xa1, 0xe6, 0x07, 0xaf, 0x79, 0x29, 0xf8, 0x91, 0x68, 0xf9,
+  0x78, 0x95, 0x6c, 0x99, 0xbc, 0x6d, 0x86, 0xd9, 0x13, 0x8f, 0x18, 0xff,
+  0x46, 0x1c, 0xa7, 0x70, 0x1e, 0x73, 0x7e, 0x8c, 0x86, 0x74, 0xc8, 0x16,
+  0x88, 0xbc, 0x47, 0xec, 0xae, 0x2f, 0x1f, 0x04, 0xc7, 0xa6, 0x0e, 0x75,
+  0x8b, 0x2b, 0x3a, 0x4f, 0x82, 0x34, 0x29, 0x4f, 0x7a, 0xe7, 0x7d, 0xc1,
+  0x3a, 0xe0, 0x20, 0xf2, 0xa6, 0x22, 0xf2, 0xcd, 0xaf, 0xe1, 0x76, 0x43,
+  0x9a, 0x85, 0x2c, 0x84, 0x84, 0xd2, 0x81, 0x1a, 0x4f, 0xe1, 0x1a, 0xb7,
+  0x86, 0xdd, 0x24, 0x74, 0x1a, 0xdc, 0x0c, 0x32, 0x14, 0xe5, 0xa9, 0xca,
+  0x1c, 0xfc, 0xcc, 0x0e, 0x01, 0x2e, 0x61, 0x28, 0xc1, 0x7c, 0x93, 0x5b,
+  0xaa, 0x80, 0xe1, 0xcc, 0xe2, 0xdb, 0x4e, 0x7d, 0x36, 0xfd, 0x20, 0xce,
+  0x95, 0xf3, 0x3d, 0x10, 0x62, 0x83, 0x3d, 0x1a, 0x62, 0x9e, 0x95, 0xd7,
+  0xfc, 0x93, 0xba, 0xb8, 0xce, 0xea, 0xd8, 0x58, 0x50, 0x3c, 0x90, 0x03,
+  0x04, 0xc3, 0x95, 0xf5, 0xaf, 0x03, 0x09, 0x42, 0x41, 0x0f, 0x59, 0xb1,
+  0x22, 0xa7, 0x3e, 0xae, 0xcd, 0xc1, 0x34, 0xd1, 0x68, 0xde, 0x82, 0x66,
+  0x82, 0xd6, 0x31, 0x36, 0x96, 0x67, 0xb3, 0x97, 0x33, 0x32, 0xdd, 0x1f,
+  0x36, 0x13, 0x05, 0xae, 0x2a, 0x9c, 0xb1, 0xce, 0xf0, 0x1d, 0x2c, 0x65,
+  0x32, 0xb9, 0x59, 0x2d, 0x6e, 0xcd, 0x87, 0x3a, 0x2b, 0x0a, 0x46, 0x18,
+  0x70, 0x1e, 0x55, 0xab, 0xb9, 0xcd, 0xe0, 0x63, 0xff, 0x1a, 0xb6, 0xdd,
+  0x39, 0xcb, 0xe2, 0x4a, 0xab, 0x91, 0x84, 0xe3, 0xe6, 0xc6, 0xdd, 0x5e,
+  0x92, 0x74, 0x90, 0x7c, 0xd5, 0xb7, 0x68, 0x77, 0x1d, 0x04, 0x5f, 0xd2,
+  0xf8, 0x20, 0x7a, 0x37, 0x1c, 0x9c, 0x93, 0xae, 0x41, 0x89, 0x92, 0xb1,
+  0x8b, 0xd6, 0x82, 0xbc, 0xde, 0x73, 0x8a, 0x88, 0x5b, 0x19, 0xa3, 0xe0,
+  0xb0, 0xbd, 0x65, 0xb7, 0xfb, 0x70, 0xaa, 0xcb, 0x56, 0xc3, 0x81, 0xab,
+  0x4c, 0xbb, 0xc6, 0xa7, 0x61, 0x05, 0xea, 0x5d, 0x18, 0xbb, 0x24, 0x78,
+  0xcf, 0xba, 0x23, 0xf7, 0x26, 0x44, 0xb6, 0xb7, 0x10, 0x15, 0xb6, 0x21,
+  0x86, 0xc9, 0x79, 0x51, 0xc9, 0xda, 0x72, 0x2f, 0x3a, 0x23, 0xd1, 0xa9,
+  0x1f, 0xf4, 0x34, 0xd9, 0xbc, 0x2a, 0x8a, 0x71, 0x5a, 0x6e, 0xea, 0x12,
+  0x22, 0xf2, 0x4f, 0x0d, 0x4e, 0x45, 0x30, 0x23, 0xaa, 0x8e, 0xe1, 0x7c,
+  0x45, 0xcf, 0xc5, 0x3e, 0xaa, 0x50, 0xa3, 0x6e, 0x47, 0x5c, 0xba, 0xef,
+  0xb8, 0x1f, 0xe0, 0x6f, 0x56, 0x2c, 0xb4, 0xe4, 0x66, 0x04, 0x31, 0x9c,
+  0xa6, 0x62, 0x88, 0x90, 0x52, 0xa7, 0x4b, 0xd3, 0xdf, 0x2e, 0x12, 0xef,
+  0x73, 0xe9, 0x0d, 0x24, 0x76, 0x83, 0x34, 0x09, 0x8b, 0x45, 0x61, 0x55,
+  0xf4, 0x33, 0xd1, 0x82, 0xe1, 0xc6, 0xb3, 0x78, 0x1c, 0x80, 0x17, 0x62,
+  0x6f, 0xd0, 0xeb, 0xd4, 0xd4, 0x50, 0xa3, 0xc3, 0x41, 0x72, 0x80, 0xf5,
+  0x17, 0x21, 0xaa, 0x78, 0xfd, 0x17, 0x3c, 0x7f, 0xd8, 0x49, 0x12, 0x71,
+  0x16, 0x6b, 0xc1, 0xa1, 0xca, 0x16, 0xee, 0x52, 0x0e, 0x42, 0x38, 0xaa,
+  0x46, 0x8d, 0xfb, 0x11, 0x4a, 0xa1, 0xe1, 0x12, 0xfd, 0x17, 0xec, 0xa3,
+  0x75, 0x91, 0x33, 0x9e, 0x0d, 0x81, 0xe6, 0xf2, 0x85, 0x84, 0x43, 0xd0,
+  0x96, 0x01, 0xe2, 0x94, 0x95, 0x59, 0x31, 0x97, 0xed, 0xc6, 0x63, 0xea,
+  0xab, 0x68, 0x4c, 0xf4, 0xd1, 0xc0, 0xfd, 0xe4, 0xec, 0x45, 0x09, 0x26,
+  0x8b, 0xba, 0xe0, 0x55, 0x83, 0x48, 0x6d, 0xe0, 0x01, 0xf6, 0x74, 0xd2,
+  0x7a, 0x6a, 0xdc, 0xad, 0xc4, 0x35, 0xcf, 0x16, 0x23, 0x4e, 0x5c, 0xf9,
+  0xbb, 0x82, 0x7b, 0xfc, 0x25, 0xd3, 0xad, 0x2b, 0xb0, 0x25, 0xe1, 0xf5,
+  0x89, 0xe8, 0x4d, 0xbd, 0x4b, 0x1e, 0x55, 0x33, 0xb0, 0x2d, 0x21, 0xf3,
+  0x34, 0x9c, 0x06, 0xff, 0xe3, 0x0c, 0x4a, 0x79, 0x2b, 0xf8, 0x4a, 0xca,
+  0xad, 0x60, 0x68, 0xe8, 0x04, 0x44, 0x2a, 0x28, 0x07, 0xda, 0x19, 0x40,
+  0x4a, 0xdb, 0xb2, 0x2a, 0xb2, 0x06, 0x40, 0xb3, 0x95, 0x2f, 0x05, 0xf1,
+  0xf7, 0x49, 0xd2, 0xcf, 0xc4, 0x1f, 0xae, 0x89, 0x2e, 0x01, 0xc8, 0xa2,
+  0x80, 0x51, 0x74, 0xaf, 0xdc, 0x35, 0xbd, 0x84, 0x87, 0x43, 0x33, 0xd3,
+  0x04, 0x9c, 0x6f, 0x69, 0x69, 0xad, 0x6b, 0xbb, 0x03, 0xb2, 0xd7, 0xa7,
+  0xf1, 0x01, 0xc3, 0x8d, 0xc3, 0xb5, 0xc8, 0xee, 0x65, 0xa3, 0x60, 0x9f,
+  0xb0, 0x72, 0xc3, 0xdb, 0x68, 0xaa, 0x3e, 0x83, 0x09, 0x34, 0x6a, 0x81,
+  0x49, 0xf2, 0x13, 0x6d, 0xaf, 0x33, 0xb6, 0x33, 0x4b, 0xa3, 0x4f, 0xf3,
+  0x6f, 0xaf, 0xdd, 0x23, 0xc8, 0x13, 0xbc, 0x2a, 0xd8, 0x4e, 0x57, 0x05,
+  0x28, 0x9a, 0x07, 0x06, 0x4f, 0x49, 0x5c, 0x04, 0xd0, 0x46, 0x99, 0xd7,
+  0xb4, 0xd2, 0x9c, 0xd2, 0xb1, 0x4c, 0xc7, 0x23, 0xdb, 0xc4, 0x69, 0x06,
+  0x8f, 0xee, 0x94, 0x4b, 0xf5, 0xe2, 0xeb, 0x3e, 0xe9, 0xbb, 0xe9, 0x55,
+  0xf1, 0x27, 0xe1, 0x13, 0x95, 0xba, 0xa6, 0x41, 0xf0, 0xea, 0x76, 0xdc,
+  0x34, 0x32, 0xcd, 0xf0, 0x35, 0x38, 0xe8, 0xe3, 0x32, 0x2b, 0x59, 0x81,
+  0xa9, 0xfc, 0xdd, 0x41, 0xe3, 0x1d, 0x36, 0xf5, 0xe8, 0x2f, 0x86, 0xbb,
+  0xdb, 0xb1, 0x29, 0x85, 0xed, 0x71, 0xf4, 0xcd, 0x09, 0xbc, 0x48, 0xb3,
+  0x9c, 0x44, 0x68, 0x5f, 0x3e, 0x23, 0xc3, 0x91, 0xa4, 0x57, 0x77, 0x93,
+  0x5e, 0xe7, 0x0b, 0x33, 0x41, 0xc2, 0xb4, 0x01, 0x17, 0xf9, 0xe2, 0x99,
+  0x16, 0x6f, 0x74, 0x6a, 0x2a, 0x47, 0x21, 0xb9, 0x2a, 0xa9, 0xdd, 0x84,
+  0x0e, 0xfa, 0x95, 0x7a, 0xaf, 0x69, 0xf7, 0xdc, 0xe1, 0xd3, 0x7c, 0xe1,
+  0x31, 0x7c, 0x22, 0x85, 0x53, 0x89, 0xa6, 0x0b, 0x12, 0x35, 0x72, 0x5a,
+  0xf9, 0x45, 0x96, 0x0c, 0xe2, 0xac, 0x3a, 0xd8, 0x88, 0x02, 0x69, 0xf8,
+  0x7e, 0x77, 0x62, 0xbf, 0x9c, 0xe4, 0x16, 0x1c, 0xc5, 0x5f, 0xc4, 0xa1,
+  0xee, 0x2c, 0xea, 0xba, 0x68, 0xdb, 0xe9, 0x9a, 0xe6, 0x78, 0x60, 0xff,
+  0x4d, 0x71, 0x5a, 0x13, 0xda, 0xe0, 0x6c, 0x21, 0xc2, 0x67, 0x91, 0xd6,
+  0x8d, 0xa6, 0x3c, 0xd8, 0x95, 0x7f, 0x92, 0x46, 0x60, 0x15, 0x07, 0x21,
+  0xa4, 0x4b, 0xe3, 0x25, 0xb2, 0x35, 0x93, 0xaf, 0x12, 0xc5, 0x10, 0xd1,
+  0x1e, 0x4f, 0xc3, 0xd0, 0x06, 0x6e, 0x21, 0x74, 0x1e, 0x17, 0x2a, 0xa6,
+  0xa1, 0xbb, 0x39, 0x00, 0x79, 0xc2, 0xd9, 0x93, 0xed, 0x37, 0x81, 0x1b,
+  0x06, 0x59, 0xe4, 0x11, 0x70, 0xe2, 0xe5, 0xc7, 0x67, 0xef, 0x57, 0x4e,
+  0xde, 0x47, 0x66, 0xef, 0x12, 0xca, 0x02, 0x29, 0xbe, 0x40, 0xa9, 0xbd,
+  0x0c, 0x70, 0x53, 0x1c, 0xf6, 0x10, 0xdc, 0xae, 0xc7, 0xa1, 0x34, 0x8f,
+  0x66, 0x10, 0xbc, 0x7a, 0xf9, 0x0f, 0x5b, 0x75, 0xec, 0x46, 0xeb, 0x7d,
+  0x77, 0x73, 0x12, 0xc4, 0x58, 0x0c, 0x1b, 0xc0, 0x64, 0x55, 0x34, 0xf1,
+  0x3a, 0x7d, 0x2d, 0xfb, 0xb0, 0x54, 0x8f, 0x9d, 0x9e, 0xbd, 0x0e, 0x0b,
+  0xa5, 0x61, 0xa8, 0x4c, 0x4d, 0x51, 0x8c, 0xc6, 0xf7, 0x95, 0x49, 0xf1,
+  0x8f, 0x0e, 0x4e, 0x46, 0xa7, 0xca, 0x08, 0xf0, 0x7d, 0xa1, 0xba, 0x1a,
+  0x06, 0xdd, 0x3a, 0x62, 0x80, 0x26, 0xc9, 0x3c, 0x56, 0x9a, 0xb7, 0xa3,
+  0x09, 0xf8, 0xed, 0x7e, 0x73, 0xc2, 0x52, 0xb5, 0xe4, 0x44, 0xd0, 0xaf,
+  0x9f, 0xab, 0x9c, 0x67, 0xca, 0x96, 0x8f, 0xcd, 0xf1, 0xce, 0xe5, 0xfb,
+  0xff, 0xfb, 0x10, 0x11, 0x8d, 0x71, 0xd8, 0x6a, 0x0c, 0x53, 0x23, 0x98,
+  0x7e, 0x53, 0x5c, 0x33, 0xc6, 0x84, 0x9d, 0xd5, 0x7f, 0x5b, 0x21, 0xb4,
+  0x7b, 0xbd, 0x4e, 0x08, 0xe0, 0x82, 0xe2, 0x50, 0x25, 0x47, 0xe1, 0x66,
+  0xd0, 0xf7, 0xa9, 0x69, 0xec, 0x72, 0x6f, 0xa4, 0x0f, 0x80, 0x17, 0xd4,
+  0x4d, 0x2b, 0x3b, 0xf1, 0x91, 0xcd, 0xea, 0xb6, 0x67, 0x6b, 0x67, 0x8e,
+  0xb3, 0xd0, 0x0a, 0x89, 0x77, 0x20, 0xdd, 0x54, 0xd9, 0x2c, 0xbb, 0x56,
+  0x3f, 0xd3, 0xf1, 0xf7, 0xc7, 0xa7, 0x91, 0x72, 0x55, 0xcb, 0xcf, 0x5d,
+  0xd8, 0x31, 0x70, 0x47, 0x58, 0xca, 0x6f, 0x5e, 0x89, 0x0f, 0x5d, 0xbe,
+  0xa9, 0x2d, 0x76, 0xe2, 0x55, 0xe9, 0x61, 0xba, 0x9f, 0x32, 0x8b, 0xbe,
+  0x95, 0xec, 0xb5, 0x9b, 0x4a, 0xe2, 0x7c, 0x05, 0x17, 0x9c, 0x6a, 0x59,
+  0xdf, 0x8c, 0x46, 0x3b, 0xb7, 0x59, 0x39, 0x66, 0x62, 0x82, 0x78, 0x43,
+  0x01, 0x44, 0x9f, 0xbc, 0x42, 0xdc, 0x5f, 0x9c, 0xf7, 0xbc, 0xcc, 0x7e,
+  0x24, 0xd1, 0x1b, 0xcb, 0x62, 0x96, 0x4f, 0x1e, 0x92, 0x57, 0xda, 0x33,
+  0xa4, 0x71, 0xf0, 0xa2, 0xc3, 0x73, 0xaf, 0x3e, 0xce, 0xb3, 0xef, 0x06,
+  0x87, 0xa3, 0xc1, 0xab, 0xe3, 0xd3, 0xe3, 0x6f, 0x0e, 0x2f, 0x8f, 0x25,
+  0x09, 0x01, 0x4a, 0x49, 0x95, 0xad, 0x91, 0x3a, 0x6e, 0x3f, 0x7c, 0xa7,
+  0x3d, 0x15, 0x47, 0x13, 0xa3, 0x7f, 0x99, 0x45, 0xe4, 0x36, 0xab, 0x1d,
+  0xe0, 0x99, 0x67, 0x88, 0xc5, 0x75, 0xdd, 0x20, 0xf3, 0x88, 0xc0, 0x35,
+  0xb3, 0xb9, 0x76, 0x35, 0x1a, 0x41, 0x3a, 0xbb, 0xe7, 0x14, 0xd9, 0x77,
+  0x0b, 0x36, 0x47, 0x72, 0x49, 0x18, 0x63, 0xfd, 0xd4, 0x85, 0x2e, 0x7c,
+  0x68, 0xc2, 0xe6, 0xbf, 0xb1, 0xca, 0x80, 0x2c, 0x75, 0xeb, 0x34, 0x82,
+  0x6c, 0xab, 0xc4, 0x84, 0x7a, 0x85, 0x07, 0xd7, 0xe2, 0xba, 0x00, 0x6e,
+  0xd3, 0xdf, 0x45, 0xda, 0xaf, 0x1a, 0x46, 0xd5, 0xe4, 0x26, 0x9b, 0x67,
+  0x66, 0x9c, 0x31, 0x46, 0x00, 0x76, 0x33, 0xac, 0x46, 0x3a, 0x63, 0xf7,
+  0x8c, 0x3c, 0xc1, 0x61, 0x16, 0xe3, 0x02, 0xc8, 0x35, 0x86, 0x72, 0x75,
+  0xa8, 0x48, 0xf7, 0x39, 0x92, 0xe4, 0x04, 0xbe, 0x01, 0x2c, 0x1b, 0x36,
+  0x89, 0x21, 0x42, 0x1b, 0x18, 0x50, 0xa7, 0x43, 0x6b, 0x06, 0x74, 0xdb,
+  0x18, 0x5b, 0xc1, 0x97, 0x25, 0x2e, 0x3d, 0x07, 0x0e, 0x2b, 0x14, 0xd4,
+  0x23, 0x3f, 0x16, 0x38, 0xae, 0xdd, 0x0d, 0xdc, 0x51, 0x1f, 0xa7, 0x88,
+  0x11, 0xe8, 0x8a, 0x06, 0x73, 0x48, 0x74, 0xbc, 0xe8, 0xd1, 0xe6, 0xec,
+  0x48, 0x36, 0x4a, 0x15, 0xd5, 0x04, 0x7f, 0xa3, 0x95, 0x24, 0xdb, 0xd4,
+  0x80, 0x47, 0x25, 0x72, 0x23, 0xf9, 0x04, 0x44, 0x91, 0xb8, 0xc8, 0x72,
+  0x92, 0xa4, 0xd2, 0x41, 0xb6, 0x2c, 0xeb, 0x0e, 0x64, 0xa3, 0x60, 0xfb,
+  0x9c, 0xe3, 0x51, 0x9f, 0x16, 0xf4, 0xb8, 0xcf, 0xa4, 0x3c, 0x3e, 0xbf,
+  0x10, 0xee, 0x9e, 0x53, 0xfe, 0x8b, 0xa2, 0x17, 0xda, 0x5f, 0x86, 0xed,
+  0xae, 0xb9, 0x0b, 0x88, 0x93, 0xc2, 0xe4, 0x74, 0xf9, 0xfb, 0x06, 0x35,
+  0x13, 0xb4, 0x83, 0xe6, 0xa7, 0xeb, 0x96, 0xc6, 0x88, 0x22, 0xf8, 0x9c,
+  0x63, 0x86, 0x40, 0x57, 0xb8, 0x0f, 0x7d, 0x51, 0x8c, 0xd0, 0x0b, 0x81,
+  0x6c, 0x98, 0x57, 0xfd, 0x8c, 0x7f, 0xc9, 0x81, 0x2d, 0xdd, 0x02, 0x6b,
+  0x22, 0x94, 0x7d, 0x49, 0x85, 0x9d, 0xcd, 0xd0, 0x24, 0xbf, 0x95, 0x94,
+  0xe0, 0x94, 0x48, 0xa9, 0x1f, 0x43, 0x3f, 0x4e, 0xf9, 0x84, 0x18, 0x3c,
+  0xb4, 0xe3, 0x02, 0x6a, 0xa0, 0x46, 0x5a, 0x18, 0x36, 0x0f, 0xd6, 0xa4,
+  0xa0, 0x66, 0x90, 0xa6, 0x8e, 0x41, 0x3b, 0xd7, 0x48, 0x5f, 0x28, 0x7e,
+  0xc8, 0x6a, 0x67, 0x4d, 0x07, 0xf9, 0x16, 0x1c, 0x98, 0x8b, 0xdc, 0xbf,
+  0x9a, 0xc4, 0xe4, 0x62, 0x73, 0x0f, 0x9a, 0x37, 0x2c, 0x1e, 0xc7, 0x2b,
+  0x8d, 0x3f, 0xa5, 0xb3, 0xbc, 0x7e, 0x10, 0x93, 0x4e, 0xbc, 0x03, 0xe6,
+  0xc0, 0xee, 0xca, 0x30, 0xa0, 0x89, 0x37, 0x21, 0x21, 0x03, 0xd5, 0x65,
+  0x8b, 0x3d, 0xbc, 0xd8, 0x1b, 0xa6, 0x9c, 0xaf, 0x54, 0x35, 0xa7, 0x1b,
+  0x84, 0x84, 0x50, 0xce, 0x06, 0xb0, 0x76, 0x45, 0x26, 0x87, 0x13, 0x96,
+  0x75, 0x97, 0x2f, 0x8a, 0xae, 0x5d, 0x25, 0x12, 0x82, 0xba, 0x9a, 0x0a,
+  0x9d, 0x43, 0x73, 0x0b, 0x46, 0x5f, 0x7f, 0x85, 0x5f, 0xf2, 0x1a, 0xa2,
+  0x7d, 0x6c, 0xf3, 0xc9, 0x8d, 0xf2, 0x9d, 0x48, 0x90, 0x92, 0xb7, 0xd2,
+  0x38, 0xbb, 0x49, 0xef, 0xf2, 0xa2, 0x1c, 0x36, 0x32, 0xe2, 0xe3, 0x18,
+  0x47, 0x45, 0xeb, 0xcf, 0x60, 0x4d, 0x5e, 0x18, 0x3e, 0xc0, 0xfc, 0xae,
+  0x60, 0x5f, 0xc3, 0x74, 0x78, 0xac, 0x06, 0x5c, 0xc2, 0xe7, 0x7d, 0x8d,
+  0x24, 0x21, 0xcc, 0x1c, 0x41, 0xb8, 0x81, 0xd5, 0x75, 0xe9, 0xd3, 0xfa,
+  0x64, 0x5a, 0xdd, 0x75, 0x9f, 0xb0, 0xea, 0xee, 0xd7, 0x9f, 0x30, 0x21,
+  0x55, 0xe0, 0x2d, 0x74, 0x7c, 0x3e, 0xfa, 0x3e, 0x71, 0xd0, 0xa0, 0xae,
+  0x9b, 0x53, 0x0e, 0x97, 0x1f, 0x17, 0xb6, 0x5a, 0x70, 0xc0, 0x7e, 0xe3,
+  0x09, 0x73, 0x07, 0x8c, 0xbe, 0xaf, 0xa7, 0xea, 0xfc, 0x70, 0xf4, 0x7d,
+  0xeb, 0x3c, 0xf9, 0x80, 0x67, 0xde, 0x1d, 0x2b, 0x46, 0xaa, 0x7f, 0x69,
+  0x7c, 0x46, 0xdc, 0x5a, 0xe7, 0x56, 0xab, 0xee, 0x3e, 0x65, 0xab, 0x51,
+  0x57, 0xa2, 0xad, 0x16, 0x4d, 0xef, 0x63, 0x5b, 0x2d, 0x5c, 0xa3, 0x8e,
+  0xad, 0x46, 0xed, 0x47, 0x5b, 0xcd, 0xe6, 0xb5, 0x7b, 0xaf, 0xad, 0xdb,
+  0x6a, 0x86, 0x91, 0xcc, 0x64, 0x9b, 0x85, 0xbb, 0x2c, 0xde, 0x61, 0xc1,
+  0xbe, 0xc9, 0xf8, 0xe7, 0x48, 0xad, 0x66, 0x4f, 0x2b, 0x69, 0x68, 0x8f,
+  0xc7, 0xbf, 0x90, 0x77, 0x71, 0xa1, 0x8f, 0x9f, 0xa7, 0xd7, 0x59, 0x2f,
+  0xcc, 0x1c, 0xff, 0x84, 0x2c, 0xc4, 0x47, 0x93, 0xf8, 0x9a, 0x69, 0x7b,
+  0xd0, 0x7b, 0x7c, 0xd2, 0x9e, 0x78, 0x14, 0x3b, 0xee, 0x19, 0x3d, 0x15,
+  0xcd, 0x6c, 0x0b, 0xe3, 0x78, 0x52, 0x1f, 0x4c, 0xef, 0xcf, 0x8c, 0x4d,
+  0xeb, 0x59, 0x07, 0xdd, 0x90, 0x63, 0x3f, 0x39, 0x92, 0x71, 0x9d, 0xe5,
+  0xd6, 0x44, 0xb4, 0x71, 0x5f, 0xc5, 0xe5, 0xac, 0x68, 0x43, 0x90, 0x0c,
+  0xf1, 0x5d, 0x40, 0x9b, 0xf1, 0xaa, 0x98, 0xb5, 0xc5, 0x33, 0x69, 0x44,
+  0x82, 0xf5, 0x3e, 0xd5, 0x6e, 0x1d, 0xa8, 0xd3, 0x57, 0x8c, 0x51, 0xeb,
+  0x94, 0xe6, 0x3e, 0x86, 0xfb, 0x31, 0x9d, 0x31, 0xbb, 0x57, 0x3b, 0xcc,
+  0xc4, 0xb6, 0x86, 0x86, 0x10, 0xa6, 0x50, 0x39, 0xb9, 0x43, 0x29, 0xdb,
+  0x3c, 0x39, 0x08, 0x9f, 0xdc, 0xb0, 0x7e, 0x47, 0x27, 0xe8, 0x31, 0x9c,
+  0xc6, 0x1c, 0xbc, 0x7e, 0x11, 0x84, 0x7c, 0x7f, 0x3a, 0x30, 0x3d, 0xe5,
+  0x97, 0x6e, 0xec, 0x5b, 0x8c, 0xdd, 0x6f, 0xfa, 0xe8, 0x2d, 0x15, 0x2d,
+  0x8c, 0x23, 0x77, 0x62, 0xa1, 0x31, 0xdd, 0xc6, 0xb9, 0x93, 0x1a, 0xc0,
+  0x9a, 0x36, 0x80, 0xf2, 0x07, 0x72, 0xd4, 0x3b, 0x81, 0x87, 0x48, 0x5c,
+  0x10, 0xf4, 0xf5, 0x81, 0x10, 0x2d, 0xe1, 0x36, 0x8c, 0x54, 0x45, 0x0e,
+  0x5a, 0x21, 0xaa, 0x12, 0x7c, 0xd7, 0xf2, 0xe1, 0xe8, 0xe0, 0x73, 0xa0,
+  0xdc, 0xe3, 0xaf, 0x7d, 0x96, 0xb1, 0x4c, 0x64, 0xa4, 0xdb, 0x39, 0xb5,
+  0xd2, 0x25, 0xcf, 0xda, 0x08, 0xfd, 0x9d, 0x4f, 0x0d, 0xff, 0x6d, 0xc5,
+  0xbc, 0x6b, 0x53, 0x88, 0x0b, 0x0d, 0xdf, 0x81, 0x3d, 0x24, 0xce, 0xca,
+  0x9a, 0x0d, 0xdb, 0x39, 0xc9, 0x06, 0xab, 0x01, 0x99, 0x13, 0x2b, 0xf3,
+  0xbd, 0xa0, 0xeb, 0x3d, 0x05, 0xc0, 0x42, 0xe1, 0x8d, 0x81, 0xd2, 0x37,
+  0xf0, 0x9c, 0x0a, 0x92, 0x3a, 0xb9, 0x65, 0x2e, 0x31, 0xc3, 0x48, 0xd9,
+  0x4f, 0xc3, 0x69, 0x60, 0x0a, 0x0d, 0xfa, 0xef, 0x82, 0x15, 0xc7, 0x7f,
+  0x09, 0x09, 0xf8, 0x7c, 0x54, 0x21, 0x53, 0x0f, 0xc6, 0x60, 0xc0, 0xad,
+  0x71, 0x4c, 0xc0, 0x67, 0x2b, 0xcf, 0x39, 0xdf, 0xd3, 0x98, 0xf6, 0x66,
+  0x0f, 0x5d, 0x7b, 0xd2, 0x88, 0x01, 0xc7, 0xab, 0x7c, 0xa6, 0x34, 0x24,
+  0x55, 0x6d, 0xa8, 0x3c, 0x00, 0x16, 0x67, 0xf9, 0xb8, 0x04, 0x5c, 0x05,
+  0x2a, 0x57, 0xc3, 0x51, 0x1b, 0x29, 0xfd, 0x9a, 0xec, 0xae, 0xbb, 0x8c,
+  0xed, 0x50, 0x32, 0x7d, 0xa0, 0x49, 0xab, 0x02, 0x19, 0x0e, 0xce, 0x42,
+  0x3d, 0xc2, 0xb7, 0x17, 0xfb, 0x71, 0xb9, 0x03, 0x6c, 0x93, 0xf3, 0xde,
+  0xe1, 0x8c, 0x91, 0x7c, 0x21, 0x5e, 0x48, 0xf8, 0x4b, 0x17, 0x77, 0x79,
+  0x59, 0x2c, 0x18, 0x83, 0x92, 0xdc, 0xa5, 0x65, 0x8e, 0xdb, 0x82, 0x7a,
+  0xfb, 0xfe, 0xd5, 0xc9, 0x45, 0xb2, 0xc5, 0x2e, 0xb5, 0xf1, 0xc3, 0xba,
+  0x9c, 0x93, 0x9d, 0xac, 0x9e, 0xec, 0x2c, 0x6f, 0xf3, 0x9d, 0x45, 0x55,
+  0x4d, 0xc7, 0xdb, 0x61, 0xe6, 0x3a, 0x7f, 0x92, 0xf7, 0xdb, 0xf9, 0x77,
+  0x47, 0xa3, 0x3f, 0xec, 0xed, 0xb1, 0x24, 0x5f, 0x51, 0xc3, 0x5b, 0x34,
+  0x07, 0xd1, 0xc6, 0xa8, 0x68, 0xa2, 0xe7, 0xc3, 0xaa, 0xd8, 0xc6, 0xf5,
+  0x73, 0x97, 0xe6, 0x33, 0xbb, 0xcf, 0x65, 0xcf, 0x4a, 0x6c, 0x8f, 0x55,
+  0x3e, 0xb8, 0x84, 0xd8, 0x7d, 0x81, 0x70, 0xbb, 0x86, 0x3d, 0xa3, 0x80,
+  0xce, 0xc2, 0x5d, 0xc0, 0x7a, 0xa6, 0x5c, 0x98, 0x8a, 0x66, 0x93, 0x71,
+  0x97, 0x1e, 0x29, 0xd4, 0x67, 0xf6, 0x31, 0x9e, 0x15, 0x71, 0xa6, 0x75,
+  0x64, 0xc4, 0x48, 0xe2, 0xd0, 0x70, 0xa7, 0xe7, 0xd8, 0xd6, 0xf2, 0x85,
+  0xb0, 0xce, 0xe1, 0x9e, 0xba, 0x2b, 0x18, 0xa1, 0x5a, 0x2c, 0xae, 0x56,
+  0x95, 0x33, 0x97, 0x58, 0x4a, 0xda, 0x72, 0x0d, 0x3b, 0x3d, 0xf4, 0xc1,
+  0x72, 0xaa, 0x67, 0xb3, 0x4a, 0x7a, 0x07, 0x3d, 0x9c, 0xab, 0x05, 0x08,
+  0x9f, 0xc4, 0xcb, 0xa0, 0xbd, 0xc2, 0x62, 0xf5, 0x7e, 0xee, 0x25, 0x91,
+  0xc1, 0x54, 0x7b, 0x5f, 0x81, 0x25, 0xe1, 0x5e, 0x2f, 0xf2, 0xbf, 0x4b,
+  0x7e, 0xa4, 0x3b, 0xc0, 0x64, 0xbb, 0x32, 0x8e, 0x8e, 0x65, 0xb5, 0x5f,
+  0x21, 0xee, 0x41, 0x77, 0xe6, 0xa4, 0xef, 0xd2, 0xcf, 0x71, 0x97, 0x32,
+  0xa4, 0x78, 0xa0, 0xfd, 0xde, 0xcf, 0xe8, 0x52, 0xd0, 0x89, 0x0e, 0xfd,
+  0xa5, 0xd9, 0x25, 0x76, 0xe4, 0x48, 0x8e, 0x08, 0xa9, 0x09, 0x25, 0xdd,
+  0xf2, 0x1d, 0xf2, 0x7d, 0x2b, 0x3f, 0x1b, 0xe1, 0x20, 0xbe, 0x49, 0x27,
+  0x09, 0xfd, 0xf5, 0x47, 0xe8, 0x15, 0xdb, 0xeb, 0xcf, 0x18, 0x1d, 0x67,
+  0x24, 0x8c, 0x27, 0x97, 0x0d, 0x8e, 0x50, 0xe7, 0xa5, 0x28, 0xd5, 0x69,
+  0xbf, 0x88, 0x0e, 0x8e, 0xde, 0x56, 0x90, 0x91, 0xe2, 0xf6, 0x75, 0x2e,
+  0x1f, 0xc0, 0x1e, 0x26, 0x31, 0x7b, 0x85, 0x3f, 0x74, 0x34, 0xea, 0x4d,
+  0x87, 0xbc, 0x95, 0xec, 0x2f, 0x16, 0xd6, 0x30, 0x7a, 0x49, 0x82, 0xd0,
+  0x00, 0x73, 0xe7, 0xa9, 0xf5, 0x62, 0x2a, 0x92, 0xd9, 0xa5, 0xc4, 0x0e,
+  0xa7, 0x8e, 0x52, 0x4e, 0xb0, 0x8e, 0xbe, 0x97, 0x06, 0x25, 0x6d, 0x88,
+  0x33, 0x6e, 0x9c, 0x66, 0xea, 0x2a, 0xca, 0xa6, 0x7f, 0x60, 0xd6, 0x0c,
+  0x8d, 0xa0, 0x57, 0xb6, 0x89, 0xe0, 0x0d, 0xd0, 0x9e, 0xba, 0xae, 0xfd,
+  0x8e, 0xc1, 0x45, 0xcd, 0x97, 0x79, 0xd1, 0x95, 0x8b, 0x35, 0xca, 0x66,
+  0x46, 0x97, 0x65, 0xb8, 0xe7, 0x49, 0xf9, 0xb0, 0x64, 0xad, 0x55, 0xde,
+  0xd2, 0xb3, 0x0b, 0x42, 0x40, 0x81, 0x38, 0x87, 0x9c, 0x6a, 0xc3, 0x0e,
+  0x08, 0xbf, 0xff, 0xa2, 0xe2, 0xbf, 0x61, 0xab, 0xd0, 0xd2, 0xd6, 0x38,
+  0x8b, 0xf2, 0x33, 0x4e, 0x77, 0xa0, 0x6d, 0x33, 0x15, 0x30, 0xa4, 0x83,
+  0xcc, 0x46, 0xf0, 0x17, 0x6e, 0xa7, 0x0a, 0x6f, 0x2a, 0xde, 0xc5, 0x9c,
+  0x7c, 0x05, 0x61, 0xc8, 0x5e, 0xb2, 0xed, 0xc0, 0xc4, 0xd0, 0xe7, 0x13,
+  0x13, 0x4f, 0xed, 0xf5, 0x70, 0xd2, 0x8c, 0x1a, 0x2a, 0x57, 0x0b, 0x7c,
+  0xbc, 0x39, 0x53, 0x4e, 0xfc, 0xb6, 0x8f, 0xc1, 0xc5, 0xc9, 0xe8, 0x28,
+  0xe1, 0x03, 0x70, 0xf6, 0xf6, 0xf4, 0x2f, 0xdb, 0xec, 0x33, 0xe4, 0x1b,
+  0x12, 0xc4, 0x95, 0xfc, 0xfd, 0x2e, 0xc1, 0x5d, 0xf5, 0x3d, 0x98, 0xa9,
+  0xe3, 0x68, 0x8b, 0xce, 0x3b, 0xb8, 0xb7, 0x25, 0xf6, 0x60, 0x65, 0x16,
+  0x65, 0x70, 0x7a, 0x91, 0x30, 0xcc, 0x69, 0xc2, 0x11, 0x8c, 0x9d, 0x18,
+  0xd5, 0xc4, 0x2a, 0x26, 0x46, 0xe0, 0x90, 0x4d, 0xa8, 0x2d, 0x4b, 0x4a,
+  0x1c, 0x6b, 0xf9, 0xf4, 0x75, 0x1a, 0x68, 0x2b, 0xdf, 0x82, 0x06, 0x7a,
+  0x2d, 0xce, 0xd7, 0x35, 0x30, 0x3f, 0xa1, 0x15, 0xb2, 0x04, 0x3d, 0xbd,
+  0xdd, 0x53, 0x16, 0xa6, 0x2e, 0x9b, 0x1b, 0x6e, 0x93, 0x45, 0x5d, 0x16,
+  0xcb, 0x87, 0xe4, 0x9b, 0x94, 0x15, 0x22, 0xfe, 0xd6, 0xab, 0x34, 0x9b,
+  0x47, 0xf7, 0x67, 0x55, 0xb0, 0x9f, 0x50, 0x0e, 0x9f, 0xfc, 0xdd, 0x6d,
+  0x67, 0x90, 0x8c, 0x48, 0x80, 0x3d, 0xe1, 0xc9, 0x9c, 0xb2, 0xff, 0xdb,
+  0x76, 0x0f, 0xf6, 0x1c, 0x75, 0x25, 0x8e, 0x8d, 0x19, 0x9f, 0x62, 0x1b,
+  0x62, 0x3b, 0x90, 0x26, 0x64, 0x68, 0x6d, 0x84, 0xad, 0x28, 0x15, 0x40,
+  0x93, 0x25, 0x2f, 0xf8, 0xcf, 0x35, 0xc3, 0x0e, 0x14, 0x4a, 0x38, 0x7f,
+  0x1b, 0x77, 0x3b, 0xbf, 0xac, 0xd8, 0x10, 0xc6, 0x3e, 0x4e, 0xc3, 0xdf,
+  0xc6, 0xd6, 0x1b, 0x8b, 0x1c, 0xba, 0x33, 0xfb, 0xc9, 0xab, 0xe3, 0x0b,
+  0x88, 0x8d, 0xe3, 0xb7, 0xdf, 0xc0, 0xe9, 0x12, 0xc8, 0x61, 0x6e, 0xb2,
+  0x1a, 0x6a, 0xda, 0x7d, 0x90, 0xe2, 0xd4, 0xd6, 0xd1, 0xf9, 0xee, 0xe5,
+  0x1b, 0x19, 0xda, 0xd9, 0xf4, 0x77, 0x05, 0x0e, 0xa7, 0xa2, 0x85, 0x1f,
+  0x1d, 0x86, 0xa3, 0xfb, 0x6d, 0xda, 0x77, 0x38, 0x79, 0x96, 0x7a, 0x4e,
+  0x3d, 0xa2, 0x6d, 0xd5, 0xa1, 0x41, 0x32, 0xdc, 0x33, 0xc8, 0x6e, 0xe4,
+  0x43, 0xac, 0xb7, 0x5f, 0xe2, 0x69, 0x8c, 0x12, 0xea, 0x56, 0x03, 0x13,
+  0x2a, 0x51, 0x8a, 0x08, 0xa6, 0xe0, 0x1e, 0xd8, 0xaa, 0xb6, 0x93, 0xb6,
+  0xe2, 0x6d, 0x7a, 0xf7, 0x5b, 0x73, 0x23, 0x34, 0xef, 0xb2, 0xc8, 0x16,
+  0x16, 0xf5, 0xc5, 0x54, 0x2d, 0x4b, 0x6e, 0xc7, 0x8c, 0xf7, 0xe5, 0xd2,
+  0x6d, 0x4c, 0x3d, 0xad, 0xa9, 0x1a, 0x76, 0xba, 0xcb, 0x23, 0x4f, 0x37,
+  0x9f, 0x4f, 0x89, 0xce, 0x04, 0x6d, 0x46, 0x8b, 0x2a, 0x11, 0x22, 0xb7,
+  0x59, 0xaa, 0xf5, 0x3a, 0xa2, 0x62, 0xa5, 0x8e, 0xc8, 0x6e, 0x7c, 0x7f,
+  0x74, 0xf8, 0xfe, 0xeb, 0x77, 0x6f, 0x5f, 0x9d, 0x1e, 0x6f, 0xb6, 0x77,
+  0xa4, 0x11, 0x3b, 0x55, 0xec, 0xb6, 0xd7, 0xcc, 0xc8, 0x30, 0x09, 0x0a,
+  0x67, 0x1c, 0x0c, 0x17, 0x72, 0xda, 0x59, 0x72, 0xa7, 0x7e, 0xc6, 0xdb,
+  0xc0, 0x99, 0xd5, 0x62, 0x8a, 0x94, 0xfa, 0x60, 0xf0, 0x96, 0xaf, 0xac,
+  0xc1, 0x5e, 0xeb, 0x5f, 0x07, 0x48, 0x2a, 0x63, 0x6d, 0x8e, 0x4e, 0x2b,
+  0x1b, 0xb2, 0x46, 0x13, 0x26, 0xf9, 0x47, 0x9e, 0x4b, 0xb5, 0x61, 0x23,
+  0x33, 0x36, 0x0f, 0xb3, 0x9e, 0x52, 0x87, 0x3a, 0x96, 0xbb, 0x6a, 0xa0,
+  0xc6, 0xb8, 0x15, 0xda, 0xc9, 0x03, 0xed, 0xe4, 0xa4, 0xac, 0x37, 0xfb,
+  0x49, 0x96, 0xc3, 0x72, 0x0b, 0x21, 0xb2, 0x50, 0x3e, 0x23, 0xb5, 0x82,
+  0x61, 0xeb, 0xa9, 0xec, 0xeb, 0x61, 0xf6, 0x21, 0x03, 0xc8, 0x4e, 0xdf,
+  0x3a, 0x52, 0xad, 0xf5, 0x87, 0xa2, 0x04, 0x61, 0xcd, 0x2b, 0xaf, 0xbd,
+  0xca, 0x43, 0x74, 0xeb, 0xc7, 0x58, 0x03, 0xd6, 0x50, 0xd9, 0xf4, 0xbe,
+  0x16, 0x2a, 0xf3, 0xf3, 0xc3, 0xcb, 0x6f, 0x3f, 0xdd, 0x6c, 0xf1, 0x4a,
+  0x3c, 0x2c, 0x17, 0x33, 0x5d, 0xfa, 0xe1, 0x2f, 0x68, 0x57, 0xb7, 0x05,
+  0x86, 0x2a, 0xfb, 0xa6, 0xed, 0x43, 0xdd, 0x0f, 0xd4, 0x7b, 0x55, 0x24,
+  0x55, 0x93, 0xf4, 0x77, 0xa3, 0x6d, 0xec, 0xee, 0x14, 0x18, 0x63, 0xaf,
+  0x27, 0x01, 0x48, 0x5a, 0x40, 0xb7, 0xf1, 0xf5, 0x8f, 0x13, 0x44, 0xd8,
+  0x86, 0x2d, 0x41, 0xe4, 0xed, 0x85, 0xff, 0xba, 0x48, 0x0a, 0xb2, 0x14,
+  0xe2, 0x53, 0x2a, 0x72, 0xca, 0xae, 0x3f, 0xc8, 0x26, 0x0f, 0x71, 0xe4,
+  0x9e, 0x55, 0x0e, 0xf1, 0x61, 0xb7, 0x01, 0x13, 0x77, 0x39, 0xf4, 0x6a,
+  0x2c, 0xe1, 0xe6, 0x6a, 0xc0, 0x1c, 0xf4, 0x92, 0xad, 0x6c, 0x78, 0x4d,
+  0xed, 0xf5, 0xb8, 0x9d, 0xbd, 0x03, 0xfe, 0x73, 0x1f, 0x7f, 0x3e, 0xe9,
+  0x6d, 0x47, 0x6e, 0x83, 0x0a, 0xe2, 0x2b, 0x46, 0xbb, 0x23, 0x3a, 0x17,
+  0xf8, 0x11, 0x4c, 0x37, 0xcd, 0xd7, 0x6d, 0x24, 0x55, 0xf1, 0xba, 0xb2,
+  0x37, 0xfd, 0x44, 0x40, 0x54, 0xde, 0xa4, 0x70, 0x14, 0xb2, 0x4c, 0x28,
+  0x8b, 0x89, 0x64, 0x49, 0x85, 0x48, 0xc0, 0xc9, 0xfb, 0x32, 0xbb, 0x49,
+  0x2b, 0x92, 0x11, 0xab, 0x3a, 0x67, 0xb7, 0x7d, 0xfb, 0xce, 0x5f, 0x31,
+  0x42, 0x5b, 0xf0, 0xbf, 0x34, 0x62, 0xfd, 0xb0, 0xcb, 0x4d, 0xb6, 0xa5,
+  0x15, 0x7f, 0x1d, 0xab, 0x3a, 0xfa, 0xc4, 0x40, 0x99, 0xfc, 0xd7, 0xd0,
+  0xca, 0xc1, 0x7f, 0xc6, 0x8f, 0x85, 0xa4, 0xca, 0x73, 0xa6, 0x2f, 0x40,
+  0x20, 0x21, 0xc9, 0xae, 0x68, 0xc6, 0x72, 0x49, 0xe6, 0x13, 0x20, 0xb3,
+  0xf4, 0x3a, 0xf6, 0x2f, 0xc8, 0x1d, 0xa7, 0x71, 0x51, 0xf7, 0x6f, 0x48,
+  0x10, 0x67, 0x71, 0x81, 0x78, 0xb9, 0xb9, 0xf9, 0x3e, 0x25, 0xbe, 0x05,
+  0xe9, 0x2a, 0x79, 0xb4, 0x22, 0xdb, 0x75, 0xb0, 0x82, 0xe0, 0xb6, 0xcd,
+  0xae, 0x5c, 0x6f, 0x5d, 0x0c, 0x5c, 0x4e, 0x4e, 0xff, 0xd6, 0x93, 0x73,
+  0x05, 0x9f, 0x2c, 0x1d, 0xe8, 0x6e, 0x97, 0xeb, 0x6b, 0x4e, 0x23, 0xaf,
+  0x18, 0xad, 0xc0, 0xf3, 0xb4, 0xc5, 0x0c, 0xa6, 0xc2, 0x90, 0x9b, 0x42,
+  0xb7, 0xde, 0x66, 0xcf, 0x91, 0xa5, 0xb6, 0x21, 0x2d, 0xad, 0xd2, 0x34,
+  0xb0, 0x58, 0xc3, 0x31, 0x4a, 0x55, 0xc0, 0x71, 0x21, 0x49, 0x10, 0xb7,
+  0x51, 0x3f, 0x37, 0x4a, 0x1d, 0x90, 0x60, 0xce, 0xea, 0x49, 0xf0, 0xcb,
+  0x69, 0xa6, 0x7c, 0xda, 0x6d, 0x31, 0x29, 0x15, 0x12, 0xd4, 0x6d, 0x4f,
+  0xdf, 0x3c, 0x59, 0xa8, 0x9f, 0x5f, 0xe1, 0x3e, 0xf0, 0xd0, 0x21, 0x1b,
+  0x81, 0x03, 0x03, 0xd6, 0xc3, 0x2b, 0x49, 0x2a, 0x8d, 0x8e, 0x2f, 0xdb,
+  0xd9, 0x77, 0xc2, 0x0c, 0xe1, 0x12, 0xfc, 0xd4, 0xbb, 0x5f, 0x66, 0xf5,
+  0xaa, 0x5c, 0x54, 0x06, 0xab, 0x7d, 0x73, 0xea, 0x1e, 0x60, 0xd4, 0x22,
+  0x1c, 0x80, 0x91, 0x71, 0xaf, 0x14, 0x89, 0x60, 0x54, 0x17, 0x95, 0xd3,
+  0x60, 0x77, 0xdc, 0xb1, 0x07, 0x57, 0xeb, 0x62, 0x5b, 0x2f, 0x44, 0x09,
+  0xae, 0x0b, 0xde, 0x83, 0x8c, 0xbe, 0x41, 0x24, 0x5c, 0x0c, 0xa9, 0x2d,
+  0x55, 0x50, 0xb0, 0x00, 0xb5, 0x58, 0x0b, 0x69, 0xad, 0x94, 0xc9, 0xdc,
+  0x4b, 0xcd, 0xee, 0xdf, 0xdf, 0xef, 0x06, 0x1a, 0x1b, 0x8b, 0x87, 0xfa,
+  0x1c, 0x78, 0x32, 0x06, 0x55, 0x7a, 0xe5, 0xc8, 0xb9, 0xe8, 0x54, 0xb0,
+  0xc2, 0x59, 0x4c, 0x68, 0x0a, 0x05, 0xa9, 0x87, 0x9f, 0x2d, 0x8a, 0x38,
+  0xe4, 0xb7, 0x9a, 0xf0, 0x41, 0x67, 0x5b, 0xc2, 0x01, 0x68, 0x19, 0x52,
+  0xa1, 0x68, 0xa9, 0xa4, 0x9a, 0xe5, 0x4b, 0x3e, 0x54, 0x65, 0xb1, 0xba,
+  0xbe, 0xa1, 0x89, 0xcc, 0x20, 0x52, 0x71, 0x35, 0x77, 0x05, 0x73, 0x5a,
+  0x6c, 0x23, 0xd0, 0x86, 0xef, 0x98, 0x13, 0x72, 0x9a, 0x6c, 0xb5, 0xda,
+  0x7f, 0xba, 0xbb, 0x87, 0xee, 0x3e, 0xdd, 0xfd, 0x3c, 0xcc, 0x45, 0x72,
+  0x49, 0x1b, 0xca, 0xdb, 0xa5, 0x40, 0x91, 0xc7, 0x01, 0xae, 0x33, 0x36,
+  0xcc, 0x30, 0xaf, 0x19, 0xa9, 0x8c, 0x08, 0x59, 0x6b, 0x2e, 0xcb, 0x80,
+  0xa4, 0x25, 0x5a, 0x63, 0x5c, 0x20, 0xd6, 0x32, 0x85, 0x7b, 0xa0, 0x9d,
+  0x3a, 0x9b, 0x56, 0x89, 0xe5, 0x85, 0xae, 0x4b, 0x70, 0x51, 0x56, 0x9a,
+  0x00, 0x69, 0x8f, 0x24, 0x9d, 0x2e, 0x44, 0x7b, 0x28, 0x34, 0x8f, 0x34,
+  0xa1, 0xe5, 0x92, 0xad, 0x08, 0xd5, 0x68, 0xd3, 0xb2, 0xde, 0x41, 0xee,
+  0x8a, 0xc2, 0x74, 0x26, 0xcc, 0x5a, 0x61, 0xde, 0x87, 0x8b, 0xd7, 0x47,
+  0xad, 0xe6, 0xf6, 0x9f, 0x7c, 0xf1, 0x85, 0x76, 0x22, 0x53, 0x4c, 0x83,
+  0xe7, 0x47, 0x63, 0xa3, 0x5a, 0x90, 0xc0, 0xe2, 0xa4, 0x63, 0x1e, 0x72,
+  0xe0, 0x26, 0x25, 0xcc, 0xd7, 0x21, 0xf5, 0x37, 0x75, 0x4e, 0x37, 0xad,
+  0x62, 0x88, 0x21, 0xbd, 0x94, 0xcc, 0xab, 0x6f, 0x0c, 0xcb, 0x2e, 0x1d,
+  0x40, 0x59, 0x16, 0x58, 0x4f, 0x5c, 0x24, 0x5f, 0x45, 0x51, 0xe3, 0x6b,
+  0x49, 0x65, 0xf9, 0x2b, 0xdf, 0x21, 0xd7, 0x59, 0x1d, 0xa3, 0xd2, 0x94,
+  0x59, 0x25, 0x6a, 0x7c, 0x2d, 0xa3, 0x43, 0xc0, 0x7b, 0xa5, 0xb8, 0xba,
+  0x17, 0x72, 0x41, 0x5a, 0xe2, 0xf6, 0x24, 0x33, 0x46, 0xf9, 0xe4, 0x2b,
+  0x6c, 0xa3, 0x17, 0xca, 0x61, 0xb1, 0xe8, 0x72, 0xcf, 0x7d, 0xa5, 0x1c,
+  0x21, 0xea, 0x8c, 0x04, 0x79, 0x45, 0x5d, 0xa7, 0x56, 0xe6, 0x02, 0x66,
+  0x08, 0xe7, 0x85, 0x40, 0x0b, 0x56, 0xf6, 0x04, 0x25, 0x1a, 0x8d, 0xe2,
+  0x05, 0x52, 0x0a, 0x07, 0x98, 0x50, 0xa3, 0x1e, 0xe1, 0x5a, 0x47, 0x4c,
+  0x47, 0x24, 0xd9, 0x39, 0xdc, 0x9b, 0xae, 0xa9, 0x40, 0x38, 0xaf, 0xab,
+  0x77, 0xc1, 0xbb, 0xc1, 0x44, 0x45, 0x27, 0xff, 0xf8, 0x43, 0x3a, 0x47,
+  0xa1, 0x06, 0x23, 0xe9, 0x84, 0x52, 0xe9, 0x91, 0x27, 0x6a, 0x68, 0x79,
+  0xcc, 0x4c, 0x5f, 0x8f, 0x7d, 0xb2, 0xc9, 0x0f, 0xb5, 0x4f, 0x3e, 0xbf,
+  0xb4, 0x69, 0xc4, 0x1f, 0xa1, 0x5b, 0x1b, 0x1b, 0x53, 0xba, 0xe3, 0x58,
+  0x7a, 0xc4, 0xcd, 0xcc, 0x9f, 0x9a, 0xae, 0xa1, 0xa9, 0xe0, 0x37, 0xc1,
+  0xa3, 0x70, 0xd0, 0x69, 0xcf, 0x0c, 0x5e, 0xbb, 0x9e, 0xbe, 0xfc, 0xaa,
+  0xd1, 0xda, 0xfd, 0xfd, 0x70, 0xfe, 0x60, 0xbf, 0xab, 0x1a, 0x75, 0x67,
+  0x3c, 0x08, 0x58, 0x89, 0xcb, 0x64, 0x4b, 0xf9, 0x14, 0x96, 0x90, 0xf3,
+  0xdc, 0xb3, 0xbc, 0xd3, 0xd5, 0x6e, 0xe9, 0xbc, 0xeb, 0xb8, 0xe9, 0xf4,
+  0x34, 0x5d, 0x17, 0x99, 0x04, 0x59, 0xc7, 0x05, 0x6d, 0x37, 0xdb, 0x48,
+  0x9c, 0x34, 0x50, 0x97, 0xab, 0x49, 0x1d, 0xdf, 0xfb, 0xbe, 0xb8, 0x89,
+  0x30, 0x61, 0x21, 0x40, 0x60, 0xc9, 0xb2, 0x88, 0x92, 0x34, 0x8f, 0xbb,
+  0x31, 0xe0, 0x59, 0x45, 0x9c, 0xf6, 0x49, 0x04, 0x19, 0xd6, 0x66, 0x5f,
+  0xe0, 0x0f, 0x8a, 0x64, 0xf7, 0xc8, 0xeb, 0xb5, 0x53, 0xd9, 0xbb, 0xcf,
+  0xc6, 0x2f, 0xbf, 0xe2, 0x78, 0xc8, 0x07, 0xa4, 0xf1, 0x0b, 0xa9, 0x16,
+  0xef, 0xa3, 0x1d, 0xfe, 0x67, 0x2f, 0x61, 0x13, 0xa6, 0x63, 0x26, 0x69,
+  0xff, 0xad, 0x6b, 0x31, 0xc8, 0x74, 0x0a, 0x5a, 0xbb, 0x2a, 0x8a, 0xb5,
+  0x8d, 0x59, 0xd9, 0x19, 0xcc, 0x44, 0x10, 0xee, 0x96, 0xe8, 0xb3, 0xdf,
+  0x56, 0xb2, 0x95, 0xb0, 0x42, 0x8d, 0xa3, 0xd5, 0x05, 0xa6, 0x86, 0x2a,
+  0x2d, 0x37, 0xa2, 0x01, 0x2b, 0x5f, 0xf6, 0xa5, 0xc2, 0x15, 0xeb, 0x5b,
+  0xeb, 0x27, 0x84, 0x9f, 0x7e, 0xf9, 0x15, 0x92, 0x90, 0xf9, 0xaf, 0x7f,
+  0x76, 0x6f, 0xf3, 0x1f, 0xb4, 0x2f, 0xe9, 0x74, 0xaf, 0x1d, 0x08, 0xfb,
+  0xe3, 0xed, 0xf9, 0x1d, 0xd1, 0x50, 0x4d, 0x19, 0xdc, 0xec, 0x6f, 0xb2,
+  0x81, 0xb7, 0xf9, 0xe7, 0x4d, 0x78, 0xe1, 0xcd, 0xa1, 0x00, 0x22, 0x59,
+  0x28, 0xfe, 0xd3, 0x62, 0x15, 0xe5, 0x1f, 0xd1, 0x96, 0xc3, 0x03, 0x52,
+  0x9a, 0xeb, 0x63, 0x7d, 0xfe, 0xb9, 0xe7, 0x7a, 0xfd, 0x73, 0xcf, 0xf7,
+  0xfb, 0xe7, 0x9e, 0xef, 0xf9, 0xcf, 0xbd, 0xdf, 0xb0, 0xa2, 0x9b, 0xd2,
+  0xbc, 0x6f, 0x3d, 0x68, 0x3c, 0x68, 0xbb, 0xb7, 0xb9, 0xae, 0x69, 0xef,
+  0x7e, 0xcd, 0xed, 0x74, 0xf9, 0x19, 0xe2, 0x5b, 0x57, 0x67, 0x01, 0x09,
+  0x43, 0x34, 0x0f, 0x7e, 0xdc, 0x30, 0x49, 0xa2, 0x90, 0x55, 0xf0, 0x04,
+  0xcf, 0x29, 0x53, 0x09, 0x55, 0x33, 0xb6, 0x26, 0x7c, 0xd0, 0xcc, 0x7d,
+  0xc4, 0xcd, 0xb4, 0xc5, 0x3a, 0xa2, 0x08, 0x98, 0x7b, 0x3d, 0x3a, 0xa3,
+  0xec, 0x1d, 0xbc, 0x5a, 0x95, 0x30, 0xfa, 0x33, 0x91, 0x99, 0x52, 0xbd,
+  0xc3, 0xa8, 0x48, 0xf4, 0x5b, 0x6f, 0x0e, 0xdf, 0xbe, 0x3b, 0x3c, 0x7d,
+  0x34, 0x93, 0x2b, 0x8c, 0xa1, 0x3b, 0x5f, 0x14, 0x54, 0xf2, 0xd0, 0x62,
+  0x65, 0x1c, 0x04, 0x5f, 0xe1, 0x5c, 0x4e, 0xe4, 0x27, 0xbe, 0xd1, 0x7f,
+  0xe9, 0x44, 0xcc, 0xfc, 0xa0, 0x8a, 0xec, 0xeb, 0x90, 0x57, 0xf4, 0x56,
+  0xe4, 0x4f, 0xcf, 0xde, 0xe7, 0xd7, 0x7b, 0xea, 0xca, 0x45, 0x18, 0xa3,
+  0x03, 0x5b, 0xec, 0x50, 0xbd, 0x90, 0xfb, 0xac, 0xba, 0x98, 0xcd, 0x06,
+  0x7b, 0xb4, 0x1f, 0xd4, 0x1b, 0x81, 0x61, 0x82, 0x3a, 0x50, 0x57, 0x6b,
+  0xdd, 0xd2, 0x87, 0x47, 0x47, 0x1e, 0x47, 0xd5, 0xcc, 0xc8, 0x78, 0xc2,
+  0x19, 0x19, 0xbf, 0x9f, 0xa9, 0x8f, 0x89, 0x9b, 0x81, 0x93, 0x9f, 0xb1,
+  0x26, 0x83, 0xba, 0x10, 0x18, 0xe3, 0x0b, 0xed, 0xcd, 0x97, 0x9d, 0xf3,
+  0x48, 0x1d, 0x08, 0xd5, 0x4c, 0xe3, 0xb5, 0x07, 0xa1, 0xf5, 0x48, 0x5d,
+  0xae, 0xe7, 0x87, 0x20, 0x7e, 0x51, 0x4c, 0x9f, 0x9a, 0x0b, 0xfd, 0x08,
+  0x9f, 0x26, 0xe4, 0xd1, 0x60, 0x37, 0xb4, 0xf1, 0x6b, 0xa6, 0x99, 0x73,
+  0x38, 0x5b, 0x48, 0xe8, 0x72, 0x35, 0xa7, 0xed, 0x4b, 0x0a, 0xc7, 0x74,
+  0xb3, 0xd2, 0x68, 0x57, 0x7b, 0xe3, 0x70, 0xe8, 0x0b, 0x88, 0x2b, 0x5d,
+  0x5d, 0x76, 0x8b, 0x09, 0x80, 0x40, 0xf5, 0xc1, 0xb4, 0x13, 0x97, 0xd0,
+  0xef, 0x36, 0x57, 0x7b, 0xa3, 0x13, 0x66, 0xcc, 0x3c, 0x7c, 0x77, 0xf9,
+  0x6d, 0x2f, 0x09, 0x98, 0xce, 0x9b, 0x98, 0x58, 0x32, 0x17, 0xca, 0x3c,
+  0xbb, 0x73, 0xd0, 0xab, 0x52, 0x44, 0x6e, 0x4c, 0x49, 0xd7, 0x8a, 0xbb,
+  0xb5, 0x16, 0xfa, 0xd9, 0xf0, 0xd9, 0x76, 0x6b, 0x61, 0xd6, 0x33, 0x49,
+  0xb4, 0xd9, 0xd9, 0x75, 0x4f, 0x2b, 0x95, 0x01, 0xa3, 0x58, 0x76, 0x3c,
+  0x8b, 0x99, 0xe8, 0xcc, 0xa9, 0x85, 0x12, 0x3a, 0x72, 0x2a, 0x7c, 0x86,
+  0x89, 0x38, 0xd9, 0x18, 0x31, 0xf5, 0x01, 0x1c, 0x3b, 0x8b, 0x86, 0x32,
+  0x13, 0x96, 0x99, 0x70, 0x70, 0xa6, 0x18, 0x74, 0x6c, 0x4e, 0x10, 0xa6,
+  0x6e, 0x62, 0x52, 0xe0, 0x90, 0x0e, 0xd6, 0xd0, 0x5e, 0xde, 0xdb, 0x68,
+  0x0a, 0x84, 0x87, 0x8d, 0x75, 0xb2, 0x2f, 0x24, 0xf3, 0x5c, 0x32, 0xe0,
+  0x02, 0x2a, 0x87, 0xf6, 0x4e, 0x56, 0x9b, 0xec, 0x27, 0xf9, 0x6f, 0xb7,
+  0x0c, 0x80, 0x7a, 0x50, 0x16, 0x1a, 0x64, 0xd0, 0x37, 0xd0, 0x1b, 0xcd,
+  0x60, 0xf2, 0x74, 0xb9, 0x30, 0x55, 0x24, 0xa6, 0xc1, 0x53, 0x1c, 0xf3,
+  0x6e, 0x6d, 0x8d, 0xb6, 0x0d, 0x15, 0x05, 0xd5, 0x58, 0x5b, 0x4b, 0xcb,
+  0x6b, 0x35, 0x6a, 0x5d, 0x76, 0x71, 0x90, 0x48, 0xa3, 0x79, 0x48, 0x83,
+  0x88, 0x4e, 0xf5, 0x3a, 0x09, 0x4e, 0x62, 0x7c, 0xd1, 0x42, 0xfa, 0x4d,
+  0xee, 0xa7, 0xdd, 0x08, 0x6f, 0x51, 0x80, 0x84, 0x64, 0xc0, 0x97, 0x84,
+  0x3a, 0xfa, 0xe1, 0x55, 0x40, 0x67, 0xc7, 0x62, 0x0e, 0xa3, 0xc2, 0x46,
+  0x90, 0x6c, 0x93, 0xc5, 0x3a, 0xe4, 0xbf, 0xf9, 0xa6, 0x51, 0x00, 0xec,
+  0x35, 0xaa, 0x32, 0x66, 0x4b, 0xc7, 0x29, 0x02, 0x8e, 0x5d, 0x5e, 0x4f,
+  0x29, 0xe4, 0x85, 0x92, 0x5d, 0xf0, 0xdb, 0xac, 0xe9, 0x9d, 0x8a, 0x01,
+  0xa3, 0xb5, 0xc1, 0xe5, 0xc5, 0xf4, 0x61, 0x5c, 0x7e, 0x71, 0xef, 0xf3,
+  0x27, 0x5f, 0x24, 0x15, 0xa3, 0x09, 0xf3, 0x70, 0xca, 0x24, 0xb7, 0x6f,
+  0x7d, 0x4e, 0x87, 0xea, 0xcd, 0xe6, 0xec, 0x31, 0xf6, 0x99, 0x8a, 0x93,
+  0x05, 0x70, 0x73, 0x29, 0xda, 0x2e, 0x86, 0xf8, 0xd3, 0x24, 0x5a, 0x7d,
+  0x28, 0xa9, 0x09, 0x84, 0x79, 0x12, 0x27, 0xcc, 0xb0, 0x59, 0x27, 0x0d,
+  0x54, 0x6a, 0x24, 0x1e, 0x2e, 0x8e, 0x2f, 0x2f, 0xe8, 0x3f, 0xa3, 0xcb,
+  0xb3, 0x8b, 0x35, 0x89, 0x38, 0xf5, 0x04, 0x62, 0x8f, 0x27, 0x8d, 0x77,
+  0x0d, 0xd3, 0x54, 0x61, 0x9a, 0x9b, 0x2c, 0x0b, 0xf0, 0xa3, 0x8b, 0x08,
+  0xa9, 0x3a, 0x93, 0xfb, 0x83, 0x1c, 0xff, 0x6a, 0xd8, 0x18, 0xe8, 0x15,
+  0xc9, 0xf2, 0x47, 0x07, 0x26, 0x6b, 0xfe, 0xf8, 0x0e, 0xc1, 0x80, 0x79,
+  0x33, 0xf2, 0x88, 0x9d, 0xd0, 0x46, 0x6f, 0xb5, 0x36, 0x83, 0x77, 0x48,
+  0xae, 0xa1, 0x19, 0x6f, 0xb0, 0x24, 0xf2, 0x76, 0x2b, 0x16, 0x21, 0x73,
+  0x25, 0x17, 0x03, 0x92, 0xe0, 0x4e, 0x8f, 0x3d, 0xdf, 0xb7, 0x8e, 0x06,
+  0xed, 0x23, 0xfb, 0x37, 0xad, 0x9c, 0x0b, 0x87, 0xaf, 0xcc, 0x62, 0x9e,
+  0x89, 0x36, 0x2f, 0x0e, 0x46, 0x93, 0x3a, 0x72, 0x4f, 0x48, 0x12, 0x62,
+  0xd2, 0x05, 0x51, 0x76, 0xb4, 0x01, 0xbc, 0xca, 0x9b, 0x0e, 0x6a, 0x5a,
+  0xe8, 0xee, 0x90, 0x75, 0x21, 0x05, 0x67, 0x56, 0x83, 0x8f, 0x61, 0xd3,
+  0x7a, 0xb5, 0xe9, 0xb6, 0x5a, 0x4b, 0x2a, 0xef, 0xb5, 0xa5, 0x32, 0xe3,
+  0x74, 0xbb, 0x25, 0x0b, 0xa2, 0xf0, 0x86, 0xf6, 0x74, 0xc4, 0xb8, 0x2e,
+  0x13, 0x37, 0xe4, 0x81, 0x3b, 0xd7, 0xa7, 0x64, 0x6d, 0x23, 0x51, 0x20,
+  0x45, 0x72, 0xfc, 0xde, 0xd6, 0x25, 0x17, 0xe8, 0xec, 0xaa, 0x2d, 0x4d,
+  0x1b, 0x4a, 0x52, 0x2c, 0x3f, 0x03, 0x2e, 0x5b, 0x87, 0x73, 0x1c, 0x9c,
+  0xef, 0x04, 0xf0, 0x64, 0xe5, 0xc2, 0x68, 0x8c, 0x7c, 0xaf, 0x5b, 0xf1,
+  0x58, 0x97, 0x59, 0xdb, 0xd6, 0x3e, 0x80, 0x82, 0x15, 0x7d, 0xb2, 0x54,
+  0x1d, 0xa4, 0x3b, 0xa7, 0x20, 0x79, 0xb7, 0x50, 0x70, 0xff, 0xc2, 0x93,
+  0x18, 0xdb, 0x24, 0x72, 0xde, 0x0a, 0xa7, 0xd1, 0xc8, 0xed, 0x34, 0x2d,
+  0xe0, 0xdd, 0xc4, 0x24, 0x74, 0x60, 0x9e, 0xa0, 0xb0, 0x02, 0xe1, 0x62,
+  0x57, 0x8a, 0xb6, 0xa7, 0x2e, 0x00, 0x29, 0x42, 0xd8, 0x82, 0x66, 0xc3,
+  0x45, 0x1f, 0x1d, 0xa5, 0xf3, 0x70, 0x11, 0x45, 0xc4, 0x41, 0x0d, 0xf7,
+  0xb2, 0x81, 0x11, 0xc9, 0x92, 0xc2, 0x30, 0xfa, 0xde, 0x81, 0xab, 0x65,
+  0xac, 0x71, 0x4d, 0x01, 0x01, 0x71, 0x01, 0xfb, 0xac, 0xdc, 0xc3, 0x4d,
+  0x48, 0xb1, 0xa9, 0x70, 0xed, 0xfb, 0x8c, 0x89, 0x27, 0xb1, 0xdf, 0x06,
+  0xf9, 0xf2, 0xe3, 0x10, 0x70, 0x03, 0x9f, 0x73, 0xb7, 0x4e, 0xce, 0x7d,
+  0x2d, 0x1a, 0x2f, 0x7d, 0xaa, 0xd5, 0xf5, 0x35, 0x0a, 0x37, 0xe5, 0x71,
+  0xf2, 0x54, 0x95, 0x78, 0xf7, 0xa3, 0xa6, 0xd0, 0x92, 0x9a, 0xc5, 0x9d,
+  0x76, 0xc3, 0x83, 0x1f, 0x18, 0x5f, 0xd3, 0xad, 0xec, 0xc9, 0x64, 0xd6,
+  0x62, 0x05, 0xd8, 0x9b, 0x2c, 0x8b, 0x11, 0x92, 0xaf, 0x0d, 0x1c, 0xdb,
+  0xb7, 0x52, 0xbe, 0x50, 0x7f, 0x5d, 0x87, 0x63, 0xf8, 0x99, 0xd1, 0x60,
+  0x40, 0x93, 0xb1, 0x33, 0x35, 0xd1, 0x7b, 0x3c, 0xfc, 0x56, 0x63, 0x07,
+  0x3f, 0x1d, 0xee, 0x6f, 0x77, 0xfb, 0x6e, 0x75, 0xf7, 0xb2, 0xde, 0xce,
+  0x39, 0xf7, 0x57, 0x57, 0xbc, 0x31, 0xc8, 0xc4, 0x92, 0x74, 0x0f, 0x49,
+  0x18, 0x28, 0x65, 0x69, 0x3d, 0x09, 0xff, 0x9a, 0xda, 0x56, 0x3c, 0x43,
+  0xed, 0x75, 0xa3, 0x63, 0xf6, 0x09, 0x49, 0x31, 0x50, 0x7e, 0xd3, 0xe4,
+  0x9c, 0xee, 0x16, 0x37, 0xc5, 0x01, 0x4e, 0x9e, 0xde, 0x81, 0x99, 0xc1,
+  0xdd, 0xd8, 0x6e, 0x5f, 0x84, 0x4c, 0xee, 0x84, 0xf8, 0xfc, 0x6b, 0xef,
+  0x92, 0x67, 0xa3, 0x6f, 0x4e, 0x3f, 0xe4, 0xb0, 0x40, 0x49, 0xdd, 0x40,
+  0x16, 0xa0, 0xd4, 0x91, 0xc0, 0xa1, 0x65, 0xdf, 0xb3, 0xc9, 0xd1, 0x8d,
+  0xce, 0xfb, 0x59, 0xaa, 0x2f, 0xbb, 0x0b, 0x80, 0x21, 0x43, 0x74, 0x32,
+  0xab, 0x90, 0x80, 0x79, 0xb5, 0x54, 0xeb, 0x67, 0x5a, 0xdc, 0x2f, 0xc0,
+  0x49, 0x9a, 0xc4, 0xbb, 0x09, 0xdd, 0xe7, 0xb3, 0x33, 0x6c, 0x8a, 0xd3,
+  0xfd, 0xdd, 0xe1, 0x87, 0xb6, 0x38, 0xad, 0xaa, 0xd9, 0x60, 0x32, 0x99,
+  0x3c, 0x22, 0x51, 0x8f, 0x8e, 0x8e, 0xe8, 0x07, 0x47, 0xc8, 0xd3, 0x62,
+  0x76, 0x21, 0xf4, 0xf4, 0xe8, 0x86, 0x5d, 0x35, 0xb3, 0xed, 0x64, 0x74,
+  0xb3, 0xe2, 0x8c, 0x79, 0xea, 0x0d, 0x76, 0xc5, 0x68, 0x74, 0xba, 0x73,
+  0x79, 0x3a, 0x6a, 0xe3, 0xb6, 0xd3, 0x07, 0xb6, 0xf5, 0x60, 0xd3, 0x35,
+  0x2d, 0x17, 0x51, 0xdc, 0xc0, 0x86, 0x60, 0x98, 0x52, 0xdb, 0x57, 0xf2,
+  0x85, 0x4e, 0x06, 0x9e, 0xd5, 0xc2, 0xb1, 0x79, 0x3b, 0xcb, 0x6a, 0x91,
+  0x2d, 0x00, 0xe1, 0x72, 0x2c, 0x6b, 0x08, 0xb0, 0x55, 0xc9, 0xdb, 0xc3,
+  0x4b, 0x2e, 0x86, 0x52, 0x2b, 0x93, 0x49, 0x37, 0xaa, 0xdc, 0x51, 0x69,
+  0x20, 0xed, 0x22, 0x0d, 0xd8, 0x42, 0xed, 0x0e, 0x80, 0x28, 0xca, 0x2b,
+  0x13, 0x8d, 0x02, 0xc1, 0xe9, 0x64, 0x2b, 0xd3, 0x19, 0x1d, 0xb8, 0x1b,
+  0x48, 0x70, 0xd3, 0xfc, 0xcf, 0xaa, 0xb5, 0x20, 0x7b, 0x9f, 0xc5, 0xf7,
+  0x5b, 0xe3, 0xf5, 0x9f, 0x24, 0x07, 0x61, 0x47, 0xbf, 0xfa, 0xcb, 0x6f,
+  0x5f, 0xa6, 0x4c, 0xa5, 0x05, 0x3f, 0x26, 0x5b, 0x23, 0x46, 0x8f, 0x34,
+  0xee, 0x4e, 0xc7, 0x5f, 0x2b, 0x60, 0x78, 0x25, 0x87, 0xa9, 0x68, 0xb9,
+  0xa7, 0xa0, 0xed, 0x96, 0x6b, 0xc0, 0x55, 0x8f, 0xb9, 0x4f, 0x23, 0xb1,
+  0x61, 0x92, 0x22, 0xc8, 0x5f, 0xe4, 0xc2, 0xb6, 0x02, 0xc1, 0x70, 0xcd,
+  0x97, 0xd9, 0x72, 0xf6, 0xe0, 0xd4, 0x34, 0x6d, 0x7e, 0x9d, 0xfd, 0x16,
+  0x6a, 0xfb, 0x61, 0x7a, 0x86, 0xf5, 0xb1, 0x6a, 0xb6, 0x82, 0x0f, 0xa5,
+  0x79, 0xa7, 0xe3, 0x39, 0xd5, 0x2f, 0xb7, 0xca, 0x91, 0xc4, 0x2b, 0xb4,
+  0xdf, 0xb9, 0x42, 0xb2, 0x4b, 0xbb, 0xd7, 0xe3, 0x42, 0x8f, 0xbd, 0x9d,
+  0x06, 0xc5, 0x74, 0xd9, 0x1e, 0x9b, 0x15, 0xd7, 0x5c, 0xca, 0x45, 0x32,
+  0x1f, 0x31, 0x49, 0xc6, 0xd2, 0xdb, 0xf6, 0x4b, 0xc8, 0x0e, 0xd6, 0x52,
+  0x44, 0xcd, 0xc8, 0x92, 0xe8, 0x22, 0x2c, 0x53, 0xdc, 0xbe, 0xb7, 0x74,
+  0x6a, 0x97, 0x3a, 0xd4, 0xb1, 0x1e, 0x2e, 0x54, 0x3c, 0x79, 0x60, 0x4b,
+  0xff, 0x35, 0xdc, 0x41, 0x9a, 0x57, 0x26, 0x14, 0xcf, 0x1a, 0x1b, 0xd6,
+  0x45, 0x33, 0xd3, 0xb4, 0xb3, 0xd8, 0x0b, 0xdd, 0xdf, 0x3a, 0xc2, 0x78,
+  0xd6, 0x76, 0xb7, 0xf5, 0xca, 0xe6, 0xb2, 0xdc, 0x75, 0xe0, 0xfe, 0x50,
+  0x9d, 0x30, 0xca, 0x33, 0x1a, 0x0b, 0x59, 0xe0, 0x9d, 0xb1, 0x9b, 0x5c,
+  0xad, 0xb8, 0x52, 0xbd, 0x61, 0x64, 0x1a, 0x22, 0x9e, 0xdd, 0xf3, 0x8a,
+  0x9a, 0x95, 0x10, 0xd9, 0xa3, 0xf5, 0xbe, 0x92, 0x91, 0xba, 0x93, 0xe1,
+  0xc5, 0xd0, 0xd0, 0x5a, 0x48, 0x84, 0xe2, 0x69, 0xc6, 0xb4, 0x51, 0xdd,
+  0xb8, 0x1d, 0x5e, 0x73, 0x56, 0x8d, 0xca, 0x54, 0xca, 0xb4, 0xda, 0xd5,
+  0x34, 0x63, 0x50, 0x33, 0xeb, 0x49, 0xc3, 0xe4, 0x54, 0xab, 0xae, 0x6f,
+  0x7e, 0xb5, 0x29, 0x52, 0x7a, 0xf3, 0xc5, 0x66, 0xa2, 0x28, 0xe3, 0x98,
+  0xd2, 0x9e, 0x6f, 0x0c, 0x4b, 0x17, 0xd8, 0x14, 0x97, 0xf3, 0xa6, 0x75,
+  0x41, 0x95, 0x76, 0xe9, 0x16, 0x50, 0x09, 0x0b, 0xcd, 0x05, 0xe0, 0x3a,
+  0xe4, 0xa4, 0x11, 0x75, 0xd8, 0xaf, 0xcd, 0x04, 0x5a, 0xa9, 0xef, 0x88,
+  0x38, 0x11, 0x53, 0xc1, 0xc9, 0xb0, 0x65, 0x71, 0xcb, 0x6c, 0xb3, 0x42,
+  0x5e, 0xb5, 0x90, 0x96, 0x77, 0x01, 0x19, 0x7c, 0x99, 0x12, 0x57, 0x49,
+  0x4c, 0xfa, 0xc2, 0xe8, 0xb4, 0x74, 0x32, 0xc9, 0x39, 0x07, 0x01, 0xca,
+  0x21, 0xfd, 0x96, 0xb4, 0x1a, 0x39, 0xe9, 0x3c, 0x6e, 0x76, 0x16, 0xbf,
+  0x68, 0x43, 0xb0, 0xae, 0xb2, 0x94, 0x57, 0x13, 0x14, 0x5b, 0x6d, 0x46,
+  0xba, 0xc1, 0x35, 0x6b, 0x84, 0xd7, 0xb3, 0x62, 0x5c, 0x5c, 0x5d, 0x3d,
+  0xe2, 0x8a, 0x94, 0xc4, 0x2c, 0xb4, 0x21, 0x5b, 0xb4, 0xc7, 0xd9, 0x42,
+  0xfc, 0xde, 0x18, 0xc5, 0x77, 0xa5, 0x6a, 0xcd, 0x50, 0x3c, 0x32, 0x60,
+  0xe2, 0x89, 0xb4, 0x80, 0x50, 0x79, 0xee, 0xbb, 0x94, 0xa6, 0xa0, 0xc2,
+  0xb9, 0xe9, 0x99, 0x0a, 0xbf, 0xf3, 0xbc, 0x3d, 0x55, 0xf2, 0x1f, 0xff,
+  0xf9, 0xd3, 0x2f, 0x1d, 0xb0, 0x7c, 0xb6, 0x6c, 0x14, 0x71, 0x0a, 0xa4,
+  0x8b, 0x64, 0x3e, 0xc3, 0x84, 0x60, 0x35, 0xc4, 0xf3, 0x7e, 0x6b, 0xe9,
+  0x31, 0x05, 0xf5, 0x76, 0xb9, 0x81, 0xc4, 0x28, 0x75, 0x1f, 0x4c, 0x11,
+  0xaf, 0xae, 0x0d, 0x0b, 0xc0, 0x99, 0xdf, 0x60, 0xbe, 0xf0, 0xd1, 0x34,
+  0x97, 0x55, 0x2a, 0x56, 0x7b, 0x7c, 0xa0, 0x1c, 0x39, 0x80, 0x0b, 0xaf,
+  0xaa, 0x9c, 0x7d, 0x77, 0x71, 0xe2, 0x6c, 0xba, 0x60, 0x25, 0xbe, 0xc1,
+  0x4a, 0x44, 0xd3, 0xe6, 0x98, 0xa7, 0xfa, 0x0d, 0xb3, 0xc7, 0x93, 0x72,
+  0xa0, 0x4c, 0x85, 0x08, 0x9f, 0x06, 0x05, 0x1e, 0xfb, 0xbb, 0x06, 0xd3,
+  0x98, 0x3c, 0x4b, 0x1e, 0x65, 0x71, 0xd4, 0x64, 0x72, 0x72, 0x71, 0x58,
+  0x2b, 0x4d, 0x96, 0x38, 0xdc, 0xc3, 0x37, 0xc7, 0x8e, 0x0d, 0x32, 0xda,
+  0xf9, 0x8d, 0xaa, 0xbf, 0x4d, 0xde, 0x48, 0xd0, 0x7d, 0xb8, 0x52, 0xce,
+  0xf7, 0x9e, 0x6e, 0x49, 0x8c, 0x9f, 0x8e, 0x4b, 0x50, 0x59, 0x9b, 0x44,
+  0x60, 0x19, 0xa1, 0x83, 0x9f, 0xb7, 0x53, 0x23, 0xd7, 0xd9, 0xfc, 0xf7,
+  0x4d, 0xcf, 0x9f, 0xd3, 0x49, 0x82, 0xe4, 0x07, 0x11, 0x25, 0xb3, 0x0f,
+  0x4e, 0xfa, 0xbe, 0xb3, 0xfe, 0x8b, 0x36, 0x94, 0x71, 0x07, 0xf1, 0xe3,
+  0xba, 0x7e, 0x7c, 0x7b, 0x7c, 0xf8, 0xca, 0xc6, 0xfb, 0x4f, 0xc9, 0x42,
+  0xf7, 0xfe, 0x9f, 0x71, 0x26, 0xfc, 0x96, 0x2b, 0x33, 0x21, 0xb1, 0x4a,
+  0x76, 0x65, 0x60, 0x67, 0x90, 0x92, 0xcd, 0x14, 0xc9, 0xbc, 0x53, 0x63,
+  0x8b, 0x51, 0x9d, 0x4d, 0x6b, 0x6d, 0xc6, 0xc0, 0x1f, 0x67, 0xbe, 0x3d,
+  0x5f, 0xfe, 0x39, 0xd8, 0xb6, 0x61, 0x92, 0xe3, 0x0b, 0xf9, 0xef, 0x9a,
+  0xbb, 0xe0, 0x18, 0xfc, 0x5e, 0xfa, 0x68, 0x48, 0x4e, 0x77, 0x1d, 0x14,
+  0xbe, 0xbb, 0xcf, 0xc6, 0xac, 0x0b, 0x5d, 0xb3, 0xfa, 0x8c, 0x70, 0x27,
+  0xc9, 0xbc, 0x76, 0xcf, 0x55, 0x64, 0x80, 0x83, 0xc4, 0x55, 0x32, 0xc8,
+  0x82, 0xd6, 0x1b, 0xe8, 0x7d, 0xcd, 0x31, 0xb4, 0x92, 0x6f, 0xd3, 0xa8,
+  0x1c, 0x17, 0x49, 0x88, 0xaa, 0x26, 0x3d, 0xc4, 0x7a, 0xc6, 0x2f, 0xdd,
+  0x18, 0x21, 0x33, 0x5b, 0x68, 0x70, 0x6a, 0xa7, 0xe2, 0x3b, 0xf2, 0xc0,
+  0x7f, 0xf3, 0x54, 0xb4, 0xcd, 0xa2, 0x85, 0x47, 0x69, 0xe8, 0x96, 0x5f,
+  0x81, 0xa8, 0x1a, 0xf1, 0x72, 0x4e, 0x7c, 0xd7, 0x1a, 0xc0, 0x9c, 0xee,
+  0xa8, 0x9f, 0x0c, 0x23, 0x14, 0x8f, 0x1f, 0x30, 0xe7, 0x1e, 0x61, 0x07,
+  0x61, 0x43, 0xd5, 0xe6, 0x31, 0x1a, 0x5a, 0x0d, 0xb9, 0x95, 0x74, 0x37,
+  0xc4, 0xf9, 0x3d, 0x39, 0xa8, 0xc3, 0xeb, 0xd5, 0xd5, 0x95, 0x61, 0xd5,
+  0xc4, 0x34, 0x45, 0x47, 0x7d, 0x89, 0xfb, 0x62, 0x88, 0xc9, 0xd7, 0x39,
+  0x33, 0x4d, 0x31, 0x9d, 0xac, 0xf3, 0xd6, 0xe8, 0x70, 0x7c, 0xe1, 0x2e,
+  0x93, 0xce, 0xa8, 0x33, 0x23, 0x19, 0xd6, 0x59, 0xc9, 0xa6, 0x26, 0x90,
+  0x3b, 0x08, 0x5b, 0xdf, 0xc7, 0x42, 0x58, 0xcb, 0x93, 0x49, 0x52, 0x36,
+  0xd3, 0xfd, 0xb3, 0x4a, 0x22, 0x39, 0xa1, 0x3a, 0x6c, 0x9d, 0x30, 0x12,
+  0xeb, 0xd7, 0xf9, 0x9d, 0x95, 0x74, 0x44, 0xcf, 0x3a, 0x12, 0x28, 0xac,
+  0x13, 0x16, 0xb9, 0x57, 0x8f, 0xbe, 0xb0, 0x13, 0x24, 0xcc, 0xcc, 0x17,
+  0x2c, 0xe7, 0xa4, 0x98, 0x21, 0x13, 0x3b, 0x85, 0x51, 0x77, 0xc0, 0x3b,
+  0xbb, 0x1d, 0x12, 0xf9, 0xb6, 0xa8, 0xea, 0x83, 0x5e, 0xb3, 0x72, 0x8d,
+  0xaa, 0x10, 0xcd, 0x2d, 0xa4, 0x8c, 0x76, 0x03, 0xb9, 0xb5, 0xe5, 0x88,
+  0xd5, 0x55, 0x67, 0x95, 0x2e, 0x17, 0x6a, 0xd4, 0x82, 0xeb, 0xb5, 0xa5,
+  0x00, 0x33, 0x41, 0xd8, 0x3c, 0xd7, 0x5e, 0xa1, 0x5a, 0x12, 0xf7, 0x6c,
+  0xf0, 0x2d, 0xf5, 0xe3, 0xc7, 0xc1, 0xd1, 0xaa, 0x8a, 0xf1, 0xc3, 0xf3,
+  0xc1, 0xb7, 0x68, 0xf2, 0xcf, 0x3d, 0x67, 0x61, 0xcb, 0xa3, 0xfe, 0x57,
+  0x07, 0xbd, 0x35, 0x78, 0xef, 0x90, 0x23, 0xa8, 0x5a, 0x95, 0x46, 0x33,
+  0x02, 0x8f, 0xb9, 0x76, 0x14, 0x94, 0xee, 0xd3, 0xe9, 0x8e, 0xce, 0xb7,
+  0x05, 0xf7, 0xba, 0xb2, 0xe5, 0x34, 0x5b, 0x61, 0x09, 0x54, 0xde, 0x74,
+  0x50, 0x5c, 0x0d, 0x50, 0x66, 0x87, 0x4b, 0x9f, 0x72, 0x28, 0x25, 0x38,
+  0x8e, 0x20, 0x3d, 0x44, 0x7e, 0xcd, 0x74, 0xda, 0x75, 0x2d, 0x2b, 0x30,
+  0xbc, 0x74, 0x16, 0xaa, 0x76, 0x46, 0x97, 0xf4, 0x80, 0xad, 0x1a, 0x7b,
+  0xdd, 0x71, 0xea, 0x71, 0x61, 0x9a, 0xb4, 0x2c, 0x73, 0x92, 0x22, 0x51,
+  0x7d, 0x0e, 0x80, 0xf0, 0xfa, 0x72, 0x73, 0x63, 0xd0, 0x10, 0xbf, 0x73,
+  0x71, 0x16, 0xc1, 0xe0, 0x27, 0x2b, 0xff, 0x4a, 0xea, 0xad, 0x75, 0xc6,
+  0x76, 0x7d, 0xe6, 0x47, 0xbb, 0xfe, 0x2d, 0x52, 0x47, 0x1b, 0x29, 0xe8,
+  0xeb, 0xf8, 0x49, 0xd6, 0x05, 0x79, 0x83, 0x8c, 0x03, 0xdc, 0x0e, 0x8a,
+  0x86, 0xf7, 0x93, 0xbe, 0x23, 0x5a, 0x7a, 0x57, 0x74, 0x84, 0xdf, 0x32,
+  0xe9, 0x17, 0xe8, 0xeb, 0x5c, 0x95, 0x61, 0xb9, 0x1a, 0xcf, 0xa7, 0xcf,
+  0x92, 0x17, 0xf4, 0x47, 0x0c, 0x5f, 0x3e, 0xb2, 0x60, 0x9a, 0xd4, 0xa1,
+  0xe4, 0x7d, 0xa7, 0x19, 0xdc, 0xa2, 0x87, 0xf1, 0x5f, 0x9f, 0xec, 0x53,
+  0xd3, 0x1f, 0x52, 0x23, 0xbd, 0x9f, 0xe6, 0xd7, 0x79, 0x5d, 0x75, 0x19,
+  0xb1, 0xfa, 0xaa, 0x0f, 0x64, 0xf0, 0x44, 0xed, 0xed, 0x7f, 0x91, 0x8c,
+  0xf3, 0x3a, 0x79, 0xf3, 0xea, 0x99, 0xd4, 0x5c, 0xad, 0x56, 0x73, 0x17,
+  0x10, 0x52, 0x8e, 0x72, 0x54, 0x8f, 0xd8, 0x6c, 0x1f, 0x11, 0xea, 0xf8,
+  0x2c, 0x9f, 0x70, 0xc2, 0x5a, 0xbf, 0xe1, 0x42, 0xbb, 0x32, 0x57, 0x5f,
+  0x50, 0x10, 0xc0, 0x6d, 0x3c, 0x6e, 0x49, 0x5d, 0x8d, 0x1d, 0x46, 0x2c,
+  0xcd, 0x01, 0x7d, 0xbe, 0xb2, 0x62, 0x8d, 0x0d, 0xc3, 0xe9, 0xf3, 0xa6,
+  0x43, 0x40, 0xd0, 0xb2, 0xc6, 0x15, 0x35, 0x98, 0x65, 0x8b, 0xeb, 0x75,
+  0xb5, 0x70, 0x4f, 0xf0, 0xa8, 0xd8, 0xf8, 0xfa, 0xf8, 0x29, 0x1e, 0x77,
+  0x29, 0xf2, 0x41, 0xec, 0x87, 0xb7, 0x73, 0x3e, 0x59, 0xcd, 0xb8, 0x72,
+  0x52, 0x7c, 0xc7, 0x33, 0x16, 0x12, 0x1b, 0xd0, 0x8a, 0x30, 0x97, 0x2b,
+  0x29, 0xb2, 0x73, 0xb8, 0x64, 0xc4, 0x58, 0xb2, 0x37, 0xfc, 0xd0, 0x0f,
+  0xab, 0x43, 0x6a, 0x35, 0x07, 0xae, 0x02, 0x19, 0xa5, 0x2a, 0xc2, 0xe9,
+  0xdb, 0xea, 0x10, 0x37, 0x2d, 0x50, 0xbd, 0x19, 0x07, 0x3d, 0x4a, 0xb9,
+  0x06, 0xf6, 0x49, 0x9e, 0x5e, 0xa7, 0xa8, 0x06, 0x14, 0xec, 0x9e, 0x1c,
+  0xf5, 0xc0, 0x85, 0x4b, 0x6e, 0xcd, 0xc0, 0xe5, 0x97, 0x8e, 0x28, 0xc1,
+  0x34, 0x01, 0xd5, 0xdf, 0x15, 0x63, 0x6a, 0xa4, 0x5e, 0xc1, 0x13, 0x71,
+  0x11, 0x4b, 0x6e, 0x07, 0xb4, 0x77, 0x38, 0x85, 0x82, 0xba, 0xd1, 0x49,
+  0x18, 0xf0, 0x0d, 0xdc, 0x67, 0x5d, 0xcd, 0x45, 0x12, 0x3d, 0xba, 0x16,
+  0x8d, 0xc6, 0x30, 0x7a, 0x24, 0x77, 0x18, 0x40, 0x76, 0x38, 0x0c, 0x46,
+  0x75, 0x62, 0x1a, 0x4b, 0xd7, 0x90, 0x98, 0x68, 0x7e, 0xe7, 0xf5, 0xc9,
+  0xe9, 0xf1, 0x76, 0xf2, 0x3a, 0xb3, 0x7c, 0xd0, 0x70, 0x64, 0x2c, 0x2f,
+  0xfe, 0x45, 0x7e, 0x62, 0x2b, 0xa4, 0x06, 0x56, 0x57, 0x7e, 0xba, 0xa3,
+  0x1e, 0x81, 0xa6, 0x28, 0xcb, 0x06, 0xa5, 0x50, 0xb2, 0x60, 0x0a, 0xa0,
+  0xf4, 0xac, 0x9c, 0x80, 0x85, 0xf1, 0x3a, 0x67, 0x08, 0x08, 0x26, 0x5f,
+  0x34, 0xc4, 0x13, 0xd2, 0x16, 0x61, 0x08, 0x9c, 0x7b, 0xae, 0x48, 0x34,
+  0x0b, 0x8b, 0x4a, 0xbd, 0xad, 0x6a, 0x5d, 0x5d, 0xce, 0x2a, 0xff, 0xbb,
+  0x00, 0x77, 0x81, 0x97, 0x98, 0x17, 0x53, 0xc7, 0x3d, 0x29, 0xc5, 0x3d,
+  0x5a, 0x55, 0xd3, 0x07, 0xb8, 0x8a, 0xaf, 0xf8, 0x02, 0xe8, 0x4c, 0xee,
+  0x3c, 0x17, 0xa6, 0x4d, 0xd8, 0x0e, 0x61, 0x18, 0x5e, 0xee, 0x6a, 0x6f,
+  0xa0, 0xb8, 0x66, 0x86, 0x0e, 0xc9, 0x95, 0x2d, 0xea, 0x8e, 0x7d, 0x61,
+  0x5f, 0x93, 0x2d, 0x10, 0xf8, 0xf6, 0x69, 0xb4, 0x38, 0xea, 0x02, 0xa8,
+  0x3b, 0x5c, 0x18, 0xda, 0x26, 0xd1, 0x32, 0x99, 0x48, 0xde, 0x89, 0x8a,
+  0x03, 0x75, 0x20, 0xa2, 0x14, 0xb3, 0x14, 0x8c, 0x8c, 0xd4, 0xdd, 0xdd,
+  0x83, 0xbd, 0xb0, 0xf6, 0xcf, 0x42, 0x2b, 0xdb, 0x31, 0x52, 0x69, 0xe7,
+  0xf7, 0xc3, 0xa4, 0xfc, 0x95, 0xb7, 0xe6, 0x5f, 0x57, 0x8b, 0xdb, 0x81,
+  0x16, 0x97, 0x1d, 0x74, 0xd7, 0x1f, 0xd4, 0xd3, 0xf7, 0x83, 0x0b, 0x4a,
+  0x00, 0x71, 0x20, 0x90, 0xc9, 0xb8, 0xca, 0x6a, 0x1a, 0x30, 0xfb, 0xf5,
+  0x1f, 0xc9, 0xb3, 0xf1, 0x36, 0x65, 0xce, 0xb1, 0x50, 0x1a, 0x30, 0x17,
+  0xb3, 0x63, 0xc5, 0xa0, 0x67, 0xb5, 0x6e, 0xad, 0xe1, 0xde, 0x30, 0x64,
+  0x17, 0x8c, 0xc0, 0x51, 0x95, 0xe6, 0x4f, 0x89, 0xf7, 0xc4, 0x6b, 0xd2,
+  0x1a, 0x6e, 0x48, 0x85, 0x29, 0x8e, 0x6f, 0x6c, 0x5f, 0x45, 0xb7, 0x12,
+  0xf6, 0x5e, 0x9e, 0x8f, 0xd6, 0x6d, 0x29, 0x99, 0x6d, 0x56, 0x4e, 0xa0,
+  0x32, 0xfe, 0x1d, 0xeb, 0x61, 0xd2, 0xee, 0x9c, 0x95, 0x1a, 0xe0, 0x4b,
+  0x7e, 0x33, 0x3a, 0x97, 0x93, 0x59, 0x21, 0xf5, 0x77, 0xee, 0x43, 0xc7,
+  0xd6, 0x7f, 0x93, 0x7b, 0x9b, 0x2f, 0x23, 0x3d, 0xe9, 0x83, 0x0e, 0xec,
+  0x53, 0x48, 0x57, 0x6b, 0xc9, 0x49, 0x48, 0xfd, 0x81, 0x42, 0x70, 0x16,
+  0xb4, 0x21, 0x90, 0x56, 0x97, 0xbf, 0xa4, 0x17, 0x56, 0x27, 0x45, 0xd5,
+  0x20, 0x30, 0xdb, 0x9d, 0xb4, 0x7e, 0x45, 0xc7, 0xb6, 0xa8, 0x72, 0xf1,
+  0xb3, 0x7b, 0x60, 0x5a, 0xe0, 0xf4, 0x8d, 0xb1, 0x27, 0x96, 0xb3, 0xeb,
+  0xb8, 0x44, 0x1c, 0x1a, 0xc7, 0xec, 0xd6, 0x60, 0xc0, 0xb7, 0x22, 0xdb,
+  0xab, 0x2e, 0x2c, 0x91, 0x65, 0xa5, 0x86, 0x01, 0xa3, 0x00, 0x62, 0xa9,
+  0x16, 0x87, 0xab, 0xac, 0xa0, 0x47, 0xbe, 0x67, 0xad, 0xf5, 0xda, 0x6a,
+  0xd3, 0xe8, 0x34, 0xcc, 0xa0, 0x15, 0xbf, 0x9b, 0xa7, 0x58, 0x3a, 0xa4,
+  0x1d, 0x16, 0x3d, 0xc2, 0x3e, 0x57, 0x01, 0xc5, 0x44, 0x26, 0x91, 0xf9,
+  0x29, 0xe6, 0xb4, 0x4a, 0xe6, 0x9f, 0x35, 0x84, 0xab, 0x5c, 0xc1, 0xcd,
+  0xdc, 0x2d, 0x49, 0xc7, 0xc3, 0xc4, 0xa5, 0x0c, 0xca, 0x6f, 0xef, 0xd6,
+  0x07, 0x8b, 0x33, 0xa8, 0x41, 0x65, 0xa8, 0x6a, 0x29, 0xff, 0xe9, 0xfb,
+  0x14, 0x56, 0xfa, 0x58, 0x3f, 0x58, 0xd4, 0x4b, 0xb4, 0x48, 0x67, 0x63,
+  0x92, 0xe3, 0x48, 0x67, 0xa0, 0x56, 0x7a, 0x0f, 0x19, 0x3c, 0x02, 0x48,
+  0x46, 0x46, 0x54, 0x52, 0x6b, 0xea, 0xa9, 0x07, 0x39, 0x71, 0xd8, 0xc2,
+  0xc4, 0x15, 0x37, 0x5b, 0x53, 0xb2, 0x0c, 0x89, 0x84, 0x37, 0xe9, 0x87,
+  0x0f, 0xc3, 0x2a, 0x93, 0xd2, 0x5b, 0x55, 0x35, 0x43, 0xd2, 0x62, 0xb3,
+  0x56, 0xd9, 0xe0, 0x3b, 0x2d, 0x54, 0x78, 0x95, 0x5f, 0x33, 0xf6, 0x0d,
+  0xff, 0xed, 0x4a, 0xd1, 0xb6, 0xdc, 0x6c, 0xad, 0xf7, 0xe6, 0x1f, 0xf4,
+  0x52, 0x07, 0x2c, 0x43, 0x8a, 0x00, 0x12, 0xe1, 0xa3, 0x04, 0xc6, 0x93,
+  0x38, 0xf7, 0x83, 0xdf, 0x56, 0xd8, 0x04, 0x68, 0x1c, 0x15, 0x87, 0x8e,
+  0x95, 0x72, 0xdf, 0x08, 0x8a, 0x74, 0xfa, 0x76, 0x45, 0x65, 0x6e, 0x1b,
+  0x1e, 0x5a, 0xe2, 0xd2, 0xee, 0xd8, 0x6c, 0xd1, 0x10, 0xb2, 0x2a, 0x73,
+  0x44, 0xef, 0x67, 0x58, 0xba, 0x3d, 0x6f, 0x10, 0x8e, 0xb6, 0xe1, 0x21,
+  0x85, 0x9c, 0xc2, 0x1e, 0x0c, 0x93, 0xb3, 0x65, 0xb0, 0x81, 0x6f, 0xb2,
+  0xbc, 0xf4, 0x1e, 0xe9, 0xca, 0x19, 0x72, 0x38, 0xcd, 0xf1, 0x60, 0xe5,
+  0xa6, 0x0e, 0x6a, 0x5b, 0x2c, 0x82, 0x09, 0x90, 0x8a, 0x16, 0xe6, 0xd2,
+  0x32, 0x54, 0x2b, 0x0d, 0x85, 0xf4, 0x31, 0x52, 0xfb, 0x22, 0xf2, 0x24,
+  0x33, 0x56, 0x91, 0x9b, 0xcb, 0xbc, 0xa8, 0x15, 0xf2, 0x20, 0x84, 0x2a,
+  0xe8, 0xa1, 0xe1, 0xf2, 0x82, 0xcb, 0x99, 0x94, 0x87, 0x2d, 0xa5, 0xc1,
+  0xef, 0x4a, 0xc4, 0x13, 0xa7, 0x4e, 0x89, 0x3b, 0xcb, 0x48, 0xa9, 0x15,
+  0x79, 0x13, 0xb4, 0x2e, 0x75, 0x64, 0x85, 0xd5, 0x2b, 0xf0, 0xc3, 0x77,
+  0x80, 0xd6, 0x2c, 0x81, 0x3a, 0x18, 0x80, 0xcb, 0xe8, 0xb7, 0x37, 0xb5,
+  0xd4, 0xdf, 0x18, 0x14, 0x0a, 0x2a, 0x93, 0x15, 0x8b, 0xdb, 0x6a, 0x4e,
+  0x50, 0xbd, 0xa4, 0xf2, 0x08, 0x50, 0x57, 0x90, 0xbc, 0x89, 0x61, 0x7d,
+  0x9b, 0xec, 0xd6, 0xca, 0x2d, 0x52, 0xb1, 0x4b, 0x6e, 0x31, 0x11, 0x7e,
+  0xf5, 0x75, 0x8c, 0x0c, 0x64, 0xe3, 0xff, 0xfc, 0x73, 0x3f, 0x61, 0x8a,
+  0x93, 0x9f, 0x49, 0x8f, 0xfc, 0x99, 0x26, 0xf4, 0x67, 0x21, 0xe3, 0xfe,
+  0xf9, 0x8e, 0xa4, 0x52, 0x00, 0x11, 0xf6, 0x44, 0xcb, 0x31, 0xca, 0x4b,
+  0x02, 0x8c, 0x4a, 0x30, 0xcf, 0xae, 0x39, 0xc9, 0xb1, 0x73, 0x73, 0x25,
+  0x3e, 0x3d, 0x5a, 0xb0, 0xd5, 0x7c, 0xa1, 0x9c, 0x22, 0xb2, 0xf4, 0xd8,
+  0xd4, 0xd1, 0x55, 0x9c, 0x26, 0xc9, 0xe6, 0x1f, 0x36, 0x3d, 0x39, 0x4a,
+  0xc0, 0x58, 0xaf, 0x9a, 0x2f, 0xde, 0xb3, 0xad, 0x5d, 0x6b, 0x8d, 0x57,
+  0xd8, 0xc9, 0x5d, 0xd1, 0x5a, 0x28, 0x8b, 0x67, 0x6c, 0xe3, 0x4a, 0x51,
+  0xe3, 0xc2, 0x97, 0xbb, 0x65, 0xf3, 0x3c, 0x59, 0xde, 0x3c, 0xe0, 0xb2,
+  0x96, 0x3d, 0x18, 0x90, 0xaf, 0x4a, 0x2f, 0x3b, 0x78, 0xf1, 0x63, 0xf1,
+  0xd5, 0xe0, 0x6c, 0xf0, 0x57, 0x15, 0x47, 0x3e, 0x42, 0xd9, 0x42, 0x7d,
+  0xdc, 0x1c, 0x6c, 0x36, 0x29, 0xc9, 0xd6, 0x54, 0x0b, 0xf1, 0xa4, 0x3d,
+  0x52, 0x2b, 0x64, 0x3d, 0x38, 0x5c, 0x33, 0x89, 0xc7, 0x22, 0x85, 0x9c,
+  0x6b, 0x10, 0x4e, 0x5a, 0x33, 0x42, 0xc2, 0xb3, 0xd6, 0xef, 0x42, 0xcf,
+  0x80, 0x5c, 0x4e, 0x58, 0x4b, 0x6d, 0x2c, 0x79, 0x9d, 0x04, 0x37, 0xca,
+  0x80, 0x79, 0xec, 0x5d, 0xec, 0x82, 0xb7, 0x08, 0x8a, 0x8b, 0x3e, 0x70,
+  0xb6, 0xc4, 0x32, 0xb2, 0xe2, 0x78, 0xa6, 0xed, 0x4d, 0xee, 0x47, 0x01,
+  0xf7, 0x4f, 0xc2, 0x41, 0x51, 0x91, 0x23, 0xa3, 0xa2, 0x2f, 0x94, 0xbd,
+  0x4e, 0x4f, 0x4d, 0x5c, 0xde, 0x45, 0x7c, 0x9c, 0x3a, 0x53, 0x0f, 0xb8,
+  0x3f, 0x2f, 0x93, 0xde, 0x5a, 0x59, 0xdf, 0x6b, 0xbf, 0x70, 0xca, 0x89,
+  0xe0, 0x0e, 0xbb, 0x24, 0x64, 0x20, 0x92, 0x4b, 0x62, 0xec, 0x5f, 0x33,
+  0xae, 0xb5, 0xa2, 0xaa, 0xa2, 0x2f, 0xdf, 0x69, 0x42, 0x7e, 0x8d, 0x6f,
+  0x4d, 0x9c, 0x92, 0xc2, 0xd8, 0xa6, 0x27, 0x93, 0xcb, 0x35, 0xaf, 0x2b,
+  0xa1, 0x61, 0xca, 0x2a, 0xe7, 0xe5, 0xdd, 0x2a, 0x8f, 0x98, 0xaa, 0x73,
+  0x5b, 0x76, 0x69, 0xfe, 0xcd, 0x2e, 0xca, 0x6d, 0x75, 0x17, 0x08, 0x72,
+  0x70, 0x1d, 0x07, 0x55, 0x53, 0x92, 0xc2, 0xd8, 0x82, 0x71, 0x95, 0xc3,
+  0xf5, 0x7b, 0x55, 0xac, 0x16, 0xd3, 0x26, 0x9a, 0x60, 0xed, 0xce, 0xe6,
+  0xef, 0xe2, 0x8b, 0x4a, 0x66, 0x66, 0x59, 0x01, 0x4e, 0xba, 0xc0, 0x07,
+  0xa3, 0x08, 0x7e, 0xd6, 0x00, 0x99, 0x04, 0x2a, 0x5a, 0x99, 0xbd, 0x6d,
+  0xd5, 0x8c, 0x50, 0x70, 0x0d, 0x25, 0x5c, 0xd5, 0x49, 0xd8, 0xbb, 0x29,
+  0x24, 0xfb, 0xbf, 0x77, 0xc0, 0x25, 0x61, 0xd5, 0xdb, 0xaf, 0x63, 0x74,
+  0x61, 0xea, 0x36, 0xda, 0x85, 0xe9, 0x15, 0xbe, 0x3d, 0x7b, 0x73, 0xec,
+  0x30, 0x89, 0x62, 0x92, 0xf2, 0x4f, 0x3a, 0x19, 0x60, 0x86, 0x08, 0x2c,
+  0x5b, 0x56, 0x67, 0x3f, 0x66, 0x8a, 0xc6, 0xec, 0x90, 0xdd, 0xb9, 0xbc,
+  0x5f, 0xe5, 0xd3, 0x2d, 0x64, 0xde, 0xbe, 0x7b, 0x7b, 0xf2, 0xe3, 0x00,
+  0x16, 0xb7, 0x16, 0xb1, 0xb7, 0xd4, 0x53, 0xcb, 0x5a, 0x95, 0x62, 0x31,
+  0xc5, 0xbc, 0x23, 0x85, 0xdb, 0x78, 0xc3, 0x43, 0x7a, 0x2d, 0xe0, 0xe8,
+  0xf3, 0x85, 0xf8, 0xbc, 0xa5, 0xc9, 0x6d, 0x16, 0x43, 0x24, 0xc3, 0x41,
+  0xbf, 0x80, 0x75, 0xef, 0xc0, 0x57, 0x06, 0xeb, 0xcd, 0xcd, 0x1d, 0x9e,
+  0x9f, 0xbf, 0x3a, 0xbc, 0x3c, 0x74, 0x63, 0x03, 0xdd, 0x01, 0x44, 0x1d,
+  0x0c, 0x29, 0xd6, 0x8e, 0xb4, 0xdc, 0xc7, 0xe6, 0x1f, 0x19, 0x7c, 0xdf,
+  0x96, 0x7e, 0xe7, 0x17, 0x67, 0x6c, 0x10, 0xff, 0xf1, 0xe7, 0x43, 0x5f,
+  0xbb, 0x0b, 0xf5, 0x3c, 0xe2, 0x0a, 0x4a, 0xfb, 0xa4, 0xef, 0x9e, 0x2d,
+  0x1c, 0x3f, 0x44, 0xdf, 0x45, 0x6b, 0x25, 0xcb, 0x35, 0x79, 0xcf, 0x6b,
+  0x5a, 0x4e, 0x9c, 0x82, 0x22, 0x9e, 0x26, 0x59, 0xce, 0x7e, 0x8c, 0xda,
+  0x0a, 0x06, 0x02, 0xf8, 0x5f, 0x93, 0xfd, 0xc1, 0xe6, 0x6a, 0x46, 0x5a,
+  0x35, 0xa9, 0x86, 0x35, 0xc4, 0x17, 0xe3, 0x5b, 0x78, 0x7f, 0x4d, 0x79,
+  0xa2, 0xda, 0x1c, 0x47, 0x6e, 0x7d, 0x6c, 0x81, 0x24, 0xab, 0x18, 0xd7,
+  0x80, 0xc8, 0x20, 0x41, 0xe5, 0x15, 0xc2, 0xed, 0x3e, 0xb4, 0xde, 0xaa,
+  0xee, 0x1f, 0x9d, 0x1d, 0xf1, 0x36, 0xd3, 0x3e, 0xb7, 0x31, 0x44, 0x13,
+  0xf2, 0x07, 0x12, 0x7a, 0x03, 0xcb, 0xfa, 0x93, 0x61, 0xd3, 0x0f, 0xa2,
+  0x87, 0x6a, 0x63, 0xb0, 0x86, 0xaa, 0x14, 0xfb, 0x83, 0x55, 0x4e, 0x85,
+  0x02, 0xaa, 0xad, 0x31, 0x6b, 0x22, 0xb8, 0x3e, 0x85, 0xb2, 0x37, 0x48,
+  0x23, 0x8b, 0x7d, 0x63, 0xe6, 0x69, 0xa5, 0x47, 0xab, 0x15, 0x3b, 0x17,
+  0xf8, 0x5f, 0x3b, 0x7b, 0xc3, 0xdd, 0x5e, 0xdc, 0x7b, 0x40, 0xba, 0xe0,
+  0xc1, 0x31, 0xf2, 0x44, 0xe1, 0xc3, 0x2c, 0x3e, 0xde, 0x41, 0x2d, 0x54,
+  0x9b, 0x2e, 0x10, 0x87, 0xea, 0xea, 0xcb, 0xe0, 0x2c, 0xf2, 0xb4, 0x89,
+  0xc7, 0xd7, 0x8b, 0xe4, 0x45, 0x81, 0xf4, 0xc7, 0x94, 0x6d, 0x0e, 0x78,
+  0x0d, 0x7a, 0xdd, 0x13, 0xbc, 0x98, 0x4a, 0xf4, 0xaa, 0x35, 0xcf, 0xbf,
+  0x29, 0x2d, 0xc8, 0xad, 0x7f, 0xe0, 0x48, 0x5e, 0x2b, 0xed, 0x1a, 0x6e,
+  0xe2, 0xdb, 0x8c, 0x14, 0xbf, 0x19, 0xb2, 0x60, 0xd8, 0xe9, 0xb3, 0xae,
+  0xee, 0x6b, 0xc3, 0x22, 0xe4, 0x90, 0x8f, 0x15, 0xaf, 0x93, 0x3a, 0xb0,
+  0x21, 0xce, 0xd7, 0x73, 0xc6, 0x91, 0x45, 0xcc, 0xda, 0x60, 0x3e, 0x8d,
+  0x2e, 0x11, 0x45, 0xfc, 0x71, 0xa8, 0x82, 0xe5, 0x95, 0xeb, 0x04, 0x07,
+  0x0f, 0xc6, 0x99, 0xd3, 0xb3, 0xa5, 0x75, 0x4b, 0xb8, 0x65, 0x22, 0xc6,
+  0xfc, 0x2e, 0x9f, 0xae, 0xa2, 0xd0, 0x5b, 0xfb, 0x7d, 0x14, 0xde, 0xce,
+  0xab, 0x30, 0xb3, 0x03, 0xfe, 0x07, 0x7e, 0xa2, 0x70, 0xee, 0x29, 0xd4,
+  0x44, 0xc1, 0x99, 0x8a, 0x3c, 0x6e, 0x57, 0xc2, 0x30, 0x25, 0x43, 0xbc,
+  0x3c, 0x3a, 0x7f, 0xff, 0xdd, 0xf1, 0xf1, 0xf9, 0xc9, 0xab, 0xd3, 0x63,
+  0xbd, 0x67, 0xdc, 0x8f, 0xde, 0x5e, 0x7e, 0x7f, 0x6a, 0xa4, 0x53, 0x36,
+  0x3f, 0x91, 0xcf, 0x86, 0x91, 0x23, 0x68, 0xee, 0x34, 0x5f, 0xac, 0x3e,
+  0x30, 0x40, 0x71, 0xc2, 0x9b, 0xf9, 0xf0, 0xe4, 0xc7, 0x7e, 0xf2, 0xed,
+  0xf9, 0xe0, 0xdd, 0x8f, 0x51, 0x3e, 0x7f, 0x03, 0xab, 0xd9, 0x36, 0xf6,
+  0x1d, 0x72, 0x13, 0x54, 0xbe, 0x7e, 0xec, 0x66, 0x65, 0x76, 0x54, 0xb7,
+  0xf9, 0x47, 0xfb, 0xad, 0xa2, 0xe6, 0x56, 0x8b, 0x80, 0x22, 0x14, 0x95,
+  0x53, 0xa4, 0x69, 0xbd, 0x7a, 0xb1, 0x1d, 0x3e, 0xdb, 0xb5, 0x5a, 0xc1,
+  0xcd, 0x0d, 0xf8, 0x90, 0xbc, 0xa0, 0x3f, 0xba, 0xf8, 0x55, 0x76, 0x46,
+  0xa3, 0x6f, 0xb7, 0x93, 0x73, 0xe5, 0xd0, 0xe3, 0x27, 0x5d, 0x5a, 0xf8,
+  0xd0, 0x70, 0x5a, 0x1a, 0xfe, 0xd4, 0x2c, 0x34, 0x4d, 0x4e, 0x2e, 0x23,
+  0x3b, 0xcc, 0xb5, 0x60, 0x77, 0xb8, 0x99, 0x5c, 0xdd, 0xaa, 0xed, 0x3f,
+  0x30, 0xdb, 0x8c, 0x3e, 0xfa, 0x51, 0x1e, 0xb0, 0x68, 0x88, 0xfc, 0xe8,
+  0xb0, 0x65, 0x78, 0xa3, 0x11, 0x8c, 0x4f, 0x66, 0xad, 0xab, 0x62, 0x96,
+  0x30, 0xc3, 0xb4, 0xd8, 0x51, 0x73, 0x3a, 0x10, 0xaf, 0x8e, 0x2f, 0xfa,
+  0x42, 0x0f, 0x16, 0x52, 0x83, 0x39, 0x2e, 0xbc, 0xa1, 0x52, 0x82, 0x75,
+  0x46, 0xdc, 0xb1, 0xa8, 0xff, 0x3c, 0x4a, 0xb0, 0xdb, 0x72, 0x9c, 0xbc,
+  0x98, 0xd1, 0x8b, 0xb3, 0xee, 0x44, 0x3c, 0xa9, 0xaf, 0xe0, 0x8b, 0x44,
+  0xb4, 0xc8, 0x1f, 0x94, 0x6a, 0x4a, 0xcb, 0xce, 0x73, 0x33, 0xce, 0xe2,
+  0x8c, 0x18, 0xff, 0x6a, 0xf8, 0x74, 0xf8, 0x8d, 0x28, 0x6b, 0x69, 0x13,
+  0x48, 0xc1, 0xcd, 0x7e, 0xb2, 0xc9, 0x0c, 0x17, 0xfc, 0x5f, 0x08, 0x54,
+  0x2d, 0xae, 0xb1, 0xd9, 0x8f, 0xf9, 0xcd, 0x37, 0x75, 0xd6, 0x37, 0x69,
+  0xe1, 0xa4, 0x35, 0xde, 0x9b, 0xc2, 0xe6, 0x25, 0xfd, 0x30, 0x42, 0x5b,
+  0xe1, 0xc7, 0x6c, 0xc0, 0x0a, 0xaa, 0xc8, 0xd4, 0x77, 0xcd, 0xb5, 0x51,
+  0x2a, 0xdd, 0xbe, 0xa4, 0xa6, 0x84, 0x56, 0x0c, 0x34, 0xc2, 0x7a, 0x46,
+  0x3e, 0x2b, 0xf4, 0x3c, 0x08, 0x97, 0x59, 0x29, 0x90, 0xa7, 0xac, 0x57,
+  0x7d, 0x33, 0x1a, 0x1d, 0x9e, 0x9f, 0xb4, 0xa7, 0x9a, 0x7e, 0x3a, 0x78,
+  0x6b, 0xa5, 0x18, 0xb6, 0x6d, 0xa7, 0xf8, 0x64, 0x15, 0x1e, 0x01, 0x32,
+  0xa0, 0xf8, 0xfa, 0x67, 0xdc, 0x2e, 0xc3, 0xe0, 0x06, 0xdf, 0xb3, 0xd9,
+  0x77, 0x17, 0x73, 0x67, 0x56, 0xea, 0x0e, 0xad, 0xb2, 0x4c, 0x71, 0x19,
+  0xa5, 0xe6, 0x9f, 0x29, 0x11, 0x21, 0x29, 0x35, 0xbf, 0xe3, 0x9e, 0x9a,
+  0x81, 0x55, 0x3b, 0xaf, 0xea, 0x01, 0x47, 0x35, 0xba, 0xf1, 0xa3, 0x30,
+  0x53, 0x14, 0xfd, 0x6d, 0x81, 0x95, 0x80, 0x2d, 0x56, 0x84, 0x86, 0xd0,
+  0x94, 0x03, 0x2c, 0x53, 0x69, 0xad, 0xaf, 0x41, 0x84, 0x03, 0xa1, 0xfb,
+  0xe6, 0x2e, 0xcf, 0xee, 0x87, 0x49, 0x72, 0xec, 0x69, 0x4b, 0x34, 0xc2,
+  0x97, 0x37, 0x58, 0xd0, 0xd9, 0x97, 0x39, 0xb9, 0x21, 0x7d, 0x6c, 0x00,
+  0x20, 0x5d, 0x97, 0x19, 0xe0, 0x70, 0x67, 0xd8, 0x29, 0xa9, 0xa1, 0xdf,
+  0x3d, 0x60, 0xbd, 0x42, 0x05, 0x73, 0xa4, 0xbd, 0x0b, 0x66, 0xcd, 0xff,
+  0x8a, 0x7b, 0xb1, 0x26, 0xeb, 0x51, 0xb6, 0xa5, 0xcb, 0x6b, 0x84, 0x29,
+  0x5a, 0x94, 0xc6, 0x55, 0xf7, 0xb8, 0x16, 0x02, 0x3b, 0x42, 0x67, 0xe8,
+  0xed, 0xe9, 0xc8, 0x03, 0xf9, 0xcd, 0x41, 0x5b, 0x49, 0x79, 0x7b, 0x32,
+  0x77, 0xe7, 0xc2, 0xac, 0xdf, 0x5d, 0xa1, 0xc1, 0xf1, 0x73, 0xf2, 0x8c,
+  0x49, 0x68, 0x52, 0xf4, 0xe5, 0xbc, 0x6c, 0xa4, 0x65, 0xf0, 0x37, 0xfe,
+  0x2c, 0x1e, 0x3c, 0x89, 0xfa, 0x77, 0xc7, 0x10, 0x99, 0x3d, 0x25, 0x2c,
+  0x79, 0x8d, 0x63, 0x0d, 0x16, 0x8f, 0x7c, 0xc2, 0xf6, 0xf7, 0x6d, 0x78,
+  0xef, 0x34, 0x78, 0xd6, 0x3b, 0xe3, 0x81, 0x60, 0xe2, 0xde, 0x36, 0x6f,
+  0x8e, 0xab, 0xf6, 0x28, 0xbb, 0xd5, 0x41, 0x58, 0x15, 0x03, 0x06, 0xa1,
+  0x4b, 0x4a, 0x63, 0x57, 0x75, 0x63, 0x81, 0xd7, 0x32, 0xcf, 0xa6, 0xa3,
+  0x11, 0xa9, 0x13, 0x47, 0xf1, 0xbe, 0xc5, 0x5a, 0xcd, 0x24, 0x84, 0x7f,
+  0xb4, 0x69, 0xd6, 0x3b, 0xd2, 0xb0, 0xd3, 0xe4, 0xc9, 0x8f, 0x3f, 0x36,
+  0x99, 0x73, 0xb6, 0xd7, 0xc1, 0x04, 0x1d, 0xb1, 0xdf, 0xb4, 0xe8, 0xda,
+  0x5f, 0x06, 0xda, 0x53, 0x1f, 0x25, 0x47, 0x66, 0x60, 0x8d, 0xe0, 0x46,
+  0x50, 0x46, 0x41, 0x29, 0xa1, 0xab, 0x20, 0xba, 0x30, 0x36, 0x1c, 0x0b,
+  0x41, 0x1f, 0x64, 0xed, 0x3b, 0x50, 0x90, 0xc4, 0xa2, 0x10, 0xb2, 0xb6,
+  0xc9, 0xe2, 0xb9, 0xaa, 0xdc, 0x69, 0x25, 0xe1, 0x7b, 0xbf, 0x18, 0x76,
+  0x31, 0xe3, 0xb7, 0x64, 0xbb, 0x4b, 0xbd, 0x52, 0x58, 0x00, 0x76, 0x8e,
+  0x14, 0x28, 0x65, 0x47, 0x4b, 0x50, 0xfc, 0x48, 0x31, 0x7b, 0xd1, 0x4e,
+  0x11, 0x87, 0x05, 0xc7, 0x0f, 0x31, 0x40, 0x46, 0x11, 0xc9, 0x9e, 0x49,
+  0x6a, 0x78, 0xff, 0x2d, 0xb6, 0x11, 0xae, 0x15, 0x1e, 0xef, 0x77, 0xa4,
+  0xe8, 0xdc, 0x83, 0xbe, 0x5e, 0x38, 0x6c, 0xd4, 0x11, 0x85, 0x58, 0xa2,
+  0xa2, 0x9c, 0x25, 0x33, 0xfa, 0x4f, 0x71, 0xed, 0x1b, 0xdd, 0x7a, 0x31,
+  0xc1, 0x70, 0xb1, 0x18, 0xd4, 0xe5, 0x0a, 0x33, 0xc4, 0xea, 0x1f, 0xa7,
+  0x48, 0x14, 0x9e, 0xd8, 0x82, 0xef, 0x71, 0x8b, 0x99, 0x82, 0xd6, 0x59,
+  0xf0, 0x7a, 0x73, 0x64, 0xf0, 0xc7, 0x51, 0x21, 0x1b, 0x99, 0x65, 0x60,
+  0x70, 0xc6, 0x45, 0x23, 0x5c, 0x32, 0x18, 0xcc, 0xd3, 0x0f, 0x03, 0x3c,
+  0x56, 0x45, 0x0c, 0xa6, 0xa1, 0xf3, 0x46, 0xb9, 0xa3, 0x0a, 0xd1, 0xb8,
+  0x82, 0x39, 0x33, 0x3d, 0xdd, 0x36, 0x91, 0xde, 0x0b, 0x29, 0x6f, 0x21,
+  0x3a, 0xca, 0xdf, 0x1c, 0x5f, 0xb6, 0x8f, 0x16, 0xd2, 0x71, 0xd5, 0xe6,
+  0x01, 0x0e, 0x93, 0xfe, 0x7d, 0xfe, 0xee, 0x72, 0xdb, 0x13, 0xcb, 0x4f,
+  0x8b, 0x96, 0xf3, 0xc5, 0x1a, 0xef, 0x60, 0xf1, 0x12, 0xec, 0xa3, 0x82,
+  0xe7, 0x81, 0x58, 0x75, 0x67, 0xe2, 0x9e, 0x74, 0xe7, 0x27, 0xbb, 0x7b,
+  0x7d, 0xfa, 0x63, 0x1f, 0xee, 0x83, 0x27, 0xbb, 0x4f, 0x9c, 0x6f, 0xd6,
+  0x9e, 0x8a, 0x64, 0xed, 0x54, 0x5e, 0x44, 0xe1, 0x6a, 0xec, 0xf9, 0x27,
+  0x1f, 0x3e, 0xe0, 0xc7, 0xfd, 0x06, 0x5e, 0xaa, 0xcc, 0x06, 0x96, 0xc5,
+  0xef, 0x72, 0x9b, 0xe3, 0x54, 0x7a, 0xeb, 0xb8, 0x9f, 0x71, 0xf8, 0x01,
+  0x56, 0x0b, 0x09, 0xb6, 0xb3, 0x15, 0x07, 0x7c, 0x65, 0xa8, 0xfc, 0xd0,
+  0x65, 0x8d, 0x0f, 0x75, 0x72, 0xe5, 0x1e, 0x4a, 0x19, 0x88, 0x56, 0x3a,
+  0x22, 0xef, 0x56, 0xee, 0x2f, 0x63, 0x8d, 0xf9, 0x9e, 0xd7, 0x64, 0xb5,
+  0x79, 0x50, 0x32, 0x3b, 0x15, 0xda, 0x9e, 0xc8, 0x95, 0x47, 0x63, 0x01,
+  0x29, 0x51, 0xa2, 0x9f, 0x1d, 0x48, 0x57, 0x8f, 0x12, 0x8d, 0x3e, 0xc9,
+  0x84, 0x68, 0xc0, 0x44, 0x51, 0xb0, 0x57, 0xca, 0x44, 0xd4, 0x99, 0x50,
+  0x6f, 0xa1, 0x03, 0xd2, 0x5c, 0x66, 0x42, 0x00, 0x21, 0x29, 0xe7, 0x72,
+  0xe1, 0x4b, 0x9f, 0x04, 0x13, 0xe6, 0x31, 0x02, 0xfc, 0xde, 0xbf, 0x7c,
+  0x34, 0xeb, 0xf2, 0x63, 0xb7, 0xbf, 0x8f, 0x74, 0x77, 0x71, 0x57, 0x34,
+  0xf4, 0x82, 0x47, 0xb3, 0x81, 0x70, 0xb0, 0x06, 0xb0, 0x0c, 0x5e, 0xd0,
+  0xed, 0x9d, 0x4d, 0xd7, 0x45, 0xc3, 0x00, 0x2a, 0x4a, 0x3f, 0xe4, 0xf3,
+  0xd5, 0xdc, 0xe7, 0x71, 0xe0, 0x3d, 0x5f, 0x52, 0xc7, 0x73, 0x76, 0x41,
+  0x23, 0xed, 0xe2, 0xb5, 0x53, 0x0c, 0x89, 0x8e, 0x2f, 0x50, 0x11, 0x10,
+  0x41, 0x4f, 0xe5, 0xa0, 0xb3, 0xc4, 0xcc, 0x97, 0x99, 0xad, 0xe3, 0xe6,
+  0x54, 0x50, 0x32, 0x3c, 0xab, 0x6d, 0x19, 0x62, 0x3d, 0x41, 0x05, 0x19,
+  0x89, 0x3f, 0x0b, 0x00, 0x95, 0xe4, 0x22, 0xc7, 0x4b, 0xa9, 0x89, 0xfb,
+  0x7c, 0x5a, 0xdf, 0x74, 0xb2, 0xa4, 0xca, 0x24, 0x62, 0xd8, 0x89, 0xe4,
+  0xb9, 0x33, 0x26, 0x10, 0x33, 0x05, 0x88, 0xd0, 0x8e, 0x18, 0x70, 0x2e,
+  0xa3, 0x93, 0x34, 0x88, 0xd5, 0x15, 0xb3, 0x6a, 0x75, 0xc4, 0x33, 0x14,
+  0x3c, 0x3d, 0x74, 0xfb, 0x56, 0x4a, 0xa9, 0xdf, 0x4a, 0xb2, 0xc2, 0x77,
+  0xaa, 0xd6, 0x0a, 0xfd, 0x08, 0x6e, 0x1e, 0x41, 0xf4, 0xd2, 0xe9, 0xbb,
+  0xcd, 0x67, 0x71, 0x75, 0xed, 0x07, 0x04, 0x7d, 0x36, 0xe7, 0x78, 0xfd,
+  0xcd, 0xa6, 0x06, 0x6b, 0x99, 0x1c, 0x27, 0x53, 0xfc, 0x52, 0x5f, 0x59,
+  0xb2, 0x36, 0xaf, 0xe5, 0x13, 0xdf, 0x6c, 0x3a, 0xa2, 0xac, 0x48, 0x72,
+  0x7b, 0xd0, 0x93, 0x79, 0xba, 0xaa, 0x83, 0x64, 0x7f, 0x77, 0xf7, 0x3b,
+  0x92, 0x17, 0x73, 0x4c, 0xf3, 0xde, 0x37, 0xdd, 0x3c, 0xb2, 0x32, 0x45,
+  0xb2, 0xd0, 0x16, 0x2b, 0x4b, 0xef, 0xe0, 0x92, 0xd2, 0x89, 0xc3, 0x90,
+  0x18, 0x68, 0xb0, 0x2a, 0xed, 0xdc, 0xcb, 0xe4, 0xaf, 0x59, 0x2a, 0x78,
+  0x2b, 0xda, 0xf9, 0xb6, 0x73, 0x60, 0x55, 0x79, 0xf5, 0x6e, 0xe8, 0x6f,
+  0x99, 0x4f, 0x57, 0x92, 0x8f, 0x74, 0x64, 0xb3, 0xd2, 0x25, 0xca, 0x4c,
+  0x46, 0xab, 0xb2, 0xaa, 0xb5, 0xf6, 0x15, 0x88, 0x40, 0xe0, 0x42, 0x31,
+  0xe7, 0xef, 0xa2, 0x90, 0xd4, 0x72, 0x40, 0xbf, 0x3c, 0xdd, 0x41, 0x89,
+  0xea, 0x76, 0xf1, 0x01, 0x04, 0xd4, 0x15, 0x17, 0x96, 0xe1, 0xee, 0x06,
+  0x7f, 0xe1, 0xeb, 0x1d, 0x5d, 0x90, 0x93, 0xe2, 0x62, 0x23, 0x02, 0xfa,
+  0xf7, 0xca, 0x47, 0x7b, 0xb0, 0xac, 0x8a, 0x68, 0x51, 0x03, 0xd6, 0x57,
+  0xe1, 0xf1, 0xc0, 0x18, 0x99, 0xb6, 0x71, 0xa9, 0x45, 0x9c, 0xb8, 0x23,
+  0xd2, 0x2e, 0xbc, 0x33, 0x33, 0x7e, 0x60, 0xc6, 0xca, 0x77, 0x11, 0x61,
+  0x68, 0x67, 0x4b, 0xb8, 0x7d, 0x9c, 0x64, 0x0d, 0xba, 0xc4, 0xa9, 0x5e,
+  0x13, 0x30, 0xc7, 0x32, 0x9a, 0xf8, 0x77, 0xb4, 0x54, 0xc1, 0x71, 0x24,
+  0x29, 0xd5, 0x2f, 0x68, 0xfb, 0x7e, 0xf9, 0xd3, 0x80, 0xfe, 0xfc, 0xa5,
+  0xa3, 0xe2, 0x63, 0x1a, 0x44, 0x5a, 0x0d, 0xb9, 0x5e, 0x7a, 0x42, 0x77,
+  0xb4, 0x23, 0xa9, 0x5d, 0xf2, 0xdb, 0x2a, 0xa0, 0xc2, 0xef, 0x22, 0x54,
+  0x71, 0xce, 0xb6, 0xad, 0x8a, 0x6b, 0x6f, 0xf8, 0xa8, 0x98, 0x34, 0xe2,
+  0x5a, 0x41, 0x34, 0x79, 0x21, 0x02, 0x46, 0x0a, 0xb0, 0xb5, 0xa3, 0x29,
+  0x8c, 0xa4, 0x99, 0x64, 0x1e, 0x6f, 0xe0, 0xcb, 0xe6, 0x8e, 0x19, 0x40,
+  0x51, 0x3d, 0x30, 0x45, 0x84, 0xf8, 0x18, 0xab, 0xc2, 0x91, 0x64, 0x61,
+  0x02, 0xd1, 0xfd, 0x18, 0xa2, 0xc1, 0x2c, 0x06, 0x02, 0x6b, 0xab, 0x0b,
+  0xd2, 0xd6, 0xd3, 0xb2, 0x24, 0xbd, 0x43, 0x97, 0x5a, 0x13, 0x17, 0xa8,
+  0xf3, 0x24, 0x3d, 0x70, 0x57, 0x79, 0xb7, 0x21, 0xb5, 0xbd, 0x5a, 0x76,
+  0x60, 0x2a, 0x38, 0x83, 0x29, 0xa2, 0x8d, 0x69, 0xa4, 0x07, 0x9a, 0x2e,
+  0x6d, 0xba, 0xd3, 0x63, 0xea, 0x7c, 0x72, 0x0a, 0x67, 0x3a, 0xeb, 0xff,
+  0xc1, 0x9b, 0x9a, 0x58, 0x29, 0x44, 0xd0, 0x50, 0x94, 0xcc, 0x35, 0xd9,
+  0x9d, 0x91, 0x96, 0xfc, 0xc9, 0x13, 0x21, 0x09, 0x81, 0x3e, 0x74, 0xc4,
+  0xc0, 0x2e, 0xa8, 0x38, 0xe6, 0xca, 0x69, 0x5b, 0x5e, 0xbf, 0x2c, 0x86,
+  0x5d, 0xf2, 0x9f, 0x9f, 0x29, 0x4a, 0x57, 0xd6, 0x2e, 0xe7, 0x0c, 0xc7,
+  0xe9, 0x6a, 0x02, 0xeb, 0x8c, 0xd1, 0x23, 0x5c, 0xa5, 0x6e, 0x2c, 0xbc,
+  0x2c, 0x96, 0x24, 0xc8, 0x4d, 0x3b, 0xe5, 0x2e, 0x46, 0xd2, 0x8b, 0xfa,
+  0x8a, 0xa7, 0x1c, 0x91, 0x1e, 0x6e, 0x0d, 0x10, 0x6b, 0x42, 0x81, 0xc0,
+  0x8d, 0x10, 0x2b, 0xd7, 0x8b, 0xab, 0x35, 0x44, 0xa4, 0x12, 0xa2, 0x60,
+  0xdd, 0xf6, 0x83, 0xab, 0x26, 0xc1, 0xe4, 0x15, 0xbc, 0x79, 0xa1, 0x76,
+  0x7d, 0xcd, 0xc8, 0xaf, 0x56, 0x83, 0x21, 0xbd, 0x26, 0x2a, 0x3b, 0xb2,
+  0xb6, 0xf9, 0xa8, 0x97, 0xf9, 0x8d, 0x5e, 0xa7, 0xea, 0x55, 0xce, 0xe1,
+  0x6a, 0xc6, 0x93, 0x32, 0xb1, 0x40, 0xa2, 0xbb, 0x0a, 0x9d, 0xf7, 0x37,
+  0xc5, 0x2c, 0xd4, 0x23, 0xe2, 0xf8, 0x29, 0xc9, 0x9c, 0x20, 0x71, 0x46,
+  0xaf, 0x57, 0xd6, 0x40, 0xb5, 0x88, 0x66, 0x6e, 0x14, 0xd9, 0x63, 0x54,
+  0x00, 0xf9, 0x6b, 0x31, 0x56, 0x63, 0x25, 0x61, 0x95, 0xbb, 0x8b, 0xac,
+  0x46, 0x82, 0x75, 0x37, 0x5c, 0xcb, 0x8b, 0xe4, 0xbb, 0x84, 0x9e, 0xb9,
+  0x3f, 0x8b, 0xac, 0x66, 0x79, 0x03, 0x70, 0x22, 0x4c, 0xcd, 0xe4, 0x1a,
+  0xc9, 0x39, 0x00, 0x9b, 0x71, 0x32, 0xe4, 0x22, 0x4a, 0xa1, 0xf8, 0x7c,
+  0xf8, 0x64, 0x7f, 0xb8, 0xdb, 0xb4, 0xda, 0xd2, 0x09, 0x9b, 0x0e, 0x5c,
+  0x64, 0x5d, 0x00, 0xd7, 0xc8, 0x23, 0xf0, 0x95, 0x0c, 0x0d, 0x9c, 0xc2,
+  0xd3, 0x33, 0x88, 0x83, 0x29, 0xaa, 0x3f, 0x67, 0xcc, 0x1d, 0x54, 0x21,
+  0xf6, 0x44, 0xed, 0xad, 0xca, 0x74, 0xf2, 0x60, 0xbc, 0x84, 0x1e, 0x70,
+  0xc6, 0x4d, 0xf0, 0x2b, 0xd4, 0x31, 0x3c, 0x1d, 0xd1, 0xed, 0x2e, 0x5c,
+  0x27, 0x58, 0x6a, 0xe7, 0x48, 0x07, 0x6d, 0x03, 0xe1, 0x8d, 0x19, 0x79,
+  0x60, 0xad, 0xad, 0x31, 0x22, 0xfe, 0x81, 0x22, 0x77, 0xce, 0x9c, 0xb3,
+  0xa8, 0x07, 0xfa, 0x42, 0xf1, 0xa0, 0xb1, 0x47, 0xf5, 0x0d, 0xfb, 0x73,
+  0x46, 0x0e, 0x11, 0xa0, 0xb4, 0x40, 0xfa, 0xf8, 0x30, 0x28, 0xca, 0xed,
+  0x93, 0xde, 0x02, 0x08, 0x40, 0x17, 0x9a, 0xb7, 0x7d, 0x52, 0x1c, 0x6b,
+  0xc3, 0x96, 0x38, 0x04, 0xeb, 0x87, 0x6d, 0x05, 0xea, 0x0a, 0x83, 0x6b,
+  0x0d, 0xdd, 0x9e, 0x44, 0x5c, 0x2c, 0x20, 0x91, 0x99, 0x54, 0x69, 0xc6,
+  0x22, 0xd7, 0x33, 0x7d, 0x50, 0xe7, 0x80, 0x06, 0xab, 0xac, 0xe0, 0x5c,
+  0x7b, 0x54, 0x21, 0xa3, 0xc0, 0xb3, 0xd0, 0xa7, 0xaf, 0x73, 0x82, 0x7d,
+  0xfb, 0x1b, 0xe7, 0xc4, 0x8b, 0x2d, 0xd1, 0x07, 0xb8, 0x41, 0x97, 0x28,
+  0x96, 0xc4, 0xa9, 0x89, 0x95, 0xd1, 0x61, 0x3e, 0xde, 0xcd, 0xdd, 0x76,
+  0x37, 0x3f, 0xa0, 0x58, 0x06, 0x80, 0xc7, 0x2f, 0xa0, 0x7d, 0x7d, 0xf9,
+  0x28, 0xa2, 0xc4, 0xb4, 0x6b, 0x81, 0x2a, 0x6f, 0x99, 0x12, 0xba, 0xed,
+  0x69, 0x37, 0x25, 0xbd, 0x5d, 0x38, 0x19, 0xd8, 0xb8, 0x5b, 0x87, 0x28,
+  0xf1, 0x8e, 0x87, 0xbc, 0x09, 0x7f, 0xc7, 0xb6, 0xc4, 0x29, 0xeb, 0x37,
+  0x13, 0xb2, 0xd7, 0x15, 0x65, 0x04, 0x54, 0x15, 0xda, 0x4b, 0x98, 0x97,
+  0x00, 0xee, 0x64, 0xb8, 0x47, 0xb2, 0x0f, 0xc0, 0x77, 0x90, 0xd9, 0xf4,
+  0xd9, 0x93, 0x18, 0xbd, 0x72, 0x76, 0x79, 0x7c, 0xa0, 0x7a, 0xa4, 0xc7,
+  0x60, 0x9b, 0xd1, 0x2c, 0x68, 0x08, 0xce, 0x9b, 0xe2, 0x3c, 0x62, 0x26,
+  0x19, 0x0b, 0x46, 0xd7, 0xef, 0x60, 0x58, 0x41, 0xb2, 0x00, 0x27, 0x08,
+  0x89, 0xef, 0xac, 0x8e, 0x22, 0x47, 0x16, 0x2b, 0xb2, 0x92, 0x7b, 0x6e,
+  0x3e, 0xea, 0xae, 0x72, 0x49, 0x18, 0x36, 0x7c, 0x29, 0x20, 0xbc, 0x90,
+  0x1d, 0x1a, 0x4d, 0x96, 0xec, 0x10, 0x28, 0x5a, 0x46, 0x50, 0x5c, 0x90,
+  0x70, 0x2b, 0xa3, 0xb0, 0x17, 0xb8, 0x4d, 0xd9, 0x45, 0xc8, 0x93, 0x85,
+  0x4b, 0xc2, 0x43, 0x3f, 0xdb, 0x9b, 0xb7, 0x9c, 0x2c, 0xeb, 0x7f, 0xea,
+  0xe6, 0x75, 0xb7, 0xf1, 0xa7, 0xc5, 0x56, 0x0d, 0x1d, 0xd4, 0x41, 0xf6,
+  0xc5, 0xc2, 0x71, 0xc9, 0xe4, 0x7a, 0xd5, 0xaf, 0x3e, 0x0c, 0xea, 0x79,
+  0x81, 0xea, 0xd8, 0xa1, 0x34, 0xda, 0xf6, 0xf7, 0xa9, 0x8e, 0xee, 0xd6,
+  0x67, 0x65, 0xc7, 0x79, 0x1d, 0x04, 0xb2, 0xca, 0xd5, 0xc2, 0x35, 0x43,
+  0x8d, 0x94, 0x9b, 0x28, 0xf9, 0xd7, 0xf9, 0x1b, 0x55, 0xf8, 0xf6, 0xd7,
+  0x72, 0x29, 0x21, 0x98, 0x96, 0x35, 0x29, 0xc3, 0xe3, 0x1a, 0x13, 0xce,
+  0x37, 0xe3, 0x3a, 0x54, 0x31, 0x34, 0x36, 0x49, 0xc7, 0x64, 0x31, 0x4e,
+  0x57, 0xf3, 0xde, 0x30, 0xf9, 0xda, 0xe1, 0x6b, 0xe5, 0x6c, 0xa9, 0xcf,
+  0x2a, 0x36, 0x15, 0x91, 0x41, 0x48, 0x9f, 0x7d, 0xb6, 0xdb, 0x68, 0x6f,
+  0x88, 0x59, 0x08, 0xbb, 0xc9, 0xc0, 0xb2, 0x3d, 0x87, 0x23, 0x63, 0x4d,
+  0x1f, 0xc6, 0x7a, 0x1b, 0xeb, 0xcf, 0x52, 0xfe, 0xf7, 0xbc, 0x82, 0xb2,
+  0x3a, 0xe5, 0x3b, 0xfe, 0x23, 0x91, 0xfa, 0x3a, 0xa4, 0xbd, 0x11, 0xf7,
+  0x3e, 0x2a, 0x61, 0x4b, 0x89, 0x03, 0xc6, 0xfb, 0xa9, 0x29, 0xc9, 0x69,
+  0xe1, 0x49, 0xe4, 0x35, 0x7e, 0xa3, 0x5f, 0x31, 0x7c, 0xd3, 0x16, 0xce,
+  0x93, 0x4b, 0x70, 0x79, 0x22, 0x24, 0xe6, 0xc9, 0x16, 0x93, 0xc9, 0x3d,
+  0xfb, 0xe2, 0xd9, 0xd3, 0xed, 0x66, 0x40, 0x6f, 0xbb, 0xc3, 0x6b, 0x8c,
+  0x59, 0x0b, 0x2a, 0x51, 0xcf, 0x73, 0xf0, 0xed, 0xc3, 0x0b, 0xaf, 0xee,
+  0x67, 0xa1, 0x2d, 0x87, 0xde, 0x0d, 0xeb, 0x31, 0x97, 0xe8, 0x54, 0x8c,
+  0xa5, 0x44, 0x01, 0x04, 0x79, 0x7d, 0xcb, 0x92, 0x14, 0x9d, 0x78, 0x71,
+  0x49, 0x4c, 0x82, 0x96, 0x83, 0x20, 0x71, 0xe8, 0x4b, 0x46, 0x93, 0xd6,
+  0x5d, 0xee, 0x19, 0xe8, 0x15, 0x5a, 0x07, 0x03, 0x28, 0x1b, 0x46, 0x60,
+  0x16, 0x81, 0xd4, 0x12, 0x2a, 0x1b, 0xd9, 0x4b, 0x26, 0x17, 0x93, 0x2e,
+  0xf0, 0x23, 0x9d, 0x5d, 0x57, 0xab, 0xc7, 0x4f, 0xa4, 0x20, 0x78, 0xc0,
+  0x07, 0xc0, 0xeb, 0x6f, 0x2d, 0x68, 0x00, 0xd0, 0x97, 0x9e, 0x88, 0x2c,
+  0xeb, 0x79, 0x36, 0x37, 0x6a, 0x38, 0xb9, 0x02, 0x8a, 0xd2, 0x13, 0x78,
+  0x8b, 0xed, 0x26, 0xd2, 0x1c, 0x68, 0x82, 0x75, 0x04, 0xda, 0xbe, 0x32,
+  0xa1, 0xa6, 0xbe, 0x35, 0x3a, 0xb6, 0x86, 0xae, 0xd7, 0x6d, 0xb6, 0x30,
+  0x27, 0x45, 0xfd, 0xa7, 0x00, 0x97, 0xd8, 0xdf, 0xdd, 0xa6, 0x8c, 0x49,
+  0xac, 0xe5, 0xa3, 0xad, 0x69, 0x58, 0xd3, 0x79, 0xe1, 0xb1, 0x46, 0x32,
+  0xd1, 0xba, 0x42, 0xa3, 0xc9, 0x16, 0xfa, 0xbb, 0xb3, 0xb3, 0xfd, 0xd1,
+  0x3e, 0xeb, 0x83, 0x1f, 0xeb, 0xe3, 0xb9, 0x14, 0x62, 0xe4, 0xc9, 0xb5,
+  0xfc, 0x53, 0xda, 0x77, 0xbe, 0x13, 0xfc, 0xd1, 0xbc, 0xb2, 0x6a, 0xcf,
+  0x02, 0x30, 0x70, 0xf8, 0xac, 0xfb, 0x28, 0x4d, 0xdc, 0xcd, 0xb3, 0x8c,
+  0xae, 0x39, 0x70, 0xbd, 0x2a, 0x24, 0xc3, 0x49, 0x65, 0x82, 0xe1, 0x36,
+  0x87, 0x4c, 0xfe, 0x12, 0xd5, 0x62, 0x08, 0x7a, 0x85, 0xe3, 0x10, 0x8c,
+  0x4f, 0xc0, 0x20, 0x3e, 0x1a, 0x22, 0xc7, 0xc2, 0x34, 0x4a, 0x89, 0x9a,
+  0xc4, 0xa2, 0xd8, 0x9e, 0x6e, 0x15, 0xe7, 0x18, 0x46, 0x19, 0xfe, 0xf2,
+  0x20, 0x1f, 0x1e, 0x97, 0x5e, 0x9d, 0x77, 0x55, 0x27, 0xf7, 0x4e, 0x6f,
+  0x6d, 0x93, 0x34, 0xfa, 0x5b, 0x3f, 0x6e, 0xe1, 0xe8, 0xb0, 0x62, 0x1f,
+  0x3e, 0xcf, 0xac, 0x0b, 0x23, 0xad, 0x7d, 0x73, 0xbb, 0x1b, 0x73, 0x66,
+  0xb5, 0x27, 0xf0, 0xd3, 0xc6, 0x74, 0xf6, 0xe5, 0x90, 0x02, 0xf4, 0xd6,
+  0xa5, 0x31, 0x81, 0x09, 0xf5, 0xd1, 0x6b, 0xf1, 0x73, 0x36, 0x81, 0xf2,
+  0xab, 0x8e, 0xda, 0xa9, 0xb3, 0x7c, 0xec, 0x26, 0x5a, 0x43, 0xd8, 0xc3,
+  0xe0, 0x06, 0x5d, 0xb0, 0x45, 0x49, 0x66, 0x57, 0x39, 0x89, 0x8c, 0xc8,
+  0x5b, 0x9f, 0x88, 0x5f, 0x49, 0x3d, 0x55, 0x9e, 0xa4, 0x21, 0x1e, 0xa6,
+  0xcf, 0xbf, 0xd7, 0xbf, 0x14, 0x0e, 0x95, 0xb8, 0x1d, 0x1e, 0x8a, 0x0e,
+  0xf4, 0xd9, 0x66, 0xe5, 0xe0, 0x72, 0x1a, 0x59, 0x65, 0x21, 0x09, 0x46,
+  0x21, 0xe5, 0x08, 0x58, 0x4c, 0x13, 0x1f, 0xe6, 0x71, 0x04, 0x96, 0x0f,
+  0xcb, 0x08, 0x87, 0xa2, 0xe9, 0x51, 0xd8, 0x23, 0xdc, 0x08, 0xd2, 0xf7,
+  0x04, 0x87, 0xe9, 0x23, 0x6e, 0xae, 0x12, 0x70, 0x98, 0xfd, 0x2a, 0x25,
+  0x18, 0x3a, 0x7a, 0xd7, 0xb2, 0x4e, 0x24, 0xcc, 0x84, 0x31, 0x6e, 0xd1,
+  0xad, 0xc0, 0xd2, 0xbc, 0x5e, 0x6e, 0xed, 0x6d, 0x0b, 0xcf, 0x99, 0x72,
+  0x51, 0xaf, 0x49, 0x7e, 0x90, 0xab, 0xc6, 0x15, 0x0a, 0x3e, 0xf2, 0x21,
+  0x0f, 0x16, 0x7c, 0x20, 0xa1, 0x04, 0xa2, 0xeb, 0x4a, 0xce, 0x83, 0xec,
+  0x0e, 0x8d, 0x28, 0xb3, 0xbf, 0xba, 0x63, 0x73, 0x4a, 0xd2, 0xfd, 0x92,
+  0x61, 0x87, 0x95, 0x14, 0x05, 0xd9, 0xf2, 0x8c, 0xa7, 0x72, 0x3d, 0x58,
+  0xa9, 0x2c, 0x9a, 0xbd, 0xd9, 0x74, 0x00, 0x86, 0x92, 0xeb, 0xb2, 0x88,
+  0xb9, 0x8f, 0x18, 0x33, 0xae, 0x37, 0x88, 0xe8, 0xd0, 0x9d, 0xd5, 0xc9,
+  0x7a, 0x8c, 0x90, 0xed, 0x85, 0x55, 0xff, 0x0c, 0x87, 0xdb, 0xf6, 0x21,
+  0x36, 0x96, 0x34, 0xda, 0xa6, 0x87, 0xc9, 0xdf, 0x56, 0x39, 0x6d, 0x6b,
+  0x5e, 0x5b, 0x00, 0x1d, 0x00, 0xb7, 0xcc, 0x5c, 0xf4, 0x8a, 0xa4, 0x07,
+  0x07, 0xe8, 0xc4, 0x74, 0x64, 0xdf, 0x15, 0x30, 0xfc, 0xb6, 0xcb, 0x3a,
+  0xca, 0xb0, 0xb1, 0x9f, 0xc0, 0x29, 0x04, 0xa0, 0x3d, 0x2b, 0x34, 0x88,
+  0x00, 0x08, 0x80, 0x04, 0x25, 0xa7, 0x05, 0x63, 0xe6, 0x58, 0xb4, 0xcb,
+  0x2e, 0x58, 0x47, 0xc6, 0xbd, 0x39, 0x7f, 0xe0, 0x8b, 0x6c, 0xb3, 0xb1,
+  0xf5, 0x92, 0xcd, 0x8a, 0x8d, 0xff, 0x7a, 0xd3, 0xe6, 0x17, 0x61, 0xfd,
+  0x47, 0x88, 0xfd, 0xd7, 0x7d, 0x5a, 0xb6, 0xb6, 0x7c, 0xc2, 0xb7, 0x2e,
+  0x8d, 0xfb, 0x23, 0xf8, 0xb6, 0x2f, 0x10, 0xb4, 0xf1, 0x8a, 0x23, 0xa5,
+  0x9d, 0x05, 0xe2, 0x35, 0x22, 0x24, 0x4f, 0x68, 0xd9, 0x10, 0xc0, 0xc3,
+  0x04, 0xfa, 0x59, 0x71, 0x1a, 0xc3, 0x3c, 0x2c, 0xbe, 0x83, 0x7a, 0x5f,
+  0x55, 0xac, 0xd4, 0xad, 0xa4, 0x06, 0x68, 0xbf, 0xc9, 0x5b, 0xd0, 0x42,
+  0x31, 0xc8, 0x67, 0x38, 0x78, 0x1a, 0x36, 0xdf, 0x15, 0xab, 0xc2, 0xeb,
+  0x88, 0xb0, 0xc0, 0x3d, 0x2f, 0x66, 0x92, 0x55, 0xb3, 0x15, 0x7a, 0x00,
+  0x69, 0xc2, 0x11, 0x99, 0xd2, 0x7c, 0x4c, 0x6e, 0x56, 0x8b, 0x5b, 0xea,
+  0x42, 0x8c, 0x40, 0x30, 0x87, 0x66, 0xce, 0x67, 0x9b, 0x36, 0x88, 0xd2,
+  0x5d, 0x58, 0x32, 0xa2, 0xb4, 0xc0, 0xcc, 0x04, 0x77, 0x50, 0x4b, 0x22,
+  0x6a, 0xe8, 0xae, 0xde, 0xe9, 0x75, 0x27, 0xbd, 0x72, 0x13, 0xf8, 0x58,
+  0x46, 0x44, 0xc0, 0x9b, 0xbb, 0xc8, 0xae, 0x01, 0x29, 0x50, 0x7d, 0x54,
+  0xf2, 0x32, 0x2c, 0x89, 0x18, 0x86, 0x82, 0x95, 0x94, 0x88, 0x8e, 0xec,
+  0xaa, 0x92, 0x5a, 0x16, 0xba, 0xac, 0x09, 0xca, 0xb3, 0x7a, 0x7a, 0x98,
+  0x8e, 0x9e, 0xa8, 0x1c, 0x1e, 0x74, 0x64, 0x0b, 0x5c, 0xb6, 0x89, 0x53,
+  0xfd, 0x66, 0xb4, 0xd7, 0xfa, 0x0d, 0x5a, 0x30, 0xa1, 0x9a, 0x11, 0x2c,
+  0x5f, 0x47, 0xbe, 0x12, 0x93, 0x0b, 0x6f, 0x91, 0x8d, 0x51, 0xcc, 0x56,
+  0x42, 0xe7, 0xcf, 0x1e, 0x14, 0xc6, 0x75, 0x6e, 0xdb, 0x69, 0x92, 0xf3,
+  0x17, 0xd4, 0x0f, 0x17, 0x21, 0xd6, 0x49, 0xd6, 0x24, 0x41, 0xb9, 0xa0,
+  0xba, 0x86, 0x50, 0xf2, 0x98, 0xb5, 0xc7, 0x46, 0x40, 0xd0, 0xdc, 0x12,
+  0xd0, 0xf6, 0xbb, 0xc2, 0xc4, 0x6c, 0xe4, 0x6e, 0x30, 0x63, 0x22, 0x9c,
+  0x0f, 0xc3, 0x84, 0x42, 0x35, 0xf0, 0x54, 0xf9, 0x21, 0xf9, 0x0f, 0x0c,
+  0x0e, 0xfe, 0xd8, 0xa3, 0x31, 0xcb, 0xe6, 0xb5, 0xb9, 0x17, 0x12, 0xa7,
+  0x77, 0xce, 0xb5, 0x2f, 0x8e, 0x88, 0xe8, 0xb0, 0xaa, 0xfd, 0xda, 0x35,
+  0xd5, 0xd6, 0x1f, 0xd0, 0xab, 0xf9, 0x8a, 0x9d, 0x8a, 0x11, 0x2c, 0x8a,
+  0x56, 0x65, 0xb6, 0x12, 0xd6, 0x45, 0x0e, 0x50, 0x79, 0x15, 0x3d, 0x1d,
+  0xf3, 0xe2, 0x8c, 0x1f, 0xdc, 0x38, 0x2d, 0x8f, 0x84, 0xef, 0x05, 0xe7,
+  0x61, 0x8c, 0xb7, 0xc7, 0x9a, 0x62, 0xf3, 0xdf, 0xab, 0x6c, 0x8d, 0xb6,
+  0x85, 0x38, 0x3d, 0xbd, 0x51, 0x25, 0xb1, 0x3c, 0x9e, 0x32, 0x13, 0xb2,
+  0xab, 0x0e, 0x07, 0x9b, 0xeb, 0x8c, 0xa9, 0xeb, 0x1c, 0x72, 0x4e, 0xad,
+  0xc8, 0xa2, 0xb8, 0x2d, 0xe5, 0x75, 0x83, 0xa8, 0x16, 0x4d, 0x44, 0xf4,
+  0xc2, 0x40, 0x6f, 0x6b, 0x88, 0xed, 0x8e, 0xb5, 0x14, 0x52, 0xd2, 0x40,
+  0xc8, 0x45, 0x97, 0x30, 0x5f, 0x50, 0x8d, 0x27, 0x22, 0xa3, 0x02, 0xd4,
+  0x4a, 0x8c, 0x36, 0xa0, 0x45, 0x22, 0x1d, 0x50, 0x48, 0xcb, 0xde, 0xe4,
+  0x93, 0xb2, 0xa8, 0x8a, 0x2b, 0xf1, 0x31, 0x79, 0x22, 0x56, 0x85, 0x45,
+  0x31, 0x4b, 0x52, 0xca, 0x39, 0x0d, 0xb1, 0x5e, 0xa1, 0x36, 0x33, 0xaf,
+  0x95, 0xb0, 0x4d, 0x94, 0xf9, 0x5c, 0x25, 0x12, 0x07, 0x17, 0x6b, 0x61,
+  0xb8, 0x49, 0x13, 0xb3, 0x11, 0xa1, 0x0f, 0x18, 0x88, 0xf2, 0xd9, 0xe3,
+  0xb8, 0x1b, 0x5e, 0x0a, 0x8e, 0x50, 0x8c, 0x33, 0x17, 0x0e, 0x9c, 0x6a,
+  0x89, 0x49, 0x2d, 0xcf, 0x24, 0xce, 0x4b, 0x7b, 0xad, 0xbb, 0x77, 0x06,
+  0x77, 0x00, 0xb3, 0x3a, 0xe2, 0x90, 0x61, 0x1d, 0x61, 0x86, 0x06, 0x9e,
+  0x1c, 0x5f, 0xbe, 0x4e, 0xa6, 0x25, 0x19, 0x7a, 0xf2, 0xe7, 0x80, 0x54,
+  0xd9, 0xbf, 0xa7, 0x11, 0x99, 0x51, 0xb5, 0xe4, 0x45, 0x1a, 0xb0, 0x49,
+  0x34, 0xd8, 0x7d, 0x3a, 0xac, 0x3f, 0x74, 0x62, 0x07, 0x43, 0x9c, 0x9d,
+  0xd6, 0x88, 0xf3, 0xcb, 0xa5, 0x4c, 0x2f, 0x25, 0x50, 0xb4, 0x1f, 0x1e,
+  0xda, 0x23, 0xee, 0x77, 0x91, 0x19, 0x8b, 0x58, 0xc4, 0xf3, 0x7e, 0x97,
+  0x7c, 0x2a, 0x10, 0xb3, 0x13, 0x87, 0x29, 0xd0, 0xcb, 0x26, 0xb8, 0x32,
+  0xae, 0x7b, 0xf7, 0x38, 0xd4, 0xd2, 0xa0, 0x95, 0x98, 0x40, 0x58, 0x28,
+  0x32, 0x2e, 0xfd, 0x55, 0x47, 0xad, 0x44, 0x20, 0xd8, 0x1a, 0x7b, 0x73,
+  0x0d, 0xec, 0x67, 0x15, 0x97, 0x30, 0xe0, 0x49, 0xf5, 0x35, 0xc6, 0x4d,
+  0x52, 0xa7, 0xa4, 0xe9, 0xdf, 0x52, 0x9f, 0x56, 0xc6, 0x8c, 0xb3, 0xb6,
+  0x9e, 0x27, 0xf8, 0x43, 0x8d, 0xd7, 0xb4, 0xb5, 0xcb, 0xe0, 0x36, 0x75,
+  0xb5, 0x3e, 0xd9, 0x09, 0xa6, 0xa0, 0x81, 0x76, 0xd0, 0x72, 0x73, 0x40,
+  0x02, 0xfb, 0x60, 0x53, 0xf6, 0x79, 0xb6, 0xe0, 0x1a, 0x71, 0xb2, 0xbb,
+  0x21, 0x4f, 0x9d, 0xca, 0xd4, 0xd4, 0x8d, 0x5c, 0x3a, 0xfc, 0x60, 0xd5,
+  0xdd, 0x3b, 0x92, 0x85, 0xac, 0xc7, 0x4a, 0x8c, 0x45, 0xcb, 0xe9, 0xfe,
+  0x53, 0xb8, 0xdd, 0x42, 0xe1, 0x13, 0x00, 0xfa, 0x1f, 0x53, 0xa8, 0x54,
+  0x9c, 0x7b, 0xf0, 0xbf, 0x46, 0x1b, 0x2a, 0xc3, 0xf1, 0x5d, 0x1e, 0x9d,
+  0x07, 0xc1, 0xd5, 0x7e, 0xec, 0x5f, 0xf2, 0xd9, 0xef, 0x9a, 0x90, 0xb4,
+  0x70, 0xad, 0xcf, 0xff, 0x89, 0x4a, 0x86, 0x1f, 0x41, 0xa0, 0x67, 0xb8,
+  0x1f, 0xb6, 0xa6, 0x46, 0xf9, 0x1e, 0xf2, 0x69, 0x37, 0x6d, 0x81, 0xce,
+  0x90, 0xd1, 0x78, 0xeb, 0x1c, 0x31, 0xc3, 0x80, 0x91, 0x6a, 0x9c, 0xbc,
+  0xa2, 0xde, 0xb0, 0xca, 0xcb, 0xb6, 0xbe, 0xf7, 0x4f, 0xc6, 0xaa, 0xba,
+  0xf7, 0x55, 0xe3, 0x8a, 0x44, 0xc5, 0x49, 0x0f, 0xe3, 0xe2, 0x36, 0xb2,
+  0x90, 0x6a, 0x4e, 0xcb, 0xb3, 0x29, 0x9f, 0x4b, 0x37, 0xe1, 0x1e, 0x7b,
+  0xe1, 0x4b, 0x38, 0xa4, 0xc9, 0xf4, 0x58, 0x71, 0x94, 0x7e, 0xfc, 0x60,
+  0x54, 0x07, 0x4a, 0x12, 0x59, 0x66, 0xdc, 0xe7, 0x66, 0x87, 0xab, 0x0e,
+  0x51, 0x84, 0xd4, 0x99, 0x6c, 0xae, 0x39, 0xb0, 0xe3, 0xb2, 0xb8, 0xa5,
+  0xd3, 0xca, 0xaf, 0xc1, 0x42, 0xe1, 0xd9, 0x97, 0xdb, 0xc0, 0xac, 0x78,
+  0xba, 0xbb, 0x85, 0x64, 0xab, 0x83, 0x54, 0xcf, 0xd8, 0xb2, 0x2d, 0x72,
+  0xec, 0xd5, 0x4e, 0x61, 0x34, 0x45, 0xae, 0xa3, 0x89, 0x4b, 0xf8, 0xc2,
+  0xb9, 0x74, 0xa3, 0x47, 0x51, 0xc5, 0x71, 0x43, 0x65, 0xa2, 0xfd, 0xe7,
+  0xed, 0x21, 0xb7, 0x2d, 0xc2, 0x3d, 0xd4, 0xb1, 0xe4, 0x8d, 0xcd, 0x24,
+  0x62, 0xff, 0x05, 0xed, 0x2a, 0x11, 0xe8, 0xec, 0x04, 0x6d, 0x7b, 0xe1,
+  0x41, 0xe8, 0x3c, 0x08, 0x92, 0xf3, 0x15, 0xaf, 0x7c, 0xa5, 0xd1, 0x7e,
+  0x09, 0x8e, 0x4f, 0x3d, 0x0b, 0x7d, 0x2a, 0xb7, 0x09, 0x3c, 0x1a, 0xb1,
+  0x42, 0xc7, 0xea, 0xaf, 0x53, 0x8f, 0xc4, 0x84, 0x85, 0x9c, 0xe0, 0xe5,
+  0x01, 0xa1, 0x09, 0xd2, 0xe9, 0x34, 0xba, 0xf1, 0x6f, 0x61, 0x2a, 0xb8,
+  0x7c, 0x29, 0x32, 0xde, 0x84, 0x99, 0xd5, 0xa1, 0x0f, 0x04, 0xe7, 0xe7,
+  0x52, 0x9d, 0x98, 0xcf, 0x2f, 0x94, 0x19, 0xe8, 0xda, 0x30, 0x39, 0x66,
+  0x28, 0x41, 0x87, 0x45, 0x69, 0x89, 0x31, 0x18, 0x63, 0xae, 0x44, 0x59,
+  0x92, 0x61, 0xae, 0xf6, 0x39, 0xd3, 0x10, 0xcd, 0x2d, 0xbf, 0x9f, 0x41,
+  0x05, 0xae, 0x5e, 0x59, 0xa7, 0x75, 0x5d, 0xd5, 0x42, 0xdd, 0x93, 0x18,
+  0x0d, 0xb3, 0xfd, 0xc8, 0x91, 0xb2, 0xbe, 0xf6, 0x60, 0xd0, 0xbe, 0x78,
+  0xeb, 0xc4, 0xf0, 0xed, 0x50, 0xd5, 0xd1, 0x9b, 0xc4, 0x3f, 0xd4, 0x0f,
+  0xfe, 0x7e, 0xf0, 0xc5, 0xae, 0x55, 0x23, 0x66, 0xf7, 0x68, 0xf8, 0x0c,
+  0xe8, 0xb2, 0x3b, 0x0c, 0x36, 0x50, 0xfb, 0x14, 0xb5, 0x7b, 0xb4, 0x4d,
+  0xa5, 0xfc, 0x7c, 0xf8, 0x74, 0xbb, 0xb1, 0x5f, 0xea, 0xd9, 0x3c, 0xd6,
+  0x00, 0xdf, 0x5e, 0x9e, 0xbe, 0x49, 0x22, 0xcd, 0x4f, 0x7c, 0x13, 0xf8,
+  0x5d, 0xf3, 0x57, 0xff, 0x15, 0x0d, 0x90, 0x7e, 0x71, 0x72, 0x32, 0x82,
+  0xfe, 0xa7, 0xe8, 0xf9, 0x08, 0xb0, 0x55, 0x2b, 0x9f, 0x06, 0xdf, 0xa0,
+  0x65, 0x9e, 0xd5, 0xac, 0x6b, 0x98, 0xff, 0x94, 0x93, 0xce, 0xf8, 0xa5,
+  0x6c, 0x90, 0x2d, 0xc8, 0xb4, 0xcf, 0x60, 0x25, 0x33, 0x47, 0xee, 0x0c,
+  0x52, 0x69, 0x99, 0x15, 0x1d, 0x3e, 0x74, 0xe9, 0x80, 0x89, 0x14, 0x99,
+  0x1b, 0xdc, 0x15, 0xe3, 0xb4, 0x72, 0xac, 0x16, 0xa4, 0x94, 0xd2, 0x8e,
+  0x63, 0x95, 0x42, 0x1d, 0x5f, 0xb7, 0x39, 0x32, 0x1b, 0xa3, 0x8c, 0x3f,
+  0x2d, 0x9c, 0xe4, 0xc4, 0xa1, 0xf9, 0x7e, 0x16, 0xd3, 0xa2, 0x44, 0x40,
+  0x2a, 0x60, 0x07, 0x64, 0x0a, 0xdd, 0x15, 0x20, 0x75, 0xdc, 0xbd, 0x87,
+  0x0e, 0xdb, 0xe8, 0xa6, 0x10, 0x44, 0x1b, 0xa6, 0x99, 0xa5, 0x92, 0x64,
+  0x66, 0x00, 0xfa, 0xa2, 0xec, 0x71, 0xca, 0xd8, 0x6f, 0xa2, 0x24, 0x5c,
+  0xa8, 0x2e, 0xe4, 0xb5, 0x2b, 0x6e, 0x2b, 0x89, 0x36, 0x9e, 0x7b, 0xf1,
+  0x55, 0x7e, 0xbd, 0x86, 0xe5, 0x55, 0x00, 0x72, 0x6d, 0x1d, 0x93, 0x7b,
+  0xe4, 0xd4, 0x4b, 0x11, 0x33, 0x6d, 0x16, 0xf1, 0x8e, 0x0c, 0xe8, 0x86,
+  0x72, 0x49, 0xbb, 0xed, 0xd1, 0x1c, 0x8c, 0xc7, 0xb5, 0x4a, 0x5c, 0x20,
+  0xa6, 0x52, 0x0a, 0x4f, 0x3d, 0x69, 0x8b, 0x91, 0x1f, 0x3a, 0xd0, 0x1d,
+  0xd7, 0xa7, 0xe5, 0xf0, 0x68, 0x86, 0xff, 0x8c, 0x92, 0x28, 0xfe, 0xb0,
+  0x15, 0xac, 0x44, 0xaa, 0xfb, 0xa5, 0x13, 0x06, 0xfd, 0x83, 0x10, 0x5a,
+  0xa8, 0x83, 0xa6, 0xd0, 0x87, 0x42, 0xc6, 0xd4, 0xaa, 0x9e, 0x16, 0x2b,
+  0x41, 0xf8, 0x03, 0x33, 0x54, 0xda, 0xed, 0xfd, 0x1f, 0xff, 0x19, 0xa7,
+  0x2c, 0xfc, 0xf4, 0x8b, 0x38, 0xf1, 0x24, 0x69, 0xd8, 0x47, 0x7f, 0x6d,
+  0xeb, 0x54, 0x9e, 0xb4, 0x9a, 0x17, 0x89, 0x59, 0x3a, 0x24, 0x00, 0x2a,
+  0x47, 0xa8, 0xad, 0x9c, 0x6a, 0xb8, 0x56, 0xaf, 0x5e, 0xed, 0x9b, 0xc9,
+  0x7d, 0xb0, 0xe8, 0xa7, 0x81, 0xb7, 0x52, 0xfc, 0x58, 0x63, 0x38, 0xf1,
+  0x25, 0x0b, 0x7c, 0x1d, 0xaf, 0xa6, 0xa5, 0xd8, 0x37, 0xe9, 0xd2, 0x91,
+  0xdc, 0x2c, 0x11, 0x36, 0xf4, 0x9f, 0x6f, 0x96, 0x53, 0x29, 0x40, 0x14,
+  0xf3, 0x9d, 0xc9, 0xda, 0x6a, 0x24, 0xe9, 0x3f, 0x68, 0x2d, 0xfa, 0xf5,
+  0x7d, 0xf1, 0x9f, 0x43, 0x86, 0x8a, 0x41, 0xf0, 0x0e, 0x0a, 0xa9, 0x0e,
+  0xf9, 0xfe, 0x0f, 0x7b, 0x6c, 0x54, 0xf5, 0xe2, 0xaa, 0x8f, 0x98, 0x01,
+  0x5b, 0x62, 0xc7, 0x3c, 0xb0, 0x86, 0x5e, 0xad, 0xf9, 0x39, 0xfe, 0x4a,
+  0x9f, 0xaf, 0x80, 0xff, 0x1c, 0xf2, 0x9f, 0x3f, 0xed, 0x0d, 0x9e, 0xfd,
+  0xe2, 0xbe, 0xfa, 0x87, 0xbd, 0xf7, 0x7f, 0xd8, 0xef, 0x75, 0x96, 0x3d,
+  0x65, 0xbb, 0x73, 0x65, 0x14, 0xeb, 0xa6, 0xaa, 0x6b, 0xbd, 0x74, 0x09,
+  0xd0, 0xab, 0x5d, 0xef, 0xe3, 0xe4, 0xe0, 0x14, 0x8f, 0xf1, 0xee, 0xec,
+  0xef, 0xfb, 0x08, 0xb5, 0x67, 0x58, 0x7e, 0x2e, 0xb0, 0x5a, 0xb4, 0x1a,
+  0x9b, 0xb8, 0x6b, 0x10, 0x55, 0x32, 0xc7, 0x71, 0xe4, 0xa3, 0x06, 0x0d,
+  0xd9, 0xf4, 0x81, 0xee, 0x39, 0xa1, 0x42, 0x1b, 0x3a, 0x54, 0x8b, 0x69,
+  0x8f, 0x56, 0xff, 0x5c, 0x58, 0x51, 0xb6, 0xdc, 0x8d, 0xcf, 0xf4, 0x19,
+  0xdb, 0x5d, 0x3e, 0x20, 0xef, 0x7c, 0xf3, 0x7b, 0x5e, 0x6b, 0x85, 0xe1,
+  0xf0, 0xca, 0x66, 0xf7, 0x07, 0xa8, 0x4d, 0x47, 0xf6, 0x91, 0xe3, 0x93,
+  0x86, 0x61, 0x40, 0xe1, 0xdb, 0xd7, 0xca, 0xa7, 0x99, 0x85, 0x2a, 0xf1,
+  0xab, 0xfb, 0x0c, 0xda, 0x6b, 0xfb, 0xde, 0xd9, 0x3a, 0x73, 0xb6, 0x8e,
+  0xb8, 0xc9, 0x02, 0xd2, 0xd6, 0xf0, 0xf5, 0x00, 0x78, 0x90, 0x25, 0x56,
+  0xcc, 0x73, 0xb2, 0xaa, 0xe3, 0xe4, 0xeb, 0xe1, 0x76, 0x17, 0xf2, 0x3a,
+  0x6c, 0x0b, 0x5a, 0x84, 0x87, 0xc8, 0x26, 0x95, 0x70, 0xc1, 0x8b, 0x3d,
+  0x28, 0x64, 0x68, 0x2c, 0x8b, 0x04, 0xcb, 0x17, 0xeb, 0x26, 0xae, 0xc8,
+  0x5b, 0xdf, 0x51, 0x30, 0x66, 0xb3, 0x2a, 0xde, 0x1b, 0x47, 0x1c, 0x54,
+  0x63, 0x42, 0xa1, 0x1a, 0x39, 0x7c, 0xfd, 0xb0, 0xe4, 0x97, 0xcb, 0x5d,
+  0x4a, 0xef, 0x7c, 0xb8, 0xcc, 0xce, 0xa8, 0x62, 0x8f, 0x63, 0xce, 0x0c,
+  0x8d, 0x35, 0x34, 0xdd, 0x13, 0x8e, 0x91, 0x31, 0x75, 0x75, 0x18, 0x82,
+  0xe4, 0x23, 0x9f, 0x83, 0x18, 0xa9, 0x44, 0x4c, 0xdb, 0xc1, 0xd0, 0x5e,
+  0x88, 0x27, 0xc9, 0x12, 0x6a, 0xf5, 0x20, 0x08, 0x59, 0x69, 0xce, 0x3d,
+  0x3f, 0x2b, 0x24, 0x2c, 0x5d, 0xc1, 0x5b, 0x27, 0x6d, 0x62, 0x4e, 0x3b,
+  0xae, 0x31, 0xff, 0x2f, 0x5d, 0x27, 0xf4, 0xb7, 0x1e, 0xd0, 0x8f, 0x9e,
+  0xd0, 0xc1, 0xb2, 0x6f, 0x57, 0x62, 0xcd, 0xa0, 0xe1, 0x59, 0x97, 0x93,
+  0xc2, 0xa8, 0xea, 0xe5, 0xa2, 0x35, 0x75, 0x69, 0x6b, 0xf0, 0xc1, 0xbd,
+  0xdb, 0x95, 0x19, 0x87, 0x00, 0x6b, 0x14, 0xe8, 0x5d, 0x0c, 0xac, 0x29,
+  0x28, 0x4d, 0x46, 0xc3, 0xab, 0x35, 0x1a, 0xf1, 0x0f, 0xe9, 0x88, 0x2b,
+  0x4d, 0x6f, 0xec, 0x56, 0xfc, 0x9d, 0x35, 0x04, 0xde, 0x3c, 0xde, 0x39,
+  0xad, 0xe5, 0xcc, 0x52, 0xaf, 0xf2, 0x5a, 0xab, 0xb2, 0x80, 0x4b, 0x14,
+  0x47, 0xcd, 0x81, 0x58, 0x85, 0x5c, 0x97, 0xbf, 0x12, 0x95, 0x8f, 0xa6,
+  0xaf, 0xa6, 0x4b, 0xfa, 0x50, 0x2a, 0x78, 0x5c, 0x90, 0xe0, 0xb9, 0xe5,
+  0x42, 0xbf, 0xcd, 0x95, 0x75, 0x74, 0xf6, 0xf6, 0xed, 0xf1, 0xd1, 0xa5,
+  0x4f, 0x40, 0xea, 0xc0, 0x8e, 0x39, 0x0d, 0xc2, 0xa1, 0xa7, 0x54, 0x53,
+  0x91, 0x1c, 0x2f, 0xc5, 0x2c, 0xab, 0x07, 0xc1, 0x7c, 0xeb, 0x7a, 0x04,
+  0x59, 0x33, 0xe8, 0xbe, 0xf4, 0x64, 0x0f, 0xa5, 0x0b, 0xc9, 0x39, 0xd3,
+  0xb9, 0xb2, 0xa9, 0xaa, 0x8b, 0x60, 0x69, 0x9b, 0x05, 0xc9, 0xd6, 0x42,
+  0xbf, 0x90, 0x9a, 0x7b, 0x21, 0xaa, 0x6b, 0xb3, 0xf4, 0xa1, 0x16, 0x9f,
+  0x29, 0xca, 0x1d, 0xc0, 0x57, 0xb8, 0x82, 0x75, 0x52, 0x16, 0x33, 0x4f,
+  0x02, 0xd9, 0xc1, 0x3c, 0xe7, 0x2a, 0xab, 0x4a, 0x91, 0x04, 0x6a, 0xdc,
+  0xb1, 0x59, 0xaa, 0xfe, 0x38, 0xf7, 0x49, 0x80, 0xb0, 0xe7, 0x7c, 0xb5,
+  0x1b, 0x0e, 0x52, 0x45, 0xec, 0x69, 0xfc, 0xfb, 0x89, 0xe5, 0x86, 0x09,
+  0x45, 0x8f, 0x63, 0x85, 0x54, 0x04, 0x0c, 0x76, 0x8d, 0xcd, 0x23, 0xa8,
+  0xc5, 0x74, 0x23, 0xc5, 0x99, 0xbe, 0xa8, 0xd1, 0xba, 0x19, 0x18, 0x89,
+  0x0e, 0xe2, 0x06, 0x47, 0x16, 0x4d, 0x94, 0xa5, 0xb8, 0x34, 0x6a, 0x06,
+  0xa1, 0x9a, 0xef, 0x3a, 0x8e, 0x49, 0xd1, 0xee, 0x38, 0x3a, 0x49, 0x07,
+  0x25, 0x20, 0x51, 0xb5, 0x16, 0x05, 0xd0, 0x9c, 0xd7, 0xad, 0x7e, 0xf2,
+  0x5a, 0x35, 0x9b, 0x73, 0x4b, 0x14, 0xa5, 0xca, 0x47, 0x17, 0xbf, 0xe3,
+  0x53, 0xed, 0x2e, 0x53, 0x98, 0x0f, 0xb9, 0x60, 0x22, 0x53, 0xad, 0xf6,
+  0x9a, 0xdc, 0x5b, 0x8a, 0x35, 0xb7, 0xb7, 0x69, 0x26, 0x82, 0x0e, 0xc7,
+  0xc2, 0xc2, 0xae, 0x48, 0x55, 0xbf, 0x79, 0xbd, 0xb6, 0xde, 0x2d, 0xf2,
+  0x0f, 0xd0, 0x39, 0x63, 0xce, 0x0b, 0xd7, 0xd4, 0xfa, 0x5e, 0xf5, 0xf6,
+  0x9e, 0xef, 0x0f, 0xf7, 0x3e, 0xfb, 0x62, 0xb8, 0xb7, 0x3b, 0xdc, 0xeb,
+  0x85, 0xc0, 0x3f, 0x44, 0x09, 0x39, 0xae, 0x17, 0xb6, 0xd3, 0x61, 0xf1,
+  0x76, 0x19, 0xd6, 0xe1, 0x07, 0xe6, 0x0f, 0xc3, 0x20, 0xd6, 0x1a, 0x7d,
+  0x42, 0xe3, 0xb1, 0xed, 0x96, 0x07, 0x81, 0xc0, 0xc7, 0x56, 0x5b, 0x72,
+  0x60, 0xda, 0x25, 0x14, 0x36, 0xea, 0xde, 0x09, 0xbc, 0xd8, 0x55, 0x8f,
+  0xeb, 0x2a, 0x2d, 0x10, 0xc0, 0x47, 0xbb, 0x6b, 0xca, 0xb9, 0xef, 0xff,
+  0xea, 0x2c, 0xbc, 0x08, 0x37, 0xc7, 0x4e, 0x39, 0x77, 0x0c, 0xd5, 0xb1,
+  0xe4, 0xdc, 0x97, 0x5c, 0x7a, 0x4e, 0xb3, 0x8a, 0x5d, 0x95, 0xc9, 0xa1,
+  0x73, 0xe3, 0xc1, 0x43, 0x1c, 0xca, 0xde, 0x55, 0x2b, 0x43, 0x1e, 0x35,
+  0xeb, 0x3c, 0xd3, 0x72, 0x28, 0x70, 0xd1, 0xb2, 0x4b, 0x76, 0x0d, 0x0b,
+  0x0f, 0xb2, 0x4d, 0x84, 0x17, 0x39, 0x83, 0x25, 0x0b, 0xe3, 0x5e, 0xfc,
+  0xce, 0x9f, 0xfe, 0xe4, 0x65, 0xd4, 0x88, 0xa1, 0xbe, 0x5a, 0x16, 0x08,
+  0x2e, 0x81, 0x67, 0xde, 0x10, 0x90, 0xec, 0xb6, 0xa4, 0x77, 0xf0, 0x13,
+  0x00, 0xc1, 0xbf, 0x0c, 0x7e, 0xa2, 0x7f, 0xfe, 0xd2, 0x73, 0x82, 0x12,
+  0xa0, 0x07, 0x51, 0x82, 0xdc, 0xe0, 0x65, 0x89, 0xfa, 0x18, 0x8b, 0x07,
+  0x07, 0x22, 0x3d, 0x92, 0xbd, 0xb5, 0x38, 0x8d, 0x92, 0x12, 0x24, 0xbb,
+  0x59, 0x4d, 0x05, 0xc9, 0x0c, 0x83, 0x71, 0x4c, 0x3b, 0xc5, 0xcd, 0xa5,
+  0x40, 0x61, 0xfd, 0x4b, 0x7d, 0xa3, 0xfc, 0x65, 0xc3, 0xa4, 0x14, 0xbd,
+  0xce, 0x72, 0xc7, 0x54, 0x3c, 0x33, 0xbe, 0xc9, 0x55, 0xc9, 0xd5, 0x9f,
+  0x6d, 0xb8, 0x54, 0x66, 0xce, 0x5e, 0xb0, 0xa2, 0x77, 0x12, 0x7c, 0x13,
+  0xc7, 0x56, 0xe6, 0xe2, 0xe2, 0x2e, 0x57, 0x40, 0xc7, 0x58, 0xdd, 0xf2,
+  0x10, 0x35, 0x47, 0x47, 0x78, 0x08, 0x36, 0x02, 0xe4, 0x07, 0xfa, 0x66,
+  0x79, 0x2d, 0x1c, 0x39, 0x32, 0x04, 0x60, 0xe8, 0x58, 0x61, 0x49, 0x96,
+  0xbc, 0x58, 0xde, 0x94, 0xd4, 0xee, 0x23, 0x14, 0x30, 0xf4, 0x94, 0x3c,
+  0xe3, 0x76, 0xed, 0xd2, 0x53, 0xa6, 0xfc, 0x8e, 0x58, 0x4f, 0x2e, 0x55,
+  0xff, 0x64, 0x77, 0x6f, 0x0d, 0x1b, 0x30, 0x64, 0xbd, 0x21, 0x3a, 0x18,
+  0x84, 0xc5, 0xb2, 0x93, 0x01, 0x99, 0xc9, 0xfe, 0x67, 0x7b, 0x9f, 0xed,
+  0x90, 0x14, 0x79, 0x32, 0xdc, 0x57, 0xcf, 0x14, 0x18, 0x3f, 0xe8, 0x88,
+  0x51, 0x1f, 0xda, 0x97, 0x27, 0xf2, 0xa0, 0xed, 0xb2, 0x06, 0xc8, 0x8b,
+  0x9a, 0x0b, 0x4a, 0xef, 0x54, 0x72, 0xa3, 0x79, 0xd4, 0x6d, 0xca, 0x99,
+  0xcd, 0x0e, 0x2b, 0x1b, 0xe5, 0xa9, 0x58, 0xf8, 0x91, 0x15, 0x1a, 0xee,
+  0x8d, 0xfa, 0x5e, 0x56, 0x52, 0x3d, 0x6b, 0x9c, 0xd3, 0xcd, 0x5f, 0x73,
+  0x3d, 0x54, 0x24, 0xd8, 0xa0, 0xee, 0x8a, 0x31, 0x2c, 0x33, 0x15, 0x69,
+  0xd1, 0x59, 0x27, 0x42, 0x8a, 0x2c, 0x1b, 0xab, 0xa2, 0xb9, 0x0e, 0xc2,
+  0x28, 0x02, 0x60, 0xb9, 0xb9, 0x10, 0x80, 0x82, 0x30, 0x97, 0x6f, 0xe5,
+  0xc9, 0x43, 0xfb, 0x1e, 0xf9, 0xd6, 0xd8, 0x48, 0x53, 0xbb, 0xa1, 0x24,
+  0x4b, 0x4a, 0xbc, 0xd0, 0xa9, 0x4c, 0x86, 0x27, 0x8f, 0xd2, 0x1f, 0x08,
+  0xf4, 0x93, 0x3d, 0x32, 0x31, 0x6d, 0x66, 0x80, 0x19, 0x1e, 0x76, 0x20,
+  0x0e, 0x94, 0x7d, 0x89, 0x53, 0x7f, 0xc4, 0xdb, 0x2a, 0xa1, 0x3c, 0xc8,
+  0x85, 0xc7, 0x80, 0xd2, 0x8f, 0x55, 0x08, 0x90, 0x6d, 0xb1, 0xff, 0xbf,
+  0xe1, 0xb6, 0xd8, 0xff, 0xbf, 0xdb, 0xe2, 0x9f, 0xb8, 0x2d, 0x9e, 0x77,
+  0x6d, 0x8b, 0x27, 0xff, 0x1b, 0x6e, 0x8b, 0x27, 0xff, 0x77, 0x5b, 0xfc,
+  0xf3, 0xb6, 0xc5, 0xfe, 0x67, 0xcd, 0x5c, 0x0f, 0xd8, 0x93, 0x74, 0xc9,
+  0x99, 0x59, 0x19, 0x91, 0xeb, 0x61, 0x67, 0x34, 0xc9, 0x02, 0x0c, 0x1b,
+  0x94, 0x2b, 0xb7, 0x8c, 0x37, 0x49, 0x55, 0x61, 0xaf, 0x3c, 0x9d, 0x49,
+  0x5c, 0xeb, 0xa6, 0xcc, 0xb3, 0xbb, 0x74, 0x36, 0x4c, 0xce, 0xdd, 0x6b,
+  0xec, 0x02, 0xe5, 0x9f, 0xad, 0x10, 0xc8, 0x9a, 0x65, 0x57, 0x58, 0x02,
+  0xe8, 0x29, 0x7d, 0xfc, 0x12, 0x6a, 0x14, 0xb3, 0xa2, 0x0d, 0x22, 0xa8,
+  0x3f, 0xbf, 0x22, 0xb1, 0x25, 0xb4, 0xc2, 0x06, 0x68, 0xea, 0x91, 0xd9,
+  0x42, 0x78, 0x5f, 0x26, 0x9b, 0xa4, 0x4b, 0x6d, 0xf6, 0x1b, 0xac, 0xb2,
+  0x9c, 0x48, 0x12, 0x13, 0x62, 0x7f, 0x10, 0xbf, 0xe9, 0xdf, 0xb3, 0xb2,
+  0x48, 0x0c, 0x08, 0xa2, 0x8c, 0x18, 0x60, 0x85, 0x37, 0x35, 0xc1, 0xff,
+  0x90, 0xbf, 0x1b, 0x59, 0x19, 0x7f, 0x42, 0xcd, 0x09, 0x61, 0x41, 0xe1,
+  0xfc, 0x54, 0x87, 0x14, 0x5f, 0xb0, 0xaa, 0x95, 0x9b, 0xeb, 0xce, 0xcf,
+  0x9c, 0xa9, 0xc4, 0xc0, 0xa2, 0xd6, 0x1d, 0x35, 0xe8, 0x79, 0x66, 0xb6,
+  0xc2, 0xe0, 0xa4, 0xb3, 0x35, 0xaf, 0x24, 0x73, 0x5e, 0xba, 0xe3, 0x58,
+  0x6a, 0x87, 0x1d, 0x7a, 0xfa, 0xab, 0x8c, 0xbd, 0x1e, 0x61, 0x87, 0xfa,
+  0x52, 0x61, 0x53, 0x2d, 0x7f, 0x87, 0x42, 0xf0, 0xb1, 0x44, 0xdf, 0xc5,
+  0xb8, 0x4b, 0xcd, 0x3e, 0xd7, 0x1d, 0x80, 0x84, 0x97, 0x6e, 0x1a, 0xcc,
+  0xd7, 0x1e, 0x4e, 0xc6, 0x16, 0xc0, 0xe5, 0xe6, 0x79, 0xc4, 0x27, 0x3f,
+  0x65, 0x1a, 0xe0, 0x32, 0x81, 0xd1, 0x5e, 0xad, 0xc6, 0x7f, 0x55, 0x8b,
+  0x90, 0x91, 0x6a, 0x42, 0xe0, 0x1d, 0xd6, 0x0a, 0x41, 0x8a, 0x39, 0x3d,
+  0xa5, 0x8e, 0xb2, 0xb8, 0x39, 0xfa, 0x21, 0x9c, 0xa2, 0x8e, 0x59, 0x58,
+  0xf7, 0x99, 0xc6, 0x54, 0xb9, 0x4f, 0xd1, 0xa0, 0x82, 0xc0, 0x60, 0xb4,
+  0xee, 0x76, 0x9e, 0xd8, 0x62, 0xa8, 0x94, 0xf2, 0x37, 0x5c, 0x2c, 0x37,
+  0x9b, 0xaa, 0xc4, 0x5a, 0x08, 0x94, 0x1f, 0x5f, 0xdb, 0x16, 0x6d, 0xd7,
+  0x3e, 0x3b, 0xaa, 0xab, 0xfe, 0x9f, 0xf8, 0x3f, 0xdd, 0x06, 0x53, 0x83,
+  0xe1, 0xcb, 0xf0, 0x12, 0xfc, 0x38, 0xce, 0x06, 0x5e, 0x5f, 0xf7, 0x81,
+  0x97, 0xfc, 0x5b, 0xf9, 0xc2, 0xe3, 0x6d, 0xc3, 0x15, 0xfd, 0x2b, 0x3e,
+  0xf0, 0x6e, 0x21, 0x09, 0x83, 0xa1, 0x84, 0x58, 0x6a, 0x06, 0x39, 0xca,
+  0xea, 0xa5, 0xe5, 0x42, 0xe0, 0x0e, 0x61, 0xcd, 0x38, 0xc6, 0xf3, 0x2f,
+  0xe1, 0xa4, 0x69, 0x3b, 0x0d, 0xd2, 0x2b, 0x76, 0x54, 0xc1, 0x5b, 0xc5,
+  0xb8, 0x2f, 0x49, 0xdd, 0x51, 0x6e, 0x23, 0x83, 0x06, 0x2c, 0x8b, 0xda,
+  0x5c, 0xa2, 0xc9, 0x94, 0x6d, 0x8f, 0x12, 0xf7, 0x43, 0x07, 0x1d, 0xa1,
+  0x2d, 0x84, 0x2f, 0x0b, 0xc7, 0x2d, 0xc3, 0x05, 0xb3, 0x5a, 0x82, 0x49,
+  0x34, 0xc0, 0xa2, 0xc1, 0xcc, 0x70, 0x3b, 0x17, 0x9f, 0x6e, 0x07, 0x11,
+  0x11, 0xe3, 0xc2, 0x85, 0xe7, 0x78, 0x9a, 0xee, 0x8a, 0x9c, 0x13, 0x78,
+  0x24, 0x19, 0x69, 0xf8, 0xdb, 0xe8, 0x53, 0xfb, 0x41, 0xe5, 0x81, 0xb4,
+  0x0a, 0x31, 0xc1, 0x71, 0x04, 0xdf, 0x9b, 0xdd, 0xa9, 0xa4, 0x3e, 0xd2,
+  0x2e, 0x5e, 0xa4, 0x8e, 0xf6, 0xdb, 0x2f, 0x03, 0xba, 0x29, 0x1c, 0xc0,
+  0x0c, 0x50, 0x9e, 0x64, 0x71, 0x50, 0xd4, 0x13, 0x65, 0x7e, 0x2c, 0x77,
+  0x70, 0x3f, 0xba, 0x4f, 0x24, 0x7b, 0xf0, 0xa3, 0xb7, 0x8a, 0xcd, 0x93,
+  0x11, 0x78, 0xe8, 0x85, 0x12, 0xec, 0x16, 0xcd, 0xaa, 0x0a, 0xae, 0x46,
+  0xc9, 0xf3, 0x5e, 0xb3, 0x93, 0xaf, 0x50, 0x7e, 0xe7, 0x3e, 0x94, 0xab,
+  0x25, 0x7b, 0x06, 0x49, 0xd4, 0x57, 0x02, 0xd9, 0xf8, 0x95, 0x43, 0xf9,
+  0xf0, 0x30, 0x48, 0x17, 0x0f, 0x1c, 0x21, 0x7d, 0xe4, 0x5a, 0x64, 0x41,
+  0x0e, 0x30, 0x3e, 0xed, 0x98, 0x5c, 0x68, 0x93, 0x5b, 0xe0, 0x31, 0x8b,
+  0xa6, 0x83, 0x6c, 0x9c, 0x64, 0xcc, 0x2a, 0x72, 0xfe, 0x69, 0xf1, 0x73,
+  0x75, 0xfe, 0xd5, 0x01, 0x99, 0x8b, 0x22, 0x23, 0x54, 0x1b, 0x10, 0xae,
+  0x0a, 0x25, 0xab, 0x00, 0xe3, 0x1e, 0x42, 0x0a, 0xdd, 0xe4, 0x4e, 0x3b,
+  0x2e, 0xf7, 0xa6, 0x64, 0xc2, 0xf1, 0x01, 0xc9, 0xba, 0x65, 0x8b, 0xad,
+  0xe2, 0x49, 0xd7, 0x90, 0x51, 0x2a, 0xe7, 0x23, 0x7a, 0x00, 0x7f, 0x7f,
+  0x2d, 0xbb, 0x42, 0x30, 0x52, 0x1b, 0xd9, 0xba, 0xc8, 0xa1, 0x8c, 0x52,
+  0x07, 0xf9, 0x4e, 0xb0, 0xdd, 0x68, 0x11, 0x64, 0x5c, 0x2c, 0x66, 0x78,
+  0x5a, 0x82, 0x2f, 0x09, 0xa6, 0x33, 0x1a, 0xb0, 0x2f, 0xd8, 0xc6, 0xe8,
+  0x29, 0x3c, 0xe9, 0x4e, 0x84, 0x49, 0xdf, 0xee, 0x55, 0xe1, 0x21, 0xc5,
+  0x41, 0xdf, 0x4a, 0x3e, 0xc4, 0x1d, 0xcb, 0x9b, 0x18, 0x5c, 0x99, 0xa3,
+  0x29, 0x02, 0xef, 0x1f, 0xdd, 0xd6, 0xe8, 0xb8, 0x04, 0xe9, 0x3b, 0xe7,
+  0xe8, 0x37, 0x4f, 0x92, 0x7c, 0xbf, 0x63, 0x96, 0xf4, 0x63, 0x9d, 0x84,
+  0x64, 0x3a, 0x4d, 0x98, 0xa5, 0x68, 0x44, 0xeb, 0xb0, 0xc5, 0x6b, 0x06,
+  0xb5, 0x0e, 0x5d, 0xdc, 0x5e, 0xfb, 0x4e, 0xa6, 0x8a, 0xf5, 0xdb, 0x5c,
+  0x46, 0xb7, 0x68, 0x60, 0x61, 0x1b, 0x03, 0x6c, 0x23, 0xb7, 0xdc, 0x93,
+  0xca, 0x50, 0x18, 0x8e, 0xf1, 0x71, 0x3b, 0xd9, 0xc1, 0x19, 0x3e, 0x71,
+  0xc0, 0x1d, 0x80, 0x9a, 0xe4, 0xbf, 0xb8, 0x8a, 0x80, 0xee, 0x34, 0x86,
+  0x88, 0xaf, 0x34, 0x86, 0xd2, 0xe1, 0xc9, 0x8d, 0x16, 0x6f, 0x6f, 0xb8,
+  0x0b, 0x69, 0xfb, 0xe1, 0x01, 0xe1, 0xeb, 0x03, 0xbe, 0xb7, 0x7e, 0x69,
+  0x0b, 0xdd, 0x77, 0x2a, 0x66, 0xbd, 0x0b, 0x1f, 0xe3, 0xe2, 0x77, 0xb5,
+  0x53, 0x27, 0x56, 0x77, 0x34, 0x64, 0xea, 0x71, 0xa4, 0xb0, 0xeb, 0xf9,
+  0x77, 0xf3, 0x3a, 0xa0, 0xdf, 0xe5, 0x34, 0x46, 0xbc, 0xbf, 0xb7, 0xfb,
+  0xc5, 0x6e, 0x37, 0x4f, 0x15, 0x74, 0x08, 0x0b, 0x23, 0x4e, 0x3c, 0x8b,
+  0x36, 0xf4, 0x43, 0xe3, 0xed, 0x0b, 0x22, 0x67, 0x7a, 0x49, 0x72, 0xe0,
+  0xac, 0x4b, 0xf2, 0x23, 0x8c, 0x96, 0xab, 0x83, 0x59, 0xbd, 0xb2, 0x8e,
+  0xa5, 0xc8, 0x02, 0x4e, 0x2e, 0xd2, 0xe3, 0xc2, 0x49, 0x1d, 0x39, 0x81,
+  0xbe, 0x8a, 0x6f, 0x63, 0x6e, 0x4c, 0x79, 0x6f, 0x54, 0xbd, 0x35, 0xa9,
+  0xa2, 0x0f, 0xee, 0x35, 0x16, 0x65, 0x35, 0x7e, 0x84, 0x3b, 0xfa, 0x5b,
+  0xae, 0x6b, 0x29, 0x38, 0x20, 0x21, 0x41, 0xfe, 0x44, 0xe6, 0x68, 0xbc,
+  0x12, 0xd1, 0x8b, 0xff, 0xf3, 0x69, 0xa3, 0xff, 0x66, 0xed, 0x59, 0x0d,
+  0x23, 0x8f, 0xa1, 0xf1, 0xa5, 0x74, 0x8a, 0x40, 0xa5, 0x76, 0x5c, 0x7f,
+  0x6a, 0x76, 0xa3, 0x0e, 0x40, 0xcc, 0x25, 0xeb, 0x2b, 0x66, 0xb8, 0xb4,
+  0xbe, 0x71, 0x26, 0x45, 0x9c, 0x94, 0x38, 0x59, 0x79, 0x2a, 0x11, 0x04,
+  0x0e, 0xab, 0xb8, 0xc4, 0x54, 0x54, 0x96, 0x4c, 0xa8, 0xdd, 0x68, 0x96,
+  0xd9, 0xd0, 0x90, 0x76, 0x96, 0x96, 0xa4, 0x55, 0x71, 0xb8, 0x3f, 0x18,
+  0xdc, 0x7f, 0xe7, 0x66, 0x51, 0xc7, 0x87, 0xeb, 0x4e, 0xa1, 0xf3, 0x5d,
+  0x91, 0x3f, 0xad, 0x4f, 0xca, 0x30, 0x70, 0xde, 0x2d, 0x69, 0x39, 0xce,
+  0xeb, 0x32, 0x55, 0x1c, 0xbc, 0xf2, 0xcd, 0x06, 0x61, 0x49, 0xf0, 0xe2,
+  0xb2, 0x71, 0x3c, 0x5a, 0xc7, 0x38, 0x4b, 0xb2, 0xef, 0xbf, 0xe3, 0xab,
+  0xda, 0x80, 0xe8, 0x2e, 0x20, 0x84, 0xf8, 0xfa, 0xf8, 0xf5, 0xd9, 0xc5,
+  0x71, 0x93, 0x03, 0x44, 0x18, 0x41, 0xbb, 0xca, 0x1f, 0x6f, 0xfd, 0x15,
+  0x10, 0x78, 0x68, 0x4e, 0x61, 0x21, 0x94, 0xf3, 0x1f, 0x5e, 0xb9, 0xce,
+  0xe5, 0xae, 0x3c, 0xa3, 0x6b, 0xb1, 0x6f, 0x35, 0xcc, 0xa2, 0x54, 0x9b,
+  0x74, 0x52, 0x33, 0xf7, 0xbb, 0x55, 0xc8, 0xb1, 0xee, 0x09, 0x6b, 0x1a,
+  0xaa, 0xee, 0xca, 0xc7, 0x52, 0x81, 0xdf, 0x56, 0x15, 0x3b, 0x28, 0x5c,
+  0xb3, 0x1d, 0x55, 0x9d, 0xf2, 0x0f, 0x40, 0x72, 0x9b, 0x98, 0x63, 0x6c,
+  0x09, 0xc3, 0x4d, 0x86, 0x89, 0xfb, 0x88, 0xff, 0x8a, 0xe3, 0xec, 0x55,
+  0x65, 0xb0, 0xcb, 0xa5, 0xc3, 0x84, 0x22, 0x02, 0x31, 0x10, 0xc9, 0x11,
+  0xe1, 0x0b, 0xfa, 0xc9, 0x5f, 0xa5, 0x0e, 0xd6, 0x95, 0x15, 0x44, 0xb5,
+  0xee, 0x45, 0x9b, 0x10, 0x9f, 0xdd, 0xaa, 0x48, 0xa0, 0xf8, 0x9e, 0xba,
+  0x69, 0xb3, 0x42, 0xef, 0x7f, 0xda, 0x4c, 0xd4, 0x18, 0x87, 0x6c, 0xd4,
+  0xcc, 0xac, 0x38, 0x29, 0x54, 0xe8, 0x0e, 0x12, 0x4b, 0xa6, 0xdd, 0x1e,
+  0x3a, 0x4c, 0x42, 0x77, 0xb9, 0x70, 0x1b, 0xb5, 0x71, 0x81, 0x76, 0x47,
+  0x4d, 0xad, 0xfc, 0x89, 0x05, 0x37, 0xac, 0x9e, 0x87, 0xca, 0x25, 0x6b,
+  0xa4, 0x1f, 0xb0, 0xfb, 0x21, 0x88, 0x1f, 0x39, 0x4f, 0xf4, 0x06, 0x33,
+  0x94, 0x57, 0x3a, 0x56, 0xba, 0xf5, 0xbf, 0x58, 0x1e, 0x05, 0x08, 0xb9,
+  0xaa, 0x87, 0x45, 0x8d, 0x58, 0x32, 0x6c, 0xaa, 0x49, 0x51, 0x22, 0xfa,
+  0x1e, 0x6f, 0x63, 0xbf, 0x6f, 0x2b, 0x78, 0x0e, 0x9f, 0x3f, 0x7b, 0xce,
+  0xc7, 0x0e, 0xc5, 0x8f, 0x35, 0xa9, 0x54, 0xd1, 0xa1, 0xa0, 0x3c, 0xd5,
+  0x1e, 0xbb, 0x8a, 0xa4, 0x51, 0x91, 0x28, 0x59, 0x7e, 0x73, 0x32, 0x8d,
+  0xb3, 0x99, 0x25, 0xb4, 0x8e, 0x82, 0xa6, 0x86, 0x6b, 0xcd, 0xa8, 0x75,
+  0xe5, 0x88, 0x21, 0xe7, 0xb4, 0x54, 0x29, 0xad, 0x42, 0x7a, 0xab, 0xf8,
+  0x76, 0x3d, 0x0f, 0xd2, 0x6e, 0x63, 0xf5, 0xd7, 0xf5, 0xce, 0xd2, 0x8b,
+  0x68, 0xc0, 0xb4, 0x31, 0x39, 0xe2, 0xb4, 0xf5, 0x6f, 0xdb, 0xcd, 0x4a,
+  0x52, 0x1c, 0xbe, 0xcc, 0x17, 0xab, 0xac, 0xc1, 0x72, 0xb3, 0xae, 0xb9,
+  0x2b, 0x08, 0x2c, 0x9a, 0xbd, 0x76, 0xfa, 0x83, 0x14, 0x54, 0xa9, 0x8b,
+  0x65, 0x92, 0x5a, 0x81, 0x1e, 0x5d, 0xfb, 0x18, 0x31, 0xc6, 0x63, 0x00,
+  0xd2, 0x76, 0x2c, 0x84, 0xab, 0x76, 0x7b, 0x91, 0xc6, 0xb1, 0x00, 0x9c,
+  0x43, 0xf7, 0xa2, 0xe2, 0x02, 0x10, 0xd0, 0xa6, 0xb1, 0xb2, 0xcb, 0xae,
+  0x43, 0x34, 0x89, 0x1c, 0x0c, 0x4e, 0xa3, 0x52, 0x54, 0xb4, 0x6a, 0x64,
+  0xe0, 0x34, 0xab, 0xc0, 0x73, 0xd2, 0xec, 0x75, 0x9c, 0x71, 0x29, 0x05,
+  0x9e, 0x34, 0x59, 0x0b, 0x6d, 0x33, 0xb9, 0x3d, 0xa9, 0x5b, 0x83, 0xaa,
+  0x7e, 0x10, 0x3b, 0x3e, 0x9b, 0x73, 0x2e, 0x3f, 0xca, 0xb3, 0x81, 0xb0,
+  0x4c, 0x49, 0xca, 0x01, 0x38, 0x1f, 0xc4, 0xe5, 0xf0, 0x64, 0x0b, 0x24,
+  0xaf, 0x9d, 0x43, 0x59, 0xbd, 0x63, 0xf0, 0x26, 0x31, 0x15, 0xd3, 0x6c,
+  0xe6, 0x79, 0x47, 0x64, 0x76, 0xfe, 0x66, 0x52, 0xb6, 0x73, 0xc7, 0xc5,
+  0xbc, 0x11, 0x37, 0xd7, 0xe5, 0x52, 0x72, 0xbe, 0xbb, 0x4a, 0x4e, 0x05,
+  0x6a, 0x8d, 0x3c, 0x69, 0xb2, 0x02, 0x75, 0x48, 0xa0, 0xf6, 0xe1, 0xd5,
+  0x93, 0x57, 0x0d, 0xba, 0x10, 0x81, 0xb2, 0xd1, 0x4a, 0x77, 0x37, 0xe7,
+  0xa1, 0x5c, 0x02, 0xbf, 0xf1, 0xf7, 0x89, 0x6b, 0xcd, 0x6b, 0x71, 0xe3,
+  0x07, 0xff, 0x9b, 0xee, 0xe6, 0xb4, 0x0d, 0xf1, 0xa5, 0x4b, 0x0b, 0xd6,
+  0x2c, 0xf6, 0x8a, 0xb1, 0xa9, 0xf1, 0x6e, 0x60, 0x46, 0x25, 0xfb, 0x48,
+  0x5c, 0x97, 0xfd, 0x66, 0x5e, 0x4c, 0x05, 0xd9, 0xf1, 0xb1, 0xb9, 0xe0,
+  0x07, 0x6d, 0x2e, 0xd4, 0x3b, 0x59, 0x85, 0xe3, 0x42, 0x23, 0x5c, 0x82,
+  0xbb, 0x72, 0x75, 0x06, 0xba, 0x9b, 0xf3, 0x03, 0x85, 0x5a, 0x83, 0xe6,
+  0xf1, 0x72, 0x38, 0x84, 0x45, 0x52, 0x4c, 0xea, 0x60, 0x04, 0xfc, 0x40,
+  0x77, 0x73, 0x1a, 0x6e, 0x8e, 0x47, 0xc6, 0x9e, 0x2a, 0xa4, 0x67, 0x7d,
+  0x6c, 0x64, 0xfc, 0x60, 0xb4, 0xca, 0xf4, 0x43, 0x91, 0xe1, 0xad, 0x25,
+  0x96, 0xc5, 0x59, 0x03, 0x72, 0x68, 0x2c, 0xb0, 0xad, 0x30, 0xfa, 0xd0,
+  0xb5, 0xc0, 0xf8, 0x45, 0x97, 0x20, 0xf7, 0x34, 0x3a, 0x32, 0x3b, 0xee,
+  0xc1, 0xb5, 0x0b, 0xac, 0xdf, 0x88, 0x66, 0x61, 0xb6, 0x50, 0x76, 0xe5,
+  0xf7, 0x92, 0xa4, 0xcc, 0x04, 0x5b, 0xf5, 0xfb, 0xc7, 0x27, 0x64, 0xb6,
+  0x30, 0x36, 0x7b, 0xd0, 0x61, 0x38, 0x59, 0xa1, 0xb8, 0xd4, 0xb4, 0xc9,
+  0x73, 0xaf, 0x24, 0x27, 0x6b, 0xb6, 0xbd, 0xff, 0x5e, 0xe2, 0x59, 0xe8,
+  0xe9, 0x1a, 0xcd, 0x85, 0x0f, 0xd1, 0xc9, 0x98, 0xa0, 0x8f, 0x5d, 0x64,
+  0xe5, 0x01, 0x72, 0x3e, 0x1a, 0xe2, 0xfc, 0x96, 0x5d, 0x53, 0x4e, 0x35,
+  0x78, 0xbf, 0x1e, 0x14, 0x83, 0x8d, 0x86, 0xa7, 0x6d, 0xb5, 0x65, 0x48,
+  0x16, 0x3d, 0xf2, 0xf0, 0x45, 0x7f, 0x9c, 0x1f, 0xd9, 0xc7, 0xcd, 0x4f,
+  0xba, 0x33, 0xd9, 0xee, 0xdf, 0xf2, 0x7e, 0x6a, 0x1f, 0xe7, 0xbf, 0xda,
+  0xa7, 0xc3, 0x9a, 0x67, 0x2e, 0xc7, 0x9c, 0x55, 0x57, 0x69, 0xec, 0xca,
+  0x20, 0x9e, 0x6b, 0xa6, 0xa2, 0x1b, 0x77, 0x19, 0x7d, 0xbc, 0x94, 0x2a,
+  0x89, 0xc6, 0xb7, 0x8a, 0xe5, 0x58, 0x3f, 0x39, 0xfa, 0xb4, 0xef, 0xa2,
+  0xc8, 0xf7, 0x90, 0x6a, 0xc9, 0xcf, 0x91, 0x1d, 0x87, 0x47, 0x04, 0x9e,
+  0x95, 0x95, 0x6d, 0x89, 0xbc, 0x69, 0xc6, 0x75, 0x2f, 0x64, 0x2f, 0x00,
+  0x9b, 0xfb, 0xf1, 0x93, 0x25, 0x3d, 0x5f, 0x3b, 0xc7, 0xe5, 0xfc, 0x23,
+  0x87, 0x9c, 0x1e, 0xf0, 0xa3, 0xe2, 0x1a, 0x09, 0xc1, 0xa8, 0xa2, 0x73,
+  0xa9, 0xa9, 0xf4, 0x6b, 0x66, 0x7e, 0x5d, 0x0f, 0x1a, 0xbb, 0x70, 0x7d,
+  0x4f, 0xf4, 0xc9, 0xce, 0xee, 0xf8, 0xc9, 0xe5, 0x38, 0xc6, 0x83, 0xef,
+  0x59, 0x77, 0x73, 0xda, 0x5d, 0xff, 0x96, 0x4e, 0x4f, 0xdf, 0xe5, 0xfe,
+  0xab, 0x21, 0xcf, 0xf6, 0x73, 0xbc, 0x37, 0xec, 0x80, 0xff, 0x2a, 0x01,
+  0xc1, 0xd6, 0xda, 0x2c, 0x2c, 0x69, 0x5d, 0x02, 0xba, 0x0b, 0x24, 0xd1,
+  0x0b, 0xfc, 0xe7, 0xcb, 0xb5, 0x05, 0xef, 0x47, 0xbe, 0xea, 0xfd, 0x85,
+  0x84, 0x0d, 0x59, 0x9a, 0x30, 0xcd, 0xa2, 0x42, 0x91, 0xb6, 0x18, 0xb6,
+  0x96, 0x02, 0xd4, 0x9d, 0x03, 0xf6, 0x5e, 0x4c, 0x56, 0x5d, 0xb5, 0x46,
+  0xb7, 0x0d, 0x6d, 0x9d, 0x26, 0xb0, 0xd6, 0x77, 0xc8, 0x5a, 0xef, 0x27,
+  0x4d, 0x9b, 0xcc, 0x94, 0x6b, 0xae, 0xe5, 0xa7, 0x98, 0x73, 0xfe, 0x74,
+  0x3b, 0xe6, 0x7b, 0xc1, 0x1f, 0xb6, 0x62, 0xbf, 0x8d, 0xca, 0xf1, 0x5c,
+  0x71, 0xc5, 0x29, 0xf2, 0xcc, 0x96, 0x18, 0x4d, 0xe0, 0xee, 0xe0, 0xe9,
+  0xf3, 0xe7, 0x8d, 0x2b, 0x2d, 0xb4, 0x9c, 0x9f, 0xed, 0xee, 0x0a, 0x85,
+  0x64, 0xfb, 0x35, 0xfa, 0xc5, 0xe0, 0x39, 0x5e, 0x6c, 0xbe, 0x26, 0xec,
+  0xb3, 0xeb, 0xdf, 0x1b, 0xf0, 0x6f, 0x3a, 0x3e, 0x07, 0xeb, 0x7e, 0xed,
+  0x5b, 0xcf, 0xf9, 0x73, 0x1d, 0x6f, 0xe1, 0x61, 0x99, 0xc6, 0xe2, 0xea,
+  0x8a, 0x59, 0xf1, 0xf8, 0x49, 0x29, 0x68, 0x57, 0x94, 0xf7, 0x69, 0x39,
+  0x8d, 0x87, 0xbb, 0xdb, 0x1f, 0xec, 0xad, 0x1b, 0x2e, 0x7c, 0x02, 0xdc,
+  0x13, 0xac, 0x27, 0x5b, 0x50, 0xa4, 0x3c, 0x6f, 0x7d, 0xbb, 0xdd, 0x35,
+  0xfa, 0xcf, 0x77, 0x77, 0xfb, 0x9f, 0xf1, 0x7f, 0x9f, 0x3f, 0x5f, 0x1b,
+  0xa0, 0xf2, 0xdf, 0x78, 0x62, 0x43, 0x6b, 0xf4, 0x96, 0xda, 0xe9, 0x68,
+  0x7d, 0x8f, 0x5a, 0xdd, 0x7b, 0xfe, 0xbc, 0xcf, 0x5f, 0x79, 0xf6, 0x49,
+  0xad, 0xd7, 0xf7, 0x85, 0xf7, 0xb3, 0xf0, 0xeb, 0x7e, 0x3f, 0x56, 0xad,
+  0x11, 0xb0, 0x35, 0xf0, 0x12, 0xbc, 0x9a, 0x41, 0x6a, 0xa9, 0x47, 0x78,
+  0x87, 0x40, 0x5c, 0xa0, 0x04, 0x96, 0xe0, 0x65, 0x81, 0x67, 0x34, 0x35,
+  0x83, 0x25, 0xf5, 0x10, 0x0b, 0x73, 0xe6, 0x7b, 0x9c, 0xbb, 0x24, 0x37,
+  0x4c, 0xf3, 0x6b, 0xa6, 0xf5, 0xb4, 0x84, 0xcc, 0x2a, 0xd9, 0xa2, 0xfd,
+  0x22, 0x8c, 0x7b, 0x77, 0xe9, 0x2c, 0x77, 0xf8, 0xff, 0x4d, 0xa0, 0x01,
+  0x85, 0x94, 0x67, 0x93, 0xad, 0x89, 0x4d, 0x2e, 0x00, 0x3d, 0x9b, 0xba,
+  0xa0, 0x9f, 0x5e, 0x22, 0xf2, 0xdc, 0x40, 0x9e, 0x90, 0x83, 0x06, 0x13,
+  0xf0, 0x83, 0x16, 0x25, 0x61, 0x2c, 0x46, 0xeb, 0x9b, 0x89, 0xe3, 0xde,
+  0x0c, 0x48, 0xc0, 0x84, 0xfd, 0x4b, 0xe0, 0x7f, 0x7e, 0xa8, 0x9b, 0x55,
+  0x50, 0x06, 0xc3, 0xdc, 0x4b, 0x61, 0x81, 0xb6, 0x69, 0x66, 0x7c, 0xfc,
+  0x45, 0x83, 0xf2, 0xca, 0xbd, 0x2e, 0x2e, 0x9c, 0x95, 0x60, 0xd2, 0xfd,
+  0x21, 0xfb, 0x8b, 0xcf, 0xd0, 0x43, 0x9c, 0x92, 0x0d, 0xda, 0xfb, 0xb4,
+  0xcc, 0x2c, 0xb7, 0x98, 0x0c, 0x6d, 0x3b, 0xfb, 0xae, 0xc6, 0x0f, 0x57,
+  0x9d, 0x01, 0x9a, 0x05, 0x6c, 0x3b, 0x58, 0xa0, 0x0d, 0x47, 0x38, 0xaa,
+  0xcc, 0xe4, 0x12, 0xea, 0x9c, 0x02, 0x4f, 0x62, 0x54, 0x6b, 0xe2, 0xf4,
+  0x15, 0x06, 0xfa, 0x00, 0x04, 0x2a, 0xe5, 0x2a, 0x74, 0xc8, 0x42, 0x6a,
+  0xbd, 0xd1, 0x02, 0xdc, 0x5f, 0x67, 0x75, 0xc0, 0x0f, 0x6d, 0x59, 0x5c,
+  0x7e, 0x14, 0xc6, 0x49, 0x0a, 0x91, 0x24, 0x93, 0x6f, 0x5c, 0x80, 0x95,
+  0x56, 0x94, 0xd1, 0xa8, 0xa4, 0xb0, 0x6d, 0x83, 0xed, 0xa9, 0xb1, 0x62,
+  0xbc, 0x58, 0x4e, 0x08, 0xd2, 0xaa, 0xd1, 0x3e, 0x0c, 0x51, 0x0f, 0xb2,
+  0xbf, 0x02, 0x77, 0x81, 0xd1, 0xb1, 0x17, 0x12, 0xc3, 0xdf, 0x1e, 0xa2,
+  0x0f, 0xbc, 0x3f, 0x65, 0x25, 0xf8, 0xb3, 0xe1, 0x92, 0x66, 0x1f, 0x6a,
+  0xd4, 0x4e, 0xc0, 0x63, 0x76, 0x2b, 0x8d, 0x4e, 0xfe, 0xc7, 0xf1, 0x30,
+  0x44, 0xe6, 0xfe, 0x83, 0x3c, 0x8d, 0x17, 0x41, 0xa2, 0x07, 0xbf, 0xd6,
+  0x95, 0x64, 0x11, 0x30, 0x86, 0xfa, 0xc2, 0x42, 0x52, 0xf4, 0x5d, 0xd7,
+  0x06, 0x34, 0x5b, 0xd7, 0xbc, 0x9a, 0x08, 0xf3, 0xba, 0xda, 0x90, 0x11,
+  0x75, 0x47, 0x9d, 0xce, 0x97, 0x89, 0xf7, 0x4a, 0x58, 0x54, 0x49, 0x4b,
+  0x34, 0x3b, 0x92, 0x3a, 0x81, 0x31, 0xa7, 0x1e, 0x0b, 0x92, 0xde, 0x76,
+  0x11, 0x02, 0x05, 0x99, 0x4b, 0xb2, 0xec, 0xf4, 0x1e, 0x82, 0xb3, 0x98,
+  0x00, 0xfe, 0x56, 0xe8, 0x32, 0xe6, 0x9b, 0x98, 0x6c, 0x52, 0x3c, 0xde,
+  0x99, 0x59, 0x28, 0x44, 0x02, 0x61, 0x85, 0x0f, 0xa7, 0x0c, 0xc9, 0x08,
+  0x67, 0x99, 0x25, 0x3d, 0x23, 0x92, 0x18, 0x92, 0xe5, 0x77, 0xe4, 0x1b,
+  0x54, 0x74, 0xe1, 0x97, 0xc8, 0x3c, 0xad, 0x70, 0x4c, 0xa7, 0x7c, 0x41,
+  0x32, 0x17, 0x94, 0x25, 0x09, 0x0b, 0xb3, 0x94, 0x67, 0x2a, 0xab, 0x32,
+  0x75, 0xaf, 0xc9, 0xc3, 0x51, 0xbd, 0x3a, 0x4e, 0xdd, 0x85, 0x77, 0x81,
+  0x53, 0x3c, 0x3d, 0x5e, 0xbb, 0x8a, 0x99, 0xb9, 0xb3, 0xeb, 0x69, 0xc8,
+  0x3f, 0xd4, 0x9c, 0x85, 0x7b, 0x07, 0x4a, 0x0b, 0x56, 0x37, 0x0f, 0xb0,
+  0x12, 0xe9, 0x4c, 0xdd, 0x16, 0x4c, 0xa4, 0x03, 0xe7, 0x3b, 0x59, 0x37,
+  0xc5, 0x54, 0x09, 0xbc, 0x3a, 0x46, 0x5a, 0xc3, 0x7b, 0x88, 0x44, 0x6f,
+  0xc7, 0xa0, 0xcc, 0x49, 0xbc, 0x53, 0xe5, 0xa7, 0x0d, 0xf1, 0xd9, 0x8e,
+  0xc7, 0x67, 0x8e, 0x3c, 0x06, 0x64, 0x12, 0xb7, 0x83, 0x83, 0xf4, 0x5d,
+  0xd4, 0xe6, 0xeb, 0xd3, 0x4c, 0xdc, 0x47, 0x05, 0x5b, 0x1a, 0xf1, 0xd4,
+  0x20, 0x47, 0x89, 0x61, 0x1c, 0x8f, 0x01, 0x00, 0x6e, 0x44, 0xb3, 0x68,
+  0xc4, 0x2b, 0xa5, 0xf8, 0x00, 0x0a, 0x4d, 0x73, 0x35, 0x1c, 0xcb, 0x0c,
+  0xab, 0xba, 0x3d, 0xb5, 0xd3, 0x2c, 0xb5, 0x2c, 0x5b, 0x5a, 0x53, 0xae,
+  0xc1, 0x19, 0xe5, 0x49, 0xdd, 0x67, 0x65, 0xe6, 0xf9, 0xfd, 0x80, 0x96,
+  0x2a, 0xa4, 0xf6, 0x37, 0x3d, 0xdf, 0xc1, 0xd6, 0x6f, 0xf9, 0x0b, 0x0d,
+  0xbe, 0x2f, 0xf4, 0xc7, 0xae, 0xc4, 0x09, 0x92, 0x3c, 0xc5, 0x01, 0xdc,
+  0x1c, 0x6f, 0x07, 0x71, 0x05, 0x3c, 0xb5, 0xd4, 0x71, 0xe1, 0x6f, 0x81,
+  0x50, 0x85, 0x10, 0x85, 0xb3, 0x91, 0x45, 0x4e, 0x6f, 0x50, 0x24, 0x83,
+  0x1e, 0xaf, 0x15, 0x38, 0x35, 0x82, 0xe6, 0x86, 0x8f, 0x04, 0xee, 0xf7,
+  0x9e, 0x37, 0x31, 0x6d, 0x5c, 0x30, 0x62, 0x46, 0x02, 0xfd, 0x05, 0x07,
+  0xc3, 0x10, 0x0b, 0x3b, 0x58, 0x93, 0xc3, 0x73, 0xee, 0x38, 0x62, 0x26,
+  0xd4, 0x05, 0x86, 0xa8, 0x6b, 0xae, 0x82, 0x8c, 0xd1, 0x0f, 0x52, 0x12,
+  0x28, 0x64, 0xaf, 0x48, 0x70, 0x6c, 0x99, 0x72, 0x7d, 0xe2, 0x76, 0x84,
+  0x4d, 0x2b, 0xb3, 0xe6, 0x95, 0x0d, 0x8d, 0x35, 0x45, 0x93, 0x0f, 0x56,
+  0x5d, 0x5e, 0xa0, 0x90, 0x5b, 0xd5, 0xb6, 0x71, 0xc4, 0xad, 0xd1, 0xdb,
+  0x1b, 0xf9, 0x30, 0x4a, 0x7b, 0x0c, 0x5f, 0x03, 0x33, 0x1e, 0xdc, 0xe7,
+  0x95, 0x55, 0xd5, 0x03, 0x28, 0x06, 0x43, 0x9e, 0x06, 0xf4, 0xef, 0x11,
+  0x7e, 0xc6, 0x18, 0xe5, 0x87, 0x92, 0x3c, 0xc8, 0xe7, 0x1f, 0x95, 0xce,
+  0x13, 0x14, 0xac, 0xa6, 0xb3, 0xb3, 0x93, 0xd5, 0x93, 0x1d, 0x61, 0x8f,
+  0xc0, 0x16, 0x5f, 0x80, 0xbd, 0xcc, 0x59, 0x07, 0x51, 0x2d, 0xc1, 0x28,
+  0xc0, 0x23, 0xee, 0x87, 0xa0, 0x56, 0x48, 0x90, 0x8f, 0x03, 0x89, 0x6a,
+  0x11, 0xc5, 0x0e, 0x07, 0xad, 0x55, 0x1a, 0x0f, 0x27, 0xdd, 0x85, 0xde,
+  0x8c, 0xa1, 0xa1, 0x71, 0x4f, 0xf0, 0x2b, 0xbe, 0x3e, 0x4d, 0xc7, 0xee,
+  0xe5, 0x62, 0xbf, 0xee, 0xd6, 0x71, 0x50, 0xaf, 0x26, 0xf9, 0x92, 0x63,
+  0x09, 0x0a, 0x16, 0xbe, 0xcb, 0xf5, 0xce, 0xa7, 0x07, 0x3d, 0x10, 0xdc,
+  0x96, 0x65, 0x40, 0x22, 0x11, 0xfd, 0x23, 0x34, 0x4b, 0x60, 0x6f, 0x73,
+  0x74, 0xfe, 0x41, 0xea, 0x21, 0x7b, 0x9d, 0xa7, 0xfa, 0x13, 0x97, 0xa0,
+  0xd3, 0x01, 0x7c, 0xd2, 0xc5, 0x7d, 0x1c, 0xbc, 0xb2, 0x37, 0x7c, 0xd2,
+  0x3c, 0x03, 0x6c, 0x11, 0x76, 0xd1, 0x77, 0x43, 0x89, 0x83, 0x24, 0xe4,
+  0x94, 0x2e, 0xc1, 0x26, 0x49, 0xc2, 0x09, 0x7b, 0x18, 0x32, 0x83, 0xa9,
+  0xf8, 0x6a, 0xf1, 0x90, 0x36, 0x64, 0x2a, 0x32, 0x1d, 0x56, 0xcc, 0x77,
+  0x14, 0xc4, 0x8f, 0x18, 0xe7, 0x67, 0xa4, 0xf3, 0xa5, 0xa2, 0xfd, 0xbc,
+  0x4d, 0x24, 0x63, 0x56, 0xcf, 0x31, 0xc9, 0x32, 0x3e, 0x2a, 0xab, 0xe5,
+  0x30, 0x26, 0x17, 0x77, 0x78, 0x25, 0x7d, 0x97, 0x3e, 0xbf, 0x1b, 0x26,
+  0xbf, 0x21, 0xf5, 0x43, 0x91, 0xa4, 0xae, 0x26, 0xbc, 0x81, 0x3d, 0x22,
+  0x99, 0x08, 0x51, 0x0a, 0x56, 0x4e, 0x37, 0x64, 0x1d, 0xb3, 0x66, 0xaf,
+  0x08, 0x81, 0xc8, 0x01, 0x4f, 0x8a, 0x54, 0x8a, 0xe8, 0x5b, 0x2c, 0xe0,
+  0xe9, 0x87, 0x0f, 0xf1, 0x4a, 0xf8, 0xaa, 0x86, 0xb0, 0x15, 0x35, 0x50,
+  0xfc, 0xec, 0xc3, 0x87, 0xe6, 0x2f, 0xbb, 0x59, 0xab, 0xc4, 0xe7, 0x5e,
+  0x71, 0xa8, 0x45, 0xf2, 0x9b, 0x65, 0xa6, 0xd2, 0x60, 0x16, 0x8d, 0xe3,
+  0x51, 0xa9, 0x99, 0xee, 0xd3, 0xbc, 0x93, 0x80, 0x4f, 0xad, 0x3f, 0x91,
+  0x48, 0xb5, 0x80, 0xaa, 0xe5, 0x9a, 0x60, 0xbe, 0x8b, 0x1b, 0x3a, 0x95,
+  0x42, 0x81, 0xae, 0x9b, 0xde, 0xd5, 0xaf, 0x5b, 0x69, 0xf6, 0x52, 0x1b,
+  0xa4, 0x90, 0x4a, 0x59, 0x23, 0x70, 0x0f, 0xaf, 0x16, 0x75, 0x3e, 0xe3,
+  0x77, 0x50, 0xda, 0x85, 0x5e, 0xdf, 0xa3, 0xf9, 0xcf, 0x17, 0x2b, 0xb6,
+  0xa9, 0xb4, 0xdc, 0x2f, 0x7f, 0xd0, 0x95, 0xa9, 0xe8, 0x9a, 0xf6, 0x59,
+  0xfa, 0x90, 0xf8, 0xea, 0xd8, 0x5a, 0xd7, 0x2e, 0xc8, 0xbd, 0x46, 0xbf,
+  0x84, 0xe8, 0xc8, 0xf2, 0xa0, 0x30, 0x17, 0x03, 0xbc, 0xda, 0x71, 0x98,
+  0xdd, 0x1d, 0xa4, 0x49, 0x5f, 0xd9, 0x07, 0x9a, 0x6c, 0x81, 0xfa, 0x49,
+  0xea, 0x22, 0x19, 0x7a, 0x7c, 0xcb, 0x5c, 0x17, 0x25, 0x2d, 0xe8, 0x5c,
+  0xb5, 0x0e, 0x01, 0x2d, 0x46, 0xa0, 0x01, 0xf9, 0x94, 0xab, 0xf9, 0x22,
+  0x00, 0x52, 0x61, 0x80, 0x47, 0x74, 0xb0, 0xa8, 0x55, 0x4f, 0x35, 0xf6,
+  0x7a, 0xcc, 0xae, 0xf5, 0xfa, 0xb1, 0xab, 0x68, 0x3f, 0x3c, 0x86, 0xff,
+  0xf8, 0x9c, 0x9f, 0x60, 0x8e, 0x1e, 0xa9, 0x54, 0x63, 0x0a, 0x70, 0x35,
+  0xcb, 0xb2, 0xa5, 0xa2, 0x2a, 0xa4, 0x12, 0xa3, 0x9e, 0x43, 0x3b, 0x86,
+  0xa2, 0x02, 0xe8, 0x2e, 0x54, 0xb3, 0x66, 0xdd, 0x01, 0xd7, 0xdb, 0x9b,
+  0x23, 0x4f, 0x7c, 0xcf, 0x38, 0x43, 0xb5, 0x6e, 0x9f, 0xab, 0x2d, 0x31,
+  0x0d, 0x4d, 0x9d, 0xe9, 0x3e, 0x91, 0x6e, 0xc9, 0x74, 0x96, 0x75, 0xd9,
+  0xdc, 0x96, 0xd1, 0xb9, 0x6e, 0x15, 0x1d, 0x8f, 0xf9, 0x39, 0x24, 0xf6,
+  0x0a, 0x7d, 0x30, 0x93, 0xf2, 0xb8, 0x28, 0x3e, 0x2e, 0x23, 0x02, 0xa8,
+  0x54, 0x29, 0x01, 0x87, 0x81, 0x68, 0x61, 0xc2, 0x6e, 0x4c, 0x61, 0x24,
+  0x6a, 0x01, 0xfc, 0x6e, 0x99, 0x11, 0x66, 0xab, 0x5b, 0xcf, 0xfd, 0x6e,
+  0xe3, 0xbe, 0x0f, 0xfd, 0x0e, 0x88, 0x19, 0xb0, 0xff, 0x59, 0x1b, 0xe2,
+  0xa3, 0xd5, 0x8b, 0xc4, 0x95, 0x28, 0xcb, 0xcc, 0x0f, 0x2a, 0xaa, 0x87,
+  0x71, 0x91, 0x75, 0x12, 0x06, 0xc6, 0x45, 0xec, 0xb8, 0x35, 0x57, 0x13,
+  0x2a, 0x72, 0x83, 0xa9, 0x5c, 0xb1, 0x5e, 0x81, 0xee, 0x21, 0xe5, 0x61,
+  0x70, 0x09, 0xa0, 0x2d, 0xa6, 0x6c, 0xd1, 0xae, 0x6d, 0xf3, 0x8f, 0x41,
+  0xc6, 0xa8, 0x38, 0x11, 0x7c, 0x3d, 0x4a, 0xad, 0x07, 0x4b, 0xb3, 0x88,
+  0x9b, 0x69, 0x47, 0x2d, 0x8f, 0xb7, 0x05, 0xe7, 0x32, 0x3b, 0xfa, 0x75,
+  0xd7, 0x8e, 0xbe, 0x19, 0x73, 0x31, 0x6b, 0x3b, 0x99, 0x34, 0xd0, 0x6f,
+  0x14, 0x02, 0xb5, 0x4e, 0x23, 0x4b, 0x5d, 0x98, 0x99, 0x84, 0x22, 0x4d,
+  0xef, 0xb8, 0x0e, 0xc4, 0x9a, 0x5c, 0x6e, 0x1c, 0xb8, 0x04, 0xea, 0x81,
+  0xc7, 0xd3, 0x51, 0x78, 0x04, 0x2b, 0x40, 0x8d, 0xe4, 0xcc, 0x23, 0x79,
+  0x59, 0xa8, 0x44, 0x89, 0xaa, 0x9a, 0x49, 0x8e, 0xa3, 0xf6, 0x66, 0xb3,
+  0xf2, 0x85, 0x1a, 0x73, 0x66, 0xa4, 0x02, 0xb0, 0x93, 0x6b, 0x52, 0x05,
+  0x45, 0xa9, 0x86, 0x72, 0x31, 0x36, 0x3d, 0x14, 0x11, 0x7d, 0x21, 0xf6,
+  0x6e, 0x2d, 0x84, 0x5f, 0x56, 0xf4, 0xc8, 0x09, 0xda, 0x7f, 0xa2, 0x90,
+  0xaa, 0x50, 0x86, 0x2f, 0x9f, 0xc5, 0x88, 0xfb, 0x11, 0x7e, 0x28, 0xb6,
+  0xd8, 0xdf, 0x56, 0x39, 0x8f, 0x48, 0xd2, 0xd7, 0x5f, 0xa1, 0x58, 0x6d,
+  0xa5, 0xd8, 0xdd, 0x6b, 0x68, 0x62, 0x0a, 0x23, 0x2a, 0x55, 0xaa, 0xd0,
+  0xe7, 0x23, 0x13, 0x96, 0x49, 0x05, 0x87, 0xc6, 0xaa, 0x0e, 0x2e, 0xdd,
+  0x39, 0x5d, 0x52, 0x43, 0x47, 0x09, 0x4b, 0x02, 0xa1, 0x83, 0x2d, 0x59,
+  0x1d, 0x37, 0xd5, 0x6d, 0xac, 0x81, 0xf6, 0x1b, 0xf8, 0x71, 0x04, 0xed,
+  0x35, 0x08, 0x51, 0x73, 0x46, 0x02, 0x59, 0x7e, 0x3b, 0xc2, 0x68, 0x62,
+  0x45, 0x26, 0xb9, 0x29, 0x83, 0x26, 0xb7, 0xb7, 0x4d, 0x03, 0xa6, 0x57,
+  0xa5, 0xd5, 0x6c, 0x90, 0xb7, 0x37, 0xbe, 0x96, 0x8b, 0x37, 0x88, 0x4e,
+  0x40, 0x96, 0xcf, 0x09, 0x4d, 0xa3, 0x43, 0xb2, 0xa4, 0x63, 0x0a, 0xaf,
+  0xc7, 0xc4, 0xcd, 0x93, 0xbd, 0x86, 0x29, 0x34, 0xc2, 0x52, 0xd0, 0xb4,
+  0x0e, 0x30, 0x89, 0x6b, 0x88, 0x34, 0xbd, 0x38, 0x1f, 0x54, 0xa2, 0xc5,
+  0x05, 0xda, 0x16, 0x16, 0xc5, 0x30, 0xec, 0x46, 0xe5, 0xc8, 0x87, 0x30,
+  0xaa, 0x5b, 0x09, 0xfc, 0x42, 0x63, 0xcc, 0xd5, 0x4c, 0xc0, 0x52, 0xfd,
+  0xe4, 0xfc, 0xec, 0xfc, 0x49, 0x3f, 0x39, 0x79, 0x73, 0x48, 0x7f, 0x97,
+  0x92, 0x39, 0x97, 0xac, 0x21, 0x0a, 0x44, 0x8f, 0x53, 0x69, 0x2f, 0x4f,
+  0x47, 0x81, 0x09, 0xe0, 0xdd, 0x07, 0xb1, 0xe4, 0xe1, 0xb4, 0x33, 0xd1,
+  0x9d, 0xe1, 0x8a, 0x44, 0x21, 0xba, 0xb0, 0xec, 0xa0, 0x2b, 0x45, 0x27,
+  0xae, 0x55, 0xa3, 0x80, 0x57, 0xbf, 0x59, 0x7b, 0x47, 0xca, 0xa7, 0x43,
+  0x1f, 0x85, 0xa4, 0x7b, 0x53, 0xdf, 0x07, 0x96, 0x7c, 0xce, 0x32, 0x02,
+  0xa3, 0x21, 0x91, 0xf6, 0x37, 0x51, 0x05, 0xd4, 0x04, 0x18, 0x44, 0x5e,
+  0x90, 0x3a, 0x61, 0xd6, 0x32, 0x06, 0x9e, 0x5d, 0xb1, 0x93, 0xa1, 0x7c,
+  0x68, 0x90, 0x62, 0xb5, 0xea, 0xbb, 0x36, 0x0b, 0xef, 0x74, 0x1a, 0x0f,
+  0xcc, 0xc0, 0xc6, 0x42, 0x89, 0x69, 0x47, 0xb5, 0xfe, 0x12, 0xfd, 0xc4,
+  0xf5, 0xb1, 0x79, 0xae, 0x79, 0xf1, 0x87, 0x51, 0x73, 0xbe, 0xf6, 0xa5,
+  0x84, 0xeb, 0x68, 0x31, 0xe5, 0x60, 0x98, 0x1d, 0x05, 0x22, 0xba, 0x90,
+  0xec, 0x49, 0xaa, 0x82, 0x63, 0x0f, 0xb6, 0xa5, 0xd7, 0xd5, 0x0a, 0x6e,
+  0x51, 0x4d, 0x9b, 0x6b, 0xad, 0x36, 0xe6, 0xa7, 0x03, 0x2c, 0xd7, 0x4f,
+  0x74, 0x03, 0xe8, 0x0e, 0xd0, 0x2d, 0x40, 0x8b, 0xa9, 0xfc, 0x8e, 0xe1,
+  0x0e, 0x68, 0x16, 0x91, 0x8c, 0x86, 0x23, 0xe7, 0xb0, 0x56, 0x57, 0xc9,
+  0xa7, 0x2e, 0xbb, 0x5b, 0xe8, 0x4f, 0x2e, 0x83, 0xb4, 0x76, 0x35, 0xfc,
+  0x72, 0xe8, 0x7a, 0xc0, 0x83, 0xe6, 0x77, 0x0d, 0xf6, 0xc8, 0x56, 0xaa,
+  0xed, 0xc6, 0x0a, 0xc1, 0xb3, 0xe1, 0xb3, 0xed, 0xe1, 0xa7, 0x2e, 0x8b,
+  0xd3, 0xb1, 0x75, 0x51, 0x62, 0x5e, 0xc4, 0xf4, 0x23, 0x4b, 0x02, 0x05,
+  0x76, 0x30, 0xce, 0xd2, 0x08, 0xad, 0xae, 0xcc, 0xa4, 0xa1, 0x7e, 0x55,
+  0x37, 0xa0, 0xcf, 0x7c, 0x91, 0x80, 0xf3, 0x3e, 0x45, 0xfe, 0x40, 0x58,
+  0xf5, 0xf1, 0x6a, 0x96, 0xde, 0x77, 0x71, 0x34, 0xe2, 0x30, 0x4b, 0xfd,
+  0x1f, 0x9a, 0xed, 0x10, 0x3e, 0x5b, 0xf9, 0xdd, 0xfb, 0xf5, 0xf1, 0xe1,
+  0xe8, 0x72, 0xd8, 0xbe, 0x72, 0xa2, 0x74, 0x16, 0xd4, 0x2f, 0x57, 0x37,
+  0x11, 0xa4, 0x02, 0x3b, 0x16, 0xb9, 0x26, 0x5d, 0xe9, 0x68, 0x7d, 0xb8,
+  0x77, 0x03, 0xe9, 0x9d, 0xb5, 0xcf, 0xf9, 0x37, 0x1d, 0x04, 0x3a, 0xd0,
+  0x10, 0x11, 0xf0, 0x1c, 0xe7, 0x33, 0x1e, 0x01, 0xf5, 0x8b, 0x44, 0xef,
+  0x5c, 0x71, 0xfe, 0x5c, 0x18, 0x34, 0x29, 0x66, 0xec, 0x12, 0xc1, 0x67,
+  0xda, 0x6c, 0xa5, 0xed, 0x7d, 0xf3, 0xc3, 0xe1, 0xc5, 0xdb, 0x93, 0xb7,
+  0xdf, 0x1c, 0x34, 0xee, 0xcc, 0x59, 0x51, 0x54, 0x99, 0xc6, 0xe8, 0x85,
+  0x28, 0x55, 0x66, 0x4b, 0xf2, 0x13, 0x83, 0xf2, 0xe6, 0x71, 0xa1, 0xe5,
+  0x59, 0x7a, 0x2d, 0x6c, 0x70, 0xd5, 0x6d, 0xa2, 0x65, 0xc8, 0xc1, 0xd3,
+  0xcf, 0x1a, 0xcf, 0xf0, 0xf1, 0x0a, 0x7b, 0x55, 0x31, 0xb9, 0xad, 0x9e,
+  0x8a, 0xb3, 0xeb, 0x93, 0x91, 0xdf, 0xa3, 0xb3, 0xa3, 0xef, 0x46, 0x4f,
+  0x03, 0xdc, 0x77, 0xdd, 0x72, 0xdc, 0x28, 0xb5, 0x33, 0xde, 0x88, 0xd3,
+  0x24, 0x3f, 0x02, 0xfa, 0x7e, 0xa4, 0x22, 0x6a, 0xe7, 0xb1, 0xf2, 0x7c,
+  0xf0, 0xec, 0x0a, 0x61, 0x57, 0x57, 0x5e, 0xac, 0x1c, 0x49, 0x6e, 0x40,
+  0x97, 0xd4, 0x37, 0x72, 0xf8, 0x8e, 0x92, 0x4f, 0x46, 0x15, 0x1f, 0x90,
+  0xc3, 0x47, 0xe8, 0x38, 0xa6, 0x81, 0x10, 0x67, 0xc9, 0xe7, 0xfd, 0xb6,
+  0xba, 0x43, 0x92, 0x82, 0xf4, 0xbf, 0xd9, 0x8a, 0xbf, 0x0c, 0xbe, 0x08,
+  0x47, 0xa8, 0xe1, 0xc0, 0x9a, 0x6d, 0xfd, 0x43, 0x66, 0xde, 0xd0, 0xe4,
+  0x4c, 0x15, 0xe2, 0xbb, 0xaa, 0x8b, 0x9d, 0xea, 0x53, 0x07, 0x3b, 0x3b,
+  0xde, 0x9d, 0x25, 0xe0, 0xc2, 0xe1, 0xef, 0x67, 0x15, 0xc8, 0x37, 0xd3,
+  0xdf, 0xb4, 0x29, 0xd2, 0x4f, 0xdb, 0x15, 0x91, 0x96, 0xfc, 0x2b, 0x77,
+  0xc5, 0x17, 0xeb, 0x84, 0xad, 0x0e, 0xff, 0x57, 0xec, 0x09, 0xa3, 0xd7,
+  0xfe, 0xdf, 0x69, 0x57, 0xa4, 0x9f, 0xb6, 0x2d, 0xd2, 0xc6, 0xbe, 0x58,
+  0x93, 0x93, 0xfc, 0x7b, 0x16, 0x8c, 0x43, 0x37, 0x9e, 0x0d, 0x1c, 0xfd,
+  0xed, 0xc7, 0x76, 0x4c, 0xc3, 0x45, 0xcb, 0x4a, 0x02, 0x36, 0xcd, 0x33,
+  0x1d, 0xed, 0x16, 0x3c, 0xc1, 0x59, 0x48, 0xda, 0x65, 0xce, 0xf8, 0x6e,
+  0x16, 0x5e, 0xdc, 0x7d, 0xdb, 0x1f, 0x95, 0x40, 0x6e, 0x6f, 0x09, 0x7f,
+  0x90, 0xec, 0xae, 0x08, 0xce, 0xfc, 0xeb, 0xf7, 0xda, 0xff, 0x11, 0x12,
+  0xe8, 0x99, 0x27, 0x2f, 0xfe, 0x94, 0x3d, 0xf7, 0xec, 0xc6, 0xed, 0xb9,
+  0xae, 0x0a, 0x6a, 0x26, 0x9b, 0xfe, 0xd1, 0x5b, 0xae, 0xa5, 0x7b, 0x74,
+  0xe8, 0x55, 0x36, 0xeb, 0x08, 0x53, 0x97, 0x64, 0x62, 0x03, 0xdd, 0x10,
+  0x72, 0xe4, 0x6a, 0x12, 0x48, 0x4c, 0x18, 0xaf, 0xfb, 0xd8, 0xa5, 0xf2,
+  0x06, 0xde, 0x63, 0x61, 0x43, 0xa2, 0x1e, 0x44, 0x77, 0xe6, 0xb3, 0xdf,
+  0x22, 0x1e, 0x6d, 0xa7, 0x73, 0x3e, 0xfd, 0x58, 0x92, 0x86, 0x65, 0x7f,
+  0xcb, 0xc1, 0x90, 0x30, 0x51, 0x07, 0xa6, 0x10, 0xc1, 0x60, 0x30, 0x6e,
+  0x5a, 0x92, 0xd5, 0x47, 0xf7, 0x7a, 0x43, 0x8e, 0x76, 0x64, 0x16, 0xac,
+  0x4b, 0xb0, 0xfa, 0x3f, 0x45, 0x86, 0x3e, 0xfb, 0xb4, 0xed, 0xfc, 0xcf,
+  0xb8, 0x59, 0xff, 0x37, 0xda, 0xbc, 0x1d, 0xcb, 0xbc, 0xa5, 0xcc, 0x58,
+  0x62, 0x19, 0xca, 0xc5, 0xb2, 0x2d, 0x3c, 0x27, 0x4e, 0x85, 0xc7, 0x24,
+  0x9e, 0x9c, 0x7f, 0xff, 0x99, 0x00, 0xdf, 0x46, 0x31, 0x7b, 0xee, 0xe9,
+  0xab, 0xc3, 0xf3, 0x8e, 0x9b, 0xe1, 0x9a, 0x0c, 0xfe, 0x65, 0x3e, 0x60,
+  0xb3, 0x8a, 0x5d, 0x70, 0x2f, 0xf4, 0x2f, 0xbc, 0xc5, 0xbb, 0x9c, 0x8c,
+  0xe6, 0x24, 0xb5, 0xe7, 0x85, 0x9e, 0x53, 0x22, 0xc6, 0x18, 0xa5, 0xda,
+  0x67, 0x1c, 0x70, 0x9a, 0xcc, 0xa7, 0x3b, 0xf2, 0xcf, 0xc1, 0xd5, 0xdf,
+  0xa6, 0xb1, 0xa9, 0x17, 0x72, 0x76, 0x36, 0xd2, 0xe2, 0x94, 0x4f, 0x34,
+  0xaf, 0xd7, 0xd5, 0xb3, 0xac, 0x0e, 0x82, 0x53, 0x9e, 0x68, 0xa6, 0x27,
+  0xe8, 0xfb, 0xd7, 0x8d, 0x4b, 0xf6, 0x5c, 0x44, 0x70, 0x2c, 0x74, 0xe0,
+  0x20, 0x16, 0xe6, 0x5f, 0xef, 0x04, 0x4d, 0xb9, 0xf6, 0x3b, 0x7e, 0x66,
+  0xad, 0x77, 0x24, 0xf0, 0xf0, 0xc7, 0xa4, 0x2d, 0x66, 0x78, 0xd3, 0x5e,
+  0x05, 0xdf, 0x89, 0x7f, 0x09, 0x7f, 0xc3, 0xa4, 0xa3, 0x0e, 0xfa, 0x3d,
+  0xaa, 0x2d, 0xf8, 0xbb, 0x56, 0x9e, 0x77, 0xeb, 0x2e, 0xb4, 0xf4, 0xca,
+  0x47, 0xb6, 0x98, 0xe4, 0xcb, 0x74, 0xa6, 0x49, 0x86, 0x8f, 0x95, 0x47,
+  0x68, 0xb3, 0xcb, 0x37, 0x07, 0x44, 0xc6, 0x76, 0xbb, 0x14, 0x5d, 0xd5,
+  0x60, 0xd5, 0x95, 0xe7, 0x12, 0x4b, 0xe0, 0xc5, 0xda, 0xe1, 0x78, 0xaa,
+  0x95, 0x2e, 0xb0, 0x7f, 0x64, 0x94, 0xe2, 0x91, 0x38, 0x29, 0x09, 0x01,
+  0x6a, 0x50, 0x0f, 0xed, 0x3d, 0xff, 0x6c, 0x2f, 0xa9, 0xb8, 0xf0, 0x74,
+  0xce, 0x25, 0x78, 0xa4, 0x81, 0xa7, 0xc3, 0x27, 0x3b, 0x4f, 0x87, 0x4f,
+  0x13, 0x5f, 0xa8, 0x6f, 0x9c, 0xd9, 0x07, 0x48, 0x70, 0x46, 0xac, 0x0c,
+  0x72, 0x9e, 0xde, 0x1e, 0x1f, 0xb1, 0xa8, 0xb6, 0x84, 0xd3, 0x96, 0x79,
+  0x67, 0xa4, 0x40, 0x34, 0x6b, 0x43, 0x97, 0xa3, 0xda, 0x65, 0x94, 0x76,
+  0x4c, 0x47, 0x62, 0x7b, 0x13, 0x10, 0xfd, 0x85, 0xeb, 0x09, 0x0b, 0x4b,
+  0xd9, 0xa6, 0x3a, 0x33, 0x5d, 0x14, 0x14, 0xe1, 0xa4, 0x04, 0x53, 0x36,
+  0x7c, 0x9c, 0xf0, 0xbf, 0xaa, 0xc9, 0x4e, 0x2d, 0xbb, 0x51, 0x42, 0x17,
+  0xea, 0x8c, 0x44, 0x28, 0x90, 0x6b, 0x87, 0x6a, 0x91, 0x68, 0x79, 0xc5,
+  0xf0, 0xf3, 0x8d, 0x94, 0x0a, 0x03, 0xbf, 0xe0, 0x6e, 0x5a, 0x57, 0xa5,
+  0x5c, 0x6a, 0x23, 0x80, 0xc2, 0x1f, 0x65, 0x16, 0x37, 0x07, 0x9b, 0x76,
+  0x49, 0x19, 0x76, 0x86, 0xbf, 0x56, 0x8b, 0xc7, 0xb4, 0x4d, 0xfb, 0xfc,
+  0x0f, 0xd7, 0x5b, 0x6b, 0xbe, 0x0d, 0xea, 0x6c, 0xb6, 0xc8, 0x6a, 0xad,
+  0xdd, 0x95, 0xbc, 0x38, 0x3b, 0xbf, 0x7c, 0x79, 0x97, 0xce, 0x22, 0x8c,
+  0x07, 0xb3, 0xf8, 0x59, 0xa5, 0x33, 0xe7, 0xcd, 0xe5, 0x37, 0x83, 0xe4,
+  0xa8, 0x91, 0xcb, 0x11, 0x0a, 0x6a, 0xa2, 0x45, 0xb9, 0x40, 0x97, 0x97,
+  0x7f, 0x39, 0x3f, 0x7e, 0xf9, 0x82, 0x7d, 0xc1, 0x5f, 0xb2, 0x43, 0xbe,
+  0x6a, 0xb8, 0x86, 0xb9, 0xa6, 0x66, 0x7c, 0x33, 0xfe, 0xf8, 0xea, 0x64,
+  0x74, 0x7e, 0x7a, 0x76, 0xf4, 0xf2, 0xc5, 0x8f, 0x1c, 0xc2, 0xa4, 0xd9,
+  0x7b, 0x08, 0xde, 0x75, 0x3f, 0x73, 0xe9, 0x0e, 0x71, 0x7d, 0x9b, 0xe3,
+  0x1f, 0xde, 0x1f, 0xbf, 0xfd, 0xfe, 0xe5, 0x8b, 0xbb, 0xb4, 0xec, 0xf3,
+  0xf8, 0xe4, 0x6d, 0x76, 0xc9, 0x76, 0x94, 0x98, 0x0c, 0xe6, 0xe8, 0x12,
+  0x05, 0x8f, 0x96, 0x8c, 0x1d, 0x7c, 0x04, 0x56, 0x26, 0x77, 0x99, 0x2f,
+  0x29, 0xd3, 0x56, 0xf0, 0x03, 0x14, 0x5b, 0x33, 0xa5, 0xf5, 0xdd, 0xc5,
+  0x69, 0x77, 0x59, 0x7b, 0x57, 0xfe, 0xd6, 0x53, 0x6e, 0xab, 0x6f, 0xc8,
+  0xb7, 0x0a, 0x7e, 0xeb, 0x23, 0x97, 0xdc, 0xa6, 0x94, 0x95, 0x8f, 0x62,
+  0xe8, 0x44, 0x74, 0x79, 0x38, 0xad, 0xab, 0xf6, 0x24, 0x20, 0x1a, 0x1a,
+  0x41, 0x8e, 0x0c, 0xfa, 0x1d, 0x43, 0xa6, 0xcc, 0x62, 0x97, 0x97, 0xc7,
+  0xbe, 0x23, 0xf6, 0x0e, 0xa5, 0x86, 0x11, 0x20, 0x18, 0xdb, 0x91, 0x10,
+  0xe5, 0x4a, 0x82, 0x4a, 0x73, 0x10, 0x22, 0x88, 0x8b, 0xb2, 0x9b, 0x96,
+  0x9a, 0x4b, 0xf2, 0xdc, 0x30, 0x34, 0xde, 0xfa, 0x55, 0xca, 0xfe, 0x6d,
+  0x26, 0x3f, 0x58, 0x6a, 0x5a, 0xc0, 0x15, 0xde, 0x91, 0x1e, 0xd7, 0xe4,
+  0xd7, 0x94, 0x48, 0x24, 0xeb, 0x94, 0x9c, 0xbb, 0xc7, 0xe9, 0x97, 0x0e,
+  0x39, 0x2c, 0x0b, 0xeb, 0xd9, 0x99, 0xe3, 0x58, 0x26, 0x0a, 0xdc, 0xba,
+  0x33, 0x67, 0x87, 0xad, 0x70, 0xb4, 0xd4, 0x5b, 0xa3, 0x6d, 0x97, 0xee,
+  0xc8, 0x2d, 0x9e, 0xbf, 0xbb, 0x0c, 0x32, 0x5d, 0x23, 0xb4, 0x5a, 0x74,
+  0x08, 0x5b, 0x8a, 0xb2, 0x9f, 0xa8, 0xde, 0xa0, 0xd7, 0xa6, 0x8e, 0x37,
+  0x57, 0x3f, 0x09, 0x06, 0xae, 0xd1, 0xea, 0x33, 0xe9, 0x23, 0xd5, 0x4f,
+  0x71, 0xc4, 0x92, 0xeb, 0xc5, 0x45, 0x8f, 0x05, 0x88, 0x94, 0x39, 0x8a,
+  0xf3, 0xe0, 0x3b, 0xc3, 0xf0, 0x3b, 0x12, 0x78, 0xdb, 0x8e, 0x92, 0xfa,
+  0x1e, 0xda, 0x48, 0x7d, 0xf7, 0x6d, 0xee, 0xa7, 0xa3, 0x34, 0x93, 0x9e,
+  0xc1, 0xe7, 0xcd, 0x61, 0x85, 0x31, 0xed, 0xbc, 0x0e, 0x9a, 0x74, 0xb9,
+  0xbe, 0xc0, 0xbc, 0x2d, 0x35, 0x53, 0x39, 0x3b, 0x1d, 0xa0, 0x2f, 0xa3,
+  0x54, 0xd6, 0x68, 0x93, 0xc5, 0x14, 0xad, 0xd9, 0xaa, 0x93, 0x34, 0x48,
+  0x16, 0xb1, 0x63, 0x52, 0xff, 0xd2, 0x52, 0x90, 0x59, 0x14, 0x0e, 0x2e,
+  0x3d, 0x6a, 0x8f, 0x41, 0x77, 0x9d, 0x00, 0x2c, 0x54, 0xd0, 0x19, 0x5c,
+  0x46, 0x7c, 0x64, 0xfc, 0x02, 0x43, 0xd6, 0x02, 0x28, 0x3b, 0x10, 0xa2,
+  0xbc, 0x2e, 0xb2, 0x93, 0x34, 0xe3, 0x06, 0x4a, 0xc5, 0x50, 0x01, 0xb4,
+  0x1c, 0x0f, 0x59, 0x93, 0xd7, 0x5c, 0x25, 0xbd, 0xeb, 0x59, 0x31, 0x1e,
+  0xd3, 0xa0, 0x7a, 0x76, 0xc5, 0x51, 0x0f, 0xd3, 0xf2, 0x1a, 0x2a, 0x6f,
+  0xdf, 0xd8, 0xea, 0xfc, 0x61, 0x45, 0x91, 0x0a, 0x7c, 0x6b, 0x5d, 0x6e,
+  0x2e, 0xd6, 0xd6, 0x98, 0xcd, 0x6d, 0x5d, 0x51, 0x44, 0xe2, 0x21, 0xa8,
+  0x70, 0x05, 0x2c, 0x16, 0xff, 0xd4, 0xbe, 0x1f, 0xc1, 0x78, 0x39, 0x97,
+  0xd4, 0x67, 0x7d, 0xaa, 0xf0, 0x81, 0xc8, 0xd1, 0xe2, 0x01, 0x79, 0xb5,
+  0xa6, 0x3e, 0xf8, 0x65, 0xd2, 0xfb, 0x0f, 0xee, 0xc4, 0x5e, 0x9f, 0xff,
+  0xdc, 0xff, 0xcf, 0x5e, 0x58, 0xdb, 0x5c, 0x3a, 0x5f, 0x33, 0x2b, 0x7f,
+  0x65, 0x75, 0x29, 0x3a, 0xca, 0x50, 0x70, 0xd8, 0x70, 0x6d, 0xeb, 0xf9,
+  0xfc, 0xfa, 0xa7, 0xbd, 0xc1, 0xde, 0xee, 0xee, 0xee, 0x2f, 0xc3, 0x25,
+  0x4f, 0xdd, 0x15, 0x9a, 0xa7, 0x3f, 0x87, 0xcb, 0x7c, 0xc2, 0x8e, 0x7c,
+  0x5a, 0xcc, 0x3c, 0x45, 0xfd, 0x74, 0xf9, 0xde, 0x4e, 0x70, 0xf3, 0xd7,
+  0x93, 0xe5, 0x60, 0x51, 0x74, 0x41, 0x64, 0x2e, 0x57, 0xe5, 0x22, 0xa8,
+  0xaf, 0xf6, 0xfe, 0xed, 0xd9, 0xab, 0xe3, 0xd3, 0xc3, 0xbf, 0x18, 0xc4,
+  0xd6, 0xd1, 0x26, 0x70, 0x47, 0xde, 0x67, 0x69, 0xf5, 0xf0, 0xbe, 0xca,
+  0x6a, 0xfa, 0xe5, 0xd6, 0x93, 0x6d, 0x64, 0xbe, 0x46, 0xc5, 0x4c, 0xaf,
+  0xb3, 0x46, 0x51, 0x66, 0x45, 0x2c, 0xf9, 0xdb, 0x7b, 0xd8, 0x0e, 0x3d,
+  0x35, 0x80, 0xaf, 0x35, 0x47, 0x43, 0xc6, 0xb3, 0xdb, 0x2a, 0xff, 0x3b,
+  0xdd, 0x3b, 0xcc, 0xed, 0x17, 0xe3, 0x99, 0x2f, 0x95, 0x41, 0xa1, 0x4e,
+  0xf8, 0x6f, 0xc9, 0xd7, 0xa7, 0xdf, 0x31, 0x8c, 0xdc, 0x19, 0x35, 0x73,
+  0x49, 0xd9, 0x4f, 0xbe, 0x7c, 0xb6, 0xb7, 0xbf, 0x1d, 0x14, 0xae, 0xe6,
+  0x64, 0x14, 0x3e, 0x9c, 0x51, 0x58, 0xfd, 0xef, 0x0a, 0x10, 0x08, 0xa4,
+  0xb2, 0x8f, 0x31, 0x02, 0xdb, 0x62, 0xb7, 0x1c, 0x48, 0xe7, 0x10, 0x0b,
+  0xae, 0x41, 0xf3, 0xc7, 0x89, 0x22, 0x11, 0x59, 0xce, 0xa5, 0xcf, 0x0a,
+  0x1a, 0x06, 0xf5, 0xd8, 0x12, 0xea, 0x8e, 0xe6, 0x97, 0x74, 0xeb, 0x26,
+  0xff, 0x68, 0x5d, 0xe7, 0xa3, 0x91, 0x2a, 0x9a, 0xed, 0x59, 0xc5, 0x51,
+  0x62, 0xd6, 0x3f, 0x92, 0x17, 0xf6, 0xb7, 0x2f, 0x63, 0x64, 0x5d, 0xc2,
+  0x41, 0x99, 0x98, 0xc3, 0x06, 0x7a, 0x0b, 0x8a, 0xd1, 0x32, 0xa6, 0xd1,
+  0xd7, 0x92, 0x08, 0xf3, 0x0d, 0x62, 0xf8, 0xa7, 0x1b, 0x57, 0x6f, 0x74,
+  0x71, 0xde, 0xeb, 0xab, 0x9d, 0x42, 0x1f, 0x18, 0xd0, 0xbf, 0xa9, 0xbf,
+  0x50, 0xe1, 0x9f, 0xed, 0x3e, 0x7b, 0xba, 0xad, 0x4e, 0x0f, 0xf4, 0x13,
+  0x99, 0xa7, 0x1d, 0x9c, 0xff, 0xf8, 0xa5, 0xab, 0x87, 0x28, 0xdc, 0x17,
+  0x3e, 0xd1, 0x8e, 0xb6, 0x5e, 0x73, 0x94, 0xe2, 0x30, 0xe9, 0x2b, 0xaf,
+  0xfd, 0x5a, 0x54, 0x84, 0xae, 0x19, 0xf4, 0x3e, 0x74, 0x33, 0xae, 0x55,
+  0xfb, 0xb4, 0x35, 0x91, 0xe8, 0xe0, 0x0b, 0xfe, 0xb3, 0x6b, 0x02, 0xf9,
+  0xe7, 0xce, 0xa4, 0xc5, 0xbe, 0x32, 0x76, 0x1f, 0x9e, 0xd9, 0xf6, 0xc4,
+  0x2a, 0xc3, 0xd4, 0xfa, 0x28, 0x8a, 0x8b, 0xbb, 0x87, 0x83, 0x1b, 0xba,
+  0xc0, 0x68, 0xa5, 0x09, 0x27, 0xcd, 0xc9, 0xd1, 0xf4, 0x96, 0xc8, 0xb6,
+  0xac, 0x3f, 0x3e, 0x38, 0xd7, 0xc6, 0x0b, 0xfb, 0x5b, 0xd7, 0x20, 0x7d,
+  0x59, 0xca, 0x7f, 0xce, 0x20, 0xfd, 0x18, 0xa5, 0x64, 0xbc, 0xa6, 0xef,
+  0x54, 0x1d, 0xf5, 0x5c, 0x1e, 0x1b, 0x5e, 0x39, 0x30, 0x54, 0x7f, 0x37,
+  0xc9, 0xed, 0x85, 0xe2, 0x7f, 0x52, 0x14, 0x8b, 0x67, 0x8c, 0x09, 0x35,
+  0x75, 0xa9, 0x22, 0x61, 0x70, 0xac, 0xef, 0x7a, 0x0c, 0x86, 0xdc, 0x38,
+  0x31, 0xf4, 0xd2, 0xe5, 0x87, 0x38, 0xd4, 0x5a, 0xd5, 0x2c, 0x4c, 0x25,
+  0xf1, 0xbe, 0xd5, 0xc2, 0x3e, 0xe3, 0xa1, 0x27, 0x50, 0x0a, 0x22, 0xb4,
+  0xd2, 0x24, 0xcb, 0x95, 0x82, 0xf3, 0x63, 0x10, 0xdf, 0xcf, 0x9a, 0x03,
+  0x66, 0xee, 0x95, 0x4e, 0xa5, 0xde, 0xaa, 0xc0, 0x71, 0x70, 0x58, 0x0a,
+  0x46, 0xd2, 0x93, 0xd3, 0xd5, 0x7c, 0x69, 0x9c, 0x08, 0xcc, 0x97, 0x2e,
+  0x10, 0x51, 0x41, 0x40, 0x91, 0x70, 0xbf, 0x2e, 0xf0, 0x4f, 0xee, 0x67,
+  0x3f, 0xf2, 0x0c, 0x4c, 0x66, 0x2b, 0x4c, 0xce, 0x34, 0x13, 0x7a, 0x46,
+  0xc6, 0x85, 0x07, 0x05, 0x72, 0xfb, 0x8e, 0x9e, 0x00, 0xda, 0x9b, 0xea,
+  0x40, 0xa2, 0xc3, 0xbd, 0x8b, 0x62, 0xb1, 0xac, 0x77, 0x31, 0xac, 0x81,
+  0xd1, 0x40, 0xaa, 0xf2, 0xba, 0x72, 0xe7, 0x56, 0x1d, 0x3d, 0x13, 0x78,
+  0xf6, 0x1a, 0x43, 0xb2, 0xdb, 0xc9, 0x19, 0x3a, 0x38, 0x01, 0xc0, 0x18,
+  0xdc, 0x69, 0x1d, 0xda, 0x71, 0x51, 0x65, 0x92, 0x55, 0x80, 0xa9, 0x88,
+  0x9c, 0x0e, 0xd5, 0x24, 0xcf, 0x7f, 0xcf, 0x28, 0x8b, 0x7c, 0x15, 0x9f,
+  0x79, 0x7c, 0xc1, 0x18, 0x50, 0x89, 0x25, 0xd3, 0x35, 0x6b, 0x2c, 0x9a,
+  0x5b, 0x33, 0x5e, 0x32, 0xb7, 0x62, 0xff, 0xff, 0x59, 0x30, 0xfa, 0xff,
+  0x77, 0x51, 0x41, 0x6d, 0x8c, 0x53, 0xe8, 0x50, 0x67, 0x59, 0xca, 0xa9,
+  0xcd, 0xe6, 0x03, 0xbd, 0xc9, 0x3e, 0x88, 0xf5, 0x18, 0xdf, 0x16, 0x72,
+  0x33, 0xdd, 0x98, 0xdb, 0xe5, 0x70, 0x74, 0x74, 0x72, 0xd2, 0x70, 0x43,
+  0xf1, 0xb4, 0x49, 0x6e, 0x00, 0x90, 0x4c, 0x49, 0xc5, 0x69, 0x12, 0x5e,
+  0x3d, 0x8f, 0x8c, 0x56, 0x4e, 0x11, 0x04, 0xb5, 0x22, 0x57, 0xfd, 0x4b,
+  0xab, 0xdc, 0x72, 0x32, 0x53, 0x15, 0x82, 0x0b, 0x36, 0x2f, 0x19, 0x1c,
+  0x7f, 0xb3, 0x22, 0x65, 0xa9, 0xfa, 0x47, 0x6f, 0xc8, 0xe1, 0xef, 0xbd,
+  0xf5, 0x3a, 0x92, 0xe7, 0xce, 0x4b, 0xcd, 0xef, 0x03, 0x88, 0x17, 0x30,
+  0x68, 0x49, 0x80, 0x63, 0x16, 0x16, 0xb6, 0x22, 0x64, 0x07, 0x52, 0x27,
+  0xad, 0xbf, 0x6c, 0x61, 0x78, 0x15, 0x2b, 0x32, 0xad, 0xe1, 0xc7, 0xa8,
+  0xda, 0xd5, 0x2a, 0x9f, 0x36, 0x54, 0x15, 0x57, 0x84, 0x59, 0xae, 0xd8,
+  0x83, 0xb5, 0xd7, 0x50, 0x90, 0xe6, 0xb6, 0xa6, 0x66, 0x72, 0x58, 0x62,
+  0x4b, 0x6c, 0xaf, 0xc7, 0x6b, 0x28, 0x0e, 0x93, 0x33, 0xb7, 0x30, 0x83,
+  0x45, 0xdf, 0x97, 0x9b, 0x07, 0xba, 0xab, 0x59, 0x06, 0x7e, 0x7d, 0x41,
+  0x45, 0x10, 0x49, 0x5d, 0xe7, 0x77, 0x59, 0xab, 0x6b, 0x5b, 0xe6, 0xbd,
+  0x67, 0x77, 0x7f, 0x29, 0xf1, 0x89, 0x49, 0x31, 0x2b, 0x16, 0xdb, 0x5d,
+  0x93, 0x85, 0xc5, 0x5a, 0x92, 0xd6, 0xb9, 0xb4, 0x74, 0x2a, 0x1b, 0xd6,
+  0xba, 0x62, 0xe1, 0x70, 0x72, 0x70, 0x21, 0xdd, 0xf3, 0x93, 0x81, 0xa6,
+  0xa4, 0x6a, 0xbd, 0x4b, 0xe1, 0xf9, 0xe1, 0x51, 0x70, 0x3a, 0x6b, 0x9b,
+  0xa5, 0xb0, 0x6b, 0x26, 0xc2, 0xdc, 0x24, 0xa9, 0xdf, 0xd6, 0xe0, 0x31,
+  0x5d, 0x2d, 0x1f, 0x99, 0xf6, 0xf6, 0xfd, 0xce, 0x29, 0xd6, 0xf0, 0x78,
+  0x84, 0xce, 0xa8, 0xf1, 0x83, 0xa4, 0xa6, 0x3a, 0x9e, 0x2b, 0x8d, 0xd7,
+  0x68, 0x75, 0x0f, 0xcc, 0x4b, 0xd2, 0x45, 0x51, 0x19, 0x6c, 0xfa, 0x03,
+  0x92, 0x3a, 0xab, 0xe4, 0xa0, 0xf7, 0x3b, 0x8a, 0xe5, 0x77, 0x2e, 0xa4,
+  0xf4, 0x6b, 0xb6, 0xe4, 0x27, 0xee, 0xc9, 0x76, 0x71, 0xcd, 0xce, 0x2d,
+  0xf9, 0x7f, 0x17, 0xdb, 0x2f, 0xf6, 0xbb, 0xdf, 0x77, 0xb1, 0x07, 0x3c,
+  0xea, 0x17, 0xef, 0x2e, 0x4e, 0xd7, 0xae, 0x2b, 0x89, 0x41, 0xf6, 0x2a,
+  0xf8, 0x7a, 0x9b, 0xcd, 0xdc, 0x03, 0x26, 0xe0, 0x2f, 0x2a, 0x06, 0x65,
+  0xdd, 0xd0, 0x1c, 0x29, 0xfb, 0x7e, 0x5c, 0xf9, 0xc9, 0x12, 0xcb, 0xcc,
+  0x73, 0x43, 0x4d, 0x72, 0xa6, 0x1f, 0x90, 0x7a, 0x01, 0xfb, 0xe0, 0xa3,
+  0x37, 0x88, 0x3a, 0xad, 0x24, 0x5c, 0xd8, 0x60, 0x88, 0x53, 0xf6, 0x32,
+  0x46, 0x97, 0xbb, 0xda, 0x48, 0xe2, 0xb2, 0xe9, 0x9a, 0x5c, 0x19, 0x0f,
+  0x27, 0x46, 0x8b, 0x6b, 0xbe, 0xef, 0x72, 0x19, 0x1a, 0x85, 0x4c, 0x15,
+  0x74, 0xd9, 0x48, 0x17, 0xed, 0x72, 0x4d, 0xaa, 0x6b, 0xdc, 0x5d, 0x56,
+  0x8d, 0xdb, 0xac, 0x23, 0x09, 0x45, 0xf9, 0x1e, 0x78, 0x2a, 0x79, 0x4f,
+  0x80, 0x4c, 0xdf, 0x2e, 0x93, 0x9d, 0x3a, 0x9d, 0xdd, 0x22, 0xbf, 0x90,
+  0x01, 0xdc, 0x32, 0xaf, 0xdc, 0x3b, 0xe6, 0x0e, 0xec, 0xa4, 0x73, 0x1c,
+  0xaf, 0xae, 0xaf, 0x85, 0x2c, 0xfc, 0x50, 0x2e, 0xa2, 0xca, 0x4a, 0x20,
+  0xc1, 0xba, 0xd8, 0xfc, 0x72, 0x53, 0xf3, 0xb9, 0x7a, 0x37, 0x74, 0x6b,
+  0x33, 0x02, 0x94, 0xf4, 0xa2, 0x9e, 0xe8, 0x25, 0x11, 0xeb, 0x0c, 0x1f,
+  0x81, 0x7e, 0xb2, 0xf9, 0xa2, 0xfb, 0x1d, 0xd1, 0xc8, 0xb5, 0x08, 0xb1,
+  0x73, 0x0a, 0xd3, 0x34, 0xde, 0xe4, 0x74, 0xb1, 0x2d, 0x62, 0x54, 0xa7,
+  0xa4, 0x61, 0x4a, 0x8c, 0x4e, 0x8b, 0x11, 0x74, 0xf6, 0xf1, 0xdf, 0xec,
+  0x7b, 0x56, 0x04, 0x00, 0x94, 0x4c, 0x57, 0x45, 0xc4, 0x91, 0xa8, 0x74,
+  0x2c, 0xfa, 0xfd, 0x47, 0x4a, 0xde, 0x6b, 0x36, 0xa3, 0x94, 0x83, 0xe0,
+  0x9d, 0xa7, 0xd5, 0xf6, 0x64, 0x3c, 0x5a, 0x18, 0x43, 0x8c, 0x79, 0xac,
+  0x35, 0xa7, 0x15, 0xe4, 0x31, 0x89, 0xaa, 0xe8, 0x8b, 0x99, 0xd7, 0x81,
+  0x3c, 0xfb, 0x37, 0x88, 0x0c, 0x4a, 0xce, 0x79, 0x28, 0x6e, 0xb5, 0xb6,
+  0xeb, 0xda, 0xdb, 0xd1, 0xbc, 0xe0, 0x7e, 0x27, 0x0b, 0xa2, 0xd5, 0xc0,
+  0xb8, 0xb8, 0x37, 0xf9, 0xc1, 0x6c, 0x01, 0x2e, 0x56, 0x75, 0x2e, 0xf5,
+  0x63, 0x2a, 0x50, 0xc9, 0x4e, 0xb5, 0xcc, 0x30, 0xa7, 0x89, 0x34, 0x35,
+  0x69, 0x8b, 0x5b, 0xfd, 0x56, 0x65, 0xac, 0xd1, 0x58, 0xa8, 0x8c, 0x75,
+  0x78, 0xb8, 0xc3, 0xac, 0x86, 0x26, 0xc7, 0x1f, 0x12, 0x19, 0x02, 0x41,
+  0x73, 0xcf, 0x0f, 0x22, 0xf2, 0xc6, 0xe7, 0x8b, 0xd4, 0x7d, 0xe8, 0xdc,
+  0x6d, 0xa9, 0xf3, 0x4a, 0x99, 0x11, 0xcd, 0x09, 0x6b, 0x61, 0x20, 0xcc,
+  0x19, 0x32, 0x0c, 0x8c, 0x54, 0x93, 0xad, 0xc8, 0x59, 0x56, 0x67, 0xe2,
+  0xa1, 0x55, 0x8a, 0xcd, 0xc8, 0xce, 0xe6, 0x63, 0xe3, 0x62, 0x01, 0x96,
+  0xc2, 0x2f, 0x9f, 0xd6, 0xd2, 0xdb, 0x5a, 0x9b, 0x57, 0xe9, 0x30, 0x1e,
+  0x8c, 0x2b, 0x40, 0xe2, 0x79, 0x51, 0x60, 0xf2, 0x03, 0x2b, 0xc4, 0x5c,
+  0x0d, 0x43, 0x49, 0x0e, 0x43, 0x21, 0xe4, 0x6a, 0xeb, 0x4a, 0xbe, 0xaf,
+  0x36, 0x1c, 0x70, 0xe2, 0x74, 0x62, 0x03, 0x01, 0x31, 0xe9, 0xc9, 0xc3,
+  0xbd, 0xbe, 0xf1, 0x65, 0x88, 0x8a, 0x2d, 0xd5, 0xc1, 0x40, 0xe4, 0x33,
+  0x59, 0xb1, 0x69, 0x00, 0x27, 0x7f, 0x54, 0x57, 0xcc, 0x35, 0xf7, 0xc0,
+  0xa1, 0xc7, 0xde, 0x57, 0x66, 0x90, 0xf4, 0xcc, 0x79, 0xed, 0x4b, 0x97,
+  0x41, 0x8a, 0xa3, 0x71, 0x25, 0x9d, 0xd3, 0xa9, 0xe8, 0x70, 0xf5, 0x89,
+  0x8b, 0x1e, 0x49, 0xc1, 0xa8, 0x3e, 0xdb, 0xfb, 0x6a, 0xd0, 0xeb, 0xe6,
+  0x2d, 0xf6, 0x45, 0x85, 0x13, 0xa5, 0x94, 0x37, 0xe7, 0xb2, 0x19, 0x50,
+  0xf2, 0x15, 0x57, 0x7f, 0x75, 0x35, 0xa6, 0x03, 0x50, 0xaf, 0x62, 0xef,
+  0x99, 0x72, 0x31, 0xc1, 0x31, 0x0a, 0xf9, 0xcb, 0x13, 0xee, 0xbd, 0x97,
+  0x38, 0x48, 0x6c, 0x70, 0xd5, 0xc0, 0x9b, 0xa9, 0x15, 0x37, 0x76, 0x44,
+  0x98, 0x6d, 0x7b, 0xe1, 0x90, 0x2d, 0x46, 0xdf, 0xbb, 0xa6, 0xf7, 0x8c,
+  0x1a, 0xf8, 0xe3, 0x7f, 0xd8, 0x2f, 0x41, 0x3e, 0xf6, 0x9f, 0x36, 0x5f,
+  0x56, 0xee, 0xb7, 0x5b, 0x9e, 0xfd, 0x11, 0x93, 0x02, 0x8d, 0x57, 0x66,
+  0x06, 0xbc, 0x08, 0xdc, 0xdc, 0x1f, 0x87, 0x2e, 0x42, 0x61, 0x4d, 0x24,
+  0x8b, 0xec, 0x1e, 0x32, 0x2f, 0x96, 0xb6, 0x72, 0x8c, 0x7f, 0x5e, 0x70,
+  0xa5, 0x9c, 0x49, 0x4a, 0xc7, 0x91, 0x9d, 0xcb, 0x92, 0x6e, 0x2c, 0xdb,
+  0xeb, 0xe7, 0x52, 0x85, 0x66, 0x9d, 0x8e, 0x85, 0xfb, 0x51, 0x7f, 0x1e,
+  0x1b, 0x92, 0x1c, 0xff, 0x3b, 0xc0, 0x6a, 0xfc, 0x71, 0x20, 0xc4, 0x72,
+  0xba, 0xbb, 0x95, 0x27, 0xd2, 0x7e, 0x26, 0xcb, 0x72, 0x9f, 0x2f, 0x9e,
+  0xec, 0x0f, 0x02, 0x6d, 0xa5, 0xdf, 0x09, 0xa1, 0x60, 0xe3, 0xba, 0x98,
+  0x48, 0x79, 0xda, 0x89, 0x08, 0x87, 0x3f, 0x2a, 0x2b, 0x01, 0xc0, 0xf7,
+  0x92, 0x36, 0x3b, 0xb5, 0x0c, 0xc9, 0x95, 0x4f, 0xf3, 0xef, 0x74, 0x3b,
+  0x76, 0x6e, 0x9e, 0x60, 0x75, 0x1c, 0x71, 0x48, 0x57, 0x8c, 0x99, 0x8f,
+  0x25, 0x75, 0xf4, 0x3d, 0xdc, 0x9c, 0xba, 0xef, 0x8e, 0xe4, 0x67, 0x83,
+  0x4b, 0xfc, 0xcc, 0xfc, 0x4f, 0x9a, 0x41, 0x96, 0x4d, 0x1d, 0xce, 0xa8,
+  0x1f, 0xb3, 0x38, 0x24, 0x5d, 0xe1, 0x59, 0x46, 0x2c, 0xd1, 0x91, 0x8e,
+  0xfa, 0x69, 0xe7, 0xe9, 0xbd, 0x14, 0x98, 0x20, 0x69, 0xfd, 0x78, 0x6b,
+  0x20, 0x1b, 0x9c, 0x91, 0x4e, 0x62, 0xa4, 0xd3, 0xe2, 0x1d, 0x70, 0xdb,
+  0xd8, 0x00, 0x08, 0xca, 0xbb, 0x12, 0xd5, 0xed, 0x4c, 0xba, 0x42, 0xd1,
+  0xb9, 0x12, 0xdd, 0x04, 0xd5, 0x8e, 0xe8, 0x96, 0xb3, 0xcc, 0xe9, 0xba,
+  0x98, 0x49, 0x98, 0x8a, 0x5b, 0xfe, 0xc8, 0x58, 0x39, 0x45, 0x48, 0xb8,
+  0x04, 0x03, 0xbe, 0xf9, 0x26, 0x21, 0x06, 0x52, 0xd1, 0x4c, 0x11, 0xfa,
+  0x48, 0x65, 0x15, 0x0d, 0x7b, 0x24, 0x27, 0x48, 0xda, 0x2b, 0x24, 0xf2,
+  0x8c, 0xee, 0x81, 0x0f, 0x72, 0x6c, 0x1c, 0x75, 0xe6, 0x2d, 0x7d, 0xbc,
+  0x39, 0xd7, 0x0f, 0xb9, 0xaa, 0x07, 0x81, 0x86, 0x35, 0x6c, 0xe3, 0xfd,
+  0xf7, 0x22, 0xf8, 0xd7, 0x55, 0xbd, 0x7c, 0x0f, 0xd2, 0xb7, 0xf7, 0x20,
+  0x81, 0xb9, 0x0c, 0x78, 0x9e, 0xf1, 0x03, 0x4c, 0x97, 0xf0, 0xf4, 0x90,
+  0x86, 0x9f, 0x2b, 0x2b, 0xff, 0xac, 0x80, 0x0e, 0x15, 0x73, 0x9a, 0xc4,
+  0x33, 0xd7, 0xe2, 0xae, 0xb6, 0x38, 0x48, 0x0b, 0xd8, 0xff, 0x34, 0xea,
+  0x18, 0x87, 0xcb, 0xde, 0x23, 0x3b, 0xde, 0xed, 0x10, 0xba, 0x38, 0xc8,
+  0x22, 0xe6, 0x38, 0x7e, 0x33, 0x7d, 0x1e, 0xfb, 0x44, 0xf2, 0x9b, 0x56,
+  0x0b, 0x0b, 0xd3, 0x3d, 0xde, 0x31, 0x28, 0xf9, 0x5a, 0x43, 0x4a, 0xf9,
+  0xeb, 0x39, 0x8a, 0x8d, 0x55, 0xa4, 0x6e, 0xb2, 0xa2, 0xed, 0x82, 0x3c,
+  0xbc, 0x52, 0x1f, 0x19, 0x27, 0xa0, 0xc1, 0xfb, 0xb2, 0x31, 0xd2, 0x59,
+  0x9e, 0x7a, 0x6e, 0x2a, 0x19, 0x02, 0xce, 0x09, 0x06, 0xcc, 0x0a, 0xfd,
+  0x4d, 0x71, 0xff, 0xd1, 0xc3, 0x25, 0xc1, 0x49, 0xd6, 0xe9, 0x86, 0x6b,
+  0x66, 0x46, 0x8b, 0xd8, 0xb6, 0x66, 0xa6, 0x39, 0x21, 0x3a, 0x23, 0x5e,
+  0x79, 0xeb, 0x80, 0x32, 0x24, 0x6b, 0x98, 0x09, 0x92, 0x64, 0xcb, 0x91,
+  0xdd, 0x09, 0x37, 0xbe, 0xc5, 0x53, 0xf5, 0x4c, 0x2a, 0x21, 0xfe, 0xc7,
+  0x9a, 0x83, 0x6c, 0x89, 0xf2, 0x46, 0xe3, 0x05, 0x07, 0x42, 0xe3, 0x7d,
+  0xbe, 0x0c, 0x44, 0x42, 0x50, 0xf3, 0xd5, 0xf9, 0xca, 0xb5, 0x32, 0x7d,
+  0xb6, 0x98, 0x06, 0x0e, 0x74, 0x3e, 0x44, 0x1f, 0xeb, 0xc7, 0x04, 0x21,
+  0xa9, 0x44, 0x52, 0x8c, 0x83, 0x74, 0xaf, 0x81, 0x29, 0x1c, 0xc2, 0xdf,
+  0x40, 0x1f, 0xbd, 0x7b, 0x1a, 0x23, 0x34, 0x5a, 0xff, 0xa3, 0x87, 0x3e,
+  0x6b, 0x1e, 0xae, 0xe7, 0x1d, 0xd0, 0x70, 0x19, 0x92, 0xd0, 0xbc, 0xe8,
+  0x90, 0xa4, 0xfb, 0x21, 0x64, 0x57, 0x1d, 0x8d, 0x90, 0x03, 0xad, 0x6e,
+  0x3e, 0xde, 0x87, 0x60, 0x0c, 0x1f, 0xed, 0x09, 0x7d, 0xcb, 0xb6, 0x0c,
+  0xd7, 0x54, 0x7b, 0xab, 0xf4, 0x29, 0xf4, 0x6d, 0xba, 0x6d, 0x13, 0xf7,
+  0x1b, 0x64, 0x32, 0xeb, 0x95, 0x27, 0x5d, 0x91, 0x53, 0x30, 0x78, 0xbc,
+  0x27, 0x57, 0xd1, 0x89, 0xee, 0x4a, 0x0c, 0xe6, 0x3e, 0x58, 0x8a, 0x6b,
+  0xe5, 0xfa, 0x40, 0x5d, 0xf0, 0x3f, 0x54, 0x56, 0x34, 0xa0, 0x11, 0xa5,
+  0xb6, 0x5f, 0xe6, 0x77, 0xef, 0x6f, 0xdb, 0x68, 0x71, 0x3f, 0xec, 0x73,
+  0xef, 0xb1, 0x8b, 0x35, 0x79, 0xd5, 0xf8, 0x37, 0x5c, 0x6e, 0x77, 0x1a,
+  0x54, 0x1f, 0xe7, 0x5b, 0x67, 0x70, 0x0a, 0x72, 0xac, 0x62, 0xf6, 0x91,
+  0xb9, 0x60, 0x30, 0x87, 0x1b, 0x90, 0x22, 0x98, 0xed, 0xca, 0xd6, 0x64,
+  0x62, 0x4e, 0x84, 0x85, 0xa4, 0x98, 0x30, 0x1c, 0xfa, 0xf1, 0xe6, 0x60,
+  0x78, 0x07, 0x65, 0x8b, 0x1c, 0xc4, 0x13, 0xf9, 0xe3, 0xe2, 0x91, 0xa1,
+  0xfb, 0xd0, 0x8f, 0xfa, 0x53, 0x04, 0x55, 0xc7, 0x94, 0xb0, 0x80, 0x76,
+  0x87, 0xef, 0xd2, 0xcb, 0xec, 0xe6, 0x11, 0xfc, 0x2f, 0x6f, 0xd4, 0x35,
+  0x87, 0xad, 0x75, 0x9e, 0x3e, 0x36, 0x86, 0xce, 0x2d, 0xae, 0x63, 0xb0,
+  0xd3, 0x76, 0xd9, 0x2c, 0xe5, 0xde, 0x75, 0xda, 0x7e, 0xaf, 0xc3, 0xc6,
+  0x08, 0x82, 0xf7, 0xc6, 0xb6, 0x27, 0x3d, 0x11, 0x22, 0x10, 0xcf, 0x9d,
+  0x21, 0x71, 0x7f, 0x91, 0xd3, 0xbc, 0xdb, 0xed, 0xe9, 0x8e, 0x78, 0x3d,
+  0x5a, 0x53, 0xb7, 0x42, 0xf2, 0x58, 0x6b, 0x16, 0xb1, 0x70, 0x4d, 0xc1,
+  0x78, 0xff, 0xc8, 0x76, 0x65, 0xde, 0xf3, 0xce, 0x2f, 0xda, 0x41, 0xf8,
+  0xb4, 0xfe, 0x4b, 0x61, 0x85, 0x4f, 0x3a, 0xa8, 0xe1, 0x31, 0xeb, 0xfe,
+  0xb4, 0xe2, 0x88, 0x3e, 0xf1, 0xd3, 0x6b, 0xa1, 0x4f, 0xa4, 0xc9, 0x67,
+  0x53, 0xbf, 0x0e, 0xdc, 0x56, 0xca, 0xde, 0xbe, 0x80, 0x0a, 0x51, 0x9e,
+  0x09, 0x14, 0x4d, 0xd2, 0x15, 0xab, 0x55, 0x29, 0x34, 0x2d, 0x1f, 0xbf,
+  0xa3, 0xcd, 0xa2, 0x76, 0xed, 0x31, 0xbe, 0x83, 0x7b, 0xb7, 0x64, 0xc6,
+  0x2a, 0x10, 0x68, 0xac, 0xe9, 0x95, 0x1b, 0x62, 0xd8, 0x2b, 0xfd, 0x61,
+  0xbb, 0x4f, 0xbe, 0x53, 0xbf, 0xb2, 0x57, 0xd2, 0xde, 0xa7, 0xf4, 0xa9,
+  0x9a, 0xbd, 0xa7, 0x3e, 0x90, 0x39, 0x4c, 0xcb, 0x5e, 0x91, 0x22, 0xfe,
+  0x71, 0x6d, 0x3d, 0x91, 0x07, 0x6d, 0xd3, 0x71, 0x96, 0x2a, 0x75, 0xbb,
+  0x4c, 0x26, 0x19, 0x99, 0xde, 0xa8, 0x9b, 0x88, 0x44, 0x62, 0xfc, 0xf5,
+  0x23, 0x5b, 0x50, 0x40, 0x87, 0xa6, 0xb2, 0x38, 0x63, 0x64, 0xc8, 0x64,
+  0x4d, 0x70, 0x72, 0xc1, 0xc0, 0xd5, 0xb6, 0x3a, 0xb0, 0xd4, 0x49, 0xdb,
+  0x6f, 0x5a, 0x05, 0xf5, 0x43, 0x86, 0x8f, 0x10, 0xbc, 0xb9, 0xef, 0x93,
+  0xa1, 0x92, 0x2e, 0x97, 0x7a, 0xc4, 0x3f, 0x61, 0xec, 0x42, 0xb0, 0x81,
+  0xed, 0xae, 0x34, 0x29, 0x4a, 0x5a, 0x55, 0x17, 0xc5, 0xad, 0xaf, 0x7e,
+  0x09, 0xa7, 0xdd, 0xe3, 0xcd, 0x09, 0x43, 0x92, 0xce, 0x20, 0x97, 0x01,
+  0x67, 0xea, 0x34, 0x27, 0x6d, 0x76, 0xd8, 0x41, 0x5c, 0xdd, 0x40, 0xd2,
+  0xd7, 0xc5, 0x27, 0x5d, 0x82, 0xae, 0x66, 0x15, 0xe6, 0xc1, 0xb9, 0x7c,
+  0x3e, 0x75, 0x1a, 0x9a, 0x6a, 0xe5, 0xef, 0x32, 0x50, 0x2e, 0x03, 0xef,
+  0x3e, 0xa3, 0xa3, 0x6a, 0x16, 0x5e, 0x63, 0xa6, 0xd1, 0x8f, 0xec, 0x73,
+  0x55, 0x48, 0x9b, 0x63, 0xec, 0x1c, 0x11, 0x9b, 0x43, 0xec, 0x72, 0x5c,
+  0x2d, 0xff, 0x3f, 0x5a, 0x58, 0xd8, 0x63, 0x92, 0xdc, 0x05, 0x07, 0xee,
+  0xc7, 0xbb, 0xcc, 0x65, 0x34, 0xba, 0xcb, 0xca, 0x74, 0xf4, 0x59, 0xba,
+  0x2c, 0x79, 0x0d, 0xed, 0x0e, 0x2b, 0x5b, 0xb5, 0x00, 0xb1, 0x3f, 0xb5,
+  0xcf, 0x1e, 0x1b, 0xeb, 0xc8, 0x7b, 0xb8, 0xcf, 0x52, 0x0c, 0xc8, 0xe8,
+  0xc6, 0xc6, 0x19, 0xd9, 0x7f, 0x9f, 0x62, 0x85, 0xab, 0x43, 0x58, 0xd8,
+  0x36, 0x39, 0x2b, 0xd5, 0x35, 0xea, 0xcb, 0xbc, 0x90, 0x2a, 0xcf, 0x39,
+  0x0b, 0x1f, 0x15, 0x13, 0xa9, 0x42, 0xef, 0x51, 0x9d, 0xcb, 0x7b, 0xa6,
+  0x26, 0x66, 0x66, 0x06, 0x6e, 0xbf, 0x8e, 0x1c, 0x89, 0xc8, 0x34, 0x9d,
+  0x14, 0x33, 0x09, 0xa8, 0xdc, 0x81, 0xf1, 0xb0, 0x7b, 0x2d, 0xbc, 0xde,
+  0xd5, 0x3d, 0xd9, 0x5c, 0x99, 0x17, 0x7b, 0x43, 0x49, 0xd3, 0x82, 0xca,
+  0xcb, 0x8f, 0x7f, 0x9f, 0x44, 0xdc, 0xb2, 0x32, 0x80, 0x45, 0xa6, 0x81,
+  0x11, 0xd9, 0xa8, 0x7d, 0x3b, 0x1f, 0xa8, 0x1e, 0xf3, 0x69, 0x5b, 0x01,
+  0x7e, 0x38, 0x9b, 0x5a, 0x23, 0xe5, 0xd2, 0x2a, 0x19, 0x1c, 0x1d, 0x90,
+  0x5f, 0x2a, 0x11, 0x28, 0x2f, 0xe8, 0xc7, 0x7a, 0x97, 0x4a, 0x09, 0x9f,
+  0xd6, 0x2c, 0x78, 0xa8, 0x84, 0xbb, 0x65, 0xb2, 0x0f, 0x59, 0xcc, 0x96,
+  0xde, 0x29, 0xe2, 0x73, 0x85, 0xbb, 0x79, 0x98, 0x6e, 0x30, 0x5b, 0x41,
+  0xbc, 0xff, 0x53, 0xb4, 0xd8, 0x2e, 0xc5, 0x1e, 0x5d, 0x45, 0xcf, 0x3f,
+  0xfd, 0xf8, 0xfc, 0x2e, 0x47, 0x5e, 0xb8, 0xaf, 0x40, 0xe8, 0xdd, 0x75,
+  0x74, 0x92, 0x4f, 0x35, 0xaa, 0xc0, 0xf3, 0x62, 0xde, 0x2c, 0x3b, 0x48,
+  0x6d, 0x11, 0x21, 0x1e, 0xcf, 0x98, 0x9c, 0xae, 0x43, 0x33, 0x50, 0x8e,
+  0x3a, 0x88, 0x03, 0x45, 0x99, 0x33, 0xb5, 0x65, 0x26, 0x35, 0x43, 0x48,
+  0x35, 0x9f, 0xf1, 0xe9, 0xa9, 0xb3, 0x4f, 0xba, 0x69, 0xf8, 0xfa, 0xef,
+  0x3e, 0x33, 0xa2, 0xb1, 0xf9, 0x19, 0x76, 0x24, 0x78, 0xcd, 0xa3, 0x63,
+  0x19, 0x12, 0x82, 0x53, 0x42, 0xcc, 0xe1, 0x53, 0xb6, 0x11, 0xbb, 0x30,
+  0x32, 0x2d, 0x50, 0x82, 0x01, 0x39, 0xee, 0x30, 0x89, 0x7c, 0x58, 0xa8,
+  0x61, 0x9e, 0x7f, 0xd4, 0x54, 0xcb, 0x95, 0xfc, 0x10, 0xd2, 0x79, 0xd5,
+  0xe9, 0x71, 0x05, 0xca, 0xd9, 0x9c, 0x98, 0x32, 0x20, 0x36, 0xc9, 0xbc,
+  0xcb, 0x89, 0x83, 0x92, 0x99, 0x50, 0xd0, 0x7b, 0x6c, 0x31, 0xcc, 0x0b,
+  0x56, 0x5e, 0x3e, 0xd2, 0x03, 0xef, 0x96, 0xe4, 0xe0, 0x18, 0xb2, 0x47,
+  0x66, 0xd3, 0x20, 0xee, 0x20, 0x36, 0xb0, 0x2f, 0x61, 0x72, 0xf0, 0x78,
+  0x73, 0x1a, 0xac, 0xfb, 0x3d, 0x08, 0xb4, 0x83, 0xac, 0xd9, 0x17, 0x3f,
+  0x59, 0xba, 0xd3, 0xc1, 0xce, 0xce, 0x2f, 0x3f, 0x35, 0xb0, 0x0e, 0x5f,
+  0xfd, 0xf2, 0x29, 0xc5, 0x23, 0xdb, 0xa9, 0x41, 0xbe, 0x42, 0xe3, 0x3f,
+  0x9e, 0x42, 0xe4, 0xd3, 0x62, 0x7a, 0xd9, 0x87, 0x5c, 0x48, 0xff, 0x42,
+  0x40, 0x42, 0x18, 0xa6, 0x11, 0xcf, 0x44, 0x95, 0xd5, 0x1d, 0x79, 0x6d,
+  0x96, 0xc9, 0x6d, 0x19, 0x37, 0x32, 0x84, 0x32, 0xdb, 0x5c, 0x9b, 0x5c,
+  0xc5, 0x0d, 0xe1, 0x73, 0xe9, 0x46, 0x87, 0x5e, 0xd3, 0xf7, 0x69, 0xcd,
+  0x92, 0x5b, 0xf6, 0x01, 0xe8, 0xf3, 0x1e, 0x92, 0x4c, 0xac, 0xcf, 0x5d,
+  0x20, 0xcf, 0x43, 0x3b, 0x47, 0xad, 0x8b, 0x52, 0xf9, 0xe8, 0x38, 0x69,
+  0x07, 0xf0, 0xa6, 0x45, 0x58, 0x13, 0x53, 0x01, 0xee, 0x1d, 0x02, 0x89,
+  0xee, 0x53, 0xb5, 0x8f, 0xc7, 0x42, 0xa5, 0xc5, 0x8c, 0x59, 0x2a, 0x2c,
+  0xb8, 0x01, 0xcf, 0x99, 0xab, 0xd6, 0x0a, 0xfd, 0x1a, 0x81, 0x40, 0xdd,
+  0x1e, 0xdd, 0x75, 0x3e, 0x27, 0x61, 0x17, 0x25, 0x4e, 0xac, 0x05, 0x1a,
+  0x5d, 0x3c, 0xc3, 0x1f, 0x24, 0x50, 0xd0, 0xf1, 0x6d, 0x93, 0xc6, 0x44,
+  0x3c, 0x57, 0x6e, 0x9a, 0xea, 0x15, 0x5d, 0x97, 0xb3, 0xb8, 0x32, 0x27,
+  0x62, 0x5e, 0xb2, 0xa9, 0x15, 0x77, 0x3c, 0x58, 0xda, 0x3e, 0x6e, 0x0f,
+  0xf6, 0x41, 0x1b, 0x59, 0x13, 0x79, 0x79, 0x57, 0xa9, 0xa4, 0xf5, 0x10,
+  0x9d, 0x06, 0xd6, 0xcf, 0x57, 0x3e, 0x59, 0x04, 0x9c, 0x15, 0x1a, 0xd1,
+  0x4c, 0x23, 0x54, 0x05, 0xdc, 0x3a, 0xa0, 0x1b, 0x0f, 0xa2, 0xf3, 0x8d,
+  0xea, 0xe5, 0x56, 0xb8, 0x93, 0x93, 0x0e, 0xf3, 0x45, 0xa3, 0x7c, 0x59,
+  0x3a, 0x89, 0xf3, 0x3f, 0x4b, 0x18, 0x3d, 0x20, 0xec, 0xfe, 0xca, 0x67,
+  0xb9, 0xfc, 0xf1, 0xe9, 0x2e, 0x7b, 0x57, 0xac, 0x11, 0x45, 0x92, 0xc9,
+  0x74, 0xfc, 0xf1, 0x49, 0xda, 0x19, 0x5f, 0x92, 0x9e, 0x43, 0x0f, 0x8f,
+  0xaa, 0x93, 0x08, 0x6f, 0x7f, 0x3a, 0x51, 0xfe, 0xf9, 0xfb, 0xf4, 0xc1,
+  0xd8, 0x18, 0xe5, 0xb5, 0x88, 0xc5, 0xac, 0xeb, 0x30, 0xf5, 0x43, 0x58,
+  0x69, 0x58, 0x4e, 0xdc, 0x6a, 0xe5, 0x6d, 0x69, 0xaa, 0x4c, 0x3b, 0x05,
+  0xcb, 0x0a, 0xba, 0xa2, 0xb4, 0x1b, 0x22, 0x12, 0xbc, 0x28, 0x7f, 0x5a,
+  0x0f, 0x79, 0x7b, 0xcd, 0xb7, 0xb7, 0xe7, 0x12, 0x68, 0xad, 0x8a, 0x82,
+  0x63, 0x42, 0x0e, 0x12, 0xc7, 0x45, 0xba, 0x8e, 0xd5, 0x82, 0x39, 0x02,
+  0xac, 0x9b, 0x90, 0xd0, 0x95, 0x03, 0xfd, 0x04, 0x44, 0xd7, 0x26, 0x10,
+  0x1c, 0x65, 0x95, 0xd4, 0x23, 0xee, 0xe4, 0x77, 0xa1, 0x16, 0xfb, 0x01,
+  0x87, 0x4b, 0x3f, 0x20, 0x23, 0x60, 0x40, 0xa2, 0x27, 0xda, 0xd0, 0x40,
+  0xb4, 0x7a, 0x65, 0x3a, 0x98, 0xa5, 0x1d, 0xdb, 0x35, 0xf8, 0x25, 0x12,
+  0xe3, 0xf1, 0xb2, 0x72, 0x9c, 0x8e, 0xb3, 0xfb, 0x6d, 0x11, 0x10, 0x62,
+  0x7b, 0xa6, 0x88, 0x8e, 0x28, 0x03, 0x7f, 0x56, 0xb4, 0x8b, 0x99, 0x70,
+  0x85, 0xfb, 0x54, 0x95, 0x1a, 0x15, 0xac, 0x10, 0x13, 0x76, 0xb2, 0xa4,
+  0x51, 0xdf, 0xfa, 0x1f, 0x7e, 0x03, 0xfd, 0x28, 0xa0, 0x22, 0x19, 0xff,
+  0xda, 0x8a, 0xaa, 0x82, 0xd0, 0x1f, 0xb9, 0xdc, 0x34, 0x47, 0xc8, 0x6e,
+  0x6f, 0x6a, 0x96, 0x41, 0x98, 0xcd, 0xf3, 0xe9, 0x35, 0xa6, 0x31, 0x54,
+  0x57, 0x98, 0xf0, 0xb2, 0x91, 0x89, 0xda, 0x66, 0x05, 0xed, 0xa0, 0x26,
+  0x6f, 0x15, 0xfe, 0xd5, 0xae, 0x78, 0x16, 0x76, 0x4c, 0x8d, 0xf1, 0x50,
+  0xbb, 0x94, 0x13, 0xac, 0xdf, 0x37, 0xc7, 0x97, 0xdb, 0x31, 0x85, 0xa1,
+  0x43, 0x25, 0x08, 0x58, 0x07, 0x25, 0x49, 0x74, 0x1b, 0xa4, 0x8e, 0xf2,
+  0xdf, 0x65, 0x5e, 0x2d, 0x38, 0x97, 0x9c, 0x54, 0xa4, 0x45, 0x37, 0x15,
+  0xd9, 0x11, 0x4d, 0x03, 0x27, 0x75, 0x7a, 0x48, 0x51, 0xe8, 0xaa, 0x0b,
+  0x6d, 0x15, 0x4e, 0xf0, 0x14, 0xb8, 0xff, 0xab, 0xe3, 0xd3, 0xe3, 0xcb,
+  0xe3, 0x3e, 0xf2, 0xe3, 0x23, 0x7f, 0xec, 0x0c, 0x3b, 0xa4, 0xce, 0x26,
+  0x37, 0x0b, 0x12, 0x3b, 0xd7, 0xbc, 0x1c, 0x48, 0x9b, 0xfb, 0x21, 0x1b,
+  0xbf, 0x3a, 0xfc, 0x9e, 0x0b, 0xea, 0xf0, 0x8e, 0x3a, 0xbf, 0x38, 0x3b,
+  0x7f, 0x7d, 0xf2, 0xf6, 0x55, 0x3f, 0x39, 0x3a, 0x3b, 0xff, 0x4b, 0x3f,
+  0x79, 0x73, 0xf6, 0xfd, 0x71, 0x07, 0x52, 0x9b, 0x41, 0x5f, 0x1d, 0xf8,
+  0x25, 0xa5, 0xad, 0x67, 0x69, 0x39, 0x05, 0xf7, 0xe7, 0x22, 0x33, 0xe2,
+  0x57, 0x8b, 0x81, 0x02, 0xd3, 0x50, 0x21, 0xd3, 0x10, 0x11, 0x23, 0x9a,
+  0x4a, 0xea, 0xf0, 0xb7, 0xc7, 0x87, 0xaf, 0xda, 0x7b, 0xfe, 0xfc, 0x6c,
+  0x74, 0x89, 0x71, 0xf1, 0x00, 0xdd, 0xb8, 0xf9, 0x06, 0xa5, 0xfb, 0x8a,
+  0xdd, 0xd5, 0x6c, 0x2b, 0xde, 0x66, 0x01, 0x05, 0x1b, 0x49, 0x21, 0xf8,
+  0xba, 0xa6, 0x6b, 0x8b, 0x71, 0x02, 0xca, 0xe0, 0x00, 0x6f, 0x8f, 0x29,
+  0x23, 0x1c, 0xab, 0x36, 0xba, 0x63, 0xcd, 0x0b, 0x41, 0x80, 0x80, 0x5d,
+  0xfe, 0xe5, 0xd4, 0xf8, 0x35, 0x5d, 0x28, 0xaf, 0xa3, 0x86, 0xb9, 0x76,
+  0x59, 0x0c, 0x18, 0x47, 0xdf, 0x00, 0xc9, 0x24, 0x28, 0x86, 0x54, 0x71,
+  0x68, 0xe3, 0x8c, 0x61, 0xf7, 0x15, 0xea, 0x35, 0x28, 0x4b, 0x1c, 0x5b,
+  0x73, 0xdd, 0x37, 0xac, 0x01, 0x11, 0x81, 0x54, 0x02, 0x07, 0x03, 0xbb,
+  0x12, 0x79, 0xfe, 0xfc, 0x07, 0x15, 0xc9, 0x30, 0xf8, 0x51, 0x26, 0x36,
+  0xe9, 0xca, 0xfb, 0x85, 0x0e, 0xb7, 0xba, 0xa2, 0xbd, 0x99, 0x09, 0xea,
+  0x43, 0x96, 0xaa, 0xf0, 0x58, 0xc2, 0x13, 0x3e, 0xe2, 0x37, 0x38, 0x21,
+  0xdd, 0xb7, 0xf0, 0xd6, 0xeb, 0x35, 0xa7, 0x3b, 0xac, 0x21, 0xa3, 0x2d,
+  0x06, 0x87, 0xed, 0xf4, 0x84, 0xd6, 0x95, 0x8f, 0x7a, 0x1b, 0x0c, 0x88,
+  0xbc, 0x07, 0xa9, 0xfe, 0x97, 0xf3, 0x52, 0xe3, 0xa8, 0x53, 0x5b, 0xbf,
+  0x27, 0x7c, 0xf4, 0x43, 0x4a, 0xe6, 0x69, 0x17, 0x81, 0x6a, 0x95, 0xc2,
+  0x41, 0x64, 0x2c, 0xb3, 0x06, 0x3a, 0x68, 0xb2, 0xe0, 0x08, 0xb1, 0x62,
+  0x60, 0x22, 0xd0, 0xf0, 0x23, 0xed, 0xc2, 0x14, 0x31, 0xab, 0x90, 0x49,
+  0x02, 0x40, 0x08, 0x6b, 0xe9, 0x67, 0xae, 0xec, 0x0e, 0x7e, 0xc7, 0x7d,
+  0xc9, 0xc7, 0x4c, 0xc8, 0x3e, 0x0c, 0xd2, 0xf6, 0x3a, 0x74, 0x5c, 0x56,
+  0x58, 0x98, 0x81, 0x87, 0xbf, 0xe6, 0x94, 0x9c, 0x0f, 0xd3, 0xeb, 0x61,
+  0x51, 0xe6, 0xec, 0x0a, 0xd2, 0x32, 0x39, 0xd2, 0x58, 0x82, 0x62, 0x70,
+  0xbc, 0xb1, 0x78, 0x93, 0x76, 0x35, 0x67, 0xe8, 0x14, 0xc9, 0x19, 0x4c,
+  0xe2, 0xa6, 0xe7, 0x30, 0x24, 0xf9, 0x77, 0xae, 0xd5, 0x35, 0xc5, 0x8c,
+  0xa5, 0x96, 0xde, 0x03, 0x2d, 0xf6, 0xdc, 0xef, 0x79, 0x63, 0xeb, 0x74,
+  0xa3, 0xf5, 0x03, 0x65, 0xf0, 0x10, 0xed, 0xe9, 0x12, 0x39, 0xc5, 0x31,
+  0x0f, 0x78, 0x4e, 0x46, 0x44, 0x63, 0xc1, 0x1e, 0x80, 0xd7, 0x63, 0x9f,
+  0xbc, 0x32, 0x63, 0xf3, 0x9f, 0x9d, 0xb5, 0x10, 0x5c, 0x54, 0x81, 0x47,
+  0xc3, 0xb1, 0x4b, 0x65, 0x76, 0x96, 0x97, 0x85, 0xc4, 0x79, 0xdc, 0xf2,
+  0xc5, 0x27, 0xd3, 0x55, 0x19, 0x27, 0x9a, 0xa5, 0x49, 0xf0, 0x41, 0xc9,
+  0x47, 0xef, 0x37, 0x82, 0x3b, 0x0c, 0x79, 0xab, 0x7c, 0xa1, 0x65, 0xfa,
+  0x7c, 0xf0, 0x42, 0x34, 0x26, 0xab, 0x6c, 0x14, 0xb0, 0xea, 0x04, 0x5d,
+  0xb2, 0x8d, 0xba, 0x67, 0x5c, 0xc4, 0x6c, 0x75, 0x08, 0x57, 0xd2, 0x5f,
+  0x3e, 0x56, 0x91, 0x42, 0x90, 0xc3, 0x4d, 0xde, 0x07, 0x51, 0xd3, 0x56,
+  0x95, 0x2f, 0xbe, 0x9e, 0xc2, 0x80, 0xc6, 0x9c, 0x6c, 0x74, 0x86, 0xd5,
+  0xc8, 0x00, 0xab, 0x27, 0x0d, 0x8a, 0x01, 0x60, 0x9c, 0x69, 0x1f, 0xcb,
+  0x15, 0x46, 0x62, 0xa8, 0x9f, 0x08, 0xe7, 0xb8, 0x40, 0x6f, 0xf4, 0xbd,
+  0x41, 0x87, 0xfb, 0x81, 0xdd, 0x2c, 0x6b, 0xc4, 0xc7, 0x3f, 0xee, 0x14,
+  0xff, 0xc5, 0x6f, 0x0a, 0x99, 0xc4, 0x17, 0xf8, 0xc7, 0xaf, 0xda, 0x16,
+  0x01, 0xe1, 0xb7, 0x84, 0x7c, 0xb6, 0x68, 0xef, 0x37, 0xf6, 0xc7, 0x20,
+  0xca, 0x56, 0x9a, 0x6e, 0x4b, 0x9e, 0x8a, 0x5f, 0x6c, 0x75, 0xa7, 0xb0,
+  0xc4, 0x6f, 0xee, 0x89, 0xe0, 0x19, 0xd0, 0xe4, 0xc4, 0xb6, 0xab, 0xac,
+  0xb1, 0x64, 0x01, 0xe4, 0x5c, 0xef, 0x8e, 0x25, 0x3e, 0x4e, 0x4f, 0xf6,
+  0x7b, 0x52, 0xae, 0xfc, 0x1d, 0x94, 0x2b, 0x5c, 0x36, 0x0b, 0x07, 0xe0,
+  0xc5, 0x34, 0x85, 0x17, 0x11, 0x19, 0x8e, 0xd4, 0xf4, 0x97, 0xff, 0xb3,
+  0xbb, 0x6a, 0x95, 0x95, 0x73, 0x54, 0xba, 0x5f, 0x49, 0xc0, 0x14, 0x3f,
+  0x35, 0x5b, 0x62, 0x5c, 0x53, 0x00, 0x05, 0x81, 0xb4, 0x46, 0x30, 0xbb,
+  0x64, 0x6a, 0x3f, 0xd5, 0x59, 0x27, 0x3b, 0x84, 0xd4, 0x0c, 0xe0, 0x53,
+  0x48, 0xcf, 0xba, 0x6a, 0xe2, 0x6b, 0xda, 0x0b, 0xdc, 0xaa, 0x11, 0x8d,
+  0x9a, 0x92, 0xab, 0xb3, 0x46, 0x18, 0x8d, 0xc7, 0xcc, 0x28, 0x94, 0x90,
+  0x86, 0x1a, 0x42, 0x57, 0x12, 0x1e, 0x12, 0x43, 0xa4, 0x8a, 0xd1, 0x26,
+  0x60, 0xc5, 0x76, 0x68, 0x67, 0xe1, 0x5f, 0x62, 0xe8, 0xac, 0x2b, 0x57,
+  0x45, 0xdd, 0xac, 0xcc, 0xed, 0xc1, 0x48, 0x00, 0xd0, 0xe1, 0xa6, 0x0e,
+  0x3a, 0xd7, 0x61, 0x38, 0x85, 0x35, 0x58, 0xae, 0xb3, 0xda, 0x01, 0x67,
+  0xa6, 0x5e, 0x59, 0x94, 0x4e, 0x6d, 0xcd, 0x79, 0x30, 0xdb, 0xe2, 0xfa,
+  0xec, 0x5c, 0x0a, 0x47, 0xf3, 0xd3, 0xe0, 0x02, 0xa0, 0x46, 0xf9, 0x7d,
+  0xe6, 0x01, 0xa0, 0x6b, 0x18, 0x89, 0xff, 0x5a, 0x05, 0x07, 0xcd, 0x06,
+  0x33, 0x12, 0x41, 0xf2, 0xeb, 0x26, 0xe1, 0xb7, 0xe5, 0x53, 0xb0, 0xcb,
+  0xd5, 0x52, 0x5e, 0xc3, 0x19, 0x55, 0x28, 0x31, 0x08, 0x41, 0x92, 0xad,
+  0x81, 0x2f, 0x95, 0x8e, 0x4a, 0x23, 0xb2, 0x35, 0xe2, 0x48, 0x69, 0xea,
+  0xd0, 0x8d, 0x0e, 0x86, 0x2f, 0x3c, 0xbd, 0xb6, 0x43, 0x74, 0x4f, 0xf0,
+  0xc7, 0x76, 0xc4, 0x5b, 0x69, 0xd2, 0x12, 0x5c, 0x91, 0x91, 0xee, 0xd0,
+  0x6a, 0x6c, 0x91, 0xdd, 0x87, 0x8d, 0x79, 0xc3, 0xc0, 0x35, 0xf8, 0x3b,
+  0x9e, 0xa9, 0x1b, 0xd1, 0x9c, 0x66, 0xcb, 0xc8, 0x6d, 0xc1, 0x81, 0x65,
+  0xfe, 0x45, 0xf0, 0xf0, 0x9b, 0x3e, 0x4a, 0x02, 0x2c, 0x62, 0xf0, 0xc9,
+  0x1b, 0xfc, 0x70, 0x98, 0xbc, 0x52, 0x10, 0x39, 0xb2, 0x27, 0x57, 0xda,
+  0x02, 0xb0, 0xc5, 0x41, 0x33, 0xdf, 0x6b, 0xd2, 0x46, 0xc7, 0x92, 0xea,
+  0xfb, 0x55, 0x98, 0x29, 0xaa, 0x1e, 0x70, 0xe1, 0x03, 0x59, 0x58, 0x51,
+  0x85, 0x31, 0xfe, 0x6d, 0xa6, 0x6a, 0x0e, 0x28, 0x64, 0x35, 0xec, 0xc2,
+  0x4c, 0x6b, 0x1d, 0x1b, 0x81, 0x06, 0x7b, 0x6f, 0xb8, 0xf9, 0x8f, 0xad,
+  0x89, 0xe2, 0x4a, 0x93, 0x32, 0xac, 0xed, 0x8e, 0xa4, 0x4f, 0xe8, 0xf2,
+  0x4f, 0xca, 0x29, 0x22, 0x46, 0x0f, 0xfc, 0x64, 0x99, 0x96, 0x62, 0x9e,
+  0x2c, 0x6e, 0xcd, 0x7f, 0x2c, 0xbe, 0x8e, 0x6c, 0xb2, 0xaa, 0x9b, 0x74,
+  0x48, 0x41, 0x9f, 0xf4, 0x0a, 0x47, 0x97, 0xb6, 0x10, 0x21, 0x50, 0x15,
+  0xb2, 0x77, 0x6e, 0x96, 0xff, 0x41, 0x6f, 0x5b, 0x83, 0x26, 0x92, 0x2e,
+  0xed, 0x5c, 0x02, 0x5d, 0x99, 0xa3, 0xd6, 0xe5, 0x32, 0x13, 0x62, 0x94,
+  0xba, 0x30, 0x45, 0xa6, 0xf3, 0xf3, 0xb4, 0x77, 0xca, 0xce, 0xaf, 0xbf,
+  0x96, 0x9a, 0x93, 0xc1, 0xc7, 0x9d, 0x73, 0x40, 0xcb, 0x51, 0xb6, 0x3f,
+  0xdf, 0xf1, 0x65, 0x98, 0x67, 0x64, 0x3d, 0x39, 0x90, 0xb1, 0xbd, 0x6a,
+  0x93, 0x1f, 0x21, 0x8e, 0x01, 0xe2, 0xf1, 0x94, 0x33, 0xac, 0x84, 0xe3,
+  0x47, 0x3a, 0x9d, 0x79, 0x7c, 0xc4, 0x6f, 0xcb, 0xf1, 0x53, 0xfa, 0xcf,
+  0x77, 0xfc, 0x1f, 0x16, 0x15, 0xac, 0xc6, 0x0b, 0xcf, 0xa3, 0x50, 0x45,
+  0xc4, 0x32, 0x81, 0x29, 0xb5, 0xc5, 0xf6, 0x19, 0x61, 0x17, 0xbd, 0xc6,
+  0x5f, 0xca, 0xec, 0x91, 0x77, 0x68, 0x6c, 0x7f, 0x67, 0xe7, 0xe8, 0x8a,
+  0x0c, 0x05, 0xda, 0x89, 0x13, 0xf8, 0xdd, 0xe6, 0x4e, 0x98, 0xa0, 0xd6,
+  0x9f, 0x4b, 0xe3, 0x17, 0xe2, 0x18, 0xb8, 0x49, 0xc5, 0xa6, 0xce, 0xd7,
+  0x44, 0xca, 0xd6, 0x7f, 0x4f, 0x92, 0xe9, 0xe4, 0x3f, 0x2d, 0x8e, 0x83,
+  0x47, 0xc7, 0xf6, 0xcd, 0x68, 0x34, 0x78, 0xab, 0xdc, 0x6d, 0x6b, 0xa2,
+  0x2f, 0xee, 0xd7, 0xed, 0x86, 0x79, 0x2a, 0x68, 0x32, 0x9f, 0x7d, 0xda,
+  0x2c, 0xbe, 0xe2, 0x24, 0x28, 0xd3, 0xe5, 0xc4, 0x94, 0x40, 0x2e, 0x4b,
+  0xea, 0xf6, 0xc1, 0x78, 0x95, 0x5b, 0x09, 0x40, 0x3c, 0xac, 0xbe, 0x49,
+  0xc9, 0x21, 0x5c, 0x33, 0x23, 0x48, 0xcb, 0x42, 0x75, 0x07, 0xa4, 0xbf,
+  0xdc, 0x5a, 0x82, 0xf9, 0x3c, 0x9b, 0x33, 0x75, 0x95, 0xcb, 0xbc, 0x12,
+  0x5d, 0x2f, 0x79, 0x0d, 0x36, 0x42, 0xfa, 0xd8, 0x9a, 0x18, 0xc9, 0x94,
+  0xcb, 0x1f, 0xb0, 0xa9, 0x29, 0x30, 0xee, 0x7f, 0x89, 0x9c, 0xdd, 0xd5,
+  0xc3, 0x62, 0x72, 0xf3, 0xea, 0xed, 0x68, 0x63, 0x7d, 0xf4, 0xd9, 0xca,
+  0xee, 0x70, 0x6c, 0x80, 0x9f, 0x2e, 0x8b, 0x05, 0x27, 0xee, 0x04, 0x21,
+  0xf9, 0x0e, 0x97, 0xd5, 0xe8, 0xfc, 0xed, 0xf1, 0x37, 0x67, 0xf6, 0x9f,
+  0xb5, 0x53, 0xfe, 0xe8, 0x0c, 0x9f, 0x72, 0x3d, 0xeb, 0xc7, 0x4a, 0x83,
+  0xe7, 0x2d, 0xaa, 0x87, 0x40, 0x81, 0xa6, 0x0d, 0x39, 0xe3, 0xd7, 0x65,
+  0x2f, 0xf6, 0x75, 0x4b, 0xe2, 0x47, 0xe5, 0xba, 0xa2, 0xe7, 0x74, 0xdc,
+  0xf6, 0xbf, 0xf9, 0x3a, 0xbe, 0x60, 0x5e, 0xbd, 0x5d, 0xf3, 0x39, 0xfe,
+  0xcd, 0xc0, 0xf4, 0x09, 0x75, 0xf7, 0x4c, 0xe9, 0x7c, 0xe4, 0x52, 0x45,
+  0xa0, 0x63, 0x56, 0x46, 0xe7, 0x27, 0xf6, 0x9f, 0xc6, 0xd0, 0xc3, 0x5c,
+  0x53, 0xd9, 0xf3, 0x9c, 0x5d, 0x84, 0x0a, 0xb6, 0xc9, 0x78, 0x96, 0x2e,
+  0x6e, 0xb1, 0xb9, 0xd6, 0xf4, 0x9c, 0xbf, 0xd5, 0xb7, 0x3d, 0x28, 0x0c,
+  0x6e, 0x7e, 0x96, 0xd5, 0x6f, 0x8f, 0x44, 0x51, 0xc9, 0xa9, 0x10, 0xde,
+  0x94, 0x0e, 0x91, 0xee, 0x22, 0x16, 0x6b, 0x3c, 0xc1, 0xca, 0x26, 0xb3,
+  0xa6, 0xb6, 0xf8, 0xc5, 0x79, 0xb2, 0x35, 0x92, 0xf2, 0x1f, 0x17, 0x82,
+  0x43, 0x39, 0xd7, 0x86, 0xb6, 0x3b, 0x56, 0x7d, 0x2d, 0x93, 0x8d, 0x19,
+  0xa4, 0xb4, 0xb1, 0x3b, 0x2a, 0x44, 0xbc, 0x21, 0x35, 0x87, 0xef, 0x97,
+  0x47, 0x76, 0x84, 0xce, 0x83, 0x5b, 0x24, 0xf7, 0x4e, 0xb2, 0x35, 0xa6,
+  0x4b, 0xcb, 0xdd, 0x71, 0x52, 0x17, 0xe1, 0x29, 0xa8, 0x71, 0xba, 0x9b,
+  0x7b, 0xf6, 0xc5, 0xb3, 0xa7, 0xdb, 0xdb, 0x7d, 0xad, 0xb2, 0x66, 0x59,
+  0x3f, 0x1c, 0x6f, 0xe1, 0xf3, 0x29, 0xbe, 0x40, 0x56, 0x71, 0x6f, 0x90,
+  0x04, 0x1a, 0xcc, 0x7f, 0x77, 0x73, 0xbc, 0xb6, 0xf6, 0x2a, 0x0f, 0x8f,
+  0x19, 0xe1, 0x20, 0x23, 0x73, 0x0d, 0x75, 0x41, 0x04, 0x67, 0xf2, 0xc0,
+  0x96, 0x05, 0x22, 0xd6, 0x06, 0x91, 0xa5, 0x66, 0xab, 0x4b, 0xb7, 0x97,
+  0xf0, 0x0f, 0xc4, 0x85, 0x5d, 0x36, 0x4c, 0x53, 0xc9, 0x65, 0xd3, 0xdd,
+  0xe1, 0xfe, 0x5f, 0x3b, 0x43, 0xee, 0x64, 0x39, 0x89, 0xd3, 0xdf, 0xa0,
+  0xa2, 0x05, 0x19, 0xb1, 0xfd, 0x04, 0x65, 0xa3, 0xbe, 0xeb, 0x8b, 0x9d,
+  0x88, 0x1f, 0x7b, 0x37, 0x28, 0x35, 0x7c, 0xfc, 0xf6, 0xfb, 0x93, 0x8b,
+  0xb3, 0xb7, 0x6f, 0x8e, 0xdf, 0x3a, 0xf0, 0x3a, 0x5f, 0xa7, 0x5d, 0x81,
+  0xba, 0xee, 0x0a, 0xed, 0x62, 0xc4, 0x71, 0x4c, 0x8a, 0x47, 0x41, 0xab,
+  0xa5, 0xff, 0x1a, 0x86, 0xcd, 0x05, 0x0f, 0xd9, 0xba, 0xb1, 0x4d, 0xb1,
+  0x64, 0xd4, 0xe9, 0x94, 0xd3, 0x83, 0x86, 0x82, 0xe4, 0x97, 0x58, 0x41,
+  0x2e, 0xb1, 0xc2, 0x0f, 0x93, 0x4c, 0x79, 0x6a, 0xab, 0xa0, 0x2e, 0x8e,
+  0x65, 0xb2, 0xf8, 0x84, 0x9f, 0x46, 0x27, 0xfc, 0x6e, 0x97, 0xba, 0xa1,
+  0xeb, 0x82, 0x8e, 0xa8, 0xbd, 0x1b, 0x52, 0xaa, 0xdf, 0x68, 0xf0, 0x06,
+  0xc1, 0x9c, 0x44, 0xc2, 0xdc, 0x49, 0xc0, 0x2b, 0xec, 0xa9, 0xd2, 0x2c,
+  0xf6, 0xdb, 0x36, 0xac, 0x83, 0x11, 0x34, 0xa2, 0xc2, 0x20, 0xc4, 0xfe,
+  0x52, 0x43, 0xc0, 0x31, 0x33, 0x50, 0x15, 0x46, 0x63, 0x5c, 0xe5, 0x72,
+  0xcb, 0x78, 0x47, 0x6c, 0x71, 0x23, 0x80, 0x8b, 0x8e, 0xde, 0x9f, 0x5f,
+  0x9c, 0xfd, 0xf8, 0x97, 0x7f, 0xf0, 0x27, 0x46, 0x7e, 0x18, 0x3f, 0xf1,
+  0x35, 0x64, 0x8d, 0xff, 0xf2, 0x9b, 0xbe, 0xf6, 0xe8, 0xe7, 0x9a, 0xed,
+  0xf7, 0x35, 0x5b, 0x6c, 0x1d, 0x99, 0x2b, 0x02, 0x33, 0x42, 0x91, 0xea,
+  0xeb, 0x96, 0x1a, 0x1a, 0xd4, 0x09, 0x07, 0x1c, 0x61, 0xce, 0xf1, 0x08,
+  0xe2, 0x57, 0x5d, 0x85, 0x76, 0x40, 0xaf, 0x89, 0xda, 0x39, 0xac, 0x2b,
+  0xc5, 0x15, 0x94, 0xfa, 0x20, 0x6c, 0xc6, 0xa5, 0xec, 0xe6, 0xe3, 0xf0,
+  0xf4, 0xf4, 0xb7, 0x4f, 0x82, 0x45, 0xbf, 0x9a, 0xd3, 0x00, 0xd7, 0x82,
+  0x1b, 0xd0, 0xc0, 0x29, 0xa4, 0xb6, 0xfd, 0x3b, 0x58, 0xa8, 0x5c, 0x77,
+  0xde, 0x9e, 0x69, 0x6f, 0x24, 0xec, 0x33, 0xa8, 0x32, 0x52, 0xdc, 0xe1,
+  0x75, 0x67, 0xb7, 0x2d, 0x5f, 0x98, 0x28, 0x36, 0xfb, 0x65, 0xa4, 0xf8,
+  0xf9, 0x5f, 0x5a, 0x49, 0x54, 0xd4, 0xce, 0x06, 0xdd, 0x2f, 0xf2, 0x88,
+  0x0b, 0x17, 0x34, 0x16, 0x62, 0x73, 0x40, 0x10, 0x90, 0x86, 0xdc, 0x11,
+  0xea, 0x67, 0x8f, 0x2c, 0x83, 0x4f, 0xca, 0xbc, 0xba, 0x45, 0x0e, 0x36,
+  0x1f, 0xca, 0xbe, 0x14, 0x74, 0xab, 0x51, 0xdf, 0x92, 0x55, 0x7c, 0x74,
+  0x85, 0xfa, 0x2e, 0x3d, 0xa6, 0x3f, 0x2f, 0xcf, 0x8e, 0xce, 0x4e, 0xe9,
+  0x2f, 0xc7, 0xaf, 0x4f, 0x7e, 0xf4, 0x02, 0x4d, 0x88, 0xce, 0x55, 0xf2,
+  0xba, 0x50, 0x9d, 0x05, 0x2b, 0xd7, 0x46, 0x2b, 0xfd, 0x62, 0x8b, 0x11,
+  0xbc, 0xe1, 0x81, 0x03, 0xb6, 0x4c, 0x16, 0x9f, 0x0c, 0xb8, 0x03, 0x5a,
+  0x55, 0x78, 0x3f, 0x3c, 0x04, 0xa1, 0xc9, 0x10, 0x2c, 0x12, 0xac, 0x10,
+  0x2e, 0xf9, 0x50, 0xe8, 0x35, 0xd7, 0x56, 0x3a, 0x85, 0x7c, 0xa9, 0xfc,
+  0xca, 0x41, 0x0c, 0x43, 0x57, 0xa6, 0x79, 0x2f, 0xd4, 0x7d, 0x81, 0x2a,
+  0xc8, 0x8e, 0x4a, 0x91, 0x6d, 0xd9, 0x30, 0x24, 0xdb, 0x11, 0x56, 0x54,
+  0x94, 0xc2, 0x46, 0x88, 0x8c, 0xf0, 0x9d, 0x85, 0xf9, 0xe5, 0x9a, 0x6b,
+  0x8e, 0x49, 0x27, 0x40, 0xf3, 0x57, 0x91, 0x17, 0x86, 0x98, 0xba, 0x37,
+  0x58, 0x5c, 0xe8, 0xb5, 0x93, 0x6c, 0x20, 0x17, 0x19, 0xc9, 0xac, 0x62,
+  0x77, 0x29, 0xf2, 0xb4, 0x91, 0xe4, 0x2d, 0x2f, 0xb5, 0xda, 0x48, 0x7f,
+  0x53, 0x23, 0x69, 0xb3, 0x95, 0x67, 0xbf, 0xa5, 0x91, 0x67, 0xad, 0x36,
+  0x6e, 0x7e, 0x53, 0x23, 0xae, 0x60, 0x07, 0x5d, 0x8b, 0x3f, 0x9e, 0x5c,
+  0x26, 0x47, 0x67, 0xaf, 0xfc, 0x1e, 0xbd, 0x74, 0x57, 0x7b, 0x4a, 0x16,
+  0xc1, 0x82, 0x8b, 0x7c, 0x5f, 0x05, 0x35, 0x8b, 0xad, 0xfc, 0x2d, 0xa3,
+  0x18, 0x2a, 0x5f, 0x41, 0x36, 0xc7, 0x8f, 0x4a, 0x49, 0x24, 0x0b, 0x59,
+  0xd4, 0x5c, 0xb5, 0x5c, 0x94, 0x7e, 0x73, 0xa0, 0x1a, 0xde, 0xd9, 0xcc,
+  0xdb, 0x9b, 0x96, 0xea, 0x0c, 0x4f, 0xc6, 0x29, 0xc7, 0xd3, 0x16, 0x12,
+  0x87, 0x24, 0x05, 0xe5, 0xb0, 0xf6, 0xf0, 0xb5, 0xc2, 0x25, 0xa6, 0xc2,
+  0x75, 0xc2, 0xe9, 0x9b, 0xa8, 0xab, 0x28, 0xe6, 0x3a, 0x57, 0x0c, 0x45,
+  0x6f, 0x1a, 0x19, 0xb1, 0x7b, 0x2a, 0x09, 0x17, 0x8d, 0x1d, 0xa3, 0x8c,
+  0xcd, 0xd0, 0xbc, 0xd8, 0xde, 0x99, 0x9a, 0xef, 0x00, 0xf7, 0xe2, 0xc2,
+  0xd9, 0xde, 0x5a, 0x4c, 0x2c, 0x12, 0x51, 0xae, 0x09, 0xf7, 0x9d, 0x7d,
+  0x85, 0x1d, 0x48, 0x65, 0x53, 0x3a, 0x7f, 0x9a, 0x4a, 0x99, 0xff, 0x3d,
+  0xb8, 0xa3, 0x9f, 0x78, 0x04, 0xc8, 0x3c, 0x9d, 0x09, 0x2e, 0x47, 0xf3,
+  0xdf, 0x1f, 0x16, 0x75, 0xfa, 0x01, 0xb0, 0x32, 0x56, 0x89, 0x30, 0x87,
+  0x93, 0x40, 0x0c, 0x3e, 0x55, 0xe1, 0x9c, 0x98, 0x29, 0x2e, 0xe7, 0xcf,
+  0x9c, 0xf1, 0x9a, 0x3c, 0x95, 0x56, 0x0e, 0xd5, 0xc7, 0xf8, 0x11, 0x2d,
+  0xb7, 0x2c, 0xce, 0xff, 0x8a, 0x4b, 0xc7, 0x75, 0x07, 0x0d, 0xdd, 0x67,
+  0x8d, 0x27, 0xa6, 0x10, 0xdc, 0x2f, 0x42, 0xc6, 0xf9, 0x24, 0x97, 0x3c,
+  0x19, 0x29, 0x9d, 0x3b, 0x45, 0x91, 0x14, 0x99, 0xb4, 0xc1, 0x1a, 0x4f,
+  0x68, 0x21, 0xc5, 0xff, 0x54, 0xc2, 0x99, 0xfe, 0x31, 0x2d, 0xb4, 0xa8,
+  0x39, 0x5b, 0x0c, 0x5c, 0x39, 0x8b, 0x7e, 0xf1, 0x20, 0x81, 0xc0, 0x74,
+  0x01, 0xbf, 0x4c, 0xc4, 0xbb, 0xae, 0x0b, 0xa3, 0x96, 0xa9, 0x37, 0x03,
+  0x9f, 0x59, 0xd4, 0x5a, 0x65, 0xb9, 0xd5, 0xcf, 0x30, 0x21, 0x0e, 0xa7,
+  0x91, 0x92, 0x00, 0xab, 0xd4, 0x12, 0x70, 0xf9, 0x44, 0x12, 0xa8, 0x78,
+  0xac, 0x31, 0xfb, 0xa1, 0xd5, 0x3f, 0xf7, 0xb3, 0xfe, 0xd9, 0x9a, 0xef,
+  0x70, 0x63, 0xb2, 0x6e, 0xf2, 0x91, 0x36, 0xf6, 0x9e, 0xdb, 0x8f, 0x5b,
+  0xfb, 0xbc, 0xbd, 0x45, 0x0c, 0x0a, 0xcf, 0x54, 0x68, 0x45, 0x98, 0x11,
+  0xf3, 0x85, 0x3e, 0xc9, 0x4e, 0x88, 0xfb, 0x8c, 0x3d, 0x3d, 0x0e, 0xb4,
+  0x59, 0x66, 0xcb, 0x99, 0x1b, 0xa2, 0xfd, 0x10, 0x29, 0x38, 0x08, 0xf3,
+  0x61, 0xc6, 0x27, 0xda, 0xdf, 0x18, 0xd3, 0x15, 0x2a, 0x8c, 0xcf, 0xfd,
+  0x47, 0x52, 0xa4, 0x4c, 0xd0, 0x26, 0x59, 0xe4, 0x6e, 0x43, 0x6a, 0x09,
+  0x3c, 0xfc, 0x88, 0x93, 0x7e, 0xe9, 0x1a, 0x28, 0xdc, 0xbf, 0xed, 0x8d,
+  0x98, 0x30, 0x5a, 0x6e, 0x0a, 0x8f, 0xc6, 0xc6, 0x3c, 0xac, 0x4a, 0xa1,
+  0xde, 0xf0, 0x64, 0xd6, 0x16, 0x5c, 0x96, 0x89, 0x40, 0xb1, 0xd5, 0x21,
+  0x28, 0x5c, 0x22, 0x9e, 0xc4, 0x5a, 0x18, 0x72, 0xe0, 0xc3, 0x9e, 0x06,
+  0x85, 0x1b, 0x70, 0x25, 0x07, 0x5c, 0xdc, 0x7c, 0x02, 0xdc, 0xbd, 0x03,
+  0x4c, 0x5f, 0x12, 0xe7, 0x28, 0xfb, 0xe2, 0x7e, 0x7e, 0x1e, 0xf6, 0xf6,
+  0xda, 0x93, 0x7d, 0x7e, 0x38, 0x1a, 0xd9, 0x44, 0x1f, 0x85, 0x13, 0x2a,
+  0x53, 0xa8, 0x29, 0x92, 0x60, 0x2b, 0x52, 0x26, 0x8f, 0xd8, 0xdc, 0xd1,
+  0x36, 0x5a, 0xa9, 0x4e, 0x7b, 0x4f, 0xdc, 0xb7, 0xdc, 0xa7, 0xbe, 0x97,
+  0xb6, 0xfa, 0x9f, 0xf8, 0xa9, 0xee, 0x6f, 0x7d, 0xdf, 0xf1, 0xad, 0xa7,
+  0xd1, 0x26, 0xda, 0xdf, 0xff, 0xdc, 0x58, 0x2c, 0x84, 0xab, 0x75, 0x96,
+  0xf8, 0x0f, 0x06, 0x5f, 0xa4, 0xe7, 0x06, 0x4a, 0xd4, 0x96, 0x75, 0x94,
+  0x9f, 0x40, 0x84, 0x6a, 0x11, 0x7e, 0xea, 0x99, 0xfb, 0x14, 0xd9, 0x4c,
+  0x9b, 0x08, 0x47, 0xe9, 0x21, 0x89, 0xce, 0x0e, 0xfc, 0xca, 0x7c, 0x50,
+  0x4e, 0x78, 0x0e, 0x48, 0x0d, 0x5b, 0x9b, 0x3c, 0x66, 0xbd, 0x08, 0xbe,
+  0xf3, 0xb9, 0x1f, 0x92, 0xef, 0xb7, 0x94, 0x1f, 0x06, 0xab, 0xd5, 0x30,
+  0x38, 0xac, 0x6e, 0xa3, 0x18, 0x58, 0xda, 0xc1, 0x7f, 0xda, 0x72, 0x46,
+  0x5e, 0xf5, 0x5f, 0x91, 0xe3, 0x77, 0xce, 0x9b, 0x58, 0x89, 0xe3, 0x87,
+  0xc9, 0x19, 0x8c, 0xb0, 0x06, 0x3f, 0x20, 0x4c, 0x59, 0x3e, 0xee, 0x8e,
+  0x12, 0x38, 0x3c, 0xed, 0x7b, 0xcf, 0xfd, 0x9c, 0x58, 0x97, 0x2c, 0x1c,
+  0xb8, 0xa3, 0xc7, 0xc7, 0x47, 0x1e, 0x2c, 0xda, 0x9f, 0x25, 0x17, 0xc7,
+  0x97, 0x17, 0x9c, 0x04, 0x93, 0x80, 0xe2, 0xb0, 0x2d, 0x62, 0xe9, 0x48,
+  0x6d, 0x3b, 0xb4, 0x83, 0x94, 0xd1, 0x0e, 0xee, 0x20, 0xbf, 0x93, 0xff,
+  0xb6, 0x62, 0x81, 0x84, 0x5b, 0x97, 0xee, 0x50, 0xfd, 0xa7, 0xbd, 0x27,
+  0xb4, 0x19, 0x5c, 0x5e, 0x02, 0xb7, 0xb2, 0x07, 0xba, 0xeb, 0xc9, 0x70,
+  0xf3, 0xef, 0x93, 0xf6, 0x84, 0xcc, 0x59, 0x04, 0xa7, 0xcb, 0x9d, 0x1f,
+  0xba, 0x7c, 0x30, 0x23, 0x91, 0x00, 0x6b, 0xb2, 0x0a, 0x40, 0xc9, 0x3f,
+  0x8f, 0x62, 0x31, 0xee, 0xe3, 0x2a, 0xf4, 0xb5, 0x13, 0xce, 0xef, 0x8e,
+  0xcf, 0x05, 0xda, 0x45, 0xa2, 0xfe, 0x81, 0xe4, 0xe9, 0xee, 0x6e, 0x07,
+  0x7d, 0x7e, 0x3a, 0x2e, 0xee, 0x0c, 0x34, 0xaa, 0x74, 0x20, 0x78, 0x4b,
+  0x8c, 0x66, 0xa8, 0x16, 0x15, 0xca, 0x79, 0x5f, 0xb1, 0x4f, 0x80, 0x67,
+  0xcc, 0x62, 0x2d, 0xc1, 0xbc, 0xc9, 0xa9, 0xfc, 0x01, 0xfc, 0x24, 0x36,
+  0x69, 0xad, 0xe3, 0x28, 0xe4, 0x25, 0xc6, 0xf7, 0x9c, 0x06, 0x45, 0x05,
+  0x14, 0x7f, 0x10, 0xf5, 0x4c, 0x19, 0x2a, 0x83, 0xcf, 0x3c, 0x8b, 0x77,
+  0xc4, 0xe8, 0xf2, 0xec, 0x42, 0x77, 0x58, 0x2c, 0x75, 0xb5, 0x62, 0x25,
+  0x3f, 0xe2, 0x81, 0xb3, 0xfd, 0x8e, 0x00, 0xbf, 0x73, 0xfd, 0x4a, 0xda,
+  0x1f, 0x53, 0x5c, 0xf9, 0xaf, 0x7e, 0xe6, 0x01, 0x63, 0x3a, 0xb4, 0xef,
+  0xd3, 0x12, 0x24, 0x46, 0xc6, 0x3b, 0x6f, 0x65, 0x2c, 0x83, 0x97, 0xe4,
+  0xa0, 0x9d, 0xad, 0xb0, 0xd9, 0xc5, 0x8b, 0xcb, 0xfb, 0x48, 0xfd, 0xb9,
+  0x8c, 0x53, 0x55, 0xa7, 0x98, 0x0b, 0xba, 0xb5, 0xf7, 0xa2, 0x1c, 0xa2,
+  0x33, 0x57, 0x5a, 0xc0, 0x02, 0xf4, 0xee, 0xee, 0xf2, 0xa6, 0x2b, 0x02,
+  0xc2, 0x1c, 0x20, 0x12, 0xb8, 0x83, 0xe6, 0x02, 0xa2, 0xfe, 0x76, 0x7b,
+  0xb5, 0x27, 0xa4, 0x19, 0x09, 0x78, 0xb4, 0xb0, 0xda, 0xad, 0xa6, 0x2a,
+  0x7a, 0x2d, 0x6b, 0xd7, 0xcd, 0xf3, 0xf9, 0xd9, 0xc5, 0xa5, 0x75, 0x0d,
+  0x9f, 0xc5, 0x0f, 0x5a, 0xe7, 0x87, 0xa9, 0xb0, 0x34, 0x44, 0x03, 0xc9,
+  0x22, 0x8b, 0x10, 0x59, 0xa5, 0xaa, 0x11, 0xca, 0xa2, 0xa0, 0x1d, 0x6b,
+  0x88, 0x6d, 0xb6, 0xf2, 0xc1, 0x30, 0x45, 0xae, 0x9e, 0xfd, 0x95, 0x63,
+  0x9f, 0x62, 0x01, 0xdd, 0x1d, 0x48, 0xf5, 0x3a, 0xcd, 0x93, 0xbd, 0x78,
+  0x77, 0xb0, 0xf1, 0x7c, 0x71, 0xcc, 0x75, 0x4e, 0x2f, 0x6f, 0xe4, 0x6f,
+  0x51, 0xdf, 0xc5, 0xbf, 0xab, 0x3f, 0xec, 0x86, 0x7f, 0x60, 0x77, 0x70,
+  0xd2, 0x06, 0xa3, 0xc0, 0xb9, 0x7d, 0xe7, 0x6f, 0x0e, 0xe6, 0xec, 0x49,
+  0x90, 0xa0, 0x0b, 0xb1, 0xa9, 0x7b, 0x05, 0xb9, 0xd4, 0xf8, 0x41, 0x4f,
+  0xbf, 0xd2, 0xa3, 0x5b, 0x57, 0x8e, 0x44, 0x51, 0xde, 0x06, 0x2d, 0x3c,
+  0xf5, 0x2d, 0x2c, 0x59, 0xbe, 0x6b, 0x03, 0x27, 0x16, 0xb7, 0xe6, 0x1f,
+  0x3a, 0x10, 0xe7, 0x75, 0xb6, 0xb0, 0x8d, 0x21, 0xcf, 0xf9, 0x76, 0x9e,
+  0xb9, 0x68, 0x8f, 0xe9, 0x47, 0x41, 0x57, 0xf8, 0xc7, 0x96, 0x19, 0x09,
+  0x00, 0x57, 0x6b, 0xdb, 0x3d, 0xf9, 0xcc, 0xdf, 0x10, 0x6c, 0x4a, 0x78,
+  0x04, 0x86, 0xce, 0x40, 0x70, 0x23, 0x31, 0x82, 0x25, 0x5f, 0xac, 0x40,
+  0x93, 0x48, 0x62, 0x62, 0xc6, 0x84, 0xad, 0x0a, 0xa1, 0x88, 0x02, 0xbe,
+  0x9a, 0xe3, 0xeb, 0xbf, 0xa3, 0x37, 0xd1, 0xc9, 0xe9, 0xb1, 0x5f, 0x2e,
+  0xe1, 0xa1, 0xc2, 0x61, 0xf6, 0x4a, 0x1e, 0x1d, 0xdc, 0x85, 0xbb, 0x2e,
+  0x86, 0xc9, 0x39, 0x17, 0x7a, 0x41, 0xf4, 0xa9, 0xfa, 0x77, 0xdf, 0x9a,
+  0x1c, 0x16, 0x38, 0x63, 0xe8, 0x02, 0x85, 0x53, 0x34, 0x5f, 0xd0, 0xea,
+  0xe2, 0x27, 0xfc, 0xd7, 0xa0, 0x46, 0x47, 0x34, 0xe4, 0xe7, 0xfe, 0xe5,
+  0x8a, 0xc6, 0x41, 0xa6, 0x5a, 0xfb, 0x91, 0xa7, 0xba, 0xb7, 0xc8, 0x8e,
+  0x93, 0x62, 0xc1, 0x26, 0x9e, 0xf9, 0x4c, 0x5b, 0x59, 0x69, 0x69, 0xe1,
+  0xca, 0x9e, 0x69, 0x88, 0xf1, 0xa0, 0x29, 0xb9, 0x14, 0x0e, 0x65, 0x9e,
+  0x80, 0x5f, 0xa7, 0x93, 0x33, 0x4e, 0x27, 0xb7, 0xd4, 0xd6, 0x82, 0x25,
+  0xee, 0xcc, 0xfc, 0xe5, 0x3e, 0xa1, 0x85, 0x25, 0x26, 0xbf, 0xa0, 0x94,
+  0x70, 0x71, 0xcd, 0xeb, 0x56, 0xd5, 0x9a, 0xa7, 0xb2, 0x1b, 0xdd, 0xd6,
+  0x71, 0xf7, 0x58, 0xa3, 0x77, 0xfc, 0x61, 0xe7, 0x0c, 0xc1, 0x6a, 0xb3,
+  0x6b, 0x08, 0x25, 0xdf, 0x83, 0xa6, 0x9e, 0xf9, 0xa6, 0xae, 0xc0, 0x86,
+  0x6c, 0xf2, 0xfd, 0xb0, 0x21, 0x83, 0x1c, 0x15, 0x72, 0xee, 0x9e, 0x14,
+  0x63, 0x41, 0x3c, 0xd4, 0x1d, 0xc7, 0x2a, 0xf8, 0x86, 0x6c, 0x86, 0xcb,
+  0x82, 0xb1, 0x08, 0x8b, 0x07, 0xcf, 0x01, 0x31, 0x14, 0x74, 0x9f, 0xf8,
+  0x20, 0x84, 0x17, 0xdc, 0xb1, 0x43, 0x88, 0xb5, 0xa9, 0x06, 0xfa, 0x3c,
+  0xfd, 0x10, 0x5d, 0xf5, 0xf3, 0xd5, 0x5c, 0x53, 0xdf, 0x83, 0x2f, 0x7d,
+  0xa1, 0xd6, 0xac, 0x56, 0x8d, 0x36, 0xfb, 0x2f, 0x14, 0xa6, 0x85, 0x0b,
+  0xe9, 0x5a, 0x2e, 0xc5, 0x42, 0x80, 0xaa, 0x95, 0x2b, 0xa3, 0xb1, 0x11,
+  0x87, 0x4e, 0xf8, 0x42, 0x56, 0x35, 0xd1, 0xe0, 0x86, 0x45, 0x40, 0x5c,
+  0xc8, 0xf3, 0xad, 0x8f, 0xc9, 0xaf, 0x2c, 0x5a, 0xd8, 0x11, 0x90, 0x29,
+  0xb3, 0xbf, 0xa2, 0x7a, 0xd5, 0x50, 0x2e, 0x1d, 0xe1, 0x0e, 0x92, 0x51,
+  0x32, 0xc4, 0xc0, 0x8b, 0xbc, 0xa7, 0xcf, 0xd5, 0x55, 0xa1, 0xa6, 0xb0,
+  0x95, 0x54, 0x6a, 0x7b, 0x9a, 0x9f, 0xed, 0xf9, 0x0c, 0x85, 0x2c, 0x2b,
+  0x37, 0x2b, 0x91, 0x0e, 0x41, 0xba, 0x39, 0x09, 0xb8, 0xd1, 0xe8, 0xdb,
+  0xe4, 0xcd, 0xab, 0x67, 0x9c, 0xf3, 0x78, 0x9d, 0x95, 0x5c, 0xad, 0xcc,
+  0xdb, 0x62, 0x67, 0xdf, 0x05, 0x8d, 0xed, 0x7b, 0x5c, 0x81, 0xd9, 0x4f,
+  0x2a, 0xd0, 0x54, 0xd3, 0xa6, 0x25, 0x64, 0xee, 0xb4, 0x6b, 0x0b, 0xa1,
+  0x58, 0x21, 0x1f, 0xa3, 0x14, 0x84, 0xee, 0xd2, 0x4e, 0x77, 0x68, 0x0a,
+  0xb1, 0x67, 0x4f, 0xbc, 0x10, 0xe3, 0xf2, 0xed, 0x05, 0x99, 0xd6, 0xd7,
+  0xac, 0x50, 0x77, 0x9c, 0xa8, 0x67, 0x22, 0x38, 0x8f, 0xe4, 0xdc, 0xb3,
+  0x32, 0x1b, 0xbf, 0x96, 0x56, 0x06, 0x48, 0x09, 0xde, 0x7b, 0x16, 0x9a,
+  0x93, 0xa4, 0x90, 0xe3, 0x5e, 0xa4, 0xf9, 0x43, 0xad, 0x3e, 0xd6, 0x54,
+  0x82, 0x67, 0x3f, 0x73, 0xcf, 0xb2, 0xef, 0x20, 0x5f, 0x04, 0x8c, 0xf1,
+  0x6b, 0xde, 0x50, 0x25, 0x58, 0x54, 0x03, 0xaf, 0x9e, 0x89, 0xde, 0x13,
+  0xcc, 0x7d, 0xf0, 0xca, 0xf3, 0xa6, 0xb5, 0x8c, 0x5a, 0x3d, 0xbe, 0xf2,
+  0x25, 0x0f, 0x2a, 0x5f, 0xde, 0x84, 0x87, 0xf3, 0x33, 0xb9, 0xa9, 0xcf,
+  0xdb, 0xec, 0x01, 0x26, 0x03, 0x1b, 0x81, 0x57, 0x3b, 0xea, 0xb2, 0xf5,
+  0x8f, 0x0e, 0x13, 0x7b, 0x25, 0xca, 0xd5, 0xe0, 0xbd, 0x1e, 0x7c, 0x64,
+  0x4f, 0xcf, 0x0c, 0x0d, 0xb9, 0xb8, 0x5e, 0xe4, 0x7f, 0xcf, 0x82, 0x74,
+  0x59, 0x63, 0xfb, 0x0f, 0x1e, 0xdf, 0x57, 0x81, 0x71, 0x97, 0xce, 0x72,
+  0x15, 0x8a, 0xec, 0x47, 0xf7, 0x0f, 0x3c, 0xd1, 0x5d, 0xfb, 0x21, 0xe7,
+  0x23, 0x2a, 0x18, 0x54, 0x2e, 0x1c, 0xc2, 0x11, 0x9c, 0xac, 0xc1, 0x46,
+  0xf1, 0xd9, 0x53, 0xd5, 0xbd, 0x4c, 0x3f, 0xe6, 0x7b, 0x09, 0x15, 0xc8,
+  0x39, 0xc0, 0x1d, 0x89, 0xe9, 0xcf, 0xf4, 0xea, 0xd3, 0xa5, 0x74, 0x8c,
+  0xff, 0xa5, 0x15, 0x39, 0xe0, 0xbf, 0xde, 0xe7, 0x0b, 0x4d, 0x40, 0x8a,
+  0x5e, 0xff, 0x6c, 0x8d, 0x0b, 0xaa, 0x92, 0x7b, 0xf3, 0x18, 0x7b, 0x29,
+  0x78, 0xfe, 0x73, 0x7f, 0x12, 0xa4, 0xa4, 0x86, 0x86, 0x64, 0x2d, 0x94,
+  0x0a, 0x54, 0x9c, 0x11, 0xad, 0xdb, 0x59, 0x62, 0xd3, 0x65, 0x69, 0x4c,
+  0x92, 0x1d, 0xb4, 0xd4, 0x57, 0xee, 0xf3, 0xb3, 0x82, 0xa5, 0x69, 0xf0,
+  0x3d, 0xd9, 0x52, 0xaf, 0x51, 0x7b, 0xc9, 0x1b, 0x08, 0x8b, 0x46, 0x95,
+  0x14, 0xff, 0xf4, 0x73, 0xdd, 0x1b, 0x76, 0x5f, 0x9a, 0x9a, 0xba, 0xf6,
+  0x8d, 0xcf, 0x77, 0x43, 0xa5, 0x75, 0xca, 0x9e, 0x7a, 0xe1, 0x01, 0x5c,
+  0xfb, 0x82, 0xec, 0x8c, 0x13, 0xba, 0x46, 0xae, 0x69, 0x53, 0xe3, 0x19,
+  0xcf, 0x7f, 0xe9, 0x1f, 0xdb, 0x6f, 0x08, 0xdd, 0xcb, 0x50, 0x85, 0x4a,
+  0x4e, 0x5e, 0x05, 0x0f, 0x3e, 0xf1, 0x03, 0x4c, 0x67, 0xac, 0x0d, 0x3c,
+  0x88, 0x27, 0xa2, 0xd2, 0x42, 0x35, 0xc1, 0xa3, 0x4f, 0x35, 0x89, 0x41,
+  0x52, 0xb7, 0x30, 0xfd, 0xd1, 0x33, 0xb2, 0x1d, 0x8e, 0x90, 0xf6, 0x55,
+  0x23, 0x6d, 0x7e, 0x61, 0xd1, 0x82, 0xf6, 0xda, 0x7f, 0xfe, 0xd9, 0x23,
+  0xcf, 0xea, 0xa5, 0x59, 0xb9, 0xab, 0x3e, 0x78, 0xef, 0xf3, 0xf8, 0x98,
+  0x9b, 0x59, 0x60, 0xe4, 0x1e, 0x74, 0xd4, 0xf8, 0xa4, 0x25, 0x5b, 0xcc,
+  0x0a, 0xf7, 0xef, 0xe6, 0xfa, 0x29, 0x39, 0xfd, 0xad, 0xfa, 0xf7, 0xb0,
+  0xbf, 0x5f, 0x04, 0x0c, 0x42, 0xea, 0xf4, 0x71, 0xe5, 0x12, 0xc3, 0x12,
+  0x4a, 0x1e, 0xab, 0x8d, 0xd9, 0x09, 0x5a, 0x90, 0x35, 0x27, 0x3d, 0x62,
+  0xb5, 0xf0, 0x92, 0x43, 0x8c, 0x41, 0xe5, 0x56, 0x34, 0xd4, 0xb4, 0xf6,
+  0xee, 0x5b, 0x5a, 0x54, 0xec, 0x8e, 0xc0, 0x79, 0xb6, 0xdb, 0x3a, 0x06,
+  0xd5, 0xcd, 0x4a, 0x4c, 0x6f, 0x37, 0x22, 0xcf, 0xe8, 0x13, 0xbc, 0xb6,
+  0xef, 0xa5, 0x17, 0xfa, 0x06, 0xad, 0xf1, 0x88, 0x7a, 0x2b, 0xb6, 0x79,
+  0x82, 0x6d, 0x68, 0x81, 0x0f, 0x94, 0x67, 0xf5, 0x8c, 0xa0, 0x5b, 0xe9,
+  0x9a, 0xec, 0x75, 0x25, 0xdc, 0x08, 0x3e, 0xa3, 0xaa, 0x0d, 0x43, 0xcd,
+  0x69, 0x95, 0x6e, 0xb2, 0xc9, 0xad, 0x1d, 0x19, 0x6d, 0xc4, 0xd3, 0x74,
+  0x04, 0x6f, 0x3d, 0x75, 0x53, 0x0b, 0xb3, 0xe6, 0xe2, 0xb8, 0x6d, 0x09,
+  0xf8, 0x47, 0x65, 0xd7, 0x5c, 0x5c, 0x8e, 0xce, 0x0f, 0xb8, 0xcf, 0x12,
+  0x82, 0xa1, 0x03, 0x71, 0x34, 0xca, 0xfe, 0xa6, 0x69, 0xb5, 0x95, 0x7f,
+  0xfa, 0xb3, 0x35, 0x4f, 0x8f, 0x14, 0x22, 0x75, 0x32, 0x65, 0xf1, 0x4b,
+  0xeb, 0x10, 0xbe, 0xf4, 0xb9, 0x26, 0xbd, 0x9b, 0x6b, 0x57, 0x3c, 0x47,
+  0xdc, 0x33, 0x97, 0x50, 0xe1, 0x1f, 0xfe, 0xc2, 0xdb, 0x35, 0x37, 0xab,
+  0xc5, 0xad, 0xd3, 0x17, 0x15, 0x70, 0x66, 0x0b, 0xec, 0x5e, 0xf8, 0xf1,
+  0x47, 0x91, 0xaf, 0x0e, 0x52, 0xa4, 0x6e, 0x7d, 0x57, 0xe4, 0x8f, 0x84,
+  0x91, 0x5c, 0xc9, 0xbc, 0xb5, 0xe1, 0x0b, 0x2f, 0xb3, 0x59, 0xc6, 0xbc,
+  0xc9, 0x62, 0x23, 0x60, 0x53, 0x75, 0xa5, 0x73, 0x31, 0x72, 0x56, 0x8a,
+  0x11, 0x67, 0x9a, 0xd7, 0xb2, 0x60, 0xb8, 0xa5, 0x3a, 0x8a, 0x68, 0xb6,
+  0x0f, 0xdf, 0x5d, 0x7e, 0x7b, 0x76, 0x31, 0x4a, 0x76, 0x98, 0xe0, 0xee,
+  0xf2, 0xe2, 0xe4, 0xeb, 0x77, 0x64, 0x7b, 0xbb, 0x90, 0xc8, 0xab, 0x94,
+  0xac, 0xf2, 0x59, 0x32, 0xaa, 0xb3, 0x05, 0xcd, 0xe1, 0xb5, 0x15, 0x92,
+  0x02, 0x70, 0x86, 0xef, 0xa9, 0xa2, 0xec, 0xbb, 0x5a, 0xa1, 0xf7, 0x37,
+  0x85, 0x4e, 0x04, 0xf2, 0x8e, 0x00, 0x96, 0xe7, 0x1c, 0x84, 0xc2, 0xdb,
+  0x95, 0x79, 0x93, 0xb4, 0x30, 0xb1, 0xc8, 0x66, 0x72, 0xf9, 0xed, 0xe1,
+  0xdb, 0xef, 0x46, 0xc6, 0xf0, 0xfd, 0xc3, 0x0f, 0x3f, 0x6c, 0x34, 0xf3,
+  0xf2, 0xa0, 0xda, 0xdd, 0xa4, 0x1f, 0x3e, 0x0c, 0xab, 0x6c, 0x63, 0xe3,
+  0xb5, 0x8f, 0x93, 0xf9, 0x32, 0x60, 0xd5, 0x8a, 0x6e, 0x75, 0xfa, 0xf5,
+  0xce, 0x72, 0x35, 0xe6, 0xb2, 0x63, 0x3b, 0xab, 0x3a, 0x9f, 0xd1, 0x65,
+  0x90, 0x55, 0x78, 0x7b, 0x67, 0x63, 0x63, 0x74, 0x7c, 0x9c, 0x1c, 0x9e,
+  0x8e, 0xce, 0x82, 0x77, 0xb7, 0xf6, 0x18, 0x35, 0x72, 0x9d, 0xd5, 0x5b,
+  0xcc, 0x15, 0x79, 0x7a, 0x78, 0xc9, 0xf6, 0xe6, 0xf7, 0xc7, 0x17, 0xa3,
+  0x93, 0xb3, 0xb7, 0xbc, 0x3a, 0x0c, 0xee, 0x4b, 0x67, 0xf7, 0x8c, 0xed,
+  0xbc, 0xca, 0x41, 0xdc, 0x71, 0x6f, 0x35, 0xbd, 0x98, 0x81, 0x98, 0xd4,
+  0x32, 0xd1, 0xa0, 0x05, 0xc2, 0x60, 0xc5, 0x84, 0x05, 0xc2, 0x5a, 0xb3,
+  0xd1, 0xa7, 0x02, 0x89, 0x67, 0xc0, 0xf9, 0x9c, 0xa4, 0xd0, 0x56, 0x36,
+  0x16, 0xd0, 0x70, 0x5f, 0xd2, 0xdd, 0x91, 0xb4, 0x11, 0x60, 0x0c, 0x3b,
+  0x07, 0x3e, 0x3a, 0x79, 0x73, 0x4e, 0xd6, 0xd7, 0xbb, 0xd1, 0xe1, 0x37,
+  0xc7, 0xfc, 0xe8, 0x37, 0x59, 0xed, 0xd7, 0x43, 0x6a, 0x8f, 0xf1, 0x47,
+  0xde, 0x66, 0x75, 0x35, 0x49, 0x97, 0x9c, 0x91, 0x4d, 0x9f, 0x19, 0xc8,
+  0x1d, 0x10, 0xb4, 0x2d, 0x7a, 0xb8, 0x2f, 0xd0, 0xb6, 0xd0, 0xe7, 0x51,
+  0x3d, 0x2d, 0x6c, 0xf7, 0xe2, 0xf8, 0xf0, 0xd5, 0x9b, 0x63, 0x83, 0x9d,
+  0x0b, 0xdd, 0x3d, 0x35, 0x7a, 0x53, 0x70, 0xbd, 0x5c, 0xe7, 0x87, 0xe6,
+  0x7b, 0x99, 0x27, 0x9f, 0x7e, 0xc3, 0xe5, 0xcb, 0xba, 0x3f, 0xe7, 0x17,
+  0x0a, 0xcf, 0x0e, 0xaf, 0xf2, 0x1d, 0x69, 0xdd, 0xbe, 0x97, 0xba, 0x29,
+  0x31, 0x5e, 0x63, 0x55, 0x55, 0xc5, 0x9f, 0x00, 0x47, 0xc4, 0x17, 0xbb,
+  0xbb, 0xbb, 0x8f, 0x8c, 0x03, 0xba, 0xbc, 0xde, 0x78, 0x34, 0x94, 0x03,
+  0x7e, 0x7c, 0xc7, 0xb7, 0xef, 0x7b, 0x3c, 0xd3, 0xf4, 0x77, 0x2e, 0x10,
+  0xb3, 0x10, 0xa2, 0xce, 0xbc, 0xce, 0xba, 0xbb, 0x3c, 0x29, 0x0a, 0xb7,
+  0x02, 0x8d, 0xc9, 0x99, 0x32, 0x15, 0x75, 0x5e, 0x07, 0x28, 0x5c, 0xeb,
+  0x38, 0xd9, 0x1e, 0xc0, 0x98, 0x95, 0x0f, 0xed, 0x26, 0xf9, 0x37, 0xd4,
+  0x26, 0xff, 0x67, 0x58, 0x94, 0xd7, 0x3b, 0xf3, 0x03, 0xa8, 0x13, 0xf4,
+  0xd0, 0xeb, 0x0c, 0x55, 0x87, 0xef, 0x0b, 0x07, 0xb5, 0xae, 0x78, 0x62,
+  0x39, 0x2b, 0xe4, 0x13, 0xfa, 0xf5, 0x2b, 0x66, 0x41, 0xd0, 0x48, 0x57,
+  0x36, 0xf2, 0x51, 0xb2, 0x76, 0xbd, 0x2a, 0x5e, 0x30, 0xf6, 0xf6, 0x0d,
+  0x49, 0x80, 0xd0, 0x57, 0x18, 0x31, 0x86, 0x2d, 0x42, 0x7f, 0x2d, 0x69,
+  0xcb, 0x0c, 0xeb, 0x0f, 0x90, 0x79, 0x5a, 0xed, 0x4a, 0x88, 0xe6, 0x38,
+  0x7a, 0xba, 0xe4, 0xa4, 0xb9, 0x12, 0x28, 0x42, 0x7c, 0x81, 0x13, 0xf1,
+  0x94, 0xb7, 0xda, 0xe1, 0x6f, 0xb8, 0xe1, 0xf6, 0x37, 0x07, 0x03, 0xec,
+  0x9f, 0xca, 0xed, 0x96, 0x4f, 0xf8, 0x78, 0x30, 0x28, 0x99, 0xfd, 0x85,
+  0x5e, 0x91, 0xc1, 0xde, 0x19, 0x51, 0x2f, 0xa2, 0x6f, 0xad, 0x7c, 0x51,
+  0xb2, 0x4a, 0x3e, 0x57, 0xdd, 0xd0, 0xf9, 0x1d, 0x6a, 0x72, 0x20, 0xbe,
+  0x45, 0x6b, 0xb2, 0x83, 0x0c, 0xa9, 0x4f, 0xfe, 0xd2, 0xd1, 0xb9, 0x2b,
+  0xb3, 0x4e, 0x33, 0x70, 0xc7, 0x53, 0x70, 0x9b, 0x61, 0xf4, 0xa1, 0x5a,
+  0xff, 0x48, 0x67, 0x0e, 0x68, 0x16, 0xf8, 0x8d, 0xff, 0xb5, 0x33, 0xac,
+  0xaa, 0x9b, 0x9d, 0x7c, 0xfa, 0x7e, 0x5a, 0xa5, 0x0c, 0x48, 0x5a, 0x8d,
+  0xa3, 0x1f, 0x0f, 0xe9, 0x87, 0xc9, 0xcf, 0x0d, 0xa9, 0x5f, 0x4d, 0xba,
+  0x47, 0xf2, 0xbf, 0x76, 0x18, 0x5a, 0x8a, 0x1a, 0x2d, 0xc1, 0xc4, 0x75,
+  0xc8, 0x0e, 0x1a, 0x95, 0xa0, 0x98, 0xe9, 0x30, 0x76, 0xef, 0x8c, 0xc1,
+  0x75, 0xd2, 0xd3, 0xed, 0xf6, 0xd3, 0xfe, 0xee, 0xee, 0xde, 0xc1, 0xde,
+  0x17, 0xcf, 0x77, 0x0f, 0xf6, 0xf6, 0xf6, 0xf6, 0x0f, 0xf6, 0x0e, 0x0e,
+  0xf6, 0x77, 0x7f, 0xd9, 0xe9, 0x6d, 0x6c, 0xbc, 0x3a, 0xfb, 0xe1, 0xed,
+  0xe9, 0xd9, 0xe1, 0xab, 0xe4, 0xf2, 0x2c, 0x39, 0x84, 0xcf, 0xa8, 0xe3,
+  0x9c, 0x03, 0x3a, 0xc9, 0x79, 0x70, 0x92, 0xad, 0x1f, 0x14, 0xad, 0x55,
+  0x07, 0x87, 0x83, 0xcd, 0x60, 0x66, 0xda, 0xfd, 0x28, 0x60, 0x13, 0x70,
+  0x4b, 0xc3, 0x9b, 0x7a, 0xfe, 0x71, 0x89, 0xf6, 0x29, 0x5f, 0xee, 0x4b,
+  0x18, 0xd7, 0x9b, 0x7d, 0xe8, 0x8e, 0xed, 0x5c, 0x4d, 0x36, 0xd1, 0x60,
+  0x88, 0x86, 0x40, 0x5d, 0x6a, 0xc4, 0x96, 0x80, 0x7e, 0x7c, 0xa1, 0x55,
+  0xa9, 0xe1, 0xdb, 0x02, 0x96, 0xb8, 0x9a, 0x9a, 0x1a, 0x63, 0xc7, 0x1d,
+  0xcf, 0x0a, 0xcd, 0x76, 0x34, 0xc0, 0xb3, 0xb5, 0x43, 0xa2, 0xbb, 0x28,
+  0xfb, 0x80, 0x51, 0x37, 0x65, 0x87, 0x80, 0x67, 0xfd, 0xe8, 0xc0, 0x3c,
+  0x6e, 0x86, 0x6c, 0x5e, 0x5a, 0x97, 0x81, 0x0e, 0xea, 0xf8, 0x1c, 0x7f,
+  0xc7, 0x44, 0x8a, 0xff, 0x04, 0xff, 0x26, 0xbc, 0x87, 0x76, 0x9c, 0x6f,
+  0x50, 0x3a, 0xf0, 0x6e, 0x74, 0xf2, 0xf6, 0x1b, 0x44, 0xff, 0x7e, 0x38,
+  0xbb, 0x78, 0x35, 0xa2, 0x66, 0xf9, 0x82, 0xde, 0x80, 0x7b, 0x88, 0x4f,
+  0xb2, 0xf6, 0x4a, 0xce, 0x05, 0x7f, 0xfa, 0x4f, 0xb0, 0xb6, 0x98, 0xc8,
+  0x44, 0x53, 0xac, 0xd1, 0xcd, 0x40, 0x59, 0xe6, 0xbc, 0xe9, 0x6e, 0xa9,
+  0x87, 0x8d, 0x20, 0xaf, 0x7f, 0x35, 0x4f, 0xb9, 0x40, 0x46, 0x36, 0x14,
+  0x20, 0x2f, 0x60, 0x5a, 0x3b, 0x9c, 0x1c, 0xb1, 0xc3, 0x4a, 0xfb, 0x4e,
+  0x5d, 0x40, 0x7e, 0xa0, 0x95, 0xa2, 0x74, 0xd8, 0xa0, 0xc6, 0x8c, 0xf0,
+  0xc1, 0xbb, 0x9a, 0xa5, 0xd7, 0xf8, 0x60, 0x7c, 0x26, 0x83, 0x8f, 0xe9,
+  0xe7, 0x3f, 0xf5, 0x93, 0x2c, 0xf6, 0xd0, 0xde, 0x09, 0x36, 0x00, 0x28,
+  0x91, 0x90, 0x0c, 0xae, 0x51, 0x0b, 0xd1, 0x9a, 0x50, 0x8a, 0x99, 0xe1,
+  0x20, 0x5c, 0xb9, 0xaf, 0x5d, 0x00, 0x05, 0xb5, 0xf0, 0x84, 0x45, 0x81,
+  0xf4, 0xf7, 0x41, 0x40, 0x27, 0x22, 0x86, 0x0d, 0xb7, 0x14, 0x38, 0x10,
+  0x2a, 0x0f, 0x69, 0xf3, 0x65, 0x2e, 0x64, 0xca, 0xb9, 0x33, 0xe0, 0x36,
+  0xa8, 0x0c, 0x2b, 0xa5, 0x6a, 0x5c, 0x8f, 0xeb, 0xcf, 0x30, 0xd8, 0xa1,
+  0x67, 0xdc, 0x16, 0x9e, 0x30, 0xdf, 0xd3, 0x4a, 0x57, 0x35, 0x75, 0x25,
+  0xa5, 0x2b, 0x45, 0x6b, 0xf3, 0x2a, 0x5b, 0x2e, 0xa9, 0xe2, 0x92, 0x6b,
+  0xda, 0x33, 0xc8, 0x84, 0xb4, 0x42, 0x6d, 0x83, 0x73, 0xd8, 0x25, 0x8d,
+  0xb3, 0xf0, 0x15, 0x66, 0x85, 0x0d, 0x0d, 0x47, 0x7b, 0x39, 0xef, 0xdd,
+  0x5e, 0x2c, 0xa3, 0x49, 0x09, 0x25, 0x01, 0x2a, 0x3b, 0x47, 0x13, 0x23,
+  0x83, 0x9a, 0x67, 0x8d, 0x69, 0x0b, 0x8b, 0xfc, 0x46, 0xa2, 0xb6, 0x99,
+  0x0f, 0xbd, 0x81, 0x6c, 0x28, 0x87, 0x95, 0x0e, 0xa6, 0x47, 0x00, 0x59,
+  0xfe, 0x55, 0x5e, 0x8b, 0xbc, 0xae, 0xb2, 0xd9, 0x95, 0x72, 0x9c, 0x68,
+  0x49, 0xfa, 0xf1, 0x43, 0xd0, 0xc0, 0x86, 0xa5, 0xaf, 0x70, 0x4c, 0x6d,
+  0xe1, 0xd2, 0xfe, 0x0b, 0x95, 0x19, 0xd7, 0x90, 0xa6, 0x4a, 0x9a, 0xd2,
+  0x14, 0x14, 0x12, 0x35, 0x1b, 0x5a, 0xb9, 0xa2, 0x8d, 0xc4, 0x95, 0x2c,
+  0x69, 0x0d, 0xc1, 0x55, 0x71, 0x00, 0x95, 0x3e, 0x76, 0x47, 0xf0, 0xe0,
+  0x6a, 0x4c, 0xb3, 0xed, 0x9e, 0xe3, 0xb9, 0x03, 0x70, 0x8c, 0x9b, 0x3b,
+  0x0a, 0xab, 0x0f, 0x0b, 0x6e, 0x72, 0x15, 0x31, 0xb9, 0xe4, 0xca, 0x87,
+  0x43, 0x07, 0x0d, 0xe9, 0x56, 0xab, 0xca, 0xcd, 0x28, 0x4a, 0x1b, 0xa5,
+  0xae, 0xc6, 0x76, 0xd7, 0x31, 0x54, 0x89, 0xb4, 0xfe, 0x1c, 0x7e, 0xfc,
+  0x08, 0xc6, 0x5d, 0x32, 0x3b, 0x60, 0xf6, 0x20, 0xa7, 0x24, 0x5f, 0x3c,
+  0x7e, 0x18, 0xb5, 0x13, 0x9f, 0xf4, 0x61, 0x8c, 0x55, 0xc9, 0x17, 0xe0,
+  0xaa, 0xf6, 0x88, 0x2e, 0x89, 0x8e, 0x23, 0x05, 0xa1, 0x23, 0xc1, 0xa4,
+  0x81, 0x3f, 0xc5, 0x41, 0x90, 0x44, 0xb5, 0x83, 0xe4, 0xeb, 0xb4, 0xca,
+  0x27, 0xfd, 0xe4, 0x55, 0x7e, 0x0d, 0x36, 0x00, 0x97, 0x06, 0xe0, 0x92,
+  0x27, 0x86, 0xc9, 0x0f, 0xca, 0xa3, 0xcc, 0x09, 0xec, 0xe0, 0x41, 0x84,
+  0x5b, 0xb5, 0x11, 0x8e, 0xa7, 0x69, 0x50, 0x97, 0x78, 0x58, 0x6e, 0x15,
+  0x6d, 0xfb, 0x32, 0x11, 0x58, 0xcc, 0xb4, 0xba, 0x6d, 0x56, 0x9f, 0x72,
+  0x9c, 0xbe, 0xa2, 0x17, 0x61, 0x7e, 0x17, 0x5a, 0x02, 0x50, 0xf7, 0x1c,
+  0xfe, 0xed, 0x76, 0xb9, 0x55, 0x7a, 0x83, 0x23, 0xab, 0x52, 0x88, 0x97,
+  0x05, 0xe2, 0x71, 0x1b, 0xd9, 0x71, 0xdd, 0x40, 0xd6, 0x3e, 0xcd, 0x13,
+  0xcf, 0x88, 0xca, 0x93, 0xb3, 0xcb, 0xe3, 0x7f, 0x49, 0x0e, 0xdb, 0x71,
+  0x48, 0x16, 0xd4, 0x0d, 0xfa, 0x8d, 0xbe, 0xdf, 0x57, 0xe8, 0xbb, 0xa0,
+  0xba, 0xa4, 0x5a, 0x4a, 0xea, 0xb2, 0x22, 0xc2, 0x85, 0x67, 0xfa, 0x17,
+  0x05, 0xa9, 0xa2, 0xf8, 0xb4, 0x4b, 0xa1, 0x86, 0x77, 0x16, 0x6c, 0x25,
+  0x22, 0x43, 0x24, 0x6d, 0x2e, 0x4f, 0x05, 0x24, 0xcc, 0x54, 0x47, 0xa8,
+  0x16, 0x8d, 0xa3, 0x08, 0x3c, 0xab, 0xd6, 0xdd, 0x06, 0x97, 0x50, 0x5e,
+  0x43, 0x73, 0x46, 0xa4, 0x5d, 0x0b, 0x3f, 0xfd, 0xe0, 0x9b, 0x4a, 0x43,
+  0xd6, 0xa9, 0xf7, 0x7c, 0xc2, 0xde, 0x9b, 0x9c, 0xd5, 0x1b, 0x41, 0xfa,
+  0xa2, 0x45, 0x5c, 0x9b, 0x3b, 0xd5, 0x4e, 0x9b, 0x08, 0xf7, 0x73, 0x43,
+  0x74, 0x61, 0x2d, 0x26, 0x20, 0x14, 0x99, 0x3d, 0x48, 0x00, 0x12, 0x57,
+  0x8c, 0x1d, 0xea, 0x50, 0x4e, 0x83, 0xa5, 0x09, 0xc4, 0x24, 0x28, 0x8c,
+  0xa8, 0x75, 0x49, 0x04, 0x3f, 0x4b, 0xad, 0x36, 0x51, 0xcf, 0xc8, 0x83,
+  0xc0, 0xac, 0x72, 0x2f, 0x84, 0xe9, 0x26, 0x44, 0x5d, 0x53, 0x6b, 0xf8,
+  0x90, 0x15, 0xe0, 0x6b, 0xed, 0xe3, 0xe1, 0x06, 0x5f, 0x40, 0xce, 0xf5,
+  0x84, 0xe2, 0x93, 0xae, 0xe2, 0x47, 0x00, 0xf7, 0x7b, 0xed, 0xe8, 0xb1,
+  0xb4, 0x59, 0x2e, 0x43, 0x36, 0xc9, 0x82, 0x64, 0x87, 0x05, 0x6d, 0x59,
+  0x7f, 0x11, 0xc8, 0xfe, 0x29, 0x2a, 0x2d, 0x40, 0x99, 0x0b, 0x77, 0x92,
+  0x14, 0x2d, 0x1a, 0x67, 0xc2, 0x24, 0xce, 0xc5, 0x26, 0xb0, 0x8a, 0x60,
+  0xa7, 0xe3, 0x83, 0x27, 0x3b, 0x73, 0x8e, 0xcd, 0xbd, 0xe1, 0x77, 0x37,
+  0x4b, 0xeb, 0x75, 0xe3, 0xe4, 0x2c, 0x45, 0xde, 0x6e, 0xe6, 0x7a, 0x14,
+  0x4d, 0x82, 0xb5, 0xe9, 0x85, 0x96, 0xbf, 0x81, 0x2f, 0x40, 0x7b, 0xcd,
+  0xab, 0x03, 0x45, 0x6f, 0xe1, 0xd4, 0x0e, 0x5b, 0xf4, 0x06, 0x07, 0x18,
+  0x8b, 0x92, 0x69, 0x32, 0x7f, 0x50, 0x94, 0xbf, 0x5e, 0x95, 0x9c, 0x88,
+  0x0e, 0x23, 0xf3, 0x8b, 0x2f, 0x22, 0xd5, 0xe8, 0x83, 0x7b, 0xfa, 0x80,
+  0x7e, 0x1d, 0x18, 0xb3, 0x33, 0x8e, 0xd9, 0x5b, 0x51, 0x73, 0x6f, 0xd1,
+  0x76, 0xd8, 0x0a, 0x01, 0x99, 0x8e, 0x7c, 0xd1, 0xb9, 0xb8, 0xa3, 0x5d,
+  0xd6, 0xf7, 0xa9, 0x08, 0x1b, 0x62, 0x2d, 0x69, 0x55, 0xbc, 0x4a, 0xb0,
+  0x1f, 0x6b, 0xcc, 0x07, 0x93, 0x8e, 0xed, 0xde, 0x06, 0x4a, 0x24, 0x29,
+  0xb2, 0x43, 0xd6, 0x3b, 0x59, 0x27, 0x1e, 0x15, 0xda, 0x30, 0x4f, 0xb2,
+  0x76, 0xc6, 0xed, 0x8e, 0xd6, 0x3e, 0x72, 0xd5, 0xde, 0xdc, 0xad, 0x3e,
+  0x78, 0xb7, 0xbe, 0x3b, 0xef, 0x7e, 0x4b, 0x77, 0x0e, 0x93, 0x47, 0xd1,
+  0xee, 0x5a, 0xbc, 0x8f, 0x05, 0x7d, 0x65, 0x79, 0x3e, 0x05, 0x76, 0xb5,
+  0xd9, 0x9e, 0x32, 0x47, 0x13, 0x8e, 0x53, 0x8d, 0x9b, 0x75, 0x7c, 0x62,
+  0x3b, 0x73, 0x51, 0xc8, 0xd3, 0xd0, 0xf1, 0xb9, 0xfd, 0xbe, 0x75, 0xe5,
+  0x53, 0xbb, 0x6b, 0xc4, 0x7d, 0x96, 0xce, 0xd2, 0x42, 0xaa, 0x6b, 0x06,
+  0xc9, 0xde, 0x70, 0x37, 0x64, 0x66, 0x71, 0x79, 0x25, 0x25, 0x28, 0x06,
+  0x6b, 0x70, 0xb4, 0xf8, 0xba, 0xeb, 0x3c, 0x12, 0xe4, 0xfd, 0xb7, 0x5e,
+  0xd3, 0x9f, 0xed, 0x09, 0xed, 0x2a, 0x9d, 0x24, 0xad, 0x45, 0xc1, 0x34,
+  0x1f, 0xd9, 0x7c, 0x09, 0xfc, 0xbd, 0x49, 0xc0, 0xf0, 0xee, 0xc7, 0x39,
+  0x7a, 0xea, 0x8f, 0xd4, 0x33, 0xb7, 0xdc, 0xda, 0x47, 0x81, 0x67, 0x6b,
+  0x29, 0x4f, 0x41, 0x48, 0x43, 0x17, 0xcb, 0x32, 0x69, 0xa9, 0x5e, 0x9b,
+  0x27, 0x74, 0xd4, 0xcc, 0xe6, 0xe3, 0xfd, 0x8c, 0x3b, 0x36, 0xb9, 0x5a,
+  0x95, 0x10, 0xbc, 0x4a, 0x90, 0xa6, 0x94, 0x19, 0xdc, 0x2a, 0x43, 0x1d,
+  0x3b, 0x24, 0x0d, 0xb2, 0x59, 0xb9, 0x44, 0x38, 0x2a, 0xa8, 0xaa, 0xb3,
+  0x13, 0xe9, 0xfd, 0x5a, 0x4e, 0xc9, 0x87, 0x31, 0x9c, 0x0b, 0x8d, 0xda,
+  0x9d, 0xe5, 0xd4, 0xa1, 0x4d, 0x70, 0x47, 0xf0, 0xd4, 0x33, 0xd6, 0x5f,
+  0x65, 0xa1, 0xe3, 0x8e, 0x33, 0xc6, 0x5d, 0x24, 0x02, 0xcd, 0x80, 0x3a,
+  0xed, 0xac, 0xce, 0xd2, 0x16, 0xba, 0x72, 0x0d, 0xf4, 0x93, 0xc1, 0x7f,
+  0xd7, 0x99, 0x61, 0x6d, 0x95, 0x61, 0x38, 0xa0, 0x64, 0x5f, 0x06, 0x6c,
+  0x83, 0x9a, 0x2d, 0x05, 0x81, 0xcf, 0x97, 0xba, 0x8d, 0xc3, 0x25, 0x37,
+  0x5a, 0xba, 0x05, 0xe4, 0xdf, 0xeb, 0x80, 0x38, 0x0c, 0xf9, 0xa0, 0x6a,
+  0xa0, 0xf7, 0x4d, 0x54, 0x48, 0x73, 0x1b, 0x8e, 0xe3, 0x5d, 0x60, 0x57,
+  0x51, 0x87, 0xdd, 0x45, 0xf6, 0x35, 0x57, 0xc1, 0x3a, 0x2a, 0xd2, 0x70,
+  0x5a, 0x7d, 0x15, 0x1d, 0xed, 0xa9, 0x6c, 0x7e, 0x93, 0x13, 0x3d, 0xc9,
+  0xf8, 0x1b, 0xd0, 0x0b, 0x83, 0x77, 0xea, 0x72, 0xf8, 0x4a, 0xbe, 0x30,
+  0x84, 0x17, 0x55, 0xbe, 0x70, 0x8e, 0xea, 0x9e, 0xf6, 0xc0, 0x81, 0xbe,
+  0xc4, 0x69, 0x82, 0x3d, 0x75, 0x38, 0x34, 0x67, 0x45, 0x9e, 0xb7, 0x34,
+  0x42, 0xae, 0x1a, 0x89, 0x21, 0x0c, 0xc4, 0x37, 0xce, 0x87, 0x4c, 0xfe,
+  0x2a, 0xef, 0xaa, 0x2d, 0xf5, 0xc0, 0x4d, 0x0c, 0x05, 0xc0, 0xac, 0xae,
+  0x86, 0xfd, 0xbd, 0x1d, 0xe9, 0xcc, 0x8e, 0x34, 0x20, 0xea, 0x9c, 0x6e,
+  0x49, 0x1f, 0x4f, 0x37, 0x96, 0x94, 0xf0, 0xe6, 0x62, 0xb8, 0x35, 0xe3,
+  0x20, 0xe6, 0x0a, 0xe2, 0x44, 0xa0, 0x82, 0xaf, 0x26, 0xba, 0x6b, 0xa5,
+  0xda, 0x46, 0xa1, 0xeb, 0xb3, 0xe1, 0x17, 0xa8, 0xef, 0x34, 0x3d, 0xda,
+  0x4a, 0x83, 0xbb, 0x00, 0x07, 0xc0, 0x49, 0x75, 0xe0, 0xfe, 0xe3, 0x0a,
+  0x81, 0x2e, 0x1d, 0x89, 0x0f, 0xba, 0x84, 0x2a, 0x69, 0x47, 0x5f, 0x1c,
+  0xbe, 0xfd, 0xe6, 0x18, 0x9a, 0x00, 0x64, 0x3b, 0x1f, 0xd0, 0x9c, 0x77,
+  0xfb, 0x74, 0x35, 0x81, 0xd1, 0x40, 0x33, 0x06, 0x18, 0x51, 0x35, 0xd4,
+  0x4c, 0x35, 0xc1, 0x82, 0xa7, 0xba, 0x79, 0xb1, 0xdc, 0x0a, 0x0e, 0xda,
+  0x48, 0xcc, 0x41, 0x06, 0x0d, 0x82, 0xed, 0x27, 0x66, 0x0e, 0x2e, 0x90,
+  0xe9, 0x3d, 0x5e, 0xa6, 0x4a, 0xa3, 0x91, 0x86, 0x3c, 0x0b, 0xea, 0x76,
+  0x18, 0x36, 0xcf, 0xe2, 0x86, 0x65, 0x0a, 0x38, 0x13, 0xb7, 0x84, 0x89,
+  0x3b, 0x0c, 0x7d, 0x3e, 0x42, 0x2e, 0xb0, 0xb7, 0xbb, 0xeb, 0x6b, 0x29,
+  0x78, 0xbe, 0x88, 0x48, 0x5a, 0x96, 0xc9, 0xee, 0xe0, 0xf9, 0xf3, 0x75,
+  0x82, 0xd0, 0x35, 0x0a, 0xd2, 0x86, 0x67, 0x9f, 0xdc, 0xe6, 0x80, 0x1f,
+  0x5d, 0xd7, 0x66, 0x87, 0x21, 0x83, 0x62, 0xa9, 0x0a, 0xcc, 0xaa, 0x9c,
+  0xd6, 0xa2, 0x0e, 0x0f, 0xf1, 0xbd, 0x23, 0x16, 0xb2, 0x70, 0xd6, 0x0c,
+  0x4f, 0xe5, 0x86, 0xe7, 0x2c, 0x04, 0x67, 0x80, 0xf9, 0x46, 0x96, 0x8c,
+  0xcd, 0xca, 0x5d, 0x38, 0xec, 0x93, 0x26, 0x26, 0xb0, 0x67, 0xd7, 0x4c,
+  0xd1, 0x55, 0x3c, 0x1a, 0x53, 0x09, 0xde, 0x9d, 0xb3, 0x3b, 0xec, 0xe4,
+  0xed, 0x37, 0xe2, 0x1d, 0x20, 0x53, 0x17, 0xae, 0xd1, 0x9d, 0x96, 0xe1,
+  0xfb, 0x4e, 0x8a, 0x22, 0x30, 0x32, 0x0f, 0x71, 0x70, 0xa9, 0x6b, 0x98,
+  0x2f, 0x44, 0x14, 0xf8, 0xd5, 0x5f, 0xe3, 0x9a, 0xbb, 0x4c, 0x06, 0x81,
+  0x72, 0xa2, 0x15, 0x11, 0x58, 0x33, 0x99, 0x3f, 0x98, 0x41, 0xa4, 0x5f,
+  0x40, 0xeb, 0xe6, 0x68, 0x77, 0xcd, 0x8a, 0x0b, 0x4c, 0xac, 0x58, 0xec,
+  0xa0, 0x48, 0x37, 0xe9, 0xf8, 0xa4, 0x7c, 0x06, 0xe7, 0xbb, 0xa5, 0x89,
+  0x7c, 0x5a, 0x57, 0x1a, 0x9e, 0xbf, 0x66, 0x0d, 0x2d, 0xd6, 0xac, 0xfa,
+  0xe6, 0x0a, 0x69, 0x7b, 0xe5, 0xa4, 0xee, 0x6e, 0x28, 0xd5, 0x79, 0xb5,
+  0x51, 0x70, 0xaf, 0x28, 0xfe, 0xeb, 0xfd, 0x7c, 0xa4, 0x87, 0x7c, 0x50,
+  0xf9, 0xa6, 0x5a, 0x4c, 0xbd, 0xe9, 0xaf, 0x3d, 0xee, 0xf4, 0x6b, 0x5f,
+  0xca, 0xfb, 0xf2, 0xe9, 0xb4, 0xfb, 0x73, 0xf2, 0xbe, 0x4d, 0x4d, 0xc7,
+  0x01, 0x60, 0x95, 0x56, 0x6b, 0x66, 0xb8, 0x2c, 0x3e, 0xb3, 0x65, 0x58,
+  0x0b, 0x87, 0xe4, 0xc8, 0x9b, 0x6a, 0xc9, 0x46, 0xa2, 0xa9, 0xc2, 0x28,
+  0xa8, 0xc1, 0x7b, 0x08, 0x0c, 0xcb, 0xb8, 0xbc, 0x6e, 0x81, 0xb1, 0xbb,
+  0x52, 0x3a, 0x59, 0xd4, 0x88, 0x3d, 0x71, 0x44, 0x3c, 0x9e, 0x94, 0xb7,
+  0x5c, 0x2d, 0x54, 0xf6, 0xb1, 0xbd, 0x45, 0x9d, 0x4f, 0xab, 0x1b, 0x94,
+  0x28, 0x75, 0x9e, 0x99, 0x58, 0xbd, 0xc2, 0xe7, 0x95, 0x61, 0x96, 0xf4,
+  0x29, 0x51, 0xa6, 0xa0, 0x5c, 0x37, 0xa6, 0xa2, 0x39, 0x03, 0x81, 0x23,
+  0xe3, 0x53, 0x4f, 0x81, 0xe8, 0xd4, 0x1d, 0xa1, 0x1b, 0x1c, 0x84, 0x40,
+  0xb8, 0x74, 0x6e, 0xbf, 0xa6, 0x23, 0x28, 0xd4, 0xcf, 0xe1, 0x77, 0x81,
+  0xb5, 0x04, 0x4e, 0xa4, 0xd6, 0x14, 0xc2, 0x88, 0x06, 0x69, 0xa2, 0x50,
+  0x24, 0x99, 0xc8, 0x55, 0x6d, 0x00, 0xde, 0x2f, 0x5f, 0x92, 0x63, 0x26,
+  0x30, 0x7b, 0xbe, 0xef, 0xc5, 0x24, 0x45, 0x34, 0x51, 0x92, 0x83, 0xf0,
+  0x4d, 0x8c, 0x50, 0x3a, 0x28, 0xb9, 0xdc, 0x35, 0x40, 0xbb, 0xa3, 0x4b,
+  0xb6, 0xee, 0x71, 0x1d, 0x99, 0x8d, 0xf8, 0xfd, 0xf1, 0xc5, 0xd7, 0x67,
+  0xa3, 0x63, 0x92, 0x16, 0xaf, 0x8e, 0xbf, 0x7e, 0xc7, 0x92, 0x84, 0x57,
+  0x4c, 0xbc, 0xa3, 0xe0, 0xbc, 0x94, 0x44, 0x5b, 0xf0, 0x24, 0x31, 0x1a,
+  0x09, 0x5b, 0x47, 0x74, 0x93, 0xbe, 0xed, 0x0c, 0x53, 0xbb, 0x84, 0x3e,
+  0x72, 0x96, 0x89, 0x3b, 0x2d, 0x07, 0xc6, 0xda, 0x73, 0x0c, 0x33, 0x94,
+  0x69, 0xc1, 0xe4, 0xda, 0xb5, 0x71, 0xd7, 0x58, 0xa1, 0xb4, 0xea, 0xc0,
+  0x13, 0x18, 0xde, 0x89, 0xf3, 0x54, 0x0f, 0x84, 0x2f, 0x68, 0x6c, 0xa5,
+  0x8b, 0xf5, 0x6a, 0x82, 0x6e, 0xab, 0x3c, 0x7f, 0xb3, 0x42, 0x6e, 0x32,
+  0x66, 0xca, 0xc1, 0xb9, 0xc6, 0xdd, 0x9a, 0xd7, 0xb8, 0x56, 0x45, 0xc9,
+  0xd7, 0x32, 0xc2, 0x95, 0x6c, 0x38, 0x12, 0x39, 0x92, 0x55, 0x3b, 0x53,
+  0x11, 0x0d, 0x89, 0x54, 0x65, 0x42, 0x30, 0x25, 0x37, 0xa9, 0x86, 0x1c,
+  0x05, 0xc7, 0xa8, 0xa4, 0xff, 0x5b, 0x6a, 0x98, 0xde, 0x63, 0x9c, 0x5a,
+  0x84, 0x4e, 0x8a, 0xed, 0x5a, 0x29, 0x2a, 0xcc, 0x7c, 0x80, 0x38, 0xd0,
+  0xad, 0x73, 0xb7, 0x5e, 0x1c, 0x5c, 0xca, 0x48, 0xd9, 0xf7, 0x20, 0x97,
+  0x73, 0x48, 0x36, 0x1a, 0x92, 0xff, 0x30, 0x5c, 0xd3, 0x29, 0x0d, 0x72,
+  0x9e, 0x18, 0x2e, 0x1d, 0x98, 0x75, 0xeb, 0xcb, 0xf3, 0x9a, 0x86, 0xa9,
+  0x31, 0x10, 0x9f, 0x2c, 0x21, 0x02, 0x4f, 0x51, 0x46, 0xbc, 0xa4, 0xf0,
+  0x5a, 0xcb, 0xe6, 0x8b, 0xcf, 0xa0, 0xb4, 0x2e, 0x95, 0x79, 0xeb, 0x0f,
+  0x75, 0xe8, 0xdb, 0xdf, 0xd8, 0xd8, 0x78, 0x75, 0x7c, 0x79, 0x78, 0x72,
+  0x7a, 0xfc, 0x2a, 0x39, 0x79, 0xfb, 0xfa, 0xec, 0xe2, 0xcd, 0xe1, 0xa5,
+  0x06, 0xbc, 0x5f, 0x39, 0xe7, 0x98, 0x4b, 0x99, 0x75, 0xbe, 0x47, 0xef,
+  0x38, 0xc3, 0x16, 0xa6, 0x55, 0xbc, 0x56, 0x5e, 0x6f, 0x99, 0x86, 0xac,
+  0x31, 0x07, 0x1b, 0x89, 0x06, 0xca, 0x3d, 0x19, 0x0f, 0xdf, 0xd5, 0x3b,
+  0x2e, 0xbc, 0x39, 0xb4, 0xe9, 0x34, 0xd7, 0x16, 0x2a, 0x85, 0x3d, 0xda,
+  0x94, 0x2b, 0x8f, 0x2e, 0xf7, 0x14, 0x0a, 0xdd, 0x22, 0xbb, 0x19, 0x7b,
+  0x72, 0x70, 0xb2, 0xd3, 0xe4, 0xd3, 0x84, 0xf3, 0xc3, 0xb8, 0x99, 0x52,
+  0xb0, 0x3d, 0x84, 0x9c, 0x02, 0xb4, 0x03, 0xd9, 0xd5, 0x17, 0xb6, 0xe9,
+  0xb2, 0xe5, 0x8d, 0x6d, 0x47, 0xe0, 0x15, 0xf8, 0x49, 0xb8, 0xbe, 0x9c,
+  0xae, 0xbe, 0xc1, 0x44, 0xf5, 0xb5, 0xf2, 0xc0, 0x30, 0xf1, 0x62, 0xc5,
+  0x55, 0xb9, 0xed, 0xac, 0x83, 0x0a, 0xd2, 0x09, 0x51, 0x0b, 0x20, 0x69,
+  0x61, 0xab, 0xb0, 0xa9, 0x2d, 0x17, 0x12, 0x25, 0x2d, 0x66, 0x70, 0xa2,
+  0x05, 0xcf, 0x78, 0x2e, 0x98, 0x10, 0x9a, 0xff, 0xbb, 0x30, 0x2a, 0x36,
+  0x87, 0x8e, 0xf3, 0x56, 0x78, 0xbe, 0xe3, 0xaa, 0x50, 0xeb, 0x69, 0xf3,
+  0xe7, 0xd6, 0x28, 0x29, 0x06, 0xaf, 0xe8, 0xa1, 0xe9, 0x6a, 0xbe, 0xd4,
+  0x9a, 0x99, 0xa6, 0xe5, 0xc2, 0xbf, 0x66, 0x4b, 0x28, 0x8a, 0x14, 0x14,
+  0x02, 0x38, 0x63, 0x5e, 0xeb, 0x1c, 0xc8, 0x38, 0xb0, 0xbf, 0x6b, 0x8b,
+  0x56, 0xd5, 0xe0, 0xef, 0xb4, 0x00, 0x93, 0x2b, 0x9a, 0x9d, 0xb7, 0xa9,
+  0xc0, 0x5c, 0xc1, 0xf6, 0x91, 0x7b, 0x16, 0x33, 0x19, 0xbc, 0x90, 0x7a,
+  0x0c, 0x08, 0xe6, 0x7f, 0xcb, 0x48, 0xfd, 0x79, 0xcb, 0x6a, 0x83, 0x6a,
+  0x26, 0xc5, 0xf1, 0xb1, 0xc6, 0xa0, 0xc2, 0x17, 0x9b, 0xa8, 0x89, 0x50,
+  0xd2, 0xdb, 0xa7, 0x3d, 0xfd, 0x66, 0xbb, 0x07, 0x2a, 0xc5, 0x49, 0x9e,
+  0x3c, 0x58, 0xa1, 0x52, 0xe6, 0x95, 0x17, 0x7e, 0xbd, 0x0d, 0xc9, 0xdc,
+  0x68, 0x70, 0xc5, 0xda, 0xf6, 0x5d, 0xa1, 0x40, 0x67, 0x71, 0xcb, 0xf6,
+  0xb5, 0x96, 0x4f, 0x0f, 0x53, 0x8c, 0x04, 0xdd, 0xa3, 0x75, 0x31, 0x20,
+  0xf4, 0x16, 0x1b, 0x56, 0xc1, 0xca, 0x5e, 0x32, 0x7c, 0x16, 0xa4, 0xbf,
+  0x90, 0x3b, 0x43, 0xc8, 0xb3, 0xa1, 0x9b, 0xa5, 0x15, 0x8c, 0x1c, 0x24,
+  0x1a, 0xc8, 0x9d, 0xe1, 0x5c, 0xa3, 0x9e, 0x41, 0x1e, 0x97, 0x4f, 0x40,
+  0x64, 0x21, 0x84, 0x83, 0x29, 0x73, 0x05, 0xb8, 0x42, 0xac, 0x00, 0x15,
+  0xbb, 0x56, 0x70, 0xd7, 0xb1, 0x11, 0x5b, 0xce, 0x80, 0x0c, 0x55, 0xa8,
+  0xdc, 0x79, 0x51, 0xc9, 0x79, 0x83, 0xd6, 0xdd, 0xf3, 0xe5, 0xa2, 0x7b,
+  0xcb, 0x1b, 0xfa, 0x46, 0x2f, 0xb9, 0x66, 0xbb, 0x65, 0x4c, 0x5d, 0x8f,
+  0x04, 0xe8, 0x54, 0x1e, 0x7f, 0x79, 0x91, 0x5e, 0xa5, 0xd9, 0xec, 0x8f,
+  0xfb, 0xbb, 0xa3, 0xf4, 0x7a, 0x35, 0x4b, 0xff, 0x15, 0x2f, 0xbe, 0x7c,
+  0xf2, 0x64, 0x7f, 0xf7, 0xf3, 0x2f, 0x76, 0x7b, 0xad, 0xc0, 0x75, 0x80,
+  0x79, 0x01, 0x88, 0x81, 0x6f, 0x32, 0xc8, 0x5d, 0x7c, 0x67, 0x38, 0xb9,
+  0xce, 0x61, 0x68, 0xb1, 0xf2, 0xa2, 0x73, 0x90, 0x8a, 0x85, 0x07, 0x31,
+  0xa9, 0x1c, 0x68, 0x74, 0xe3, 0xd2, 0xbe, 0xfe, 0xc3, 0xde, 0x81, 0x88,
+  0x32, 0xb0, 0xcb, 0xe2, 0x9e, 0xe0, 0xb9, 0x78, 0x91, 0x2f, 0xe8, 0x06,
+  0xfa, 0x32, 0xa9, 0xd3, 0x6b, 0xb7, 0x57, 0x35, 0x59, 0x58, 0x20, 0xe2,
+  0x2e, 0x04, 0x77, 0xc5, 0x9b, 0x3c, 0xe7, 0x7a, 0xb2, 0x97, 0x52, 0xd8,
+  0x00, 0x8a, 0xcf, 0x32, 0x2b, 0x39, 0xd7, 0xbe, 0xb8, 0x2e, 0xd3, 0xb9,
+  0x01, 0xf1, 0xf9, 0x7d, 0x06, 0x06, 0x0d, 0x97, 0x33, 0x80, 0xc4, 0x0d,
+  0xdd, 0x23, 0x5a, 0xa8, 0x6c, 0xb8, 0xd9, 0xb2, 0xf2, 0x9c, 0x60, 0x72,
+  0xdd, 0x84, 0x25, 0x13, 0x68, 0xb2, 0xe0, 0xe7, 0xe8, 0x61, 0x54, 0x7d,
+  0x47, 0x2e, 0x34, 0x98, 0xda, 0x48, 0x87, 0xf8, 0x3b, 0x92, 0xdb, 0x53,
+  0x61, 0x7f, 0xeb, 0x2d, 0x25, 0x6d, 0xd4, 0x55, 0x05, 0x17, 0x87, 0x58,
+  0xde, 0x18, 0x57, 0xea, 0x01, 0x69, 0xc9, 0x0b, 0xf3, 0xdc, 0xec, 0x7d,
+  0xf9, 0x12, 0x1b, 0x62, 0xef, 0xcb, 0x7f, 0x75, 0x3f, 0xdb, 0xd7, 0x9f,
+  0xed, 0x7f, 0xf9, 0xaf, 0xc3, 0x21, 0xfa, 0xc7, 0x3b, 0x64, 0xd3, 0x7e,
+  0xbd, 0xa9, 0x64, 0x12, 0xa9, 0x1e, 0x61, 0xf9, 0x97, 0x63, 0x4d, 0x95,
+  0xb5, 0xee, 0xd9, 0x97, 0xc3, 0x59, 0xee, 0x6b, 0xd0, 0xcf, 0xc9, 0xad,
+  0xdc, 0x8a, 0xe9, 0x80, 0x0d, 0xb7, 0xea, 0x9a, 0x74, 0x17, 0x9b, 0x40,
+  0x3b, 0x0a, 0x6f, 0xc3, 0xcb, 0xff, 0xc6, 0x3b, 0xf5, 0xdf, 0x36, 0x12,
+  0x8d, 0xcd, 0xf1, 0x72, 0x3c, 0x20, 0x08, 0x61, 0xdb, 0x96, 0x1e, 0x4d,
+  0xad, 0x42, 0x03, 0xb7, 0xcc, 0xd0, 0x76, 0xbe, 0x03, 0x83, 0xca, 0xd8,
+  0x7f, 0x52, 0x2e, 0x3e, 0x97, 0x13, 0x60, 0xcf, 0x48, 0x1a, 0x00, 0xe9,
+  0x18, 0xb5, 0xd0, 0xbe, 0x73, 0xc5, 0x80, 0x1f, 0x7f, 0x54, 0x85, 0x8a,
+  0xfe, 0xa2, 0x3d, 0xbf, 0x21, 0x59, 0x34, 0x25, 0xf1, 0x36, 0x47, 0x55,
+  0x5e, 0x2d, 0x66, 0xae, 0x57, 0xfe, 0x95, 0x8e, 0x54, 0x1a, 0xa1, 0xa5,
+  0x3d, 0x1c, 0x1d, 0x9d, 0x9c, 0x00, 0xc9, 0x87, 0x49, 0x3d, 0x16, 0x31,
+  0x86, 0xbd, 0xb9, 0x05, 0x14, 0x82, 0x07, 0x7e, 0x85, 0x5b, 0x9f, 0xd7,
+  0x0e, 0xcb, 0x8e, 0xdd, 0x4f, 0x8d, 0x99, 0x51, 0xac, 0x4b, 0x89, 0x3d,
+  0x2b, 0x5a, 0xce, 0xcb, 0x9e, 0x3c, 0x78, 0x9d, 0xf7, 0x34, 0xb6, 0x24,
+  0x3f, 0xe9, 0x79, 0x6e, 0x10, 0x59, 0x0f, 0x2c, 0xda, 0x4b, 0x51, 0x9d,
+  0xf2, 0xbf, 0x67, 0x2f, 0xf7, 0x76, 0xbb, 0x9f, 0x40, 0xe9, 0x04, 0xe6,
+  0x21, 0x7e, 0xe9, 0x63, 0x73, 0x8f, 0x3d, 0x9f, 0x4f, 0xe5, 0xe9, 0x9b,
+  0x7c, 0x3a, 0xa5, 0x3b, 0x01, 0x75, 0xd9, 0x5f, 0xf6, 0xc6, 0x7c, 0xc3,
+  0xf2, 0xff, 0x5f, 0xd3, 0x0f, 0x44, 0x91, 0xf4, 0xd9, 0x6a, 0x35, 0x9e,
+  0xe7, 0x8d, 0x0e, 0xef, 0xf0, 0x00, 0xbf, 0xe4, 0x01, 0xff, 0x90, 0xb9,
+  0xdd, 0x91, 0xb1, 0x6a, 0x27, 0xba, 0xdf, 0xe6, 0x55, 0x51, 0x8c, 0xd3,
+  0x72, 0x53, 0x43, 0x2c, 0xd6, 0xcf, 0xcd, 0xbd, 0xfd, 0x27, 0x4f, 0x9f,
+  0x6d, 0x0e, 0x55, 0x4f, 0x83, 0x88, 0xa8, 0xc3, 0xfc, 0x7b, 0x69, 0xc2,
+  0xe5, 0x8b, 0xcf, 0x3d, 0x5f, 0x79, 0x57, 0x9c, 0x93, 0xa5, 0x18, 0x7f,
+  0xee, 0xa5, 0x7c, 0xed, 0x5f, 0xf9, 0x3b, 0x2f, 0xf1, 0x89, 0x7f, 0xcd,
+  0xa7, 0x2f, 0xdd, 0x08, 0xff, 0x95, 0xc7, 0xf2, 0x52, 0x07, 0x41, 0xeb,
+  0x6a, 0x09, 0x56, 0x55, 0x58, 0xcd, 0xe1, 0x63, 0x8b, 0x6b, 0x8b, 0xb8,
+  0x81, 0x41, 0x23, 0xc8, 0x3e, 0x98, 0x4a, 0x44, 0x02, 0xda, 0xaa, 0x4f,
+  0x30, 0xda, 0xf9, 0x30, 0xa0, 0x56, 0x06, 0xdc, 0xca, 0xc0, 0x0b, 0x6c,
+  0xd0, 0x47, 0x0f, 0x78, 0x21, 0xfa, 0x9a, 0x65, 0x36, 0x83, 0xe7, 0x43,
+  0x55, 0x81, 0xa2, 0x40, 0x08, 0xfb, 0xe8, 0x9b, 0x93, 0x4d, 0xc5, 0x86,
+  0x88, 0xe9, 0xd6, 0xef, 0xf2, 0x19, 0x3b, 0x14, 0xd7, 0x24, 0x5d, 0xf2,
+  0xe9, 0xdf, 0x48, 0xb4, 0x80, 0x55, 0xca, 0x50, 0x07, 0xfe, 0xae, 0x24,
+  0x84, 0xd2, 0xc7, 0xf4, 0xd6, 0x99, 0xb1, 0x17, 0xba, 0x14, 0x66, 0xeb,
+  0xa0, 0x19, 0x50, 0xbd, 0x0a, 0xe6, 0x01, 0x71, 0x98, 0xa5, 0xcb, 0x26,
+  0x1b, 0xbc, 0x76, 0x81, 0x48, 0x97, 0xbd, 0xa4, 0x8f, 0xd2, 0xaf, 0x44,
+  0x9e, 0x98, 0x88, 0xe8, 0x39, 0xc2, 0x35, 0xd9, 0x09, 0xa1, 0xf4, 0x40,
+  0x18, 0x75, 0x9c, 0x69, 0x0e, 0x9a, 0xb8, 0x32, 0x44, 0x31, 0x64, 0xf9,
+  0xf9, 0xe2, 0x2b, 0xa3, 0x87, 0xfd, 0x32, 0x41, 0x11, 0x3a, 0x79, 0x4b,
+  0x63, 0x81, 0xea, 0x14, 0x12, 0x3f, 0x2a, 0x5e, 0x52, 0xf3, 0xc0, 0x85,
+  0xa5, 0x02, 0xc0, 0x88, 0x2a, 0x06, 0xca, 0xe1, 0x8d, 0x81, 0x8e, 0x1f,
+  0xd4, 0x01, 0xc0, 0x2d, 0x6c, 0xfe, 0x19, 0x87, 0xe0, 0x05, 0x2f, 0x03,
+  0x7e, 0xfd, 0xe5, 0xe6, 0x86, 0xab, 0x06, 0xee, 0x34, 0xf7, 0x56, 0x50,
+  0x57, 0x36, 0x68, 0x38, 0x1e, 0x52, 0xa8, 0x8d, 0x0b, 0x55, 0xb4, 0x31,
+  0xe6, 0x1f, 0x40, 0xa5, 0x56, 0xd2, 0xa6, 0x66, 0x53, 0x25, 0x11, 0x74,
+  0x4e, 0x63, 0x69, 0x3c, 0x63, 0xe8, 0x36, 0x6b, 0x8f, 0x9b, 0x0c, 0x08,
+  0xc4, 0x7b, 0x9b, 0x8e, 0x5a, 0x15, 0x7e, 0x4c, 0x08, 0xbc, 0x32, 0x33,
+  0x82, 0xbd, 0x0d, 0x65, 0x42, 0xf6, 0xda, 0x7c, 0x38, 0xb0, 0x2a, 0x50,
+  0x1e, 0x7c, 0x0e, 0x97, 0x50, 0x75, 0x44, 0x47, 0xe4, 0x35, 0x27, 0x48,
+  0xea, 0x47, 0x5f, 0xf2, 0x74, 0xef, 0x0d, 0xaf, 0xf3, 0x2b, 0x99, 0x0c,
+  0x12, 0x91, 0xd7, 0xd9, 0x0e, 0xfd, 0xb3, 0x4f, 0x3f, 0xdf, 0x67, 0xad,
+  0x8c, 0xff, 0xf2, 0x04, 0x90, 0xa1, 0xf0, 0xee, 0x0f, 0xce, 0x86, 0x3b,
+  0x17, 0xfc, 0x97, 0xdc, 0xdd, 0xf9, 0x1a, 0x69, 0xd1, 0x5e, 0x62, 0x9b,
+  0x37, 0x6a, 0x24, 0x49, 0x4d, 0x24, 0x1f, 0x45, 0x61, 0x43, 0x8b, 0x4d,
+  0xd2, 0x15, 0x43, 0xf6, 0x1d, 0xe8, 0x56, 0x31, 0x0d, 0xaa, 0xa8, 0xb3,
+  0xde, 0x9d, 0xab, 0xcb, 0x84, 0x53, 0x1c, 0x70, 0xb3, 0x66, 0xf7, 0xdb,
+  0xfd, 0x10, 0xcc, 0x48, 0xe2, 0xfd, 0x8e, 0x93, 0x86, 0x99, 0x89, 0xc0,
+  0xd7, 0x84, 0xe1, 0xcf, 0xa3, 0x54, 0xf8, 0x46, 0x12, 0x66, 0x51, 0x62,
+  0x99, 0xf3, 0xf6, 0x0a, 0x06, 0x75, 0xfb, 0x4c, 0xdb, 0xe4, 0xa8, 0xd6,
+  0x36, 0x7f, 0x26, 0x9b, 0x55, 0xb0, 0xd5, 0x95, 0x87, 0xce, 0xbe, 0x6a,
+  0x2c, 0xbc, 0xf8, 0xd0, 0x66, 0x78, 0xf6, 0x8b, 0x49, 0x9d, 0x91, 0xad,
+  0xcb, 0xa4, 0x41, 0x73, 0x91, 0x73, 0xc7, 0x73, 0x29, 0x60, 0x86, 0x2d,
+  0x3c, 0x1b, 0xc8, 0xed, 0xa9, 0x2a, 0xd1, 0xe0, 0xf5, 0x30, 0x39, 0x05,
+  0x28, 0xb7, 0x4a, 0x85, 0x7c, 0xc2, 0x6e, 0x58, 0xdb, 0x0d, 0xb4, 0x75,
+  0x44, 0x07, 0xdf, 0x10, 0x54, 0x3f, 0x67, 0xfc, 0xdb, 0x96, 0xca, 0x8d,
+  0x5f, 0x59, 0x36, 0x97, 0xe8, 0x17, 0xaa, 0x8f, 0xf4, 0xe1, 0x9f, 0x76,
+  0xcf, 0xc1, 0x0f, 0x2f, 0xbe, 0x38, 0xe4, 0xb6, 0xb8, 0x0d, 0x1b, 0x34,
+  0x22, 0xb8, 0x22, 0x55, 0x40, 0x03, 0xb1, 0xee, 0x0e, 0x81, 0xa0, 0xfe,
+  0x32, 0x71, 0xba, 0x70, 0xe2, 0x39, 0x73, 0x60, 0x20, 0x4e, 0x4b, 0xad,
+  0x61, 0x97, 0x81, 0x8e, 0x97, 0xb6, 0x51, 0x0f, 0x76, 0xe3, 0x2c, 0x73,
+  0xc6, 0xb5, 0x16, 0xd0, 0x72, 0x88, 0x5e, 0xf8, 0x62, 0x44, 0xdd, 0xf0,
+  0x21, 0x34, 0xee, 0x24, 0xf7, 0x2b, 0xbd, 0xa3, 0xbf, 0xb0, 0x72, 0x36,
+  0x2e, 0x69, 0xd5, 0xb3, 0x52, 0xae, 0x06, 0x7c, 0x55, 0x48, 0x39, 0xa6,
+  0x6a, 0xa6, 0xbc, 0x39, 0x4d, 0x8c, 0xc4, 0xe3, 0xca, 0xab, 0x8a, 0x06,
+  0x1e, 0xc4, 0x10, 0xd5, 0x33, 0x22, 0xfa, 0x90, 0x3e, 0x25, 0xb7, 0x9c,
+  0xcc, 0x2d, 0x27, 0x02, 0x27, 0x3c, 0x39, 0x8d, 0x23, 0x1b, 0x3c, 0x21,
+  0xaf, 0xf2, 0x3e, 0xa2, 0x6d, 0xb2, 0xc9, 0x53, 0xb0, 0xd9, 0x4f, 0x36,
+  0xb9, 0xab, 0xfc, 0x8b, 0x4d, 0xcc, 0x27, 0x7e, 0x1c, 0x4c, 0xdf, 0xe6,
+  0xb0, 0xe3, 0x14, 0xf2, 0x33, 0x2f, 0xbf, 0x6a, 0xcc, 0x12, 0x7e, 0x6e,
+  0x4d, 0xbd, 0x14, 0x1c, 0x7f, 0xa4, 0x73, 0xdb, 0xbb, 0x41, 0xfb, 0x2f,
+  0x8f, 0x0a, 0x26, 0x60, 0xa3, 0x66, 0x02, 0x24, 0xe6, 0xc4, 0xfd, 0x2c,
+  0x47, 0x3e, 0x60, 0xd4, 0xd0, 0xc7, 0x4f, 0xf1, 0xa5, 0x89, 0x22, 0x87,
+  0x52, 0x14, 0xe9, 0x26, 0x5b, 0xc0, 0x24, 0x2f, 0xad, 0x66, 0x2e, 0x76,
+  0xdf, 0x7d, 0x01, 0x2f, 0x03, 0x64, 0xce, 0xde, 0x10, 0x09, 0x62, 0xbe,
+  0x92, 0xa2, 0x6b, 0xc0, 0x19, 0xef, 0x3d, 0x4c, 0x68, 0xcf, 0x01, 0x47,
+  0xcd, 0xa4, 0xb7, 0x59, 0xee, 0x92, 0x5d, 0xcb, 0x7c, 0x02, 0x86, 0xdf,
+  0x97, 0x5f, 0x4d, 0x8b, 0x6b, 0x96, 0x5c, 0x7d, 0x3a, 0x68, 0xfc, 0xdf,
+  0x1e, 0x3f, 0xbc, 0xaf, 0x1f, 0x95, 0x0e, 0xe3, 0xac, 0x88, 0x16, 0x6f,
+  0xff, 0x5e, 0x83, 0xa2, 0xa4, 0x86, 0xa7, 0xc5, 0x44, 0xdb, 0x76, 0x4d,
+  0xcb, 0x7a, 0x50, 0xfb, 0xee, 0x17, 0xe1, 0xb7, 0x6c, 0x72, 0x52, 0x6d,
+  0x19, 0xba, 0x11, 0x49, 0x8a, 0x5a, 0xae, 0x72, 0x57, 0x95, 0x1d, 0x0e,
+  0x2e, 0x2e, 0x86, 0x28, 0xf7, 0xd6, 0x4c, 0xb3, 0x96, 0x36, 0xbf, 0xda,
+  0x14, 0x18, 0xf6, 0xe6, 0x8b, 0x4d, 0x48, 0x30, 0x96, 0x4b, 0x56, 0x35,
+  0x4a, 0x2f, 0xa7, 0x4d, 0xb9, 0x15, 0x07, 0xa2, 0x3b, 0x28, 0xa1, 0x59,
+  0x03, 0x24, 0xc7, 0x02, 0xc3, 0xcc, 0xc8, 0x10, 0xdf, 0x07, 0x37, 0x01,
+  0x8a, 0x12, 0xa3, 0x57, 0xcc, 0xce, 0x38, 0xae, 0x05, 0xbc, 0xa2, 0x97,
+  0x2e, 0xd4, 0x32, 0x90, 0x41, 0x54, 0x8c, 0x29, 0x10, 0x37, 0xe7, 0x6a,
+  0xb1, 0xe4, 0xd4, 0xdf, 0x49, 0x2d, 0x15, 0xe0, 0x70, 0x96, 0x86, 0xc9,
+  0xbb, 0x85, 0x70, 0x90, 0x67, 0x6c, 0x2c, 0xe7, 0xe5, 0x64, 0x35, 0x67,
+  0x57, 0xc5, 0x84, 0x1d, 0x64, 0x06, 0x3f, 0xa2, 0x89, 0x6a, 0x84, 0xcc,
+  0xc3, 0x0e, 0x8b, 0x73, 0x44, 0x9c, 0xd8, 0xfa, 0x5d, 0xc0, 0x43, 0x18,
+  0x14, 0xa5, 0x4e, 0x6a, 0x68, 0x05, 0x8e, 0x14, 0x42, 0x05, 0x10, 0x47,
+  0xeb, 0x8e, 0x5f, 0x1f, 0x5f, 0x5c, 0x1c, 0x5f, 0xf0, 0x7c, 0x1f, 0x2e,
+  0x1a, 0xc5, 0x7e, 0x1c, 0x33, 0xa4, 0x0f, 0xff, 0x19, 0x32, 0x35, 0x66,
+  0xf4, 0x16, 0x51, 0xa8, 0x55, 0xe2, 0x61, 0x41, 0x08, 0x0d, 0x8a, 0xd4,
+  0x46, 0x0d, 0xdd, 0x8b, 0x40, 0x26, 0x3b, 0x57, 0x7e, 0x58, 0xe6, 0x2c,
+  0xd0, 0x2d, 0x7c, 0x0b, 0xa5, 0x96, 0xcb, 0x5c, 0x59, 0xc6, 0xf1, 0x4d,
+  0xd6, 0x50, 0x53, 0x87, 0x0a, 0x26, 0xcd, 0x34, 0xc0, 0x3d, 0x73, 0xfe,
+  0x09, 0x0c, 0xf9, 0x8a, 0xcf, 0x28, 0xdb, 0x4e, 0x98, 0x8c, 0xaa, 0x5e,
+  0x2d, 0xf3, 0xa9, 0xf3, 0xf6, 0xd2, 0xcf, 0x49, 0xfd, 0x4b, 0xe4, 0x94,
+  0x57, 0x86, 0x3f, 0x41, 0xa4, 0xd1, 0x9c, 0x11, 0xa1, 0xb7, 0xad, 0x45,
+  0x4f, 0x9a, 0x20, 0x21, 0x49, 0x80, 0x5c, 0x56, 0x6c, 0xa5, 0x99, 0x3a,
+  0xab, 0x7b, 0x3f, 0x83, 0x97, 0x91, 0xa5, 0x85, 0x41, 0x62, 0x42, 0xc9,
+  0xc0, 0xbe, 0xac, 0xb9, 0x87, 0x64, 0x33, 0xac, 0xec, 0x40, 0x58, 0x1e,
+  0x90, 0x31, 0x57, 0x1e, 0x24, 0x3f, 0x55, 0xf9, 0xe4, 0x17, 0x7f, 0x79,
+  0x20, 0xc3, 0xc2, 0xa3, 0xa6, 0xc5, 0x43, 0x4f, 0x83, 0xd7, 0x89, 0x52,
+  0x63, 0x58, 0x32, 0x55, 0xdf, 0x8d, 0x8e, 0x2f, 0x92, 0xc3, 0x6f, 0x98,
+  0xe4, 0xf4, 0xbf, 0xb8, 0xc0, 0xfc, 0x9c, 0xde, 0x0e, 0x1b, 0x0a, 0xf5,
+  0x54, 0xea, 0x86, 0xcc, 0x5c, 0xe1, 0x42, 0x3b, 0xd4, 0x58, 0xd9, 0xdc,
+  0xaa, 0x9d, 0xfa, 0xeb, 0xbe, 0xb9, 0x86, 0x1b, 0xc9, 0x47, 0x57, 0xf1,
+  0x53, 0xd6, 0x90, 0x0f, 0x59, 0xb8, 0x8a, 0x42, 0xfa, 0x22, 0x21, 0x09,
+  0x5b, 0x1b, 0xed, 0x7d, 0x15, 0x99, 0x9d, 0xb2, 0x4a, 0x87, 0xc9, 0xe6,
+  0x9b, 0xe2, 0xef, 0xa4, 0x0c, 0xa4, 0x3b, 0x4f, 0x86, 0xbb, 0xc9, 0xd6,
+  0x0f, 0xf9, 0xe2, 0xf9, 0xb3, 0x3f, 0x27, 0x27, 0xdb, 0x9b, 0x0d, 0xbc,
+  0xb9, 0x94, 0xcd, 0x1a, 0xa7, 0x8b, 0x5b, 0xb7, 0x64, 0x67, 0x38, 0xd9,
+  0x02, 0x74, 0xb3, 0x72, 0x0e, 0x52, 0xa4, 0x73, 0x6d, 0x8b, 0xc2, 0xe3,
+  0x2d, 0xd0, 0xf5, 0xe4, 0x7b, 0xc7, 0xe8, 0xcb, 0x56, 0x3e, 0x3d, 0x35,
+  0xe5, 0xa9, 0x7b, 0xfe, 0x2c, 0x6a, 0xe2, 0xa9, 0x6b, 0xe3, 0x9d, 0xb4,
+  0xf1, 0x2b, 0x9b, 0xd8, 0x1f, 0xee, 0xee, 0x27, 0x5b, 0x67, 0xa3, 0x9d,
+  0x7d, 0xd7, 0x42, 0xdc, 0xc4, 0x3e, 0x9a, 0xe0, 0x87, 0x9a, 0x2f, 0x3f,
+  0xe5, 0xef, 0xff, 0x94, 0x2d, 0x7e, 0x49, 0xb6, 0x7e, 0xdc, 0xdb, 0xa3,
+  0x06, 0xfe, 0x9c, 0x1c, 0x9e, 0xfc, 0x98, 0x3c, 0x1d, 0x52, 0x63, 0x6f,
+  0xd3, 0x3b, 0x6d, 0x4e, 0xb9, 0x3a, 0x47, 0x68, 0x84, 0x7e, 0x1f, 0xb5,
+  0xf1, 0xac, 0xd5, 0xc6, 0x29, 0xd9, 0x85, 0x1f, 0xe8, 0x5a, 0xd9, 0x1d,
+  0x3e, 0xd9, 0x4f, 0xf2, 0x67, 0x5f, 0x7c, 0x66, 0x0d, 0x69, 0x1b, 0xf8,
+  0x7d, 0xd3, 0x5b, 0x29, 0x6c, 0x10, 0xa4, 0xea, 0x1c, 0x7f, 0x20, 0x81,
+  0x06, 0x11, 0x01, 0xe2, 0xfe, 0x9b, 0xb4, 0x9c, 0xea, 0x76, 0x63, 0x32,
+  0x77, 0x5a, 0x29, 0x65, 0xc9, 0xcd, 0xe0, 0xb6, 0xa4, 0x8b, 0xf3, 0x20,
+  0xea, 0x0e, 0xdb, 0xa6, 0xf6, 0xe8, 0x9f, 0x93, 0x37, 0xa3, 0x93, 0x63,
+  0x1a, 0xd1, 0x2e, 0x75, 0xcd, 0xcf, 0xa1, 0x74, 0x08, 0xbf, 0xc2, 0xe4,
+  0x3e, 0x07, 0xe9, 0xa2, 0xb6, 0x11, 0xd6, 0xa7, 0xc4, 0xa6, 0xa3, 0x8b,
+  0xbb, 0xc2, 0x77, 0x19, 0x26, 0x32, 0x38, 0xbc, 0x66, 0x13, 0x42, 0xae,
+  0x5a, 0x7c, 0xfa, 0xbb, 0x62, 0x41, 0xc7, 0xa4, 0x2c, 0x4a, 0x46, 0x33,
+  0x6d, 0x36, 0xb4, 0x85, 0xef, 0x5e, 0x1d, 0x4b, 0xc6, 0xf0, 0x9b, 0x74,
+  0x41, 0x32, 0x92, 0xc9, 0x7f, 0xaa, 0x5b, 0x8e, 0xc9, 0x4b, 0x38, 0x47,
+  0xde, 0x3f, 0x7d, 0x58, 0x7c, 0xa0, 0x75, 0xfc, 0x7c, 0xb8, 0xc7, 0xc4,
+  0x0b, 0x6c, 0xf5, 0xbe, 0x7e, 0x43, 0xff, 0xde, 0x7b, 0xba, 0x99, 0xf0,
+  0xaf, 0x9a, 0x16, 0xbc, 0x9d, 0xd7, 0x8d, 0xa3, 0xb3, 0xb3, 0xef, 0x4e,
+  0x04, 0x94, 0x71, 0xa4, 0x6e, 0x55, 0x56, 0xae, 0x9c, 0x55, 0x2c, 0xd2,
+  0x95, 0xac, 0x37, 0x9f, 0xdf, 0x82, 0x60, 0xdc, 0x6d, 0x96, 0x2d, 0x19,
+  0x21, 0x50, 0xb7, 0x24, 0x42, 0xad, 0x32, 0xda, 0xe1, 0x8d, 0x58, 0xfd,
+  0x69, 0x10, 0x17, 0x55, 0xcc, 0x04, 0x6b, 0x2e, 0xdc, 0xf1, 0x83, 0x63,
+  0x25, 0x48, 0x5d, 0xc8, 0x4c, 0xba, 0xe8, 0x00, 0xf5, 0xe6, 0x82, 0x96,
+  0x1a, 0x08, 0xf4, 0xa2, 0xda, 0xbe, 0x9b, 0x23, 0xd2, 0xee, 0xa5, 0xd3,
+  0x07, 0xea, 0xb5, 0xdd, 0x0c, 0xa8, 0x73, 0xa1, 0xd1, 0x2e, 0xb5, 0x46,
+  0x08, 0x5c, 0xc7, 0x0f, 0xa4, 0x4b, 0x60, 0x4c, 0x2a, 0x9b, 0x2b, 0xf8,
+  0xb2, 0x01, 0x99, 0x7b, 0x7b, 0xf8, 0xe6, 0xf8, 0xe5, 0xf7, 0x87, 0xa7,
+  0xef, 0x8e, 0xe9, 0x95, 0x1c, 0x2c, 0xd5, 0x0e, 0x56, 0x87, 0x3e, 0xce,
+  0x73, 0xd4, 0xc6, 0xac, 0x48, 0x3d, 0xd8, 0xdc, 0x10, 0xa4, 0x77, 0xd2,
+  0xe3, 0xb7, 0xf6, 0xe4, 0x35, 0xda, 0x17, 0xfc, 0xaf, 0x7d, 0xf9, 0xd7,
+  0xfe, 0x9f, 0x7b, 0xdb, 0x8d, 0x41, 0x47, 0x56, 0x32, 0xef, 0x97, 0x7b,
+  0x29, 0x14, 0xc3, 0x90, 0x1d, 0x49, 0x2f, 0x90, 0x59, 0xe9, 0x59, 0x8c,
+  0xc6, 0xee, 0x36, 0x7e, 0x76, 0x6b, 0xfc, 0x10, 0xda, 0xe0, 0x3d, 0x7e,
+  0xe9, 0x25, 0x14, 0x8c, 0x1e, 0x78, 0xbc, 0x33, 0x9b, 0x2d, 0x69, 0xc3,
+  0x9a, 0xc8, 0x3e, 0x2c, 0x19, 0xa5, 0xb8, 0xd5, 0x93, 0xbf, 0xbc, 0x7c,
+  0x75, 0x78, 0x79, 0xcc, 0x2f, 0xd8, 0xe7, 0x8d, 0xd4, 0xdd, 0x92, 0x00,
+  0xb8, 0x3f, 0x5b, 0x3d, 0xf9, 0xe1, 0x4b, 0x1e, 0x50, 0x6f, 0x5b, 0x62,
+  0x19, 0x08, 0x74, 0xb7, 0xfa, 0x55, 0x2c, 0x14, 0x4f, 0x1d, 0x24, 0x4b,
+  0x57, 0x86, 0x22, 0xd9, 0xea, 0xc9, 0xef, 0x7a, 0xce, 0x83, 0xab, 0x35,
+  0x8c, 0x35, 0x5c, 0x39, 0x45, 0x8a, 0x40, 0x94, 0xbc, 0x28, 0x30, 0x31,
+  0xbf, 0x3e, 0x1a, 0xac, 0x10, 0x8f, 0x53, 0x40, 0x26, 0xec, 0x16, 0x5e,
+  0x73, 0xbb, 0xd9, 0xc7, 0x54, 0x14, 0x7b, 0xfb, 0x4f, 0xfe, 0x8c, 0xf9,
+  0x7c, 0xd9, 0xdb, 0xa1, 0xbb, 0xa1, 0xf7, 0x67, 0xfe, 0x74, 0xee, 0xab,
+  0xd0, 0xba, 0xf5, 0x60, 0x7b, 0x4a, 0x77, 0x94, 0x40, 0x58, 0x78, 0xd5,
+  0x03, 0xf6, 0x12, 0x4c, 0xe8, 0xbd, 0x24, 0x32, 0x19, 0xd7, 0x87, 0x05,
+  0xf4, 0xb1, 0x5e, 0xa8, 0x70, 0x8f, 0x1a, 0x61, 0xe2, 0xd4, 0xc5, 0xe7,
+  0xc2, 0xfb, 0xa3, 0x2f, 0xef, 0xca, 0x18, 0x95, 0x1f, 0x85, 0xbf, 0x39,
+  0x7f, 0xb0, 0x5c, 0x27, 0x7c, 0x4b, 0xcb, 0xae, 0x62, 0x2c, 0x6d, 0xed,
+  0x60, 0xac, 0xbe, 0x1d, 0x33, 0x46, 0xa0, 0x13, 0x90, 0x68, 0x79, 0x80,
+  0xa2, 0x24, 0x08, 0x80, 0x00, 0xf8, 0x60, 0x77, 0x76, 0x3a, 0xe6, 0x3c,
+  0x5e, 0x97, 0xd8, 0x11, 0x58, 0xe5, 0x6e, 0xea, 0xed, 0xf8, 0xe5, 0x01,
+  0xf1, 0x0c, 0x5f, 0x94, 0x32, 0x97, 0x95, 0xf3, 0x21, 0x21, 0xda, 0xa8,
+  0xcf, 0x36, 0xd7, 0xa9, 0x95, 0x32, 0x85, 0x61, 0x88, 0x49, 0x2f, 0xf6,
+  0x31, 0x89, 0x9a, 0x45, 0x56, 0x3e, 0x0a, 0x7a, 0xe8, 0x08, 0x46, 0x61,
+  0x88, 0x41, 0x1a, 0x1e, 0xbf, 0x33, 0x1c, 0x0e, 0x7d, 0x25, 0x5f, 0x5e,
+  0x16, 0x8d, 0x41, 0xa1, 0xb6, 0x4a, 0x40, 0x8f, 0x89, 0x39, 0xde, 0x82,
+  0x32, 0x0f, 0x85, 0x7a, 0x5b, 0xc1, 0x30, 0xea, 0x27, 0x70, 0x47, 0x23,
+  0xf0, 0x71, 0x6c, 0xea, 0x67, 0x37, 0x2d, 0x27, 0xfd, 0xb6, 0x6b, 0x11,
+  0x1e, 0xe9, 0x9b, 0xf8, 0x1e, 0xb5, 0x32, 0x9f, 0x93, 0x53, 0x85, 0x9b,
+  0x0b, 0xde, 0xc1, 0x0c, 0xea, 0xc6, 0x3e, 0x91, 0xa4, 0x4e, 0x99, 0x34,
+  0xed, 0x8a, 0xd6, 0x68, 0x62, 0x21, 0x57, 0xdc, 0x23, 0xcf, 0x5c, 0x0a,
+  0x64, 0x2c, 0x4b, 0xb6, 0xf4, 0x78, 0x8e, 0xed, 0x06, 0x59, 0x3a, 0xb5,
+  0x59, 0xdb, 0x51, 0xaa, 0x54, 0xb6, 0x99, 0xa1, 0xfb, 0x6b, 0x22, 0x9e,
+  0xb2, 0x6d, 0x54, 0xa9, 0xd2, 0x28, 0x92, 0xda, 0x56, 0xcc, 0x11, 0xf6,
+  0xd2, 0xc1, 0x7b, 0x77, 0x15, 0x23, 0xc0, 0x06, 0xc2, 0x57, 0x61, 0xb9,
+  0x72, 0x26, 0x3d, 0x94, 0xb3, 0xe0, 0xb1, 0x78, 0xf9, 0xc4, 0x5a, 0x74,
+  0xc1, 0xf2, 0xd6, 0xdc, 0xf8, 0x5b, 0xb9, 0x29, 0xba, 0x68, 0x46, 0xc5,
+  0xbb, 0x2c, 0xcc, 0x00, 0x5e, 0xee, 0x25, 0xe9, 0x3d, 0x57, 0x94, 0xce,
+  0x18, 0x33, 0x09, 0xa4, 0x03, 0xbc, 0x32, 0xa7, 0x81, 0x9f, 0xd1, 0x8d,
+  0xd0, 0x2a, 0x9f, 0xa7, 0xbe, 0xf4, 0xb9, 0x15, 0x46, 0x15, 0x36, 0x50,
+  0x73, 0xe8, 0xe5, 0x28, 0xdf, 0xca, 0xec, 0x8d, 0xaa, 0xa9, 0x9b, 0x79,
+  0xce, 0x3d, 0xdf, 0x46, 0x81, 0x4b, 0x51, 0xe7, 0x81, 0x15, 0x64, 0x3f,
+  0x87, 0xe0, 0x2a, 0x6c, 0xb6, 0x50, 0xde, 0xd6, 0x7d, 0xc4, 0xc5, 0xa7,
+  0xd5, 0xfd, 0xc4, 0x90, 0xdb, 0xc5, 0xc0, 0x15, 0x07, 0x77, 0x78, 0xac,
+  0x32, 0xbf, 0xbe, 0xd6, 0x9a, 0x9a, 0xed, 0xa1, 0x75, 0x6f, 0xb2, 0x53,
+  0x9e, 0x15, 0x46, 0x26, 0x3f, 0xac, 0x9b, 0xcd, 0x4b, 0xf3, 0xf9, 0x98,
+  0xd7, 0xa5, 0xb1, 0x99, 0x2d, 0x26, 0x29, 0xeb, 0x06, 0x96, 0x45, 0x49,
+  0x02, 0xe7, 0xa4, 0x89, 0x66, 0x0c, 0xf9, 0xec, 0x62, 0x03, 0xbc, 0xf0,
+  0x0b, 0x9f, 0xf3, 0x6e, 0x8b, 0x0e, 0xf2, 0x31, 0x8f, 0x40, 0xf1, 0xe8,
+  0xd0, 0x7b, 0x07, 0x7f, 0x92, 0x92, 0x62, 0xe3, 0xd4, 0x9b, 0x5c, 0x1b,
+  0x49, 0xc3, 0xdb, 0xcb, 0xf5, 0x22, 0x4e, 0x16, 0x2a, 0x87, 0x8a, 0xbb,
+  0xcc, 0xf3, 0xdf, 0x79, 0x87, 0xa3, 0x27, 0x11, 0xd5, 0xd3, 0xef, 0x84,
+  0x49, 0x2b, 0xc0, 0xeb, 0xe4, 0x15, 0x06, 0xd9, 0x9a, 0x95, 0x61, 0x12,
+  0x34, 0x29, 0xae, 0x92, 0x22, 0x14, 0xf1, 0xd2, 0x37, 0x8d, 0x5b, 0x5b,
+  0x8b, 0x9a, 0x56, 0x04, 0x06, 0x8b, 0xc0, 0x34, 0x91, 0x7a, 0x0a, 0x46,
+  0x04, 0xee, 0x70, 0x73, 0x3e, 0xfe, 0x6b, 0xa3, 0xec, 0xb9, 0x45, 0xea,
+  0x19, 0xe5, 0x3a, 0x36, 0x01, 0xf6, 0x00, 0x2b, 0x74, 0x2e, 0x84, 0x7f,
+  0x38, 0x4b, 0x19, 0xc4, 0x52, 0x08, 0x3a, 0x00, 0x4b, 0x86, 0x4d, 0x0d,
+  0x67, 0x5a, 0x4b, 0xa6, 0x46, 0xc7, 0xcf, 0xa1, 0x35, 0x64, 0xaf, 0xb1,
+  0x92, 0x82, 0x66, 0x68, 0x97, 0x00, 0x61, 0x3d, 0x09, 0xeb, 0xa2, 0xae,
+  0x4f, 0x0f, 0x1f, 0x37, 0xce, 0xe8, 0xc7, 0x8e, 0xec, 0xf9, 0xc5, 0xd9,
+  0x37, 0x17, 0xc7, 0xa3, 0x51, 0xf2, 0xe6, 0xf8, 0x52, 0xcc, 0x7e, 0xad,
+  0xf7, 0x7d, 0xcd, 0x96, 0x7b, 0x82, 0xb0, 0x83, 0x71, 0xd5, 0x18, 0xfa,
+  0xc4, 0x7c, 0x0a, 0x48, 0x49, 0x2a, 0x38, 0xa4, 0x06, 0x55, 0x0e, 0xf6,
+  0xfc, 0x4c, 0x01, 0x75, 0x37, 0x70, 0xfc, 0x03, 0xde, 0x84, 0xd8, 0xa4,
+  0xf3, 0xa3, 0x7b, 0x8f, 0x2a, 0x74, 0x64, 0x01, 0x3c, 0xdd, 0x98, 0xe4,
+  0xf2, 0xde, 0x74, 0xbe, 0xbd, 0xe9, 0xbf, 0x18, 0xde, 0x1f, 0x93, 0xcb,
+  0xa2, 0xe6, 0xa2, 0xb7, 0xfc, 0xd7, 0x0b, 0xdb, 0x1f, 0x7f, 0x4c, 0x7e,
+  0xa4, 0x36, 0xa7, 0x34, 0xeb, 0xec, 0x4c, 0xa6, 0x0b, 0x77, 0x84, 0x8a,
+  0x89, 0xbe, 0x7c, 0x0a, 0xca, 0x1c, 0x86, 0xc5, 0x8c, 0x57, 0x65, 0x39,
+  0xec, 0xae, 0x3e, 0xd2, 0x28, 0x1f, 0x22, 0xb4, 0x80, 0x0a, 0xaf, 0x73,
+  0x5f, 0xd6, 0x52, 0xa8, 0x49, 0x72, 0x9a, 0x5d, 0xd5, 0x50, 0x48, 0xf8,
+  0x73, 0xd4, 0xdc, 0x2e, 0xf3, 0xdc, 0xee, 0x71, 0x79, 0x27, 0xfa, 0xeb,
+  0x93, 0x2f, 0x3e, 0xdb, 0xfd, 0x42, 0xfe, 0x6a, 0x7f, 0x3e, 0x7f, 0xba,
+  0xab, 0x7c, 0xd1, 0xf4, 0xaf, 0xa7, 0x07, 0x4f, 0xf7, 0x0e, 0x98, 0xc6,
+  0x6e, 0xf7, 0x60, 0x97, 0xfe, 0xff, 0x53, 0xfd, 0x09, 0x73, 0xf5, 0x3d,
+  0xdf, 0xff, 0xe2, 0x73, 0x00, 0x63, 0x78, 0x7f, 0xcc, 0xe8, 0x23, 0x83,
+  0xba, 0x18, 0x80, 0x4d, 0x07, 0x4a, 0xd0, 0x1f, 0x9b, 0x4e, 0x49, 0x8e,
+  0xb4, 0x4f, 0x38, 0xae, 0x7a, 0x2d, 0xe6, 0xcd, 0x2c, 0x63, 0x09, 0xa0,
+  0x0e, 0x56, 0x61, 0x19, 0x31, 0x00, 0xb7, 0x24, 0x19, 0xeb, 0x30, 0xf4,
+  0xed, 0x1a, 0xff, 0x06, 0x3d, 0x55, 0xe3, 0x1d, 0xc1, 0x81, 0x07, 0x4c,
+  0x58, 0xbf, 0xf6, 0xd3, 0x96, 0xf6, 0xbc, 0x01, 0x7e, 0x2b, 0x5d, 0x2a,
+  0x7d, 0x6f, 0x62, 0xd5, 0x64, 0xdd, 0x53, 0xac, 0x11, 0xce, 0x25, 0x65,
+  0xe0, 0x4a, 0xd0, 0xc4, 0xbf, 0xf6, 0x7b, 0xe2, 0xc4, 0xe2, 0xb7, 0x74,
+  0x37, 0x24, 0xf1, 0xd7, 0x5c, 0xaa, 0x40, 0xc7, 0xb7, 0x1a, 0x9b, 0x67,
+  0xc3, 0x2f, 0xbf, 0x9f, 0x29, 0x96, 0x6a, 0xfa, 0x90, 0x4b, 0xb1, 0x92,
+  0xe2, 0x9c, 0x1d, 0x43, 0x8e, 0x9a, 0xd3, 0x6d, 0xf4, 0x2b, 0x9a, 0xf3,
+  0x23, 0xc2, 0x0e, 0x76, 0x2b, 0x37, 0x08, 0x16, 0x27, 0x17, 0x8c, 0x9b,
+  0xcd, 0x86, 0xe3, 0x4f, 0xb4, 0x1b, 0x4f, 0x5e, 0x75, 0x5b, 0x76, 0x20,
+  0x6f, 0xa8, 0xfa, 0xe9, 0xd2, 0xd6, 0xb4, 0x76, 0xb5, 0x7b, 0xde, 0x76,
+  0x76, 0xf4, 0x29, 0xde, 0x8d, 0xc1, 0xf7, 0xf4, 0x1b, 0x38, 0x4f, 0xee,
+  0xd0, 0x3d, 0x3a, 0x34, 0x0f, 0x7d, 0x77, 0xc5, 0x49, 0xb7, 0x1c, 0x94,
+  0xbc, 0xeb, 0x48, 0xfa, 0xe7, 0x80, 0x2e, 0x77, 0xcd, 0x85, 0x17, 0x11,
+  0x0a, 0xd3, 0x6a, 0x01, 0x00, 0x26, 0x65, 0x64, 0x16, 0xf3, 0x6d, 0x13,
+  0x61, 0x83, 0x3f, 0x38, 0x04, 0x17, 0xee, 0x35, 0xad, 0x5e, 0x98, 0xca,
+  0xce, 0x9f, 0x85, 0x19, 0xae, 0x4e, 0xda, 0x8d, 0xd3, 0xb2, 0xc1, 0x17,
+  0xbe, 0x21, 0xac, 0xf9, 0x74, 0xd3, 0xd2, 0xcd, 0x11, 0x94, 0x49, 0xff,
+  0x97, 0x8d, 0x8d, 0xd1, 0xf9, 0xf1, 0xf1, 0xab, 0xe4, 0xf4, 0xe4, 0xcd,
+  0xc9, 0x65, 0xa0, 0x90, 0xbb, 0x8b, 0xc4, 0x9c, 0xae, 0x56, 0x5b, 0xa7,
+  0x35, 0x1d, 0x9e, 0x9d, 0x56, 0xbe, 0x67, 0x57, 0xf9, 0x3c, 0xd3, 0x24,
+  0x87, 0x59, 0xfb, 0x3d, 0x98, 0xde, 0xa0, 0xd1, 0x19, 0x26, 0x5f, 0x07,
+  0x18, 0xc9, 0xa4, 0x22, 0xe5, 0x66, 0xe2, 0x4a, 0xb6, 0x0e, 0xfe, 0xa2,
+  0x90, 0x8d, 0xa6, 0xe6, 0xa4, 0x24, 0x9b, 0x2e, 0xe3, 0x46, 0x61, 0xae,
+  0xad, 0x5e, 0xf1, 0xdc, 0x66, 0x82, 0x7c, 0x0e, 0x3c, 0x74, 0x40, 0xf0,
+  0xdd, 0x67, 0xc8, 0xcd, 0x9f, 0xe7, 0x92, 0x0a, 0x19, 0xc2, 0x8b, 0x5d,
+  0x15, 0xcb, 0xcb, 0x42, 0xe4, 0x78, 0xf8, 0xc5, 0xb0, 0x3c, 0xb1, 0x61,
+  0x6b, 0xed, 0x5b, 0x61, 0xdd, 0xdb, 0x27, 0xbb, 0x2e, 0x9b, 0x60, 0x09,
+  0x99, 0xa3, 0xaa, 0x3e, 0x7f, 0x6c, 0x2f, 0x21, 0x7d, 0x64, 0xc5, 0x5a,
+  0x7d, 0xb9, 0x5a, 0x44, 0xd7, 0xdd, 0x5f, 0xe4, 0x5d, 0x1a, 0xff, 0x67,
+  0xbb, 0xb8, 0xde, 0xae, 0xd2, 0x72, 0x40, 0x9a, 0xd7, 0xc3, 0xc0, 0xbc,
+  0xab, 0xb2, 0x23, 0x14, 0x7a, 0x2c, 0xae, 0x9f, 0xcc, 0x17, 0xcc, 0x6c,
+  0x69, 0x8b, 0x3e, 0x25, 0xa4, 0x40, 0x88, 0x72, 0xa6, 0x07, 0x80, 0x87,
+  0xce, 0x89, 0xb8, 0xe6, 0xec, 0xf4, 0xba, 0x8e, 0x27, 0x60, 0xb5, 0x55,
+  0xf4, 0x32, 0x8a, 0x13, 0x04, 0x20, 0x56, 0xb9, 0xd5, 0x9c, 0x87, 0xa9,
+  0x63, 0x89, 0x55, 0xeb, 0x79, 0xb2, 0xf7, 0x05, 0x8f, 0xe3, 0xd3, 0xc6,
+  0xf3, 0xba, 0x28, 0x27, 0x2e, 0xe5, 0x17, 0xe6, 0x42, 0x90, 0xff, 0x29,
+  0x59, 0x0b, 0xa8, 0x4a, 0x23, 0xb3, 0x6b, 0xf8, 0x58, 0xe0, 0xf7, 0xd8,
+  0x3e, 0xd1, 0xd0, 0x3a, 0x3c, 0x53, 0x88, 0x75, 0x8b, 0x86, 0xc4, 0x77,
+  0x8d, 0xce, 0x0b, 0xfb, 0x5a, 0x05, 0xbf, 0xb7, 0x59, 0xba, 0xfc, 0x50,
+  0x99, 0x06, 0xf6, 0x8e, 0xd0, 0x5e, 0xbb, 0xcf, 0xa7, 0xd0, 0xaa, 0xcd,
+  0x09, 0x80, 0xfd, 0x27, 0x9b, 0x4f, 0x60, 0xd3, 0x08, 0x5f, 0x22, 0xee,
+  0xe9, 0x7a, 0xa6, 0x0a, 0x0c, 0x4f, 0x6b, 0x01, 0xe7, 0xc2, 0x16, 0xf4,
+  0x07, 0x4e, 0x3f, 0xf6, 0x21, 0x02, 0x36, 0xa5, 0x58, 0x34, 0xf7, 0xfc,
+  0x57, 0x18, 0xca, 0x5f, 0xd7, 0x33, 0xf3, 0x2b, 0xbc, 0x71, 0x1b, 0xbb,
+  0x39, 0x66, 0xe6, 0x15, 0x09, 0x86, 0xbd, 0xb7, 0x4b, 0xfa, 0xeb, 0xac,
+  0x68, 0x97, 0xd7, 0x8e, 0x8d, 0x52, 0x0c, 0x6b, 0x80, 0xd9, 0xd9, 0xdb,
+  0xfd, 0x6e, 0xfd, 0xac, 0x83, 0x66, 0xfc, 0xd1, 0x97, 0xf7, 0x9f, 0x3e,
+  0xb2, 0x68, 0x67, 0x25, 0xec, 0xf2, 0xcc, 0xe0, 0x90, 0x50, 0x04, 0x7d,
+  0x10, 0x26, 0x5a, 0x36, 0xda, 0xf8, 0xd9, 0x75, 0xca, 0xdd, 0x7f, 0xac,
+  0xf7, 0x96, 0xb2, 0xd1, 0xea, 0xca, 0x1b, 0x05, 0x68, 0xcb, 0x2f, 0x2b,
+  0xf6, 0x90, 0x2d, 0x41, 0x86, 0xe6, 0xcd, 0x58, 0x97, 0xed, 0x2d, 0x74,
+  0x13, 0xc1, 0xdb, 0x22, 0x39, 0xfb, 0x4d, 0x21, 0x61, 0xbb, 0xa7, 0xcc,
+  0xae, 0x57, 0xc2, 0xe7, 0x50, 0x88, 0xd9, 0xcf, 0xbc, 0xbd, 0x7a, 0x5e,
+  0x49, 0x36, 0x33, 0x92, 0x48, 0xf6, 0x13, 0x04, 0xef, 0x24, 0x35, 0x95,
+  0x55, 0x54, 0x8e, 0xf6, 0xc5, 0xc0, 0xfe, 0xd9, 0x09, 0x07, 0xc4, 0x20,
+  0x0d, 0x36, 0x92, 0x76, 0xe9, 0x5d, 0x21, 0xa6, 0x1b, 0x22, 0x11, 0x57,
+  0x36, 0x8a, 0x13, 0xf6, 0x9c, 0xf5, 0xc5, 0x81, 0xb1, 0x5a, 0x22, 0x04,
+  0x68, 0xa0, 0xaf, 0xbb, 0x16, 0x2d, 0xb9, 0x4f, 0xb1, 0xc4, 0xaf, 0x8c,
+  0x20, 0x50, 0xc8, 0xc4, 0xd9, 0xef, 0x7f, 0x74, 0xf6, 0xf6, 0xf5, 0xc9,
+  0x37, 0x8e, 0x78, 0x47, 0x84, 0xb8, 0x95, 0x04, 0x45, 0x9b, 0xe2, 0x49,
+  0x0e, 0x83, 0xde, 0x5a, 0x72, 0x4e, 0x81, 0xb8, 0x24, 0x9e, 0xde, 0x87,
+  0x3f, 0x80, 0x00, 0x59, 0x3c, 0x61, 0x5f, 0xb9, 0x10, 0x59, 0x54, 0xdb,
+  0xde, 0xf3, 0xd0, 0x22, 0x06, 0x93, 0x84, 0x8d, 0xb4, 0xac, 0x57, 0x4b,
+  0x87, 0x27, 0x0c, 0x4a, 0xd6, 0x29, 0xcd, 0xb0, 0x65, 0x8a, 0xaf, 0x96,
+  0x22, 0x9a, 0x34, 0xdf, 0xb3, 0xe1, 0xd8, 0x95, 0x3b, 0x80, 0x3d, 0x0b,
+  0xca, 0xfc, 0xa1, 0x17, 0x40, 0x04, 0xd1, 0x99, 0x31, 0x39, 0x61, 0x08,
+  0x9d, 0xb7, 0x50, 0xce, 0x14, 0x65, 0xff, 0xc2, 0xa2, 0xc9, 0x73, 0xb1,
+  0xcc, 0x78, 0xdc, 0xa8, 0x75, 0xeb, 0x70, 0x39, 0x0e, 0x08, 0xec, 0x43,
+  0x45, 0x95, 0x2b, 0xde, 0xeb, 0xa0, 0x4a, 0x96, 0x65, 0x9a, 0x22, 0x6a,
+  0x89, 0xb0, 0x27, 0x7e, 0xf2, 0x92, 0x23, 0x34, 0x07, 0x4c, 0xb6, 0x3d,
+  0x17, 0xfa, 0xae, 0x30, 0x3b, 0x54, 0xa5, 0xa4, 0x27, 0xc5, 0x3e, 0xb9,
+  0x0a, 0x12, 0xce, 0x04, 0x32, 0x68, 0x9b, 0x4e, 0xdc, 0xc5, 0xec, 0x6b,
+  0xd9, 0xfc, 0xc3, 0xe6, 0xa0, 0x7a, 0x98, 0x8f, 0x8b, 0x99, 0xe5, 0x60,
+  0x38, 0x7e, 0x07, 0x7b, 0x28, 0x2c, 0x21, 0x95, 0x48, 0xd0, 0xb6, 0x0e,
+  0x3c, 0x94, 0x1e, 0x36, 0xe5, 0xfb, 0x2f, 0x65, 0x58, 0x10, 0x29, 0xb2,
+  0x51, 0x38, 0xb2, 0x91, 0x6c, 0x31, 0x99, 0x15, 0xba, 0xab, 0x39, 0xff,
+  0x1b, 0x33, 0xd5, 0x1c, 0x3a, 0x07, 0xff, 0x8a, 0x15, 0x3b, 0x3b, 0x50,
+  0x62, 0x81, 0xd4, 0x1d, 0x76, 0x0e, 0xff, 0x60, 0x03, 0xe4, 0xb7, 0xe5,
+  0x17, 0x0a, 0xd0, 0x37, 0x96, 0x16, 0x6a, 0x48, 0x6a, 0x32, 0x50, 0x57,
+  0x7f, 0x16, 0xdf, 0xa2, 0x84, 0x00, 0xff, 0x62, 0x1f, 0xb7, 0x47, 0x5b,
+  0x53, 0x4f, 0xfb, 0x29, 0x2d, 0xaf, 0x95, 0x13, 0x4d, 0x83, 0x6a, 0x30,
+  0x12, 0x5d, 0xa5, 0x0c, 0xe7, 0xa3, 0x64, 0xa5, 0xc4, 0x01, 0x68, 0xa0,
+  0x3e, 0xad, 0x24, 0xe5, 0x4f, 0x13, 0xa2, 0xc4, 0x3b, 0xe9, 0x36, 0x62,
+  0x20, 0x71, 0xfe, 0xe0, 0x60, 0x29, 0xa9, 0xbf, 0xcb, 0x8c, 0xc0, 0xdf,
+  0xbb, 0x6a, 0xf5, 0x32, 0x0b, 0x5e, 0x63, 0x7f, 0x1e, 0x2c, 0xe1, 0x4c,
+  0x7d, 0x28, 0xf2, 0x29, 0xe8, 0x12, 0x4c, 0x07, 0x88, 0x3c, 0xa0, 0xac,
+  0xf2, 0x4d, 0xc8, 0xef, 0x5f, 0x6a, 0xe5, 0x1e, 0x3a, 0xcf, 0xca, 0x5f,
+  0xa2, 0x64, 0x6d, 0x5f, 0xec, 0xaa, 0x27, 0xae, 0x56, 0xe4, 0x6a, 0x95,
+  0x1c, 0x5e, 0x1c, 0x93, 0x66, 0x7b, 0xbd, 0x00, 0x85, 0xc4, 0xa2, 0xb6,
+  0x9c, 0xb7, 0x6c, 0xa1, 0xa5, 0x82, 0x16, 0x76, 0x3e, 0xf8, 0x83, 0xf7,
+  0xc1, 0x9b, 0xbc, 0x99, 0x14, 0x23, 0x20, 0xe9, 0xd5, 0x7e, 0xcb, 0x4d,
+  0x8c, 0x36, 0x15, 0x52, 0x87, 0x59, 0x0c, 0x64, 0x4b, 0x71, 0xb4, 0x84,
+  0x3e, 0x55, 0x18, 0x65, 0xea, 0x79, 0x24, 0xd6, 0x43, 0xae, 0x54, 0x9b,
+  0x6b, 0x9c, 0x6a, 0x9f, 0x95, 0xf0, 0x37, 0x63, 0x41, 0xd4, 0x6f, 0x35,
+  0x22, 0xa0, 0x7e, 0x3b, 0xf5, 0xbb, 0xbd, 0x47, 0x7f, 0xc3, 0x3d, 0xc3,
+  0xba, 0x48, 0x5b, 0x2f, 0xc8, 0x1c, 0xd8, 0x5e, 0x1c, 0xd9, 0xd3, 0x40,
+  0xf9, 0x95, 0x0c, 0x3d, 0x54, 0xee, 0x86, 0x8f, 0x9a, 0x95, 0x9f, 0xb4,
+  0xd2, 0x6c, 0x28, 0x35, 0x07, 0xa6, 0x7a, 0x56, 0x79, 0x57, 0x30, 0x72,
+  0x78, 0xcc, 0x9c, 0x3f, 0x52, 0xb9, 0xb7, 0x21, 0x9f, 0x3a, 0xdd, 0xbc,
+  0x7f, 0x70, 0xa3, 0xf5, 0x7d, 0x70, 0xbf, 0xe4, 0x1f, 0xbd, 0x74, 0xbc,
+  0x68, 0xa8, 0x40, 0xce, 0x1f, 0x82, 0x48, 0x45, 0xf8, 0x94, 0xff, 0x82,
+  0x1f, 0x03, 0x00, 0x67, 0xdc, 0x92, 0x0d, 0x1a, 0x23, 0x2d, 0x0e, 0x12,
+  0x76, 0x44, 0x62, 0x7c, 0x90, 0xd0, 0xe3, 0x50, 0x35, 0x1e, 0x7c, 0xb7,
+  0x63, 0xd5, 0x3e, 0xd9, 0x95, 0xc3, 0xf9, 0xbd, 0x76, 0xe0, 0xab, 0xac,
+  0x51, 0x1e, 0xd4, 0x25, 0x0d, 0xf5, 0x06, 0x3d, 0x9a, 0x8b, 0xcd, 0xd9,
+  0xcc, 0x0b, 0x7c, 0x7b, 0x8c, 0x57, 0x15, 0xf9, 0x75, 0x5e, 0x61, 0x52,
+  0xd9, 0xc5, 0x75, 0x07, 0x1e, 0x1a, 0xd9, 0x0e, 0x5c, 0xb8, 0x89, 0x93,
+  0x81, 0x1c, 0x0d, 0x15, 0x32, 0x46, 0x80, 0x17, 0xb8, 0xcb, 0x2b, 0x8b,
+  0x43, 0xd2, 0xde, 0x9e, 0x08, 0x3c, 0xa2, 0x16, 0xbe, 0x80, 0xac, 0x9e,
+  0x04, 0x53, 0x99, 0x4d, 0x6e, 0x0a, 0x81, 0xd7, 0xd2, 0xa4, 0x05, 0x89,
+  0x98, 0xbd, 0xe4, 0x7f, 0xea, 0x1e, 0xf8, 0xce, 0xe7, 0xef, 0xf1, 0x46,
+  0x18, 0x0a, 0xeb, 0xdf, 0xd0, 0x6f, 0x88, 0xe3, 0x1f, 0x2f, 0x2f, 0x0e,
+  0x93, 0x6f, 0x8f, 0x0f, 0x5f, 0x1d, 0x5f, 0x8c, 0x5a, 0x97, 0xbe, 0x22,
+  0x41, 0x44, 0x43, 0x63, 0x7f, 0x30, 0x54, 0x63, 0xe3, 0x05, 0x50, 0x08,
+  0xbf, 0x49, 0x3d, 0xda, 0x3c, 0x7c, 0x90, 0xe8, 0x7c, 0xb0, 0x41, 0x24,
+  0x81, 0x03, 0xf0, 0xbb, 0x56, 0x10, 0x36, 0xae, 0x8d, 0x09, 0x49, 0x28,
+  0xc6, 0x33, 0x98, 0xf7, 0x3c, 0x4c, 0x9e, 0xf1, 0xcc, 0x72, 0xfe, 0x32,
+  0x99, 0x16, 0x96, 0x17, 0xd8, 0x5c, 0xb9, 0x6f, 0x7d, 0x3a, 0x76, 0x20,
+  0xb6, 0xf4, 0x92, 0x51, 0x07, 0x62, 0xef, 0xc7, 0x01, 0x7d, 0x77, 0x40,
+  0x93, 0x3f, 0x60, 0x46, 0xc0, 0x87, 0xac, 0xea, 0xb5, 0xbc, 0x81, 0xcd,
+  0xcf, 0x6f, 0x48, 0xb1, 0x9a, 0xe8, 0x24, 0x7d, 0xdb, 0xd9, 0x12, 0x9f,
+  0x2e, 0xae, 0x67, 0x1b, 0x59, 0x10, 0xb8, 0x54, 0x03, 0x25, 0x59, 0x4f,
+  0x50, 0x94, 0xe9, 0xa2, 0x58, 0x25, 0x6f, 0x66, 0x2a, 0x34, 0x0c, 0x1d,
+  0xd1, 0x21, 0x40, 0xd7, 0xa1, 0xb3, 0x27, 0x97, 0x3a, 0xfc, 0x22, 0x46,
+  0x56, 0x4b, 0xdd, 0xd2, 0x87, 0xc2, 0xfb, 0x01, 0xb1, 0x10, 0x85, 0xe3,
+  0x57, 0x8d, 0x50, 0xa9, 0xfa, 0x45, 0x95, 0xa5, 0x58, 0x9b, 0xe3, 0x3e,
+  0xb8, 0x3d, 0x6f, 0x28, 0x7e, 0xfe, 0xa4, 0x15, 0x50, 0xd0, 0x77, 0x05,
+  0x10, 0xc6, 0x46, 0x3d, 0x5c, 0x9d, 0x52, 0x89, 0x51, 0xca, 0xb1, 0x89,
+  0x60, 0x0b, 0xd2, 0x82, 0xc2, 0xcd, 0x8c, 0x6a, 0x4f, 0x00, 0x92, 0xbb,
+  0xe7, 0xb2, 0xe4, 0xdb, 0xa2, 0xc2, 0x5d, 0x10, 0x3f, 0xce, 0x97, 0x7c,
+  0xd7, 0xf4, 0xe3, 0x0d, 0x0d, 0x75, 0x39, 0x4a, 0x4e, 0x30, 0xd8, 0x42,
+  0x7c, 0x9d, 0x1f, 0x5e, 0x7e, 0x8b, 0x40, 0x2b, 0xb6, 0xf0, 0x2b, 0x10,
+  0x9a, 0x58, 0x78, 0x2d, 0xce, 0xce, 0x72, 0x06, 0x9c, 0xe8, 0xbf, 0x46,
+  0x23, 0x68, 0xfa, 0x24, 0x02, 0x79, 0xb9, 0x60, 0x92, 0x66, 0x52, 0xfd,
+  0x12, 0x32, 0xba, 0x51, 0x81, 0x0c, 0x28, 0x78, 0x97, 0x7a, 0xe7, 0xa0,
+  0x97, 0x9b, 0x92, 0xa7, 0xbe, 0x29, 0x63, 0xc2, 0xa6, 0x67, 0x65, 0x8e,
+  0x2d, 0x9e, 0x90, 0xe7, 0x15, 0xbf, 0xe0, 0x44, 0x64, 0x89, 0x45, 0x4d,
+  0x8b, 0x6e, 0x96, 0xbe, 0xe0, 0x48, 0x7f, 0x35, 0x7f, 0x18, 0xc6, 0xfc,
+  0x38, 0xc9, 0xd7, 0xab, 0xba, 0x29, 0x56, 0x5a, 0x6c, 0xb3, 0x4e, 0xb3,
+  0x2c, 0x8b, 0xa2, 0x0e, 0xfa, 0x00, 0xed, 0x27, 0xad, 0xf5, 0x44, 0x0b,
+  0x1d, 0xa3, 0xf4, 0x85, 0x9b, 0x5a, 0xa8, 0xde, 0x1d, 0x2a, 0x86, 0xe9,
+  0xb8, 0x2a, 0x66, 0xab, 0x3a, 0x00, 0x62, 0xff, 0xba, 0x3e, 0x07, 0x9d,
+  0xde, 0x3a, 0x19, 0x1a, 0x35, 0x25, 0x17, 0x2f, 0x26, 0x25, 0x9c, 0x2c,
+  0x7d, 0x52, 0x2f, 0x11, 0x77, 0x2c, 0x8b, 0x45, 0xb3, 0x4c, 0x16, 0x30,
+  0xdf, 0xdb, 0x1b, 0x1b, 0x23, 0x5b, 0x6c, 0x26, 0x07, 0x8d, 0x17, 0xfd,
+  0x07, 0x68, 0x93, 0xdc, 0x07, 0x89, 0x1b, 0x4c, 0xe8, 0x2f, 0x46, 0xcd,
+  0x96, 0xc9, 0x9a, 0x42, 0x84, 0xcb, 0x1a, 0xe7, 0x55, 0x73, 0x50, 0xf8,
+  0x95, 0x8b, 0x5c, 0x58, 0xaa, 0xd9, 0x65, 0x61, 0x94, 0xe5, 0x1a, 0xb9,
+  0xf3, 0x1b, 0xa2, 0x91, 0xac, 0xde, 0xc9, 0xe7, 0xcb, 0x97, 0x80, 0xd5,
+  0x54, 0x75, 0xc8, 0x5c, 0xee, 0xe4, 0xce, 0xff, 0xda, 0x49, 0xfa, 0x89,
+  0x96, 0xbb, 0xee, 0xe0, 0x20, 0xfa, 0x7f, 0x80, 0xc1, 0x52, 0x32, 0x55,
+  0x6e, 0xb3, 0xc5, 0x40, 0x3a, 0x24, 0x13, 0xea, 0xa6, 0x9c, 0xf8, 0xdd,
+  0x4f, 0xda, 0x41, 0x76, 0xcf, 0xf6, 0x8b, 0xd9, 0x08, 0xca, 0xe6, 0x21,
+  0x65, 0x4d, 0x1d, 0x3f, 0x12, 0xd8, 0x30, 0xae, 0x9c, 0x57, 0x8f, 0x2b,
+  0x0c, 0x4a, 0xb9, 0x3d, 0x51, 0xeb, 0x51, 0x6d, 0xc6, 0x22, 0xa8, 0x92,
+  0xf0, 0xee, 0xec, 0xf6, 0x2a, 0xa9, 0x0a, 0xf9, 0xaf, 0xe5, 0x1f, 0x29,
+  0xc6, 0x4b, 0xb7, 0x7f, 0x50, 0xc5, 0x2c, 0x28, 0xff, 0x69, 0xe0, 0x53,
+  0x01, 0xd6, 0x59, 0x64, 0xd2, 0x3a, 0x69, 0x5a, 0x00, 0x07, 0x2e, 0x41,
+  0xc2, 0xa8, 0xc4, 0x20, 0x0c, 0x2a, 0x63, 0xae, 0x58, 0xc9, 0xdf, 0xe6,
+  0xfa, 0x74, 0x66, 0xc9, 0xd8, 0x95, 0x6a, 0x19, 0x1d, 0x1b, 0x61, 0xb5,
+  0x60, 0xe9, 0xbe, 0xde, 0xfd, 0xc8, 0x91, 0x47, 0x90, 0xee, 0x3e, 0x65,
+  0x1a, 0x33, 0xaf, 0x12, 0xd8, 0x90, 0xb4, 0xc2, 0xa5, 0xe0, 0x38, 0x42,
+  0x6c, 0x8a, 0x07, 0x6f, 0x5e, 0x73, 0xc2, 0x87, 0xba, 0xa4, 0x94, 0x6a,
+  0x04, 0xfe, 0xaf, 0x9b, 0x5c, 0x21, 0xa6, 0x32, 0xeb, 0xcd, 0xfa, 0x81,
+  0xf0, 0xf0, 0x31, 0xba, 0xc0, 0x07, 0x58, 0x1d, 0x06, 0x62, 0x18, 0x1f,
+  0x98, 0xa1, 0xe3, 0x00, 0xd5, 0x4b, 0xe4, 0x24, 0x4c, 0x2f, 0x17, 0x40,
+  0x86, 0x83, 0x3d, 0x7f, 0xe2, 0xd7, 0xc3, 0x4f, 0x32, 0x9e, 0x75, 0x91,
+  0x48, 0x2e, 0x89, 0x32, 0xb9, 0xf1, 0x85, 0xb2, 0xbf, 0x07, 0xc3, 0x54,
+  0xe0, 0x1b, 0x60, 0xd5, 0xb4, 0x16, 0x8c, 0xce, 0xac, 0x3d, 0xf9, 0xdb,
+  0x7d, 0x9d, 0x25, 0x97, 0x7c, 0xaf, 0xd1, 0x66, 0xd1, 0x0b, 0x83, 0xb8,
+  0x53, 0xa3, 0x4e, 0x96, 0x24, 0x74, 0x57, 0x75, 0xb9, 0x9a, 0x34, 0x18,
+  0xf4, 0xb0, 0x23, 0x1a, 0x51, 0x7a, 0x37, 0xc7, 0x45, 0x68, 0xdb, 0x9f,
+  0x9c, 0xab, 0x79, 0x2f, 0xd6, 0x07, 0xf7, 0x6c, 0x2b, 0x6d, 0xe4, 0xbb,
+  0xb8, 0x12, 0x8a, 0xe1, 0x77, 0xb7, 0xdd, 0x2e, 0x1b, 0x9c, 0xbb, 0xe4,
+  0xfa, 0x56, 0x21, 0x6c, 0x4e, 0x54, 0x08, 0xee, 0x5e, 0x55, 0xc4, 0xa0,
+  0x78, 0x94, 0x89, 0x52, 0x22, 0x42, 0xad, 0x61, 0x97, 0xe5, 0x86, 0xa3,
+  0x2d, 0xa4, 0x2e, 0x0d, 0x14, 0xb5, 0x2a, 0x81, 0xe0, 0x1d, 0x9a, 0x48,
+  0x2b, 0x84, 0xe2, 0x2a, 0x00, 0x55, 0x9e, 0xfa, 0xb0, 0x05, 0x59, 0x05,
+  0x83, 0x92, 0xd3, 0x0f, 0x95, 0xcb, 0x4d, 0xe7, 0x6f, 0xe8, 0x0a, 0xd3,
+  0xeb, 0x17, 0xda, 0xea, 0x44, 0x7c, 0x37, 0x9e, 0x0b, 0x53, 0x49, 0xb4,
+  0x8f, 0x5e, 0x99, 0x4f, 0x15, 0x22, 0x07, 0x73, 0xc3, 0x96, 0x8d, 0x2d,
+  0x12, 0xcd, 0xab, 0x7d, 0x82, 0xba, 0xc0, 0x23, 0xde, 0x9c, 0x65, 0xbb,
+  0x9b, 0x41, 0x09, 0xa3, 0x2d, 0xc1, 0xff, 0x17, 0xb0, 0x7e, 0x1c, 0x97,
+  0xa0, 0x78, 0x2f, 0x18, 0xe7, 0xb6, 0xdd, 0xd1, 0x15, 0x6a, 0xe2, 0xd7,
+  0x76, 0x66, 0xef, 0xf9, 0xfe, 0x70, 0xef, 0xb3, 0x2f, 0x86, 0xbb, 0xc3,
+  0xbd, 0x5d, 0x96, 0x2f, 0xdc, 0x95, 0xa0, 0x73, 0x32, 0x2f, 0x1d, 0x9f,
+  0x6a, 0xbc, 0x17, 0x7f, 0xf3, 0xed, 0xf1, 0xe5, 0x0f, 0x67, 0x17, 0xdf,
+  0x25, 0x27, 0x6f, 0x2f, 0x8f, 0x2f, 0x5e, 0x1f, 0x1e, 0x7d, 0x2a, 0x3d,
+  0x7a, 0xe8, 0xb6, 0x0e, 0xaa, 0xf8, 0x66, 0x7e, 0x62, 0x62, 0xdf, 0xa0,
+  0x9f, 0xb3, 0xac, 0xbe, 0xd9, 0x3d, 0xd8, 0x7b, 0x94, 0x40, 0xb9, 0xc3,
+  0x3d, 0xe8, 0xdf, 0xb7, 0x41, 0xed, 0xf1, 0xa0, 0xd6, 0xb7, 0xe2, 0x98,
+  0x13, 0x47, 0x02, 0xb3, 0x72, 0x10, 0x5d, 0x88, 0x79, 0x14, 0x89, 0xc9,
+  0xc7, 0x65, 0x6a, 0x8e, 0xa9, 0xb1, 0xb0, 0xb8, 0x4a, 0xa6, 0xad, 0x72,
+  0xc0, 0x28, 0x1c, 0x5d, 0x65, 0xee, 0x86, 0x54, 0xcc, 0xad, 0xd5, 0x9d,
+  0x22, 0xa4, 0xac, 0x53, 0xa8, 0x78, 0x26, 0x95, 0x35, 0x8d, 0x8d, 0x77,
+  0x8b, 0x16, 0x71, 0x14, 0x3e, 0xc0, 0xa9, 0x4b, 0x19, 0x71, 0x84, 0x04,
+  0x40, 0x41, 0x98, 0x9e, 0x8e, 0xbe, 0x36, 0x8b, 0x1e, 0x87, 0x48, 0xda,
+  0x16, 0x23, 0x6a, 0x65, 0x10, 0x67, 0x0c, 0xac, 0xe1, 0x1a, 0x3d, 0xd2,
+  0x8e, 0xe0, 0x34, 0x04, 0xbd, 0x91, 0x4f, 0x41, 0xa1, 0x32, 0x6a, 0xee,
+  0x26, 0x9f, 0xaf, 0xdc, 0x51, 0x48, 0xa3, 0x10, 0xfd, 0xcf, 0x6a, 0x08,
+  0x70, 0xeb, 0x55, 0x83, 0x43, 0x30, 0x91, 0xc2, 0x3d, 0xe1, 0xeb, 0xa2,
+  0x6a, 0x03, 0xa8, 0x39, 0x2d, 0xd3, 0x7b, 0x54, 0x9f, 0xc8, 0x3d, 0x23,
+  0xe8, 0x46, 0xd2, 0xa8, 0x3e, 0xc4, 0x8a, 0x93, 0x9f, 0xf3, 0xe4, 0xfc,
+  0xf8, 0xcd, 0xc0, 0x6a, 0xa6, 0xd2, 0xdf, 0xc5, 0x19, 0x65, 0xf4, 0x8f,
+  0x92, 0xe6, 0xb3, 0xcc, 0x16, 0x06, 0xab, 0x81, 0x4c, 0x54, 0x1c, 0x50,
+  0x38, 0x00, 0x3e, 0x34, 0x8e, 0x20, 0x52, 0xd1, 0xa3, 0x06, 0xbf, 0x74,
+  0x0c, 0xa6, 0x0d, 0xd6, 0x4c, 0x5e, 0x4f, 0xc5, 0x2e, 0x27, 0x5b, 0x0e,
+  0xaf, 0xcb, 0xdf, 0x03, 0x28, 0x15, 0x98, 0x01, 0x07, 0x13, 0x28, 0x2c,
+  0x09, 0xfb, 0xfc, 0xbb, 0xa3, 0xd1, 0x1f, 0xf6, 0xf6, 0xb5, 0x3b, 0xdb,
+  0x43, 0xcf, 0xaf, 0x1b, 0xe5, 0xe7, 0x43, 0x5c, 0x87, 0x7d, 0xb4, 0x6c,
+  0x6b, 0x1c, 0x70, 0x2c, 0xc6, 0x96, 0xcb, 0x11, 0xda, 0x6e, 0x24, 0x09,
+  0x6d, 0x48, 0xe9, 0x6e, 0x53, 0x31, 0x5d, 0x5d, 0x53, 0x0e, 0x89, 0xa0,
+  0xfa, 0x8d, 0xd6, 0x9f, 0xa9, 0x1d, 0xea, 0x2f, 0x5d, 0xd8, 0x8f, 0xa4,
+  0x65, 0x6d, 0x0d, 0xe9, 0xe4, 0x1e, 0xd9, 0xd2, 0x5e, 0x73, 0x9e, 0x6f,
+  0xff, 0x5b, 0xa6, 0x71, 0xd5, 0x9b, 0xdd, 0xf8, 0x7a, 0xfc, 0x67, 0x70,
+  0x00, 0x14, 0xc8, 0x3e, 0xb5, 0x0a, 0x57, 0x0b, 0x5f, 0x74, 0x82, 0x9f,
+  0x3e, 0xa3, 0x85, 0xa2, 0x93, 0x25, 0x14, 0x0e, 0x2c, 0x14, 0x8a, 0x19,
+  0x9b, 0x2e, 0xee, 0x91, 0x57, 0x25, 0x57, 0xf7, 0x58, 0x0a, 0xa4, 0xf4,
+  0xed, 0x30, 0xf9, 0x36, 0x5b, 0x70, 0x0e, 0x3d, 0x83, 0xef, 0x2c, 0x0d,
+  0x0b, 0x10, 0x41, 0x2e, 0xb1, 0x87, 0x92, 0x63, 0xa7, 0x59, 0xaa, 0x94,
+  0x99, 0x24, 0xeb, 0x2a, 0xb1, 0x70, 0xad, 0xdc, 0x4e, 0xca, 0x40, 0x3d,
+  0xe5, 0xf7, 0x74, 0xbc, 0x17, 0xfc, 0x80, 0x34, 0xb0, 0xd5, 0xe4, 0xbd,
+  0x04, 0x81, 0x3e, 0x9a, 0xd3, 0x63, 0x8e, 0x58, 0x93, 0x7a, 0x95, 0x6f,
+  0x40, 0xfe, 0xcc, 0xde, 0x42, 0xb1, 0xb8, 0xbc, 0x50, 0x99, 0x96, 0x37,
+  0xec, 0xfa, 0xa8, 0xe8, 0xba, 0x49, 0x17, 0x93, 0x87, 0xe1, 0x94, 0x74,
+  0x59, 0x76, 0x9e, 0x0d, 0x57, 0xb7, 0x3b, 0xc1, 0x31, 0x65, 0x91, 0x7f,
+  0x23, 0x74, 0x01, 0x4d, 0xc7, 0xb7, 0xd5, 0x72, 0x8d, 0x99, 0xbd, 0xd2,
+  0xc6, 0x99, 0xe0, 0x2d, 0x61, 0x89, 0xff, 0x72, 0x3c, 0xd7, 0x72, 0x60,
+  0x1d, 0x27, 0x8e, 0x77, 0x98, 0x5b, 0x18, 0x2e, 0xb3, 0xf9, 0x81, 0x4b,
+  0x4c, 0x36, 0xf9, 0xa0, 0x35, 0x0c, 0x9c, 0x61, 0x11, 0x38, 0x69, 0x17,
+  0xd9, 0xf5, 0x4c, 0x15, 0x8a, 0xd0, 0x74, 0xf1, 0x3c, 0xd2, 0x71, 0x36,
+  0x88, 0x18, 0x3c, 0xf7, 0xc2, 0xb8, 0x0a, 0x8d, 0x9d, 0xf6, 0x61, 0xad,
+  0xe8, 0x5a, 0x79, 0x18, 0xf5, 0xd4, 0x7d, 0x23, 0x4a, 0x22, 0x02, 0x0a,
+  0x64, 0xd4, 0xcd, 0x16, 0x17, 0x8f, 0x81, 0x92, 0x34, 0xfc, 0xc4, 0x3c,
+  0xad, 0xd8, 0x21, 0x20, 0x1d, 0x57, 0x80, 0x34, 0x82, 0x9f, 0x56, 0x32,
+  0x55, 0xce, 0x0a, 0xfd, 0xfa, 0xee, 0x09, 0x7b, 0xbc, 0x2f, 0x4f, 0x47,
+  0x16, 0x15, 0x59, 0x64, 0xf7, 0xc1, 0xd6, 0x12, 0xa2, 0x7c, 0xdd, 0x7f,
+  0xec, 0x00, 0x12, 0xc6, 0x63, 0x10, 0x1f, 0xa0, 0x27, 0x22, 0x15, 0x7c,
+  0x98, 0xcc, 0xe7, 0x41, 0xd8, 0x24, 0x28, 0xa2, 0x98, 0xbb, 0x62, 0x95,
+  0x9d, 0x44, 0x19, 0x72, 0xa4, 0x2f, 0x4c, 0xad, 0x47, 0xca, 0xd2, 0x93,
+  0x7e, 0x32, 0xd8, 0x07, 0x95, 0xce, 0x5e, 0x73, 0x12, 0xd3, 0x5a, 0x58,
+  0xfc, 0xb8, 0x0d, 0x6a, 0xc9, 0x5a, 0x51, 0x71, 0xb0, 0xa5, 0x5b, 0xfa,
+  0x8e, 0xde, 0xe7, 0xff, 0xec, 0xeb, 0x80, 0xee, 0xf6, 0x00, 0xde, 0x16,
+  0x5a, 0xc9, 0xd9, 0x43, 0xac, 0x32, 0xec, 0x3f, 0xba, 0xaa, 0x48, 0x93,
+  0xb8, 0xcf, 0x1d, 0xbf, 0xb3, 0x50, 0xfc, 0xc3, 0x15, 0xaa, 0x8c, 0x9d,
+  0xd6, 0x01, 0x9a, 0x42, 0x75, 0x72, 0x2f, 0x92, 0xbb, 0x7d, 0x8b, 0x35,
+  0xf3, 0x6f, 0x6c, 0xde, 0xc4, 0x59, 0xef, 0x85, 0x48, 0x94, 0xc1, 0xc8,
+  0x80, 0xb7, 0x60, 0xd7, 0x72, 0x02, 0x14, 0xed, 0x59, 0x92, 0x22, 0x0d,
+  0x29, 0x53, 0x2c, 0xd4, 0xad, 0x20, 0xd9, 0xef, 0xe9, 0x42, 0x16, 0x83,
+  0xf4, 0x60, 0x0f, 0x73, 0x02, 0x08, 0x3c, 0x00, 0x47, 0x9e, 0x2c, 0x5c,
+  0xce, 0x84, 0xba, 0xf2, 0xc1, 0xa0, 0x87, 0xe5, 0xbf, 0xc9, 0xc5, 0x31,
+  0x01, 0xd8, 0x29, 0xae, 0x73, 0x3a, 0xf9, 0x9b, 0x09, 0x1d, 0xa6, 0x15,
+  0x4b, 0xfc, 0xda, 0x95, 0x99, 0x1a, 0x09, 0xf3, 0xe6, 0x66, 0x28, 0xe6,
+  0x06, 0x5f, 0xf2, 0x50, 0xaa, 0x4d, 0x3f, 0x76, 0x25, 0x1e, 0x6f, 0x0e,
+  0x44, 0xe3, 0x1c, 0x56, 0x58, 0xe9, 0xbc, 0xb4, 0xfa, 0xd1, 0x9b, 0xc7,
+  0x1f, 0x58, 0xc7, 0xd9, 0xd4, 0x2f, 0xc9, 0xaf, 0x25, 0xbd, 0x1f, 0x73,
+  0x74, 0x7e, 0xf2, 0x56, 0x2a, 0x22, 0xbb, 0xb3, 0x90, 0x31, 0x33, 0xe2,
+  0x86, 0x14, 0xf3, 0x46, 0x7f, 0x52, 0xa5, 0x90, 0x48, 0xc4, 0x71, 0xc4,
+  0x7b, 0x86, 0xf7, 0x78, 0xae, 0xdf, 0xba, 0x58, 0xc9, 0xd7, 0x37, 0xf9,
+  0x9e, 0xab, 0xaa, 0xd9, 0x66, 0xab, 0xca, 0xa7, 0x5b, 0x93, 0xd6, 0x85,
+  0xe2, 0x3c, 0x52, 0x93, 0x69, 0x58, 0x23, 0x5d, 0x5b, 0x69, 0xc8, 0xb9,
+  0x7e, 0x2b, 0xe9, 0x31, 0x74, 0x85, 0xff, 0x21, 0x19, 0xee, 0xd0, 0x07,
+  0xab, 0x1d, 0x7b, 0x71, 0x79, 0x3b, 0xa9, 0xe8, 0x86, 0xe3, 0x0c, 0xdf,
+  0x9f, 0x1c, 0x3b, 0x3c, 0xf7, 0x78, 0xfa, 0x4b, 0x32, 0x98, 0xcc, 0x30,
+  0xbe, 0x04, 0xf5, 0x84, 0x7f, 0xa2, 0x95, 0xe7, 0x27, 0x7e, 0x71, 0x6b,
+  0xf8, 0x3a, 0xe7, 0xf3, 0xf6, 0xa1, 0x6f, 0x43, 0x3f, 0x13, 0x83, 0x41,
+  0xe8, 0x67, 0x93, 0xc3, 0xe9, 0x1d, 0xe7, 0xdf, 0x4d, 0xf5, 0x9f, 0x3c,
+  0x9e, 0xe3, 0x05, 0x2a, 0x31, 0x62, 0xa4, 0xe9, 0x58, 0x8a, 0x2f, 0x7f,
+  0x9f, 0x93, 0xd1, 0x71, 0xd4, 0xd2, 0x2f, 0x38, 0x15, 0x90, 0x3b, 0x88,
+  0xb7, 0x82, 0x5f, 0x5a, 0x5e, 0x47, 0x5f, 0xd3, 0x17, 0x3c, 0xf2, 0x8f,
+  0xa5, 0x33, 0x2f, 0xdd, 0x30, 0xf9, 0x9a, 0x63, 0x9c, 0x65, 0x16, 0x90,
+  0xb3, 0xea, 0xc5, 0x27, 0x15, 0xcb, 0x78, 0x31, 0x52, 0xa1, 0xa2, 0x18,
+  0xba, 0x91, 0x44, 0xe9, 0x30, 0x6e, 0x4c, 0xee, 0x37, 0xcd, 0xc1, 0xa1,
+  0x5f, 0x96, 0xdd, 0x4e, 0x43, 0xb1, 0xd4, 0x89, 0x24, 0x1a, 0x4a, 0x40,
+  0x1b, 0x29, 0x3d, 0x94, 0x0b, 0x73, 0x9a, 0x59, 0x8e, 0x7f, 0x11, 0x12,
+  0xab, 0x98, 0xe7, 0x18, 0x4d, 0x99, 0x46, 0xe0, 0xb6, 0x04, 0xee, 0x70,
+  0xdf, 0xeb, 0xa3, 0x1b, 0x12, 0xcd, 0x99, 0xeb, 0xea, 0x48, 0x5c, 0x7a,
+  0xd6, 0xc5, 0x11, 0xdf, 0x51, 0xb6, 0x08, 0xee, 0x97, 0x96, 0x28, 0x09,
+  0x2d, 0x74, 0x47, 0x64, 0x97, 0xdb, 0xbb, 0x32, 0xbb, 0xcd, 0x21, 0x70,
+  0x7e, 0xe3, 0xe8, 0xdd, 0x1b, 0x2e, 0xc4, 0x81, 0x02, 0xbd, 0x97, 0x17,
+  0x87, 0x6f, 0x47, 0xaf, 0xc5, 0x35, 0x7e, 0x59, 0x04, 0x75, 0x7f, 0x35,
+  0xae, 0x60, 0xf1, 0x63, 0xc7, 0x18, 0x77, 0x2f, 0xd5, 0x21, 0x0c, 0x5a,
+  0xaf, 0x45, 0x81, 0xfb, 0x6d, 0x16, 0x7c, 0xa9, 0x28, 0xcc, 0xb3, 0xc1,
+  0x5d, 0xdb, 0x1a, 0x6d, 0x3b, 0x45, 0xa8, 0x0a, 0x2b, 0x60, 0xf9, 0xc2,
+  0xdc, 0x46, 0xdc, 0xac, 0x0f, 0xf1, 0xb4, 0x1c, 0x59, 0x67, 0xec, 0xa7,
+  0x72, 0xf7, 0xae, 0xe5, 0x0a, 0x3d, 0x22, 0x53, 0x71, 0xa0, 0x75, 0x55,
+  0x82, 0x7a, 0x5f, 0xce, 0x9d, 0x2a, 0x77, 0xaf, 0xb2, 0xfa, 0xb9, 0xc6,
+  0xc3, 0x14, 0x50, 0x6b, 0x7a, 0xeb, 0xdf, 0xf6, 0xb6, 0xbb, 0x9b, 0xbf,
+  0xfc, 0xb5, 0xcd, 0x77, 0xf7, 0xdd, 0x6c, 0x33, 0x9f, 0x5d, 0xb4, 0xf5,
+  0x6f, 0xfb, 0xdb, 0x8f, 0x8e, 0x28, 0x4c, 0x90, 0xf4, 0xdf, 0xa4, 0x37,
+  0xb8, 0xb3, 0xc9, 0x4b, 0x2b, 0xf3, 0xae, 0x3a, 0x93, 0x43, 0xe8, 0x04,
+  0x74, 0xc0, 0x0d, 0xee, 0x0e, 0x46, 0x70, 0x3b, 0x4d, 0xdd, 0x07, 0xde,
+  0x34, 0xd1, 0xe4, 0xe4, 0x7f, 0x1c, 0x87, 0x2c, 0x8f, 0x8b, 0xcd, 0x3a,
+  0xbc, 0xa2, 0x98, 0x28, 0xa0, 0x2a, 0x86, 0xf8, 0xf6, 0xfe, 0x23, 0xdf,
+  0xf6, 0xa3, 0x0b, 0xdc, 0x12, 0x1c, 0xc5, 0x66, 0x18, 0x9c, 0x91, 0x55,
+  0xeb, 0x77, 0x36, 0x7c, 0x41, 0xe9, 0xf5, 0xdf, 0xbb, 0x3c, 0x79, 0x73,
+  0xcc, 0xa4, 0xd6, 0xaf, 0x4e, 0x98, 0x87, 0x6e, 0xa4, 0x4c, 0x90, 0xe6,
+  0x81, 0x70, 0x84, 0xb9, 0x61, 0x75, 0x14, 0x09, 0xef, 0x3a, 0xb4, 0x99,
+  0x93, 0x1c, 0x6e, 0x25, 0xf8, 0xd3, 0x0a, 0x87, 0xae, 0x2c, 0xe9, 0xf2,
+  0xe4, 0x6a, 0xf0, 0xa6, 0x98, 0xc2, 0x4a, 0x1e, 0x8c, 0x00, 0x15, 0xa4,
+  0xb7, 0xe8, 0x87, 0xef, 0x16, 0xf3, 0xc6, 0x8f, 0x87, 0x1d, 0x49, 0xbb,
+  0x1b, 0xeb, 0x4a, 0xc8, 0xfc, 0x7d, 0x67, 0x30, 0x40, 0x39, 0x77, 0x81,
+  0x75, 0x69, 0x70, 0xa7, 0x41, 0xd5, 0x61, 0xa2, 0x85, 0x26, 0x28, 0x9f,
+  0x3d, 0x08, 0x10, 0x21, 0xf5, 0xf0, 0x31, 0x9f, 0xc8, 0x79, 0xcd, 0xc9,
+  0x64, 0xde, 0xc5, 0x27, 0x4e, 0xbc, 0x8d, 0x90, 0x5b, 0x14, 0x86, 0x54,
+  0x76, 0xef, 0xf1, 0x4f, 0x5a, 0x9d, 0xb6, 0x58, 0x3e, 0x60, 0x94, 0xf7,
+  0x0d, 0x68, 0x45, 0x67, 0x7c, 0xf5, 0xef, 0xf2, 0x4e, 0xa3, 0x68, 0x92,
+  0x52, 0x40, 0x07, 0x3b, 0x50, 0x7f, 0xa2, 0x35, 0x86, 0xce, 0xca, 0xe0,
+  0xba, 0xd2, 0x6e, 0x5b, 0x2d, 0xb1, 0x80, 0x77, 0x34, 0xa0, 0x49, 0x6d,
+  0xf6, 0x33, 0xe4, 0x68, 0x2d, 0x38, 0x0b, 0xf6, 0x55, 0xe1, 0x82, 0x63,
+  0x24, 0x76, 0x96, 0xcd, 0xfa, 0xaf, 0x59, 0x62, 0xf9, 0xde, 0x92, 0xce,
+  0xbf, 0x39, 0xd8, 0x44, 0xd9, 0x84, 0x7c, 0xd1, 0x31, 0x98, 0xc1, 0xaf,
+  0x1f, 0x4d, 0x14, 0x7a, 0x4d, 0x7a, 0x57, 0xcc, 0x89, 0xc1, 0x71, 0xac,
+  0x9e, 0x74, 0x40, 0x28, 0x63, 0x64, 0x73, 0xd1, 0x05, 0xc1, 0x72, 0xcd,
+  0x0c, 0x49, 0x31, 0xaa, 0x1d, 0x32, 0xd6, 0x39, 0xc9, 0xc5, 0x2b, 0xc9,
+  0x82, 0x74, 0xb5, 0x9c, 0x02, 0x94, 0x21, 0x70, 0xd4, 0xff, 0xc6, 0x9c,
+  0xd5, 0xe5, 0x43, 0xb2, 0xb7, 0xdf, 0x4f, 0xf6, 0x77, 0xf7, 0xf6, 0x3b,
+  0xc6, 0xd0, 0xfb, 0x6f, 0x0c, 0x8a, 0xda, 0xc7, 0xaf, 0x7b, 0x9f, 0x3a,
+  0x0a, 0x9f, 0xda, 0x80, 0x9b, 0x44, 0x93, 0x80, 0x49, 0xf8, 0x70, 0x7c,
+  0x56, 0x0a, 0xd8, 0x73, 0x51, 0x58, 0x30, 0xdb, 0xe1, 0xda, 0x12, 0x27,
+  0xa1, 0x15, 0x34, 0x74, 0x85, 0xae, 0xf8, 0x89, 0x0d, 0xad, 0xcb, 0x09,
+  0xe4, 0x8b, 0xf3, 0x94, 0xa6, 0x25, 0xaa, 0x35, 0x36, 0xd7, 0x28, 0xaf,
+  0x6d, 0x59, 0x18, 0x5a, 0xc3, 0x6b, 0x43, 0xfb, 0xfd, 0xd5, 0xc9, 0xd1,
+  0xa5, 0x51, 0x1f, 0x5e, 0xb1, 0xf2, 0x54, 0x3e, 0x7c, 0x5a, 0xe9, 0xbb,
+  0x47, 0x9f, 0x99, 0x1e, 0xdc, 0x64, 0xa4, 0x46, 0x2f, 0xc6, 0xab, 0xeb,
+  0x83, 0xbf, 0xa6, 0xe5, 0x75, 0xb1, 0xf8, 0xd8, 0xf3, 0x53, 0xe4, 0x96,
+  0x1d, 0x90, 0x84, 0xda, 0x7b, 0xbe, 0xf7, 0x44, 0x12, 0x17, 0x72, 0xae,
+  0x93, 0x09, 0x01, 0xb1, 0x39, 0xdf, 0x14, 0xae, 0x0d, 0x64, 0x4c, 0x38,
+  0x82, 0x8d, 0xc5, 0x74, 0x53, 0xae, 0xfb, 0x34, 0x7c, 0x76, 0xaa, 0xcf,
+  0x4a, 0x16, 0xfa, 0xe6, 0x86, 0x94, 0x2e, 0xd9, 0xe4, 0x8c, 0xcd, 0xd5,
+  0x72, 0xb3, 0xc9, 0xe0, 0xfe, 0x91, 0xb1, 0xf2, 0x27, 0x5c, 0xa5, 0xbf,
+  0x23, 0xc7, 0x4b, 0x8f, 0x64, 0xa2, 0x32, 0x4b, 0x6f, 0x7d, 0x95, 0x58,
+  0x4f, 0xc4, 0x61, 0x21, 0x8f, 0x8b, 0xd7, 0x47, 0x42, 0x66, 0x6a, 0xa9,
+  0x53, 0x98, 0xea, 0xc4, 0xb9, 0xa6, 0xb6, 0xb9, 0x97, 0x1f, 0xf9, 0x3e,
+  0xe7, 0x36, 0x1c, 0x4c, 0xc7, 0x9f, 0xf0, 0x10, 0x9d, 0x3b, 0xe1, 0x8d,
+  0x3b, 0x6c, 0x16, 0xc4, 0x61, 0x43, 0x0d, 0xe5, 0x3d, 0xac, 0x24, 0xec,
+  0x96, 0x94, 0xfd, 0x94, 0x88, 0x03, 0x77, 0xcd, 0x0a, 0xed, 0x9a, 0x77,
+  0x87, 0xfa, 0xcd, 0x25, 0x35, 0x5f, 0x1d, 0x9e, 0x07, 0x86, 0x2e, 0x0c,
+  0x49, 0xef, 0xd4, 0xe3, 0xe7, 0xd8, 0xd0, 0x41, 0xc5, 0x69, 0xf1, 0xfd,
+  0x3d, 0xf4, 0xbd, 0x89, 0x52, 0x43, 0x4e, 0xb2, 0x6e, 0x04, 0x80, 0x7c,
+  0xa1, 0xf7, 0x09, 0xfc, 0x4f, 0x28, 0x36, 0x30, 0x9b, 0xa6, 0x08, 0x84,
+  0xea, 0x2d, 0x04, 0x9d, 0x0b, 0x6d, 0xe5, 0x8a, 0x86, 0xa2, 0xb5, 0xf9,
+  0x90, 0x68, 0x12, 0x87, 0x66, 0xab, 0x68, 0x39, 0x10, 0x3c, 0xc6, 0x09,
+  0xca, 0x0f, 0x36, 0x00, 0x91, 0xcf, 0xd4, 0xf9, 0xb4, 0xba, 0x25, 0x51,
+  0x2a, 0x01, 0x7c, 0xfa, 0x7a, 0xae, 0x21, 0x70, 0x76, 0xfa, 0xe4, 0x02,
+  0xa4, 0x61, 0xf7, 0x13, 0x28, 0x91, 0x1a, 0x0b, 0x26, 0x57, 0x10, 0x5b,
+  0x9c, 0xb3, 0x2a, 0x13, 0x02, 0xc3, 0xe4, 0xf2, 0xbe, 0x10, 0x13, 0xa3,
+  0x32, 0x78, 0xad, 0x40, 0x51, 0xab, 0x55, 0x2e, 0x5a, 0x24, 0x2d, 0x1e,
+  0xe4, 0x41, 0x50, 0xb3, 0xb3, 0xe7, 0x3c, 0x5f, 0xaf, 0x5c, 0xdc, 0x73,
+  0xf4, 0xea, 0xbb, 0x84, 0x53, 0xeb, 0xf9, 0x1b, 0x47, 0x4c, 0xb7, 0xcf,
+  0x10, 0x86, 0x39, 0xac, 0xbf, 0x6f, 0x56, 0x7c, 0xde, 0x8f, 0x6e, 0xd2,
+  0x25, 0x1b, 0x40, 0x7b, 0xbb, 0xec, 0x2e, 0xf9, 0xc1, 0x92, 0xf4, 0xf8,
+  0xa0, 0x5a, 0x3d, 0xef, 0xaa, 0x17, 0x78, 0x52, 0xa6, 0x5c, 0x8e, 0x9b,
+  0x2d, 0xa0, 0xa6, 0x93, 0x96, 0xae, 0xcf, 0x6a, 0x47, 0x48, 0xf6, 0x2b,
+  0xda, 0x1a, 0x65, 0x35, 0xbd, 0xdd, 0x99, 0xd0, 0x1f, 0x4f, 0x76, 0x77,
+  0xc0, 0xa9, 0x59, 0xc3, 0xa7, 0xc9, 0x7b, 0x72, 0x7f, 0xff, 0xd9, 0xb3,
+  0x7e, 0xd2, 0x63, 0x2f, 0xa3, 0x7d, 0x80, 0x8f, 0x04, 0x9d, 0xac, 0x5e,
+  0x57, 0xf1, 0xd2, 0x9d, 0xf2, 0x6a, 0xc2, 0xff, 0xc7, 0xaf, 0x59, 0x09,
+  0xc2, 0x4b, 0xcd, 0xba, 0xc1, 0x3c, 0x2c, 0x42, 0x9a, 0x1c, 0xd9, 0x56,
+  0xfc, 0xbb, 0x13, 0xe7, 0x47, 0xe2, 0xa0, 0xd1, 0x32, 0x2b, 0x96, 0x16,
+  0x1d, 0x9e, 0x6b, 0xf9, 0x0e, 0x7c, 0x3e, 0x08, 0xa9, 0x21, 0x9e, 0x2f,
+  0x70, 0x38, 0xe5, 0x43, 0xa8, 0x56, 0xe3, 0x81, 0x26, 0x06, 0x8b, 0x55,
+  0x99, 0xd3, 0xc9, 0xa5, 0x7f, 0xce, 0xcc, 0x5d, 0x1f, 0x49, 0xe4, 0xaf,
+  0x93, 0x9e, 0xee, 0x2d, 0xfe, 0xcf, 0x10, 0xc1, 0xdd, 0x6c, 0xc2, 0xc3,
+  0x28, 0x5e, 0xea, 0x3f, 0xfe, 0xfd, 0xdf, 0xa9, 0xd9, 0x7f, 0xe7, 0x56,
+  0x5e, 0xfe, 0x5b, 0x55, 0xdf, 0x04, 0xcf, 0xf4, 0x74, 0xc3, 0x9f, 0xf8,
+  0xd0, 0x36, 0xe0, 0x6a, 0x60, 0x9c, 0x45, 0xfe, 0xda, 0x9b, 0x53, 0x95,
+  0xc8, 0xfd, 0x60, 0x7c, 0x39, 0x32, 0x0b, 0xc5, 0x49, 0xea, 0xd0, 0x22,
+  0x5f, 0x73, 0xd8, 0x39, 0xe3, 0x8c, 0x74, 0xba, 0x48, 0x40, 0x28, 0xb8,
+  0x6d, 0x2a, 0xc6, 0xf1, 0xdb, 0xef, 0x4f, 0x2e, 0xce, 0xde, 0xbe, 0x39,
+  0x7e, 0x7b, 0x99, 0x7c, 0x7f, 0x78, 0x71, 0x72, 0xf8, 0xf5, 0xa9, 0x26,
+  0xbe, 0xf3, 0x10, 0x18, 0xe4, 0x23, 0xba, 0x77, 0x8b, 0x10, 0x36, 0x48,
+  0x44, 0xea, 0x2c, 0xed, 0xd1, 0xaa, 0x41, 0xfb, 0x5e, 0x19, 0xc6, 0x61,
+  0x89, 0xbc, 0x47, 0x95, 0xa2, 0x3e, 0x2b, 0x9f, 0xef, 0xad, 0x60, 0x11,
+  0x1b, 0x4f, 0x0f, 0x41, 0x2a, 0x35, 0xe3, 0x8f, 0x78, 0x97, 0x9a, 0x7c,
+  0xf2, 0x95, 0xeb, 0x5c, 0xed, 0x8b, 0x6f, 0x24, 0x1b, 0xdf, 0x0a, 0x81,
+  0xd8, 0xab, 0x9a, 0x19, 0x06, 0xbf, 0x9b, 0xeb, 0xc3, 0xe1, 0xe9, 0xa9,
+  0xff, 0xd4, 0xe3, 0x35, 0x62, 0x94, 0x89, 0x49, 0x92, 0xb7, 0xd0, 0x28,
+  0x07, 0x06, 0xaf, 0x0b, 0x4f, 0x97, 0xbe, 0x78, 0x08, 0x99, 0xd1, 0xf9,
+  0x63, 0xb4, 0x1c, 0x5b, 0x42, 0xa1, 0xc1, 0x51, 0x62, 0x3a, 0x40, 0x79,
+  0x75, 0xdb, 0x4f, 0x36, 0xff, 0x6d, 0x53, 0x92, 0xea, 0x32, 0xf0, 0x06,
+  0x4b, 0x05, 0x9a, 0x6d, 0xdf, 0xa9, 0xb7, 0x67, 0xbe, 0x4f, 0x1a, 0xf8,
+  0x74, 0x1d, 0x70, 0x2f, 0xfa, 0xb0, 0x75, 0x65, 0xfa, 0x0c, 0xf0, 0xa2,
+  0xfe, 0x71, 0x2d, 0xd3, 0xe0, 0x98, 0x01, 0x74, 0x8f, 0x72, 0x60, 0xab,
+  0xf3, 0x5d, 0x58, 0x6d, 0xe9, 0x24, 0xa0, 0x87, 0xc6, 0x58, 0x17, 0xec,
+  0xea, 0x70, 0xa5, 0xb3, 0xcc, 0x1b, 0x48, 0x53, 0xcd, 0x3e, 0x3d, 0x0d,
+  0x27, 0xae, 0x2a, 0x95, 0xa0, 0xd8, 0x55, 0x1f, 0x76, 0xac, 0x12, 0x0d,
+  0x62, 0x8c, 0x9c, 0x0f, 0x50, 0xe6, 0x53, 0xa5, 0x1b, 0xec, 0xdc, 0x15,
+  0x43, 0x84, 0xa6, 0x2e, 0x8e, 0xc0, 0xce, 0xbe, 0xe0, 0x12, 0x82, 0xbe,
+  0xd2, 0x05, 0xb0, 0xc3, 0x24, 0x45, 0x4a, 0x4e, 0xc8, 0x5b, 0xa8, 0x12,
+  0x02, 0x3c, 0x2e, 0x74, 0xf4, 0xf4, 0xba, 0x30, 0xfd, 0x3b, 0x75, 0x41,
+  0x73, 0x57, 0x0f, 0x2c, 0xd0, 0xe9, 0x1d, 0x87, 0x98, 0x73, 0x59, 0x22,
+  0xbc, 0x6e, 0x01, 0x02, 0x86, 0x97, 0xf1, 0x92, 0x5b, 0xb9, 0xde, 0x2a,
+  0xc8, 0xd2, 0xf6, 0xd9, 0x0b, 0x2c, 0x4b, 0x04, 0xa4, 0x6f, 0xa4, 0x5e,
+  0x20, 0x52, 0xb3, 0xac, 0x6e, 0x00, 0x1d, 0xd1, 0x2d, 0x7e, 0x10, 0x4d,
+  0x2a, 0x66, 0x15, 0x4d, 0x9a, 0xef, 0x9a, 0x4e, 0xcf, 0x8c, 0x13, 0xc8,
+  0x4c, 0x12, 0xa5, 0xc9, 0x38, 0xbf, 0x16, 0x76, 0x00, 0x4e, 0x45, 0xe7,
+  0x5d, 0x02, 0xb2, 0x37, 0x32, 0xec, 0x79, 0xa9, 0x40, 0xe5, 0x06, 0xdd,
+  0xfd, 0xa6, 0x98, 0x85, 0x7c, 0x63, 0x36, 0x92, 0x4a, 0x2b, 0x9d, 0x99,
+  0xeb, 0x13, 0xa1, 0x8f, 0x15, 0xcf, 0xa3, 0xa1, 0xd1, 0x94, 0xa8, 0x5c,
+  0xb1, 0x79, 0xec, 0x53, 0x07, 0x6b, 0xe2, 0x02, 0x99, 0x40, 0x96, 0x55,
+  0x8d, 0x79, 0x30, 0xdc, 0x32, 0x4b, 0x0b, 0xf8, 0xd1, 0xb8, 0x5e, 0xe1,
+  0x96, 0x63, 0x1a, 0xe7, 0x56, 0x26, 0xc2, 0xd5, 0xca, 0x9b, 0x5e, 0x22,
+  0xca, 0xcd, 0x72, 0x3d, 0xba, 0x58, 0xca, 0xa2, 0x45, 0x7b, 0x82, 0x3b,
+  0x4d, 0x33, 0xb5, 0x15, 0x08, 0x9e, 0x05, 0x6d, 0x11, 0x79, 0x4c, 0x0c,
+  0x48, 0xfd, 0xd7, 0xc0, 0x55, 0x1a, 0xd3, 0xb8, 0xf3, 0xb6, 0xc7, 0x1d,
+  0x88, 0x16, 0xc0, 0xbb, 0x75, 0xa2, 0x25, 0x11, 0x11, 0xa1, 0xe7, 0xba,
+  0x8d, 0xa0, 0x86, 0x6a, 0xf8, 0x1e, 0x13, 0xcb, 0xb7, 0x99, 0xcd, 0x02,
+  0xaa, 0x71, 0x71, 0x47, 0xa4, 0x91, 0xee, 0xc1, 0xc1, 0x21, 0x49, 0x43,
+  0x55, 0xe4, 0x8f, 0xd0, 0x12, 0x07, 0x03, 0x51, 0x4c, 0x39, 0x6b, 0x67,
+  0x2d, 0x97, 0x66, 0x20, 0xd0, 0x2c, 0x3a, 0x1e, 0x5e, 0x4c, 0x5a, 0xed,
+  0x22, 0x4f, 0xe7, 0xa2, 0x3b, 0xfa, 0xdd, 0x37, 0x7f, 0x10, 0xd4, 0xe1,
+  0xc6, 0xc6, 0xd1, 0xbb, 0xd1, 0xe5, 0xd9, 0x9b, 0xe4, 0xec, 0xdd, 0xe5,
+  0xf9, 0xbb, 0x4b, 0xbd, 0xb9, 0xc6, 0x82, 0xd9, 0x16, 0xe4, 0x82, 0x28,
+  0x01, 0xb6, 0x98, 0x73, 0x8d, 0xef, 0x03, 0x62, 0x52, 0x80, 0x60, 0x30,
+  0xe0, 0x16, 0x72, 0x39, 0x59, 0x60, 0xdd, 0x12, 0xe6, 0x62, 0x4c, 0xf9,
+  0x3d, 0x4d, 0x39, 0xf2, 0x69, 0xe1, 0xc8, 0xb3, 0x14, 0x2f, 0x98, 0x3d,
+  0x76, 0xd6, 0x9a, 0x95, 0x64, 0x5a, 0x85, 0x30, 0x11, 0x9c, 0x6f, 0x72,
+  0x39, 0x79, 0x1c, 0x95, 0xf9, 0x76, 0xbc, 0xeb, 0x27, 0x84, 0x74, 0x02,
+  0xcc, 0x34, 0xa9, 0xcd, 0x01, 0x6d, 0xa8, 0x5a, 0x40, 0x8d, 0x9a, 0x89,
+  0x85, 0x61, 0x7e, 0x63, 0x5d, 0xd0, 0x08, 0x6f, 0x1c, 0x22, 0x9e, 0x51,
+  0x44, 0x40, 0x02, 0x0a, 0x80, 0x82, 0x21, 0x77, 0x62, 0x31, 0x90, 0x1d,
+  0xc8, 0x21, 0x8b, 0xe8, 0x96, 0xbd, 0x4f, 0x36, 0x7f, 0xc8, 0xc2, 0x06,
+  0xff, 0xf8, 0x1f, 0x9c, 0xb6, 0xf9, 0xde, 0x7e, 0xf2, 0x9f, 0xf2, 0xc9,
+  0x9f, 0x17, 0x9b, 0x00, 0xd0, 0x35, 0x23, 0xe5, 0xdf, 0x1d, 0x5f, 0x7c,
+  0x7d, 0x7c, 0x71, 0x36, 0x82, 0x3c, 0x30, 0x77, 0x57, 0xbc, 0xd7, 0x6f,
+  0xb3, 0x72, 0x9c, 0x95, 0x85, 0x56, 0xb9, 0xb2, 0x7f, 0x3d, 0xdb, 0xf9,
+  0x66, 0x34, 0x3a, 0x3c, 0x3f, 0x71, 0x75, 0x64, 0x5c, 0x02, 0x99, 0x98,
+  0x48, 0x0b, 0x49, 0x71, 0xe4, 0xf1, 0xdb, 0x2b, 0xb4, 0x2f, 0x26, 0xb7,
+  0x02, 0x2c, 0x8e, 0x62, 0xd2, 0xe6, 0x57, 0xe7, 0x60, 0xb4, 0xe6, 0x15,
+  0x72, 0xc3, 0xc6, 0x09, 0x15, 0xf2, 0xce, 0x0b, 0x41, 0x3c, 0xc7, 0x02,
+  0xfa, 0x0e, 0x81, 0x77, 0x5b, 0x8e, 0x07, 0xb4, 0xdb, 0x6f, 0xad, 0xca,
+  0xb0, 0xe4, 0x41, 0x90, 0xa8, 0x14, 0x80, 0xb4, 0xf7, 0x35, 0xdc, 0x72,
+  0xc1, 0xf1, 0x9d, 0x5b, 0x3e, 0x1f, 0x5c, 0xe3, 0x64, 0x36, 0x14, 0xe9,
+  0x2e, 0x07, 0xca, 0x50, 0xaf, 0x2c, 0x62, 0x1f, 0xe3, 0xa9, 0xa0, 0xaf,
+  0xb9, 0xc2, 0x84, 0xe2, 0xef, 0xa2, 0x9f, 0x3c, 0x75, 0x84, 0x5d, 0x61,
+  0x2d, 0xea, 0x2b, 0x52, 0xc0, 0x97, 0xf7, 0x53, 0xbd, 0x44, 0xc0, 0x57,
+  0xbd, 0x90, 0xf0, 0x84, 0xc8, 0xf0, 0x76, 0x80, 0x8a, 0x8b, 0x27, 0x22,
+  0x61, 0x43, 0xe1, 0xe8, 0xc9, 0x78, 0x96, 0x2e, 0x6e, 0x71, 0x9b, 0xe1,
+  0x7e, 0x62, 0x93, 0xd3, 0x68, 0xa8, 0xb8, 0xa8, 0x25, 0xe2, 0x91, 0xca,
+  0x0c, 0x01, 0x25, 0x70, 0xc6, 0xc2, 0xed, 0x41, 0x7c, 0xf9, 0x8e, 0x6d,
+  0x2b, 0x88, 0xbc, 0xe1, 0x38, 0xf9, 0x49, 0x60, 0xd7, 0xd1, 0xf1, 0x29,
+  0x5d, 0x4c, 0x2e, 0xc9, 0x04, 0x26, 0x7a, 0x36, 0x63, 0x57, 0xb0, 0x21,
+  0x82, 0x24, 0xaf, 0x32, 0x87, 0x20, 0x13, 0xe9, 0x61, 0x54, 0xea, 0x88,
+  0x1f, 0x61, 0xbb, 0x20, 0x7d, 0xb4, 0x72, 0x05, 0x47, 0x54, 0x72, 0x8b,
+  0x10, 0x03, 0x4f, 0xa8, 0xaf, 0x3f, 0x12, 0x56, 0xa7, 0x51, 0xb8, 0xdd,
+  0x91, 0xc7, 0x03, 0xb9, 0x72, 0x5d, 0xd2, 0x09, 0xaf, 0x96, 0xba, 0x08,
+  0x63, 0x23, 0xbb, 0x65, 0xed, 0x32, 0xc9, 0xeb, 0x5d, 0x4e, 0x00, 0xa1,
+  0x37, 0x9b, 0x6a, 0xbc, 0xc3, 0x31, 0x03, 0x19, 0x64, 0xb9, 0x09, 0x13,
+  0xb6, 0x8e, 0x0b, 0x1a, 0x80, 0x9d, 0xb7, 0xb3, 0xda, 0x82, 0x86, 0x80,
+  0xb8, 0xea, 0x0d, 0x5c, 0x4f, 0x21, 0x72, 0xca, 0x06, 0x69, 0x6d, 0x88,
+  0xce, 0x15, 0xf2, 0x0a, 0xf8, 0x06, 0x25, 0x5f, 0x03, 0x56, 0x8c, 0xd3,
+  0x6f, 0x07, 0x6f, 0xf9, 0xba, 0x28, 0x06, 0xe3, 0x15, 0xec, 0xb2, 0xa0,
+  0x8c, 0x96, 0xe4, 0x70, 0x72, 0xbd, 0x79, 0xf0, 0xaa, 0xe1, 0xf7, 0x1c,
+  0x8f, 0x42, 0x76, 0xbc, 0x84, 0xa8, 0x90, 0x2e, 0xd9, 0xe4, 0xdc, 0x71,
+  0x4c, 0x2b, 0x92, 0x83, 0x00, 0x2c, 0xb6, 0x15, 0x5e, 0x93, 0x1e, 0xea,
+  0x22, 0x3b, 0xb4, 0xe0, 0x42, 0x6b, 0xaf, 0x22, 0xb2, 0xd2, 0x44, 0x5c,
+  0xd7, 0x8e, 0xfa, 0xfe, 0x12, 0x6a, 0x42, 0xa6, 0x84, 0xf0, 0x06, 0xa5,
+  0xb6, 0xc4, 0x8d, 0xbb, 0x9a, 0x0b, 0x3f, 0x09, 0x49, 0x44, 0x3a, 0x93,
+  0x8a, 0x1d, 0x6b, 0xaf, 0x12, 0x39, 0x4c, 0xf5, 0xe5, 0xe5, 0x5f, 0xce,
+  0x8f, 0x5f, 0xda, 0x9b, 0x8f, 0xad, 0x99, 0x70, 0xa7, 0x01, 0x33, 0x93,
+  0x29, 0x57, 0x69, 0x50, 0xc9, 0x99, 0x36, 0xd9, 0xa0, 0xb6, 0x58, 0xbe,
+  0x7c, 0x66, 0x90, 0xfc, 0xf8, 0xea, 0x64, 0x74, 0x7e, 0x7a, 0x76, 0xf4,
+  0xf2, 0xc5, 0x8f, 0x26, 0x92, 0xbf, 0xe4, 0x10, 0x81, 0xe8, 0x69, 0xee,
+  0x67, 0x9e, 0xdb, 0x41, 0xdf, 0x7b, 0x7b, 0xfc, 0xc3, 0x7b, 0xb2, 0x0e,
+  0x5e, 0x32, 0xc3, 0x7b, 0xff, 0x2e, 0x9d, 0xe9, 0x4b, 0x6c, 0x62, 0x75,
+  0xe8, 0x76, 0xc3, 0x26, 0x19, 0x5f, 0x7b, 0x62, 0x5d, 0xf5, 0x50, 0x9f,
+  0xa7, 0xf0, 0x60, 0x30, 0xba, 0xa0, 0x50, 0x54, 0xda, 0x48, 0xab, 0xed,
+  0x28, 0xf1, 0xeb, 0xaf, 0xff, 0xcd, 0x5a, 0x30, 0x95, 0x0c, 0x21, 0x08,
+  0x23, 0xf3, 0xc0, 0xad, 0xea, 0x6f, 0x3c, 0x9e, 0x57, 0x99, 0x94, 0x4b,
+  0x06, 0xb0, 0x38, 0x2a, 0x4a, 0xad, 0xb3, 0x8c, 0x98, 0xb7, 0xf2, 0x55,
+  0x2a, 0x09, 0x13, 0x43, 0x68, 0x0d, 0x4d, 0x6f, 0x72, 0x4c, 0x55, 0x18,
+  0xd7, 0x97, 0xd4, 0x4a, 0xd9, 0xa2, 0x36, 0xcf, 0xf9, 0xf1, 0xc5, 0xe8,
+  0x64, 0x74, 0xc9, 0x66, 0x94, 0xd6, 0x55, 0x54, 0x1f, 0xb4, 0x15, 0xbd,
+  0x04, 0x67, 0x43, 0x93, 0x7a, 0x34, 0xac, 0x1b, 0xd2, 0x38, 0xd1, 0x4e,
+  0xcc, 0x35, 0x93, 0x38, 0xf9, 0x06, 0x90, 0xcc, 0x50, 0x56, 0x44, 0x85,
+  0x40, 0x37, 0xbd, 0xb2, 0x03, 0x5c, 0xe8, 0xd6, 0x68, 0x95, 0xcf, 0x40,
+  0xe9, 0x1b, 0xac, 0xce, 0x2c, 0x1f, 0x7b, 0xaf, 0x79, 0x2b, 0x84, 0xcc,
+  0xe8, 0x04, 0x25, 0xeb, 0x08, 0x8f, 0x90, 0xf9, 0xc3, 0x7d, 0x66, 0xb4,
+  0x96, 0xda, 0xd5, 0x6b, 0x4d, 0xb3, 0x1a, 0xc3, 0xfc, 0x55, 0x67, 0xa8,
+  0xc2, 0x38, 0x31, 0x3d, 0xcd, 0xfd, 0x34, 0x00, 0xa1, 0x2a, 0xff, 0x13,
+  0xa8, 0x6b, 0x55, 0x64, 0xb3, 0x50, 0xce, 0x25, 0x13, 0x8d, 0x1d, 0x2d,
+  0xa4, 0xb5, 0x20, 0xb3, 0x1e, 0x38, 0x21, 0x1d, 0x59, 0xa4, 0x82, 0xa8,
+  0xea, 0x78, 0xcd, 0x29, 0x6c, 0x20, 0xd9, 0x9a, 0xb2, 0xbe, 0x05, 0x0f,
+  0x5c, 0xf8, 0x31, 0xbb, 0x4e, 0x79, 0x06, 0xc7, 0xab, 0xb0, 0x50, 0x9b,
+  0xeb, 0xbd, 0xd4, 0x27, 0xc1, 0xc4, 0x03, 0x21, 0x99, 0x96, 0x60, 0xb1,
+  0xac, 0x95, 0x34, 0xde, 0x0c, 0x1f, 0x85, 0x3b, 0x0e, 0x9b, 0x7c, 0x3e,
+  0xb6, 0x2f, 0xad, 0x98, 0xe8, 0x63, 0x33, 0x1a, 0x54, 0x76, 0xe4, 0xed,
+  0x5b, 0x66, 0x86, 0x5b, 0x12, 0x37, 0x43, 0xc5, 0x01, 0x87, 0xc5, 0xc4,
+  0x5d, 0xc6, 0x9c, 0x74, 0xc4, 0xf1, 0xc5, 0x52, 0xb9, 0x92, 0x48, 0xfc,
+  0xb1, 0x67, 0x19, 0xe5, 0x20, 0x51, 0x27, 0x99, 0xa3, 0x6e, 0xc6, 0xa3,
+  0xe7, 0x61, 0xdc, 0x32, 0xdd, 0xc1, 0xb6, 0x12, 0xf7, 0xfa, 0x83, 0x7e,
+  0xd0, 0x25, 0xc8, 0xdb, 0x62, 0xf5, 0x25, 0xdf, 0x2a, 0x45, 0x7a, 0x8f,
+  0xf9, 0x75, 0x83, 0x34, 0xd1, 0x4a, 0x93, 0x6f, 0x5d, 0x78, 0x1a, 0x02,
+  0xaf, 0x51, 0x13, 0x97, 0x47, 0xd7, 0x08, 0x0d, 0x92, 0x7e, 0xb9, 0x44,
+  0x31, 0xa5, 0x89, 0xb2, 0xc9, 0x03, 0xb4, 0xeb, 0x1a, 0xb4, 0x4b, 0xc4,
+  0x4f, 0x16, 0xcd, 0xea, 0x9b, 0x77, 0xa7, 0x97, 0x27, 0xe7, 0x61, 0xf8,
+  0x31, 0xf9, 0xe1, 0xe4, 0xf2, 0x5b, 0xd2, 0xda, 0x47, 0x27, 0x6f, 0xbf,
+  0x39, 0xe5, 0x18, 0xcf, 0x9b, 0x37, 0x87, 0x6f, 0x99, 0x5d, 0xe0, 0x2d,
+  0x90, 0x8d, 0x87, 0x30, 0x1c, 0x58, 0x1c, 0xd1, 0x14, 0xf3, 0xde, 0xe1,
+  0xbc, 0xf3, 0x7e, 0x1c, 0x6a, 0x68, 0x1d, 0x3f, 0xa9, 0x79, 0xbc, 0x68,
+  0x4e, 0x12, 0xaf, 0xb8, 0x5a, 0x06, 0x0f, 0xec, 0xd8, 0xc1, 0xb1, 0x65,
+  0x63, 0x8b, 0x27, 0xba, 0x4d, 0x23, 0x8f, 0x1c, 0x47, 0xd1, 0xd0, 0x11,
+  0x46, 0x97, 0xbb, 0xdb, 0x87, 0x2f, 0xb0, 0xa2, 0x8e, 0x84, 0x16, 0x76,
+  0x0c, 0xe9, 0x4c, 0x0b, 0xb5, 0x6b, 0xe4, 0xbe, 0x6c, 0xe6, 0x1c, 0xd0,
+  0x17, 0xd1, 0x25, 0xe0, 0x08, 0x0a, 0xef, 0x11, 0x64, 0x8b, 0x93, 0x8d,
+  0xe6, 0x8b, 0xd3, 0xf0, 0x42, 0x6d, 0x96, 0xa1, 0x37, 0x78, 0xe0, 0x75,
+  0x91, 0xf9, 0x93, 0x3b, 0x38, 0xb3, 0x66, 0xcc, 0xfd, 0x0b, 0x33, 0x4c,
+  0x2e, 0x97, 0x01, 0xcb, 0xb5, 0x01, 0x2d, 0xc9, 0xb6, 0xab, 0x38, 0xa4,
+  0xee, 0xb3, 0x03, 0x51, 0x2b, 0x1d, 0xcd, 0xb2, 0x15, 0xcf, 0xa3, 0xe6,
+  0xac, 0x65, 0x85, 0xa2, 0x00, 0x8f, 0xad, 0x69, 0x4d, 0x3a, 0x66, 0x48,
+  0x4b, 0x7b, 0xac, 0x91, 0x95, 0x2d, 0xf7, 0xdd, 0x99, 0xb9, 0xf6, 0x2c,
+  0xad, 0x0d, 0xc9, 0xac, 0x4c, 0xbf, 0xe3, 0x23, 0xa7, 0x28, 0xb2, 0x56,
+  0x14, 0xc3, 0xec, 0x43, 0xc6, 0x41, 0x4e, 0xfe, 0xeb, 0x5f, 0x97, 0xd7,
+  0x61, 0xc6, 0x9b, 0x94, 0x7d, 0x5e, 0x76, 0xad, 0xac, 0x72, 0x3a, 0x8b,
+  0x5a, 0xa4, 0xa5, 0xe6, 0x1a, 0x3d, 0xd0, 0xfa, 0x71, 0x7b, 0xeb, 0x3e,
+  0xa8, 0xbf, 0xdf, 0x8f, 0x7f, 0xbf, 0x2f, 0x6e, 0xc7, 0x93, 0xf3, 0xbb,
+  0xcf, 0x1c, 0x17, 0xaa, 0xe4, 0x71, 0x87, 0xea, 0x9b, 0x29, 0x05, 0xbc,
+  0xc3, 0xf8, 0x51, 0xb9, 0x73, 0x52, 0x91, 0x89, 0xe2, 0xfb, 0x67, 0x04,
+  0xd9, 0xaa, 0x44, 0x7e, 0x2a, 0x1e, 0x81, 0x9b, 0x58, 0x60, 0xbf, 0x00,
+  0xd9, 0x41, 0x4e, 0xf1, 0x75, 0x45, 0x0d, 0xd2, 0xef, 0x9f, 0x3a, 0x2c,
+  0xbe, 0x97, 0x69, 0x28, 0xd7, 0xa6, 0xd9, 0x50, 0x83, 0x7c, 0x79, 0x67,
+  0x35, 0x78, 0xe9, 0xaf, 0x9f, 0xb9, 0x52, 0x3d, 0x55, 0x23, 0x46, 0xd5,
+  0xe0, 0x1d, 0x36, 0xe1, 0x8f, 0xce, 0x01, 0x16, 0xc9, 0x92, 0xc1, 0x1b,
+  0x19, 0xad, 0x7e, 0x65, 0x4d, 0x40, 0x76, 0x50, 0x44, 0x14, 0x0e, 0xe6,
+  0x19, 0x32, 0x63, 0x21, 0x8f, 0x02, 0xe1, 0x12, 0x72, 0xfe, 0xeb, 0xaa,
+  0xff, 0xb4, 0xbf, 0xbb, 0xbb, 0x77, 0xb0, 0xf7, 0xc5, 0xf3, 0xdd, 0x83,
+  0xbd, 0xbd, 0xbd, 0xfd, 0x83, 0xbd, 0x83, 0x83, 0xfd, 0xdd, 0x5f, 0x76,
+  0xd8, 0x7f, 0x74, 0x97, 0x67, 0xf7, 0x16, 0x98, 0x92, 0x5c, 0x3c, 0x6c,
+  0x6b, 0xa9, 0xa5, 0xae, 0x16, 0xbc, 0xda, 0xb9, 0xa6, 0xf9, 0x38, 0x56,
+  0x09, 0x81, 0xcc, 0x0b, 0x99, 0xdc, 0xd2, 0x67, 0x9a, 0xe2, 0x0c, 0x06,
+  0x84, 0xd7, 0xe8, 0xd5, 0xdf, 0x56, 0x3c, 0xd2, 0x31, 0xab, 0x03, 0xd0,
+  0x69, 0x2a, 0x97, 0xd7, 0x77, 0x3d, 0x2b, 0xc6, 0x63, 0x64, 0x2e, 0xb8,
+  0xd4, 0xd6, 0x61, 0xc2, 0xac, 0xaa, 0xb7, 0xb2, 0x25, 0x34, 0x72, 0x00,
+  0x50, 0xa1, 0x1c, 0x74, 0x3f, 0x3b, 0xa2, 0x78, 0x29, 0x90, 0x7a, 0x52,
+  0x70, 0x85, 0x81, 0x29, 0x0b, 0x25, 0x9a, 0xa4, 0xd2, 0xa5, 0xbc, 0x24,
+  0x57, 0xd9, 0x17, 0xbb, 0x07, 0x07, 0x5c, 0x04, 0xe4, 0x8f, 0x7b, 0x7d,
+  0xc5, 0x83, 0x86, 0x20, 0xf7, 0xbe, 0xbb, 0x9e, 0xa4, 0x0d, 0x36, 0x3f,
+  0xc2, 0x71, 0x2e, 0x56, 0xf3, 0xac, 0x54, 0x43, 0x04, 0x17, 0xa2, 0x90,
+  0xff, 0xf0, 0x66, 0xb4, 0x2e, 0xbb, 0x67, 0x51, 0xd8, 0x06, 0x7e, 0x79,
+  0x49, 0x4d, 0xf1, 0xb7, 0xa7, 0x9e, 0x73, 0x1c, 0x95, 0x85, 0x94, 0x0f,
+  0xe5, 0x87, 0xa1, 0x91, 0x83, 0xd1, 0xa4, 0xb8, 0x0d, 0x95, 0x55, 0xcd,
+  0xc7, 0xf9, 0x29, 0xe8, 0xfc, 0xfe, 0xb3, 0xbd, 0x5f, 0x04, 0x7e, 0xc8,
+  0x1b, 0xdc, 0xcf, 0x82, 0x16, 0x7a, 0x9b, 0x86, 0x19, 0x17, 0xb6, 0x31,
+  0xb6, 0xb2, 0xe1, 0xf5, 0xd0, 0xb4, 0x04, 0xf5, 0x1e, 0xf6, 0x43, 0x10,
+  0xb8, 0x30, 0x90, 0x4b, 0x59, 0x60, 0xd8, 0x5d, 0xe6, 0x20, 0x32, 0x07,
+  0xaf, 0x38, 0x27, 0x1b, 0x15, 0x7b, 0xe8, 0xc6, 0x38, 0xbe, 0x3c, 0xa4,
+  0xcb, 0xe0, 0xbb, 0xd8, 0x70, 0x7f, 0x93, 0x91, 0x95, 0xcd, 0x8b, 0xb7,
+  0x85, 0xfd, 0x7d, 0xe7, 0x78, 0x7f, 0x79, 0xf6, 0x9e, 0x26, 0x5b, 0x1c,
+  0x83, 0x78, 0xf6, 0xc5, 0xb3, 0xa7, 0xdb, 0x52, 0x64, 0x41, 0x5e, 0xcb,
+  0x38, 0xdf, 0x03, 0x5e, 0x46, 0x25, 0x9b, 0x61, 0xf7, 0xb0, 0x13, 0x31,
+  0xef, 0x2e, 0x4e, 0xe4, 0x88, 0xde, 0x08, 0x27, 0x80, 0x18, 0xb1, 0x6d,
+  0x9e, 0x38, 0xdc, 0x9f, 0x81, 0xd2, 0x30, 0xcf, 0x99, 0xc3, 0x10, 0xb9,
+  0xd4, 0x7c, 0xd1, 0xb9, 0x5c, 0x7e, 0xdc, 0x98, 0x74, 0xe0, 0x0a, 0x94,
+  0x1e, 0xd4, 0x8a, 0x4e, 0xe8, 0x0c, 0x48, 0x0f, 0x99, 0x73, 0x55, 0xf7,
+  0x8d, 0xb3, 0xa8, 0xd8, 0xae, 0x11, 0xf9, 0x22, 0xd2, 0xbc, 0xc5, 0xb3,
+  0xbd, 0x2d, 0x11, 0x7c, 0x28, 0x79, 0xbc, 0xad, 0xe8, 0x41, 0x83, 0x82,
+  0x72, 0x8f, 0x1b, 0xd9, 0x65, 0x5e, 0x7b, 0x0c, 0x38, 0x9a, 0x8c, 0x9e,
+  0x45, 0x45, 0x8b, 0x9b, 0x42, 0x09, 0x4f, 0xd7, 0xf0, 0x14, 0xe6, 0x0d,
+  0x17, 0x8e, 0xe6, 0xc6, 0x23, 0x47, 0x1d, 0x10, 0xe2, 0x39, 0x5d, 0x2f,
+  0xe5, 0x83, 0x6a, 0xcc, 0x50, 0xfb, 0x5d, 0xa5, 0xb4, 0x56, 0x80, 0x5f,
+  0x58, 0x20, 0x42, 0x64, 0xbc, 0x23, 0x41, 0x31, 0x23, 0xb8, 0xd1, 0x81,
+  0x86, 0x18, 0x1f, 0xcc, 0xed, 0x57, 0x01, 0xfe, 0x25, 0x4c, 0x17, 0xb3,
+  0xbf, 0xdb, 0x73, 0x01, 0x34, 0x32, 0x6d, 0x0f, 0x6c, 0x4d, 0xd7, 0x84,
+  0x2b, 0x13, 0x70, 0x28, 0x67, 0xcd, 0x6c, 0xa1, 0x27, 0x3b, 0x3b, 0xdb,
+  0x6b, 0x7a, 0xa3, 0xbf, 0xee, 0xfa, 0xfa, 0x39, 0x38, 0x46, 0x82, 0x0c,
+  0x4d, 0x5a, 0xf3, 0x66, 0xe3, 0x3c, 0xb5, 0x79, 0xc5, 0x2b, 0x39, 0x55,
+  0x9c, 0xab, 0xb8, 0x45, 0xcd, 0x5c, 0x92, 0xce, 0x9b, 0x30, 0x6a, 0x0e,
+  0x42, 0xa1, 0x35, 0xc6, 0xf9, 0x24, 0x35, 0x9c, 0x25, 0x5c, 0x39, 0x4c,
+  0x0e, 0x79, 0x37, 0x34, 0x3e, 0x1c, 0x74, 0xd9, 0xfc, 0xb3, 0xc6, 0x68,
+  0x6e, 0x4a, 0xa9, 0x73, 0xcf, 0xf5, 0x83, 0x5f, 0x9a, 0xda, 0x66, 0x29,
+  0xfe, 0xce, 0x79, 0x3b, 0xce, 0x84, 0xce, 0xc4, 0x49, 0xc2, 0x80, 0xa9,
+  0x38, 0x5f, 0x34, 0x4a, 0x80, 0x6a, 0x23, 0x08, 0x5c, 0xbb, 0x41, 0x80,
+  0x04, 0xb1, 0x34, 0x72, 0xdd, 0xb0, 0x2c, 0x20, 0x18, 0x05, 0x14, 0xa4,
+  0x2e, 0x8a, 0xb2, 0xdb, 0xc4, 0x12, 0x3d, 0x1d, 0xcb, 0xf6, 0x6a, 0xcc,
+  0x47, 0x5f, 0x76, 0xbc, 0x80, 0x12, 0x04, 0x3f, 0x4b, 0x87, 0x84, 0x05,
+  0xc6, 0xe1, 0xc9, 0x29, 0xa3, 0xdc, 0x4e, 0xc9, 0x64, 0x1b, 0x99, 0xea,
+  0x03, 0xd4, 0x27, 0xf0, 0x77, 0x8b, 0x9c, 0xd5, 0xef, 0xbe, 0x2b, 0x25,
+  0x62, 0xc9, 0x4f, 0xb0, 0x43, 0x38, 0x58, 0x27, 0xa6, 0xbc, 0x72, 0xfe,
+  0xd1, 0x6a, 0x91, 0xfe, 0x53, 0x89, 0x13, 0x16, 0xd4, 0xba, 0x4c, 0x3a,
+  0x8f, 0xc0, 0x28, 0x4c, 0x64, 0x11, 0xd4, 0xa8, 0x64, 0x54, 0x66, 0xb3,
+  0xec, 0x4e, 0xbd, 0xa5, 0x42, 0x54, 0xfa, 0x8d, 0xc6, 0x24, 0xa5, 0x94,
+  0x69, 0xed, 0x43, 0xab, 0x8d, 0xb0, 0x27, 0x7f, 0x73, 0x47, 0x38, 0x5e,
+  0x3c, 0x75, 0x07, 0x7f, 0xde, 0xb3, 0xeb, 0x5b, 0x08, 0x98, 0xdf, 0x1b,
+  0xb0, 0xcd, 0xaa, 0x50, 0xd5, 0x77, 0x95, 0xb2, 0x33, 0xb4, 0xb1, 0xdf,
+  0xe2, 0xfb, 0xb3, 0x62, 0x78, 0xe2, 0x4c, 0xef, 0x1b, 0xff, 0xb1, 0x44,
+  0x00, 0xd8, 0xcc, 0xe9, 0xb3, 0xe3, 0x55, 0x0a, 0xae, 0x93, 0x81, 0xc5,
+  0x95, 0x2e, 0xfa, 0x92, 0x08, 0x8a, 0xbd, 0x51, 0xcc, 0xe8, 0x9f, 0x80,
+  0x47, 0x09, 0x60, 0x92, 0x9e, 0x65, 0xfe, 0xd6, 0x00, 0xa1, 0x4a, 0xff,
+  0x94, 0xe4, 0x06, 0xfd, 0x17, 0x9a, 0x2a, 0x57, 0xa0, 0x09, 0xee, 0xcb,
+  0xe5, 0xc6, 0x41, 0xc4, 0x7a, 0x32, 0x74, 0xbd, 0xd7, 0x18, 0xbe, 0xf4,
+  0xff, 0x95, 0x85, 0x98, 0x4d, 0xad, 0x28, 0x4a, 0x9b, 0x5d, 0x59, 0x85,
+  0xb1, 0xd4, 0x2e, 0xfc, 0x7a, 0xc5, 0xc1, 0x2d, 0x57, 0x99, 0x87, 0x7b,
+  0x31, 0xe7, 0xab, 0x28, 0x93, 0x32, 0xa1, 0xae, 0x71, 0xb6, 0xd0, 0x56,
+  0xb4, 0xba, 0xd2, 0xfa, 0x69, 0x71, 0xcf, 0x35, 0x4e, 0xaf, 0xae, 0xf2,
+  0x09, 0x17, 0xae, 0xf1, 0x74, 0xc0, 0x2c, 0xe2, 0xe5, 0xc1, 0xb9, 0x95,
+  0x55, 0xa2, 0xb1, 0x25, 0xcb, 0xd5, 0x78, 0x46, 0x77, 0xaf, 0xa1, 0xd3,
+  0xe9, 0x50, 0x61, 0x96, 0xc8, 0x78, 0x42, 0x73, 0x12, 0x9b, 0x87, 0xfd,
+  0xd8, 0x42, 0x44, 0x6b, 0x31, 0x76, 0xd6, 0xa8, 0xe7, 0x28, 0xf6, 0xca,
+  0xb0, 0xe1, 0x79, 0xb1, 0xb0, 0xe4, 0x96, 0x55, 0x25, 0xe4, 0x90, 0x56,
+  0xb9, 0x7d, 0x43, 0x22, 0x0d, 0xf9, 0x4c, 0xd9, 0xd8, 0xd5, 0xd2, 0xc6,
+  0x1b, 0xe1, 0x60, 0xa6, 0x83, 0xe5, 0xcd, 0xd2, 0x56, 0xda, 0xf4, 0x1b,
+  0x51, 0x7e, 0x34, 0x9d, 0x02, 0x27, 0xef, 0xfc, 0xdb, 0xf3, 0x61, 0x72,
+  0xcc, 0x2d, 0x49, 0x9f, 0x54, 0x6f, 0x85, 0xcb, 0x85, 0x7e, 0x47, 0x83,
+  0xbd, 0xe6, 0xfb, 0xeb, 0xac, 0xe4, 0x7f, 0xa1, 0x35, 0xfd, 0xa5, 0x78,
+  0x59, 0xf1, 0xdb, 0xe6, 0x57, 0xa9, 0x21, 0x03, 0x4d, 0x9f, 0xe3, 0xef,
+  0x74, 0x54, 0x48, 0x9b, 0x72, 0xcb, 0xe4, 0xbf, 0x50, 0x94, 0x0d, 0x2a,
+  0x1d, 0x79, 0x33, 0x21, 0x25, 0x0b, 0xaa, 0xd2, 0xf2, 0x01, 0xeb, 0x17,
+  0xc8, 0x46, 0x51, 0x27, 0xa5, 0x81, 0x60, 0x6b, 0xe9, 0xf6, 0x73, 0x70,
+  0x3c, 0x39, 0x57, 0xa5, 0x90, 0xc8, 0x94, 0x99, 0x82, 0x17, 0x0b, 0x8d,
+  0x7a, 0x8a, 0x83, 0xa2, 0xca, 0x5a, 0xc7, 0x35, 0x30, 0xc7, 0xec, 0x17,
+  0x6c, 0x45, 0x73, 0x5f, 0x48, 0x69, 0xa1, 0x25, 0x18, 0x6e, 0xfc, 0xbf,
+  0xfd, 0xc7, 0xf0, 0xa6, 0x8d, 0x45, 0x02, 0x00,
+};
+#define BUF_SIZE 0x10000
+static voidpf zalloc_func(voidpf opaque, unsigned int items, unsigned int size)
+{
+  (void) opaque;
+  /* not a typo, keep it calloc() */
+  return (voidpf) calloc(items, size);
+}
+static void zfree_func(voidpf opaque, voidpf ptr)
+{
+  (void) opaque;
+  free(ptr);
+}
+/* Decompress and send to stdout a gzip-compressed buffer */
+void hugehelp(void)
+{
+  unsigned char* buf;
+  int status,headerlen;
+  z_stream z;
+
+  /* Make sure no gzip options are set */
+  if (hugehelpgz[3] & 0xfe)
+    return;
+
+  headerlen = 10;
+  memset(&z, 0, sizeof(z_stream));
+  z.zalloc = (alloc_func)zalloc_func;
+  z.zfree = (free_func)zfree_func;
+  z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
+  z.next_in = (unsigned char *)hugehelpgz + headerlen;
+
+  if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
+    return;
+
+  buf = malloc(BUF_SIZE);
+  if (buf) {
+    while(1) {
+      z.avail_out = BUF_SIZE;
+      z.next_out = buf;
+      status = inflate(&z, Z_SYNC_FLUSH);
+      if (status == Z_OK || status == Z_STREAM_END) {
+        fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
+        if (status == Z_STREAM_END)
+          break;
+      }
+      else
+        break;    /* Error */
+    }
+    free(buf);
+  }
+  inflateEnd(&z);
+}
+#endif /* USE_MANUAL */
+#endif /* HAVE_LIBZ */
similarity index 82%
rename from src/hugehelp.h
rename to src/tool_hugehelp.h
index b84be17..28d44df 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_HUGEHELP_H
-#define HEADER_CURL_HUGEHELP_H
+#ifndef HEADER_CURL_TOOL_HUGEHELP_H
+#define HEADER_CURL_TOOL_HUGEHELP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,8 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
+
 void hugehelp(void);
 
-#endif /* HEADER_CURL_HUGEHELP_H */
+#endif /* HEADER_CURL_TOOL_HUGEHELP_H */
diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c
new file mode 100644 (file)
index 0000000..81b6680
--- /dev/null
@@ -0,0 +1,100 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_libinfo.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* global variable definitions, for libcurl run-time info */
+
+curl_version_info_data *curlinfo = NULL;
+long built_in_protos = 0;
+
+/*
+ * libcurl_info_init: retrieves run-time information about libcurl,
+ * setting a global pointer 'curlinfo' to libcurl's run-time info
+ * struct, and a global bit pattern 'built_in_protos' composed of
+ * CURLPROTO_* bits indicating which protocols are actually built
+ * into library being used.
+ */
+
+CURLcode get_libcurl_info(void)
+{
+  static struct proto_name_pattern {
+    const char *proto_name;
+    long        proto_pattern;
+  } const possibly_built_in[] = {
+    { "dict",   CURLPROTO_DICT   },
+    { "file",   CURLPROTO_FILE   },
+    { "ftp",    CURLPROTO_FTP    },
+    { "ftps",   CURLPROTO_FTPS   },
+    { "gopher", CURLPROTO_GOPHER },
+    { "http",   CURLPROTO_HTTP   },
+    { "https",  CURLPROTO_HTTPS  },
+    { "imap",   CURLPROTO_IMAP   },
+    { "imaps",  CURLPROTO_IMAPS  },
+    { "ldap",   CURLPROTO_LDAP   },
+    { "ldaps",  CURLPROTO_LDAPS  },
+    { "pop3",   CURLPROTO_POP3   },
+    { "pop3s",  CURLPROTO_POP3S  },
+    { "rtmp",   CURLPROTO_RTMP   },
+    { "rtsp",   CURLPROTO_RTSP   },
+    { "scp",    CURLPROTO_SCP    },
+    { "sftp",   CURLPROTO_SFTP   },
+    { "smtp",   CURLPROTO_SMTP   },
+    { "smtps",  CURLPROTO_SMTPS  },
+    { "telnet", CURLPROTO_TELNET },
+    { "tftp",   CURLPROTO_TFTP   },
+    {  NULL,    0                }
+  };
+
+  struct proto_name_pattern const *p;
+  const char *const *proto;
+
+  /* Pointer to libcurl's run-time version information */
+  curlinfo = curl_version_info(CURLVERSION_NOW);
+  if(!curlinfo)
+    return CURLE_FAILED_INIT;
+
+  /* Build CURLPROTO_* bit pattern with libcurl's built-in protocols */
+  built_in_protos = 0;
+  if(curlinfo->protocols) {
+    for(proto = curlinfo->protocols; *proto; proto++) {
+      for(p = possibly_built_in; p->proto_name; p++) {
+        if(curlx_raw_equal(*proto, p->proto_name)) {
+          built_in_protos |= p->proto_pattern;
+          break;
+        }
+      }
+    }
+  }
+
+  return CURLE_OK;
+}
+
diff --git a/src/tool_libinfo.h b/src/tool_libinfo.h
new file mode 100644 (file)
index 0000000..5c149d9
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_TOOL_LIBINFO_H
+#define HEADER_CURL_TOOL_LIBINFO_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/* global variable declarations, for libcurl run-time info */
+
+extern curl_version_info_data *curlinfo;
+extern long built_in_protos;
+
+CURLcode get_libcurl_info(void);
+
+#endif /* HEADER_CURL_TOOL_LIBINFO_H */
+
diff --git a/src/tool_main.c b/src/tool_main.c
new file mode 100644 (file)
index 0000000..8f2fbb7
--- /dev/null
@@ -0,0 +1,124 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include <sys/stat.h>
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_convert.h"
+#include "tool_operate.h"
+#include "tool_panykey.h"
+#include "tool_vms.h"
+#include "tool_main.h"
+
+/*
+ * This is low-level hard-hacking memory leak tracking and similar. Using
+ * the library level code from this client-side is ugly, but we do this
+ * anyway for convenience.
+ */
+#include "memdebug.h" /* keep this as LAST include */
+
+#ifdef __VMS
+/*
+ * vms_show is a global variable, used in main() as parameter for
+ * function vms_special_exit() to allow proper curl tool exiting.
+ * Its value may be set in other tool_*.c source files thanks to
+ * forward declaration present in tool_vms.h
+ */
+int vms_show = 0;
+#endif
+
+/* if we build a static library for unit tests, there is no main() function */
+#ifndef UNITTESTS
+
+/*
+ * Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are
+ * open before starting to run.  Otherwise, the first three network
+ * sockets opened by curl could be used for input sources, downloaded data
+ * or error logs as they will effectively be stdin, stdout and/or stderr.
+ */
+static void main_checkfds(void)
+{
+#ifdef HAVE_PIPE
+  int fd[2] = { STDIN_FILENO, STDIN_FILENO };
+  while(fd[0] == STDIN_FILENO ||
+        fd[0] == STDOUT_FILENO ||
+        fd[0] == STDERR_FILENO ||
+        fd[1] == STDIN_FILENO ||
+        fd[1] == STDOUT_FILENO ||
+        fd[1] == STDERR_FILENO)
+    if(pipe(fd) < 0)
+      return;   /* Out of handles. This isn't really a big problem now, but
+                   will be when we try to create a socket later. */
+  close(fd[0]);
+  close(fd[1]);
+#endif
+}
+
+/*
+** curl tool main function.
+*/
+int main(int argc, char *argv[])
+{
+  int res;
+  struct Configurable config;
+
+  memset(&config, 0, sizeof(struct Configurable));
+
+  config.errors = stderr; /* default errors to stderr */
+
+  main_checkfds();
+
+#if defined(HAVE_SIGNAL) && defined(SIGPIPE)
+  (void)signal(SIGPIPE, SIG_IGN);
+#endif
+
+  res = operate(&config, argc, argv);
+
+#ifdef __SYMBIAN32__
+  if(config.showerror)
+    tool_pressanykey();
+#endif
+
+  free_config_fields(&config);
+
+#ifdef __NOVELL_LIBC__
+  if(getenv("_IN_NETWARE_BASH_") == NULL)
+    tool_pressanykey();
+#endif
+
+#ifdef __VMS
+  vms_special_exit(res, vms_show);
+#else
+  return res;
+#endif
+}
+
+#endif /* ndef UNITTESTS */
diff --git a/src/tool_main.h b/src/tool_main.h
new file mode 100644 (file)
index 0000000..9a7972f
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef HEADER_CURL_TOOL_MAIN_H
+#define HEADER_CURL_TOOL_MAIN_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define DEFAULT_MAXREDIRS  50L
+
+#define RETRY_SLEEP_DEFAULT 1000L   /* ms */
+#define RETRY_SLEEP_MAX     600000L /* ms == 10 minutes */
+
+#ifndef STDIN_FILENO
+#  define STDIN_FILENO  fileno(stdin)
+#endif
+
+#ifndef STDOUT_FILENO
+#  define STDOUT_FILENO  fileno(stdout)
+#endif
+
+#ifndef STDERR_FILENO
+#  define STDERR_FILENO  fileno(stderr)
+#endif
+
+#endif /* HEADER_CURL_TOOL_MAIN_H */
+
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
new file mode 100644 (file)
index 0000000..be5fc26
--- /dev/null
@@ -0,0 +1,905 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef USE_METALINK
+
+#include <sys/stat.h>
+
+#ifdef HAVE_FCNTL_H
+#  include <fcntl.h>
+#endif
+
+#ifdef USE_SSLEAY
+#  ifdef USE_OPENSSL
+#    include <openssl/md5.h>
+#    include <openssl/sha.h>
+#  else
+#    include <md5.h>
+#    include <sha.h>
+#  endif
+#elif defined(USE_GNUTLS_NETTLE)
+#  include <nettle/md5.h>
+#  include <nettle/sha.h>
+#  define MD5_CTX    struct md5_ctx
+#  define SHA_CTX    struct sha1_ctx
+#  define SHA256_CTX struct sha256_ctx
+#elif defined(USE_GNUTLS)
+#  include <gcrypt.h>
+#  define MD5_CTX    gcry_md_hd_t
+#  define SHA_CTX    gcry_md_hd_t
+#  define SHA256_CTX gcry_md_hd_t
+#elif defined(USE_NSS)
+#  include <nss.h>
+#  include <pk11pub.h>
+#  define MD5_CTX    void *
+#  define SHA_CTX    void *
+#  define SHA256_CTX void *
+#  ifdef HAVE_NSS_INITCONTEXT
+     static NSSInitContext *nss_context;
+#  endif
+#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
+              (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+      (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
+              (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
+/* For Apple operating systems: CommonCrypto has the functions we need.
+   The library's headers are even backward-compatible with OpenSSL's
+   headers as long as we define COMMON_DIGEST_FOR_OPENSSL first.
+
+   These functions are available on Tiger and later, as well as iOS 2.0
+   and later. If you're building for an older cat, well, sorry. */
+#  define COMMON_DIGEST_FOR_OPENSSL
+#  include <CommonCrypto/CommonDigest.h>
+#elif defined(_WIN32)
+/* For Windows: If no other crypto library is provided, we fallback
+   to the hash functions provided within the Microsoft Windows CryptoAPI */
+#  include <wincrypt.h>
+/* Custom structure in order to store the required provider and hash handle */
+struct win32_crypto_hash {
+  HCRYPTPROV hCryptProv;
+  HCRYPTHASH hHash;
+};
+/* Custom Microsoft AES Cryptographic Provider defines required for MinGW */
+#  ifndef ALG_SID_SHA_256
+#    define ALG_SID_SHA_256  12
+#  endif
+#  ifndef CALG_SHA_256
+#    define CALG_SHA_256 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256)
+#  endif
+#  define MD5_CTX    struct win32_crypto_hash
+#  define SHA_CTX    struct win32_crypto_hash
+#  define SHA256_CTX struct win32_crypto_hash
+#else
+#  error "Can't compile METALINK support without a crypto library."
+#endif
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_getparam.h"
+#include "tool_paramhlp.h"
+#include "tool_cfgable.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* Copied from tool_getparam.c */
+#define GetStr(str,val) do { \
+  if(*(str)) { \
+    free(*(str)); \
+    *(str) = NULL; \
+  } \
+  if((val)) \
+    *(str) = strdup((val)); \
+  if(!(val)) \
+    return PARAM_NO_MEM; \
+} WHILE_FALSE
+
+#ifdef USE_GNUTLS_NETTLE
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+  md5_init(ctx);
+  return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+                       const unsigned char *input,
+                       unsigned int inputLen)
+{
+  md5_update(ctx, inputLen, input);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+  md5_digest(ctx, 16, digest);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+  sha1_init(ctx);
+  return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+                        const unsigned char *input,
+                        unsigned int inputLen)
+{
+  sha1_update(ctx, inputLen, input);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+  sha1_digest(ctx, 20, digest);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+  sha256_init(ctx);
+  return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+                          const unsigned char *input,
+                          unsigned int inputLen)
+{
+  sha256_update(ctx, inputLen, input);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+  sha256_digest(ctx, 32, digest);
+}
+
+#elif defined(USE_GNUTLS)
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+  gcry_md_open(ctx, GCRY_MD_MD5, 0);
+  return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+                       const unsigned char *input,
+                       unsigned int inputLen)
+{
+  gcry_md_write(*ctx, input, inputLen);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+  memcpy(digest, gcry_md_read(*ctx, 0), 16);
+  gcry_md_close(*ctx);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+  gcry_md_open(ctx, GCRY_MD_SHA1, 0);
+  return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+                        const unsigned char *input,
+                        unsigned int inputLen)
+{
+  gcry_md_write(*ctx, input, inputLen);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+  memcpy(digest, gcry_md_read(*ctx, 0), 20);
+  gcry_md_close(*ctx);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+  gcry_md_open(ctx, GCRY_MD_SHA256, 0);
+  return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+                          const unsigned char *input,
+                          unsigned int inputLen)
+{
+  gcry_md_write(*ctx, input, inputLen);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+  memcpy(digest, gcry_md_read(*ctx, 0), 32);
+  gcry_md_close(*ctx);
+}
+
+#elif defined(USE_NSS)
+
+static int nss_hash_init(void **pctx, SECOidTag hash_alg)
+{
+  PK11Context *ctx;
+
+  /* we have to initialize NSS if not initialized alraedy */
+#ifdef HAVE_NSS_INITCONTEXT
+  if(!NSS_IsInitialized() && !nss_context) {
+    static NSSInitParameters params;
+    params.length = sizeof params;
+    nss_context = NSS_InitContext("", "", "", "", &params, NSS_INIT_READONLY
+        | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
+        | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
+  }
+#endif
+
+  ctx = PK11_CreateDigestContext(hash_alg);
+  if(!ctx)
+    return /* failure */ 0;
+
+  if(PK11_DigestBegin(ctx) != SECSuccess) {
+    PK11_DestroyContext(ctx, PR_TRUE);
+    return /* failure */ 0;
+  }
+
+  *pctx = ctx;
+  return /* success */ 1;
+}
+
+static void nss_hash_final(void **pctx, unsigned char *out, unsigned int len)
+{
+  PK11Context *ctx = *pctx;
+  unsigned int outlen;
+  PK11_DigestFinal(ctx, out, &outlen, len);
+  PK11_DestroyContext(ctx, PR_TRUE);
+}
+
+static int MD5_Init(MD5_CTX *pctx)
+{
+  return nss_hash_init(pctx, SEC_OID_MD5);
+}
+
+static void MD5_Update(MD5_CTX *pctx,
+                       const unsigned char *input,
+                       unsigned int input_len)
+{
+  PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *pctx)
+{
+  nss_hash_final(pctx, digest, 16);
+}
+
+static int SHA1_Init(SHA_CTX *pctx)
+{
+  return nss_hash_init(pctx, SEC_OID_SHA1);
+}
+
+static void SHA1_Update(SHA_CTX *pctx,
+                        const unsigned char *input,
+                        unsigned int input_len)
+{
+  PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *pctx)
+{
+  nss_hash_final(pctx, digest, 20);
+}
+
+static int SHA256_Init(SHA256_CTX *pctx)
+{
+  return nss_hash_init(pctx, SEC_OID_SHA256);
+}
+
+static void SHA256_Update(SHA256_CTX *pctx,
+                          const unsigned char *input,
+                          unsigned int input_len)
+{
+  PK11_DigestOp(*pctx, input, input_len);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *pctx)
+{
+  nss_hash_final(pctx, digest, 32);
+}
+
+#elif defined(_WIN32) && !defined(USE_SSLEAY)
+
+static void win32_crypto_final(struct win32_crypto_hash *ctx,
+                               unsigned char *digest,
+                               unsigned int digestLen)
+{
+  unsigned long length;
+  CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
+  if(length == digestLen)
+    CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
+  if(ctx->hHash)
+    CryptDestroyHash(ctx->hHash);
+  if(ctx->hCryptProv)
+    CryptReleaseContext(ctx->hCryptProv, 0);
+}
+
+static int MD5_Init(MD5_CTX *ctx)
+{
+  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+                         PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+    CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash);
+  }
+  return 1;
+}
+
+static void MD5_Update(MD5_CTX *ctx,
+                       const unsigned char *input,
+                       unsigned int inputLen)
+{
+  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
+{
+  win32_crypto_final(ctx, digest, 16);
+}
+
+static int SHA1_Init(SHA_CTX *ctx)
+{
+  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+                         PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+    CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash);
+  }
+  return 1;
+}
+
+static void SHA1_Update(SHA_CTX *ctx,
+                        const unsigned char *input,
+                        unsigned int inputLen)
+{
+  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx)
+{
+  win32_crypto_final(ctx, digest, 20);
+}
+
+static int SHA256_Init(SHA256_CTX *ctx)
+{
+  if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL,
+                         PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) {
+    CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash);
+  }
+  return 1;
+}
+
+static void SHA256_Update(SHA256_CTX *ctx,
+                          const unsigned char *input,
+                          unsigned int inputLen)
+{
+  CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0);
+}
+
+static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
+{
+  win32_crypto_final(ctx, digest, 32);
+}
+
+#endif /* CRYPTO LIBS */
+
+const digest_params MD5_DIGEST_PARAMS[] = {
+  {
+    (Curl_digest_init_func) MD5_Init,
+    (Curl_digest_update_func) MD5_Update,
+    (Curl_digest_final_func) MD5_Final,
+    sizeof(MD5_CTX),
+    16
+  }
+};
+
+const digest_params SHA1_DIGEST_PARAMS[] = {
+  {
+    (Curl_digest_init_func) SHA1_Init,
+    (Curl_digest_update_func) SHA1_Update,
+    (Curl_digest_final_func) SHA1_Final,
+    sizeof(SHA_CTX),
+    20
+  }
+};
+
+const digest_params SHA256_DIGEST_PARAMS[] = {
+  {
+    (Curl_digest_init_func) SHA256_Init,
+    (Curl_digest_update_func) SHA256_Update,
+    (Curl_digest_final_func) SHA256_Final,
+    sizeof(SHA256_CTX),
+    32
+  }
+};
+
+static const metalink_digest_def SHA256_DIGEST_DEF[] = {
+  {"sha-256", SHA256_DIGEST_PARAMS}
+};
+
+static const metalink_digest_def SHA1_DIGEST_DEF[] = {
+  {"sha-1", SHA1_DIGEST_PARAMS}
+};
+
+static const metalink_digest_def MD5_DIGEST_DEF[] = {
+  {"md5", MD5_DIGEST_PARAMS}
+};
+
+/*
+ * The alias of supported hash functions in the order by preference
+ * (basically stronger hash comes first). We included "sha-256" and
+ * "sha256". The former is the name defined in the IANA registry named
+ * "Hash Function Textual Names". The latter is widely (and
+ * historically) used in Metalink version 3.
+ */
+static const metalink_digest_alias digest_aliases[] = {
+  {"sha-256", SHA256_DIGEST_DEF},
+  {"sha256", SHA256_DIGEST_DEF},
+  {"sha-1", SHA1_DIGEST_DEF},
+  {"sha1", SHA1_DIGEST_DEF},
+  {"md5", MD5_DIGEST_DEF},
+  {NULL, NULL}
+};
+
+digest_context *Curl_digest_init(const digest_params *dparams)
+{
+  digest_context *ctxt;
+
+  /* Create digest context */
+  ctxt = malloc(sizeof *ctxt);
+
+  if(!ctxt)
+    return ctxt;
+
+  ctxt->digest_hashctx = malloc(dparams->digest_ctxtsize);
+
+  if(!ctxt->digest_hashctx) {
+    free(ctxt);
+    return NULL;
+  }
+
+  ctxt->digest_hash = dparams;
+
+  if(dparams->digest_init(ctxt->digest_hashctx) != 1) {
+    free(ctxt);
+    return NULL;
+  }
+
+  return ctxt;
+}
+
+int Curl_digest_update(digest_context *context,
+                       const unsigned char *data,
+                       unsigned int len)
+{
+  (*context->digest_hash->digest_update)(context->digest_hashctx, data, len);
+
+  return 0;
+}
+
+int Curl_digest_final(digest_context *context, unsigned char *result)
+{
+  (*context->digest_hash->digest_final)(result, context->digest_hashctx);
+
+  free(context->digest_hashctx);
+  free(context);
+
+  return 0;
+}
+
+static unsigned char hex_to_uint(const char *s)
+{
+  int v[2];
+  int i;
+  for(i = 0; i < 2; ++i) {
+    v[i] = Curl_raw_toupper(s[i]);
+    if('0' <= v[i] && v[i] <= '9') {
+      v[i] -= '0';
+    }
+    else if('A' <= v[i] && v[i] <= 'Z') {
+      v[i] -= 'A'-10;
+    }
+  }
+  return (unsigned char)((v[0] << 4) | v[1]);
+}
+
+/*
+ * Check checksum of file denoted by filename. The expected hash value
+ * is given in hex_hash which is hex-encoded string.
+ *
+ * This function returns 1 if it succeeds or one of the following
+ * integers:
+ *
+ * 0:
+ *   Checksum didn't match.
+ * -1:
+ *   Could not open file; or could not read data from file.
+ * -2:
+ *   Hash algorithm not available.
+ */
+static int check_hash(const char *filename,
+                      const metalink_digest_def *digest_def,
+                      const unsigned char *digest, FILE *error)
+{
+  unsigned char *result;
+  digest_context *dctx;
+  int check_ok, flags, fd;
+
+  flags = O_RDONLY;
+#ifdef O_BINARY
+  /* O_BINARY is required in order to avoid binary EOF in text mode */
+  flags |= O_BINARY;
+#endif
+
+  fd = open(filename, flags);
+  if(fd == -1) {
+    fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+            digest_def->hash_name, strerror(errno));
+    return -1;
+  }
+
+  dctx = Curl_digest_init(digest_def->dparams);
+  if(!dctx) {
+    fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+            digest_def->hash_name, "failed to initialize hash algorithm");
+    close(fd);
+    return -2;
+  }
+
+  result = malloc(digest_def->dparams->digest_resultlen);
+  while(1) {
+    unsigned char buf[4096];
+    ssize_t len = read(fd, buf, sizeof(buf));
+    if(len == 0) {
+      break;
+    }
+    else if(len == -1) {
+      fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename,
+              digest_def->hash_name, strerror(errno));
+      Curl_digest_final(dctx, result);
+      close(fd);
+      return -1;
+    }
+    Curl_digest_update(dctx, buf, (unsigned int)len);
+  }
+  Curl_digest_final(dctx, result);
+  check_ok = memcmp(result, digest,
+                    digest_def->dparams->digest_resultlen) == 0;
+  /* sha*sum style verdict output */
+  if(check_ok)
+    fprintf(error, "Metalink: validating (%s) [%s] OK\n", filename,
+            digest_def->hash_name);
+  else
+    fprintf(error, "Metalink: validating (%s) [%s] FAILED (digest mismatch)\n",
+            filename, digest_def->hash_name);
+
+  free(result);
+  close(fd);
+  return check_ok;
+}
+
+int metalink_check_hash(struct Configurable *config,
+                        metalinkfile *mlfile,
+                        const char *filename)
+{
+  int rv;
+  fprintf(config->errors, "Metalink: validating (%s)...\n", filename);
+  if(mlfile->checksum == NULL) {
+    fprintf(config->errors,
+            "Metalink: validating (%s) FAILED (digest missing)\n",
+            filename);
+    return -2;
+  }
+  rv = check_hash(filename, mlfile->checksum->digest_def,
+                  mlfile->checksum->digest, config->errors);
+  return rv;
+}
+
+static metalink_checksum *new_metalink_checksum_from_hex_digest
+(const metalink_digest_def *digest_def, const char *hex_digest)
+{
+  metalink_checksum *chksum;
+  unsigned char *digest;
+  size_t i;
+  size_t len = strlen(hex_digest);
+  digest = malloc(len/2);
+  for(i = 0; i < len; i += 2) {
+    digest[i/2] = hex_to_uint(hex_digest+i);
+  }
+  chksum = malloc(sizeof(metalink_checksum));
+  chksum->digest_def = digest_def;
+  chksum->digest = digest;
+  return chksum;
+}
+
+static metalink_resource *new_metalink_resource(const char *url)
+{
+  metalink_resource *res;
+  res = malloc(sizeof(metalink_resource));
+  res->next = NULL;
+  res->url = strdup(url);
+  return res;
+}
+
+/* Returns nonzero if hex_digest is properly formatted; that is each
+   letter is in [0-9A-Za-z] and the length of the string equals to the
+   result length of digest * 2. */
+static int check_hex_digest(const char *hex_digest,
+                            const metalink_digest_def *digest_def)
+{
+  size_t i;
+  for(i = 0; hex_digest[i]; ++i) {
+    char c = hex_digest[i];
+    if(!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') ||
+         ('A' <= c && c <= 'Z'))) {
+      return 0;
+    }
+  }
+  return digest_def->dparams->digest_resultlen * 2 == i;
+}
+
+static metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
+{
+  metalinkfile *f;
+  f = (metalinkfile*)malloc(sizeof(metalinkfile));
+  f->next = NULL;
+  f->filename = strdup(fileinfo->name);
+  f->checksum = NULL;
+  f->resource = NULL;
+  if(fileinfo->checksums) {
+    const metalink_digest_alias *digest_alias;
+    for(digest_alias = digest_aliases; digest_alias->alias_name;
+        ++digest_alias) {
+      metalink_checksum_t **p;
+      for(p = fileinfo->checksums; *p; ++p) {
+        if(Curl_raw_equal(digest_alias->alias_name, (*p)->type) &&
+           check_hex_digest((*p)->hash, digest_alias->digest_def)) {
+          f->checksum =
+            new_metalink_checksum_from_hex_digest(digest_alias->digest_def,
+                                                  (*p)->hash);
+          break;
+        }
+      }
+      if(f->checksum) {
+        break;
+      }
+    }
+  }
+  if(fileinfo->resources) {
+    metalink_resource_t **p;
+    metalink_resource root, *tail;
+    root.next = NULL;
+    tail = &root;
+    for(p = fileinfo->resources; *p; ++p) {
+      metalink_resource *res;
+      /* Filter by type if it is non-NULL. In Metalink v3, type
+         includes the type of the resource. In curl, we are only
+         interested in HTTP, HTTPS and FTP. In addition to them,
+         Metalink v3 file may contain bittorrent type URL, which
+         points to the BitTorrent metainfo file. We ignore it here.
+         In Metalink v4, type was deprecated and all
+         fileinfo->resources point to the target file. BitTorrent
+         metainfo file URL may be appeared in fileinfo->metaurls.
+      */
+      if((*p)->type == NULL ||
+         Curl_raw_equal((*p)->type, "http") ||
+         Curl_raw_equal((*p)->type, "https") ||
+         Curl_raw_equal((*p)->type, "ftp") ||
+         Curl_raw_equal((*p)->type, "ftps")) {
+        res = new_metalink_resource((*p)->url);
+        tail->next = res;
+        tail = res;
+      }
+    }
+    f->resource = root.next;
+  }
+  return f;
+}
+
+int parse_metalink(struct Configurable *config, struct OutStruct *outs,
+                   const char *metalink_url)
+{
+  metalink_error_t r;
+  metalink_t* metalink;
+  metalink_file_t **files;
+  bool warnings = FALSE;
+
+  /* metlaink_parse_final deletes outs->metalink_parser */
+  r = metalink_parse_final(outs->metalink_parser, NULL, 0, &metalink);
+  outs->metalink_parser = NULL;
+  if(r != 0) {
+    return -1;
+  }
+  if(metalink->files == NULL) {
+    fprintf(config->errors, "Metalink: parsing (%s) WARNING "
+            "(missing or invalid file name)\n",
+            metalink_url);
+    metalink_delete(metalink);
+    return -1;
+  }
+  for(files = metalink->files; *files; ++files) {
+    struct getout *url;
+    /* Skip an entry which has no resource. */
+    if(!(*files)->resources) {
+      fprintf(config->errors, "Metalink: parsing (%s) WARNING "
+              "(missing or invalid resource)\n",
+              metalink_url, (*files)->name);
+      continue;
+    }
+    if(config->url_get ||
+       ((config->url_get = config->url_list) != NULL)) {
+      /* there's a node here, if it already is filled-in continue to
+         find an "empty" node */
+      while(config->url_get && (config->url_get->flags & GETOUT_URL))
+        config->url_get = config->url_get->next;
+    }
+
+    /* now there might or might not be an available node to fill in! */
+
+    if(config->url_get)
+      /* existing node */
+      url = config->url_get;
+    else
+      /* there was no free node, create one! */
+      url = new_getout(config);
+
+    if(url) {
+      metalinkfile *mlfile;
+      mlfile = new_metalinkfile(*files);
+      if(!mlfile->checksum) {
+        warnings = TRUE;
+        fprintf(config->errors, "Metalink: parsing (%s) WARNING "
+                "(digest missing)\n",
+                metalink_url);
+      }
+      /* Set name as url */
+      GetStr(&url->url, mlfile->filename);
+
+      /* set flag metalink here */
+      url->flags |= GETOUT_URL | GETOUT_METALINK;
+
+      if(config->metalinkfile_list) {
+        config->metalinkfile_last->next = mlfile;
+        config->metalinkfile_last = mlfile;
+      }
+      else {
+        config->metalinkfile_list = config->metalinkfile_last = mlfile;
+      }
+    }
+  }
+  metalink_delete(metalink);
+  return (warnings) ? -2 : 0;
+}
+
+size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
+                         void *userdata)
+{
+  struct OutStruct *outs = userdata;
+  struct Configurable *config = outs->config;
+  int rv;
+
+  /*
+   * Once that libcurl has called back tool_write_cb() the returned value
+   * is checked against the amount that was intended to be written, if
+   * it does not match then it fails with CURLE_WRITE_ERROR. So at this
+   * point returning a value different from sz*nmemb indicates failure.
+   */
+  const size_t failure = (sz * nmemb) ? 0 : 1;
+
+  if(!config)
+    return failure;
+
+  rv = metalink_parse_update(outs->metalink_parser, buffer, sz *nmemb);
+  if(rv == 0)
+    return sz * nmemb;
+  else {
+    fprintf(config->errors, "Metalink: parsing FAILED\n");
+    return failure;
+  }
+}
+
+/*
+ * Returns nonzero if content_type includes mediatype.
+ */
+static int check_content_type(const char *content_type, const char *media_type)
+{
+  const char *ptr = content_type;
+  size_t media_type_len = strlen(media_type);
+  for(; *ptr && (*ptr == ' ' || *ptr == '\t'); ++ptr);
+  if(!*ptr) {
+    return 0;
+  }
+  return Curl_raw_nequal(ptr, media_type, media_type_len) &&
+    (*(ptr+media_type_len) == '\0' || *(ptr+media_type_len) == ' ' ||
+     *(ptr+media_type_len) == '\t' || *(ptr+media_type_len) == ';');
+}
+
+int check_metalink_content_type(const char *content_type)
+{
+  return check_content_type(content_type, "application/metalink+xml");
+}
+
+int count_next_metalink_resource(metalinkfile *mlfile)
+{
+  int count = 0;
+  metalink_resource *res;
+  for(res = mlfile->resource; res; res = res->next, ++count);
+  return count;
+}
+
+static void delete_metalink_checksum(metalink_checksum *chksum)
+{
+  if(chksum == NULL) {
+    return;
+  }
+  Curl_safefree(chksum->digest);
+  Curl_safefree(chksum);
+}
+
+static void delete_metalink_resource(metalink_resource *res)
+{
+  if(res == NULL) {
+    return;
+  }
+  Curl_safefree(res->url);
+  Curl_safefree(res);
+}
+
+static void delete_metalinkfile(metalinkfile *mlfile)
+{
+  metalink_resource *res;
+  if(mlfile == NULL) {
+    return;
+  }
+  Curl_safefree(mlfile->filename);
+  delete_metalink_checksum(mlfile->checksum);
+  for(res = mlfile->resource; res;) {
+    metalink_resource *next;
+    next = res->next;
+    delete_metalink_resource(res);
+    res = next;
+  }
+  Curl_safefree(mlfile);
+}
+
+void clean_metalink(struct Configurable *config)
+{
+  while(config->metalinkfile_list) {
+    metalinkfile *mlfile = config->metalinkfile_list;
+    config->metalinkfile_list = config->metalinkfile_list->next;
+    delete_metalinkfile(mlfile);
+  }
+  config->metalinkfile_last = 0;
+}
+
+void metalink_cleanup(void)
+{
+#if defined(USE_NSS) && defined(HAVE_NSS_INITCONTEXT)
+  if(nss_context) {
+    NSS_ShutdownContext(nss_context);
+    nss_context = NULL;
+  }
+#endif
+}
+
+#endif /* USE_METALINK */
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
new file mode 100644 (file)
index 0000000..a7ff0e8
--- /dev/null
@@ -0,0 +1,164 @@
+#ifndef HEADER_CURL_TOOL_METALINK_H
+#define HEADER_CURL_TOOL_METALINK_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+/* returns 1 for success, 0 otherwise (we use OpenSSL *_Init fncs directly) */
+typedef int (* Curl_digest_init_func)(void *context);
+
+typedef void (* Curl_digest_update_func)(void *context,
+                                         const unsigned char *data,
+                                         unsigned int len);
+typedef void (* Curl_digest_final_func)(unsigned char *result, void *context);
+
+typedef struct {
+  Curl_digest_init_func     digest_init;   /* Initialize context procedure */
+  Curl_digest_update_func   digest_update; /* Update context with data */
+  Curl_digest_final_func    digest_final;  /* Get final result procedure */
+  unsigned int           digest_ctxtsize;  /* Context structure size */
+  unsigned int           digest_resultlen; /* Result length (bytes) */
+} digest_params;
+
+typedef struct {
+  const digest_params   *digest_hash;      /* Hash function definition */
+  void                  *digest_hashctx;   /* Hash function context */
+} digest_context;
+
+digest_context * Curl_digest_init(const digest_params *dparams);
+int Curl_digest_update(digest_context *context,
+                       const unsigned char *data,
+                       unsigned int len);
+int Curl_digest_final(digest_context *context, unsigned char *result);
+
+typedef struct {
+  const char *hash_name;
+  const digest_params *dparams;
+} metalink_digest_def;
+
+typedef struct {
+  const char *alias_name;
+  const metalink_digest_def *digest_def;
+} metalink_digest_alias;
+
+typedef struct metalink_checksum {
+  const metalink_digest_def *digest_def;
+  /* raw digest value, not ascii hex digest */
+  unsigned char *digest;
+} metalink_checksum;
+
+typedef struct metalink_resource {
+  struct metalink_resource *next;
+  char *url;
+} metalink_resource;
+
+typedef struct metalinkfile {
+  struct metalinkfile *next;
+  char *filename;
+  metalink_checksum *checksum;
+  metalink_resource *resource;
+} metalinkfile;
+
+#ifdef USE_METALINK
+
+/*
+ * curl requires libmetalink 0.1.0 or newer
+ */
+#define CURL_REQ_LIBMETALINK_MAJOR  0
+#define CURL_REQ_LIBMETALINK_MINOR  1
+#define CURL_REQ_LIBMETALINK_PATCH  0
+
+#define CURL_REQ_LIBMETALINK_VERS  ((CURL_REQ_LIBMETALINK_MAJOR * 10000) + \
+                                    (CURL_REQ_LIBMETALINK_MINOR * 100) + \
+                                     CURL_REQ_LIBMETALINK_PATCH)
+
+extern const digest_params MD5_DIGEST_PARAMS[1];
+extern const digest_params SHA1_DIGEST_PARAMS[1];
+extern const digest_params SHA256_DIGEST_PARAMS[1];
+
+#include <metalink/metalink.h>
+
+/*
+ * Counts the resource in the metalinkfile.
+ */
+int count_next_metalink_resource(metalinkfile *mlfile);
+void clean_metalink(struct Configurable *config);
+
+/*
+ * Performs final parse operation and extracts information from
+ * Metalink and creates metalinkfile structs.
+ *
+ * This function returns 0 if it succeeds without warnings, or one of
+ * the following negative error codes:
+ *
+ * -1: Parsing failed; or no file is found
+ * -2: Parsing succeeded with some warnings.
+ */
+int parse_metalink(struct Configurable *config, struct OutStruct *outs,
+                   const char *metalink_url);
+
+/*
+ * Callback function for CURLOPT_WRITEFUNCTION
+ */
+size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
+                         void *userdata);
+
+/*
+ * Returns nonzero if content_type includes "application/metalink+xml"
+ * media-type. The check is done in case-insensitive manner.
+ */
+int check_metalink_content_type(const char *content_type);
+
+/*
+ * Check checksum of file denoted by filename.
+ *
+ * This function returns 1 if the checksum matches or one of the
+ * following integers:
+ *
+ * 0:
+ *   Checksum didn't match.
+ * -1:
+ *   Could not open file; or could not read data from file.
+ * -2:
+ *   No checksum in Metalink supported, hash algorithm not available, or
+ *   Metalink does not contain checksum.
+ */
+int metalink_check_hash(struct Configurable *config,
+                        metalinkfile *mlfile,
+                        const char *filename);
+
+/*
+ * Release resources allocated at global scope.
+ */
+void metalink_cleanup(void);
+
+#else /* USE_METALINK */
+
+#define count_next_metalink_resource(x)  0
+#define clean_metalink(x)  Curl_nop_stmt
+
+/* metalink_cleanup() takes no arguments */
+#define metalink_cleanup() Curl_nop_stmt
+
+#endif /* USE_METALINK */
+
+#endif /* HEADER_CURL_TOOL_METALINK_H */
diff --git a/src/tool_mfiles.c b/src/tool_mfiles.c
new file mode 100644 (file)
index 0000000..3eda45f
--- /dev/null
@@ -0,0 +1,127 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#include "tool_mfiles.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+static void AppendNode(struct multi_files **first,
+                       struct multi_files **last,
+                       struct multi_files  *new)
+{
+  DEBUGASSERT(((*first) && (*last)) || ((!*first) && (!*last)));
+
+  if(*last)
+    (*last)->next = new;
+  else
+    *first = new;
+  *last = new;
+}
+
+/*
+ * AddMultiFiles: Add a new list node possibly followed with a type_name.
+ *
+ * multi_first argument is the address of a pointer to the first element
+ * of the multi_files linked list. A NULL pointer indicates empty list.
+ *
+ * multi_last argument is the address of a pointer to the last element
+ * of the multi_files linked list. A NULL pointer indicates empty list.
+ *
+ * Pointers stored in multi_first and multi_last are modified while
+ * function is executed. An out of memory condition free's the whole
+ * list and returns with pointers stored in multi_first and multi_last
+ * set to NULL and a NULL function result.
+ *
+ * Function returns same pointer as stored at multi_last.
+ */
+
+struct multi_files *AddMultiFiles(const char *file_name,
+                                  const char *type_name,
+                                  const char *show_filename,
+                                  struct multi_files **multi_first,
+                                  struct multi_files **multi_last)
+{
+  struct multi_files *multi;
+  struct multi_files *multi_type;
+  struct multi_files *multi_name;
+
+  multi = calloc(1, sizeof(struct multi_files));
+  if(multi) {
+    multi->form.option = CURLFORM_FILE;
+    multi->form.value = file_name;
+    AppendNode(multi_first, multi_last, multi);
+  }
+  else {
+    FreeMultiInfo(multi_first, multi_last);
+    return NULL;
+  }
+
+  if(type_name) {
+    multi_type = calloc(1, sizeof(struct multi_files));
+    if(multi_type) {
+      multi_type->form.option = CURLFORM_CONTENTTYPE;
+      multi_type->form.value = type_name;
+      AppendNode(multi_first, multi_last, multi_type);
+    }
+    else {
+      FreeMultiInfo(multi_first, multi_last);
+      return NULL;
+    }
+  }
+
+  if(show_filename) {
+    multi_name = calloc(1, sizeof(struct multi_files));
+    if(multi_name) {
+      multi_name->form.option = CURLFORM_FILENAME;
+      multi_name->form.value = show_filename;
+      AppendNode(multi_first, multi_last, multi_name);
+    }
+    else {
+      FreeMultiInfo(multi_first, multi_last);
+      return NULL;
+    }
+  }
+
+  return *multi_last;
+}
+
+/*
+ * FreeMultiInfo: Free the items of the list.
+ */
+
+void FreeMultiInfo(struct multi_files **multi_first,
+                   struct multi_files **multi_last)
+{
+  struct multi_files *next;
+  struct multi_files *item = *multi_first;
+
+  while(item) {
+    next = item->next;
+    Curl_safefree(item);
+    item = next;
+  }
+  *multi_first = NULL;
+  if(multi_last)
+    *multi_last = NULL;
+}
+
diff --git a/src/tool_mfiles.h b/src/tool_mfiles.h
new file mode 100644 (file)
index 0000000..1ea6f4a
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef HEADER_CURL_TOOL_MFILES_H
+#define HEADER_CURL_TOOL_MFILES_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+/*
+ * Structure for storing the information needed to build
+ * a multiple files section.
+ */
+
+struct multi_files {
+  struct curl_forms   form;
+  struct multi_files *next;
+};
+
+struct multi_files *AddMultiFiles(const char *file_name,
+                                  const char *type_name,
+                                  const char *show_filename,
+                                  struct multi_files **multi_first,
+                                  struct multi_files **multi_last);
+
+void FreeMultiInfo(struct multi_files **multi_first,
+                   struct multi_files **multi_last);
+
+#endif /* HEADER_CURL_TOOL_MFILES_H */
+
diff --git a/src/tool_msgs.c b/src/tool_msgs.c
new file mode 100644 (file)
index 0000000..80fdf4e
--- /dev/null
@@ -0,0 +1,100 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_msgs.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#define WARN_PREFIX "Warning: "
+#define WARN_TEXTWIDTH (79 - (int)strlen(WARN_PREFIX))
+
+/*
+ * Emit warning formatted message on configured 'errors' stream unless
+ * mute (--silent) was selected.
+ */
+
+void warnf(struct Configurable *config, const char *fmt, ...)
+{
+  if(!config->mute) {
+    va_list ap;
+    int len;
+    char *ptr;
+    char print_buffer[256];
+
+    va_start(ap, fmt);
+    len = vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap);
+    va_end(ap);
+
+    ptr = print_buffer;
+    while(len > 0) {
+      fputs(WARN_PREFIX, config->errors);
+
+      if(len > (int)WARN_TEXTWIDTH) {
+        int cut = WARN_TEXTWIDTH-1;
+
+        while(!ISSPACE(ptr[cut]) && cut) {
+          cut--;
+        }
+        if(0 == cut)
+          /* not a single cutting position was found, just cut it at the
+             max text width then! */
+          cut = WARN_TEXTWIDTH-1;
+
+        (void)fwrite(ptr, cut + 1, 1, config->errors);
+        fputs("\n", config->errors);
+        ptr += cut+1; /* skip the space too */
+        len -= cut;
+      }
+      else {
+        fputs(ptr, config->errors);
+        len = 0;
+      }
+    }
+  }
+}
+
+/*
+ * Emit help formatted message on given stream.
+ */
+
+void helpf(FILE *errors, const char *fmt, ...)
+{
+  va_list ap;
+  if(fmt) {
+    va_start(ap, fmt);
+    fputs("curl: ", errors); /* prefix it */
+    vfprintf(errors, fmt, ap);
+    va_end(ap);
+  }
+  fprintf(errors, "curl: try 'curl --help' "
+#ifdef USE_MANUAL
+          "or 'curl --manual' "
+#endif
+          "for more information\n");
+}
+
diff --git a/src/tool_msgs.h b/src/tool_msgs.h
new file mode 100644 (file)
index 0000000..7b06089
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef HEADER_CURL_TOOL_MSGS_H
+#define HEADER_CURL_TOOL_MSGS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+void warnf(struct Configurable *config, const char *fmt, ...);
+
+void helpf(FILE *errors, const char *fmt, ...);
+
+#endif /* HEADER_CURL_TOOL_MSGS_H */
+
diff --git a/src/tool_operate.c b/src/tool_operate.c
new file mode 100644 (file)
index 0000000..ed60e70
--- /dev/null
@@ -0,0 +1,1875 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#ifdef HAVE_FCNTL_H
+#  include <fcntl.h>
+#endif
+
+#ifdef HAVE_UTIME_H
+#  include <utime.h>
+#elif defined(HAVE_SYS_UTIME_H)
+#  include <sys/utime.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+#  include <locale.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
+#  include <netinet/tcp.h>
+#endif
+
+#ifdef __VMS
+#  include <fabdef.h>
+#endif
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_binmode.h"
+#include "tool_cfgable.h"
+#include "tool_cb_dbg.h"
+#include "tool_cb_hdr.h"
+#include "tool_cb_prg.h"
+#include "tool_cb_rea.h"
+#include "tool_cb_see.h"
+#include "tool_cb_wrt.h"
+#include "tool_dirhie.h"
+#include "tool_doswin.h"
+#include "tool_easysrc.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+#include "tool_homedir.h"
+#include "tool_libinfo.h"
+#include "tool_main.h"
+#include "tool_metalink.h"
+#include "tool_msgs.h"
+#include "tool_operate.h"
+#include "tool_operhlp.h"
+#include "tool_parsecfg.h"
+#include "tool_setopt.h"
+#include "tool_sleep.h"
+#include "tool_urlglob.h"
+#include "tool_util.h"
+#include "tool_writeenv.h"
+#include "tool_writeout.h"
+#include "tool_xattr.h"
+#include "tool_vms.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#define CURLseparator  "--_curl_--"
+
+#ifndef O_BINARY
+/* since O_BINARY as used in bitmasks, setting it to zero makes it usable in
+   source code but yet it doesn't ruin anything */
+#  define O_BINARY 0
+#endif
+
+#define CURL_CA_CERT_ERRORMSG1                                              \
+  "More details here: http://curl.haxx.se/docs/sslcerts.html\n\n"           \
+  "curl performs SSL certificate verification by default, "                 \
+  "using a \"bundle\"\n"                                                    \
+  " of Certificate Authority (CA) public keys (CA certs). If the default\n" \
+  " bundle file isn't adequate, you can specify an alternate file\n"        \
+  " using the --cacert option.\n"
+
+#define CURL_CA_CERT_ERRORMSG2                                              \
+  "If this HTTPS server uses a certificate signed by a CA represented in\n" \
+  " the bundle, the certificate verification probably failed due to a\n"    \
+  " problem with the certificate (it might be expired, or the name might\n" \
+  " not match the domain name in the URL).\n"                               \
+  "If you'd like to turn off curl's verification of the certificate, use\n" \
+  " the -k (or --insecure) option.\n"
+
+static int is_fatal_error(int code)
+{
+  switch(code) {
+  /* TODO: Should CURLE_SSL_CACERT be included as critical error ? */
+  case CURLE_FAILED_INIT:
+  case CURLE_OUT_OF_MEMORY:
+  case CURLE_UNKNOWN_OPTION:
+  case CURLE_FUNCTION_NOT_FOUND:
+  case CURLE_BAD_FUNCTION_ARGUMENT:
+    /* critical error */
+    return 1;
+  default:
+    break;
+  }
+  /* no error or not critical */
+  return 0;
+}
+
+#ifdef __VMS
+/*
+ * get_vms_file_size does what it takes to get the real size of the file
+ *
+ * For fixed files, find out the size of the EOF block and adjust.
+ *
+ * For all others, have to read the entire file in, discarding the contents.
+ * Most posted text files will be small, and binary files like zlib archives
+ * and CD/DVD images should be either a STREAM_LF format or a fixed format.
+ *
+ */
+static curl_off_t vms_realfilesize(const char * name,
+                                   const struct_stat * stat_buf)
+{
+  char buffer[8192];
+  curl_off_t count;
+  int ret_stat;
+  FILE * file;
+
+  file = fopen(name, "r");
+  if(file == NULL) {
+    return 0;
+  }
+  count = 0;
+  ret_stat = 1;
+  while(ret_stat > 0) {
+    ret_stat = fread(buffer, 1, sizeof(buffer), file);
+    if(ret_stat != 0)
+      count += ret_stat;
+  }
+  fclose(file);
+
+  return count;
+}
+
+/*
+ *
+ *  VmsSpecialSize checks to see if the stat st_size can be trusted and
+ *  if not to call a routine to get the correct size.
+ *
+ */
+static curl_off_t VmsSpecialSize(const char * name,
+                                 const struct_stat * stat_buf)
+{
+  switch(stat_buf->st_fab_rfm) {
+  case FAB$C_VAR:
+  case FAB$C_VFC:
+    return vms_realfilesize(name, stat_buf);
+    break;
+  default:
+    return stat_buf->st_size;
+  }
+}
+#endif /* __VMS */
+
+
+int operate(struct Configurable *config, int argc, argv_item_t argv[])
+{
+  char errorbuffer[CURL_ERROR_SIZE];
+  struct ProgressData progressbar;
+  struct getout *urlnode;
+
+  struct HdrCbData hdrcbdata;
+  struct OutStruct heads;
+
+  metalinkfile *mlfile_last = NULL;
+
+  CURL *curl = NULL;
+  char *httpgetfields = NULL;
+
+  bool stillflags;
+  int res = 0;
+  int i;
+
+  bool orig_noprogress;
+  bool orig_isatty;
+
+  errorbuffer[0] = '\0';
+  /* default headers output stream is stdout */
+  memset(&hdrcbdata, 0, sizeof(struct HdrCbData));
+  memset(&heads, 0, sizeof(struct OutStruct));
+  heads.stream = stdout;
+  heads.config = config;
+
+  memory_tracking_init();
+
+  /*
+  ** Initialize curl library - do not call any libcurl functions before
+  ** this point. Note that the memory_tracking_init() magic above is an
+  ** exception, but then that's not part of the official public API.
+  */
+  if(main_init() != CURLE_OK) {
+    helpf(config->errors, "error initializing curl library\n");
+    return CURLE_FAILED_INIT;
+  }
+
+  /* Get libcurl info right away */
+  if(get_libcurl_info() != CURLE_OK) {
+    helpf(config->errors, "error retrieving curl library information\n");
+    main_free();
+    return CURLE_FAILED_INIT;
+  }
+
+  /* Get a curl handle to use for all forthcoming curl transfers */
+  curl = curl_easy_init();
+  if(!curl) {
+    helpf(config->errors, "error initializing curl easy handle\n");
+    main_free();
+    return CURLE_FAILED_INIT;
+  }
+  config->easy = curl;
+
+  /*
+  ** Beyond this point no return'ing from this function allowed.
+  ** Jump to label 'quit_curl' in order to abandon this function
+  ** from outside of nested loops further down below.
+  */
+
+  /* setup proper locale from environment */
+#ifdef HAVE_SETLOCALE
+  setlocale(LC_ALL, "");
+#endif
+
+  /* inits */
+  config->postfieldsize = -1;
+  config->showerror = -1; /* will show errors */
+  config->use_httpget = FALSE;
+  config->create_dirs = FALSE;
+  config->maxredirs = DEFAULT_MAXREDIRS;
+  config->proto = CURLPROTO_ALL; /* FIXME: better to read from library */
+  config->proto_present = FALSE;
+  config->proto_redir =
+    CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
+  config->proto_redir_present = FALSE;
+
+  if((argc > 1) &&
+     (!curlx_strnequal("--", argv[1], 2) && (argv[1][0] == '-')) &&
+     strchr(argv[1], 'q')) {
+    /*
+     * The first flag, that is not a verbose name, but a shortname
+     * and it includes the 'q' flag!
+     */
+    ;
+  }
+  else {
+    parseconfig(NULL, config); /* ignore possible failure */
+  }
+
+  if((argc < 2)  && !config->url_list) {
+    helpf(config->errors, NULL);
+    res = CURLE_FAILED_INIT;
+    goto quit_curl;
+  }
+
+  /* Parse options */
+  for(i = 1, stillflags = TRUE; i < argc; i++) {
+    if(stillflags &&
+       ('-' == argv[i][0])) {
+      char *nextarg;
+      bool passarg;
+      char *orig_opt = argv[i];
+
+      char *flag = argv[i];
+
+      if(curlx_strequal("--", argv[i]))
+        /* this indicates the end of the flags and thus enables the
+           following (URL) argument to start with -. */
+        stillflags = FALSE;
+      else {
+        nextarg = (i < (argc-1)) ? argv[i+1] : NULL;
+
+        res = getparameter(flag, nextarg, &passarg, config);
+        if(res) {
+          int retval = CURLE_OK;
+          if(res != PARAM_HELP_REQUESTED) {
+            const char *reason = param2text(res);
+            helpf(config->errors, "option %s: %s\n", orig_opt, reason);
+            retval = CURLE_FAILED_INIT;
+          }
+          res = retval;
+          goto quit_curl;
+        }
+
+        if(passarg) /* we're supposed to skip this */
+          i++;
+      }
+    }
+    else {
+      bool used;
+      /* just add the URL please */
+      res = getparameter((char *)"--url", argv[i], &used, config);
+      if(res)
+        goto quit_curl;
+    }
+  }
+
+  if((!config->url_list || !config->url_list->url) && !config->list_engines) {
+    helpf(config->errors, "no URL specified!\n");
+    res = CURLE_FAILED_INIT;
+    goto quit_curl;
+  }
+
+  if(!config->useragent)
+    config->useragent = my_useragent();
+  if(!config->useragent) {
+    helpf(config->errors, "out of memory\n");
+    res = CURLE_OUT_OF_MEMORY;
+    goto quit_curl;
+  }
+
+  /* On WIN32 we can't set the path to curl-ca-bundle.crt
+   * at compile time. So we look here for the file in two ways:
+   * 1: look at the environment variable CURL_CA_BUNDLE for a path
+   * 2: if #1 isn't found, use the windows API function SearchPath()
+   *    to find it along the app's path (includes app's dir and CWD)
+   *
+   * We support the environment variable thing for non-Windows platforms
+   * too. Just for the sake of it.
+   */
+  if(!config->cacert &&
+     !config->capath &&
+     !config->insecure_ok) {
+    char *env;
+    env = curlx_getenv("CURL_CA_BUNDLE");
+    if(env) {
+      config->cacert = strdup(env);
+      if(!config->cacert) {
+        curl_free(env);
+        helpf(config->errors, "out of memory\n");
+        res = CURLE_OUT_OF_MEMORY;
+        goto quit_curl;
+      }
+    }
+    else {
+      env = curlx_getenv("SSL_CERT_DIR");
+      if(env) {
+        config->capath = strdup(env);
+        if(!config->capath) {
+          curl_free(env);
+          helpf(config->errors, "out of memory\n");
+          res = CURLE_OUT_OF_MEMORY;
+          goto quit_curl;
+        }
+      }
+      else {
+        env = curlx_getenv("SSL_CERT_FILE");
+        if(env) {
+          config->cacert = strdup(env);
+          if(!config->cacert) {
+            curl_free(env);
+            helpf(config->errors, "out of memory\n");
+            res = CURLE_OUT_OF_MEMORY;
+            goto quit_curl;
+          }
+        }
+      }
+    }
+
+    if(env)
+      curl_free(env);
+#ifdef WIN32
+    else {
+      res = FindWin32CACert(config, "curl-ca-bundle.crt");
+      if(res)
+        goto quit_curl;
+    }
+#endif
+  }
+
+  if(config->postfields) {
+    if(config->use_httpget) {
+      /* Use the postfields data for a http get */
+      httpgetfields = strdup(config->postfields);
+      Curl_safefree(config->postfields);
+      if(!httpgetfields) {
+        helpf(config->errors, "out of memory\n");
+        res = CURLE_OUT_OF_MEMORY;
+        goto quit_curl;
+      }
+      if(SetHTTPrequest(config,
+                        (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
+                        &config->httpreq)) {
+        res = PARAM_BAD_USE;
+        goto quit_curl;
+      }
+    }
+    else {
+      if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) {
+        res = PARAM_BAD_USE;
+        goto quit_curl;
+      }
+    }
+  }
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+  res = easysrc_init();
+  if(res) {
+    helpf(config->errors, "out of memory\n");
+    goto quit_curl;
+  }
+#endif
+
+  if(config->list_engines) {
+    struct curl_slist *engines = NULL;
+    curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
+    list_engines(engines);
+    curl_slist_free_all(engines);
+    res = CURLE_OK;
+    goto quit_curl;
+  }
+
+  /* Single header file for all URLs */
+  if(config->headerfile) {
+    /* open file for output: */
+    if(!curlx_strequal(config->headerfile, "-")) {
+      FILE *newfile = fopen(config->headerfile, "wb");
+      if(!newfile) {
+        warnf(config, "Failed to open %s\n", config->headerfile);
+        res = CURLE_WRITE_ERROR;
+        goto quit_curl;
+      }
+      else {
+        heads.filename = config->headerfile;
+        heads.s_isreg = TRUE;
+        heads.fopened = TRUE;
+        heads.stream = newfile;
+      }
+    }
+  }
+
+  /* save the values of noprogress and isatty to restore them later on */
+  orig_noprogress = config->noprogress;
+  orig_isatty = config->isatty;
+
+  /*
+  ** Nested loops start here.
+  */
+
+  /* loop through the list of given URLs */
+
+  for(urlnode = config->url_list; urlnode; urlnode = urlnode->next) {
+
+    int up; /* upload file counter within a single upload glob */
+    char *infiles; /* might be a glob pattern */
+    char *outfiles;
+    int infilenum;
+    URLGlob *inglob;
+
+    int metalink = 0; /* nonzero for metalink download. */
+    metalinkfile *mlfile;
+    metalink_resource *mlres;
+
+    outfiles = NULL;
+    infilenum = 1;
+    inglob = NULL;
+
+    if(urlnode->flags & GETOUT_METALINK) {
+      metalink = 1;
+      if(mlfile_last == NULL) {
+        mlfile_last = config->metalinkfile_list;
+      }
+      mlfile = mlfile_last;
+      mlfile_last = mlfile_last->next;
+      mlres = mlfile->resource;
+    }
+    else {
+      mlfile = NULL;
+      mlres = NULL;
+    }
+
+    /* urlnode->url is the full URL (it might be NULL) */
+
+    if(!urlnode->url) {
+      /* This node has no URL. Free node data without destroying the
+         node itself nor modifying next pointer and continue to next */
+      Curl_safefree(urlnode->outfile);
+      Curl_safefree(urlnode->infile);
+      urlnode->flags = 0;
+      continue; /* next URL please */
+    }
+
+    /* save outfile pattern before expansion */
+    if(urlnode->outfile) {
+      outfiles = strdup(urlnode->outfile);
+      if(!outfiles) {
+        helpf(config->errors, "out of memory\n");
+        res = CURLE_OUT_OF_MEMORY;
+        break;
+      }
+    }
+
+    infiles = urlnode->infile;
+
+    if(!config->globoff && infiles) {
+      /* Unless explicitly shut off */
+      res = glob_url(&inglob, infiles, &infilenum,
+                     config->showerror?config->errors:NULL);
+      if(res) {
+        Curl_safefree(outfiles);
+        break;
+      }
+    }
+
+    /* Here's the loop for uploading multiple files within the same
+       single globbed string. If no upload, we enter the loop once anyway. */
+    for(up = 0 ; up < infilenum; up++) {
+
+      char *uploadfile; /* a single file, never a glob */
+      int separator;
+      URLGlob *urls;
+      int urlnum;
+
+      uploadfile = NULL;
+      urls = NULL;
+      urlnum = 0;
+
+      if(!up && !infiles)
+        Curl_nop_stmt;
+      else {
+        if(inglob) {
+          res = glob_next_url(&uploadfile, inglob);
+          if(res == CURLE_OUT_OF_MEMORY)
+            helpf(config->errors, "out of memory\n");
+        }
+        else if(!up) {
+          uploadfile = strdup(infiles);
+          if(!uploadfile) {
+            helpf(config->errors, "out of memory\n");
+            res = CURLE_OUT_OF_MEMORY;
+          }
+        }
+        else
+          uploadfile = NULL;
+        if(!uploadfile)
+          break;
+      }
+
+      if(metalink) {
+        /* For Metalink download, we don't use glob. Instead we use
+           the number of resources as urlnum. */
+        urlnum = count_next_metalink_resource(mlfile);
+      }
+      else
+      if(!config->globoff) {
+        /* Unless explicitly shut off, we expand '{...}' and '[...]'
+           expressions and return total number of URLs in pattern set */
+        res = glob_url(&urls, urlnode->url, &urlnum,
+                       config->showerror?config->errors:NULL);
+        if(res) {
+          Curl_safefree(uploadfile);
+          break;
+        }
+      }
+      else
+        urlnum = 1; /* without globbing, this is a single URL */
+
+      /* if multiple files extracted to stdout, insert separators! */
+      separator= ((!outfiles || curlx_strequal(outfiles, "-")) && urlnum > 1);
+
+      /* Here's looping around each globbed URL */
+      for(i = 0 ; i < urlnum; i++) {
+
+        int infd;
+        bool infdopen;
+        char *outfile;
+        struct OutStruct outs;
+        struct InStruct input;
+        struct timeval retrystart;
+        curl_off_t uploadfilesize;
+        long retry_numretries;
+        long retry_sleep_default;
+        long retry_sleep;
+        char *this_url = NULL;
+        int metalink_next_res = 0;
+
+        outfile = NULL;
+        infdopen = FALSE;
+        infd = STDIN_FILENO;
+        uploadfilesize = -1; /* -1 means unknown */
+
+        /* default output stream is stdout */
+        memset(&outs, 0, sizeof(struct OutStruct));
+        outs.stream = stdout;
+        outs.config = config;
+
+        if(metalink) {
+          /* For Metalink download, use name in Metalink file as
+             filename. */
+          outfile = strdup(mlfile->filename);
+          if(!outfile) {
+            res = CURLE_OUT_OF_MEMORY;
+            goto show_error;
+          }
+          this_url = strdup(mlres->url);
+          if(!this_url) {
+            res = CURLE_OUT_OF_MEMORY;
+            goto show_error;
+          }
+        }
+        else {
+          if(urls) {
+            res = glob_next_url(&this_url, urls);
+            if(res)
+              goto show_error;
+          }
+          else if(!i) {
+            this_url = strdup(urlnode->url);
+            if(!this_url) {
+              res = CURLE_OUT_OF_MEMORY;
+              goto show_error;
+            }
+          }
+          else
+            this_url = NULL;
+          if(!this_url)
+            break;
+
+          if(outfiles) {
+            outfile = strdup(outfiles);
+            if(!outfile) {
+              res = CURLE_OUT_OF_MEMORY;
+              goto show_error;
+            }
+          }
+        }
+
+        if(((urlnode->flags&GETOUT_USEREMOTE) ||
+            (outfile && !curlx_strequal("-", outfile))) &&
+           (metalink || !config->use_metalink)) {
+
+          /*
+           * We have specified a file name to store the result in, or we have
+           * decided we want to use the remote file name.
+           */
+
+          if(!outfile) {
+            /* extract the file name from the URL */
+            res = get_url_file_name(&outfile, this_url);
+            if(res)
+              goto show_error;
+            if((!outfile || !*outfile) && !config->content_disposition) {
+              helpf(config->errors, "Remote file name has no length!\n");
+              res = CURLE_WRITE_ERROR;
+              goto quit_urls;
+            }
+#if defined(MSDOS) || defined(WIN32)
+            /* For DOS and WIN32, we do some major replacing of
+               bad characters in the file name before using it */
+            outfile = sanitize_dos_name(outfile);
+            if(!outfile) {
+              res = CURLE_OUT_OF_MEMORY;
+              goto show_error;
+            }
+#endif /* MSDOS || WIN32 */
+          }
+          else if(urls) {
+            /* fill '#1' ... '#9' terms from URL pattern */
+            char *storefile = outfile;
+            res = glob_match_url(&outfile, storefile, urls);
+            Curl_safefree(storefile);
+            if(res) {
+              /* bad globbing */
+              warnf(config, "bad output glob!\n");
+              goto quit_urls;
+            }
+          }
+
+          /* Create the directory hierarchy, if not pre-existent to a multiple
+             file output call */
+
+          if(config->create_dirs || metalink) {
+            res = create_dir_hierarchy(outfile, config->errors);
+            /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */
+            if(res == CURLE_WRITE_ERROR)
+              goto quit_urls;
+            if(res) {
+              goto show_error;
+            }
+          }
+
+          if((urlnode->flags & GETOUT_USEREMOTE)
+             && config->content_disposition) {
+            /* Our header callback MIGHT set the filename */
+            DEBUGASSERT(!outs.filename);
+          }
+
+          if(config->resume_from_current) {
+            /* We're told to continue from where we are now. Get the size
+               of the file as it is now and open it for append instead */
+            struct_stat fileinfo;
+            /* VMS -- Danger, the filesize is only valid for stream files */
+            if(0 == stat(outfile, &fileinfo))
+              /* set offset to current file size: */
+              config->resume_from = fileinfo.st_size;
+            else
+              /* let offset be 0 */
+              config->resume_from = 0;
+          }
+
+          if(config->resume_from) {
+#ifdef __VMS
+            /* open file for output, forcing VMS output format into stream
+               mode which is needed for stat() call above to always work. */
+            FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
+                               "ctx=stm", "rfm=stmlf", "rat=cr", "mrs=0");
+#else
+            /* open file for output: */
+            FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
+#endif
+            if(!file) {
+              helpf(config->errors, "Can't open '%s'!\n", outfile);
+              res = CURLE_WRITE_ERROR;
+              goto quit_urls;
+            }
+            outs.fopened = TRUE;
+            outs.stream = file;
+            outs.init = config->resume_from;
+          }
+          else {
+            outs.stream = NULL; /* open when needed */
+          }
+          outs.filename = outfile;
+          outs.s_isreg = TRUE;
+        }
+
+        if(uploadfile && !stdin_upload(uploadfile)) {
+          /*
+           * We have specified a file to upload and it isn't "-".
+           */
+          struct_stat fileinfo;
+
+          this_url = add_file_name_to_url(curl, this_url, uploadfile);
+          if(!this_url) {
+            res = CURLE_OUT_OF_MEMORY;
+            goto show_error;
+          }
+          /* VMS Note:
+           *
+           * Reading binary from files can be a problem...  Only FIXED, VAR
+           * etc WITHOUT implied CC will work Others need a \n appended to a
+           * line
+           *
+           * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a
+           * fixed file with implied CC needs to have a byte added for every
+           * record processed, this can by derived from Filesize & recordsize
+           * for VARiable record files the records need to be counted!  for
+           * every record add 1 for linefeed and subtract 2 for the record
+           * header for VARIABLE header files only the bare record data needs
+           * to be considered with one appended if implied CC
+           */
+#ifdef __VMS
+          /* Calculate the real upload site for VMS */
+          infd = -1;
+          if(stat(uploadfile, &fileinfo) == 0) {
+            fileinfo.st_size = VmsSpecialSize(uploadfile, &fileinfo);
+            switch (fileinfo.st_fab_rfm) {
+            case FAB$C_VAR:
+            case FAB$C_VFC:
+            case FAB$C_STMCR:
+              infd = open(uploadfile, O_RDONLY | O_BINARY);
+              break;
+            default:
+              infd = open(uploadfile, O_RDONLY | O_BINARY,
+                          "rfm=stmlf", "ctx=stm");
+            }
+          }
+          if(infd == -1)
+#else
+          infd = open(uploadfile, O_RDONLY | O_BINARY);
+          if((infd == -1) || fstat(infd, &fileinfo))
+#endif
+          {
+            helpf(config->errors, "Can't open '%s'!\n", uploadfile);
+            if(infd != -1) {
+              close(infd);
+              infd = STDIN_FILENO;
+            }
+            res = CURLE_READ_ERROR;
+            goto quit_urls;
+          }
+          infdopen = TRUE;
+
+          /* we ignore file size for char/block devices, sockets, etc. */
+          if(S_ISREG(fileinfo.st_mode))
+            uploadfilesize = fileinfo.st_size;
+
+        }
+        else if(uploadfile && stdin_upload(uploadfile)) {
+          /* count to see if there are more than one auth bit set
+             in the authtype field */
+          int authbits = 0;
+          int bitcheck = 0;
+          while(bitcheck < 32) {
+            if(config->authtype & (1UL << bitcheck++)) {
+              authbits++;
+              if(authbits > 1) {
+                /* more than one, we're done! */
+                break;
+              }
+            }
+          }
+
+          /*
+           * If the user has also selected --anyauth or --proxy-anyauth
+           * we should warn him/her.
+           */
+          if(config->proxyanyauth || (authbits>1)) {
+            warnf(config,
+                  "Using --anyauth or --proxy-anyauth with upload from stdin"
+                  " involves a big risk of it not working. Use a temporary"
+                  " file or a fixed auth type instead!\n");
+          }
+
+          DEBUGASSERT(infdopen == FALSE);
+          DEBUGASSERT(infd == STDIN_FILENO);
+
+          set_binmode(stdin);
+          if(curlx_strequal(uploadfile, ".")) {
+            if(curlx_nonblock((curl_socket_t)infd, TRUE) < 0)
+              warnf(config,
+                    "fcntl failed on fd=%d: %s\n", infd, strerror(errno));
+          }
+        }
+
+        if(uploadfile && config->resume_from_current)
+          config->resume_from = -1; /* -1 will then force get-it-yourself */
+
+        if(output_expected(this_url, uploadfile)
+           && outs.stream && isatty(fileno(outs.stream)))
+          /* we send the output to a tty, therefore we switch off the progress
+             meter */
+          config->noprogress = config->isatty = TRUE;
+        else {
+          /* progress meter is per download, so restore config
+             values */
+          config->noprogress = orig_noprogress;
+          config->isatty = orig_isatty;
+        }
+
+        if(urlnum > 1 && !(config->mute)) {
+          fprintf(config->errors, "\n[%d/%d]: %s --> %s\n",
+                  i+1, urlnum, this_url, outfile ? outfile : "<stdout>");
+          if(separator)
+            printf("%s%s\n", CURLseparator, this_url);
+        }
+        if(httpgetfields) {
+          char *urlbuffer;
+          /* Find out whether the url contains a file name */
+          const char *pc = strstr(this_url, "://");
+          char sep = '?';
+          if(pc)
+            pc += 3;
+          else
+            pc = this_url;
+
+          pc = strrchr(pc, '/'); /* check for a slash */
+
+          if(pc) {
+            /* there is a slash present in the URL */
+
+            if(strchr(pc, '?'))
+              /* Ouch, there's already a question mark in the URL string, we
+                 then append the data with an ampersand separator instead! */
+              sep='&';
+          }
+          /*
+           * Then append ? followed by the get fields to the url.
+           */
+          if(pc)
+            urlbuffer = aprintf("%s%c%s", this_url, sep, httpgetfields);
+          else
+            /* Append  / before the ? to create a well-formed url
+               if the url contains a hostname only
+            */
+            urlbuffer = aprintf("%s/?%s", this_url, httpgetfields);
+
+          if(!urlbuffer) {
+            res = CURLE_OUT_OF_MEMORY;
+            goto show_error;
+          }
+
+          Curl_safefree(this_url); /* free previous URL */
+          this_url = urlbuffer; /* use our new URL instead! */
+        }
+
+        if(!config->errors)
+          config->errors = stderr;
+
+        if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) {
+          /* We get the output to stdout and we have not got the ASCII/text
+             flag, then set stdout to be binary */
+          set_binmode(stdout);
+        }
+
+        if(config->tcp_nodelay)
+          my_setopt(curl, CURLOPT_TCP_NODELAY, 1L);
+
+        /* where to store */
+        my_setopt(curl, CURLOPT_WRITEDATA, &outs);
+        if(metalink || !config->use_metalink)
+          /* what call to write */
+          my_setopt(curl, CURLOPT_WRITEFUNCTION, tool_write_cb);
+#ifdef USE_METALINK
+        else
+          /* Set Metalink specific write callback function to parse
+             XML data progressively. */
+          my_setopt(curl, CURLOPT_WRITEFUNCTION, metalink_write_cb);
+#endif /* USE_METALINK */
+
+        /* for uploads */
+        input.fd = infd;
+        input.config = config;
+        /* Note that if CURLOPT_READFUNCTION is fread (the default), then
+         * lib/telnet.c will Curl_poll() on the input file descriptor
+         * rather then calling the READFUNCTION at regular intervals.
+         * The circumstances in which it is preferable to enable this
+         * behaviour, by omitting to set the READFUNCTION & READDATA options,
+         * have not been determined.
+         */
+        my_setopt(curl, CURLOPT_READDATA, &input);
+        /* what call to read */
+        my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb);
+
+        /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what
+           CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */
+        my_setopt(curl, CURLOPT_SEEKDATA, &input);
+        my_setopt(curl, CURLOPT_SEEKFUNCTION, tool_seek_cb);
+
+        if(config->recvpersecond)
+          /* tell libcurl to use a smaller sized buffer as it allows us to
+             make better sleeps! 7.9.9 stuff! */
+          my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond);
+
+        /* size of uploaded file: */
+        if(uploadfilesize != -1)
+          my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
+        my_setopt_str(curl, CURLOPT_URL, this_url);     /* what to fetch */
+        my_setopt(curl, CURLOPT_NOPROGRESS, config->noprogress?1L:0L);
+        if(config->no_body) {
+          my_setopt(curl, CURLOPT_NOBODY, 1L);
+          my_setopt(curl, CURLOPT_HEADER, 1L);
+        }
+        /* If --metalink is used, we ignore --include (headers in
+           output) option because mixing headers to the body will
+           confuse XML parser and/or hash check will fail. */
+        else if(!config->use_metalink)
+          my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L);
+
+#if !defined(CURL_DISABLE_PROXY)
+        {
+          /* TODO: Make this a run-time check instead of compile-time one. */
+
+          my_setopt_str(curl, CURLOPT_PROXY, config->proxy);
+          my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
+
+          /* new in libcurl 7.3 */
+          my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
+
+          /* new in libcurl 7.5 */
+          if(config->proxy)
+            my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver);
+
+          /* new in libcurl 7.10 */
+          if(config->socksproxy) {
+            my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
+            my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->socksver);
+          }
+
+          /* new in libcurl 7.10.6 */
+          if(config->proxyanyauth)
+            my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+                              (long)CURLAUTH_ANY);
+          else if(config->proxynegotiate)
+            my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+                              (long)CURLAUTH_GSSNEGOTIATE);
+          else if(config->proxyntlm)
+            my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+                              (long)CURLAUTH_NTLM);
+          else if(config->proxydigest)
+            my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+                              (long)CURLAUTH_DIGEST);
+          else if(config->proxybasic)
+            my_setopt_bitmask(curl, CURLOPT_PROXYAUTH,
+                              (long)CURLAUTH_BASIC);
+
+          /* new in libcurl 7.19.4 */
+          my_setopt(curl, CURLOPT_NOPROXY, config->noproxy);
+        }
+#endif
+
+        my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror?1L:0L);
+        my_setopt(curl, CURLOPT_UPLOAD, uploadfile?1L:0L);
+        my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly?1L:0L);
+        my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L);
+
+        if(config->netrc_opt)
+          my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_OPTIONAL);
+        else if(config->netrc || config->netrc_file)
+          my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
+        else
+          my_setopt_enum(curl, CURLOPT_NETRC, (long)CURL_NETRC_IGNORED);
+
+        if(config->netrc_file)
+          my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file);
+
+        my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L);
+        my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
+        my_setopt_str(curl, CURLOPT_RANGE, config->range);
+        my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
+        my_setopt(curl, CURLOPT_TIMEOUT_MS, (long)(config->timeout * 1000));
+
+        if(built_in_protos & CURLPROTO_HTTP) {
+
+          long postRedir = 0;
+
+          my_setopt(curl, CURLOPT_FOLLOWLOCATION,
+                    config->followlocation?1L:0L);
+          my_setopt(curl, CURLOPT_UNRESTRICTED_AUTH,
+                    config->unrestricted_auth?1L:0L);
+
+          switch(config->httpreq) {
+          case HTTPREQ_SIMPLEPOST:
+            my_setopt_str(curl, CURLOPT_POSTFIELDS,
+                          config->postfields);
+            my_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE,
+                      config->postfieldsize);
+            break;
+          case HTTPREQ_POST:
+            my_setopt_httppost(curl, CURLOPT_HTTPPOST, config->httppost);
+            break;
+          default:
+            break;
+          }
+
+          my_setopt_str(curl, CURLOPT_REFERER, config->referer);
+          my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer?1L:0L);
+          my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
+          my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers);
+
+          /* new in libcurl 7.5 */
+          my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
+
+          /* new in libcurl 7.9.1 */
+          if(config->httpversion)
+            my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
+
+          /* new in libcurl 7.10.6 (default is Basic) */
+          if(config->authtype)
+            my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype);
+
+          /* curl 7.19.1 (the 301 version existed in 7.18.2),
+             303 was added in 7.26.0 */
+          if(config->post301)
+            postRedir |= CURL_REDIR_POST_301;
+          if(config->post302)
+            postRedir |= CURL_REDIR_POST_302;
+          if(config->post303)
+            postRedir |= CURL_REDIR_POST_303;
+          my_setopt(curl, CURLOPT_POSTREDIR, postRedir);
+
+          /* new in libcurl 7.21.6 */
+          if(config->encoding)
+            my_setopt_str(curl, CURLOPT_ACCEPT_ENCODING, "");
+
+          /* new in libcurl 7.21.6 */
+          if(config->tr_encoding)
+            my_setopt(curl, CURLOPT_TRANSFER_ENCODING, 1L);
+
+        } /* (built_in_protos & CURLPROTO_HTTP) */
+
+        my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
+        my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT,
+                  config->low_speed_limit);
+        my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
+        my_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE,
+                  config->sendpersecond);
+        my_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE,
+                  config->recvpersecond);
+
+        if(config->use_resume)
+          my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from);
+        else
+          my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, CURL_OFF_T_C(0));
+
+        my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
+        my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
+        my_setopt_str(curl, CURLOPT_SSLKEY, config->key);
+        my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
+        my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
+
+        if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) {
+
+          /* SSH and SSL private key uses same command-line option */
+          /* new in libcurl 7.16.1 */
+          my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
+          /* new in libcurl 7.16.1 */
+          my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
+
+          /* new in libcurl 7.17.1: SSH host key md5 checking allows us
+             to fail if we are not talking to who we think we should */
+          my_setopt_str(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
+                        config->hostpubmd5);
+        }
+
+        if(config->cacert)
+          my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
+        if(config->capath)
+          my_setopt_str(curl, CURLOPT_CAPATH, config->capath);
+        if(config->crlfile)
+          my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile);
+
+        if(curlinfo->features & CURL_VERSION_SSL) {
+          if(config->insecure_ok) {
+            my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+            my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+          }
+          else {
+            my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+            /* libcurl default is strict verifyhost -> 2L   */
+            /* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); */
+          }
+        }
+
+        if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) {
+          if(!config->insecure_ok) {
+            char *home;
+            char *file;
+            res = CURLE_OUT_OF_MEMORY;
+            home = homedir();
+            if(home) {
+              file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
+              if(file) {
+                /* new in curl 7.19.6 */
+                res = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
+                curl_free(file);
+                if(res == CURLE_UNKNOWN_OPTION)
+                  /* libssh2 version older than 1.1.1 */
+                  res = CURLE_OK;
+              }
+              Curl_safefree(home);
+            }
+            if(res)
+              goto show_error;
+          }
+        }
+
+        if(config->no_body || config->remote_time) {
+          /* no body or use remote time */
+          my_setopt(curl, CURLOPT_FILETIME, 1L);
+        }
+
+        my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L);
+        my_setopt_slist(curl, CURLOPT_QUOTE, config->quote);
+        my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote);
+        my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote);
+
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
+        {
+          /* TODO: Make this a run-time check instead of compile-time one. */
+
+          if(config->cookie)
+            my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
+
+          if(config->cookiefile)
+            my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
+
+          /* new in libcurl 7.9 */
+          if(config->cookiejar)
+            my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
+
+          /* new in libcurl 7.9.7 */
+          my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L);
+        }
+#endif
+
+        my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version);
+        my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond);
+        my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime);
+        my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
+        my_setopt(curl, CURLOPT_STDERR, config->errors);
+
+        /* three new ones in libcurl 7.3: */
+        my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
+        my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
+
+        progressbarinit(&progressbar, config);
+        if((config->progressmode == CURL_PROGRESS_BAR) &&
+           !config->noprogress && !config->mute) {
+          /* we want the alternative style, then we have to implement it
+             ourselves! */
+          my_setopt(curl, CURLOPT_PROGRESSFUNCTION, tool_progress_cb);
+          my_setopt(curl, CURLOPT_PROGRESSDATA, &progressbar);
+        }
+
+        /* new in libcurl 7.6.2: */
+        my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
+
+        /* new in libcurl 7.7: */
+        my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
+        my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file);
+        my_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS,
+                  (long)(config->connecttimeout * 1000));
+
+        if(config->cipher_list)
+          my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
+
+        /* new in libcurl 7.9.2: */
+        if(config->disable_epsv)
+          /* disable it */
+          my_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
+
+        /* new in libcurl 7.10.5 */
+        if(config->disable_eprt)
+          /* disable it */
+          my_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
+
+        if(config->tracetype != TRACE_NONE) {
+          my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
+          my_setopt(curl, CURLOPT_DEBUGDATA, config);
+          my_setopt(curl, CURLOPT_VERBOSE, 1L);
+        }
+
+        /* new in curl 7.9.3 */
+        if(config->engine) {
+          res = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
+          if(res)
+            goto show_error;
+          my_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
+        }
+
+        /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */
+        my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
+                  config->ftp_create_dirs?1L:0L);
+
+        /* new in curl 7.10.8 */
+        if(config->max_filesize)
+          my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
+                    config->max_filesize);
+
+        if(4 == config->ip_version)
+          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
+        else if(6 == config->ip_version)
+          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
+        else
+          my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
+
+        /* new in curl 7.15.5 */
+        if(config->ftp_ssl_reqd)
+          my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+        /* new in curl 7.11.0 */
+        else if(config->ftp_ssl)
+          my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
+
+        /* new in curl 7.16.0 */
+        else if(config->ftp_ssl_control)
+          my_setopt_enum(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_CONTROL);
+
+        /* new in curl 7.16.1 */
+        if(config->ftp_ssl_ccc)
+          my_setopt_enum(curl, CURLOPT_FTP_SSL_CCC,
+                         (long)config->ftp_ssl_ccc_mode);
+
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+        {
+          /* TODO: Make this a run-time check instead of compile-time one. */
+
+          /* new in curl 7.19.4 */
+          if(config->socks5_gssapi_service)
+            my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE,
+                          config->socks5_gssapi_service);
+
+          /* new in curl 7.19.4 */
+          if(config->socks5_gssapi_nec)
+            my_setopt_str(curl, CURLOPT_SOCKS5_GSSAPI_NEC,
+                          config->socks5_gssapi_nec);
+        }
+#endif
+        /* curl 7.13.0 */
+        my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
+
+        my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L);
+
+        /* curl 7.14.2 */
+        my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L);
+
+        /* curl 7.15.1 */
+        my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod);
+
+        /* curl 7.15.2 */
+        if(config->localport) {
+          my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport);
+          my_setopt_str(curl, CURLOPT_LOCALPORTRANGE,
+                        (long)config->localportrange);
+        }
+
+        /* curl 7.15.5 */
+        my_setopt_str(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER,
+                      config->ftp_alternative_to_user);
+
+        /* curl 7.16.0 */
+        if(config->disable_sessionid)
+          /* disable it */
+          my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
+
+        /* curl 7.16.2 */
+        if(config->raw) {
+          my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
+          my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
+        }
+
+        /* curl 7.17.1 */
+        if(!config->nokeepalive) {
+          my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+          if(config->alivetime != 0) {
+#if !defined(TCP_KEEPIDLE) || !defined(TCP_KEEPINTVL)
+            warnf(config, "Keep-alive functionality somewhat crippled due to "
+                "missing support in your operating system!\n");
+#endif
+            my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime);
+            my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime);
+          }
+        }
+        else
+          my_setopt(curl, CURLOPT_TCP_KEEPALIVE, 0L);
+
+        /* curl 7.20.0 */
+        if(config->tftp_blksize)
+          my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
+
+        if(config->mail_from)
+          my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
+
+        if(config->mail_rcpt)
+          my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
+
+        /* curl 7.20.x */
+        if(config->ftp_pret)
+          my_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
+
+        if(config->proto_present)
+          my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
+        if(config->proto_redir_present)
+          my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
+
+        if(config->content_disposition
+           && (urlnode->flags & GETOUT_USEREMOTE)
+           && (checkprefix("http://", this_url) ||
+               checkprefix("https://", this_url)))
+          hdrcbdata.honor_cd_filename = TRUE;
+        else
+          hdrcbdata.honor_cd_filename = FALSE;
+
+        hdrcbdata.outs = &outs;
+        hdrcbdata.heads = &heads;
+
+        my_setopt(curl, CURLOPT_HEADERFUNCTION, tool_header_cb);
+        my_setopt(curl, CURLOPT_HEADERDATA, &hdrcbdata);
+
+        if(config->resolve)
+          /* new in 7.21.3 */
+          my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
+
+        /* new in 7.21.4 */
+        if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) {
+          if(config->tls_username)
+            my_setopt_str(curl, CURLOPT_TLSAUTH_USERNAME,
+                          config->tls_username);
+          if(config->tls_password)
+            my_setopt_str(curl, CURLOPT_TLSAUTH_PASSWORD,
+                          config->tls_password);
+          if(config->tls_authtype)
+            my_setopt_str(curl, CURLOPT_TLSAUTH_TYPE,
+                          config->tls_authtype);
+        }
+
+        /* new in 7.22.0 */
+        if(config->gssapi_delegation)
+          my_setopt_str(curl, CURLOPT_GSSAPI_DELEGATION,
+                        config->gssapi_delegation);
+
+        /* new in 7.25.0 */
+        if(config->ssl_allow_beast)
+          my_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_ALLOW_BEAST);
+
+        if(config->mail_auth)
+          my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
+
+        /* new in 7.31.0 */
+        if(config->sasl_ir)
+          my_setopt(curl, CURLOPT_SASL_IR, 1L);
+
+        /* initialize retry vars for loop below */
+        retry_sleep_default = (config->retry_delay) ?
+          config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */
+
+        retry_numretries = config->req_retry;
+        retry_sleep = retry_sleep_default; /* ms */
+        retrystart = tvnow();
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+        res = easysrc_perform();
+        if(res) {
+          goto show_error;
+        }
+#endif
+
+        for(;;) {
+#ifdef USE_METALINK
+          if(!metalink && config->use_metalink) {
+            /* If outs.metalink_parser is non-NULL, delete it first. */
+            if(outs.metalink_parser)
+              metalink_parser_context_delete(outs.metalink_parser);
+            outs.metalink_parser = metalink_parser_context_new();
+            if(outs.metalink_parser == NULL) {
+              res = CURLE_OUT_OF_MEMORY;
+              goto show_error;
+            }
+            fprintf(config->errors, "Metalink: parsing (%s) metalink/XML...\n",
+                    this_url);
+          }
+          else if(metalink)
+            fprintf(config->errors, "Metalink: fetching (%s) from (%s)...\n",
+                    mlfile->filename, this_url);
+#endif /* USE_METALINK */
+
+          res = curl_easy_perform(curl);
+
+          if(outs.is_cd_filename && outs.stream && !config->mute &&
+             outs.filename)
+            printf("curl: Saved to filename '%s'\n", outs.filename);
+
+          /* if retry-max-time is non-zero, make sure we haven't exceeded the
+             time */
+          if(retry_numretries &&
+             (!config->retry_maxtime ||
+              (tvdiff(tvnow(), retrystart) <
+               config->retry_maxtime*1000L)) ) {
+            enum {
+              RETRY_NO,
+              RETRY_TIMEOUT,
+              RETRY_HTTP,
+              RETRY_FTP,
+              RETRY_LAST /* not used */
+            } retry = RETRY_NO;
+            long response;
+            if((CURLE_OPERATION_TIMEDOUT == res) ||
+               (CURLE_COULDNT_RESOLVE_HOST == res) ||
+               (CURLE_COULDNT_RESOLVE_PROXY == res) ||
+               (CURLE_FTP_ACCEPT_TIMEOUT == res))
+              /* retry timeout always */
+              retry = RETRY_TIMEOUT;
+            else if((CURLE_OK == res) ||
+                    (config->failonerror &&
+                     (CURLE_HTTP_RETURNED_ERROR == res))) {
+              /* If it returned OK. _or_ failonerror was enabled and it
+                 returned due to such an error, check for HTTP transient
+                 errors to retry on. */
+              char *effective_url = NULL;
+              curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
+              if(effective_url &&
+                 checkprefix("http", effective_url)) {
+                /* This was HTTP(S) */
+                curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+
+                switch(response) {
+                case 500: /* Internal Server Error */
+                case 502: /* Bad Gateway */
+                case 503: /* Service Unavailable */
+                case 504: /* Gateway Timeout */
+                  retry = RETRY_HTTP;
+                  /*
+                   * At this point, we have already written data to the output
+                   * file (or terminal). If we write to a file, we must rewind
+                   * or close/re-open the file so that the next attempt starts
+                   * over from the beginning.
+                   *
+                   * TODO: similar action for the upload case. We might need
+                   * to start over reading from a previous point if we have
+                   * uploaded something when this was returned.
+                   */
+                  break;
+                }
+              }
+            } /* if CURLE_OK */
+            else if(res) {
+              curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+
+              if(response/100 == 4)
+                /*
+                 * This is typically when the FTP server only allows a certain
+                 * amount of users and we are not one of them.  All 4xx codes
+                 * are transient.
+                 */
+                retry = RETRY_FTP;
+            }
+
+            if(retry) {
+              static const char * const m[]={
+                NULL, "timeout", "HTTP error", "FTP error"
+              };
+              warnf(config, "Transient problem: %s "
+                    "Will retry in %ld seconds. "
+                    "%ld retries left.\n",
+                    m[retry], retry_sleep/1000L, retry_numretries);
+
+              tool_go_sleep(retry_sleep);
+              retry_numretries--;
+              if(!config->retry_delay) {
+                retry_sleep *= 2;
+                if(retry_sleep > RETRY_SLEEP_MAX)
+                  retry_sleep = RETRY_SLEEP_MAX;
+              }
+              if(outs.bytes && outs.filename) {
+                /* We have written data to a output file, we truncate file
+                 */
+                if(!config->mute)
+                  fprintf(config->errors, "Throwing away %"
+                          CURL_FORMAT_CURL_OFF_T " bytes\n",
+                          outs.bytes);
+                fflush(outs.stream);
+                /* truncate file at the position where we started appending */
+#ifdef HAVE_FTRUNCATE
+                if(ftruncate( fileno(outs.stream), outs.init)) {
+                  /* when truncate fails, we can't just append as then we'll
+                     create something strange, bail out */
+                  if(!config->mute)
+                    fprintf(config->errors,
+                            "failed to truncate, exiting\n");
+                  res = CURLE_WRITE_ERROR;
+                  goto quit_urls;
+                }
+                /* now seek to the end of the file, the position where we
+                   just truncated the file in a large file-safe way */
+                fseek(outs.stream, 0, SEEK_END);
+#else
+                /* ftruncate is not available, so just reposition the file
+                   to the location we would have truncated it. This won't
+                   work properly with large files on 32-bit systems, but
+                   most of those will have ftruncate. */
+                fseek(outs.stream, (long)outs.init, SEEK_SET);
+#endif
+                outs.bytes = 0; /* clear for next round */
+              }
+              continue; /* curl_easy_perform loop */
+            }
+          } /* if retry_numretries */
+          else if(metalink) {
+            /* Metalink: Decide to try the next resource or
+               not. Basically, we want to try the next resource if
+               download was not successful. */
+            long response;
+            if(CURLE_OK == res) {
+              /* TODO We want to try next resource when download was
+                 not successful. How to know that? */
+              char *effective_url = NULL;
+              curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &effective_url);
+              if(effective_url &&
+                 curlx_strnequal(effective_url, "http", 4)) {
+                /* This was HTTP(S) */
+                curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+                if(response != 200 && response != 206) {
+                  metalink_next_res = 1;
+                  fprintf(config->errors,
+                          "Metalink: fetching (%s) from (%s) FAILED "
+                          "(HTTP status code %d)\n",
+                          mlfile->filename, this_url, response);
+                }
+              }
+            }
+            else {
+              metalink_next_res = 1;
+              fprintf(config->errors,
+                      "Metalink: fetching (%s) from (%s) FAILED (%s)\n",
+                      mlfile->filename, this_url,
+                      (errorbuffer[0]) ?
+                      errorbuffer : curl_easy_strerror((CURLcode)res));
+            }
+          }
+          if(metalink && !metalink_next_res)
+            fprintf(config->errors, "Metalink: fetching (%s) from (%s) OK\n",
+                    mlfile->filename, this_url);
+
+          /* In all ordinary cases, just break out of loop here */
+          break; /* curl_easy_perform loop */
+
+        }
+
+        if((config->progressmode == CURL_PROGRESS_BAR) &&
+           progressbar.calls)
+          /* if the custom progress bar has been displayed, we output a
+             newline here */
+          fputs("\n", progressbar.out);
+
+        if(config->writeout)
+          ourWriteOut(curl, &outs, config->writeout);
+
+        if(config->writeenv)
+          ourWriteEnv(curl);
+
+        /*
+        ** Code within this loop may jump directly here to label 'show_error'
+        ** in order to display an error message for CURLcode stored in 'res'
+        ** variable and exit loop once that necessary writing and cleanup
+        ** in label 'quit_urls' has been done.
+        */
+
+        show_error:
+
+#ifdef __VMS
+        if(is_vms_shell()) {
+          /* VMS DCL shell behavior */
+          if(!config->showerror)
+            vms_show = VMSSTS_HIDE;
+        }
+        else
+#endif
+        if(res && config->showerror) {
+          fprintf(config->errors, "curl: (%d) %s\n", res, (errorbuffer[0]) ?
+                  errorbuffer : curl_easy_strerror((CURLcode)res));
+          if(res == CURLE_SSL_CACERT)
+            fprintf(config->errors, "%s%s",
+                    CURL_CA_CERT_ERRORMSG1, CURL_CA_CERT_ERRORMSG2);
+        }
+
+        /* Fall through comment to 'quit_urls' label */
+
+        /*
+        ** Upon error condition and always that a message has already been
+        ** displayed, code within this loop may jump directly here to label
+        ** 'quit_urls' otherwise it should jump to 'show_error' label above.
+        **
+        ** When 'res' variable is _not_ CURLE_OK loop will exit once that
+        ** all code following 'quit_urls' has been executed. Otherwise it
+        ** will loop to the beginning from where it may exit if there are
+        ** no more urls left.
+        */
+
+        quit_urls:
+
+        /* Set file extended attributes */
+        if(!res && config->xattr && outs.fopened && outs.stream) {
+          int rc = fwrite_xattr(curl, fileno(outs.stream));
+          if(rc)
+            warnf(config, "Error setting extended attributes: %s\n",
+                  strerror(errno));
+        }
+
+        /* Close the file */
+        if(outs.fopened && outs.stream) {
+          int rc = fclose(outs.stream);
+          if(!res && rc) {
+            /* something went wrong in the writing process */
+            res = CURLE_WRITE_ERROR;
+            fprintf(config->errors, "(%d) Failed writing body\n", res);
+          }
+        }
+        else if(!outs.s_isreg && outs.stream) {
+          /* Dump standard stream buffered data */
+          int rc = fflush(outs.stream);
+          if(!res && rc) {
+            /* something went wrong in the writing process */
+            res = CURLE_WRITE_ERROR;
+            fprintf(config->errors, "(%d) Failed writing body\n", res);
+          }
+        }
+
+#ifdef __AMIGA__
+        if(!res && outs.s_isreg && outs.filename) {
+          /* Set the url (up to 80 chars) as comment for the file */
+          if(strlen(url) > 78)
+            url[79] = '\0';
+          SetComment(outs.filename, url);
+        }
+#endif
+
+#ifdef HAVE_UTIME
+        /* File time can only be set _after_ the file has been closed */
+        if(!res && config->remote_time && outs.s_isreg && outs.filename) {
+          /* Ask libcurl if we got a remote file time */
+          long filetime = -1;
+          curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+          if(filetime >= 0) {
+            struct utimbuf times;
+            times.actime = (time_t)filetime;
+            times.modtime = (time_t)filetime;
+            utime(outs.filename, &times); /* set the time we got */
+          }
+        }
+#endif
+
+#ifdef USE_METALINK
+        if(!metalink && config->use_metalink && res == CURLE_OK) {
+          int rv = parse_metalink(config, &outs, this_url);
+          if(rv == 0)
+            fprintf(config->errors, "Metalink: parsing (%s) OK\n", this_url);
+          else if(rv == -1)
+            fprintf(config->errors, "Metalink: parsing (%s) FAILED\n",
+                    this_url);
+        }
+        else if(metalink && res == CURLE_OK && !metalink_next_res) {
+          int rv = metalink_check_hash(config, mlfile, outs.filename);
+          if(rv == 0) {
+            metalink_next_res = 1;
+          }
+        }
+#endif /* USE_METALINK */
+
+        /* No more business with this output struct */
+        if(outs.alloc_filename)
+          Curl_safefree(outs.filename);
+#ifdef USE_METALINK
+        if(outs.metalink_parser)
+          metalink_parser_context_delete(outs.metalink_parser);
+#endif /* USE_METALINK */
+        memset(&outs, 0, sizeof(struct OutStruct));
+        hdrcbdata.outs = NULL;
+
+        /* Free loop-local allocated memory and close loop-local opened fd */
+
+        Curl_safefree(outfile);
+        Curl_safefree(this_url);
+
+        if(infdopen)
+          close(infd);
+
+        if(metalink) {
+          /* Should exit if error is fatal. */
+          if(is_fatal_error(res)) {
+            break;
+          }
+          if(!metalink_next_res)
+            break;
+          mlres = mlres->next;
+          if(mlres == NULL)
+            /* TODO If metalink_next_res is 1 and mlres is NULL,
+             * set res to error code
+             */
+            break;
+        }
+        else
+        if(urlnum > 1) {
+          /* when url globbing, exit loop upon critical error */
+          if(is_fatal_error(res))
+            break;
+        }
+        else if(res)
+          /* when not url globbing, exit loop upon any error */
+          break;
+
+      } /* loop to the next URL */
+
+      /* Free loop-local allocated memory */
+
+      Curl_safefree(uploadfile);
+
+      if(urls) {
+        /* Free list of remaining URLs */
+        glob_cleanup(urls);
+        urls = NULL;
+      }
+
+      if(infilenum > 1) {
+        /* when file globbing, exit loop upon critical error */
+        if(is_fatal_error(res))
+          break;
+      }
+      else if(res)
+        /* when not file globbing, exit loop upon any error */
+        break;
+
+    } /* loop to the next globbed upload file */
+
+    /* Free loop-local allocated memory */
+
+    Curl_safefree(outfiles);
+
+    if(inglob) {
+      /* Free list of globbed upload files */
+      glob_cleanup(inglob);
+      inglob = NULL;
+    }
+
+    /* Free this URL node data without destroying the
+       the node itself nor modifying next pointer. */
+    Curl_safefree(urlnode->url);
+    Curl_safefree(urlnode->outfile);
+    Curl_safefree(urlnode->infile);
+    urlnode->flags = 0;
+
+    /*
+    ** Bail out upon critical errors
+    */
+    if(is_fatal_error(res))
+      goto quit_curl;
+
+  } /* for-loop through all URLs */
+
+  /*
+  ** Nested loops end here.
+  */
+
+  quit_curl:
+
+  /* Free function-local referenced allocated memory */
+  Curl_safefree(httpgetfields);
+
+  /* Free list of given URLs */
+  clean_getout(config);
+
+  /* Cleanup the curl handle now that our
+     progressbar struct is still in scope */
+  if(curl) {
+    curl_easy_cleanup(curl);
+    config->easy = curl = NULL;
+  }
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+  easysrc_cleanup();
+#endif
+
+  hdrcbdata.heads = NULL;
+
+  /* Close function-local opened file descriptors */
+
+  if(heads.fopened && heads.stream)
+    fclose(heads.stream);
+  if(heads.alloc_filename)
+    Curl_safefree(heads.filename);
+
+  if(config->trace_fopened && config->trace_stream)
+    fclose(config->trace_stream);
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+  /* Dump the libcurl code if previously enabled.
+     NOTE: that this function relies on config->errors amongst other things
+     so not everything can be closed and cleaned before this is called */
+  dumpeasysrc(config);
+#endif
+
+  if(config->errors_fopened && config->errors)
+    fclose(config->errors);
+
+  /* Release metalink related resources here */
+  clean_metalink(config);
+
+  main_free(); /* cleanup */
+
+  return res;
+}
+
diff --git a/src/tool_operate.h b/src/tool_operate.h
new file mode 100644 (file)
index 0000000..5a0a4a0
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_TOOL_OPERATE_H
+#define HEADER_CURL_TOOL_OPERATE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+int operate(struct Configurable *config, int argc, argv_item_t argv[]);
+
+#endif /* HEADER_CURL_TOOL_OPERATE_H */
+
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
new file mode 100644 (file)
index 0000000..c33ca50
--- /dev/null
@@ -0,0 +1,251 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_convert.h"
+#include "tool_operhlp.h"
+#include "tool_version.h"
+#include "tool_metalink.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/*
+ * my_useragent: returns allocated string with default user agent
+ */
+char *my_useragent(void)
+{
+  return strdup( CURL_NAME "/" CURL_VERSION );
+}
+
+/*
+ * Print list of OpenSSL supported engines
+ */
+void list_engines(const struct curl_slist *engines)
+{
+  puts("Build-time engines:");
+  if(!engines) {
+    puts("  <none>");
+    return;
+  }
+  for(; engines; engines = engines->next)
+    printf("  %s\n", engines->data);
+}
+
+void clean_getout(struct Configurable *config)
+{
+  struct getout *next;
+  struct getout *node = config->url_list;
+
+  while(node) {
+    next = node->next;
+    Curl_safefree(node->url);
+    Curl_safefree(node->outfile);
+    Curl_safefree(node->infile);
+    Curl_safefree(node);
+    node = next;
+  }
+  config->url_list = NULL;
+}
+
+bool output_expected(const char *url, const char *uploadfile)
+{
+  if(!uploadfile)
+    return TRUE;  /* download */
+  if(checkprefix("http://", url) || checkprefix("https://", url))
+    return TRUE;   /* HTTP(S) upload */
+
+  return FALSE; /* non-HTTP upload, probably no output should be expected */
+}
+
+bool stdin_upload(const char *uploadfile)
+{
+  return (curlx_strequal(uploadfile, "-") ||
+          curlx_strequal(uploadfile, ".")) ? TRUE : FALSE;
+}
+
+/*
+ * Adds the file name to the URL if it doesn't already have one.
+ * url will be freed before return if the returned pointer is different
+ */
+char *add_file_name_to_url(CURL *curl, char *url, const char *filename)
+{
+  /* If no file name part is given in the URL, we add this file name */
+  char *ptr = strstr(url, "://");
+  if(ptr)
+    ptr += 3;
+  else
+    ptr = url;
+  ptr = strrchr(ptr, '/');
+  if(!ptr || !strlen(++ptr)) {
+    /* The URL has no file name part, add the local file name. In order
+       to be able to do so, we have to create a new URL in another
+       buffer.*/
+
+    /* We only want the part of the local path that is on the right
+       side of the rightmost slash and backslash. */
+    const char *filep = strrchr(filename, '/');
+    char *file2 = strrchr(filep?filep:filename, '\\');
+    char *encfile;
+
+    if(file2)
+      filep = file2 + 1;
+    else if(filep)
+      filep++;
+    else
+      filep = filename;
+
+    /* URL encode the file name */
+    encfile = curl_easy_escape(curl, filep, 0 /* use strlen */);
+    if(encfile) {
+      char *urlbuffer;
+      if(ptr)
+        /* there is a trailing slash on the URL */
+        urlbuffer = aprintf("%s%s", url, encfile);
+      else
+        /* there is no trailing slash on the URL */
+        urlbuffer = aprintf("%s/%s", url, encfile);
+
+      curl_free(encfile);
+      Curl_safefree(url);
+
+      if(!urlbuffer)
+        return NULL;
+
+      url = urlbuffer; /* use our new URL instead! */
+    }
+    else
+      Curl_safefree(url);
+  }
+  return url;
+}
+
+/* Extracts the name portion of the URL.
+ * Returns a pointer to a heap-allocated string or NULL if
+ * no name part, at location indicated by first argument.
+ */
+CURLcode get_url_file_name(char **filename, const char *url)
+{
+  const char *pc;
+
+  *filename = NULL;
+
+  /* Find and get the remote file name */
+  pc = strstr(url, "://");
+  if(pc)
+    pc += 3;
+  else
+    pc = url;
+  pc = strrchr(pc, '/');
+
+  if(pc) {
+    /* duplicate the string beyond the slash */
+    pc++;
+    if(*pc) {
+      *filename = strdup(pc);
+      if(!*filename)
+        return CURLE_OUT_OF_MEMORY;
+    }
+  }
+
+  /* in case we built debug enabled, we allow an environment variable
+   * named CURL_TESTDIR to prefix the given file name to put it into a
+   * specific directory
+   */
+#ifdef DEBUGBUILD
+  {
+    char *tdir = curlx_getenv("CURL_TESTDIR");
+    if(tdir) {
+      char buffer[512]; /* suitably large */
+      snprintf(buffer, sizeof(buffer), "%s/%s", tdir, *filename);
+      Curl_safefree(*filename);
+      *filename = strdup(buffer); /* clone the buffer */
+      curl_free(tdir);
+    }
+  }
+#endif
+
+  return CURLE_OK;
+}
+
+/*
+ * This is the main global constructor for the app. Call this before
+ * _any_ libcurl usage. If this fails, *NO* libcurl functions may be
+ * used, or havoc may be the result.
+ */
+CURLcode main_init(void)
+{
+#if defined(__DJGPP__) || defined(__GO32__)
+  /* stop stat() wasting time */
+  _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
+#endif
+
+  return curl_global_init(CURL_GLOBAL_DEFAULT);
+}
+
+/*
+ * This is the main global destructor for the app. Call this after
+ * _all_ libcurl usage is done.
+ */
+void main_free(void)
+{
+  curl_global_cleanup();
+  convert_cleanup();
+  metalink_cleanup();
+}
+
+#ifdef CURLDEBUG
+void memory_tracking_init(void)
+{
+  char *env;
+  /* if CURL_MEMDEBUG is set, this starts memory tracking message logging */
+  env = curlx_getenv("CURL_MEMDEBUG");
+  if(env) {
+    /* use the value as file name */
+    char fname[CURL_MT_LOGFNAME_BUFSIZE];
+    if(strlen(env) >= CURL_MT_LOGFNAME_BUFSIZE)
+      env[CURL_MT_LOGFNAME_BUFSIZE-1] = '\0';
+    strcpy(fname, env);
+    curl_free(env);
+    curl_memdebug(fname);
+    /* this weird stuff here is to make curl_free() get called
+       before curl_memdebug() as otherwise memory tracking will
+       log a free() without an alloc! */
+  }
+  /* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */
+  env = curlx_getenv("CURL_MEMLIMIT");
+  if(env) {
+    char *endptr;
+    long num = strtol(env, &endptr, 10);
+    if((endptr != env) && (endptr == env + strlen(env)) && (num > 0))
+      curl_memlimit(num);
+    curl_free(env);
+  }
+}
+#endif
+
diff --git a/src/tool_operhlp.h b/src/tool_operhlp.h
new file mode 100644 (file)
index 0000000..806717e
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef HEADER_CURL_TOOL_OPERHLP_H
+#define HEADER_CURL_TOOL_OPERHLP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+char *my_useragent(void);
+
+void list_engines(const struct curl_slist *engines);
+
+void clean_getout(struct Configurable *config);
+
+bool output_expected(const char *url, const char *uploadfile);
+
+bool stdin_upload(const char *uploadfile);
+
+char *add_file_name_to_url(CURL *curl, char *url, const char *filename);
+
+CURLcode get_url_file_name(char **filename, const char *url);
+
+CURLcode main_init(void);
+
+void main_free(void);
+
+#ifdef CURLDEBUG
+void memory_tracking_init(void);
+#else
+#  define memory_tracking_init() Curl_nop_stmt
+#endif
+
+#endif /* HEADER_CURL_TOOL_OPERHLP_H */
+
diff --git a/src/tool_panykey.c b/src/tool_panykey.c
new file mode 100644 (file)
index 0000000..d8718e3
--- /dev/null
@@ -0,0 +1,48 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#if defined(__SYMBIAN32__) || defined(NETWARE)
+
+#ifdef NETWARE
+#  ifdef __NOVELL_LIBC__
+#    include <screen.h>
+#  else
+#    include <nwconio.h>
+#  endif
+#endif
+
+#include "tool_panykey.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void tool_pressanykey(void)
+{
+#if defined(__SYMBIAN32__)
+  getchar();
+#elif defined(NETWARE)
+  pressanykey();
+#endif
+}
+
+#endif /* __SYMBIAN32__ || NETWARE */
+
diff --git a/src/tool_panykey.h b/src/tool_panykey.h
new file mode 100644 (file)
index 0000000..50b15d2
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef HEADER_CURL_TOOL_PANYKEY_H
+#define HEADER_CURL_TOOL_PANYKEY_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#if defined(__SYMBIAN32__) || defined(NETWARE)
+
+void tool_pressanykey(void);
+
+#else
+
+#define tool_pressanykey() Curl_nop_stmt
+
+#endif
+
+#endif /* HEADER_CURL_TOOL_PANYKEY_H */
+
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
new file mode 100644 (file)
index 0000000..86b8a1d
--- /dev/null
@@ -0,0 +1,465 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#include "rawstr.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_getparam.h"
+#include "tool_getpass.h"
+#include "tool_homedir.h"
+#include "tool_msgs.h"
+#include "tool_paramhlp.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+struct getout *new_getout(struct Configurable *config)
+{
+  struct getout *node = calloc(1, sizeof(struct getout));
+  struct getout *last = config->url_last;
+  if(node) {
+    /* append this new node last in the list */
+    if(last)
+      last->next = node;
+    else
+      config->url_list = node; /* first node */
+
+    /* move the last pointer */
+    config->url_last = node;
+
+    node->flags = config->default_node_flags;
+  }
+  return node;
+}
+
+ParameterError file2string(char **bufp, FILE *file)
+{
+  char buffer[256];
+  char *ptr;
+  char *string = NULL;
+  size_t stringlen = 0;
+  size_t buflen;
+
+  if(file) {
+    while(fgets(buffer, sizeof(buffer), file)) {
+      if((ptr = strchr(buffer, '\r')) != NULL)
+        *ptr = '\0';
+      if((ptr = strchr(buffer, '\n')) != NULL)
+        *ptr = '\0';
+      buflen = strlen(buffer);
+      if((ptr = realloc(string, stringlen+buflen+1)) == NULL) {
+        Curl_safefree(string);
+        return PARAM_NO_MEM;
+      }
+      string = ptr;
+      strcpy(string+stringlen, buffer);
+      stringlen += buflen;
+    }
+  }
+  *bufp = string;
+  return PARAM_OK;
+}
+
+ParameterError file2memory(char **bufp, size_t *size, FILE *file)
+{
+  char *newbuf;
+  char *buffer = NULL;
+  size_t alloc = 512;
+  size_t nused = 0;
+  size_t nread;
+
+  if(file) {
+    do {
+      if(!buffer || (alloc == nused)) {
+        /* size_t overflow detection for huge files */
+        if(alloc+1 > ((size_t)-1)/2) {
+          Curl_safefree(buffer);
+          return PARAM_NO_MEM;
+        }
+        alloc *= 2;
+        /* allocate an extra char, reserved space, for null termination */
+        if((newbuf = realloc(buffer, alloc+1)) == NULL) {
+          Curl_safefree(buffer);
+          return PARAM_NO_MEM;
+        }
+        buffer = newbuf;
+      }
+      nread = fread(buffer+nused, 1, alloc-nused, file);
+      nused += nread;
+    } while(nread);
+    /* null terminate the buffer in case it's used as a string later */
+    buffer[nused] = '\0';
+    /* free trailing slack space, if possible */
+    if(alloc != nused) {
+      if((newbuf = realloc(buffer, nused+1)) == NULL) {
+        Curl_safefree(buffer);
+        return PARAM_NO_MEM;
+      }
+      buffer = newbuf;
+    }
+    /* discard buffer if nothing was read */
+    if(!nused) {
+      Curl_safefree(buffer); /* no string */
+    }
+  }
+  *size = nused;
+  *bufp = buffer;
+  return PARAM_OK;
+}
+
+void cleanarg(char *str)
+{
+#ifdef HAVE_WRITABLE_ARGV
+  /* now that GetStr has copied the contents of nextarg, wipe the next
+   * argument out so that the username:password isn't displayed in the
+   * system process list */
+  if(str) {
+    size_t len = strlen(str);
+    memset(str, ' ', len);
+  }
+#else
+  (void)str;
+#endif
+}
+
+/*
+ * Parse the string and write the long in the given address. Return PARAM_OK
+ * on success, otherwise a parameter specific error enum.
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2num(long *val, const char *str)
+{
+  if(str) {
+    char *endptr;
+    long num = strtol(str, &endptr, 10);
+    if((endptr != str) && (endptr == str + strlen(str))) {
+      *val = num;
+      return PARAM_OK;  /* Ok */
+    }
+  }
+  return PARAM_BAD_NUMERIC; /* badness */
+}
+
+/*
+ * Parse the string and write the long in the given address. Return PARAM_OK
+ * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2unum(long *val, const char *str)
+{
+  ParameterError result = str2num(val, str);
+  if(result != PARAM_OK)
+    return result;
+  if(*val < 0)
+    return PARAM_NEGATIVE_NUMERIC;
+
+  return PARAM_OK;
+}
+
+/*
+ * Parse the string and write the double in the given address. Return PARAM_OK
+ * on success, otherwise a parameter specific error enum.
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2double(double *val, const char *str)
+{
+  if(str) {
+    char *endptr;
+    double num = strtod(str, &endptr);
+    if((endptr != str) && (endptr == str + strlen(str))) {
+      *val = num;
+      return PARAM_OK;  /* Ok */
+    }
+  }
+  return PARAM_BAD_NUMERIC; /* badness */
+}
+
+/*
+ * Parse the string and write the double in the given address. Return PARAM_OK
+ * on success, otherwise a parameter error enum. ONLY ACCEPTS POSITIVE NUMBERS!
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+ParameterError str2udouble(double *val, const char *str)
+{
+  ParameterError result = str2double(val, str);
+  if(result != PARAM_OK)
+    return result;
+  if(*val < 0)
+    return PARAM_NEGATIVE_NUMERIC;
+
+  return PARAM_OK;
+}
+
+/*
+ * Parse the string and modify the long in the given address. Return
+ * non-zero on failure, zero on success.
+ *
+ * The string is a list of protocols
+ *
+ * Since this function gets called with the 'nextarg' pointer from within the
+ * getparameter a lot, we must check it for NULL before accessing the str
+ * data.
+ */
+
+long proto2num(struct Configurable *config, long *val, const char *str)
+{
+  char *buffer;
+  const char *sep = ",";
+  char *token;
+
+  static struct sprotos {
+    const char *name;
+    long bit;
+  } const protos[] = {
+    { "all", CURLPROTO_ALL },
+    { "http", CURLPROTO_HTTP },
+    { "https", CURLPROTO_HTTPS },
+    { "ftp", CURLPROTO_FTP },
+    { "ftps", CURLPROTO_FTPS },
+    { "scp", CURLPROTO_SCP },
+    { "sftp", CURLPROTO_SFTP },
+    { "telnet", CURLPROTO_TELNET },
+    { "ldap", CURLPROTO_LDAP },
+    { "ldaps", CURLPROTO_LDAPS },
+    { "dict", CURLPROTO_DICT },
+    { "file", CURLPROTO_FILE },
+    { "tftp", CURLPROTO_TFTP },
+    { "imap", CURLPROTO_IMAP },
+    { "imaps", CURLPROTO_IMAPS },
+    { "pop3", CURLPROTO_POP3 },
+    { "pop3s", CURLPROTO_POP3S },
+    { "smtp", CURLPROTO_SMTP },
+    { "smtps", CURLPROTO_SMTPS },
+    { "rtsp", CURLPROTO_RTSP },
+    { "gopher", CURLPROTO_GOPHER },
+    { NULL, 0 }
+  };
+
+  if(!str)
+    return 1;
+
+  buffer = strdup(str); /* because strtok corrupts it */
+  if(!buffer)
+    return 1;
+
+  for(token = strtok(buffer, sep);
+      token;
+      token = strtok(NULL, sep)) {
+    enum e_action { allow, deny, set } action = allow;
+
+    struct sprotos const *pp;
+
+    /* Process token modifiers */
+    while(!ISALNUM(*token)) { /* may be NULL if token is all modifiers */
+      switch (*token++) {
+      case '=':
+        action = set;
+        break;
+      case '-':
+        action = deny;
+        break;
+      case '+':
+        action = allow;
+        break;
+      default: /* Includes case of terminating NULL */
+        Curl_safefree(buffer);
+        return 1;
+      }
+    }
+
+    for(pp=protos; pp->name; pp++) {
+      if(curlx_raw_equal(token, pp->name)) {
+        switch (action) {
+        case deny:
+          *val &= ~(pp->bit);
+          break;
+        case allow:
+          *val |= pp->bit;
+          break;
+        case set:
+          *val = pp->bit;
+          break;
+        }
+        break;
+      }
+    }
+
+    if(!(pp->name)) { /* unknown protocol */
+      /* If they have specified only this protocol, we say treat it as
+         if no protocols are allowed */
+      if(action == set)
+        *val = 0;
+      warnf(config, "unrecognized protocol '%s'\n", token);
+    }
+  }
+  Curl_safefree(buffer);
+  return 0;
+}
+
+/**
+ * Parses the given string looking for an offset (which may be a
+ * larger-than-integer value). The offset CANNOT be negative!
+ *
+ * @param val  the offset to populate
+ * @param str  the buffer containing the offset
+ * @return PARAM_OK if successful, a parameter specific error enum if failure.
+ */
+ParameterError str2offset(curl_off_t *val, const char *str)
+{
+  char *endptr;
+  if(str[0] == '-')
+    /* offsets aren't negative, this indicates weird input */
+    return PARAM_NEGATIVE_NUMERIC;
+
+#if(CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
+  *val = curlx_strtoofft(str, &endptr, 0);
+  if((*val == CURL_OFF_T_MAX || *val == CURL_OFF_T_MIN) && (ERRNO == ERANGE))
+    return PARAM_BAD_NUMERIC;
+#else
+  *val = strtol(str, &endptr, 0);
+  if((*val == LONG_MIN || *val == LONG_MAX) && ERRNO == ERANGE)
+    return PARAM_BAD_NUMERIC;
+#endif
+  if((endptr != str) && (endptr == str + strlen(str)))
+    return PARAM_OK;
+
+  return PARAM_BAD_NUMERIC;
+}
+
+ParameterError checkpasswd(const char *kind, /* for what purpose */
+                           char **userpwd)   /* pointer to allocated string */
+{
+  char *psep;
+  char *osep;
+
+  if(!*userpwd)
+    return PARAM_OK;
+
+  /* Attempt to find the password separator */
+  psep = strchr(*userpwd, ':');
+
+  /* Attempt to find the options separator */
+  osep = strchr(*userpwd, ';');
+
+  if(!psep && **userpwd != ';') {
+    /* no password present, prompt for one */
+    char passwd[256] = "";
+    char prompt[256];
+    size_t passwdlen;
+    size_t userlen = strlen(*userpwd);
+    char *passptr;
+
+    if(osep)
+      *osep = '\0';
+
+    /* build a nice-looking prompt */
+    curlx_msnprintf(prompt, sizeof(prompt),
+                    "Enter %s password for user '%s':",
+                    kind, *userpwd);
+
+    /* get password */
+    getpass_r(prompt, passwd, sizeof(passwd));
+    passwdlen = strlen(passwd);
+
+    if(osep)
+      *osep = ';';
+
+    /* extend the allocated memory area to fit the password too */
+    passptr = realloc(*userpwd,
+                      passwdlen + 1 + /* an extra for the colon */
+                      userlen + 1);   /* an extra for the zero */
+    if(!passptr)
+      return PARAM_NO_MEM;
+
+    /* append the password separated with a colon */
+    passptr[userlen] = ':';
+    memcpy(&passptr[userlen+1], passwd, passwdlen+1);
+    *userpwd = passptr;
+  }
+  return PARAM_OK;
+}
+
+ParameterError add2list(struct curl_slist **list, const char *ptr)
+{
+  struct curl_slist *newlist = curl_slist_append(*list, ptr);
+  if(newlist)
+    *list = newlist;
+  else
+    return PARAM_NO_MEM;
+
+  return PARAM_OK;
+}
+
+int ftpfilemethod(struct Configurable *config, const char *str)
+{
+  if(curlx_raw_equal("singlecwd", str))
+    return CURLFTPMETHOD_SINGLECWD;
+  if(curlx_raw_equal("nocwd", str))
+    return CURLFTPMETHOD_NOCWD;
+  if(curlx_raw_equal("multicwd", str))
+    return CURLFTPMETHOD_MULTICWD;
+  warnf(config, "unrecognized ftp file method '%s', using default\n", str);
+  return CURLFTPMETHOD_MULTICWD;
+}
+
+int ftpcccmethod(struct Configurable *config, const char *str)
+{
+  if(curlx_raw_equal("passive", str))
+    return CURLFTPSSL_CCC_PASSIVE;
+  if(curlx_raw_equal("active", str))
+    return CURLFTPSSL_CCC_ACTIVE;
+  warnf(config, "unrecognized ftp CCC method '%s', using default\n", str);
+  return CURLFTPSSL_CCC_PASSIVE;
+}
+
+long delegation(struct Configurable *config, char *str)
+{
+  if(curlx_raw_equal("none", str))
+    return CURLGSSAPI_DELEGATION_NONE;
+  if(curlx_raw_equal("policy", str))
+    return CURLGSSAPI_DELEGATION_POLICY_FLAG;
+  if(curlx_raw_equal("always", str))
+    return CURLGSSAPI_DELEGATION_FLAG;
+  warnf(config, "unrecognized delegation method '%s', using none\n", str);
+  return CURLGSSAPI_DELEGATION_NONE;
+}
+
diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h
new file mode 100644 (file)
index 0000000..24734a5
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef HEADER_CURL_TOOL_PARAMHLP_H
+#define HEADER_CURL_TOOL_PARAMHLP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+struct getout *new_getout(struct Configurable *config);
+
+ParameterError file2string(char **bufp, FILE *file);
+
+ParameterError file2memory(char **bufp, size_t *size, FILE *file);
+
+void cleanarg(char *str);
+
+ParameterError str2num(long *val, const char *str);
+ParameterError str2unum(long *val, const char *str);
+ParameterError str2double(double *val, const char *str);
+ParameterError str2udouble(double *val, const char *str);
+
+long proto2num(struct Configurable *config, long *val, const char *str);
+
+ParameterError str2offset(curl_off_t *val, const char *str);
+
+ParameterError checkpasswd(const char *kind, char **userpwd);
+
+ParameterError add2list(struct curl_slist **list, const char *ptr);
+
+int ftpfilemethod(struct Configurable *config, const char *str);
+
+int ftpcccmethod(struct Configurable *config, const char *str);
+
+long delegation(struct Configurable *config, char *str);
+
+#endif /* HEADER_CURL_TOOL_PARAMHLP_H */
+
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
new file mode 100644 (file)
index 0000000..680688a
--- /dev/null
@@ -0,0 +1,307 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_getparam.h"
+#include "tool_helpers.h"
+#include "tool_homedir.h"
+#include "tool_msgs.h"
+#include "tool_parsecfg.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+#define CURLRC DOT_CHAR "curlrc"
+#define ISSEP(x) (((x) == '=') || ((x) == ':'))
+
+static const char *unslashquote(const char *line, char *param);
+static char *my_get_line(FILE *fp);
+
+/* return 0 on everything-is-fine, and non-zero otherwise */
+int parseconfig(const char *filename,
+                struct Configurable *config)
+{
+  int res;
+  FILE *file;
+  char filebuffer[512];
+  bool usedarg;
+  char *home;
+  int rc = 0;
+
+  if(!filename || !*filename) {
+    /* NULL or no file name attempts to load .curlrc from the homedir! */
+
+#ifndef __AMIGA__
+    filename = CURLRC;   /* sensible default */
+    home = homedir();    /* portable homedir finder */
+    if(home) {
+      if(strlen(home) < (sizeof(filebuffer) - strlen(CURLRC))) {
+        snprintf(filebuffer, sizeof(filebuffer),
+                 "%s%s%s", home, DIR_CHAR, CURLRC);
+
+#ifdef WIN32
+        /* Check if the file exists - if not, try CURLRC in the same
+         * directory as our executable
+         */
+        file = fopen(filebuffer, "r");
+        if(file != NULL) {
+          fclose(file);
+          filename = filebuffer;
+        }
+        else {
+          /* Get the filename of our executable. GetModuleFileName is
+           * already declared via inclusions done in setup header file.
+           * We assume that we are using the ASCII version here.
+           */
+          int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
+          if(n > 0 && n < (int)sizeof(filebuffer)) {
+            /* We got a valid filename - get the directory part */
+            char *lastdirchar = strrchr(filebuffer, '\\');
+            if(lastdirchar) {
+              size_t remaining;
+              *lastdirchar = 0;
+              /* If we have enough space, build the RC filename */
+              remaining = sizeof(filebuffer) - strlen(filebuffer);
+              if(strlen(CURLRC) < remaining - 1) {
+                snprintf(lastdirchar, remaining,
+                         "%s%s", DIR_CHAR, CURLRC);
+                /* Don't bother checking if it exists - we do
+                 * that later
+                 */
+                filename = filebuffer;
+              }
+            }
+          }
+        }
+#else /* WIN32 */
+        filename = filebuffer;
+#endif /* WIN32 */
+      }
+      Curl_safefree(home); /* we've used it, now free it */
+    }
+
+# else /* __AMIGA__ */
+    /* On AmigaOS all the config files are into env:
+     */
+    filename = "ENV:" CURLRC;
+
+#endif
+  }
+
+  if(strcmp(filename,"-"))
+    file = fopen(filename, "r");
+  else
+    file = stdin;
+
+  if(file) {
+    char *line;
+    char *aline;
+    char *option;
+    char *param;
+    int lineno = 0;
+    bool alloced_param;
+
+    while(NULL != (aline = my_get_line(file))) {
+      lineno++;
+      line = aline;
+      alloced_param=FALSE;
+
+      /* line with # in the first non-blank column is a comment! */
+      while(*line && ISSPACE(*line))
+        line++;
+
+      switch(*line) {
+      case '#':
+      case '/':
+      case '\r':
+      case '\n':
+      case '*':
+      case '\0':
+        Curl_safefree(aline);
+        continue;
+      }
+
+      /* the option keywords starts here */
+      option = line;
+      while(*line && !ISSPACE(*line) && !ISSEP(*line))
+        line++;
+      /* ... and has ended here */
+
+      if(*line)
+        *line++ = '\0'; /* zero terminate, we have a local copy of the data */
+
+#ifdef DEBUG_CONFIG
+      fprintf(stderr, "GOT: %s\n", option);
+#endif
+
+      /* pass spaces and separator(s) */
+      while(*line && (ISSPACE(*line) || ISSEP(*line)))
+        line++;
+
+      /* the parameter starts here (unless quoted) */
+      if(*line == '\"') {
+        /* quoted parameter, do the quote dance */
+        line++;
+        param = malloc(strlen(line) + 1); /* parameter */
+        if(!param) {
+          /* out of memory */
+          Curl_safefree(aline);
+          rc = 1;
+          break;
+        }
+        alloced_param = TRUE;
+        (void)unslashquote(line, param);
+      }
+      else {
+        param = line; /* parameter starts here */
+        while(*line && !ISSPACE(*line))
+          line++;
+        *line = '\0'; /* zero terminate */
+      }
+
+      if(param && !*param) {
+        /* do this so getparameter can check for required parameters.
+           Otherwise it always thinks there's a parameter. */
+        if(alloced_param)
+          Curl_safefree(param);
+        param = NULL;
+      }
+
+#ifdef DEBUG_CONFIG
+      fprintf(stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
+#endif
+      res = getparameter(option, param, &usedarg, config);
+
+      if(param && *param && !usedarg)
+        /* we passed in a parameter that wasn't used! */
+        res = PARAM_GOT_EXTRA_PARAMETER;
+
+      if(res != PARAM_OK) {
+        /* the help request isn't really an error */
+        if(!strcmp(filename, "-")) {
+          filename = (char *)"<stdin>";
+        }
+        if(PARAM_HELP_REQUESTED != res) {
+          const char *reason = param2text(res);
+          warnf(config, "%s:%d: warning: '%s' %s\n",
+                filename, lineno, option, reason);
+        }
+      }
+
+      if(alloced_param)
+        Curl_safefree(param);
+
+      Curl_safefree(aline);
+    }
+    if(file != stdin)
+      fclose(file);
+  }
+  else
+    rc = 1; /* couldn't open the file */
+
+  return rc;
+}
+
+/*
+ * Copies the string from line to the buffer at param, unquoting
+ * backslash-quoted characters and NUL-terminating the output string.
+ * Stops at the first non-backslash-quoted double quote character or the
+ * end of the input string. param must be at least as long as the input
+ * string.  Returns the pointer after the last handled input character.
+ */
+static const char *unslashquote(const char *line, char *param)
+{
+  while(*line && (*line != '\"')) {
+    if(*line == '\\') {
+      char out;
+      line++;
+
+      /* default is to output the letter after the backslash */
+      switch(out = *line) {
+      case '\0':
+        continue; /* this'll break out of the loop */
+      case 't':
+        out = '\t';
+        break;
+      case 'n':
+        out = '\n';
+        break;
+      case 'r':
+        out = '\r';
+        break;
+      case 'v':
+        out = '\v';
+        break;
+      }
+      *param++ = out;
+      line++;
+    }
+    else
+      *param++ = *line++;
+  }
+  *param = '\0'; /* always zero terminate */
+  return line;
+}
+
+/*
+ * Reads a line from the given file, ensuring is NUL terminated.
+ * The pointer must be freed by the caller.
+ * NULL is returned on an out of memory condition.
+ */
+static char *my_get_line(FILE *fp)
+{
+  char buf[4096];
+  char *nl = NULL;
+  char *line = NULL;
+
+  do {
+    if(NULL == fgets(buf, sizeof(buf), fp))
+      break;
+    if(!line) {
+      line = strdup(buf);
+      if(!line)
+        return NULL;
+    }
+    else {
+      char *ptr;
+      size_t linelen = strlen(line);
+      ptr = realloc(line, linelen + strlen(buf) + 1);
+      if(!ptr) {
+        Curl_safefree(line);
+        return NULL;
+      }
+      line = ptr;
+      strcpy(&line[linelen], buf);
+    }
+    nl = strchr(line, '\n');
+  } while(!nl);
+
+  if(nl)
+    *nl = '\0';
+
+  return line;
+}
+
diff --git a/src/tool_parsecfg.h b/src/tool_parsecfg.h
new file mode 100644 (file)
index 0000000..aa7ac57
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef HEADER_CURL_TOOL_PARSECFG_H
+#define HEADER_CURL_TOOL_PARSECFG_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+int parseconfig(const char *filename,
+                struct Configurable *config);
+
+#endif /* HEADER_CURL_TOOL_PARSECFG_H */
+
diff --git a/src/tool_sdecls.h b/src/tool_sdecls.h
new file mode 100644 (file)
index 0000000..5468830
--- /dev/null
@@ -0,0 +1,153 @@
+#ifndef HEADER_CURL_TOOL_SDECLS_H
+#define HEADER_CURL_TOOL_SDECLS_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+#ifdef USE_METALINK
+#  include <metalink/metalink.h>
+#endif /* USE_METALINK */
+
+/*
+ * OutStruct variables keep track of information relative to curl's
+ * output writing, which may take place to a standard stream or a file.
+ *
+ * 'filename' member is either a pointer to a file name string or NULL
+ * when dealing with a standard stream.
+ *
+ * 'alloc_filename' member is TRUE when string pointed by 'filename' has been
+ * dynamically allocated and 'belongs' to this OutStruct, otherwise FALSE.
+ *
+ * 'is_cd_filename' member is TRUE when string pointed by 'filename' has been
+ * set using a server-specified Content-Disposition filename, otherwise FALSE.
+ *
+ * 's_isreg' member is TRUE when output goes to a regular file, this also
+ * implies that output is 'seekable' and 'appendable' and also that member
+ * 'filename' points to file name's string. For any standard stream member
+ * 's_isreg' will be FALSE.
+ *
+ * 'fopened' member is TRUE when output goes to a regular file and it
+ * has been fopen'ed, requiring it to be closed later on. In any other
+ * case this is FALSE.
+ *
+ * 'stream' member is a pointer to a stream controlling object as returned
+ * from a 'fopen' call or a standard stream.
+ *
+ * 'config' member is a pointer to associated 'Configurable' struct.
+ *
+ * 'bytes' member represents amount written so far.
+ *
+ * 'init' member holds original file size or offset at which truncation is
+ * taking place. Always zero unless appending to a non-empty regular file.
+ *
+ * 'metalink_parser' member is a pointer to Metalink XML parser
+ * context.
+ */
+
+struct OutStruct {
+  char *filename;
+  bool alloc_filename;
+  bool is_cd_filename;
+  bool s_isreg;
+  bool fopened;
+  FILE *stream;
+  struct Configurable *config;
+  curl_off_t bytes;
+  curl_off_t init;
+#ifdef USE_METALINK
+  metalink_parser_context_t *metalink_parser;
+#endif /* USE_METALINK */
+};
+
+
+/*
+ * InStruct variables keep track of information relative to curl's
+ * input reading, which may take place from stdin or from some file.
+ *
+ * 'fd' member is either 'stdin' file descriptor number STDIN_FILENO
+ * or a file descriptor as returned from an 'open' call for some file.
+ *
+ * 'config' member is a pointer to associated 'Configurable' struct.
+ */
+
+struct InStruct {
+  int fd;
+  struct Configurable *config;
+};
+
+
+/*
+ * A linked list of these 'getout' nodes contain URL's to fetch,
+ * as well as information relative to where URL contents should
+ * be stored or which file should be uploaded.
+ */
+
+struct getout {
+  struct getout *next;      /* next one */
+  char          *url;       /* the URL we deal with */
+  char          *outfile;   /* where to store the output */
+  char          *infile;    /* file to upload, if GETOUT_UPLOAD is set */
+  int            flags;     /* options - composed of GETOUT_* bits */
+};
+
+#define GETOUT_OUTFILE    (1<<0)  /* set when outfile is deemed done */
+#define GETOUT_URL        (1<<1)  /* set when URL is deemed done */
+#define GETOUT_USEREMOTE  (1<<2)  /* use remote file name locally */
+#define GETOUT_UPLOAD     (1<<3)  /* if set, -T has been used */
+#define GETOUT_NOUPLOAD   (1<<4)  /* if set, -T "" has been used */
+#define GETOUT_METALINK   (1<<5)  /* set when Metalink download */
+
+/*
+ * 'trace' enumeration represents curl's output look'n feel possibilities.
+ */
+
+typedef enum {
+  TRACE_NONE,  /* no trace/verbose output at all */
+  TRACE_BIN,   /* tcpdump inspired look */
+  TRACE_ASCII, /* like *BIN but without the hex output */
+  TRACE_PLAIN  /* -v/--verbose type */
+} trace;
+
+
+/*
+ * 'HttpReq' enumeration represents HTTP request types.
+ */
+
+typedef enum {
+  HTTPREQ_UNSPEC,  /* first in list */
+  HTTPREQ_GET,
+  HTTPREQ_HEAD,
+  HTTPREQ_POST,
+  HTTPREQ_SIMPLEPOST,
+  HTTPREQ_CUSTOM,
+  HTTPREQ_LAST     /* last in list */
+} HttpReq;
+
+
+/*
+ * Complete struct declarations which have Configurable struct members,
+ * just in case this header is directly included in some source file.
+ */
+
+#include "tool_cfgable.h"
+
+#endif /* HEADER_CURL_TOOL_SDECLS_H */
+
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
new file mode 100644 (file)
index 0000000..cb93e11
--- /dev/null
@@ -0,0 +1,560 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+
+#define ENABLE_CURLX_PRINTF
+/* use our own printf() functions */
+#include "curlx.h"
+
+#include "tool_cfgable.h"
+#include "tool_easysrc.h"
+#include "tool_setopt.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+/* Lookup tables for converting setopt values back to symbols */
+/* For enums, values may be in any order. */
+/* For bit masks, put combinations first, then single bits, */
+/* and finally any "NONE" value. */
+
+#define NV(e) {#e, e}
+#define NV1(e, v) {#e, (v)}
+#define NVEND {NULL, 0}         /* sentinel to mark end of list */
+
+const NameValue setopt_nv_CURLPROXY[] = {
+  NV(CURLPROXY_HTTP),
+  NV(CURLPROXY_HTTP_1_0),
+  NV(CURLPROXY_SOCKS4),
+  NV(CURLPROXY_SOCKS5),
+  NV(CURLPROXY_SOCKS4A),
+  NV(CURLPROXY_SOCKS5_HOSTNAME),
+  NVEND,
+};
+
+const NameValueUnsigned setopt_nv_CURLAUTH[] = {
+  NV(CURLAUTH_ANY),             /* combination */
+  NV(CURLAUTH_ANYSAFE),         /* combination */
+  NV(CURLAUTH_BASIC),
+  NV(CURLAUTH_DIGEST),
+  NV(CURLAUTH_GSSNEGOTIATE),
+  NV(CURLAUTH_NTLM),
+  NV(CURLAUTH_DIGEST_IE),
+  NV(CURLAUTH_NTLM_WB),
+  NV(CURLAUTH_ONLY),
+  NV(CURLAUTH_NONE),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURL_HTTP_VERSION[] = {
+  NV(CURL_HTTP_VERSION_NONE),
+  NV(CURL_HTTP_VERSION_1_0),
+  NV(CURL_HTTP_VERSION_1_1),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURL_SSLVERSION[] = {
+  NV(CURL_SSLVERSION_DEFAULT),
+  NV(CURL_SSLVERSION_TLSv1),
+  NV(CURL_SSLVERSION_SSLv2),
+  NV(CURL_SSLVERSION_SSLv3),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURL_TIMECOND[] = {
+  NV(CURL_TIMECOND_IFMODSINCE),
+  NV(CURL_TIMECOND_IFUNMODSINCE),
+  NV(CURL_TIMECOND_LASTMOD),
+  NV(CURL_TIMECOND_NONE),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURLFTPSSL_CCC[] = {
+  NV(CURLFTPSSL_CCC_NONE),
+  NV(CURLFTPSSL_CCC_PASSIVE),
+  NV(CURLFTPSSL_CCC_ACTIVE),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURLUSESSL[] = {
+  NV(CURLUSESSL_NONE),
+  NV(CURLUSESSL_TRY),
+  NV(CURLUSESSL_CONTROL),
+  NV(CURLUSESSL_ALL),
+  NVEND,
+};
+
+const NameValue setopt_nv_CURL_NETRC[] = {
+  NV(CURL_NETRC_IGNORED),
+  NV(CURL_NETRC_OPTIONAL),
+  NV(CURL_NETRC_REQUIRED),
+  NVEND,
+};
+
+/* These mappings essentially triplicated - see
+ * tool_libinfo.c and tool_paramhlp.c */
+const NameValue setopt_nv_CURLPROTO[] = {
+  NV(CURLPROTO_ALL),            /* combination */
+  NV(CURLPROTO_DICT),
+  NV(CURLPROTO_FILE),
+  NV(CURLPROTO_FTP),
+  NV(CURLPROTO_FTPS),
+  NV(CURLPROTO_GOPHER),
+  NV(CURLPROTO_HTTP),
+  NV(CURLPROTO_HTTPS),
+  NV(CURLPROTO_IMAP),
+  NV(CURLPROTO_IMAPS),
+  NV(CURLPROTO_LDAP),
+  NV(CURLPROTO_LDAPS),
+  NV(CURLPROTO_POP3),
+  NV(CURLPROTO_POP3S),
+  NV(CURLPROTO_RTSP),
+  NV(CURLPROTO_SCP),
+  NV(CURLPROTO_SFTP),
+  NV(CURLPROTO_SMTP),
+  NV(CURLPROTO_SMTPS),
+  NV(CURLPROTO_TELNET),
+  NV(CURLPROTO_TFTP),
+  NVEND,
+};
+
+/* These options have non-zero default values. */
+static const NameValue setopt_nv_CURLNONZERODEFAULTS[] = {
+  NV1(CURLOPT_SSL_VERIFYPEER, 1),
+  NV1(CURLOPT_SSL_VERIFYHOST, 1),
+  NVEND
+};
+
+/* Format and add code; jump to nomem on malloc error */
+#define ADD(args) do { \
+  ret = easysrc_add args; \
+  if(ret) \
+    goto nomem; \
+} WHILE_FALSE
+#define ADDF(args) do { \
+  ret = easysrc_addf args; \
+  if(ret) \
+    goto nomem; \
+} WHILE_FALSE
+
+#define DECL0(s) ADD((&easysrc_decl, s))
+#define DECL1(f,a) ADDF((&easysrc_decl, f,a))
+
+#define DATA0(s) ADD((&easysrc_data, s))
+#define DATA1(f,a) ADDF((&easysrc_data, f,a))
+#define DATA2(f,a,b) ADDF((&easysrc_data, f,a,b))
+#define DATA3(f,a,b,c) ADDF((&easysrc_data, f,a,b,c))
+
+#define CODE0(s) ADD((&easysrc_code, s))
+#define CODE1(f,a) ADDF((&easysrc_code, f,a))
+#define CODE2(f,a,b) ADDF((&easysrc_code, f,a,b))
+#define CODE3(f,a,b,c) ADDF((&easysrc_code, f,a,b,c))
+
+#define CLEAN0(s) ADD((&easysrc_clean, s))
+#define CLEAN1(f,a) ADDF((&easysrc_clean, f,a))
+
+#define REM0(s) ADD((&easysrc_toohard, s))
+#define REM1(f,a) ADDF((&easysrc_toohard, f,a))
+#define REM2(f,a,b) ADDF((&easysrc_toohard, f,a,b))
+
+/* Escape string to C string syntax.  Return NULL if out of memory.
+ * Is this correct for those wacky EBCDIC guys? */
+static char *c_escape(const char *str)
+{
+  size_t len = 0;
+  const char *s;
+  unsigned char c;
+  char *escaped, *e;
+  /* Allocate space based on worst-case */
+  len = strlen(str);
+  escaped = malloc(4 * len + 1);
+  if(!escaped)
+    return NULL;
+
+  e = escaped;
+  for(s=str; (c=*s) != '\0'; s++) {
+    if(c=='\n') {
+      strcpy(e, "\\n");
+      e += 2;
+    }
+    else if(c=='\r') {
+      strcpy(e, "\\r");
+      e += 2;
+    }
+    else if(c=='\t') {
+      strcpy(e, "\\t");
+      e += 2;
+    }
+    else if(c=='\\') {
+      strcpy(e, "\\\\");
+      e += 2;
+    }
+    else if(c=='"') {
+      strcpy(e, "\\\"");
+      e += 2;
+    }
+    else if(! isprint(c)) {
+      snprintf(e, 4, "\\%03o", c);
+      e += 4;
+    }
+    else
+      *e++ = c;
+  }
+  *e = '\0';
+  return escaped;
+}
+
+/* setopt wrapper for enum types */
+CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config,
+                          const char *name, CURLoption tag,
+                          const NameValue *nvlist, long lval)
+{
+  CURLcode ret = CURLE_OK;
+  bool skip = FALSE;
+
+  ret = curl_easy_setopt(curl, tag, lval);
+  if(!lval)
+    skip = TRUE;
+
+  if(config->libcurl && !skip && !ret) {
+    /* we only use this for real if --libcurl was used */
+    const NameValue *nv = NULL;
+    for(nv=nvlist; nv->name; nv++) {
+      if(nv->value == lval) break; /* found it */
+    }
+    if(! nv->name) {
+      /* If no definition was found, output an explicit value.
+       * This could happen if new values are defined and used
+       * but the NameValue list is not updated. */
+      CODE2("curl_easy_setopt(hnd, %s, %ldL);", name, lval);
+    }
+    else {
+      CODE2("curl_easy_setopt(hnd, %s, (long)%s);", name, nv->name);
+    }
+  }
+
+ nomem:
+  return ret;
+}
+
+/* setopt wrapper for flags */
+CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config,
+                           const char *name, CURLoption tag,
+                           const NameValue *nvlist, long lval)
+{
+  CURLcode ret = CURLE_OK;
+  bool skip = FALSE;
+
+  ret = curl_easy_setopt(curl, tag, lval);
+  if(!lval)
+    skip = TRUE;
+
+  if(config->libcurl && !skip && !ret) {
+    /* we only use this for real if --libcurl was used */
+    char preamble[80];          /* should accommodate any symbol name */
+    long rest = lval;           /* bits not handled yet */
+    const NameValue *nv = NULL;
+    snprintf(preamble, sizeof(preamble),
+             "curl_easy_setopt(hnd, %s, ", name);
+    for(nv=nvlist; nv->name; nv++) {
+      if((nv->value & ~ rest) == 0) {
+        /* all value flags contained in rest */
+        rest &= ~ nv->value;    /* remove bits handled here */
+        CODE3("%s(long)%s%s",
+              preamble, nv->name, rest ? " |" : ");");
+        if(!rest)
+          break;                /* handled them all */
+        /* replace with all spaces for continuation line */
+        snprintf(preamble, sizeof(preamble), "%*s", strlen(preamble), "");
+      }
+    }
+    /* If any bits have no definition, output an explicit value.
+     * This could happen if new bits are defined and used
+     * but the NameValue list is not updated. */
+    if(rest)
+      CODE2("%s%ldL);", preamble, rest);
+  }
+
+ nomem:
+  return ret;
+}
+
+/* setopt wrapper for bitmasks */
+CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config,
+                             const char *name, CURLoption tag,
+                             const NameValueUnsigned *nvlist,
+                             long lval)
+{
+  CURLcode ret = CURLE_OK;
+  bool skip = FALSE;
+
+  ret = curl_easy_setopt(curl, tag, lval);
+  if(!lval)
+    skip = TRUE;
+
+  if(config->libcurl && !skip && !ret) {
+    /* we only use this for real if --libcurl was used */
+    char preamble[80];
+    unsigned long rest = (unsigned long)lval;
+    const NameValueUnsigned *nv = NULL;
+    snprintf(preamble, sizeof(preamble),
+             "curl_easy_setopt(hnd, %s, ", name);
+    for(nv=nvlist; nv->name; nv++) {
+      if((nv->value & ~ rest) == 0) {
+        /* all value flags contained in rest */
+        rest &= ~ nv->value;    /* remove bits handled here */
+        CODE3("%s(long)%s%s",
+              preamble, nv->name, rest ? " |" : ");");
+        if(!rest)
+          break;                /* handled them all */
+        /* replace with all spaces for continuation line */
+        snprintf(preamble, sizeof(preamble), "%*s", strlen(preamble), "");
+      }
+    }
+    /* If any bits have no definition, output an explicit value.
+     * This could happen if new bits are defined and used
+     * but the NameValue list is not updated. */
+    if(rest)
+      CODE2("%s%luUL);", preamble, rest);
+  }
+
+ nomem:
+  return ret;
+}
+
+/* setopt wrapper for CURLOPT_HTTPPOST */
+CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config,
+                              const char *name, CURLoption tag,
+                              struct curl_httppost *post)
+{
+  CURLcode ret = CURLE_OK;
+  char *escaped = NULL;
+  bool skip = FALSE;
+
+  ret = curl_easy_setopt(curl, tag, post);
+  if(!post)
+    skip = TRUE;
+
+  if(config->libcurl && !skip && !ret) {
+    struct curl_httppost *pp, *p;
+    int i;
+    /* May use several httppost lists, if multiple POST actions */
+    i = ++ easysrc_form_count;
+    DECL1("struct curl_httppost *post%d;", i);
+    DATA1("post%d = NULL;", i);
+    CLEAN1("curl_formfree(post%d);", i);
+    CLEAN1("post%d = NULL;", i);
+    if(i == 1)
+      DECL0("struct curl_httppost *postend;");
+    DATA0("postend = NULL;");
+    for(p=post; p; p=p->next) {
+      DATA1("curl_formadd(&post%d, &postend,", i);
+      DATA1("             CURLFORM_COPYNAME, \"%s\",", p->name);
+      for(pp=p; pp; pp=pp->more) {
+        /* May be several files uploaded for one name;
+         * these are linked through the 'more' pointer */
+        Curl_safefree(escaped);
+        escaped = c_escape(pp->contents);
+        if(!escaped) {
+          ret = CURLE_OUT_OF_MEMORY;
+          goto nomem;
+        }
+        if(pp->flags & HTTPPOST_FILENAME) {
+          /* file upload as for -F @filename */
+          DATA1("             CURLFORM_FILE, \"%s\",", escaped);
+        }
+        else if(pp->flags & HTTPPOST_READFILE) {
+          /* content from file as for -F <filename */
+          DATA1("             CURLFORM_FILECONTENT, \"%s\",", escaped);
+        }
+        else
+          DATA1("             CURLFORM_COPYCONTENTS, \"%s\",", escaped);
+        if(pp->showfilename) {
+          Curl_safefree(escaped);
+          escaped = c_escape(pp->showfilename);
+          if(!escaped) {
+            ret = CURLE_OUT_OF_MEMORY;
+            goto nomem;
+          }
+          DATA1("             CURLFORM_FILENAME, \"%s\",", escaped);
+        }
+        if(pp->contenttype) {
+          Curl_safefree(escaped);
+          escaped = c_escape(pp->contenttype);
+          if(!escaped) {
+            ret = CURLE_OUT_OF_MEMORY;
+            goto nomem;
+          }
+          DATA1("             CURLFORM_CONTENTTYPE, \"%s\",", escaped);
+        }
+      }
+      DATA0("             CURLFORM_END);");
+    }
+    CODE2("curl_easy_setopt(hnd, %s, post%d);", name, i);
+  }
+
+ nomem:
+  Curl_safefree(escaped);
+  return ret;
+}
+
+/* setopt wrapper for curl_slist options */
+CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config,
+                           const char *name, CURLoption tag,
+                           struct curl_slist *list)
+{
+  CURLcode ret = CURLE_OK;
+  char *escaped = NULL;
+  bool skip = FALSE;
+
+  ret = curl_easy_setopt(curl, tag, list);
+  if(!list)
+    skip = TRUE;
+
+  if(config->libcurl && !skip && !ret) {
+    struct curl_slist *s;
+    int i;
+    /* May need several slist variables, so invent name */
+    i = ++ easysrc_slist_count;
+    DECL1("struct curl_slist *slist%d;", i);
+    DATA1("slist%d = NULL;", i);
+    CLEAN1("curl_slist_free_all(slist%d);", i);
+    CLEAN1("slist%d = NULL;", i);
+    for(s=list; s; s=s->next) {
+      Curl_safefree(escaped);
+      escaped = c_escape(s->data);
+      if(!escaped) {
+        ret = CURLE_OUT_OF_MEMORY;
+        goto nomem;
+      }
+      DATA3("slist%d = curl_slist_append(slist%d, \"%s\");", i, i, escaped);
+    }
+    CODE2("curl_easy_setopt(hnd, %s, slist%d);", name, i);
+  }
+
+ nomem:
+  Curl_safefree(escaped);
+  return ret;
+}
+
+/* generic setopt wrapper for all other options.
+ * Some type information is encoded in the tag value. */
+CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config,
+                     const char *name, CURLoption tag, ...)
+{
+  va_list arg;
+  char buf[256];
+  const char *value = NULL;
+  bool remark = FALSE;
+  bool skip = FALSE;
+  bool escape = FALSE;
+  char *escaped = NULL;
+  CURLcode ret = CURLE_OK;
+
+  va_start(arg, tag);
+
+  if(tag < CURLOPTTYPE_OBJECTPOINT) {
+    /* Value is expected to be a long */
+    long lval = va_arg(arg, long);
+    long defval = 0L;
+    const NameValue *nv = NULL;
+    for(nv=setopt_nv_CURLNONZERODEFAULTS; nv->name; nv++) {
+      if(!strcmp(name, nv->name)) {
+        defval = nv->value;
+        break; /* found it */
+      }
+    }
+
+    snprintf(buf, sizeof(buf), "%ldL", lval);
+    value = buf;
+    ret = curl_easy_setopt(curl, tag, lval);
+    if(lval == defval)
+      skip = TRUE;
+  }
+  else if(tag < CURLOPTTYPE_OFF_T) {
+    /* Value is some sort of object pointer */
+    void *pval = va_arg(arg, void *);
+
+    /* function pointers are never printable */
+    if(tag >= CURLOPTTYPE_FUNCTIONPOINT) {
+      if(pval) {
+        value = "functionpointer";
+        remark = TRUE;
+      }
+      else
+        skip = TRUE;
+    }
+
+    else if(pval && str) {
+      value = (char *)pval;
+      escape = TRUE;
+    }
+    else if(pval) {
+      value = "objectpointer";
+      remark = TRUE;
+    }
+    else
+      skip = TRUE;
+
+    ret = curl_easy_setopt(curl, tag, pval);
+
+  }
+  else {
+    /* Value is expected to be curl_off_t */
+    curl_off_t oval = va_arg(arg, curl_off_t);
+    snprintf(buf, sizeof(buf),
+             "(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
+    value = buf;
+    ret = curl_easy_setopt(curl, tag, oval);
+
+    if(!oval)
+      skip = TRUE;
+  }
+
+  va_end(arg);
+
+  if(config->libcurl && !skip && !ret) {
+    /* we only use this for real if --libcurl was used */
+
+    if(remark)
+      REM2("%s set to a %s", name, value);
+    else {
+      if(escape) {
+        escaped = c_escape(value);
+        if(!escaped) {
+          ret = CURLE_OUT_OF_MEMORY;
+          goto nomem;
+        }
+        CODE2("curl_easy_setopt(hnd, %s, \"%s\");", name, escaped);
+      }
+      else
+        CODE2("curl_easy_setopt(hnd, %s, %s);", name, value);
+    }
+  }
+
+ nomem:
+  Curl_safefree(escaped);
+  return ret;
+}
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
new file mode 100644 (file)
index 0000000..ec07a96
--- /dev/null
@@ -0,0 +1,148 @@
+#ifndef HEADER_CURL_TOOL_SETOPT_H
+#define HEADER_CURL_TOOL_SETOPT_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "tool_setup.h"
+
+/*
+ * Macros used in operate()
+ */
+
+#define SETOPT_CHECK(v) do { \
+  res = (v); \
+  if(res) \
+    goto show_error; \
+} WHILE_FALSE
+
+#ifndef CURL_DISABLE_LIBCURL_OPTION
+
+/* Associate symbolic names with option values */
+typedef struct {
+  const char *name;
+  long value;
+} NameValue;
+
+typedef struct {
+  const char *name;
+  unsigned long value;
+} NameValueUnsigned;
+
+extern const NameValue setopt_nv_CURLPROXY[];
+extern const NameValue setopt_nv_CURL_HTTP_VERSION[];
+extern const NameValue setopt_nv_CURL_SSLVERSION[];
+extern const NameValue setopt_nv_CURL_TIMECOND[];
+extern const NameValue setopt_nv_CURLFTPSSL_CCC[];
+extern const NameValue setopt_nv_CURLUSESSL[];
+extern const NameValue setopt_nv_CURL_NETRC[];
+extern const NameValue setopt_nv_CURLPROTO[];
+extern const NameValueUnsigned setopt_nv_CURLAUTH[];
+
+/* Map options to NameValue sets */
+#define setopt_nv_CURLOPT_HTTP_VERSION setopt_nv_CURL_HTTP_VERSION
+#define setopt_nv_CURLOPT_HTTPAUTH setopt_nv_CURLAUTH
+#define setopt_nv_CURLOPT_SSLVERSION setopt_nv_CURL_SSLVERSION
+#define setopt_nv_CURLOPT_TIMECONDITION setopt_nv_CURL_TIMECOND
+#define setopt_nv_CURLOPT_FTP_SSL_CCC setopt_nv_CURLFTPSSL_CCC
+#define setopt_nv_CURLOPT_USE_SSL setopt_nv_CURLUSESSL
+#define setopt_nv_CURLOPT_NETRC setopt_nv_CURL_NETRC
+#define setopt_nv_CURLOPT_PROTOCOLS setopt_nv_CURLPROTO
+#define setopt_nv_CURLOPT_REDIR_PROTOCOLS setopt_nv_CURLPROTO
+#define setopt_nv_CURLOPT_PROXYTYPE setopt_nv_CURLPROXY
+#define setopt_nv_CURLOPT_PROXYAUTH setopt_nv_CURLAUTH
+
+/* Intercept setopt calls for --libcurl */
+
+CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config,
+                          const char *name, CURLoption tag,
+                          const NameValue *nv, long lval);
+CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config,
+                           const char *name, CURLoption tag,
+                           const NameValue *nv, long lval);
+CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config,
+                             const char *name, CURLoption tag,
+                             const NameValueUnsigned *nv, long lval);
+CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config,
+                              const char *name, CURLoption tag,
+                              struct curl_httppost *httppost);
+CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config,
+                           const char *name, CURLoption tag,
+                           struct curl_slist *list);
+CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config,
+                     const char *name, CURLoption tag, ...);
+
+#define my_setopt(x,y,z) \
+  SETOPT_CHECK(tool_setopt(x, FALSE, config, #y, y, z))
+
+#define my_setopt_str(x,y,z) \
+  SETOPT_CHECK(tool_setopt(x, TRUE, config, #y, y, z))
+
+#define my_setopt_enum(x,y,z) \
+  SETOPT_CHECK(tool_setopt_enum(x, config, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_flags(x,y,z) \
+  SETOPT_CHECK(tool_setopt_flags(x, config, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_bitmask(x,y,z) \
+  SETOPT_CHECK(tool_setopt_bitmask(x, config, #y, y, setopt_nv_ ## y, z))
+
+#define my_setopt_httppost(x,y,z) \
+  SETOPT_CHECK(tool_setopt_httppost(x, config, #y, y, z))
+
+#define my_setopt_slist(x,y,z) \
+  SETOPT_CHECK(tool_setopt_slist(x, config, #y, y, z))
+
+#define res_setopt(x,y,z) tool_setopt(x, FALSE, config, #y, y, z)
+
+#define res_setopt_str(x,y,z) tool_setopt(x, TRUE, config, #y, y, z)
+
+#else /* CURL_DISABLE_LIBCURL_OPTION */
+
+/* No --libcurl, so pass options directly to library */
+
+#define my_setopt(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_str(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_enum(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_flags(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_bitmask(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_httppost(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define my_setopt_slist(x,y,z) \
+  SETOPT_CHECK(curl_easy_setopt(x, y, z))
+
+#define res_setopt(x,y,z) curl_easy_setopt(x,y,z)
+
+#define res_setopt_str(x,y,z) curl_easy_setopt(x,y,z)
+
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
+
+#endif /* HEADER_CURL_TOOL_SETOPT_H */
diff --git a/src/tool_setup.h b/src/tool_setup.h
new file mode 100644 (file)
index 0000000..c94686f
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef HEADER_CURL_TOOL_SETUP_H
+#define HEADER_CURL_TOOL_SETUP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+/*
+ * curl_setup.h may define preprocessor macros such as _FILE_OFFSET_BITS and
+ * _LARGE_FILES in order to support files larger than 2 GB. On platforms
+ * where this happens it is mandatory that these macros are defined before
+ * any system header file is included, otherwise file handling function
+ * prototypes will be misdeclared and curl tool may not build properly;
+ * therefore we must include curl_setup.h before curl.h when building curl.
+ */
+
+#include "curl_setup.h" /* from the lib directory */
+
+/*
+ * curl tool certainly uses libcurl's external interface.
+ */
+
+#include <curl/curl.h> /* external interface */
+
+/*
+ * Platform specific stuff.
+ */
+
+#if defined(macintosh) && defined(__MRC__)
+#  define main(x,y) curl_main(x,y)
+#endif
+
+#ifdef TPF
+#  undef select
+   /* change which select is used for the curl command line tool */
+#  define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
+   /* and turn off the progress meter */
+#  define CONF_DEFAULT (0|CONF_NOPROGRESS)
+#endif
+
+#ifndef OS
+#  define OS "unknown"
+#endif
+
+#ifndef UNPRINTABLE_CHAR
+   /* define what to use for unprintable characters */
+#  define UNPRINTABLE_CHAR '.'
+#endif
+
+#ifndef HAVE_STRDUP
+#  include "strdup.h"
+#  define strdup(ptr) curlx_strdup(ptr)
+#endif
+
+#endif /* HEADER_CURL_TOOL_SETUP_H */
+
diff --git a/src/tool_sleep.c b/src/tool_sleep.c
new file mode 100644 (file)
index 0000000..49cdc71
--- /dev/null
@@ -0,0 +1,58 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef HAVE_SYS_SELECT_H
+#  include <sys/select.h>
+#endif
+
+#ifdef HAVE_SYS_POLL_H
+#  include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+#  include <poll.h>
+#endif
+
+#ifdef MSDOS
+#  include <dos.h>
+#endif
+
+#include "tool_sleep.h"
+
+#include "memdebug.h" /* keep this as LAST include */
+
+void tool_go_sleep(long ms)
+{
+#if defined(MSDOS)
+  delay(ms);
+#elif defined(WIN32)
+  Sleep(ms);
+#elif defined(HAVE_POLL_FINE)
+  poll((void *)0, 0, (int)ms);
+#else
+  struct timeval timeout;
+  timeout.tv_sec = ms / 1000L;
+  ms = ms % 1000L;
+  timeout.tv_usec = ms * 1000L;
+  select(0, NULL,  NULL, NULL, &timeout);
+#endif
+}
+
similarity index 81%
rename from src/writeout.h
rename to src/tool_sleep.h
index 1b22102..115a4e4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_WRITEOUT_H
-#define HEADER_CURL_WRITEOUT_H
+#ifndef HEADER_CURL_TOOL_SLEEP_H
+#define HEADER_CURL_TOOL_SLEEP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,9 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-void ourWriteOut(CURL *curl, const char *out);
+void tool_go_sleep(long ms);
+
+#endif /* HEADER_CURL_TOOL_SLEEP_H */
 
-#endif /* HEADER_CURL_WRITEOUT_H */
similarity index 61%
rename from src/urlglob.c
rename to src/tool_urlglob.c
index 590c37a..2821d00 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-/* client-local setup.h */
-#include "setup.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <curl/curl.h>
+#include "tool_setup.h"
 
 #define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */
 #include <curl/mprintf.h>
 
-#include "urlglob.h"
-#include "os-specific.h"
+#include "tool_urlglob.h"
+#include "tool_vms.h"
 
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
+#include "memdebug.h" /* keep this as LAST include */
 
 typedef enum {
   GLOB_OK,
+  GLOB_NO_MEM,
   GLOB_ERROR
 } GlobCode;
 
@@ -61,20 +52,24 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
   /* processes a set expression with the point behind the opening '{'
      ','-separated elements are collected until the next closing '}'
   */
+  URLPattern *pat;
+  GlobCode res;
   bool done = FALSE;
   char* buf = glob->glob_buffer;
-  URLPattern *pat;
 
-  pat = (URLPattern*)&glob->pattern[glob->size / 2];
+  pat = &glob->pattern[glob->size / 2];
   /* patterns 0,1,2,... correspond to size=1,3,5,... */
   pat->type = UPTSet;
   pat->content.Set.size = 0;
   pat->content.Set.ptr_s = 0;
-  /* FIXME: Here's a nasty zero size malloc */
-  pat->content.Set.elements = (char**)malloc(0);
-  ++glob->size;
+  pat->content.Set.elements = NULL;
+
+  if(++glob->size > (GLOB_PATTERN_NUM*2)) {
+    snprintf(glob->errormsg, sizeof(glob->errormsg), "too many globs used\n");
+    return GLOB_ERROR;
+  }
 
-  while (!done) {
+  while(!done) {
     switch (*pattern) {
     case '\0':                  /* URL ended while set was still open */
       snprintf(glob->errormsg, sizeof(glob->errormsg),
@@ -90,24 +85,55 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
     case ',':
     case '}':                           /* set element completed */
       *buf = '\0';
-      pat->content.Set.elements =
-        realloc(pat->content.Set.elements,
-                (pat->content.Set.size + 1) * sizeof(char*));
-      if (!pat->content.Set.elements) {
-        snprintf(glob->errormsg, sizeof(glob->errormsg), "out of memory");
-        return GLOB_ERROR;
+      if(pat->content.Set.elements) {
+        char **new_arr = realloc(pat->content.Set.elements,
+                                 (pat->content.Set.size + 1) * sizeof(char*));
+        if(!new_arr) {
+          short elem;
+          for(elem = 0; elem < pat->content.Set.size; elem++)
+            Curl_safefree(pat->content.Set.elements[elem]);
+          Curl_safefree(pat->content.Set.elements);
+          pat->content.Set.ptr_s = 0;
+          pat->content.Set.size = 0;
+        }
+        pat->content.Set.elements = new_arr;
+      }
+      else
+        pat->content.Set.elements = malloc(sizeof(char*));
+      if(!pat->content.Set.elements) {
+        snprintf(glob->errormsg, sizeof(glob->errormsg), "out of memory\n");
+        return GLOB_NO_MEM;
       }
       pat->content.Set.elements[pat->content.Set.size] =
         strdup(glob->glob_buffer);
+      if(!pat->content.Set.elements[pat->content.Set.size]) {
+        short elem;
+        for(elem = 0; elem < pat->content.Set.size; elem++)
+          Curl_safefree(pat->content.Set.elements[elem]);
+        Curl_safefree(pat->content.Set.elements);
+        pat->content.Set.ptr_s = 0;
+        pat->content.Set.size = 0;
+        snprintf(glob->errormsg, sizeof(glob->errormsg), "out of memory\n");
+        return GLOB_NO_MEM;
+      }
       ++pat->content.Set.size;
 
-      if (*pattern == '}') {
+      if(*pattern == '}') {
         /* entire set pattern completed */
         int wordamount;
 
         /* always check for a literal (may be "") between patterns */
-        if(GLOB_ERROR == glob_word(glob, ++pattern, ++pos, &wordamount))
-          return GLOB_ERROR;
+        res = glob_word(glob, ++pattern, ++pos, &wordamount);
+        if(res) {
+          short elem;
+          for(elem = 0; elem < pat->content.Set.size; elem++)
+            Curl_safefree(pat->content.Set.elements[elem]);
+          Curl_safefree(pat->content.Set.elements);
+          pat->content.Set.ptr_s = 0;
+          pat->content.Set.size = 0;
+          return res;
+        }
+
         *amount = pat->content.Set.size * wordamount;
 
         done = TRUE;
@@ -149,23 +175,30 @@ static GlobCode glob_range(URLGlob *glob, char *pattern,
   */
   URLPattern *pat;
   char *c;
-  int wordamount=1;
   char sep;
   char sep2;
   int step;
   int rc;
+  GlobCode res;
+  int wordamount = 1;
 
-  pat = (URLPattern*)&glob->pattern[glob->size / 2];
+  pat = &glob->pattern[glob->size / 2];
   /* patterns 0,1,2,... correspond to size=1,3,5,... */
-  ++glob->size;
+  if(++glob->size > (GLOB_PATTERN_NUM*2)) {
+    snprintf(glob->errormsg, sizeof(glob->errormsg), "too many globs used\n");
+    return GLOB_ERROR;
+  }
 
-  if (ISALPHA(*pattern)) {         /* character range detected */
+  if(ISALPHA(*pattern)) {
+    /* character range detected */
     char min_c;
     char max_c;
 
     pat->type = UPTCharRange;
+
     rc = sscanf(pattern, "%c-%c%c%d%c", &min_c, &max_c, &sep, &step, &sep2);
-    if ((rc < 3) || (min_c >= max_c) || ((max_c - min_c) > ('z' - 'a'))) {
+
+    if((rc < 3) || (min_c >= max_c) || ((max_c - min_c) > ('z' - 'a'))) {
       /* the pattern is not well-formed */
       snprintf(glob->errormsg, sizeof(glob->errormsg),
                "error: bad range specification after pos %zu\n", pos);
@@ -182,12 +215,13 @@ static GlobCode glob_range(URLGlob *glob, char *pattern,
 
     /* if there was a ":[num]" thing, use that as step or else use 1 */
     pat->content.CharRange.step =
-      ((sep == ':') && (rc == 5) && (sep2 == ']'))?step:1;
+      ((sep == ':') && (rc == 5) && (sep2 == ']')) ? step : 1;
 
     pat->content.CharRange.ptr_c = pat->content.CharRange.min_c = min_c;
     pat->content.CharRange.max_c = max_c;
   }
-  else if (ISDIGIT(*pattern)) { /* numeric range detected */
+  else if(ISDIGIT(*pattern)) {
+    /* numeric range detected */
     int min_n;
     int max_n;
 
@@ -196,28 +230,28 @@ static GlobCode glob_range(URLGlob *glob, char *pattern,
 
     rc = sscanf(pattern, "%d-%d%c%d%c", &min_n, &max_n, &sep, &step, &sep2);
 
-    if ((rc < 2) || (min_n > max_n)) {
+    if((rc < 2) || (min_n > max_n)) {
       /* the pattern is not well-formed */
       snprintf(glob->errormsg, sizeof(glob->errormsg),
                "error: bad range specification after pos %zu\n", pos);
       return GLOB_ERROR;
     }
-    pat->content.NumRange.ptr_n =  pat->content.NumRange.min_n = min_n;
+    pat->content.NumRange.ptr_n = pat->content.NumRange.min_n = min_n;
     pat->content.NumRange.max_n = max_n;
 
     /* if there was a ":[num]" thing, use that as step or else use 1 */
     pat->content.NumRange.step =
-      ((sep == ':') && (rc == 5) && (sep2 == ']'))?step:1;
+      ((sep == ':') && (rc == 5) && (sep2 == ']')) ? step : 1;
 
-    if (*pattern == '0') {              /* leading zero specified */
+    if(*pattern == '0') {
+      /* leading zero specified */
       c = pattern;
-      while (ISDIGIT(*c)) {
+      while(ISDIGIT(*c)) {
         c++;
         ++pat->content.NumRange.padlength; /* padding length is set for all
                                               instances of this pattern */
       }
     }
-
   }
   else {
     snprintf(glob->errormsg, sizeof(glob->errormsg),
@@ -235,18 +269,22 @@ static GlobCode glob_range(URLGlob *glob, char *pattern,
 
   /* always check for a literal (may be "") between patterns */
 
-  if(GLOB_ERROR == glob_word(glob, c, pos + (c - pattern), &wordamount))
+  res = glob_word(glob, c, pos + (c - pattern), &wordamount);
+  if(res == GLOB_ERROR) {
     wordamount = 1;
+    res = GLOB_OK;
+  }
 
-  if(pat->type == UPTCharRange)
-    *amount = (pat->content.CharRange.max_c -
-               pat->content.CharRange.min_c + 1) *
-      wordamount;
-  else
-    *amount = (pat->content.NumRange.max_n -
-               pat->content.NumRange.min_n + 1) * wordamount;
+  if(!res) {
+    if(pat->type == UPTCharRange)
+      *amount = wordamount * (pat->content.CharRange.max_c -
+                              pat->content.CharRange.min_c + 1);
+    else
+      *amount = wordamount * (pat->content.NumRange.max_n -
+                              pat->content.NumRange.min_n + 1);
+  }
 
-  return GLOB_OK;
+  return res; /* GLOB_OK or GLOB_NO_MEM */
 }
 
 static GlobCode glob_word(URLGlob *glob, char *pattern,
@@ -261,15 +299,15 @@ static GlobCode glob_word(URLGlob *glob, char *pattern,
 
   *amount = 1; /* default is one single string */
 
-  while (*pattern != '\0' && *pattern != '{' && *pattern != '[') {
-    if (*pattern == '}' || *pattern == ']') {
+  while(*pattern != '\0' && *pattern != '{' && *pattern != '[') {
+    if(*pattern == '}' || *pattern == ']') {
       snprintf(glob->errormsg, sizeof(glob->errormsg),
                "unmatched close brace/bracket at pos %zu\n", pos);
       return GLOB_ERROR;
     }
 
     /* only allow \ to escape known "special letters" */
-    if (*pattern == '\\' &&
+    if(*pattern == '\\' &&
         (*(pattern+1) == '{' || *(pattern+1) == '[' ||
          *(pattern+1) == '}' || *(pattern+1) == ']') ) {
 
@@ -277,20 +315,23 @@ static GlobCode glob_word(URLGlob *glob, char *pattern,
       ++pattern;
       ++pos;
     }
-    *buf++ = *pattern++;                /* copy character to literal */
+    *buf++ = *pattern++; /* copy character to literal */
     ++pos;
   }
   *buf = '\0';
   litindex = glob->size / 2;
   /* literals 0,1,2,... correspond to size=0,2,4,... */
   glob->literal[litindex] = strdup(glob->glob_buffer);
-  if(!glob->literal[litindex])
-    return GLOB_ERROR;
+  if(!glob->literal[litindex]) {
+    snprintf(glob->errormsg, sizeof(glob->errormsg), "out of memory\n");
+    return GLOB_NO_MEM;
+  }
   ++glob->size;
 
   switch (*pattern) {
   case '\0':
-    break;                      /* singular URL processed  */
+    /* singular URL processed  */
+    break;
 
   case '{':
     /* process set pattern */
@@ -299,15 +340,14 @@ static GlobCode glob_word(URLGlob *glob, char *pattern,
 
   case '[':
     /* process range pattern */
-    res= glob_range(glob, ++pattern, ++pos, amount);
+    res = glob_range(glob, ++pattern, ++pos, amount);
     break;
   }
 
-  if(GLOB_OK != res)
-    /* free that strdup'ed string again */
-    free(glob->literal[litindex]);
+  if(res)
+    Curl_safefree(glob->literal[litindex]);
 
-  return res; /* something got wrong */
+  return res;
 }
 
 int glob_url(URLGlob** glob, char* url, int *urlnum, FILE *error)
@@ -318,35 +358,40 @@ int glob_url(URLGlob** glob, char* url, int *urlnum, FILE *error)
    */
   URLGlob *glob_expand;
   int amount;
-  char *glob_buffer = malloc(strlen(url)+1);
+  char *glob_buffer;
+  GlobCode res;
 
   *glob = NULL;
-  if(NULL == glob_buffer)
+
+  glob_buffer = malloc(strlen(url) + 1);
+  if(!glob_buffer)
     return CURLE_OUT_OF_MEMORY;
 
   glob_expand = calloc(1, sizeof(URLGlob));
-  if(NULL == glob_expand) {
-    free(glob_buffer);
+  if(!glob_expand) {
+    Curl_safefree(glob_buffer);
     return CURLE_OUT_OF_MEMORY;
   }
   glob_expand->size = 0;
   glob_expand->urllen = strlen(url);
   glob_expand->glob_buffer = glob_buffer;
-  glob_expand->beenhere=0;
-  if(GLOB_OK == glob_word(glob_expand, url, 1, &amount))
+  glob_expand->beenhere = 0;
+
+  res = glob_word(glob_expand, url, 1, &amount);
+  if(!res)
     *urlnum = amount;
   else {
     if(error && glob_expand->errormsg[0]) {
       /* send error description to the error-stream */
       fprintf(error, "curl: (%d) [globbing] %s",
-              CURLE_URL_MALFORMAT, glob_expand->errormsg);
+              (res == GLOB_NO_MEM) ? CURLE_OUT_OF_MEMORY : CURLE_URL_MALFORMAT,
+              glob_expand->errormsg);
     }
     /* it failed, we cleanup */
-    free(glob_buffer);
-    free(glob_expand);
-    glob_expand = NULL;
+    Curl_safefree(glob_buffer);
+    Curl_safefree(glob_expand);
     *urlnum = 1;
-    return CURLE_URL_MALFORMAT;
+    return (res == GLOB_NO_MEM) ? CURLE_OUT_OF_MEMORY : CURLE_URL_MALFORMAT;
   }
 
   *glob = glob_expand;
@@ -358,48 +403,52 @@ void glob_cleanup(URLGlob* glob)
   size_t i;
   int elem;
 
-  for (i = glob->size - 1; i < glob->size; --i) {
-    if (!(i & 1)) {     /* even indexes contain literals */
-      free(glob->literal[i/2]);
+  for(i = glob->size - 1; i < glob->size; --i) {
+    if(!(i & 1)) {     /* even indexes contain literals */
+      Curl_safefree(glob->literal[i/2]);
     }
     else {              /* odd indexes contain sets or ranges */
-      if (glob->pattern[i/2].type == UPTSet) {
-        for (elem = glob->pattern[i/2].content.Set.size - 1;
+      if((glob->pattern[i/2].type == UPTSet) &&
+         (glob->pattern[i/2].content.Set.elements)) {
+        for(elem = glob->pattern[i/2].content.Set.size - 1;
              elem >= 0;
              --elem) {
-          free(glob->pattern[i/2].content.Set.elements[elem]);
+          Curl_safefree(glob->pattern[i/2].content.Set.elements[elem]);
         }
-        free(glob->pattern[i/2].content.Set.elements);
+        Curl_safefree(glob->pattern[i/2].content.Set.elements);
       }
     }
   }
-  free(glob->glob_buffer);
-  free(glob);
+  Curl_safefree(glob->glob_buffer);
+  Curl_safefree(glob);
 }
 
-char *glob_next_url(URLGlob *glob)
+int glob_next_url(char **globbed, URLGlob *glob)
 {
-  char *buf = glob->glob_buffer;
   URLPattern *pat;
   char *lit;
   size_t i;
   size_t j;
-  size_t buflen = glob->urllen+1;
   size_t len;
+  size_t buflen = glob->urllen + 1;
+  char *buf = glob->glob_buffer;
+
+  *globbed = NULL;
 
-  if (!glob->beenhere)
+  if(!glob->beenhere)
     glob->beenhere = 1;
   else {
     bool carry = TRUE;
 
     /* implement a counter over the index ranges of all patterns,
        starting with the rightmost pattern */
-    for (i = glob->size / 2 - 1; carry && i < glob->size; --i) {
+    for(i = glob->size / 2 - 1; carry && (i < glob->size); --i) {
       carry = FALSE;
       pat = &glob->pattern[i];
       switch (pat->type) {
       case UPTSet:
-        if (++pat->content.Set.ptr_s == pat->content.Set.size) {
+        if((pat->content.Set.elements) &&
+           (++pat->content.Set.ptr_s == pat->content.Set.size)) {
           pat->content.Set.ptr_s = 0;
           carry = TRUE;
         }
@@ -407,29 +456,31 @@ char *glob_next_url(URLGlob *glob)
       case UPTCharRange:
         pat->content.CharRange.ptr_c = (char)(pat->content.CharRange.step +
                            (int)((unsigned char)pat->content.CharRange.ptr_c));
-        if (pat->content.CharRange.ptr_c > pat->content.CharRange.max_c) {
+        if(pat->content.CharRange.ptr_c > pat->content.CharRange.max_c) {
           pat->content.CharRange.ptr_c = pat->content.CharRange.min_c;
           carry = TRUE;
         }
         break;
       case UPTNumRange:
         pat->content.NumRange.ptr_n += pat->content.NumRange.step;
-        if (pat->content.NumRange.ptr_n > pat->content.NumRange.max_n) {
+        if(pat->content.NumRange.ptr_n > pat->content.NumRange.max_n) {
           pat->content.NumRange.ptr_n = pat->content.NumRange.min_n;
           carry = TRUE;
         }
         break;
       default:
         printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
-        exit (CURLE_FAILED_INIT);
+        return CURLE_FAILED_INIT;
       }
     }
-    if (carry)          /* first pattern ptr has run into overflow, done! */
-      return NULL;
+    if(carry) {         /* first pattern ptr has run into overflow, done! */
+      /* TODO: verify if this should actally return CURLE_OK. */
+      return CURLE_OK; /* CURLE_OK to match previous behavior */
+    }
   }
 
-  for (j = 0; j < glob->size; ++j) {
-    if (!(j&1)) {              /* every other term (j even) is a literal */
+  for(j = 0; j < glob->size; ++j) {
+    if(!(j&1)) {              /* every other term (j even) is a literal */
       lit = glob->literal[j/2];
       len = snprintf(buf, buflen, "%s", lit);
       buf += len;
@@ -439,11 +490,13 @@ char *glob_next_url(URLGlob *glob)
       pat = &glob->pattern[j/2];
       switch(pat->type) {
       case UPTSet:
-        len = strlen(pat->content.Set.elements[pat->content.Set.ptr_s]);
-        snprintf(buf, buflen, "%s",
-                 pat->content.Set.elements[pat->content.Set.ptr_s]);
-        buf += len;
-        buflen -= len;
+        if(pat->content.Set.elements) {
+          len = strlen(pat->content.Set.elements[pat->content.Set.ptr_s]);
+          snprintf(buf, buflen, "%s",
+                   pat->content.Set.elements[pat->content.Set.ptr_s]);
+          buf += len;
+          buflen -= len;
+        }
         break;
       case UPTCharRange:
         *buf++ = pat->content.CharRange.ptr_c;
@@ -457,52 +510,62 @@ char *glob_next_url(URLGlob *glob)
         break;
       default:
         printf("internal error: invalid pattern type (%d)\n", (int)pat->type);
-        exit (CURLE_FAILED_INIT);
+        return CURLE_FAILED_INIT;
       }
     }
   }
   *buf = '\0';
-  return strdup(glob->glob_buffer);
+
+  *globbed = strdup(glob->glob_buffer);
+  if(!*globbed)
+    return CURLE_OUT_OF_MEMORY;
+
+  return CURLE_OK;
 }
 
-char *glob_match_url(char *filename, URLGlob *glob)
+int glob_match_url(char **result, char *filename, URLGlob *glob)
 {
   char *target;
   size_t allocsize;
-  size_t stringlen=0;
   char numbuf[18];
   char *appendthis = NULL;
   size_t appendlen = 0;
+  size_t stringlen = 0;
+
+  *result = NULL;
 
   /* We cannot use the glob_buffer for storage here since the filename may
    * be longer than the URL we use. We allocate a good start size, then
    * we need to realloc in case of need.
    */
-  allocsize=strlen(filename)+1; /* make it at least one byte to store the
-                                   trailing zero */
+  allocsize = strlen(filename) + 1; /* make it at least one byte to store the
+                                       trailing zero */
   target = malloc(allocsize);
-  if(NULL == target)
-    return NULL; /* major failure */
+  if(!target)
+    return CURLE_OUT_OF_MEMORY;
 
-  while (*filename) {
-    if (*filename == '#' && ISDIGIT(filename[1])) {
+  while(*filename) {
+    if(*filename == '#' && ISDIGIT(filename[1])) {
       unsigned long i;
       char *ptr = filename;
       unsigned long num = strtoul(&filename[1], &filename, 10);
-      i = num-1;
+      i = num - 1UL;
 
-      if (num && (i <= glob->size / 2)) {
+      if(num && (i <= glob->size / 2)) {
         URLPattern pat = glob->pattern[i];
         switch (pat.type) {
         case UPTSet:
-          appendthis = pat.content.Set.elements[pat.content.Set.ptr_s];
-          appendlen = strlen(pat.content.Set.elements[pat.content.Set.ptr_s]);
+          if(pat.content.Set.elements) {
+            appendthis = pat.content.Set.elements[pat.content.Set.ptr_s];
+            appendlen =
+              strlen(pat.content.Set.elements[pat.content.Set.ptr_s]);
+          }
           break;
         case UPTCharRange:
-          numbuf[0]=pat.content.CharRange.ptr_c;
-          numbuf[1]=0;
-          appendthis=numbuf;
-          appendlen=1;
+          numbuf[0] = pat.content.CharRange.ptr_c;
+          numbuf[1] = 0;
+          appendthis = numbuf;
+          appendlen = 1;
           break;
         case UPTNumRange:
           snprintf(numbuf, sizeof(numbuf), "%0*d",
@@ -514,36 +577,38 @@ char *glob_match_url(char *filename, URLGlob *glob)
         default:
           printf("internal error: invalid pattern type (%d)\n",
                  (int)pat.type);
-          free(target);
-          return NULL;
+          Curl_safefree(target);
+          return CURLE_FAILED_INIT;
         }
       }
       else {
         /* #[num] out of range, use the #[num] in the output */
         filename = ptr;
-        appendthis=filename++;
-        appendlen=1;
+        appendthis = filename++;
+        appendlen = 1;
       }
     }
     else {
-      appendthis=filename++;
-      appendlen=1;
+      appendthis = filename++;
+      appendlen = 1;
     }
     if(appendlen + stringlen >= allocsize) {
       char *newstr;
       /* we append a single byte to allow for the trailing byte to be appended
          at the end of this function outside the while() loop */
-      allocsize = (appendlen + stringlen)*2;
-      newstr=realloc(target, allocsize + 1);
-      if(NULL ==newstr) {
-        free(target);
-        return NULL;
+      allocsize = (appendlen + stringlen) * 2;
+      newstr = realloc(target, allocsize + 1);
+      if(!newstr) {
+        Curl_safefree(target);
+        return CURLE_OUT_OF_MEMORY;
       }
-      target=newstr;
+      target = newstr;
     }
     memcpy(&target[stringlen], appendthis, appendlen);
     stringlen += appendlen;
   }
   target[stringlen]= '\0';
-  return target;
+  *result = target;
+  return CURLE_OK;
 }
+
similarity index 75%
rename from src/urlglob.h
rename to src/tool_urlglob.h
index a5b789e..9c08137 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __URLGLOB_H
-#define __URLGLOB_H
+#ifndef HEADER_CURL_TOOL_URLGLOB_H
+#define HEADER_CURL_TOOL_URLGLOB_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
+
 typedef enum {
-  UPTSet=1,
+  UPTSet = 1,
   UPTCharRange,
   UPTNumRange
 } URLPatternType;
@@ -36,12 +38,14 @@ typedef struct {
       short ptr_s;
     } Set;
     struct {
-      char min_c, max_c;
+      char min_c;
+      char max_c;
       char ptr_c;
       int step;
     } CharRange;
     struct {
-      int min_n, max_n;
+      int min_n;
+      int max_n;
       short padlength;
       int ptr_n;
       int step;
@@ -49,9 +53,12 @@ typedef struct {
   } content;
 } URLPattern;
 
+/* the total number of globs supported */
+#define GLOB_PATTERN_NUM 9
+
 typedef struct {
-  charliteral[10];
-  URLPattern pattern[9];
+  char *literal[10];
+  URLPattern pattern[GLOB_PATTERN_NUM+1];
   size_t size;
   size_t urllen;
   char *glob_buffer;
@@ -60,8 +67,9 @@ typedef struct {
 } URLGlob;
 
 int glob_url(URLGlob**, char*, int *, FILE *);
-char* glob_next_url(URLGlob*);
-char* glob_match_url(char*, URLGlob *);
+int glob_next_url(char **, URLGlob *);
+int glob_match_url(char **, char*, URLGlob *);
 void glob_cleanup(URLGlob* glob);
 
-#endif
+#endif /* HEADER_CURL_TOOL_URLGLOB_H */
+
similarity index 81%
rename from src/curlutil.c
rename to src/tool_util.c
index bca2db7..00d205e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-#include "setup.h"
+#include "tool_util.h"
 
-#include "curlutil.h"
+#include "memdebug.h" /* keep this as LAST include */
 
 #if defined(WIN32) && !defined(MSDOS)
 
-struct timeval cutil_tvnow(void)
+struct timeval tool_tvnow(void)
 {
   /*
   ** GetTickCount() is available on _all_ Windows versions from W95 up
@@ -42,7 +43,7 @@ struct timeval cutil_tvnow(void)
 
 #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
 
-struct timeval cutil_tvnow(void)
+struct timeval tool_tvnow(void)
 {
   /*
   ** clock_gettime() is granted to be increased monotonically when the
@@ -76,7 +77,7 @@ struct timeval cutil_tvnow(void)
 
 #elif defined(HAVE_GETTIMEOFDAY)
 
-struct timeval cutil_tvnow(void)
+struct timeval tool_tvnow(void)
 {
   /*
   ** gettimeofday() is not granted to be increased monotonically, due to
@@ -90,7 +91,7 @@ struct timeval cutil_tvnow(void)
 
 #else
 
-struct timeval cutil_tvnow(void)
+struct timeval tool_tvnow(void)
 {
   /*
   ** time() returns the value of time in seconds since the Epoch.
@@ -109,25 +110,28 @@ struct timeval cutil_tvnow(void)
  *
  * Returns: the time difference in number of milliseconds.
  */
-long cutil_tvdiff(struct timeval newer, struct timeval older)
+long tool_tvdiff(struct timeval newer, struct timeval older)
 {
   return (newer.tv_sec-older.tv_sec)*1000+
     (newer.tv_usec-older.tv_usec)/1000;
 }
 
 /*
- * Same as cutil_tvdiff but with full usec resolution.
+ * Same as tool_tvdiff but with full usec resolution.
  *
  * Returns: the time difference in seconds with subsecond resolution.
  */
-double cutil_tvdiff_secs(struct timeval newer, struct timeval older)
+double tool_tvdiff_secs(struct timeval newer, struct timeval older)
 {
-  return (double)(newer.tv_sec-older.tv_sec)+
-    (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  if(newer.tv_sec != older.tv_sec)
+    return (double)(newer.tv_sec-older.tv_sec)+
+      (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  else
+    return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
 }
 
 /* return the number of seconds in the given input timeval struct */
-long cutil_tvlong(struct timeval t1)
+long tool_tvlong(struct timeval t1)
 {
   return t1.tv_sec;
 }
similarity index 65%
rename from src/curlutil.h
rename to src/tool_util.h
index a993a77..d8bb036 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __CURL_SRC_UTIL_H
-#define __CURL_SRC_UTIL_H
+#ifndef HEADER_CURL_TOOL_UTIL_H
+#define HEADER_CURL_TOOL_UTIL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-#include "setup.h"
-
-
-struct timeval cutil_tvnow(void);
+struct timeval tool_tvnow(void);
 
 /*
  * Make sure that the first argument (t1) is the more recent time and t2 is
@@ -33,17 +31,26 @@ struct timeval cutil_tvnow(void);
  *
  * Returns: the time difference in number of milliseconds.
  */
-long cutil_tvdiff(struct timeval t1, struct timeval t2);
+long tool_tvdiff(struct timeval t1, struct timeval t2);
 
 /*
- * Same as cutil_tvdiff but with full usec resolution.
+ * Same as tool_tvdiff but with full usec resolution.
  *
  * Returns: the time difference in seconds with subsecond resolution.
  */
-double cutil_tvdiff_secs(struct timeval t1, struct timeval t2);
+double tool_tvdiff_secs(struct timeval t1, struct timeval t2);
+
+long tool_tvlong(struct timeval t1);
 
-long cutil_tvlong(struct timeval t1);
+#undef tvnow
+#undef tvdiff
+#undef tvdiff_secs
+#undef tvlong
 
+#define tvnow()           tool_tvnow()
+#define tvdiff(a,b)       tool_tvdiff((a), (b))
+#define tvdiff_secs(a,b)  tool_tvdiff_secs((a), (b))
+#define tvlong(a)         tool_tvlong((a))
 
-#endif  /* __CURL_SRC_UTIL_H */
+#endif /* HEADER_CURL_TOOL_UTIL_H */
 
diff --git a/src/tool_version.h b/src/tool_version.h
new file mode 100644 (file)
index 0000000..a18c011
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_TOOL_VERSION_H
+#define HEADER_CURL_TOOL_VERSION_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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/curlver.h>
+
+#define CURL_NAME "curl"
+#define CURL_COPYRIGHT LIBCURL_COPYRIGHT
+#define CURL_VERSION "7.32.0"
+#define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
+#define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
+#define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
+#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "
+
+#endif /* HEADER_CURL_TOOL_VERSION_H */
similarity index 95%
rename from src/os-specific.c
rename to src/tool_vms.c
index ac07c4c..4a6a6f5 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-#include "setup.h"
+#include "tool_setup.h"
 
-#include <curl/curl.h>
-
-#define ENABLE_CURLX_PRINTF
-#include "curlx.h"
-
-#include "os-specific.h"
+#ifdef __VMS
 
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#  include "memdebug.h"
+#if defined(__DECC) && !defined(__VAX) && \
+    defined(__CRTL_VER) && (__CRTL_VER >= 70301000)
+#include <unixlib.h>
 #endif
 
-#ifdef __VMS
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h"
 
 #include "curlmsg_vms.h"
+#include "tool_vms.h"
+
+#include "memdebug.h" /* keep this as LAST include */
 
 void decc$__posix_exit(int __status);
 void decc$exit(int __status);
@@ -121,8 +121,6 @@ void vms_special_exit(int code, int vms_show)
  * requiring the user to define the corresponding logical names.
  */
 
-#include <unixlib.h>
-
 /* Structure to hold a DECC$* feature name and its desired value. */
 typedef struct {
   char *name;
similarity index 76%
rename from src/os-specific.h
rename to src/tool_vms.h
index 93cac74..1afd75e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_OS_SPECIFIC_H
-#define HEADER_CURL_OS_SPECIFIC_H
+#ifndef HEADER_CURL_TOOL_VMS_H
+#define HEADER_CURL_TOOL_VMS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
 #ifdef __VMS
 
+/*
+ * Forward-declaration of global variable vms_show defined
+ * in tool_main.c, used in main() as parameter for function
+ * vms_special_exit() to allow proper curl tool exiting.
+ */
+extern int vms_show;
+
 int is_vms_shell(void);
 void vms_special_exit(int code, int vms_show);
 
@@ -35,4 +43,5 @@ void vms_special_exit(int code, int vms_show);
 
 #endif /* __VMS */
 
-#endif /* HEADER_CURL_OS_SPECIFIC_H */
+#endif /* HEADER_CURL_TOOL_VMS_H */
+
similarity index 86%
rename from src/writeenv.c
rename to src/tool_writeenv.c
index 18e1a06..a9462d0 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include "setup.h"
+#include "tool_setup.h"
 
 #ifdef USE_ENVIRONMENT
 
-#include <curl/curl.h>
-#include "writeenv.h"
-
 #ifdef __riscos__
-#include <kernel.h>
+#  include <kernel.h>
 #endif
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 
-#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG)
-#include "memdebug.h"
-#endif
+#include "tool_writeenv.h"
+
+#include "memdebug.h" /* keep this as LAST include */
 
 static const struct
 {
@@ -84,17 +80,17 @@ void ourWriteEnv(CURL *curl)
   long longinfo;
   double doubleinfo;
 
-  for (i=0; variables[i].name; i++) {
+  for(i=0; variables[i].name; i++) {
     switch (variables[i].type) {
     case writeenv_STRING:
-      if (curl_easy_getinfo(curl, variables[i].id, &string) == CURLE_OK)
+      if(curl_easy_getinfo(curl, variables[i].id, &string) == CURLE_OK)
         internalSetEnv(variables[i].name, string);
       else
         internalSetEnv(variables[i].name, NULL);
       break;
 
     case writeenv_LONG:
-      if (curl_easy_getinfo(curl, variables[i].id, &longinfo) == CURLE_OK) {
+      if(curl_easy_getinfo(curl, variables[i].id, &longinfo) == CURLE_OK) {
         curl_msprintf(numtext, "%5ld", longinfo);
         internalSetEnv(variables[i].name, numtext);
       }
@@ -102,7 +98,7 @@ void ourWriteEnv(CURL *curl)
         internalSetEnv(variables[i].name, NULL);
       break;
     case writeenv_DOUBLE:
-      if (curl_easy_getinfo(curl, variables[i].id, &doubleinfo) == CURLE_OK) {
+      if(curl_easy_getinfo(curl, variables[i].id, &doubleinfo) == CURLE_OK) {
         curl_msprintf(numtext, "%6.2f", doubleinfo);
         internalSetEnv(variables[i].name, numtext);
       }
diff --git a/src/tool_writeenv.h b/src/tool_writeenv.h
new file mode 100644 (file)
index 0000000..c0a952f
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef HEADER_CURL_TOOL_WRITEENV_H
+#define HEADER_CURL_TOOL_WRITEENV_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+#ifdef USE_ENVIRONMENT
+
+void ourWriteEnv(CURL *curl);
+
+#else
+#  define ourWriteEnv(x)  Curl_nop_stmt
+#endif
+
+#endif /* HEADER_CURL_TOOL_WRITEENV_H */
+
similarity index 80%
rename from src/writeout.c
rename to src/tool_writeout.c
index b8801a4..3c32067 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include "setup.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-#include <curl/curl.h>
+#include "tool_setup.h"
 
 #define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */
 #include <curl/mprintf.h>
 
-#include "writeout.h"
+#include "tool_cfgable.h"
+#include "tool_writeout.h"
+
+#include "memdebug.h" /* keep this as LAST include */
 
 typedef enum {
   VAR_NONE,       /* must be the first */
@@ -63,6 +53,11 @@ typedef enum {
   VAR_FTP_ENTRY_PATH,
   VAR_REDIRECT_URL,
   VAR_SSL_VERIFY_RESULT,
+  VAR_EFFECTIVE_FILENAME,
+  VAR_PRIMARY_IP,
+  VAR_PRIMARY_PORT,
+  VAR_LOCAL_IP,
+  VAR_LOCAL_PORT,
   VAR_NUM_OF_VARS /* must be the last */
 } replaceid;
 
@@ -96,13 +91,18 @@ static const struct variable replacements[]={
   {"ftp_entry_path", VAR_FTP_ENTRY_PATH},
   {"redirect_url", VAR_REDIRECT_URL},
   {"ssl_verify_result", VAR_SSL_VERIFY_RESULT},
+  {"filename_effective", VAR_EFFECTIVE_FILENAME},
+  {"remote_ip", VAR_PRIMARY_IP},
+  {"remote_port", VAR_PRIMARY_PORT},
+  {"local_ip", VAR_LOCAL_IP},
+  {"local_port", VAR_LOCAL_PORT},
   {NULL, VAR_NONE}
 };
 
-void ourWriteOut(CURL *curl, const char *writeinfo)
+void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
 {
   FILE *stream = stdout;
-  const char *ptr=writeinfo;
+  const char *ptr = writeinfo;
   char *stringp;
   long longinfo;
   double doubleinfo;
@@ -112,7 +112,7 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
       if('%' == ptr[1]) {
         /* an escaped %-letter */
         fputc('%', stream);
-        ptr+=2;
+        ptr += 2;
       }
       else {
         /* this is meant as a variable to output */
@@ -121,10 +121,10 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
         int i;
         if(('{' == ptr[1]) && ((end = strchr(ptr, '}')) != NULL)) {
           bool match = FALSE;
-          ptr+=2; /* pass the % and the { */
-          keepit=*end;
-          *end=0; /* zero terminate */
-          for(i=0; replacements[i].name; i++) {
+          ptr += 2; /* pass the % and the { */
+          keepit = *end;
+          *end = 0; /* zero terminate */
+          for(i = 0; replacements[i].name; i++) {
             if(curl_strequal(ptr, replacements[i].name)) {
               match = TRUE;
               switch(replacements[i].id) {
@@ -167,7 +167,8 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
                 break;
               case VAR_REDIRECT_TIME:
                 if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &doubleinfo))
+                   curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
+                                     &doubleinfo))
                   fprintf(stream, "%.3f", doubleinfo);
                 break;
               case VAR_TOTAL_TIME:
@@ -211,12 +212,14 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
                 break;
               case VAR_SIZE_DOWNLOAD:
                 if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &doubleinfo))
+                   curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD,
+                                     &doubleinfo))
                   fprintf(stream, "%.0f", doubleinfo);
                 break;
               case VAR_SPEED_DOWNLOAD:
                 if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &doubleinfo))
+                   curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD,
+                                     &doubleinfo))
                   fprintf(stream, "%.3f", doubleinfo);
                 break;
               case VAR_SPEED_UPLOAD:
@@ -244,7 +247,36 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
                 break;
               case VAR_SSL_VERIFY_RESULT:
                 if(CURLE_OK ==
-                   curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &longinfo))
+                   curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
+                                     &longinfo))
+                  fprintf(stream, "%ld", longinfo);
+                break;
+              case VAR_EFFECTIVE_FILENAME:
+                if(outs->filename)
+                  fprintf(stream, "%s", outs->filename);
+                break;
+              case VAR_PRIMARY_IP:
+                if(CURLE_OK ==
+                   curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP,
+                                     &stringp))
+                  fprintf(stream, "%s", stringp);
+                break;
+              case VAR_PRIMARY_PORT:
+                if(CURLE_OK ==
+                   curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT,
+                                     &longinfo))
+                  fprintf(stream, "%ld", longinfo);
+                break;
+              case VAR_LOCAL_IP:
+                if(CURLE_OK ==
+                   curl_easy_getinfo(curl, CURLINFO_LOCAL_IP,
+                                     &stringp))
+                  fprintf(stream, "%s", stringp);
+                break;
+              case VAR_LOCAL_PORT:
+                if(CURLE_OK ==
+                   curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT,
+                                     &longinfo))
                   fprintf(stream, "%ld", longinfo);
                 break;
               default:
@@ -253,17 +285,17 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
               break;
             }
           }
-          if(FALSE == match) {
+          if(!match) {
             fprintf(stderr, "curl: unknown --write-out variable: '%s'\n", ptr);
           }
-          ptr=end+1; /* pass the end */
+          ptr = end + 1; /* pass the end */
           *end = keepit;
         }
         else {
           /* illegal syntax, then just output the characters that are used */
           fputc('%', stream);
           fputc(ptr[1], stream);
-          ptr+=2;
+          ptr += 2;
         }
       }
     }
@@ -284,7 +316,7 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
         fputc(ptr[1], stream);
         break;
       }
-      ptr+=2;
+      ptr += 2;
     }
     else {
       fputc(*ptr, stream);
diff --git a/src/tool_writeout.h b/src/tool_writeout.h
new file mode 100644 (file)
index 0000000..4dd3a75
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef HEADER_CURL_TOOL_WRITEOUT_H
+#define HEADER_CURL_TOOL_WRITEOUT_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "tool_setup.h"
+
+void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo);
+
+#endif /* HEADER_CURL_TOOL_WRITEOUT_H */
similarity index 74%
rename from src/xattr.c
rename to src/tool_xattr.c
index 3af3282..505bdb1 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-/* client-local setup.h */
-#include "setup.h"
-#include <curl/curl.h>
-#include "xattr.h"
+#ifdef HAVE_FSETXATTR
+#  include <sys/xattr.h> /* header from libc, not from libattr */
+#endif
+
+#include "tool_xattr.h"
+
+#include "memdebug.h" /* keep this as LAST include */
 
 #ifdef HAVE_FSETXATTR
-#include <sys/types.h>
-#include <string.h>
-#include <sys/xattr.h> /* include header from libc, not from libattr */
 
 /* mapping table of curl metadata to extended attribute names */
 static const struct xattr_mapping {
@@ -39,8 +40,8 @@ static const struct xattr_mapping {
    * http://freedesktop.org/wiki/CommonExtendedAttributes
    */
   { "user.xdg.origin.url", CURLINFO_EFFECTIVE_URL },
-  { "user.mime_type", CURLINFO_CONTENT_TYPE },
-  { NULL, CURLINFO_NONE } /* last element, abort loop here */
+  { "user.mime_type",      CURLINFO_CONTENT_TYPE },
+  { NULL,                  CURLINFO_NONE } /* last element, abort loop here */
 };
 
 /* store metadata from the curl request alongside the downloaded
@@ -51,14 +52,14 @@ int fwrite_xattr(CURL *curl, int fd)
   int i = 0;
   int err = 0;
   /* loop through all xattr-curlinfo pairs and abort on a set error */
-  while ( err == 0 && mappings[i].attr != NULL ) {
+  while(err == 0 && mappings[i].attr != NULL) {
     char *value = NULL;
     CURLcode rc = curl_easy_getinfo(curl, mappings[i].info, &value);
-    if ( rc == CURLE_OK && value ) {
+    if(rc == CURLE_OK && value) {
 #ifdef HAVE_FSETXATTR_6
-      err = fsetxattr( fd, mappings[i].attr, value, strlen(value), 0, 0 );
+      err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
 #elif defined(HAVE_FSETXATTR_5)
-      err = fsetxattr( fd, mappings[i].attr, value, strlen(value), 0 );
+      err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
 #endif
     }
     i++;
similarity index 80%
rename from src/writeenv.h
rename to src/tool_xattr.h
index 8d92f6c..3f8f585 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_CURL_WRITEENV_H
-#define HEADER_CURL_WRITEENV_H
+#ifndef HEADER_CURL_TOOL_XATTR_H
+#define HEADER_CURL_TOOL_XATTR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,8 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "tool_setup.h"
 
-void ourWriteEnv(CURL *curl);
+int fwrite_xattr(CURL *curl, int fd);
 
-#endif /* HEADER_CURL_WRITEENV_H */
+#endif /* HEADER_CURL_TOOL_XATTR_H */
diff --git a/src/vc6curlsrc.dsp b/src/vc6curlsrc.dsp
deleted file mode 100644 (file)
index 1fb1d7b..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-# Microsoft Developer Studio Project File - Name="curlsrc" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=curlsrc - Win32 using libcurl LIB Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "curlsrc.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "curlsrc.mak" CFG="curlsrc - Win32 using libcurl LIB Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "curlsrc - Win32 using libcurl DLL Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "curlsrc - Win32 using libcurl DLL Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "curlsrc - Win32 using libcurl LIB Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "curlsrc - Win32 using libcurl LIB Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF  "$(CFG)" == "curlsrc - Win32 using libcurl DLL Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "DLL-Debug"\r
-# PROP BASE Intermediate_Dir "DLL-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "DLL-Debug"\r
-# PROP Intermediate_Dir "DLL-Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /FD /GZ /c\r
-# ADD BASE RSC /l 0x409 /i "..\include" /d "_DEBUG"\r
-# ADD RSC /l 0x409 /i "..\include" /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 libcurld_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"DLL-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\DLL-Debug"\r
-# ADD LINK32 libcurld_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"DLL-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\DLL-Debug"\r
-\r
-!ELSEIF  "$(CFG)" == "curlsrc - Win32 using libcurl DLL Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "DLL-Release"\r
-# PROP BASE Intermediate_Dir "DLL-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "DLL-Release"\r
-# PROP Intermediate_Dir "DLL-Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /FD /c\r
-# ADD BASE RSC /l 0x409 /i "..\include" /d "NDEBUG"\r
-# ADD RSC /l 0x409 /i "..\include" /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 libcurl_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"DLL-Release/curl.exe" /libpath:"..\lib\DLL-Release"\r
-# ADD LINK32 libcurl_imp.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"DLL-Release/curl.exe" /libpath:"..\lib\DLL-Release"\r
-\r
-!ELSEIF  "$(CFG)" == "curlsrc - Win32 using libcurl LIB Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "LIB-Debug"\r
-# PROP BASE Intermediate_Dir "LIB-Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "LIB-Debug"\r
-# PROP Intermediate_Dir "LIB-Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /GZ /c\r
-# ADD BASE RSC /l 0x409 /i "..\include" /d "_DEBUG"\r
-# ADD RSC /l 0x409 /i "..\include" /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 libcurld.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"LIB-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\LIB-Debug"\r
-# ADD LINK32 libcurld.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"LIB-Debug/curl.exe" /pdbtype:sept /libpath:"..\lib\LIB-Debug"\r
-\r
-!ELSEIF  "$(CFG)" == "curlsrc - Win32 using libcurl LIB Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "LIB-Release"\r
-# PROP BASE Intermediate_Dir "LIB-Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "LIB-Release"\r
-# PROP Intermediate_Dir "LIB-Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\lib" /I "..\include" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_CONSOLE" /D "CURL_STATICLIB" /FD /c\r
-# ADD BASE RSC /l 0x409 /i "..\include" /d "NDEBUG"\r
-# ADD RSC /l 0x409 /i "..\include" /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 libcurl.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"LIB-Release/curl.exe" /libpath:"..\lib\LIB-Release"\r
-# ADD LINK32 libcurl.lib kernel32.lib ws2_32.lib wldap32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"LIB-Release/curl.exe" /libpath:"..\lib\LIB-Release"\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "curlsrc - Win32 using libcurl DLL Debug"\r
-# Name "curlsrc - Win32 using libcurl DLL Release"\r
-# Name "curlsrc - Win32 using libcurl LIB Debug"\r
-# Name "curlsrc - Win32 using libcurl LIB Release"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\curlutil.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\getpass.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\homedir.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hugehelp.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\main.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\os-specific.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\nonblock.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\rawstr.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\strtoofft.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\urlglob.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\writeenv.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\writeout.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\xattr.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=".\config-win32.h"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\curlutil.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\getpass.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\homedir.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\hugehelp.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\os-specific.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\setup.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\nonblock.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\rawstr.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\lib\strtoofft.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\urlglob.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\version.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\writeenv.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\writeout.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\xattr.h\r
-# End Source File\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\curl.rc\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
index 31140ce..9260aa5 100644 (file)
@@ -26,7 +26,7 @@
 
 #define CURL_NAME "curl"
 #define CURL_COPYRIGHT LIBCURL_COPYRIGHT
-#define CURL_VERSION "7.21.3"
+#define CURL_VERSION "7.22.0"
 #define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
 #define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
 #define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
index 6a61dd0..97afa96 100644 (file)
@@ -75,6 +75,11 @@ to complete a transfer. The response to each request is found in its own data
 section.  Validating the entire negotiation sequence can be done by
 specifying a datacheck section.
 </dataNUM>
+<connect>
+The connect section is used instead of the 'data' for all CONNECT
+requests. The remainder of the rules for the data section then apply but with
+a connect prefix.
+</connect>
 <datacheck [nonewline="yes"]>
 if the data is sent but this is what should be checked afterwards. If
 'nonewline' is set, we will cut off the trailing newline of this given data
@@ -97,11 +102,13 @@ wait [secs]
 </postcmd>
 <servercmd>
 Special-commands for the server.
-For FTP, these are supported:
+For FTP/SMTP/POP/IMAP, these are supported:
 
 REPLY [command] [return value] [response string]
  - Changes how the server responds to the [command]. [response string] is
    evaluated as a perl string, so it can contain embedded \r\n, for example.
+   There's a special [command] named "welcome" (without quotes) which is the
+   string sent immediately on connect as a welcome.
 COUNT [command] [num]
  - Do the REPLY change for [command] only [num] times and then go back to the
    built-in approach
@@ -133,6 +140,10 @@ skip: [num]     instructs the server to ignore reading this many bytes from a PU
 rtp: part [num] channel [num] size [num]
                stream a fake RTP packet for the given part on a chosen channel
                with the given payload size
+
+connection-monitor When used, this will log [DISCONNECT] to the server.input
+               log when the connection is disconnected.
+
 </servercmd>
 </reply>
 
@@ -158,6 +169,9 @@ rtsp-ipv6
 imap
 pop3
 smtp
+httptls+srp
+httptls+srp-ipv6
+http-proxy
 
 Give only one per line.  This subsection is mandatory.
 </server>
@@ -167,6 +181,7 @@ A list of features that MUST be present in the client/library for this test to
 be able to run (if these features are not present, the test will be
 SKIPPED). Features testable here are:
 
+axTLS
 crypto
 getrlimit
 GnuTLS
@@ -174,12 +189,16 @@ idn
 ipv6
 large_file
 libz
-netrc_debug
 NSS
 NTLM
 OpenSSL
 SSL
 socks
+unittest
+debug
+TLS-SRP
+Metalink
+TrackMemory
 
 as well as each protocol that curl supports.  A protocol only needs to be
 specified if it is different from the server (useful when the server
@@ -208,7 +227,8 @@ to have failed. Variables are substituted as in the <command> section.
 
 <tool>
 Name of tool to use instead of "curl". This tool must be built and exist
-in the libtest/ directory.
+either in the libtest/ directory (if the tool starts with 'lib') or in the
+unit/ directory (if the tool starts with 'unit').
 </tool>
 
 <name>
@@ -224,7 +244,8 @@ command is run. They are cleared again after the command has been run.
 Variables are first substituted as in the <command> section.
 </setenv>
 
-<command [option="no-output"] [timeout="secs"] [delay="secs"] [type="perl"]>
+<command [option="no-output/no-include"] [timeout="secs"] [delay="secs"]
+         [type="perl"]>
 command line to run, there's a bunch of %variables that get replaced
 accordingly.
 
@@ -233,9 +254,12 @@ that is returned. The last slash in the URL must be followed by a number. That
 number (N) will be used by the test-server to load test case N and return the
 data that is defined within the <reply><data></data></reply> section.
 
-If a CONNECT is used to the server (to emulate HTTPS etc over proxy), the port
-number given in the CONNECT request will be used to identify which test that
-is being run, if the proxy host name is said to start with 'test'.
+If there's no test number found above, the HTTP test server will use the
+number following the last dot in the given hostname (made so that a CONNECT
+can still pass on test number) so that "foo.bar.123" gets treated as test case
+123. Alternatively, if an ipv6-address is provided to CONNECT, the last
+hexadecimal group in the address will be used as the test numer! For example
+the address "[1234::ff]" would be treated as test case 255.
 
 Set type="perl" to write the test case as a perl script. It implies that
 there's no memory debugging and valgrind gets shut off for this test.
@@ -244,6 +268,9 @@ Set option="no-output" to prevent the test script to slap on the --output
 argument that directs the output to a file. The --output is also not added if
 the verify/stdout section is used.
 
+Set option="no-include" to prevent the test script to slap on the --include
+argument.
+
 Set timeout="secs" to override default server logs advisor read lock timeout.
 This timeout is used by the test harness, once that the command has completed
 execution, to wait for the test server to write out server side log files and
@@ -261,10 +288,11 @@ Available substitute variables include:
 %CLIENTIP   - IPv4 address of the client running curl
 %CLIENT6IP  - IPv6 address of the client running curl
 %HOSTIP    - IPv4 address of the host running this test
-%HOSTPORT  - Port number of the HTTP server
+%HTTPPORT  - Port number of the HTTP server
 %HOST6IP   - IPv6 address of the host running this test
-%HOST6PORT - IPv6 port number of the HTTP server
+%HTTP6PORT - IPv6 port number of the HTTP server
 %HTTPSPORT - Port number of the HTTPS server
+%PROXYPORT - Port number of the HTTP proxy
 %FTPPORT   - Port number of the FTP server
 %FTP6PORT  - IPv6 port number of the FTP server
 %FTPSPORT  - Port number of the FTPS server
@@ -290,8 +318,11 @@ Variables are substituted on the contents of the file as in the <command>
 section.
 </file>
 
-<stdin>
+<stdin [nonewline="yes"]>
 Pass this given data on stdin to the tool.
+
+If 'nonewline' is set, we will cut off the trailing newline of this given data
+before comparing with the one actually received by the client
 </stdin>
 
 </client>
@@ -311,12 +342,26 @@ changing protocol data such as port numbers or user-agent strings.
 One perl op per line that operates on the protocol dump. This is pretty
 advanced. Example: "s/^EPRT .*/EPRT stripped/"
 </strippart>
+
 <protocol [nonewline="yes"]>
-the protocol dump curl should transmit, if 'nonewline' is set, we will cut
-off the trailing newline of this given data before comparing with the one
-actually sent by the client
-Variables are substituted as in the <command> section.
+
+the protocol dump curl should transmit, if 'nonewline' is set, we will cut off
+the trailing newline of this given data before comparing with the one actually
+sent by the client Variables are substituted as in the <command> section.  The
+<strip> and <strippart> rules are applied before comparisons are made.
+
 </protocol>
+
+<proxy [nonewline="yes"]>
+
+The protocol dump curl should transmit to a HTTP proxy (when the http-proxy
+server is used), if 'nonewline' is set, we will cut off the trailing newline
+of this given data before comparing with the one actually sent by the client
+Variables are substituted as in the <command> section. The <strip> and
+<strippart> rules are applied before comparisons are made.
+
+</proxy>
+
 <stdout [mode="text"] [nonewline="yes"]>
 This verifies that this data was passed to stdout.  Variables are
 substituted as in the <command> section.
index 78450b1..ca69709 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -26,10 +26,24 @@ PDFPAGES = testcurl.pdf runtests.pdf
 EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
  FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm   \
  sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \
CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \
- serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl
serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
+ CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py
 
-SUBDIRS = data server libtest
+DISTCLEANFILES = configurehelp.pm
+
+# we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
+# added twice as then targets such as 'distclean' misbehave and try to
+# do things twice in that subdir at times (and thus fails).
+if BUILD_UNITTESTS
+BUILD_UNIT = unit
+DIST_UNIT =
+else
+BUILD_UNIT =
+DIST_UNIT = unit
+endif
+
+SUBDIRS = certs data server libtest $(BUILD_UNIT)
+DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
 
 PERLFLAGS = -I$(srcdir)
 
@@ -42,26 +56,31 @@ curl:
 
 if CROSSCOMPILING
 TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
-TEST_Q =
-TEST_F =
-TEST_T =
 else # if not cross-compiling:
 TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
 TEST_Q = -a -s
+TEST_AM = -a -am
 TEST_F = -a -p -r
 TEST_T = -a -t
 endif
 
-test: all
+# make sure that PERL is pointing to an executable
+perlcheck:
+       @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
+
+test: perlcheck all
        $(TEST)
 
-quiet-test: all
+quiet-test: perlcheck all
        $(TEST) $(TEST_Q)
 
-full-test: all
+am-test: perlcheck all
+       $(TEST) $(TEST_AM)
+
+full-test: perlcheck all
        $(TEST) $(TEST_F)
 
-torture-test: all
+torture-test: perlcheck all
        $(TEST) $(TEST_T)
 
 .1.html:
index b37dd41..7ba9d96 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
 # KIND, either express or implied.
 #
 ###########################################################################
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -58,58 +100,132 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = tests
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -126,7 +242,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -139,15 +256,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -157,6 +276,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -164,16 +286,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -186,7 +304,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -199,34 +316,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -238,6 +355,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -257,7 +375,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -267,29 +384,41 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 HTMLPAGES = testcurl.html runtests.html
 PDFPAGES = testcurl.pdf runtests.pdf
 EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
  FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm   \
  sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \
- CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \
- serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl
-
-SUBDIRS = data server libtest
+ serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
+ CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py
+
+DISTCLEANFILES = configurehelp.pm
+@BUILD_UNITTESTS_FALSE@BUILD_UNIT = 
+
+# we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
+# added twice as then targets such as 'distclean' misbehave and try to
+# do things twice in that subdir at times (and thus fails).
+@BUILD_UNITTESTS_TRUE@BUILD_UNIT = unit
+@BUILD_UNITTESTS_FALSE@DIST_UNIT = unit
+@BUILD_UNITTESTS_TRUE@DIST_UNIT = 
+SUBDIRS = certs data server libtest $(BUILD_UNIT)
+DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
 PERLFLAGS = -I$(srcdir)
 CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid
 MAN2HTML = roffit < $< >$@
 @CROSSCOMPILING_FALSE@TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
 @CROSSCOMPILING_TRUE@TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
 @CROSSCOMPILING_FALSE@TEST_Q = -a -s
-@CROSSCOMPILING_TRUE@TEST_Q = 
+@CROSSCOMPILING_FALSE@TEST_AM = -a -am
 @CROSSCOMPILING_FALSE@TEST_F = -a -p -r
-@CROSSCOMPILING_TRUE@TEST_F = 
 @CROSSCOMPILING_FALSE@TEST_T = -a -t
-@CROSSCOMPILING_TRUE@TEST_T = 
 all: all-recursive
 
 .SUFFIXES:
@@ -298,14 +427,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  tests/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -323,6 +452,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -330,27 +460,26 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -358,66 +487,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -429,82 +512,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       $(mkdir_p) $(distdir)/certs $(distdir)/certs/scripts
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -524,10 +629,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -535,6 +645,8 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -545,8 +657,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-       distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -554,18 +665,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -584,37 +715,44 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libtool clean-recursive ctags \
-       ctags-recursive distclean distclean-generic distclean-libtool \
-       distclean-recursive distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
 
 
 curl:
        @cd $(top_builddir) && $(MAKE)
 
-test: all
+# make sure that PERL is pointing to an executable
+perlcheck:
+       @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
+
+test: perlcheck all
        $(TEST)
 
-quiet-test: all
+quiet-test: perlcheck all
        $(TEST) $(TEST_Q)
 
-full-test: all
+am-test: perlcheck all
+       $(TEST) $(TEST_AM)
+
+full-test: perlcheck all
        $(TEST) $(TEST_F)
 
-torture-test: all
+torture-test: perlcheck all
        $(TEST) $(TEST_T)
 
 .1.html:
@@ -626,6 +764,7 @@ torture-test: all
        ps2pdf $$foo.ps $@; \
        rm $$foo.ps; \
        echo "converted $< to $@")
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index be22778..3ddc1c9 100644 (file)
@@ -6,13 +6,45 @@
 
 The cURL Test Suite
 
-Requires:
+ 1. Running
+  1.1 Requires to run
+  1.2 Port numbers used by test servers
+  1.3 Test servers
+  1.4 Run
+  1.5 Shell startup scripts
+  1.6 Memory test
+  1.7 Debug
+  1.8 Logs
+  1.9 Test input files
+  1.10 Code coverage
+  1.11 Remote testing
+
+ 2. Numbering
+  2.1 Test case numbering
+
+ 3. Write tests
+  3.1 test data
+  3.2 curl tests
+  3.3 libcurl tests
+  3.4 unit tests
+
+ 4. TODO
+  4.1 More protocols
+  4.2 SOCKS auth
+
+==============================================================================
+
+1. Running
+
+ 1.1 Requires to run
+
   perl (and a unix-style shell)
+  python (and a unix-style shell)
   diff (when a test fails, a diff is shown)
   stunnel (for HTTPS and FTPS tests)
   OpenSSH or SunSSH (for SCP, SFTP and SOCKS4/5 tests)
 
-Ports used by default:
+ 1.2 Port numbers used by test servers
 
   - TCP/8990 for HTTP
   - TCP/8991 for HTTPS
@@ -28,25 +60,36 @@ Ports used by default:
   - TCP/9001 for POP3
   - TCP/9002 for IMAP
   - TCP/9003 for SMTP
+  - TCP/9004 for SMTP IPv6
+  - TCP/9005 for RTSP
+  - TCP/9006 for RTSP IPv6
+  - TCP/9007 for GOPHER
+  - TCP/9008 for GOPHER IPv6
+  - TCP/9008 for HTTPS server with TLS-SRP support
+
+ 1.3 Test servers
 
   The test suite runs simple FTP, POP3, IMAP, SMTP, HTTP and TFTP stand-alone
-  servers on these ports to which it makes requests.  For SSL tests, it runs
-  stunnel to handle encryption to the regular servers. For SSH, it runs a
-  standard OpenSSH server. For SOCKS4/5 tests SSH is used to perform the SOCKS
-  functionality and requires a SSH client and server.
+  servers on the ports listed above to which it makes requests. For SSL tests,
+  it runs stunnel to handle encryption to the regular servers. For SSH, it
+  runs a standard OpenSSH server. For SOCKS4/5 tests SSH is used to perform
+  the SOCKS functionality and requires a SSH client and server.
 
-  The base port number shown above can be changed using runtests' -b option
-  to allow running more than one instance of the test suite simultaneously
-  on one machine.
+  The base port number (8990), which all the individual port numbers are
+  indexed from, can be set explicitly using runtests.pl' -b option to allow
+  running more than one instance of the test suite simultaneously on one
+  machine, or just move the servers in case you have local services on any of
+  those ports.
+
+ 1.4 Run
 
-Run:
   'make test'. This builds the test suite support code and invokes the
   'runtests.pl' perl script to run all the tests. Edit the top variables
   of that script in case you have some specific needs, or run the script
   manually (after the support code has been built).
 
   The script breaks on the first test that doesn't do OK. Use -a to prevent
-  the script from abort on the first error. Run the script with -v for more
+  the script from aborting on the first error. Run the script with -v for more
   verbose output. Use -d to run the test servers with debug output enabled as
   well. Specifying -k keeps all the log files generated by the test intact.
 
@@ -56,7 +99,23 @@ Run:
   3 to 9. Any test numbers starting with ! are disabled, as are any test
   numbers found in the file data/DISABLED (one per line).
 
-Shell startup scripts:
+  When -s is not present, each successful test will display on one line the
+  test number and description and on the next line a set of flags, the test
+  result, current test sequence, total number of tests to be run and an
+  estimated amount of time to complete the test run. The flags consist of
+  these letters describing what is checked in this test:
+
+    s stdout
+    d data
+    u upload
+    p protocol
+    o output
+    e exit code
+    m memory
+    v valgrind
+
+ 1.5 Shell startup scripts
+
   Tests which use the ssh test server, SCP/SFTP/SOCKS tests, might be badly
   influenced by the output of system wide or user specific shell startup
   scripts, .bashrc, .profile, /etc/csh.cshrc, .login, /etc/bashrc, etc. which
@@ -71,44 +130,45 @@ Shell startup scripts:
   output of a shell startup script.  Locate, cleanup or adjust the shell
   script.
 
-Memory:
+ 1.6 Memory test
+
   The test script will check that all allocated memory is freed properly IF
   curl has been built with the CURLDEBUG define set. The script will
-  automatically detect if that is the case, and it will use the ../memanalyze
-  script to analyze the memory debugging output.
+  automatically detect if that is the case, and it will use the
+  'memanalyze.pl' script to analyze the memory debugging output.
 
-  The -t option will enable torture testing mode, which runs each test
-  many times but causes a different memory allocation to fail on each
-  successive run.  This tests the out of memory error handling code to
-  ensure that memory leaks do not occur even in those situations.
+  Also, if you run tests on a machine where valgrind is found, the script will
+  use valgrind to run the test with (unless you use -n) to further verify
+  correctness.
+
+  runtests.pl's -t option will enable torture testing mode, which runs each
+  test many times and makes each different memory allocation fail on each
+  successive run.  This tests the out of memory error handling code to ensure
+  that memory leaks do not occur even in those situations.
+
+ 1.7 Debug
 
-Debug:
   If a test case fails, you can conveniently get the script to invoke the
   debugger (gdb) for you with the server running and the exact same command
   line parameters that failed. Just invoke 'runtests.pl <test number> -g' and
   then just type 'run' in the debugger to perform the command through the
   debugger.
 
-  If a test case causes a core dump, analyze it by running gdb like:
-
-          # gdb ../curl/src core
-
-  ... and get a stack trace with the gdb command:
+ 1.8 Logs
 
-          (gdb) where
+  All logs are generated in the logs/ subdirectory (it is emptied first in the
+  runtests.pl script). Use runtests.pl -k to force it to keep the temporary
+  files after the test run since successful runs will clean it up otherwise.
 
-Logs:
-  All logs are generated in the logs/ subdirectory (it is emptied first
-  in the runtests.pl script). Use runtests.pl -k to keep the temporary files
-  after the test run.
+ 1.9 Test input files
 
-Data:
   All test cases are put in the data/ subdirectory. Each test is stored in the
   file named according to the test number.
 
   See FILEFORMAT for the description of the test case files.
 
-Code coverage:
+ 1.10 Code coverage
+
   gcc provides a tool that can determine the code coverage figures for
   the test suite.  To use it, configure curl with
   CFLAGS='-fprofile-arcs -ftest-coverage -g -O0'.  Make sure you run the normal
@@ -125,36 +185,85 @@ Code coverage:
   The text mode tool gcov may also be used, but it doesn't handle object files
   in more than one directory very well.
 
-Remote testing:
+ 1.11 Remote testing
+
   The runtests.pl script provides some hooks to allow curl to be tested on a
   machine where perl can not be run.  The test framework in this case runs on
   a workstation where perl is available, while curl itself is run on a remote
   system using ssh or some other remote execution method.  See the comments at
   the beginning of runtests.pl for details.
 
-TEST CASE NUMBERS
+2. Numbering
+
+ 2.1 Test case numbering
+
+     1   -  99   HTTP
+     100 - 199   FTP*
+     200 - 299   FILE*
+     300 - 399   HTTPS
+     400 - 499   FTPS
+     500 - 599   libcurl source code tests, not using the curl command tool
+     600 - 699   SCP/SFTP
+     700 - 799   SOCKS4 (even numbers) and SOCK5 (odd numbers)
+     800 - 899   POP3, IMAP, SMTP
+     1000 - 1299 miscellaneous*
+     1300 - 1399 unit tests*
+     1400 - 1499 miscellaneous*
+     1500 - 1599 libcurl source code tests, not using the curl command tool
+                 (same as 5xx)
+     2000 - x    multiple sequential protocols per test case*
+
+  Since 30-apr-2003, there's nothing in the system that requires us to keep
+  within these number series, and those sections marked with * actually
+  contain tests for a variety of protocols. Each test case now specifies its
+  own server requirements, independent of test number.
+
+3. Write tests
+
+  Here's a quick description on writing test cases. We basically have three
+  kinds of tests: the ones that test the curl tool, the ones that build small
+  applications and test libcurl directly and the unit tests that test
+  individual (possibly internal) functions.
+
+ 3.1 test data
+
+  Each test has a master file that controls all the test data. What to read,
+  what the protocol exchange should look like, what exit code to expect and
+  what command line arguments to use etc.
+
+  These files are tests/data/test[num] where [num] is described in section 2
+  of this document, and the XML-like file format of them is described in the
+  separate tests/FILEFORMAT document.
+
+ 3.2 curl tests
+
+  A test case that runs the curl tool and verifies that it gets the correct
+  data, it sends the correct data, it uses the correct protocol primitives
+  etc.
+
+ 3.3 libcurl tests
+
+  The libcurl tests are identical to the curl ones, except that they use a
+  specific and dedicated custom-built program to run instead of "curl". This
+  tool is built from source code placed in tests/libtest and if you want to
+  make a new libcurl test that is where you add your code.
+
+ 3.4 unit tests
+
+  Unit tests are tests in the 13xx sequence and they are placed in tests/unit.
+  There's a tests/unit/README describing the specific set of checks and macros
+  that may be used when writing tests that verify behaviors of specific
+  individual functions.
+
+  The unit tests depend on curl being built with debug enabled.
 
- So far, we've used this system:
+4. TODO
 
- 1   -  99   HTTP
- 100 - 199   FTP*
- 200 - 299   FILE*
- 300 - 399   HTTPS
- 400 - 499   FTPS
- 500 - 599   libcurl source code tests, not using the curl command tool
- 600 - 699   SCP/SFTP
- 700 - 799   SOCKS4 (even numbers) and SOCK5 (odd numbers)
- 800 - 899   POP3, IMAP, SMTP
- 1000 - 1999 miscellaneous*
- 2000 - x    multiple sequential protocols per test case*
+ 4.1 More protocols
 
- Since 30-apr-2003, there's nothing in the system that requires us to keep
- within these number series, and those sections marked with * actually
- contain tests for a variety of protocols. Each test case now specifies
- its own server requirements, independent of test number.
+  Add tests for TELNET, LDAP, DICT...
 
-TODO:
+ 4.2 SOCKS auth
 
-  * Add tests for TELNET, LDAP, DICT...
-  * SOCKS4/5 test deficiencies - no proxy authentication tests as SSH (the
-    test mechanism) doesn't support them
+  SOCKS4/5 test deficiencies - no proxy authentication tests as SSH (the
+  test mechanism) doesn't support them
diff --git a/tests/certs/Makefile.am b/tests/certs/Makefile.am
new file mode 100644 (file)
index 0000000..cd35bdf
--- /dev/null
@@ -0,0 +1,66 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = scripts
+
+CERTFILES = \
+  EdelCurlRoot-ca.cacert \
+  EdelCurlRoot-ca.cnf \
+  EdelCurlRoot-ca.crt \
+  EdelCurlRoot-ca.csr \
+  EdelCurlRoot-ca.der \
+  EdelCurlRoot-ca.key \
+  EdelCurlRoot-ca.prm \
+  Server-localhost-sv.crl \
+  Server-localhost-sv.crt \
+  Server-localhost-sv.csr \
+  Server-localhost-sv.der \
+  Server-localhost-sv.dhp \
+  Server-localhost-sv.key \
+  Server-localhost-sv.p12 \
+  Server-localhost-sv.pem \
+  Server-localhost-sv.prm \
+  Server-localhost.nn-sv.crl \
+  Server-localhost.nn-sv.crt \
+  Server-localhost.nn-sv.csr \
+  Server-localhost.nn-sv.der \
+  Server-localhost.nn-sv.dhp \
+  Server-localhost.nn-sv.key \
+  Server-localhost.nn-sv.pem \
+  Server-localhost.nn-sv.prm \
+  Server-localhost0h-sv.crl \
+  Server-localhost0h-sv.crt \
+  Server-localhost0h-sv.csr \
+  Server-localhost0h-sv.der \
+  Server-localhost0h-sv.dhp \
+  Server-localhost0h-sv.key \
+  Server-localhost0h-sv.p12 \
+  Server-localhost0h-sv.pem \
+  Server-localhost0h-sv.prm
+
+SRPFILES = \
+  srp-verifier-conf \
+  srp-verifier-db
+
+EXTRA_DIST = $(CERTFILES) $(SRPFILES)
+
diff --git a/tests/certs/Makefile.in b/tests/certs/Makefile.in
new file mode 100644 (file)
index 0000000..3d71cc0
--- /dev/null
@@ -0,0 +1,750 @@
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/certs
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+       $(top_srcdir)/m4/curl-confopts.m4 \
+       $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
+       $(top_srcdir)/m4/curl-override.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
+       $(top_builddir)/include/curl/curlbuild.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+KRB4_ENABLED = @KRB4_ENABLED@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_ENABLED = @SSL_ENABLED@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_SSLEAY = @USE_SSLEAY@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = scripts
+CERTFILES = \
+  EdelCurlRoot-ca.cacert \
+  EdelCurlRoot-ca.cnf \
+  EdelCurlRoot-ca.crt \
+  EdelCurlRoot-ca.csr \
+  EdelCurlRoot-ca.der \
+  EdelCurlRoot-ca.key \
+  EdelCurlRoot-ca.prm \
+  Server-localhost-sv.crl \
+  Server-localhost-sv.crt \
+  Server-localhost-sv.csr \
+  Server-localhost-sv.der \
+  Server-localhost-sv.dhp \
+  Server-localhost-sv.key \
+  Server-localhost-sv.p12 \
+  Server-localhost-sv.pem \
+  Server-localhost-sv.prm \
+  Server-localhost.nn-sv.crl \
+  Server-localhost.nn-sv.crt \
+  Server-localhost.nn-sv.csr \
+  Server-localhost.nn-sv.der \
+  Server-localhost.nn-sv.dhp \
+  Server-localhost.nn-sv.key \
+  Server-localhost.nn-sv.pem \
+  Server-localhost.nn-sv.prm \
+  Server-localhost0h-sv.crl \
+  Server-localhost0h-sv.crt \
+  Server-localhost0h-sv.csr \
+  Server-localhost0h-sv.der \
+  Server-localhost0h-sv.dhp \
+  Server-localhost0h-sv.key \
+  Server-localhost0h-sv.p12 \
+  Server-localhost0h-sv.pem \
+  Server-localhost0h-sv.prm
+
+SRPFILES = \
+  srp-verifier-conf \
+  srp-verifier-db
+
+EXTRA_DIST = $(CERTFILES) $(SRPFILES)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/certs/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/certs/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+       check-am clean clean-generic clean-libtool cscopelist-am ctags \
+       ctags-am distclean distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/certs/scripts/Makefile.am b/tests/certs/scripts/Makefile.am
new file mode 100644 (file)
index 0000000..ffc1449
--- /dev/null
@@ -0,0 +1,29 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+
+SCRIPTFILES = \
+  genroot.sh \
+  genserv.sh
+
+EXTRA_DIST = $(SCRIPTFILES)
+
diff --git a/tests/certs/scripts/Makefile.in b/tests/certs/scripts/Makefile.in
new file mode 100644 (file)
index 0000000..9cc4671
--- /dev/null
@@ -0,0 +1,534 @@
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/certs/scripts
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+       $(top_srcdir)/m4/curl-confopts.m4 \
+       $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
+       $(top_srcdir)/m4/curl-override.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
+       $(top_builddir)/include/curl/curlbuild.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+KRB4_ENABLED = @KRB4_ENABLED@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_ENABLED = @SSL_ENABLED@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_SSLEAY = @USE_SSLEAY@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign
+SCRIPTFILES = \
+  genroot.sh \
+  genserv.sh
+
+EXTRA_DIST = $(SCRIPTFILES)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/certs/scripts/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/certs/scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/certs/srp-verifier-conf b/tests/certs/srp-verifier-conf
new file mode 100644 (file)
index 0000000..67825ce
--- /dev/null
@@ -0,0 +1,3 @@
+1:Ewl2hcjiutMd3Fu2lgFnUXWSc67TVyy2vwYCKoS9MLsrdJVT9RgWTCuEqWJrfB6uE3LsE9GkOlaZabS7M29sj5TnzUqOLJMjiwEzArfiLr9WbMRANlF68N5AVLcPWvNx6Zjl3m5Scp0BzJBz9TkgfhzKJZ.WtP3Mv/67I/0wmRZ:2
+2:dUyyhxav9tgnyIg65wHxkzkb7VIPh4o0lkwfOKiPp4rVJrzLRYVBtb76gKlaO7ef5LYGEw3G.4E0jbMxcYBetDy2YdpiP/3GWJInoBbvYHIRO9uBuxgsFKTKWu7RnR7yTau/IrFTdQ4LY/q.AvoCzMxV0PKvD9Odso/LFIItn8PbTov3VMn/ZEH2SqhtpBUkWtmcIkEflhX/YY/fkBKfBbe27/zUaKUUZEUYZ2H2nlCL60.JIPeZJSzsu/xHDVcx:2
+3:2iQzj1CagQc/5ctbuJYLWlhtAsPHc7xWVyCPAKFRLWKADpASkqe9djWPFWTNTdeJtL8nAhImCn3Sr/IAdQ1FrGw0WvQUstPx3FO9KNcXOwisOQ1VlL.gheAHYfbYyBaxXL.NcJx9TUwgWDT0hRzFzqSrdGGTN3FgSTA1v4QnHtEygNj3eZ.u0MThqWUaDiP87nqha7XnT66bkTCkQ8.7T8L4KZjIImrNrUftedTTBi.WCi.zlrBxDuOM0da0JbUkQlXqvp0yvJAPpC11nxmmZOAbQOywZGmu9nhZNuwTlxjfIro0FOdthaDTuZRL9VL7MRPUDo/DQEyW.d4H.UIlzp:2
diff --git a/tests/certs/srp-verifier-db b/tests/certs/srp-verifier-db
new file mode 100644 (file)
index 0000000..2f851a3
--- /dev/null
@@ -0,0 +1,2 @@
+jsmith:34fPk7u.w3R/M1k2sQ9F.04GZqLKAsqDn44CHGu7ML0M8VWwu1p79OLxi6jRhSNdSM46Kx9GRVyJLXz7eok53..A6X5p3NdnMSYX8WwYrDmuseHDr.eua7gjd04S4EoY4ZuKix2.WGAsMTwk86AmTvcqyzqsH7GDhGOHEhjP5zs:lTjBBoK04K9vTKiL10rI/:1
+alice:3IIP1g1HDTN6VEUr8DUkMleocoC1cpuFZnmunDaGhMyIsw8LAwCc7ZapWaC66gZSyis4ezSuCqvhsJdwdc.0es2UrH6PBkBQflcQDuC.dEpjhWgAcH2Dw.2qU.E0ApQzLkcKOjXMQ2R6jMBL14kEUPjjHS3aa16yB.Afj3bNPdf:1JxU4GkweUEii6.b0grkzU:1
index b6071cb..e068d54 100644 (file)
@@ -2,4 +2,7 @@
 # test cases are run by runtests.pl. Just add the plain test case numbers, one
 # per line.
 # Lines starting with '#' letters are treated as comments.
-564
+594
+1209
+1211
+1512
index d4fa32a..0d5c29d 100644 (file)
@@ -2,73 +2,128 @@ iall:
 install:
 test:
 
-EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46    \
- test10 test109 test118 test13 test200 test28 test36 test47 test100 test11 \
- test119 test14 test201 test29 test37 test5 test101 test110 test12 test15  \
- test202 test3 test4 test6 test102 test111 test120 test16 test21 test30           \
- test7 test103 test112 test121 test17 test22 test300 test8 test104 test113 \
- test122 test18 test23 test301 test9 test105 test114 test123 test19 test24 \
- test302 test43 test31 test106 test115 test124 test190 test25 test303     \
- test44 test38 test107 test116 test125 test2 test26 test33 test45 test126  \
- test304 test39 test32 test128 test48 test306 test130 test131 test132     \
- test133 test134 test135 test305 test49 test50 test51 test52 test53 test54 \
- test55 test56 test500 test501 test502 test503 test504 test136 test57     \
- test137 test138 test58 test139 test140 test141 test59 test60 test61      \
- test142 test143 test62 test63 test64 test65 test66 test144 test145 test67 \
- test68 test41 test40 test42 test69 test70 test71 test72 test73 test146           \
- test505 test74 test75 test76 test77 test78 test147 test148 test506 test79 \
- test80 test81 test82 test83 test84 test85 test86 test87 test507 test149   \
- test88 test89 test90 test508 test91 test92 test203 test93 test94 test95   \
- test510 test97 test98 test99 test150 test151 test152 test153 test154     \
- test155 test156 test157 test158 test159 test511 test160 test161 test162   \
- test163 test164 test512 test165 test166 test167 test168 test169 test170   \
- test171 test172 test204 test205 test173 test174 test175 test176 test177   \
- test513 test514 test178 test179 test180 test181 test182 test183 test184   \
- test185 test186 test187 test188 test189 test191 test192 test193 test194   \
- test195 test196 test197 test198 test515 test516 test517 test518 test210   \
- test211 test212 test220 test221 test222 test223 test224 test206 test207   \
- test208 test209 test213 test240 test241 test242 test519 test214 test215   \
- test216 test217 test218 test199 test225 test226 test227 test228 test229   \
- test233 test234 test235 test236 test520 test237 test238 test239 test243   \
- test245 test246 test247 test248 test249 test250 test251 test252 test253   \
- test254 test255 test521 test522 test523 test256 test257 test258 test259   \
- test260 test261 test262 test263 test264 test265 test266 test267 test268   \
- test269 test270 test271 test272 test273 test274 test275 test524 test525   \
- test276 test277 test526 test527 test528 test530 DISABLED test278 test279  \
- test531 test280 test529 test532 test533 test534 test535 test281 test537   \
- test282 test283 test284 test538 test285 test286 test307 test308 test287   \
- test400 test288 test600 test601 test602 test603 test401 test402 test290   \
- test291 test292 test293 test403 test404 test405 test604 test605 test606   \
- test607 test608 test609 test294 test295 test296 test297 test298 test610   \
- test611 test612 test406 test407 test408 test409 test613 test614 test700   \
- test701 test702 test704 test705 test703 test706 test707 test350 test351   \
- test352 test353 test289 test540 test354 test231 test1000 test1001        \
- test1002 test1003 test1004 test1005 test1006 test615 test1007 test541    \
- test1010 test1011 test1012 test542 test543 test536 test1008 test1009     \
- test2000 test2001 test2002 test2003 test35 test544 test545 test2004      \
- test546 test1013 test1014 test1015 test547 test548 test549 test550       \
- test551 test552 test1016 test1017 test1018 test1019 test1020 test553     \
- test1021 test1022 test1023 test309 test616 test617 test618 test619       \
- test620 test621 test622 test623 test624 test625 test626 test627 test554   \
- test1024 test1025 test555 test1026 test1027 test1028 test1029 test1030           \
- test556 test557 test1031 test628 test629 test630 test631 test632 test1032 \
- test1033 test539 test1034 test1035 test1036 test1037 test1038 test1039           \
- test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047   \
- test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055   \
- test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063   \
- test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071   \
- test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079   \
- test1080 test1081 test1082 test1083 test1084 test1085 test633 test634    \
- test635 test636 test637 test558 test559 test1086 test1087 test1088       \
- test574 test575 test576 test577 test1113 test1114 test1089 test1090      \
- test1091 test1092 test1093 test1094 test1095 test1096 test1097 test560           \
- test561 test1098 test1099 test562 test563 test1100 test564 test1101      \
- test1102 test1103 test1104 test299 test310 test311 test312 test1105      \
- test565 test800 test1106 test801 test566 test802 test803 test1107        \
- test1108 test1109 test1110 test1111 test1112 test129 test567 test568     \
- test569 test570 test571 test572 test804 test805 test806 test807 test573   \
- test313 test1115 test578 test579 test1116 test1200 test1201 test1202     \
- test1203 test1117 test1118 test1119 test1120
+# this list is in numerical order
+TESTCASES = test1 test2 test3 test4 test5 test6 test7 test8 test9       \
+test10 test11 test12 test13 test14 test15 test16 test17 test18 test19   \
+test20 test21 test22 test23 test24 test25 test26 test27 test28 test29   \
+test30 test31 test32 test33 test34 test35 test36 test37 test38 test39   \
+test40 test41 test42 test43 test44 test45 test46 test47 test48 test49   \
+test50 test51 test52 test53 test54 test55 test56 test57 test58 test59   \
+test60 test61 test62 test63 test64 test65 test66 test67 test68 test69   \
+test70 test71 test72 test73 test74 test75 test76 test77 test78 test79   \
+test80 test81 test82 test83 test84 test85 test86 test87 test88 test89   \
+test90 test91 test92 test93 test94 test95 test96 test97 test98 test99   \
+test100 test101 test102 test103 test104 test105 test106 test107 test108 \
+test109 test110 test111 test112 test113 test114 test115 test116 test117 \
+test118 test119 test120 test121 test122 test123 test124 test125 test126 \
+test127 test128 test129 test130 test131 test132 test133 test134 test135 \
+test136 test137 test138 test139 test140 test141 test142 test143 test144 \
+test145 test146 test147 test148 test149 test150 test151 test152 test153 \
+test154 test155 test156 test157 test158 test159 test160 test161 test162 \
+test163 test164 test165 test166 test167 test168 test169 test170 test171 \
+test172 test173 test174 test175 test176 test177 test178 test179 test180 \
+test181 test182 test183 test184 test185 test186 test187 test188 test189 \
+test190 test191 test192 test193 test194 test195 test196 test197 test198 \
+test199 test200 test201 test202 test203 test204 test205 test206 test207 \
+test208 test209 test210 test211 test212 test213 test214 test215 test216 \
+test217 test218         test220 test221 test222 test223 test224 test225 \
+test226 test227 test228 test229         test231         test233 test234 \
+test235 test236 test237 test238 test239 test240 test241 test242 test243 \
+        test245 test246 test247 test248 test249 test250 test251 test252 \
+test253 test254 test255 test256 test257 test258 test259 test260 test261 \
+test262 test263 test264 test265 test266 test267 test268 test269 test270 \
+test271 test272 test273 test274 test275 test276 test277 test278 test279 \
+test280 test281 test282 test283 test284 test285 test286 test287 test288 \
+test289 test290 test291 test292 test293 test294 test295 test296 test297 \
+test298 test299 test300 test301 test302 test303 test304 test305 test306 \
+test307 test308 test309 test310 test311 test312 test313                 \
+                                test320 test321 test322 test323 test324 \
+test350 test351 test352 test353 test354 \
+\
+test400 test401 test402 test403 test404 test405 test406 test407 test408 \
+test409 \
+\
+test500 test501 test502 test503 test504 test505 test506 test507 test508 \
+test509 test510 test511 test512 test513 test514 test515 test516 test517 \
+test518 test519 test520 test521 test522 test523 test524 test525 test526 \
+test527 test528 test529 test530 test531 test532 test533 test534 test535 \
+test536 test537 test538 test539 test540 test541 test542 test543 test544 \
+test545 test546 test547 test548 test549 test550 test551 test552 test553 \
+test554 test555 test556 test557 test558         test560 test561 test562 \
+test563 test564 test565 test566 test567 test568 test569 test570 test571 \
+test572 test573 test574 test575 test576         test578 test579 test580 \
+test581 test582 test583 test584 test585 test586 test587 test588         \
+test590 test591 test592 test593 test594 test595 test596 test597 test598 \
+test599 test600 test601 test602 test603 test604 test605 test606 test607 \
+test608 test609 test610 test611 test612 test613 test614 test615 test616 \
+test617 test618 test619 test620 test621 test622 test623 test624 test625 \
+test626 test627 test628 test629 test630 test631 test632 test633 test634 \
+test635 test636 test637 test638 test639 \
+\
+test700 test701 test702 test703 test704 test705 test706 test707 test708 \
+test709 test710 test711 test712 \
+\
+test800 test801 test802 test803 test804 test805 test806 test807 test808 \
+test809 \
+\
+test850 test851 test852 test853 test854 test855 test856 test857 \
+\
+test900 test901 test902 test903 test904 test905 test906 test907 test908 \
+test909 test910 test911 \
+\
+test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \
+test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \
+test1016 test1017 test1018 test1019 test1020 test1021 test1022 test1023 \
+test1024 test1025 test1026 test1027 test1028 test1029 test1030 test1031 \
+test1032 test1033 test1034 test1035 test1036 test1037 test1038 test1039 \
+test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047 \
+test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055 \
+test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \
+test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \
+test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \
+test1080 test1081 test1082 test1083 test1084 test1085 test1086 test1087 \
+test1088 test1089 test1090 test1091 test1092 test1093 test1094 test1095 \
+test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
+test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
+test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
+test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
+test1128 test1129 test1130 test1131 test1132 test1133 \
+\
+test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
+test1216 test1217 test1218 test1219 \
+test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
+test1228 test1229 test1230 test1231 test1232 test1233 \
+\
+test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
+test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
+test1316 test1317 test1318 test1319 test1320 test1321 test1322 test1323 \
+test1324 test1325 test1326 test1327 test1328 test1329 test1330 test1331 \
+test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \
+test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \
+test1348 test1349 test1350 test1351 test1352 test1353 test1354 test1355 \
+test1356 test1357 test1358 test1359 test1360 test1361 test1362 test1363 \
+test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \
+test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \
+test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \
+test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
+test1396 \
+\
+test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+test1408 test1409 test1410          test1412 test1413 test1414 \
+\
+test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
+test1508 test1509 test1510 test1511 test1512 \
+\
+test1900 test1901 test1902 test1903 \
+\
+test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
+test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
+test2032 test2033
+
+EXTRA_DIST = $(TESTCASES) DISABLED
 
 filecheck:
        @mkdir test-place; \
index 26522c3..83f8842 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,49 +78,73 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = tests/data
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -95,7 +161,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -108,15 +175,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -126,6 +195,9 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
@@ -133,16 +205,12 @@ LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -155,7 +223,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -168,34 +235,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -207,6 +274,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -226,7 +294,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -236,77 +303,136 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46    \
- test10 test109 test118 test13 test200 test28 test36 test47 test100 test11 \
- test119 test14 test201 test29 test37 test5 test101 test110 test12 test15  \
- test202 test3 test4 test6 test102 test111 test120 test16 test21 test30           \
- test7 test103 test112 test121 test17 test22 test300 test8 test104 test113 \
- test122 test18 test23 test301 test9 test105 test114 test123 test19 test24 \
- test302 test43 test31 test106 test115 test124 test190 test25 test303     \
- test44 test38 test107 test116 test125 test2 test26 test33 test45 test126  \
- test304 test39 test32 test128 test48 test306 test130 test131 test132     \
- test133 test134 test135 test305 test49 test50 test51 test52 test53 test54 \
- test55 test56 test500 test501 test502 test503 test504 test136 test57     \
- test137 test138 test58 test139 test140 test141 test59 test60 test61      \
- test142 test143 test62 test63 test64 test65 test66 test144 test145 test67 \
- test68 test41 test40 test42 test69 test70 test71 test72 test73 test146           \
- test505 test74 test75 test76 test77 test78 test147 test148 test506 test79 \
- test80 test81 test82 test83 test84 test85 test86 test87 test507 test149   \
- test88 test89 test90 test508 test91 test92 test203 test93 test94 test95   \
- test510 test97 test98 test99 test150 test151 test152 test153 test154     \
- test155 test156 test157 test158 test159 test511 test160 test161 test162   \
- test163 test164 test512 test165 test166 test167 test168 test169 test170   \
- test171 test172 test204 test205 test173 test174 test175 test176 test177   \
- test513 test514 test178 test179 test180 test181 test182 test183 test184   \
- test185 test186 test187 test188 test189 test191 test192 test193 test194   \
- test195 test196 test197 test198 test515 test516 test517 test518 test210   \
- test211 test212 test220 test221 test222 test223 test224 test206 test207   \
- test208 test209 test213 test240 test241 test242 test519 test214 test215   \
- test216 test217 test218 test199 test225 test226 test227 test228 test229   \
- test233 test234 test235 test236 test520 test237 test238 test239 test243   \
- test245 test246 test247 test248 test249 test250 test251 test252 test253   \
- test254 test255 test521 test522 test523 test256 test257 test258 test259   \
- test260 test261 test262 test263 test264 test265 test266 test267 test268   \
- test269 test270 test271 test272 test273 test274 test275 test524 test525   \
- test276 test277 test526 test527 test528 test530 DISABLED test278 test279  \
- test531 test280 test529 test532 test533 test534 test535 test281 test537   \
- test282 test283 test284 test538 test285 test286 test307 test308 test287   \
- test400 test288 test600 test601 test602 test603 test401 test402 test290   \
- test291 test292 test293 test403 test404 test405 test604 test605 test606   \
- test607 test608 test609 test294 test295 test296 test297 test298 test610   \
- test611 test612 test406 test407 test408 test409 test613 test614 test700   \
- test701 test702 test704 test705 test703 test706 test707 test350 test351   \
- test352 test353 test289 test540 test354 test231 test1000 test1001        \
- test1002 test1003 test1004 test1005 test1006 test615 test1007 test541    \
- test1010 test1011 test1012 test542 test543 test536 test1008 test1009     \
- test2000 test2001 test2002 test2003 test35 test544 test545 test2004      \
- test546 test1013 test1014 test1015 test547 test548 test549 test550       \
- test551 test552 test1016 test1017 test1018 test1019 test1020 test553     \
- test1021 test1022 test1023 test309 test616 test617 test618 test619       \
- test620 test621 test622 test623 test624 test625 test626 test627 test554   \
- test1024 test1025 test555 test1026 test1027 test1028 test1029 test1030           \
- test556 test557 test1031 test628 test629 test630 test631 test632 test1032 \
- test1033 test539 test1034 test1035 test1036 test1037 test1038 test1039           \
- test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047   \
- test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055   \
- test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063   \
- test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071   \
- test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079   \
- test1080 test1081 test1082 test1083 test1084 test1085 test633 test634    \
- test635 test636 test637 test558 test559 test1086 test1087 test1088       \
- test574 test575 test576 test577 test1113 test1114 test1089 test1090      \
- test1091 test1092 test1093 test1094 test1095 test1096 test1097 test560           \
- test561 test1098 test1099 test562 test563 test1100 test564 test1101      \
- test1102 test1103 test1104 test299 test310 test311 test312 test1105      \
- test565 test800 test1106 test801 test566 test802 test803 test1107        \
- test1108 test1109 test1110 test1111 test1112 test129 test567 test568     \
- test569 test570 test571 test572 test804 test805 test806 test807 test573   \
- test313 test1115 test578 test579 test1116 test1200 test1201 test1202     \
- test1203 test1117 test1118 test1119 test1120
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
+# this list is in numerical order
+TESTCASES = test1 test2 test3 test4 test5 test6 test7 test8 test9       \
+test10 test11 test12 test13 test14 test15 test16 test17 test18 test19   \
+test20 test21 test22 test23 test24 test25 test26 test27 test28 test29   \
+test30 test31 test32 test33 test34 test35 test36 test37 test38 test39   \
+test40 test41 test42 test43 test44 test45 test46 test47 test48 test49   \
+test50 test51 test52 test53 test54 test55 test56 test57 test58 test59   \
+test60 test61 test62 test63 test64 test65 test66 test67 test68 test69   \
+test70 test71 test72 test73 test74 test75 test76 test77 test78 test79   \
+test80 test81 test82 test83 test84 test85 test86 test87 test88 test89   \
+test90 test91 test92 test93 test94 test95 test96 test97 test98 test99   \
+test100 test101 test102 test103 test104 test105 test106 test107 test108 \
+test109 test110 test111 test112 test113 test114 test115 test116 test117 \
+test118 test119 test120 test121 test122 test123 test124 test125 test126 \
+test127 test128 test129 test130 test131 test132 test133 test134 test135 \
+test136 test137 test138 test139 test140 test141 test142 test143 test144 \
+test145 test146 test147 test148 test149 test150 test151 test152 test153 \
+test154 test155 test156 test157 test158 test159 test160 test161 test162 \
+test163 test164 test165 test166 test167 test168 test169 test170 test171 \
+test172 test173 test174 test175 test176 test177 test178 test179 test180 \
+test181 test182 test183 test184 test185 test186 test187 test188 test189 \
+test190 test191 test192 test193 test194 test195 test196 test197 test198 \
+test199 test200 test201 test202 test203 test204 test205 test206 test207 \
+test208 test209 test210 test211 test212 test213 test214 test215 test216 \
+test217 test218         test220 test221 test222 test223 test224 test225 \
+test226 test227 test228 test229         test231         test233 test234 \
+test235 test236 test237 test238 test239 test240 test241 test242 test243 \
+        test245 test246 test247 test248 test249 test250 test251 test252 \
+test253 test254 test255 test256 test257 test258 test259 test260 test261 \
+test262 test263 test264 test265 test266 test267 test268 test269 test270 \
+test271 test272 test273 test274 test275 test276 test277 test278 test279 \
+test280 test281 test282 test283 test284 test285 test286 test287 test288 \
+test289 test290 test291 test292 test293 test294 test295 test296 test297 \
+test298 test299 test300 test301 test302 test303 test304 test305 test306 \
+test307 test308 test309 test310 test311 test312 test313                 \
+                                test320 test321 test322 test323 test324 \
+test350 test351 test352 test353 test354 \
+\
+test400 test401 test402 test403 test404 test405 test406 test407 test408 \
+test409 \
+\
+test500 test501 test502 test503 test504 test505 test506 test507 test508 \
+test509 test510 test511 test512 test513 test514 test515 test516 test517 \
+test518 test519 test520 test521 test522 test523 test524 test525 test526 \
+test527 test528 test529 test530 test531 test532 test533 test534 test535 \
+test536 test537 test538 test539 test540 test541 test542 test543 test544 \
+test545 test546 test547 test548 test549 test550 test551 test552 test553 \
+test554 test555 test556 test557 test558         test560 test561 test562 \
+test563 test564 test565 test566 test567 test568 test569 test570 test571 \
+test572 test573 test574 test575 test576         test578 test579 test580 \
+test581 test582 test583 test584 test585 test586 test587 test588         \
+test590 test591 test592 test593 test594 test595 test596 test597 test598 \
+test599 test600 test601 test602 test603 test604 test605 test606 test607 \
+test608 test609 test610 test611 test612 test613 test614 test615 test616 \
+test617 test618 test619 test620 test621 test622 test623 test624 test625 \
+test626 test627 test628 test629 test630 test631 test632 test633 test634 \
+test635 test636 test637 test638 test639 \
+\
+test700 test701 test702 test703 test704 test705 test706 test707 test708 \
+test709 test710 test711 test712 \
+\
+test800 test801 test802 test803 test804 test805 test806 test807 test808 \
+test809 \
+\
+test850 test851 test852 test853 test854 test855 test856 test857 \
+\
+test900 test901 test902 test903 test904 test905 test906 test907 test908 \
+test909 test910 test911 \
+\
+test1000 test1001 test1002 test1003 test1004 test1005 test1006 test1007 \
+test1008 test1009 test1010 test1011 test1012 test1013 test1014 test1015 \
+test1016 test1017 test1018 test1019 test1020 test1021 test1022 test1023 \
+test1024 test1025 test1026 test1027 test1028 test1029 test1030 test1031 \
+test1032 test1033 test1034 test1035 test1036 test1037 test1038 test1039 \
+test1040 test1041 test1042 test1043 test1044 test1045 test1046 test1047 \
+test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055 \
+test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \
+test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \
+test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079 \
+test1080 test1081 test1082 test1083 test1084 test1085 test1086 test1087 \
+test1088 test1089 test1090 test1091 test1092 test1093 test1094 test1095 \
+test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
+test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
+test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
+test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
+test1128 test1129 test1130 test1131 test1132 test1133 \
+\
+test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
+test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
+test1216 test1217 test1218 test1219 \
+test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
+test1228 test1229 test1230 test1231 test1232 test1233 \
+\
+test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
+test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
+test1316 test1317 test1318 test1319 test1320 test1321 test1322 test1323 \
+test1324 test1325 test1326 test1327 test1328 test1329 test1330 test1331 \
+test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \
+test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \
+test1348 test1349 test1350 test1351 test1352 test1353 test1354 test1355 \
+test1356 test1357 test1358 test1359 test1360 test1361 test1362 test1363 \
+test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \
+test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \
+test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \
+test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
+test1396 \
+\
+test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
+test1408 test1409 test1410          test1412 test1413 test1414 \
+\
+test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
+test1508 test1509 test1510 test1511 test1512 \
+\
+test1900 test1901 test1902 test1903 \
+\
+test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
+test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
+test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
+test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
+test2032 test2033
+
+EXTRA_DIST = $(TESTCASES) DISABLED
 all: all-am
 
 .SUFFIXES:
@@ -314,14 +440,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/data/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  tests/data/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/data/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/data/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -339,47 +465,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
+tags TAGS:
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -396,16 +522,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -416,7 +548,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -424,18 +556,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -454,17 +606,21 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags-am uninstall uninstall-am
 
 iall:
 install:
@@ -490,6 +646,7 @@ filecheck:
 
 show:
        @echo $(EXTRA_DIST)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 5334f85..30714f9 100644 (file)
@@ -11,9 +11,12 @@ HTTP proxy NTLM auth
 
 # Server-side
 <reply>
+<servercmd>
+connection-monitor
+</servercmd>
 
 # this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
 Transfer-Encoding: chunked\r
@@ -24,16 +27,16 @@ FA0
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r
 0\r
 \r
-</data1001>
+</connect1001>
 
 # This is supposed to be returned when the server gets the second
 # Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
 HTTP/1.1 200 Things are fine in proxy land\r
 Server: Microsoft-IIS/5.0\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
-</data1002>
+</connect1002>
 
 # this is returned when we get a GET!
 <data2>
@@ -93,7 +96,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
+http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -106,21 +109,22 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:1008 HTTP/1.1\r
-Host: test.remote.haxx.se:1008\r
+CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.1008:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:1008 HTTP/1.1\r
-Host: test.remote.haxx.se:1008\r
+CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.1008:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/10080002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:1008\r
+Host: test.remote.example.com.1008:%HTTPPORT\r
 Accept: */*\r
 \r
+[DISCONNECT]
 </protocol>
 </verify>
 </testcase>
index 62ba074..566867d 100644 (file)
@@ -10,31 +10,31 @@ followlocation
 # Server-side
 <reply>
 <data>
-HTTP/1.1 301 OK swsclose\r
+HTTP/1.1 301 OK\r
 Location: moo.html&testcase=/10110002\r
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
-Connection: close\r
+Content-Length: 0\r
 \r
 </data>
 <data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </data2>
 <datacheck>
-HTTP/1.1 301 OK swsclose\r
+HTTP/1.1 301 OK\r
 Location: moo.html&testcase=/10110002\r
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Content-Length: 0\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
 body
 </datacheck>
 </reply>
index 6aa1715..4edc173 100644 (file)
@@ -17,11 +17,11 @@ Connection: close
 \r
 </data>
 <data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </data2>
 <datacheck>
@@ -30,11 +30,11 @@ Location: moo.html&testcase=/10120002
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </datacheck>
 </reply>
index c167466..a2b2cef 100644 (file)
@@ -1,6 +1,8 @@
 <testcase>
 <info>
 <keywords>
+HTTP
+HTTP POST
 --data-urlencode
 </keywords>
 </info>
index 5ab7728..8112724 100644 (file)
@@ -12,32 +12,32 @@ HTTP proxy NTLM auth
 # Server-side
 <reply>
 
-<data>
+<connect>
 HTTP/1.1 407 Authorization Required to proxy me my dear swsclose\r
 Proxy-Authenticate: NTLM\r
 Content-Length: 21\r
 Connection: close\r
 
 data to discard
-</data>
+</connect>
 
 # this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
 Content-Length: 28\r
 
 And you should ignore this data.\r
-</data1001>
+</connect1001>
 
 # This is supposed to be returned when the server gets the second
 # Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
 HTTP/1.1 200 Things are fine in proxy land\r
 Server: Microsoft-IIS/5.0\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
-</data1002>
+</connect1002>
 
 # this is returned when we get a GET!
 <data2>
@@ -102,7 +102,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
+http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -115,23 +115,23 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:1021 HTTP/1.1\r
-Host: test.remote.haxx.se:1021\r
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.1021:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:1021 HTTP/1.1\r
-Host: test.remote.haxx.se:1021\r
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.1021:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:1021 HTTP/1.1\r
-Host: test.remote.haxx.se:1021\r
+CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.1021:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/10210002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:1021\r
+Host: test.remote.example.com.1021:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
index 5a96de6..6820ea6 100644 (file)
@@ -12,13 +12,13 @@ FAILURE
 #
 # Server-side
 <reply>
-<data>
+<connect>
 HTTP/1.1 501 Method not implemented swsclose\r
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 Content-Length: 0\r
 \r
-</data>
+</connect>
 </reply>
 
 #
index d1b9a81..56eca64 100644 (file)
@@ -39,7 +39,8 @@ FTP GET with type=A style ASCII URL using %20 codes
 USER anonymous\r
 PASS ftp@example.com\r
 PWD\r
-CWD /path with  spaces\r
+CWD /\r
+CWD path with  spaces\r
 CWD and things2\r
 EPSV\r
 TYPE A\r
index 767a7cc..e303a89 100644 (file)
@@ -14,7 +14,7 @@ HTTP proxy Digest auth
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data>
+<connect>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
 Content-Length: 40000\r
@@ -820,7 +820,7 @@ And you should ignore this data. aaaaaaaaaaaaaaaa
 And you should ignore this data. aaaaaaaaaaaaaaaa
 And you should ignore this data. aaaaaaaaaaaaaaaa
 end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-</data>
+</connect>
 
 # this is returned when we get a GET!
 <data2>
@@ -835,12 +835,12 @@ daniel
 </data2>
 
 # then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
 HTTP/1.1 200 OK swsbounce\r
 Server: no
 \r
 Nice proxy auth sir!
-</data1000>
+</connect1000>
 
 <datacheck>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
@@ -874,7 +874,7 @@ crypto
 HTTP proxy CONNECT auth Digest, large headers and data
  </name>
  <command>
-http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.1060:8990/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
@@ -884,17 +884,17 @@ http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT -
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:1060 HTTP/1.1\r
-Host: test.remote.haxx.se:1060\r
+CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.1060:8990\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:1060 HTTP/1.1\r
-Host: test.remote.haxx.se:1060\r
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1060", response="79e394ffcd42b6c771c7582da1fc4498"\r
+CONNECT test.remote.haxx.se.1060:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.1060:8990\r
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1060:8990", response="e1fbed39c26f4efe284adc0e576ff638"\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/10600002 HTTP/1.1\r
-Host: test.remote.haxx.se:1060\r
+Host: test.remote.haxx.se.1060:8990\r
 Accept: */*\r
 \r
 </protocol>
index 0fb8c51..a1d7286 100644 (file)
@@ -15,7 +15,7 @@ HTTP proxy Digest auth
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data>
+<connect>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
 Transfer-Encoding: chunked\r
@@ -825,7 +825,7 @@ end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 \r
 0\r
 \r
-</data>
+</connect>
 
 # this is returned when we get a GET!
 <data2>
@@ -840,12 +840,12 @@ daniel
 </data2>
 
 # then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
 HTTP/1.1 200 OK swsbounce\r
 Server: no
 \r
 Nice proxy auth sir!
-</data1000>
+</connect1000>
 
 <datacheck>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
@@ -879,7 +879,7 @@ crypto
 HTTP proxy CONNECT auth Digest, large headers and chunked data
  </name>
  <command>
-http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.1061:8990/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
@@ -889,17 +889,17 @@ http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT -
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:1061 HTTP/1.1\r
-Host: test.remote.haxx.se:1061\r
+CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.1061:8990\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:1061 HTTP/1.1\r
-Host: test.remote.haxx.se:1061\r
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1061", response="8e96acf6a6214012183879e28e73b2d3"\r
+CONNECT test.remote.haxx.se.1061:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.1061:8990\r
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1061:8990", response="4e23449fa93224834299e7282a70472c"\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/10610002 HTTP/1.1\r
-Host: test.remote.haxx.se:1061\r
+Host: test.remote.haxx.se.1061:8990\r
 Accept: */*\r
 \r
 </protocol>
index e2355e3..a9bb771 100644 (file)
@@ -13,6 +13,12 @@ proxytunnel
 #
 # Server-side
 <reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+Server: test tunnel 2000\r
+\r
+</connect>
+
 <data nocheck="yes">
 HTTP/1.0 200 OK\r
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
@@ -31,12 +37,13 @@ contents
 <client>
 <server>
 http
+http-proxy
 </server>
  <name>
 HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
  </name>
  <command>
---proxy1.0 %HOSTIP:%HTTPPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078
+--proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078
 </command>
 </client>
 
@@ -46,22 +53,25 @@ HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
 <strip>
 ^User-Agent:.*
 </strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.0\r
-Host: %HOSTIP:%HTTPPORT\r
+<proxy>
+CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0\r
+Host: %HOSTIP.1078:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol>
 GET /we/want/that/page/1078 HTTP/1.1\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: %HOSTIP.1078:%HTTPPORT\r
 Accept: */*\r
 \r
 GET /we/want/that/page/1078 HTTP/1.0\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: %HOSTIP.1078:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
 <stdout>
 HTTP/1.1 200 Mighty fine indeed\r
+Server: test tunnel 2000\r
 \r
 HTTP/1.0 200 OK\r
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
index ebb0399..b899810 100644 (file)
@@ -18,13 +18,15 @@ Content-Length: 27
 
 This is all fine and dandy
 </data>
-<data1001>
+
+<connect1001>
 HTTP/1.1 200 We are fine and cool\r
 Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2\r
 Content-Length: 27\r
 
 This is all fine and dandy
-</data1001>
+</connect1001>
+
 <datacheck>
 HTTP/1.1 200 We are fine and cool\r
 Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2\r
@@ -50,7 +52,7 @@ NTLM
 HTTP POST using CONNECT with --proxy-ntlm but no auth is required
  </name>
  <command>
-http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
+http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p
 </command>
 </client>
 
@@ -60,15 +62,15 @@ http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --p
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.a.galaxy.far.far.away:1097 HTTP/1.1\r
-Host: test.a.galaxy.far.far.away:1097\r
+CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1\r
+Host: test.a.galaxy.far.far.away.1097:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS\r
 Proxy-Connection: Keep-Alive\r
 \r
 POST /1097 HTTP/1.1\r
 User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS\r
-Host: test.a.galaxy.far.far.away:1097\r
+Host: test.a.galaxy.far.far.away.1097:%HTTPPORT\r
 Accept: */*\r
 Content-Length: 0\r
 Content-Type: application/x-www-form-urlencoded\r
index 1a8f896..25f194c 100644 (file)
@@ -34,6 +34,9 @@ HTTP with cookie parser and header recording
  <command>
 "http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword"
 </command>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+</precheck>
 </client>
 
 # Verify data after the test has been "shot"
@@ -50,9 +53,9 @@ Content-Type: application/x-www-form-urlencoded
 \r
 userid=myname&password=mypassword
 </protocol>
-<file name="log/cookie1105.txt">
+<file name="log/cookie1105.txt" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 127.0.0.1      FALSE   /we/want/       FALSE   0       foobar  name
index ddec00a..4ea2042 100644 (file)
@@ -11,7 +11,7 @@ RETR
 <reply>
 <servercmd>
 REPLY CWD 421 Timeout!
-</server>
+</servercmd>
 </reply>
 
 # Client-side
diff --git a/tests/data/test1121 b/tests/data/test1121
new file mode 100644 (file)
index 0000000..e704e05
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Content-Length: 6\r
+\r
+blaha
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP multiple provided Host: headers
+ </name>
+ <command>
+-H "Host: host1" -H "Host: host2" -H "Host: host3" http://%HOSTIP:%HTTPPORT/1121
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1121 HTTP/1.1\r
+Accept: */*\r
+Host: host1\r
+Host: host2\r
+Host: host3\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1122 b/tests/data/test1122
new file mode 100644 (file)
index 0000000..78d50d7
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZ3ppcA0KQ29udGVudC1MZW5ndGg6IDQ0DQoN
+Ch+LCAh5nqtBAANsYWxhbGEAy8nMS1Uw5FLIAdFGXAoQhjEXAAoCcWAYAAAA
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK\r
+Date: Mon, 29 Nov 2004 21:56:53 GMT\r
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29\r
+Vary: Accept-Encoding\r
+Content-Type: text/html; charset=ISO-8859-1\r
+Transfer-Encoding: gzip\r
+Content-Length: 44\r
+\r
+line 1
+ line 2
+  line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET gzip transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1122 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1122 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Connection: TE\r
+TE: gzip\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1123 b/tests/data/test1123
new file mode 100644 (file)
index 0000000..3172fed
--- /dev/null
@@ -0,0 +1,200 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZGVmbGF0ZQ0KQ29udGVudC1MZW5ndGg6IDEz
+MDUNCg0KeJzcWNtu4zYQfTeQf2D91AK2brYTOXC0KHLZBM02wdoFuk8GLdE2G0kUSMq5PPTbO5Qo
+ibEcr3eDvgRIYnLmnMPhDEmTmXx6SmK0IVxQlp51XcvpIpKGLKLp6qx7M73r+/5o3He7n4LO5JeL
+u/PZt/tLlHH2DwllP6ZCAhBNv01nl19Qdy1ldmrbS07EOiFYWimR9gKHDySN7GXS1zzRd6yhFcmo
+C6JbWkEHocqm2k1vTqPAPXa9iW0YSkSEJZnjKCKAGI/9vuP3PRc5w1PHPfXGE9vwG4Q8Ux9R4DnO
+sO86fddHjnfqwc9AUyrEqzhSnJC5WDMugzDncR2OYW/jl3kcF3CE0wjFdNGmFhAdHhGhljpnSVJS
+UoIkY7UAx/wZLRlHYUxJKvuCRgT99fUWSY5TsYSKWjCLRshQ3hkMogLhcgSlWqlwVd8ljYk46uRC
+ddQY4jmV+MlCNxKJPMtAX6Dr2ey+V/yd9tAVtI86V0X74uZ81kOzy9s/L+Hz9uJ3gF3d3F72iuE/
+391fX36FNgzwSGKIqZTqZ0zInm7m0AoZe6BEFNooz2KGIxgCllqekKiZdQ9lWIhHxiPVhMjSPFkU
+9un09qgTEi7pkoZQVzD9QTj4mChDgWo8wQjFtCAbGXsknERHncVzlaQekmvyZsarslhHndkaqAjD
+74KmajMJSG2dapVgBpsOec5RJ8bpKscrIooYSLqhnKUJDCBAR5fQWBsbKnFM5fNchIyTYHTiD63R
+ycTesm+BM8JDkAwGlntsYCvzFhrm8wB7bWwgC5Ne1yzLY8ybsY5HY4hhCMt529MiVAO6A8t3XxFe
+h2I4ymCc0Su0EQ7HxbnhWyNnYuuO6ZmHLAddz6282vAKUw7iD2qMMYDIFyLkNJNwRIpgoE6H16YS
+BqVPw/Vc7eXggixxHsuJbRpLGNR/Xh1gGZQ92HloVielrdaLPbFbrEZszRLythAsYMpLFXV42iZD
+69YCjaZcvRwuB2CtpGiNyOLFO1wEwFpE0RqRF5odLgJgLaJojUi4hj1GYrY6XKqmaMFGopHlWXK4
+IIC1lKI1IhFZHC4CYC2iaI0IE0+HiwBYiyiaUS8RqfPyB2pWEqq6abqxzHMOaRMk0Ou36hqF2Ygf
+KMlGVMXYCENE3RwOV1FoLVMQG52Ecs744UolXmtpslnXhAVVraBZemIKhxyk4MvNzP4bncPpASmj
+eYJuS8fErhAar76n5JyTmNSZa5nn+v4WnFiuZ8EF6Q33G2x1rzo5dvxRi1hdsNocdS/afXHaBSzn
+Yu+azATOUQITXjM5l2v4qoactUwlEucSbjKiDqnsV93aoE9gnFISo6kkKXzDrya26WxRoEq76/7v
+Aq8ioopsIFt0zmIS3D2mhNe4wlRFapuhVr1qCasveE4TmmJpzk5yuCEUtYGC1p2W1/OO97kHe7n7
+nK7v7+W6e8eFpbE/6r1u93i4zz3eS/bHe73OXrc7+k7c3wlsf2SD1tjl/W67/LAmMngywUMMrqO1
+Tm18RvI5I2ddTkJ4HSibeknVi7LBmRvZUUPtcuwk6nsLuE+Gqhg7XTuZxuOsRd1+uL3FlVSqDQV2
+uLOjX/Vt6redWiW23mkN4u28seLehuP/L2nOT2dsOHhnxtT76uMnyvUGI/cdmXqBp9jHz9LAc4Yn
+78jSNaFJhOOPn6jhcDTw3pGosA9PffEzeTIs+qyv/ysUdP4DAAD//4IzEaNjAAAAAP//AwDdOI7R
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK\r
+Date: Mon, 29 Nov 2004 21:56:53 GMT\r
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29\r
+Vary: Accept-Encoding\r
+Content-Type: text/html; charset=ISO-8859-1\r
+Transfer-Encoding: deflate\r
+Content-Length: 1305\r
+\r
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE project-listing SYSTEM "http://freshmeat.net/backend/fm-projects-0.4.dtd">
+<project-listing>
+  <project>
+    <project_id>1612</project_id>
+    <date_added>1998-08-21 04:01:29</date_added>
+    <date_updated>2004-10-18 02:22:23</date_updated>
+    <projectname_short>curl</projectname_short>
+    <projectname_full>curl and libcurl</projectname_full>
+    <desc_short>Command line tool and library for client-side URL transfers.</desc_short>
+    <desc_full>curl and libcurl is a tool for transferring files\r
+using URL syntax. It supports HTTP, HTTPS, FTP,\r
+FTPS, DICT, TELNET, LDAP, FILE, and GOPHER, as\r
+well as HTTP-post, HTTP-put, cookies, FTP upload,\r
+resumed transfers, passwords, portnumbers, SSL\r
+certificates, Kerberos, and proxies. It is powered\r
+by libcurl, the client-side URL transfer library.\r
+There are bindings to libcurl for over 20\r
+languages and environments.\r
+</desc_full>
+    <vitality_score>5784.57</vitality_score>
+    <vitality_percent>3.16</vitality_percent>
+    <vitality_rank>169</vitality_rank>
+    <popularity_score>6594.54</popularity_score>
+    <popularity_percent>13.81</popularity_percent>
+    <popularity_rank>105</popularity_rank>
+    <rating>8.50</rating>
+    <rating_count>21</rating_count>
+    <rating_rank>183</rating_rank>
+    <subscriptions>323</subscriptions>
+    <branch_name>Default</branch_name>
+    <url_project_page>http://freshmeat.net/projects/curl/</url_project_page>
+    <url_homepage>http://freshmeat.net/redir/curl/1612/url_homepage/</url_homepage>
+    <url_tgz>http://freshmeat.net/redir/curl/1612/url_tgz/</url_tgz>
+    <url_bz2>http://freshmeat.net/redir/curl/1612/url_bz2/</url_bz2>
+    <url_zip>http://freshmeat.net/redir/curl/1612/url_zip/</url_zip>
+    <url_changelog>http://freshmeat.net/redir/curl/1612/url_changelog/</url_changelog>
+    <url_rpm>http://freshmeat.net/redir/curl/1612/url_rpm/</url_rpm>
+    <url_deb>http://freshmeat.net/redir/curl/1612/url_deb/</url_deb>
+    <url_osx>http://freshmeat.net/redir/curl/1612/url_osx/</url_osx>
+    <url_bsdport>http://freshmeat.net/redir/curl/1612/url_bsdport/</url_bsdport>
+    <url_purchase></url_purchase>
+    <url_cvs>http://freshmeat.net/redir/curl/1612/url_cvs/</url_cvs>
+    <url_list>http://freshmeat.net/redir/curl/1612/url_list/</url_list>
+    <url_mirror>http://freshmeat.net/redir/curl/1612/url_mirror/</url_mirror>
+    <url_demo></url_demo>
+    <license>MIT/X Consortium License</license>
+    <latest_release>
+      <latest_release_version>7.12.2</latest_release_version>
+      <latest_release_id>176085</latest_release_id>
+      <latest_release_date>2004-10-18 02:22:23</latest_release_date>
+    </latest_release>
+    <screenshot_thumb></screenshot_thumb>
+    <authors>
+      <author>
+        <author_name>Daniel Stenberg</author_name>
+        <author_url>http://freshmeat.net/~bagder/</author_url>
+        <author_role>Owner</author_role>
+      </author>
+    </authors>
+    <descriminators>
+      <trove_id>12</trove_id>
+      <trove_id>226</trove_id>
+      <trove_id>3</trove_id>
+      <trove_id>2</trove_id>
+      <trove_id>188</trove_id>
+      <trove_id>216</trove_id>
+      <trove_id>200</trove_id>
+      <trove_id>220</trove_id>
+      <trove_id>164</trove_id>
+      <trove_id>90</trove_id>
+      <trove_id>89</trove_id>
+      <trove_id>809</trove_id>
+      <trove_id>150</trove_id>
+      <trove_id>224</trove_id>
+      <trove_id>900</trove_id>
+      <trove_id>839</trove_id>
+    </descriminators>
+    <dependencies>
+      <dependency type="recommended">
+        <dependency_release_id>0</dependency_release_id>
+        <dependency_branch_id>7464</dependency_branch_id>
+        <dependency_project_id>7464</dependency_project_id>
+        <dependency_project_title>OpenSSL (Default)</dependency_project_title>
+      </dependency>
+      <dependency type="optional">
+        <dependency_release_id>0</dependency_release_id>
+        <dependency_branch_id>0</dependency_branch_id>
+        <dependency_project_id>7443</dependency_project_id>
+        <dependency_project_title>OpenLDAP</dependency_project_title>
+      </dependency>
+      <dependency type="optional">
+        <dependency_release_id>0</dependency_release_id>
+        <dependency_branch_id>0</dependency_branch_id>
+        <dependency_project_id>12351</dependency_project_id>
+        <dependency_project_title>zlib</dependency_project_title>
+      </dependency>
+      <dependency type="optional">
+        <dependency_release_id>0</dependency_release_id>
+        <dependency_branch_id>0</dependency_branch_id>
+        <dependency_project_id>32047</dependency_project_id>
+        <dependency_project_title>Heimdal</dependency_project_title>
+      </dependency>
+      <dependency type="optional">
+        <dependency_release_id>0</dependency_release_id>
+        <dependency_branch_id>0</dependency_branch_id>
+        <dependency_project_id>44532</dependency_project_id>
+        <dependency_project_title>c-ares</dependency_project_title>
+      </dependency>
+    </dependencies>
+  </project>
+</project-listing>
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET deflate transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1123 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1123 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Connection: TE\r
+TE: gzip\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1124 b/tests/data/test1124
new file mode 100644 (file)
index 0000000..d860bee
--- /dev/null
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+chunked
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDI0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBTb21ldGhpbmctVEUtZnJpZW5kbHkvMC4xDQpWYXJ5OiBBY2NlcHQtRW5jb2RpbmcNCkNv
+bnRlbnQtVHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PUlTTy04ODU5LTENClRyYW5zZmVyLUVuY29k
+aW5nOiBnemlwLCBjaHVua2VkDQoNCjE0DQofiwgIeZ6rQQADbGFsYWxhAMvJzA0KMTgNCktVMORS
+yAHRRlwKEIYxFwAKAnFgGAAAAA0KMA0KDQo=
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK\r
+Date: Mon, 29 Nov 2024 21:56:53 GMT\r
+Server: Something-TE-friendly/0.1\r
+Vary: Accept-Encoding\r
+Content-Type: text/html; charset=ISO-8859-1\r
+Transfer-Encoding: gzip, chunked\r
+\r
+line 1
+ line 2
+  line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET gzip+chunked transfer-encoded content
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1124 --tr-encoding
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1124 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Connection: TE\r
+TE: gzip\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1125 b/tests/data/test1125
new file mode 100644 (file)
index 0000000..1883734
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+compressed
+Transfer-Encoding
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data base64="yes">
+SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBNb24sIDI5IE5vdiAyMDA0IDIxOjU2OjUzIEdNVA0KU2Vy
+dmVyOiBBcGFjaGUvMS4zLjMxIChEZWJpYW4gR05VL0xpbnV4KSBtb2RfZ3ppcC8xLjMuMjYuMWEg
+UEhQLzQuMy45LTEgbW9kX3NzbC8yLjguMjAgT3BlblNTTC8wLjkuN2QgbW9kX3BlcmwvMS4yOQ0K
+VmFyeTogQWNjZXB0LUVuY29kaW5nDQpDb250ZW50LVR5cGU6IHRleHQvaHRtbDsgY2hhcnNldD1J
+U08tODg1OS0xDQpUcmFuc2Zlci1FbmNvZGluZzogZ3ppcA0KQ29udGVudC1MZW5ndGg6IDQ0DQoN
+Ch+LCAh5nqtBAANsYWxhbGEAy8nMS1Uw5FLIAdFGXAoQhjEXAAoCcWAYAAAA
+</data>
+
+<datacheck>
+HTTP/1.1 200 OK\r
+Date: Mon, 29 Nov 2004 21:56:53 GMT\r
+Server: Apache/1.3.31 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.9-1 mod_ssl/2.8.20 OpenSSL/0.9.7d mod_perl/1.29\r
+Vary: Accept-Encoding\r
+Content-Type: text/html; charset=ISO-8859-1\r
+Transfer-Encoding: gzip\r
+Content-Length: 44\r
+\r
+line 1
+ line 2
+  line 3
+</datacheck>
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+libz
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP GET transfer-encoding with custom Connection:
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1125 --tr-encoding -H "Connection: close"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1125 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Connection: close, TE\r
+TE: gzip\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1126 b/tests/data/test1126
new file mode 100644 (file)
index 0000000..52f4db4
--- /dev/null
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2003 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with newer document
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1126 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1126 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1127 b/tests/data/test1127
new file mode 100644 (file)
index 0000000..3cc42c2
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with older document
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1127 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1127 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1128 b/tests/data/test1128
new file mode 100644 (file)
index 0000000..a20487b
--- /dev/null
@@ -0,0 +1,85 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+If-Modified-Since
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:01 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 200 If-Modified-Since with old+new documents
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1128 http://%HOSTIP:%HTTPPORT/11280001 -z "dec 12 12:00:00 1999 GMT"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1128 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT\r
+\r
+GET /11280001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+If-Modified-Since: Sun, 12 Dec 1999 12:00:00 GMT\r
+\r
+</protocol>
+
+<stdout>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 1980 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:01 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2002 12:10:00 GMT
+Content-Length: 11
+Content-Type: text/html
+
+0123456789
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1129 b/tests/data/test1129
new file mode 100644 (file)
index 0000000..f47141c
--- /dev/null
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once 
+<servercmd>
+skip: 1025
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 1025 x 'x'
+<file name="log/file1129">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP POST expect 100-continue with a 404
+ </name>
+ <command option="no-output">
+-d @log/file1129 http://%HOSTIP:%HTTPPORT/1129 http://%HOSTIP:%HTTPPORT/11290001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1129 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 1025\r
+Content-Type: application/x-www-form-urlencoded\r
+Expect: 100-continue\r
+\r
+POST /11290001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 1025\r
+Content-Type: application/x-www-form-urlencoded\r
+Expect: 100-continue\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1130 b/tests/data/test1130
new file mode 100644 (file)
index 0000000..eb1e59f
--- /dev/null
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once 
+<servercmd>
+skip: 100
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 100 x 'x'
+<file name="log/file1130">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP POST forced expect 100-continue with a 404
+ </name>
+ <command option="no-output">
+-d @log/file1130 http://%HOSTIP:%HTTPPORT/1130 http://%HOSTIP:%HTTPPORT/11300001 -H "Expect: 100-continue"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 404 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 404 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Content-Type: text/html
+
+-foo-
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1130 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Expect: 100-continue\r
+Content-Length: 100\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+POST /11300001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Expect: 100-continue\r
+Content-Length: 100\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1131 b/tests/data/test1131
new file mode 100644 (file)
index 0000000..96843af
--- /dev/null
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+Expect: 100-continue
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 400 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE1
+</data>
+
+<data1>
+HTTP/1.1 400 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE2
+</data1>
+
+# we use skip to make the test server never read the full payload off
+# the socket and instead return the response at once 
+<servercmd>
+skip: 100
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+# 100 x 'x'
+<file name="log/file1131">
+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+</file>
+<server>
+http
+</server>
+ <name>
+HTTP PUT expect 100-continue with a 400
+ </name>
+ <command option="no-output">
+-T log/file1131 http://%HOSTIP:%HTTPPORT/1131 -T log/file1131 http://%HOSTIP:%HTTPPORT/11310001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+HTTP/1.1 400 NOOOOOOOOO
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE1
+HTTP/1.1 400 NEITHER
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 9
+Content-Type: text/html
+
+FAILURE2
+</stdout>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /1131 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 100\r
+Expect: 100-continue\r
+\r
+PUT /11310001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 100\r
+Expect: 100-continue\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1132 b/tests/data/test1132
new file mode 100644 (file)
index 0000000..366ffc7
--- /dev/null
@@ -0,0 +1,24 @@
+<testcase>
+<info>
+<keywords>
+memory-includes
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+ <name>
+Verify memory #include files in libcurl's C source files
+ </name>
+
+<command type="perl">
+%SRCDIR/mem-include-scan.pl %SRCDIR/../lib
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1133 b/tests/data/test1133
new file mode 100644 (file)
index 0000000..7337931
--- /dev/null
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 10\r
+\r
+blablabla
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP RFC1867-type formposting with filename contains ',', ';', '"'
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1133 -F "file=@\"log/test1133,a\\\"nd;.txt\";type=mo/foo;filename=\"faker,and;.txt\"" -F 'file2=@"log/test1133,a\"nd;.txt"' -F 'file3=@"log/test1133,a\"nd;.txt";type=m/f,"log/test1133,a\"nd;.txt"'
+</command>
+# We create this file before the command is invoked!
+<file name=log/test1133,a"nd;.txt>
+foo bar
+This is a bar foo
+bar
+foo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^(User-Agent:|Content-Type: multipart/form-data;|Content-Type: multipart/mixed, boundary=|-------).*
+</strip>
+<protocol>
+POST /we/want/1133 HTTP/1.1\r
+User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 967\r
+Expect: 100-continue\r
+Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32\r
+\r
+------------------------------24e78000bd32\r
+Content-Disposition: form-data; name="file"; filename="faker,and;.txt"\r
+Content-Type: mo/foo\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
+------------------------------24e78000bd32\r
+Content-Disposition: form-data; name="file2"; filename="test1133,a\"nd;.txt"\r
+Content-Type: text/plain\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
+------------------------------24e78000bd32\r
+Content-Disposition: form-data; name="file3"\r
+Content-Type: multipart/mixed, boundary=----------------------------7f0e85a48b0b\r
+\r
+Content-Disposition: attachment; filename="test1133,a\"nd;.txt"\r
+Content-Type: m/f\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
+Content-Disposition: attachment; filename="test1133,a\"nd;.txt"\r
+Content-Type: text/plain\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
+------------------------------24e78000bd32--\r
+</protocol>
+</verify>
+</testcase>
index bf04492..9a36f97 100644 (file)
@@ -4,11 +4,13 @@
 FTP
 PORT
 FAILURE
+EPRT refused
 </keywords>
 </info>
 # Server-side
 <reply>
 <servercmd>
+REPLY EPRT 500 we don't like EPRT now
 REPLY PORT 314 bluah you f00l!
 </servercmd>
 </reply>
diff --git a/tests/data/test1204 b/tests/data/test1204
new file mode 100644 (file)
index 0000000..02502fb
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+--anyauth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 Authorization Required swsbounce\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun  fun"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 26\r
+\r
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets the second request
+<data1>
+HTTP/1.1 200 OK\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+\r
+This IS the real page!
+</data1>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsbounce\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun  fun"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 26\r
+\r
+HTTP/1.1 200 OK\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+\r
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with WWW-Authenticate and multiple auths in a single line
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1204 -u testuser:testpass --anyauth
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1204 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /1204 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1205 b/tests/data/test1205
new file mode 100644 (file)
index 0000000..6d7bb7b
--- /dev/null
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1205">
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAendofthem
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with 18K HTTP header
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1205
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1205 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1206 b/tests/data/test1206
new file mode 100644 (file)
index 0000000..3f853d1
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN425
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN425
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 425 on download
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1206 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 1206\r
+RETR 1206\r
+QUIT\r
+</protocol>
+<errorcode>
+10
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1207 b/tests/data/test1207
new file mode 100644 (file)
index 0000000..283e46d
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN421
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN421
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 421 on download
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1207 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 1207\r
+RETR 1207\r
+QUIT\r
+</protocol>
+<errorcode>
+10
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1208 b/tests/data/test1208
new file mode 100644 (file)
index 0000000..504f6c7
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN150
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN150
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT download, no data conn and no transient negative reply
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1208 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+# This test doesn't send a QUIT because the main state machine in multi.c
+# triggers the timeout and sets the CURLE_OPERATION_TIMEDOUT error (28) for
+# which the FTP disconect code generically has to assume could mean the
+# control the connection and thus it cannot send any command.
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 1208\r
+RETR 1208\r
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1209 b/tests/data/test1209
new file mode 100644 (file)
index 0000000..7086829
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT download, no data conn and no positive preliminary reply
+ </name>
+ <command>
+--max-time %FTPTIME2 ftp://%HOSTIP:%FTPPORT/1209 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+# The protocol part does not include QUIT simply because the error is
+# CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout error without
+# specificly saying for which connection it concerns, and for timeouts libcurl
+# marks the control channel as "invalid". As this test case times out for the
+# data connection it could still use the control channel.
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 1209\r
+RETR 1209\r
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1210 b/tests/data/test1210
new file mode 100644 (file)
index 0000000..df93198
--- /dev/null
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J without Content-Disposition
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1210 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1210 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file name="log/1210">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1211 b/tests/data/test1211
new file mode 100644 (file)
index 0000000..5418a85
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+NODATACONN425
+</keywords>
+</info>
+# Server-side
+<reply>
+<data nocheck="yes">
+some bytes
+</data>
+<servercmd>
+NODATACONN425
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT and 425 on download
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1211 -P -
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 1211\r
+RETR 1211\r
+</protocol>
+<errorcode>
+28
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1212 b/tests/data/test1212
new file mode 100644 (file)
index 0000000..9d92a8d
--- /dev/null
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+Proxy
+Socks Proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+noproxy setting together with socks proxy
+ </name>
+
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/ulion/1212 --socks5 non-existing-host.haxx.se:1080 --noproxy %HOSTIP --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /ulion/1212 HTTP/1.1\r
+Authorization: Basic dXNlcjpzZWNyZXQ=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1213 b/tests/data/test1213
new file mode 100644 (file)
index 0000000..729a703
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+Content-Length: 22\r
+\r
+the content goes here
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with proxy and host-only URL
+ </name>
+# the thing here is that this sloppy form is accepted and we convert it
+# for normal server use, and we need to make sure it gets converted to
+# RFC style even for proxies
+ <command>
+-x %HOSTIP:%HTTPPORT we.want.that.site.com.1213
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET HTTP://we.want.that.site.com.1213/ HTTP/1.1\r
+Host: we.want.that.site.com.1213\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1214 b/tests/data/test1214
new file mode 100644 (file)
index 0000000..3eeb3e3
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+Content-Length: 22\r
+\r
+the content goes here
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with proxy and URL with ? and no slash separator
+ </name>
+# the thing here is that this sloppy form is accepted and we convert it
+# for normal server use, and we need to make sure it gets converted to
+# RFC style even for proxies
+ <command>
+-x %HOSTIP:%HTTPPORT http://we.want.that.site.com.1214?moo=foo
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://we.want.that.site.com.1214/?moo=foo HTTP/1.1\r
+Host: we.want.that.site.com.1214\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1215 b/tests/data/test1215
new file mode 100644 (file)
index 0000000..ea62eeb
--- /dev/null
@@ -0,0 +1,104 @@
+<testcase>
+<info>
+# This test is a copy of test 67, modified to use a HTTP proxy.
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+HTTP proxy
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- no <data> in this test since we have NTLM from the start
+
+This is supposed to be returned when the server gets a first
+Authorization: NTLM line passed-in from the client -->
+
+<data1001>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+This is not the real page either!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1002>
+
+<datacheck>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP with server NTLM authorization using a proxy
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/1215 -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+User-Agent: curl/7.30.0-DEV\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=\r
+User-Agent: curl/7.30.0-DEV\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1216 b/tests/data/test1216
new file mode 100644 (file)
index 0000000..5beda79
--- /dev/null
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Connection: close
+Content-Length: 21\r
+
+This server says moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookie domains tailmatching the host name
+ </name>
+ <command>
+http://example.fake/c/1216 http://bexample.fake/c/1216 -b log/injar1216 -x %HOSTIP:%HTTPPORT
+</command>
+<file name="log/injar1216">
+example.fake   FALSE   /a      FALSE   2139150993      mooo    indeed
+example.fake   FALSE   /b      FALSE   0               moo1    indeed
+example.fake   FALSE   /c      FALSE   2139150993      moo2    indeed
+example.fake   TRUE    /c      FALSE   2139150993      moo3    indeed
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/c/1216 HTTP/1.1\r
+Host: example.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+Cookie: moo2=indeed; moo3=indeed\r
+\r
+GET http://bexample.fake/c/1216 HTTP/1.1\r
+Host: bexample.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1217 b/tests/data/test1217
new file mode 100644 (file)
index 0000000..1efa4d6
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+NLST
+--data-binary
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+contents
+</data>
+<servercmd>
+REPLY PWD 257 there is rubbish all over "/this/is/the/path"
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with rubbish before name in 257-response
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/get/file/1217 ftp://%HOSTIP:%FTPPORT/get/file/again/1217 --ftp-method singlecwd
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip all valid kinds of PORT and EPRT that curl can send
+<strip>
+^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
+^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
+</strip>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD get/file\r
+EPSV\r
+TYPE I\r
+SIZE 1217\r
+RETR 1217\r
+CWD /this/is/the/path\r
+CWD get/file/again\r
+EPSV\r
+SIZE 1217\r
+RETR 1217\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1218 b/tests/data/test1218
new file mode 100644 (file)
index 0000000..7d86547
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# This test is very similar to 1216, only that it sets the cookies from the
+# first site instead of reading from a file
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Set-Cookie: domain=.example.fake; bug=fixed;
+Content-Length: 21\r
+
+This server says moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookies and domains with same prefix
+ </name>
+ <command>
+http://example.fake/c/1218 http://example.fake/c/1218 http://bexample.fake/c/1218 -b nonexisting -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/c/1218 HTTP/1.1\r
+Host: example.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://example.fake/c/1218 HTTP/1.1\r
+Host: example.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+Cookie: bug=fixed\r
+\r
+GET http://bexample.fake/c/1218 HTTP/1.1\r
+Host: bexample.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1219 b/tests/data/test1219
new file mode 100644 (file)
index 0000000..e42a211
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+<servercmd>
+REPLY welcome 230 welcome without password
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with no user+password required (230 response)
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1219
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 1219\r
+RETR 1219\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1220 b/tests/data/test1220
new file mode 100644 (file)
index 0000000..d365249
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+ <name>
+file:// URLs with query string
+ </name>
+ <command>
+file://localhost/%PWD/log/test1220.txt?a_query=foobar#afragment
+</command>
+<file name="log/test1220.txt">
+contents in a single file
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+contents in a single file
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1221 b/tests/data/test1221
new file mode 100644 (file)
index 0000000..a0e3d74
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+<name>
+10 chars object name generation testing
+</name>
+<command option="no-output,no-include" type="shell">
+%SRCDIR/../lib/objnames-test10.sh %SRCDIR
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stderr1221" mode="text">
+</file1>
+<file2 name="log/stdout1221" mode="text">
+Testing curl_10char_object_name...
+
+result: 16AFKPQRST expected: 16AFKPQRST input: 123__678__ABC__FGH__KLM__PQRSTUV
+result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
+result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
+result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
+result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
+result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+result: 159CGHIJKL expected: 159CGHIJKL input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
+result: 159CDEFGHI expected: 159CDEFGHI input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
+result: 1590ABCDEF expected: 1590ABCDEF input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
+result: 1567890ABC expected: 1567890ABC input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567890 expected: 1234567890 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+
+
+
+10-characters-or-less generated object names are unique.
+</file2>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1222 b/tests/data/test1222
new file mode 100644 (file)
index 0000000..0df8bde
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+
+<name>
+8 chars object name generation testing
+</name>
+<command option="no-output,no-include" type="shell">
+%SRCDIR/../lib/objnames-test08.sh %SRCDIR
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stderr1222" mode="text">
+</file1>
+<file2 name="log/stdout1222" mode="text">
+Testing curl_8char_object_name...
+
+result: 16AFKPQR expected: 16AFKPQR input: 123__678__ABC__FGH__KLM__PQRSTUV
+result: 16AFKPQ expected: 16AFKPQ input: 123__678__ABC__FGH__KLM__PQ.S.UV
+result: 16ABC expected: 16ABC input: 123__678__ABC..FGH..KLM..PQRSTUV
+result: 16 expected: 16 input: 123__678_.ABC._FGH__KLM__PQRSTUV
+result: 123 expected: 123 input: 123.567.90ABCDEFGHIJKLMNOPQRSTUV
+result: 1234567 expected: 1234567 input: 1234567.90A.CDEFGHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890.BCD.FGHIJKLMNOPQRSTUV
+result: 1470AB expected: 1470AB input: 12=45-78+0AB.DE.GHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+result: 159CGHIJ expected: 159CGHIJ input: 123_567_90A_CDE_GHIJKLMNOPQRSTUV
+result: 159CDEFG expected: 159CDEFG input: 123_567_90A_CDEFGHIJKLMNOPQRSTUV
+result: 1590ABCD expected: 1590ABCD input: 123_567_90ABCDEFGHIJKLMNOPQRSTUV
+result: 1567890A expected: 1567890A input: 123_567890ABCDEFGHIJKLMNOPQRSTUV
+result: 12345678 expected: 12345678 input: 1234567890ABCDEFGHIJKLMNOPQRSTUV
+
+
+
+8-characters-or-less generated object names are unique.
+</file2>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1223 b/tests/data/test1223
new file mode 100644 (file)
index 0000000..2885bc5
--- /dev/null
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# disable data check since it gets sent to stdout and is verified there
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 4
+Connection: close
+Content-Type: text/html
+
+hej
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET -w remote_ip and -w remote_port
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1223 -w 'IP %{remote_ip} and PORT %{remote_port}\n'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1223 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<stdout>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 4
+Connection: close
+Content-Type: text/html
+
+hej
+IP %HOSTIP and PORT %HTTPPORT
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1224 b/tests/data/test1224
new file mode 100644 (file)
index 0000000..315936b
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1224
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD /\r
+EPSV\r
+TYPE I\r
+SIZE 1224\r
+RETR 1224\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1225 b/tests/data/test1225
new file mode 100644 (file)
index 0000000..2b2519c
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch two files using absolute paths
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//foo/1225 ftp://%HOSTIP:%FTPPORT//foo/bar/1225
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD /\r
+CWD foo\r
+EPSV\r
+TYPE I\r
+SIZE 1225\r
+RETR 1225\r
+CWD /\r
+CWD /\r
+CWD foo\r
+CWD bar\r
+EPSV\r
+SIZE 1225\r
+RETR 1225\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1226 b/tests/data/test1226
new file mode 100644 (file)
index 0000000..6381b12
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory with singlecwd
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1226 --ftp-method singlecwd
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD /\r
+EPSV\r
+TYPE I\r
+SIZE 1226\r
+RETR 1226\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1227 b/tests/data/test1227
new file mode 100644 (file)
index 0000000..46b28d5
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP fetch a file from the root directory with nocwd
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT//1227 --ftp-method nocwd
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE /1227\r
+RETR /1227\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1228 b/tests/data/test1228
new file mode 100644 (file)
index 0000000..f0313ce
--- /dev/null
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies 
+cookie path
+</keywords>
+</info>
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Set-Cookie: path1=root; domain=.example.fake; path=/;
+Set-Cookie: path2=depth1; domain=.example.fake; path=/hoge;
+Content-Length: 34
+
+This server says cookie path test
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP cookie path match
+ </name>
+ <command>
+http://example.fake/hoge/1228 http://example.fake/hogege/ -b nonexisting -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://example.fake/hoge/1228 HTTP/1.1\r
+Host: example.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://example.fake/hogege/ HTTP/1.1\r
+Host: example.fake\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+Cookie: path1=root\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1229 b/tests/data/test1229
new file mode 100644 (file)
index 0000000..dcb55e8
--- /dev/null
@@ -0,0 +1,82 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 26\r
+\r
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets a
+# Authorization: Digest line passed-in from the client
+<data1000>
+HTTP/1.1 200 OK swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+\r
+This IS the real page!
+</data1000>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 26\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+\r
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+crypto
+</features>
+ <name>
+HTTP with Digest authorization with user name needing escape
+ </name>
+ <command>
+http://%5cuser%22:password@%HOSTIP:%HTTPPORT/1229 --digest
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1229 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /1229 HTTP/1.1\r
+Authorization: Digest username="\\user\"", realm="testrealm", nonce="1053604145", uri="/1229", response="f2694d426040712584c156d3de72b8d6"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1230 b/tests/data/test1230
new file mode 100644 (file)
index 0000000..a071850
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP CONNECT
+IPv6
+</keywords>
+
+</info>
+#
+# Server-side
+<reply>
+
+<data>
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Content-Length: 9\r
+
+mooooooo
+</data>
+
+<connect>
+HTTP/1.1 200 welcome dear\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Content-Length: 0\r
+\r
+</connect>
+
+<datacheck>
+HTTP/1.1 200 welcome dear\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Content-Length: 0\r
+\r
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Content-Length: 9\r
+
+mooooooo
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http-proxy
+http-ipv6
+http
+</server>
+ <name>
+HTTP CONNECT to IPv6 numerical address
+ </name>
+# 0x4ce == 1230, the test number
+ <command>
+-g http://[1234:1234:1234::4ce]:%HTTPPORT/wanted/page/1230 -p -x %HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+CONNECT [1234:1234:1234::4ce]:%HTTPPORT HTTP/1.1\r
+Host: [1234:1234:1234::4ce]:%HTTPPORT\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET /wanted/page/1230 HTTP/1.1\r
+Host: [1234:1234:1234::4ce]:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1231 b/tests/data/test1231
new file mode 100644 (file)
index 0000000..16533a8
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+dotdot removal
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 7
+Connection: close
+
+-cool-
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP URL with dotdot removal from path
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/../../hej/but/who/../1231?stupid=me/../1231#soo/../1231 http://%HOSTIP:%HTTPPORT/../../hej/but/who/../12310001#/../12310001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /hej/but/1231?stupid=me/../1231 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /hej/but/12310001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1232 b/tests/data/test1232
new file mode 100644 (file)
index 0000000..ead4336
--- /dev/null
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+# This test is a copy of test 1231, modified to use a HTTP proxy.
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+dotdot removal
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+HTTP/1.1 200 OK
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+
+<data1>
+HTTP/1.1 200 OK
+Content-Length: 7
+Connection: close
+
+-cool-
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP URL with dotdot removal from path using an HTTP proxy
+ </name>
+ <command>
+--proxy http://%HOSTIP:%HTTPPORT http://test.remote.haxx.se.1232:8990/../../hej/but/who/../1232?stupid=me/../1232#soo/../1232 http://test.remote.haxx.se.1232:8990/../../hej/but/who/../12320001#/../12320001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://test.remote.haxx.se.1232:8990/hej/but/1232?stupid=me/../1232 HTTP/1.1\r
+Host: test.remote.haxx.se.1232:8990\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://test.remote.haxx.se.1232:8990/hej/but/12320001 HTTP/1.1\r
+Host: test.remote.haxx.se.1232:8990\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1233 b/tests/data/test1233
new file mode 100644 (file)
index 0000000..caf0527
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+# Assuming there's nothing listening on port 1
+REPLY EPSV 229 Entering Passiv Mode (|||1|)
+</servercmd>
+<data>
+here are some bytes
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP failing to connect to EPSV port, switching to PASV
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1233
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+PASV\r
+TYPE I\r
+SIZE 1233\r
+RETR 1233\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
index 8f997f0..18f7f81 100644 (file)
@@ -8,10 +8,10 @@ HTTP custom request
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 Read you
+HTTP/1.1 200 Read you\r
 Content-Length: 29\r
-Deleted: suppose we got a header like this! ;-)
-
+Deleted: suppose we got a header like this! ;-)\r
+\r
 blabla custom request result
 </data>
 </reply>
index 43ab24c..dcc46fc 100644 (file)
@@ -30,9 +30,6 @@ dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
 #
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 ftp
 </server>
@@ -40,9 +37,9 @@ ftp
 FTP (optional .netrc; no user/pass) dir list PASV
  </name>
  <command>
---netrc-optional ftp://%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc130 ftp://%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc" >
+<file name="log/netrc130" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1300 b/tests/data/test1300
new file mode 100644 (file)
index 0000000..1008885
--- /dev/null
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+llist
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+llist unit tests
+ </name>
+<tool>
+unit1300
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1301 b/tests/data/test1301
new file mode 100644 (file)
index 0000000..4b6fac8
--- /dev/null
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_strequal
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+curl_strequal unit tests
+ </name>
+<tool>
+unit1301
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1302 b/tests/data/test1302
new file mode 100644 (file)
index 0000000..27ea862
--- /dev/null
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+base64
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+base64 encode/decode unit tests
+ </name>
+<tool>
+unit1302
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1303 b/tests/data/test1303
new file mode 100644 (file)
index 0000000..925b47e
--- /dev/null
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+Curl_timeleft
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Curl_timeleft unit tests
+ </name>
+<tool>
+unit1303
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1304 b/tests/data/test1304
new file mode 100644 (file)
index 0000000..d518de9
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+unittest
+netrc
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+netrc parsing unit tests
+ </name>
+<tool>
+unit1304
+</tool>
+<file name="log/netrc1304">
+machine example.com login admin password passwd
+machine curl.example.com login none password none
+</file>
+</client>
+
+</testcase>
diff --git a/tests/data/test1305 b/tests/data/test1305
new file mode 100644 (file)
index 0000000..91149b3
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+<!-- This replaces test 558 -->
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal hash create/destroy testing
+ </name>
+<tool>
+unit1305
+</tool>
+<command>
+1305
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1306 b/tests/data/test1306
new file mode 100644 (file)
index 0000000..b490efb
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+<!-- This replaces test 559 -->
+<info>
+<keywords>
+unittest
+hash
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal hash create/add/destroy testing
+ </name>
+<tool>
+unit1305
+</tool>
+<command>
+1306
+</command>
+</client>
+
+</testcase>
diff --git a/tests/data/test1307 b/tests/data/test1307
new file mode 100644 (file)
index 0000000..82ed3c0
--- /dev/null
@@ -0,0 +1,27 @@
+<testcase>
+<!-- This replaces test 577 -->
+<info>
+<keywords>
+unittest
+wildcardmatch
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+internal Curl_fnmatch() testing
+ </name>
+<tool>
+unit1307
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1308 b/tests/data/test1308
new file mode 100644 (file)
index 0000000..88e9771
--- /dev/null
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_formadd
+curl_formget
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+http
+</features>
+ <name>
+formpost unit tests
+ </name>
+<tool>
+unit1308
+</tool>
+<file name="log/test-1308">
+Piece of the file that is to uploaded as a formpost
+</file>
+</client>
+
+</testcase>
diff --git a/tests/data/test1309 b/tests/data/test1309
new file mode 100644 (file)
index 0000000..0a44a91
--- /dev/null
@@ -0,0 +1,1457 @@
+<testcase>
+<info>
+<keywords>
+unittest
+splay
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+splay unit tests
+ </name>
+<tool>
+unit1309
+</tool>
+</client>
+
+<verify>
+<stdout mode="text">
+Result:
+      0.1013[3]
+    0.1003[2]
+      0.954[3]
+  0.944[1]
+0.934[0]
+  0.895[1]
+        0.885[4]
+      0.875[3]
+        0.836[4]
+              0.826[7]
+            0.816[6]
+          0.777[5]
+                  0.767[9]
+                0.757[8]
+              0.718[7]
+                    0.708[10]
+                  0.698[9]
+                0.659[8]
+                  0.649[9]
+                    0.639[10]
+                        0.600[12]
+                          0.590[13]
+                      0.580[11]
+            0.541[6]
+                  0.531[9]
+                    0.521[10]
+                0.472[8]
+                  0.462[9]
+              0.413[7]
+    0.403[2]
+      0.393[3]
+          0.354[5]
+        0.344[4]
+          0.334[5]
+              0.295[7]
+            0.285[6]
+              0.275[7]
+                  0.236[9]
+                0.226[8]
+                  0.216[9]
+                      0.177[11]
+                        0.167[12]
+                    0.157[10]
+                      0.118[11]
+                          0.108[13]
+                        0.98[12]
+                          0.59[13]
+                              0.49[15]
+                            0.39[14]
+                              0.0[15]
+Tree look:
+      0.1013[3]
+    0.1003[2]
+      0.954[3]
+  0.944[1]
+0.934[0]
+  0.895[1]
+        0.885[4]
+      0.875[3]
+        0.836[4]
+              0.826[7]
+            0.816[6]
+          0.777[5]
+                  0.767[9]
+                0.757[8]
+              0.718[7]
+                    0.708[10]
+                  0.698[9]
+                0.659[8]
+                  0.649[9]
+                    0.639[10]
+                        0.600[12]
+                          0.590[13]
+                      0.580[11]
+            0.541[6]
+                  0.531[9]
+                    0.521[10]
+                0.472[8]
+                  0.462[9]
+              0.413[7]
+    0.403[2]
+      0.393[3]
+          0.354[5]
+        0.344[4]
+          0.334[5]
+              0.295[7]
+            0.285[6]
+              0.275[7]
+                  0.236[9]
+                0.226[8]
+                  0.216[9]
+                      0.177[11]
+                        0.167[12]
+                    0.157[10]
+                      0.118[11]
+                          0.108[13]
+                        0.98[12]
+                          0.59[13]
+                              0.49[15]
+                            0.39[14]
+                              0.0[15]
+remove pointer 7, payload 718
+Tree look:
+          0.1013[5]
+        0.1003[4]
+          0.954[5]
+      0.944[3]
+    0.934[2]
+  0.895[1]
+        0.885[4]
+      0.875[3]
+    0.836[2]
+          0.826[5]
+        0.816[4]
+      0.777[3]
+          0.767[5]
+        0.757[4]
+0.708[0]
+    0.698[2]
+      0.659[3]
+        0.649[4]
+          0.639[5]
+              0.600[7]
+                0.590[8]
+            0.580[6]
+  0.541[1]
+          0.531[5]
+            0.521[6]
+        0.472[4]
+          0.462[5]
+      0.413[3]
+    0.403[2]
+      0.393[3]
+          0.354[5]
+        0.344[4]
+          0.334[5]
+              0.295[7]
+            0.285[6]
+              0.275[7]
+                  0.236[9]
+                0.226[8]
+                  0.216[9]
+                      0.177[11]
+                        0.167[12]
+                    0.157[10]
+                      0.118[11]
+                          0.108[13]
+                        0.98[12]
+                          0.59[13]
+                              0.49[15]
+                            0.39[14]
+                              0.0[15]
+remove pointer 8, payload 236
+Tree look:
+              0.1013[7]
+            0.1003[6]
+              0.954[7]
+          0.944[5]
+        0.934[4]
+      0.895[3]
+            0.885[6]
+          0.875[5]
+        0.836[4]
+              0.826[7]
+            0.816[6]
+          0.777[5]
+              0.767[7]
+            0.757[6]
+    0.708[2]
+      0.698[3]
+        0.659[4]
+          0.649[5]
+            0.639[6]
+                0.600[8]
+                  0.590[9]
+              0.580[7]
+  0.541[1]
+            0.531[6]
+              0.521[7]
+          0.472[5]
+            0.462[6]
+        0.413[4]
+      0.403[3]
+    0.393[2]
+          0.354[5]
+        0.344[4]
+      0.334[3]
+            0.295[6]
+          0.285[5]
+        0.275[4]
+0.226[0]
+  0.216[1]
+      0.177[3]
+        0.167[4]
+    0.157[2]
+      0.118[3]
+          0.108[5]
+        0.98[4]
+          0.59[5]
+              0.49[7]
+            0.39[6]
+              0.0[7]
+remove pointer 9, payload 777
+Tree look:
+            0.1013[6]
+          0.1003[5]
+            0.954[6]
+        0.944[4]
+      0.934[3]
+    0.895[2]
+        0.885[4]
+      0.875[3]
+  0.836[1]
+      0.826[3]
+    0.816[2]
+0.767[0]
+    0.757[2]
+  0.708[1]
+      0.698[3]
+        0.659[4]
+          0.649[5]
+            0.639[6]
+                0.600[8]
+                  0.590[9]
+              0.580[7]
+    0.541[2]
+                0.531[8]
+                  0.521[9]
+              0.472[7]
+                0.462[8]
+            0.413[6]
+          0.403[5]
+        0.393[4]
+              0.354[7]
+            0.344[6]
+          0.334[5]
+                0.295[8]
+              0.285[7]
+            0.275[6]
+      0.226[3]
+        0.216[4]
+            0.177[6]
+              0.167[7]
+          0.157[5]
+            0.118[6]
+                0.108[8]
+              0.98[7]
+                0.59[8]
+                    0.49[10]
+                  0.39[9]
+                    0.0[10]
+remove pointer 10, payload 295
+Tree look:
+                0.1013[8]
+              0.1003[7]
+                0.954[8]
+            0.944[6]
+          0.934[5]
+        0.895[4]
+            0.885[6]
+          0.875[5]
+      0.836[3]
+          0.826[5]
+        0.816[4]
+    0.767[2]
+      0.757[3]
+  0.708[1]
+      0.698[3]
+        0.659[4]
+          0.649[5]
+            0.639[6]
+                0.600[8]
+                  0.590[9]
+              0.580[7]
+    0.541[2]
+                0.531[8]
+                  0.521[9]
+              0.472[7]
+                0.462[8]
+            0.413[6]
+          0.403[5]
+        0.393[4]
+            0.354[6]
+          0.344[5]
+      0.334[3]
+0.285[0]
+    0.275[2]
+  0.226[1]
+    0.216[2]
+        0.177[4]
+          0.167[5]
+      0.157[3]
+        0.118[4]
+            0.108[6]
+          0.98[5]
+            0.59[6]
+                0.49[8]
+              0.39[7]
+                0.0[8]
+remove pointer 11, payload 836
+Tree look:
+          0.1013[5]
+        0.1003[4]
+          0.954[5]
+      0.944[3]
+    0.934[2]
+  0.895[1]
+      0.885[3]
+    0.875[2]
+0.826[0]
+    0.816[2]
+  0.767[1]
+      0.757[3]
+    0.708[2]
+          0.698[5]
+            0.659[6]
+              0.649[7]
+                0.639[8]
+                    0.600[10]
+                      0.590[11]
+                  0.580[9]
+        0.541[4]
+                    0.531[10]
+                      0.521[11]
+                  0.472[9]
+                    0.462[10]
+                0.413[8]
+              0.403[7]
+            0.393[6]
+                0.354[8]
+              0.344[7]
+          0.334[5]
+      0.285[3]
+          0.275[5]
+        0.226[4]
+          0.216[5]
+              0.177[7]
+                0.167[8]
+            0.157[6]
+              0.118[7]
+                  0.108[9]
+                0.98[8]
+                  0.59[9]
+                      0.49[11]
+                    0.39[10]
+                      0.0[11]
+remove pointer 12, payload 354
+Tree look:
+              0.1013[7]
+            0.1003[6]
+              0.954[7]
+          0.944[5]
+        0.934[4]
+      0.895[3]
+          0.885[5]
+        0.875[4]
+    0.826[2]
+      0.816[3]
+  0.767[1]
+      0.757[3]
+    0.708[2]
+        0.698[4]
+          0.659[5]
+            0.649[6]
+              0.639[7]
+                  0.600[9]
+                    0.590[10]
+                0.580[8]
+      0.541[3]
+                0.531[8]
+                  0.521[9]
+              0.472[7]
+                0.462[8]
+            0.413[6]
+          0.403[5]
+        0.393[4]
+0.344[0]
+  0.334[1]
+    0.285[2]
+        0.275[4]
+      0.226[3]
+        0.216[4]
+            0.177[6]
+              0.167[7]
+          0.157[5]
+            0.118[6]
+                0.108[8]
+              0.98[7]
+                0.59[8]
+                    0.49[10]
+                  0.39[9]
+                    0.0[10]
+remove pointer 13, payload 895
+Tree look:
+        0.1013[4]
+      0.1003[3]
+        0.954[4]
+    0.944[2]
+  0.934[1]
+0.885[0]
+    0.875[2]
+  0.826[1]
+      0.816[3]
+    0.767[2]
+          0.757[5]
+        0.708[4]
+            0.698[6]
+              0.659[7]
+                0.649[8]
+                  0.639[9]
+                      0.600[11]
+                        0.590[12]
+                    0.580[10]
+          0.541[5]
+                    0.531[10]
+                      0.521[11]
+                  0.472[9]
+                    0.462[10]
+                0.413[8]
+              0.403[7]
+            0.393[6]
+      0.344[3]
+        0.334[4]
+          0.285[5]
+              0.275[7]
+            0.226[6]
+              0.216[7]
+                  0.177[9]
+                    0.167[10]
+                0.157[8]
+                  0.118[9]
+                      0.108[11]
+                    0.98[10]
+                      0.59[11]
+                          0.49[13]
+                        0.39[12]
+                          0.0[13]
+remove pointer 14, payload 413
+Tree look:
+            0.1013[6]
+          0.1003[5]
+            0.954[6]
+        0.944[4]
+      0.934[3]
+    0.885[2]
+      0.875[3]
+  0.826[1]
+      0.816[3]
+    0.767[2]
+          0.757[5]
+        0.708[4]
+          0.698[5]
+            0.659[6]
+              0.649[7]
+                0.639[8]
+                    0.600[10]
+                      0.590[11]
+                  0.580[9]
+      0.541[3]
+          0.531[5]
+            0.521[6]
+        0.472[4]
+          0.462[5]
+0.403[0]
+    0.393[2]
+  0.344[1]
+    0.334[2]
+      0.285[3]
+          0.275[5]
+        0.226[4]
+          0.216[5]
+              0.177[7]
+                0.167[8]
+            0.157[6]
+              0.118[7]
+                  0.108[9]
+                0.98[8]
+                  0.59[9]
+                      0.49[11]
+                    0.39[10]
+                      0.0[11]
+remove pointer 15, payload 954
+Tree look:
+    0.1013[2]
+  0.1003[1]
+0.944[0]
+  0.934[1]
+      0.885[3]
+        0.875[4]
+    0.826[2]
+          0.816[5]
+        0.767[4]
+              0.757[7]
+            0.708[6]
+              0.698[7]
+                0.659[8]
+                  0.649[9]
+                    0.639[10]
+                        0.600[12]
+                          0.590[13]
+                      0.580[11]
+          0.541[5]
+              0.531[7]
+                0.521[8]
+            0.472[6]
+              0.462[7]
+      0.403[3]
+          0.393[5]
+        0.344[4]
+          0.334[5]
+            0.285[6]
+                0.275[8]
+              0.226[7]
+                0.216[8]
+                    0.177[10]
+                      0.167[11]
+                  0.157[9]
+                    0.118[10]
+                        0.108[12]
+                      0.98[11]
+                        0.59[12]
+                            0.49[14]
+                          0.39[13]
+                            0.0[14]
+remove pointer 16, payload 472
+Tree look:
+        0.1013[4]
+      0.1003[3]
+    0.944[2]
+  0.934[1]
+      0.885[3]
+        0.875[4]
+    0.826[2]
+          0.816[5]
+        0.767[4]
+            0.757[6]
+          0.708[5]
+            0.698[6]
+              0.659[7]
+                0.649[8]
+                  0.639[9]
+                      0.600[11]
+                        0.590[12]
+                    0.580[10]
+      0.541[3]
+        0.531[4]
+          0.521[5]
+0.462[0]
+  0.403[1]
+      0.393[3]
+    0.344[2]
+      0.334[3]
+        0.285[4]
+            0.275[6]
+          0.226[5]
+            0.216[6]
+                0.177[8]
+                  0.167[9]
+              0.157[7]
+                0.118[8]
+                    0.108[10]
+                  0.98[9]
+                    0.59[10]
+                        0.49[12]
+                      0.39[11]
+                        0.0[12]
+remove pointer 17, payload 1013
+Tree look:
+0.1003[0]
+    0.944[2]
+  0.934[1]
+        0.885[4]
+          0.875[5]
+      0.826[3]
+            0.816[6]
+          0.767[5]
+              0.757[7]
+            0.708[6]
+              0.698[7]
+                0.659[8]
+                  0.649[9]
+                    0.639[10]
+                        0.600[12]
+                          0.590[13]
+                      0.580[11]
+        0.541[4]
+          0.531[5]
+            0.521[6]
+    0.462[2]
+      0.403[3]
+          0.393[5]
+        0.344[4]
+          0.334[5]
+            0.285[6]
+                0.275[8]
+              0.226[7]
+                0.216[8]
+                    0.177[10]
+                      0.167[11]
+                  0.157[9]
+                    0.118[10]
+                        0.108[12]
+                      0.98[11]
+                        0.59[12]
+                            0.49[14]
+                          0.39[13]
+                            0.0[14]
+remove pointer 18, payload 531
+Tree look:
+    0.1003[2]
+      0.944[3]
+  0.934[1]
+        0.885[4]
+          0.875[5]
+      0.826[3]
+          0.816[5]
+        0.767[4]
+            0.757[6]
+          0.708[5]
+            0.698[6]
+              0.659[7]
+                0.649[8]
+                  0.639[9]
+                      0.600[11]
+                        0.590[12]
+                    0.580[10]
+    0.541[2]
+0.521[0]
+  0.462[1]
+    0.403[2]
+        0.393[4]
+      0.344[3]
+        0.334[4]
+          0.285[5]
+              0.275[7]
+            0.226[6]
+              0.216[7]
+                  0.177[9]
+                    0.167[10]
+                0.157[8]
+                  0.118[9]
+                      0.108[11]
+                    0.98[10]
+                      0.59[11]
+                          0.49[13]
+                        0.39[12]
+                          0.0[13]
+remove pointer 19, payload 49
+Tree look:
+        0.1003[4]
+          0.944[5]
+      0.934[3]
+            0.885[6]
+              0.875[7]
+          0.826[5]
+              0.816[7]
+            0.767[6]
+                0.757[8]
+              0.708[7]
+                0.698[8]
+                  0.659[9]
+                    0.649[10]
+                      0.639[11]
+                          0.600[13]
+                            0.590[14]
+                        0.580[12]
+        0.541[4]
+    0.521[2]
+  0.462[1]
+      0.403[3]
+        0.393[4]
+    0.344[2]
+        0.334[4]
+      0.285[3]
+            0.275[6]
+          0.226[5]
+        0.216[4]
+              0.177[7]
+                0.167[8]
+            0.157[6]
+          0.118[5]
+                0.108[8]
+              0.98[7]
+            0.59[6]
+0.39[0]
+  0.0[1]
+remove pointer 20, payload 590
+Tree look:
+    0.1003[2]
+      0.944[3]
+  0.934[1]
+        0.885[4]
+          0.875[5]
+      0.826[3]
+        0.816[4]
+    0.767[2]
+          0.757[5]
+        0.708[4]
+      0.698[3]
+          0.659[5]
+        0.649[4]
+          0.639[5]
+            0.600[6]
+0.580[0]
+    0.541[2]
+  0.521[1]
+    0.462[2]
+          0.403[5]
+            0.393[6]
+        0.344[4]
+            0.334[6]
+          0.285[5]
+                0.275[8]
+              0.226[7]
+            0.216[6]
+                  0.177[9]
+                    0.167[10]
+                0.157[8]
+              0.118[7]
+                    0.108[10]
+                  0.98[9]
+                0.59[8]
+      0.39[3]
+        0.0[4]
+remove pointer 21, payload 108
+Tree look:
+        0.1003[4]
+          0.944[5]
+      0.934[3]
+            0.885[6]
+              0.875[7]
+          0.826[5]
+            0.816[6]
+        0.767[4]
+              0.757[7]
+            0.708[6]
+          0.698[5]
+              0.659[7]
+            0.649[6]
+              0.639[7]
+                0.600[8]
+    0.580[2]
+      0.541[3]
+  0.521[1]
+    0.462[2]
+          0.403[5]
+            0.393[6]
+        0.344[4]
+          0.334[5]
+      0.285[3]
+              0.275[7]
+            0.226[6]
+          0.216[5]
+              0.177[7]
+                0.167[8]
+            0.157[6]
+        0.118[4]
+0.98[0]
+    0.59[2]
+  0.39[1]
+    0.0[2]
+remove pointer 22, payload 649
+Tree look:
+      0.1003[3]
+        0.944[4]
+    0.934[2]
+        0.885[4]
+          0.875[5]
+      0.826[3]
+        0.816[4]
+  0.767[1]
+        0.757[4]
+      0.708[3]
+    0.698[2]
+      0.659[3]
+0.639[0]
+    0.600[2]
+  0.580[1]
+      0.541[3]
+    0.521[2]
+        0.462[4]
+              0.403[7]
+                0.393[8]
+            0.344[6]
+              0.334[7]
+          0.285[5]
+                  0.275[9]
+                0.226[8]
+              0.216[7]
+                  0.177[9]
+                    0.167[10]
+                0.157[8]
+            0.118[6]
+      0.98[3]
+          0.59[5]
+        0.39[4]
+          0.0[5]
+remove pointer 23, payload 167
+Tree look:
+          0.1003[5]
+            0.944[6]
+        0.934[4]
+            0.885[6]
+              0.875[7]
+          0.826[5]
+            0.816[6]
+      0.767[3]
+            0.757[6]
+          0.708[5]
+        0.698[4]
+          0.659[5]
+    0.639[2]
+      0.600[3]
+  0.580[1]
+      0.541[3]
+    0.521[2]
+        0.462[4]
+            0.403[6]
+              0.393[7]
+          0.344[5]
+            0.334[6]
+      0.285[3]
+            0.275[6]
+          0.226[5]
+        0.216[4]
+          0.177[5]
+0.157[0]
+  0.118[1]
+    0.98[2]
+        0.59[4]
+      0.39[3]
+        0.0[4]
+remove pointer 24, payload 708
+Tree look:
+      0.1003[3]
+        0.944[4]
+    0.934[2]
+        0.885[4]
+          0.875[5]
+      0.826[3]
+        0.816[4]
+  0.767[1]
+    0.757[2]
+0.698[0]
+    0.659[2]
+  0.639[1]
+      0.600[3]
+    0.580[2]
+          0.541[5]
+        0.521[4]
+            0.462[6]
+                0.403[8]
+                  0.393[9]
+              0.344[7]
+                0.334[8]
+          0.285[5]
+                0.275[8]
+              0.226[7]
+            0.216[6]
+              0.177[7]
+      0.157[3]
+        0.118[4]
+          0.98[5]
+              0.59[7]
+            0.39[6]
+              0.0[7]
+remove pointer 25, payload 226
+Tree look:
+          0.1003[5]
+            0.944[6]
+        0.934[4]
+            0.885[6]
+              0.875[7]
+          0.826[5]
+            0.816[6]
+      0.767[3]
+        0.757[4]
+    0.698[2]
+      0.659[3]
+  0.639[1]
+      0.600[3]
+    0.580[2]
+          0.541[5]
+        0.521[4]
+          0.462[5]
+              0.403[7]
+                0.393[8]
+            0.344[6]
+              0.334[7]
+      0.285[3]
+        0.275[4]
+0.216[0]
+    0.177[2]
+  0.157[1]
+    0.118[2]
+      0.98[3]
+          0.59[5]
+        0.39[4]
+          0.0[5]
+remove pointer 26, payload 767
+Tree look:
+    0.1003[2]
+      0.944[3]
+  0.934[1]
+      0.885[3]
+        0.875[4]
+    0.826[2]
+      0.816[3]
+0.757[0]
+  0.698[1]
+      0.659[3]
+    0.639[2]
+          0.600[5]
+        0.580[4]
+              0.541[7]
+            0.521[6]
+              0.462[7]
+                  0.403[9]
+                    0.393[10]
+                0.344[8]
+                  0.334[9]
+          0.285[5]
+            0.275[6]
+      0.216[3]
+          0.177[5]
+        0.157[4]
+          0.118[5]
+            0.98[6]
+                0.59[8]
+              0.39[7]
+                0.0[8]
+remove pointer 27, payload 285
+Tree look:
+        0.1003[4]
+          0.944[5]
+      0.934[3]
+          0.885[5]
+            0.875[6]
+        0.826[4]
+          0.816[5]
+    0.757[2]
+  0.698[1]
+      0.659[3]
+    0.639[2]
+        0.600[4]
+      0.580[3]
+          0.541[5]
+        0.521[4]
+          0.462[5]
+              0.403[7]
+                0.393[8]
+            0.344[6]
+              0.334[7]
+0.275[0]
+  0.216[1]
+      0.177[3]
+    0.157[2]
+      0.118[3]
+        0.98[4]
+            0.59[6]
+          0.39[5]
+            0.0[6]
+remove pointer 28, payload 826
+Tree look:
+    0.1003[2]
+      0.944[3]
+  0.934[1]
+    0.885[2]
+      0.875[3]
+0.816[0]
+  0.757[1]
+    0.698[2]
+          0.659[5]
+        0.639[4]
+            0.600[6]
+          0.580[5]
+              0.541[7]
+            0.521[6]
+              0.462[7]
+                  0.403[9]
+                    0.393[10]
+                0.344[8]
+                  0.334[9]
+      0.275[3]
+        0.216[4]
+            0.177[6]
+          0.157[5]
+            0.118[6]
+              0.98[7]
+                  0.59[9]
+                0.39[8]
+                  0.0[9]
+remove pointer 29, payload 344
+Tree look:
+        0.1003[4]
+          0.944[5]
+      0.934[3]
+        0.885[4]
+          0.875[5]
+    0.816[2]
+  0.757[1]
+    0.698[2]
+          0.659[5]
+        0.639[4]
+          0.600[5]
+      0.580[3]
+            0.541[6]
+          0.521[5]
+        0.462[4]
+          0.403[5]
+            0.393[6]
+0.334[0]
+  0.275[1]
+    0.216[2]
+        0.177[4]
+      0.157[3]
+        0.118[4]
+          0.98[5]
+              0.59[7]
+            0.39[6]
+              0.0[7]
+remove pointer 30, payload 885
+Tree look:
+    0.1003[2]
+      0.944[3]
+  0.934[1]
+0.875[0]
+  0.816[1]
+    0.757[2]
+        0.698[4]
+              0.659[7]
+            0.639[6]
+              0.600[7]
+          0.580[5]
+                0.541[8]
+              0.521[7]
+            0.462[6]
+              0.403[7]
+                0.393[8]
+      0.334[3]
+        0.275[4]
+          0.216[5]
+              0.177[7]
+            0.157[6]
+              0.118[7]
+                0.98[8]
+                    0.59[10]
+                  0.39[9]
+                    0.0[10]
+remove pointer 31, payload 403
+Tree look:
+        0.1003[4]
+          0.944[5]
+      0.934[3]
+    0.875[2]
+  0.816[1]
+    0.757[2]
+        0.698[4]
+            0.659[6]
+          0.639[5]
+            0.600[6]
+      0.580[3]
+            0.541[6]
+          0.521[5]
+        0.462[4]
+0.393[0]
+  0.334[1]
+    0.275[2]
+      0.216[3]
+          0.177[5]
+        0.157[4]
+          0.118[5]
+            0.98[6]
+                0.59[8]
+              0.39[7]
+                0.0[8]
+remove pointer 32, payload 944
+Tree look:
+  0.1003[1]
+0.934[0]
+    0.875[2]
+  0.816[1]
+      0.757[3]
+          0.698[5]
+              0.659[7]
+            0.639[6]
+              0.600[7]
+        0.580[4]
+              0.541[7]
+            0.521[6]
+          0.462[5]
+    0.393[2]
+      0.334[3]
+        0.275[4]
+          0.216[5]
+              0.177[7]
+            0.157[6]
+              0.118[7]
+                0.98[8]
+                    0.59[10]
+                  0.39[9]
+                    0.0[10]
+remove pointer 33, payload 462
+Tree look:
+      0.1003[3]
+    0.934[2]
+      0.875[3]
+  0.816[1]
+      0.757[3]
+        0.698[4]
+            0.659[6]
+          0.639[5]
+            0.600[6]
+    0.580[2]
+        0.541[4]
+      0.521[3]
+0.393[0]
+  0.334[1]
+    0.275[2]
+      0.216[3]
+          0.177[5]
+        0.157[4]
+          0.118[5]
+            0.98[6]
+                0.59[8]
+              0.39[7]
+                0.0[8]
+remove pointer 34, payload 1003
+Tree look:
+0.934[0]
+    0.875[2]
+  0.816[1]
+        0.757[4]
+          0.698[5]
+              0.659[7]
+            0.639[6]
+              0.600[7]
+      0.580[3]
+          0.541[5]
+        0.521[4]
+    0.393[2]
+      0.334[3]
+        0.275[4]
+          0.216[5]
+              0.177[7]
+            0.157[6]
+              0.118[7]
+                0.98[8]
+                    0.59[10]
+                  0.39[9]
+                    0.0[10]
+remove pointer 35, payload 521
+Tree look:
+    0.934[2]
+      0.875[3]
+  0.816[1]
+      0.757[3]
+        0.698[4]
+            0.659[6]
+          0.639[5]
+            0.600[6]
+    0.580[2]
+      0.541[3]
+0.393[0]
+  0.334[1]
+    0.275[2]
+      0.216[3]
+          0.177[5]
+        0.157[4]
+          0.118[5]
+            0.98[6]
+                0.59[8]
+              0.39[7]
+                0.0[8]
+remove pointer 36, payload 39
+Tree look:
+        0.934[4]
+          0.875[5]
+      0.816[3]
+          0.757[5]
+            0.698[6]
+                0.659[8]
+              0.639[7]
+                0.600[8]
+        0.580[4]
+          0.541[5]
+    0.393[2]
+  0.334[1]
+      0.275[3]
+    0.216[2]
+          0.177[5]
+        0.157[4]
+      0.118[3]
+        0.98[4]
+          0.59[5]
+0.0[0]
+remove pointer 37, payload 580
+Tree look:
+    0.934[2]
+      0.875[3]
+  0.816[1]
+    0.757[2]
+      0.698[3]
+          0.659[5]
+        0.639[4]
+          0.600[5]
+0.541[0]
+  0.393[1]
+    0.334[2]
+          0.275[5]
+        0.216[4]
+              0.177[7]
+            0.157[6]
+          0.118[5]
+            0.98[6]
+              0.59[7]
+      0.0[3]
+remove pointer 38, payload 98
+Tree look:
+        0.934[4]
+          0.875[5]
+      0.816[3]
+        0.757[4]
+          0.698[5]
+              0.659[7]
+            0.639[6]
+              0.600[7]
+    0.541[2]
+  0.393[1]
+    0.334[2]
+          0.275[5]
+        0.216[4]
+            0.177[6]
+          0.157[5]
+      0.118[3]
+0.59[0]
+  0.0[1]
+remove pointer 39, payload 639
+Tree look:
+      0.934[3]
+        0.875[4]
+    0.816[2]
+  0.757[1]
+    0.698[2]
+      0.659[3]
+0.600[0]
+  0.541[1]
+    0.393[2]
+        0.334[4]
+              0.275[7]
+            0.216[6]
+                0.177[8]
+              0.157[7]
+          0.118[5]
+      0.59[3]
+        0.0[4]
+remove pointer 40, payload 157
+Tree look:
+          0.934[5]
+            0.875[6]
+        0.816[4]
+      0.757[3]
+        0.698[4]
+          0.659[5]
+    0.600[2]
+  0.541[1]
+    0.393[2]
+      0.334[3]
+          0.275[5]
+        0.216[4]
+          0.177[5]
+0.118[0]
+  0.59[1]
+    0.0[2]
+remove pointer 41, payload 698
+Tree look:
+      0.934[3]
+        0.875[4]
+    0.816[2]
+  0.757[1]
+0.659[0]
+  0.600[1]
+    0.541[2]
+        0.393[4]
+          0.334[5]
+              0.275[7]
+            0.216[6]
+              0.177[7]
+      0.118[3]
+        0.59[4]
+          0.0[5]
+remove pointer 42, payload 216
+Tree look:
+          0.934[5]
+            0.875[6]
+        0.816[4]
+      0.757[3]
+    0.659[2]
+  0.600[1]
+    0.541[2]
+        0.393[4]
+      0.334[3]
+        0.275[4]
+0.177[0]
+  0.118[1]
+    0.59[2]
+      0.0[3]
+remove pointer 43, payload 757
+Tree look:
+    0.934[2]
+      0.875[3]
+  0.816[1]
+0.659[0]
+  0.600[1]
+      0.541[3]
+          0.393[5]
+        0.334[4]
+          0.275[5]
+    0.177[2]
+      0.118[3]
+        0.59[4]
+          0.0[5]
+remove pointer 44, payload 275
+Tree look:
+        0.934[4]
+          0.875[5]
+      0.816[3]
+    0.659[2]
+  0.600[1]
+      0.541[3]
+        0.393[4]
+    0.334[2]
+0.177[0]
+  0.118[1]
+    0.59[2]
+      0.0[3]
+remove pointer 45, payload 816
+Tree look:
+  0.934[1]
+    0.875[2]
+0.659[0]
+  0.600[1]
+        0.541[4]
+          0.393[5]
+      0.334[3]
+    0.177[2]
+      0.118[3]
+        0.59[4]
+          0.0[5]
+remove pointer 46, payload 334
+Tree look:
+      0.934[3]
+        0.875[4]
+    0.659[2]
+  0.600[1]
+    0.541[2]
+      0.393[3]
+0.177[0]
+  0.118[1]
+    0.59[2]
+      0.0[3]
+remove pointer 47, payload 875
+Tree look:
+  0.934[1]
+0.659[0]
+  0.600[1]
+      0.541[3]
+        0.393[4]
+    0.177[2]
+      0.118[3]
+        0.59[4]
+          0.0[5]
+remove pointer 48, payload 393
+Tree look:
+      0.934[3]
+    0.659[2]
+  0.600[1]
+    0.541[2]
+0.177[0]
+  0.118[1]
+    0.59[2]
+      0.0[3]
+remove pointer 49, payload 934
+Tree look:
+0.659[0]
+  0.600[1]
+      0.541[3]
+    0.177[2]
+      0.118[3]
+        0.59[4]
+          0.0[5]
+remove pointer 0, payload 0
+Tree look:
+  0.659[1]
+0.600[0]
+      0.541[3]
+    0.177[2]
+  0.118[1]
+    0.59[2]
+remove pointer 1, payload 541
+Tree look:
+    0.659[2]
+  0.600[1]
+0.177[0]
+  0.118[1]
+    0.59[2]
+remove pointer 2, payload 59
+Tree look:
+      0.659[3]
+    0.600[2]
+  0.177[1]
+0.118[0]
+remove pointer 3, payload 600
+Tree look:
+  0.659[1]
+0.177[0]
+  0.118[1]
+remove pointer 4, payload 118
+Tree look:
+  0.659[1]
+0.177[0]
+remove pointer 5, payload 659
+Tree look:
+0.177[0]
+remove pointer 6, payload 177
+</stdout>
+</verify>
+
+</testcase>
index 4e9ba6d..86501c6 100644 (file)
@@ -31,9 +31,6 @@ dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
 #
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 ftp
 </server>
@@ -41,9 +38,9 @@ ftp
 FTP (optional .netrc; user/no pass) dir list PASV
  </name>
  <command>
---netrc-optional ftp://user2@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc131 ftp://user2@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc" >
+<file name="log/netrc131" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1310 b/tests/data/test1310
new file mode 100644 (file)
index 0000000..840f3c5
--- /dev/null
@@ -0,0 +1,125 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- no <data> in this test since we have NTLM from the start
+
+This is supposed to be returned when the server gets a first
+Authorization: NTLM line passed-in from the client -->
+
+<data1001>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+This is not the real page either!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1002>
+
+<datacheck>
+HTTP/1.1 401 Now gimme that second request of crap
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 34
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+
+HTTP/1.1 200 Things are fine in server land swsclose
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM_WB
+debug
+</features>
+<server>
+http
+</server>
+ <name>
+HTTP with NTLM delegation to winbind helper
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+# set path to fake_auth instead of real ntlm_auth to generate NTLM type1 and type 3 messages
+CURL_NTLM_WB_FILE=%PWD/server/fake_ntlm
+# set source directory so fake_ntlm can find the test files
+CURL_NTLM_AUTH_SRCDIR=%SRCDIR
+# set the test number
+CURL_NTLM_AUTH_TESTNUM=1310
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/1310 -u testuser:anypasswd --ntlm-wb
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1310 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA\r
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /1310 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==\r
+User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+# Input and output (type 1 message) for fake_ntlm
+<ntlm_auth_type1>
+<input>
+YR
+</input>
+<output>
+YR TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
+</output>
+</ntlm_auth_type1>
+# Input and output (type 3 message) for fake_ntlm
+<ntlm_auth_type3>
+<input>
+TT TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
+</input>
+<output>
+KK TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
+</output>
+</ntlm_auth_type3>
+</testcase>
diff --git a/tests/data/test1311 b/tests/data/test1311
new file mode 100644 (file)
index 0000000..e47647c
--- /dev/null
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1311; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J and Content-Disposition
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1311 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1311 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file name="log/name1311">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1312 b/tests/data/test1312
new file mode 100644 (file)
index 0000000..9214401
--- /dev/null
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: inline; filename="name1312;weird"
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J, Content-Disposition and ; in filename
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1312 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1312 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file name="log/name1312;weird">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1313 b/tests/data/test1313
new file mode 100644 (file)
index 0000000..2331ae9
--- /dev/null
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: inline; filename='name1313
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -J, Content-Disposition, uneven quotes
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1313 -J -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1313 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file name="log/name1313">
+12345
+</file>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1314 b/tests/data/test1314
new file mode 100644 (file)
index 0000000..078ada6
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+followlocation
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 301 This is a weirdo text message swsbounce
+Server: test-server/fake
+Location: //somewhere.example.com/reply/1314
+Content-Length: 32
+Connection: close
+
+Redirect to the same URL again!
+</data>
+
+<data1>
+HTTP/1.1 200 okidoki
+Server: test-server/fake
+Content-Length: 4
+Connection: close
+
+moo
+</data1>
+
+<datacheck>
+HTTP/1.1 301 This is a weirdo text message swsbounce
+Server: test-server/fake
+Location: //somewhere.example.com/reply/1314
+Content-Length: 32
+Connection: close
+
+HTTP/1.1 200 okidoki
+Server: test-server/fake
+Content-Length: 4
+Connection: close
+
+moo
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP Location: following a // prefixed url
+ </name>
+ <command>
+http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+GET http://firstplace.example.com/want/1314 HTTP/1.1\r
+Host: firstplace.example.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://somewhere.example.com/reply/1314 HTTP/1.1\r
+Host: somewhere.example.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1315 b/tests/data/test1315
new file mode 100644 (file)
index 0000000..c2f158a
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+# Based on tests 186 and 1053
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+HTTP file upload
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP RFC1867-type formposting - -F with three files, one with explicit type
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1315 -F name=value -F 'file=@log/test1315.txt,log/test1315.txt;type=magic/content,log/test1315.txt'
+</command>
+# We create this file before the command is invoked!
+<file name="log/test1315.txt">
+dummy data
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+(^User-Agent:.*|-----+\w+)
+</strip>
+<protocol>
+POST /we/want/1315 HTTP/1.1\r
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 795\r
+Expect: 100-continue\r
+Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763\r
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: form-data; name="name"\r
+\r
+value\r
+------------------------------9ef8d6205763\r
+Content-Disposition: form-data; name="file"\r
+Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa\r
+\r
+Content-Disposition: attachment; filename="test1315.txt"\r
+Content-Type: text/plain\r
+\r
+dummy data
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: attachment; filename="test1315.txt"\r
+Content-Type: magic/content\r
+\r
+dummy data
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: attachment; filename="test1315.txt"\r
+Content-Type: text/plain\r
+\r
+dummy data
+\r
+------------------------------aaaaaaaaaaaa--\r
+------------------------------9ef8d6205763--\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1316 b/tests/data/test1316
new file mode 100644 (file)
index 0000000..51f58c2
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+LIST
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+Magic: sure you can FTP me\r
+\r
+</connect>
+
+# When doing LIST, we get the default list output hard-coded in the test
+# FTP server
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed\r
+Magic: sure you can FTP me\r
+\r
+HTTP/1.1 200 Mighty fine indeed\r
+Magic: sure you can FTP me\r
+\r
+total 20
+drwxr-xr-x   8 98       98           512 Oct 22 13:06 .
+drwxr-xr-x   8 98       98           512 Oct 22 13:06 ..
+drwxr-xr-x   2 98       98           512 May  2  1996 .NeXT
+-r--r--r--   1 0        1             35 Jul 16  1996 README
+lrwxrwxrwx   1 0        1              7 Dec  9  1999 bin -> usr/bin
+dr-xr-xr-x   2 0        1            512 Oct  1  1997 dev
+drwxrwxrwx   2 98       98           512 May 29 16:04 download.html
+dr-xr-xr-x   2 0        1            512 Nov 30  1995 etc
+drwxrwxrwx   2 98       1            512 Oct 30 14:33 pub
+dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+
+# please send the real CONNECT connect off to the FTP server's port
+<connectport>
+%FTPPORT
+</connectport>
+<server>
+ftp
+http-proxy
+</server>
+ <name>
+FTP LIST tunneled through HTTP proxy
+ </name>
+ <command>
+ftp://ftp.1316:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE A\r
+LIST\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1317 b/tests/data/test1317
new file mode 100644 (file)
index 0000000..d41886a
--- /dev/null
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--resolve
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP with --resolve
+</name>
+<command>
+--resolve example.com:%HTTPPORT:%HOSTIP http://example.com:%HTTPPORT/1317
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1317 HTTP/1.1\r
+Host: example.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1318 b/tests/data/test1318
new file mode 100644 (file)
index 0000000..dc182dc
--- /dev/null
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--resolve
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+
+</data>
+<data1>
+HTTP/1.1 200 second version
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+
+</data1>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP with --resolve and same host name using different cases
+ </name>
+ <command>
+--resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/1318 http://mixedcase.com:%HTTPPORT/13180001
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1318 HTTP/1.1\r
+Host: MiXeDcAsE.cOm:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /13180001 HTTP/1.1\r
+Host: mixedcase.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1319 b/tests/data/test1319
new file mode 100644 (file)
index 0000000..7818503
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+POP3
+RETR
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+pop3: sure hit me\r
+\r
+</connect>
+
+# When doing LIST, we get the default list output hard-coded in the test
+# FTP server
+<data>
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+  yours sincerely\r
+</data>
+
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed\r
+pop3: sure hit me\r
+\r
+From: me@somewhere
+To: fake@nowhere
+
+body
+
+--
+  yours sincerely\r
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+http-proxy
+</server>
+ <name>
+POP3 fetch tunneled through HTTP proxy
+ </name>
+ <command>
+pop3://pop.1319:%POP3PORT/1319 -p -x %HOSTIP:%PROXYPORT -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:
+</strip>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+RETR 1319\r
+QUIT\r
+</protocol>
+<proxy>
+CONNECT pop.1319:%POP3PORT HTTP/1.1\r
+Host: pop.1319:%POP3PORT\r
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e\r
+Proxy-Connection: Keep-Alive\r
+\r
+</proxy>
+</verify>
+</testcase>
index 2ff39fb..ed96953 100644 (file)
@@ -30,9 +30,6 @@ dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
 #
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 ftp
 </server>
@@ -40,9 +37,9 @@ ftp
 FTP (optional .netrc; user/passwd supplied) dir list PASV
  </name>
  <command>
---netrc-optional ftp://mary:mark@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc132 ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc" >
+<file name="log/netrc132" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1320 b/tests/data/test1320
new file mode 100644 (file)
index 0000000..15ec7bb
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+smtp: sure hit me\r
+\r
+</connect>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+http-proxy
+</server>
+ <name>
+SMTP send tunneled trough HTTP proxy
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+body\r
+</stdin>
+ <command>
+smtp://smtp.1320:%SMTPPORT/user --mail-rcpt 1320@foo --mail-rcpt 1320@foobar.example --mail-from 1320@from -T - -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+EHLO user\r
+MAIL FROM:<1320@from>\r
+RCPT TO:<1320@foo>\r
+RCPT TO:<1320@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+<proxy>
+CONNECT smtp.1320:%SMTPPORT HTTP/1.1\r
+Host: smtp.1320:%SMTPPORT\r
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e\r
+Proxy-Connection: Keep-Alive\r
+\r
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test1321 b/tests/data/test1321
new file mode 100644 (file)
index 0000000..bfa31e0
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+FETCH
+HTTP
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+imap: sure hit me\r
+\r
+</connect>
+<data>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed\r
+imap: sure hit me\r
+\r
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+http-proxy
+</server>
+ <name>
+IMAP FETCH tunneled through HTTP proxy
+ </name>
+ <command>
+'imap://imap.1321:%IMAPPORT/1321/;UID=1' -u user:secret -p -x %HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 1321\r
+A004 FETCH 1 BODY[]\r
+A005 LOGOUT\r
+</protocol>
+<proxy>
+CONNECT imap.1321:%IMAPPORT HTTP/1.1\r
+Host: imap.1321:%IMAPPORT\r
+User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e\r
+Proxy-Connection: Keep-Alive\r
+\r
+</proxy>
+</verify>
+</testcase>
diff --git a/tests/data/test1322 b/tests/data/test1322
new file mode 100644 (file)
index 0000000..996727e
--- /dev/null
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+POP3
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 with URL-encoded CR LF in the URL
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/%0d%0a/1322
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1323 b/tests/data/test1323
new file mode 100644 (file)
index 0000000..90eb88b
--- /dev/null
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with URL-encoded CR LF in the URL
+ </name>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/%0d%0a/1323
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1324 b/tests/data/test1324
new file mode 100644 (file)
index 0000000..c9835ef
--- /dev/null
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+CRLF-in-URL
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP with URL-encoded CR LF in the URL
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT/%0d%0a/1322
+</command>
+</client>
+
+#
+<verify>
+# 3 - CURLE_URL_MALFORMAT
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1325 b/tests/data/test1325
new file mode 100644 (file)
index 0000000..2b98d6a
--- /dev/null
@@ -0,0 +1,80 @@
+# http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+308
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 308 OK swsclose\r
+Location: 13250002\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</data2>
+<datacheck>
+HTTP/1.1 308 OK swsclose\r
+Location: 13250002\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP 308-redirect with POST
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/1325 -L -d "moo"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /we/1325 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 3\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+mooPOST /we/13250002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 3\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+moo
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1326 b/tests/data/test1326
new file mode 100644 (file)
index 0000000..bb0cbac
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 swsclose
+
+moo
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET to HTTP server
+ </name>
+<stdin>
+GET /we/want/1326 HTTP/1.0\r
+\r
+</stdin>
+ <command>
+telnet://%HOSTIP:%HTTPPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1326 HTTP/1.0\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1327 b/tests/data/test1327
new file mode 100644 (file)
index 0000000..a6e3d4f
--- /dev/null
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+telnet
+</features>
+ <name>
+TELNET check of upload with stdout redirected
+ </name>
+<stdin>
+GET /ignore/for/1327 HTTP/1.0\r
+\r
+</stdin>
+<file name="log/1327.txt">
+GET /we/want/1327 HTTP/1.0\r
+\r
+</file>
+ <command option="no-output">
+telnet://%HOSTIP:%HTTPPORT -T log/1327.txt
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /we/want/1327 HTTP/1.0\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1328 b/tests/data/test1328
new file mode 100644 (file)
index 0000000..c3991ec
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-f
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 404 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Funny-head: yesyes
+
+-noo-
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-yes-
+</data1>
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Funny-head: yesyes
+
+-yes-
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET a globbed range with -f
+ </name>
+ <command>
+-f 'http://%HOSTIP:%HTTPPORT/[13280000-13280001]' -o log/#1
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /13280000 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /13280001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1329 b/tests/data/test1329
new file mode 100644 (file)
index 0000000..3d2d0cb
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+/-prefixed proxy name
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/that/page/1329 -x "/server"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+# 5 == CURLE_COULDNT_RESOLVE_PROXY
+<errorcode>
+5
+</errorcode>
+</verify>
+</testcase>
index 2e6b2c3..085092d 100644 (file)
@@ -30,9 +30,6 @@ dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
 #
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 ftp
 </server>
@@ -40,9 +37,9 @@ ftp
 FTP (compulsory .netrc; ignored user/passwd) dir list PASV
  </name>
  <command>
--n ftp://mary:mark@%HOSTIP:%FTPPORT/
+-n --netrc-file log/netrc133 ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc" >
+<file name="log/netrc133" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1330 b/tests/data/test1330
new file mode 100644 (file)
index 0000000..2aba0ce
--- /dev/null
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+unittest
+TrackMemory
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+TrackMemory
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+unit1330
+</tool>
+
+<name>
+unit tests memory tracking operational
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/memdump" mode="text">
+MEM unit1330.c: malloc()
+MEM unit1330.c: free()
+</file>
+<stripfile>
+s/ =.*//
+s/\(.*\)/()/
+s/:\d+/:/
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1331 b/tests/data/test1331
new file mode 100644 (file)
index 0000000..406cb9e
--- /dev/null
@@ -0,0 +1,89 @@
+# Test case inspired by this question on stackoverflow:
+#
+# http://stackoverflow.com/questions/10017165/use-libcurl-with-bluecoat-cookie-proxy
+#
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP proxy
+cookies
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 407 Me not know you swsbounce\r
+Date: Tue, 25 Sep 2001 19:37:44 GMT\r
+Content-Type: text/html\r
+Set-Cookie: proxycookie=weirdo; Path=/\r
+Cache-control: private\r
+Content-Length: 62\r
+Proxy-Authenticate: Basic realm="moo on you"\r
+\r
+This server reply is for testing a simple cookie test case...
+</data>
+
+<data1>
+HTTP/1.1 200 Fine!\r
+Content-Type: text/html\r
+Content-Length: 6\r
+\r
+hello
+</data1>
+
+<datacheck>
+HTTP/1.1 407 Me not know you swsbounce\r
+Date: Tue, 25 Sep 2001 19:37:44 GMT\r
+Content-Type: text/html\r
+Set-Cookie: proxycookie=weirdo; Path=/\r
+Cache-control: private\r
+Content-Length: 62\r
+Proxy-Authenticate: Basic realm="moo on you"\r
+\r
+HTTP/1.1 200 Fine!\r
+Content-Type: text/html\r
+Content-Length: 6\r
+\r
+hello
+</datacheck>
+
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP --proxy-anyauth and 407 with cookies
+ </name>
+ <command>
+-U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/1331 --proxy-anyauth -c log/dump1331
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://z.x.com/1331 HTTP/1.1\r
+Host: z.x.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://z.x.com/1331 HTTP/1.1\r
+Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=\r
+Host: z.x.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+Cookie: proxycookie=weirdo\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1332 b/tests/data/test1332
new file mode 100644 (file)
index 0000000..1850ece
--- /dev/null
@@ -0,0 +1,80 @@
+# test case cloned from 1076 and then 302 was replaced with 303
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</data2>
+<datacheck>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST with 303 redirect and --post303
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /blah/1332 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 3\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+mooPOST /blah/moo.html&testcase=/13320002 HTTP/1.1\r
+User-Agent: curl/7.10 (i686-pc-linux-gnu) libcurl/7.10 OpenSSL/0.9.6c ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 3\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+moo
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1333 b/tests/data/test1333
new file mode 100644 (file)
index 0000000..a2ea301
--- /dev/null
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST zero length, chunked-encoded
+ </name>
+ <command>
+-d "" --header "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/1333
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+POST /1333 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Transfer-Encoding: chunked\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+0\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1334 b/tests/data/test1334
new file mode 100644 (file)
index 0000000..93c939f
--- /dev/null
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1334 -O -D log/heads1334
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1334 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1334" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1334" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1334" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1335 b/tests/data/test1335
new file mode 100644 (file)
index 0000000..3f43c7a
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1335 -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1335 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1335" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1335" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1336 b/tests/data/test1336
new file mode 100644 (file)
index 0000000..9e8aca3
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1336; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1336 -O -D log/heads1336
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1336
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1336 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1336" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1336" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1336; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1336" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1337 b/tests/data/test1337
new file mode 100644 (file)
index 0000000..4044190
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1337; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1337 -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1337
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1337 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1337" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1337" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1337; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1338 b/tests/data/test1338
new file mode 100644 (file)
index 0000000..8a1b395
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1338 -J -O -D log/heads1338
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1338 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1338" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1338" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1338" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1339 b/tests/data/test1339
new file mode 100644 (file)
index 0000000..06106ad
--- /dev/null
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1339 -J -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1339 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1339" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1339" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
index 8ff9c19..8a3ba62 100644 (file)
@@ -30,9 +30,6 @@ dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
 #
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 ftp
 </server>
@@ -40,9 +37,9 @@ ftp
 FTP (optional .netrc; programmatic user/passwd) dir list PASV
  </name>
  <command>
---netrc-optional -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
+--netrc-optional --netrc-file log/netrc134 -u romulus:rhemus ftp://mary:mark@%HOSTIP:%FTPPORT/
 </command>
-<file name="log/netrc" >
+<file name="log/netrc134" >
 # the following two lines were created while testing curl
 machine %HOSTIP login user1 password passwd1
 machine %HOSTIP login user2 password passwd2
diff --git a/tests/data/test1340 b/tests/data/test1340
new file mode 100644 (file)
index 0000000..ad26bba
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1340; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1340 -J -O -D log/heads1340
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1340 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/name1340" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1340" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1340; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1340" mode="text">
+curl: Saved to filename '%PWD/log/name1340'
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1341 b/tests/data/test1341
new file mode 100644 (file)
index 0000000..013a888
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1341; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -J and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1341 -J -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1341 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/name1341" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1341" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1341; charset=funny; option=strange
+
+curl: Saved to filename '%PWD/log/name1341'
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1342 b/tests/data/test1342
new file mode 100644 (file)
index 0000000..7820663
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1342 -i -O -D log/heads1342
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1342 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1342" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/heads1342" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1342" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1343 b/tests/data/test1343
new file mode 100644 (file)
index 0000000..904a379
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1343 -i -O -D -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1343 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1343" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1343" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1344 b/tests/data/test1344
new file mode 100644 (file)
index 0000000..145305d
--- /dev/null
@@ -0,0 +1,89 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1344 -i -O -D log/heads1344
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1344
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1344 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1344" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/heads1344" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1344; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1344" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1345 b/tests/data/test1345
new file mode 100644 (file)
index 0000000..7d53728
--- /dev/null
@@ -0,0 +1,86 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1345 -i -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1345
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1345 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1345" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1345" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1345; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1346 b/tests/data/test1346
new file mode 100644 (file)
index 0000000..eda9a2c
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i without Content-Disposition, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1346 -i -O
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1346 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1346" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1346" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1347 b/tests/data/test1347
new file mode 100644 (file)
index 0000000..b221846
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1347; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O -i and Content-Disposition, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1347 -i -O
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1347
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1347 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/1347" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1347; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1347" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1348 b/tests/data/test1348
new file mode 100644 (file)
index 0000000..77f2c0f
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without Content-Disposition inside, using -O
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1348 -O
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1348\r
+RETR file1348\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1348" mode="text">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1348" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1349 b/tests/data/test1349
new file mode 100644 (file)
index 0000000..28576fe
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1349 -O -D log/heads1349
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1349\r
+RETR file1349\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1349">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1349">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1349 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1349">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1350 b/tests/data/test1350
new file mode 100644 (file)
index 0000000..df12de5
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1350 -O -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1350\r
+RETR file1350\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1350">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/stdout1350">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1350 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1351 b/tests/data/test1351
new file mode 100644 (file)
index 0000000..d81265e
--- /dev/null
@@ -0,0 +1,84 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -J -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1351 -O -J -D log/heads1351
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1351\r
+RETR file1351\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1351">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1351">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1351 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1351">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1352 b/tests/data/test1352
new file mode 100644 (file)
index 0000000..fa9d1ce
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -J -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1352 -O -J -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1352\r
+RETR file1352\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1352">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/stdout1352">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1352 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1353 b/tests/data/test1353
new file mode 100644 (file)
index 0000000..b2954b1
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1353 -O -i -D log/heads1353
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1353\r
+RETR file1353\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1353">
+fooo
+mooo
+</file1>
+
+# The final "221 bye bye baby" response to QUIT will not be recorded
+# since that is not considered part of this particular transfer!
+<file2 name="log/heads1353">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1353 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1353">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1354 b/tests/data/test1354
new file mode 100644 (file)
index 0000000..aa54f2d
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1354 -O -i -D -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1354\r
+RETR file1354\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1354">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1354">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1354 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1355 b/tests/data/test1355
new file mode 100644 (file)
index 0000000..e7a392c
--- /dev/null
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file without C-D inside, using -O -i, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1355 -O -i
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1355\r
+RETR file1355\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1355">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1355">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1356 b/tests/data/test1356
new file mode 100644 (file)
index 0000000..adc7346
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1356 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1356; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with Content-Disposition inside, using -O
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1356 -O
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1356
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1356\r
+RETR file1356\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1356" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1356; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1356" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1357 b/tests/data/test1357
new file mode 100644 (file)
index 0000000..9525720
--- /dev/null
@@ -0,0 +1,99 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1357 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1357; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1357 -O -D log/heads1357
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1357
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1357\r
+RETR file1357\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1357">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1357; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1357">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1357 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1357">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1358 b/tests/data/test1358
new file mode 100644 (file)
index 0000000..24cc724
--- /dev/null
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1358 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1358; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1358 -O -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1358
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1358\r
+RETR file1358\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1358">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1358; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1358">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1358 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1359 b/tests/data/test1359
new file mode 100644 (file)
index 0000000..96445bb
--- /dev/null
@@ -0,0 +1,100 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1359 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1359; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -J -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1359
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1359\r
+RETR file1359\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1359">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1359; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1359">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1359 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1359">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1360 b/tests/data/test1360
new file mode 100644 (file)
index 0000000..abfbe8c
--- /dev/null
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1360 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1360; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -J -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1360
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1360\r
+RETR file1360\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1360">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1360; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1360">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1360 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1361 b/tests/data/test1361
new file mode 100644 (file)
index 0000000..b97de16
--- /dev/null
@@ -0,0 +1,99 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1361 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1361; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i -D file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1361
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1361\r
+RETR file1361\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1361">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1361; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1361">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1361 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1361">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1362 b/tests/data/test1362
new file mode 100644 (file)
index 0000000..0ea7461
--- /dev/null
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1362 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1362; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i -D stdout
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1362 -O -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1362
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1362\r
+RETR file1362\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1362">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1362; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1362">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1362 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1363 b/tests/data/test1363
new file mode 100644 (file)
index 0000000..fedc6fc
--- /dev/null
@@ -0,0 +1,79 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1363 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1363; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable
+<features>
+debug
+</features>
+<server>
+ftp
+</server>
+<name>
+FTP download, file with C-D inside, using -O -i, without -D
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1363 -O -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/name1363
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1363\r
+RETR file1363\r
+QUIT\r
+</protocol>
+
+<file1 name="log/file1363" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1363; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1363" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1364 b/tests/data/test1364
new file mode 100644 (file)
index 0000000..f4f48ff
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1364 -o log/outfile1364 -D log/heads1364
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1364
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1364 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1364" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1364" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1364" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1365 b/tests/data/test1365
new file mode 100644 (file)
index 0000000..f5e95e8
--- /dev/null
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1365 -o log/outfile1365 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1365
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1365 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1365" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1365" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1366 b/tests/data/test1366
new file mode 100644 (file)
index 0000000..2a7d059
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1366; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1366 -o log/outfile1366 -D log/heads1366
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1366 log/name1366
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1366 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1366" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1366" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1366; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1366" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1367 b/tests/data/test1367
new file mode 100644 (file)
index 0000000..6b576b7
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1367; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1367 -o log/outfile1367 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1367 log/name1367
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1367 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1367" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1367" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1367; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1368 b/tests/data/test1368
new file mode 100644 (file)
index 0000000..9dc9a5e
--- /dev/null
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1368 -J -o log/outfile1368 -D log/heads1368
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1368
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1368 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1368" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1368" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1368" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1369 b/tests/data/test1369
new file mode 100644 (file)
index 0000000..a24665a
--- /dev/null
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1369 -J -o log/outfile1369 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1369
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1369 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1369" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1369" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1370 b/tests/data/test1370
new file mode 100644 (file)
index 0000000..26b4b15
--- /dev/null
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1370; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1370 -J -o log/outfile1370 -D log/heads1370
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1370 log/name1370
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1370 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1370" mode="text">
+12345
+</file1>
+
+<file2 name="log/heads1370" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1370; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1370" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1371 b/tests/data/test1371
new file mode 100644 (file)
index 0000000..31a64a3
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1371; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -J and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1371 -J -o log/outfile1371 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1371 log/name1371
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1371 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1371" mode="text">
+12345
+</file1>
+
+<file2 name="log/stdout1371" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1371; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1372 b/tests/data/test1372
new file mode 100644 (file)
index 0000000..9c617f8
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1372 -i -o log/outfile1372 -D log/heads1372
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1372
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1372 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1372" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/heads1372" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+<file3 name="log/stdout1372" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1373 b/tests/data/test1373
new file mode 100644 (file)
index 0000000..2f6e3bd
--- /dev/null
@@ -0,0 +1,75 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1373 -i -o log/outfile1373 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1373
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1373 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1373" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1373" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1374 b/tests/data/test1374
new file mode 100644 (file)
index 0000000..aef2b7d
--- /dev/null
@@ -0,0 +1,81 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, -D file
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1374 -i -o log/outfile1374 -D log/heads1374
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1374 log/name1374
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1374 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1374" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/heads1374" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1374; charset=funny; option=strange
+
+</file2>
+
+<file3 name="log/stdout1374" mode="text">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1375 b/tests/data/test1375
new file mode 100644 (file)
index 0000000..717b645
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, -D stdout
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1375 -i -o log/outfile1375 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1375 log/name1375
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1375 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1375" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1375" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1375; charset=funny; option=strange
+
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1376 b/tests/data/test1376
new file mode 100644 (file)
index 0000000..02068db
--- /dev/null
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i without Content-Disposition, without -D
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1376 -i -o log/outfile1376
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1376
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1376 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1376" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+12345
+</file1>
+
+<file2 name="log/stdout1376" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1377 b/tests/data/test1377
new file mode 100644 (file)
index 0000000..fede100
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1377; charset=funny; option=strange
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP GET -o fname -i and Content-Disposition, without -D
+</name>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1377 -i -o log/outfile1377
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/1377 log/name1377
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1377 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+
+<file1 name="log/outfile1377" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1377; charset=funny; option=strange
+
+12345
+</file1>
+
+<file2 name="log/stdout1377" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1378 b/tests/data/test1378
new file mode 100644 (file)
index 0000000..6b24f99
--- /dev/null
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without Content-Disposition inside, using -o fname
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1378 -o log/download1378
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1378
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1378\r
+RETR file1378\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1378" mode="text">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1378" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1379 b/tests/data/test1379
new file mode 100644 (file)
index 0000000..0fd06d5
--- /dev/null
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1379 -o log/download1379 -D log/heads1379
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1379
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1379\r
+RETR file1379\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1379">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1379">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1379 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1379">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1380 b/tests/data/test1380
new file mode 100644 (file)
index 0000000..ec7800d
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1380 -o log/download1380 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1380
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1380\r
+RETR file1380\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1380">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1380">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1380 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1381 b/tests/data/test1381
new file mode 100644 (file)
index 0000000..8f3bc37
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -J -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1381 -o log/download1381 -J -D log/heads1381
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1381
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1381\r
+RETR file1381\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1381">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1381">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1381 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1381">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1382 b/tests/data/test1382
new file mode 100644 (file)
index 0000000..fbf5195
--- /dev/null
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -J -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1382 -o log/download1382 -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1382
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1382\r
+RETR file1382\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1382">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1382">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1382 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1383 b/tests/data/test1383
new file mode 100644 (file)
index 0000000..0469e72
--- /dev/null
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1383 -o log/download1383 -i -D log/heads1383
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1383
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1383\r
+RETR file1383\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1383">
+fooo
+mooo
+</file1>
+
+<file2 name="log/heads1383">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1383 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1383">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1384 b/tests/data/test1384
new file mode 100644 (file)
index 0000000..2deeb7c
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1384 -o log/download1384 -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1384
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1384\r
+RETR file1384\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1384">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1384">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 10\r
+150 Binary data connection for 1384 () (10 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1385 b/tests/data/test1385
new file mode 100644 (file)
index 0000000..cc39279
--- /dev/null
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+fooo
+mooo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file without C-D inside, using -o fname -i, without -D
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1385 -o log/download1385 -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1385
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1385\r
+RETR file1385\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1385" mode="text">
+fooo
+mooo
+</file1>
+
+<file2 name="log/stdout1385" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1386 b/tests/data/test1386
new file mode 100644 (file)
index 0000000..da47d5b
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1386 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1386; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with Content-Disposition inside, using -o fname
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1386 -o log/download1386
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1386 log/name1386
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1386\r
+RETR file1386\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1386" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1386; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1386" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1387 b/tests/data/test1387
new file mode 100644 (file)
index 0000000..a2c5a4d
--- /dev/null
@@ -0,0 +1,91 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1387 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1387; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1387 -o log/download1387 -D log/heads1387
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1387 log/name1387
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1387\r
+RETR file1387\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1387">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1387; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1387">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1387 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1387">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1388 b/tests/data/test1388
new file mode 100644 (file)
index 0000000..b4662e6
--- /dev/null
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1388 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1388; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1388 -o log/download1388 -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1388 log/name1388
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1388\r
+RETR file1388\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1388">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1388; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1388">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1388 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1389 b/tests/data/test1389
new file mode 100644 (file)
index 0000000..c2ac3ad
--- /dev/null
@@ -0,0 +1,92 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1389 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1389; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -J -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1389 -o log/download1389 -J -D log/heads1389
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1389 log/name1389
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1389\r
+RETR file1389\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1389">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1389; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1389">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1389 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1389">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1390 b/tests/data/test1390
new file mode 100644 (file)
index 0000000..3cf86e7
--- /dev/null
@@ -0,0 +1,89 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-J
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1390 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1390; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -J -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1390 -o log/download1390 -J -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1390 log/name1390
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1390\r
+RETR file1390\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1390">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1390; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1390">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1390 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1391 b/tests/data/test1391
new file mode 100644 (file)
index 0000000..913f25a
--- /dev/null
@@ -0,0 +1,91 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1391 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1391; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i -D file
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1391 -o log/download1391 -i -D log/heads1391
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1391 log/name1391
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1391\r
+RETR file1391\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1391">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1391; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/heads1391">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1391 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+<file3 name="log/stdout1391">
+</file3>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1392 b/tests/data/test1392
new file mode 100644 (file)
index 0000000..b05fc31
--- /dev/null
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1392 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1392; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i -D stdout
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1392 -o log/download1392 -i -D -
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1392 log/name1392
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1392\r
+RETR file1392\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1392">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1392; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1392">
+220-        _   _ ____  _     \r
+220-    ___| | | |  _ \| |    \r
+220-   / __| | | | |_) | |    \r
+220-  | (__| |_| |  _ <| |___ \r
+220    \___|\___/|_| \_\_____|\r
+331 We are happy you popped in!\r
+230 Welcome you silly person\r
+257 "/" is current directory\r
+250 CWD command successful.\r
+229 Entering Passive Mode (stripped)
+200 I modify TYPE as you wanted\r
+213 214\r
+150 Binary data connection for 1392 () (214 bytes).\r
+226 File transfer complete\r
+</file2>
+<stripfile2>
+s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/
+</stripfile2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1393 b/tests/data/test1393
new file mode 100644 (file)
index 0000000..ebb8151
--- /dev/null
@@ -0,0 +1,71 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+</keywords>
+</info>
+
+# Server-side
+<reply>
+# file1393 contents...
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1393; charset=funny; option=strange
+
+MOOOO
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<name>
+FTP DL, file with C-D inside, using -o fname -i, without -D
+</name>
+<command option="no-output,no-include">
+ftp://%HOSTIP:%FTPPORT/path/file1393 -o log/download1393 -i
+</command>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/file1393 log/name1393
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPSV\r
+TYPE I\r
+SIZE file1393\r
+RETR file1393\r
+QUIT\r
+</protocol>
+
+<file1 name="log/download1393" mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name1393; charset=funny; option=strange
+
+MOOOO
+</file1>
+
+<file2 name="log/stdout1393" mode="text">
+</file2>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1394 b/tests/data/test1394
new file mode 100644 (file)
index 0000000..34d4a0e
--- /dev/null
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+unittest
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+unit test for parse_cert_parameter()
+ </name>
+<tool>
+unit1394
+</tool>
+</client>
+
+<verify>
+<stdout mode="text">
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1395 b/tests/data/test1395
new file mode 100644 (file)
index 0000000..967c8d4
--- /dev/null
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Curl_dedotdotify
+ </name>
+<tool>
+unit1395
+</tool>
+
+</client>
+
+</testcase>
diff --git a/tests/data/test1396 b/tests/data/test1396
new file mode 100644 (file)
index 0000000..8ffe35f
--- /dev/null
@@ -0,0 +1,27 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curl_easy_escape
+curl_easy_unescape
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+curl_easy_escape and curl_easy_unescape
+ </name>
+<tool>
+unit1396
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1400 b/tests/data/test1400
new file mode 100644 (file)
index 0000000..72989c4
--- /dev/null
@@ -0,0 +1,103 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for simple HTTP GET
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1400 --libcurl log/test1400.c
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1400 HTTP/1.1\r
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<stripfile>
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1400.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1400");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1401 b/tests/data/test1401
new file mode 100644 (file)
index 0000000..e709c8e
--- /dev/null
@@ -0,0 +1,126 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP set cookie
+cookies
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for GET with various options
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1401 --libcurl log/test1401.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1401 HTTP/1.1\r
+User-Agent: stripped\r
+Authorization: Basic ZmFrZTp1c2Vy\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Cookie: chocolate=chip\r
+X-Files: Mulder\r
+X-Men: cyclops, iceman\r
+\r
+</protocol>
+<stripfile>
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1401.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+  struct curl_slist *slist1;
+
+  slist1 = NULL;
+  slist1 = curl_slist_append(slist1, "X-Files: Mulder");
+  slist1 = curl_slist_append(slist1, "X-Men: cyclops, iceman");
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1401");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERPWD, "fake:user");
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "MyUA");
+  curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, slist1);
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);
+  curl_easy_setopt(hnd, CURLOPT_COOKIE, "chocolate=chip");
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_PROTOCOLS, (long)CURLPROTO_FILE |
+                                           (long)CURLPROTO_FTP |
+                                           (long)CURLPROTO_HTTP);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+  curl_slist_free_all(slist1);
+  slist1 = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1402 b/tests/data/test1402
new file mode 100644 (file)
index 0000000..c3bf834
--- /dev/null
@@ -0,0 +1,112 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for simple POST
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1402 --libcurl log/test1402.c -d "foo=bar" -d "baz=quux"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /we/want/1402 HTTP/1.1\r
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 16\r
+Content-Type: application/x-www-form-urlencoded\r
+\r
+foo=bar&baz=quux
+</protocol>
+<stripfile>
+# curl's default user-agent varies with version, libraries etc.
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1402.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1402");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "foo=bar&baz=quux");
+  curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)16);
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1403 b/tests/data/test1403
new file mode 100644 (file)
index 0000000..3ec7dd0
--- /dev/null
@@ -0,0 +1,107 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Content-Type: text/plain
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+--libcurl for GET with query
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1403 --libcurl log/test1403.c -G -d "foo=bar" -d "baz=quux"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1403?foo=bar&baz=quux HTTP/1.1\r
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<stripfile>
+# curl's default user-agent varies with version, libraries etc.
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1403.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stdout>
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1404 b/tests/data/test1404
new file mode 100644 (file)
index 0000000..88a06ba
--- /dev/null
@@ -0,0 +1,161 @@
+<testcase>
+# Based on test 1315
+<info>
+<keywords>
+HTTP
+HTTP FORMPOST
+HTTP file upload
+--libcurl
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 29 Jul 2008 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP RFC1867-type formposting - -F with three files, one with explicit type
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content,log/test1404.txt' --libcurl log/test1404.c
+</command>
+# We create this file before the command is invoked!
+<file name="log/test1404.txt">
+dummy data
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+(^User-Agent:.*|-----+\w+)
+</strip>
+<protocol>
+POST /we/want/1404 HTTP/1.1\r
+User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 795\r
+Expect: 100-continue\r
+Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763\r
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: form-data; name="name"\r
+\r
+value\r
+------------------------------9ef8d6205763\r
+Content-Disposition: form-data; name="file"\r
+Content-Type: multipart/mixed; boundary=----------------------------aaaaaaaaaaaa\r
+\r
+Content-Disposition: attachment; filename="test1404.txt"\r
+Content-Type: text/plain\r
+\r
+dummy data
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: attachment; filename="test1404.txt"\r
+Content-Type: magic/content\r
+\r
+dummy data
+\r
+------------------------------9ef8d6205763\r
+Content-Disposition: attachment; filename="test1404.txt"\r
+Content-Type: text/plain\r
+\r
+dummy data
+\r
+------------------------------aaaaaaaaaaaa--\r
+------------------------------9ef8d6205763--\r
+</protocol>
+<stripfile>
+# curl's default user-agent varies with version, libraries etc.
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+<file name="log/test1404.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+  struct curl_httppost *post1;
+  struct curl_httppost *postend;
+
+  post1 = NULL;
+  postend = NULL;
+  curl_formadd(&post1, &postend,
+               CURLFORM_COPYNAME, "name",
+               CURLFORM_COPYCONTENTS, "value",
+               CURLFORM_END);
+  curl_formadd(&post1, &postend,
+               CURLFORM_COPYNAME, "file",
+               CURLFORM_FILE, "log/test1404.txt",
+               CURLFORM_CONTENTTYPE, "text/plain",
+               CURLFORM_FILE, "log/test1404.txt",
+               CURLFORM_CONTENTTYPE, "magic/content",
+               CURLFORM_FILE, "log/test1404.txt",
+               CURLFORM_CONTENTTYPE, "text/plain",
+               CURLFORM_END);
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_HTTPPOST, post1);
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+  curl_formfree(post1);
+  post1 = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1405 b/tests/data/test1405
new file mode 100644 (file)
index 0000000..692bb1a
--- /dev/null
@@ -0,0 +1,137 @@
+<testcase>
+# Derived from test227
+<info>
+<keywords>
+FTP
+post-quote
+pre-quote
+quote
+--libcurl
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+<servercmd>
+REPLY EPSV 500 no such command
+REPLY FAIL 500 this might not be a failure!
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with quote ops
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1405 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test1405.c
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+NOOP 1\r
+FAIL\r
+EPSV\r
+PASV\r
+TYPE I\r
+NOOP 2\r
+FAIL HARD\r
+SIZE 1405\r
+RETR 1405\r
+NOOP 3\r
+QUIT\r
+</protocol>
+<file name="log/test1405.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+  struct curl_slist *slist1;
+  struct curl_slist *slist2;
+  struct curl_slist *slist3;
+
+  slist1 = NULL;
+  slist1 = curl_slist_append(slist1, "NOOP 1");
+  slist1 = curl_slist_append(slist1, "*FAIL");
+  slist2 = NULL;
+  slist2 = curl_slist_append(slist2, "NOOP 3");
+  slist3 = NULL;
+  slist3 = curl_slist_append(slist3, "NOOP 2");
+  slist3 = curl_slist_append(slist3, "*FAIL HARD");
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/1405");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_QUOTE, slist1);
+  curl_easy_setopt(hnd, CURLOPT_POSTQUOTE, slist2);
+  curl_easy_setopt(hnd, CURLOPT_PREQUOTE, slist3);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+  curl_slist_free_all(slist1);
+  slist1 = NULL;
+  curl_slist_free_all(slist2);
+  slist2 = NULL;
+  curl_slist_free_all(slist3);
+  slist3 = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stripfile>
+# CURLOPT_USERAGENT and CURLOPT_MAXREDIRS requires HTTP protocol
+# support, IOW depends on configuration - just ignore these.
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1406 b/tests/data/test1406
new file mode 100644 (file)
index 0000000..6245c51
--- /dev/null
@@ -0,0 +1,122 @@
+<testcase>
+# Based on test802
+# N.B. --libcurl output not sufficient to deal with uploaded files.
+<info>
+<keywords>
+SMTP
+--libcurl
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP
+ </name>
+<file name="log/test1406.eml">
+From: different\r
+To: another\r
+\r
+body\r
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 1406@foo --mail-rcpt 1406@foobar.example --mail-from 1406@from -T log/test1406.eml --libcurl log/test1406.c
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<1406@from> SIZE=38\r
+RCPT TO:<1406@foo>\r
+RCPT TO:<1406@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+<file name="log/test1406.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+  struct curl_slist *slist1;
+
+  slist1 = NULL;
+  slist1 = curl_slist_append(slist1, "1406@foo");
+  slist1 = curl_slist_append(slist1, "1406@foobar.example");
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
+  curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/user");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "1406@from");
+  curl_easy_setopt(hnd, CURLOPT_MAIL_RCPT, slist1);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+  curl_slist_free_all(slist1);
+  slist1 = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stripfile>
+# curl's default user-agent varies with version, libraries etc.
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1407 b/tests/data/test1407
new file mode 100644 (file)
index 0000000..842778a
--- /dev/null
@@ -0,0 +1,102 @@
+<testcase>
+# Based on test808
+<info>
+<keywords>
+POP3
+LIST
+--libcurl
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST +OK 1407 100\r\n.
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST one message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+LIST 1407\r
+QUIT\r
+</protocol>
+<file name="log/test1407.c" mode="text">
+/********* Sample code generated by the curl command line tool **********
+ * All curl_easy_setopt() options are documented at:
+ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+ ************************************************************************/
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+  CURLcode ret;
+  CURL *hnd;
+
+  hnd = curl_easy_init();
+  curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
+  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
+  curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
+  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+  curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
+  curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+
+  /* Here is a list of options the curl code used that cannot get generated
+     as source easily. You may select to either not use them or implement
+     them yourself.
+
+  CURLOPT_WRITEDATA set to a objectpointer
+  CURLOPT_WRITEFUNCTION set to a functionpointer
+  CURLOPT_READDATA set to a objectpointer
+  CURLOPT_READFUNCTION set to a functionpointer
+  CURLOPT_SEEKDATA set to a objectpointer
+  CURLOPT_SEEKFUNCTION set to a functionpointer
+  CURLOPT_ERRORBUFFER set to a objectpointer
+  CURLOPT_STDERR set to a objectpointer
+  CURLOPT_DEBUGFUNCTION set to a functionpointer
+  CURLOPT_DEBUGDATA set to a objectpointer
+  CURLOPT_HEADERFUNCTION set to a functionpointer
+  CURLOPT_HEADERDATA set to a objectpointer
+
+  */
+
+  ret = curl_easy_perform(hnd);
+
+  curl_easy_cleanup(hnd);
+  hnd = NULL;
+
+  return (int)ret;
+}
+/**** End of sample code ****/
+</file>
+<stripfile>
+# curl's default user-agent varies with version, libraries etc.
+s/(USERAGENT, \")[^\"]+/${1}stripped/
+# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
+# ignore them
+$_ = '' if /CURLOPT_SSL_VERIFYPEER/
+$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1408 b/tests/data/test1408
new file mode 100644 (file)
index 0000000..01b2f6d
--- /dev/null
@@ -0,0 +1,74 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+IPV6
+cookies
+cookiejar
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Set-Cookie: time=1
+
+-foo-
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Set-Cookie: time=2
+
+-foo-
+</data2>
+
+
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http-ipv6
+</server>
+ <name>
+HTTP receive cookies over IPV6
+ </name>
+ <command>
+-c log/jar1408 -g http://%HOST6IP:%HTTP6PORT/path/14080001 http://%HOST6IP:%HTTP6PORT/path/14080002
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /path/14080001 HTTP/1.1\r
+Host: %HOST6IP:%HTTP6PORT\r
+Accept: */*\r
+\r
+GET /path/14080002 HTTP/1.1\r
+Host: %HOST6IP:%HTTP6PORT\r
+Accept: */*\r
+Cookie: time=1\r
+\r
+</protocol>
+</verify>
+</testcase>
+
diff --git a/tests/data/test1409 b/tests/data/test1409
new file mode 100644 (file)
index 0000000..5ceb53b
--- /dev/null
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+cmdline
+FAILURE
+</keywords>
+</info>
+
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+Pass in string to -C
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1409 -C wrong
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1410 b/tests/data/test1410
new file mode 100644 (file)
index 0000000..97ad056
--- /dev/null
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+cmdline
+FAILURE
+</keywords>
+</info>
+
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+Pass in negative number to --max-time
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1410 --max-time -4
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1412 b/tests/data/test1412
new file mode 100644 (file)
index 0000000..e88919d
--- /dev/null
@@ -0,0 +1,117 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+--anyauth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+auth_required
+</servercmd>
+<data>
+HTTP/1.1 401 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Connection: close\r
+\r
+This is not the real page
+</data>
+
+# This is supposed to be returned when the server gets a
+# Authorization: Digest line passed-in from the client
+<data1000>
+HTTP/1.1 200 OK swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+Connection: close\r
+\r
+This IS the real page!
+</data1000>
+
+# This is the second request
+<data1001>
+HTTP/1.1 200 OK swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+Connection: close\r
+\r
+This IS the second real page!
+</data1001>
+
+<datacheck>
+HTTP/1.1 401 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
+Content-Type: text/html; charset=iso-8859-1\r
+Connection: close\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 23\r
+Connection: close\r
+\r
+This IS the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+crypto
+</features>
+ <name>
+HTTP GET with --anyauth with two URLs (picking Digest) 
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001
+</command>
+<file name="log/put1412">
+This is data we upload with PUT
+a second line
+line three
+four is the number of lines
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1412 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /1412 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"\r
+User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /14120001 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"\r
+User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1413 b/tests/data/test1413
new file mode 100644 (file)
index 0000000..6e889a8
--- /dev/null
@@ -0,0 +1,73 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK swsclose\r
+Location: moo.html/14130002#fragmentpart\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</data2>
+<datacheck>
+HTTP/1.1 302 OK swsclose\r
+Location: moo.html/14130002#fragmentpart\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP redirect with fragment in new URL
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/this/1413 -L
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /this/1413 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /this/moo.html/14130002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1414 b/tests/data/test1414
new file mode 100644 (file)
index 0000000..4440378
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+RETR
+no SIZE
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+    to
+      see
+that FTP
+works
+  so does it?
+</data>
+<servercmd>
+REPLY SIZE 502 no such command
+REPLY EPRT 502 no such command
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP PORT without SIZE or EPRT support
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1414 -P -
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^(EPRT \|1\|)(.*)/$1/
+s/^(PORT)(.*)/$1/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+PORT
+TYPE I\r
+SIZE 1414\r
+RETR 1414\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
index aaa4ca1..6651df0 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index de0fa7a..fbac10f 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
index f7973f4..a5d1499 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 </reply>
diff --git a/tests/data/test1500 b/tests/data/test1500
new file mode 100644 (file)
index 0000000..0a5919c
--- /dev/null
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 all good!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 12
+Connection: close
+
+Hello World
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib1500
+</tool>
+
+ <name>
+curl_multi_wait
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1500
+</command>
+</client>
+</testcase>
diff --git a/tests/data/test1501 b/tests/data/test1501
new file mode 100644 (file)
index 0000000..8c7e13a
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+multi
+LIST
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+DELAY LIST 2
+DELAY TYPE 2
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib1501
+</tool>
+ <name>
+FTP with multi interface and slow LIST response 
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1501/
+</command>
+</client>
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD 1501\r
+EPSV\r
+TYPE A\r
+LIST\r
+QUIT\r
+</protocol>
+
+</verify>
+</testcase>
diff --git a/tests/data/test1502 b/tests/data/test1502
new file mode 100644 (file)
index 0000000..ac9e048
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1502
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence UA
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1502 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1502 HTTP/1.1\r
+Host: google.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1503 b/tests/data/test1503
new file mode 100644 (file)
index 0000000..66bf3fa
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1503
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence PA
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1503 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1503 HTTP/1.1\r
+Host: google.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1504 b/tests/data/test1504
new file mode 100644 (file)
index 0000000..cedc9cc
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1504
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence UB
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1504 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1504 HTTP/1.1\r
+Host: google.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1505 b/tests/data/test1505
new file mode 100644 (file)
index 0000000..3ab5284
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_RESOLVE
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1505
+</tool>
+ <name>
+HTTP multi with CURLOPT_RESOLVE, cleanup sequence PB
+ </name>
+ <command>
+http://google.com:%HTTPPORT/1505 %HTTPPORT %HOSTIP
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1505 HTTP/1.1\r
+Host: google.com:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1506 b/tests/data/test1506
new file mode 100644 (file)
index 0000000..8870b2f
--- /dev/null
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1506
+</tool>
+ <name>
+HTTP GET connection cache limit (CURLMOPT_MAXCONNECTS)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1506 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15060001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15060002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15060003 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15060004 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<file name="log/stderr1506" mode="text">
+* Connection #0 to host server1.example.com left intact
+* Connection #1 to host server2.example.com left intact
+* Connection #2 to host server3.example.com left intact
+* Closing connection 0
+* Connection #3 to host server4.example.com left intact
+</file>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1507 b/tests/data/test1507
new file mode 100644 (file)
index 0000000..76ec532
--- /dev/null
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+multi
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<tool>
+lib1507
+</tool>
+
+# based on bug report #1184
+ <name>
+SMTP with multi interface and CURLE_ABORTED_BY_CALLBACK
+ </name>
+<stdin>
+From: different
+To: another
+
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<1507-realuser@example.com>\r
+RCPT TO:<1507-recipient@example.com>\r
+DATA\r
+</protocol>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test1508 b/tests/data/test1508
new file mode 100644 (file)
index 0000000..f8607e5
--- /dev/null
@@ -0,0 +1,31 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+multi
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<tool>
+lib1508
+</tool>
+ <name>
+Close a multi handle without using it
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1508
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/stdout1508" mode="text">
+We are done
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1509 b/tests/data/test1509
new file mode 100644 (file)
index 0000000..dd68b05
--- /dev/null
@@ -0,0 +1,88 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<servercmd>
+connection-monitor
+</servercmd>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+Server: the beast that eats naughty clients\r
+\r
+</connect>
+
+<data>
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+
+</data>
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed\r
+Server: the beast that eats naughty clients\r
+\r
+HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+
+header length is ........: 239
+header length should be..: 239
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib1509
+</tool>
+
+ <name>
+simple multi http:// through proxytunnel with authentication info
+ </name>
+ <command>
+http://the.old.moo.1509:%HTTPPORT/1509 %HOSTIP:%PROXYPORT
+</command>
+<file name="log/test1509.txt">
+foo
+   bar
+bar
+   foo
+moo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy>
+CONNECT the.old.moo.1509:%HTTPPORT HTTP/1.1\r
+Host: the.old.moo.1509:%HTTPPORT\r
+Proxy-Connection: Keep-Alive\r
+\r
+</proxy>
+<protocol>
+GET /1509 HTTP/1.1\r
+Host: the.old.moo.1509:%HTTPPORT\r
+Accept: */*\r
+\r
+[DISCONNECT]
+</protocol>
+</verify>
+</testcase>
index 7fb1908..8f20d1d 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
diff --git a/tests/data/test1510 b/tests/data/test1510
new file mode 100644 (file)
index 0000000..050f051
--- /dev/null
@@ -0,0 +1,94 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1510
+</tool>
+ <name>
+HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1510 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15100001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15100002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15100003 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15100004 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<file name="log/stderr1510" mode="text">
+* Connection #0 to host server1.example.com left intact
+* Connection #1 to host server2.example.com left intact
+* Connection #2 to host server3.example.com left intact
+* Closing connection 0
+* Connection #3 to host server4.example.com left intact
+</file>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1511 b/tests/data/test1511
new file mode 100644 (file)
index 0000000..806657f
--- /dev/null
@@ -0,0 +1,70 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fakem\r
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT\r
+Content-Type: text/html\r
+Content-Length: 12\r
+Connection: close\r
+\r
+Hello World
+</data>
+
+<datacheck>
+HTTP/1.1 200\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fakem\r
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT\r
+Content-Type: text/html\r
+Content-Length: 12\r
+Connection: close\r
+\r
+HTTP/1.1 200\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fakem\r
+Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT\r
+Content-Type: text/html\r
+Content-Length: 12\r
+Connection: close\r
+\r
+Hello World
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+<tool>
+lib1511
+</tool>
+<name>
+HTTP GET time conditions in repeated requests
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/1511
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
+<verify>
+<errorcode>
+120
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1512 b/tests/data/test1512
new file mode 100644 (file)
index 0000000..9d2134b
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+GLOBAL DNS CACHE
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data1>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data2>
+<data3>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data3>
+<data4>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 47
+
+file contents should appear once for each file
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1512
+</tool>
+ <name>
+GLOBAL CACHE test over two easy performs
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/1512 %HOSTIP %HTTPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/15120001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/15120002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<strip>
+^Host:.*
+</strip>
+<stripfile>
+$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+</stripfile>
+</verify>
+</testcase>
index c3f4159..2cc5216 100644 (file)
@@ -1,4 +1,12 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--fail
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data nocheck="yes">
index 891aa35..70ac7fd 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
index 0ff5e7e..098de21 100644 (file)
@@ -1,4 +1,12 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+--anyauth
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 872d93b..77700f6 100644 (file)
@@ -1,4 +1,12 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--anyauth
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 417238d..9c4b22f 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
@@ -26,7 +33,7 @@ http://%HOSTIP:%HTTPPORT/158 -F name=daniel
 <strip>
 ^User-Agent:.*
 ^Content-Type: multipart/form-data.*
-^---------------------------.*
+^-----------------------.*
 </strip>
 <protocol>
 POST /158 HTTP/1.1\r
index 2b9c832..1f8a2f8 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 # Server-side
 <reply>
 
index d6ead59..df80aef 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data nocheck="yes">
index bc6820c..0458359 100644 (file)
@@ -1,5 +1,12 @@
 <testcase>
-# Server-side
+<info>
+<keywords>
+FTP
+CURLE_PARTIAL_FILE
+RETR
+PASV
+</keywords>
+</info>
 <reply>
 <data>
 1oooooooooooooooooooooooooooooooooooooooooo2
@@ -25,6 +32,8 @@ ftp://%HOSTIP:%FTPPORT/161
 
 # Verify data after the test has been "shot"
 <verify>
+# This gets QUIT sent because CURLE_PARTIAL_FILE does NOT mark the control
+# connection as bad
 <protocol>
 USER anonymous\r
 PASS ftp@example.com\r
@@ -33,6 +42,7 @@ EPSV
 TYPE I\r
 SIZE 161\r
 RETR 161\r
+QUIT\r
 </protocol>
 <errorcode>
 18
index 9e8256d..22341c0 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index baac196..227bd71 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 # Server-side
 # This particular response is an exact excerpt from an actual Apache
 # server when asked for a 0-10,12-15 range (except gt/lt changed to {}
index 374be28..2036773 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 870d236..147be0a 100644 (file)
@@ -49,7 +49,7 @@ Proxy-Connection: Keep-Alive
 </protocol>
 <file name="log/jar171" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .z.x.com       TRUE    /       FALSE   0       XToken  xt
index 1ab9020..b3efae9 100644 (file)
@@ -31,7 +31,7 @@ http://%HOSTIP:%HTTPPORT/we/want/172 -b log/jar172.txt -b "tool=curl; name=fool"
 </command>
 <file name="log/jar172.txt">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .%HOSTIP       TRUE    /silly/ FALSE   0       ismatch this
index fc5ccc1..9767f2f 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
@@ -6,7 +13,7 @@ HTTP/1.1 200 beng swsclose
 Server: Microsoft-IIS/6.0\r
 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth\r
 Content-Type: text/html; charset=iso-8859-1\r
-Content-Length: 26
+Content-Length: 26\r
 \r
 This is not the real page
 </data>
index 2ee78d5..9e005f1 100644 (file)
@@ -22,7 +22,7 @@ This is not the real page
 HTTP/1.1 200 moo swsclose\r
 Server: Microsoft-IIS/6.0\r
 Content-Type: text/html; charset=iso-8859-1\r
-Content-Length: 16
+Content-Length: 16\r
 \r
 content for you
 </data1>
@@ -36,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1
 HTTP/1.1 200 moo swsclose\r
 Server: Microsoft-IIS/6.0\r
 Content-Type: text/html; charset=iso-8859-1\r
-Content-Length: 16
+Content-Length: 16\r
 \r
 content for you
 </datacheck>
index d3b220b..413c149 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 # the first request has NTLM type-1 included, and then the 1001 is returned
@@ -15,7 +22,7 @@ Content-Type: text/html; charset=iso-8859-1
 HTTP/1.1 200 moo swsclose\r
 Server: Microsoft-IIS/6.0\r
 Content-Type: text/html; charset=iso-8859-1\r
-Content-Length: 16
+Content-Length: 16\r
 \r
 content for you
 </data>
@@ -29,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1
 HTTP/1.1 200 moo swsclose\r
 Server: Microsoft-IIS/6.0\r
 Content-Type: text/html; charset=iso-8859-1\r
-Content-Length: 16
+Content-Length: 16\r
 \r
 content for you
 </datacheck>
index 07f0566..7481467 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index ff65817..43e3ab3 100644 (file)
@@ -9,24 +9,24 @@ HTTP GET
 # Server-side
 <reply>
 <data nocheck="yes">
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 moo
 </data>
 <data2>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 foo
 </data2>
 <data3>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 hoo
 </data3>
 </reply>
@@ -68,22 +68,22 @@ Accept: */*
 </protocol>
 <stdout>
 --_curl_--%HOSTIP:%HTTPPORT/18
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 moo
 --_curl_--%HOSTIP:%HTTPPORT/180002
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 foo
 --_curl_--%HOSTIP:%HTTPPORT/180003
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 4\r
-
+\r
 hoo
 </stdout>
 </verify>
index c93302e..0b2ca03 100644 (file)
@@ -1,4 +1,12 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+HTTP/1.0
+</keywords>
+</info>
+
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
index 87c5701..b6b55cb 100644 (file)
@@ -1,4 +1,12 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP/1.0
+</keywords>
+</info>
+
 <reply>
 <data>
 HTTP/1.0 200 OK swsclose
index 272cdee..f640a0e 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data sendzero="yes">
index 5a1b7b9..b07736c 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 5548510..deb6e89 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 4789cfa..6f5d66a 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
diff --git a/tests/data/test1900 b/tests/data/test1900
new file mode 100644 (file)
index 0000000..857c609
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1901 b/tests/data/test1901
new file mode 100644 (file)
index 0000000..bacf9cb
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 1 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, blacklisted site
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+blacklist_site 127.0.0.1:%HTTPPIPEPORT
+0 1k.txt
+1000 100k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1902 b/tests/data/test1902
new file mode 100644 (file)
index 0000000..22f2621
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 1 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, broken pipe
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 connection_close.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+0 1k.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1903 b/tests/data/test1903
new file mode 100644 (file)
index 0000000..01efa67
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+Adding handle 0
+Handle 0 Completed with status 0
+Adding handle 1
+Adding handle 2
+Adding handle 3
+Adding handle 4
+Adding handle 5
+Adding handle 6
+Handle 2 Completed with status 0
+Handle 3 Completed with status 0
+Handle 4 Completed with status 0
+Handle 5 Completed with status 0
+Handle 6 Completed with status 0
+Handle 1 Completed with status 0
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http-pipe
+</server>
+<tool>
+lib1900
+</tool>
+ <name>
+HTTP GET using pipelining, penalized on content-length
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPIPEPORT/
+</command>
+<file name="log/urls.txt">
+0 1k.txt
+1000 100k.txt
+550 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+10 alphabet.txt
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
index 2c56cc8..86fa29f 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 5f59e18..42cebc0 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 582f197..1010ee9 100644 (file)
@@ -13,7 +13,7 @@ Resume
 <data>
 HTTP/1.1 416 Requested Range Not Satisfiable swsclose\r
 Date: Fri, 24 Oct 2003 21:33:12 GMT\r
-Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
+Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT\r
 ETag: "ab57a-507-3f9968f3"\r
 Accept-Ranges: bytes\r
index 788c89a..3059e8d 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
index b070f38..ee9d339 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
index 062f469..c299a22 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index bb451b5..dca26b9 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index c9651bc..e8df66e 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply name="1">
diff --git a/tests/data/test2005 b/tests/data/test2005
new file mode 100644 (file)
index 0000000..061f99b
--- /dev/null
@@ -0,0 +1,93 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 37
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2005; charset=funny; option=strange
+Funny-head: yesyes
+
+Data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2005.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2005.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2005">
+   <verification>
+    <hash type="sha256">a430d26389c69b7a245a9ad692cf20b4dc026fb7c2ff8a2c164c49a77130d6d9</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2005</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2005 log/name2005
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2005 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2005">
+Data delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2005">
+</file2>
+<file3 name="log/stderr2005">
+Metalink: parsing (file://%PWD/log/test2005.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2005.metalink) OK
+Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005)...
+Metalink: fetching (log/download2005) from (http://%HOSTIP:%HTTPPORT/2005) OK
+Metalink: validating (log/download2005)...
+Metalink: validating (log/download2005) [sha-256] OK
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2006 b/tests/data/test2006
new file mode 100644 (file)
index 0000000..e25556f
--- /dev/null
@@ -0,0 +1,112 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:49:01 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2006; charset=funny; option=strange
+Funny-head: yesyes
+
+Some data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# This relies on the debug feature to allow us to set directory to store the
+# -O output in, using the CURL_TESTDIR variable. This test might use it upon
+# failure only, successful execution won't actually use it.
+<features>
+debug
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -O -D file
+ </name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2006.metalink -O -D log/heads2006
+</command>
+# local metalink file written before test command runs
+<file name="log/test2006.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2006">
+   <verification>
+    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+    <hash type="sha256">319cb6be756734b7ff689628ca3265580cdae6a0e38f42d4ac612ff4fba143b0</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2006</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2006 log/name2006
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2006 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2006">
+Some data delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2006">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:49:01 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2006; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2006">
+</file3>
+<file4 name="log/stderr2006">
+Metalink: parsing (file://%PWD/log/test2006.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2006.metalink) OK
+Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006)...
+Metalink: fetching (log/download2006) from (http://%HOSTIP:%HTTPPORT/2006) OK
+Metalink: validating (log/download2006)...
+Metalink: validating (log/download2006) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2007 b/tests/data/test2007
new file mode 100644 (file)
index 0000000..cc4bd8c
--- /dev/null
@@ -0,0 +1,113 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:50:02 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2007; charset=funny; option=strange
+Funny-head: yesyes
+
+Something delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# This relies on the debug feature to allow us to set directory to store the
+# -O and -J output in, using the CURL_TESTDIR variable. This test might use
+# it upon failure only, successful execution won't actually use it.
+<features>
+debug
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -O -J -D file
+ </name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2007.metalink -J -O -D log/heads2007
+</command>
+# local metalink file written before test command runs
+<file name="log/test2007.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2007">
+   <verification>
+    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+    <hash type="sha256">52899e30f80e3490632d505653204e1fb5b02bda141048704ce9a0ed00b8a3f5</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2007</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2007 log/name2007
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2007 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2007">
+Something delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2007">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 14:50:02 GMT
+Server: test-server/fake
+Content-Length: 42
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2007; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2007">
+</file3>
+<file4 name="log/stderr2007">
+Metalink: parsing (file://%PWD/log/test2007.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2007.metalink) OK
+Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007)...
+Metalink: fetching (log/download2007) from (http://%HOSTIP:%HTTPPORT/2007) OK
+Metalink: validating (log/download2007)...
+Metalink: validating (log/download2007) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2008 b/tests/data/test2008
new file mode 100644 (file)
index 0000000..5843792
--- /dev/null
@@ -0,0 +1,105 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 15:23:48 GMT
+Server: test-server/fake
+Content-Length: 43
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2008; charset=funny; option=strange
+Funny-head: yesyes
+
+Some stuff delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2008.metalink -o log/outfile2008 -D log/heads2008
+</command>
+# local metalink file written before test command runs
+<file name="log/test2008.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2008">
+   <verification>
+    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+    <hash type="sha256">711b1b566b536c5baae9b36f2f5c1830a7c8ff126d1afa2febc5b59f8d0aab54</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2008</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2008 log/name2008 log/outfile2008
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2008 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2008">
+Some stuff delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2008">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 15:23:48 GMT
+Server: test-server/fake
+Content-Length: 43
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2008; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2008">
+</file3>
+<file4 name="log/stderr2008">
+Metalink: parsing (file://%PWD/log/test2008.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2008.metalink) OK
+Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008)...
+Metalink: fetching (log/download2008) from (http://%HOSTIP:%HTTPPORT/2008) OK
+Metalink: validating (log/download2008)...
+Metalink: validating (log/download2008) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2009 b/tests/data/test2009
new file mode 100644 (file)
index 0000000..84482ce
--- /dev/null
@@ -0,0 +1,106 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 16:27:17 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2009; charset=funny; option=strange
+Funny-head: yesyes
+
+Some contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -J -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2009.metalink -J -o log/outfile2009 -D log/heads2009
+</command>
+# local metalink file written before test command runs
+<file name="log/test2009.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2009">
+   <verification>
+    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+    <hash type="sha256">e4c5b83384ba7d5f8e201d61747a14f29baacd7dfadce0fbd56661db4bba72b2</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2009</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2009 log/name2009 log/outfile2009
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2009 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2009">
+Some contents delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2009">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 16:27:17 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2009; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2009">
+</file3>
+<file4 name="log/stderr2009">
+Metalink: parsing (file://%PWD/log/test2009.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2009.metalink) OK
+Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009)...
+Metalink: fetching (log/download2009) from (http://%HOSTIP:%HTTPPORT/2009) OK
+Metalink: validating (log/download2009)...
+Metalink: validating (log/download2009) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
index eb24224..254e241 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+FILE
+FAILURE
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
diff --git a/tests/data/test2010 b/tests/data/test2010
new file mode 100644 (file)
index 0000000..b8b3ddc
--- /dev/null
@@ -0,0 +1,105 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 17:37:27 GMT
+Server: test-server/fake
+Content-Length: 41
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2010; charset=funny; option=strange
+Funny-head: yesyes
+
+Contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+file
+Metalink
+</features>
+<server>
+http
+</server>
+ <name>
+Metalink local XML file, HTTP resource, using -o fname -i -D file
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2010.metalink -i -o log/outfile2010 -D log/heads2010
+</command>
+# local metalink file written before test command runs
+<file name="log/test2010.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2010">
+   <verification>
+    <hash type="md5">we-only-check-the-strongest-hash-provided</hash>
+    <hash type="sha256">19dcb4e2a99b9cd02c30b1ed6c55869b7ef8cda9f985648909c48a6dbb54356c</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2010</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2010 log/name2010 log/outfile2010
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2010 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2010">
+Contents delivered from an HTTP resource
+</file1>
+<file2 name="log/heads2010">
+HTTP/1.1 200 OK
+Date: Thu, 21 Jun 2012 17:37:27 GMT
+Server: test-server/fake
+Content-Length: 41
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2010; charset=funny; option=strange
+Funny-head: yesyes
+
+</file2>
+<file3 name="log/stdout2010">
+</file3>
+<file4 name="log/stderr2010">
+Metalink: parsing (file://%PWD/log/test2010.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2010.metalink) OK
+Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010)...
+Metalink: fetching (log/download2010) from (http://%HOSTIP:%HTTPPORT/2010) OK
+Metalink: validating (log/download2010)...
+Metalink: validating (log/download2010) [sha-256] OK
+</file4>
+<stripfile4>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile4>
+</verify>
+</testcase>
diff --git a/tests/data/test2011 b/tests/data/test2011
new file mode 100644 (file)
index 0000000..46785cf
--- /dev/null
@@ -0,0 +1,93 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 37
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2011; charset=funny; option=strange
+Funny-head: yesyes
+
+Data delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource, hash mismatch
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2011.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2011.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2011">
+   <verification>
+    <hash type="sha256">badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2011</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2011 log/name2011
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2011 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2011">
+Data delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2011">
+</file2>
+<file3 name="log/stderr2011">
+Metalink: parsing (file://%PWD/log/test2011.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2011.metalink) OK
+Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011)...
+Metalink: fetching (log/download2011) from (http://%HOSTIP:%HTTPPORT/2011) OK
+Metalink: validating (log/download2011)...
+Metalink: validating (log/download2011) [sha-256] FAILED (digest mismatch)
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2012 b/tests/data/test2012
new file mode 100644 (file)
index 0000000..59c042d
--- /dev/null
@@ -0,0 +1,92 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 46
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2012; charset=funny; option=strange
+Funny-head: yesyes
+
+Some contents delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, HTTP resource, without hash
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2012.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2012.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2012">
+   <verification>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2012</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2012 log/name2012
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /2012 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<file1 name="log/download2012">
+Some contents delivered from an HTTP resource
+</file1>
+<file2 name="log/stdout2012">
+</file2>
+<file3 name="log/stderr2012">
+Metalink: parsing (file://%PWD/log/test2012.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2012.metalink) WARNING (digest missing)
+Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012)...
+Metalink: fetching (log/download2012) from (http://%HOSTIP:%HTTPPORT/2012) OK
+Metalink: validating (log/download2012)...
+Metalink: validating (log/download2012) FAILED (digest missing)
+</file3>
+<stripfile3>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile3>
+</verify>
+</testcase>
diff --git a/tests/data/test2013 b/tests/data/test2013
new file mode 100644 (file)
index 0000000..60e85f3
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2013; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX absolute path
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2013.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2013.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="/tmp/download2013">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2013</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2013 log/name2013 /tmp/download2013
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2013">
+</file1>
+<file2 name="log/stderr2013">
+Metalink: parsing (file://%PWD/log/test2013.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2013.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2013.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2014 b/tests/data/test2014
new file mode 100644 (file)
index 0000000..01dc8b3
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2014; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX path relative to current
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2014.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2014.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="./log/download2014">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2014</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2014 log/name2014 log/download2014
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2014">
+</file1>
+<file2 name="log/stderr2014">
+Metalink: parsing (file://%PWD/log/test2014.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2014.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2014.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2015 b/tests/data/test2015
new file mode 100644 (file)
index 0000000..e4d09d5
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2015; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX path relative to upper
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2015.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2015.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="../tests/log/download2015">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2015</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2015 log/name2015 log/download2015
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2015">
+</file1>
+<file2 name="log/stderr2015">
+Metalink: parsing (file://%PWD/log/test2015.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2015.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2015.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2016 b/tests/data/test2016
new file mode 100644 (file)
index 0000000..fbd6cd5
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2016; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX path traversal
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2016.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2016.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/../log/download2016">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2016</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2016 log/name2016 log/download2016
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2016">
+</file1>
+<file2 name="log/stderr2016">
+Metalink: parsing (file://%PWD/log/test2016.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2016.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2016.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2017 b/tests/data/test2017
new file mode 100644 (file)
index 0000000..52df14e
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2017; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX home path traversal
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2017.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2017.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="~/download2017">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2017</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2017 log/name2017
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2017">
+</file1>
+<file2 name="log/stderr2017">
+Metalink: parsing (file://%PWD/log/test2017.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2017.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2017.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2018 b/tests/data/test2018
new file mode 100644 (file)
index 0000000..b76233e
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2018; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX questionable file name I
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2018.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2018.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/.download2018">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2018</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2018 log/name2018 log/.download2018
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2018">
+</file1>
+<file2 name="log/stderr2018">
+Metalink: parsing (file://%PWD/log/test2018.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2018.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2018.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2019 b/tests/data/test2019
new file mode 100644 (file)
index 0000000..cd09804
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2019; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX questionable file name II
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2019.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2019.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name=".">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2019</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2019 log/name2019
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2019">
+</file1>
+<file2 name="log/stderr2019">
+Metalink: parsing (file://%PWD/log/test2019.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2019.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2019.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
index 5178470..f863ec5 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
diff --git a/tests/data/test2020 b/tests/data/test2020
new file mode 100644 (file)
index 0000000..f89600b
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2020; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX questionable file name III
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2020.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2020.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="..">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2020</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2020 log/name2020
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2020">
+</file1>
+<file2 name="log/stderr2020">
+Metalink: parsing (file://%PWD/log/test2020.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2020.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2020.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2021 b/tests/data/test2021
new file mode 100644 (file)
index 0000000..133eb16
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2021; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX questionable file name IV
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2021.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2021.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2021 >/dev/null">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2021</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2021 log/name2021 log/download2021
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2021">
+</file1>
+<file2 name="log/stderr2021">
+Metalink: parsing (file://%PWD/log/test2021.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2021.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2021.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2022 b/tests/data/test2022
new file mode 100644 (file)
index 0000000..8cb0df5
--- /dev/null
@@ -0,0 +1,78 @@
+<testcase>
+<info>
+<keywords>
+Metalink
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Wed, 20 Jun 2012 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 56
+Connection: close
+Content-Type: text/html
+Content-Disposition: filename=name2022; charset=funny; option=strange
+Funny-head: yesyes
+
+Data that should not be delivered from an HTTP resource
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+file
+Metalink
+</features>
+ <name>
+Metalink local XML file, attempt UNIX questionable file name V
+ </name>
+<command option="no-output,no-include">
+--metalink file://%PWD/log/test2022.metalink
+</command>
+# local metalink file written before test command runs
+<file name="log/test2022.metalink">
+<?xml version="1.0" encoding="utf-8"?>
+<metalink version="3.0" xmlns="http://www.metalinker.org/">
+ <files>
+  <file name="log/download2022 |/dev/null">
+   <verification>
+    <hash type="sha256">c7d03debe90ca29492203ea921d76941fa98640cf3b744f2a16c9b58465eab82</hash>
+   </verification>
+   <resources maxconnections="1">
+    <url type="http" preference="90">http://%HOSTIP:%HTTPPORT/2022</url>
+   </resources>
+  </file>
+ </files>
+</metalink>
+</file>
+<postcheck>
+perl %SRCDIR/libtest/notexists.pl log/2022 log/name2022 log/download2022
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file1 name="log/stdout2022">
+</file1>
+<file2 name="log/stderr2022">
+Metalink: parsing (file://%PWD/log/test2022.metalink) metalink/XML...
+Metalink: parsing (file://%PWD/log/test2022.metalink) WARNING (missing or invalid file name)
+Metalink: parsing (file://%PWD/log/test2022.metalink) FAILED
+</file2>
+<stripfile2>
+$_ = '' if (($_ !~ /^Metalink: /) && ($_ !~ /error/i) && ($_ !~ /warn/i))
+</stripfile2>
+</verify>
+</testcase>
diff --git a/tests/data/test2023 b/tests/data/test2023
new file mode 100644 (file)
index 0000000..9b04ff3
--- /dev/null
@@ -0,0 +1,162 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data100>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2023 basic basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20230100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20230200 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20230300 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20230400 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20230500 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2024 b/tests/data/test2024
new file mode 100644 (file)
index 0000000..1fbb204
--- /dev/null
@@ -0,0 +1,172 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and Digest headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data100>
+
+<!-- Second request has Digest auth, right password -->
+<data1200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic switching to Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2024 basic digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20240100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20240200 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20240200", response="ed646c565f79e2dd9fa37cb5a621213c"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20240300 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20240400 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20240400", response="9741ced8caacc6124770187b36f007c5"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20240500 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20240500", response="5bc77ec8c2d443b27a1b55f1fd8fbb13"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2025 b/tests/data/test2025
new file mode 100644 (file)
index 0000000..4c8df18
--- /dev/null
@@ -0,0 +1,271 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Basic auth, wrong password -->
+<data100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data100>
+
+<!-- Second request has NTLM auth, right password -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has Basic auth, wrong password -->
+<data300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data300>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Basic or NTLM auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need Basic or NTLM auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Basic switching to NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2025 basic ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20250100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250300 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20250500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2026 b/tests/data/test2026
new file mode 100644 (file)
index 0000000..c940b6f
--- /dev/null
@@ -0,0 +1,216 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and Digest headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Basic or Digest auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+\r
+This is a bad password page!
+</data1100>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Basic or Digest auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+\r
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or Digest auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Need Basic or Digest auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest switching to Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2026 digest basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20260100 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260100 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20260100", response="5f992a2e761ab926256419f7c685f85b"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260200 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260300 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260300 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20260300", response="132242e602882251929be93228c830ae"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260400 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20260500 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2027 b/tests/data/test2027
new file mode 100644 (file)
index 0000000..c84e24b
--- /dev/null
@@ -0,0 +1,244 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!--
+
+ Explanation for the duplicate 400 requests:
+
+ libcurl doesn't detect that a given Digest password is wrong already on the
+ first 401 response (as the data400 gives). libcurl will instead consider the
+ new response just as a duplicate and it sends another and detects the auth
+ problem on the second 401 response!
+
+-->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+\r
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+\r
+This is a bad password page!
+</data1100>
+
+<!-- Second request has Digest auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+\r
+This is not the real page!
+</data200>
+
+<data1200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+\r
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest auth (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="6"\r
+\r
+This is not the real page!
+</data400>
+
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 Need Digest auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Need Digest auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2027 digest digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20270100 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270100 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20270100", response="f7fd60eefaff5225971bf9b3d80d6ba6"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270200 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20270200", response="785ca3ef511999f7e9c178195f5b388c"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270300 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270300 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20270300", response="4c735d2360fd6848e7cb32a11ae3612b"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270400 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270400 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20270500 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20270500", response="8ef4d935fd964a46c3965c0863b52cf1"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2028 b/tests/data/test2028
new file mode 100644 (file)
index 0000000..793ad3e
--- /dev/null
@@ -0,0 +1,315 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Digest and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has Digest auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest or NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+\r
+This is not the real page!
+</data100>
+
+<data1100>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1100>
+
+<!-- Second request has NTLM auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest or NTLM auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+\r
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has Digest auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest or NTLM auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data300>
+
+<data1300>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+</data1300>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest or NTLM auth (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="6"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need Digest or NTLM auth (5)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="8"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 Need Digest or NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 Need Digest or NTLM auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+WWW-Authenticate: NTLM\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (Digest switching to NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2028 digest ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20280100 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280100 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20280100", response="53c80666f5e3a4a55f92a66aaf0078bb"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280300 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280300 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="4", uri="/20280300", response="1aa5d90da9803ca12d04b24e0f19476e"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20280500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2029 b/tests/data/test2029
new file mode 100644 (file)
index 0000000..7b8a5e2
--- /dev/null
@@ -0,0 +1,239 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Basic and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1102>
+
+<!-- Second request has Basic auth, right password -->
+<data200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data200>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Basic or NTLM auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has Basic auth, wrong password -->
+<data400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+</data400>
+
+<!-- Fifth request has Basic auth, right password -->
+<data500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data500>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Basic realm="testrealm"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Basic realm="testrealm"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM switching to Basic)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2029 ntlm basic
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20290100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290200 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290400 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20290500 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
index c7cdce5..366cc2c 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
diff --git a/tests/data/test2030 b/tests/data/test2030
new file mode 100644 (file)
index 0000000..8de81d0
--- /dev/null
@@ -0,0 +1,296 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Alternate the order that Digest and NTLM headers appear in responses to
+ensure that the order doesn't matter. -->
+
+<!--
+
+ Explanation for the duplicate 400 requests:
+
+ libcurl doesn't detect that a given Digest password is wrong already on the
+ first 401 response (as the data400 gives). libcurl will instead consider the
+ new response just as a duplicate and it sends another and detects the auth
+ problem on the second 401 response!
+
+-->
+
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need Digest or NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="1"\r
+\r
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1102>
+
+<!-- Second request has Digest auth, right password -->
+<data200>
+HTTP/1.1 401 Need Digest or NTLM auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="3"\r
+\r
+This is not the real page!
+</data200>
+
+<data1200>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1200>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need Digest or NTLM auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="4"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has Digest auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need Digest or NTLM auth (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="6"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data400>
+
+<data1400>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+</data1400>
+
+<!-- Fifth request has Digest auth, right password -->
+<data500>
+HTTP/1.1 401 Need Digest or NTLM auth (5)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: Digest realm="testrealm", nonce="8"\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data500>
+
+<data1500>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1500>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: Digest realm="testrealm", nonce="2"\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="5"\r
+\r
+This is a bad password page!
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+WWW-Authenticate: Digest realm="testrealm", nonce="7"\r
+\r
+This is a bad password page!
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM switching to Digest)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2030 ntlm digest
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20300100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300200 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20300200", response="2f2d784ba53a0a307758a90e98d25c27"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300400 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300400 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20300500 HTTP/1.1\r
+Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20300500", response="198757e61163a779cf24ed4c49c1ad7d"\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2031 b/tests/data/test2031
new file mode 100644 (file)
index 0000000..19f7533
--- /dev/null
@@ -0,0 +1,320 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- First request has NTLM auth, wrong password -->
+<data100>
+HTTP/1.1 401 Need NTLM auth\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data100>
+
+<data1101>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1101>
+
+<data1102>
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1102>
+
+<!-- Second request has NTML auth, right password -->
+<data200>
+HTTP/1.1 401 Need NTLM auth (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1202>
+
+<!-- Third request has NTLM auth, wrong password -->
+<data300>
+HTTP/1.1 401 Need NTLM auth (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data300>
+
+<data1301>
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1301>
+
+<data1302>
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1302>
+
+<!-- Fourth request has NTLM auth, wrong password -->
+<data400>
+HTTP/1.1 401 Need NTLM auth (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data400>
+
+<data1401>
+HTTP/1.1 401 NTLM intermediate (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1401>
+
+<data1402>
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+</data1402>
+
+<!-- Fifth request has NTLM auth, right password -->
+<data500>
+HTTP/1.1 401 Need NTLM auth (5)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 27\r
+WWW-Authenticate: NTLM\r
+\r
+This is not the real page!
+</data500>
+
+<data1501>
+HTTP/1.1 401 NTLM intermediate (5)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+This is still not the real page!
+</data1501>
+
+<data1502>
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</data1502>
+
+<datacheck>
+HTTP/1.1 401 NTLM intermediate\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+HTTP/1.1 401 NTLM intermediate (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (4)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 401 Sorry wrong password (3)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 29\r
+WWW-Authenticate: NTLM\r
+\r
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (5)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 33\r
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
+\r
+HTTP/1.1 200 Things are fine in server land (2)\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 32\r
+\r
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libauthretry
+</tool>
+
+ <name>
+HTTP authorization retry (NTLM)
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20310100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310100 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310300 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310400 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /20310500 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2032 b/tests/data/test2032
new file mode 100644 (file)
index 0000000..02aca81
--- /dev/null
@@ -0,0 +1,146 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Basic auth -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- NTML auth -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+libntlmconnect
+</tool>
+
+ <name>
+NTLM connection mapping
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2032
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20320100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test2033 b/tests/data/test2033
new file mode 100644 (file)
index 0000000..d3e2fbd
--- /dev/null
@@ -0,0 +1,147 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Basic auth
+HTTP NTLM auth
+pipelining
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<!-- Basic auth -->
+<data100>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+</data100>
+
+<!-- NTML auth -->
+<data200>
+HTTP/1.1 401 Need Basic or NTLM auth (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 27
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is not the real page!
+</data200>
+
+<data1201>
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+This is still not the real page!
+</data1201>
+
+<data1202>
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</data1202>
+
+<datacheck>
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 Need Basic or NTLM auth
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Basic realm="testrealm"
+
+This is a bad password page!
+HTTP/1.1 401 NTLM intermediate (2)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 33
+WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
+
+HTTP/1.1 200 Things are fine in server land
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 32
+
+Finally, this is the real page!
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+NTLM
+</features>
+<server>
+http
+</server>
+<tool>
+lib2033
+</tool>
+
+ <name>
+NTLM connection mapping, pipelining enabled
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://%HOSTIP:%HTTPPORT/2032
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /20320100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320100 HTTP/1.1\r
+Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+GET /20320200 HTTP/1.1\r
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
+Host: 127.0.0.1:8990\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
index c4e219e..9cc7b01 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
 # no Server-side
 
 # Client-side
index edcf7fe..4af93f6 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+FILE
+FAILURE
+</keywords>
+</info>
+
 # no Server-side
 
 # Client-side
index caf9113..902d0a6 100644 (file)
@@ -12,14 +12,20 @@ HTTP proxy Digest auth
 
 # Server-side
 <reply>
+<servercmd>
+connection-monitor
+auth_required
+</servercmd>
+
 
 # this is returned first since we get no proxy-auth
-<data>
+<connect>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
+Content-Length: 33\r
 \r
 And you should ignore this data.
-</data>
+</connect>
 
 # this is returned when we get a GET!
 <data2>
@@ -34,16 +40,16 @@ daniel
 </data2>
 
 # then this is returned when we get proxy-auth
-<data1000>
+<connect1000>
 HTTP/1.1 200 OK swsbounce\r
 Server: no
 \r
-Nice proxy auth sir!
-</data1000>
+</connect1000>
 
 <datacheck>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
+Content-Length: 33\r
 \r
 HTTP/1.1 200 OK swsbounce\r
 Server: no
@@ -71,7 +77,7 @@ crypto
 HTTP proxy CONNECT auth Digest
  </name>
  <command>
-http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
+http://test.remote.haxx.se.206:8990/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
 </command>
 </client>
 
@@ -81,20 +87,21 @@ http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --p
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:206 HTTP/1.1\r
-Host: test.remote.haxx.se:206\r
+CONNECT test.remote.haxx.se.206:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.206:8990\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:206 HTTP/1.1\r
-Host: test.remote.haxx.se:206\r
-Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:206", response="676e0836f3e1c5b31bf29770ef9d8224"\r
+CONNECT test.remote.haxx.se.206:8990 HTTP/1.1\r
+Host: test.remote.haxx.se.206:8990\r
+Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/2060002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:206\r
+Host: test.remote.haxx.se.206:8990\r
 Accept: */*\r
 \r
+[DISCONNECT]
 </protocol>
 </verify>
 </testcase>
index c2eff63..85f9af6 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 81cdcbd..d8bd8bd 100644 (file)
@@ -13,21 +13,21 @@ HTTP proxy NTLM auth
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
 \r
 And you should ignore this data.
-</data1001>
+</connect1001>
 
 # This is supposed to be returned when the server gets the second
 # Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
 HTTP/1.1 200 Things are fine in proxy land\r
 Server: Microsoft-IIS/5.0\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
-</data1002>
+</connect1002>
 
 # this is returned when we get a GET!
 <data2>
@@ -86,7 +86,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
+http://test.remote.example.com.209:%HTTPPORT/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
 </command>
 <precheck>
 chkhostname curlhost
@@ -99,19 +99,19 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:209 HTTP/1.1\r
-Host: test.remote.haxx.se:209\r
+CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.209:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:209 HTTP/1.1\r
-Host: test.remote.haxx.se:209\r
+CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.209:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
 Proxy-Connection: Keep-Alive\r
 \r
 GET /path/2090002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:209\r
+Host: test.remote.example.com.209:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
index 83c9b3e..e904567 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 0214eff..96d0573 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 8a10abf..8daed55 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index bb7763b..5c14aa8 100644 (file)
@@ -13,21 +13,21 @@ HTTP proxy NTLM auth
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
 HTTP/1.1 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
 \r
 And you should ignore this data.
-</data1001>
+</connect1001>
 
 # This is supposed to be returned when the server gets the second
 # Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
 HTTP/1.1 200 Things are fine in proxy land\r
 Server: Microsoft-IIS/5.0\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
-</data1002>
+</connect1002>
 
 # this is returned when we get a GET!
 <data2>
@@ -86,7 +86,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -99,19 +99,19 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol nonewline="yes">
-CONNECT test.remote.haxx.se:213 HTTP/1.0\r
-Host: test.remote.haxx.se:213\r
+CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
+Host: test.remote.example.com.213:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:213 HTTP/1.0\r
-Host: test.remote.haxx.se:213\r
+CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
+Host: test.remote.example.com.213:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
 Proxy-Connection: Keep-Alive\r
 \r
 POST /path/2130002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:213\r
+Host: test.remote.example.com.213:%HTTPPORT\r
 Accept: */*\r
 Content-Length: 6\r
 Content-Type: application/x-www-form-urlencoded\r
index e12dfbf..a9b8fcd 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 5005817..8770efb 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 # When doing LIST, we get the default list output hard-coded in the test
index a8264ce..0c4de0a 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 </reply>
index f288008..f10df56 100644 (file)
@@ -15,11 +15,11 @@ followlocation
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data nocheck="yes">
+<connect nocheck="yes">
 HTTP/1.1 405 Method Not Allowed swsclose\r
 \r
 And you should ignore this data.
-</data>
+</connect>
 
 </reply>
 
@@ -32,7 +32,7 @@ http
 HTTP proxy CONNECT to proxy returning 405
  </name>
  <command>
-http://test.remote.haxx.se:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
+http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n"
 </command>
 </client>
 
@@ -42,8 +42,8 @@ http://test.remote.haxx.se:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --p
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-CONNECT test.remote.haxx.se:217 HTTP/1.1\r
-Host: test.remote.haxx.se:217\r
+CONNECT test.remote.example.com.217:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.217:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 \r
 </protocol>
index dc146fc..c201e77 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 734379e..2e8bdec 100644 (file)
@@ -9,10 +9,10 @@ long URL
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 OK
-Funny-head: yesyes
+HTTP/1.1 200 OK\r
+Funny-head: yesyes\r
 Content-Length: 27\r
-
+\r
 This is the proof it works
 </data>
 </reply>
index 912ea41..6994957 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
 # Server-side
 <reply>
 # 16 bytes to check
@@ -17,7 +23,7 @@ file
 file:// with resume
  </name>
  <command>
-file://localhost/%PWD/log/test231.txt -C 10-
+file://localhost/%PWD/log/test231.txt -C 10
 </command>
 <file name="log/test231.txt">
 A01234567
index ee843f1..6250232 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 </reply>
index 20d0470..9ba706f 100644 (file)
@@ -1,4 +1,9 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
 
 # Server-side
 <reply>
index 9675a1e..9a40f1f 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
index 6397e3b..ea54509 100644 (file)
@@ -1,9 +1,14 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <servercmd>
 REPLY EPSV 229 Entering Passiv Mode (|||1000000|)
-REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127)
 </servercmd>
 </reply>
 
@@ -13,7 +18,7 @@ REPLY PASV 227 Entering Passiv Mode (1216,256,2,127,127,127)
 ftp
 </server>
  <name>
-FTP getting bad port in response to EPSV and in response to PASV
+FTP getting bad port in response to EPSV
  </name>
  <command>
 ftp://%HOSTIP:%FTPPORT/238
@@ -22,20 +27,16 @@ ftp://%HOSTIP:%FTPPORT/238
 
 # Verify data after the test has been "shot"
 <verify>
-# curl: (15) Can't resolve new host 1216.256.2.127:32639
-# 15 => CURLE_FTP_CANT_GET_HOST
-# some systems just don't fail on the illegal host name/address but instead
-# moves on and attempt to connect to... yes, to what?
-# 7= CURLE_COULDNT_CONNECT
+# 13 = CURLE_FTP_WEIRD_PASV_REPLY
 <errorcode>
-7, 15
+13
 </errorcode>
 <protocol>
 USER anonymous\r
 PASS ftp@example.com\r
 PWD\r
 EPSV\r
-PASV\r
+QUIT\r
 </protocol>
 </verify>
 </testcase>
index 7985f43..a2b28a9 100644 (file)
@@ -24,7 +24,7 @@ http
 HTTP GET fail silently on HTTP error return
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/24 --fail
+http://%HOSTIP:%HTTPPORT/24 --fail --silent --show-error
 </command>
 </client>
 
@@ -43,5 +43,8 @@ Accept: */*
 <errorcode>
 22
 </errorcode>
+<file2 name="log/stderr24" mode="text">
+curl: (22) The requested URL returned error: 404 BAD BOY
+</file2>
 </verify>
 </testcase>
index 66c674e..2720144 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 <reply>
 <mdtm>
 213 20030409102659
index 814b1d7..d254a95 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 <reply>
 <mdtm>
 213 20050409102659
index 69df5be..4f99c2a 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 2c99c46..aeed134 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 73ee09e..d50e1b3 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 # When doing LIST, we get the default list output hard-coded in the test
index c211c2f..45642d5 100644 (file)
@@ -64,9 +64,6 @@ If this is received, the location following worked
 
 # Client-side
 <client>
-<features>
-netrc_debug
-</features>
 <server>
 http
 </server>
@@ -74,11 +71,11 @@ http
 HTTP Location: following with --netrc-optional
  </name>
  <command>
-http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional
+http://supersite.com/want/257 -L -x http://%HOSTIP:%HTTPPORT --netrc-optional --netrc-file log/netrc257
 </command>
 
 # netrc auth for two out of three sites:
-<file name="log/netrc">
+<file name="log/netrc257">
 machine supersite.com login user1 password passwd1
 machine anotherone.com login user2 password passwd2
 </file>
index 18d20a6..07de455 100644 (file)
@@ -13,23 +13,23 @@ HTTP proxy NTLM auth
 <reply>
 
 # this is returned first since we get no proxy-auth
-<data1001>
+<connect1001>
 HTTP/1.0 407 Authorization Required to proxy me my dear\r
 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
 Content-Length: 1033\r
 \r
 And you should ignore this data.
 QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQz
-</data1001>
+</connect1001>
 
 # This is supposed to be returned when the server gets the second
 # Authorization: NTLM line passed-in from the client
-<data1002>
+<connect1002>
 HTTP/1.1 200 Things are fine in proxy land\r
 Server: Microsoft-IIS/5.0\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
-</data1002>
+</connect1002>
 
 # this is returned when we get a GET!
 <data2>
@@ -89,7 +89,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
+http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
 </command>
 <precheck>
 chkhostname curlhost
@@ -102,19 +102,19 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol nonewline="yes">
-CONNECT test.remote.haxx.se:265 HTTP/1.1\r
-Host: test.remote.haxx.se:265\r
+CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.265:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 Proxy-Connection: Keep-Alive\r
 \r
-CONNECT test.remote.haxx.se:265 HTTP/1.1\r
-Host: test.remote.haxx.se:265\r
+CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.265:%HTTPPORT\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
 Proxy-Connection: Keep-Alive\r
 \r
 POST /path/2650002 HTTP/1.1\r
 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
-Host: test.remote.haxx.se:265\r
+Host: test.remote.example.com.265:%HTTPPORT\r
 Accept: */*\r
 Content-Length: 6\r
 Content-Type: application/x-www-form-urlencoded\r
index bb23725..dc52a10 100644 (file)
@@ -12,7 +12,7 @@ HTTP Digest auth
 HTTP/1.1 401 Authorization Required swsclose\r
 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
 This is not the real page
@@ -33,7 +33,7 @@ This IS the real page!
 HTTP/1.1 401 Authorization Required swsclose\r
 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
 Content-Type: text/html; charset=iso-8859-1\r
 \r
 HTTP/1.1 200 OK swsclose\r
index 145c163..ac54e25 100644 (file)
@@ -14,6 +14,12 @@ proxytunnel
 #
 # Server-side
 <reply>
+<connect>
+HTTP/1.1 200 OK\r
+Connected-fine: sure\r
+\r
+</connect>
+
 <data>
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -24,7 +30,8 @@ Content-Length: 9
 contents
 </data>
 <datacheck>
-HTTP/1.1 200 Mighty fine indeed\r
+HTTP/1.1 200 OK\r
+Connected-fine: sure\r
 \r
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -41,12 +48,13 @@ contents
 <client>
 <server>
 http
+http-proxy
 </server>
  <name>
 HTTP CONNECT with proxytunnel getting two URLs from the same host
  </name>
  <command>
-http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com/we/want/that/page/275
+http://remotesite.com.275:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.275:%HTTPPORT/we/want/that/page/275
 </command>
 </client>
 
@@ -56,21 +64,23 @@ http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:m
 <strip>
 ^User-Agent:.*
 </strip>
-<protocol>
-CONNECT remotesite.com:80 HTTP/1.1\r
-Host: remotesite.com:80\r
+<proxy>
+CONNECT remotesite.com.275:%HTTPPORT HTTP/1.1\r
+Host: remotesite.com.275:%HTTPPORT\r
 Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol>
 GET /we/want/that/page/275 HTTP/1.1\r
 Authorization: Basic aWFtOm15c2VsZg==\r
-Host: remotesite.com\r
+Host: remotesite.com.275:%HTTPPORT\r
 Accept: */*\r
 \r
 GET /we/want/that/page/275 HTTP/1.1\r
 Authorization: Basic aWFtOm15c2VsZg==\r
-Host: remotesite.com\r
+Host: remotesite.com.275:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
index 18e4198..a509b40 100644 (file)
@@ -37,8 +37,8 @@ http://%HOSTIP:%HTTPPORT/want/277 -F name=daniel -H "Content-Type: text/info"
 ^User-Agent:.*
 </strip>
 <strippart>
-s/^------------------------------[a-z0-9]*/------------------------------/
-s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
+s/^--------------------------[a-z0-9]*/--------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
 </strippart>
 <protocol>
 POST /want/277 HTTP/1.1\r
@@ -47,13 +47,13 @@ Host: %HOSTIP:%HTTPPORT
 Accept: */*\r
 Content-Length: 145\r
 Expect: 100-continue\r
-Content-Type: text/info; boundary=----------------------------\r
+Content-Type: text/info; boundary=------------------------\r
 \r
-------------------------------\r
+--------------------------\r
 Content-Disposition: form-data; name="name"\r
 \r
 daniel\r
---------------------------------\r
+----------------------------\r
 </protocol>
 </verify>
 </testcase>
index 30f5834..ec4dfeb 100644 (file)
@@ -11,12 +11,11 @@ proxytunnel
 # Server-side
 <reply>
 
-# this is returned first since we get no proxy-auth
-<data nocheck="yes">
+<connect nocheck="yes">
 HTTP/1.1 405 Method Not Allowed swsclose\r
 \r
 And you should ignore this data.
-</data>
+</connect>
 
 </reply>
 
@@ -29,15 +28,15 @@ http
 HTTP proxy CONNECT with custom User-Agent header
  </name>
  <command>
-http://test.remote.haxx.se:287/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
+http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel
 </command>
 </client>
 
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-CONNECT test.remote.haxx.se:287 HTTP/1.1\r
-Host: test.remote.haxx.se:287\r
+CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1\r
+Host: test.remote.example.com.287:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 User-Agent: looser/2007\r
 \r
index da69145..ff4db6a 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
 # Server-side
 <reply>
 <data>
index 1223f1c..7bb162b 100644 (file)
@@ -9,6 +9,17 @@ FAILURE
 </keywords>
 </info>
 
+# Server-side
+<reply>
+
+<connect nocheck="yes">
+HTTP/1.1 405 Method Not Allowed swsclose\r
+\r
+And you should ignore this data.
+</connect>
+
+</reply>
+
 # Client-side
 <client>
 <features>
@@ -21,7 +32,7 @@ https
 HTTPS GET over HTTP proxy fails
  </name>
  <command>
--k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test/slash/302
+-k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test:302/slash/302
 </command>
 </client>
 
index d06bc11..38af83b 100644 (file)
@@ -18,6 +18,30 @@ Content-Type: text/html
 Funny-head: yesyes\r
 Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure\r
 Set-Cookie:ismatch=this  ; domain=127.0.0.1; path=/silly/\r
+Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/\r
+Set-Cookie: overwrite=this2  ; domain=127.0.0.1; path=/overwrite\r
+Set-Cookie: sec1value=secure1  ; domain=127.0.0.1; path=/secure1/ ; secure\r
+Set-Cookie: sec2value=secure2  ; domain=127.0.0.1; path=/secure2/ ; secure=\r
+Set-Cookie: sec3value=secure3  ; domain=127.0.0.1; path=/secure3/ ; secure=\r
+Set-Cookie: sec4value=secure4  ; secure=; domain=127.0.0.1; path=/secure4/ ; \r
+Set-Cookie: sec5value=secure5  ; secure; domain=127.0.0.1; path=/secure5/ ; \r
+Set-Cookie: sec6value=secure6  ; secure ; domain=127.0.0.1; path=/secure6/ ; \r
+Set-Cookie: sec7value=secure7  ; secure   ; domain=127.0.0.1; path=/secure7/ ; \r
+Set-Cookie: sec8value=secure8  ; secure= ; domain=127.0.0.1; path=/secure8/ ; \r
+Set-Cookie: secure=very1  ; secure=; domain=127.0.0.1; path=/secure9/; \r
+Set-Cookie: httpo1=value1  ; domain=127.0.0.1; path=/p1/; httponly\r
+Set-Cookie: httpo2=value2  ; domain=127.0.0.1; path=/p2/; httponly=\r
+Set-Cookie: httpo3=value3  ; httponly; domain=127.0.0.1; path=/p3/;\r
+Set-Cookie: httpo4=value4  ; httponly=; domain=127.0.0.1; path=/p4/; \r
+Set-Cookie: httponly=myvalue1  ; domain=127.0.0.1; path=/p4/; httponly\r
+Set-Cookie: httpandsec=myvalue2  ; domain=127.0.0.1; path=/p4/; httponly; secure\r
+Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure\r
+Set-Cookie: httpandsec3=myvalue4  ; domain=127.0.0.1; path=/p4/; httponly; secure=\r
+Set-Cookie: httpandsec4=myvalue5  ; domain=127.0.0.1; path=/p4/; httponly=; secure=\r
+Set-Cookie: httpandsec5=myvalue6  ; domain=127.0.0.1; path=/p4/; secure; httponly=\r
+Set-Cookie: httpandsec6=myvalue7  ; domain=127.0.0.1; path=/p4/; secure=; httponly=\r
+Set-Cookie: httpandsec7=myvalue8  ; domain=127.0.0.1; path=/p4/; secure; httponly\r
+Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly\r
 Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;\r
 Set-Cookie:eat=this; domain=moo.foo.moo;\r
 Set-Cookie: eat=this-too; domain=.foo.moo;\r
@@ -27,7 +51,7 @@ Set-Cookie: novalue; domain=reallysilly
 Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030\r
 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030\r
 Set-Cookie: magic=yessir; path=/silly/; HttpOnly\r
-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
+Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;\r
 \r
 boo
 </data>
@@ -50,6 +74,9 @@ TZ=GMT
  <command>
 http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
 </command>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+</precheck>
 </client>
 
 # Verify data after the test has been "shot"
@@ -65,10 +92,33 @@ Accept: */*
 </protocol>
 <file name="log/jar31.txt" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .127.0.0.1     TRUE    /silly/ FALSE   0       ismatch this
+.127.0.0.1     TRUE    /overwrite      FALSE   0       overwrite       this2
+.127.0.0.1     TRUE    /secure1/       TRUE    0       sec1value       secure1
+.127.0.0.1     TRUE    /secure2/       TRUE    0       sec2value       secure2
+.127.0.0.1     TRUE    /secure3/       TRUE    0       sec3value       secure3
+.127.0.0.1     TRUE    /secure4/       TRUE    0       sec4value       secure4
+.127.0.0.1     TRUE    /secure5/       TRUE    0       sec5value       secure5
+.127.0.0.1     TRUE    /secure6/       TRUE    0       sec6value       secure6
+.127.0.0.1     TRUE    /secure7/       TRUE    0       sec7value       secure7
+.127.0.0.1     TRUE    /secure8/       TRUE    0       sec8value       secure8
+.127.0.0.1     TRUE    /secure9/       TRUE    0       secure  very1
+#HttpOnly_.127.0.0.1   TRUE    /p1/    FALSE   0       httpo1  value1
+#HttpOnly_.127.0.0.1   TRUE    /p2/    FALSE   0       httpo2  value2
+#HttpOnly_.127.0.0.1   TRUE    /p3/    FALSE   0       httpo3  value3
+#HttpOnly_.127.0.0.1   TRUE    /p4/    FALSE   0       httpo4  value4
+#HttpOnly_.127.0.0.1   TRUE    /p4/    FALSE   0       httponly        myvalue1
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec      myvalue2
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec2     myvalue3
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec3     myvalue4
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec4     myvalue5
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec5     myvalue6
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec6     myvalue7
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec7     myvalue8
+#HttpOnly_.127.0.0.1   TRUE    /p4/    TRUE    0       httpandsec8     myvalue9
 .127.0.0.1     TRUE    /       FALSE   0       partmatch       present
 127.0.0.1      FALSE   /we/want/       FALSE   2054030187      nodomain        value
 #HttpOnly_127.0.0.1    FALSE   /silly/ FALSE   0       magic   yessir
diff --git a/tests/data/test320 b/tests/data/test320
new file mode 100644 (file)
index 0000000..899bec5
--- /dev/null
@@ -0,0 +1,95 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+HTTP GET
+TLS-SRP
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.0 200 OK\r
+Content-type: text/html\r
+\r
+
+<HTML><BODY>
+<CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GNUTLS</a></H1></CENTER>
+
+
+<p>Session ID: <i>003030000100000001000000000000000030330001000000B062410001000000</i></p>
+<h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5>
+<p>Connected as user 'jsmith'.</p>
+<P>
+<TABLE border=1><TR><TD>Protocol version:</TD><TD>TLS1.2</TD></TR>
+<TR><TD>Key Exchange:</TD><TD>SRP</TD></TR>
+<TR><TD>Compression</TD><TD>NULL</TD></TR>
+<TR><TD>Cipher</TD><TD>AES-128-CBC</TD></TR>
+<TR><TD>MAC</TD><TD>SHA1</TD></TR>
+<TR><TD>Ciphersuite</TD><TD>SRP_SHA_AES_128_CBC_SHA1</TD></TR></p></TABLE>
+<hr><P>Your HTTP header was:<PRE>User-Agent: curl/7.21.4-DEV (x86_64-apple-darwin10.5.0) libcurl/7.21.4-DEV GnuTLS/2.10.4 zlib/1.2.5 libidn/1.19\r
+Host: localhost:9011\r
+Accept: */*\r
+\r
+</PRE></P>
+</BODY></HTML>
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+simple TLS-SRP HTTPS GET, check user in response
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword abc https://%HOSTIP:%HTTPTLSSRPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+</protocol>
+<file name="log/curl320.out" mode="text">
+HTTP/1.0 200 OK\r
+Content-type: text/html\r
+\r
+
+<HTML><BODY>
+<CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GNUTLS</a></H1></CENTER>
+
+
+
+<h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5>
+<p>Connected as user 'jsmith'.</p>
+<P>
+<TABLE border=1><TR><TD>
+<TR><TD>Key Exchange:</TD><TD>SRP</TD></TR>
+<TR><TD>Compression</TD><TD>NULL</TD></TR>
+<TR><TD>Cipher</TD><TD>AES-128-CBC</TD></TR>
+<TR><TD>MAC</TD><TD>SHA1</TD></TR>
+<TR><TD>Ciphersuite</TD><TD>SRP_SHA_AES_128_CBC_SHA1</TD></TR></p></TABLE>
+
+Host: %HOSTIP:%HTTPTLSSRPPORT\r
+Accept: */*\r
+\r
+</PRE></P>
+</BODY></HTML>
+
+</file>
+<stripfile>
+s/^<p>Session ID:.*//
+s/^<hr><P>Your HTTP header was:.*//
+s/Protocol version:.*//
+</stripfile>
+</verify>
+
+</testcase>
diff --git a/tests/data/test321 b/tests/data/test321
new file mode 100644 (file)
index 0000000..ccdfb86
--- /dev/null
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with bad username and password
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser baduser --tlspassword badpass https://%HOSTIP:%HTTPTLSSRPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test322 b/tests/data/test322
new file mode 100644 (file)
index 0000000..f35345e
--- /dev/null
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with bad password
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPTLSSRPPORT
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test323 b/tests/data/test323
new file mode 100644 (file)
index 0000000..6439b4d
--- /dev/null
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+https
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP to non-TLS-SRP server
+ </name>
+<command>
+--insecure --tlsauthtype SRP --tlsuser jsmith --tlspassword badpass https://%HOSTIP:%HTTPSPORT/want/323
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+35
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/data/test324 b/tests/data/test324
new file mode 100644 (file)
index 0000000..bc1c48f
--- /dev/null
@@ -0,0 +1,33 @@
+<testcase>
+<info>
+<keywords>
+HTTPS
+TLS-SRP
+FAILURE
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+httptls+srp
+</server>
+<features>
+TLS-SRP
+</features>
+ <name>
+TLS-SRP with server cert checking
+ </name>
+<command> # no --insecure
+--tlsauthtype SRP --tlsuser jsmith --tlspassword abc https://%HOSTIP:%HTTPTLSSRPPORT/want/323
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+51
+</errorcode>
+</verify>
+
+</testcase>
index 2c8da33..1867b60 100644 (file)
@@ -8,11 +8,11 @@ HTTP FORMPOST
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
+HTTP/1.1 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
 Content-Length: 10\r
-
+\r
 blablabla
 </data>
 </reply>
@@ -26,7 +26,7 @@ http
 HTTP RFC1867-type formposting with filename= and type=
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test39.txt
+http://%HOSTIP:%HTTPPORT/we/want/39 -F name=daniel -F tool=curl --form-string "str1=@literal" --form-string "str2=<verbatim;type=xxx/yyy" -F "file=@log/test39.txt;type=moo/foobar;filename=fakerfile" -F file2=@log/test39.txt -F "file3=@\"log/test39.txt\";type=mo/foo;filename=\"f\\\\\\\\ak\\\\\\er,\\\\an\\d;.t\\\"xt\"" -F 'file4=@"log/test39.txt"; filename="A\\AA\"\"\\\"ZZZ"'
 </command>
 # We create this file before the command is invoked!
 <file name="log/test39.txt">
@@ -47,7 +47,7 @@ POST /we/want/39 HTTP/1.1
 User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
-Content-Length: 810\r
+Content-Length: 1184\r
 Expect: 100-continue\r
 Content-Type: multipart/form-data; boundary=----------------------------24e78000bd32\r
 \r
@@ -85,6 +85,24 @@ This is a bar foo
 bar
 foo
 \r
+------------------------------24e78000bd32\r
+Content-Disposition: form-data; name="file3"; filename="f\\\\ak\\\\er,\\an\\d;.t\"xt"\r
+Content-Type: mo/foo\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
+------------------------------24e78000bd32\r
+Content-Disposition: form-data; name="file4"; filename="A\\AA\"\"\\\"ZZZ"\r
+Content-Type: text/plain\r
+\r
+foo bar
+This is a bar foo
+bar
+foo
+\r
 ------------------------------24e78000bd32--\r
 </protocol>
 </verify>
index ce6bfc8..df69d32 100644 (file)
@@ -30,7 +30,7 @@ http
 Replaced internal and added custom HTTP headers
  </name>
  <command>
- -H "extra-header: here" -H "Accept: replaced" http://%HOSTIP:%HTTPPORT/4
+ -H "extra-header: here" -H "Accept: replaced" -H "X-Custom-Header;" -H "X-Test: foo; " -H "X-Test:" -H "X-Test2: foo;" -H "X-Test3:  " -H "X-Test4;  " -H "X-Test5;ignored" http://%HOSTIP:%HTTPPORT/4
 </command>
 </client>
 
@@ -45,6 +45,9 @@ GET /4 HTTP/1.1
 Host: %HOSTIP:%HTTPPORT\r
 extra-header: here\r
 Accept: replaced\r
+X-Custom-Header:\r
+X-Test: foo; \r
+X-Test2: foo;\r
 \r
 </protocol>
 </verify>
index b56ff75..6be0d16 100644 (file)
@@ -17,11 +17,11 @@ Connection: close
 \r
 </data>
 <data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </data2>
 <datacheck>
@@ -30,11 +30,11 @@ Location: ../moo.html/?name=d a niel&testcase=/400002
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </datacheck>
 </reply>
index ec67426..e303f3a 100644 (file)
@@ -17,11 +17,11 @@ Connection: close
 \r
 </data>
 <data2>
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </data2>
 <datacheck>
@@ -30,11 +30,11 @@ Location: ../m o o.html/420002
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
-HTTP/1.1 200 OK swsclose
-Location: this should be ignored
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
-
+HTTP/1.1 200 OK swsclose\r
+Location: this should be ignored\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Connection: close\r
+\r
 body
 </datacheck>
 </reply>
index d0d1930..b6f8f83 100644 (file)
@@ -11,18 +11,18 @@ cookiejar
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 OK
-Server: Microsoft-IIS/4.0
-Date: Tue, 25 Sep 2001 19:37:44 GMT
-Content-Type: text/html
-Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/
-Set-Cookie: ckySession=temporary; path=/
-Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/
-Set-Cookie: justaname=; path=/;
-Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
-Cache-control: private
+HTTP/1.1 200 OK\r
+Server: Microsoft-IIS/4.0\r
+Date: Tue, 25 Sep 2001 19:37:44 GMT\r
+Content-Type: text/html\r
+Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/\r
+Set-Cookie: ckySession=temporary; path=/\r
+Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/\r
+Set-Cookie: justaname=; path=/;\r
+Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\r
+Cache-control: private\r
 Content-Length: 41\r
-
+\r
 This server reply is for testing cookies
 </data>
 </reply>
@@ -46,14 +46,14 @@ TZ=GMT
 </command>
 <file name="log/injar46">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This is generated by libcurl!  Do not edit.
 
 www.fake.come  FALSE   /       FALSE   1022144953      cookiecliente   si
 www.loser.com  FALSE   /       FALSE   1139150993      UID     99
 %HOSTIP        FALSE   /       FALSE   1439150993      mooo    indeed
-#HttpOnly_%HOSTIP      FALSE   /       FALSE   1439150993      mooo2   indeed2
-%HOSTIP        FALSE   /       FALSE   0       empty   
+#HttpOnly_%HOSTIP      FALSE   /want   FALSE   1439150993      mooo2   indeed2
+%HOSTIP        FALSE   /want   FALSE   0       empty   
 </file>
 </client>
 
@@ -71,14 +71,14 @@ Cookie: empty=; mooo2=indeed2; mooo=indeed
 </protocol>
 <file name="log/jar46" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 www.fake.come  FALSE   /       FALSE   1022144953      cookiecliente   si
 www.loser.com  FALSE   /       FALSE   1139150993      UID     99
 %HOSTIP        FALSE   /       FALSE   1439150993      mooo    indeed
-#HttpOnly_%HOSTIP      FALSE   /       FALSE   1439150993      mooo2   indeed2
-%HOSTIP        FALSE   /       FALSE   0       empty   
+#HttpOnly_%HOSTIP      FALSE   /want   FALSE   1439150993      mooo2   indeed2
+%HOSTIP        FALSE   /want   FALSE   0       empty   
 %HOSTIP        FALSE   /       FALSE   2054030187      ckyPersistent   permanent
 %HOSTIP        FALSE   /       FALSE   0       ckySession      temporary
 %HOSTIP        FALSE   /       FALSE   0       ASPSESSIONIDQGGQQSJJ    GKNBDIFAAOFDPDAIEAKDIBKE
index e092b41..7ee05ad 100644 (file)
@@ -9,10 +9,12 @@ HTTP HEAD
 #
 # Server-side
 <reply>
+<servercmd>
+connection-monitor
+</servercmd>
 <data>
 HTTP/1.1 200 OK
 Date: Thu, 09 Nov 2010 14:49:00 GMT
-Connection: close
 
 </data>
 </reply>
@@ -27,7 +29,7 @@ http
 HTTP with -d and -G and -I
  </name>
  <command>
--d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/48 -G -I
+-d "foo=moo&moo=poo" http://%HOSTIP:%HTTPPORT/48 -G -I http://%HOSTIP:%HTTPPORT/48
 </command>
 </client>
 
@@ -42,6 +44,11 @@ HEAD /48?foo=moo&moo=poo HTTP/1.1
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
 \r
+HEAD /48?foo=moo&moo=poo HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+[DISCONNECT]
 </protocol>
 </verify>
 </testcase>
index 7a0ebd7..b62f1a1 100644 (file)
@@ -29,7 +29,7 @@ http
 HTTP over proxy
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/5 -x %HOSTIP:%HTTPPORT
+http://%HOSTIP:%HTTPPORT/we/want/that/page/5#5 -x %HOSTIP:%HTTPPORT
 </command>
 </client>
 
index 3f29d8f..ea31483 100644 (file)
@@ -13,6 +13,13 @@ multi
 
 # Server-side
 <reply>
+<servercmd>
+connection-monitor
+</servercmd>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+\r
+</connect>
 <data>
 HTTP/1.1 200 OK swsclose
 Date: Thu, 09 Nov 2010 14:49:00 GMT
@@ -37,6 +44,7 @@ ETag: "21025-dc7-39462498"
 <client>
 <server>
 http
+http-proxy
 </server>
 # tool is what to use instead of 'curl'
 <tool>
@@ -47,7 +55,7 @@ lib503
 simple multi http:// through proxytunnel with authentication info
  </name>
  <command>
-http://%HOSTIP:%HTTPSPORT/503 %HOSTIP:%HTTPPORT
+http://machine.503:%HTTPPORT/503 %HOSTIP:%PROXYPORT
 </command>
 <file name="log/test503.txt">
 foo
@@ -60,17 +68,20 @@ moo
 
 # Verify data after the test has been "shot"
 <verify>
-<protocol>
-CONNECT %HOSTIP:%HTTPSPORT HTTP/1.1\r
-Host: %HOSTIP:%HTTPSPORT\r
+<proxy>
+CONNECT machine.503:%HTTPPORT HTTP/1.1\r
+Host: machine.503:%HTTPPORT\r
 Proxy-Authorization: Basic dGVzdDppbmc=\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol>
 GET /503 HTTP/1.1\r
 Authorization: Basic dGVzdDppbmc=\r
-Host: %HOSTIP:%HTTPSPORT\r
+Host: machine.503:%HTTPPORT\r
 Accept: */*\r
 \r
+[DISCONNECT]
 </protocol>
 </verify>
 </testcase>
index 573ab51..2d3a3dd 100644 (file)
@@ -35,9 +35,10 @@ http://%HOSTIP:%HTTPSPORT/504 %HOSTIP:55555
 </client>
 
 # Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
 <verify>
 <errorcode>
-100
+120
 </errorcode>
 </verify>
 </testcase>
index d9e0fd2..a5e5d31 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 </reply>
index 64eb6c9..630e816 100644 (file)
@@ -80,87 +80,109 @@ CURLSHOPT_UNLOCKFUNC
 CURLSHOPT_USERDATA
 CURL_LOCK_DATA_COOKIE
 CURL_LOCK_DATA_DNS
-*** run 1
 CURLOPT_SHARE
 lock:   share  [Pigs in space]: 0
 unlock: share  [Pigs in space]: 1
-PERFORM
-lock:   dns    [Pigs in space]: 2
-unlock: dns    [Pigs in space]: 3
-lock:   dns    [Pigs in space]: 4
-unlock: dns    [Pigs in space]: 5
+CURLOPT_COOKIELIST injected_and_clobbered
+lock:   cookie [Pigs in space]: 2
+unlock: cookie [Pigs in space]: 3
+CURLOPT_COOKIELIST ALL
+lock:   cookie [Pigs in space]: 4
+unlock: cookie [Pigs in space]: 5
+CURLOPT_COOKIELIST session
 lock:   cookie [Pigs in space]: 6
 unlock: cookie [Pigs in space]: 7
+CURLOPT_COOKIELIST injected
 lock:   cookie [Pigs in space]: 8
 unlock: cookie [Pigs in space]: 9
+CURLOPT_COOKIELIST SESS
 lock:   cookie [Pigs in space]: 10
 unlock: cookie [Pigs in space]: 11
+CLEANUP
 lock:   cookie [Pigs in space]: 12
 unlock: cookie [Pigs in space]: 13
-run 1: set cookie 1, 2 and 3
-lock:   dns    [Pigs in space]: 14
-unlock: dns    [Pigs in space]: 15
-CLEANUP
-lock:   dns    [Pigs in space]: 16
-unlock: dns    [Pigs in space]: 17
-lock:   cookie [Pigs in space]: 18
-unlock: cookie [Pigs in space]: 19
-lock:   share  [Pigs in space]: 20
-unlock: share  [Pigs in space]: 21
-*** run 2
+lock:   share  [Pigs in space]: 14
+unlock: share  [Pigs in space]: 15
+*** run 1
 CURLOPT_SHARE
-lock:   share  [Pigs in space]: 22
-unlock: share  [Pigs in space]: 23
+lock:   share  [Pigs in space]: 16
+unlock: share  [Pigs in space]: 17
 PERFORM
-lock:   dns    [Pigs in space]: 24
-unlock: dns    [Pigs in space]: 25
+lock:   dns    [Pigs in space]: 18
+unlock: dns    [Pigs in space]: 19
+lock:   dns    [Pigs in space]: 20
+unlock: dns    [Pigs in space]: 21
+lock:   cookie [Pigs in space]: 22
+unlock: cookie [Pigs in space]: 23
+lock:   cookie [Pigs in space]: 24
+unlock: cookie [Pigs in space]: 25
 lock:   cookie [Pigs in space]: 26
 unlock: cookie [Pigs in space]: 27
 lock:   cookie [Pigs in space]: 28
 unlock: cookie [Pigs in space]: 29
-lock:   cookie [Pigs in space]: 30
-unlock: cookie [Pigs in space]: 31
-run 2: set cookie 4 and 5
-lock:   dns    [Pigs in space]: 32
-unlock: dns    [Pigs in space]: 33
+run 1: set cookie 1, 2 and 3
+lock:   dns    [Pigs in space]: 30
+unlock: dns    [Pigs in space]: 31
 CLEANUP
-lock:   dns    [Pigs in space]: 34
-unlock: dns    [Pigs in space]: 35
-lock:   cookie [Pigs in space]: 36
-unlock: cookie [Pigs in space]: 37
-lock:   share  [Pigs in space]: 38
-unlock: share  [Pigs in space]: 39
-*** run 3
+lock:   cookie [Pigs in space]: 32
+unlock: cookie [Pigs in space]: 33
+lock:   share  [Pigs in space]: 34
+unlock: share  [Pigs in space]: 35
+*** run 2
 CURLOPT_SHARE
-lock:   share  [Pigs in space]: 40
-unlock: share  [Pigs in space]: 41
-CURLOPT_COOKIEJAR
+lock:   share  [Pigs in space]: 36
+unlock: share  [Pigs in space]: 37
 PERFORM
-lock:   dns    [Pigs in space]: 42
-unlock: dns    [Pigs in space]: 43
+lock:   dns    [Pigs in space]: 38
+unlock: dns    [Pigs in space]: 39
+lock:   cookie [Pigs in space]: 40
+unlock: cookie [Pigs in space]: 41
+lock:   cookie [Pigs in space]: 42
+unlock: cookie [Pigs in space]: 43
 lock:   cookie [Pigs in space]: 44
 unlock: cookie [Pigs in space]: 45
-lock:   cookie [Pigs in space]: 46
-unlock: cookie [Pigs in space]: 47
+run 2: set cookie 4 and 5
+lock:   dns    [Pigs in space]: 46
+unlock: dns    [Pigs in space]: 47
+CLEANUP
 lock:   cookie [Pigs in space]: 48
 unlock: cookie [Pigs in space]: 49
-run 3: overwrite cookie 1 and 4
-lock:   dns    [Pigs in space]: 50
-unlock: dns    [Pigs in space]: 51
-try SHARE_CLEANUP...
+lock:   share  [Pigs in space]: 50
+unlock: share  [Pigs in space]: 51
+*** run 3
+CURLOPT_SHARE
 lock:   share  [Pigs in space]: 52
 unlock: share  [Pigs in space]: 53
+CURLOPT_COOKIEJAR
+CURLOPT_COOKIELIST FLUSH
+lock:   cookie [Pigs in space]: 54
+lock:   cookie [Pigs in space]: 55
+unlock: cookie [Pigs in space]: 56
+unlock: cookie [Pigs in space]: 57
+PERFORM
+lock:   dns    [Pigs in space]: 58
+unlock: dns    [Pigs in space]: 59
+lock:   cookie [Pigs in space]: 60
+unlock: cookie [Pigs in space]: 61
+lock:   cookie [Pigs in space]: 62
+unlock: cookie [Pigs in space]: 63
+lock:   cookie [Pigs in space]: 64
+unlock: cookie [Pigs in space]: 65
+run 3: overwrite cookie 1 and 4
+lock:   dns    [Pigs in space]: 66
+unlock: dns    [Pigs in space]: 67
+try SHARE_CLEANUP...
+lock:   share  [Pigs in space]: 68
+unlock: share  [Pigs in space]: 69
 SHARE_CLEANUP failed, correct
 CLEANUP
-lock:   dns    [Pigs in space]: 54
-unlock: dns    [Pigs in space]: 55
-lock:   cookie [Pigs in space]: 56
-unlock: cookie [Pigs in space]: 57
-lock:   share  [Pigs in space]: 58
-unlock: share  [Pigs in space]: 59
+lock:   cookie [Pigs in space]: 70
+unlock: cookie [Pigs in space]: 71
+lock:   share  [Pigs in space]: 72
+unlock: share  [Pigs in space]: 73
 SHARE_CLEANUP
-lock:   share  [Pigs in space]: 60
-unlock: share  [Pigs in space]: 61
+lock:   share  [Pigs in space]: 74
+unlock: share  [Pigs in space]: 75
 GLOBAL_CLEANUP
 </stdout>
 <stderr>
@@ -168,9 +190,10 @@ http://%HOSTIP:%HTTPPORT/506
 </stderr>
 <file name="log/jar506" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
+.host.foo.com  TRUE    /       FALSE   1896263787      injected        yes
 .foo.com       TRUE    /       FALSE   1993463787      test1   overwritten1
 .host.foo.com  TRUE    /       FALSE   1896263787      test2   two
 .foo.com       TRUE    /       FALSE   1896263787      test3   three
diff --git a/tests/data/test509 b/tests/data/test509
new file mode 100644 (file)
index 0000000..dfe9027
--- /dev/null
@@ -0,0 +1,36 @@
+<testcase>
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib509
+</tool>
+
+<name>
+initialization with memory callbacks and actual usage
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout mode="text">
+seen custom_calloc()
+seen custom_malloc()
+seen custom_realloc()
+seen custom_free()
+</stdout>
+</verify>
+
+</testcase>
index 8313f51..f1f1a3c 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 81fe657..72b7993 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 516a503..ce644db 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 7d8e69b..00e0f77 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index bd6da02..a8e66ea 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP HEAD
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 9de0ac2..d139f29 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
 #
 # Server-side
 <reply>
index 22c39dc..93f21d6 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index d7b9184..7b703b4 100644 (file)
@@ -104,12 +104,18 @@ nothing
 75: Thu, 12-Aug-2007 20:61:99999999999 GMT => -1
 76: IAintNoDateFool => -1
 77: Thu Apr 18 22:50 2007 GMT => 1176936600
+78: 20110623 12:34:56 => 1308832496
+79: 20110632 12:34:56 => -1
+80: 20110623 56:34:56 => -1
+81: 20111323 12:34:56 => -1
+82: 20110623 12:34:79 => -1
+83: Wed, 31 Dec 2008 23:59:60 GMT => 1230768000
 </stdout>
 
-# This test case previously testes an overflow case ("2094 Nov 6 =>
+# This test case previously tested an overflow case ("2094 Nov 6 =>
 # 2147483647") for 32bit time_t, but since some systems have 64bit time_t and
 # handles this (returning 3939840000), and some 64bit-time_t systems don't
-# handle this and returns -1 for this, it turned very tricky to write a fine
+# handle this and return -1 for this, it turned very tricky to write a fine
 # test case and thus it is now removed until we have a way to write test cases
 # for this kind of things.
 
index 8e52615..58c8b2c 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index c6bc861..1a9768d 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 0938b58..755caeb 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 6c1efbd..bae7e6f 100644 (file)
@@ -39,7 +39,7 @@ HTTP GET with proxy and CURLOPT_PORT
  </name>
 # first URL then proxy
  <command>
-http://www.haxx.se:999/523 http://%HOSTIP:%HTTPPORT 
+http://www.example.com:999/523 http://%HOSTIP:%HTTPPORT 
 </command>
 </client>
 
@@ -50,9 +50,9 @@ http://www.haxx.se:999/523 http://%HOSTIP:%HTTPPORT
 ^User-Agent:.*
 </strip>
 <protocol>
-GET HTTP://www.haxx.se:19999/523 HTTP/1.1\r
+GET HTTP://www.example.com:19999/523 HTTP/1.1\r
 Authorization: Basic eHh4Onl5eQ==\r
-Host: www.haxx.se:19999\r
+Host: www.example.com:19999\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 \r
index 0ced2d2..679a4fa 100644 (file)
@@ -9,13 +9,13 @@ cookies
 # Server-side
 <reply>
 <data>
-HTTP/1.1 200 OK
-Server: Microsoft-IIS/4.0
-Date: Tue, 25 Sep 2001 19:37:44 GMT
-Content-Type: text/html
-Connection: close
+HTTP/1.1 200 OK\r
+Server: Microsoft-IIS/4.0\r
+Date: Tue, 25 Sep 2001 19:37:44 GMT\r
+Content-Type: text/html\r
+Connection: close\r
 Content-Length: 21\r
-
+\r
 This server says moo
 </data>
 </reply>
index 359d04c..09e7421 100644 (file)
@@ -2,7 +2,7 @@
 <info>
 <keywords>
 HTTP
-Pipelining
+pipelining
 multi
 </keywords>
 </info>
index 334c07f..51cde15 100644 (file)
@@ -1,4 +1,13 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+pipelining
+multi
+</keywords>
+</info>
+
 <reply>
 <data mode="text">
 HTTP/1.1 404 Badness
index ce66c40..bef8f83 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index f33b2a6..d2fecd3 100644 (file)
@@ -32,11 +32,10 @@ ftp://%HOSTIP:%FTPPORT/538
 </client>
 
 # Verify data after the test has been "shot"
+# TEST_ERR_SUCCESS is errorcode 120
 <verify>
-# ok, the error code here is supposed to be 100 for the fine case since
-# that's just how lib504.c is written
 <errorcode>
-100
+120
 </errorcode>
 <protocol>
 USER anonymous\r
index 2406c54..15da794 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 7c5b9a8..c99f9a0 100644 (file)
@@ -64,7 +64,7 @@ crypto
 HTTP proxy auth Digest multi API re-using connection
  </name>
  <command>
-http://test.remote.haxx.se/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
+http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
 </command>
 </client>
 
@@ -74,18 +74,18 @@ http://test.remote.haxx.se/path/540 http://%HOSTIP:%HTTPPORT silly:person custom
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-GET http://test.remote.haxx.se/path/540 HTTP/1.1\r
+GET http://test.remote.example.com/path/540 HTTP/1.1\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Host: custom.set.host.name\r
 \r
-GET http://test.remote.haxx.se/path/540 HTTP/1.1\r
+GET http://test.remote.example.com/path/540 HTTP/1.1\r
 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Host: custom.set.host.name\r
 \r
-GET http://test.remote.haxx.se/path/540 HTTP/1.1\r
+GET http://test.remote.example.com/path/540 HTTP/1.1\r
 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
index ce4c911..622daa0 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+
 # Server-side
 <reply>
 </reply>
index 4556330..df5c1df 100644 (file)
@@ -28,7 +28,7 @@ curl_easy_escape
 # There's no MTDM in the protocol here since this code doesn't ask for the
 # time/date of the file
 <verify>
-<stdout>
+<stdout mode="text">
 %9C%26K%3DI%04%A1%01%E0%D8%7C%20%B7%EFS%29%FA%1DW%E1
 </stdout>
 </verify>
index 2fa4edb..963baec 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
index 66ebb61..11e3fb9 100644 (file)
Binary files a/tests/data/test545 and b/tests/data/test545 differ
index d1e2604..7bcf5a4 100644 (file)
@@ -87,7 +87,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 </command>
 <precheck>
 chkhostname curlhost
@@ -100,28 +100,28 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-POST http://test.remote.haxx.se/path/547 HTTP/1.1\r
+POST http://test.remote.example.com/path/547 HTTP/1.1\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
 this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/547 HTTP/1.1\r
+POST http://test.remote.example.com/path/547 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 0\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
-POST http://test.remote.haxx.se/path/547 HTTP/1.1\r
+POST http://test.remote.example.com/path/547 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
index c4942e6..a6e2a9b 100644 (file)
@@ -87,7 +87,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 </command>
 <precheck>
 chkhostname curlhost
@@ -100,28 +100,28 @@ chkhostname curlhost
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-POST http://test.remote.haxx.se/path/548 HTTP/1.1\r
+POST http://test.remote.example.com/path/548 HTTP/1.1\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
 this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/548 HTTP/1.1\r
+POST http://test.remote.example.com/path/548 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 0\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
-POST http://test.remote.haxx.se/path/548 HTTP/1.1\r
+POST http://test.remote.example.com/path/548 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
index 298d0ad..e4bd6bf 100644 (file)
@@ -41,7 +41,7 @@ FTP RETR over proxy with CURLOPT_PROXY_TRANSFER_MODE
  </name>
 # first URL then proxy
  <command>
-ftp://www.haxx.se/moo/549 http://%HOSTIP:%HTTPPORT 
+ftp://www.example.com/moo/549 http://%HOSTIP:%HTTPPORT 
 </command>
 </client>
 
@@ -52,8 +52,8 @@ ftp://www.haxx.se/moo/549 http://%HOSTIP:%HTTPPORT
 ^User-Agent:.*
 </strip>
 <protocol>
-GET ftp://www.haxx.se/moo/549;type=i HTTP/1.1\r
-Host: www.haxx.se:21\r
+GET ftp://www.example.com/moo/549;type=i HTTP/1.1\r
+Host: www.example.com:21\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 \r
index c99cf4b..e9605d6 100644 (file)
@@ -41,7 +41,7 @@ FTP RETR over proxy with CURLOPT_PROXY_TRANSFER_MODE and ASCII transfer
  </name>
 # first URL then proxy
  <command>
-ftp://www.haxx.se/moo/550 http://%HOSTIP:%HTTPPORT ascii
+ftp://www.example.com/moo/550 http://%HOSTIP:%HTTPPORT ascii
 </command>
 </client>
 
@@ -52,8 +52,8 @@ ftp://www.haxx.se/moo/550 http://%HOSTIP:%HTTPPORT ascii
 ^User-Agent:.*
 </strip>
 <protocol>
-GET ftp://www.haxx.se/moo/550;type=a HTTP/1.1\r
-Host: www.haxx.se:21\r
+GET ftp://www.example.com/moo/550;type=a HTTP/1.1\r
+Host: www.example.com:21\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 \r
index 8027d91..4f5220a 100644 (file)
@@ -66,7 +66,7 @@ lib547
 HTTP proxy auth Digest with POST data from read callback
  </name>
  <command>
-http://test.remote.haxx.se/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 </command>
 </client>
 
@@ -76,17 +76,17 @@ http://test.remote.haxx.se/path/551 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 ^User-Agent: curl/.*
 </strip>
 <protocol>
-POST http://test.remote.haxx.se/path/551 HTTP/1.1\r
-Host: test.remote.haxx.se\r
+POST http://test.remote.example.com/path/551 HTTP/1.1\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
 this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/551 HTTP/1.1\r
+POST http://test.remote.example.com/path/551 HTTP/1.1\r
 Proxy-Authorization: Digest username="s1lly", realm="something fun to read", nonce="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", uri="/path/551", response="3325240726fbdaf1e61f3a0dd40b930c"\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
index b0db37c..a974fc5 100644 (file)
Binary files a/tests/data/test552 and b/tests/data/test552 differ
index 134f7ef..b08d774 100644 (file)
@@ -1,4 +1,11 @@
 <testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
@@ -35,17 +42,17 @@ http://%HOSTIP:%HTTPPORT/554
 # Verify data after the test has been "shot"
 <verify>
 <strippart>
-s/^------------------------------[a-z0-9]*/------------------------------/
-s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
+s/^--------------------------[a-z0-9]*/------------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
 </strippart>
 # Note that the stripping above removes 12 bytes from every occurance of the
-# boundary string and since 4 of them are in the body contents, we see
-# 415 - (4*12) here == 367 bytes.
+# boundary string and since 5 of them are in the body contents, we see
+# (5*12) == 60 bytes less
 <protocol>
 POST /554 HTTP/1.1\r
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
-Content-Length: 415\r
+Content-Length: 718\r
 Expect: 100-continue\r
 Content-Type: multipart/form-data; boundary=----------------------------\r
 \r
@@ -55,6 +62,11 @@ Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
 this is what we post to the silly web server
 \r
 ------------------------------\r
+Content-Disposition: form-data; name="callbackdata"\r
+\r
+this is what we post to the silly web server
+\r
+------------------------------\r
 Content-Disposition: form-data; name="filename"\r
 \r
 postit2.c\r
@@ -62,6 +74,11 @@ postit2.c
 Content-Disposition: form-data; name="submit"\r
 \r
 send\r
+------------------------------\r
+Content-Disposition: form-data; name="somename"; filename="somefile.txt"\r
+Content-Type: text/plain\r
+\r
+blah blah\r
 --------------------------------\r
 </protocol>
 </verify>
index 3222345..bf06b52 100644 (file)
@@ -92,7 +92,7 @@ CURL_GETHOSTNAME=curlhost
 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  </setenv>
  <command>
-http://test.remote.haxx.se/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
+http://test.remote.example.com/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
 </command>
 <precheck>
 chkhostname curlhost
@@ -109,28 +109,28 @@ chkhostname curlhost
 s/^(this is the blurb we want to upload)\r\n/$1\n/ if($has_charconv)
 </strippart>
 <protocol>
-POST http://test.remote.haxx.se/path/555 HTTP/1.1\r
+POST http://test.remote.example.com/path/555 HTTP/1.1\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
 this is the blurb we want to upload
-POST http://test.remote.haxx.se/path/555 HTTP/1.1\r
+POST http://test.remote.example.com/path/555 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 0\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
-POST http://test.remote.haxx.se/path/555 HTTP/1.1\r
+POST http://test.remote.example.com/path/555 HTTP/1.1\r
 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=\r
 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
-Host: test.remote.haxx.se\r
+Host: test.remote.example.com\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 Content-Length: 36\r
index 5b69ea0..f8cbfbe 100644 (file)
@@ -1,4 +1,10 @@
 <testcase>
+<info>
+<keywords>
+TrackMemory
+</keywords>
+</info>
+
 #
 # Server-side
 <reply>
 <server>
 none
 </server>
+<features>
+TrackMemory
+</features>
 # tool is what to use instead of 'curl'
 <tool>
 lib558
 </tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib558 check
-</precheck>
 
 <name>
-internal hash create/destroy testing
+libtest memory tracking operational
 </name>
 <command>
 nothing
@@ -30,15 +34,20 @@ nothing
 #
 # Verify data after the test has been "shot"
 <verify>
-<stdout mode="text">
-easy handle init OK
-creating hash...
-hash creation OK
-destroying hash...
-hash destruction OK
-destroying easy handle...
-easy handle destruction OK
-</stdout>
+<file name="log/memdump" mode="text">
+MEM lib558.c: malloc()
+MEM lib558.c: free()
+MEM escape.c: malloc()
+MEM escape.c: realloc()
+MEM escape.c: realloc()
+MEM escape.c: free()
+</file>
+<stripfile>
+s/ =.*//
+s/\(.*\)/()/
+s/:\d+/:/
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
 </verify>
 
 </testcase>
diff --git a/tests/data/test559 b/tests/data/test559
deleted file mode 100644 (file)
index ecaf54c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<testcase>
-#
-# Server-side
-<reply>
-</reply>
-
-# Client-side
-<client>
-<server>
-none
-</server>
-# tool is what to use instead of 'curl'
-<tool>
-lib559
-</tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib559 check
-</precheck>
-
-<name>
-internal hash create/add/destroy testing
-</name>
-<command>
-nothing
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<stdout mode="text">
-easy handle init OK
-creating hash...
-hash creation OK
-destroying hash...
-hash destruction OK
-destroying easy handle...
-easy handle destruction OK
-</stdout>
-</verify>
-
-</testcase>
index 18e827c..8f069e6 100644 (file)
@@ -42,7 +42,7 @@ FTP RETR with CURLOPT_PROXY_TRANSFER_MODE, ASCII transfer and type=i
  </name>
 # first URL then proxy
  <command>
-"ftp://www.haxx.se/moo/561;type=i" http://%HOSTIP:%HTTPPORT ascii
+"ftp://www.example.com/moo/561;type=i" http://%HOSTIP:%HTTPPORT ascii
 </command>
 </client>
 
@@ -53,8 +53,8 @@ FTP RETR with CURLOPT_PROXY_TRANSFER_MODE, ASCII transfer and type=i
 ^User-Agent:.*
 </strip>
 <protocol>
-GET ftp://www.haxx.se/moo/561;type=i HTTP/1.1\r
-Host: www.haxx.se:21\r
+GET ftp://www.example.com/moo/561;type=i HTTP/1.1\r
+Host: www.example.com:21\r
 Accept: */*\r
 Proxy-Connection: Keep-Alive\r
 \r
index 6d0609d..72bf129 100644 (file)
@@ -47,11 +47,8 @@ PWD
 CWD path\r
 EPSV\r
 TYPE I\r
-SIZE 546\r
-RETR 546\r
-EPSV\r
-SIZE 546\r
-RETR 546\r
+SIZE 564\r
+RETR 564\r
 QUIT\r
 </protocol>
 <stdout>
index fdf75a5..b8d12b4 100644 (file)
@@ -79,7 +79,6 @@ Accept: */*
 Transfer-Encoding: chunked\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
-\r
 0\r
 \r
 POST /565 HTTP/1.1\r
index d746e96..0f8440f 100644 (file)
@@ -27,7 +27,7 @@ Content-Type: application/sdp
 v=0
 s=rtspd SDP
 i=A fake SDP reply
-u=http://www.curl.haxx.se/fakesdp.ps
+u=http://www.curl.example.com/fakesdp.ps
 </data2>
 <data3>
 RTSP/1.0 200 Okie Dokie
index 5cd4797..c4c62a4 100644 (file)
@@ -51,6 +51,7 @@ Curl-Private: swsclose
 CSeq: 6
 
 </data6>
+</reply>
 
 # Client-Side
 <client>
index 9b263b1..f41ef01 100644 (file)
@@ -83,7 +83,7 @@ rtsp://%HOSTIP:%RTSPPORT/571 log/protofile.txt
 </client>
 
 <verify>
-<stdout>
+<stdout mode="text">
 RTP: message size 10, channel 1
 RTP: message size 500, channel 0
 RTP: message size 196, channel 0
index c06e531..83ae646 100644 (file)
@@ -28,10 +28,11 @@ Cseq: 2
 
 scale=enormous
 speed=ludicrous
+
 </data2>
 
 <data3>
-RTSP/1.0 200 OK
+RTSP/1.0 204 OK
 Server: RTSPD/libcurl-test
 Session: getparams-test
 Cseq: 3
index 909ae3c..54ff8fb 100644 (file)
@@ -1,7 +1,8 @@
 <testcase>
 <info>
 <keywords>
-FILE
+HTTP
+multi
 </keywords>
 </info>
 #
diff --git a/tests/data/test577 b/tests/data/test577
deleted file mode 100644 (file)
index 7a69ead..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<testcase>
-<info>
-<keywords>
-wildcardmatch
-</keywords>
-</info>
-#
-# Server-side
-<reply>
-</reply>
-
-# Client-side
-<client>
-<server>
-none
-</server>
-# tool is what to use instead of 'curl'
-<tool>
-lib577
-</tool>
-# precheck is a command line to run before the test,
-# to see if we can execute the test or not
-<precheck>
-./libtest/lib577 check
-</precheck>
-
- <name>
-Curl_fnmatch() testing
- </name>
- <command>
-nothing
-</command>
-</client>
-
-#
-# Verify data after the test has been "shot"
-<verify>
-<stdout mode="text">
-===========================
-===========================
-</stdout>
-</verify>
-</testcase>
diff --git a/tests/data/test580 b/tests/data/test580
new file mode 100644 (file)
index 0000000..8256f0e
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+Duplicate-header
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+Location: and there's a second one too! / moo.html
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib507
+</tool>
+
+ <name>
+multi interface, multiple Location: headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/580
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /580 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test581 b/tests/data/test581
new file mode 100644 (file)
index 0000000..acaa41b
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+Duplicate-header
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 all good!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 0
+Connection: close
+Content-Type: changed/my/mind
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib507
+</tool>
+
+ <name>
+multi interface, multiple Content-Type: headers
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/581
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /581 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test582 b/tests/data/test582
new file mode 100644 (file)
index 0000000..8881a87
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<tool>
+lib582
+</tool>
+ <name>
+SFTP upload using multi interface
+ </name>
+ <command>
+Sftp://%HOSTIP:%SSHPORT%PWD/log/upload582.txt %PWD/log/file582.txt %USER:
+</command>
+<file name="log/file582.txt">
+Moooooooooooo
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+</strip>
+<protocol>
+</protocol>
+<file name="log/file582.txt">
+Moooooooooooo
+ upload this
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test583 b/tests/data/test583
new file mode 100644 (file)
index 0000000..8fca7d2
--- /dev/null
@@ -0,0 +1,42 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<tool>
+lib583
+</tool>
+ <name>
+SFTP with multi interface, remove handle early
+ </name>
+
+# The command here uses 'localhost' just to make sure that curl_multi_perform
+# won't reach too far in the first invoke. When using c-ares at least, the
+# name resolve will cause it to return rather quickly and thus we could trigger
+# the problem we're looking to verify.
+ <command>
+sftp://localhost:%SSHPORT%PWD/log/upload583.txt %USER:
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test584 b/tests/data/test584
new file mode 100644 (file)
index 0000000..582a911
--- /dev/null
@@ -0,0 +1,102 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+pipelining
+multi
+</keywords>
+</info>
+
+# Server-side
+# Silly division of the first request is solely to appease the server which expects n_data_items == n_requests
+<reply>
+<data1>
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+584
+</data1>
+<data2>
+HTTP/1.1 200 OK
+</data2>
+<data3>
+Server: test-server/fake
+</data3>
+<data4>
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 5
+
+585
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+586
+</data4>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib530
+</tool>
+ <name>
+HTTP GET using pipelining (nonzero length after zero length)
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/path/584
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /path/5840001 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/5840002 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/5840003 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /path/5840004 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<stdout mode="text">
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+584
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 0
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 5
+
+585
+
+HTTP/1.1 200 OK
+Server: test-server/fake
+Content-Length: 4
+
+586
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test585 b/tests/data/test585
new file mode 100644 (file)
index 0000000..32cb06f
--- /dev/null
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+multi
+CURLOPT_OPENSOCKETFUNCTION
+CURLOPT_CLOSESOCKETFUNCTION
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+</data>
+<datacheck>
+[OPEN] counter: 1
+HTTP/1.1 302 eat this!
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: this-is-the-first.html
+Content-Length: 0
+Connection: close
+
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+http
+</features>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+socket open/close callbacks
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/585
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /585 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test586 b/tests/data/test586
new file mode 100644 (file)
index 0000000..c0857bd
--- /dev/null
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+CURLOPT_PORT
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+line 1
+line 2
+last line
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+line 1
+line 2
+last line
+[CLOSE] counter: 2
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib585
+</tool>
+ <name>
+FTP and open/close socket callbacks
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/586
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 586\r
+RETR 586\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test587 b/tests/data/test587
new file mode 100644 (file)
index 0000000..69cbe1e
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib587
+</tool>
+
+ <name>
+HTTP multi-part formpost with aborted read callback
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/587
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^--------------------------[a-z0-9]*/------------------------------/
+s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
+</strippart>
+<protocol>
+POST /587 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Content-Length: 718\r
+Expect: 100-continue\r
+Content-Type: multipart/form-data; boundary=----------------------------\r
+\r
+------------------------------\r
+Content-Disposition: form-data; name="sendfile"; filename="postit2.c"\r
+\r
+</protocol>
+# CURLE_ABORTED_BY_CALLBACK (42)
+<errorcode>
+42
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test588 b/tests/data/test588
new file mode 100644 (file)
index 0000000..0515b52
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# This test is exactly like 525 but the server rejects the EPRT command.
+# Written up to make sure that there's nothing in the multi interface
+# active connection case that differs between PORT and EPRT use
+#
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib525
+</tool>
+ <name>
+FTP PORT upload using multi interface, EPRT doesn't work
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/588 log/upload588
+</command>
+<file name="log/upload588">
+Moooooooooooo
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPRT |1|
+PORT
+TYPE I\r
+STOR 588\r
+QUIT\r
+</protocol>
+<upload>
+Moooooooooooo
+ upload this
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test590 b/tests/data/test590
new file mode 100644 (file)
index 0000000..f50664d
--- /dev/null
@@ -0,0 +1,123 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+POST callback
+HTTP proxy
+HTTP proxy NTLM auth
+</keywords>
+</info>
+# Server-side
+<reply>
+
+<data>
+HTTP/1.1 407 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Proxy-Authenticate: Negotiate\r
+Proxy-Authenticate: NTLM\r
+Content-Type: text/html; charset=iso-8859-1\r
+Connection: close\r
+\r
+This is not the real page
+</data>
+
+# this is returned first since we get no proxy-auth
+<data1001>
+HTTP/1.1 407 Authorization Required to proxy me my dear\r
+Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
+Content-Length: 34\r
+\r
+Hey you, authenticate or go away!
+</data1001>
+
+# This is supposed to be returned when the server gets the second
+# Authorization: NTLM line passed-in from the client
+<data1002>
+HTTP/1.1 200 Things are fine in proxy land swsclose\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 42\r
+\r
+Contents of that page you requested, sir.
+</data1002>
+
+<datacheck>
+HTTP/1.1 407 Authorization Required swsclose\r
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
+Proxy-Authenticate: Negotiate\r
+Proxy-Authenticate: NTLM\r
+Content-Type: text/html; charset=iso-8859-1\r
+Connection: close\r
+\r
+HTTP/1.1 407 Authorization Required to proxy me my dear\r
+Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
+Content-Length: 34\r
+\r
+HTTP/1.1 200 Things are fine in proxy land swsclose\r
+Server: Microsoft-IIS/5.0\r
+Content-Type: text/html; charset=iso-8859-1\r
+Content-Length: 42\r
+\r
+Contents of that page you requested, sir.
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool to use
+<tool>
+lib590
+</tool>
+<features>
+NTLM
+</features>
+ <name>
+HTTP proxy offers Negotiate+NTLM, use only NTLM
+ </name>
+ <setenv>
+# we force our own host name, in order to make the test machine independent
+CURL_GETHOSTNAME=curlhost
+# we try to use the LD_PRELOAD hack, if not a debug build
+LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
+ </setenv>
+ <command>
+http://test.remote.example.com/path/590 http://%HOSTIP:%HTTPPORT
+</command>
+<precheck>
+chkhostname curlhost
+</precheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent: curl/.*
+</strip>
+<protocol>
+GET http://test.remote.example.com/path/590 HTTP/1.1\r
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
+Host: test.remote.example.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://test.remote.example.com/path/590 HTTP/1.1\r
+Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
+Host: test.remote.example.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET http://test.remote.example.com/path/590 HTTP/1.1\r
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAAIAAgAcgAAAAAAAAAAAAAABoKBAAQt1KW5CgG4YdWWcfXyfXBz1ZMCzYp37xYjBiAizmw58O6eQS7yR66eqYGWeSwl9W1lY3VybGhvc3Q=\r
+User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
+Host: test.remote.example.com\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test591 b/tests/data/test591
new file mode 100644 (file)
index 0000000..1455a38
--- /dev/null
@@ -0,0 +1,73 @@
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN425
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN425
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT and 425 on upload
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/591 %FTPTIME2 log/upload591
+</command>
+<file name="log/upload591">
+Moooooooooooo for 591
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPRT |1|
+PORT
+TYPE I\r
+STOR 591\r
+QUIT\r
+</protocol>
+# CURLE_FTP_ACCEPT_FAILED = 10
+<errorcode>
+10
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test592 b/tests/data/test592
new file mode 100644 (file)
index 0000000..f443205
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN421
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN421
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT and 421 on upload
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/592 %FTPTIME2 log/upload592
+</command>
+<file name="log/upload592">
+Moooooooooooo for 592
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+# a 421 response must prevent further commands from being sent
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPRT |1|
+PORT
+TYPE I\r
+STOR 592\r
+QUIT\r
+</protocol>
+# CURLE_FTP_ACCEPT_FAILED = 10
+<errorcode>
+10
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test593 b/tests/data/test593
new file mode 100644 (file)
index 0000000..c3b1f91
--- /dev/null
@@ -0,0 +1,72 @@
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN150
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN150
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT upload, no data conn and no transient neg. reply
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/593 %FTPTIME2 log/upload593
+</command>
+<file name="log/upload593">
+Moooooooooooo for 593
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPRT |1|
+PORT
+TYPE I\r
+STOR 593\r
+QUIT\r
+</protocol>
+<errorcode>
+12
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test594 b/tests/data/test594
new file mode 100644 (file)
index 0000000..77b5864
--- /dev/null
@@ -0,0 +1,72 @@
+#
+# For this test the server rejects the EPRT command,
+# code in lib591 makes use of curl_multi_timeout()
+# and server does not establish data connection.
+#
+<testcase>
+<info>
+<keywords>
+FTP
+PORT
+STOR
+multi
+EPRT refused
+NODATACONN
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+</data>
+<servercmd>
+NODATACONN
+REPLY EPRT 500 we don't like EPRT now
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib591
+</tool>
+ <name>
+FTP multi PORT upload, no data conn and no positive prelim. reply
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/594 %FTPTIME2 log/upload594
+</command>
+<file name="log/upload594">
+Moooooooooooo for 594
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# Strip off parts of the PORT and EPRT commands that might differ
+<strippart>
+s/^PORT (.*)/PORT/
+s/^EPRT \|1\|(.*)/EPRT \|1\|/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+CWD path\r
+EPRT |1|
+PORT
+TYPE I\r
+STOR 594\r
+QUIT\r
+</protocol>
+<errorcode>
+28
+</errorcode>
+<upload>
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test595 b/tests/data/test595
new file mode 100644 (file)
index 0000000..28ff9c1
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# This test is like 585 but uses passive FTP instead of HTTP
+#
+<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+moo
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+moo
+[CLOSE] counter: 2
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+verify close callbacks with passive FTP
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/595 log/ip595
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 595\r
+RETR 595\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test596 b/tests/data/test596
new file mode 100644 (file)
index 0000000..bb5def4
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# This test is like 585 but uses active FTP instead of HTTP
+#
+<testcase>
+<info>
+<keywords>
+FTP
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+moo
+</data>
+<datacheck>
+[OPEN] counter: 1
+[OPEN] counter: 2
+[CLOSE] counter: 2
+moo
+[CLOSE] counter: 1
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib585
+</tool>
+
+ <name>
+verify close callbacks with active FTP
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/596 log/ip596 activeftp
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strippart>
+s/^(EPRT \|1\|)(.*)/$1/
+</strippart>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPRT |1|
+TYPE I\r
+SIZE 596\r
+RETR 596\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test597 b/tests/data/test597
new file mode 100644 (file)
index 0000000..458bb64
--- /dev/null
@@ -0,0 +1,37 @@
+<testcase>
+<info>
+<keywords>
+FTP
+CONNECT_ONLY
+</keywords>
+</info>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib597
+</tool>
+ <name>
+FTP connect only option
+ </name>
+
+<command>
+ftp://%HOSTIP:%FTPPORT
+</command>
+
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test598 b/tests/data/test598
new file mode 100644 (file)
index 0000000..f43bbac
--- /dev/null
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP set cookie
+cookies
+CURLOPT_REFERER
+curl_easy_reset
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data mode="text">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+
+# since the request runs twice
+<datacheck>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib598
+</tool>
+
+ <name>
+curl_easy_reset with referer and other strings set
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/598
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /598 HTTP/1.1\r
+User-Agent: the-moo agent next generation\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Referer: http://example.com/the-moo\r
+Cookie: name=moo\r
+\r
+GET /598 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test599 b/tests/data/test599
new file mode 100644 (file)
index 0000000..8215137
--- /dev/null
@@ -0,0 +1,83 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: 5990001
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+-foo-
+</data>
+<data1>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Transfer-Encoding: chunked
+Connection: close
+Content-Type: text/html
+
+32\r
+this data is slightly larger than the first piece
+\r
+0\r
+\r
+</data1>
+
+<datacheck>
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Location: 5990001
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Transfer-Encoding: chunked
+Connection: close
+Content-Type: text/html
+
+this data is slightly larger than the first piece
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib599
+</tool>
+
+# Bug 3510057 pointed out that when following a location to a larger chunked
+# encoded page, the first size would still be used in the progress callback
+ <name>
+HTTP GET with progress callback and redirects changing content sizes
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/599
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+
+</verify>
+</testcase>
index f2a6a4e..d2de279 100644 (file)
@@ -22,6 +22,7 @@ SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
 Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure\r
 Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure\r
 Set-Cookie: test5=name; domain=anything.com; path=/ ; secure\r
+Set-Cookie: fake=fooledyou; domain=..com; path=/;\r
 Content-Length: 4\r
 \r
 boo
@@ -60,7 +61,7 @@ Host: www.host.foo.com
 </protocol>
 <file name="log/jar61.txt" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 #HttpOnly_.foo.com     TRUE    /we/want/       FALSE   2054030187      test    yes
index 99eca1e..2e5d1db 100644 (file)
@@ -29,11 +29,11 @@ http
 HTTP, send cookies when using custom Host:
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/62 -b log/jar62.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/62 http://%HOSTIP:%HTTPPORT/we/want?hoge=fuga -b log/jar62.txt -H "Host: www.host.foo.com"
 </command>
 <file name="log/jar62.txt">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 #HttpOnly_.foo.com     TRUE    /we/want/       FALSE   2054030187      test    yes
@@ -55,6 +55,11 @@ Accept: */*
 Cookie: test2=yes; test=yes\r
 Host: www.host.foo.com\r
 \r
+GET /we/want?hoge=fuga HTTP/1.1\r
+Accept: */*\r
+Cookie: test2=yes; test=yes\r
+Host: www.host.foo.com\r
+\r
 </protocol>
 </verify>
 </testcase>
diff --git a/tests/data/test638 b/tests/data/test638
new file mode 100644 (file)
index 0000000..c72cf63
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+post-quote
+acceptfail
+asterisk
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+Dummy test file for rename test
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test638.dir
+</precheck>
+ <name>
+SFTP post-quote rename * asterisk accept-fail
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test638.dir %PWD/log/test638.new" sftp://%HOSTIP:%SSHPORT%PWD/log/file638.txt --insecure
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test638.new
+</postcheck>
+<file name="log/file638.txt">
+Dummy test file for rename test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test639 b/tests/data/test639
new file mode 100644 (file)
index 0000000..8dfe859
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+post-quote
+acceptfail
+asterisk
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+Dummy test file for rename test
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test639.dir
+</precheck>
+ <name>
+SFTP post-quote rename * asterisk accept-fail
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test639-not-exists-dir %PWD/log/test639.new" sftp://%HOSTIP:%SSHPORT%PWD/log/file639.txt --insecure
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test639.dir
+</postcheck>
+<file name="log/file639.txt">
+Dummy test file for rename test
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test708 b/tests/data/test708
new file mode 100644 (file)
index 0000000..716d9ae
--- /dev/null
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS4
+</keywords>
+</info>
+
+#
+# Server-side
+<reply name="1">
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks4
+</server>
+<setenv>
+all_proxy=socks4://%HOSTIP:%SOCKSPORT
+</setenv>
+ <name>
+HTTP GET via SOCKS4 proxy
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/708
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /708 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test709 b/tests/data/test709
new file mode 100644 (file)
index 0000000..0226888
--- /dev/null
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS5
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks5
+</server>
+<setenv>
+http_proxy=socks5://%HOSTIP:%SOCKSPORT 
+</setenv>
+ <name>
+HTTP GET via SOCKS5 set in http_proxy environment variable
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/709
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /709 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test710 b/tests/data/test710
new file mode 100644 (file)
index 0000000..884eb50
--- /dev/null
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+SOCKS5
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+socks5
+</server>
+ <name>
+HTTP GET via SOCKS5 set with --proxy
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/710 --proxy socks5://%HOSTIP:%SOCKSPORT 
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /710 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test711 b/tests/data/test711
new file mode 100644 (file)
index 0000000..7be1f3c
--- /dev/null
@@ -0,0 +1,52 @@
+<testcase>
+#based off test 707 after bug report #1218
+<info>
+<keywords>
+FTP
+PASV
+RETR
+SOCKS5
+all_proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+silly content
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+socks5
+</server>
+<setenv>
+all_proxy=socks5://%HOSTIP:%SOCKSPORT 
+</setenv>
+ <name>
+FTP fetch with all_proxy set to socks5
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/711
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 711\r
+RETR 711\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test712 b/tests/data/test712
new file mode 100644 (file)
index 0000000..c62e9f2
--- /dev/null
@@ -0,0 +1,49 @@
+<testcase>
+#based off test 707 after bug report #1218
+<info>
+<keywords>
+FTP
+PASV
+RETR
+SOCKS5
+all_proxy
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+silly content
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+socks5
+</server>
+ <name>
+FTP fetch with --proxy set to socks5://
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/712 --proxy socks5://%HOSTIP:%SOCKSPORT 
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous\r
+PASS ftp@example.com\r
+PWD\r
+EPSV\r
+TYPE I\r
+SIZE 712\r
+RETR 712\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
index dec0801..d60ee62 100644 (file)
@@ -46,7 +46,7 @@ Host: host.NOT_DISCLOSED.se
 </protocol>
 <file name="log/jar73.txt" mode="text">
 # Netscape HTTP Cookie File
-# http://curl.haxx.se/rfc/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
 .NOT_DISCLOSED.se      TRUE    /       FALSE   0       IPCZQX01af0fca5c        000010008168c200d25dfc4b
index 4a6e004..4d54541 100644 (file)
@@ -35,8 +35,8 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
 Content-Type: text/html
 Funny-head: yesyes
-Set-Cookie: foobar=name; domain=127.0.0.1; path=/;
-Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
+Set-Cookie: foobar=name; domain=%HOSTIP; path=/;
+Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/";
 Set-Cookie: partmatch=present; domain=.0.0.1; path=/w;
 Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey;
 Set-Cookie: cookie=yes; path=/we;
@@ -45,6 +45,9 @@ Set-Cookie: nocookie=yes; path=/WE;
 Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
 
 </file>
+<precheck>
+perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
+</precheck>
 </client>
 
 # Verify data after the test has been "shot"
@@ -56,7 +59,7 @@ Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
 GET /we/want/8 HTTP/1.1\r
 Host: %HOSTIP:%HTTPPORT\r
 Accept: */*\r
-Cookie: cookie=perhaps; cookie=yes; partmatch=present; foobar=name; blexp=yesyes\r
+Cookie: cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes\r
 \r
 </protocol>
 </verify>
index a405af7..16805ca 100644 (file)
@@ -24,6 +24,10 @@ Content-Length: 9
 
 contents
 </data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+\r
+</connect>
 <datacheck>
 HTTP/1.1 200 Mighty fine indeed\r
 \r
@@ -43,12 +47,13 @@ contents
 <client>
 <server>
 http
+http-proxy
 </server>
  <name>
-HTTP 1.0 CONNECT with proxytunnel and host Basic authentication
+HTTP 1.0 CONNECT with proxytunnel and proxy+host Basic authentication
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself
+http://test.80:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself
 </command>
 </client>
 
@@ -58,17 +63,19 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%HTTPPORT --
 <strip>
 ^User-Agent:.*
 </strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.0\r
-Host: %HOSTIP:%HTTPPORT\r
+<proxy>
+CONNECT test.80:%HTTPPORT HTTP/1.0\r
+Host: test.80:%HTTPPORT\r
 Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol>
 GET /we/want/that/page/80 HTTP/1.1\r
 Authorization: Basic aWFtOm15c2VsZg==\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: test.80:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
index 3281b63..88e3f60 100644 (file)
@@ -1,8 +1,8 @@
 <testcase>
 <info>
 <keywords>
-POP3
-RETR
+IMAP
+FETCH
 </keywords>
 </info>
 
@@ -10,13 +10,13 @@ RETR
 # Server-side
 <reply>
 <data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
-  yours sincerely
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
 </data>
 </reply>
 
@@ -24,13 +24,13 @@ body
 # Client-side
 <client>
 <server>
-pop3
+imap
 </server>
  <name>
-POP3 RETR
+IMAP FETCH
  </name>
  <command>
-pop3://%HOSTIP:%POP3PORT/800 -u user:secret
+'imap://%HOSTIP:%IMAPPORT/800/;UID=1' -u user:secret
 </command>
 </client>
 
@@ -38,10 +38,11 @@ pop3://%HOSTIP:%POP3PORT/800 -u user:secret
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-USER user\r
-PASS secret\r
-RETR 800\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 800\r
+A004 FETCH 1 BODY[]\r
+A005 LOGOUT\r
 </protocol>
 </verify>
 </testcase>
index 271d8d1..d112eb2 100644 (file)
@@ -10,13 +10,10 @@ FETCH
 # Server-side
 <reply>
 <data>
-From: me@somewhere
-To: fake@nowhere
-
-body
-
---
-  yours sincerely
+body\r
+\r
+--\r
+  yours sincerely\r
 </data>
 </reply>
 
@@ -27,10 +24,10 @@ body
 imap
 </server>
  <name>
-IMAP FETCH
+IMAP FETCH by UID and SECTION
  </name>
  <command>
-imap://%HOSTIP:%IMAPPORT/801 -u user:secret
+'imap://%HOSTIP:%IMAPPORT/801/;UID=123/;SECTION=1' -u user:secret
 </command>
 </client>
 
@@ -38,10 +35,11 @@ imap://%HOSTIP:%IMAPPORT/801 -u user:secret
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-B LOGIN user secret\r
-C SELECT 801\r
-D FETCH 1 BODY[TEXT]\r
-A LOGOUT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 801\r
+A004 FETCH 123 BODY[1]\r
+A005 LOGOUT\r
 </protocol>
 </verify>
 </testcase>
index 7027c80..3bb7165 100644 (file)
@@ -1,32 +1,34 @@
 <testcase>
 <info>
 <keywords>
-SMTP
+IMAP
+SELECT
+UIDVALIDITY
 </keywords>
 </info>
 
 #
 # Server-side
 <reply>
+<data>
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
 </reply>
 
 #
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
  <name>
-SMTP
+IMAP SELECT UIDVALIDITY Success
  </name>
-<stdin>
-From: different
-To: another
-
-body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 802@foo --mail-rcpt 802@foobar.example --mail-from 802@from -T -
+'imap://%HOSTIP:%IMAPPORT/802;UIDVALIDITY=3857529045/;UID=123/;SECTION=TEXT' -u user:secret
 </command>
 </client>
 
@@ -34,20 +36,11 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 802@foo --mail-rcpt 802@foobar.example
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO user\r
-MAIL FROM:802@from\r
-RCPT TO:<802@foo>\r
-RCPT TO:<802@foobar.example>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 802\r
+A004 FETCH 123 BODY[TEXT]\r
+A005 LOGOUT\r
 </protocol>
-<upload>
-From: different
-To: another
-
-body
-\r
-.\r
-</upload>
 </verify>
 </testcase>
index 24ff0d0..220c845 100644 (file)
@@ -1,7 +1,10 @@
 <testcase>
 <info>
 <keywords>
-SMTP
+IMAP
+SELECT
+UIDVALIDITY
+FAILURE
 </keywords>
 </info>
 
@@ -14,51 +17,28 @@ SMTP
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
  <name>
-SMTP with CRLF-dot-CRLF in data
+IMAP SELECT UIDVALIDITY Failure
  </name>
-<stdin>
-From: different
-To: another
-
-\r
-.\r
-.\r
-\r
-.\r
-
-body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 803@foo --mail-from 803@from -T -
+'imap://%HOSTIP:%IMAPPORT/803;UIDVALIDITY=12345/;UID=123' -u user:secret
 </command>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
+# CURLE_REMOTE_FILE_NOT_FOUND - UIDVALIDITY mismatch
+<errorcode>
+78
+</errorcode>
 <protocol>
-EHLO user\r
-MAIL FROM:803@from\r
-RCPT TO:<803@foo>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 803\r
+A004 LOGOUT\r
 </protocol>
-<upload>
-From: different
-To: another
-
-\r
-..\r
-..\r
-\r
-..\r
-
-body
-\r
-.\r
-</upload>
 </verify>
 </testcase>
index 3d490c5..3fcf955 100644 (file)
@@ -1,38 +1,33 @@
 <testcase>
 <info>
 <keywords>
-SMTP
-SMTP HELO
-RFC821
+IMAP
+SELECT
 </keywords>
 </info>
 
 #
 # Server-side
 <reply>
-<servercmd>
-REPLY EHLO 500 Command unrecognized
-REPLY HELO 250 Already old but still servicing...
-</servercmd>
+<data>
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
 </reply>
 
 #
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
  <name>
-RFC821-only SMTP server (EHLO not supported)
+IMAP doesn't perform SELECT if re-using the same mailbox
  </name>
-<stdin>
-From: different
-To: another
-
-body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T -
+-u user:secret 'imap://%HOSTIP:%IMAPPORT/804/;UID=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/804/;UID=456/;SECTION=2.3'
 </command>
 </client>
 
@@ -40,20 +35,12 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T -
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO user\r
-HELO user\r
-MAIL FROM:804@from\r
-RCPT TO:<804@foo>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 804\r
+A004 FETCH 123 BODY[1]\r
+A005 FETCH 456 BODY[2.3]\r
+A006 LOGOUT\r
 </protocol>
-<upload>
-From: different
-To: another
-
-body
-\r
-.\r
-</upload>
 </verify>
 </testcase>
index fba5124..8703951 100644 (file)
@@ -1,54 +1,61 @@
 <testcase>
 <info>
 <keywords>
-SMTP
-SMTP AUTH PLAIN
-RFC4616
-RFC4954
+IMAP
+APPEND
+UPLOAD
 </keywords>
 </info>
 
 #
 # Server-side
 <reply>
-<servercmd>
-REPLY EHLO 220 AUTH PLAIN
-REPLY AUTH 235 Authenticated
-</servercmd>
 </reply>
 
 #
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
  <name>
-SMTP plain authentication
+IMAP APPEND
  </name>
-<stdin>
-mail body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 805@foo --mail-from 805@from -u test:1234 -T -
+-u user:secret -T log/upload805 'imap://%HOSTIP:%IMAPPORT/805'
 </command>
+<file name="log/upload805">
+Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)\r
+From: Fred Foobar <foobar@example.COM>\r
+Subject: afternoon meeting\r
+To: joe@example.com\r
+Message-Id: <B27397-0100000@example.COM>\r
+MIME-Version: 1.0\r
+Content-Type: TEXT/PLAIN; CHARSET=US-ASCII\r
+\r
+Hello Joe, do you think we can meet at 3:30 tomorrow?\r
+</file>
 </client>
 
 #
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO user\r
-AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ=\r
-MAIL FROM:805@from\r
-RCPT TO:<805@foo>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 APPEND 805 (\Seen) {295}\r
+A004 LOGOUT\r
 </protocol>
 <upload>
-mail body
+Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)\r
+From: Fred Foobar <foobar@example.COM>\r
+Subject: afternoon meeting\r
+To: joe@example.com\r
+Message-Id: <B27397-0100000@example.COM>\r
+MIME-Version: 1.0\r
+Content-Type: TEXT/PLAIN; CHARSET=US-ASCII\r
 \r
-.\r
+Hello Joe, do you think we can meet at 3:30 tomorrow?\r
 </upload>
 </verify>
 </testcase>
index 8ece5dc..59f6b1e 100644 (file)
@@ -1,36 +1,32 @@
 <testcase>
 <info>
 <keywords>
-SMTP
-SMTP AUTH LOGIN
-RFC4954
+IMAP
+LIST
 </keywords>
 </info>
 
 #
 # Server-side
 <reply>
-<servercmd>
-REPLY EHLO 220 AUTH LOGIN
-REPLY AUTH 334 UGFzc3dvcmQ6
-REPLY MTIzNA== 235 Authenticated
-</servercmd>
+<data>
+* LIST () "/" /806/blurdybloop\r
+* LIST (\Noselect) "/" /806/foo\r
+* LIST () "/" /806/foo/bar\r
+</data>
 </reply>
 
 #
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
  <name>
-SMTP login authentication
+IMAP LIST
  </name>
-<stdin>
-mail body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 806@foo --mail-from 806@from -u test:1234 -T -
+-u user:secret 'imap://%HOSTIP:%IMAPPORT/806/'
 </command>
 </client>
 
@@ -38,18 +34,10 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 806@foo --mail-from 806@from -u test:1
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO user\r
-AUTH LOGIN dGVzdA==\r
-MTIzNA==\r
-MAIL FROM:806@from\r
-RCPT TO:<806@foo>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 LIST "806" *\r
+A004 LOGOUT\r
 </protocol>
-<upload>
-mail body
-\r
-.\r
-</upload>
 </verify>
 </testcase>
index 6daa1d0..0a6838b 100644 (file)
@@ -1,40 +1,31 @@
 <testcase>
 <info>
 <keywords>
-SMTP
-SMTP AUTH CRAM-MD5
-RFC2195
-RFC4954
+IMAP
+STORE
+CUSTOMREQUEST
 </keywords>
 </info>
 
 #
 # Server-side
 <reply>
-<servercmd>
-REPLY EHLO 220 AUTH CRAM-MD5
-REPLY AUTH 334 PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
-REPLY dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw 235 Authenticated
-</servercmd>
+<data>
+* 123 FETCH (FLAGS (\Seen \Deleted))\r
+</data>
 </reply>
 
 #
 # Client-side
 <client>
 <server>
-smtp
+imap
 </server>
-<features>
-crypto
-</features>
  <name>
-SMTP CRAM-MD5 authentication
+IMAP STORE (CUSTOMREQUEST)
  </name>
-<stdin>
-mail body
-</stdin>
  <command>
-smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 807@foo --mail-from 807@from -u tim:tanstaaftanstaaf -T -
+-u user:secret -X 'STORE 123 +Flags \Deleted' 'imap://%HOSTIP:%IMAPPORT/807'
 </command>
 </client>
 
@@ -42,18 +33,11 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 807@foo --mail-from 807@from -u tim:ta
 # Verify data after the test has been "shot"
 <verify>
 <protocol>
-EHLO user\r
-AUTH CRAM-MD5\r
-dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw\r
-MAIL FROM:807@from\r
-RCPT TO:<807@foo>\r
-DATA\r
-QUIT\r
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 SELECT 807\r
+A004 STORE 123 +Flags \Deleted\r
+A005 LOGOUT\r
 </protocol>
-<upload>
-mail body
-\r
-.\r
-</upload>
 </verify>
 </testcase>
diff --git a/tests/data/test808 b/tests/data/test808
new file mode 100644 (file)
index 0000000..52ecb84
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+EXAMINE
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* 17 EXISTS\r
+* 2 RECENT\r
+* OK [UNSEEN 8] Message 8 is first unseen\r
+* OK [UIDVALIDITY 3857529045] UIDs valid\r
+* OK [UIDNEXT 4392] Predicted next UID\r
+* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)\r
+* OK [PERMANENTFLAGS ()] No permanent flags permitted\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP EXAMINE (CUSTOMREQUEST)
+ </name>
+ <command>
+'imap://%HOSTIP:%IMAPPORT' -u user:secret -X 'EXAMINE 808'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 EXAMINE 808\r
+A004 LOGOUT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test809 b/tests/data/test809
new file mode 100644 (file)
index 0000000..099dd33
--- /dev/null
@@ -0,0 +1,42 @@
+<testcase>
+<info>
+<keywords>
+IMAP
+STATUS
+CUSTOMREQUEST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+* STATUS 809 (MESSAGES 231 UIDNEXT 44292)\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+imap
+</server>
+ <name>
+IMAP STATUS (CUSTOMREQUEST)
+ </name>
+ <command>
+imap://%HOSTIP:%IMAPPORT -u user:secret -X 'STATUS 809 (UIDNEXT MESSAGES)'
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+A001 CAPABILITY\r
+A002 LOGIN user secret\r
+A003 STATUS 809 (UIDNEXT MESSAGES)\r
+A004 LOGOUT\r
+</protocol>
+</verify>
+</testcase>
index 0ada5d1..4386c12 100644 (file)
@@ -21,6 +21,10 @@ Content-Length: 9
 
 contents
 </data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+\r
+</connect>
 <datacheck>
 HTTP/1.1 200 Mighty fine indeed\r
 \r
@@ -40,12 +44,13 @@ contents
 <client>
 <server>
 http
+http-proxy
 </server>
  <name>
 HTTP over proxy-tunnel with site authentication
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam:myself
+http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user iam:myself
 </command>
 </client>
 
@@ -55,16 +60,18 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam
 <strip>
 ^User-Agent:.*
 </strip>
-<protocol>
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.1\r
+<proxy>
+CONNECT test.83:%HTTPPORT HTTP/1.1\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: test.83:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol>
 GET /we/want/that/page/83 HTTP/1.1\r
 Authorization: Basic aWFtOm15c2VsZg==\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: test.83:%HTTPPORT\r
 Accept: */*\r
 \r
 </protocol>
diff --git a/tests/data/test850 b/tests/data/test850
new file mode 100644 (file)
index 0000000..b0d0e3d
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+POP3
+RETR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+body\r
+\r
+--\r
+  yours sincerely\r
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/850 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+RETR 850\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test851 b/tests/data/test851
new file mode 100644 (file)
index 0000000..5ebb3a0
--- /dev/null
@@ -0,0 +1,43 @@
+<testcase>
+<info>
+<keywords>
+POP3
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+# include the '.\r\n' 3-byte trailer to end the transfer poperly!
+REPLY LIST +OK 851 100\r\n.
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST one message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/851 -l -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+LIST 851\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test852 b/tests/data/test852
new file mode 100644 (file)
index 0000000..e07c172
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+POP3
+LIST
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST -ERR no such message
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST invalid message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/852 -l -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+56
+</errorcode>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+LIST 852\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test853 b/tests/data/test853
new file mode 100644 (file)
index 0000000..934837f
--- /dev/null
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+POP3
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+# We use SLOWDOWN to really exercise the end-of-body parsing over multiple
+# packets
+<servercmd>
+SLOWDOWN
+</servercmd>
+# When doing LIST, we get the default list output hard-coded in the test
+# POP3 server
+<datacheck>
+1 100\r
+2 4294967400\r
+4 200\r
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST messages from *SLOW* server
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/ -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+LIST\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test854 b/tests/data/test854
new file mode 100644 (file)
index 0000000..074969a
--- /dev/null
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+POP3
+LIST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY LIST +OK but no messages\r\n.
+</servercmd>
+<datacheck>
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 LIST no messages available
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/ -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+LIST\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test855 b/tests/data/test855
new file mode 100644 (file)
index 0000000..bcbdf48
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+POP3
+RETR
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY RETR -ERR no such message
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR invalid message
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/855 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+56
+</errorcode>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+RETR 855\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test856 b/tests/data/test856
new file mode 100644 (file)
index 0000000..7076cf6
--- /dev/null
@@ -0,0 +1,46 @@
+<testcase>
+<info>
+<keywords>
+POP3
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY PASS -ERR invalid login
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 invalid login
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/856 -u user:wrong
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+67
+</errorcode>
+#
+# The multi interface considers a broken "DO" request as a prematurely broken
+# transfer and such a connection will not get a "QUIT"
+<protocol>
+CAPA\r
+USER user\r
+PASS wrong\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test857 b/tests/data/test857
new file mode 100644 (file)
index 0000000..716c49e
--- /dev/null
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+POP3
+RETR
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+..body with a single dot first\r
+...triple dots...\r
+\r
+--\r
+  yours sincerely\r
+</data>
+<datacheck>
+From: me@somewhere\r
+To: fake@nowhere\r
+\r
+.body with a single dot first\r
+..triple dots...\r
+\r
+--\r
+  yours sincerely\r
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+pop3
+</server>
+ <name>
+POP3 RETR with dot-prefixed line
+ </name>
+ <command>
+pop3://%HOSTIP:%POP3PORT/857 -u user:secret
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+CAPA\r
+USER user\r
+PASS secret\r
+RETR 857\r
+QUIT\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test900 b/tests/data/test900
new file mode 100644 (file)
index 0000000..749a965
--- /dev/null
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 900@foo --mail-rcpt 900@foobar.example --mail-from 900@from -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<900@from>\r
+RCPT TO:<900@foo>\r
+RCPT TO:<900@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test901 b/tests/data/test901
new file mode 100644 (file)
index 0000000..ed24518
--- /dev/null
@@ -0,0 +1,63 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with CRLF-dot-CRLF in data
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+\r
+.\r
+.\r
+\r
+.\r
+\r
+body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 901@foo --mail-from '<901@from>' -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<901@from>\r
+RCPT TO:<901@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+\r
+..\r
+..\r
+\r
+..\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test902 b/tests/data/test902
new file mode 100644 (file)
index 0000000..4da1b99
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP HELO
+RFC821
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 500 Command unrecognized
+REPLY HELO 250 Already old but still servicing...
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+RFC821-only SMTP server (EHLO not supported)
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 902@foo --mail-from 902@from -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+HELO user\r
+MAIL FROM:<902@from>\r
+RCPT TO:<902@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test903 b/tests/data/test903
new file mode 100644 (file)
index 0000000..157bd48
--- /dev/null
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH PLAIN
+RFC4616
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 250 AUTH PLAIN
+REPLY AUTH 334 PLAIN supported
+REPLY dGVzdAB0ZXN0ADEyMzQ= 235 Authenticated\r
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP plain authentication
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 903@foo --mail-from 903@from -u test:1234 -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+AUTH PLAIN\r
+dGVzdAB0ZXN0ADEyMzQ=\r
+MAIL FROM:<903@from>\r
+RCPT TO:<903@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test904 b/tests/data/test904
new file mode 100644 (file)
index 0000000..1a23f41
--- /dev/null
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH LOGIN
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 250 AUTH LOGIN
+REPLY AUTH 334 LOGIN supported\r
+REPLY dGVzdA== 334 UGFzc3dvcmQ6
+REPLY MTIzNA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP login authentication
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 904@foo --mail-from 904@from -u test:1234 -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+AUTH LOGIN\r
+dGVzdA==\r
+MTIzNA==\r
+MAIL FROM:<904@from>\r
+RCPT TO:<904@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test905 b/tests/data/test905
new file mode 100644 (file)
index 0000000..fccd84b
--- /dev/null
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH CRAM-MD5
+RFC2195
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 250 AUTH CRAM-MD5
+REPLY AUTH 334 PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
+REPLY dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+<features>
+crypto
+</features>
+ <name>
+SMTP CRAM-MD5 authentication
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 905@foo --mail-from 905@from -u tim:tanstaaftanstaaf -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+AUTH CRAM-MD5\r
+dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw\r
+MAIL FROM:<905@from>\r
+RCPT TO:<905@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test906 b/tests/data/test906
new file mode 100644 (file)
index 0000000..1f88990
--- /dev/null
@@ -0,0 +1,51 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without --mail-from
+ </name>
+<stdin>
+From: different\r
+To: another\r
+\r
+body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 906@foo -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<>\r
+RCPT TO:<906@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test907 b/tests/data/test907
new file mode 100644 (file)
index 0000000..511d519
--- /dev/null
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH PLAIN SASL-IR
+RFC4616
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 250 AUTH PLAIN
+REPLY AUTH 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP plain authentication with initial response
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 907@foo --mail-from 907@from -u test:1234 --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ=\r
+MAIL FROM:<907@from>\r
+RCPT TO:<907@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test908 b/tests/data/test908
new file mode 100644 (file)
index 0000000..61d56c5
--- /dev/null
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+SMTP AUTH LOGIN SASL-IR
+RFC4954
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<servercmd>
+REPLY EHLO 250 AUTH LOGIN
+REPLY AUTH 334 UGFzc3dvcmQ6
+REPLY MTIzNA== 235 Authenticated
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP login authentication with initial response
+ </name>
+<stdin>
+mail body\r
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 908@foo --mail-from 908@from -u test:1234 --sasl-ir -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+AUTH LOGIN dGVzdA==\r
+MTIzNA==\r
+MAIL FROM:<908@from>\r
+RCPT TO:<908@foo>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+mail body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test909 b/tests/data/test909
new file mode 100644 (file)
index 0000000..2fc1f19
--- /dev/null
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+# the key in this response is that it doesn't include SIZE support
+<servercmd>
+REPLY EHLO 250 mooo
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without SIZE support
+ </name>
+<file name="log/test909.eml">
+From: different\r
+To: another\r
+\r
+body\r
+</file>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 909@foo --mail-rcpt 909@foobar.example --mail-from 909@from -T log/test909.eml
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<909@from>\r
+RCPT TO:<909@foo>\r
+RCPT TO:<909@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test910 b/tests/data/test910
new file mode 100644 (file)
index 0000000..5013fdc
--- /dev/null
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP without terminating CRLF
+ </name>
+<stdin nonewline="yes">
+From: different\r
+To: another\r
+\r
+body
+</stdin>
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 910@foo --mail-rcpt 910@foobar.example --mail-from 910@from -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<910@from>\r
+RCPT TO:<910@foo>\r
+RCPT TO:<910@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+From: different\r
+To: another\r
+\r
+body\r
+.\r
+</upload>
+</verify>
+</testcase>
diff --git a/tests/data/test911 b/tests/data/test911
new file mode 100644 (file)
index 0000000..6b7a1f4
--- /dev/null
@@ -0,0 +1,48 @@
+<testcase>
+<info>
+<keywords>
+SMTP
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smtp
+</server>
+ <name>
+SMTP with no mail data
+ </name>
+
+<stdin nonewline="yes">
+
+</stdin>
+
+ <command>
+smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 911@foo --mail-rcpt 911@foobar.example --mail-from 911@from -T -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+EHLO user\r
+MAIL FROM:<911@from>\r
+RCPT TO:<911@foo>\r
+RCPT TO:<911@foobar.example>\r
+DATA\r
+QUIT\r
+</protocol>
+<upload>
+\r
+.\r
+</upload>
+</verify>
+</testcase>
index 726aa79..bf78276 100644 (file)
@@ -13,7 +13,7 @@ Resume
 <data>
 HTTP/1.1 416 Requested Range Not Satisfiable\r
 Date: Fri, 24 Oct 2003 21:33:12 GMT\r
-Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
+Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT\r
 ETag: "ab57a-507-3f9968f3"\r
 Accept-Ranges: bytes\r
index a7bafa6..2f3f482 100644 (file)
@@ -11,14 +11,14 @@ FAILURE
 #
 # Server-side
 <reply>
-<data nocheck="yes">
+<connect nocheck="yes">
 HTTP/1.1 407 Needs proxy authentication
 Server: test-server/fake swsclose yesyes
 Proxy-Authenticate: Basic "oh please"
 Connection: close
 
 bing
-</data>
+</connect>
 </reply>
 
 #
index 9fea1be..1cd88ac 100644 (file)
@@ -21,6 +21,10 @@ Content-Length: 9
 
 contents
 </data>
+<connect>
+HTTP/1.1 200 Mighty fine indeed\r
+\r
+</connect>
 <datacheck>
 HTTP/1.1 200 Mighty fine indeed\r
 \r
@@ -40,12 +44,13 @@ contents
 <client>
 <server>
 http
+http-proxy
 </server>
  <name>
 HTTP over proxytunnel using POST
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datatopost=ohthatsfunyesyes"
+http://test.95:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
 </command>
 </client>
 
@@ -55,15 +60,17 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datato
 <strip>
 ^User-Agent:.*
 </strip>
-<protocol nonewline="yes">
-CONNECT %HOSTIP:%HTTPPORT HTTP/1.1\r
+<proxy>
+CONNECT test.95:%HTTPPORT HTTP/1.1\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: test.95:%HTTPPORT\r
 Proxy-Connection: Keep-Alive\r
 \r
+</proxy>
+<protocol nonewline="yes">
 POST /we/want/that/page/95 HTTP/1.1\r
 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
-Host: %HOSTIP:%HTTPPORT\r
+Host: test.95:%HTTPPORT\r
 Accept: */*\r
 Content-Length: 27\r
 Content-Type: application/x-www-form-urlencoded\r
diff --git a/tests/data/test96 b/tests/data/test96
new file mode 100644 (file)
index 0000000..865aff9
--- /dev/null
@@ -0,0 +1,44 @@
+<testcase>
+<info>
+<keywords>
+TrackMemory
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+TrackMemory
+</features>
+
+<name>
+curl memory tracking operational
+</name>
+<command>
+--version
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<file name="log/memdump" mode="text">
+MEM tool_paramhlp.c
+MEM tool_cfgable.c
+</file>
+<stripfile>
+$_ = '' if (($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/))
+s/:\d+.*//
+s:^(MEM )(.*/)(.*):$1$3:
+</stripfile>
+</verify>
+
+</testcase>
index 6f20e6f..6cbb963 100644 (file)
@@ -1,3 +1,24 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, 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.
+#
+###########################################################################
 %file_chmod1 = (
   'name'      => 'chmod1',
   'content'   => "This file should have permissions 444\n",
index 6a46e76..2e125e2 100644 (file)
@@ -48,6 +48,78 @@ sub pidfromfile {
 }
 
 #######################################################################
+# pidexists checks if a process with a given pid exists and is alive.
+# This will return the positive pid if the process exists and is alive.
+# This will return the negative pid if the process exists differently.
+# This will return 0 if the process could not be found.
+#
+sub pidexists {
+    my $pid = $_[0];
+
+    if($pid > 0) {
+        # verify if currently existing and alive
+        if(kill(0, $pid)) {
+            return $pid;
+        }
+
+        # verify if currently existing Windows process
+        if($^O eq "msys") {
+            my $filter = "PID eq $pid";
+            my $result = `tasklist -fi \"$filter\" 2>nul`;
+            if(index($result, "$pid") != -1) {
+                return -$pid;
+            }
+        }
+    }
+
+    return 0;
+}
+
+#######################################################################
+# pidterm asks the process with a given pid to terminate gracefully.
+#
+sub pidterm {
+    my $pid = $_[0];
+
+    if($pid > 0) {
+        # signal the process to terminate
+        kill("TERM", $pid);
+
+        # request the process to quit
+        if($^O eq "msys") {
+            my $filter = "PID eq $pid";
+            my $result = `tasklist -fi \"$filter\" 2>nul`;
+            if(index($result, "$pid") != -1) {
+                system("taskkill -fi \"$filter\" >nul 2>&1");
+            }
+        }
+    }
+}
+
+#######################################################################
+# pidkill kills the process with a given pid mercilessly andforcefully.
+#
+sub pidkill {
+    my $pid = $_[0];
+
+    if($pid > 0) {
+        # signal the process to terminate
+        kill("KILL", $pid);
+
+        # request the process to quit
+        if($^O eq "msys") {
+            my $filter = "PID eq $pid";
+            my $result = `tasklist -fi \"$filter\" 2>nul`;
+            if(index($result, "$pid") != -1) {
+                system("taskkill -f -fi \"$filter\" >nul 2>&1");
+                # Windows XP Home compatibility
+                system("tskill $pid >nul 2>&1");
+            }
+        }
+    }
+}
+
+#######################################################################
 # processexists checks if a process with the pid stored in the given
 # pidfile exists and is alive. This will return 0 on any file related
 # error or if a pid can not be extracted from the given file. When a
@@ -64,7 +136,7 @@ sub processexists {
 
     if($pid > 0) {
         # verify if currently alive
-        if(kill(0, $pid)) {
+        if(pidexists($pid)) {
             return $pid;
         }
         else {
@@ -111,10 +183,10 @@ sub killpid {
         if($tmp =~ /^(\d+)$/) {
             my $pid = $1;
             if($pid > 0) {
-                if(kill(0, $pid)) {
+                if(pidexists($pid)) {
                     print("RUN: Process with pid $pid signalled to die\n")
                         if($verbose);
-                    kill("TERM", $pid);
+                    pidterm($pid);
                     push @signalled, $pid;
                 }
                 else {
@@ -134,7 +206,7 @@ sub killpid {
         while($twentieths--) {
             for(my $i = scalar(@signalled) - 1; $i >= 0; $i--) {
                 my $pid = $signalled[$i];
-                if(!kill(0, $pid)) {
+                if(!pidexists($pid)) {
                     print("RUN: Process with pid $pid gracefully died\n")
                         if($verbose);
                     splice @signalled, $i, 1;
@@ -154,7 +226,7 @@ sub killpid {
             if($pid > 0) {
                 print("RUN: Process with pid $pid forced to die with SIGKILL\n")
                     if($verbose);
-                kill("KILL", $pid);
+                pidkill($pid);
                 # if possible reap its dead children
                 waitpid($pid, &WNOHANG);
                 push @reapchild, $pid;
@@ -194,7 +266,7 @@ sub killsockfilters {
         if($pid > 0) {
             printf("* kill pid for %s-%s => %d\n", $server,
                 ($proto eq 'ftp')?'ctrl':'filt', $pid) if($verbose);
-            kill("KILL", $pid);
+            pidkill($pid);
             waitpid($pid, 0);
         }
         unlink($pidfile) if(-f $pidfile);
@@ -208,7 +280,7 @@ sub killsockfilters {
         if($pid > 0) {
             printf("* kill pid for %s-data => %d\n", $server,
                 $pid) if($verbose);
-            kill("KILL", $pid);
+            pidkill($pid);
             waitpid($pid, 0);
         }
         unlink($pidfile) if(-f $pidfile);
index bbbf7be..c32165b 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -39,7 +39,8 @@
 #
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, '.');
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
     # sub second timestamping needs Time::HiRes
     eval {
         no warnings "all";
@@ -76,7 +77,6 @@ my $ipvnum = 4;     # server IPv number (4 or 6)
 my $proto = 'ftp';  # default server protocol
 my $srcdir;         # directory where ftpserver.pl is located
 my $srvrname;       # server name for presentation purposes
-my $grok_eprt;
 
 my $path   = '.';
 my $logdir = $path .'/log';
@@ -117,34 +117,53 @@ local *SFWRITE;   # used to write to primary connection
 local *DREAD;     # used to read from secondary connection
 local *DWRITE;    # used to write to secondary connection
 
+my $sockfilt_timeout = 5;  # default timeout for sockfilter eXsysreads
+
 #**********************************************************************
 # global vars which depend on server protocol selection
 #
 my %commandfunc;  # protocol command specific function callbacks
 my %displaytext;  # text returned to client before callback runs
-my @welcome;      # text returned to client upon connection
 
 #**********************************************************************
 # global vars customized for each test from the server commands file
 #
-my $ctrldelay;    # set if server should throttle ctrl stream
-my $datadelay;    # set if server should throttle data stream
-my $retrweirdo;   # set if ftp server should use RETRWEIRDO
-my $retrnosize;   # set if ftp server should use RETRNOSIZE
-my $pasvbadip;    # set if ftp server should use PASVBADIP
-my $nosave;       # set if ftp server should not save uploaded data
-my %customreply;  #
-my %customcount;  #
-my %delayreply;   #
+my $ctrldelay;     # set if server should throttle ctrl stream
+my $datadelay;     # set if server should throttle data stream
+my $retrweirdo;    # set if ftp server should use RETRWEIRDO
+my $retrnosize;    # set if ftp server should use RETRNOSIZE
+my $pasvbadip;     # set if ftp server should use PASVBADIP
+my $nosave;        # set if ftp server should not save uploaded data
+my $nodataconn;    # set if ftp srvr doesn't establish or accepts data channel
+my $nodataconn425; # set if ftp srvr doesn't establish data ch and replies 425
+my $nodataconn421; # set if ftp srvr doesn't establish data ch and replies 421
+my $nodataconn150; # set if ftp srvr doesn't establish data ch and replies 150
+my $support_capa;  # set if server supports capability command
+my $support_auth;  # set if server supports authentication command
+my %customreply;   #
+my %customcount;   #
+my %delayreply;    #
 
 #**********************************************************************
 # global variables for to test ftp wildcardmatching or other test that
 # need flexible LIST responses.. and corresponding files.
 # $ftptargetdir is keeping the fake "name" of LIST directory.
+#
 my $ftplistparserstate;
 my $ftptargetdir;
 
 #**********************************************************************
+# global variables used when running a ftp server to keep state info
+# relative to the secondary or data sockfilt process. Values of these
+# variables should only be modified using datasockf_state() sub, given
+# that they are closely related and relationship is a bit awkward.
+#
+my $datasockf_state = 'STOPPED'; # see datasockf_state() sub
+my $datasockf_mode = 'none';     # ['none','active','passive']
+my $datasockf_runs = 'no';       # ['no','yes']
+my $datasockf_conn = 'no';       # ['no','yes']
+
+#**********************************************************************
 # global vars used for signal handling
 #
 my $got_exit_signal = 0; # set if program should finish execution ASAP
@@ -205,6 +224,141 @@ sub ftpmsg {
   # better on windows/cygwin
 }
 
+#**********************************************************************
+# eXsysread is a wrapper around perl's sysread() function. This will
+# repeat the call to sysread() until it has actually read the complete
+# number of requested bytes or an unrecoverable condition occurs.
+# On success returns a positive value, the number of bytes requested.
+# On failure or timeout returns zero.
+#
+sub eXsysread {
+    my $FH      = shift;
+    my $scalar  = shift;
+    my $nbytes  = shift;
+    my $timeout = shift; # A zero timeout disables eXsysread() time limit
+    #
+    my $time_limited = 0;
+    my $timeout_rest = 0;
+    my $start_time = 0;
+    my $nread  = 0;
+    my $rc;
+
+    $$scalar = "";
+
+    if((not defined $nbytes) || ($nbytes < 1)) {
+        logmsg "Error: eXsysread() failure: " .
+               "length argument must be positive\n";
+        return 0;
+    }
+    if((not defined $timeout) || ($timeout < 0)) {
+        logmsg "Error: eXsysread() failure: " .
+               "timeout argument must be zero or positive\n";
+        return 0;
+    }
+    if($timeout > 0) {
+        # caller sets eXsysread() time limit
+        $time_limited = 1;
+        $timeout_rest = $timeout;
+        $start_time = int(time());
+    }
+
+    while($nread < $nbytes) {
+        if($time_limited) {
+            eval {
+                local $SIG{ALRM} = sub { die "alarm\n"; };
+                alarm $timeout_rest;
+                $rc = sysread($FH, $$scalar, $nbytes - $nread, $nread);
+                alarm 0;
+            };
+            $timeout_rest = $timeout - (int(time()) - $start_time);
+            if($timeout_rest < 1) {
+                logmsg "Error: eXsysread() failure: timed out\n";
+                return 0;
+            }
+        }
+        else {
+            $rc = sysread($FH, $$scalar, $nbytes - $nread, $nread);
+        }
+        if($got_exit_signal) {
+            logmsg "Error: eXsysread() failure: signalled to die\n";
+            return 0;
+        }
+        if(not defined $rc) {
+            if($!{EINTR}) {
+                logmsg "Warning: retrying sysread() interrupted system call\n";
+                next;
+            }
+            if($!{EAGAIN}) {
+                logmsg "Warning: retrying sysread() due to EAGAIN\n";
+                next;
+            }
+            if($!{EWOULDBLOCK}) {
+                logmsg "Warning: retrying sysread() due to EWOULDBLOCK\n";
+                next;
+            }
+            logmsg "Error: sysread() failure: $!\n";
+            return 0;
+        }
+        if($rc < 0) {
+            logmsg "Error: sysread() failure: returned negative value $rc\n";
+            return 0;
+        }
+        if($rc == 0) {
+            logmsg "Error: sysread() failure: read zero bytes\n";
+            return 0;
+        }
+        $nread += $rc;
+    }
+    return $nread;
+}
+
+#**********************************************************************
+# read_mainsockf attempts to read the given amount of output from the
+# sockfilter which is in use for the main or primary connection. This
+# reads untranslated sockfilt lingo which may hold data read from the
+# main or primary socket. On success returns 1, otherwise zero.
+#
+sub read_mainsockf {
+    my $scalar  = shift;
+    my $nbytes  = shift;
+    my $timeout = shift; # Optional argument, if zero blocks indefinitively
+    my $FH = \*SFREAD;
+
+    if(not defined $timeout) {
+        $timeout = $sockfilt_timeout + ($nbytes >> 12);
+    }
+    if(eXsysread($FH, $scalar, $nbytes, $timeout) != $nbytes) {
+        my ($fcaller, $lcaller) = (caller)[1,2];
+        logmsg "Error: read_mainsockf() failure at $fcaller " .
+               "line $lcaller. Due to eXsysread() failure\n";
+        return 0;
+    }
+    return 1;
+}
+
+#**********************************************************************
+# read_datasockf attempts to read the given amount of output from the
+# sockfilter which is in use for the data or secondary connection. This
+# reads untranslated sockfilt lingo which may hold data read from the
+# data or secondary socket. On success returns 1, otherwise zero.
+#
+sub read_datasockf {
+    my $scalar = shift;
+    my $nbytes = shift;
+    my $timeout = shift; # Optional argument, if zero blocks indefinitively
+    my $FH = \*DREAD;
+
+    if(not defined $timeout) {
+        $timeout = $sockfilt_timeout + ($nbytes >> 12);
+    }
+    if(eXsysread($FH, $scalar, $nbytes, $timeout) != $nbytes) {
+        my ($fcaller, $lcaller) = (caller)[1,2];
+        logmsg "Error: read_datasockf() failure at $fcaller " .
+               "line $lcaller. Due to eXsysread() failure\n";
+        return 0;
+    }
+    return 1;
+}
 
 sub sysread_or_die {
     my $FH     = shift;
@@ -312,15 +466,27 @@ sub sendcontrol {
     my $log;
     foreach $log (@_) {
         my $l = $log;
-        $l =~ s/[\r\n]//g;
+        $l =~ s/\r/[CR]/g;
+        $l =~ s/\n/[LF]/g;
         logmsg "> \"$l\"\n";
     }
 }
 
-# Send data to the client on the data stream
-
+#**********************************************************************
+# Send data to the FTP client on the data stream when data connection
+# is actually established. Given that this sub should only be called
+# when a data connection is supposed to be established, calling this
+# without a data connection is an indication of weak logic somewhere.
+#
 sub senddata {
     my $l;
+    if($datasockf_conn eq 'no') {
+        logmsg "WARNING: Detected data sending attempt without DATA channel\n";
+        foreach $l (@_) {
+            logmsg "WARNING: Data swallowed: $l\n"
+        }
+        return;
+    }
     foreach $l (@_) {
       if(!$datadelay) {
         # spit it all out at once
@@ -380,50 +546,55 @@ sub protocolsetup {
             'NOOP' => '200 Yes, I\'m very good at doing nothing.',
             'PBSZ' => '500 PBSZ not implemented',
             'PROT' => '500 PROT not implemented',
-        );
-        @welcome = (
+            'welcome' => join("",
             '220-        _   _ ____  _     '."\r\n",
             '220-    ___| | | |  _ \| |    '."\r\n",
             '220-   / __| | | | |_) | |    '."\r\n",
             '220-  | (__| |_| |  _ <| |___ '."\r\n",
-            '220    \___|\___/|_| \_\_____|'."\r\n"
+            '220    \___|\___/|_| \_\_____|'."\r\n")
         );
     }
     elsif($proto eq 'pop3') {
         %commandfunc = (
+            'CAPA' => \&CAPA_pop3,
+            'AUTH' => \&AUTH_pop3,
             'RETR' => \&RETR_pop3,
+            'LIST' => \&LIST_pop3,
         );
         %displaytext = (
             'USER' => '+OK We are happy you popped in!',
             'PASS' => '+OK Access granted',
             'QUIT' => '+OK byebye',
-        );
-        @welcome = (
+            'welcome' => join("",
             '        _   _ ____  _     '."\r\n",
             '    ___| | | |  _ \| |    '."\r\n",
             '   / __| | | | |_) | |    '."\r\n",
             '  | (__| |_| |  _ <| |___ '."\r\n",
             '   \___|\___/|_| \_\_____|'."\r\n",
-            '+OK cURL POP3 server ready to serve'."\r\n"
+            '+OK cURL POP3 server ready to serve'."\r\n")
         );
     }
     elsif($proto eq 'imap') {
         %commandfunc = (
+            'APPEND' => \&APPEND_imap,
+            'CAPABILITY' => \&CAPABILITY_imap,
+            'EXAMINE' => \&EXAMINE_imap,
             'FETCH'  => \&FETCH_imap,
+            'LIST'   => \&LIST_imap,
+            'LOGOUT'   => \&LOGOUT_imap,
             'SELECT' => \&SELECT_imap,
+            'STATUS'  => \&STATUS_imap,
+            'STORE'  => \&STORE_imap
         );
         %displaytext = (
-            'LOGIN'  => ' OK We are happy you popped in!',
-            'SELECT' => ' OK selection done',
-            'LOGOUT' => ' OK thanks for the fish',
-        );
-        @welcome = (
+            'LOGIN'  => ' OK LOGIN completed',
+            'welcome' => join("",
             '        _   _ ____  _     '."\r\n",
             '    ___| | | |  _ \| |    '."\r\n",
             '   / __| | | | |_) | |    '."\r\n",
             '  | (__| |_| |  _ <| |___ '."\r\n",
             '   \___|\___/|_| \_\_____|'."\r\n",
-            '* OK cURL IMAP server ready to serve'."\r\n"
+            '* OK cURL IMAP server ready to serve'."\r\n")
         );
     }
     elsif($proto eq 'smtp') {
@@ -432,17 +603,16 @@ sub protocolsetup {
             'RCPT' => \&RCPT_smtp,
         );
         %displaytext = (
-            'EHLO' => '230 We are happy you popped in!',
+            'EHLO' => "250-SIZE\r\n250 Welcome visitor, stay a while staaaaaay forever",
             'MAIL' => '200 Note taken',
             'RCPT' => '200 Receivers accepted',
             'QUIT' => '200 byebye',
-        );
-        @welcome = (
+            'welcome' => join("",
             '220-        _   _ ____  _     '."\r\n",
             '220-    ___| | | |  _ \| |    '."\r\n",
             '220-   / __| | | | |_) | |    '."\r\n",
             '220-  | (__| |_| |  _ <| |___ '."\r\n",
-            '220    \___|\___/|_| \_\_____|'."\r\n"
+            '220    \___|\___/|_| \_\_____|'."\r\n")
         );
     }
 }
@@ -452,25 +622,40 @@ sub close_dataconn {
 
     my $datapid = processexists($datasockf_pidfile);
 
+    logmsg "=====> Closing $datasockf_mode DATA connection...\n";
+
     if(!$closed) {
-        logmsg "* disconnect data connection\n";
         if($datapid > 0) {
+            logmsg "Server disconnects $datasockf_mode DATA connection\n";
             print DWRITE "DISC\n";
             my $i;
             sysread DREAD, $i, 5;
         }
+        else {
+            logmsg "Server finds $datasockf_mode DATA connection already ".
+                   "disconnected\n";
+        }
     }
     else {
-        logmsg "data connection already disconnected\n";
+        logmsg "Server knows $datasockf_mode DATA connection is already ".
+               "disconnected\n";
     }
-    logmsg "=====> Closed data connection\n";
 
-    logmsg "* quit sockfilt for data (pid $datapid)\n";
     if($datapid > 0) {
         print DWRITE "QUIT\n";
         waitpid($datapid, 0);
         unlink($datasockf_pidfile) if(-f $datasockf_pidfile);
+        logmsg "DATA sockfilt for $datasockf_mode data channel quits ".
+               "(pid $datapid)\n";
+    }
+    else {
+        logmsg "DATA sockfilt for $datasockf_mode data channel already ".
+               "dead\n";
     }
+
+    logmsg "=====> Closed $datasockf_mode DATA connection\n";
+
+    datasockf_state('STOPPED');
 }
 
 ################
@@ -523,7 +708,7 @@ sub DATA_smtp {
                 $size = hex($1);
             }
 
-            sysread \*SFREAD, $line, $size;
+            read_mainsockf(\$line, $size);
 
             $ulsize += $size;
             print FILE $line if(!$nosave);
@@ -574,73 +759,333 @@ my $cmdid;
 # what was picked by SELECT
 my $selected;
 
+# Any IMAP parameter can come in escaped and in double quotes.
+# This function is dumb (so far) and just removes the quotes if present.
+sub fix_imap_params {
+    foreach (@_) {
+        $_ = $1 if /^"(.*)"$/;
+    }
+}
+
+sub CAPABILITY_imap {
+    my ($testno) = @_;
+    my $data;
+
+    if(!$support_capa) {
+        sendcontrol "$cmdid BAD Command\r\n";
+    }
+    else {
+        $data = "* CAPABILITY IMAP4";
+        if($support_auth) {
+            $data .= " AUTH=UNKNOWN";
+        }
+        $data .= " pingpong test server\r\n";
+
+        sendcontrol $data;
+        sendcontrol "$cmdid OK CAPABILITY completed\r\n";
+    }
+
+    return 0;
+}
+
 sub SELECT_imap {
     my ($testno) = @_;
-    my @data;
-    my $size;
+    fix_imap_params($testno);
 
     logmsg "SELECT_imap got test $testno\n";
 
+    # Example from RFC 3501, 6.3.1. SELECT Command
+    sendcontrol "* 172 EXISTS\r\n";
+    sendcontrol "* 1 RECENT\r\n";
+    sendcontrol "* OK [UNSEEN 12] Message 12 is first unseen\r\n";
+    sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
+    sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
+    sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
+    sendcontrol "* OK [PERMANENTFLAGS (\\Deleted \\Seen \\*)] Limited\r\n";
+    sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\r\n";
+
     $selected = $testno;
 
     return 0;
 }
 
-
 sub FETCH_imap {
-     my ($testno) = @_;
-     my @data;
-     my $size;
+    my ($args) = @_;
+    my ($uid, $how) = split(/ /, $args, 2);
+    my @data;
+    my $size;
+    fix_imap_params($uid, $how);
+
+    logmsg "FETCH_imap got $args\n";
+
+    if($selected eq "verifiedserver") {
+        # this is the secret command that verifies that this actually is
+        # the curl test server
+        my $response = "WE ROOLZ: $$\r\n";
+        if($verbose) {
+            print STDERR "FTPD: We returned proof we are the test server\n";
+        }
+        $data[0] = $response;
+        logmsg "return proof we are we\n";
+    }
+    else {
+        logmsg "retrieve a mail\n";
+
+        my $testno = $selected;
+        $testno =~ s/^([^0-9]*)//;
+        my $testpart = "";
+        if ($testno > 10000) {
+            $testpart = $testno % 10000;
+            $testno = int($testno / 10000);
+        }
+
+        # send mail content
+        loadtest("$srcdir/data/test$testno");
 
-     logmsg "FETCH_imap got test $testno\n";
+        @data = getpart("reply", "data$testpart");
+    }
+
+    for (@data) {
+        $size += length($_);
+    }
 
-     $testno = $selected;
+    sendcontrol "* $uid FETCH ($how {$size}\r\n";
 
-     if($testno =~ /^verifiedserver$/) {
+    for my $d (@data) {
+        sendcontrol $d;
+    }
+
+    sendcontrol ")\r\n";
+    sendcontrol "$cmdid OK FETCH completed\r\n";
+
+    return 0;
+}
+
+sub APPEND_imap {
+    my ($args) = @_;
+
+    logmsg "APPEND_imap got $args\r\n";
+
+    $args =~ /^([^ ]+) [^{]*\{(\d+)\}$/;
+    my ($folder, $size) = ($1, $2);
+    fix_imap_params($folder);
+
+    sendcontrol "+ Ready for literal data\r\n";
+
+    my $testno = $folder;
+    my $filename = "log/upload.$testno";
+
+    logmsg "Store test number $testno in $filename\n";
+
+    open(FILE, ">$filename") ||
+        return 0; # failed to open output
+
+    my $received = 0;
+    my $line;
+    while(5 == (sysread \*SFREAD, $line, 5)) {
+        if($line eq "DATA\n") {
+            sysread \*SFREAD, $line, 5;
+
+            my $chunksize = 0;
+            if($line =~ /^([0-9a-fA-F]{4})\n/) {
+                $chunksize = hex($1);
+            }
+
+            read_mainsockf(\$line, $chunksize);
+
+            my $left = $size - $received;
+            my $datasize = ($left > $chunksize) ? $chunksize : $left;
+
+            if($datasize > 0) {
+                logmsg "> Appending $datasize bytes to file\n";
+                print FILE substr($line, 0, $datasize) if(!$nosave);
+                $line = substr($line, $datasize);
+
+                $received += $datasize;
+                if($received == $size) {
+                    logmsg "Received all data, waiting for final CRLF.\n";
+                }
+            }
+
+            if($received == $size && $line eq "\r\n") {
+                last;
+            }
+        }
+        elsif($line eq "DISC\n") {
+            logmsg "Unexpected disconnect!\n";
+            last;
+        }
+        else {
+            logmsg "No support for: $line";
+            last;
+        }
+    }
+
+    if($nosave) {
+        print FILE "$size bytes would've been stored here\n";
+    }
+    close(FILE);
+
+    logmsg "received $size bytes upload\n";
+
+    sendcontrol "$cmdid OK APPEND completed\r\n";
+
+    return 0;
+}
+
+sub STORE_imap {
+    my ($args) = @_;
+    my ($uid, $what) = split(/ /, $args, 2);
+    fix_imap_params($uid);
+
+    logmsg "STORE_imap got $args\n";
+
+    sendcontrol "* $uid FETCH (FLAGS (\\Seen \\Deleted))\r\n";
+    sendcontrol "$cmdid OK STORE completed\r\n";
+
+    return 0;
+}
+
+sub LIST_imap {
+    my ($args) = @_;
+    my ($reference, $mailbox) = split(/ /, $args, 2);
+    my @data;
+    fix_imap_params($reference, $mailbox);
+
+    logmsg "LIST_imap got $args\n";
+
+    if ($reference eq "verifiedserver") {
          # this is the secret command that verifies that this actually is
          # the curl test server
-         my $response = "WE ROOLZ: $$\r\n";
+         @data = ("* LIST () \"/\" \"WE ROOLZ: $$\"\r\n");
          if($verbose) {
              print STDERR "FTPD: We returned proof we are the test server\n";
          }
-         $data[0] = $response;
          logmsg "return proof we are we\n";
-     }
-     else {
-         logmsg "retrieve a mail\n";
+    }
+    else {
+        my $testno = $reference;
+        $testno =~ s/^([^0-9]*)//;
+        my $testpart = "";
+        if ($testno > 10000) {
+            $testpart = $testno % 10000;
+            $testno = int($testno / 10000);
+        }
+    
+        loadtest("$srcdir/data/test$testno");
 
-         $testno =~ s/^([^0-9]*)//;
-         my $testpart = "";
-         if ($testno > 10000) {
-             $testpart = $testno % 10000;
-             $testno = int($testno / 10000);
-         }
+        @data = getpart("reply", "data$testpart");
+    }
 
-         # send mail content
-         loadtest("$srcdir/data/test$testno");
+    for my $d (@data) {
+        sendcontrol $d;
+    }
 
-         @data = getpart("reply", "data$testpart");
-     }
+    sendcontrol "$cmdid OK LIST Completed\r\n";
 
-     for (@data) {
-         $size += length($_);
-     }
+    return 0;
+}
 
-     sendcontrol "* FETCH starts {$size}\r\n";
+sub EXAMINE_imap {
+    my ($testno) = @_;
+    fix_imap_params($testno);
 
-     for my $d (@data) {
-         sendcontrol $d;
-     }
+    logmsg "EXAMINE_imap got test $testno\n";
 
-     sendcontrol "$cmdid OK FETCH completed\r\n";
+    # Example from RFC 3501, 6.3.2. EXAMINE Command
+    sendcontrol "* 17 EXISTS\r\n";
+    sendcontrol "* 2 RECENT\r\n";
+    sendcontrol "* OK [UNSEEN 8] Message 8 is first unseen\r\n";
+    sendcontrol "* OK [UIDVALIDITY 3857529045] UIDs valid\r\n";
+    sendcontrol "* OK [UIDNEXT 4392] Predicted next UID\r\n";
+    sendcontrol "* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r\n";
+    sendcontrol "* OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n";
+    sendcontrol "$cmdid OK [READ-ONLY] EXAMINE completed\r\n";
 
-     return 0;
+    return 0;
+}
+
+sub STATUS_imap {
+    my ($testno) = @_;
+    fix_imap_params($testno);
+
+    logmsg "STATUS_imap got test $testno\n";
+
+    $testno =~ s/[^0-9]//g;
+    my $testpart = "";
+    if ($testno > 10000) {
+        $testpart = $testno % 10000;
+        $testno = int($testno / 10000);
+    }
+
+    loadtest("$srcdir/data/test$testno");
+
+    my @data = getpart("reply", "data$testpart");
+
+    for my $d (@data) {
+        sendcontrol $d;
+    }
+
+    sendcontrol "$cmdid OK STATUS completed\r\n";
+
+    return 0;
+}
+
+sub LOGOUT_imap {
+    sendcontrol "* BYE cURL IMAP server signing off\r\n";
+    sendcontrol "$cmdid OK LOGOUT completed\r\n";
+
+    return 0;
 }
 
 ################
 ################ POP3 commands
 ################
 
+sub CAPA_pop3 {
+    my ($testno) = @_;
+    my @data = ();
+
+    if(!$support_capa) {
+        push @data, "-ERR Unsupported command: 'CAPA'\r\n";
+    }
+    else {
+        push @data, "+OK List of capabilities follows\r\n";
+        push @data, "USER\r\n";
+        if($support_auth) {
+            push @data, "SASL UNKNOWN\r\n";
+        }
+        push @data, "IMPLEMENTATION POP3 pingpong test server\r\n";
+        push @data, ".\r\n";
+    }
+
+    for my $d (@data) {
+        sendcontrol $d;
+    }
+
+    return 0;
+}
+
+sub AUTH_pop3 {
+    my ($testno) = @_;
+    my @data = ();
+
+    if(!$support_auth) {
+        push @data, "-ERR Unsupported command: 'AUTH'\r\n";
+    }
+    else {
+        push @data, "+OK List of supported mechanisms follows\r\n";
+        push @data, "UNKNOWN\r\n";
+        push @data, ".\r\n";
+    }
+
+    for my $d (@data) {
+        sendcontrol $d;
+    }
+
+    return 0;
+}
+
 sub RETR_pop3 {
      my ($testno) = @_;
      my @data;
@@ -677,8 +1122,32 @@ sub RETR_pop3 {
          sendcontrol $d;
      }
 
-     # end with the magic 5-byte end of mail marker
-     sendcontrol "\r\n.\r\n";
+     # end with the magic 3-byte end of mail marker, assumes that the
+     # mail body ends with a CRLF!
+     sendcontrol ".\r\n";
+
+     return 0;
+}
+
+sub LIST_pop3 {
+
+# this is a built-in fake-message list
+my @pop3list=(
+"1 100\r\n",
+"2 4294967400\r\n",    # > 4 GB
+"4 200\r\n", # Note that message 3 is a simulated "deleted" message
+);
+
+     logmsg "retrieve a message list\n";
+
+     sendcontrol "+OK Listing starts\r\n";
+
+     for my $d (@pop3list) {
+         sendcontrol $d;
+     }
+
+     # end with the magic 3-byte end of listing marker
+     sendcontrol ".\r\n";
 
      return 0;
 }
@@ -766,6 +1235,25 @@ my @ftpdir=("total 20\r\n",
 "drwxrwxrwx   2 98       1            512 Oct 30 14:33 pub\r\n",
 "dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr\r\n");
 
+    if($datasockf_conn eq 'no') {
+        if($nodataconn425) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "425 Can't open data connection\r\n";
+        }
+        elsif($nodataconn421) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "421 Connection timed out\r\n";
+        }
+        elsif($nodataconn150) {
+            sendcontrol "150 Opening data connection\r\n";
+            # client shall timeout
+        }
+        else {
+            # client shall timeout
+        }
+        return 0;
+    }
+
     if($ftplistparserstate) {
       @ftpdir = ftp_contentlist($ftptargetdir);
     }
@@ -781,6 +1269,26 @@ my @ftpdir=("total 20\r\n",
 
 sub NLST_ftp {
     my @ftpdir=("file", "with space", "fake", "..", " ..", "funny", "README");
+
+    if($datasockf_conn eq 'no') {
+        if($nodataconn425) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "425 Can't open data connection\r\n";
+        }
+        elsif($nodataconn421) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "421 Connection timed out\r\n";
+        }
+        elsif($nodataconn150) {
+            sendcontrol "150 Opening data connection\r\n";
+            # client shall timeout
+        }
+        else {
+            # client shall timeout
+        }
+        return 0;
+    }
+
     logmsg "pass NLST data on data connection\n";
     for(@ftpdir) {
         senddata "$_\r\n";
@@ -884,6 +1392,25 @@ sub SIZE_ftp {
 sub RETR_ftp {
     my ($testno) = @_;
 
+    if($datasockf_conn eq 'no') {
+        if($nodataconn425) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "425 Can't open data connection\r\n";
+        }
+        elsif($nodataconn421) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "421 Connection timed out\r\n";
+        }
+        elsif($nodataconn150) {
+            sendcontrol "150 Opening data connection\r\n";
+            # client shall timeout
+        }
+        else {
+            # client shall timeout
+        }
+        return 0;
+    }
+
     if($ftplistparserstate) {
         my @content = wildcard_getfile($ftptargetdir, $testno);
         if($content[0] == -1) {
@@ -978,6 +1505,25 @@ sub STOR_ftp {
 
     my $filename = "log/upload.$testno";
 
+    if($datasockf_conn eq 'no') {
+        if($nodataconn425) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "425 Can't open data connection\r\n";
+        }
+        elsif($nodataconn421) {
+            sendcontrol "150 Opening data connection\r\n";
+            sendcontrol "421 Connection timed out\r\n";
+        }
+        elsif($nodataconn150) {
+            sendcontrol "150 Opening data connection\r\n";
+            # client shall timeout
+        }
+        else {
+            # client shall timeout
+        }
+        return 0;
+    }
+
     logmsg "STOR test number $testno in $filename\n";
 
     sendcontrol "125 Gimme gimme gimme!\r\n";
@@ -998,7 +1544,7 @@ sub STOR_ftp {
                 $size = hex($1);
             }
 
-            sysread DREAD, $line, $size;
+            read_datasockf(\$line, $size);
 
             #print STDERR "  GOT: $size bytes\n";
 
@@ -1029,31 +1575,61 @@ sub STOR_ftp {
 sub PASV_ftp {
     my ($arg, $cmd)=@_;
     my $pasvport;
+    my $bindonly = ($nodataconn) ? '--bindonly' : '';
 
     # kill previous data connection sockfilt when alive
-    killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+    if($datasockf_runs eq 'yes') {
+        killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt for $datasockf_mode data channel killed\n";
+    }
+    datasockf_state('STOPPED');
+
+    logmsg "====> Passive DATA channel requested by client\n";
+
+    logmsg "DATA sockfilt for passive data channel starting...\n";
 
     # We fire up a new sockfilt to do the data transfer for us.
     my $datasockfcmd = "./server/sockfilt " .
-        "--ipv$ipvnum --port 0 " .
+        "--ipv$ipvnum $bindonly --port 0 " .
         "--pidfile \"$datasockf_pidfile\" " .
         "--logfile \"$datasockf_logfile\"";
     $slavepid = open2(\*DREAD, \*DWRITE, $datasockfcmd);
 
+    if($nodataconn) {
+        datasockf_state('PASSIVE_NODATACONN');
+    }
+    else {
+        datasockf_state('PASSIVE');
+    }
+
+    print STDERR "$datasockfcmd\n" if($verbose);
+
     print DWRITE "PING\n";
     my $pong;
     sysread_or_die(\*DREAD, \$pong, 5);
 
-    if($pong !~ /^PONG/) {
-        logmsg "failed to run sockfilt for data connection\n";
+    if($pong =~ /^FAIL/) {
+        logmsg "DATA sockfilt said: FAIL\n";
+        logmsg "DATA sockfilt for passive data channel failed\n";
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
+        sendcontrol "500 no free ports!\r\n";
+        return;
+    }
+    elsif($pong !~ /^PONG/) {
+        logmsg "DATA sockfilt unexpected response: $pong\n";
+        logmsg "DATA sockfilt for passive data channel failed\n";
+        logmsg "DATA sockfilt killed now\n";
         killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
         sendcontrol "500 no free ports!\r\n";
-        return 0;
+        return;
     }
 
-    logmsg "Run sockfilt for data on pid $slavepid\n";
+    logmsg "DATA sockfilt for passive data channel started (pid $slavepid)\n";
 
-    # Find out what port we listen on
+    # Find out on what port we listen on or have bound
     my $i;
     print DWRITE "PORT\n";
 
@@ -1069,7 +1645,7 @@ sub PASV_ftp {
     }
 
     # READ the response data
-    sysread_or_die(\*DREAD, \$i, $size);
+    read_datasockf(\$i, $size);
 
     # The data is in the format
     # IPvX/NNN
@@ -1079,6 +1655,27 @@ sub PASV_ftp {
         $pasvport = $2;
     }
 
+    if(!$pasvport) {
+        logmsg "DATA sockfilt unknown listener port\n";
+        logmsg "DATA sockfilt for passive data channel failed\n";
+        logmsg "DATA sockfilt killed now\n";
+        killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
+        sendcontrol "500 no free ports!\r\n";
+        return;
+    }
+
+    if($nodataconn) {
+        my $str = nodataconn_str();
+        logmsg "DATA sockfilt for passive data channel ($str) bound on port ".
+               "$pasvport\n";
+    }
+    else {
+        logmsg "DATA sockfilt for passive data channel listens on port ".
+               "$pasvport\n";
+    }
+
     if($cmd ne "EPSV") {
         # PASV reply
         my $p=$listenaddr;
@@ -1087,13 +1684,22 @@ sub PASV_ftp {
             $p="1,2,3,4";
         }
         sendcontrol sprintf("227 Entering Passive Mode ($p,%d,%d)\n",
-                            ($pasvport/256), ($pasvport%256));
+                            int($pasvport/256), int($pasvport%256));
     }
     else {
         # EPSV reply
         sendcontrol sprintf("229 Entering Passive Mode (|||%d|)\n", $pasvport);
     }
 
+    logmsg "Client has been notified that DATA conn ".
+           "will be accepted on port $pasvport\n";
+
+    if($nodataconn) {
+        my $str = nodataconn_str();
+        logmsg "====> Client fooled ($str)\n";
+        return;
+    }
+
     eval {
         local $SIG{ALRM} = sub { die "alarm\n" };
 
@@ -1103,6 +1709,8 @@ sub PASV_ftp {
         # Wait for 'CNCT'
         my $input;
 
+        # FIX: Monitor ctrl conn for disconnect
+
         while(sysread(DREAD, $input, 5)) {
 
             if($input !~ /^CNCT/) {
@@ -1110,7 +1718,7 @@ sub PASV_ftp {
                 logmsg "Odd, we got $input from client\n";
                 next;
             }
-            logmsg "====> Client DATA connect\n";
+            logmsg "Client connects to port $pasvport\n";
             last;
         }
         alarm 0;
@@ -1120,54 +1728,85 @@ sub PASV_ftp {
         logmsg "$srvrname server timed out awaiting data connection ".
             "on port $pasvport\n";
         logmsg "accept failed or connection not even attempted\n";
+        logmsg "DATA sockfilt killed now\n";
         killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
         return;
     }
     else {
-        logmsg "data connection setup on port $pasvport\n";
+        logmsg "====> Client established passive DATA connection ".
+               "on port $pasvport\n";
     }
 
     return;
 }
 
-# Support both PORT and EPRT here. Consider LPRT too.
+#
+# Support both PORT and EPRT here.
+#
 
 sub PORT_ftp {
     my ($arg, $cmd) = @_;
     my $port;
     my $addr;
 
+    # kill previous data connection sockfilt when alive
+    if($datasockf_runs eq 'yes') {
+        killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt for $datasockf_mode data channel killed\n";
+    }
+    datasockf_state('STOPPED');
+
+    logmsg "====> Active DATA channel requested by client\n";
+
     # We always ignore the given IP and use localhost.
 
     if($cmd eq "PORT") {
         if($arg !~ /(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)/) {
-            logmsg "bad PORT-line: $arg\n";
+            logmsg "DATA sockfilt for active data channel not started ".
+                   "(bad PORT-line: $arg)\n";
             sendcontrol "500 silly you, go away\r\n";
-            return 0;
+            return;
         }
         $port = ($5<<8)+$6;
         $addr = "$1.$2.$3.$4";
     }
     # EPRT |2|::1|49706|
-    elsif(($cmd eq "EPRT") && ($grok_eprt)) {
+    elsif($cmd eq "EPRT") {
         if($arg !~ /(\d+)\|([^\|]+)\|(\d+)/) {
+            logmsg "DATA sockfilt for active data channel not started ".
+                   "(bad EPRT-line: $arg)\n";
             sendcontrol "500 silly you, go away\r\n";
-            return 0;
+            return;
         }
         sendcontrol "200 Thanks for dropping by. We contact you later\r\n";
         $port = $3;
         $addr = $2;
     }
     else {
+        logmsg "DATA sockfilt for active data channel not started ".
+               "(invalid command: $cmd)\n";
         sendcontrol "500 we don't like $cmd now\r\n";
-        return 0;
+        return;
     }
 
     if(!$port || $port > 65535) {
-        print STDERR "very illegal PORT number: $port\n";
-        return 1;
+        logmsg "DATA sockfilt for active data channel not started ".
+               "(illegal PORT number: $port)\n";
+        return;
+    }
+
+    if($nodataconn) {
+        my $str = nodataconn_str();
+        logmsg "DATA sockfilt for active data channel not started ($str)\n";
+        datasockf_state('ACTIVE_NODATACONN');
+        logmsg "====> Active DATA channel not established\n";
+        return;
     }
 
+    logmsg "DATA sockfilt for active data channel starting...\n";
+
     # We fire up a new sockfilt to do the data transfer for us.
     my $datasockfcmd = "./server/sockfilt " .
         "--ipv$ipvnum --connect $port --addr \"$addr\" " .
@@ -1175,38 +1814,129 @@ sub PORT_ftp {
         "--logfile \"$datasockf_logfile\"";
     $slavepid = open2(\*DREAD, \*DWRITE, $datasockfcmd);
 
+    datasockf_state('ACTIVE');
+
     print STDERR "$datasockfcmd\n" if($verbose);
 
     print DWRITE "PING\n";
     my $pong;
     sysread_or_die(\*DREAD, \$pong, 5);
 
-    if($pong !~ /^PONG/) {
-        logmsg "Failed sockfilt for data connection\n";
+    if($pong =~ /^FAIL/) {
+        logmsg "DATA sockfilt said: FAIL\n";
+        logmsg "DATA sockfilt for active data channel failed\n";
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
+        # client shall timeout awaiting connection from server
+        return;
+    }
+    elsif($pong !~ /^PONG/) {
+        logmsg "DATA sockfilt unexpected response: $pong\n";
+        logmsg "DATA sockfilt for active data channel failed\n";
+        logmsg "DATA sockfilt killed now\n";
         killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt not running\n";
+        datasockf_state('STOPPED');
+        # client shall timeout awaiting connection from server
+        return;
     }
 
-    logmsg "====> Client DATA connect to port $port\n";
+    logmsg "DATA sockfilt for active data channel started (pid $slavepid)\n";
+
+    logmsg "====> Active DATA channel connected to client port $port\n";
 
     return;
 }
 
 #**********************************************************************
+# datasockf_state is used to change variables that keep state info
+# relative to the FTP secondary or data sockfilt process as soon as
+# one of the five possible stable states is reached. Variables that
+# are modified by this sub may be checked independently but should
+# not be changed except by calling this sub.
+#
+sub datasockf_state {
+    my $state = $_[0];
+
+  if($state eq 'STOPPED') {
+    # Data sockfilter initial state, not running,
+    # not connected and not used.
+    $datasockf_state = $state;
+    $datasockf_mode = 'none';
+    $datasockf_runs = 'no';
+    $datasockf_conn = 'no';
+  }
+  elsif($state eq 'PASSIVE') {
+    # Data sockfilter accepted connection from client.
+    $datasockf_state = $state;
+    $datasockf_mode = 'passive';
+    $datasockf_runs = 'yes';
+    $datasockf_conn = 'yes';
+  }
+  elsif($state eq 'ACTIVE') {
+    # Data sockfilter has connected to client.
+    $datasockf_state = $state;
+    $datasockf_mode = 'active';
+    $datasockf_runs = 'yes';
+    $datasockf_conn = 'yes';
+  }
+  elsif($state eq 'PASSIVE_NODATACONN') {
+    # Data sockfilter bound port without listening,
+    # client won't be able to establish data connection.
+    $datasockf_state = $state;
+    $datasockf_mode = 'passive';
+    $datasockf_runs = 'yes';
+    $datasockf_conn = 'no';
+  }
+  elsif($state eq 'ACTIVE_NODATACONN') {
+    # Data sockfilter does not even run,
+    # client awaits data connection from server in vain.
+    $datasockf_state = $state;
+    $datasockf_mode = 'active';
+    $datasockf_runs = 'no';
+    $datasockf_conn = 'no';
+  }
+  else {
+      die "Internal error. Unknown datasockf state: $state!";
+  }
+}
+
+#**********************************************************************
+# nodataconn_str returns string of efective nodataconn command. Notice
+# that $nodataconn may be set alone or in addition to a $nodataconnXXX.
+#
+sub nodataconn_str {
+    my $str;
+    # order matters
+    $str = 'NODATACONN' if($nodataconn);
+    $str = 'NODATACONN425' if($nodataconn425);
+    $str = 'NODATACONN421' if($nodataconn421);
+    $str = 'NODATACONN150' if($nodataconn150);
+    return "$str";
+}
+
+#**********************************************************************
 # customize configures test server operation for each curl test, reading
 # configuration commands/parameters from server commands file each time
 # a new client control connection is established with the test server.
 # On success returns 1, otherwise zero.
 #
 sub customize {
-    $ctrldelay = 0;    # default is no throttling of the ctrl stream
-    $datadelay = 0;    # default is no throttling of the data stream
-    $retrweirdo = 0;   # default is no use of RETRWEIRDO
-    $retrnosize = 0;   # default is no use of RETRNOSIZE
-    $pasvbadip = 0;    # default is no use of PASVBADIP
-    $nosave = 0;       # default is to actually save uploaded data to file
-    %customreply = (); #
-    %customcount = (); #
-    %delayreply = ();  #
+    $ctrldelay = 0;     # default is no throttling of the ctrl stream
+    $datadelay = 0;     # default is no throttling of the data stream
+    $retrweirdo = 0;    # default is no use of RETRWEIRDO
+    $retrnosize = 0;    # default is no use of RETRNOSIZE
+    $pasvbadip = 0;     # default is no use of PASVBADIP
+    $nosave = 0;        # default is to actually save uploaded data to file
+    $nodataconn = 0;    # default is to establish or accept data channel
+    $nodataconn425 = 0; # default is to not send 425 without data channel
+    $nodataconn421 = 0; # default is to not send 421 without data channel
+    $nodataconn150 = 0; # default is to not send 150 without data channel
+    $support_capa = 0;  # default is to not support capability command
+    $support_auth = 0;  # default is to not support authentication command
+    %customreply = ();  #
+    %customcount = ();  #
+    %delayreply = ();   #
 
     open(CUSTOM, "<log/ftpserver.cmd") ||
         return 1;
@@ -1218,7 +1948,7 @@ sub customize {
             $customreply{$1}=eval "qq{$2}";
             logmsg "FTPD: set custom reply for $1\n";
         }
-        if($_ =~ /COUNT ([A-Z]+) (.*)/) {
+        elsif($_ =~ /COUNT ([A-Z]+) (.*)/) {
             # we blank the customreply for this command when having
             # been used this number of times
             $customcount{$1}=$2;
@@ -1245,6 +1975,37 @@ sub customize {
             logmsg "FTPD: instructed to use PASVBADIP\n";
             $pasvbadip=1;
         }
+        elsif($_ =~ /NODATACONN425/) {
+            # applies to both active and passive FTP modes
+            logmsg "FTPD: instructed to use NODATACONN425\n";
+            $nodataconn425=1;
+            $nodataconn=1;
+        }
+        elsif($_ =~ /NODATACONN421/) {
+            # applies to both active and passive FTP modes
+            logmsg "FTPD: instructed to use NODATACONN421\n";
+            $nodataconn421=1;
+            $nodataconn=1;
+        }
+        elsif($_ =~ /NODATACONN150/) {
+            # applies to both active and passive FTP modes
+            logmsg "FTPD: instructed to use NODATACONN150\n";
+            $nodataconn150=1;
+            $nodataconn=1;
+        }
+        elsif($_ =~ /NODATACONN/) {
+            # applies to both active and passive FTP modes
+            logmsg "FTPD: instructed to use NODATACONN\n";
+            $nodataconn=1;
+        }
+        elsif($_ =~ /SUPPORTCAPA/) {
+            logmsg "FTPD: instructed to support CAPABILITY command\n";
+            $support_capa=1;
+        }
+        elsif($_ =~ /SUPPORTAUTH/) {
+            logmsg "FTPD: instructed to support AUTHENTICATION command\n";
+            $support_auth=1;
+        }
         elsif($_ =~ /NOSAVE/) {
             # don't actually store the file we upload - to be used when
             # uploading insanely huge amounts
@@ -1317,12 +2078,10 @@ while(@ARGV) {
     elsif($ARGV[0] eq '--ipv4') {
         $ipvnum = 4;
         $listenaddr = '127.0.0.1' if($listenaddr eq '::1');
-        $grok_eprt = 0;
     }
     elsif($ARGV[0] eq '--ipv6') {
         $ipvnum = 6;
         $listenaddr = '::1' if($listenaddr eq '127.0.0.1');
-        $grok_eprt = 1;
     }
     elsif($ARGV[0] eq '--port') {
         if($ARGV[1] && ($ARGV[1] =~ /^(\d+)$/)) {
@@ -1396,6 +2155,14 @@ logmsg("logged pid $$ in $pidfile\n");
 
 
 while(1) {
+
+    # kill previous data connection sockfilt when alive
+    if($datasockf_runs eq 'yes') {
+        killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
+        logmsg "DATA sockfilt for $datasockf_mode data channel killed now\n";
+    }
+    datasockf_state('STOPPED');
+
     #
     # We read 'sockfilt' commands.
     #
@@ -1406,7 +2173,7 @@ while(1) {
 
     if($input !~ /^CNCT/) {
         # we wait for a connected client
-        logmsg "sockfilt said: $input";
+        logmsg "MAIN sockfilt said: $input";
         next;
     }
     logmsg "====> Client connect\n";
@@ -1417,11 +2184,20 @@ while(1) {
     # flush data:
     $| = 1;
 
-    killsockfilters($proto, $ipvnum, $idnum, $verbose, 'data');
-
     &customize(); # read test control instructions
 
-    sendcontrol @welcome;
+    my $welcome = $customreply{"welcome"};
+    if(!$welcome) {
+        $welcome = $displaytext{"welcome"};
+    }
+    else {
+        # clear it after use
+        $customreply{"welcome"}="";
+        if($welcome !~ /\r\n\z/) {
+            $welcome .= "\r\n";
+        }
+    }
+    sendcontrol $welcome;
 
     #remove global variables from last connection
     if($ftplistparserstate) {
@@ -1432,11 +2208,11 @@ while(1) {
     }
 
     if($verbose) {
-        for(@welcome) {
-            print STDERR "OUT: $_";
-        }
+        print STDERR "OUT: $welcome";
     }
 
+    my $full = "";
+
     while(1) {
         my $i;
 
@@ -1447,7 +2223,7 @@ while(1) {
         sysread_or_die(\*SFREAD, \$i, 5);
 
         if($i !~ /^DATA/) {
-            logmsg "sockfilt said $i";
+            logmsg "MAIN sockfilt said $i";
             if($i =~ /^DISC/) {
                 # disconnect
                 last;
@@ -1464,38 +2240,42 @@ while(1) {
         }
 
         # data
-        sysread SFREAD, $_, $size;
+        read_mainsockf(\$input, $size);
+
+        ftpmsg $input;
+
+        $full .= $input;
 
-        ftpmsg $_;
+        # Loop until command completion
+        next unless($full =~ /\r\n$/);
 
         # Remove trailing CRLF.
-        s/[\n\r]+$//;
+        $full =~ s/[\n\r]+$//;
 
         my $FTPCMD;
         my $FTPARG;
-        my $full=$_;
         if($proto eq "imap") {
             # IMAP is different with its identifier first on the command line
-            unless (m/^([^ ]+) ([^ ]+) (.*)/ ||
-                    m/^([^ ]+) ([^ ]+)/) {
-                sendcontrol "$1 '$_': command not understood.\r\n";
+            unless(($full =~ /^([^ ]+) ([^ ]+) (.*)/) ||
+                   ($full =~ /^([^ ]+) ([^ ]+)/)) {
+                sendcontrol "$1 '$full': command not understood.\r\n";
                 last;
             }
             $cmdid=$1; # set the global variable
             $FTPCMD=$2;
             $FTPARG=$3;
         }
-        elsif (m/^([A-Z]{3,4})(\s(.*))?$/i) {
+        elsif($full =~ /^([A-Z]{3,4})(\s(.*))?$/i) {
             $FTPCMD=$1;
             $FTPARG=$3;
         }
-        elsif($proto eq "smtp" && m/^[A-Z0-9+\/]{0,512}={0,2}$/i) {
+        elsif(($proto eq "smtp") && ($full =~ /^[A-Z0-9+\/]{0,512}={0,2}$/i)) {
             # SMTP long "commands" are base64 authentication data.
-            $FTPCMD=$_;
+            $FTPCMD=$full;
             $FTPARG="";
         }
         else {
-            sendcontrol "500 '$_': command not understood.\r\n";
+            sendcontrol "500 '$full': command not understood.\r\n";
             last;
         }
 
@@ -1505,6 +2285,8 @@ while(1) {
             print STDERR "IN: $full\n";
         }
 
+        $full = "";
+
         my $delay = $delayreply{$FTPCMD};
         if($delay) {
             # just go sleep this many seconds!
@@ -1552,7 +2334,15 @@ while(1) {
 
         if($check) {
             logmsg "$FTPCMD wasn't handled!\n";
-            sendcontrol "500 $FTPCMD is not dealt with!\r\n";
+            if($proto eq 'pop3') {
+                sendcontrol "-ERR $FTPCMD is not dealt with!\r\n";
+            }
+            elsif($proto eq 'imap') {
+                sendcontrol "$cmdid BAD $FTPCMD is not dealt with!\r\n";
+            }
+            else {
+                sendcontrol "500 $FTPCMD is not dealt with!\r\n";
+            }
         }
 
     } # while(1)
index 42e3b2b..92a2378 100644 (file)
@@ -1,3 +1,24 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2012, 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.
+#
+###########################################################################
 
 #use strict;
 
@@ -35,13 +56,17 @@ sub getpartattr {
             $inside++;
             my $attr=$1;
 
-            while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\"> ]*))//) {
+            while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\> ]*))//) {
                 my ($var, $cont)=($1, $2);
                 $cont =~ s/^\"(.*)\"$/$1/;
                 $hash{$var}=$cont;
             }
             last;
         }
+        # detect end of section when part wasn't found
+        elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) {
+            last;
+        }
         elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
             $inside--;
         }
@@ -63,21 +88,27 @@ sub getpart {
         if(!$inside && ($_ =~ /^ *\<$section/)) {
             $inside++;
         }
-        elsif((1 ==$inside) && ($_ =~ /^ *\<$part[ \>]/)) {
-            if($_ =~ /$part [^>]*base64=/) {
-                # attempt to detect base64 encoded parts
+        elsif(($inside >= 1) && ($_ =~ /^ *\<$part[ \>]/)) {
+            if($inside > 1) {
+                push @this, $_;
+            }
+            elsif($_ =~ /$part [^>]*base64=/) {
+                # attempt to detect our base64 encoded part
                 $base64=1;
             }
             $inside++;
         }
-        elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
+        elsif(($inside >= 2) && ($_ =~ /^ *\<\/$part[ \>]/)) {
+            if($inside > 2) {
+                push @this, $_;
+            }
             $inside--;
         }
-        elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) {
-            if($trace) {
+        elsif(($inside >= 1) && ($_ =~ /^ *\<\/$section/)) {
+            if($trace && @this) {
                 print STDERR "*** getpart.pm: $section/$part returned data!\n";
             }
-            if(!@this && $warning) {
+            if($warning && !@this) {
                 print STDERR "*** getpart.pm: $section/$part returned empty!\n";
             }
             if($base64) {
@@ -89,14 +120,45 @@ sub getpart {
             }
             return @this;
         }
-        elsif(2==$inside) {
+        elsif($inside >= 2) {
             push @this, $_;
         }
     }
-    if($warning) {
+    if($trace && @this) {
+        # section/part has data but end of section not detected,
+        # end of file implies end of section.
+        print STDERR "*** getpart.pm: $section/$part returned data!\n";
+    }
+    if($warning && !@this) {
+        # section/part does not exist or has no data without an end of
+        # section; end of file implies end of section.
         print STDERR "*** getpart.pm: $section/$part returned empty!\n";
     }
-    return @this; #empty!
+    return @this;
+}
+
+sub partexists {
+    my ($section, $part)=@_;
+
+    my $inside = 0;
+
+    for(@xml) {
+        if(!$inside && ($_ =~ /^ *\<$section/)) {
+            $inside++;
+        }
+        elsif((1 == $inside) && ($_ =~ /^ *\<$part[ \>]/)) {
+            return 1; # exists
+        }
+        elsif((1 == $inside) && ($_ =~ /^ *\<\/$section/)) {
+            return 0; # does not exist
+        }
+    }
+    return 0; # does not exist
+}
+
+# Return entire document as list of lines
+sub getall {
+    return @xml;
 }
 
 sub loadtest {
diff --git a/tests/http_pipe.py b/tests/http_pipe.py
new file mode 100755 (executable)
index 0000000..67185be
--- /dev/null
@@ -0,0 +1,447 @@
+#!/usr/bin/python
+
+# Copyright 2012 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modified by Linus Nielsen Feltzing for inclusion in the libcurl test
+# framework
+#
+import SocketServer
+import argparse
+import re
+import select
+import socket
+import time
+import pprint
+import os
+
+INFO_MESSAGE = '''
+This is a test server to test the libcurl pipelining functionality.
+It is a modified version if Google's HTTP pipelining test server. More
+information can be found here:
+
+http://dev.chromium.org/developers/design-documents/network-stack/http-pipelining
+
+Source code can be found here:
+
+http://code.google.com/p/http-pipelining-test/
+'''
+MAX_REQUEST_SIZE = 1024  # bytes
+MIN_POLL_TIME = 0.01  # seconds. Minimum time to poll, in order to prevent
+                      # excessive looping because Python refuses to poll for
+                      # small timeouts.
+SEND_BUFFER_TIME = 0.5  # seconds
+TIMEOUT = 30  # seconds
+
+
+class Error(Exception):
+  pass
+
+
+class RequestTooLargeError(Error):
+  pass
+
+
+class ServeIndexError(Error):
+  pass
+
+
+class UnexpectedMethodError(Error):
+  pass
+
+
+class RequestParser(object):
+  """Parses an input buffer looking for HTTP GET requests."""
+
+  global logfile
+
+  LOOKING_FOR_GET = 1
+  READING_HEADERS = 2
+
+  HEADER_RE = re.compile('([^:]+):(.*)\n')
+  REQUEST_RE = re.compile('([^ ]+) ([^ ]+) HTTP/(\d+)\.(\d+)\n')
+
+  def __init__(self):
+    """Initializer."""
+    self._buffer = ""
+    self._pending_headers = {}
+    self._pending_request = ""
+    self._state = self.LOOKING_FOR_GET
+    self._were_all_requests_http_1_1 = True
+    self._valid_requests = []
+
+  def ParseAdditionalData(self, data):
+    """Finds HTTP requests in |data|.
+
+    Args:
+      data: (String) Newly received input data from the socket.
+
+    Returns:
+      (List of Tuples)
+        (String) The request path.
+        (Map of String to String) The header name and value.
+
+    Raises:
+      RequestTooLargeError: If the request exceeds MAX_REQUEST_SIZE.
+      UnexpectedMethodError: On a non-GET method.
+      Error: On a programming error.
+    """
+    logfile = open('log/server.input', 'a')
+    logfile.write(data)
+    logfile.close()
+    self._buffer += data.replace('\r', '')
+    should_continue_parsing = True
+    while should_continue_parsing:
+      if self._state == self.LOOKING_FOR_GET:
+        should_continue_parsing = self._DoLookForGet()
+      elif self._state == self.READING_HEADERS:
+        should_continue_parsing = self._DoReadHeader()
+      else:
+        raise Error('Unexpected state: ' + self._state)
+    if len(self._buffer) > MAX_REQUEST_SIZE:
+      raise RequestTooLargeError(
+          'Request is at least %d bytes' % len(self._buffer))
+    valid_requests = self._valid_requests
+    self._valid_requests = []
+    return valid_requests
+
+  @property
+  def were_all_requests_http_1_1(self):
+    return self._were_all_requests_http_1_1
+
+  def _DoLookForGet(self):
+    """Tries to parse an HTTTP request line.
+
+    Returns:
+      (Boolean) True if a request was found.
+
+    Raises:
+      UnexpectedMethodError: On a non-GET method.
+    """
+    m = self.REQUEST_RE.match(self._buffer)
+    if not m:
+      return False
+    method, path, http_major, http_minor = m.groups()
+
+    if method != 'GET':
+      raise UnexpectedMethodError('Unexpected method: ' + method)
+    if path in ['/', '/index.htm', '/index.html']:
+      raise ServeIndexError()
+
+    if http_major != '1' or http_minor != '1':
+      self._were_all_requests_http_1_1 = False
+
+#    print method, path
+
+    self._pending_request = path
+    self._buffer = self._buffer[m.end():]
+    self._state = self.READING_HEADERS
+    return True
+
+  def _DoReadHeader(self):
+    """Tries to parse a HTTP header.
+
+    Returns:
+      (Boolean) True if it found the end of the request or a HTTP header.
+    """
+    if self._buffer.startswith('\n'):
+      self._buffer = self._buffer[1:]
+      self._state = self.LOOKING_FOR_GET
+      self._valid_requests.append((self._pending_request,
+                                   self._pending_headers))
+      self._pending_headers = {}
+      self._pending_request = ""
+      return True
+
+    m = self.HEADER_RE.match(self._buffer)
+    if not m:
+      return False
+
+    header = m.group(1).lower()
+    value = m.group(2).strip().lower()
+    if header not in self._pending_headers:
+      self._pending_headers[header] = value
+    self._buffer = self._buffer[m.end():]
+    return True
+
+
+class ResponseBuilder(object):
+  """Builds HTTP responses for a list of accumulated requests."""
+
+  def __init__(self):
+    """Initializer."""
+    self._max_pipeline_depth = 0
+    self._requested_paths = []
+    self._processed_end = False
+    self._were_all_requests_http_1_1 = True
+
+  def QueueRequests(self, requested_paths, were_all_requests_http_1_1):
+    """Adds requests to the queue of requests.
+
+    Args:
+      requested_paths: (List of Strings) Requested paths.
+    """
+    self._requested_paths.extend(requested_paths)
+    self._were_all_requests_http_1_1 = were_all_requests_http_1_1
+
+  def Chunkify(self, data, chunksize):
+    """ Divides a string into chunks
+    """
+    return [hex(chunksize)[2:] + "\r\n" + data[i:i+chunksize] + "\r\n" for i in range(0, len(data), chunksize)]
+
+  def BuildResponses(self):
+    """Converts the queue of requests into responses.
+
+    Returns:
+      (String) Buffer containing all of the responses.
+    """
+    result = ""
+    self._max_pipeline_depth = max(self._max_pipeline_depth,
+                                   len(self._requested_paths))
+    for path, headers in self._requested_paths:
+      if path == '/verifiedserver':
+        body = "WE ROOLZ: {}\r\n".format(os.getpid());
+        result += self._BuildResponse(
+            '200 OK', ['Server: Apache',
+                       'Content-Length: {}'.format(len(body)),
+                       'Cache-Control: no-store'], body)
+
+      elif path == '/alphabet.txt':
+        body = 'abcdefghijklmnopqrstuvwxyz'
+        result += self._BuildResponse(
+            '200 OK', ['Server: Apache',
+                       'Content-Length: 26',
+                       'Cache-Control: no-store'], body)
+
+      elif path == '/reverse.txt':
+        body = 'zyxwvutsrqponmlkjihgfedcba'
+        result += self._BuildResponse(
+            '200 OK', ['Content-Length: 26', 'Cache-Control: no-store'], body)
+
+      elif path == '/chunked.txt':
+        body = ('7\r\nchunked\r\n'
+                '8\r\nencoding\r\n'
+                '2\r\nis\r\n'
+                '3\r\nfun\r\n'
+                '0\r\n\r\n')
+        result += self._BuildResponse(
+            '200 OK', ['Transfer-Encoding: chunked', 'Cache-Control: no-store'],
+            body)
+
+      elif path == '/cached.txt':
+        body = 'azbycxdwevfugthsirjqkplomn'
+        result += self._BuildResponse(
+            '200 OK', ['Content-Length: 26', 'Cache-Control: max-age=60'], body)
+
+      elif path == '/connection_close.txt':
+        body = 'azbycxdwevfugthsirjqkplomn'
+        result += self._BuildResponse(
+            '200 OK', ['Content-Length: 26', 'Cache-Control: max-age=60', 'Connection: close'], body)
+        self._processed_end = True
+
+      elif path == '/1k.txt':
+        str = '0123456789abcdef'
+        body = ''.join([str for num in xrange(64)])
+        result += self._BuildResponse(
+            '200 OK', ['Server: Apache',
+                       'Content-Length: 1024',
+                       'Cache-Control: max-age=60'], body)
+
+      elif path == '/10k.txt':
+        str = '0123456789abcdef'
+        body = ''.join([str for num in xrange(640)])
+        result += self._BuildResponse(
+            '200 OK', ['Server: Apache',
+                       'Content-Length: 10240',
+                       'Cache-Control: max-age=60'], body)
+
+      elif path == '/100k.txt':
+        str = '0123456789abcdef'
+        body = ''.join([str for num in xrange(6400)])
+        result += self._BuildResponse(
+            '200 OK',
+            ['Server: Apache',
+             'Content-Length: 102400',
+             'Cache-Control: max-age=60'],
+            body)
+
+      elif path == '/100k_chunked.txt':
+        str = '0123456789abcdef'
+        moo = ''.join([str for num in xrange(6400)])
+        body = self.Chunkify(moo, 20480)
+        body.append('0\r\n\r\n')
+        body = ''.join(body)
+
+        result += self._BuildResponse(
+            '200 OK', ['Transfer-Encoding: chunked', 'Cache-Control: no-store'], body)
+
+      elif path == '/stats.txt':
+        results = {
+            'max_pipeline_depth': self._max_pipeline_depth,
+            'were_all_requests_http_1_1': int(self._were_all_requests_http_1_1),
+        }
+        body = ','.join(['%s:%s' % (k, v) for k, v in results.items()])
+        result += self._BuildResponse(
+            '200 OK',
+            ['Content-Length: %s' % len(body), 'Cache-Control: no-store'], body)
+        self._processed_end = True
+
+      else:
+        result += self._BuildResponse('404 Not Found', ['Content-Length: 7'], 'Go away')
+      if self._processed_end:
+          break
+    self._requested_paths = []
+    return result
+
+  def WriteError(self, status, error):
+    """Returns an HTTP response for the specified error.
+
+    Args:
+      status: (String) Response code and descrtion (e.g. "404 Not Found")
+
+    Returns:
+      (String) Text of HTTP response.
+    """
+    return self._BuildResponse(
+        status, ['Connection: close', 'Content-Type: text/plain'], error)
+
+  @property
+  def processed_end(self):
+    return self._processed_end
+
+  def _BuildResponse(self, status, headers, body):
+    """Builds an HTTP response.
+
+    Args:
+      status: (String) Response code and descrtion (e.g. "200 OK")
+      headers: (List of Strings) Headers (e.g. "Connection: close")
+      body: (String) Response body.
+
+    Returns:
+      (String) Text of HTTP response.
+    """
+    return ('HTTP/1.1 %s\r\n'
+            '%s\r\n'
+            '\r\n'
+            '%s' % (status, '\r\n'.join(headers), body))
+
+
+class PipelineRequestHandler(SocketServer.BaseRequestHandler):
+  """Called on an incoming TCP connection."""
+
+  def _GetTimeUntilTimeout(self):
+    return self._start_time + TIMEOUT - time.time()
+
+  def _GetTimeUntilNextSend(self):
+    if not self._last_queued_time:
+      return TIMEOUT
+    return self._last_queued_time + SEND_BUFFER_TIME - time.time()
+
+  def handle(self):
+    self._request_parser = RequestParser()
+    self._response_builder = ResponseBuilder()
+    self._last_queued_time = 0
+    self._num_queued = 0
+    self._num_written = 0
+    self._send_buffer = ""
+    self._start_time = time.time()
+    try:
+      poller = select.epoll(sizehint=1)
+      poller.register(self.request.fileno(), select.EPOLLIN)
+      while not self._response_builder.processed_end or self._send_buffer:
+
+        time_left = self._GetTimeUntilTimeout()
+        time_until_next_send = self._GetTimeUntilNextSend()
+        max_poll_time = min(time_left, time_until_next_send) + MIN_POLL_TIME
+
+        events = None
+        if max_poll_time > 0:
+          if self._send_buffer:
+            poller.modify(self.request.fileno(),
+                          select.EPOLLIN | select.EPOLLOUT)
+          else:
+            poller.modify(self.request.fileno(), select.EPOLLIN)
+          events = poller.poll(timeout=max_poll_time)
+
+        if self._GetTimeUntilTimeout() <= 0:
+          return
+
+        if self._GetTimeUntilNextSend() <= 0:
+          self._send_buffer += self._response_builder.BuildResponses()
+          self._num_written = self._num_queued
+          self._last_queued_time = 0
+
+        for fd, mode in events:
+          if mode & select.EPOLLIN:
+            new_data = self.request.recv(MAX_REQUEST_SIZE, socket.MSG_DONTWAIT)
+            if not new_data:
+              return
+            new_requests = self._request_parser.ParseAdditionalData(new_data)
+            self._response_builder.QueueRequests(
+                new_requests, self._request_parser.were_all_requests_http_1_1)
+            self._num_queued += len(new_requests)
+            self._last_queued_time = time.time()
+          elif mode & select.EPOLLOUT:
+            num_bytes_sent = self.request.send(self._send_buffer[0:4096])
+            self._send_buffer = self._send_buffer[num_bytes_sent:]
+            time.sleep(0.05)
+          else:
+            return
+
+    except RequestTooLargeError as e:
+      self.request.send(self._response_builder.WriteError(
+          '413 Request Entity Too Large', e))
+      raise
+    except UnexpectedMethodError as e:
+      self.request.send(self._response_builder.WriteError(
+          '405 Method Not Allowed', e))
+      raise
+    except ServeIndexError:
+      self.request.send(self._response_builder.WriteError(
+          '200 OK', INFO_MESSAGE))
+    except Exception as e:
+      print e
+    self.request.close()
+
+
+class PipelineServer(SocketServer.ForkingMixIn, SocketServer.TCPServer):
+  pass
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--port", action="store", default=0,
+                  type=int, help="port to listen on")
+parser.add_argument("--verbose", action="store", default=0,
+                  type=int, help="verbose output")
+parser.add_argument("--pidfile", action="store", default=0,
+                  help="file name for the PID")
+parser.add_argument("--logfile", action="store", default=0,
+                  help="file name for the log")
+parser.add_argument("--srcdir", action="store", default=0,
+                  help="test directory")
+parser.add_argument("--id", action="store", default=0,
+                  help="server ID")
+parser.add_argument("--ipv4", action="store_true", default=0,
+                  help="IPv4 flag")
+args = parser.parse_args()
+
+if args.pidfile:
+    pid = os.getpid()
+    f = open(args.pidfile, 'w')
+    f.write('{}'.format(pid))
+    f.close()
+
+server = PipelineServer(('0.0.0.0', args.port), PipelineRequestHandler)
+server.allow_reuse_address = True
+server.serve_forever()
index 37161f0..a38c3ce 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, 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
@@ -22,7 +22,8 @@
 #***************************************************************************
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, '.');
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
 }
 
 use strict;
@@ -40,8 +41,8 @@ my $idnum = 1;       # dafault http server instance number
 my $proto = 'http';  # protocol the http server speaks
 my $pidfile;         # http server pid file
 my $logfile;         # http server log file
+my $connect;         # IP to connect to on CONNECT
 my $srcdir;
-my $fork;
 my $gopher = 0;
 
 my $flags  = "";
@@ -82,6 +83,12 @@ while(@ARGV) {
             shift @ARGV;
         }
     }
+    elsif($ARGV[0] eq '--connect') {
+        if($ARGV[1]) {
+            $connect = $ARGV[1];
+            shift @ARGV;
+        }
+    }
     elsif($ARGV[0] eq '--id') {
         if($ARGV[1] =~ /^(\d+)$/) {
             $idnum = $1 if($1 > 0);
@@ -91,9 +98,6 @@ while(@ARGV) {
     elsif($ARGV[0] eq '--verbose') {
         $verbose = 1;
     }
-    elsif($ARGV[0] eq '--fork') {
-        $fork = $ARGV[0];
-    }
     else {
         print STDERR "\nWarning: httpserver.pl unknown parameter: $ARGV[0]\n";
     }
@@ -110,9 +114,13 @@ if(!$logfile) {
     $logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
 }
 
-$flags .= "--gopher " if($gopher);
-$flags .= "--fork " if(defined($fork));
 $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+$flags .= "--gopher " if($gopher);
+$flags .= "--connect $connect " if($connect);
 $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
 
+if($verbose) {
+    print STDERR "RUN: server/sws $flags\n";
+}
+
 exec("server/sws $flags");
index 9c0d595..80707b1 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -27,34 +27,47 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
 
 if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_builddir)/ares         \
-           -I$(top_srcdir)/ares
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_builddir)/ares         \
+              -I$(top_srcdir)/ares
 else
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib
 endif
 
 EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl    \
-test1022.pl Makefile.inc
+test1022.pl Makefile.inc notexists.pl
+
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if USE_EXPLICIT_LIB_DEPS
+SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+else
+SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
+TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
+endif
 
 # Dependencies (may need to be overriden)
-LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+LDADD = $(SUPPORTFILES_LIBS)
 DEPENDENCIES = $(top_builddir)/lib/libcurl.la
 
 # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
@@ -70,14 +83,35 @@ else
 noinst_LTLIBRARIES =
 endif
 
-if NO_UNDEFINED
-# The -no-undefined flag is crucial to build fine on some platforms
-UNDEF = -no-undefined
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
 endif
 
+AM_LDFLAGS =
+AM_CFLAGS =
+
+libhostname_la_CPPFLAGS_EXTRA =
+libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere
+libhostname_la_CFLAGS_EXTRA =
+
+if CURL_LT_SHLIB_USE_NO_UNDEFINED
+libhostname_la_LDFLAGS_EXTRA += -no-undefined
+endif
+
+if CURL_LT_SHLIB_USE_MIMPURE_TEXT
+libhostname_la_LDFLAGS_EXTRA += -mimpure-text
+endif
+
+if DOING_CURL_SYMBOL_HIDING
+libhostname_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS
+libhostname_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING)
+endif
+
+libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
+libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
+libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
+
 libhostname_la_SOURCES = sethostname.c sethostname.h
 
 libhostname_la_LIBADD =
 libhostname_la_DEPENDENCIES =
-libhostname_la_LDFLAGS = -module -avoid-version $(UNDEF) -rpath /nowhere
-
index bce2c39..b14ca78 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 @SET_MAKE@
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -37,435 +79,793 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.inc
-noinst_PROGRAMS = lib500$(EXEEXT) lib501$(EXEEXT) lib502$(EXEEXT) \
-       lib503$(EXEEXT) lib504$(EXEEXT) lib505$(EXEEXT) \
-       lib506$(EXEEXT) lib507$(EXEEXT) lib508$(EXEEXT) \
-       lib510$(EXEEXT) lib511$(EXEEXT) lib512$(EXEEXT) \
-       lib513$(EXEEXT) lib514$(EXEEXT) lib515$(EXEEXT) \
-       lib516$(EXEEXT) lib517$(EXEEXT) lib518$(EXEEXT) \
-       lib519$(EXEEXT) lib520$(EXEEXT) lib521$(EXEEXT) \
-       lib523$(EXEEXT) lib524$(EXEEXT) lib525$(EXEEXT) \
-       lib526$(EXEEXT) lib527$(EXEEXT) lib574$(EXEEXT) \
-       lib575$(EXEEXT) lib576$(EXEEXT) lib577$(EXEEXT) \
-       lib578$(EXEEXT) lib579$(EXEEXT) lib529$(EXEEXT) \
-       lib530$(EXEEXT) lib532$(EXEEXT) lib533$(EXEEXT) \
-       lib536$(EXEEXT) lib537$(EXEEXT) lib540$(EXEEXT) \
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \
+       $(top_srcdir)/depcomp
+noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
+       libntlmconnect$(EXEEXT) lib500$(EXEEXT) lib501$(EXEEXT) \
+       lib502$(EXEEXT) lib503$(EXEEXT) lib504$(EXEEXT) \
+       lib505$(EXEEXT) lib506$(EXEEXT) lib507$(EXEEXT) \
+       lib508$(EXEEXT) lib509$(EXEEXT) lib510$(EXEEXT) \
+       lib511$(EXEEXT) lib512$(EXEEXT) lib513$(EXEEXT) \
+       lib514$(EXEEXT) lib515$(EXEEXT) lib516$(EXEEXT) \
+       lib517$(EXEEXT) lib518$(EXEEXT) lib519$(EXEEXT) \
+       lib520$(EXEEXT) lib521$(EXEEXT) lib523$(EXEEXT) \
+       lib524$(EXEEXT) lib525$(EXEEXT) lib526$(EXEEXT) \
+       lib527$(EXEEXT) lib529$(EXEEXT) lib530$(EXEEXT) \
+       lib532$(EXEEXT) lib533$(EXEEXT) lib536$(EXEEXT) \
+       lib537$(EXEEXT) lib539$(EXEEXT) lib540$(EXEEXT) \
        lib541$(EXEEXT) lib542$(EXEEXT) lib543$(EXEEXT) \
        lib544$(EXEEXT) lib545$(EXEEXT) lib547$(EXEEXT) \
        lib548$(EXEEXT) lib549$(EXEEXT) lib552$(EXEEXT) \
        lib553$(EXEEXT) lib554$(EXEEXT) lib555$(EXEEXT) \
-       lib556$(EXEEXT) lib539$(EXEEXT) lib557$(EXEEXT) \
-       lib558$(EXEEXT) lib559$(EXEEXT) lib560$(EXEEXT) \
-       lib562$(EXEEXT) lib564$(EXEEXT) lib565$(EXEEXT) \
-       lib566$(EXEEXT) lib567$(EXEEXT) lib568$(EXEEXT) \
-       lib569$(EXEEXT) lib570$(EXEEXT) lib571$(EXEEXT) \
-       lib572$(EXEEXT) lib573$(EXEEXT) chkhostname$(EXEEXT)
+       lib556$(EXEEXT) lib557$(EXEEXT) lib558$(EXEEXT) \
+       lib560$(EXEEXT) lib562$(EXEEXT) lib564$(EXEEXT) \
+       lib565$(EXEEXT) lib566$(EXEEXT) lib567$(EXEEXT) \
+       lib568$(EXEEXT) lib569$(EXEEXT) lib570$(EXEEXT) \
+       lib571$(EXEEXT) lib572$(EXEEXT) lib573$(EXEEXT) \
+       lib574$(EXEEXT) lib575$(EXEEXT) lib576$(EXEEXT) \
+       lib578$(EXEEXT) lib579$(EXEEXT) lib582$(EXEEXT) \
+       lib583$(EXEEXT) lib585$(EXEEXT) lib586$(EXEEXT) \
+       lib587$(EXEEXT) lib590$(EXEEXT) lib591$(EXEEXT) \
+       lib597$(EXEEXT) lib598$(EXEEXT) lib599$(EXEEXT) \
+       lib1500$(EXEEXT) lib1501$(EXEEXT) lib1502$(EXEEXT) \
+       lib1503$(EXEEXT) lib1504$(EXEEXT) lib1505$(EXEEXT) \
+       lib1506$(EXEEXT) lib1507$(EXEEXT) lib1508$(EXEEXT) \
+       lib1509$(EXEEXT) lib1510$(EXEEXT) lib1511$(EXEEXT) \
+       lib1512$(EXEEXT) lib1900$(EXEEXT) lib2033$(EXEEXT)
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
+@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_2 = -no-undefined
+@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_3 = -mimpure-text
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_4 = -DCURL_HIDDEN_SYMBOLS
+@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_5 = $(CFLAG_CURL_SYMBOL_HIDING)
 subdir = tests/libtest
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
-am_libhostname_la_OBJECTS = sethostname.lo
+am_libhostname_la_OBJECTS = libhostname_la-sethostname.lo
 libhostname_la_OBJECTS = $(am_libhostname_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libhostname_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libhostname_la_CFLAGS) $(CFLAGS) $(libhostname_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
 @BUILD_LIBHOSTNAME_TRUE@am_libhostname_la_rpath =
 PROGRAMS = $(noinst_PROGRAMS)
 am_chkhostname_OBJECTS = chkhostname-chkhostname.$(OBJEXT) \
        chkhostname-curl_gethostname.$(OBJEXT)
 chkhostname_OBJECTS = $(am_chkhostname_OBJECTS)
-am__objects_1 = first.$(OBJEXT)
-am_lib500_OBJECTS = lib500.$(OBJEXT) $(am__objects_1)
+am__objects_1 = lib1500-first.$(OBJEXT)
+am__objects_2 = lib1500-testutil.$(OBJEXT)
+am_lib1500_OBJECTS = lib1500-lib1500.$(OBJEXT) $(am__objects_1) \
+       $(am__objects_2)
+lib1500_OBJECTS = $(am_lib1500_OBJECTS)
+@USE_EXPLICIT_LIB_DEPS_FALSE@am__DEPENDENCIES_1 =  \
+@USE_EXPLICIT_LIB_DEPS_FALSE@  $(top_builddir)/lib/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@am__DEPENDENCIES_1 =  \
+@USE_EXPLICIT_LIB_DEPS_TRUE@   $(top_builddir)/lib/libcurl.la
+lib1500_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_3 = lib1501-first.$(OBJEXT)
+am__objects_4 = lib1501-testutil.$(OBJEXT)
+am__objects_5 = lib1501-warnless.$(OBJEXT)
+am_lib1501_OBJECTS = lib1501-lib1501.$(OBJEXT) $(am__objects_3) \
+       $(am__objects_4) $(am__objects_5)
+lib1501_OBJECTS = $(am_lib1501_OBJECTS)
+lib1501_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_6 = lib1502-first.$(OBJEXT)
+am__objects_7 = lib1502-testutil.$(OBJEXT)
+am__objects_8 = lib1502-warnless.$(OBJEXT)
+am_lib1502_OBJECTS = lib1502-lib1502.$(OBJEXT) $(am__objects_6) \
+       $(am__objects_7) $(am__objects_8)
+lib1502_OBJECTS = $(am_lib1502_OBJECTS)
+lib1502_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_9 = lib1503-first.$(OBJEXT)
+am__objects_10 = lib1503-testutil.$(OBJEXT)
+am__objects_11 = lib1503-warnless.$(OBJEXT)
+am_lib1503_OBJECTS = lib1503-lib1502.$(OBJEXT) $(am__objects_9) \
+       $(am__objects_10) $(am__objects_11)
+lib1503_OBJECTS = $(am_lib1503_OBJECTS)
+lib1503_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_12 = lib1504-first.$(OBJEXT)
+am__objects_13 = lib1504-testutil.$(OBJEXT)
+am__objects_14 = lib1504-warnless.$(OBJEXT)
+am_lib1504_OBJECTS = lib1504-lib1502.$(OBJEXT) $(am__objects_12) \
+       $(am__objects_13) $(am__objects_14)
+lib1504_OBJECTS = $(am_lib1504_OBJECTS)
+lib1504_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_15 = lib1505-first.$(OBJEXT)
+am__objects_16 = lib1505-testutil.$(OBJEXT)
+am__objects_17 = lib1505-warnless.$(OBJEXT)
+am_lib1505_OBJECTS = lib1505-lib1502.$(OBJEXT) $(am__objects_15) \
+       $(am__objects_16) $(am__objects_17)
+lib1505_OBJECTS = $(am_lib1505_OBJECTS)
+lib1505_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_18 = lib1506-first.$(OBJEXT)
+am__objects_19 = lib1506-testutil.$(OBJEXT)
+am__objects_20 = lib1506-warnless.$(OBJEXT)
+am_lib1506_OBJECTS = lib1506-lib1506.$(OBJEXT) $(am__objects_18) \
+       $(am__objects_19) $(am__objects_20)
+lib1506_OBJECTS = $(am_lib1506_OBJECTS)
+lib1506_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_21 = lib1507-first.$(OBJEXT)
+am__objects_22 = lib1507-testutil.$(OBJEXT)
+am__objects_23 = lib1507-warnless.$(OBJEXT)
+am_lib1507_OBJECTS = lib1507-lib1507.$(OBJEXT) $(am__objects_21) \
+       $(am__objects_22) $(am__objects_23)
+lib1507_OBJECTS = $(am_lib1507_OBJECTS)
+lib1507_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_24 = lib1508-first.$(OBJEXT)
+am__objects_25 = lib1508-testutil.$(OBJEXT)
+am__objects_26 = lib1508-warnless.$(OBJEXT)
+am_lib1508_OBJECTS = lib1508-lib1508.$(OBJEXT) $(am__objects_24) \
+       $(am__objects_25) $(am__objects_26)
+lib1508_OBJECTS = $(am_lib1508_OBJECTS)
+lib1508_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_27 = lib1509-first.$(OBJEXT)
+am__objects_28 = lib1509-testutil.$(OBJEXT)
+am__objects_29 = lib1509-warnless.$(OBJEXT)
+am_lib1509_OBJECTS = lib1509-lib1509.$(OBJEXT) $(am__objects_27) \
+       $(am__objects_28) $(am__objects_29)
+lib1509_OBJECTS = $(am_lib1509_OBJECTS)
+lib1509_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_30 = lib1510-first.$(OBJEXT)
+am__objects_31 = lib1510-testutil.$(OBJEXT)
+am__objects_32 = lib1510-warnless.$(OBJEXT)
+am_lib1510_OBJECTS = lib1510-lib1510.$(OBJEXT) $(am__objects_30) \
+       $(am__objects_31) $(am__objects_32)
+lib1510_OBJECTS = $(am_lib1510_OBJECTS)
+lib1510_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_33 = lib1511-first.$(OBJEXT)
+am__objects_34 = lib1511-testutil.$(OBJEXT)
+am__objects_35 = lib1511-warnless.$(OBJEXT)
+am_lib1511_OBJECTS = lib1511-lib1511.$(OBJEXT) $(am__objects_33) \
+       $(am__objects_34) $(am__objects_35)
+lib1511_OBJECTS = $(am_lib1511_OBJECTS)
+lib1511_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_36 = lib1512-first.$(OBJEXT)
+am__objects_37 = lib1512-testutil.$(OBJEXT)
+am__objects_38 = lib1512-warnless.$(OBJEXT)
+am_lib1512_OBJECTS = lib1512-lib1512.$(OBJEXT) $(am__objects_36) \
+       $(am__objects_37) $(am__objects_38)
+lib1512_OBJECTS = $(am_lib1512_OBJECTS)
+lib1512_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_39 = lib1900-first.$(OBJEXT)
+am__objects_40 = lib1900-testutil.$(OBJEXT)
+am__objects_41 = lib1900-warnless.$(OBJEXT)
+am_lib1900_OBJECTS = lib1900-lib1900.$(OBJEXT) $(am__objects_39) \
+       $(am__objects_40) $(am__objects_41)
+lib1900_OBJECTS = $(am_lib1900_OBJECTS)
+lib1900_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_42 = lib2033-first.$(OBJEXT)
+am__objects_43 = lib2033-testutil.$(OBJEXT)
+am__objects_44 = lib2033-warnless.$(OBJEXT)
+am_lib2033_OBJECTS = lib2033-libntlmconnect.$(OBJEXT) \
+       $(am__objects_42) $(am__objects_43) $(am__objects_44)
+lib2033_OBJECTS = $(am_lib2033_OBJECTS)
+lib2033_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_45 = lib500-first.$(OBJEXT)
+am__objects_46 = lib500-testutil.$(OBJEXT)
+am__objects_47 = lib500-testtrace.$(OBJEXT)
+am_lib500_OBJECTS = lib500-lib500.$(OBJEXT) $(am__objects_45) \
+       $(am__objects_46) $(am__objects_47)
 lib500_OBJECTS = $(am_lib500_OBJECTS)
-lib500_LDADD = $(LDADD)
-lib500_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib501_OBJECTS = lib501.$(OBJEXT) $(am__objects_1)
+lib500_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_48 = lib501-first.$(OBJEXT)
+am_lib501_OBJECTS = lib501-lib501.$(OBJEXT) $(am__objects_48)
 lib501_OBJECTS = $(am_lib501_OBJECTS)
 lib501_LDADD = $(LDADD)
-lib501_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_2 = testutil.$(OBJEXT)
-am_lib502_OBJECTS = lib502.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib501_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_49 = lib502-first.$(OBJEXT)
+am__objects_50 = lib502-testutil.$(OBJEXT)
+am__objects_51 = lib502-warnless.$(OBJEXT)
+am_lib502_OBJECTS = lib502-lib502.$(OBJEXT) $(am__objects_49) \
+       $(am__objects_50) $(am__objects_51)
 lib502_OBJECTS = $(am_lib502_OBJECTS)
-lib502_LDADD = $(LDADD)
-lib502_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib503_OBJECTS = lib503.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib502_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_52 = lib503-first.$(OBJEXT)
+am__objects_53 = lib503-testutil.$(OBJEXT)
+am__objects_54 = lib503-warnless.$(OBJEXT)
+am_lib503_OBJECTS = lib503-lib503.$(OBJEXT) $(am__objects_52) \
+       $(am__objects_53) $(am__objects_54)
 lib503_OBJECTS = $(am_lib503_OBJECTS)
-lib503_LDADD = $(LDADD)
-lib503_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib504_OBJECTS = lib504.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib503_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_55 = lib504-first.$(OBJEXT)
+am__objects_56 = lib504-testutil.$(OBJEXT)
+am__objects_57 = lib504-warnless.$(OBJEXT)
+am_lib504_OBJECTS = lib504-lib504.$(OBJEXT) $(am__objects_55) \
+       $(am__objects_56) $(am__objects_57)
 lib504_OBJECTS = $(am_lib504_OBJECTS)
-lib504_LDADD = $(LDADD)
-lib504_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib505_OBJECTS = lib505.$(OBJEXT) $(am__objects_1)
+lib504_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_58 = lib505-first.$(OBJEXT)
+am_lib505_OBJECTS = lib505-lib505.$(OBJEXT) $(am__objects_58)
 lib505_OBJECTS = $(am_lib505_OBJECTS)
 lib505_LDADD = $(LDADD)
-lib505_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib506_OBJECTS = lib506.$(OBJEXT) $(am__objects_1)
+lib505_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_59 = lib506-first.$(OBJEXT)
+am_lib506_OBJECTS = lib506-lib506.$(OBJEXT) $(am__objects_59)
 lib506_OBJECTS = $(am_lib506_OBJECTS)
 lib506_LDADD = $(LDADD)
-lib506_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib507_OBJECTS = lib507.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib506_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_60 = lib507-first.$(OBJEXT)
+am__objects_61 = lib507-testutil.$(OBJEXT)
+am__objects_62 = lib507-warnless.$(OBJEXT)
+am_lib507_OBJECTS = lib507-lib507.$(OBJEXT) $(am__objects_60) \
+       $(am__objects_61) $(am__objects_62)
 lib507_OBJECTS = $(am_lib507_OBJECTS)
-lib507_LDADD = $(LDADD)
-lib507_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib508_OBJECTS = lib508.$(OBJEXT) $(am__objects_1)
+lib507_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_63 = lib508-first.$(OBJEXT)
+am_lib508_OBJECTS = lib508-lib508.$(OBJEXT) $(am__objects_63)
 lib508_OBJECTS = $(am_lib508_OBJECTS)
 lib508_LDADD = $(LDADD)
-lib508_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib510_OBJECTS = lib510.$(OBJEXT) $(am__objects_1)
+lib508_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_64 = lib509-first.$(OBJEXT)
+am_lib509_OBJECTS = lib509-lib509.$(OBJEXT) $(am__objects_64)
+lib509_OBJECTS = $(am_lib509_OBJECTS)
+lib509_LDADD = $(LDADD)
+lib509_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_65 = lib510-first.$(OBJEXT)
+am_lib510_OBJECTS = lib510-lib510.$(OBJEXT) $(am__objects_65)
 lib510_OBJECTS = $(am_lib510_OBJECTS)
 lib510_LDADD = $(LDADD)
-lib510_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib511_OBJECTS = lib511.$(OBJEXT) $(am__objects_1)
+lib510_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_66 = lib511-first.$(OBJEXT)
+am_lib511_OBJECTS = lib511-lib511.$(OBJEXT) $(am__objects_66)
 lib511_OBJECTS = $(am_lib511_OBJECTS)
 lib511_LDADD = $(LDADD)
-lib511_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib512_OBJECTS = lib512.$(OBJEXT) $(am__objects_1)
+lib511_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_67 = lib512-first.$(OBJEXT)
+am_lib512_OBJECTS = lib512-lib512.$(OBJEXT) $(am__objects_67)
 lib512_OBJECTS = $(am_lib512_OBJECTS)
 lib512_LDADD = $(LDADD)
-lib512_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib513_OBJECTS = lib513.$(OBJEXT) $(am__objects_1)
+lib512_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_68 = lib513-first.$(OBJEXT)
+am_lib513_OBJECTS = lib513-lib513.$(OBJEXT) $(am__objects_68)
 lib513_OBJECTS = $(am_lib513_OBJECTS)
 lib513_LDADD = $(LDADD)
-lib513_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib514_OBJECTS = lib514.$(OBJEXT) $(am__objects_1)
+lib513_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_69 = lib514-first.$(OBJEXT)
+am_lib514_OBJECTS = lib514-lib514.$(OBJEXT) $(am__objects_69)
 lib514_OBJECTS = $(am_lib514_OBJECTS)
 lib514_LDADD = $(LDADD)
-lib514_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib515_OBJECTS = lib515.$(OBJEXT) $(am__objects_1)
+lib514_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_70 = lib515-first.$(OBJEXT)
+am_lib515_OBJECTS = lib515-lib515.$(OBJEXT) $(am__objects_70)
 lib515_OBJECTS = $(am_lib515_OBJECTS)
 lib515_LDADD = $(LDADD)
-lib515_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib516_OBJECTS = lib516.$(OBJEXT) $(am__objects_1)
+lib515_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_71 = lib516-first.$(OBJEXT)
+am_lib516_OBJECTS = lib516-lib516.$(OBJEXT) $(am__objects_71)
 lib516_OBJECTS = $(am_lib516_OBJECTS)
 lib516_LDADD = $(LDADD)
-lib516_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib517_OBJECTS = lib517.$(OBJEXT) $(am__objects_1)
+lib516_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_72 = lib517-first.$(OBJEXT)
+am_lib517_OBJECTS = lib517-lib517.$(OBJEXT) $(am__objects_72)
 lib517_OBJECTS = $(am_lib517_OBJECTS)
 lib517_LDADD = $(LDADD)
-lib517_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib518_OBJECTS = lib518.$(OBJEXT) $(am__objects_1)
+lib517_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_73 = lib518-first.$(OBJEXT)
+am__objects_74 = lib518-warnless.$(OBJEXT)
+am_lib518_OBJECTS = lib518-lib518.$(OBJEXT) $(am__objects_73) \
+       $(am__objects_74)
 lib518_OBJECTS = $(am_lib518_OBJECTS)
 lib518_LDADD = $(LDADD)
-lib518_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib519_OBJECTS = lib519.$(OBJEXT) $(am__objects_1)
+lib518_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_75 = lib519-first.$(OBJEXT)
+am_lib519_OBJECTS = lib519-lib519.$(OBJEXT) $(am__objects_75)
 lib519_OBJECTS = $(am_lib519_OBJECTS)
 lib519_LDADD = $(LDADD)
-lib519_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib520_OBJECTS = lib520.$(OBJEXT) $(am__objects_1)
+lib519_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_76 = lib520-first.$(OBJEXT)
+am_lib520_OBJECTS = lib520-lib520.$(OBJEXT) $(am__objects_76)
 lib520_OBJECTS = $(am_lib520_OBJECTS)
 lib520_LDADD = $(LDADD)
-lib520_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib521_OBJECTS = lib521.$(OBJEXT) $(am__objects_1)
+lib520_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_77 = lib521-first.$(OBJEXT)
+am_lib521_OBJECTS = lib521-lib521.$(OBJEXT) $(am__objects_77)
 lib521_OBJECTS = $(am_lib521_OBJECTS)
 lib521_LDADD = $(LDADD)
-lib521_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib523_OBJECTS = lib523.$(OBJEXT) $(am__objects_1)
+lib521_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_78 = lib523-first.$(OBJEXT)
+am_lib523_OBJECTS = lib523-lib523.$(OBJEXT) $(am__objects_78)
 lib523_OBJECTS = $(am_lib523_OBJECTS)
 lib523_LDADD = $(LDADD)
-lib523_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib524_OBJECTS = lib524.$(OBJEXT) $(am__objects_1)
+lib523_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_79 = lib524-first.$(OBJEXT)
+am_lib524_OBJECTS = lib524-lib524.$(OBJEXT) $(am__objects_79)
 lib524_OBJECTS = $(am_lib524_OBJECTS)
 lib524_LDADD = $(LDADD)
-lib524_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib525_OBJECTS = lib525.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib524_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_80 = lib525-first.$(OBJEXT)
+am__objects_81 = lib525-testutil.$(OBJEXT)
+am__objects_82 = lib525-warnless.$(OBJEXT)
+am_lib525_OBJECTS = lib525-lib525.$(OBJEXT) $(am__objects_80) \
+       $(am__objects_81) $(am__objects_82)
 lib525_OBJECTS = $(am_lib525_OBJECTS)
-lib525_LDADD = $(LDADD)
-lib525_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_3 = lib526-first.$(OBJEXT)
-am__objects_4 = lib526-testutil.$(OBJEXT)
-am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_3) \
-       $(am__objects_4)
+lib525_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_83 = lib526-first.$(OBJEXT)
+am__objects_84 = lib526-testutil.$(OBJEXT)
+am__objects_85 = lib526-warnless.$(OBJEXT)
+am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_83) \
+       $(am__objects_84) $(am__objects_85)
 lib526_OBJECTS = $(am_lib526_OBJECTS)
-lib526_LDADD = $(LDADD)
-lib526_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_5 = lib527-first.$(OBJEXT)
-am__objects_6 = lib527-testutil.$(OBJEXT)
-am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_5) \
-       $(am__objects_6)
+lib526_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_86 = lib527-first.$(OBJEXT)
+am__objects_87 = lib527-testutil.$(OBJEXT)
+am__objects_88 = lib527-warnless.$(OBJEXT)
+am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_86) \
+       $(am__objects_87) $(am__objects_88)
 lib527_OBJECTS = $(am_lib527_OBJECTS)
-lib527_LDADD = $(LDADD)
-lib527_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_7 = lib529-first.$(OBJEXT)
-am__objects_8 = lib529-testutil.$(OBJEXT)
-am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_7) \
-       $(am__objects_8)
+lib527_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_89 = lib529-first.$(OBJEXT)
+am__objects_90 = lib529-testutil.$(OBJEXT)
+am__objects_91 = lib529-warnless.$(OBJEXT)
+am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_89) \
+       $(am__objects_90) $(am__objects_91)
 lib529_OBJECTS = $(am_lib529_OBJECTS)
-lib529_LDADD = $(LDADD)
-lib529_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_9 = lib530-first.$(OBJEXT)
-am__objects_10 = lib530-testutil.$(OBJEXT)
-am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_9) \
-       $(am__objects_10)
+lib529_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_92 = lib530-first.$(OBJEXT)
+am__objects_93 = lib530-testutil.$(OBJEXT)
+am__objects_94 = lib530-warnless.$(OBJEXT)
+am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_92) \
+       $(am__objects_93) $(am__objects_94)
 lib530_OBJECTS = $(am_lib530_OBJECTS)
-lib530_LDADD = $(LDADD)
-lib530_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_11 = lib532-first.$(OBJEXT)
-am__objects_12 = lib532-testutil.$(OBJEXT)
-am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_11) \
-       $(am__objects_12)
+lib530_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_95 = lib532-first.$(OBJEXT)
+am__objects_96 = lib532-testutil.$(OBJEXT)
+am__objects_97 = lib532-warnless.$(OBJEXT)
+am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_95) \
+       $(am__objects_96) $(am__objects_97)
 lib532_OBJECTS = $(am_lib532_OBJECTS)
-lib532_LDADD = $(LDADD)
-lib532_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib533_OBJECTS = lib533.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib532_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_98 = lib533-first.$(OBJEXT)
+am__objects_99 = lib533-testutil.$(OBJEXT)
+am__objects_100 = lib533-warnless.$(OBJEXT)
+am_lib533_OBJECTS = lib533-lib533.$(OBJEXT) $(am__objects_98) \
+       $(am__objects_99) $(am__objects_100)
 lib533_OBJECTS = $(am_lib533_OBJECTS)
-lib533_LDADD = $(LDADD)
-lib533_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib536_OBJECTS = lib536.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib533_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_101 = lib536-first.$(OBJEXT)
+am__objects_102 = lib536-testutil.$(OBJEXT)
+am__objects_103 = lib536-warnless.$(OBJEXT)
+am_lib536_OBJECTS = lib536-lib536.$(OBJEXT) $(am__objects_101) \
+       $(am__objects_102) $(am__objects_103)
 lib536_OBJECTS = $(am_lib536_OBJECTS)
-lib536_LDADD = $(LDADD)
-lib536_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib537_OBJECTS = lib537.$(OBJEXT) $(am__objects_1)
+lib536_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_104 = lib537-first.$(OBJEXT)
+am__objects_105 = lib537-warnless.$(OBJEXT)
+am_lib537_OBJECTS = lib537-lib537.$(OBJEXT) $(am__objects_104) \
+       $(am__objects_105)
 lib537_OBJECTS = $(am_lib537_OBJECTS)
 lib537_LDADD = $(LDADD)
-lib537_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib539_OBJECTS = lib539.$(OBJEXT) $(am__objects_1)
+lib537_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_106 = lib539-first.$(OBJEXT)
+am_lib539_OBJECTS = lib539-lib539.$(OBJEXT) $(am__objects_106)
 lib539_OBJECTS = $(am_lib539_OBJECTS)
 lib539_LDADD = $(LDADD)
-lib539_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib540_OBJECTS = lib540.$(OBJEXT) $(am__objects_1)
+lib539_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_107 = lib540-first.$(OBJEXT)
+am__objects_108 = lib540-testutil.$(OBJEXT)
+am__objects_109 = lib540-warnless.$(OBJEXT)
+am_lib540_OBJECTS = lib540-lib540.$(OBJEXT) $(am__objects_107) \
+       $(am__objects_108) $(am__objects_109)
 lib540_OBJECTS = $(am_lib540_OBJECTS)
-lib540_LDADD = $(LDADD)
-lib540_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib541_OBJECTS = lib541.$(OBJEXT) $(am__objects_1)
+lib540_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_110 = lib541-first.$(OBJEXT)
+am_lib541_OBJECTS = lib541-lib541.$(OBJEXT) $(am__objects_110)
 lib541_OBJECTS = $(am_lib541_OBJECTS)
 lib541_LDADD = $(LDADD)
-lib541_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib542_OBJECTS = lib542.$(OBJEXT) $(am__objects_1)
+lib541_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_111 = lib542-first.$(OBJEXT)
+am_lib542_OBJECTS = lib542-lib542.$(OBJEXT) $(am__objects_111)
 lib542_OBJECTS = $(am_lib542_OBJECTS)
 lib542_LDADD = $(LDADD)
-lib542_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib543_OBJECTS = lib543.$(OBJEXT) $(am__objects_1)
+lib542_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_112 = lib543-first.$(OBJEXT)
+am_lib543_OBJECTS = lib543-lib543.$(OBJEXT) $(am__objects_112)
 lib543_OBJECTS = $(am_lib543_OBJECTS)
 lib543_LDADD = $(LDADD)
-lib543_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib544_OBJECTS = lib544.$(OBJEXT) $(am__objects_1)
+lib543_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_113 = lib544-first.$(OBJEXT)
+am_lib544_OBJECTS = lib544-lib544.$(OBJEXT) $(am__objects_113)
 lib544_OBJECTS = $(am_lib544_OBJECTS)
 lib544_LDADD = $(LDADD)
-lib544_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_13 = lib545-first.$(OBJEXT)
-am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_13)
+lib544_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_114 = lib545-first.$(OBJEXT)
+am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_114)
 lib545_OBJECTS = $(am_lib545_OBJECTS)
 lib545_LDADD = $(LDADD)
-lib545_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib547_OBJECTS = lib547.$(OBJEXT) $(am__objects_1)
+lib545_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_115 = lib547-first.$(OBJEXT)
+am_lib547_OBJECTS = lib547-lib547.$(OBJEXT) $(am__objects_115)
 lib547_OBJECTS = $(am_lib547_OBJECTS)
 lib547_LDADD = $(LDADD)
-lib547_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_14 = lib548-first.$(OBJEXT)
-am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_14)
+lib547_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_116 = lib548-first.$(OBJEXT)
+am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_116)
 lib548_OBJECTS = $(am_lib548_OBJECTS)
 lib548_LDADD = $(LDADD)
-lib548_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib549_OBJECTS = lib549.$(OBJEXT) $(am__objects_1)
+lib548_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_117 = lib549-first.$(OBJEXT)
+am_lib549_OBJECTS = lib549-lib549.$(OBJEXT) $(am__objects_117)
 lib549_OBJECTS = $(am_lib549_OBJECTS)
 lib549_LDADD = $(LDADD)
-lib549_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib552_OBJECTS = lib552.$(OBJEXT) $(am__objects_1)
+lib549_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_118 = lib552-first.$(OBJEXT)
+am__objects_119 = lib552-warnless.$(OBJEXT)
+am_lib552_OBJECTS = lib552-lib552.$(OBJEXT) $(am__objects_118) \
+       $(am__objects_119)
 lib552_OBJECTS = $(am_lib552_OBJECTS)
 lib552_LDADD = $(LDADD)
-lib552_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib553_OBJECTS = lib553.$(OBJEXT) $(am__objects_1)
+lib552_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_120 = lib553-first.$(OBJEXT)
+am_lib553_OBJECTS = lib553-lib553.$(OBJEXT) $(am__objects_120)
 lib553_OBJECTS = $(am_lib553_OBJECTS)
 lib553_LDADD = $(LDADD)
-lib553_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib554_OBJECTS = lib554.$(OBJEXT) $(am__objects_1)
+lib553_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_121 = lib554-first.$(OBJEXT)
+am_lib554_OBJECTS = lib554-lib554.$(OBJEXT) $(am__objects_121)
 lib554_OBJECTS = $(am_lib554_OBJECTS)
 lib554_LDADD = $(LDADD)
-lib554_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib555_OBJECTS = lib555.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib554_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_122 = lib555-first.$(OBJEXT)
+am__objects_123 = lib555-testutil.$(OBJEXT)
+am__objects_124 = lib555-warnless.$(OBJEXT)
+am_lib555_OBJECTS = lib555-lib555.$(OBJEXT) $(am__objects_122) \
+       $(am__objects_123) $(am__objects_124)
 lib555_OBJECTS = $(am_lib555_OBJECTS)
-lib555_LDADD = $(LDADD)
-lib555_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib556_OBJECTS = lib556.$(OBJEXT) $(am__objects_1)
+lib555_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_125 = lib556-first.$(OBJEXT)
+am_lib556_OBJECTS = lib556-lib556.$(OBJEXT) $(am__objects_125)
 lib556_OBJECTS = $(am_lib556_OBJECTS)
 lib556_LDADD = $(LDADD)
-lib556_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib557_OBJECTS = lib557.$(OBJEXT) $(am__objects_1)
+lib556_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_126 = lib557-first.$(OBJEXT)
+am_lib557_OBJECTS = lib557-lib557.$(OBJEXT) $(am__objects_126)
 lib557_OBJECTS = $(am_lib557_OBJECTS)
 lib557_LDADD = $(LDADD)
-lib557_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_15 = lib558-first.$(OBJEXT)
-am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_15)
+lib557_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_127 = lib558-first.$(OBJEXT)
+am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_127)
 lib558_OBJECTS = $(am_lib558_OBJECTS)
 lib558_LDADD = $(LDADD)
-lib558_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_16 = lib559-first.$(OBJEXT)
-am_lib559_OBJECTS = lib559-lib558.$(OBJEXT) $(am__objects_16)
-lib559_OBJECTS = $(am_lib559_OBJECTS)
-lib559_LDADD = $(LDADD)
-lib559_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib560_OBJECTS = lib560.$(OBJEXT) $(am__objects_1)
+lib558_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_128 = lib560-first.$(OBJEXT)
+am__objects_129 = lib560-testutil.$(OBJEXT)
+am__objects_130 = lib560-warnless.$(OBJEXT)
+am_lib560_OBJECTS = lib560-lib560.$(OBJEXT) $(am__objects_128) \
+       $(am__objects_129) $(am__objects_130)
 lib560_OBJECTS = $(am_lib560_OBJECTS)
-lib560_LDADD = $(LDADD)
-lib560_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib562_OBJECTS = lib562.$(OBJEXT) $(am__objects_1)
+lib560_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_131 = lib562-first.$(OBJEXT)
+am_lib562_OBJECTS = lib562-lib562.$(OBJEXT) $(am__objects_131)
 lib562_OBJECTS = $(am_lib562_OBJECTS)
 lib562_LDADD = $(LDADD)
-lib562_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib564_OBJECTS = lib564.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib562_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_132 = lib564-first.$(OBJEXT)
+am__objects_133 = lib564-testutil.$(OBJEXT)
+am__objects_134 = lib564-warnless.$(OBJEXT)
+am_lib564_OBJECTS = lib564-lib564.$(OBJEXT) $(am__objects_132) \
+       $(am__objects_133) $(am__objects_134)
 lib564_OBJECTS = $(am_lib564_OBJECTS)
-lib564_LDADD = $(LDADD)
-lib564_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am__objects_17 = lib565-first.$(OBJEXT)
-am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_17)
+lib564_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_135 = lib565-first.$(OBJEXT)
+am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_135)
 lib565_OBJECTS = $(am_lib565_OBJECTS)
 lib565_LDADD = $(LDADD)
-lib565_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib566_OBJECTS = lib566.$(OBJEXT) $(am__objects_1)
+lib565_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_136 = lib566-first.$(OBJEXT)
+am_lib566_OBJECTS = lib566-lib566.$(OBJEXT) $(am__objects_136)
 lib566_OBJECTS = $(am_lib566_OBJECTS)
 lib566_LDADD = $(LDADD)
-lib566_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib567_OBJECTS = lib567.$(OBJEXT) $(am__objects_1)
+lib566_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_137 = lib567-first.$(OBJEXT)
+am_lib567_OBJECTS = lib567-lib567.$(OBJEXT) $(am__objects_137)
 lib567_OBJECTS = $(am_lib567_OBJECTS)
 lib567_LDADD = $(LDADD)
-lib567_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib568_OBJECTS = lib568.$(OBJEXT) $(am__objects_1)
+lib567_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_138 = lib568-first.$(OBJEXT)
+am_lib568_OBJECTS = lib568-lib568.$(OBJEXT) $(am__objects_138)
 lib568_OBJECTS = $(am_lib568_OBJECTS)
 lib568_LDADD = $(LDADD)
-lib568_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib569_OBJECTS = lib569.$(OBJEXT) $(am__objects_1)
+lib568_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_139 = lib569-first.$(OBJEXT)
+am_lib569_OBJECTS = lib569-lib569.$(OBJEXT) $(am__objects_139)
 lib569_OBJECTS = $(am_lib569_OBJECTS)
 lib569_LDADD = $(LDADD)
-lib569_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib570_OBJECTS = lib570.$(OBJEXT) $(am__objects_1)
+lib569_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_140 = lib570-first.$(OBJEXT)
+am_lib570_OBJECTS = lib570-lib570.$(OBJEXT) $(am__objects_140)
 lib570_OBJECTS = $(am_lib570_OBJECTS)
 lib570_LDADD = $(LDADD)
-lib570_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib571_OBJECTS = lib571.$(OBJEXT) $(am__objects_1)
+lib570_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_141 = lib571-first.$(OBJEXT)
+am__objects_142 = lib571-warnless.$(OBJEXT)
+am_lib571_OBJECTS = lib571-lib571.$(OBJEXT) $(am__objects_141) \
+       $(am__objects_142)
 lib571_OBJECTS = $(am_lib571_OBJECTS)
 lib571_LDADD = $(LDADD)
-lib571_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib572_OBJECTS = lib572.$(OBJEXT) $(am__objects_1)
+lib571_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_143 = lib572-first.$(OBJEXT)
+am_lib572_OBJECTS = lib572-lib572.$(OBJEXT) $(am__objects_143)
 lib572_OBJECTS = $(am_lib572_OBJECTS)
 lib572_LDADD = $(LDADD)
-lib572_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib573_OBJECTS = lib573.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+lib572_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_144 = lib573-first.$(OBJEXT)
+am__objects_145 = lib573-testutil.$(OBJEXT)
+am__objects_146 = lib573-warnless.$(OBJEXT)
+am__objects_147 = lib573-testtrace.$(OBJEXT)
+am_lib573_OBJECTS = lib573-lib573.$(OBJEXT) $(am__objects_144) \
+       $(am__objects_145) $(am__objects_146) $(am__objects_147)
 lib573_OBJECTS = $(am_lib573_OBJECTS)
-lib573_LDADD = $(LDADD)
-lib573_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib574_OBJECTS = lib574.$(OBJEXT) $(am__objects_1)
+lib573_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_148 = lib574-first.$(OBJEXT)
+am_lib574_OBJECTS = lib574-lib574.$(OBJEXT) $(am__objects_148)
 lib574_OBJECTS = $(am_lib574_OBJECTS)
 lib574_LDADD = $(LDADD)
-lib574_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib575_OBJECTS = lib575.$(OBJEXT) $(am__objects_1)
+lib574_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_149 = lib575-first.$(OBJEXT)
+am__objects_150 = lib575-testutil.$(OBJEXT)
+am__objects_151 = lib575-warnless.$(OBJEXT)
+am_lib575_OBJECTS = lib575-lib575.$(OBJEXT) $(am__objects_149) \
+       $(am__objects_150) $(am__objects_151)
 lib575_OBJECTS = $(am_lib575_OBJECTS)
-lib575_LDADD = $(LDADD)
-lib575_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib576_OBJECTS = lib576.$(OBJEXT) $(am__objects_1)
+lib575_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_152 = lib576-first.$(OBJEXT)
+am_lib576_OBJECTS = lib576-lib576.$(OBJEXT) $(am__objects_152)
 lib576_OBJECTS = $(am_lib576_OBJECTS)
 lib576_LDADD = $(LDADD)
-lib576_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib577_OBJECTS = lib577.$(OBJEXT) $(am__objects_1)
-lib577_OBJECTS = $(am_lib577_OBJECTS)
-lib577_LDADD = $(LDADD)
-lib577_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib578_OBJECTS = lib578.$(OBJEXT) $(am__objects_1)
+lib576_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_153 = lib578-first.$(OBJEXT)
+am_lib578_OBJECTS = lib578-lib578.$(OBJEXT) $(am__objects_153)
 lib578_OBJECTS = $(am_lib578_OBJECTS)
 lib578_LDADD = $(LDADD)
-lib578_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
-am_lib579_OBJECTS = lib579.$(OBJEXT) $(am__objects_1)
+lib578_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_154 = lib579-first.$(OBJEXT)
+am_lib579_OBJECTS = lib579-lib579.$(OBJEXT) $(am__objects_154)
 lib579_OBJECTS = $(am_lib579_OBJECTS)
 lib579_LDADD = $(LDADD)
-lib579_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+lib579_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_155 = lib582-first.$(OBJEXT)
+am__objects_156 = lib582-testutil.$(OBJEXT)
+am__objects_157 = lib582-warnless.$(OBJEXT)
+am_lib582_OBJECTS = lib582-lib582.$(OBJEXT) $(am__objects_155) \
+       $(am__objects_156) $(am__objects_157)
+lib582_OBJECTS = $(am_lib582_OBJECTS)
+lib582_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_158 = lib583-first.$(OBJEXT)
+am_lib583_OBJECTS = lib583-lib583.$(OBJEXT) $(am__objects_158)
+lib583_OBJECTS = $(am_lib583_OBJECTS)
+lib583_LDADD = $(LDADD)
+lib583_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_159 = lib585-first.$(OBJEXT)
+am__objects_160 = lib585-testutil.$(OBJEXT)
+am__objects_161 = lib585-testtrace.$(OBJEXT)
+am_lib585_OBJECTS = lib585-lib500.$(OBJEXT) $(am__objects_159) \
+       $(am__objects_160) $(am__objects_161)
+lib585_OBJECTS = $(am_lib585_OBJECTS)
+lib585_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_162 = lib586-first.$(OBJEXT)
+am_lib586_OBJECTS = lib586-lib586.$(OBJEXT) $(am__objects_162)
+lib586_OBJECTS = $(am_lib586_OBJECTS)
+lib586_LDADD = $(LDADD)
+lib586_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_163 = lib587-first.$(OBJEXT)
+am_lib587_OBJECTS = lib587-lib554.$(OBJEXT) $(am__objects_163)
+lib587_OBJECTS = $(am_lib587_OBJECTS)
+lib587_LDADD = $(LDADD)
+lib587_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_164 = lib590-first.$(OBJEXT)
+am_lib590_OBJECTS = lib590-lib590.$(OBJEXT) $(am__objects_164)
+lib590_OBJECTS = $(am_lib590_OBJECTS)
+lib590_LDADD = $(LDADD)
+lib590_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_165 = lib591-first.$(OBJEXT)
+am__objects_166 = lib591-testutil.$(OBJEXT)
+am__objects_167 = lib591-warnless.$(OBJEXT)
+am_lib591_OBJECTS = lib591-lib591.$(OBJEXT) $(am__objects_165) \
+       $(am__objects_166) $(am__objects_167)
+lib591_OBJECTS = $(am_lib591_OBJECTS)
+lib591_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_168 = lib597-first.$(OBJEXT)
+am__objects_169 = lib597-testutil.$(OBJEXT)
+am__objects_170 = lib597-warnless.$(OBJEXT)
+am_lib597_OBJECTS = lib597-lib597.$(OBJEXT) $(am__objects_168) \
+       $(am__objects_169) $(am__objects_170)
+lib597_OBJECTS = $(am_lib597_OBJECTS)
+lib597_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_171 = lib598-first.$(OBJEXT)
+am_lib598_OBJECTS = lib598-lib598.$(OBJEXT) $(am__objects_171)
+lib598_OBJECTS = $(am_lib598_OBJECTS)
+lib598_LDADD = $(LDADD)
+lib598_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_172 = lib599-first.$(OBJEXT)
+am_lib599_OBJECTS = lib599-lib599.$(OBJEXT) $(am__objects_172)
+lib599_OBJECTS = $(am_lib599_OBJECTS)
+lib599_LDADD = $(LDADD)
+lib599_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_173 = libauthretry-first.$(OBJEXT)
+am_libauthretry_OBJECTS = libauthretry-libauthretry.$(OBJEXT) \
+       $(am__objects_173)
+libauthretry_OBJECTS = $(am_libauthretry_OBJECTS)
+libauthretry_LDADD = $(LDADD)
+libauthretry_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_174 = libntlmconnect-first.$(OBJEXT)
+am__objects_175 = libntlmconnect-testutil.$(OBJEXT)
+am__objects_176 = libntlmconnect-warnless.$(OBJEXT)
+am_libntlmconnect_OBJECTS = libntlmconnect-libntlmconnect.$(OBJEXT) \
+       $(am__objects_174) $(am__objects_175) $(am__objects_176)
+libntlmconnect_OBJECTS = $(am_libntlmconnect_OBJECTS)
+libntlmconnect_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+       $(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+       $(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+       $(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
+       $(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
+       $(lib1512_SOURCES) $(lib1900_SOURCES) $(lib2033_SOURCES) \
        $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
        $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
        $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
-       $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
-       $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
-       $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
-       $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
-       $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
-       $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
-       $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
-       $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
-       $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
-       $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
-       $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
-       $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
-       $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
-       $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
+       $(lib509_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+       $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \
+       $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \
+       $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \
+       $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \
+       $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \
+       $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \
+       $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \
+       $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \
+       $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \
+       $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \
+       $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \
+       $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \
+       $(lib557_SOURCES) $(lib558_SOURCES) $(lib560_SOURCES) \
        $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
        $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
        $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
        $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
-       $(lib575_SOURCES) $(lib576_SOURCES) $(lib577_SOURCES) \
-       $(lib578_SOURCES) $(lib579_SOURCES)
+       $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+       $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+       $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+       $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+       $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
+       $(libntlmconnect_SOURCES)
 DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
+       $(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
+       $(lib1503_SOURCES) $(lib1504_SOURCES) $(lib1505_SOURCES) \
+       $(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
+       $(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
+       $(lib1512_SOURCES) $(lib1900_SOURCES) $(lib2033_SOURCES) \
        $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
        $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
        $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
-       $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
-       $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
-       $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
-       $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
-       $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
-       $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
-       $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
-       $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
-       $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
-       $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
-       $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
-       $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
-       $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
-       $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
+       $(lib509_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+       $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \
+       $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \
+       $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \
+       $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \
+       $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \
+       $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \
+       $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \
+       $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \
+       $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \
+       $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \
+       $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \
+       $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \
+       $(lib557_SOURCES) $(lib558_SOURCES) $(lib560_SOURCES) \
        $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
        $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
        $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
        $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
-       $(lib575_SOURCES) $(lib576_SOURCES) $(lib577_SOURCES) \
-       $(lib578_SOURCES) $(lib579_SOURCES)
+       $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+       $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+       $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+       $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+       $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
+       $(libntlmconnect_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -482,7 +882,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -495,15 +896,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -513,23 +916,24 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -542,7 +946,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -555,34 +958,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -594,6 +997,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -613,7 +1017,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -623,9 +1026,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 #***************************************************************************
 #                                  _   _ ____  _
@@ -634,7 +1041,7 @@ target_alias = @target_alias@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -649,12 +1056,11 @@ target_alias = @target_alias@
 #
 ###########################################################################
 AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/lib
-
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/lib $(am__append_1)
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
 # $(top_builddir), to ensure that these paths which belong to the library
@@ -662,115 +1068,273 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/lib            \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/ares         \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/ares
-
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/ares \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/ares $(am__append_1)
 EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl    \
-test1022.pl Makefile.inc
+test1022.pl Makefile.inc notexists.pl
 
+@USE_EXPLICIT_LIB_DEPS_FALSE@SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@
+@USE_EXPLICIT_LIB_DEPS_TRUE@SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+@USE_EXPLICIT_LIB_DEPS_FALSE@TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@
+@USE_EXPLICIT_LIB_DEPS_TRUE@TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
 
 # Dependencies (may need to be overriden)
-LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
+LDADD = $(SUPPORTFILES_LIBS)
 DEPENDENCIES = $(top_builddir)/lib/libcurl.la
 
 # files used only in some libcurl test programs
 TESTUTIL = testutil.c testutil.h
 
+# files used only in some libcurl test programs
+TSTTRACE = testtrace.c testtrace.h
+
+# files used only in some libcurl test programs
+WARNLESS = ../../lib/warnless.c ../../lib/warnless.h
+
 # these files are used in every single test program below
 SUPPORTFILES = first.c test.h
-chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
+chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c
 chkhostname_LDADD = @CURL_NETWORK_LIBS@
 chkhostname_DEPENDENCIES = 
-chkhostname_CFLAGS = $(AM_CFLAGS)
-lib500_SOURCES = lib500.c $(SUPPORTFILES)
+chkhostname_CPPFLAGS = $(AM_CPPFLAGS)
+libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+libntlmconnect_LDADD = $(TESTUTIL_LIBS)
+libntlmconnect_CPPFLAGS = $(AM_CPPFLAGS)
+libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES)
+libauthretry_CPPFLAGS = $(AM_CPPFLAGS)
+lib500_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib500_LDADD = $(TESTUTIL_LIBS)
+lib500_CPPFLAGS = $(AM_CPPFLAGS)
 lib501_SOURCES = lib501.c $(SUPPORTFILES)
-lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL)
-lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL)
-lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL)
+lib501_CPPFLAGS = $(AM_CPPFLAGS)
+lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib502_LDADD = $(TESTUTIL_LIBS)
+lib502_CPPFLAGS = $(AM_CPPFLAGS)
+lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib503_LDADD = $(TESTUTIL_LIBS)
+lib503_CPPFLAGS = $(AM_CPPFLAGS)
+lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib504_LDADD = $(TESTUTIL_LIBS)
+lib504_CPPFLAGS = $(AM_CPPFLAGS)
 lib505_SOURCES = lib505.c $(SUPPORTFILES)
+lib505_CPPFLAGS = $(AM_CPPFLAGS)
 lib506_SOURCES = lib506.c $(SUPPORTFILES)
-lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL)
+lib506_CPPFLAGS = $(AM_CPPFLAGS)
+lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib507_LDADD = $(TESTUTIL_LIBS)
+lib507_CPPFLAGS = $(AM_CPPFLAGS)
 lib508_SOURCES = lib508.c $(SUPPORTFILES)
+lib508_CPPFLAGS = $(AM_CPPFLAGS)
+lib509_SOURCES = lib509.c $(SUPPORTFILES)
+lib509_CPPFLAGS = $(AM_CPPFLAGS)
 lib510_SOURCES = lib510.c $(SUPPORTFILES)
+lib510_CPPFLAGS = $(AM_CPPFLAGS)
 lib511_SOURCES = lib511.c $(SUPPORTFILES)
+lib511_CPPFLAGS = $(AM_CPPFLAGS)
 lib512_SOURCES = lib512.c $(SUPPORTFILES)
+lib512_CPPFLAGS = $(AM_CPPFLAGS)
 lib513_SOURCES = lib513.c $(SUPPORTFILES)
+lib513_CPPFLAGS = $(AM_CPPFLAGS)
 lib514_SOURCES = lib514.c $(SUPPORTFILES)
+lib514_CPPFLAGS = $(AM_CPPFLAGS)
 lib515_SOURCES = lib515.c $(SUPPORTFILES)
+lib515_CPPFLAGS = $(AM_CPPFLAGS)
 lib516_SOURCES = lib516.c $(SUPPORTFILES)
+lib516_CPPFLAGS = $(AM_CPPFLAGS)
 lib517_SOURCES = lib517.c $(SUPPORTFILES)
-lib518_SOURCES = lib518.c $(SUPPORTFILES)
+lib517_CPPFLAGS = $(AM_CPPFLAGS)
+lib518_SOURCES = lib518.c $(SUPPORTFILES) $(WARNLESS)
+lib518_CPPFLAGS = $(AM_CPPFLAGS)
 lib519_SOURCES = lib519.c $(SUPPORTFILES)
+lib519_CPPFLAGS = $(AM_CPPFLAGS)
 lib520_SOURCES = lib520.c $(SUPPORTFILES)
+lib520_CPPFLAGS = $(AM_CPPFLAGS)
 lib521_SOURCES = lib521.c $(SUPPORTFILES)
+lib521_CPPFLAGS = $(AM_CPPFLAGS)
 lib523_SOURCES = lib523.c $(SUPPORTFILES)
+lib523_CPPFLAGS = $(AM_CPPFLAGS)
 lib524_SOURCES = lib524.c $(SUPPORTFILES)
-lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_CFLAGS = -DLIB526
-lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib527_CFLAGS = -DLIB527
-lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib529_CFLAGS = -DLIB529
-lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL)
-lib530_CFLAGS = -DLIB530
-lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib532_CFLAGS = -DLIB532
-lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL)
-lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL)
-lib537_SOURCES = lib537.c $(SUPPORTFILES)
+lib524_CPPFLAGS = $(AM_CPPFLAGS)
+lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib525_LDADD = $(TESTUTIL_LIBS)
+lib525_CPPFLAGS = $(AM_CPPFLAGS)
+lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib526_LDADD = $(TESTUTIL_LIBS)
+lib526_CPPFLAGS = $(AM_CPPFLAGS) -DLIB526
+lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib527_LDADD = $(TESTUTIL_LIBS)
+lib527_CPPFLAGS = $(AM_CPPFLAGS) -DLIB527
+lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib529_LDADD = $(TESTUTIL_LIBS)
+lib529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB529
+lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib530_LDADD = $(TESTUTIL_LIBS)
+lib530_CPPFLAGS = $(AM_CPPFLAGS) -DLIB530
+lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib532_LDADD = $(TESTUTIL_LIBS)
+lib532_CPPFLAGS = $(AM_CPPFLAGS) -DLIB532
+lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib533_LDADD = $(TESTUTIL_LIBS)
+lib533_CPPFLAGS = $(AM_CPPFLAGS)
+lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib536_LDADD = $(TESTUTIL_LIBS)
+lib536_CPPFLAGS = $(AM_CPPFLAGS)
+lib537_SOURCES = lib537.c $(SUPPORTFILES) $(WARNLESS)
+lib537_CPPFLAGS = $(AM_CPPFLAGS)
 lib539_SOURCES = lib539.c $(SUPPORTFILES)
-lib540_SOURCES = lib540.c $(SUPPORTFILES)
+lib539_CPPFLAGS = $(AM_CPPFLAGS)
+lib540_SOURCES = lib540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib540_LDADD = $(TESTUTIL_LIBS)
+lib540_CPPFLAGS = $(AM_CPPFLAGS)
 lib541_SOURCES = lib541.c $(SUPPORTFILES)
+lib541_CPPFLAGS = $(AM_CPPFLAGS)
 lib542_SOURCES = lib542.c $(SUPPORTFILES)
+lib542_CPPFLAGS = $(AM_CPPFLAGS)
 lib543_SOURCES = lib543.c $(SUPPORTFILES)
+lib543_CPPFLAGS = $(AM_CPPFLAGS)
 lib544_SOURCES = lib544.c $(SUPPORTFILES)
+lib544_CPPFLAGS = $(AM_CPPFLAGS)
 lib545_SOURCES = lib544.c $(SUPPORTFILES)
-lib545_CFLAGS = -DLIB545
+lib545_CPPFLAGS = $(AM_CPPFLAGS) -DLIB545
 lib547_SOURCES = lib547.c $(SUPPORTFILES)
+lib547_CPPFLAGS = $(AM_CPPFLAGS)
 lib548_SOURCES = lib547.c $(SUPPORTFILES)
-lib548_CFLAGS = -DLIB548
+lib548_CPPFLAGS = $(AM_CPPFLAGS) -DLIB548
 lib549_SOURCES = lib549.c $(SUPPORTFILES)
-lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL)
-lib552_SOURCES = lib552.c $(SUPPORTFILES)
+lib549_CPPFLAGS = $(AM_CPPFLAGS)
+lib552_SOURCES = lib552.c $(SUPPORTFILES) $(WARNLESS)
+lib552_CPPFLAGS = $(AM_CPPFLAGS)
 lib553_SOURCES = lib553.c $(SUPPORTFILES)
+lib553_CPPFLAGS = $(AM_CPPFLAGS)
 lib554_SOURCES = lib554.c $(SUPPORTFILES)
+lib554_CPPFLAGS = $(AM_CPPFLAGS)
+lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib555_LDADD = $(TESTUTIL_LIBS)
+lib555_CPPFLAGS = $(AM_CPPFLAGS)
 lib556_SOURCES = lib556.c $(SUPPORTFILES)
+lib556_CPPFLAGS = $(AM_CPPFLAGS)
 lib557_SOURCES = lib557.c $(SUPPORTFILES)
+lib557_CPPFLAGS = $(AM_CPPFLAGS)
 lib558_SOURCES = lib558.c $(SUPPORTFILES)
-lib558_CFLAGS = -DLIB558
-lib559_SOURCES = lib558.c $(SUPPORTFILES)
-lib559_CFLAGS = -DLIB559
-lib560_SOURCES = lib560.c $(SUPPORTFILES)
-lib574_SOURCES = lib574.c $(SUPPORTFILES)
-lib575_SOURCES = lib575.c $(SUPPORTFILES)
-lib576_SOURCES = lib576.c $(SUPPORTFILES)
-lib577_SOURCES = lib577.c $(SUPPORTFILES)
+lib558_CPPFLAGS = $(AM_CPPFLAGS)
+lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib560_LDADD = $(TESTUTIL_LIBS)
+lib560_CPPFLAGS = $(AM_CPPFLAGS)
 lib562_SOURCES = lib562.c $(SUPPORTFILES)
-lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL)
+lib562_CPPFLAGS = $(AM_CPPFLAGS)
+lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib564_LDADD = $(TESTUTIL_LIBS)
+lib564_CPPFLAGS = $(AM_CPPFLAGS)
 lib565_SOURCES = lib510.c $(SUPPORTFILES)
-lib565_CFLAGS = -DLIB565
+lib565_CPPFLAGS = $(AM_CPPFLAGS) -DLIB565
 lib566_SOURCES = lib566.c $(SUPPORTFILES)
+lib566_CPPFLAGS = $(AM_CPPFLAGS)
 lib567_SOURCES = lib567.c $(SUPPORTFILES)
+lib567_CPPFLAGS = $(AM_CPPFLAGS)
 lib568_SOURCES = lib568.c $(SUPPORTFILES)
+lib568_CPPFLAGS = $(AM_CPPFLAGS)
 lib569_SOURCES = lib569.c $(SUPPORTFILES)
+lib569_CPPFLAGS = $(AM_CPPFLAGS)
 lib570_SOURCES = lib570.c $(SUPPORTFILES)
-lib571_SOURCES = lib571.c $(SUPPORTFILES)
+lib570_CPPFLAGS = $(AM_CPPFLAGS)
+lib571_SOURCES = lib571.c $(SUPPORTFILES) $(WARNLESS)
+lib571_CPPFLAGS = $(AM_CPPFLAGS)
 lib572_SOURCES = lib572.c $(SUPPORTFILES)
-lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL)
+lib572_CPPFLAGS = $(AM_CPPFLAGS)
+lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE)
+lib573_LDADD = $(TESTUTIL_LIBS)
+lib573_CPPFLAGS = $(AM_CPPFLAGS)
+lib574_SOURCES = lib574.c $(SUPPORTFILES)
+lib574_CPPFLAGS = $(AM_CPPFLAGS)
+lib575_SOURCES = lib575.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib575_LDADD = $(TESTUTIL_LIBS)
+lib575_CPPFLAGS = $(AM_CPPFLAGS)
+lib576_SOURCES = lib576.c $(SUPPORTFILES)
+lib576_CPPFLAGS = $(AM_CPPFLAGS)
 lib578_SOURCES = lib578.c $(SUPPORTFILES)
+lib578_CPPFLAGS = $(AM_CPPFLAGS)
 lib579_SOURCES = lib579.c $(SUPPORTFILES)
+lib579_CPPFLAGS = $(AM_CPPFLAGS)
+lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib582_LDADD = $(TESTUTIL_LIBS)
+lib582_CPPFLAGS = $(AM_CPPFLAGS)
+lib583_SOURCES = lib583.c $(SUPPORTFILES)
+lib583_CPPFLAGS = $(AM_CPPFLAGS)
+lib585_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib585_LDADD = $(TESTUTIL_LIBS)
+lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
+lib586_SOURCES = lib586.c $(SUPPORTFILES)
+lib586_CPPFLAGS = $(AM_CPPFLAGS)
+lib587_SOURCES = lib554.c $(SUPPORTFILES)
+lib587_CPPFLAGS = $(AM_CPPFLAGS) -DLIB587
+lib590_SOURCES = lib590.c $(SUPPORTFILES)
+lib590_CPPFLAGS = $(AM_CPPFLAGS)
+lib591_SOURCES = lib591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib591_LDADD = $(TESTUTIL_LIBS)
+lib591_CPPFLAGS = $(AM_CPPFLAGS)
+lib597_SOURCES = lib597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib597_LDADD = $(TESTUTIL_LIBS)
+lib597_CPPFLAGS = $(AM_CPPFLAGS)
+lib598_SOURCES = lib598.c $(SUPPORTFILES)
+lib598_CPPFLAGS = $(AM_CPPFLAGS)
+lib599_SOURCES = lib599.c $(SUPPORTFILES)
+lib599_CPPFLAGS = $(AM_CPPFLAGS)
+lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL)
+lib1500_LDADD = $(TESTUTIL_LIBS)
+lib1500_CPPFLAGS = $(AM_CPPFLAGS)
+lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1501_LDADD = $(TESTUTIL_LIBS)
+lib1501_CPPFLAGS = $(AM_CPPFLAGS)
+lib1502_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1502_LDADD = $(TESTUTIL_LIBS)
+lib1502_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1502
+lib1503_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1503_LDADD = $(TESTUTIL_LIBS)
+lib1503_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1503
+lib1504_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1504_LDADD = $(TESTUTIL_LIBS)
+lib1504_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1504
+lib1505_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1505_LDADD = $(TESTUTIL_LIBS)
+lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1506_LDADD = $(TESTUTIL_LIBS)
+lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
+lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1507_LDADD = $(TESTUTIL_LIBS)
+lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507
+lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1508_LDADD = $(TESTUTIL_LIBS)
+lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+lib1509_SOURCES = lib1509.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1509_LDADD = $(TESTUTIL_LIBS)
+lib1509_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1509
+lib1510_SOURCES = lib1510.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1510_LDADD = $(TESTUTIL_LIBS)
+lib1510_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1510
+lib1511_SOURCES = lib1511.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1511_LDADD = $(TESTUTIL_LIBS)
+lib1511_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1511
+lib1512_SOURCES = lib1512.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1512_LDADD = $(TESTUTIL_LIBS)
+lib1512_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1512
+lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1900_LDADD = $(TESTUTIL_LIBS)
+lib1900_CPPFLAGS = $(AM_CPPFLAGS)
+lib2033_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib2033_LDADD = $(TESTUTIL_LIBS)
+lib2033_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PIPELINING
 @BUILD_LIBHOSTNAME_FALSE@noinst_LTLIBRARIES = 
 
 # Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
@@ -779,13 +1343,18 @@ lib579_SOURCES = lib579.c $(SUPPORTFILES)
 # Preloading of libhostname allows host name overriding,
 # this is used to make some tests machine independent.
 @BUILD_LIBHOSTNAME_TRUE@noinst_LTLIBRARIES = libhostname.la
-
-# The -no-undefined flag is crucial to build fine on some platforms
-@NO_UNDEFINED_TRUE@UNDEF = -no-undefined
+AM_LDFLAGS = 
+AM_CFLAGS = 
+libhostname_la_CPPFLAGS_EXTRA = $(am__append_4)
+libhostname_la_LDFLAGS_EXTRA = -module -avoid-version -rpath /nowhere \
+       $(am__append_2) $(am__append_3)
+libhostname_la_CFLAGS_EXTRA = $(am__append_5)
+libhostname_la_CPPFLAGS = $(AM_CPPFLAGS) $(libhostname_la_CPPFLAGS_EXTRA)
+libhostname_la_LDFLAGS = $(AM_LDFLAGS) $(libhostname_la_LDFLAGS_EXTRA)
+libhostname_la_CFLAGS = $(AM_CFLAGS) $(libhostname_la_CFLAGS_EXTRA)
 libhostname_la_SOURCES = sethostname.c sethostname.h
 libhostname_la_LIBADD = 
 libhostname_la_DEPENDENCIES = 
-libhostname_la_LDFLAGS = -module -avoid-version $(UNDEF) -rpath /nowhere
 all: all-am
 
 .SUFFIXES:
@@ -794,14 +1363,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tests/libtest/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  tests/libtest/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/libtest/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/libtest/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -811,6 +1380,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -819,231 +1389,410 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstLTLIBRARIES:
        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" != "$$p" || dir=.; \
-         echo "rm -f \"$${dir}/so_locations\""; \
-         rm -f "$${dir}/so_locations"; \
-       done
-libhostname.la: $(libhostname_la_OBJECTS) $(libhostname_la_DEPENDENCIES) 
-       $(LINK) $(am_libhostname_la_rpath) $(libhostname_la_LDFLAGS) $(libhostname_la_OBJECTS) $(libhostname_la_LIBADD) $(LIBS)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+libhostname.la: $(libhostname_la_OBJECTS) $(libhostname_la_DEPENDENCIES) $(EXTRA_libhostname_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libhostname_la_LINK) $(am_libhostname_la_rpath) $(libhostname_la_OBJECTS) $(libhostname_la_LIBADD) $(LIBS)
 
 clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
-chkhostname$(EXEEXT): $(chkhostname_OBJECTS) $(chkhostname_DEPENDENCIES) 
+       @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+chkhostname$(EXEEXT): $(chkhostname_OBJECTS) $(chkhostname_DEPENDENCIES) $(EXTRA_chkhostname_DEPENDENCIES) 
        @rm -f chkhostname$(EXEEXT)
-       $(LINK) $(chkhostname_LDFLAGS) $(chkhostname_OBJECTS) $(chkhostname_LDADD) $(LIBS)
-lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(chkhostname_OBJECTS) $(chkhostname_LDADD) $(LIBS)
+
+lib1500$(EXEEXT): $(lib1500_OBJECTS) $(lib1500_DEPENDENCIES) $(EXTRA_lib1500_DEPENDENCIES) 
+       @rm -f lib1500$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1500_OBJECTS) $(lib1500_LDADD) $(LIBS)
+
+lib1501$(EXEEXT): $(lib1501_OBJECTS) $(lib1501_DEPENDENCIES) $(EXTRA_lib1501_DEPENDENCIES) 
+       @rm -f lib1501$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1501_OBJECTS) $(lib1501_LDADD) $(LIBS)
+
+lib1502$(EXEEXT): $(lib1502_OBJECTS) $(lib1502_DEPENDENCIES) $(EXTRA_lib1502_DEPENDENCIES) 
+       @rm -f lib1502$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1502_OBJECTS) $(lib1502_LDADD) $(LIBS)
+
+lib1503$(EXEEXT): $(lib1503_OBJECTS) $(lib1503_DEPENDENCIES) $(EXTRA_lib1503_DEPENDENCIES) 
+       @rm -f lib1503$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1503_OBJECTS) $(lib1503_LDADD) $(LIBS)
+
+lib1504$(EXEEXT): $(lib1504_OBJECTS) $(lib1504_DEPENDENCIES) $(EXTRA_lib1504_DEPENDENCIES) 
+       @rm -f lib1504$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1504_OBJECTS) $(lib1504_LDADD) $(LIBS)
+
+lib1505$(EXEEXT): $(lib1505_OBJECTS) $(lib1505_DEPENDENCIES) $(EXTRA_lib1505_DEPENDENCIES) 
+       @rm -f lib1505$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1505_OBJECTS) $(lib1505_LDADD) $(LIBS)
+
+lib1506$(EXEEXT): $(lib1506_OBJECTS) $(lib1506_DEPENDENCIES) $(EXTRA_lib1506_DEPENDENCIES) 
+       @rm -f lib1506$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1506_OBJECTS) $(lib1506_LDADD) $(LIBS)
+
+lib1507$(EXEEXT): $(lib1507_OBJECTS) $(lib1507_DEPENDENCIES) $(EXTRA_lib1507_DEPENDENCIES) 
+       @rm -f lib1507$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1507_OBJECTS) $(lib1507_LDADD) $(LIBS)
+
+lib1508$(EXEEXT): $(lib1508_OBJECTS) $(lib1508_DEPENDENCIES) $(EXTRA_lib1508_DEPENDENCIES) 
+       @rm -f lib1508$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1508_OBJECTS) $(lib1508_LDADD) $(LIBS)
+
+lib1509$(EXEEXT): $(lib1509_OBJECTS) $(lib1509_DEPENDENCIES) $(EXTRA_lib1509_DEPENDENCIES) 
+       @rm -f lib1509$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1509_OBJECTS) $(lib1509_LDADD) $(LIBS)
+
+lib1510$(EXEEXT): $(lib1510_OBJECTS) $(lib1510_DEPENDENCIES) $(EXTRA_lib1510_DEPENDENCIES) 
+       @rm -f lib1510$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1510_OBJECTS) $(lib1510_LDADD) $(LIBS)
+
+lib1511$(EXEEXT): $(lib1511_OBJECTS) $(lib1511_DEPENDENCIES) $(EXTRA_lib1511_DEPENDENCIES) 
+       @rm -f lib1511$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1511_OBJECTS) $(lib1511_LDADD) $(LIBS)
+
+lib1512$(EXEEXT): $(lib1512_OBJECTS) $(lib1512_DEPENDENCIES) $(EXTRA_lib1512_DEPENDENCIES) 
+       @rm -f lib1512$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1512_OBJECTS) $(lib1512_LDADD) $(LIBS)
+
+lib1900$(EXEEXT): $(lib1900_OBJECTS) $(lib1900_DEPENDENCIES) $(EXTRA_lib1900_DEPENDENCIES) 
+       @rm -f lib1900$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib1900_OBJECTS) $(lib1900_LDADD) $(LIBS)
+
+lib2033$(EXEEXT): $(lib2033_OBJECTS) $(lib2033_DEPENDENCIES) $(EXTRA_lib2033_DEPENDENCIES) 
+       @rm -f lib2033$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib2033_OBJECTS) $(lib2033_LDADD) $(LIBS)
+
+lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES) $(EXTRA_lib500_DEPENDENCIES) 
        @rm -f lib500$(EXEEXT)
-       $(LINK) $(lib500_LDFLAGS) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS)
-lib501$(EXEEXT): $(lib501_OBJECTS) $(lib501_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS)
+
+lib501$(EXEEXT): $(lib501_OBJECTS) $(lib501_DEPENDENCIES) $(EXTRA_lib501_DEPENDENCIES) 
        @rm -f lib501$(EXEEXT)
-       $(LINK) $(lib501_LDFLAGS) $(lib501_OBJECTS) $(lib501_LDADD) $(LIBS)
-lib502$(EXEEXT): $(lib502_OBJECTS) $(lib502_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib501_OBJECTS) $(lib501_LDADD) $(LIBS)
+
+lib502$(EXEEXT): $(lib502_OBJECTS) $(lib502_DEPENDENCIES) $(EXTRA_lib502_DEPENDENCIES) 
        @rm -f lib502$(EXEEXT)
-       $(LINK) $(lib502_LDFLAGS) $(lib502_OBJECTS) $(lib502_LDADD) $(LIBS)
-lib503$(EXEEXT): $(lib503_OBJECTS) $(lib503_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib502_OBJECTS) $(lib502_LDADD) $(LIBS)
+
+lib503$(EXEEXT): $(lib503_OBJECTS) $(lib503_DEPENDENCIES) $(EXTRA_lib503_DEPENDENCIES) 
        @rm -f lib503$(EXEEXT)
-       $(LINK) $(lib503_LDFLAGS) $(lib503_OBJECTS) $(lib503_LDADD) $(LIBS)
-lib504$(EXEEXT): $(lib504_OBJECTS) $(lib504_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib503_OBJECTS) $(lib503_LDADD) $(LIBS)
+
+lib504$(EXEEXT): $(lib504_OBJECTS) $(lib504_DEPENDENCIES) $(EXTRA_lib504_DEPENDENCIES) 
        @rm -f lib504$(EXEEXT)
-       $(LINK) $(lib504_LDFLAGS) $(lib504_OBJECTS) $(lib504_LDADD) $(LIBS)
-lib505$(EXEEXT): $(lib505_OBJECTS) $(lib505_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib504_OBJECTS) $(lib504_LDADD) $(LIBS)
+
+lib505$(EXEEXT): $(lib505_OBJECTS) $(lib505_DEPENDENCIES) $(EXTRA_lib505_DEPENDENCIES) 
        @rm -f lib505$(EXEEXT)
-       $(LINK) $(lib505_LDFLAGS) $(lib505_OBJECTS) $(lib505_LDADD) $(LIBS)
-lib506$(EXEEXT): $(lib506_OBJECTS) $(lib506_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib505_OBJECTS) $(lib505_LDADD) $(LIBS)
+
+lib506$(EXEEXT): $(lib506_OBJECTS) $(lib506_DEPENDENCIES) $(EXTRA_lib506_DEPENDENCIES) 
        @rm -f lib506$(EXEEXT)
-       $(LINK) $(lib506_LDFLAGS) $(lib506_OBJECTS) $(lib506_LDADD) $(LIBS)
-lib507$(EXEEXT): $(lib507_OBJECTS) $(lib507_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib506_OBJECTS) $(lib506_LDADD) $(LIBS)
+
+lib507$(EXEEXT): $(lib507_OBJECTS) $(lib507_DEPENDENCIES) $(EXTRA_lib507_DEPENDENCIES) 
        @rm -f lib507$(EXEEXT)
-       $(LINK) $(lib507_LDFLAGS) $(lib507_OBJECTS) $(lib507_LDADD) $(LIBS)
-lib508$(EXEEXT): $(lib508_OBJECTS) $(lib508_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib507_OBJECTS) $(lib507_LDADD) $(LIBS)
+
+lib508$(EXEEXT): $(lib508_OBJECTS) $(lib508_DEPENDENCIES) $(EXTRA_lib508_DEPENDENCIES) 
        @rm -f lib508$(EXEEXT)
-       $(LINK) $(lib508_LDFLAGS) $(lib508_OBJECTS) $(lib508_LDADD) $(LIBS)
-lib510$(EXEEXT): $(lib510_OBJECTS) $(lib510_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib508_OBJECTS) $(lib508_LDADD) $(LIBS)
+
+lib509$(EXEEXT): $(lib509_OBJECTS) $(lib509_DEPENDENCIES) $(EXTRA_lib509_DEPENDENCIES) 
+       @rm -f lib509$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib509_OBJECTS) $(lib509_LDADD) $(LIBS)
+
+lib510$(EXEEXT): $(lib510_OBJECTS) $(lib510_DEPENDENCIES) $(EXTRA_lib510_DEPENDENCIES) 
        @rm -f lib510$(EXEEXT)
-       $(LINK) $(lib510_LDFLAGS) $(lib510_OBJECTS) $(lib510_LDADD) $(LIBS)
-lib511$(EXEEXT): $(lib511_OBJECTS) $(lib511_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib510_OBJECTS) $(lib510_LDADD) $(LIBS)
+
+lib511$(EXEEXT): $(lib511_OBJECTS) $(lib511_DEPENDENCIES) $(EXTRA_lib511_DEPENDENCIES) 
        @rm -f lib511$(EXEEXT)
-       $(LINK) $(lib511_LDFLAGS) $(lib511_OBJECTS) $(lib511_LDADD) $(LIBS)
-lib512$(EXEEXT): $(lib512_OBJECTS) $(lib512_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib511_OBJECTS) $(lib511_LDADD) $(LIBS)
+
+lib512$(EXEEXT): $(lib512_OBJECTS) $(lib512_DEPENDENCIES) $(EXTRA_lib512_DEPENDENCIES) 
        @rm -f lib512$(EXEEXT)
-       $(LINK) $(lib512_LDFLAGS) $(lib512_OBJECTS) $(lib512_LDADD) $(LIBS)
-lib513$(EXEEXT): $(lib513_OBJECTS) $(lib513_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib512_OBJECTS) $(lib512_LDADD) $(LIBS)
+
+lib513$(EXEEXT): $(lib513_OBJECTS) $(lib513_DEPENDENCIES) $(EXTRA_lib513_DEPENDENCIES) 
        @rm -f lib513$(EXEEXT)
-       $(LINK) $(lib513_LDFLAGS) $(lib513_OBJECTS) $(lib513_LDADD) $(LIBS)
-lib514$(EXEEXT): $(lib514_OBJECTS) $(lib514_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib513_OBJECTS) $(lib513_LDADD) $(LIBS)
+
+lib514$(EXEEXT): $(lib514_OBJECTS) $(lib514_DEPENDENCIES) $(EXTRA_lib514_DEPENDENCIES) 
        @rm -f lib514$(EXEEXT)
-       $(LINK) $(lib514_LDFLAGS) $(lib514_OBJECTS) $(lib514_LDADD) $(LIBS)
-lib515$(EXEEXT): $(lib515_OBJECTS) $(lib515_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib514_OBJECTS) $(lib514_LDADD) $(LIBS)
+
+lib515$(EXEEXT): $(lib515_OBJECTS) $(lib515_DEPENDENCIES) $(EXTRA_lib515_DEPENDENCIES) 
        @rm -f lib515$(EXEEXT)
-       $(LINK) $(lib515_LDFLAGS) $(lib515_OBJECTS) $(lib515_LDADD) $(LIBS)
-lib516$(EXEEXT): $(lib516_OBJECTS) $(lib516_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib515_OBJECTS) $(lib515_LDADD) $(LIBS)
+
+lib516$(EXEEXT): $(lib516_OBJECTS) $(lib516_DEPENDENCIES) $(EXTRA_lib516_DEPENDENCIES) 
        @rm -f lib516$(EXEEXT)
-       $(LINK) $(lib516_LDFLAGS) $(lib516_OBJECTS) $(lib516_LDADD) $(LIBS)
-lib517$(EXEEXT): $(lib517_OBJECTS) $(lib517_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib516_OBJECTS) $(lib516_LDADD) $(LIBS)
+
+lib517$(EXEEXT): $(lib517_OBJECTS) $(lib517_DEPENDENCIES) $(EXTRA_lib517_DEPENDENCIES) 
        @rm -f lib517$(EXEEXT)
-       $(LINK) $(lib517_LDFLAGS) $(lib517_OBJECTS) $(lib517_LDADD) $(LIBS)
-lib518$(EXEEXT): $(lib518_OBJECTS) $(lib518_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib517_OBJECTS) $(lib517_LDADD) $(LIBS)
+
+lib518$(EXEEXT): $(lib518_OBJECTS) $(lib518_DEPENDENCIES) $(EXTRA_lib518_DEPENDENCIES) 
        @rm -f lib518$(EXEEXT)
-       $(LINK) $(lib518_LDFLAGS) $(lib518_OBJECTS) $(lib518_LDADD) $(LIBS)
-lib519$(EXEEXT): $(lib519_OBJECTS) $(lib519_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib518_OBJECTS) $(lib518_LDADD) $(LIBS)
+
+lib519$(EXEEXT): $(lib519_OBJECTS) $(lib519_DEPENDENCIES) $(EXTRA_lib519_DEPENDENCIES) 
        @rm -f lib519$(EXEEXT)
-       $(LINK) $(lib519_LDFLAGS) $(lib519_OBJECTS) $(lib519_LDADD) $(LIBS)
-lib520$(EXEEXT): $(lib520_OBJECTS) $(lib520_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib519_OBJECTS) $(lib519_LDADD) $(LIBS)
+
+lib520$(EXEEXT): $(lib520_OBJECTS) $(lib520_DEPENDENCIES) $(EXTRA_lib520_DEPENDENCIES) 
        @rm -f lib520$(EXEEXT)
-       $(LINK) $(lib520_LDFLAGS) $(lib520_OBJECTS) $(lib520_LDADD) $(LIBS)
-lib521$(EXEEXT): $(lib521_OBJECTS) $(lib521_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib520_OBJECTS) $(lib520_LDADD) $(LIBS)
+
+lib521$(EXEEXT): $(lib521_OBJECTS) $(lib521_DEPENDENCIES) $(EXTRA_lib521_DEPENDENCIES) 
        @rm -f lib521$(EXEEXT)
-       $(LINK) $(lib521_LDFLAGS) $(lib521_OBJECTS) $(lib521_LDADD) $(LIBS)
-lib523$(EXEEXT): $(lib523_OBJECTS) $(lib523_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib521_OBJECTS) $(lib521_LDADD) $(LIBS)
+
+lib523$(EXEEXT): $(lib523_OBJECTS) $(lib523_DEPENDENCIES) $(EXTRA_lib523_DEPENDENCIES) 
        @rm -f lib523$(EXEEXT)
-       $(LINK) $(lib523_LDFLAGS) $(lib523_OBJECTS) $(lib523_LDADD) $(LIBS)
-lib524$(EXEEXT): $(lib524_OBJECTS) $(lib524_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib523_OBJECTS) $(lib523_LDADD) $(LIBS)
+
+lib524$(EXEEXT): $(lib524_OBJECTS) $(lib524_DEPENDENCIES) $(EXTRA_lib524_DEPENDENCIES) 
        @rm -f lib524$(EXEEXT)
-       $(LINK) $(lib524_LDFLAGS) $(lib524_OBJECTS) $(lib524_LDADD) $(LIBS)
-lib525$(EXEEXT): $(lib525_OBJECTS) $(lib525_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib524_OBJECTS) $(lib524_LDADD) $(LIBS)
+
+lib525$(EXEEXT): $(lib525_OBJECTS) $(lib525_DEPENDENCIES) $(EXTRA_lib525_DEPENDENCIES) 
        @rm -f lib525$(EXEEXT)
-       $(LINK) $(lib525_LDFLAGS) $(lib525_OBJECTS) $(lib525_LDADD) $(LIBS)
-lib526$(EXEEXT): $(lib526_OBJECTS) $(lib526_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib525_OBJECTS) $(lib525_LDADD) $(LIBS)
+
+lib526$(EXEEXT): $(lib526_OBJECTS) $(lib526_DEPENDENCIES) $(EXTRA_lib526_DEPENDENCIES) 
        @rm -f lib526$(EXEEXT)
-       $(LINK) $(lib526_LDFLAGS) $(lib526_OBJECTS) $(lib526_LDADD) $(LIBS)
-lib527$(EXEEXT): $(lib527_OBJECTS) $(lib527_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib526_OBJECTS) $(lib526_LDADD) $(LIBS)
+
+lib527$(EXEEXT): $(lib527_OBJECTS) $(lib527_DEPENDENCIES) $(EXTRA_lib527_DEPENDENCIES) 
        @rm -f lib527$(EXEEXT)
-       $(LINK) $(lib527_LDFLAGS) $(lib527_OBJECTS) $(lib527_LDADD) $(LIBS)
-lib529$(EXEEXT): $(lib529_OBJECTS) $(lib529_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib527_OBJECTS) $(lib527_LDADD) $(LIBS)
+
+lib529$(EXEEXT): $(lib529_OBJECTS) $(lib529_DEPENDENCIES) $(EXTRA_lib529_DEPENDENCIES) 
        @rm -f lib529$(EXEEXT)
-       $(LINK) $(lib529_LDFLAGS) $(lib529_OBJECTS) $(lib529_LDADD) $(LIBS)
-lib530$(EXEEXT): $(lib530_OBJECTS) $(lib530_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib529_OBJECTS) $(lib529_LDADD) $(LIBS)
+
+lib530$(EXEEXT): $(lib530_OBJECTS) $(lib530_DEPENDENCIES) $(EXTRA_lib530_DEPENDENCIES) 
        @rm -f lib530$(EXEEXT)
-       $(LINK) $(lib530_LDFLAGS) $(lib530_OBJECTS) $(lib530_LDADD) $(LIBS)
-lib532$(EXEEXT): $(lib532_OBJECTS) $(lib532_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib530_OBJECTS) $(lib530_LDADD) $(LIBS)
+
+lib532$(EXEEXT): $(lib532_OBJECTS) $(lib532_DEPENDENCIES) $(EXTRA_lib532_DEPENDENCIES) 
        @rm -f lib532$(EXEEXT)
-       $(LINK) $(lib532_LDFLAGS) $(lib532_OBJECTS) $(lib532_LDADD) $(LIBS)
-lib533$(EXEEXT): $(lib533_OBJECTS) $(lib533_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib532_OBJECTS) $(lib532_LDADD) $(LIBS)
+
+lib533$(EXEEXT): $(lib533_OBJECTS) $(lib533_DEPENDENCIES) $(EXTRA_lib533_DEPENDENCIES) 
        @rm -f lib533$(EXEEXT)
-       $(LINK) $(lib533_LDFLAGS) $(lib533_OBJECTS) $(lib533_LDADD) $(LIBS)
-lib536$(EXEEXT): $(lib536_OBJECTS) $(lib536_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib533_OBJECTS) $(lib533_LDADD) $(LIBS)
+
+lib536$(EXEEXT): $(lib536_OBJECTS) $(lib536_DEPENDENCIES) $(EXTRA_lib536_DEPENDENCIES) 
        @rm -f lib536$(EXEEXT)
-       $(LINK) $(lib536_LDFLAGS) $(lib536_OBJECTS) $(lib536_LDADD) $(LIBS)
-lib537$(EXEEXT): $(lib537_OBJECTS) $(lib537_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib536_OBJECTS) $(lib536_LDADD) $(LIBS)
+
+lib537$(EXEEXT): $(lib537_OBJECTS) $(lib537_DEPENDENCIES) $(EXTRA_lib537_DEPENDENCIES) 
        @rm -f lib537$(EXEEXT)
-       $(LINK) $(lib537_LDFLAGS) $(lib537_OBJECTS) $(lib537_LDADD) $(LIBS)
-lib539$(EXEEXT): $(lib539_OBJECTS) $(lib539_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib537_OBJECTS) $(lib537_LDADD) $(LIBS)
+
+lib539$(EXEEXT): $(lib539_OBJECTS) $(lib539_DEPENDENCIES) $(EXTRA_lib539_DEPENDENCIES) 
        @rm -f lib539$(EXEEXT)
-       $(LINK) $(lib539_LDFLAGS) $(lib539_OBJECTS) $(lib539_LDADD) $(LIBS)
-lib540$(EXEEXT): $(lib540_OBJECTS) $(lib540_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib539_OBJECTS) $(lib539_LDADD) $(LIBS)
+
+lib540$(EXEEXT): $(lib540_OBJECTS) $(lib540_DEPENDENCIES) $(EXTRA_lib540_DEPENDENCIES) 
        @rm -f lib540$(EXEEXT)
-       $(LINK) $(lib540_LDFLAGS) $(lib540_OBJECTS) $(lib540_LDADD) $(LIBS)
-lib541$(EXEEXT): $(lib541_OBJECTS) $(lib541_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib540_OBJECTS) $(lib540_LDADD) $(LIBS)
+
+lib541$(EXEEXT): $(lib541_OBJECTS) $(lib541_DEPENDENCIES) $(EXTRA_lib541_DEPENDENCIES) 
        @rm -f lib541$(EXEEXT)
-       $(LINK) $(lib541_LDFLAGS) $(lib541_OBJECTS) $(lib541_LDADD) $(LIBS)
-lib542$(EXEEXT): $(lib542_OBJECTS) $(lib542_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib541_OBJECTS) $(lib541_LDADD) $(LIBS)
+
+lib542$(EXEEXT): $(lib542_OBJECTS) $(lib542_DEPENDENCIES) $(EXTRA_lib542_DEPENDENCIES) 
        @rm -f lib542$(EXEEXT)
-       $(LINK) $(lib542_LDFLAGS) $(lib542_OBJECTS) $(lib542_LDADD) $(LIBS)
-lib543$(EXEEXT): $(lib543_OBJECTS) $(lib543_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib542_OBJECTS) $(lib542_LDADD) $(LIBS)
+
+lib543$(EXEEXT): $(lib543_OBJECTS) $(lib543_DEPENDENCIES) $(EXTRA_lib543_DEPENDENCIES) 
        @rm -f lib543$(EXEEXT)
-       $(LINK) $(lib543_LDFLAGS) $(lib543_OBJECTS) $(lib543_LDADD) $(LIBS)
-lib544$(EXEEXT): $(lib544_OBJECTS) $(lib544_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib543_OBJECTS) $(lib543_LDADD) $(LIBS)
+
+lib544$(EXEEXT): $(lib544_OBJECTS) $(lib544_DEPENDENCIES) $(EXTRA_lib544_DEPENDENCIES) 
        @rm -f lib544$(EXEEXT)
-       $(LINK) $(lib544_LDFLAGS) $(lib544_OBJECTS) $(lib544_LDADD) $(LIBS)
-lib545$(EXEEXT): $(lib545_OBJECTS) $(lib545_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib544_OBJECTS) $(lib544_LDADD) $(LIBS)
+
+lib545$(EXEEXT): $(lib545_OBJECTS) $(lib545_DEPENDENCIES) $(EXTRA_lib545_DEPENDENCIES) 
        @rm -f lib545$(EXEEXT)
-       $(LINK) $(lib545_LDFLAGS) $(lib545_OBJECTS) $(lib545_LDADD) $(LIBS)
-lib547$(EXEEXT): $(lib547_OBJECTS) $(lib547_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib545_OBJECTS) $(lib545_LDADD) $(LIBS)
+
+lib547$(EXEEXT): $(lib547_OBJECTS) $(lib547_DEPENDENCIES) $(EXTRA_lib547_DEPENDENCIES) 
        @rm -f lib547$(EXEEXT)
-       $(LINK) $(lib547_LDFLAGS) $(lib547_OBJECTS) $(lib547_LDADD) $(LIBS)
-lib548$(EXEEXT): $(lib548_OBJECTS) $(lib548_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib547_OBJECTS) $(lib547_LDADD) $(LIBS)
+
+lib548$(EXEEXT): $(lib548_OBJECTS) $(lib548_DEPENDENCIES) $(EXTRA_lib548_DEPENDENCIES) 
        @rm -f lib548$(EXEEXT)
-       $(LINK) $(lib548_LDFLAGS) $(lib548_OBJECTS) $(lib548_LDADD) $(LIBS)
-lib549$(EXEEXT): $(lib549_OBJECTS) $(lib549_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib548_OBJECTS) $(lib548_LDADD) $(LIBS)
+
+lib549$(EXEEXT): $(lib549_OBJECTS) $(lib549_DEPENDENCIES) $(EXTRA_lib549_DEPENDENCIES) 
        @rm -f lib549$(EXEEXT)
-       $(LINK) $(lib549_LDFLAGS) $(lib549_OBJECTS) $(lib549_LDADD) $(LIBS)
-lib552$(EXEEXT): $(lib552_OBJECTS) $(lib552_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib549_OBJECTS) $(lib549_LDADD) $(LIBS)
+
+lib552$(EXEEXT): $(lib552_OBJECTS) $(lib552_DEPENDENCIES) $(EXTRA_lib552_DEPENDENCIES) 
        @rm -f lib552$(EXEEXT)
-       $(LINK) $(lib552_LDFLAGS) $(lib552_OBJECTS) $(lib552_LDADD) $(LIBS)
-lib553$(EXEEXT): $(lib553_OBJECTS) $(lib553_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib552_OBJECTS) $(lib552_LDADD) $(LIBS)
+
+lib553$(EXEEXT): $(lib553_OBJECTS) $(lib553_DEPENDENCIES) $(EXTRA_lib553_DEPENDENCIES) 
        @rm -f lib553$(EXEEXT)
-       $(LINK) $(lib553_LDFLAGS) $(lib553_OBJECTS) $(lib553_LDADD) $(LIBS)
-lib554$(EXEEXT): $(lib554_OBJECTS) $(lib554_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib553_OBJECTS) $(lib553_LDADD) $(LIBS)
+
+lib554$(EXEEXT): $(lib554_OBJECTS) $(lib554_DEPENDENCIES) $(EXTRA_lib554_DEPENDENCIES) 
        @rm -f lib554$(EXEEXT)
-       $(LINK) $(lib554_LDFLAGS) $(lib554_OBJECTS) $(lib554_LDADD) $(LIBS)
-lib555$(EXEEXT): $(lib555_OBJECTS) $(lib555_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib554_OBJECTS) $(lib554_LDADD) $(LIBS)
+
+lib555$(EXEEXT): $(lib555_OBJECTS) $(lib555_DEPENDENCIES) $(EXTRA_lib555_DEPENDENCIES) 
        @rm -f lib555$(EXEEXT)
-       $(LINK) $(lib555_LDFLAGS) $(lib555_OBJECTS) $(lib555_LDADD) $(LIBS)
-lib556$(EXEEXT): $(lib556_OBJECTS) $(lib556_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib555_OBJECTS) $(lib555_LDADD) $(LIBS)
+
+lib556$(EXEEXT): $(lib556_OBJECTS) $(lib556_DEPENDENCIES) $(EXTRA_lib556_DEPENDENCIES) 
        @rm -f lib556$(EXEEXT)
-       $(LINK) $(lib556_LDFLAGS) $(lib556_OBJECTS) $(lib556_LDADD) $(LIBS)
-lib557$(EXEEXT): $(lib557_OBJECTS) $(lib557_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib556_OBJECTS) $(lib556_LDADD) $(LIBS)
+
+lib557$(EXEEXT): $(lib557_OBJECTS) $(lib557_DEPENDENCIES) $(EXTRA_lib557_DEPENDENCIES) 
        @rm -f lib557$(EXEEXT)
-       $(LINK) $(lib557_LDFLAGS) $(lib557_OBJECTS) $(lib557_LDADD) $(LIBS)
-lib558$(EXEEXT): $(lib558_OBJECTS) $(lib558_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib557_OBJECTS) $(lib557_LDADD) $(LIBS)
+
+lib558$(EXEEXT): $(lib558_OBJECTS) $(lib558_DEPENDENCIES) $(EXTRA_lib558_DEPENDENCIES) 
        @rm -f lib558$(EXEEXT)
-       $(LINK) $(lib558_LDFLAGS) $(lib558_OBJECTS) $(lib558_LDADD) $(LIBS)
-lib559$(EXEEXT): $(lib559_OBJECTS) $(lib559_DEPENDENCIES) 
-       @rm -f lib559$(EXEEXT)
-       $(LINK) $(lib559_LDFLAGS) $(lib559_OBJECTS) $(lib559_LDADD) $(LIBS)
-lib560$(EXEEXT): $(lib560_OBJECTS) $(lib560_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib558_OBJECTS) $(lib558_LDADD) $(LIBS)
+
+lib560$(EXEEXT): $(lib560_OBJECTS) $(lib560_DEPENDENCIES) $(EXTRA_lib560_DEPENDENCIES) 
        @rm -f lib560$(EXEEXT)
-       $(LINK) $(lib560_LDFLAGS) $(lib560_OBJECTS) $(lib560_LDADD) $(LIBS)
-lib562$(EXEEXT): $(lib562_OBJECTS) $(lib562_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib560_OBJECTS) $(lib560_LDADD) $(LIBS)
+
+lib562$(EXEEXT): $(lib562_OBJECTS) $(lib562_DEPENDENCIES) $(EXTRA_lib562_DEPENDENCIES) 
        @rm -f lib562$(EXEEXT)
-       $(LINK) $(lib562_LDFLAGS) $(lib562_OBJECTS) $(lib562_LDADD) $(LIBS)
-lib564$(EXEEXT): $(lib564_OBJECTS) $(lib564_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib562_OBJECTS) $(lib562_LDADD) $(LIBS)
+
+lib564$(EXEEXT): $(lib564_OBJECTS) $(lib564_DEPENDENCIES) $(EXTRA_lib564_DEPENDENCIES) 
        @rm -f lib564$(EXEEXT)
-       $(LINK) $(lib564_LDFLAGS) $(lib564_OBJECTS) $(lib564_LDADD) $(LIBS)
-lib565$(EXEEXT): $(lib565_OBJECTS) $(lib565_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib564_OBJECTS) $(lib564_LDADD) $(LIBS)
+
+lib565$(EXEEXT): $(lib565_OBJECTS) $(lib565_DEPENDENCIES) $(EXTRA_lib565_DEPENDENCIES) 
        @rm -f lib565$(EXEEXT)
-       $(LINK) $(lib565_LDFLAGS) $(lib565_OBJECTS) $(lib565_LDADD) $(LIBS)
-lib566$(EXEEXT): $(lib566_OBJECTS) $(lib566_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib565_OBJECTS) $(lib565_LDADD) $(LIBS)
+
+lib566$(EXEEXT): $(lib566_OBJECTS) $(lib566_DEPENDENCIES) $(EXTRA_lib566_DEPENDENCIES) 
        @rm -f lib566$(EXEEXT)
-       $(LINK) $(lib566_LDFLAGS) $(lib566_OBJECTS) $(lib566_LDADD) $(LIBS)
-lib567$(EXEEXT): $(lib567_OBJECTS) $(lib567_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib566_OBJECTS) $(lib566_LDADD) $(LIBS)
+
+lib567$(EXEEXT): $(lib567_OBJECTS) $(lib567_DEPENDENCIES) $(EXTRA_lib567_DEPENDENCIES) 
        @rm -f lib567$(EXEEXT)
-       $(LINK) $(lib567_LDFLAGS) $(lib567_OBJECTS) $(lib567_LDADD) $(LIBS)
-lib568$(EXEEXT): $(lib568_OBJECTS) $(lib568_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib567_OBJECTS) $(lib567_LDADD) $(LIBS)
+
+lib568$(EXEEXT): $(lib568_OBJECTS) $(lib568_DEPENDENCIES) $(EXTRA_lib568_DEPENDENCIES) 
        @rm -f lib568$(EXEEXT)
-       $(LINK) $(lib568_LDFLAGS) $(lib568_OBJECTS) $(lib568_LDADD) $(LIBS)
-lib569$(EXEEXT): $(lib569_OBJECTS) $(lib569_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib568_OBJECTS) $(lib568_LDADD) $(LIBS)
+
+lib569$(EXEEXT): $(lib569_OBJECTS) $(lib569_DEPENDENCIES) $(EXTRA_lib569_DEPENDENCIES) 
        @rm -f lib569$(EXEEXT)
-       $(LINK) $(lib569_LDFLAGS) $(lib569_OBJECTS) $(lib569_LDADD) $(LIBS)
-lib570$(EXEEXT): $(lib570_OBJECTS) $(lib570_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib569_OBJECTS) $(lib569_LDADD) $(LIBS)
+
+lib570$(EXEEXT): $(lib570_OBJECTS) $(lib570_DEPENDENCIES) $(EXTRA_lib570_DEPENDENCIES) 
        @rm -f lib570$(EXEEXT)
-       $(LINK) $(lib570_LDFLAGS) $(lib570_OBJECTS) $(lib570_LDADD) $(LIBS)
-lib571$(EXEEXT): $(lib571_OBJECTS) $(lib571_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib570_OBJECTS) $(lib570_LDADD) $(LIBS)
+
+lib571$(EXEEXT): $(lib571_OBJECTS) $(lib571_DEPENDENCIES) $(EXTRA_lib571_DEPENDENCIES) 
        @rm -f lib571$(EXEEXT)
-       $(LINK) $(lib571_LDFLAGS) $(lib571_OBJECTS) $(lib571_LDADD) $(LIBS)
-lib572$(EXEEXT): $(lib572_OBJECTS) $(lib572_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib571_OBJECTS) $(lib571_LDADD) $(LIBS)
+
+lib572$(EXEEXT): $(lib572_OBJECTS) $(lib572_DEPENDENCIES) $(EXTRA_lib572_DEPENDENCIES) 
        @rm -f lib572$(EXEEXT)
-       $(LINK) $(lib572_LDFLAGS) $(lib572_OBJECTS) $(lib572_LDADD) $(LIBS)
-lib573$(EXEEXT): $(lib573_OBJECTS) $(lib573_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib572_OBJECTS) $(lib572_LDADD) $(LIBS)
+
+lib573$(EXEEXT): $(lib573_OBJECTS) $(lib573_DEPENDENCIES) $(EXTRA_lib573_DEPENDENCIES) 
        @rm -f lib573$(EXEEXT)
-       $(LINK) $(lib573_LDFLAGS) $(lib573_OBJECTS) $(lib573_LDADD) $(LIBS)
-lib574$(EXEEXT): $(lib574_OBJECTS) $(lib574_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib573_OBJECTS) $(lib573_LDADD) $(LIBS)
+
+lib574$(EXEEXT): $(lib574_OBJECTS) $(lib574_DEPENDENCIES) $(EXTRA_lib574_DEPENDENCIES) 
        @rm -f lib574$(EXEEXT)
-       $(LINK) $(lib574_LDFLAGS) $(lib574_OBJECTS) $(lib574_LDADD) $(LIBS)
-lib575$(EXEEXT): $(lib575_OBJECTS) $(lib575_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib574_OBJECTS) $(lib574_LDADD) $(LIBS)
+
+lib575$(EXEEXT): $(lib575_OBJECTS) $(lib575_DEPENDENCIES) $(EXTRA_lib575_DEPENDENCIES) 
        @rm -f lib575$(EXEEXT)
-       $(LINK) $(lib575_LDFLAGS) $(lib575_OBJECTS) $(lib575_LDADD) $(LIBS)
-lib576$(EXEEXT): $(lib576_OBJECTS) $(lib576_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib575_OBJECTS) $(lib575_LDADD) $(LIBS)
+
+lib576$(EXEEXT): $(lib576_OBJECTS) $(lib576_DEPENDENCIES) $(EXTRA_lib576_DEPENDENCIES) 
        @rm -f lib576$(EXEEXT)
-       $(LINK) $(lib576_LDFLAGS) $(lib576_OBJECTS) $(lib576_LDADD) $(LIBS)
-lib577$(EXEEXT): $(lib577_OBJECTS) $(lib577_DEPENDENCIES) 
-       @rm -f lib577$(EXEEXT)
-       $(LINK) $(lib577_LDFLAGS) $(lib577_OBJECTS) $(lib577_LDADD) $(LIBS)
-lib578$(EXEEXT): $(lib578_OBJECTS) $(lib578_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib576_OBJECTS) $(lib576_LDADD) $(LIBS)
+
+lib578$(EXEEXT): $(lib578_OBJECTS) $(lib578_DEPENDENCIES) $(EXTRA_lib578_DEPENDENCIES) 
        @rm -f lib578$(EXEEXT)
-       $(LINK) $(lib578_LDFLAGS) $(lib578_OBJECTS) $(lib578_LDADD) $(LIBS)
-lib579$(EXEEXT): $(lib579_OBJECTS) $(lib579_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(lib578_OBJECTS) $(lib578_LDADD) $(LIBS)
+
+lib579$(EXEEXT): $(lib579_OBJECTS) $(lib579_DEPENDENCIES) $(EXTRA_lib579_DEPENDENCIES) 
        @rm -f lib579$(EXEEXT)
-       $(LINK) $(lib579_LDFLAGS) $(lib579_OBJECTS) $(lib579_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(lib579_OBJECTS) $(lib579_LDADD) $(LIBS)
+
+lib582$(EXEEXT): $(lib582_OBJECTS) $(lib582_DEPENDENCIES) $(EXTRA_lib582_DEPENDENCIES) 
+       @rm -f lib582$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib582_OBJECTS) $(lib582_LDADD) $(LIBS)
+
+lib583$(EXEEXT): $(lib583_OBJECTS) $(lib583_DEPENDENCIES) $(EXTRA_lib583_DEPENDENCIES) 
+       @rm -f lib583$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib583_OBJECTS) $(lib583_LDADD) $(LIBS)
+
+lib585$(EXEEXT): $(lib585_OBJECTS) $(lib585_DEPENDENCIES) $(EXTRA_lib585_DEPENDENCIES) 
+       @rm -f lib585$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib585_OBJECTS) $(lib585_LDADD) $(LIBS)
+
+lib586$(EXEEXT): $(lib586_OBJECTS) $(lib586_DEPENDENCIES) $(EXTRA_lib586_DEPENDENCIES) 
+       @rm -f lib586$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib586_OBJECTS) $(lib586_LDADD) $(LIBS)
+
+lib587$(EXEEXT): $(lib587_OBJECTS) $(lib587_DEPENDENCIES) $(EXTRA_lib587_DEPENDENCIES) 
+       @rm -f lib587$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib587_OBJECTS) $(lib587_LDADD) $(LIBS)
+
+lib590$(EXEEXT): $(lib590_OBJECTS) $(lib590_DEPENDENCIES) $(EXTRA_lib590_DEPENDENCIES) 
+       @rm -f lib590$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib590_OBJECTS) $(lib590_LDADD) $(LIBS)
+
+lib591$(EXEEXT): $(lib591_OBJECTS) $(lib591_DEPENDENCIES) $(EXTRA_lib591_DEPENDENCIES) 
+       @rm -f lib591$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib591_OBJECTS) $(lib591_LDADD) $(LIBS)
+
+lib597$(EXEEXT): $(lib597_OBJECTS) $(lib597_DEPENDENCIES) $(EXTRA_lib597_DEPENDENCIES) 
+       @rm -f lib597$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib597_OBJECTS) $(lib597_LDADD) $(LIBS)
+
+lib598$(EXEEXT): $(lib598_OBJECTS) $(lib598_DEPENDENCIES) $(EXTRA_lib598_DEPENDENCIES) 
+       @rm -f lib598$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib598_OBJECTS) $(lib598_LDADD) $(LIBS)
+
+lib599$(EXEEXT): $(lib599_OBJECTS) $(lib599_DEPENDENCIES) $(EXTRA_lib599_DEPENDENCIES) 
+       @rm -f lib599$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(lib599_OBJECTS) $(lib599_LDADD) $(LIBS)
+
+libauthretry$(EXEEXT): $(libauthretry_OBJECTS) $(libauthretry_DEPENDENCIES) $(EXTRA_libauthretry_DEPENDENCIES) 
+       @rm -f libauthretry$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(libauthretry_OBJECTS) $(libauthretry_LDADD) $(LIBS)
+
+libntlmconnect$(EXEEXT): $(libntlmconnect_OBJECTS) $(libntlmconnect_DEPENDENCIES) $(EXTRA_libntlmconnect_DEPENDENCIES) 
+       @rm -f libntlmconnect$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(libntlmconnect_OBJECTS) $(libntlmconnect_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -1053,640 +1802,4291 @@ distclean-compile:
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkhostname-chkhostname.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkhostname-curl_gethostname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib505.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib506.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib508.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib510.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib511.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib512.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib513.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib514.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib515.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib516.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib517.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib518.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib519.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib520.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib521.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib523.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib524.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1500-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1500-lib1500.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1500-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1501-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1501-lib1501.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1501-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1501-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1502-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1502-lib1502.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1502-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1502-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1503-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1503-lib1502.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1503-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1503-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1504-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1504-lib1502.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1504-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1504-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1505-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1505-lib1502.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1505-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1505-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-lib1506.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1506-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-lib1507.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1507-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-lib1508.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1508-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1509-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1509-lib1509.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1509-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1509-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1510-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1510-lib1510.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1510-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1510-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1511-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1511-lib1511.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1511-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1511-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1512-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1512-lib1512.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1512-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1512-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-lib1900.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib2033-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib2033-libntlmconnect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib2033-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib2033-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-lib500.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-testtrace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501-lib501.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502-lib502.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503-lib503.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504-lib504.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib505-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib505-lib505.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib506-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib506-lib506.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507-lib507.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib508-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib508-lib508.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib509-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib509-lib509.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib510-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib510-lib510.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib511-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib511-lib511.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib512-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib512-lib512.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib513-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib513-lib513.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib514-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib514-lib514.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib515-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib515-lib515.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib516-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib516-lib516.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib517-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib517-lib517.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib518-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib518-lib518.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib518-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib519-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib519-lib519.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib520-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib520-lib520.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib521-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib521-lib521.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib523-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib523-lib523.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib524-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib524-lib524.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525-lib525.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib525-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-lib526.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib526-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-lib526.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib527-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-lib525.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib529-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-lib530.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib530-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-lib526.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-testutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib537.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib539.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib541.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib542.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib543.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib544.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib532-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533-lib533.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib533-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536-lib536.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib536-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib537-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib537-lib537.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib537-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib539-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib539-lib539.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540-lib540.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib540-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib541-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib541-lib541.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib542-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib542-lib542.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib543-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib543-lib543.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib544-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib544-lib544.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib545-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib545-lib544.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib547.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib547-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib547-lib547.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib548-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib548-lib547.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib549.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib552.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib553.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib554.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib556.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib557.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib549-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib549-lib549.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib552-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib552-lib552.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib552-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib553-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib553-lib553.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib554-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib554-lib554.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555-lib555.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib555-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib556-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib556-lib556.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib557-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib557-lib557.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-lib558.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-first.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-lib558.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib562.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-lib560.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib562-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib562-lib562.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564-lib564.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib564-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib565-first.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib565-lib510.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib566.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib567.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib568.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib569.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib570.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib571.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib572.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib574.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib576.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib577.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib578.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib579.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib566-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib566-lib566.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib567-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib567-lib567.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib568-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib568-lib568.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib569-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib569-lib569.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib570-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib570-lib570.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib571-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib571-lib571.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib571-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib572-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib572-lib572.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573-lib573.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573-testtrace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib573-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib574-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib574-lib574.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575-lib575.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib575-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib576-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib576-lib576.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib578-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib578-lib578.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib579-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib579-lib579.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib582-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib582-lib582.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib582-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib582-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib583-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib583-lib583.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib585-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib585-lib500.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib585-testtrace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib585-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib586-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib586-lib586.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib587-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib587-lib554.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib590-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib590-lib590.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib591-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib591-lib591.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib591-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib591-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib597-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib597-lib597.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib597-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib597-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib598-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib598-lib598.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib599-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib599-lib599.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libauthretry-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libauthretry-libauthretry.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhostname_la-sethostname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntlmconnect-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntlmconnect-libntlmconnect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntlmconnect-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntlmconnect-warnless.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libhostname_la-sethostname.lo: sethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhostname_la_CPPFLAGS) $(CPPFLAGS) $(libhostname_la_CFLAGS) $(CFLAGS) -MT libhostname_la-sethostname.lo -MD -MP -MF $(DEPDIR)/libhostname_la-sethostname.Tpo -c -o libhostname_la-sethostname.lo `test -f 'sethostname.c' || echo '$(srcdir)/'`sethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libhostname_la-sethostname.Tpo $(DEPDIR)/libhostname_la-sethostname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sethostname.c' object='libhostname_la-sethostname.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhostname_la_CPPFLAGS) $(CPPFLAGS) $(libhostname_la_CFLAGS) $(CFLAGS) -c -o libhostname_la-sethostname.lo `test -f 'sethostname.c' || echo '$(srcdir)/'`sethostname.c
 
 chkhostname-chkhostname.o: chkhostname.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.o -MD -MP -MF "$(DEPDIR)/chkhostname-chkhostname.Tpo" -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/chkhostname-chkhostname.Tpo" "$(DEPDIR)/chkhostname-chkhostname.Po"; else rm -f "$(DEPDIR)/chkhostname-chkhostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='chkhostname.c' object='chkhostname-chkhostname.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.o -MD -MP -MF $(DEPDIR)/chkhostname-chkhostname.Tpo -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/chkhostname-chkhostname.Tpo $(DEPDIR)/chkhostname-chkhostname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='chkhostname.c' object='chkhostname-chkhostname.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.o `test -f 'chkhostname.c' || echo '$(srcdir)/'`chkhostname.c
 
 chkhostname-chkhostname.obj: chkhostname.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.obj -MD -MP -MF "$(DEPDIR)/chkhostname-chkhostname.Tpo" -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/chkhostname-chkhostname.Tpo" "$(DEPDIR)/chkhostname-chkhostname.Po"; else rm -f "$(DEPDIR)/chkhostname-chkhostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='chkhostname.c' object='chkhostname-chkhostname.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chkhostname-chkhostname.obj -MD -MP -MF $(DEPDIR)/chkhostname-chkhostname.Tpo -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/chkhostname-chkhostname.Tpo $(DEPDIR)/chkhostname-chkhostname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='chkhostname.c' object='chkhostname-chkhostname.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chkhostname-chkhostname.obj `if test -f 'chkhostname.c'; then $(CYGPATH_W) 'chkhostname.c'; else $(CYGPATH_W) '$(srcdir)/chkhostname.c'; fi`
 
-chkhostname-curl_gethostname.o: $(top_srcdir)/lib/curl_gethostname.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.o -MD -MP -MF "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" -c -o chkhostname-curl_gethostname.o `test -f '$(top_srcdir)/lib/curl_gethostname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/curl_gethostname.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" "$(DEPDIR)/chkhostname-curl_gethostname.Po"; else rm -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/curl_gethostname.c' object='chkhostname-curl_gethostname.o' libtool=no @AMDEPBACKSLASH@
+chkhostname-curl_gethostname.o: ../../lib/curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.o -MD -MP -MF $(DEPDIR)/chkhostname-curl_gethostname.Tpo -c -o chkhostname-curl_gethostname.o `test -f '../../lib/curl_gethostname.c' || echo '$(srcdir)/'`../../lib/curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/chkhostname-curl_gethostname.Tpo $(DEPDIR)/chkhostname-curl_gethostname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/curl_gethostname.c' object='chkhostname-curl_gethostname.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.o `test -f '$(top_srcdir)/lib/curl_gethostname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/curl_gethostname.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.o `test -f '../../lib/curl_gethostname.c' || echo '$(srcdir)/'`../../lib/curl_gethostname.c
 
-chkhostname-curl_gethostname.obj: $(top_srcdir)/lib/curl_gethostname.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.obj -MD -MP -MF "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" -c -o chkhostname-curl_gethostname.obj `if test -f '$(top_srcdir)/lib/curl_gethostname.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/curl_gethostname.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo" "$(DEPDIR)/chkhostname-curl_gethostname.Po"; else rm -f "$(DEPDIR)/chkhostname-curl_gethostname.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/curl_gethostname.c' object='chkhostname-curl_gethostname.obj' libtool=no @AMDEPBACKSLASH@
+chkhostname-curl_gethostname.obj: ../../lib/curl_gethostname.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT chkhostname-curl_gethostname.obj -MD -MP -MF $(DEPDIR)/chkhostname-curl_gethostname.Tpo -c -o chkhostname-curl_gethostname.obj `if test -f '../../lib/curl_gethostname.c'; then $(CYGPATH_W) '../../lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/curl_gethostname.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/chkhostname-curl_gethostname.Tpo $(DEPDIR)/chkhostname-curl_gethostname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/curl_gethostname.c' object='chkhostname-curl_gethostname.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(chkhostname_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.obj `if test -f '$(top_srcdir)/lib/curl_gethostname.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/curl_gethostname.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chkhostname_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chkhostname-curl_gethostname.obj `if test -f '../../lib/curl_gethostname.c'; then $(CYGPATH_W) '../../lib/curl_gethostname.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/curl_gethostname.c'; fi`
 
-lib526-lib526.o: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-lib526.o -MD -MP -MF "$(DEPDIR)/lib526-lib526.Tpo" -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-lib526.Tpo" "$(DEPDIR)/lib526-lib526.Po"; else rm -f "$(DEPDIR)/lib526-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib526-lib526.o' libtool=no @AMDEPBACKSLASH@
+lib1500-lib1500.o: lib1500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-lib1500.o -MD -MP -MF $(DEPDIR)/lib1500-lib1500.Tpo -c -o lib1500-lib1500.o `test -f 'lib1500.c' || echo '$(srcdir)/'`lib1500.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-lib1500.Tpo $(DEPDIR)/lib1500-lib1500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1500.c' object='lib1500-lib1500.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-lib1500.o `test -f 'lib1500.c' || echo '$(srcdir)/'`lib1500.c
 
-lib526-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-lib526.obj -MD -MP -MF "$(DEPDIR)/lib526-lib526.Tpo" -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-lib526.Tpo" "$(DEPDIR)/lib526-lib526.Po"; else rm -f "$(DEPDIR)/lib526-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib526-lib526.obj' libtool=no @AMDEPBACKSLASH@
+lib1500-lib1500.obj: lib1500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-lib1500.obj -MD -MP -MF $(DEPDIR)/lib1500-lib1500.Tpo -c -o lib1500-lib1500.obj `if test -f 'lib1500.c'; then $(CYGPATH_W) 'lib1500.c'; else $(CYGPATH_W) '$(srcdir)/lib1500.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-lib1500.Tpo $(DEPDIR)/lib1500-lib1500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1500.c' object='lib1500-lib1500.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-lib1500.obj `if test -f 'lib1500.c'; then $(CYGPATH_W) 'lib1500.c'; else $(CYGPATH_W) '$(srcdir)/lib1500.c'; fi`
 
-lib526-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-first.o -MD -MP -MF "$(DEPDIR)/lib526-first.Tpo" -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-first.Tpo" "$(DEPDIR)/lib526-first.Po"; else rm -f "$(DEPDIR)/lib526-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib526-first.o' libtool=no @AMDEPBACKSLASH@
+lib1500-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-first.o -MD -MP -MF $(DEPDIR)/lib1500-first.Tpo -c -o lib1500-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-first.Tpo $(DEPDIR)/lib1500-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1500-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib526-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-first.obj -MD -MP -MF "$(DEPDIR)/lib526-first.Tpo" -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-first.Tpo" "$(DEPDIR)/lib526-first.Po"; else rm -f "$(DEPDIR)/lib526-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib526-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1500-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-first.obj -MD -MP -MF $(DEPDIR)/lib1500-first.Tpo -c -o lib1500-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-first.Tpo $(DEPDIR)/lib1500-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1500-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib526-testutil.o: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-testutil.o -MD -MP -MF "$(DEPDIR)/lib526-testutil.Tpo" -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-testutil.Tpo" "$(DEPDIR)/lib526-testutil.Po"; else rm -f "$(DEPDIR)/lib526-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib526-testutil.o' libtool=no @AMDEPBACKSLASH@
+lib1500-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-testutil.o -MD -MP -MF $(DEPDIR)/lib1500-testutil.Tpo -c -o lib1500-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-testutil.Tpo $(DEPDIR)/lib1500-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1500-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib526-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -MT lib526-testutil.obj -MD -MP -MF "$(DEPDIR)/lib526-testutil.Tpo" -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib526-testutil.Tpo" "$(DEPDIR)/lib526-testutil.Po"; else rm -f "$(DEPDIR)/lib526-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib526-testutil.obj' libtool=no @AMDEPBACKSLASH@
+lib1500-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1500-testutil.obj -MD -MP -MF $(DEPDIR)/lib1500-testutil.Tpo -c -o lib1500-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1500-testutil.Tpo $(DEPDIR)/lib1500-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1500-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib526_CFLAGS) $(CFLAGS) -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1500-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib527-lib526.o: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-lib526.o -MD -MP -MF "$(DEPDIR)/lib527-lib526.Tpo" -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-lib526.Tpo" "$(DEPDIR)/lib527-lib526.Po"; else rm -f "$(DEPDIR)/lib527-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib527-lib526.o' libtool=no @AMDEPBACKSLASH@
+lib1501-lib1501.o: lib1501.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-lib1501.o -MD -MP -MF $(DEPDIR)/lib1501-lib1501.Tpo -c -o lib1501-lib1501.o `test -f 'lib1501.c' || echo '$(srcdir)/'`lib1501.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-lib1501.Tpo $(DEPDIR)/lib1501-lib1501.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1501.c' object='lib1501-lib1501.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-lib1501.o `test -f 'lib1501.c' || echo '$(srcdir)/'`lib1501.c
 
-lib527-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-lib526.obj -MD -MP -MF "$(DEPDIR)/lib527-lib526.Tpo" -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-lib526.Tpo" "$(DEPDIR)/lib527-lib526.Po"; else rm -f "$(DEPDIR)/lib527-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib527-lib526.obj' libtool=no @AMDEPBACKSLASH@
+lib1501-lib1501.obj: lib1501.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-lib1501.obj -MD -MP -MF $(DEPDIR)/lib1501-lib1501.Tpo -c -o lib1501-lib1501.obj `if test -f 'lib1501.c'; then $(CYGPATH_W) 'lib1501.c'; else $(CYGPATH_W) '$(srcdir)/lib1501.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-lib1501.Tpo $(DEPDIR)/lib1501-lib1501.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1501.c' object='lib1501-lib1501.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-lib1501.obj `if test -f 'lib1501.c'; then $(CYGPATH_W) 'lib1501.c'; else $(CYGPATH_W) '$(srcdir)/lib1501.c'; fi`
 
-lib527-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-first.o -MD -MP -MF "$(DEPDIR)/lib527-first.Tpo" -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-first.Tpo" "$(DEPDIR)/lib527-first.Po"; else rm -f "$(DEPDIR)/lib527-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib527-first.o' libtool=no @AMDEPBACKSLASH@
+lib1501-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-first.o -MD -MP -MF $(DEPDIR)/lib1501-first.Tpo -c -o lib1501-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-first.Tpo $(DEPDIR)/lib1501-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1501-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib527-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-first.obj -MD -MP -MF "$(DEPDIR)/lib527-first.Tpo" -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-first.Tpo" "$(DEPDIR)/lib527-first.Po"; else rm -f "$(DEPDIR)/lib527-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib527-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1501-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-first.obj -MD -MP -MF $(DEPDIR)/lib1501-first.Tpo -c -o lib1501-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-first.Tpo $(DEPDIR)/lib1501-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1501-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib527-testutil.o: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-testutil.o -MD -MP -MF "$(DEPDIR)/lib527-testutil.Tpo" -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-testutil.Tpo" "$(DEPDIR)/lib527-testutil.Po"; else rm -f "$(DEPDIR)/lib527-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib527-testutil.o' libtool=no @AMDEPBACKSLASH@
+lib1501-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-testutil.o -MD -MP -MF $(DEPDIR)/lib1501-testutil.Tpo -c -o lib1501-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-testutil.Tpo $(DEPDIR)/lib1501-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1501-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib527-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -MT lib527-testutil.obj -MD -MP -MF "$(DEPDIR)/lib527-testutil.Tpo" -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib527-testutil.Tpo" "$(DEPDIR)/lib527-testutil.Po"; else rm -f "$(DEPDIR)/lib527-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib527-testutil.obj' libtool=no @AMDEPBACKSLASH@
+lib1501-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-testutil.obj -MD -MP -MF $(DEPDIR)/lib1501-testutil.Tpo -c -o lib1501-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-testutil.Tpo $(DEPDIR)/lib1501-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1501-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib527_CFLAGS) $(CFLAGS) -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib529-lib525.o: lib525.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-lib525.o -MD -MP -MF "$(DEPDIR)/lib529-lib525.Tpo" -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-lib525.Tpo" "$(DEPDIR)/lib529-lib525.Po"; else rm -f "$(DEPDIR)/lib529-lib525.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib525.c' object='lib529-lib525.o' libtool=no @AMDEPBACKSLASH@
+lib1501-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-warnless.o -MD -MP -MF $(DEPDIR)/lib1501-warnless.Tpo -c -o lib1501-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-warnless.Tpo $(DEPDIR)/lib1501-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1501-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-lib529-lib525.obj: lib525.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-lib525.obj -MD -MP -MF "$(DEPDIR)/lib529-lib525.Tpo" -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-lib525.Tpo" "$(DEPDIR)/lib529-lib525.Po"; else rm -f "$(DEPDIR)/lib529-lib525.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib525.c' object='lib529-lib525.obj' libtool=no @AMDEPBACKSLASH@
+lib1501-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1501-warnless.obj -MD -MP -MF $(DEPDIR)/lib1501-warnless.Tpo -c -o lib1501-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1501-warnless.Tpo $(DEPDIR)/lib1501-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1501-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1501-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-lib529-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-first.o -MD -MP -MF "$(DEPDIR)/lib529-first.Tpo" -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-first.Tpo" "$(DEPDIR)/lib529-first.Po"; else rm -f "$(DEPDIR)/lib529-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib529-first.o' libtool=no @AMDEPBACKSLASH@
+lib1502-lib1502.o: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-lib1502.o -MD -MP -MF $(DEPDIR)/lib1502-lib1502.Tpo -c -o lib1502-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-lib1502.Tpo $(DEPDIR)/lib1502-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1502-lib1502.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
 
-lib529-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-first.obj -MD -MP -MF "$(DEPDIR)/lib529-first.Tpo" -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-first.Tpo" "$(DEPDIR)/lib529-first.Po"; else rm -f "$(DEPDIR)/lib529-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib529-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1502-lib1502.obj: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-lib1502.obj -MD -MP -MF $(DEPDIR)/lib1502-lib1502.Tpo -c -o lib1502-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-lib1502.Tpo $(DEPDIR)/lib1502-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1502-lib1502.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
 
-lib529-testutil.o: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-testutil.o -MD -MP -MF "$(DEPDIR)/lib529-testutil.Tpo" -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-testutil.Tpo" "$(DEPDIR)/lib529-testutil.Po"; else rm -f "$(DEPDIR)/lib529-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib529-testutil.o' libtool=no @AMDEPBACKSLASH@
+lib1502-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-first.o -MD -MP -MF $(DEPDIR)/lib1502-first.Tpo -c -o lib1502-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-first.Tpo $(DEPDIR)/lib1502-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1502-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib529-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -MT lib529-testutil.obj -MD -MP -MF "$(DEPDIR)/lib529-testutil.Tpo" -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib529-testutil.Tpo" "$(DEPDIR)/lib529-testutil.Po"; else rm -f "$(DEPDIR)/lib529-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib529-testutil.obj' libtool=no @AMDEPBACKSLASH@
+lib1502-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-first.obj -MD -MP -MF $(DEPDIR)/lib1502-first.Tpo -c -o lib1502-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-first.Tpo $(DEPDIR)/lib1502-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1502-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib529_CFLAGS) $(CFLAGS) -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib530-lib530.o: lib530.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-lib530.o -MD -MP -MF "$(DEPDIR)/lib530-lib530.Tpo" -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-lib530.Tpo" "$(DEPDIR)/lib530-lib530.Po"; else rm -f "$(DEPDIR)/lib530-lib530.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib530.c' object='lib530-lib530.o' libtool=no @AMDEPBACKSLASH@
+lib1502-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-testutil.o -MD -MP -MF $(DEPDIR)/lib1502-testutil.Tpo -c -o lib1502-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-testutil.Tpo $(DEPDIR)/lib1502-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1502-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib530-lib530.obj: lib530.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-lib530.obj -MD -MP -MF "$(DEPDIR)/lib530-lib530.Tpo" -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-lib530.Tpo" "$(DEPDIR)/lib530-lib530.Po"; else rm -f "$(DEPDIR)/lib530-lib530.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib530.c' object='lib530-lib530.obj' libtool=no @AMDEPBACKSLASH@
+lib1502-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-testutil.obj -MD -MP -MF $(DEPDIR)/lib1502-testutil.Tpo -c -o lib1502-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-testutil.Tpo $(DEPDIR)/lib1502-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1502-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib530-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-first.o -MD -MP -MF "$(DEPDIR)/lib530-first.Tpo" -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-first.Tpo" "$(DEPDIR)/lib530-first.Po"; else rm -f "$(DEPDIR)/lib530-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib530-first.o' libtool=no @AMDEPBACKSLASH@
+lib1502-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-warnless.o -MD -MP -MF $(DEPDIR)/lib1502-warnless.Tpo -c -o lib1502-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-warnless.Tpo $(DEPDIR)/lib1502-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1502-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-lib530-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-first.obj -MD -MP -MF "$(DEPDIR)/lib530-first.Tpo" -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-first.Tpo" "$(DEPDIR)/lib530-first.Po"; else rm -f "$(DEPDIR)/lib530-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib530-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1502-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1502-warnless.obj -MD -MP -MF $(DEPDIR)/lib1502-warnless.Tpo -c -o lib1502-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1502-warnless.Tpo $(DEPDIR)/lib1502-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1502-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1502-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-lib530-testutil.o: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-testutil.o -MD -MP -MF "$(DEPDIR)/lib530-testutil.Tpo" -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-testutil.Tpo" "$(DEPDIR)/lib530-testutil.Po"; else rm -f "$(DEPDIR)/lib530-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib530-testutil.o' libtool=no @AMDEPBACKSLASH@
+lib1503-lib1502.o: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-lib1502.o -MD -MP -MF $(DEPDIR)/lib1503-lib1502.Tpo -c -o lib1503-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-lib1502.Tpo $(DEPDIR)/lib1503-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1503-lib1502.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
 
-lib530-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -MT lib530-testutil.obj -MD -MP -MF "$(DEPDIR)/lib530-testutil.Tpo" -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib530-testutil.Tpo" "$(DEPDIR)/lib530-testutil.Po"; else rm -f "$(DEPDIR)/lib530-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib530-testutil.obj' libtool=no @AMDEPBACKSLASH@
+lib1503-lib1502.obj: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-lib1502.obj -MD -MP -MF $(DEPDIR)/lib1503-lib1502.Tpo -c -o lib1503-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-lib1502.Tpo $(DEPDIR)/lib1503-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1503-lib1502.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib530_CFLAGS) $(CFLAGS) -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
 
-lib532-lib526.o: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-lib526.o -MD -MP -MF "$(DEPDIR)/lib532-lib526.Tpo" -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-lib526.Tpo" "$(DEPDIR)/lib532-lib526.Po"; else rm -f "$(DEPDIR)/lib532-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib532-lib526.o' libtool=no @AMDEPBACKSLASH@
+lib1503-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-first.o -MD -MP -MF $(DEPDIR)/lib1503-first.Tpo -c -o lib1503-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-first.Tpo $(DEPDIR)/lib1503-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1503-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib532-lib526.obj: lib526.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-lib526.obj -MD -MP -MF "$(DEPDIR)/lib532-lib526.Tpo" -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-lib526.Tpo" "$(DEPDIR)/lib532-lib526.Po"; else rm -f "$(DEPDIR)/lib532-lib526.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib526.c' object='lib532-lib526.obj' libtool=no @AMDEPBACKSLASH@
+lib1503-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-first.obj -MD -MP -MF $(DEPDIR)/lib1503-first.Tpo -c -o lib1503-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-first.Tpo $(DEPDIR)/lib1503-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1503-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib532-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-first.o -MD -MP -MF "$(DEPDIR)/lib532-first.Tpo" -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-first.Tpo" "$(DEPDIR)/lib532-first.Po"; else rm -f "$(DEPDIR)/lib532-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib532-first.o' libtool=no @AMDEPBACKSLASH@
+lib1503-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-testutil.o -MD -MP -MF $(DEPDIR)/lib1503-testutil.Tpo -c -o lib1503-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-testutil.Tpo $(DEPDIR)/lib1503-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1503-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib532-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-first.obj -MD -MP -MF "$(DEPDIR)/lib532-first.Tpo" -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-first.Tpo" "$(DEPDIR)/lib532-first.Po"; else rm -f "$(DEPDIR)/lib532-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib532-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1503-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-testutil.obj -MD -MP -MF $(DEPDIR)/lib1503-testutil.Tpo -c -o lib1503-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-testutil.Tpo $(DEPDIR)/lib1503-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1503-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib532-testutil.o: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-testutil.o -MD -MP -MF "$(DEPDIR)/lib532-testutil.Tpo" -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-testutil.Tpo" "$(DEPDIR)/lib532-testutil.Po"; else rm -f "$(DEPDIR)/lib532-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib532-testutil.o' libtool=no @AMDEPBACKSLASH@
+lib1503-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-warnless.o -MD -MP -MF $(DEPDIR)/lib1503-warnless.Tpo -c -o lib1503-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-warnless.Tpo $(DEPDIR)/lib1503-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1503-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-lib532-testutil.obj: testutil.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -MT lib532-testutil.obj -MD -MP -MF "$(DEPDIR)/lib532-testutil.Tpo" -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib532-testutil.Tpo" "$(DEPDIR)/lib532-testutil.Po"; else rm -f "$(DEPDIR)/lib532-testutil.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testutil.c' object='lib532-testutil.obj' libtool=no @AMDEPBACKSLASH@
+lib1503-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1503-warnless.obj -MD -MP -MF $(DEPDIR)/lib1503-warnless.Tpo -c -o lib1503-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1503-warnless.Tpo $(DEPDIR)/lib1503-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1503-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib532_CFLAGS) $(CFLAGS) -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1503-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-lib545-lib544.o: lib544.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-lib544.o -MD -MP -MF "$(DEPDIR)/lib545-lib544.Tpo" -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib545-lib544.Tpo" "$(DEPDIR)/lib545-lib544.Po"; else rm -f "$(DEPDIR)/lib545-lib544.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib544.c' object='lib545-lib544.o' libtool=no @AMDEPBACKSLASH@
+lib1504-lib1502.o: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-lib1502.o -MD -MP -MF $(DEPDIR)/lib1504-lib1502.Tpo -c -o lib1504-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-lib1502.Tpo $(DEPDIR)/lib1504-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1504-lib1502.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
 
-lib545-lib544.obj: lib544.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-lib544.obj -MD -MP -MF "$(DEPDIR)/lib545-lib544.Tpo" -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib545-lib544.Tpo" "$(DEPDIR)/lib545-lib544.Po"; else rm -f "$(DEPDIR)/lib545-lib544.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib544.c' object='lib545-lib544.obj' libtool=no @AMDEPBACKSLASH@
+lib1504-lib1502.obj: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-lib1502.obj -MD -MP -MF $(DEPDIR)/lib1504-lib1502.Tpo -c -o lib1504-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-lib1502.Tpo $(DEPDIR)/lib1504-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1504-lib1502.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
 
-lib545-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-first.o -MD -MP -MF "$(DEPDIR)/lib545-first.Tpo" -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib545-first.Tpo" "$(DEPDIR)/lib545-first.Po"; else rm -f "$(DEPDIR)/lib545-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib545-first.o' libtool=no @AMDEPBACKSLASH@
+lib1504-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-first.o -MD -MP -MF $(DEPDIR)/lib1504-first.Tpo -c -o lib1504-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-first.Tpo $(DEPDIR)/lib1504-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1504-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib545-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -MT lib545-first.obj -MD -MP -MF "$(DEPDIR)/lib545-first.Tpo" -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib545-first.Tpo" "$(DEPDIR)/lib545-first.Po"; else rm -f "$(DEPDIR)/lib545-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib545-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1504-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-first.obj -MD -MP -MF $(DEPDIR)/lib1504-first.Tpo -c -o lib1504-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-first.Tpo $(DEPDIR)/lib1504-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1504-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib545_CFLAGS) $(CFLAGS) -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib548-lib547.o: lib547.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-lib547.o -MD -MP -MF "$(DEPDIR)/lib548-lib547.Tpo" -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib548-lib547.Tpo" "$(DEPDIR)/lib548-lib547.Po"; else rm -f "$(DEPDIR)/lib548-lib547.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib547.c' object='lib548-lib547.o' libtool=no @AMDEPBACKSLASH@
+lib1504-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-testutil.o -MD -MP -MF $(DEPDIR)/lib1504-testutil.Tpo -c -o lib1504-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-testutil.Tpo $(DEPDIR)/lib1504-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1504-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib548-lib547.obj: lib547.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-lib547.obj -MD -MP -MF "$(DEPDIR)/lib548-lib547.Tpo" -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib548-lib547.Tpo" "$(DEPDIR)/lib548-lib547.Po"; else rm -f "$(DEPDIR)/lib548-lib547.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib547.c' object='lib548-lib547.obj' libtool=no @AMDEPBACKSLASH@
+lib1504-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-testutil.obj -MD -MP -MF $(DEPDIR)/lib1504-testutil.Tpo -c -o lib1504-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-testutil.Tpo $(DEPDIR)/lib1504-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1504-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib548-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-first.o -MD -MP -MF "$(DEPDIR)/lib548-first.Tpo" -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib548-first.Tpo" "$(DEPDIR)/lib548-first.Po"; else rm -f "$(DEPDIR)/lib548-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib548-first.o' libtool=no @AMDEPBACKSLASH@
+lib1504-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-warnless.o -MD -MP -MF $(DEPDIR)/lib1504-warnless.Tpo -c -o lib1504-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-warnless.Tpo $(DEPDIR)/lib1504-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1504-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-lib548-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -MT lib548-first.obj -MD -MP -MF "$(DEPDIR)/lib548-first.Tpo" -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib548-first.Tpo" "$(DEPDIR)/lib548-first.Po"; else rm -f "$(DEPDIR)/lib548-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib548-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1504-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1504-warnless.obj -MD -MP -MF $(DEPDIR)/lib1504-warnless.Tpo -c -o lib1504-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1504-warnless.Tpo $(DEPDIR)/lib1504-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1504-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib548_CFLAGS) $(CFLAGS) -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1504-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-lib558-lib558.o: lib558.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-lib558.o -MD -MP -MF "$(DEPDIR)/lib558-lib558.Tpo" -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib558-lib558.Tpo" "$(DEPDIR)/lib558-lib558.Po"; else rm -f "$(DEPDIR)/lib558-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib558.c' object='lib558-lib558.o' libtool=no @AMDEPBACKSLASH@
+lib1505-lib1502.o: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-lib1502.o -MD -MP -MF $(DEPDIR)/lib1505-lib1502.Tpo -c -o lib1505-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-lib1502.Tpo $(DEPDIR)/lib1505-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1505-lib1502.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-lib1502.o `test -f 'lib1502.c' || echo '$(srcdir)/'`lib1502.c
 
-lib558-lib558.obj: lib558.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-lib558.obj -MD -MP -MF "$(DEPDIR)/lib558-lib558.Tpo" -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib558-lib558.Tpo" "$(DEPDIR)/lib558-lib558.Po"; else rm -f "$(DEPDIR)/lib558-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib558.c' object='lib558-lib558.obj' libtool=no @AMDEPBACKSLASH@
+lib1505-lib1502.obj: lib1502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-lib1502.obj -MD -MP -MF $(DEPDIR)/lib1505-lib1502.Tpo -c -o lib1505-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-lib1502.Tpo $(DEPDIR)/lib1505-lib1502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1502.c' object='lib1505-lib1502.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-lib1502.obj `if test -f 'lib1502.c'; then $(CYGPATH_W) 'lib1502.c'; else $(CYGPATH_W) '$(srcdir)/lib1502.c'; fi`
 
-lib558-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-first.o -MD -MP -MF "$(DEPDIR)/lib558-first.Tpo" -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib558-first.Tpo" "$(DEPDIR)/lib558-first.Po"; else rm -f "$(DEPDIR)/lib558-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib558-first.o' libtool=no @AMDEPBACKSLASH@
+lib1505-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-first.o -MD -MP -MF $(DEPDIR)/lib1505-first.Tpo -c -o lib1505-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-first.Tpo $(DEPDIR)/lib1505-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1505-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib558-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -MT lib558-first.obj -MD -MP -MF "$(DEPDIR)/lib558-first.Tpo" -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib558-first.Tpo" "$(DEPDIR)/lib558-first.Po"; else rm -f "$(DEPDIR)/lib558-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib558-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1505-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-first.obj -MD -MP -MF $(DEPDIR)/lib1505-first.Tpo -c -o lib1505-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-first.Tpo $(DEPDIR)/lib1505-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1505-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib558_CFLAGS) $(CFLAGS) -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-lib559-lib558.o: lib558.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-lib558.o -MD -MP -MF "$(DEPDIR)/lib559-lib558.Tpo" -c -o lib559-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib559-lib558.Tpo" "$(DEPDIR)/lib559-lib558.Po"; else rm -f "$(DEPDIR)/lib559-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib558.c' object='lib559-lib558.o' libtool=no @AMDEPBACKSLASH@
+lib1505-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-testutil.o -MD -MP -MF $(DEPDIR)/lib1505-testutil.Tpo -c -o lib1505-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-testutil.Tpo $(DEPDIR)/lib1505-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1505-testutil.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-lib559-lib558.obj: lib558.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-lib558.obj -MD -MP -MF "$(DEPDIR)/lib559-lib558.Tpo" -c -o lib559-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib559-lib558.Tpo" "$(DEPDIR)/lib559-lib558.Po"; else rm -f "$(DEPDIR)/lib559-lib558.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib558.c' object='lib559-lib558.obj' libtool=no @AMDEPBACKSLASH@
+lib1505-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-testutil.obj -MD -MP -MF $(DEPDIR)/lib1505-testutil.Tpo -c -o lib1505-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-testutil.Tpo $(DEPDIR)/lib1505-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1505-testutil.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-lib559-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-first.o -MD -MP -MF "$(DEPDIR)/lib559-first.Tpo" -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib559-first.Tpo" "$(DEPDIR)/lib559-first.Po"; else rm -f "$(DEPDIR)/lib559-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib559-first.o' libtool=no @AMDEPBACKSLASH@
+lib1505-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-warnless.o -MD -MP -MF $(DEPDIR)/lib1505-warnless.Tpo -c -o lib1505-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-warnless.Tpo $(DEPDIR)/lib1505-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1505-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-lib559-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -MT lib559-first.obj -MD -MP -MF "$(DEPDIR)/lib559-first.Tpo" -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib559-first.Tpo" "$(DEPDIR)/lib559-first.Po"; else rm -f "$(DEPDIR)/lib559-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib559-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1505-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1505-warnless.obj -MD -MP -MF $(DEPDIR)/lib1505-warnless.Tpo -c -o lib1505-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1505-warnless.Tpo $(DEPDIR)/lib1505-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1505-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib559_CFLAGS) $(CFLAGS) -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1505-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-lib565-lib510.o: lib510.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-lib510.o -MD -MP -MF "$(DEPDIR)/lib565-lib510.Tpo" -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib565-lib510.Tpo" "$(DEPDIR)/lib565-lib510.Po"; else rm -f "$(DEPDIR)/lib565-lib510.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib510.c' object='lib565-lib510.o' libtool=no @AMDEPBACKSLASH@
+lib1506-lib1506.o: lib1506.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-lib1506.o -MD -MP -MF $(DEPDIR)/lib1506-lib1506.Tpo -c -o lib1506-lib1506.o `test -f 'lib1506.c' || echo '$(srcdir)/'`lib1506.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-lib1506.Tpo $(DEPDIR)/lib1506-lib1506.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1506.c' object='lib1506-lib1506.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-lib1506.o `test -f 'lib1506.c' || echo '$(srcdir)/'`lib1506.c
 
-lib565-lib510.obj: lib510.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-lib510.obj -MD -MP -MF "$(DEPDIR)/lib565-lib510.Tpo" -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib565-lib510.Tpo" "$(DEPDIR)/lib565-lib510.Po"; else rm -f "$(DEPDIR)/lib565-lib510.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib510.c' object='lib565-lib510.obj' libtool=no @AMDEPBACKSLASH@
+lib1506-lib1506.obj: lib1506.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-lib1506.obj -MD -MP -MF $(DEPDIR)/lib1506-lib1506.Tpo -c -o lib1506-lib1506.obj `if test -f 'lib1506.c'; then $(CYGPATH_W) 'lib1506.c'; else $(CYGPATH_W) '$(srcdir)/lib1506.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-lib1506.Tpo $(DEPDIR)/lib1506-lib1506.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1506.c' object='lib1506-lib1506.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-lib1506.obj `if test -f 'lib1506.c'; then $(CYGPATH_W) 'lib1506.c'; else $(CYGPATH_W) '$(srcdir)/lib1506.c'; fi`
 
-lib565-first.o: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-first.o -MD -MP -MF "$(DEPDIR)/lib565-first.Tpo" -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib565-first.Tpo" "$(DEPDIR)/lib565-first.Po"; else rm -f "$(DEPDIR)/lib565-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib565-first.o' libtool=no @AMDEPBACKSLASH@
+lib1506-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-first.o -MD -MP -MF $(DEPDIR)/lib1506-first.Tpo -c -o lib1506-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-first.Tpo $(DEPDIR)/lib1506-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1506-first.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-lib565-first.obj: first.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -MT lib565-first.obj -MD -MP -MF "$(DEPDIR)/lib565-first.Tpo" -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/lib565-first.Tpo" "$(DEPDIR)/lib565-first.Po"; else rm -f "$(DEPDIR)/lib565-first.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='first.c' object='lib565-first.obj' libtool=no @AMDEPBACKSLASH@
+lib1506-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-first.obj -MD -MP -MF $(DEPDIR)/lib1506-first.Tpo -c -o lib1506-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-first.Tpo $(DEPDIR)/lib1506-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1506-first.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib565_CFLAGS) $(CFLAGS) -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-mostlyclean-libtool:
-       -rm -f *.lo
+lib1506-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-testutil.o -MD -MP -MF $(DEPDIR)/lib1506-testutil.Tpo -c -o lib1506-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-testutil.Tpo $(DEPDIR)/lib1506-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1506-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-clean-libtool:
-       -rm -rf .libs _libs
+lib1506-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-testutil.obj -MD -MP -MF $(DEPDIR)/lib1506-testutil.Tpo -c -o lib1506-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-testutil.Tpo $(DEPDIR)/lib1506-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1506-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+lib1506-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-warnless.o -MD -MP -MF $(DEPDIR)/lib1506-warnless.Tpo -c -o lib1506-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-warnless.Tpo $(DEPDIR)/lib1506-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1506-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+lib1506-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1506-warnless.obj -MD -MP -MF $(DEPDIR)/lib1506-warnless.Tpo -c -o lib1506-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1506-warnless.Tpo $(DEPDIR)/lib1506-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1506-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1506-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+lib1507-lib1507.o: lib1507.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-lib1507.o -MD -MP -MF $(DEPDIR)/lib1507-lib1507.Tpo -c -o lib1507-lib1507.o `test -f 'lib1507.c' || echo '$(srcdir)/'`lib1507.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-lib1507.Tpo $(DEPDIR)/lib1507-lib1507.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1507.c' object='lib1507-lib1507.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-lib1507.o `test -f 'lib1507.c' || echo '$(srcdir)/'`lib1507.c
 
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+lib1507-lib1507.obj: lib1507.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-lib1507.obj -MD -MP -MF $(DEPDIR)/lib1507-lib1507.Tpo -c -o lib1507-lib1507.obj `if test -f 'lib1507.c'; then $(CYGPATH_W) 'lib1507.c'; else $(CYGPATH_W) '$(srcdir)/lib1507.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-lib1507.Tpo $(DEPDIR)/lib1507-lib1507.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1507.c' object='lib1507-lib1507.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-lib1507.obj `if test -f 'lib1507.c'; then $(CYGPATH_W) 'lib1507.c'; else $(CYGPATH_W) '$(srcdir)/lib1507.c'; fi`
 
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+lib1507-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-first.o -MD -MP -MF $(DEPDIR)/lib1507-first.Tpo -c -o lib1507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-first.Tpo $(DEPDIR)/lib1507-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1507-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
+lib1507-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-first.obj -MD -MP -MF $(DEPDIR)/lib1507-first.Tpo -c -o lib1507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-first.Tpo $(DEPDIR)/lib1507-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1507-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-clean-generic:
+lib1507-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-testutil.o -MD -MP -MF $(DEPDIR)/lib1507-testutil.Tpo -c -o lib1507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-testutil.Tpo $(DEPDIR)/lib1507-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1507-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+lib1507-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-testutil.obj -MD -MP -MF $(DEPDIR)/lib1507-testutil.Tpo -c -o lib1507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-testutil.Tpo $(DEPDIR)/lib1507-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1507-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+lib1507-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-warnless.o -MD -MP -MF $(DEPDIR)/lib1507-warnless.Tpo -c -o lib1507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-warnless.Tpo $(DEPDIR)/lib1507-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1507-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
-       clean-noinstPROGRAMS mostlyclean-am
+lib1507-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1507-warnless.obj -MD -MP -MF $(DEPDIR)/lib1507-warnless.Tpo -c -o lib1507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1507-warnless.Tpo $(DEPDIR)/lib1507-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1507-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-distclean: distclean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+lib1508-lib1508.o: lib1508.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-lib1508.o -MD -MP -MF $(DEPDIR)/lib1508-lib1508.Tpo -c -o lib1508-lib1508.o `test -f 'lib1508.c' || echo '$(srcdir)/'`lib1508.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-lib1508.Tpo $(DEPDIR)/lib1508-lib1508.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1508.c' object='lib1508-lib1508.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-lib1508.o `test -f 'lib1508.c' || echo '$(srcdir)/'`lib1508.c
 
-dvi: dvi-am
+lib1508-lib1508.obj: lib1508.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-lib1508.obj -MD -MP -MF $(DEPDIR)/lib1508-lib1508.Tpo -c -o lib1508-lib1508.obj `if test -f 'lib1508.c'; then $(CYGPATH_W) 'lib1508.c'; else $(CYGPATH_W) '$(srcdir)/lib1508.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-lib1508.Tpo $(DEPDIR)/lib1508-lib1508.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1508.c' object='lib1508-lib1508.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-lib1508.obj `if test -f 'lib1508.c'; then $(CYGPATH_W) 'lib1508.c'; else $(CYGPATH_W) '$(srcdir)/lib1508.c'; fi`
 
-dvi-am:
+lib1508-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-first.o -MD -MP -MF $(DEPDIR)/lib1508-first.Tpo -c -o lib1508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-first.Tpo $(DEPDIR)/lib1508-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1508-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-html: html-am
+lib1508-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-first.obj -MD -MP -MF $(DEPDIR)/lib1508-first.Tpo -c -o lib1508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-first.Tpo $(DEPDIR)/lib1508-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1508-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
 
-info: info-am
+lib1508-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-testutil.o -MD -MP -MF $(DEPDIR)/lib1508-testutil.Tpo -c -o lib1508-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-testutil.Tpo $(DEPDIR)/lib1508-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1508-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
 
-info-am:
+lib1508-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-testutil.obj -MD -MP -MF $(DEPDIR)/lib1508-testutil.Tpo -c -o lib1508-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-testutil.Tpo $(DEPDIR)/lib1508-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1508-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
 
-install-data-am:
+lib1508-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-warnless.o -MD -MP -MF $(DEPDIR)/lib1508-warnless.Tpo -c -o lib1508-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-warnless.Tpo $(DEPDIR)/lib1508-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1508-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-install-exec-am:
+lib1508-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1508-warnless.obj -MD -MP -MF $(DEPDIR)/lib1508-warnless.Tpo -c -o lib1508-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1508-warnless.Tpo $(DEPDIR)/lib1508-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1508-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1508-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
-install-info: install-info-am
+lib1509-lib1509.o: lib1509.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-lib1509.o -MD -MP -MF $(DEPDIR)/lib1509-lib1509.Tpo -c -o lib1509-lib1509.o `test -f 'lib1509.c' || echo '$(srcdir)/'`lib1509.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-lib1509.Tpo $(DEPDIR)/lib1509-lib1509.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1509.c' object='lib1509-lib1509.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-lib1509.o `test -f 'lib1509.c' || echo '$(srcdir)/'`lib1509.c
 
-install-man:
+lib1509-lib1509.obj: lib1509.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-lib1509.obj -MD -MP -MF $(DEPDIR)/lib1509-lib1509.Tpo -c -o lib1509-lib1509.obj `if test -f 'lib1509.c'; then $(CYGPATH_W) 'lib1509.c'; else $(CYGPATH_W) '$(srcdir)/lib1509.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-lib1509.Tpo $(DEPDIR)/lib1509-lib1509.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1509.c' object='lib1509-lib1509.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-lib1509.obj `if test -f 'lib1509.c'; then $(CYGPATH_W) 'lib1509.c'; else $(CYGPATH_W) '$(srcdir)/lib1509.c'; fi`
 
-installcheck-am:
+lib1509-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-first.o -MD -MP -MF $(DEPDIR)/lib1509-first.Tpo -c -o lib1509-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-first.Tpo $(DEPDIR)/lib1509-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1509-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
 
-maintainer-clean: maintainer-clean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
+lib1509-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-first.obj -MD -MP -MF $(DEPDIR)/lib1509-first.Tpo -c -o lib1509-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-first.Tpo $(DEPDIR)/lib1509-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1509-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1509-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-testutil.o -MD -MP -MF $(DEPDIR)/lib1509-testutil.Tpo -c -o lib1509-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-testutil.Tpo $(DEPDIR)/lib1509-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1509-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1509-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-testutil.obj -MD -MP -MF $(DEPDIR)/lib1509-testutil.Tpo -c -o lib1509-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-testutil.Tpo $(DEPDIR)/lib1509-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1509-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib1509-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-warnless.o -MD -MP -MF $(DEPDIR)/lib1509-warnless.Tpo -c -o lib1509-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-warnless.Tpo $(DEPDIR)/lib1509-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1509-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib1509-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1509-warnless.obj -MD -MP -MF $(DEPDIR)/lib1509-warnless.Tpo -c -o lib1509-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1509-warnless.Tpo $(DEPDIR)/lib1509-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1509-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1509-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1510-lib1510.o: lib1510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-lib1510.o -MD -MP -MF $(DEPDIR)/lib1510-lib1510.Tpo -c -o lib1510-lib1510.o `test -f 'lib1510.c' || echo '$(srcdir)/'`lib1510.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-lib1510.Tpo $(DEPDIR)/lib1510-lib1510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1510.c' object='lib1510-lib1510.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-lib1510.o `test -f 'lib1510.c' || echo '$(srcdir)/'`lib1510.c
+
+lib1510-lib1510.obj: lib1510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-lib1510.obj -MD -MP -MF $(DEPDIR)/lib1510-lib1510.Tpo -c -o lib1510-lib1510.obj `if test -f 'lib1510.c'; then $(CYGPATH_W) 'lib1510.c'; else $(CYGPATH_W) '$(srcdir)/lib1510.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-lib1510.Tpo $(DEPDIR)/lib1510-lib1510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1510.c' object='lib1510-lib1510.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-lib1510.obj `if test -f 'lib1510.c'; then $(CYGPATH_W) 'lib1510.c'; else $(CYGPATH_W) '$(srcdir)/lib1510.c'; fi`
+
+lib1510-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-first.o -MD -MP -MF $(DEPDIR)/lib1510-first.Tpo -c -o lib1510-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-first.Tpo $(DEPDIR)/lib1510-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1510-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1510-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-first.obj -MD -MP -MF $(DEPDIR)/lib1510-first.Tpo -c -o lib1510-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-first.Tpo $(DEPDIR)/lib1510-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1510-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1510-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-testutil.o -MD -MP -MF $(DEPDIR)/lib1510-testutil.Tpo -c -o lib1510-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-testutil.Tpo $(DEPDIR)/lib1510-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1510-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1510-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-testutil.obj -MD -MP -MF $(DEPDIR)/lib1510-testutil.Tpo -c -o lib1510-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-testutil.Tpo $(DEPDIR)/lib1510-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1510-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib1510-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-warnless.o -MD -MP -MF $(DEPDIR)/lib1510-warnless.Tpo -c -o lib1510-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-warnless.Tpo $(DEPDIR)/lib1510-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1510-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib1510-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1510-warnless.obj -MD -MP -MF $(DEPDIR)/lib1510-warnless.Tpo -c -o lib1510-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1510-warnless.Tpo $(DEPDIR)/lib1510-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1510-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1510-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1511-lib1511.o: lib1511.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-lib1511.o -MD -MP -MF $(DEPDIR)/lib1511-lib1511.Tpo -c -o lib1511-lib1511.o `test -f 'lib1511.c' || echo '$(srcdir)/'`lib1511.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-lib1511.Tpo $(DEPDIR)/lib1511-lib1511.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1511.c' object='lib1511-lib1511.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-lib1511.o `test -f 'lib1511.c' || echo '$(srcdir)/'`lib1511.c
+
+lib1511-lib1511.obj: lib1511.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-lib1511.obj -MD -MP -MF $(DEPDIR)/lib1511-lib1511.Tpo -c -o lib1511-lib1511.obj `if test -f 'lib1511.c'; then $(CYGPATH_W) 'lib1511.c'; else $(CYGPATH_W) '$(srcdir)/lib1511.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-lib1511.Tpo $(DEPDIR)/lib1511-lib1511.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1511.c' object='lib1511-lib1511.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-lib1511.obj `if test -f 'lib1511.c'; then $(CYGPATH_W) 'lib1511.c'; else $(CYGPATH_W) '$(srcdir)/lib1511.c'; fi`
+
+lib1511-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-first.o -MD -MP -MF $(DEPDIR)/lib1511-first.Tpo -c -o lib1511-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-first.Tpo $(DEPDIR)/lib1511-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1511-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1511-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-first.obj -MD -MP -MF $(DEPDIR)/lib1511-first.Tpo -c -o lib1511-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-first.Tpo $(DEPDIR)/lib1511-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1511-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1511-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-testutil.o -MD -MP -MF $(DEPDIR)/lib1511-testutil.Tpo -c -o lib1511-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-testutil.Tpo $(DEPDIR)/lib1511-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1511-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1511-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-testutil.obj -MD -MP -MF $(DEPDIR)/lib1511-testutil.Tpo -c -o lib1511-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-testutil.Tpo $(DEPDIR)/lib1511-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1511-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib1511-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-warnless.o -MD -MP -MF $(DEPDIR)/lib1511-warnless.Tpo -c -o lib1511-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-warnless.Tpo $(DEPDIR)/lib1511-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1511-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib1511-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1511-warnless.obj -MD -MP -MF $(DEPDIR)/lib1511-warnless.Tpo -c -o lib1511-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1511-warnless.Tpo $(DEPDIR)/lib1511-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1511-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1511-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1512-lib1512.o: lib1512.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-lib1512.o -MD -MP -MF $(DEPDIR)/lib1512-lib1512.Tpo -c -o lib1512-lib1512.o `test -f 'lib1512.c' || echo '$(srcdir)/'`lib1512.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-lib1512.Tpo $(DEPDIR)/lib1512-lib1512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1512.c' object='lib1512-lib1512.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-lib1512.o `test -f 'lib1512.c' || echo '$(srcdir)/'`lib1512.c
+
+lib1512-lib1512.obj: lib1512.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-lib1512.obj -MD -MP -MF $(DEPDIR)/lib1512-lib1512.Tpo -c -o lib1512-lib1512.obj `if test -f 'lib1512.c'; then $(CYGPATH_W) 'lib1512.c'; else $(CYGPATH_W) '$(srcdir)/lib1512.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-lib1512.Tpo $(DEPDIR)/lib1512-lib1512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1512.c' object='lib1512-lib1512.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-lib1512.obj `if test -f 'lib1512.c'; then $(CYGPATH_W) 'lib1512.c'; else $(CYGPATH_W) '$(srcdir)/lib1512.c'; fi`
+
+lib1512-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-first.o -MD -MP -MF $(DEPDIR)/lib1512-first.Tpo -c -o lib1512-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-first.Tpo $(DEPDIR)/lib1512-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1512-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1512-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-first.obj -MD -MP -MF $(DEPDIR)/lib1512-first.Tpo -c -o lib1512-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-first.Tpo $(DEPDIR)/lib1512-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1512-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1512-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-testutil.o -MD -MP -MF $(DEPDIR)/lib1512-testutil.Tpo -c -o lib1512-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-testutil.Tpo $(DEPDIR)/lib1512-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1512-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1512-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-testutil.obj -MD -MP -MF $(DEPDIR)/lib1512-testutil.Tpo -c -o lib1512-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-testutil.Tpo $(DEPDIR)/lib1512-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1512-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib1512-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-warnless.o -MD -MP -MF $(DEPDIR)/lib1512-warnless.Tpo -c -o lib1512-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-warnless.Tpo $(DEPDIR)/lib1512-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1512-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib1512-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1512-warnless.obj -MD -MP -MF $(DEPDIR)/lib1512-warnless.Tpo -c -o lib1512-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1512-warnless.Tpo $(DEPDIR)/lib1512-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1512-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1512-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1900-lib1900.o: lib1900.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-lib1900.o -MD -MP -MF $(DEPDIR)/lib1900-lib1900.Tpo -c -o lib1900-lib1900.o `test -f 'lib1900.c' || echo '$(srcdir)/'`lib1900.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-lib1900.Tpo $(DEPDIR)/lib1900-lib1900.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1900.c' object='lib1900-lib1900.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-lib1900.o `test -f 'lib1900.c' || echo '$(srcdir)/'`lib1900.c
+
+lib1900-lib1900.obj: lib1900.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-lib1900.obj -MD -MP -MF $(DEPDIR)/lib1900-lib1900.Tpo -c -o lib1900-lib1900.obj `if test -f 'lib1900.c'; then $(CYGPATH_W) 'lib1900.c'; else $(CYGPATH_W) '$(srcdir)/lib1900.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-lib1900.Tpo $(DEPDIR)/lib1900-lib1900.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib1900.c' object='lib1900-lib1900.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-lib1900.obj `if test -f 'lib1900.c'; then $(CYGPATH_W) 'lib1900.c'; else $(CYGPATH_W) '$(srcdir)/lib1900.c'; fi`
+
+lib1900-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-first.o -MD -MP -MF $(DEPDIR)/lib1900-first.Tpo -c -o lib1900-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-first.Tpo $(DEPDIR)/lib1900-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1900-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1900-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-first.obj -MD -MP -MF $(DEPDIR)/lib1900-first.Tpo -c -o lib1900-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-first.Tpo $(DEPDIR)/lib1900-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib1900-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1900-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-testutil.o -MD -MP -MF $(DEPDIR)/lib1900-testutil.Tpo -c -o lib1900-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-testutil.Tpo $(DEPDIR)/lib1900-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1900-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1900-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-testutil.obj -MD -MP -MF $(DEPDIR)/lib1900-testutil.Tpo -c -o lib1900-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-testutil.Tpo $(DEPDIR)/lib1900-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib1900-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib1900-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-warnless.o -MD -MP -MF $(DEPDIR)/lib1900-warnless.Tpo -c -o lib1900-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-warnless.Tpo $(DEPDIR)/lib1900-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1900-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib1900-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-warnless.obj -MD -MP -MF $(DEPDIR)/lib1900-warnless.Tpo -c -o lib1900-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-warnless.Tpo $(DEPDIR)/lib1900-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib1900-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1900-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib2033-libntlmconnect.o: libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-libntlmconnect.o -MD -MP -MF $(DEPDIR)/lib2033-libntlmconnect.Tpo -c -o lib2033-libntlmconnect.o `test -f 'libntlmconnect.c' || echo '$(srcdir)/'`libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-libntlmconnect.Tpo $(DEPDIR)/lib2033-libntlmconnect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libntlmconnect.c' object='lib2033-libntlmconnect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-libntlmconnect.o `test -f 'libntlmconnect.c' || echo '$(srcdir)/'`libntlmconnect.c
+
+lib2033-libntlmconnect.obj: libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-libntlmconnect.obj -MD -MP -MF $(DEPDIR)/lib2033-libntlmconnect.Tpo -c -o lib2033-libntlmconnect.obj `if test -f 'libntlmconnect.c'; then $(CYGPATH_W) 'libntlmconnect.c'; else $(CYGPATH_W) '$(srcdir)/libntlmconnect.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-libntlmconnect.Tpo $(DEPDIR)/lib2033-libntlmconnect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libntlmconnect.c' object='lib2033-libntlmconnect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-libntlmconnect.obj `if test -f 'libntlmconnect.c'; then $(CYGPATH_W) 'libntlmconnect.c'; else $(CYGPATH_W) '$(srcdir)/libntlmconnect.c'; fi`
+
+lib2033-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-first.o -MD -MP -MF $(DEPDIR)/lib2033-first.Tpo -c -o lib2033-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-first.Tpo $(DEPDIR)/lib2033-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib2033-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib2033-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-first.obj -MD -MP -MF $(DEPDIR)/lib2033-first.Tpo -c -o lib2033-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-first.Tpo $(DEPDIR)/lib2033-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib2033-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib2033-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-testutil.o -MD -MP -MF $(DEPDIR)/lib2033-testutil.Tpo -c -o lib2033-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-testutil.Tpo $(DEPDIR)/lib2033-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib2033-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib2033-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-testutil.obj -MD -MP -MF $(DEPDIR)/lib2033-testutil.Tpo -c -o lib2033-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-testutil.Tpo $(DEPDIR)/lib2033-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib2033-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib2033-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-warnless.o -MD -MP -MF $(DEPDIR)/lib2033-warnless.Tpo -c -o lib2033-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-warnless.Tpo $(DEPDIR)/lib2033-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib2033-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib2033-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib2033-warnless.obj -MD -MP -MF $(DEPDIR)/lib2033-warnless.Tpo -c -o lib2033-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib2033-warnless.Tpo $(DEPDIR)/lib2033-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib2033-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib2033_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib2033-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib500-lib500.o: lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-lib500.o -MD -MP -MF $(DEPDIR)/lib500-lib500.Tpo -c -o lib500-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-lib500.Tpo $(DEPDIR)/lib500-lib500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib500.c' object='lib500-lib500.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c
+
+lib500-lib500.obj: lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-lib500.obj -MD -MP -MF $(DEPDIR)/lib500-lib500.Tpo -c -o lib500-lib500.obj `if test -f 'lib500.c'; then $(CYGPATH_W) 'lib500.c'; else $(CYGPATH_W) '$(srcdir)/lib500.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-lib500.Tpo $(DEPDIR)/lib500-lib500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib500.c' object='lib500-lib500.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-lib500.obj `if test -f 'lib500.c'; then $(CYGPATH_W) 'lib500.c'; else $(CYGPATH_W) '$(srcdir)/lib500.c'; fi`
+
+lib500-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-first.o -MD -MP -MF $(DEPDIR)/lib500-first.Tpo -c -o lib500-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-first.Tpo $(DEPDIR)/lib500-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib500-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib500-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-first.obj -MD -MP -MF $(DEPDIR)/lib500-first.Tpo -c -o lib500-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-first.Tpo $(DEPDIR)/lib500-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib500-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib500-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-testutil.o -MD -MP -MF $(DEPDIR)/lib500-testutil.Tpo -c -o lib500-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-testutil.Tpo $(DEPDIR)/lib500-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib500-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib500-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-testutil.obj -MD -MP -MF $(DEPDIR)/lib500-testutil.Tpo -c -o lib500-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-testutil.Tpo $(DEPDIR)/lib500-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib500-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib500-testtrace.o: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-testtrace.o -MD -MP -MF $(DEPDIR)/lib500-testtrace.Tpo -c -o lib500-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-testtrace.Tpo $(DEPDIR)/lib500-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib500-testtrace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+
+lib500-testtrace.obj: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib500-testtrace.obj -MD -MP -MF $(DEPDIR)/lib500-testtrace.Tpo -c -o lib500-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib500-testtrace.Tpo $(DEPDIR)/lib500-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib500-testtrace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib500_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib500-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+
+lib501-lib501.o: lib501.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib501-lib501.o -MD -MP -MF $(DEPDIR)/lib501-lib501.Tpo -c -o lib501-lib501.o `test -f 'lib501.c' || echo '$(srcdir)/'`lib501.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib501-lib501.Tpo $(DEPDIR)/lib501-lib501.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib501.c' object='lib501-lib501.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib501-lib501.o `test -f 'lib501.c' || echo '$(srcdir)/'`lib501.c
+
+lib501-lib501.obj: lib501.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib501-lib501.obj -MD -MP -MF $(DEPDIR)/lib501-lib501.Tpo -c -o lib501-lib501.obj `if test -f 'lib501.c'; then $(CYGPATH_W) 'lib501.c'; else $(CYGPATH_W) '$(srcdir)/lib501.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib501-lib501.Tpo $(DEPDIR)/lib501-lib501.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib501.c' object='lib501-lib501.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib501-lib501.obj `if test -f 'lib501.c'; then $(CYGPATH_W) 'lib501.c'; else $(CYGPATH_W) '$(srcdir)/lib501.c'; fi`
+
+lib501-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib501-first.o -MD -MP -MF $(DEPDIR)/lib501-first.Tpo -c -o lib501-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib501-first.Tpo $(DEPDIR)/lib501-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib501-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib501-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib501-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib501-first.obj -MD -MP -MF $(DEPDIR)/lib501-first.Tpo -c -o lib501-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib501-first.Tpo $(DEPDIR)/lib501-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib501-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib501_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib501-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib502-lib502.o: lib502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-lib502.o -MD -MP -MF $(DEPDIR)/lib502-lib502.Tpo -c -o lib502-lib502.o `test -f 'lib502.c' || echo '$(srcdir)/'`lib502.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-lib502.Tpo $(DEPDIR)/lib502-lib502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib502.c' object='lib502-lib502.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-lib502.o `test -f 'lib502.c' || echo '$(srcdir)/'`lib502.c
+
+lib502-lib502.obj: lib502.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-lib502.obj -MD -MP -MF $(DEPDIR)/lib502-lib502.Tpo -c -o lib502-lib502.obj `if test -f 'lib502.c'; then $(CYGPATH_W) 'lib502.c'; else $(CYGPATH_W) '$(srcdir)/lib502.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-lib502.Tpo $(DEPDIR)/lib502-lib502.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib502.c' object='lib502-lib502.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-lib502.obj `if test -f 'lib502.c'; then $(CYGPATH_W) 'lib502.c'; else $(CYGPATH_W) '$(srcdir)/lib502.c'; fi`
+
+lib502-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-first.o -MD -MP -MF $(DEPDIR)/lib502-first.Tpo -c -o lib502-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-first.Tpo $(DEPDIR)/lib502-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib502-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib502-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-first.obj -MD -MP -MF $(DEPDIR)/lib502-first.Tpo -c -o lib502-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-first.Tpo $(DEPDIR)/lib502-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib502-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib502-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-testutil.o -MD -MP -MF $(DEPDIR)/lib502-testutil.Tpo -c -o lib502-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-testutil.Tpo $(DEPDIR)/lib502-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib502-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib502-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-testutil.obj -MD -MP -MF $(DEPDIR)/lib502-testutil.Tpo -c -o lib502-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-testutil.Tpo $(DEPDIR)/lib502-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib502-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib502-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-warnless.o -MD -MP -MF $(DEPDIR)/lib502-warnless.Tpo -c -o lib502-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-warnless.Tpo $(DEPDIR)/lib502-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib502-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib502-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib502-warnless.obj -MD -MP -MF $(DEPDIR)/lib502-warnless.Tpo -c -o lib502-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib502-warnless.Tpo $(DEPDIR)/lib502-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib502-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib502_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib502-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib503-lib503.o: lib503.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-lib503.o -MD -MP -MF $(DEPDIR)/lib503-lib503.Tpo -c -o lib503-lib503.o `test -f 'lib503.c' || echo '$(srcdir)/'`lib503.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-lib503.Tpo $(DEPDIR)/lib503-lib503.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib503.c' object='lib503-lib503.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-lib503.o `test -f 'lib503.c' || echo '$(srcdir)/'`lib503.c
+
+lib503-lib503.obj: lib503.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-lib503.obj -MD -MP -MF $(DEPDIR)/lib503-lib503.Tpo -c -o lib503-lib503.obj `if test -f 'lib503.c'; then $(CYGPATH_W) 'lib503.c'; else $(CYGPATH_W) '$(srcdir)/lib503.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-lib503.Tpo $(DEPDIR)/lib503-lib503.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib503.c' object='lib503-lib503.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-lib503.obj `if test -f 'lib503.c'; then $(CYGPATH_W) 'lib503.c'; else $(CYGPATH_W) '$(srcdir)/lib503.c'; fi`
+
+lib503-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-first.o -MD -MP -MF $(DEPDIR)/lib503-first.Tpo -c -o lib503-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-first.Tpo $(DEPDIR)/lib503-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib503-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib503-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-first.obj -MD -MP -MF $(DEPDIR)/lib503-first.Tpo -c -o lib503-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-first.Tpo $(DEPDIR)/lib503-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib503-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib503-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-testutil.o -MD -MP -MF $(DEPDIR)/lib503-testutil.Tpo -c -o lib503-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-testutil.Tpo $(DEPDIR)/lib503-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib503-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib503-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-testutil.obj -MD -MP -MF $(DEPDIR)/lib503-testutil.Tpo -c -o lib503-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-testutil.Tpo $(DEPDIR)/lib503-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib503-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib503-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-warnless.o -MD -MP -MF $(DEPDIR)/lib503-warnless.Tpo -c -o lib503-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-warnless.Tpo $(DEPDIR)/lib503-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib503-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib503-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib503-warnless.obj -MD -MP -MF $(DEPDIR)/lib503-warnless.Tpo -c -o lib503-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib503-warnless.Tpo $(DEPDIR)/lib503-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib503-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib503_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib503-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib504-lib504.o: lib504.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-lib504.o -MD -MP -MF $(DEPDIR)/lib504-lib504.Tpo -c -o lib504-lib504.o `test -f 'lib504.c' || echo '$(srcdir)/'`lib504.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-lib504.Tpo $(DEPDIR)/lib504-lib504.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib504.c' object='lib504-lib504.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-lib504.o `test -f 'lib504.c' || echo '$(srcdir)/'`lib504.c
+
+lib504-lib504.obj: lib504.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-lib504.obj -MD -MP -MF $(DEPDIR)/lib504-lib504.Tpo -c -o lib504-lib504.obj `if test -f 'lib504.c'; then $(CYGPATH_W) 'lib504.c'; else $(CYGPATH_W) '$(srcdir)/lib504.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-lib504.Tpo $(DEPDIR)/lib504-lib504.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib504.c' object='lib504-lib504.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-lib504.obj `if test -f 'lib504.c'; then $(CYGPATH_W) 'lib504.c'; else $(CYGPATH_W) '$(srcdir)/lib504.c'; fi`
+
+lib504-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-first.o -MD -MP -MF $(DEPDIR)/lib504-first.Tpo -c -o lib504-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-first.Tpo $(DEPDIR)/lib504-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib504-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib504-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-first.obj -MD -MP -MF $(DEPDIR)/lib504-first.Tpo -c -o lib504-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-first.Tpo $(DEPDIR)/lib504-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib504-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib504-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-testutil.o -MD -MP -MF $(DEPDIR)/lib504-testutil.Tpo -c -o lib504-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-testutil.Tpo $(DEPDIR)/lib504-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib504-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib504-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-testutil.obj -MD -MP -MF $(DEPDIR)/lib504-testutil.Tpo -c -o lib504-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-testutil.Tpo $(DEPDIR)/lib504-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib504-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib504-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-warnless.o -MD -MP -MF $(DEPDIR)/lib504-warnless.Tpo -c -o lib504-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-warnless.Tpo $(DEPDIR)/lib504-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib504-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib504-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib504-warnless.obj -MD -MP -MF $(DEPDIR)/lib504-warnless.Tpo -c -o lib504-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib504-warnless.Tpo $(DEPDIR)/lib504-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib504-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib504_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib504-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib505-lib505.o: lib505.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib505-lib505.o -MD -MP -MF $(DEPDIR)/lib505-lib505.Tpo -c -o lib505-lib505.o `test -f 'lib505.c' || echo '$(srcdir)/'`lib505.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib505-lib505.Tpo $(DEPDIR)/lib505-lib505.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib505.c' object='lib505-lib505.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib505-lib505.o `test -f 'lib505.c' || echo '$(srcdir)/'`lib505.c
+
+lib505-lib505.obj: lib505.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib505-lib505.obj -MD -MP -MF $(DEPDIR)/lib505-lib505.Tpo -c -o lib505-lib505.obj `if test -f 'lib505.c'; then $(CYGPATH_W) 'lib505.c'; else $(CYGPATH_W) '$(srcdir)/lib505.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib505-lib505.Tpo $(DEPDIR)/lib505-lib505.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib505.c' object='lib505-lib505.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib505-lib505.obj `if test -f 'lib505.c'; then $(CYGPATH_W) 'lib505.c'; else $(CYGPATH_W) '$(srcdir)/lib505.c'; fi`
+
+lib505-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib505-first.o -MD -MP -MF $(DEPDIR)/lib505-first.Tpo -c -o lib505-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib505-first.Tpo $(DEPDIR)/lib505-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib505-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib505-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib505-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib505-first.obj -MD -MP -MF $(DEPDIR)/lib505-first.Tpo -c -o lib505-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib505-first.Tpo $(DEPDIR)/lib505-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib505-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib505_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib505-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib506-lib506.o: lib506.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib506-lib506.o -MD -MP -MF $(DEPDIR)/lib506-lib506.Tpo -c -o lib506-lib506.o `test -f 'lib506.c' || echo '$(srcdir)/'`lib506.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib506-lib506.Tpo $(DEPDIR)/lib506-lib506.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib506.c' object='lib506-lib506.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib506-lib506.o `test -f 'lib506.c' || echo '$(srcdir)/'`lib506.c
+
+lib506-lib506.obj: lib506.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib506-lib506.obj -MD -MP -MF $(DEPDIR)/lib506-lib506.Tpo -c -o lib506-lib506.obj `if test -f 'lib506.c'; then $(CYGPATH_W) 'lib506.c'; else $(CYGPATH_W) '$(srcdir)/lib506.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib506-lib506.Tpo $(DEPDIR)/lib506-lib506.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib506.c' object='lib506-lib506.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib506-lib506.obj `if test -f 'lib506.c'; then $(CYGPATH_W) 'lib506.c'; else $(CYGPATH_W) '$(srcdir)/lib506.c'; fi`
+
+lib506-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib506-first.o -MD -MP -MF $(DEPDIR)/lib506-first.Tpo -c -o lib506-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib506-first.Tpo $(DEPDIR)/lib506-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib506-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib506-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib506-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib506-first.obj -MD -MP -MF $(DEPDIR)/lib506-first.Tpo -c -o lib506-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib506-first.Tpo $(DEPDIR)/lib506-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib506-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib506_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib506-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib507-lib507.o: lib507.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-lib507.o -MD -MP -MF $(DEPDIR)/lib507-lib507.Tpo -c -o lib507-lib507.o `test -f 'lib507.c' || echo '$(srcdir)/'`lib507.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-lib507.Tpo $(DEPDIR)/lib507-lib507.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib507.c' object='lib507-lib507.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-lib507.o `test -f 'lib507.c' || echo '$(srcdir)/'`lib507.c
+
+lib507-lib507.obj: lib507.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-lib507.obj -MD -MP -MF $(DEPDIR)/lib507-lib507.Tpo -c -o lib507-lib507.obj `if test -f 'lib507.c'; then $(CYGPATH_W) 'lib507.c'; else $(CYGPATH_W) '$(srcdir)/lib507.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-lib507.Tpo $(DEPDIR)/lib507-lib507.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib507.c' object='lib507-lib507.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-lib507.obj `if test -f 'lib507.c'; then $(CYGPATH_W) 'lib507.c'; else $(CYGPATH_W) '$(srcdir)/lib507.c'; fi`
+
+lib507-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-first.o -MD -MP -MF $(DEPDIR)/lib507-first.Tpo -c -o lib507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-first.Tpo $(DEPDIR)/lib507-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib507-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib507-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-first.obj -MD -MP -MF $(DEPDIR)/lib507-first.Tpo -c -o lib507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-first.Tpo $(DEPDIR)/lib507-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib507-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib507-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-testutil.o -MD -MP -MF $(DEPDIR)/lib507-testutil.Tpo -c -o lib507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-testutil.Tpo $(DEPDIR)/lib507-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib507-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib507-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-testutil.obj -MD -MP -MF $(DEPDIR)/lib507-testutil.Tpo -c -o lib507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-testutil.Tpo $(DEPDIR)/lib507-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib507-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib507-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-warnless.o -MD -MP -MF $(DEPDIR)/lib507-warnless.Tpo -c -o lib507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-warnless.Tpo $(DEPDIR)/lib507-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib507-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib507-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib507-warnless.obj -MD -MP -MF $(DEPDIR)/lib507-warnless.Tpo -c -o lib507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib507-warnless.Tpo $(DEPDIR)/lib507-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib507-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib507_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib507-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib508-lib508.o: lib508.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib508-lib508.o -MD -MP -MF $(DEPDIR)/lib508-lib508.Tpo -c -o lib508-lib508.o `test -f 'lib508.c' || echo '$(srcdir)/'`lib508.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib508-lib508.Tpo $(DEPDIR)/lib508-lib508.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib508.c' object='lib508-lib508.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib508-lib508.o `test -f 'lib508.c' || echo '$(srcdir)/'`lib508.c
+
+lib508-lib508.obj: lib508.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib508-lib508.obj -MD -MP -MF $(DEPDIR)/lib508-lib508.Tpo -c -o lib508-lib508.obj `if test -f 'lib508.c'; then $(CYGPATH_W) 'lib508.c'; else $(CYGPATH_W) '$(srcdir)/lib508.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib508-lib508.Tpo $(DEPDIR)/lib508-lib508.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib508.c' object='lib508-lib508.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib508-lib508.obj `if test -f 'lib508.c'; then $(CYGPATH_W) 'lib508.c'; else $(CYGPATH_W) '$(srcdir)/lib508.c'; fi`
+
+lib508-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib508-first.o -MD -MP -MF $(DEPDIR)/lib508-first.Tpo -c -o lib508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib508-first.Tpo $(DEPDIR)/lib508-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib508-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib508-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib508-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib508-first.obj -MD -MP -MF $(DEPDIR)/lib508-first.Tpo -c -o lib508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib508-first.Tpo $(DEPDIR)/lib508-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib508-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib508_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib508-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib509-lib509.o: lib509.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib509-lib509.o -MD -MP -MF $(DEPDIR)/lib509-lib509.Tpo -c -o lib509-lib509.o `test -f 'lib509.c' || echo '$(srcdir)/'`lib509.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib509-lib509.Tpo $(DEPDIR)/lib509-lib509.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib509.c' object='lib509-lib509.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib509-lib509.o `test -f 'lib509.c' || echo '$(srcdir)/'`lib509.c
+
+lib509-lib509.obj: lib509.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib509-lib509.obj -MD -MP -MF $(DEPDIR)/lib509-lib509.Tpo -c -o lib509-lib509.obj `if test -f 'lib509.c'; then $(CYGPATH_W) 'lib509.c'; else $(CYGPATH_W) '$(srcdir)/lib509.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib509-lib509.Tpo $(DEPDIR)/lib509-lib509.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib509.c' object='lib509-lib509.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib509-lib509.obj `if test -f 'lib509.c'; then $(CYGPATH_W) 'lib509.c'; else $(CYGPATH_W) '$(srcdir)/lib509.c'; fi`
+
+lib509-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib509-first.o -MD -MP -MF $(DEPDIR)/lib509-first.Tpo -c -o lib509-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib509-first.Tpo $(DEPDIR)/lib509-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib509-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib509-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib509-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib509-first.obj -MD -MP -MF $(DEPDIR)/lib509-first.Tpo -c -o lib509-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib509-first.Tpo $(DEPDIR)/lib509-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib509-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib509_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib509-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib510-lib510.o: lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib510-lib510.o -MD -MP -MF $(DEPDIR)/lib510-lib510.Tpo -c -o lib510-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib510-lib510.Tpo $(DEPDIR)/lib510-lib510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib510.c' object='lib510-lib510.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib510-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
+
+lib510-lib510.obj: lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib510-lib510.obj -MD -MP -MF $(DEPDIR)/lib510-lib510.Tpo -c -o lib510-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib510-lib510.Tpo $(DEPDIR)/lib510-lib510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib510.c' object='lib510-lib510.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib510-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
+
+lib510-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib510-first.o -MD -MP -MF $(DEPDIR)/lib510-first.Tpo -c -o lib510-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib510-first.Tpo $(DEPDIR)/lib510-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib510-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib510-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib510-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib510-first.obj -MD -MP -MF $(DEPDIR)/lib510-first.Tpo -c -o lib510-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib510-first.Tpo $(DEPDIR)/lib510-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib510-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib510_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib510-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib511-lib511.o: lib511.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib511-lib511.o -MD -MP -MF $(DEPDIR)/lib511-lib511.Tpo -c -o lib511-lib511.o `test -f 'lib511.c' || echo '$(srcdir)/'`lib511.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib511-lib511.Tpo $(DEPDIR)/lib511-lib511.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib511.c' object='lib511-lib511.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib511-lib511.o `test -f 'lib511.c' || echo '$(srcdir)/'`lib511.c
+
+lib511-lib511.obj: lib511.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib511-lib511.obj -MD -MP -MF $(DEPDIR)/lib511-lib511.Tpo -c -o lib511-lib511.obj `if test -f 'lib511.c'; then $(CYGPATH_W) 'lib511.c'; else $(CYGPATH_W) '$(srcdir)/lib511.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib511-lib511.Tpo $(DEPDIR)/lib511-lib511.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib511.c' object='lib511-lib511.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib511-lib511.obj `if test -f 'lib511.c'; then $(CYGPATH_W) 'lib511.c'; else $(CYGPATH_W) '$(srcdir)/lib511.c'; fi`
+
+lib511-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib511-first.o -MD -MP -MF $(DEPDIR)/lib511-first.Tpo -c -o lib511-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib511-first.Tpo $(DEPDIR)/lib511-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib511-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib511-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib511-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib511-first.obj -MD -MP -MF $(DEPDIR)/lib511-first.Tpo -c -o lib511-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib511-first.Tpo $(DEPDIR)/lib511-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib511-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib511_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib511-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib512-lib512.o: lib512.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib512-lib512.o -MD -MP -MF $(DEPDIR)/lib512-lib512.Tpo -c -o lib512-lib512.o `test -f 'lib512.c' || echo '$(srcdir)/'`lib512.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib512-lib512.Tpo $(DEPDIR)/lib512-lib512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib512.c' object='lib512-lib512.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib512-lib512.o `test -f 'lib512.c' || echo '$(srcdir)/'`lib512.c
+
+lib512-lib512.obj: lib512.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib512-lib512.obj -MD -MP -MF $(DEPDIR)/lib512-lib512.Tpo -c -o lib512-lib512.obj `if test -f 'lib512.c'; then $(CYGPATH_W) 'lib512.c'; else $(CYGPATH_W) '$(srcdir)/lib512.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib512-lib512.Tpo $(DEPDIR)/lib512-lib512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib512.c' object='lib512-lib512.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib512-lib512.obj `if test -f 'lib512.c'; then $(CYGPATH_W) 'lib512.c'; else $(CYGPATH_W) '$(srcdir)/lib512.c'; fi`
+
+lib512-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib512-first.o -MD -MP -MF $(DEPDIR)/lib512-first.Tpo -c -o lib512-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib512-first.Tpo $(DEPDIR)/lib512-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib512-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib512-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib512-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib512-first.obj -MD -MP -MF $(DEPDIR)/lib512-first.Tpo -c -o lib512-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib512-first.Tpo $(DEPDIR)/lib512-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib512-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib512_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib512-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib513-lib513.o: lib513.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib513-lib513.o -MD -MP -MF $(DEPDIR)/lib513-lib513.Tpo -c -o lib513-lib513.o `test -f 'lib513.c' || echo '$(srcdir)/'`lib513.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib513-lib513.Tpo $(DEPDIR)/lib513-lib513.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib513.c' object='lib513-lib513.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib513-lib513.o `test -f 'lib513.c' || echo '$(srcdir)/'`lib513.c
+
+lib513-lib513.obj: lib513.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib513-lib513.obj -MD -MP -MF $(DEPDIR)/lib513-lib513.Tpo -c -o lib513-lib513.obj `if test -f 'lib513.c'; then $(CYGPATH_W) 'lib513.c'; else $(CYGPATH_W) '$(srcdir)/lib513.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib513-lib513.Tpo $(DEPDIR)/lib513-lib513.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib513.c' object='lib513-lib513.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib513-lib513.obj `if test -f 'lib513.c'; then $(CYGPATH_W) 'lib513.c'; else $(CYGPATH_W) '$(srcdir)/lib513.c'; fi`
+
+lib513-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib513-first.o -MD -MP -MF $(DEPDIR)/lib513-first.Tpo -c -o lib513-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib513-first.Tpo $(DEPDIR)/lib513-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib513-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib513-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib513-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib513-first.obj -MD -MP -MF $(DEPDIR)/lib513-first.Tpo -c -o lib513-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib513-first.Tpo $(DEPDIR)/lib513-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib513-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib513_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib513-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib514-lib514.o: lib514.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib514-lib514.o -MD -MP -MF $(DEPDIR)/lib514-lib514.Tpo -c -o lib514-lib514.o `test -f 'lib514.c' || echo '$(srcdir)/'`lib514.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib514-lib514.Tpo $(DEPDIR)/lib514-lib514.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib514.c' object='lib514-lib514.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib514-lib514.o `test -f 'lib514.c' || echo '$(srcdir)/'`lib514.c
+
+lib514-lib514.obj: lib514.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib514-lib514.obj -MD -MP -MF $(DEPDIR)/lib514-lib514.Tpo -c -o lib514-lib514.obj `if test -f 'lib514.c'; then $(CYGPATH_W) 'lib514.c'; else $(CYGPATH_W) '$(srcdir)/lib514.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib514-lib514.Tpo $(DEPDIR)/lib514-lib514.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib514.c' object='lib514-lib514.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib514-lib514.obj `if test -f 'lib514.c'; then $(CYGPATH_W) 'lib514.c'; else $(CYGPATH_W) '$(srcdir)/lib514.c'; fi`
+
+lib514-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib514-first.o -MD -MP -MF $(DEPDIR)/lib514-first.Tpo -c -o lib514-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib514-first.Tpo $(DEPDIR)/lib514-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib514-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib514-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib514-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib514-first.obj -MD -MP -MF $(DEPDIR)/lib514-first.Tpo -c -o lib514-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib514-first.Tpo $(DEPDIR)/lib514-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib514-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib514_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib514-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib515-lib515.o: lib515.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib515-lib515.o -MD -MP -MF $(DEPDIR)/lib515-lib515.Tpo -c -o lib515-lib515.o `test -f 'lib515.c' || echo '$(srcdir)/'`lib515.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib515-lib515.Tpo $(DEPDIR)/lib515-lib515.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib515.c' object='lib515-lib515.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib515-lib515.o `test -f 'lib515.c' || echo '$(srcdir)/'`lib515.c
+
+lib515-lib515.obj: lib515.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib515-lib515.obj -MD -MP -MF $(DEPDIR)/lib515-lib515.Tpo -c -o lib515-lib515.obj `if test -f 'lib515.c'; then $(CYGPATH_W) 'lib515.c'; else $(CYGPATH_W) '$(srcdir)/lib515.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib515-lib515.Tpo $(DEPDIR)/lib515-lib515.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib515.c' object='lib515-lib515.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib515-lib515.obj `if test -f 'lib515.c'; then $(CYGPATH_W) 'lib515.c'; else $(CYGPATH_W) '$(srcdir)/lib515.c'; fi`
+
+lib515-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib515-first.o -MD -MP -MF $(DEPDIR)/lib515-first.Tpo -c -o lib515-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib515-first.Tpo $(DEPDIR)/lib515-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib515-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib515-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib515-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib515-first.obj -MD -MP -MF $(DEPDIR)/lib515-first.Tpo -c -o lib515-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib515-first.Tpo $(DEPDIR)/lib515-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib515-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib515-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib516-lib516.o: lib516.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib516-lib516.o -MD -MP -MF $(DEPDIR)/lib516-lib516.Tpo -c -o lib516-lib516.o `test -f 'lib516.c' || echo '$(srcdir)/'`lib516.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib516-lib516.Tpo $(DEPDIR)/lib516-lib516.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib516.c' object='lib516-lib516.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib516-lib516.o `test -f 'lib516.c' || echo '$(srcdir)/'`lib516.c
+
+lib516-lib516.obj: lib516.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib516-lib516.obj -MD -MP -MF $(DEPDIR)/lib516-lib516.Tpo -c -o lib516-lib516.obj `if test -f 'lib516.c'; then $(CYGPATH_W) 'lib516.c'; else $(CYGPATH_W) '$(srcdir)/lib516.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib516-lib516.Tpo $(DEPDIR)/lib516-lib516.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib516.c' object='lib516-lib516.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib516-lib516.obj `if test -f 'lib516.c'; then $(CYGPATH_W) 'lib516.c'; else $(CYGPATH_W) '$(srcdir)/lib516.c'; fi`
+
+lib516-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib516-first.o -MD -MP -MF $(DEPDIR)/lib516-first.Tpo -c -o lib516-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib516-first.Tpo $(DEPDIR)/lib516-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib516-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib516-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib516-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib516-first.obj -MD -MP -MF $(DEPDIR)/lib516-first.Tpo -c -o lib516-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib516-first.Tpo $(DEPDIR)/lib516-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib516-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib516_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib516-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib517-lib517.o: lib517.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib517-lib517.o -MD -MP -MF $(DEPDIR)/lib517-lib517.Tpo -c -o lib517-lib517.o `test -f 'lib517.c' || echo '$(srcdir)/'`lib517.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib517-lib517.Tpo $(DEPDIR)/lib517-lib517.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib517.c' object='lib517-lib517.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib517-lib517.o `test -f 'lib517.c' || echo '$(srcdir)/'`lib517.c
+
+lib517-lib517.obj: lib517.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib517-lib517.obj -MD -MP -MF $(DEPDIR)/lib517-lib517.Tpo -c -o lib517-lib517.obj `if test -f 'lib517.c'; then $(CYGPATH_W) 'lib517.c'; else $(CYGPATH_W) '$(srcdir)/lib517.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib517-lib517.Tpo $(DEPDIR)/lib517-lib517.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib517.c' object='lib517-lib517.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib517-lib517.obj `if test -f 'lib517.c'; then $(CYGPATH_W) 'lib517.c'; else $(CYGPATH_W) '$(srcdir)/lib517.c'; fi`
+
+lib517-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib517-first.o -MD -MP -MF $(DEPDIR)/lib517-first.Tpo -c -o lib517-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib517-first.Tpo $(DEPDIR)/lib517-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib517-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib517-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib517-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib517-first.obj -MD -MP -MF $(DEPDIR)/lib517-first.Tpo -c -o lib517-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib517-first.Tpo $(DEPDIR)/lib517-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib517-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib517-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib518-lib518.o: lib518.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-lib518.o -MD -MP -MF $(DEPDIR)/lib518-lib518.Tpo -c -o lib518-lib518.o `test -f 'lib518.c' || echo '$(srcdir)/'`lib518.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-lib518.Tpo $(DEPDIR)/lib518-lib518.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib518.c' object='lib518-lib518.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-lib518.o `test -f 'lib518.c' || echo '$(srcdir)/'`lib518.c
+
+lib518-lib518.obj: lib518.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-lib518.obj -MD -MP -MF $(DEPDIR)/lib518-lib518.Tpo -c -o lib518-lib518.obj `if test -f 'lib518.c'; then $(CYGPATH_W) 'lib518.c'; else $(CYGPATH_W) '$(srcdir)/lib518.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-lib518.Tpo $(DEPDIR)/lib518-lib518.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib518.c' object='lib518-lib518.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-lib518.obj `if test -f 'lib518.c'; then $(CYGPATH_W) 'lib518.c'; else $(CYGPATH_W) '$(srcdir)/lib518.c'; fi`
+
+lib518-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-first.o -MD -MP -MF $(DEPDIR)/lib518-first.Tpo -c -o lib518-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-first.Tpo $(DEPDIR)/lib518-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib518-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib518-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-first.obj -MD -MP -MF $(DEPDIR)/lib518-first.Tpo -c -o lib518-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-first.Tpo $(DEPDIR)/lib518-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib518-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib518-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-warnless.o -MD -MP -MF $(DEPDIR)/lib518-warnless.Tpo -c -o lib518-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-warnless.Tpo $(DEPDIR)/lib518-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib518-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib518-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib518-warnless.obj -MD -MP -MF $(DEPDIR)/lib518-warnless.Tpo -c -o lib518-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib518-warnless.Tpo $(DEPDIR)/lib518-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib518-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib518_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib518-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib519-lib519.o: lib519.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib519-lib519.o -MD -MP -MF $(DEPDIR)/lib519-lib519.Tpo -c -o lib519-lib519.o `test -f 'lib519.c' || echo '$(srcdir)/'`lib519.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib519-lib519.Tpo $(DEPDIR)/lib519-lib519.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib519.c' object='lib519-lib519.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib519-lib519.o `test -f 'lib519.c' || echo '$(srcdir)/'`lib519.c
+
+lib519-lib519.obj: lib519.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib519-lib519.obj -MD -MP -MF $(DEPDIR)/lib519-lib519.Tpo -c -o lib519-lib519.obj `if test -f 'lib519.c'; then $(CYGPATH_W) 'lib519.c'; else $(CYGPATH_W) '$(srcdir)/lib519.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib519-lib519.Tpo $(DEPDIR)/lib519-lib519.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib519.c' object='lib519-lib519.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib519-lib519.obj `if test -f 'lib519.c'; then $(CYGPATH_W) 'lib519.c'; else $(CYGPATH_W) '$(srcdir)/lib519.c'; fi`
+
+lib519-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib519-first.o -MD -MP -MF $(DEPDIR)/lib519-first.Tpo -c -o lib519-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib519-first.Tpo $(DEPDIR)/lib519-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib519-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib519-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib519-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib519-first.obj -MD -MP -MF $(DEPDIR)/lib519-first.Tpo -c -o lib519-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib519-first.Tpo $(DEPDIR)/lib519-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib519-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib519_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib519-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib520-lib520.o: lib520.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib520-lib520.o -MD -MP -MF $(DEPDIR)/lib520-lib520.Tpo -c -o lib520-lib520.o `test -f 'lib520.c' || echo '$(srcdir)/'`lib520.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib520-lib520.Tpo $(DEPDIR)/lib520-lib520.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib520.c' object='lib520-lib520.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib520-lib520.o `test -f 'lib520.c' || echo '$(srcdir)/'`lib520.c
+
+lib520-lib520.obj: lib520.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib520-lib520.obj -MD -MP -MF $(DEPDIR)/lib520-lib520.Tpo -c -o lib520-lib520.obj `if test -f 'lib520.c'; then $(CYGPATH_W) 'lib520.c'; else $(CYGPATH_W) '$(srcdir)/lib520.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib520-lib520.Tpo $(DEPDIR)/lib520-lib520.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib520.c' object='lib520-lib520.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib520-lib520.obj `if test -f 'lib520.c'; then $(CYGPATH_W) 'lib520.c'; else $(CYGPATH_W) '$(srcdir)/lib520.c'; fi`
+
+lib520-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib520-first.o -MD -MP -MF $(DEPDIR)/lib520-first.Tpo -c -o lib520-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib520-first.Tpo $(DEPDIR)/lib520-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib520-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib520-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib520-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib520-first.obj -MD -MP -MF $(DEPDIR)/lib520-first.Tpo -c -o lib520-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib520-first.Tpo $(DEPDIR)/lib520-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib520-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib520-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib521-lib521.o: lib521.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib521-lib521.o -MD -MP -MF $(DEPDIR)/lib521-lib521.Tpo -c -o lib521-lib521.o `test -f 'lib521.c' || echo '$(srcdir)/'`lib521.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib521-lib521.Tpo $(DEPDIR)/lib521-lib521.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib521.c' object='lib521-lib521.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib521-lib521.o `test -f 'lib521.c' || echo '$(srcdir)/'`lib521.c
+
+lib521-lib521.obj: lib521.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib521-lib521.obj -MD -MP -MF $(DEPDIR)/lib521-lib521.Tpo -c -o lib521-lib521.obj `if test -f 'lib521.c'; then $(CYGPATH_W) 'lib521.c'; else $(CYGPATH_W) '$(srcdir)/lib521.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib521-lib521.Tpo $(DEPDIR)/lib521-lib521.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib521.c' object='lib521-lib521.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib521-lib521.obj `if test -f 'lib521.c'; then $(CYGPATH_W) 'lib521.c'; else $(CYGPATH_W) '$(srcdir)/lib521.c'; fi`
+
+lib521-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib521-first.o -MD -MP -MF $(DEPDIR)/lib521-first.Tpo -c -o lib521-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib521-first.Tpo $(DEPDIR)/lib521-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib521-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib521-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib521-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib521-first.obj -MD -MP -MF $(DEPDIR)/lib521-first.Tpo -c -o lib521-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib521-first.Tpo $(DEPDIR)/lib521-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib521-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib521-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib523-lib523.o: lib523.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib523-lib523.o -MD -MP -MF $(DEPDIR)/lib523-lib523.Tpo -c -o lib523-lib523.o `test -f 'lib523.c' || echo '$(srcdir)/'`lib523.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib523-lib523.Tpo $(DEPDIR)/lib523-lib523.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib523.c' object='lib523-lib523.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib523-lib523.o `test -f 'lib523.c' || echo '$(srcdir)/'`lib523.c
+
+lib523-lib523.obj: lib523.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib523-lib523.obj -MD -MP -MF $(DEPDIR)/lib523-lib523.Tpo -c -o lib523-lib523.obj `if test -f 'lib523.c'; then $(CYGPATH_W) 'lib523.c'; else $(CYGPATH_W) '$(srcdir)/lib523.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib523-lib523.Tpo $(DEPDIR)/lib523-lib523.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib523.c' object='lib523-lib523.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib523-lib523.obj `if test -f 'lib523.c'; then $(CYGPATH_W) 'lib523.c'; else $(CYGPATH_W) '$(srcdir)/lib523.c'; fi`
+
+lib523-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib523-first.o -MD -MP -MF $(DEPDIR)/lib523-first.Tpo -c -o lib523-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib523-first.Tpo $(DEPDIR)/lib523-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib523-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib523-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib523-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib523-first.obj -MD -MP -MF $(DEPDIR)/lib523-first.Tpo -c -o lib523-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib523-first.Tpo $(DEPDIR)/lib523-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib523-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib523_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib523-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib524-lib524.o: lib524.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib524-lib524.o -MD -MP -MF $(DEPDIR)/lib524-lib524.Tpo -c -o lib524-lib524.o `test -f 'lib524.c' || echo '$(srcdir)/'`lib524.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib524-lib524.Tpo $(DEPDIR)/lib524-lib524.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib524.c' object='lib524-lib524.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib524-lib524.o `test -f 'lib524.c' || echo '$(srcdir)/'`lib524.c
+
+lib524-lib524.obj: lib524.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib524-lib524.obj -MD -MP -MF $(DEPDIR)/lib524-lib524.Tpo -c -o lib524-lib524.obj `if test -f 'lib524.c'; then $(CYGPATH_W) 'lib524.c'; else $(CYGPATH_W) '$(srcdir)/lib524.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib524-lib524.Tpo $(DEPDIR)/lib524-lib524.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib524.c' object='lib524-lib524.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib524-lib524.obj `if test -f 'lib524.c'; then $(CYGPATH_W) 'lib524.c'; else $(CYGPATH_W) '$(srcdir)/lib524.c'; fi`
+
+lib524-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib524-first.o -MD -MP -MF $(DEPDIR)/lib524-first.Tpo -c -o lib524-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib524-first.Tpo $(DEPDIR)/lib524-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib524-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib524-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib524-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib524-first.obj -MD -MP -MF $(DEPDIR)/lib524-first.Tpo -c -o lib524-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib524-first.Tpo $(DEPDIR)/lib524-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib524-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib524_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib524-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib525-lib525.o: lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-lib525.o -MD -MP -MF $(DEPDIR)/lib525-lib525.Tpo -c -o lib525-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-lib525.Tpo $(DEPDIR)/lib525-lib525.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib525.c' object='lib525-lib525.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
+
+lib525-lib525.obj: lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-lib525.obj -MD -MP -MF $(DEPDIR)/lib525-lib525.Tpo -c -o lib525-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-lib525.Tpo $(DEPDIR)/lib525-lib525.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib525.c' object='lib525-lib525.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
+
+lib525-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-first.o -MD -MP -MF $(DEPDIR)/lib525-first.Tpo -c -o lib525-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-first.Tpo $(DEPDIR)/lib525-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib525-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib525-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-first.obj -MD -MP -MF $(DEPDIR)/lib525-first.Tpo -c -o lib525-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-first.Tpo $(DEPDIR)/lib525-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib525-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib525-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-testutil.o -MD -MP -MF $(DEPDIR)/lib525-testutil.Tpo -c -o lib525-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-testutil.Tpo $(DEPDIR)/lib525-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib525-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib525-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-testutil.obj -MD -MP -MF $(DEPDIR)/lib525-testutil.Tpo -c -o lib525-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-testutil.Tpo $(DEPDIR)/lib525-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib525-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib525-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-warnless.o -MD -MP -MF $(DEPDIR)/lib525-warnless.Tpo -c -o lib525-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-warnless.Tpo $(DEPDIR)/lib525-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib525-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib525-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib525-warnless.obj -MD -MP -MF $(DEPDIR)/lib525-warnless.Tpo -c -o lib525-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib525-warnless.Tpo $(DEPDIR)/lib525-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib525-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib525-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib526-lib526.o: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-lib526.o -MD -MP -MF $(DEPDIR)/lib526-lib526.Tpo -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-lib526.Tpo $(DEPDIR)/lib526-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib526-lib526.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+
+lib526-lib526.obj: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-lib526.obj -MD -MP -MF $(DEPDIR)/lib526-lib526.Tpo -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-lib526.Tpo $(DEPDIR)/lib526-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib526-lib526.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+
+lib526-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-first.o -MD -MP -MF $(DEPDIR)/lib526-first.Tpo -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-first.Tpo $(DEPDIR)/lib526-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib526-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib526-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-first.obj -MD -MP -MF $(DEPDIR)/lib526-first.Tpo -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-first.Tpo $(DEPDIR)/lib526-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib526-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib526-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-testutil.o -MD -MP -MF $(DEPDIR)/lib526-testutil.Tpo -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-testutil.Tpo $(DEPDIR)/lib526-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib526-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib526-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-testutil.obj -MD -MP -MF $(DEPDIR)/lib526-testutil.Tpo -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-testutil.Tpo $(DEPDIR)/lib526-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib526-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib526-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-warnless.o -MD -MP -MF $(DEPDIR)/lib526-warnless.Tpo -c -o lib526-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-warnless.Tpo $(DEPDIR)/lib526-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib526-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib526-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib526-warnless.obj -MD -MP -MF $(DEPDIR)/lib526-warnless.Tpo -c -o lib526-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib526-warnless.Tpo $(DEPDIR)/lib526-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib526-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib526_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib526-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib527-lib526.o: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-lib526.o -MD -MP -MF $(DEPDIR)/lib527-lib526.Tpo -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-lib526.Tpo $(DEPDIR)/lib527-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib527-lib526.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+
+lib527-lib526.obj: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-lib526.obj -MD -MP -MF $(DEPDIR)/lib527-lib526.Tpo -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-lib526.Tpo $(DEPDIR)/lib527-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib527-lib526.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+
+lib527-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-first.o -MD -MP -MF $(DEPDIR)/lib527-first.Tpo -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-first.Tpo $(DEPDIR)/lib527-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib527-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib527-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-first.obj -MD -MP -MF $(DEPDIR)/lib527-first.Tpo -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-first.Tpo $(DEPDIR)/lib527-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib527-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib527-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-testutil.o -MD -MP -MF $(DEPDIR)/lib527-testutil.Tpo -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-testutil.Tpo $(DEPDIR)/lib527-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib527-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib527-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-testutil.obj -MD -MP -MF $(DEPDIR)/lib527-testutil.Tpo -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-testutil.Tpo $(DEPDIR)/lib527-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib527-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib527-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-warnless.o -MD -MP -MF $(DEPDIR)/lib527-warnless.Tpo -c -o lib527-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-warnless.Tpo $(DEPDIR)/lib527-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib527-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib527-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib527-warnless.obj -MD -MP -MF $(DEPDIR)/lib527-warnless.Tpo -c -o lib527-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib527-warnless.Tpo $(DEPDIR)/lib527-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib527-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib527_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib527-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib529-lib525.o: lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-lib525.o -MD -MP -MF $(DEPDIR)/lib529-lib525.Tpo -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-lib525.Tpo $(DEPDIR)/lib529-lib525.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib525.c' object='lib529-lib525.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-lib525.o `test -f 'lib525.c' || echo '$(srcdir)/'`lib525.c
+
+lib529-lib525.obj: lib525.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-lib525.obj -MD -MP -MF $(DEPDIR)/lib529-lib525.Tpo -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-lib525.Tpo $(DEPDIR)/lib529-lib525.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib525.c' object='lib529-lib525.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-lib525.obj `if test -f 'lib525.c'; then $(CYGPATH_W) 'lib525.c'; else $(CYGPATH_W) '$(srcdir)/lib525.c'; fi`
+
+lib529-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-first.o -MD -MP -MF $(DEPDIR)/lib529-first.Tpo -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-first.Tpo $(DEPDIR)/lib529-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib529-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib529-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-first.obj -MD -MP -MF $(DEPDIR)/lib529-first.Tpo -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-first.Tpo $(DEPDIR)/lib529-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib529-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib529-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-testutil.o -MD -MP -MF $(DEPDIR)/lib529-testutil.Tpo -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-testutil.Tpo $(DEPDIR)/lib529-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib529-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib529-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-testutil.obj -MD -MP -MF $(DEPDIR)/lib529-testutil.Tpo -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-testutil.Tpo $(DEPDIR)/lib529-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib529-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib529-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-warnless.o -MD -MP -MF $(DEPDIR)/lib529-warnless.Tpo -c -o lib529-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-warnless.Tpo $(DEPDIR)/lib529-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib529-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib529-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib529-warnless.obj -MD -MP -MF $(DEPDIR)/lib529-warnless.Tpo -c -o lib529-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib529-warnless.Tpo $(DEPDIR)/lib529-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib529-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib529_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib529-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib530-lib530.o: lib530.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-lib530.o -MD -MP -MF $(DEPDIR)/lib530-lib530.Tpo -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-lib530.Tpo $(DEPDIR)/lib530-lib530.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib530.c' object='lib530-lib530.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-lib530.o `test -f 'lib530.c' || echo '$(srcdir)/'`lib530.c
+
+lib530-lib530.obj: lib530.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-lib530.obj -MD -MP -MF $(DEPDIR)/lib530-lib530.Tpo -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-lib530.Tpo $(DEPDIR)/lib530-lib530.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib530.c' object='lib530-lib530.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-lib530.obj `if test -f 'lib530.c'; then $(CYGPATH_W) 'lib530.c'; else $(CYGPATH_W) '$(srcdir)/lib530.c'; fi`
+
+lib530-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-first.o -MD -MP -MF $(DEPDIR)/lib530-first.Tpo -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-first.Tpo $(DEPDIR)/lib530-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib530-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib530-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-first.obj -MD -MP -MF $(DEPDIR)/lib530-first.Tpo -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-first.Tpo $(DEPDIR)/lib530-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib530-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib530-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-testutil.o -MD -MP -MF $(DEPDIR)/lib530-testutil.Tpo -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-testutil.Tpo $(DEPDIR)/lib530-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib530-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib530-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-testutil.obj -MD -MP -MF $(DEPDIR)/lib530-testutil.Tpo -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-testutil.Tpo $(DEPDIR)/lib530-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib530-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib530-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-warnless.o -MD -MP -MF $(DEPDIR)/lib530-warnless.Tpo -c -o lib530-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-warnless.Tpo $(DEPDIR)/lib530-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib530-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib530-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib530-warnless.obj -MD -MP -MF $(DEPDIR)/lib530-warnless.Tpo -c -o lib530-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib530-warnless.Tpo $(DEPDIR)/lib530-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib530-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib530_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib530-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib532-lib526.o: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-lib526.o -MD -MP -MF $(DEPDIR)/lib532-lib526.Tpo -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-lib526.Tpo $(DEPDIR)/lib532-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib532-lib526.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-lib526.o `test -f 'lib526.c' || echo '$(srcdir)/'`lib526.c
+
+lib532-lib526.obj: lib526.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-lib526.obj -MD -MP -MF $(DEPDIR)/lib532-lib526.Tpo -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-lib526.Tpo $(DEPDIR)/lib532-lib526.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib526.c' object='lib532-lib526.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-lib526.obj `if test -f 'lib526.c'; then $(CYGPATH_W) 'lib526.c'; else $(CYGPATH_W) '$(srcdir)/lib526.c'; fi`
+
+lib532-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-first.o -MD -MP -MF $(DEPDIR)/lib532-first.Tpo -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-first.Tpo $(DEPDIR)/lib532-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib532-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib532-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-first.obj -MD -MP -MF $(DEPDIR)/lib532-first.Tpo -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-first.Tpo $(DEPDIR)/lib532-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib532-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib532-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-testutil.o -MD -MP -MF $(DEPDIR)/lib532-testutil.Tpo -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-testutil.Tpo $(DEPDIR)/lib532-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib532-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib532-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-testutil.obj -MD -MP -MF $(DEPDIR)/lib532-testutil.Tpo -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-testutil.Tpo $(DEPDIR)/lib532-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib532-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib532-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-warnless.o -MD -MP -MF $(DEPDIR)/lib532-warnless.Tpo -c -o lib532-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-warnless.Tpo $(DEPDIR)/lib532-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib532-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib532-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib532-warnless.obj -MD -MP -MF $(DEPDIR)/lib532-warnless.Tpo -c -o lib532-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib532-warnless.Tpo $(DEPDIR)/lib532-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib532-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib532_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib532-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib533-lib533.o: lib533.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-lib533.o -MD -MP -MF $(DEPDIR)/lib533-lib533.Tpo -c -o lib533-lib533.o `test -f 'lib533.c' || echo '$(srcdir)/'`lib533.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-lib533.Tpo $(DEPDIR)/lib533-lib533.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib533.c' object='lib533-lib533.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-lib533.o `test -f 'lib533.c' || echo '$(srcdir)/'`lib533.c
+
+lib533-lib533.obj: lib533.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-lib533.obj -MD -MP -MF $(DEPDIR)/lib533-lib533.Tpo -c -o lib533-lib533.obj `if test -f 'lib533.c'; then $(CYGPATH_W) 'lib533.c'; else $(CYGPATH_W) '$(srcdir)/lib533.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-lib533.Tpo $(DEPDIR)/lib533-lib533.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib533.c' object='lib533-lib533.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-lib533.obj `if test -f 'lib533.c'; then $(CYGPATH_W) 'lib533.c'; else $(CYGPATH_W) '$(srcdir)/lib533.c'; fi`
+
+lib533-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-first.o -MD -MP -MF $(DEPDIR)/lib533-first.Tpo -c -o lib533-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-first.Tpo $(DEPDIR)/lib533-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib533-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib533-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-first.obj -MD -MP -MF $(DEPDIR)/lib533-first.Tpo -c -o lib533-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-first.Tpo $(DEPDIR)/lib533-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib533-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib533-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-testutil.o -MD -MP -MF $(DEPDIR)/lib533-testutil.Tpo -c -o lib533-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-testutil.Tpo $(DEPDIR)/lib533-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib533-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib533-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-testutil.obj -MD -MP -MF $(DEPDIR)/lib533-testutil.Tpo -c -o lib533-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-testutil.Tpo $(DEPDIR)/lib533-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib533-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib533-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-warnless.o -MD -MP -MF $(DEPDIR)/lib533-warnless.Tpo -c -o lib533-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-warnless.Tpo $(DEPDIR)/lib533-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib533-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib533-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib533-warnless.obj -MD -MP -MF $(DEPDIR)/lib533-warnless.Tpo -c -o lib533-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib533-warnless.Tpo $(DEPDIR)/lib533-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib533-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib533_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib533-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib536-lib536.o: lib536.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-lib536.o -MD -MP -MF $(DEPDIR)/lib536-lib536.Tpo -c -o lib536-lib536.o `test -f 'lib536.c' || echo '$(srcdir)/'`lib536.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-lib536.Tpo $(DEPDIR)/lib536-lib536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib536.c' object='lib536-lib536.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-lib536.o `test -f 'lib536.c' || echo '$(srcdir)/'`lib536.c
+
+lib536-lib536.obj: lib536.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-lib536.obj -MD -MP -MF $(DEPDIR)/lib536-lib536.Tpo -c -o lib536-lib536.obj `if test -f 'lib536.c'; then $(CYGPATH_W) 'lib536.c'; else $(CYGPATH_W) '$(srcdir)/lib536.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-lib536.Tpo $(DEPDIR)/lib536-lib536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib536.c' object='lib536-lib536.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-lib536.obj `if test -f 'lib536.c'; then $(CYGPATH_W) 'lib536.c'; else $(CYGPATH_W) '$(srcdir)/lib536.c'; fi`
+
+lib536-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-first.o -MD -MP -MF $(DEPDIR)/lib536-first.Tpo -c -o lib536-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-first.Tpo $(DEPDIR)/lib536-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib536-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib536-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-first.obj -MD -MP -MF $(DEPDIR)/lib536-first.Tpo -c -o lib536-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-first.Tpo $(DEPDIR)/lib536-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib536-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib536-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-testutil.o -MD -MP -MF $(DEPDIR)/lib536-testutil.Tpo -c -o lib536-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-testutil.Tpo $(DEPDIR)/lib536-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib536-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib536-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-testutil.obj -MD -MP -MF $(DEPDIR)/lib536-testutil.Tpo -c -o lib536-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-testutil.Tpo $(DEPDIR)/lib536-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib536-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib536-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-warnless.o -MD -MP -MF $(DEPDIR)/lib536-warnless.Tpo -c -o lib536-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-warnless.Tpo $(DEPDIR)/lib536-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib536-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib536-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib536-warnless.obj -MD -MP -MF $(DEPDIR)/lib536-warnless.Tpo -c -o lib536-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib536-warnless.Tpo $(DEPDIR)/lib536-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib536-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib536-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib537-lib537.o: lib537.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-lib537.o -MD -MP -MF $(DEPDIR)/lib537-lib537.Tpo -c -o lib537-lib537.o `test -f 'lib537.c' || echo '$(srcdir)/'`lib537.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-lib537.Tpo $(DEPDIR)/lib537-lib537.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib537.c' object='lib537-lib537.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-lib537.o `test -f 'lib537.c' || echo '$(srcdir)/'`lib537.c
+
+lib537-lib537.obj: lib537.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-lib537.obj -MD -MP -MF $(DEPDIR)/lib537-lib537.Tpo -c -o lib537-lib537.obj `if test -f 'lib537.c'; then $(CYGPATH_W) 'lib537.c'; else $(CYGPATH_W) '$(srcdir)/lib537.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-lib537.Tpo $(DEPDIR)/lib537-lib537.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib537.c' object='lib537-lib537.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-lib537.obj `if test -f 'lib537.c'; then $(CYGPATH_W) 'lib537.c'; else $(CYGPATH_W) '$(srcdir)/lib537.c'; fi`
+
+lib537-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-first.o -MD -MP -MF $(DEPDIR)/lib537-first.Tpo -c -o lib537-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-first.Tpo $(DEPDIR)/lib537-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib537-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib537-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-first.obj -MD -MP -MF $(DEPDIR)/lib537-first.Tpo -c -o lib537-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-first.Tpo $(DEPDIR)/lib537-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib537-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib537-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-warnless.o -MD -MP -MF $(DEPDIR)/lib537-warnless.Tpo -c -o lib537-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-warnless.Tpo $(DEPDIR)/lib537-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib537-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib537-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib537-warnless.obj -MD -MP -MF $(DEPDIR)/lib537-warnless.Tpo -c -o lib537-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib537-warnless.Tpo $(DEPDIR)/lib537-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib537-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib537-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib539-lib539.o: lib539.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib539-lib539.o -MD -MP -MF $(DEPDIR)/lib539-lib539.Tpo -c -o lib539-lib539.o `test -f 'lib539.c' || echo '$(srcdir)/'`lib539.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib539-lib539.Tpo $(DEPDIR)/lib539-lib539.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib539.c' object='lib539-lib539.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib539-lib539.o `test -f 'lib539.c' || echo '$(srcdir)/'`lib539.c
+
+lib539-lib539.obj: lib539.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib539-lib539.obj -MD -MP -MF $(DEPDIR)/lib539-lib539.Tpo -c -o lib539-lib539.obj `if test -f 'lib539.c'; then $(CYGPATH_W) 'lib539.c'; else $(CYGPATH_W) '$(srcdir)/lib539.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib539-lib539.Tpo $(DEPDIR)/lib539-lib539.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib539.c' object='lib539-lib539.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib539-lib539.obj `if test -f 'lib539.c'; then $(CYGPATH_W) 'lib539.c'; else $(CYGPATH_W) '$(srcdir)/lib539.c'; fi`
+
+lib539-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib539-first.o -MD -MP -MF $(DEPDIR)/lib539-first.Tpo -c -o lib539-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib539-first.Tpo $(DEPDIR)/lib539-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib539-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib539-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib539-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib539-first.obj -MD -MP -MF $(DEPDIR)/lib539-first.Tpo -c -o lib539-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib539-first.Tpo $(DEPDIR)/lib539-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib539-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib539_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib539-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib540-lib540.o: lib540.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-lib540.o -MD -MP -MF $(DEPDIR)/lib540-lib540.Tpo -c -o lib540-lib540.o `test -f 'lib540.c' || echo '$(srcdir)/'`lib540.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-lib540.Tpo $(DEPDIR)/lib540-lib540.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib540.c' object='lib540-lib540.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-lib540.o `test -f 'lib540.c' || echo '$(srcdir)/'`lib540.c
+
+lib540-lib540.obj: lib540.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-lib540.obj -MD -MP -MF $(DEPDIR)/lib540-lib540.Tpo -c -o lib540-lib540.obj `if test -f 'lib540.c'; then $(CYGPATH_W) 'lib540.c'; else $(CYGPATH_W) '$(srcdir)/lib540.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-lib540.Tpo $(DEPDIR)/lib540-lib540.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib540.c' object='lib540-lib540.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-lib540.obj `if test -f 'lib540.c'; then $(CYGPATH_W) 'lib540.c'; else $(CYGPATH_W) '$(srcdir)/lib540.c'; fi`
+
+lib540-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-first.o -MD -MP -MF $(DEPDIR)/lib540-first.Tpo -c -o lib540-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-first.Tpo $(DEPDIR)/lib540-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib540-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib540-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-first.obj -MD -MP -MF $(DEPDIR)/lib540-first.Tpo -c -o lib540-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-first.Tpo $(DEPDIR)/lib540-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib540-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib540-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-testutil.o -MD -MP -MF $(DEPDIR)/lib540-testutil.Tpo -c -o lib540-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-testutil.Tpo $(DEPDIR)/lib540-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib540-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib540-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-testutil.obj -MD -MP -MF $(DEPDIR)/lib540-testutil.Tpo -c -o lib540-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-testutil.Tpo $(DEPDIR)/lib540-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib540-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib540-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-warnless.o -MD -MP -MF $(DEPDIR)/lib540-warnless.Tpo -c -o lib540-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-warnless.Tpo $(DEPDIR)/lib540-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib540-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib540-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib540-warnless.obj -MD -MP -MF $(DEPDIR)/lib540-warnless.Tpo -c -o lib540-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib540-warnless.Tpo $(DEPDIR)/lib540-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib540-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib540-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib541-lib541.o: lib541.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib541-lib541.o -MD -MP -MF $(DEPDIR)/lib541-lib541.Tpo -c -o lib541-lib541.o `test -f 'lib541.c' || echo '$(srcdir)/'`lib541.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib541-lib541.Tpo $(DEPDIR)/lib541-lib541.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib541.c' object='lib541-lib541.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib541-lib541.o `test -f 'lib541.c' || echo '$(srcdir)/'`lib541.c
+
+lib541-lib541.obj: lib541.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib541-lib541.obj -MD -MP -MF $(DEPDIR)/lib541-lib541.Tpo -c -o lib541-lib541.obj `if test -f 'lib541.c'; then $(CYGPATH_W) 'lib541.c'; else $(CYGPATH_W) '$(srcdir)/lib541.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib541-lib541.Tpo $(DEPDIR)/lib541-lib541.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib541.c' object='lib541-lib541.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib541-lib541.obj `if test -f 'lib541.c'; then $(CYGPATH_W) 'lib541.c'; else $(CYGPATH_W) '$(srcdir)/lib541.c'; fi`
+
+lib541-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib541-first.o -MD -MP -MF $(DEPDIR)/lib541-first.Tpo -c -o lib541-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib541-first.Tpo $(DEPDIR)/lib541-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib541-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib541-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib541-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib541-first.obj -MD -MP -MF $(DEPDIR)/lib541-first.Tpo -c -o lib541-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib541-first.Tpo $(DEPDIR)/lib541-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib541-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib541_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib541-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib542-lib542.o: lib542.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib542-lib542.o -MD -MP -MF $(DEPDIR)/lib542-lib542.Tpo -c -o lib542-lib542.o `test -f 'lib542.c' || echo '$(srcdir)/'`lib542.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib542-lib542.Tpo $(DEPDIR)/lib542-lib542.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib542.c' object='lib542-lib542.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib542-lib542.o `test -f 'lib542.c' || echo '$(srcdir)/'`lib542.c
+
+lib542-lib542.obj: lib542.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib542-lib542.obj -MD -MP -MF $(DEPDIR)/lib542-lib542.Tpo -c -o lib542-lib542.obj `if test -f 'lib542.c'; then $(CYGPATH_W) 'lib542.c'; else $(CYGPATH_W) '$(srcdir)/lib542.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib542-lib542.Tpo $(DEPDIR)/lib542-lib542.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib542.c' object='lib542-lib542.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib542-lib542.obj `if test -f 'lib542.c'; then $(CYGPATH_W) 'lib542.c'; else $(CYGPATH_W) '$(srcdir)/lib542.c'; fi`
+
+lib542-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib542-first.o -MD -MP -MF $(DEPDIR)/lib542-first.Tpo -c -o lib542-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib542-first.Tpo $(DEPDIR)/lib542-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib542-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib542-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib542-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib542-first.obj -MD -MP -MF $(DEPDIR)/lib542-first.Tpo -c -o lib542-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib542-first.Tpo $(DEPDIR)/lib542-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib542-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib542_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib542-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib543-lib543.o: lib543.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib543-lib543.o -MD -MP -MF $(DEPDIR)/lib543-lib543.Tpo -c -o lib543-lib543.o `test -f 'lib543.c' || echo '$(srcdir)/'`lib543.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib543-lib543.Tpo $(DEPDIR)/lib543-lib543.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib543.c' object='lib543-lib543.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib543-lib543.o `test -f 'lib543.c' || echo '$(srcdir)/'`lib543.c
+
+lib543-lib543.obj: lib543.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib543-lib543.obj -MD -MP -MF $(DEPDIR)/lib543-lib543.Tpo -c -o lib543-lib543.obj `if test -f 'lib543.c'; then $(CYGPATH_W) 'lib543.c'; else $(CYGPATH_W) '$(srcdir)/lib543.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib543-lib543.Tpo $(DEPDIR)/lib543-lib543.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib543.c' object='lib543-lib543.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib543-lib543.obj `if test -f 'lib543.c'; then $(CYGPATH_W) 'lib543.c'; else $(CYGPATH_W) '$(srcdir)/lib543.c'; fi`
+
+lib543-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib543-first.o -MD -MP -MF $(DEPDIR)/lib543-first.Tpo -c -o lib543-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib543-first.Tpo $(DEPDIR)/lib543-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib543-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib543-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib543-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib543-first.obj -MD -MP -MF $(DEPDIR)/lib543-first.Tpo -c -o lib543-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib543-first.Tpo $(DEPDIR)/lib543-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib543-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib543_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib543-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib544-lib544.o: lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib544-lib544.o -MD -MP -MF $(DEPDIR)/lib544-lib544.Tpo -c -o lib544-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib544-lib544.Tpo $(DEPDIR)/lib544-lib544.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib544.c' object='lib544-lib544.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib544-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
+
+lib544-lib544.obj: lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib544-lib544.obj -MD -MP -MF $(DEPDIR)/lib544-lib544.Tpo -c -o lib544-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib544-lib544.Tpo $(DEPDIR)/lib544-lib544.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib544.c' object='lib544-lib544.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib544-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
+
+lib544-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib544-first.o -MD -MP -MF $(DEPDIR)/lib544-first.Tpo -c -o lib544-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib544-first.Tpo $(DEPDIR)/lib544-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib544-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib544-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib544-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib544-first.obj -MD -MP -MF $(DEPDIR)/lib544-first.Tpo -c -o lib544-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib544-first.Tpo $(DEPDIR)/lib544-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib544-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib544_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib544-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib545-lib544.o: lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib545-lib544.o -MD -MP -MF $(DEPDIR)/lib545-lib544.Tpo -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib545-lib544.Tpo $(DEPDIR)/lib545-lib544.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib544.c' object='lib545-lib544.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib545-lib544.o `test -f 'lib544.c' || echo '$(srcdir)/'`lib544.c
+
+lib545-lib544.obj: lib544.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib545-lib544.obj -MD -MP -MF $(DEPDIR)/lib545-lib544.Tpo -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib545-lib544.Tpo $(DEPDIR)/lib545-lib544.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib544.c' object='lib545-lib544.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib545-lib544.obj `if test -f 'lib544.c'; then $(CYGPATH_W) 'lib544.c'; else $(CYGPATH_W) '$(srcdir)/lib544.c'; fi`
+
+lib545-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib545-first.o -MD -MP -MF $(DEPDIR)/lib545-first.Tpo -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib545-first.Tpo $(DEPDIR)/lib545-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib545-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib545-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib545-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib545-first.obj -MD -MP -MF $(DEPDIR)/lib545-first.Tpo -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib545-first.Tpo $(DEPDIR)/lib545-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib545-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib545_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib545-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib547-lib547.o: lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib547-lib547.o -MD -MP -MF $(DEPDIR)/lib547-lib547.Tpo -c -o lib547-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib547-lib547.Tpo $(DEPDIR)/lib547-lib547.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib547.c' object='lib547-lib547.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib547-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
+
+lib547-lib547.obj: lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib547-lib547.obj -MD -MP -MF $(DEPDIR)/lib547-lib547.Tpo -c -o lib547-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib547-lib547.Tpo $(DEPDIR)/lib547-lib547.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib547.c' object='lib547-lib547.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib547-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
+
+lib547-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib547-first.o -MD -MP -MF $(DEPDIR)/lib547-first.Tpo -c -o lib547-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib547-first.Tpo $(DEPDIR)/lib547-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib547-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib547-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib547-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib547-first.obj -MD -MP -MF $(DEPDIR)/lib547-first.Tpo -c -o lib547-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib547-first.Tpo $(DEPDIR)/lib547-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib547-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib547_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib547-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib548-lib547.o: lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib548-lib547.o -MD -MP -MF $(DEPDIR)/lib548-lib547.Tpo -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib548-lib547.Tpo $(DEPDIR)/lib548-lib547.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib547.c' object='lib548-lib547.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib548-lib547.o `test -f 'lib547.c' || echo '$(srcdir)/'`lib547.c
+
+lib548-lib547.obj: lib547.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib548-lib547.obj -MD -MP -MF $(DEPDIR)/lib548-lib547.Tpo -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib548-lib547.Tpo $(DEPDIR)/lib548-lib547.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib547.c' object='lib548-lib547.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib548-lib547.obj `if test -f 'lib547.c'; then $(CYGPATH_W) 'lib547.c'; else $(CYGPATH_W) '$(srcdir)/lib547.c'; fi`
+
+lib548-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib548-first.o -MD -MP -MF $(DEPDIR)/lib548-first.Tpo -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib548-first.Tpo $(DEPDIR)/lib548-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib548-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib548-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib548-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib548-first.obj -MD -MP -MF $(DEPDIR)/lib548-first.Tpo -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib548-first.Tpo $(DEPDIR)/lib548-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib548-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib548_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib548-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib549-lib549.o: lib549.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib549-lib549.o -MD -MP -MF $(DEPDIR)/lib549-lib549.Tpo -c -o lib549-lib549.o `test -f 'lib549.c' || echo '$(srcdir)/'`lib549.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib549-lib549.Tpo $(DEPDIR)/lib549-lib549.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib549.c' object='lib549-lib549.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib549-lib549.o `test -f 'lib549.c' || echo '$(srcdir)/'`lib549.c
+
+lib549-lib549.obj: lib549.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib549-lib549.obj -MD -MP -MF $(DEPDIR)/lib549-lib549.Tpo -c -o lib549-lib549.obj `if test -f 'lib549.c'; then $(CYGPATH_W) 'lib549.c'; else $(CYGPATH_W) '$(srcdir)/lib549.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib549-lib549.Tpo $(DEPDIR)/lib549-lib549.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib549.c' object='lib549-lib549.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib549-lib549.obj `if test -f 'lib549.c'; then $(CYGPATH_W) 'lib549.c'; else $(CYGPATH_W) '$(srcdir)/lib549.c'; fi`
+
+lib549-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib549-first.o -MD -MP -MF $(DEPDIR)/lib549-first.Tpo -c -o lib549-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib549-first.Tpo $(DEPDIR)/lib549-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib549-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib549-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib549-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib549-first.obj -MD -MP -MF $(DEPDIR)/lib549-first.Tpo -c -o lib549-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib549-first.Tpo $(DEPDIR)/lib549-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib549-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib549_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib549-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib552-lib552.o: lib552.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-lib552.o -MD -MP -MF $(DEPDIR)/lib552-lib552.Tpo -c -o lib552-lib552.o `test -f 'lib552.c' || echo '$(srcdir)/'`lib552.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-lib552.Tpo $(DEPDIR)/lib552-lib552.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib552.c' object='lib552-lib552.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-lib552.o `test -f 'lib552.c' || echo '$(srcdir)/'`lib552.c
+
+lib552-lib552.obj: lib552.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-lib552.obj -MD -MP -MF $(DEPDIR)/lib552-lib552.Tpo -c -o lib552-lib552.obj `if test -f 'lib552.c'; then $(CYGPATH_W) 'lib552.c'; else $(CYGPATH_W) '$(srcdir)/lib552.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-lib552.Tpo $(DEPDIR)/lib552-lib552.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib552.c' object='lib552-lib552.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-lib552.obj `if test -f 'lib552.c'; then $(CYGPATH_W) 'lib552.c'; else $(CYGPATH_W) '$(srcdir)/lib552.c'; fi`
+
+lib552-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-first.o -MD -MP -MF $(DEPDIR)/lib552-first.Tpo -c -o lib552-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-first.Tpo $(DEPDIR)/lib552-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib552-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib552-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-first.obj -MD -MP -MF $(DEPDIR)/lib552-first.Tpo -c -o lib552-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-first.Tpo $(DEPDIR)/lib552-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib552-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib552-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-warnless.o -MD -MP -MF $(DEPDIR)/lib552-warnless.Tpo -c -o lib552-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-warnless.Tpo $(DEPDIR)/lib552-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib552-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib552-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib552-warnless.obj -MD -MP -MF $(DEPDIR)/lib552-warnless.Tpo -c -o lib552-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib552-warnless.Tpo $(DEPDIR)/lib552-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib552-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib552_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib552-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib553-lib553.o: lib553.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib553-lib553.o -MD -MP -MF $(DEPDIR)/lib553-lib553.Tpo -c -o lib553-lib553.o `test -f 'lib553.c' || echo '$(srcdir)/'`lib553.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib553-lib553.Tpo $(DEPDIR)/lib553-lib553.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib553.c' object='lib553-lib553.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib553-lib553.o `test -f 'lib553.c' || echo '$(srcdir)/'`lib553.c
+
+lib553-lib553.obj: lib553.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib553-lib553.obj -MD -MP -MF $(DEPDIR)/lib553-lib553.Tpo -c -o lib553-lib553.obj `if test -f 'lib553.c'; then $(CYGPATH_W) 'lib553.c'; else $(CYGPATH_W) '$(srcdir)/lib553.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib553-lib553.Tpo $(DEPDIR)/lib553-lib553.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib553.c' object='lib553-lib553.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib553-lib553.obj `if test -f 'lib553.c'; then $(CYGPATH_W) 'lib553.c'; else $(CYGPATH_W) '$(srcdir)/lib553.c'; fi`
+
+lib553-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib553-first.o -MD -MP -MF $(DEPDIR)/lib553-first.Tpo -c -o lib553-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib553-first.Tpo $(DEPDIR)/lib553-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib553-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib553-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib553-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib553-first.obj -MD -MP -MF $(DEPDIR)/lib553-first.Tpo -c -o lib553-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib553-first.Tpo $(DEPDIR)/lib553-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib553-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib553_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib553-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib554-lib554.o: lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib554-lib554.o -MD -MP -MF $(DEPDIR)/lib554-lib554.Tpo -c -o lib554-lib554.o `test -f 'lib554.c' || echo '$(srcdir)/'`lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib554-lib554.Tpo $(DEPDIR)/lib554-lib554.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib554.c' object='lib554-lib554.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib554-lib554.o `test -f 'lib554.c' || echo '$(srcdir)/'`lib554.c
+
+lib554-lib554.obj: lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib554-lib554.obj -MD -MP -MF $(DEPDIR)/lib554-lib554.Tpo -c -o lib554-lib554.obj `if test -f 'lib554.c'; then $(CYGPATH_W) 'lib554.c'; else $(CYGPATH_W) '$(srcdir)/lib554.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib554-lib554.Tpo $(DEPDIR)/lib554-lib554.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib554.c' object='lib554-lib554.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib554-lib554.obj `if test -f 'lib554.c'; then $(CYGPATH_W) 'lib554.c'; else $(CYGPATH_W) '$(srcdir)/lib554.c'; fi`
+
+lib554-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib554-first.o -MD -MP -MF $(DEPDIR)/lib554-first.Tpo -c -o lib554-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib554-first.Tpo $(DEPDIR)/lib554-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib554-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib554-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib554-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib554-first.obj -MD -MP -MF $(DEPDIR)/lib554-first.Tpo -c -o lib554-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib554-first.Tpo $(DEPDIR)/lib554-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib554-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib554_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib554-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib555-lib555.o: lib555.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-lib555.o -MD -MP -MF $(DEPDIR)/lib555-lib555.Tpo -c -o lib555-lib555.o `test -f 'lib555.c' || echo '$(srcdir)/'`lib555.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-lib555.Tpo $(DEPDIR)/lib555-lib555.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib555.c' object='lib555-lib555.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-lib555.o `test -f 'lib555.c' || echo '$(srcdir)/'`lib555.c
+
+lib555-lib555.obj: lib555.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-lib555.obj -MD -MP -MF $(DEPDIR)/lib555-lib555.Tpo -c -o lib555-lib555.obj `if test -f 'lib555.c'; then $(CYGPATH_W) 'lib555.c'; else $(CYGPATH_W) '$(srcdir)/lib555.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-lib555.Tpo $(DEPDIR)/lib555-lib555.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib555.c' object='lib555-lib555.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-lib555.obj `if test -f 'lib555.c'; then $(CYGPATH_W) 'lib555.c'; else $(CYGPATH_W) '$(srcdir)/lib555.c'; fi`
+
+lib555-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-first.o -MD -MP -MF $(DEPDIR)/lib555-first.Tpo -c -o lib555-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-first.Tpo $(DEPDIR)/lib555-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib555-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib555-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-first.obj -MD -MP -MF $(DEPDIR)/lib555-first.Tpo -c -o lib555-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-first.Tpo $(DEPDIR)/lib555-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib555-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib555-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-testutil.o -MD -MP -MF $(DEPDIR)/lib555-testutil.Tpo -c -o lib555-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-testutil.Tpo $(DEPDIR)/lib555-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib555-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib555-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-testutil.obj -MD -MP -MF $(DEPDIR)/lib555-testutil.Tpo -c -o lib555-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-testutil.Tpo $(DEPDIR)/lib555-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib555-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib555-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-warnless.o -MD -MP -MF $(DEPDIR)/lib555-warnless.Tpo -c -o lib555-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-warnless.Tpo $(DEPDIR)/lib555-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib555-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib555-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib555-warnless.obj -MD -MP -MF $(DEPDIR)/lib555-warnless.Tpo -c -o lib555-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib555-warnless.Tpo $(DEPDIR)/lib555-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib555-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib555_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib555-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib556-lib556.o: lib556.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib556-lib556.o -MD -MP -MF $(DEPDIR)/lib556-lib556.Tpo -c -o lib556-lib556.o `test -f 'lib556.c' || echo '$(srcdir)/'`lib556.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib556-lib556.Tpo $(DEPDIR)/lib556-lib556.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib556.c' object='lib556-lib556.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib556-lib556.o `test -f 'lib556.c' || echo '$(srcdir)/'`lib556.c
+
+lib556-lib556.obj: lib556.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib556-lib556.obj -MD -MP -MF $(DEPDIR)/lib556-lib556.Tpo -c -o lib556-lib556.obj `if test -f 'lib556.c'; then $(CYGPATH_W) 'lib556.c'; else $(CYGPATH_W) '$(srcdir)/lib556.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib556-lib556.Tpo $(DEPDIR)/lib556-lib556.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib556.c' object='lib556-lib556.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib556-lib556.obj `if test -f 'lib556.c'; then $(CYGPATH_W) 'lib556.c'; else $(CYGPATH_W) '$(srcdir)/lib556.c'; fi`
+
+lib556-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib556-first.o -MD -MP -MF $(DEPDIR)/lib556-first.Tpo -c -o lib556-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib556-first.Tpo $(DEPDIR)/lib556-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib556-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib556-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib556-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib556-first.obj -MD -MP -MF $(DEPDIR)/lib556-first.Tpo -c -o lib556-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib556-first.Tpo $(DEPDIR)/lib556-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib556-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib556_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib556-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib557-lib557.o: lib557.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib557-lib557.o -MD -MP -MF $(DEPDIR)/lib557-lib557.Tpo -c -o lib557-lib557.o `test -f 'lib557.c' || echo '$(srcdir)/'`lib557.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib557-lib557.Tpo $(DEPDIR)/lib557-lib557.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib557.c' object='lib557-lib557.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib557-lib557.o `test -f 'lib557.c' || echo '$(srcdir)/'`lib557.c
+
+lib557-lib557.obj: lib557.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib557-lib557.obj -MD -MP -MF $(DEPDIR)/lib557-lib557.Tpo -c -o lib557-lib557.obj `if test -f 'lib557.c'; then $(CYGPATH_W) 'lib557.c'; else $(CYGPATH_W) '$(srcdir)/lib557.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib557-lib557.Tpo $(DEPDIR)/lib557-lib557.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib557.c' object='lib557-lib557.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib557-lib557.obj `if test -f 'lib557.c'; then $(CYGPATH_W) 'lib557.c'; else $(CYGPATH_W) '$(srcdir)/lib557.c'; fi`
+
+lib557-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib557-first.o -MD -MP -MF $(DEPDIR)/lib557-first.Tpo -c -o lib557-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib557-first.Tpo $(DEPDIR)/lib557-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib557-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib557-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib557-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib557-first.obj -MD -MP -MF $(DEPDIR)/lib557-first.Tpo -c -o lib557-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib557-first.Tpo $(DEPDIR)/lib557-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib557-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib557_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib557-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib558-lib558.o: lib558.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib558-lib558.o -MD -MP -MF $(DEPDIR)/lib558-lib558.Tpo -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib558-lib558.Tpo $(DEPDIR)/lib558-lib558.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib558.c' object='lib558-lib558.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib558-lib558.o `test -f 'lib558.c' || echo '$(srcdir)/'`lib558.c
+
+lib558-lib558.obj: lib558.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib558-lib558.obj -MD -MP -MF $(DEPDIR)/lib558-lib558.Tpo -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib558-lib558.Tpo $(DEPDIR)/lib558-lib558.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib558.c' object='lib558-lib558.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib558-lib558.obj `if test -f 'lib558.c'; then $(CYGPATH_W) 'lib558.c'; else $(CYGPATH_W) '$(srcdir)/lib558.c'; fi`
+
+lib558-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib558-first.o -MD -MP -MF $(DEPDIR)/lib558-first.Tpo -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib558-first.Tpo $(DEPDIR)/lib558-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib558-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib558-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib558-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib558-first.obj -MD -MP -MF $(DEPDIR)/lib558-first.Tpo -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib558-first.Tpo $(DEPDIR)/lib558-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib558-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib560-lib560.o: lib560.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-lib560.o -MD -MP -MF $(DEPDIR)/lib560-lib560.Tpo -c -o lib560-lib560.o `test -f 'lib560.c' || echo '$(srcdir)/'`lib560.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-lib560.Tpo $(DEPDIR)/lib560-lib560.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib560.c' object='lib560-lib560.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-lib560.o `test -f 'lib560.c' || echo '$(srcdir)/'`lib560.c
+
+lib560-lib560.obj: lib560.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-lib560.obj -MD -MP -MF $(DEPDIR)/lib560-lib560.Tpo -c -o lib560-lib560.obj `if test -f 'lib560.c'; then $(CYGPATH_W) 'lib560.c'; else $(CYGPATH_W) '$(srcdir)/lib560.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-lib560.Tpo $(DEPDIR)/lib560-lib560.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib560.c' object='lib560-lib560.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-lib560.obj `if test -f 'lib560.c'; then $(CYGPATH_W) 'lib560.c'; else $(CYGPATH_W) '$(srcdir)/lib560.c'; fi`
+
+lib560-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-first.o -MD -MP -MF $(DEPDIR)/lib560-first.Tpo -c -o lib560-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-first.Tpo $(DEPDIR)/lib560-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib560-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib560-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-first.obj -MD -MP -MF $(DEPDIR)/lib560-first.Tpo -c -o lib560-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-first.Tpo $(DEPDIR)/lib560-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib560-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib560-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-testutil.o -MD -MP -MF $(DEPDIR)/lib560-testutil.Tpo -c -o lib560-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-testutil.Tpo $(DEPDIR)/lib560-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib560-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib560-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-testutil.obj -MD -MP -MF $(DEPDIR)/lib560-testutil.Tpo -c -o lib560-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-testutil.Tpo $(DEPDIR)/lib560-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib560-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib560-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-warnless.o -MD -MP -MF $(DEPDIR)/lib560-warnless.Tpo -c -o lib560-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-warnless.Tpo $(DEPDIR)/lib560-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib560-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib560-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-warnless.obj -MD -MP -MF $(DEPDIR)/lib560-warnless.Tpo -c -o lib560-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-warnless.Tpo $(DEPDIR)/lib560-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib560-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib560-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib562-lib562.o: lib562.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib562-lib562.o -MD -MP -MF $(DEPDIR)/lib562-lib562.Tpo -c -o lib562-lib562.o `test -f 'lib562.c' || echo '$(srcdir)/'`lib562.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib562-lib562.Tpo $(DEPDIR)/lib562-lib562.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib562.c' object='lib562-lib562.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib562-lib562.o `test -f 'lib562.c' || echo '$(srcdir)/'`lib562.c
+
+lib562-lib562.obj: lib562.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib562-lib562.obj -MD -MP -MF $(DEPDIR)/lib562-lib562.Tpo -c -o lib562-lib562.obj `if test -f 'lib562.c'; then $(CYGPATH_W) 'lib562.c'; else $(CYGPATH_W) '$(srcdir)/lib562.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib562-lib562.Tpo $(DEPDIR)/lib562-lib562.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib562.c' object='lib562-lib562.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib562-lib562.obj `if test -f 'lib562.c'; then $(CYGPATH_W) 'lib562.c'; else $(CYGPATH_W) '$(srcdir)/lib562.c'; fi`
+
+lib562-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib562-first.o -MD -MP -MF $(DEPDIR)/lib562-first.Tpo -c -o lib562-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib562-first.Tpo $(DEPDIR)/lib562-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib562-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib562-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib562-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib562-first.obj -MD -MP -MF $(DEPDIR)/lib562-first.Tpo -c -o lib562-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib562-first.Tpo $(DEPDIR)/lib562-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib562-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib562_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib562-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib564-lib564.o: lib564.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-lib564.o -MD -MP -MF $(DEPDIR)/lib564-lib564.Tpo -c -o lib564-lib564.o `test -f 'lib564.c' || echo '$(srcdir)/'`lib564.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-lib564.Tpo $(DEPDIR)/lib564-lib564.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib564.c' object='lib564-lib564.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-lib564.o `test -f 'lib564.c' || echo '$(srcdir)/'`lib564.c
+
+lib564-lib564.obj: lib564.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-lib564.obj -MD -MP -MF $(DEPDIR)/lib564-lib564.Tpo -c -o lib564-lib564.obj `if test -f 'lib564.c'; then $(CYGPATH_W) 'lib564.c'; else $(CYGPATH_W) '$(srcdir)/lib564.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-lib564.Tpo $(DEPDIR)/lib564-lib564.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib564.c' object='lib564-lib564.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-lib564.obj `if test -f 'lib564.c'; then $(CYGPATH_W) 'lib564.c'; else $(CYGPATH_W) '$(srcdir)/lib564.c'; fi`
+
+lib564-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-first.o -MD -MP -MF $(DEPDIR)/lib564-first.Tpo -c -o lib564-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-first.Tpo $(DEPDIR)/lib564-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib564-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib564-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-first.obj -MD -MP -MF $(DEPDIR)/lib564-first.Tpo -c -o lib564-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-first.Tpo $(DEPDIR)/lib564-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib564-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib564-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-testutil.o -MD -MP -MF $(DEPDIR)/lib564-testutil.Tpo -c -o lib564-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-testutil.Tpo $(DEPDIR)/lib564-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib564-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib564-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-testutil.obj -MD -MP -MF $(DEPDIR)/lib564-testutil.Tpo -c -o lib564-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-testutil.Tpo $(DEPDIR)/lib564-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib564-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib564-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-warnless.o -MD -MP -MF $(DEPDIR)/lib564-warnless.Tpo -c -o lib564-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-warnless.Tpo $(DEPDIR)/lib564-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib564-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib564-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib564-warnless.obj -MD -MP -MF $(DEPDIR)/lib564-warnless.Tpo -c -o lib564-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib564-warnless.Tpo $(DEPDIR)/lib564-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib564-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib564_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib564-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib565-lib510.o: lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib565-lib510.o -MD -MP -MF $(DEPDIR)/lib565-lib510.Tpo -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib565-lib510.Tpo $(DEPDIR)/lib565-lib510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib510.c' object='lib565-lib510.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib565-lib510.o `test -f 'lib510.c' || echo '$(srcdir)/'`lib510.c
+
+lib565-lib510.obj: lib510.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib565-lib510.obj -MD -MP -MF $(DEPDIR)/lib565-lib510.Tpo -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib565-lib510.Tpo $(DEPDIR)/lib565-lib510.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib510.c' object='lib565-lib510.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib565-lib510.obj `if test -f 'lib510.c'; then $(CYGPATH_W) 'lib510.c'; else $(CYGPATH_W) '$(srcdir)/lib510.c'; fi`
+
+lib565-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib565-first.o -MD -MP -MF $(DEPDIR)/lib565-first.Tpo -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib565-first.Tpo $(DEPDIR)/lib565-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib565-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib565-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib565-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib565-first.obj -MD -MP -MF $(DEPDIR)/lib565-first.Tpo -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib565-first.Tpo $(DEPDIR)/lib565-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib565-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib565_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib565-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib566-lib566.o: lib566.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib566-lib566.o -MD -MP -MF $(DEPDIR)/lib566-lib566.Tpo -c -o lib566-lib566.o `test -f 'lib566.c' || echo '$(srcdir)/'`lib566.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib566-lib566.Tpo $(DEPDIR)/lib566-lib566.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib566.c' object='lib566-lib566.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib566-lib566.o `test -f 'lib566.c' || echo '$(srcdir)/'`lib566.c
+
+lib566-lib566.obj: lib566.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib566-lib566.obj -MD -MP -MF $(DEPDIR)/lib566-lib566.Tpo -c -o lib566-lib566.obj `if test -f 'lib566.c'; then $(CYGPATH_W) 'lib566.c'; else $(CYGPATH_W) '$(srcdir)/lib566.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib566-lib566.Tpo $(DEPDIR)/lib566-lib566.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib566.c' object='lib566-lib566.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib566-lib566.obj `if test -f 'lib566.c'; then $(CYGPATH_W) 'lib566.c'; else $(CYGPATH_W) '$(srcdir)/lib566.c'; fi`
+
+lib566-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib566-first.o -MD -MP -MF $(DEPDIR)/lib566-first.Tpo -c -o lib566-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib566-first.Tpo $(DEPDIR)/lib566-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib566-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib566-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib566-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib566-first.obj -MD -MP -MF $(DEPDIR)/lib566-first.Tpo -c -o lib566-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib566-first.Tpo $(DEPDIR)/lib566-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib566-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib566_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib566-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib567-lib567.o: lib567.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib567-lib567.o -MD -MP -MF $(DEPDIR)/lib567-lib567.Tpo -c -o lib567-lib567.o `test -f 'lib567.c' || echo '$(srcdir)/'`lib567.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib567-lib567.Tpo $(DEPDIR)/lib567-lib567.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib567.c' object='lib567-lib567.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib567-lib567.o `test -f 'lib567.c' || echo '$(srcdir)/'`lib567.c
+
+lib567-lib567.obj: lib567.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib567-lib567.obj -MD -MP -MF $(DEPDIR)/lib567-lib567.Tpo -c -o lib567-lib567.obj `if test -f 'lib567.c'; then $(CYGPATH_W) 'lib567.c'; else $(CYGPATH_W) '$(srcdir)/lib567.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib567-lib567.Tpo $(DEPDIR)/lib567-lib567.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib567.c' object='lib567-lib567.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib567-lib567.obj `if test -f 'lib567.c'; then $(CYGPATH_W) 'lib567.c'; else $(CYGPATH_W) '$(srcdir)/lib567.c'; fi`
+
+lib567-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib567-first.o -MD -MP -MF $(DEPDIR)/lib567-first.Tpo -c -o lib567-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib567-first.Tpo $(DEPDIR)/lib567-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib567-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib567-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib567-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib567-first.obj -MD -MP -MF $(DEPDIR)/lib567-first.Tpo -c -o lib567-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib567-first.Tpo $(DEPDIR)/lib567-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib567-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib567_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib567-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib568-lib568.o: lib568.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib568-lib568.o -MD -MP -MF $(DEPDIR)/lib568-lib568.Tpo -c -o lib568-lib568.o `test -f 'lib568.c' || echo '$(srcdir)/'`lib568.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib568-lib568.Tpo $(DEPDIR)/lib568-lib568.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib568.c' object='lib568-lib568.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib568-lib568.o `test -f 'lib568.c' || echo '$(srcdir)/'`lib568.c
+
+lib568-lib568.obj: lib568.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib568-lib568.obj -MD -MP -MF $(DEPDIR)/lib568-lib568.Tpo -c -o lib568-lib568.obj `if test -f 'lib568.c'; then $(CYGPATH_W) 'lib568.c'; else $(CYGPATH_W) '$(srcdir)/lib568.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib568-lib568.Tpo $(DEPDIR)/lib568-lib568.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib568.c' object='lib568-lib568.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib568-lib568.obj `if test -f 'lib568.c'; then $(CYGPATH_W) 'lib568.c'; else $(CYGPATH_W) '$(srcdir)/lib568.c'; fi`
+
+lib568-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib568-first.o -MD -MP -MF $(DEPDIR)/lib568-first.Tpo -c -o lib568-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib568-first.Tpo $(DEPDIR)/lib568-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib568-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib568-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib568-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib568-first.obj -MD -MP -MF $(DEPDIR)/lib568-first.Tpo -c -o lib568-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib568-first.Tpo $(DEPDIR)/lib568-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib568-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib568_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib568-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib569-lib569.o: lib569.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib569-lib569.o -MD -MP -MF $(DEPDIR)/lib569-lib569.Tpo -c -o lib569-lib569.o `test -f 'lib569.c' || echo '$(srcdir)/'`lib569.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib569-lib569.Tpo $(DEPDIR)/lib569-lib569.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib569.c' object='lib569-lib569.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib569-lib569.o `test -f 'lib569.c' || echo '$(srcdir)/'`lib569.c
+
+lib569-lib569.obj: lib569.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib569-lib569.obj -MD -MP -MF $(DEPDIR)/lib569-lib569.Tpo -c -o lib569-lib569.obj `if test -f 'lib569.c'; then $(CYGPATH_W) 'lib569.c'; else $(CYGPATH_W) '$(srcdir)/lib569.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib569-lib569.Tpo $(DEPDIR)/lib569-lib569.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib569.c' object='lib569-lib569.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib569-lib569.obj `if test -f 'lib569.c'; then $(CYGPATH_W) 'lib569.c'; else $(CYGPATH_W) '$(srcdir)/lib569.c'; fi`
+
+lib569-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib569-first.o -MD -MP -MF $(DEPDIR)/lib569-first.Tpo -c -o lib569-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib569-first.Tpo $(DEPDIR)/lib569-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib569-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib569-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib569-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib569-first.obj -MD -MP -MF $(DEPDIR)/lib569-first.Tpo -c -o lib569-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib569-first.Tpo $(DEPDIR)/lib569-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib569-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib569_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib569-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib570-lib570.o: lib570.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib570-lib570.o -MD -MP -MF $(DEPDIR)/lib570-lib570.Tpo -c -o lib570-lib570.o `test -f 'lib570.c' || echo '$(srcdir)/'`lib570.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib570-lib570.Tpo $(DEPDIR)/lib570-lib570.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib570.c' object='lib570-lib570.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib570-lib570.o `test -f 'lib570.c' || echo '$(srcdir)/'`lib570.c
+
+lib570-lib570.obj: lib570.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib570-lib570.obj -MD -MP -MF $(DEPDIR)/lib570-lib570.Tpo -c -o lib570-lib570.obj `if test -f 'lib570.c'; then $(CYGPATH_W) 'lib570.c'; else $(CYGPATH_W) '$(srcdir)/lib570.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib570-lib570.Tpo $(DEPDIR)/lib570-lib570.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib570.c' object='lib570-lib570.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib570-lib570.obj `if test -f 'lib570.c'; then $(CYGPATH_W) 'lib570.c'; else $(CYGPATH_W) '$(srcdir)/lib570.c'; fi`
+
+lib570-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib570-first.o -MD -MP -MF $(DEPDIR)/lib570-first.Tpo -c -o lib570-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib570-first.Tpo $(DEPDIR)/lib570-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib570-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib570-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib570-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib570-first.obj -MD -MP -MF $(DEPDIR)/lib570-first.Tpo -c -o lib570-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib570-first.Tpo $(DEPDIR)/lib570-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib570-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib570_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib570-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib571-lib571.o: lib571.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-lib571.o -MD -MP -MF $(DEPDIR)/lib571-lib571.Tpo -c -o lib571-lib571.o `test -f 'lib571.c' || echo '$(srcdir)/'`lib571.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-lib571.Tpo $(DEPDIR)/lib571-lib571.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib571.c' object='lib571-lib571.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-lib571.o `test -f 'lib571.c' || echo '$(srcdir)/'`lib571.c
+
+lib571-lib571.obj: lib571.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-lib571.obj -MD -MP -MF $(DEPDIR)/lib571-lib571.Tpo -c -o lib571-lib571.obj `if test -f 'lib571.c'; then $(CYGPATH_W) 'lib571.c'; else $(CYGPATH_W) '$(srcdir)/lib571.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-lib571.Tpo $(DEPDIR)/lib571-lib571.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib571.c' object='lib571-lib571.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-lib571.obj `if test -f 'lib571.c'; then $(CYGPATH_W) 'lib571.c'; else $(CYGPATH_W) '$(srcdir)/lib571.c'; fi`
+
+lib571-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-first.o -MD -MP -MF $(DEPDIR)/lib571-first.Tpo -c -o lib571-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-first.Tpo $(DEPDIR)/lib571-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib571-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib571-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-first.obj -MD -MP -MF $(DEPDIR)/lib571-first.Tpo -c -o lib571-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-first.Tpo $(DEPDIR)/lib571-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib571-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib571-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-warnless.o -MD -MP -MF $(DEPDIR)/lib571-warnless.Tpo -c -o lib571-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-warnless.Tpo $(DEPDIR)/lib571-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib571-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib571-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib571-warnless.obj -MD -MP -MF $(DEPDIR)/lib571-warnless.Tpo -c -o lib571-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib571-warnless.Tpo $(DEPDIR)/lib571-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib571-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib571_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib571-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib572-lib572.o: lib572.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib572-lib572.o -MD -MP -MF $(DEPDIR)/lib572-lib572.Tpo -c -o lib572-lib572.o `test -f 'lib572.c' || echo '$(srcdir)/'`lib572.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib572-lib572.Tpo $(DEPDIR)/lib572-lib572.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib572.c' object='lib572-lib572.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib572-lib572.o `test -f 'lib572.c' || echo '$(srcdir)/'`lib572.c
+
+lib572-lib572.obj: lib572.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib572-lib572.obj -MD -MP -MF $(DEPDIR)/lib572-lib572.Tpo -c -o lib572-lib572.obj `if test -f 'lib572.c'; then $(CYGPATH_W) 'lib572.c'; else $(CYGPATH_W) '$(srcdir)/lib572.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib572-lib572.Tpo $(DEPDIR)/lib572-lib572.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib572.c' object='lib572-lib572.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib572-lib572.obj `if test -f 'lib572.c'; then $(CYGPATH_W) 'lib572.c'; else $(CYGPATH_W) '$(srcdir)/lib572.c'; fi`
+
+lib572-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib572-first.o -MD -MP -MF $(DEPDIR)/lib572-first.Tpo -c -o lib572-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib572-first.Tpo $(DEPDIR)/lib572-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib572-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib572-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib572-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib572-first.obj -MD -MP -MF $(DEPDIR)/lib572-first.Tpo -c -o lib572-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib572-first.Tpo $(DEPDIR)/lib572-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib572-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib572_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib572-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib573-lib573.o: lib573.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-lib573.o -MD -MP -MF $(DEPDIR)/lib573-lib573.Tpo -c -o lib573-lib573.o `test -f 'lib573.c' || echo '$(srcdir)/'`lib573.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-lib573.Tpo $(DEPDIR)/lib573-lib573.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib573.c' object='lib573-lib573.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-lib573.o `test -f 'lib573.c' || echo '$(srcdir)/'`lib573.c
+
+lib573-lib573.obj: lib573.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-lib573.obj -MD -MP -MF $(DEPDIR)/lib573-lib573.Tpo -c -o lib573-lib573.obj `if test -f 'lib573.c'; then $(CYGPATH_W) 'lib573.c'; else $(CYGPATH_W) '$(srcdir)/lib573.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-lib573.Tpo $(DEPDIR)/lib573-lib573.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib573.c' object='lib573-lib573.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-lib573.obj `if test -f 'lib573.c'; then $(CYGPATH_W) 'lib573.c'; else $(CYGPATH_W) '$(srcdir)/lib573.c'; fi`
+
+lib573-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-first.o -MD -MP -MF $(DEPDIR)/lib573-first.Tpo -c -o lib573-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-first.Tpo $(DEPDIR)/lib573-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib573-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib573-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-first.obj -MD -MP -MF $(DEPDIR)/lib573-first.Tpo -c -o lib573-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-first.Tpo $(DEPDIR)/lib573-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib573-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib573-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-testutil.o -MD -MP -MF $(DEPDIR)/lib573-testutil.Tpo -c -o lib573-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-testutil.Tpo $(DEPDIR)/lib573-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib573-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib573-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-testutil.obj -MD -MP -MF $(DEPDIR)/lib573-testutil.Tpo -c -o lib573-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-testutil.Tpo $(DEPDIR)/lib573-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib573-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib573-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-warnless.o -MD -MP -MF $(DEPDIR)/lib573-warnless.Tpo -c -o lib573-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-warnless.Tpo $(DEPDIR)/lib573-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib573-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib573-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-warnless.obj -MD -MP -MF $(DEPDIR)/lib573-warnless.Tpo -c -o lib573-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-warnless.Tpo $(DEPDIR)/lib573-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib573-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib573-testtrace.o: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-testtrace.o -MD -MP -MF $(DEPDIR)/lib573-testtrace.Tpo -c -o lib573-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-testtrace.Tpo $(DEPDIR)/lib573-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib573-testtrace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+
+lib573-testtrace.obj: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib573-testtrace.obj -MD -MP -MF $(DEPDIR)/lib573-testtrace.Tpo -c -o lib573-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib573-testtrace.Tpo $(DEPDIR)/lib573-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib573-testtrace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib573_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib573-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+
+lib574-lib574.o: lib574.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib574-lib574.o -MD -MP -MF $(DEPDIR)/lib574-lib574.Tpo -c -o lib574-lib574.o `test -f 'lib574.c' || echo '$(srcdir)/'`lib574.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib574-lib574.Tpo $(DEPDIR)/lib574-lib574.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib574.c' object='lib574-lib574.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib574-lib574.o `test -f 'lib574.c' || echo '$(srcdir)/'`lib574.c
+
+lib574-lib574.obj: lib574.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib574-lib574.obj -MD -MP -MF $(DEPDIR)/lib574-lib574.Tpo -c -o lib574-lib574.obj `if test -f 'lib574.c'; then $(CYGPATH_W) 'lib574.c'; else $(CYGPATH_W) '$(srcdir)/lib574.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib574-lib574.Tpo $(DEPDIR)/lib574-lib574.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib574.c' object='lib574-lib574.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib574-lib574.obj `if test -f 'lib574.c'; then $(CYGPATH_W) 'lib574.c'; else $(CYGPATH_W) '$(srcdir)/lib574.c'; fi`
+
+lib574-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib574-first.o -MD -MP -MF $(DEPDIR)/lib574-first.Tpo -c -o lib574-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib574-first.Tpo $(DEPDIR)/lib574-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib574-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib574-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib574-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib574-first.obj -MD -MP -MF $(DEPDIR)/lib574-first.Tpo -c -o lib574-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib574-first.Tpo $(DEPDIR)/lib574-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib574-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib574_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib574-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib575-lib575.o: lib575.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-lib575.o -MD -MP -MF $(DEPDIR)/lib575-lib575.Tpo -c -o lib575-lib575.o `test -f 'lib575.c' || echo '$(srcdir)/'`lib575.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-lib575.Tpo $(DEPDIR)/lib575-lib575.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib575.c' object='lib575-lib575.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-lib575.o `test -f 'lib575.c' || echo '$(srcdir)/'`lib575.c
+
+lib575-lib575.obj: lib575.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-lib575.obj -MD -MP -MF $(DEPDIR)/lib575-lib575.Tpo -c -o lib575-lib575.obj `if test -f 'lib575.c'; then $(CYGPATH_W) 'lib575.c'; else $(CYGPATH_W) '$(srcdir)/lib575.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-lib575.Tpo $(DEPDIR)/lib575-lib575.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib575.c' object='lib575-lib575.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-lib575.obj `if test -f 'lib575.c'; then $(CYGPATH_W) 'lib575.c'; else $(CYGPATH_W) '$(srcdir)/lib575.c'; fi`
+
+lib575-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-first.o -MD -MP -MF $(DEPDIR)/lib575-first.Tpo -c -o lib575-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-first.Tpo $(DEPDIR)/lib575-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib575-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib575-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-first.obj -MD -MP -MF $(DEPDIR)/lib575-first.Tpo -c -o lib575-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-first.Tpo $(DEPDIR)/lib575-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib575-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib575-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-testutil.o -MD -MP -MF $(DEPDIR)/lib575-testutil.Tpo -c -o lib575-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-testutil.Tpo $(DEPDIR)/lib575-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib575-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib575-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-testutil.obj -MD -MP -MF $(DEPDIR)/lib575-testutil.Tpo -c -o lib575-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-testutil.Tpo $(DEPDIR)/lib575-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib575-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib575-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-warnless.o -MD -MP -MF $(DEPDIR)/lib575-warnless.Tpo -c -o lib575-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-warnless.Tpo $(DEPDIR)/lib575-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib575-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib575-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib575-warnless.obj -MD -MP -MF $(DEPDIR)/lib575-warnless.Tpo -c -o lib575-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib575-warnless.Tpo $(DEPDIR)/lib575-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib575-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib575_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib575-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib576-lib576.o: lib576.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib576-lib576.o -MD -MP -MF $(DEPDIR)/lib576-lib576.Tpo -c -o lib576-lib576.o `test -f 'lib576.c' || echo '$(srcdir)/'`lib576.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib576-lib576.Tpo $(DEPDIR)/lib576-lib576.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib576.c' object='lib576-lib576.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib576-lib576.o `test -f 'lib576.c' || echo '$(srcdir)/'`lib576.c
+
+lib576-lib576.obj: lib576.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib576-lib576.obj -MD -MP -MF $(DEPDIR)/lib576-lib576.Tpo -c -o lib576-lib576.obj `if test -f 'lib576.c'; then $(CYGPATH_W) 'lib576.c'; else $(CYGPATH_W) '$(srcdir)/lib576.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib576-lib576.Tpo $(DEPDIR)/lib576-lib576.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib576.c' object='lib576-lib576.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib576-lib576.obj `if test -f 'lib576.c'; then $(CYGPATH_W) 'lib576.c'; else $(CYGPATH_W) '$(srcdir)/lib576.c'; fi`
+
+lib576-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib576-first.o -MD -MP -MF $(DEPDIR)/lib576-first.Tpo -c -o lib576-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib576-first.Tpo $(DEPDIR)/lib576-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib576-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib576-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib576-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib576-first.obj -MD -MP -MF $(DEPDIR)/lib576-first.Tpo -c -o lib576-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib576-first.Tpo $(DEPDIR)/lib576-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib576-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib576_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib576-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib578-lib578.o: lib578.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib578-lib578.o -MD -MP -MF $(DEPDIR)/lib578-lib578.Tpo -c -o lib578-lib578.o `test -f 'lib578.c' || echo '$(srcdir)/'`lib578.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib578-lib578.Tpo $(DEPDIR)/lib578-lib578.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib578.c' object='lib578-lib578.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib578-lib578.o `test -f 'lib578.c' || echo '$(srcdir)/'`lib578.c
+
+lib578-lib578.obj: lib578.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib578-lib578.obj -MD -MP -MF $(DEPDIR)/lib578-lib578.Tpo -c -o lib578-lib578.obj `if test -f 'lib578.c'; then $(CYGPATH_W) 'lib578.c'; else $(CYGPATH_W) '$(srcdir)/lib578.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib578-lib578.Tpo $(DEPDIR)/lib578-lib578.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib578.c' object='lib578-lib578.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib578-lib578.obj `if test -f 'lib578.c'; then $(CYGPATH_W) 'lib578.c'; else $(CYGPATH_W) '$(srcdir)/lib578.c'; fi`
+
+lib578-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib578-first.o -MD -MP -MF $(DEPDIR)/lib578-first.Tpo -c -o lib578-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib578-first.Tpo $(DEPDIR)/lib578-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib578-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib578-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib578-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib578-first.obj -MD -MP -MF $(DEPDIR)/lib578-first.Tpo -c -o lib578-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib578-first.Tpo $(DEPDIR)/lib578-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib578-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib578_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib578-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib579-lib579.o: lib579.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib579-lib579.o -MD -MP -MF $(DEPDIR)/lib579-lib579.Tpo -c -o lib579-lib579.o `test -f 'lib579.c' || echo '$(srcdir)/'`lib579.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib579-lib579.Tpo $(DEPDIR)/lib579-lib579.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib579.c' object='lib579-lib579.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib579-lib579.o `test -f 'lib579.c' || echo '$(srcdir)/'`lib579.c
+
+lib579-lib579.obj: lib579.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib579-lib579.obj -MD -MP -MF $(DEPDIR)/lib579-lib579.Tpo -c -o lib579-lib579.obj `if test -f 'lib579.c'; then $(CYGPATH_W) 'lib579.c'; else $(CYGPATH_W) '$(srcdir)/lib579.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib579-lib579.Tpo $(DEPDIR)/lib579-lib579.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib579.c' object='lib579-lib579.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib579-lib579.obj `if test -f 'lib579.c'; then $(CYGPATH_W) 'lib579.c'; else $(CYGPATH_W) '$(srcdir)/lib579.c'; fi`
+
+lib579-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib579-first.o -MD -MP -MF $(DEPDIR)/lib579-first.Tpo -c -o lib579-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib579-first.Tpo $(DEPDIR)/lib579-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib579-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib579-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib579-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib579-first.obj -MD -MP -MF $(DEPDIR)/lib579-first.Tpo -c -o lib579-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib579-first.Tpo $(DEPDIR)/lib579-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib579-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib579_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib579-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib582-lib582.o: lib582.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-lib582.o -MD -MP -MF $(DEPDIR)/lib582-lib582.Tpo -c -o lib582-lib582.o `test -f 'lib582.c' || echo '$(srcdir)/'`lib582.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-lib582.Tpo $(DEPDIR)/lib582-lib582.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib582.c' object='lib582-lib582.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-lib582.o `test -f 'lib582.c' || echo '$(srcdir)/'`lib582.c
+
+lib582-lib582.obj: lib582.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-lib582.obj -MD -MP -MF $(DEPDIR)/lib582-lib582.Tpo -c -o lib582-lib582.obj `if test -f 'lib582.c'; then $(CYGPATH_W) 'lib582.c'; else $(CYGPATH_W) '$(srcdir)/lib582.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-lib582.Tpo $(DEPDIR)/lib582-lib582.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib582.c' object='lib582-lib582.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-lib582.obj `if test -f 'lib582.c'; then $(CYGPATH_W) 'lib582.c'; else $(CYGPATH_W) '$(srcdir)/lib582.c'; fi`
+
+lib582-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-first.o -MD -MP -MF $(DEPDIR)/lib582-first.Tpo -c -o lib582-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-first.Tpo $(DEPDIR)/lib582-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib582-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib582-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-first.obj -MD -MP -MF $(DEPDIR)/lib582-first.Tpo -c -o lib582-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-first.Tpo $(DEPDIR)/lib582-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib582-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib582-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-testutil.o -MD -MP -MF $(DEPDIR)/lib582-testutil.Tpo -c -o lib582-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-testutil.Tpo $(DEPDIR)/lib582-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib582-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib582-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-testutil.obj -MD -MP -MF $(DEPDIR)/lib582-testutil.Tpo -c -o lib582-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-testutil.Tpo $(DEPDIR)/lib582-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib582-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib582-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-warnless.o -MD -MP -MF $(DEPDIR)/lib582-warnless.Tpo -c -o lib582-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-warnless.Tpo $(DEPDIR)/lib582-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib582-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib582-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib582-warnless.obj -MD -MP -MF $(DEPDIR)/lib582-warnless.Tpo -c -o lib582-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib582-warnless.Tpo $(DEPDIR)/lib582-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib582-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib582_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib582-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib583-lib583.o: lib583.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib583-lib583.o -MD -MP -MF $(DEPDIR)/lib583-lib583.Tpo -c -o lib583-lib583.o `test -f 'lib583.c' || echo '$(srcdir)/'`lib583.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib583-lib583.Tpo $(DEPDIR)/lib583-lib583.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib583.c' object='lib583-lib583.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib583-lib583.o `test -f 'lib583.c' || echo '$(srcdir)/'`lib583.c
+
+lib583-lib583.obj: lib583.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib583-lib583.obj -MD -MP -MF $(DEPDIR)/lib583-lib583.Tpo -c -o lib583-lib583.obj `if test -f 'lib583.c'; then $(CYGPATH_W) 'lib583.c'; else $(CYGPATH_W) '$(srcdir)/lib583.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib583-lib583.Tpo $(DEPDIR)/lib583-lib583.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib583.c' object='lib583-lib583.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib583-lib583.obj `if test -f 'lib583.c'; then $(CYGPATH_W) 'lib583.c'; else $(CYGPATH_W) '$(srcdir)/lib583.c'; fi`
+
+lib583-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib583-first.o -MD -MP -MF $(DEPDIR)/lib583-first.Tpo -c -o lib583-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib583-first.Tpo $(DEPDIR)/lib583-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib583-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib583-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib583-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib583-first.obj -MD -MP -MF $(DEPDIR)/lib583-first.Tpo -c -o lib583-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib583-first.Tpo $(DEPDIR)/lib583-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib583-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib583_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib583-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib585-lib500.o: lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-lib500.o -MD -MP -MF $(DEPDIR)/lib585-lib500.Tpo -c -o lib585-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-lib500.Tpo $(DEPDIR)/lib585-lib500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib500.c' object='lib585-lib500.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-lib500.o `test -f 'lib500.c' || echo '$(srcdir)/'`lib500.c
+
+lib585-lib500.obj: lib500.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-lib500.obj -MD -MP -MF $(DEPDIR)/lib585-lib500.Tpo -c -o lib585-lib500.obj `if test -f 'lib500.c'; then $(CYGPATH_W) 'lib500.c'; else $(CYGPATH_W) '$(srcdir)/lib500.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-lib500.Tpo $(DEPDIR)/lib585-lib500.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib500.c' object='lib585-lib500.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-lib500.obj `if test -f 'lib500.c'; then $(CYGPATH_W) 'lib500.c'; else $(CYGPATH_W) '$(srcdir)/lib500.c'; fi`
+
+lib585-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-first.o -MD -MP -MF $(DEPDIR)/lib585-first.Tpo -c -o lib585-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-first.Tpo $(DEPDIR)/lib585-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib585-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib585-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-first.obj -MD -MP -MF $(DEPDIR)/lib585-first.Tpo -c -o lib585-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-first.Tpo $(DEPDIR)/lib585-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib585-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib585-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-testutil.o -MD -MP -MF $(DEPDIR)/lib585-testutil.Tpo -c -o lib585-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-testutil.Tpo $(DEPDIR)/lib585-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib585-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib585-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-testutil.obj -MD -MP -MF $(DEPDIR)/lib585-testutil.Tpo -c -o lib585-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-testutil.Tpo $(DEPDIR)/lib585-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib585-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib585-testtrace.o: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-testtrace.o -MD -MP -MF $(DEPDIR)/lib585-testtrace.Tpo -c -o lib585-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-testtrace.Tpo $(DEPDIR)/lib585-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib585-testtrace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-testtrace.o `test -f 'testtrace.c' || echo '$(srcdir)/'`testtrace.c
+
+lib585-testtrace.obj: testtrace.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib585-testtrace.obj -MD -MP -MF $(DEPDIR)/lib585-testtrace.Tpo -c -o lib585-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib585-testtrace.Tpo $(DEPDIR)/lib585-testtrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testtrace.c' object='lib585-testtrace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib585_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib585-testtrace.obj `if test -f 'testtrace.c'; then $(CYGPATH_W) 'testtrace.c'; else $(CYGPATH_W) '$(srcdir)/testtrace.c'; fi`
+
+lib586-lib586.o: lib586.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib586-lib586.o -MD -MP -MF $(DEPDIR)/lib586-lib586.Tpo -c -o lib586-lib586.o `test -f 'lib586.c' || echo '$(srcdir)/'`lib586.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib586-lib586.Tpo $(DEPDIR)/lib586-lib586.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib586.c' object='lib586-lib586.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib586-lib586.o `test -f 'lib586.c' || echo '$(srcdir)/'`lib586.c
+
+lib586-lib586.obj: lib586.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib586-lib586.obj -MD -MP -MF $(DEPDIR)/lib586-lib586.Tpo -c -o lib586-lib586.obj `if test -f 'lib586.c'; then $(CYGPATH_W) 'lib586.c'; else $(CYGPATH_W) '$(srcdir)/lib586.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib586-lib586.Tpo $(DEPDIR)/lib586-lib586.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib586.c' object='lib586-lib586.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib586-lib586.obj `if test -f 'lib586.c'; then $(CYGPATH_W) 'lib586.c'; else $(CYGPATH_W) '$(srcdir)/lib586.c'; fi`
+
+lib586-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib586-first.o -MD -MP -MF $(DEPDIR)/lib586-first.Tpo -c -o lib586-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib586-first.Tpo $(DEPDIR)/lib586-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib586-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib586-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib586-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib586-first.obj -MD -MP -MF $(DEPDIR)/lib586-first.Tpo -c -o lib586-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib586-first.Tpo $(DEPDIR)/lib586-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib586-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib586_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib586-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib587-lib554.o: lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib587-lib554.o -MD -MP -MF $(DEPDIR)/lib587-lib554.Tpo -c -o lib587-lib554.o `test -f 'lib554.c' || echo '$(srcdir)/'`lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib587-lib554.Tpo $(DEPDIR)/lib587-lib554.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib554.c' object='lib587-lib554.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib587-lib554.o `test -f 'lib554.c' || echo '$(srcdir)/'`lib554.c
+
+lib587-lib554.obj: lib554.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib587-lib554.obj -MD -MP -MF $(DEPDIR)/lib587-lib554.Tpo -c -o lib587-lib554.obj `if test -f 'lib554.c'; then $(CYGPATH_W) 'lib554.c'; else $(CYGPATH_W) '$(srcdir)/lib554.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib587-lib554.Tpo $(DEPDIR)/lib587-lib554.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib554.c' object='lib587-lib554.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib587-lib554.obj `if test -f 'lib554.c'; then $(CYGPATH_W) 'lib554.c'; else $(CYGPATH_W) '$(srcdir)/lib554.c'; fi`
+
+lib587-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib587-first.o -MD -MP -MF $(DEPDIR)/lib587-first.Tpo -c -o lib587-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib587-first.Tpo $(DEPDIR)/lib587-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib587-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib587-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib587-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib587-first.obj -MD -MP -MF $(DEPDIR)/lib587-first.Tpo -c -o lib587-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib587-first.Tpo $(DEPDIR)/lib587-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib587-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib587_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib587-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib590-lib590.o: lib590.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib590-lib590.o -MD -MP -MF $(DEPDIR)/lib590-lib590.Tpo -c -o lib590-lib590.o `test -f 'lib590.c' || echo '$(srcdir)/'`lib590.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib590-lib590.Tpo $(DEPDIR)/lib590-lib590.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib590.c' object='lib590-lib590.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib590-lib590.o `test -f 'lib590.c' || echo '$(srcdir)/'`lib590.c
+
+lib590-lib590.obj: lib590.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib590-lib590.obj -MD -MP -MF $(DEPDIR)/lib590-lib590.Tpo -c -o lib590-lib590.obj `if test -f 'lib590.c'; then $(CYGPATH_W) 'lib590.c'; else $(CYGPATH_W) '$(srcdir)/lib590.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib590-lib590.Tpo $(DEPDIR)/lib590-lib590.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib590.c' object='lib590-lib590.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib590-lib590.obj `if test -f 'lib590.c'; then $(CYGPATH_W) 'lib590.c'; else $(CYGPATH_W) '$(srcdir)/lib590.c'; fi`
+
+lib590-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib590-first.o -MD -MP -MF $(DEPDIR)/lib590-first.Tpo -c -o lib590-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib590-first.Tpo $(DEPDIR)/lib590-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib590-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib590-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib590-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib590-first.obj -MD -MP -MF $(DEPDIR)/lib590-first.Tpo -c -o lib590-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib590-first.Tpo $(DEPDIR)/lib590-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib590-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib590_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib590-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib591-lib591.o: lib591.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-lib591.o -MD -MP -MF $(DEPDIR)/lib591-lib591.Tpo -c -o lib591-lib591.o `test -f 'lib591.c' || echo '$(srcdir)/'`lib591.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-lib591.Tpo $(DEPDIR)/lib591-lib591.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib591.c' object='lib591-lib591.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-lib591.o `test -f 'lib591.c' || echo '$(srcdir)/'`lib591.c
+
+lib591-lib591.obj: lib591.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-lib591.obj -MD -MP -MF $(DEPDIR)/lib591-lib591.Tpo -c -o lib591-lib591.obj `if test -f 'lib591.c'; then $(CYGPATH_W) 'lib591.c'; else $(CYGPATH_W) '$(srcdir)/lib591.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-lib591.Tpo $(DEPDIR)/lib591-lib591.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib591.c' object='lib591-lib591.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-lib591.obj `if test -f 'lib591.c'; then $(CYGPATH_W) 'lib591.c'; else $(CYGPATH_W) '$(srcdir)/lib591.c'; fi`
+
+lib591-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-first.o -MD -MP -MF $(DEPDIR)/lib591-first.Tpo -c -o lib591-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-first.Tpo $(DEPDIR)/lib591-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib591-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib591-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-first.obj -MD -MP -MF $(DEPDIR)/lib591-first.Tpo -c -o lib591-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-first.Tpo $(DEPDIR)/lib591-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib591-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib591-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-testutil.o -MD -MP -MF $(DEPDIR)/lib591-testutil.Tpo -c -o lib591-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-testutil.Tpo $(DEPDIR)/lib591-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib591-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib591-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-testutil.obj -MD -MP -MF $(DEPDIR)/lib591-testutil.Tpo -c -o lib591-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-testutil.Tpo $(DEPDIR)/lib591-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib591-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib591-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-warnless.o -MD -MP -MF $(DEPDIR)/lib591-warnless.Tpo -c -o lib591-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-warnless.Tpo $(DEPDIR)/lib591-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib591-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib591-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib591-warnless.obj -MD -MP -MF $(DEPDIR)/lib591-warnless.Tpo -c -o lib591-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib591-warnless.Tpo $(DEPDIR)/lib591-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib591-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib591_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib591-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib597-lib597.o: lib597.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-lib597.o -MD -MP -MF $(DEPDIR)/lib597-lib597.Tpo -c -o lib597-lib597.o `test -f 'lib597.c' || echo '$(srcdir)/'`lib597.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-lib597.Tpo $(DEPDIR)/lib597-lib597.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib597.c' object='lib597-lib597.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-lib597.o `test -f 'lib597.c' || echo '$(srcdir)/'`lib597.c
+
+lib597-lib597.obj: lib597.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-lib597.obj -MD -MP -MF $(DEPDIR)/lib597-lib597.Tpo -c -o lib597-lib597.obj `if test -f 'lib597.c'; then $(CYGPATH_W) 'lib597.c'; else $(CYGPATH_W) '$(srcdir)/lib597.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-lib597.Tpo $(DEPDIR)/lib597-lib597.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib597.c' object='lib597-lib597.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-lib597.obj `if test -f 'lib597.c'; then $(CYGPATH_W) 'lib597.c'; else $(CYGPATH_W) '$(srcdir)/lib597.c'; fi`
+
+lib597-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-first.o -MD -MP -MF $(DEPDIR)/lib597-first.Tpo -c -o lib597-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-first.Tpo $(DEPDIR)/lib597-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib597-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib597-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-first.obj -MD -MP -MF $(DEPDIR)/lib597-first.Tpo -c -o lib597-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-first.Tpo $(DEPDIR)/lib597-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib597-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib597-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-testutil.o -MD -MP -MF $(DEPDIR)/lib597-testutil.Tpo -c -o lib597-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-testutil.Tpo $(DEPDIR)/lib597-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib597-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib597-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-testutil.obj -MD -MP -MF $(DEPDIR)/lib597-testutil.Tpo -c -o lib597-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-testutil.Tpo $(DEPDIR)/lib597-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='lib597-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+lib597-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-warnless.o -MD -MP -MF $(DEPDIR)/lib597-warnless.Tpo -c -o lib597-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-warnless.Tpo $(DEPDIR)/lib597-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib597-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+lib597-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib597-warnless.obj -MD -MP -MF $(DEPDIR)/lib597-warnless.Tpo -c -o lib597-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib597-warnless.Tpo $(DEPDIR)/lib597-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='lib597-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib597_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib597-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib598-lib598.o: lib598.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib598-lib598.o -MD -MP -MF $(DEPDIR)/lib598-lib598.Tpo -c -o lib598-lib598.o `test -f 'lib598.c' || echo '$(srcdir)/'`lib598.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib598-lib598.Tpo $(DEPDIR)/lib598-lib598.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib598.c' object='lib598-lib598.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib598-lib598.o `test -f 'lib598.c' || echo '$(srcdir)/'`lib598.c
+
+lib598-lib598.obj: lib598.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib598-lib598.obj -MD -MP -MF $(DEPDIR)/lib598-lib598.Tpo -c -o lib598-lib598.obj `if test -f 'lib598.c'; then $(CYGPATH_W) 'lib598.c'; else $(CYGPATH_W) '$(srcdir)/lib598.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib598-lib598.Tpo $(DEPDIR)/lib598-lib598.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib598.c' object='lib598-lib598.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib598-lib598.obj `if test -f 'lib598.c'; then $(CYGPATH_W) 'lib598.c'; else $(CYGPATH_W) '$(srcdir)/lib598.c'; fi`
+
+lib598-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib598-first.o -MD -MP -MF $(DEPDIR)/lib598-first.Tpo -c -o lib598-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib598-first.Tpo $(DEPDIR)/lib598-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib598-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib598-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib598-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib598-first.obj -MD -MP -MF $(DEPDIR)/lib598-first.Tpo -c -o lib598-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib598-first.Tpo $(DEPDIR)/lib598-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib598-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib598_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib598-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib599-lib599.o: lib599.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib599-lib599.o -MD -MP -MF $(DEPDIR)/lib599-lib599.Tpo -c -o lib599-lib599.o `test -f 'lib599.c' || echo '$(srcdir)/'`lib599.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib599-lib599.Tpo $(DEPDIR)/lib599-lib599.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib599.c' object='lib599-lib599.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib599-lib599.o `test -f 'lib599.c' || echo '$(srcdir)/'`lib599.c
+
+lib599-lib599.obj: lib599.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib599-lib599.obj -MD -MP -MF $(DEPDIR)/lib599-lib599.Tpo -c -o lib599-lib599.obj `if test -f 'lib599.c'; then $(CYGPATH_W) 'lib599.c'; else $(CYGPATH_W) '$(srcdir)/lib599.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib599-lib599.Tpo $(DEPDIR)/lib599-lib599.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='lib599.c' object='lib599-lib599.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib599-lib599.obj `if test -f 'lib599.c'; then $(CYGPATH_W) 'lib599.c'; else $(CYGPATH_W) '$(srcdir)/lib599.c'; fi`
+
+lib599-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib599-first.o -MD -MP -MF $(DEPDIR)/lib599-first.Tpo -c -o lib599-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib599-first.Tpo $(DEPDIR)/lib599-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib599-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib599-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib599-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib599-first.obj -MD -MP -MF $(DEPDIR)/lib599-first.Tpo -c -o lib599-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/lib599-first.Tpo $(DEPDIR)/lib599-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='lib599-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib599_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib599-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+libauthretry-libauthretry.o: libauthretry.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libauthretry-libauthretry.o -MD -MP -MF $(DEPDIR)/libauthretry-libauthretry.Tpo -c -o libauthretry-libauthretry.o `test -f 'libauthretry.c' || echo '$(srcdir)/'`libauthretry.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libauthretry-libauthretry.Tpo $(DEPDIR)/libauthretry-libauthretry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libauthretry.c' object='libauthretry-libauthretry.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libauthretry-libauthretry.o `test -f 'libauthretry.c' || echo '$(srcdir)/'`libauthretry.c
+
+libauthretry-libauthretry.obj: libauthretry.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libauthretry-libauthretry.obj -MD -MP -MF $(DEPDIR)/libauthretry-libauthretry.Tpo -c -o libauthretry-libauthretry.obj `if test -f 'libauthretry.c'; then $(CYGPATH_W) 'libauthretry.c'; else $(CYGPATH_W) '$(srcdir)/libauthretry.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libauthretry-libauthretry.Tpo $(DEPDIR)/libauthretry-libauthretry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libauthretry.c' object='libauthretry-libauthretry.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libauthretry-libauthretry.obj `if test -f 'libauthretry.c'; then $(CYGPATH_W) 'libauthretry.c'; else $(CYGPATH_W) '$(srcdir)/libauthretry.c'; fi`
+
+libauthretry-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libauthretry-first.o -MD -MP -MF $(DEPDIR)/libauthretry-first.Tpo -c -o libauthretry-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libauthretry-first.Tpo $(DEPDIR)/libauthretry-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='libauthretry-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libauthretry-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+libauthretry-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libauthretry-first.obj -MD -MP -MF $(DEPDIR)/libauthretry-first.Tpo -c -o libauthretry-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libauthretry-first.Tpo $(DEPDIR)/libauthretry-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='libauthretry-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libauthretry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libauthretry-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+libntlmconnect-libntlmconnect.o: libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-libntlmconnect.o -MD -MP -MF $(DEPDIR)/libntlmconnect-libntlmconnect.Tpo -c -o libntlmconnect-libntlmconnect.o `test -f 'libntlmconnect.c' || echo '$(srcdir)/'`libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-libntlmconnect.Tpo $(DEPDIR)/libntlmconnect-libntlmconnect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libntlmconnect.c' object='libntlmconnect-libntlmconnect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-libntlmconnect.o `test -f 'libntlmconnect.c' || echo '$(srcdir)/'`libntlmconnect.c
+
+libntlmconnect-libntlmconnect.obj: libntlmconnect.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-libntlmconnect.obj -MD -MP -MF $(DEPDIR)/libntlmconnect-libntlmconnect.Tpo -c -o libntlmconnect-libntlmconnect.obj `if test -f 'libntlmconnect.c'; then $(CYGPATH_W) 'libntlmconnect.c'; else $(CYGPATH_W) '$(srcdir)/libntlmconnect.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-libntlmconnect.Tpo $(DEPDIR)/libntlmconnect-libntlmconnect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libntlmconnect.c' object='libntlmconnect-libntlmconnect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-libntlmconnect.obj `if test -f 'libntlmconnect.c'; then $(CYGPATH_W) 'libntlmconnect.c'; else $(CYGPATH_W) '$(srcdir)/libntlmconnect.c'; fi`
+
+libntlmconnect-first.o: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-first.o -MD -MP -MF $(DEPDIR)/libntlmconnect-first.Tpo -c -o libntlmconnect-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-first.Tpo $(DEPDIR)/libntlmconnect-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='libntlmconnect-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+libntlmconnect-first.obj: first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-first.obj -MD -MP -MF $(DEPDIR)/libntlmconnect-first.Tpo -c -o libntlmconnect-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-first.Tpo $(DEPDIR)/libntlmconnect-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='first.c' object='libntlmconnect-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+libntlmconnect-testutil.o: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-testutil.o -MD -MP -MF $(DEPDIR)/libntlmconnect-testutil.Tpo -c -o libntlmconnect-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-testutil.Tpo $(DEPDIR)/libntlmconnect-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='libntlmconnect-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+libntlmconnect-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-testutil.obj -MD -MP -MF $(DEPDIR)/libntlmconnect-testutil.Tpo -c -o libntlmconnect-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-testutil.Tpo $(DEPDIR)/libntlmconnect-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testutil.c' object='libntlmconnect-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+libntlmconnect-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-warnless.o -MD -MP -MF $(DEPDIR)/libntlmconnect-warnless.Tpo -c -o libntlmconnect-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-warnless.Tpo $(DEPDIR)/libntlmconnect-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='libntlmconnect-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+libntlmconnect-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libntlmconnect-warnless.obj -MD -MP -MF $(DEPDIR)/libntlmconnect-warnless.Tpo -c -o libntlmconnect-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libntlmconnect-warnless.Tpo $(DEPDIR)/libntlmconnect-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='libntlmconnect-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntlmconnect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libntlmconnect-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
+       here=`pwd`; \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+       clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-am
 
@@ -1701,19 +6101,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
        clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
-       ctags distclean distclean-compile distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-info \
-       install-info-am install-man install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
+       cscopelist-am ctags ctags-am distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-info-am
+       tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index a0f1c0e..cf62105 100644 (file)
 # files used only in some libcurl test programs
 TESTUTIL = testutil.c testutil.h
 
+# files used only in some libcurl test programs
+TSTTRACE = testtrace.c testtrace.h
+
+# files used only in some libcurl test programs
+WARNLESS = ../../lib/warnless.c ../../lib/warnless.h
+
 # these files are used in every single test program below
 SUPPORTFILES = first.c test.h
 
 # These are all libcurl test programs
-noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506     \
-  lib507 lib508 lib510 lib511 lib512 lib513 lib514 lib515 lib516       \
-  lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526 lib527        \
-  lib574 lib575 lib576 lib577 lib578 lib579 \
-  lib529 lib530 lib532 lib533 lib536 lib537 lib540 lib541 lib542 lib543 \
-  lib544 lib545 lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 \
-  lib539 lib557 lib558 lib559 lib560 lib562 lib564 lib565 lib566 lib567 \
-  lib568 lib569 lib570 lib571 lib572 lib573 chkhostname
-
-chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
+noinst_PROGRAMS = chkhostname libauthretry libntlmconnect                \
+ lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 lib508 lib509   \
+ lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 lib518 lib519   \
+ lib520 lib521 lib523 lib524 lib525 lib526 lib527 lib529 lib530 lib532   \
+ lib533 lib536 lib537 lib539 lib540 lib541 lib542 lib543 lib544 lib545   \
+ lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 lib557 lib558   \
+        lib560 lib562 lib564 lib565 lib566 lib567 lib568 lib569 lib570   \
+ lib571 lib572 lib573 lib574 lib575 lib576        lib578 lib579 lib582   \
+ lib583 lib585 lib586 lib587        lib590 lib591 lib597 lib598 lib599   \
+ lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \
+ lib1509 lib1510 lib1511 lib1512 \
+ lib1900 \
+ lib2033
+
+chkhostname_SOURCES = chkhostname.c ../../lib/curl_gethostname.c
 chkhostname_LDADD = @CURL_NETWORK_LIBS@
 chkhostname_DEPENDENCIES =
-chkhostname_CFLAGS = $(AM_CFLAGS)
+chkhostname_CPPFLAGS = $(AM_CPPFLAGS)
+
+libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+libntlmconnect_LDADD = $(TESTUTIL_LIBS)
+libntlmconnect_CPPFLAGS = $(AM_CPPFLAGS)
+
+libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES)
+libauthretry_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib500_SOURCES = lib500.c $(SUPPORTFILES)
+lib500_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib500_LDADD = $(TESTUTIL_LIBS)
+lib500_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib501_SOURCES = lib501.c $(SUPPORTFILES)
+lib501_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL)
+lib502_SOURCES = lib502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib502_LDADD = $(TESTUTIL_LIBS)
+lib502_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL)
+lib503_SOURCES = lib503.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib503_LDADD = $(TESTUTIL_LIBS)
+lib503_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL)
+lib504_SOURCES = lib504.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib504_LDADD = $(TESTUTIL_LIBS)
+lib504_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib505_SOURCES = lib505.c $(SUPPORTFILES)
+lib505_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib506_SOURCES = lib506.c $(SUPPORTFILES)
+lib506_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL)
+lib507_SOURCES = lib507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib507_LDADD = $(TESTUTIL_LIBS)
+lib507_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib508_SOURCES = lib508.c $(SUPPORTFILES)
+lib508_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib509_SOURCES = lib509.c $(SUPPORTFILES)
+lib509_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib510_SOURCES = lib510.c $(SUPPORTFILES)
+lib510_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib511_SOURCES = lib511.c $(SUPPORTFILES)
+lib511_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib512_SOURCES = lib512.c $(SUPPORTFILES)
+lib512_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib513_SOURCES = lib513.c $(SUPPORTFILES)
+lib513_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib514_SOURCES = lib514.c $(SUPPORTFILES)
+lib514_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib515_SOURCES = lib515.c $(SUPPORTFILES)
+lib515_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib516_SOURCES = lib516.c $(SUPPORTFILES)
+lib516_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib517_SOURCES = lib517.c $(SUPPORTFILES)
+lib517_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib518_SOURCES = lib518.c $(SUPPORTFILES)
+lib518_SOURCES = lib518.c $(SUPPORTFILES) $(WARNLESS)
+lib518_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib519_SOURCES = lib519.c $(SUPPORTFILES)
+lib519_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib520_SOURCES = lib520.c $(SUPPORTFILES)
+lib520_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib521_SOURCES = lib521.c $(SUPPORTFILES)
+lib521_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib523_SOURCES = lib523.c $(SUPPORTFILES)
+lib523_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib524_SOURCES = lib524.c $(SUPPORTFILES)
+lib524_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
+lib525_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib525_LDADD = $(TESTUTIL_LIBS)
+lib525_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib526_CFLAGS = -DLIB526
+lib526_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib526_LDADD = $(TESTUTIL_LIBS)
+lib526_CPPFLAGS = $(AM_CPPFLAGS) -DLIB526
 
-lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib527_CFLAGS = -DLIB527
+lib527_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib527_LDADD = $(TESTUTIL_LIBS)
+lib527_CPPFLAGS = $(AM_CPPFLAGS) -DLIB527
 
-lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
-lib529_CFLAGS = -DLIB529
+lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib529_LDADD = $(TESTUTIL_LIBS)
+lib529_CPPFLAGS = $(AM_CPPFLAGS) -DLIB529
 
-lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL)
-lib530_CFLAGS = -DLIB530
+lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib530_LDADD = $(TESTUTIL_LIBS)
+lib530_CPPFLAGS = $(AM_CPPFLAGS) -DLIB530
 
-lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
-lib532_CFLAGS = -DLIB532
+lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib532_LDADD = $(TESTUTIL_LIBS)
+lib532_CPPFLAGS = $(AM_CPPFLAGS) -DLIB532
 
-lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL)
+lib533_SOURCES = lib533.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib533_LDADD = $(TESTUTIL_LIBS)
+lib533_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL)
+lib536_SOURCES = lib536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib536_LDADD = $(TESTUTIL_LIBS)
+lib536_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib537_SOURCES = lib537.c $(SUPPORTFILES)
+lib537_SOURCES = lib537.c $(SUPPORTFILES) $(WARNLESS)
+lib537_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib539_SOURCES = lib539.c $(SUPPORTFILES)
+lib539_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib540_SOURCES = lib540.c $(SUPPORTFILES)
+lib540_SOURCES = lib540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib540_LDADD = $(TESTUTIL_LIBS)
+lib540_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib541_SOURCES = lib541.c $(SUPPORTFILES)
+lib541_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib542_SOURCES = lib542.c $(SUPPORTFILES)
+lib542_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib543_SOURCES = lib543.c $(SUPPORTFILES)
+lib543_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib544_SOURCES = lib544.c $(SUPPORTFILES)
+lib544_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib545_SOURCES = lib544.c $(SUPPORTFILES)
-lib545_CFLAGS = -DLIB545
+lib545_CPPFLAGS = $(AM_CPPFLAGS) -DLIB545
 
 lib547_SOURCES = lib547.c $(SUPPORTFILES)
+lib547_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib548_SOURCES = lib547.c $(SUPPORTFILES)
-lib548_CFLAGS = -DLIB548
+lib548_CPPFLAGS = $(AM_CPPFLAGS) -DLIB548
 
 lib549_SOURCES = lib549.c $(SUPPORTFILES)
+lib549_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL)
-
-lib552_SOURCES = lib552.c $(SUPPORTFILES)
+lib552_SOURCES = lib552.c $(SUPPORTFILES) $(WARNLESS)
+lib552_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib553_SOURCES = lib553.c $(SUPPORTFILES)
+lib553_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib554_SOURCES = lib554.c $(SUPPORTFILES)
+lib554_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib555_SOURCES = lib555.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib555_LDADD = $(TESTUTIL_LIBS)
+lib555_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib556_SOURCES = lib556.c $(SUPPORTFILES)
+lib556_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib557_SOURCES = lib557.c $(SUPPORTFILES)
+lib557_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib558_SOURCES = lib558.c $(SUPPORTFILES)
-lib558_CFLAGS = -DLIB558
+lib558_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib559_SOURCES = lib558.c $(SUPPORTFILES)
-lib559_CFLAGS = -DLIB559
-
-lib560_SOURCES = lib560.c $(SUPPORTFILES)
-
-lib574_SOURCES = lib574.c $(SUPPORTFILES)
-
-lib575_SOURCES = lib575.c $(SUPPORTFILES)
-
-lib576_SOURCES = lib576.c $(SUPPORTFILES)
-
-lib577_SOURCES = lib577.c $(SUPPORTFILES)
+lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib560_LDADD = $(TESTUTIL_LIBS)
+lib560_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib562_SOURCES = lib562.c $(SUPPORTFILES)
+lib562_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL)
+lib564_SOURCES = lib564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib564_LDADD = $(TESTUTIL_LIBS)
+lib564_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib565_SOURCES = lib510.c $(SUPPORTFILES)
-lib565_CFLAGS = -DLIB565
+lib565_CPPFLAGS = $(AM_CPPFLAGS) -DLIB565
 
 lib566_SOURCES = lib566.c $(SUPPORTFILES)
+lib566_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib567_SOURCES = lib567.c $(SUPPORTFILES)
+lib567_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib568_SOURCES = lib568.c $(SUPPORTFILES)
+lib568_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib569_SOURCES = lib569.c $(SUPPORTFILES)
+lib569_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib570_SOURCES = lib570.c $(SUPPORTFILES)
+lib570_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib571_SOURCES = lib571.c $(SUPPORTFILES)
+lib571_SOURCES = lib571.c $(SUPPORTFILES) $(WARNLESS)
+lib571_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib572_SOURCES = lib572.c $(SUPPORTFILES)
+lib572_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) $(TSTTRACE)
+lib573_LDADD = $(TESTUTIL_LIBS)
+lib573_CPPFLAGS = $(AM_CPPFLAGS)
 
-lib573_SOURCES = lib573.c $(SUPPORTFILES) $(TESTUTIL)
+lib574_SOURCES = lib574.c $(SUPPORTFILES)
+lib574_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib575_SOURCES = lib575.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib575_LDADD = $(TESTUTIL_LIBS)
+lib575_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib576_SOURCES = lib576.c $(SUPPORTFILES)
+lib576_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib578_SOURCES = lib578.c $(SUPPORTFILES)
+lib578_CPPFLAGS = $(AM_CPPFLAGS)
 
 lib579_SOURCES = lib579.c $(SUPPORTFILES)
+lib579_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib582_LDADD = $(TESTUTIL_LIBS)
+lib582_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib583_SOURCES = lib583.c $(SUPPORTFILES)
+lib583_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib585_SOURCES = lib500.c $(SUPPORTFILES) $(TESTUTIL) $(TSTTRACE)
+lib585_LDADD = $(TESTUTIL_LIBS)
+lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
+
+lib586_SOURCES = lib586.c $(SUPPORTFILES)
+lib586_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib587_SOURCES = lib554.c $(SUPPORTFILES)
+lib587_CPPFLAGS = $(AM_CPPFLAGS) -DLIB587
+
+lib590_SOURCES = lib590.c $(SUPPORTFILES)
+lib590_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib591_SOURCES = lib591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib591_LDADD = $(TESTUTIL_LIBS)
+lib591_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib597_SOURCES = lib597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib597_LDADD = $(TESTUTIL_LIBS)
+lib597_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib598_SOURCES = lib598.c $(SUPPORTFILES)
+lib598_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib599_SOURCES = lib599.c $(SUPPORTFILES)
+lib599_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL)
+lib1500_LDADD = $(TESTUTIL_LIBS)
+lib1500_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1501_LDADD = $(TESTUTIL_LIBS)
+lib1501_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1502_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1502_LDADD = $(TESTUTIL_LIBS)
+lib1502_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1502
+
+lib1503_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1503_LDADD = $(TESTUTIL_LIBS)
+lib1503_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1503
+
+lib1504_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1504_LDADD = $(TESTUTIL_LIBS)
+lib1504_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1504
+
+lib1505_SOURCES = lib1502.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1505_LDADD = $(TESTUTIL_LIBS)
+lib1505_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1505
+
+lib1506_SOURCES = lib1506.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1506_LDADD = $(TESTUTIL_LIBS)
+lib1506_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1506
+
+lib1507_SOURCES = lib1507.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1507_LDADD = $(TESTUTIL_LIBS)
+lib1507_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1507
+
+lib1508_SOURCES = lib1508.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1508_LDADD = $(TESTUTIL_LIBS)
+lib1508_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1508
+
+lib1509_SOURCES = lib1509.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1509_LDADD = $(TESTUTIL_LIBS)
+lib1509_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1509
+
+lib1510_SOURCES = lib1510.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1510_LDADD = $(TESTUTIL_LIBS)
+lib1510_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1510
+
+lib1511_SOURCES = lib1511.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1511_LDADD = $(TESTUTIL_LIBS)
+lib1511_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1511
+
+lib1512_SOURCES = lib1512.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1512_LDADD = $(TESTUTIL_LIBS)
+lib1512_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1512
+
+lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1900_LDADD = $(TESTUTIL_LIBS)
+lib1900_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib2033_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib2033_LDADD = $(TESTUTIL_LIBS)
+lib2033_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_PIPELINING
index 72c8b6a..168294a 100644 (file)
@@ -1,4 +1,25 @@
-#include "setup.h"
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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_setup.h"
 
 #include "curl_gethostname.h"
 
index a0e713f..253acb2 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #ifdef HAVE_LOCALE_H
 #  include "memdebug.h"
 #endif
 
-int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
-                 struct timeval *tv)
+int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
+                   struct timeval *tv)
 {
+  if(nfds < 0) {
+    SET_SOCKERRNO(EINVAL);
+    return -1;
+  }
 #ifdef USE_WINSOCK
-  /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
-   * case when 'num_fds <= 0. So sleep.
+  /*
+   * Winsock select() requires that at least one of the three fd_set
+   * pointers is not NULL and points to a non-empty fdset. IOW Winsock
+   * select() can not be used to sleep without a single fd_set.
    */
-  if (num_fds <= 0) {
+  if(!nfds) {
     Sleep(1000*tv->tv_sec + tv->tv_usec/1000);
     return 0;
   }
 #endif
-  return select(num_fds, rd, wr, exc, tv);
+  return select(nfds, rd, wr, exc, tv);
 }
 
 char *libtest_arg2=NULL;
@@ -38,25 +56,31 @@ char *libtest_arg3=NULL;
 int test_argc;
 char **test_argv;
 
+struct timeval tv_test_start; /* for test timing */
 
-int main(int argc, char **argv)
-{
-  char *URL;
+#ifdef UNITTESTS
+int unitfail; /* for unittests */
+#endif
 
 #ifdef CURLDEBUG
-  /* this sends all memory debug messages to a logfile named memdump */
-  char *env = curl_getenv("CURL_MEMDEBUG");
+static void memory_tracking_init(void)
+{
+  char *env;
+  /* if CURL_MEMDEBUG is set, this starts memory tracking message logging */
+  env = curl_getenv("CURL_MEMDEBUG");
   if(env) {
     /* use the value as file name */
-    char *s = strdup(env);
+    char fname[CURL_MT_LOGFNAME_BUFSIZE];
+    if(strlen(env) >= CURL_MT_LOGFNAME_BUFSIZE)
+      env[CURL_MT_LOGFNAME_BUFSIZE-1] = '\0';
+    strcpy(fname, env);
     curl_free(env);
-    curl_memdebug(s);
-    free(s);
-    /* this weird strdup() and stuff here is to make the curl_free() get
-       called before the memdebug() as otherwise the memdebug tracing will
-       with tracing a free() without an alloc! */
+    curl_memdebug(fname);
+    /* this weird stuff here is to make curl_free() get called
+       before curl_memdebug() as otherwise memory tracking will
+       log a free() without an alloc! */
   }
-  /* this enables the fail-on-alloc-number-N functionality */
+  /* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */
   env = curl_getenv("CURL_MEMLIMIT");
   if(env) {
     char *endptr;
@@ -65,8 +89,17 @@ int main(int argc, char **argv)
       curl_memlimit(num);
     curl_free(env);
   }
+}
+#else
+#  define memory_tracking_init() Curl_nop_stmt
 #endif
 
+int main(int argc, char **argv)
+{
+  char *URL;
+
+  memory_tracking_init();
+
   /*
    * Setup proper locale from environment. This is needed to enable locale-
    * specific behaviour by the C library in order to test for undesired side
diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c
new file mode 100644 (file)
index 0000000..76e3d32
--- /dev/null
@@ -0,0 +1,90 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+  CURL* curls = NULL;
+  CURLM* multi = NULL;
+  int still_running;
+  int i = -1;
+  int res = 0;
+  CURLMsg *msg;
+
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  multi_init(multi);
+
+  easy_init(curls);
+
+  easy_setopt(curls, CURLOPT_URL, URL);
+  easy_setopt(curls, CURLOPT_HEADER, 1L);
+
+  multi_add_handle(multi, curls);
+
+  multi_perform(multi, &still_running);
+
+  abort_on_test_timeout();
+
+  while(still_running) {
+    int num;
+    res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
+    if (res != CURLM_OK) {
+      printf("curl_multi_wait() returned %d\n", res);
+      res = -1;
+      goto test_cleanup;
+    }
+
+    abort_on_test_timeout();
+
+    multi_perform(multi, &still_running);
+
+    abort_on_test_timeout();
+  }
+
+  msg = curl_multi_info_read(multi, &still_running);
+  if(msg)
+    /* this should now contain a result code from the easy handle,
+       get it */
+    i = msg->data.result;
+
+test_cleanup:
+
+  /* undocumented cleanup sequence - type UA */
+
+  curl_multi_cleanup(multi);
+  curl_easy_cleanup(curls);
+  curl_global_cleanup();
+
+  if(res)
+    i = res;
+
+  return i; /* return the final return code */
+}
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
new file mode 100644 (file)
index 0000000..01a382e
--- /dev/null
@@ -0,0 +1,126 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#include <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 30 * 1000
+
+/* 500 milliseconds allowed. An extreme number but lets be really conservative
+   to allow old and slow machines to run this test too */
+#define MAX_BLOCKED_TIME_US 500000
+
+/* return the number of microseconds between two time stamps */
+static int elapsed(struct timeval *before,
+                   struct timeval *after)
+{
+  ssize_t result;
+
+  result = (after->tv_sec - before->tv_sec) * 1000000 +
+    after->tv_usec - before->tv_usec;
+  if (result < 0)
+    result = 0;
+
+  return curlx_sztosi(result);
+}
+
+
+int test(char *URL)
+{
+  CURL *handle = NULL;
+  CURLM *mhandle = NULL;
+  int res = 0;
+  int still_running = 0;
+
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  easy_init(handle);
+
+  easy_setopt(handle, CURLOPT_URL, URL);
+  easy_setopt(handle, CURLOPT_VERBOSE, 1L);
+
+  multi_init(mhandle);
+
+  multi_add_handle(mhandle, handle);
+
+  multi_perform(mhandle, &still_running);
+
+  abort_on_test_timeout();
+
+  while(still_running) {
+    struct timeval timeout;
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    int maxfd = -99;
+    struct timeval before;
+    struct timeval after;
+    int e;
+
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 100000L; /* 100 ms */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
+
+    fprintf(stderr, "ping\n");
+    before = tutil_tvnow();
+
+    multi_perform(mhandle, &still_running);
+
+    abort_on_test_timeout();
+
+    after = tutil_tvnow();
+    e = elapsed(&before, &after);
+    fprintf(stderr, "pong = %d\n", e);
+
+    if(e > MAX_BLOCKED_TIME_US) {
+      res = 100;
+      break;
+    }
+  }
+
+test_cleanup:
+
+  /* undocumented cleanup sequence - type UA */
+
+  curl_multi_cleanup(mhandle);
+  curl_easy_cleanup(handle);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
new file mode 100644 (file)
index 0000000..2b50c47
--- /dev/null
@@ -0,0 +1,145 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+/*
+ * This source code is used for lib1502, lib1503, lib1504 and lib1505 with
+ * only #ifdefs controlling the cleanup sequence.
+ *
+ * Test case 1502 converted from bug report #3575448, identifying a memory
+ * leak in the CURLOPT_RESOLVE handling with the multi interface.
+ */
+
+#include "test.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+  CURL* easy = NULL;
+  CURLM* multi = NULL;
+  int still_running;
+  int res = 0;
+
+  char redirect[160];
+
+  /* DNS cache injection */
+  struct curl_slist *dns_cache_list;
+
+  sprintf(redirect, "google.com:%s:%s", libtest_arg2, libtest_arg3);
+
+  start_test_timing();
+
+  dns_cache_list = curl_slist_append(NULL, redirect);
+  if(!dns_cache_list) {
+    fprintf(stderr, "curl_slist_append() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    curl_slist_free_all(dns_cache_list);
+    return res;
+  }
+
+  easy_init(easy);
+
+  easy_setopt(easy, CURLOPT_URL, URL);
+  easy_setopt(easy, CURLOPT_HEADER, 1L);
+  easy_setopt(easy, CURLOPT_RESOLVE, dns_cache_list);
+
+  multi_init(multi);
+
+  multi_add_handle(multi, easy);
+
+  multi_perform(multi, &still_running);
+
+  abort_on_test_timeout();
+
+  while(still_running) {
+    struct timeval timeout;
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    int maxfd = -99;
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+    timeout.tv_sec = 1;
+    timeout.tv_usec = 0;
+
+    multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
+
+    multi_perform(multi, &still_running);
+
+    abort_on_test_timeout();
+  }
+
+test_cleanup:
+
+#ifdef LIB1502
+  /* undocumented cleanup sequence - type UA */
+  curl_multi_cleanup(multi);
+  curl_easy_cleanup(easy);
+  curl_global_cleanup();
+#endif
+
+#ifdef LIB1503
+  /* proper cleanup sequence - type PA */
+  curl_multi_remove_handle(multi, easy);
+  curl_multi_cleanup(multi);
+  curl_easy_cleanup(easy);
+  curl_global_cleanup();
+#endif
+
+#ifdef LIB1504
+  /* undocumented cleanup sequence - type UB */
+  curl_easy_cleanup(easy);
+  curl_multi_cleanup(multi);
+  curl_global_cleanup();
+#endif
+
+#ifdef LIB1505
+  /* proper cleanup sequence - type PB */
+  curl_multi_remove_handle(multi, easy);
+  curl_easy_cleanup(easy);
+  curl_multi_cleanup(multi);
+  curl_global_cleanup();
+#endif
+
+  curl_slist_free_all(dns_cache_list);
+
+  return res;
+}
diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c
new file mode 100644 (file)
index 0000000..008a9ca
--- /dev/null
@@ -0,0 +1,132 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#define NUM_HANDLES 4
+
+int test(char *URL)
+{
+  int res = 0;
+  CURL *curl[NUM_HANDLES];
+  int running;
+  CURLM *m = NULL;
+  int i;
+  char target_url[256];
+  char dnsentry[256];
+  struct curl_slist *slist = NULL;
+  char *port = libtest_arg3;
+  char *address = libtest_arg2;
+
+  (void)URL;
+
+  /* Create fake DNS entries for serverX.example.com for all handles */
+  for(i=0; i < NUM_HANDLES; i++) {
+    sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+    printf("%s\n", dnsentry);
+    slist = curl_slist_append(slist, dnsentry);
+  }
+
+  for(i=0; i < NUM_HANDLES; i++)
+    curl[i] = NULL;
+
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  multi_init(m);
+
+  multi_setopt(m, CURLMOPT_MAXCONNECTS, 3L);
+
+  /* get NUM_HANDLES easy handles */
+  for(i=0; i < NUM_HANDLES; i++) {
+    /* get an easy handle */
+    easy_init(curl[i]);
+    /* specify target */
+    sprintf(target_url, "http://server%d.example.com:%s/path/1506%04i",
+            i + 1, port, i + 1);
+    target_url[sizeof(target_url) - 1] = '\0';
+    easy_setopt(curl[i], CURLOPT_URL, target_url);
+    /* go verbose */
+    easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
+    /* include headers */
+    easy_setopt(curl[i], CURLOPT_HEADER, 1L);
+
+    easy_setopt(curl[i], CURLOPT_RESOLVE, slist);
+  }
+
+  fprintf(stderr, "Start at URL 0\n");
+
+  for(i=0; i < NUM_HANDLES; i++) {
+    /* add handle to multi */
+    multi_add_handle(m, curl[i]);
+
+    for(;;) {
+      struct timeval interval;
+      fd_set rd, wr, exc;
+      int maxfd = -99;
+
+      interval.tv_sec = 1;
+      interval.tv_usec = 0;
+
+      multi_perform(m, &running);
+
+      abort_on_test_timeout();
+
+      if(!running)
+        break; /* done */
+
+      FD_ZERO(&rd);
+      FD_ZERO(&wr);
+      FD_ZERO(&exc);
+
+      multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+      /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+      select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+      abort_on_test_timeout();
+    }
+  }
+
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
+
+  for(i=0; i < NUM_HANDLES; i++) {
+    curl_multi_remove_handle(m, curl[i]);
+    curl_easy_cleanup(curl[i]);
+  }
+
+  curl_slist_free_all(slist);
+
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
new file mode 100644 (file)
index 0000000..7c4e6ed
--- /dev/null
@@ -0,0 +1,167 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+/*
+ * This is the list of basic details you need to tweak to get things right.
+ */
+#define USERNAME "user@example.com"
+#define PASSWORD "123qwerty"
+#define RECIPIENT "<1507-recipient@example.com>"
+#define MAILFROM "<1507-realuser@example.com>"
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+  (void)ptr;
+  (void)size;
+  (void)nmemb;
+  (void)userp;
+  return CURL_READFUNC_ABORT;
+}
+
+static struct timeval tvnow(void)
+{
+  /*
+  ** time() returns the value of time in seconds since the Epoch.
+  */
+  struct timeval now;
+  now.tv_sec = (long)time(NULL);
+  now.tv_usec = 0;
+  return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+  return (newer.tv_sec-older.tv_sec)*1000+
+    (newer.tv_usec-older.tv_usec)/1000;
+}
+
+int test(char *URL)
+{
+   CURL *curl;
+   CURLM *mcurl;
+   int still_running = 1;
+   struct timeval mp_start;
+   struct curl_slist* rcpt_list = NULL;
+
+   curl_global_init(CURL_GLOBAL_DEFAULT);
+
+   curl = curl_easy_init();
+   if(!curl)
+     return 1;
+
+   mcurl = curl_multi_init();
+   if(!mcurl)
+     return 2;
+
+   rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
+   /* more addresses can be added here
+      rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
+   */
+
+   curl_easy_setopt(curl, CURLOPT_URL, URL);
+#if 0
+   curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
+   curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
+#endif
+   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+   curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
+   curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
+   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+   curl_multi_add_handle(mcurl, curl);
+
+   mp_start = tvnow();
+
+  /* we start some action by calling perform right away */
+  curl_multi_perform(mcurl, &still_running);
+
+  while(still_running) {
+    struct timeval timeout;
+    int rc; /* select() return code */
+
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    int maxfd = -1;
+
+    long curl_timeo = -1;
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    /* set a suitable timeout to play around with */
+    timeout.tv_sec = 1;
+    timeout.tv_usec = 0;
+
+    curl_multi_timeout(mcurl, &curl_timeo);
+    if(curl_timeo >= 0) {
+      timeout.tv_sec = curl_timeo / 1000;
+      if(timeout.tv_sec > 1)
+        timeout.tv_sec = 1;
+      else
+        timeout.tv_usec = (curl_timeo % 1000) * 1000;
+    }
+
+    /* get file descriptors from the transfers */
+    curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* In a real-world program you OF COURSE check the return code of the
+       function calls.  On success, the value of maxfd is guaranteed to be
+       greater or equal than -1.  We call select(maxfd + 1, ...), specially in
+       case of (maxfd == -1), we call select(0, ...), which is basically equal
+       to sleep. */
+
+    rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    if (tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+      fprintf(stderr, "ABORTING TEST, since it seems "
+              "that it would have run forever.\n");
+      break;
+    }
+
+    switch(rc) {
+    case -1:
+      /* select error */
+      break;
+    case 0: /* timeout */
+    default: /* action */
+      curl_multi_perform(mcurl, &still_running);
+      break;
+    }
+  }
+
+  curl_slist_free_all(rcpt_list);
+  curl_multi_remove_handle(mcurl, curl);
+  curl_multi_cleanup(mcurl);
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+  return 0;
+}
+
+
diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c
new file mode 100644 (file)
index 0000000..72f26d1
--- /dev/null
@@ -0,0 +1,49 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  int res = 0;
+  CURLM *m = NULL;
+
+  (void)URL;
+
+  global_init(CURL_GLOBAL_ALL);
+
+  multi_init(m);
+
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
+
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+  printf("We are done\n");
+
+  return res;
+}
diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c
new file mode 100644 (file)
index 0000000..3c86a36
--- /dev/null
@@ -0,0 +1,96 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream);
+size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream);
+
+long realHeaderSize = 0;
+
+int test(char *URL)
+{
+  long headerSize;
+  CURLcode code;
+  CURL *curl = NULL;
+  int res = 0;
+
+  global_init(CURL_GLOBAL_ALL);
+
+  easy_init(curl);
+
+  easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+
+  easy_setopt(curl, CURLOPT_WRITEFUNCTION, *WriteOutput);
+  easy_setopt(curl, CURLOPT_HEADERFUNCTION, *WriteHeader);
+
+  easy_setopt(curl, CURLOPT_HEADER, 1L);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
+
+  code = curl_easy_perform(curl);
+  if(CURLE_OK != code) {
+    fprintf(stderr, "%s:%d curl_easy_perform() failed, "
+            "with code %d (%s)\n",
+            __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+    res = TEST_ERR_MAJOR_BAD;
+    goto test_cleanup;
+  }
+
+  code = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &headerSize);
+  if(CURLE_OK != code) {
+    fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
+            "with code %d (%s)\n",
+            __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+    res = TEST_ERR_MAJOR_BAD;
+    goto test_cleanup;
+  }
+
+  printf("header length is ........: %lu\n", headerSize);
+  printf("header length should be..: %lu\n", realHeaderSize);
+
+test_cleanup:
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
+
+size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+  fwrite(ptr, size, nmemb, stream);
+  return nmemb * size;
+}
+
+size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+  (void)ptr;
+  (void)stream;
+  realHeaderSize += size * nmemb;
+
+  return nmemb * size;
+}
diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c
new file mode 100644 (file)
index 0000000..1bcf216
--- /dev/null
@@ -0,0 +1,92 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+#define NUM_URLS 4
+
+int test(char *URL)
+{
+  int res = 0;
+  CURL *curl = NULL;
+  int i;
+  char target_url[256];
+  char dnsentry[256];
+  struct curl_slist *slist = NULL;
+  char *port = libtest_arg3;
+  char *address = libtest_arg2;
+
+  (void)URL;
+
+  /* Create fake DNS entries for serverX.example.com for all handles */
+  for(i=0; i < NUM_URLS; i++) {
+    sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+    printf("%s\n", dnsentry);
+    slist = curl_slist_append(slist, dnsentry);
+  }
+
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  /* get an easy handle */
+  easy_init(curl);
+
+  /* go verbose */
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  /* include headers */
+  easy_setopt(curl, CURLOPT_HEADER, 1L);
+
+  easy_setopt(curl, CURLOPT_RESOLVE, slist);
+
+  easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
+
+  /* get NUM_HANDLES easy handles */
+  for(i=0; i < NUM_URLS; i++) {
+    /* specify target */
+    sprintf(target_url, "http://server%d.example.com:%s/path/1510%04i",
+            i + 1, port, i + 1);
+    target_url[sizeof(target_url) - 1] = '\0';
+    easy_setopt(curl, CURLOPT_URL, target_url);
+
+    res = curl_easy_perform(curl);
+
+    abort_on_test_timeout();
+  }
+
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
+
+  curl_easy_cleanup(curl);
+
+  curl_slist_free_all(slist);
+
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1511.c b/tests/libtest/lib1511.c
new file mode 100644 (file)
index 0000000..a46f9ab
--- /dev/null
@@ -0,0 +1,75 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  long unmet;
+  CURL* curl = NULL;
+  int res = 0;
+
+  global_init(CURL_GLOBAL_ALL);
+
+  easy_init(curl);
+
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_HEADER, 1L);
+  easy_setopt(curl, CURLOPT_TIMECONDITION, (long)CURL_TIMECOND_IFMODSINCE);
+
+  /* TIMEVALUE in the future */
+  easy_setopt(curl, CURLOPT_TIMEVALUE, 1566210680L);
+
+  res = curl_easy_perform(curl);
+  if(res)
+    goto test_cleanup;
+
+  curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+  if(unmet != 1L) {
+    res = TEST_ERR_FAILURE; /* not correct */
+    goto test_cleanup;
+  }
+
+  /* TIMEVALUE in the past */
+  easy_setopt(curl, CURLOPT_TIMEVALUE, 1L);
+
+  res = curl_easy_perform(curl);
+  if(res)
+    goto test_cleanup;
+
+  curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+  if(unmet != 0L) {
+    res = TEST_ERR_FAILURE; /* not correct */
+    goto test_cleanup;
+  }
+
+  res = TEST_ERR_SUCCESS; /* this is where we should be */
+
+test_cleanup:
+
+  /* always cleanup */
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib1512.c b/tests/libtest/lib1512.c
new file mode 100644 (file)
index 0000000..93d5ea9
--- /dev/null
@@ -0,0 +1,89 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Use global DNS cache (while deprecated it should still work), populate it
+ * with CURLOPT_RESOLVE in the first request and then make sure a subsequent
+ * easy transfer finds and uses the populated stuff.
+ */
+
+#include "test.h"
+
+#include "memdebug.h"
+
+#define NUM_HANDLES 2
+
+int test(char *URL)
+{
+  CURLcode res;
+  CURL *curl[NUM_HANDLES] = {NULL, NULL};
+  char *port = libtest_arg3;
+  char *address = libtest_arg2;
+  char dnsentry[256];
+  struct curl_slist *slist = NULL;
+  int i;
+  char target_url[256];
+  (void)URL; /* URL is setup in the code */
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  sprintf(dnsentry, "server.example.curl:%s:%s", port, address);
+  printf("%s\n", dnsentry);
+  slist = curl_slist_append(slist, dnsentry);
+
+  /* get NUM_HANDLES easy handles */
+  for(i=0; i < NUM_HANDLES; i++) {
+    /* get an easy handle */
+    easy_init(curl[i]);
+    /* specify target */
+    sprintf(target_url, "http://server.example.curl:%s/path/1512%04i",
+            port, i + 1);
+    target_url[sizeof(target_url) - 1] = '\0';
+    easy_setopt(curl[i], CURLOPT_URL, target_url);
+    /* go verbose */
+    easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
+    /* include headers */
+    easy_setopt(curl[i], CURLOPT_HEADER, 1L);
+
+    easy_setopt(curl[i], CURLOPT_DNS_USE_GLOBAL_CACHE, 1L);
+  }
+
+  /* make the first one populate the GLOBAL cache */
+  easy_setopt(curl[0], CURLOPT_RESOLVE, slist);
+
+  /* run NUM_HANDLES transfers */
+  for(i=0; (i < NUM_HANDLES) && !res; i++)
+    res = curl_easy_perform(curl[i]);
+
+test_cleanup:
+
+  curl_easy_cleanup(curl[0]);
+  curl_easy_cleanup(curl[1]);
+  curl_slist_free_all(slist);
+  curl_global_cleanup();
+
+  return (int)res;
+}
+
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
new file mode 100644 (file)
index 0000000..74a0e6f
--- /dev/null
@@ -0,0 +1,256 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ *
+ * 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 "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+#define MAX_URLS 200
+#define MAX_BLACKLIST 20
+
+int urltime[MAX_URLS];
+char *urlstring[MAX_URLS];
+CURL *handles[MAX_URLS];
+char *site_blacklist[MAX_BLACKLIST];
+char *server_blacklist[MAX_BLACKLIST];
+int num_handles;
+int blacklist_num_servers;
+int blacklist_num_sites;
+
+int parse_url_file(const char *filename);
+void free_urls(void);
+int create_handles(void);
+void setup_handle(char *base_url, CURLM *m, int handlenum);
+void remove_handles(void);
+
+static size_t
+write_callback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+  size_t realsize = size * nmemb;
+  (void)contents;
+  (void)userp;
+
+  return realsize;
+}
+
+int parse_url_file(const char *filename)
+{
+  FILE *f;
+  int filetime;
+  char buf[200];
+
+  num_handles = 0;
+  blacklist_num_sites = 0;
+  blacklist_num_servers = 0;
+
+  f = fopen(filename, "rb");
+  if(!f)
+    return 0;
+
+  while(!feof(f)) {
+    if(fscanf(f, "%d %s\n", &filetime, buf)) {
+      urltime[num_handles] = filetime;
+      urlstring[num_handles] = strdup(buf);
+      num_handles++;
+      continue;
+    }
+
+    if(fscanf(f, "blacklist_site %s\n", buf)) {
+      site_blacklist[blacklist_num_sites] = strdup(buf);
+      blacklist_num_sites++;
+      continue;
+    }
+
+    break;
+  }
+  fclose(f);
+
+  site_blacklist[blacklist_num_sites] = NULL;
+  server_blacklist[blacklist_num_servers] = NULL;
+  return num_handles;
+}
+
+void free_urls(void)
+{
+  int i;
+  for(i = 0;i < num_handles;i++) {
+    free(urlstring[i]);
+  }
+  for(i = 0;i < blacklist_num_servers;i++) {
+    free(server_blacklist[i]);
+  }
+  for(i = 0;i < blacklist_num_sites;i++) {
+    free(site_blacklist[i]);
+  }
+}
+
+int create_handles(void)
+{
+  int i;
+
+  for(i = 0;i < num_handles;i++) {
+    handles[i] = curl_easy_init();
+  }
+  return 0;
+}
+
+void setup_handle(char *base_url, CURLM *m, int handlenum)
+{
+  char urlbuf[256];
+
+  sprintf(urlbuf, "%s%s", base_url, urlstring[handlenum]);
+  curl_easy_setopt(handles[handlenum], CURLOPT_URL, urlbuf);
+  curl_easy_setopt(handles[handlenum], CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(handles[handlenum], CURLOPT_FAILONERROR, 1L);
+  curl_easy_setopt(handles[handlenum], CURLOPT_WRITEFUNCTION, write_callback);
+  curl_easy_setopt(handles[handlenum], CURLOPT_WRITEDATA, NULL);
+  curl_multi_add_handle(m, handles[handlenum]);
+}
+
+void remove_handles(void)
+{
+  int i;
+
+  for(i = 0;i < num_handles;i++) {
+    if(handles[i])
+      curl_easy_cleanup(handles[i]);
+  }
+}
+
+int test(char *URL)
+{
+  int res = 0;
+  CURLM *m = NULL;
+  CURLMsg *msg; /* for picking up messages with the transfer status */
+  int msgs_left; /* how many messages are left */
+  int running;
+  int handlenum = 0;
+  struct timeval last_handle_add;
+
+  if(parse_url_file("log/urls.txt") <= 0)
+    goto test_cleanup;
+
+  start_test_timing();
+
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  m = curl_multi_init();
+
+  create_handles();
+
+  multi_setopt(m, CURLMOPT_PIPELINING, 1L);
+  multi_setopt(m, CURLMOPT_MAX_HOST_CONNECTIONS, 2L);
+  multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
+  multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, 15000L);
+  multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, 10000L);
+
+  multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
+  multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
+
+  last_handle_add = tutil_tvnow();
+
+  for(;;) {
+    struct timeval interval;
+    struct timeval now;
+    long int msnow, mslast;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
+    long timeout;
+
+    interval.tv_sec = 1;
+    interval.tv_usec = 0;
+
+    if(handlenum < num_handles) {
+      now = tutil_tvnow();
+      msnow = now.tv_sec * 1000 + now.tv_usec / 1000;
+      mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000;
+      if(msnow - mslast >= urltime[handlenum] && handlenum < num_handles) {
+        fprintf(stdout, "Adding handle %d\n", handlenum);
+        setup_handle(URL, m, handlenum);
+        last_handle_add = now;
+        handlenum++;
+      }
+    }
+
+    curl_multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    /* See how the transfers went */
+    while ((msg = curl_multi_info_read(m, &msgs_left))) {
+      if (msg->msg == CURLMSG_DONE) {
+        int i, found = 0;
+
+        /* Find out which handle this message is about */
+        for (i = 0; i < num_handles; i++) {
+          found = (msg->easy_handle == handles[i]);
+          if(found)
+            break;
+        }
+
+        printf("Handle %d Completed with status %d\n", i, msg->data.result);
+        curl_multi_remove_handle(m, handles[i]);
+      }
+    }
+
+    if(handlenum == num_handles && !running) {
+      break; /* done */
+    }
+
+    FD_ZERO(&rd);
+    FD_ZERO(&wr);
+    FD_ZERO(&exc);
+
+    curl_multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    curl_multi_timeout(m, &timeout);
+
+    if(timeout < 0)
+      timeout = 1;
+
+    interval.tv_sec = timeout / 1000;
+    interval.tv_usec = (timeout % 1000) * 1000;
+
+    interval.tv_sec = 0;
+    interval.tv_usec = 1000;
+
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+    abort_on_test_timeout();
+  }
+
+test_cleanup:
+
+  remove_handles();
+
+  /* undocumented cleanup sequence - type UB */
+
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+  free_urls();
+  return res;
+}
index dc6967c..dda1d7f 100644 (file)
@@ -1,16 +1,62 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
+#include "testtrace.h"
 #include "memdebug.h"
 
+#ifdef LIB585
+
+static int counter;
+
+static curl_socket_t tst_opensocket(void *clientp,
+                                    curlsocktype purpose,
+                                    struct curl_sockaddr *addr)
+{
+  (void)clientp;
+  (void)purpose;
+  printf("[OPEN] counter: %d\n", ++counter);
+  return socket(addr->family, addr->socktype, addr->protocol);
+}
+
+static int tst_closesocket(void *clientp, curl_socket_t sock)
+{
+  (void)clientp;
+  printf("[CLOSE] counter: %d\n", counter--);
+  return sclose(sock);
+}
+
+static void setupcallbacks(CURL *curl)
+{
+  curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, tst_opensocket);
+  curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, tst_closesocket);
+  counter = 0;
+}
+
+#else
+#define setupcallbacks(x) Curl_nop_stmt
+#endif
+
+
 int test(char *URL)
 {
   CURLcode res;
@@ -31,6 +77,17 @@ int test(char *URL)
   test_setopt(curl, CURLOPT_URL, URL);
   test_setopt(curl, CURLOPT_HEADER, 1L);
 
+  libtest_debug_config.nohex = 1;
+  libtest_debug_config.tracetime = 1;
+  test_setopt(curl, CURLOPT_DEBUGDATA, &libtest_debug_config);
+  test_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  if(libtest_arg3 && !strcmp(libtest_arg3, "activeftp"))
+    test_setopt(curl, CURLOPT_FTPPORT, "-");
+
+  setupcallbacks(curl);
+
   res = curl_easy_perform(curl);
 
   if(!res) {
@@ -38,7 +95,38 @@ int test(char *URL)
     res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr);
     moo = fopen(libtest_arg2, "wb");
     if(moo) {
+      double time_namelookup;
+      double time_connect;
+      double time_pretransfer;
+      double time_starttransfer;
+      double time_total;
       fprintf(moo, "IP: %s\n", ipstr);
+      curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &time_namelookup);
+      curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &time_connect);
+      curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &time_pretransfer);
+      curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
+                        &time_starttransfer);
+      curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &time_total);
+
+      /* since the timing will always vary we only compare relative differences
+         between these 5 times */
+      if(time_namelookup >= time_connect) {
+        fprintf(moo, "namelookup vs connect: %f %f\n",
+                time_namelookup, time_connect);
+      }
+      if(time_connect >= time_pretransfer) {
+        fprintf(moo, "connect vs pretransfer: %f %f\n",
+                time_connect, time_pretransfer);
+      }
+      if(time_pretransfer >= time_starttransfer) {
+        fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
+                time_pretransfer, time_starttransfer);
+      }
+      if(time_starttransfer >= time_total) {
+        fprintf(moo, "starttransfer vs total: %f %f\n",
+                time_starttransfer, time_total);
+      }
+
       fclose(moo);
     }
   }
index 770cf8f..26275f9 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index f6be5aa..554583a 100644 (file)
@@ -1,19 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 /*
  * Get a single URL without select().
 
 int test(char *URL)
 {
-  CURL *c;
+  CURL *c = NULL;
   CURLM *m = NULL;
   int res = 0;
-  int running=1;
-  struct timeval mp_start;
-  char mp_timedout = FALSE;
+  int running;
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  if ((c = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  global_init(CURL_GLOBAL_ALL);
 
-  test_setopt(c, CURLOPT_URL, URL);
+  easy_init(c);
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_setopt(c, CURLOPT_URL, URL);
 
-  if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(m);
 
-  mp_timedout = FALSE;
-  mp_start = tutil_tvnow();
-
-  while (running) {
-    res = (int)curl_multi_perform(m, &running);
-    if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-        MULTI_PERFORM_HANG_TIMEOUT) {
-      mp_timedout = TRUE;
-      break;
-    }
-    if (running <= 0) {
-      fprintf(stderr, "nothing left running.\n");
-      break;
-    }
-  }
+  multi_add_handle(m, c);
 
-  if (mp_timedout) {
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+  for(;;) {
+    struct timeval timeout;
+    fd_set fdread, fdwrite, fdexcep;
+    int maxfd = -99;
+
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 100000L; /* 100 ms */
+
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
-  if(m) {
-    curl_multi_remove_handle(m, c);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+
+  curl_multi_remove_handle(m, c);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(c);
   curl_global_cleanup();
 
index 2301186..50277f7 100644 (file)
@@ -1,21 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
-#include <sys/types.h>
-
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 /*
  * Source code in here hugely as reported in bug report 651460 by
 
 int test(char *URL)
 {
-  CURL *c;
+  CURL *c = NULL;
   CURLM *m = NULL;
   int res = 0;
   int running;
-  char done = FALSE;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
 
-  if ((c = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  test_setopt(c, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
-  test_setopt(c, CURLOPT_URL, URL);
-  test_setopt(c, CURLOPT_USERPWD, "test:ing");
-  test_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
-  test_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L);
-  test_setopt(c, CURLOPT_HEADER, 1L);
-
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  global_init(CURL_GLOBAL_ALL);
 
-  if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(c);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  easy_setopt(c, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+  easy_setopt(c, CURLOPT_URL, URL);
+  easy_setopt(c, CURLOPT_USERPWD, "test:ing");
+  easy_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
+  easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L);
+  easy_setopt(c, CURLOPT_HEADER, 1L);
+  easy_setopt(c, CURLOPT_VERBOSE, 1L);
 
-  while(!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  multi_init(m);
+
+  multi_add_handle(m, c);
+
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
-        done = TRUE;
-        break;
-      }
-    }
-    if (mp_timedout || done)
-      break;
-
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
-    }
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 89;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 95;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
-  if(m) {
-    curl_multi_remove_handle(m, c);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+
+  curl_multi_remove_handle(m, c);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(c);
   curl_global_cleanup();
 
index b8091f6..358fc98 100644 (file)
@@ -1,21 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#include <sys/types.h>
-
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 /*
  * Source code in here hugely as reported in bug report 651464 by
  */
 int test(char *URL)
 {
-  CURL *c;
+  CURL *c = NULL;
   int res = 0;
   CURLM *m = NULL;
   fd_set rd, wr, exc;
-  CURLMcode ret;
-  char done = FALSE;
   int running;
-  int max_fd;
-  int rc;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
 
-  if ((c = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  easy_init(c);
 
   /* The point here is that there must not be anything running on the given
      proxy port */
   if (libtest_arg2)
-    test_setopt(c, CURLOPT_PROXY, libtest_arg2);
-  test_setopt(c, CURLOPT_URL, URL);
-  test_setopt(c, CURLOPT_VERBOSE, 1L);
-
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+    easy_setopt(c, CURLOPT_PROXY, libtest_arg2);
+  easy_setopt(c, CURLOPT_URL, URL);
+  easy_setopt(c, CURLOPT_VERBOSE, 1L);
 
-  if ((ret = curl_multi_add_handle(m, c)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", ret);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(m);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_add_handle(m, c);
 
-  while (!done) {
+  for(;;) {
     struct timeval interval;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
     fprintf(stderr, "curl_multi_perform()\n");
 
-    ret = CURLM_CALL_MULTI_PERFORM;
+    multi_perform(m, &running);
 
-    while (ret == CURLM_CALL_MULTI_PERFORM) {
-      ret = curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-    }
-    if (mp_timedout)
-      break;
+    abort_on_test_timeout();
 
     if(!running) {
       /* This is where this code is expected to reach */
@@ -112,47 +78,34 @@ int test(char *URL)
       CURLMsg *msg = curl_multi_info_read(m, &numleft);
       fprintf(stderr, "Expected: not running\n");
       if(msg && !numleft)
-        res = 100; /* this is where we should be */
+        res = TEST_ERR_SUCCESS; /* this is where we should be */
       else
-        res = 99; /* not correct */
-      break;
-    }
-    fprintf(stderr, "running == %d, ret == %d\n", running, ret);
-
-    if (ret != CURLM_OK) {
-      res = 2;
-      break;
+        res = TEST_ERR_FAILURE; /* not correct */
+      break; /* done */
     }
+    fprintf(stderr, "running == %d\n", running);
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
     fprintf(stderr, "curl_multi_fdset()\n");
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 3;
-      break;
-    }
-    rc = select_test(max_fd+1, &rd, &wr, &exc, &interval);
-    fprintf(stderr, "select returned %d\n", rc);
-  }
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
+
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
-  if(m) {
-    curl_multi_remove_handle(m, c);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+
+  curl_multi_remove_handle(m, c);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(c);
   curl_global_cleanup();
 
index 5af7ac0..99b3a0a 100644 (file)
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "memdebug.h"
 
 /*
index 9209056..4d2864d 100644 (file)
@@ -1,16 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
 #include <curl/mprintf.h>
 
@@ -140,11 +149,11 @@ int test(char *URL)
 {
   int res;
   CURLSHcode scode = CURLSHE_OK;
-  char *url;
+  char *url = NULL;
   struct Tdata tdata;
   CURL *curl;
   CURLSH *share;
-  struct curl_slist *headers;
+  struct curl_slist *headers = NULL;
   int i;
   struct userdata user;
 
@@ -193,6 +202,32 @@ int test(char *URL)
     return TEST_ERR_MAJOR_BAD;
   }
 
+  /* initial cookie manipulation */
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_share_cleanup(share);
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+  printf( "CURLOPT_SHARE\n" );
+  test_setopt( curl, CURLOPT_SHARE,      share );
+  printf( "CURLOPT_COOKIELIST injected_and_clobbered\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST,
+               "Set-Cookie: injected_and_clobbered=yes; "
+               "domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030" );
+  printf( "CURLOPT_COOKIELIST ALL\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST, "ALL" );
+  printf( "CURLOPT_COOKIELIST session\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST, "Set-Cookie: session=elephants" );
+  printf( "CURLOPT_COOKIELIST injected\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST,
+               "Set-Cookie: injected=yes; domain=host.foo.com; "
+               "expires=Sat Feb 2 11:56:27 GMT 2030" );
+  printf( "CURLOPT_COOKIELIST SESS\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST, "SESS" );
+  printf( "CLEANUP\n" );
+  curl_easy_cleanup( curl );
+
 
   res = 0;
 
@@ -229,6 +264,8 @@ int test(char *URL)
   test_setopt( curl, CURLOPT_SHARE,      share );
   printf( "CURLOPT_COOKIEJAR\n" );
   test_setopt( curl, CURLOPT_COOKIEJAR,  JAR );
+  printf( "CURLOPT_COOKIELIST FLUSH\n" );
+  test_setopt( curl, CURLOPT_COOKIELIST, "FLUSH" );
 
   printf( "PERFORM\n" );
   curl_easy_perform( curl );
@@ -249,9 +286,12 @@ test_cleanup:
   /* clean up last handle */
   printf( "CLEANUP\n" );
   curl_easy_cleanup( curl );
-  curl_slist_free_all( headers );
 
-  curl_free(url);
+  if ( headers )
+    curl_slist_free_all( headers );
+
+  if ( url )
+    curl_free(url);
 
   /* free share */
   printf( "SHARE_CLEANUP\n" );
index 9707c9b..87c21de 100644 (file)
@@ -1,85 +1,64 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 int test(char *URL)
 {
-  CURL* curls;
-  CURLM* multi;
+  CURL* curls = NULL;
+  CURLM* multi = NULL;
   int still_running;
   int i = -1;
   int res = 0;
   CURLMsg *msg;
-  CURLMcode ret;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
 
-  if ((multi = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  if ((curls = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_multi_cleanup(multi);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  global_init(CURL_GLOBAL_ALL);
 
-  test_setopt(curls, CURLOPT_URL, URL);
+  multi_init(multi);
 
-  if ((ret = curl_multi_add_handle(multi, curls)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", ret);
-    curl_easy_cleanup(curls);
-    curl_multi_cleanup(multi);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(curls);
+
+  easy_setopt(curls, CURLOPT_URL, URL);
+  easy_setopt(curls, CURLOPT_HEADER, 1L);
 
-  mp_timedout = FALSE;
-  mp_start = tutil_tvnow();
+  multi_add_handle(multi, curls);
 
-  do {
-    ret = curl_multi_perform(multi, &still_running);
-    if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-        MULTI_PERFORM_HANG_TIMEOUT) {
-      mp_timedout = TRUE;
-      break;
-    }
-  } while (ret == CURLM_CALL_MULTI_PERFORM);
+  multi_perform(multi, &still_running);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  abort_on_test_timeout();
 
-  while ((!ml_timedout) && (!mp_timedout) && (still_running)) {
+  while(still_running) {
     struct timeval timeout;
-    int rc;
     fd_set fdread;
     fd_set fdwrite;
     fd_set fdexcep;
-    int maxfd;
+    int maxfd = -99;
 
     FD_ZERO(&fdread);
     FD_ZERO(&fdwrite);
@@ -87,49 +66,29 @@ int test(char *URL)
     timeout.tv_sec = 1;
     timeout.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-
-    curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
-    rc = select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-    switch(rc) {
-      case -1:
-        break;
-      case 0:
-      default:
-        mp_timedout = FALSE;
-        mp_start = tutil_tvnow();
-        do {
-          ret = curl_multi_perform(multi, &still_running);
-          if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-              MULTI_PERFORM_HANG_TIMEOUT) {
-            mp_timedout = TRUE;
-            break;
-          }
-        } while (ret == CURLM_CALL_MULTI_PERFORM);
-        break;
-    }
-  }
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    i = TEST_ERR_RUNS_FOREVER;
-  }
-  else {
-    msg = curl_multi_info_read(multi, &still_running);
-    if(msg)
-      /* this should now contain a result code from the easy handle,
-         get it */
-      i = msg->data.result;
+    multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
+
+    multi_perform(multi, &still_running);
+
+    abort_on_test_timeout();
   }
 
+  msg = curl_multi_info_read(multi, &still_running);
+  if(msg)
+    /* this should now contain a result code from the easy handle,
+       get it */
+    i = msg->data.result;
+
 test_cleanup:
 
+  /* undocumented cleanup sequence - type UA */
+
   curl_multi_cleanup(multi);
   curl_easy_cleanup(curls);
   curl_global_cleanup();
index 0fa5eb9..1aca064 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
new file mode 100644 (file)
index 0000000..a3de51e
--- /dev/null
@@ -0,0 +1,146 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+/*
+ * This test uses these funny custom memory callbacks for the only purpose
+ * of verifying that curl_global_init_mem() functionallity is present in
+ * libcurl and that it works unconditionally no matter how libcurl is built,
+ * nothing more.
+ *
+ * Do not include memdebug.h in this source file, and do not use directly
+ * memory related functions in this file except those used inside custom
+ * memory callbacks which should be calling 'the real thing'.
+ */
+
+/*
+#include "memdebug.h"
+*/
+
+int seen_malloc = 0;
+int seen_free = 0;
+int seen_realloc = 0;
+int seen_strdup = 0;
+int seen_calloc = 0;
+
+void *custom_malloc(size_t size);
+void custom_free(void *ptr);
+void *custom_realloc(void *ptr, size_t size);
+char *custom_strdup(const char *ptr);
+void *custom_calloc(size_t nmemb, size_t size);
+
+
+void *custom_calloc(size_t nmemb, size_t size)
+{
+  if(!seen_calloc) {
+    printf("seen custom_calloc()\n");
+    seen_calloc = 1;
+  }
+  return (calloc)(nmemb, size);
+}
+
+void *custom_malloc(size_t size)
+{
+  if(!seen_malloc && seen_calloc) {
+    printf("seen custom_malloc()\n");
+    seen_malloc = 1;
+  }
+  return (malloc)(size);
+}
+
+char *custom_strdup(const char *ptr)
+{
+  if(!seen_strdup && seen_malloc) {
+    /* currently (2013.03.13), memory tracking enabled builds do not call
+       the strdup callback, in this case malloc callback and memcpy are used
+       instead. If some day this is changed the following printf() should be
+       uncommented, and a line added to test definition.
+    printf("seen custom_strdup()\n");
+    */
+    seen_strdup = 1;
+  }
+  return (strdup)(ptr);
+}
+
+void *custom_realloc(void *ptr, size_t size)
+{
+  if(!seen_realloc && seen_malloc) {
+    printf("seen custom_realloc()\n");
+    seen_realloc = 1;
+  }
+  return (realloc)(ptr, size);
+}
+
+void custom_free(void *ptr)
+{
+  if(!seen_free && seen_realloc) {
+    printf("seen custom_free()\n");
+    seen_free = 1;
+  }
+  (free)(ptr);
+}
+
+
+int test(char *URL)
+{
+  unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+                       0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
+  CURLcode res;
+  CURL *curl;
+  int asize;
+  char *str = NULL;
+
+  (void)URL;
+
+  res = curl_global_init_mem(CURL_GLOBAL_ALL,
+                             custom_malloc,
+                             custom_free,
+                             custom_realloc,
+                             custom_strdup,
+                             custom_calloc);
+  if (res != CURLE_OK) {
+    fprintf(stderr, "curl_global_init_mem() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_USERAGENT, "test509"); /* uses strdup() */
+
+  asize = (int)sizeof(a);
+  str = curl_easy_escape(curl, (char *)a, asize); /* uses realloc() */
+
+test_cleanup:
+
+  if(str)
+    curl_free(str);
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
+
index f3f8cdb..8278631 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
 #include "memdebug.h"
@@ -97,7 +109,7 @@ int test(char *URL)
   test_setopt(curl, CURLOPT_HTTPHEADER, slist);
 
 #ifdef LIB565
-  test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+  test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
   test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
 #endif
 
index dea97c5..6be2d2f 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 9f59f7b..19da18b 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index c85006e..c013ac2 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 283f89e..953e90d 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 2660ae3..4e96c4a 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index b796dbb..a959094 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 38a65d3..ba49ec4 100644 (file)
@@ -1,17 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
 
-static const char *dates[]={
+static const char * const dates[]={
   "Sun, 06 Nov 1994 08:49:37 GMT",
   "Sunday, 06-Nov-94 08:49:37 GMT",
   "Sun Nov  6 08:49:37 1994",
@@ -98,7 +110,12 @@ static const char *dates[]={
   "Thu, 12-Aug-2007 20:61:99999999999 GMT",
   "IAintNoDateFool",
   "Thu Apr 18 22:50 2007 GMT", /* without seconds */
-
+  "20110623 12:34:56",
+  "20110632 12:34:56",
+  "20110623 56:34:56",
+  "20111323 12:34:56",
+  "20110623 12:34:79",
+  "Wed, 31 Dec 2008 23:59:60 GMT", /* leap second */
   NULL
 };
 
index 9e683d9..23f7f17 100644 (file)
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
 
+#include "warnless.h"
 #include "memdebug.h"
 
 #ifndef FD_SETSIZE
index f885c5d..b720c8f 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index a0e1244..9ffaa4f 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 9e79cb4..93c3068 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index a1ac4a4..0fdc83d 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index ee52062..6f56df9 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index ade6370..ca128cb 100644 (file)
@@ -1,52 +1,65 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 int test(char *URL)
 {
   int res = 0;
-  CURL *curl;
-  FILE *hd_src ;
+  CURL *curl = NULL;
+  FILE *hd_src = NULL;
   int hd ;
   int error;
   struct_stat file_info;
-  int running;
-  char done=FALSE;
   CURLM *m = NULL;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
+  int running;
 
-  if (!libtest_arg2) {
+  start_test_timing();
+
+  if(!libtest_arg2) {
+#ifdef LIB529
+    /* test 529 */
+    fprintf(stderr, "Usage: lib529 [url] [uploadfile]\n");
+#else
+    /* test 525 */
     fprintf(stderr, "Usage: lib525 [url] [uploadfile]\n");
-    return -1;
+#endif
+    return TEST_ERR_USAGE;
   }
 
   hd_src = fopen(libtest_arg2, "rb");
   if(NULL == hd_src) {
     error = ERRNO;
-    fprintf(stderr, "fopen() failed with error: %d %s\n",
+    fprintf(stderr, "fopen() failed with error: %d (%s)\n",
             error, strerror(error));
-    fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
-    return TEST_ERR_MAJOR_BAD;
+    fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
+    return TEST_ERR_FOPEN;
   }
 
   /* get the file size of the local file */
@@ -54,40 +67,35 @@ int test(char *URL)
   if(hd == -1) {
     /* can't open file, bail out */
     error = ERRNO;
-    fprintf(stderr, "fstat() failed with error: %d %s\n",
+    fprintf(stderr, "fstat() failed with error: %d (%s)\n",
             error, strerror(error));
-    fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
+    fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
     fclose(hd_src);
-    return -1;
+    return TEST_ERR_FSTAT;
   }
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
     fclose(hd_src);
-    return TEST_ERR_MAJOR_BAD;
+    return res;
   }
 
-  if ((curl = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    fclose(hd_src);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(curl);
 
   /* enable uploading */
-  test_setopt(curl, CURLOPT_UPLOAD, 1L);
+  easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
   /* specify target */
-  test_setopt(curl,CURLOPT_URL, URL);
+  easy_setopt(curl,CURLOPT_URL, URL);
 
   /* go verbose */
-  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* use active FTP */
-  test_setopt(curl, CURLOPT_FTPPORT, "-");
+  easy_setopt(curl, CURLOPT_FTPPORT, "-");
 
   /* now specify which file to upload */
-  test_setopt(curl, CURLOPT_READDATA, hd_src);
+  easy_setopt(curl, CURLOPT_READDATA, hd_src);
 
   /* NOTE: if you want this code to work on Windows with libcurl as a DLL, you
      MUST also provide a read callback with CURLOPT_READFUNCTION. Failing to
@@ -98,114 +106,60 @@ int test(char *URL)
      option you MUST make sure that the type of the passed-in argument is a
      curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
      make sure that to pass in a type 'long' argument. */
-  test_setopt(curl, CURLOPT_INFILESIZE_LARGE,
-                   (curl_off_t)file_info.st_size);
+  easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    fclose(hd_src);
-    return TEST_ERR_MAJOR_BAD;
-  }
-
-  if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    fclose(hd_src);
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(m);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_add_handle(m, curl);
 
-  while (!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
-        done = TRUE;
-        break;
-      }
-    }
-    if (mp_timedout || done)
-      break;
-
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
-    }
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 189;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 195;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
 #ifdef LIB529
   /* test 529 */
-  if(m) {
-    curl_multi_remove_handle(m, curl);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+  curl_multi_remove_handle(m, curl);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(curl);
+  curl_global_cleanup();
 #else
   /* test 525 */
-  if(m)
-    curl_multi_remove_handle(m, curl);
+  /* proper cleanup sequence - type PB */
+  curl_multi_remove_handle(m, curl);
   curl_easy_cleanup(curl);
-  if(m)
-    curl_multi_cleanup(m);
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
 #endif
 
-  fclose(hd_src); /* close the local file */
+  /* close the local file */
+  fclose(hd_src);
 
-  curl_global_cleanup();
   return res;
 }
index 0418b6b..9db04db 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 /*
  * This code sets up multiple easy handles that transfer a single file from
  * the same URL, in a serial manner after each other. Due to the connection
 
 #include "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 #define NUM_HANDLES 4
 
@@ -45,192 +55,130 @@ int test(char *URL)
   int res = 0;
   CURL *curl[NUM_HANDLES];
   int running;
-  char done=FALSE;
   CURLM *m = NULL;
-  int current=0;
-  int i, j;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  int current = 0;
+  int i;
+
+  for(i=0; i < NUM_HANDLES; i++)
+    curl[i] = NULL;
+
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
 
   /* get NUM_HANDLES easy handles */
   for(i=0; i < NUM_HANDLES; i++) {
-    curl[i] = curl_easy_init();
-    if(!curl[i]) {
-      fprintf(stderr, "curl_easy_init() failed "
-              "on handle #%d\n", i);
-      for (j=i-1; j >= 0; j--) {
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
-    res = curl_easy_setopt(curl[i], CURLOPT_URL, URL);
-    if(res) {
-      fprintf(stderr, "curl_easy_setopt() failed "
-              "on handle #%d\n", i);
-      for (j=i; j >= 0; j--) {
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
-
+    easy_init(curl[i]);
+    /* specify target */
+    easy_setopt(curl[i], CURLOPT_URL, URL);
     /* go verbose */
-    res = curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
-    if(res) {
-      fprintf(stderr, "curl_easy_setopt() failed "
-              "on handle #%d\n", i);
-      for (j=i; j >= 0; j--) {
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
+    easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
   }
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    for(i=0; i < NUM_HANDLES; i++) {
-      curl_easy_cleanup(curl[i]);
-    }
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(m);
 
-  if ((res = (int)curl_multi_add_handle(m, curl[current])) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    for(i=0; i < NUM_HANDLES; i++) {
-      curl_easy_cleanup(curl[i]);
-    }
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
-
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_add_handle(m, curl[current]);
 
   fprintf(stderr, "Start at URL 0\n");
 
-  while (!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running) {
 #ifdef LIB527
-        /* NOTE: this code does not remove the handle from the multi handle
-           here, which would be the nice, sane and documented way of working.
-           This however tests that the API survives this abuse gracefully. */
-        curl_easy_cleanup(curl[current]);
+      /* NOTE: this code does not remove the handle from the multi handle
+         here, which would be the nice, sane and documented way of working.
+         This however tests that the API survives this abuse gracefully. */
+      curl_easy_cleanup(curl[current]);
+      curl[current] = NULL;
 #endif
-        if(++current < NUM_HANDLES) {
-          fprintf(stderr, "Advancing to URL %d\n", current);
+      if(++current < NUM_HANDLES) {
+        fprintf(stderr, "Advancing to URL %d\n", current);
 #ifdef LIB532
-          /* first remove the only handle we use */
-          curl_multi_remove_handle(m, curl[0]);
-
-          /* make us re-use the same handle all the time, and try resetting
-             the handle first too */
-          curl_easy_reset(curl[0]);
-          test_setopt(curl[0], CURLOPT_URL, URL);
-          test_setopt(curl[0], CURLOPT_VERBOSE, 1L);
-
-          /* re-add it */
-          res = (int)curl_multi_add_handle(m, curl[0]);
+        /* first remove the only handle we use */
+        curl_multi_remove_handle(m, curl[0]);
+
+        /* make us re-use the same handle all the time, and try resetting
+           the handle first too */
+        curl_easy_reset(curl[0]);
+        easy_setopt(curl[0], CURLOPT_URL, URL);
+        /* go verbose */
+        easy_setopt(curl[0], CURLOPT_VERBOSE, 1L);
+
+        /* re-add it */
+        multi_add_handle(m, curl[0]);
 #else
-          res = (int)curl_multi_add_handle(m, curl[current]);
+        multi_add_handle(m, curl[current]);
 #endif
-          if(res) {
-            fprintf(stderr, "add handle failed: %d.\n", res);
-            res = 243;
-            break;
-          }
-        }
-        else
-          done = TRUE; /* bail out */
-        break;
       }
-    }
-    if (mp_timedout || done)
-      break;
-
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
+      else {
+        break; /* done */
+      }
     }
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 189;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 195;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
-#ifdef LIB532
 test_cleanup:
-#endif
 
-#ifndef LIB527
-  /* get NUM_HANDLES easy handles */
+#if defined(LIB526)
+
+  /* test 526 and 528 */
+  /* proper cleanup sequence - type PB */
+
   for(i=0; i < NUM_HANDLES; i++) {
-#ifdef LIB526
-    if(m)
-      curl_multi_remove_handle(m, curl[i]);
-#endif
+    curl_multi_remove_handle(m, curl[i]);
     curl_easy_cleanup(curl[i]);
   }
-#endif
-  if(m)
-    curl_multi_cleanup(m);
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+#elif defined(LIB527)
+
+  /* test 527 */
+
+  /* Upon non-failure test flow the easy's have already been cleanup'ed. In
+     case there is a failure we arrive here with easy's that have not been
+     cleanup'ed yet, in this case we have to cleanup them or otherwise these
+     will be leaked, let's use undocumented cleanup sequence - type UB */
+
+  if(res)
+    for(i=0; i < NUM_HANDLES; i++)
+      curl_easy_cleanup(curl[i]);
+
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+#elif defined(LIB532)
 
+  /* test 532 */
+  /* undocumented cleanup sequence - type UB */
+
+  for(i=0; i < NUM_HANDLES; i++)
+    curl_easy_cleanup(curl[i]);
+  curl_multi_cleanup(m);
   curl_global_cleanup();
+
+#endif
+
   return res;
 }
index abefc92..06a8464 100644 (file)
@@ -1,29 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 #define NUM_HANDLES 4
 
@@ -32,173 +34,80 @@ int test(char *URL)
   int res = 0;
   CURL *curl[NUM_HANDLES];
   int running;
-  char done=FALSE;
-  CURLM *m;
-  int i, j;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
+  CURLM *m = NULL;
+  int i;
   char target_url[256];
+  int handles_added = 0;
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  for(i=0; i < NUM_HANDLES; i++)
+    curl[i] = NULL;
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
+
+  global_init(CURL_GLOBAL_ALL);
+
+  multi_init(m);
 
   /* get NUM_HANDLES easy handles */
   for(i=0; i < NUM_HANDLES; i++) {
-    curl[i] = curl_easy_init();
-    if(!curl[i]) {
-      fprintf(stderr, "curl_easy_init() failed "
-              "on handle #%d\n", i);
-      for (j=i-1; j >= 0; j--) {
-        curl_multi_remove_handle(m, curl[j]);
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_multi_cleanup(m);
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
+    /* get an easy handle */
+    easy_init(curl[i]);
+    /* specify target */
     sprintf(target_url, "%s%04i", URL, i + 1);
     target_url[sizeof(target_url) - 1] = '\0';
-
-    res = curl_easy_setopt(curl[i], CURLOPT_URL, target_url);
-    if(res) {
-      fprintf(stderr, "curl_easy_setopt() failed "
-              "on handle #%d\n", i);
-      for (j=i; j >= 0; j--) {
-        curl_multi_remove_handle(m, curl[j]);
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_multi_cleanup(m);
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
-
+    easy_setopt(curl[i], CURLOPT_URL, target_url);
     /* go verbose */
-    res = curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
-    if(res) {
-      fprintf(stderr, "curl_easy_setopt() failed "
-              "on handle #%d\n", i);
-      for (j=i; j >= 0; j--) {
-        curl_multi_remove_handle(m, curl[j]);
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_multi_cleanup(m);
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
-
+    easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
     /* include headers */
-    res = curl_easy_setopt(curl[i], CURLOPT_HEADER, 1L);
-    if(res) {
-      fprintf(stderr, "curl_easy_setopt() failed "
-              "on handle #%d\n", i);
-      for (j=i; j >= 0; j--) {
-        curl_multi_remove_handle(m, curl[j]);
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_multi_cleanup(m);
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
-
-    /* add handle to multi */
-    if ((res = (int)curl_multi_add_handle(m, curl[i])) != CURLM_OK) {
-      fprintf(stderr, "curl_multi_add_handle() failed, "
-              "on handle #%d with code %d\n", i, res);
-      curl_easy_cleanup(curl[i]);
-      for (j=i-1; j >= 0; j--) {
-        curl_multi_remove_handle(m, curl[j]);
-        curl_easy_cleanup(curl[j]);
-      }
-      curl_multi_cleanup(m);
-      curl_global_cleanup();
-      return TEST_ERR_MAJOR_BAD + i;
-    }
+    easy_setopt(curl[i], CURLOPT_HEADER, 1L);
   }
 
-  curl_multi_setopt(m, CURLMOPT_PIPELINING, 1L);
+  /* Add the first handle to multi. We do this to let libcurl detect
+     that the server can do pipelining. The rest of the handles will be
+     added later. */
+  multi_add_handle(m, curl[handles_added++]);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_setopt(m, CURLMOPT_PIPELINING, 1L);
 
   fprintf(stderr, "Start at URL 0\n");
 
-  while (!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
-        done = TRUE; /* bail out */
-        break;
-      }
-    }
-    if (mp_timedout || done)
-      break;
-
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
-    }
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running && handles_added >= NUM_HANDLES)
+      break; /* done */
+
+    /* Add the rest of the handles now that the first handle has sent the
+       request. */
+    while(handles_added < NUM_HANDLES)
+      multi_add_handle(m, curl[handles_added++]);
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 189;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 195;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
-/* test_cleanup: */
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
 
-  /* cleanup NUM_HANDLES easy handles */
   for(i=0; i < NUM_HANDLES; i++) {
     curl_multi_remove_handle(m, curl[i]);
     curl_easy_cleanup(curl[i]);
index 89ac7bf..fdc18a1 100644 (file)
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 /* used for test case 533, 534 and 535 */
 
 #include "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 int test(char *URL)
 {
   int res = 0;
-  CURL *curl;
+  CURL *curl = NULL;
   int running;
-  char done=FALSE;
   CURLM *m = NULL;
   int current=0;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
 
-  if ((curl = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  test_setopt(curl, CURLOPT_URL, URL);
-  test_setopt(curl, CURLOPT_VERBOSE, 1);
-  test_setopt(curl, CURLOPT_FAILONERROR, 1);
+  global_init(CURL_GLOBAL_ALL);
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(curl);
 
-  if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_init(m);
+
+  multi_add_handle(m, curl);
 
   fprintf(stderr, "Start at URL 0\n");
 
-  while (!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
-        if(!current++) {
-          fprintf(stderr, "Advancing to URL 1\n");
-          /* remove the handle we use */
-          curl_multi_remove_handle(m, curl);
-
-          /* make us re-use the same handle all the time, and try resetting
-             the handle first too */
-          curl_easy_reset(curl);
-          test_setopt(curl, CURLOPT_URL, libtest_arg2);
-          test_setopt(curl, CURLOPT_VERBOSE, 1);
-          test_setopt(curl, CURLOPT_FAILONERROR, 1);
-
-          /* re-add it */
-          res = (int)curl_multi_add_handle(m, curl);
-          if(res) {
-            fprintf(stderr, "add handle failed: %d.\n", res);
-            res = 243;
-            break;
-          }
-        }
-        else
-          done = TRUE; /* bail out */
-        break;
-      }
-    }
-    if (mp_timedout || done)
-      break;
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running) {
+      if(!current++) {
+        fprintf(stderr, "Advancing to URL 1\n");
+        /* remove the handle we use */
+        curl_multi_remove_handle(m, curl);
 
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
+        /* make us re-use the same handle all the time, and try resetting
+           the handle first too */
+        curl_easy_reset(curl);
+        easy_setopt(curl, CURLOPT_URL, libtest_arg2);
+        easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+        easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
+
+        /* re-add it */
+        multi_add_handle(m, curl);
+      }
+      else
+        break; /* done */
     }
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 189;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 195;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
+  /* undocumented cleanup sequence - type UB */
+
   curl_easy_cleanup(curl);
-  if(m)
-    curl_multi_cleanup(m);
+  curl_multi_cleanup(m);
   curl_global_cleanup();
 
   return res;
index e0c19f6..e3ae402 100644 (file)
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
-static CURLMcode perform(CURLM * multi)
+static int perform(CURLM *multi)
 {
   int handles;
-  CURLMcode code;
   fd_set fdread, fdwrite, fdexcep;
-  struct timeval mp_start;
-  char mp_timedout = FALSE;
-
-  mp_timedout = FALSE;
-  mp_start = tutil_tvnow();
-
-  for (;;) {
-    static struct timeval timeout = /* 100 ms */ { 0, 100000L };
-    int maxfd = -1;
-
-    code = curl_multi_perform(multi, &handles);
-    if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-        MULTI_PERFORM_HANG_TIMEOUT) {
-      mp_timedout = TRUE;
-      break;
-    }
-    if (handles <= 0)
-      return CURLM_OK;
-
-    switch (code) {
-      case CURLM_OK:
-        break;
-      case CURLM_CALL_MULTI_PERFORM:
-        continue;
-      default:
-        return code;
-    }
+  int res = 0;
+
+  for(;;) {
+    struct timeval interval;
+    int maxfd = -99;
+
+    interval.tv_sec = 0;
+    interval.tv_usec = 100000L; /* 100 ms */
+
+    res_multi_perform(multi, &handles);
+    if(res)
+      return res;
+
+    res_test_timedout();
+    if(res)
+      return res;
+
+    if(!handles)
+      break; /* done */
 
     FD_ZERO(&fdread);
     FD_ZERO(&fdwrite);
     FD_ZERO(&fdexcep);
-    curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
 
-    /* In a real-world program you OF COURSE check the return code of the
-       function calls.  On success, the value of maxfd is guaranteed to be
-       greater or equal than -1.  We call select(maxfd + 1, ...), specially in
-       case of (maxfd == -1), we call select(0, ...), which is basically equal
-       to sleep. */
+    res_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+    if(res)
+      return res;
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    if (select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout) == -1)
-      return (CURLMcode) ~CURLM_OK;
+    res_select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+    if(res)
+      return res;
+
+    res_test_timedout();
+    if(res)
+      return res;
   }
 
-  /* We only reach this point if (mp_timedout) */
-  if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-  fprintf(stderr, "ABORTING TEST, since it seems "
-          "that it would have run forever.\n");
-  return (CURLMcode) ~CURLM_OK;
+  return 0; /* success */
 }
 
 int test(char *URL)
 {
-  CURLM *multi;
-  CURL *easy;
+  CURLM *multi = NULL;
+  CURL *easy = NULL;
   int res = 0;
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  if ((multi = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  global_init(CURL_GLOBAL_ALL);
 
-  if ((easy = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_multi_cleanup(multi);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(multi);
+
+  easy_init(easy);
 
-  curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
+  multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
 
-  test_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite);
-  test_setopt(easy, CURLOPT_FAILONERROR, 1L);
-  test_setopt(easy, CURLOPT_URL, URL);
+  easy_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite);
+  easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
+  easy_setopt(easy, CURLOPT_URL, URL);
 
-  if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
-    printf("curl_multi_add_handle() failed\n");
-    res = TEST_ERR_MAJOR_BAD;
-  } else {
-    if (perform(multi) != CURLM_OK)
-      printf("retrieve 1 failed\n");
+  res_multi_add_handle(multi, easy);
+  if(res) {
+    printf("curl_multi_add_handle() 1 failed\n");
+    goto test_cleanup;
+  }
 
-    curl_multi_remove_handle(multi, easy);
+  res = perform(multi);
+  if(res) {
+    printf("retrieve 1 failed\n");
+    goto test_cleanup;
   }
+
+  curl_multi_remove_handle(multi, easy);
+
   curl_easy_reset(easy);
 
-  test_setopt(easy, CURLOPT_FAILONERROR, 1L);
-  test_setopt(easy, CURLOPT_URL, libtest_arg2);
+  easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
+  easy_setopt(easy, CURLOPT_URL, libtest_arg2);
 
-  if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
+  res_multi_add_handle(multi, easy);
+  if(res) {
     printf("curl_multi_add_handle() 2 failed\n");
-    res = TEST_ERR_MAJOR_BAD;
-  } else {
-    if (perform(multi) != CURLM_OK)
-      printf("retrieve 2 failed\n");
+    goto test_cleanup;
+  }
 
-    curl_multi_remove_handle(multi, easy);
+  res = perform(multi);
+  if(res) {
+    printf("retrieve 2 failed\n");
+    goto test_cleanup;
   }
 
+  curl_multi_remove_handle(multi, easy);
+
 test_cleanup:
 
+  /* undocumented cleanup sequence - type UB */
+
   curl_easy_cleanup(easy);
   curl_multi_cleanup(multi);
   curl_global_cleanup();
index 842dbab..5da5379 100644 (file)
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 "test.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
 
+#include "warnless.h"
 #include "memdebug.h"
 
 #if !defined(HAVE_POLL_FINE)    && \
@@ -34,7 +41,7 @@
 #error "this test requires FD_SETSIZE"
 #endif
 
-#define SAFETY_MARGIN (10)
+#define SAFETY_MARGIN (11)
 
 #if defined(WIN32) || defined(_WIN32) || defined(MSDOS)
 #define DEV_NULL "NUL"
index 9909d01..923893f 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
-  *                                  _   _ ____  _
-  *  Project                     ___| | | |  _ \| |
-  *                             / __| | | | |_) | |
-  *                            | (__| |_| |  _ <| |___
-  *                             \___|\___/|_| \_\_____|
-  *
-  */
-
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index bf4cd52..ac0ebe6 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This is the 'proxyauth.c' test app posted by Shmulik Regev on the libcurl
+ * 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.
+ *
+ ***************************************************************************/
+/* This is the 'proxyauth.c' test app posted by Shmulik Regev on the libcurl
  * mailing list on 10 Jul 2007, converted to a test case.
  *
  * argv1 = URL
 
 #include "test.h"
 
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
+#define TEST_HANG_TIMEOUT 60 * 1000
+
 #define PROXY libtest_arg2
 #define PROXYUSERPWD libtest_arg3
 #define HOST test_argv[4]
 
-static int init(CURLM *cm, const char* url, const char* userpwd,
+#define NUM_HANDLES 2
+
+CURL *eh[NUM_HANDLES];
+
+static int init(int num, CURLM *cm, const char* url, const char* userpwd,
                 struct curl_slist *headers)
 {
-  CURL *eh;
-  int res;
+  int res = 0;
 
-  if ((eh = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    return 1; /* failure */
-  }
+  res_easy_init(eh[num]);
+  if(res)
+    goto init_failed;
 
-  res = curl_easy_setopt(eh, CURLOPT_URL, url);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_PROXY, PROXY);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_PROXYUSERPWD, userpwd);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_VERBOSE, 1L);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_HEADER, 1L);
-  if(res) return 1;
-  res = curl_easy_setopt(eh, CURLOPT_HTTPHEADER, headers); /* custom Host: */
-  if(res) return 1;
-
-  if ((res = (int)curl_multi_add_handle(cm, eh)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    return 1; /* failure */
-  }
+  res_easy_setopt(eh[num], CURLOPT_URL, url);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_PROXY, PROXY);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_PROXYUSERPWD, userpwd);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_VERBOSE, 1L);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_HEADER, 1L);
+  if(res)
+    goto init_failed;
+
+  res_easy_setopt(eh[num], CURLOPT_HTTPHEADER, headers); /* custom Host: */
+  if(res)
+    goto init_failed;
+
+  res_multi_add_handle(cm, eh[num]);
+  if(res)
+    goto init_failed;
 
   return 0; /* success */
+
+init_failed:
+
+  curl_easy_cleanup(eh[num]);
+  eh[num] = NULL;
+
+  return res; /* failure */
 }
 
-static int loop(CURLM *cm, const char* url, const char* userpwd,
+static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
                 struct curl_slist *headers)
 {
   CURLMsg *msg;
-  CURLMcode code;
   long L;
-  int M, Q, U = -1;
+  int Q, U = -1;
   fd_set R, W, E;
   struct timeval T;
+  int res = 0;
 
-  if(init(cm, url, userpwd, headers))
-    return 1; /* failure */
+  res = init(num, cm, url, userpwd, headers);
+  if(res)
+    return res;
 
   while (U) {
 
-    do {
-      code = curl_multi_perform(cm, &U);
-    } while (code == CURLM_CALL_MULTI_PERFORM);
+    int M = -99;
+
+    res_multi_perform(cm, &U);
+    if(res)
+      return res;
+
+    res_test_timedout();
+    if(res)
+      return res;
 
     if (U) {
       FD_ZERO(&R);
       FD_ZERO(&W);
       FD_ZERO(&E);
 
-      if (curl_multi_fdset(cm, &R, &W, &E, &M)) {
-        fprintf(stderr, "E: curl_multi_fdset\n");
-        return 1; /* failure */
-      }
+      res_multi_fdset(cm, &R, &W, &E, &M);
+      if(res)
+        return res;
 
-      /* In a real-world program you OF COURSE check the return that maxfd is
-         bigger than -1 so that the call to select() below makes sense! */
+      /* At this point, M is guaranteed to be greater or equal than -1. */
 
-      if (curl_multi_timeout(cm, &L)) {
-        fprintf(stderr, "E: curl_multi_timeout\n");
-        return 1; /* failure */
-      }
+      res_multi_timeout(cm, &L);
+      if(res)
+        return res;
+
+      /* At this point, L is guaranteed to be greater or equal than -1. */
 
       if(L != -1) {
-        T.tv_sec = L/1000;
-        T.tv_usec = (L%1000)*1000;
+        int itimeout = (L > (long)INT_MAX) ? INT_MAX : (int)L;
+        T.tv_sec = itimeout/1000;
+        T.tv_usec = (itimeout%1000)*1000;
       }
       else {
         T.tv_sec = 5;
         T.tv_usec = 0;
       }
 
-      if (0 > select(M+1, &R, &W, &E, &T)) {
-        fprintf(stderr, "E: select\n");
-        return 1; /* failure */
-      }
+      res_select_test(M+1, &R, &W, &E, &T);
+      if(res)
+        return res;
     }
 
-    while ((msg = curl_multi_info_read(cm, &Q))) {
-      if (msg->msg == CURLMSG_DONE) {
+    while((msg = curl_multi_info_read(cm, &Q)) != NULL) {
+      if(msg->msg == CURLMSG_DONE) {
+        int i;
         CURL *e = msg->easy_handle;
         fprintf(stderr, "R: %d - %s\n", (int)msg->data.result,
                 curl_easy_strerror(msg->data.result));
         curl_multi_remove_handle(cm, e);
         curl_easy_cleanup(e);
+        for(i=0; i < NUM_HANDLES; i++) {
+          if(eh[i] == e) {
+            eh[i] = NULL;
+            break;
+          }
+        }
       }
-      else {
+      else
         fprintf(stderr, "E: CURLMsg (%d)\n", (int)msg->msg);
-      }
     }
+
+    res_test_timedout();
+    if(res)
+      return res;
   }
 
   return 0; /* success */
@@ -132,7 +189,13 @@ int test(char *URL)
   CURLM *cm = NULL;
   struct curl_slist *headers = NULL;
   char buffer[246]; /* naively fixed-size */
-  int res;
+  int res = 0;
+  int i;
+
+  for(i=0; i < NUM_HANDLES; i++)
+    eh[i] = NULL;
+
+  start_test_timing();
 
   if(test_argc < 4)
     return 99;
@@ -146,30 +209,37 @@ int test(char *URL)
     return TEST_ERR_MAJOR_BAD;
   }
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
     curl_slist_free_all(headers);
-    return TEST_ERR_MAJOR_BAD;
+    return res;
   }
 
-  if ((cm = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_slist_free_all(headers);
+  res_multi_init(cm);
+  if(res) {
     curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
+    curl_slist_free_all(headers);
+    return res;
   }
 
-  res = loop(cm, URL, PROXYUSERPWD, headers);
+  res = loop(0, cm, URL, PROXYUSERPWD, headers);
   if(res)
     goto test_cleanup;
 
   fprintf(stderr, "lib540: now we do the request again\n");
-  res = loop(cm, URL, PROXYUSERPWD, headers);
+
+  res = loop(1, cm, URL, PROXYUSERPWD, headers);
 
 test_cleanup:
 
-  curl_multi_cleanup(cm);
+  /* proper cleanup sequence - type PB */
 
+  for(i=0; i < NUM_HANDLES; i++) {
+    curl_multi_remove_handle(cm, eh[i]);
+    curl_easy_cleanup(eh[i]);
+  }
+
+  curl_multi_cleanup(cm);
   curl_global_cleanup();
 
   curl_slist_free_all(headers);
index 2fc85b9..5fe8dd8 100644 (file)
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "memdebug.h"
 
 /*
index ef7b483..84f493f 100644 (file)
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "memdebug.h"
 
 /*
index 8f14f84..b4a31ca 100644 (file)
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * Based on Alex Fishman's bug report on September 30, 2007
- */
+ * 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.
+ *
+ ***************************************************************************/
+/* Based on Alex Fishman's bug report on September 30, 2007 */
 
 #include "test.h"
 
@@ -33,9 +45,12 @@ int test(char *URL)
 
   s = curl_easy_escape(easy, (char*)a, asize);
 
-  printf("%s\n", s);
+  if(s)
+    printf("%s\n", s);
+
+  if(s)
+    curl_free(s);
 
-  curl_free(s);
   curl_easy_cleanup(easy);
 
   return 0;
index 6bc899c..b766187 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 4ef3037..c82bc3f 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
  * argv2 = proxy
  * argv3 = proxyuser:password
  */
index 9fd18b2..a1568c8 100644 (file)
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
  * argv2 = proxy
  * argv3 = non-zero means ASCII transfer
  */
index eeecf6f..2cc942a 100644 (file)
@@ -1,17 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * argv1 = URL
+ * 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
  * argv2 = proxy with embedded user+password
  */
 
 #include "test.h"
 
+#include "warnless.h"
 #include "memdebug.h"
 
 struct data {
@@ -123,7 +137,8 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 
 static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 {
-  printf("%.*s", (int)(size * nmemb), (char *)ptr);
+  int amount = curlx_uztosi(size * nmemb);
+  printf("%.*s", amount, (char *)ptr);
   (void)stream;
   return size * nmemb;
 }
index 8694daf..cb1cefd 100644 (file)
@@ -1,12 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This test case and code is based on the bug recipe Joe Malicki provided for
+ * 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.
+ *
+ ***************************************************************************/
+
+/* This test case and code is based on the bug recipe Joe Malicki provided for
  * bug report #1871269, fixed on Jan 14 2008 before the 7.18.0 release.
  */
 
index d7c6824..0596f3e 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
 #include "memdebug.h"
@@ -28,6 +40,14 @@ struct WriteThis {
 
 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
 {
+#ifdef LIB587
+  (void)ptr;
+  (void)size;
+  (void)nmemb;
+  (void)userp;
+  return CURL_READFUNC_ABORT;
+#else
+
   struct WriteThis *pooh = (struct WriteThis *)userp;
 
   if(size*nmemb < 1)
@@ -41,6 +61,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
   }
 
   return 0;                         /* no more data left to deliver */
+#endif
 }
 
 int test(char *URL)
@@ -52,6 +73,7 @@ int test(char *URL)
   struct curl_httppost *formpost=NULL;
   struct curl_httppost *lastptr=NULL;
   struct WriteThis pooh;
+  struct WriteThis pooh2;
 
   if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     fprintf(stderr, "curl_global_init() failed\n");
@@ -66,13 +88,30 @@ int test(char *URL)
                         &lastptr,
                         CURLFORM_COPYNAME, "sendfile",
                         CURLFORM_STREAM, &pooh,
-                        CURLFORM_CONTENTSLENGTH, pooh.sizeleft,
+                        CURLFORM_CONTENTSLENGTH, (long)pooh.sizeleft,
                         CURLFORM_FILENAME, "postit2.c",
                         CURLFORM_END);
 
   if(formrc)
     printf("curl_formadd(1) = %d\n", (int)formrc);
 
+  /* Now add the same data with another name and make it not look like
+     a file upload but still using the callback */
+
+  pooh2.readptr = data;
+  pooh2.sizeleft = strlen(data);
+
+  /* Fill in the file upload field */
+  formrc = curl_formadd(&formpost,
+                        &lastptr,
+                        CURLFORM_COPYNAME, "callbackdata",
+                        CURLFORM_STREAM, &pooh2,
+                        CURLFORM_CONTENTSLENGTH, (long)pooh2.sizeleft,
+                        CURLFORM_END);
+
+  if(formrc)
+    printf("curl_formadd(1) = %d\n", (int)formrc);
+
   /* Fill in the filename field */
   formrc = curl_formadd(&formpost,
                         &lastptr,
@@ -106,6 +145,16 @@ int test(char *URL)
   if(formrc)
     printf("curl_formadd(3) = %d\n", (int)formrc);
 
+  formrc = curl_formadd(&formpost, &lastptr,
+                        CURLFORM_COPYNAME, "somename",
+                        CURLFORM_BUFFER, "somefile.txt",
+                        CURLFORM_BUFFERPTR, "blah blah",
+                        CURLFORM_BUFFERLENGTH, (long)9,
+                        CURLFORM_END);
+
+  if(formrc)
+    printf("curl_formadd(4) = %d\n", (int)formrc);
+
   if ((curl = curl_easy_init()) == NULL) {
     fprintf(stderr, "curl_easy_init() failed\n");
     curl_formfree(formpost);
index 55b3f13..49a81bf 100644 (file)
@@ -1,12 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
- * This test case is supposed to be identical to 547 except that this uses the
+ * 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.
+ *
+ ***************************************************************************/
+
+/* This test case is supposed to be identical to 547 except that this uses the
  * multi interface and 547 is easy interface.
  *
  * argv1 = URL
 
 #include "test.h"
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 #define UPLOADTHIS "this is the blurb we want to upload\n"
 
@@ -60,95 +75,82 @@ static curlioerr ioctlcallback(CURL *handle,
 
 int test(char *URL)
 {
-  int res;
-  CURL *curl;
+  int res = 0;
+  CURL *curl = NULL;
   int counter=0;
   CURLM *m = NULL;
   int running=1;
-  struct timeval mp_start;
-  char mp_timedout = FALSE;
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  if ((curl = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  global_init(CURL_GLOBAL_ALL);
 
-  test_setopt(curl, CURLOPT_URL, URL);
-  test_setopt(curl, CURLOPT_VERBOSE, 1L);
-  test_setopt(curl, CURLOPT_HEADER, 1L);
+  easy_init(curl);
+
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* read the POST data from a callback */
-  test_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
-  test_setopt(curl, CURLOPT_IOCTLDATA, &counter);
-  test_setopt(curl, CURLOPT_READFUNCTION, readcallback);
-  test_setopt(curl, CURLOPT_READDATA, &counter);
+  easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
+  easy_setopt(curl, CURLOPT_IOCTLDATA, &counter);
+  easy_setopt(curl, CURLOPT_READFUNCTION, readcallback);
+  easy_setopt(curl, CURLOPT_READDATA, &counter);
   /* We CANNOT do the POST fine without setting the size (or choose chunked)! */
-  test_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
+  easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
 
-  test_setopt(curl, CURLOPT_POST, 1L);
+  easy_setopt(curl, CURLOPT_POST, 1L);
 #ifdef CURL_DOES_CONVERSIONS
   /* Convert the POST data to ASCII. */
-  test_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
+  easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
 #endif
-  test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
-  test_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
-  test_setopt(curl, CURLOPT_PROXYAUTH,
+  easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+  easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
+  easy_setopt(curl, CURLOPT_PROXYAUTH,
                    (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(m);
 
-  if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
-
-  mp_timedout = FALSE;
-  mp_start = tutil_tvnow();
+  multi_add_handle(m, curl);
 
   while (running) {
-    res = (int)curl_multi_perform(m, &running);
-    if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-        MULTI_PERFORM_HANG_TIMEOUT) {
-      mp_timedout = TRUE;
-      break;
-    }
+    struct timeval timeout;
+    fd_set fdread, fdwrite, fdexcep;
+    int maxfd = -99;
+
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 100000L; /* 100 ms */
+
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
 #ifdef TPF
     sleep(1); /* avoid ctl-10 dump */
 #endif
-    if (running <= 0) {
-      fprintf(stderr, "nothing left running.\n");
-      break;
-    }
-  }
 
-  if (mp_timedout) {
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    if(!running)
+      break; /* done */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
-  if(m) {
-    curl_multi_remove_handle(m, curl);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+
+  curl_multi_remove_handle(m, curl);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(curl);
   curl_global_cleanup();
 
index 78d123b..9806220 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
@@ -40,6 +52,7 @@ int test(char *URL)
 
   test_setopt(curl, CURLOPT_URL, URL);
   test_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
@@ -72,9 +85,11 @@ int test(char *URL)
         sleep(1); /* avoid ctl-10 dump */
 #endif
 
-        if(iolen)
+        if(iolen) {
           /* send received stuff to stdout */
-          write(STDOUT_FILENO, buf, iolen);
+          if(!write(STDOUT_FILENO, buf, iolen))
+            break;
+        }
         total += iolen;
 
       } while(((res == CURLE_OK) || (res == CURLE_AGAIN)) && (total < 129));
index 48ccaf3..dc3bcae 100644 (file)
@@ -1,11 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
 
 /*
  * The purpose of this test is to minimally exercise libcurl's internal
index 56f2a26..1286a1d 100644 (file)
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#  include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-#  include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#  include <arpa/inet.h>
-#endif
-
-#define ENABLE_CURLX_PRINTF
-#include "curlx.h"
-
-#include "hash.h"
-#include "hostip.h"
-
-#include "curl_memory.h"
 #include "memdebug.h"
 
-/* This source file is used for test # 558 and 559 */
-
-/*
- * This hacky test bypasses the library external API,
- * using internal only libcurl functions. So don't be
- * surprised if we cannot run it when the library has
- * been built with hidden symbols, exporting only the
- * ones in the public API.
- */
-
-#if defined(CURL_HIDDEN_SYMBOLS)
-#  define SKIP_TEST 1
-#elif defined(WIN32) && !defined(CURL_STATICLIB)
-#  define SKIP_TEST 1
-#else
-#  undef  SKIP_TEST
-#endif
-
-
-#if !defined(SKIP_TEST)
-
-#ifdef LIB559
-static Curl_addrinfo *fake_ai(void)
-{
-  Curl_addrinfo *ai;
-  int ss_size;
-
-  ss_size = sizeof (struct sockaddr_in);
-
-  if((ai = calloc(1, sizeof(Curl_addrinfo))) == NULL)
-    return NULL;
-
-  if((ai->ai_canonname = strdup("dummy")) == NULL) {
-    free(ai);
-    return NULL;
-  }
-
-  if((ai->ai_addr = calloc(1, ss_size)) == NULL) {
-    free(ai->ai_canonname);
-    free(ai);
-    return NULL;
-  }
-
-  ai->ai_family = AF_INET;
-  ai->ai_addrlen = ss_size;
-
-  return ai;
-}
-#endif /* LIB559 */
-
-
 int test(char *URL)
 {
-  CURL *easyh = NULL;
-  struct curl_hash *hp = NULL;
-  int result = 0;
-
-  if(!strcmp(URL, "check")) {
-    /* test harness script verifying if this test can run */
-    return 0; /* sure, run this! */
-  }
-
-  easyh = curl_easy_init();
-  if(!easyh) {
-    fprintf(stdout, "easy handle init failed\n");
-    result = TEST_ERR_MAJOR_BAD;
-    goto cleanup;
-  }
-  fprintf(stdout, "easy handle init OK\n");
-
-  fprintf(stdout, "creating hash...\n");
-  hp = Curl_mk_dnscache();
-  if(!hp) {
-    fprintf(stdout, "hash creation failed\n");
-    result = TEST_ERR_MAJOR_BAD;
-    goto cleanup;
-  }
-  fprintf(stdout, "hash creation OK\n");
-
-  /**/
-#ifdef LIB559
-  {
-    char *data_key;
-    struct Curl_dns_entry *data_node;
-    struct Curl_dns_entry *nodep;
-    size_t key_len;
-
-    data_key = aprintf("%s:%d", "dummy", 0);
-    if(!data_key) {
-      fprintf(stdout, "data key creation failed\n");
-      result = TEST_ERR_MAJOR_BAD;
-      goto cleanup;
-    }
-    key_len = strlen(data_key);
+  unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+                       0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
+  CURLcode res = CURLE_OK;
+  char *ptr = NULL;
+  int asize;
 
-    data_node = calloc(1, sizeof(struct Curl_dns_entry));
-    if(!data_node) {
-      fprintf(stdout, "data node creation failed\n");
-      result = TEST_ERR_MAJOR_BAD;
-      free(data_key);
-      goto cleanup;
-    }
+  (void)URL; /* we don't use this */
 
-    data_node->addr = fake_ai();
-    if(!data_node->addr) {
-      fprintf(stdout, "actual data creation failed\n");
-      result = TEST_ERR_MAJOR_BAD;
-      free(data_node);
-      free(data_key);
-      goto cleanup;
-    }
-
-    nodep = Curl_hash_add(hp, data_key, key_len+1, (void *)data_node);
-    if(!nodep) {
-      fprintf(stdout, "insertion into hash failed\n");
-      result = TEST_ERR_MAJOR_BAD;
-      Curl_freeaddrinfo(data_node->addr);
-      free(data_node);
-      free(data_key);
-      goto cleanup;
-    }
-
-    free(data_key);
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
   }
-#endif /* LIB559 */
-  /**/
-
-cleanup:
 
-  fprintf(stdout, "destroying hash...\n");
-  Curl_hash_destroy(hp);
-  fprintf(stdout, "hash destruction OK\n");
+  ptr = malloc(558);
+  Curl_safefree(ptr);
 
-  fprintf(stdout, "destroying easy handle...\n");
-  curl_easy_cleanup(easyh);
-  fprintf(stdout, "easy handle destruction OK\n");
+  asize = (int)sizeof(a);
+  ptr = curl_easy_escape(NULL, (char *)a, asize);
+  if(ptr)
+    curl_free(ptr);
 
   curl_global_cleanup();
 
-  return result;
+  return (int)res;
 }
 
-
-#else /* !defined(SKIP_TEST) */
-
-
-int test(char *URL)
-{
-  (void)URL;
-  fprintf(stdout, "libcurl built with hidden symbols");
-  return 1; /* skip test */
-}
-
-
-#endif /* !defined(SKIP_TEST) */
index 87e8545..e8be1c7 100644 (file)
@@ -1,14 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
 /*
  * Simply download a HTTPS file!
  *
  */
 int test(char *URL)
 {
-  CURL *http_handle;
+  CURL *http_handle = NULL;
   CURLM *multi_handle = NULL;
-  CURLMcode code;
-  int res;
+  int res = 0;
 
   int still_running; /* keep number of running handles */
 
-  http_handle = curl_easy_init();
-  if (!http_handle)
-    return TEST_ERR_MAJOR_BAD;
+  start_test_timing();
+
+  /*
+  ** curl_global_init called indirectly from curl_easy_init.
+  */
+
+  easy_init(http_handle);
 
   /* set options */
-  test_setopt(http_handle, CURLOPT_URL, URL);
-  test_setopt(http_handle, CURLOPT_HEADER, 1L);
-  test_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L);
-  test_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L);
+  easy_setopt(http_handle, CURLOPT_URL, URL);
+  easy_setopt(http_handle, CURLOPT_HEADER, 1L);
+  easy_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L);
+  easy_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L);
 
   /* init a multi stack */
-  multi_handle = curl_multi_init();
-  if (!multi_handle) {
-    curl_easy_cleanup(http_handle);
-    return TEST_ERR_MAJOR_BAD;
-  }
+  multi_init(multi_handle);
 
   /* add the individual transfers */
-  curl_multi_add_handle(multi_handle, http_handle);
+  multi_add_handle(multi_handle, http_handle);
 
   /* we start some action by calling perform right away */
-  do {
-    code = curl_multi_perform(multi_handle, &still_running);
-  } while(code == CURLM_CALL_MULTI_PERFORM);
+  multi_perform(multi_handle, &still_running);
+
+  abort_on_test_timeout();
 
   while(still_running) {
     struct timeval timeout;
-    int rc; /* select() return code */
 
     fd_set fdread;
     fd_set fdwrite;
     fd_set fdexcep;
-    int maxfd;
+    int maxfd = -99;
 
     FD_ZERO(&fdread);
     FD_ZERO(&fdwrite);
@@ -71,33 +87,25 @@ int test(char *URL)
     timeout.tv_usec = 0;
 
     /* get file descriptors from the transfers */
-    curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
-    /* In a real-world program you OF COURSE check the return code of the
-       function calls, *and* you make sure that maxfd is bigger than -1 so
-       that the call to select() below makes sense! */
-
-    rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-
-    switch(rc) {
-    case -1:
-      /* select error */
-      break;
-    case 0:
-    default:
-      /* timeout or readable/writable sockets */
-      do {
-        code = curl_multi_perform(multi_handle, &still_running);
-      } while(code == CURLM_CALL_MULTI_PERFORM);
-      break;
-    }
+    multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
+
+    /* timeout or readable/writable sockets */
+    multi_perform(multi_handle, &still_running);
+
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
-  if(multi_handle)
-    curl_multi_cleanup(multi_handle);
+  /* undocumented cleanup sequence - type UA */
 
+  curl_multi_cleanup(multi_handle);
   curl_easy_cleanup(http_handle);
   curl_global_cleanup();
 
index acdd79a..a5f0ea5 100644 (file)
@@ -1,31 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "memdebug.h"
 
 /*
index d33f230..2a0a566 100644 (file)
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 int test(char *URL)
 {
   int res = 0;
-  CURL *curl;
+  CURL *curl = NULL;
   int running;
-  char done=FALSE;
   CURLM *m = NULL;
-  struct timeval ml_start;
-  struct timeval mp_start;
-  char ml_timedout = FALSE;
-  char mp_timedout = FALSE;
-
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
 
-  if ((curl = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  test_setopt(curl, CURLOPT_URL, URL);
-  test_setopt(curl, CURLOPT_VERBOSE, 1);
-  test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
-  test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
+  global_init(CURL_GLOBAL_ALL);
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(curl);
 
-  if ((res = (int)curl_multi_add_handle(m, curl)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(curl);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
+  easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4);
+
+  multi_init(m);
 
-  ml_timedout = FALSE;
-  ml_start = tutil_tvnow();
+  multi_add_handle(m, curl);
 
   fprintf(stderr, "Start at URL 0\n");
 
-  while (!done) {
-    fd_set rd, wr, exc;
-    int max_fd;
+  for(;;) {
     struct timeval interval;
+    fd_set rd, wr, exc;
+    int maxfd = -99;
 
     interval.tv_sec = 1;
     interval.tv_usec = 0;
 
-    if (tutil_tvdiff(tutil_tvnow(), ml_start) >
-        MAIN_LOOP_HANG_TIMEOUT) {
-      ml_timedout = TRUE;
-      break;
-    }
-    mp_timedout = FALSE;
-    mp_start = tutil_tvnow();
-
-    while (res == CURLM_CALL_MULTI_PERFORM) {
-      res = (int)curl_multi_perform(m, &running);
-      if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-          MULTI_PERFORM_HANG_TIMEOUT) {
-        mp_timedout = TRUE;
-        break;
-      }
-      if (running <= 0) {
-        done = TRUE; /* bail out */
-        break;
-      }
-    }
-    if (mp_timedout || done)
-      break;
-
-    if (res != CURLM_OK) {
-      fprintf(stderr, "not okay???\n");
-      break;
-    }
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
 
     FD_ZERO(&rd);
     FD_ZERO(&wr);
     FD_ZERO(&exc);
-    max_fd = 0;
 
-    if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
-      fprintf(stderr, "unexpected failured of fdset.\n");
-      res = 189;
-      break;
-    }
+    multi_fdset(m, &rd, &wr, &exc, &maxfd);
 
-    if (select_test(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
-      fprintf(stderr, "bad select??\n");
-      res = 195;
-      break;
-    }
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
 
-    res = CURLM_CALL_MULTI_PERFORM;
-  }
+    select_test(maxfd+1, &rd, &wr, &exc, &interval);
 
-  if (ml_timedout || mp_timedout) {
-    if (ml_timedout) fprintf(stderr, "ml_timedout\n");
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    abort_on_test_timeout();
   }
 
 test_cleanup:
 
+  /* undocumented cleanup sequence - type UB */
+
   curl_easy_cleanup(curl);
-  if(m)
-    curl_multi_cleanup(m);
+  curl_multi_cleanup(m);
   curl_global_cleanup();
 
   return res;
index 889f15b..ba839d6 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index e1df0c1..573529c 100644 (file)
@@ -1,13 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
+
 #include "memdebug.h"
 
 /*
index 1f16664..4b15821 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #ifdef HAVE_SYS_STAT_H
index b5182d6..a434d74 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include <curl/mprintf.h>
index 9fe2ece..fe10de5 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 "test.h"
 
 #include <curl/mprintf.h>
@@ -60,7 +72,7 @@ int test(char *URL)
     goto test_cleanup;
   }
 
-  test_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 999);
+  test_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 999L);
   test_setopt(curl, CURLOPT_RTSP_TRANSPORT,
                     "RAW/RAW/UDP;unicast;client_port=3056-3057");
   test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
index 2892211..78c1c95 100644 (file)
@@ -1,17 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2013, 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 "test.h"
 
-#ifdef HAVE_SYS_SOCKET_H
-#  include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #  include <netinet/in.h>
 #endif
@@ -30,6 +39,7 @@
 
 #include <curl/mprintf.h>
 
+#include "warnless.h"
 #include "memdebug.h"
 
 #define RTP_PKT_CHANNEL(p)   ((int)((unsigned char)((p)[1])))
@@ -45,12 +55,14 @@ static int rtp_packet_count = 0;
 static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
   char *data = (char *)ptr;
   int channel = RTP_PKT_CHANNEL(data);
-  int message_size = (int)(size * nmemb) - 4;
+  int message_size;
   int coded_size = RTP_PKT_LENGTH(data);
   size_t failure = (size * nmemb) ? 0 : 1;
   int i;
   (void)stream;
 
+  message_size = curlx_uztosi(size * nmemb) - 4;
+
   printf("RTP: message size %d, channel %d\n", message_size, channel);
   if(message_size != coded_size) {
     printf("RTP embedded size (%d) does not match the write size (%d).\n",
@@ -123,7 +135,7 @@ int test(char *URL)
   stream_uri = NULL;
 
   test_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
-  test_setopt(curl, CURLOPT_TIMEOUT, 3);
+  test_setopt(curl, CURLOPT_TIMEOUT, 3L);
   test_setopt(curl, CURLOPT_VERBOSE, 1L);
   test_setopt(curl, CURLOPT_WRITEDATA, protofile);
 
index 18e74d4..3df4d03 100644 (file)
@@ -1,12 +1,24 @@
-
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
- */
-
+ *
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #ifdef HAVE_SYS_STAT_H
index 5edb181..b49d26a 100644 (file)
@@ -1,19 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
+#include "testtrace.h"
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
-#define MAIN_LOOP_HANG_TIMEOUT     90 * 1000
-#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+#define TEST_HANG_TIMEOUT 60 * 1000
 
 /*
  * Get a single URL without select().
 
 int test(char *URL)
 {
-  CURL *c;
+  CURL *c = NULL;
   CURLM *m = NULL;
   int res = 0;
-  int running=1;
+  int running = 1;
   double connect_time = 0.0;
-  struct timeval mp_start;
-  char mp_timedout = FALSE;
+  double dbl_epsilon;
 
-  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    return TEST_ERR_MAJOR_BAD;
-  }
+  dbl_epsilon = 1.0;
+  do {
+    dbl_epsilon /= 2.0;
+  } while ((double)(1.0 + (dbl_epsilon/2.0)) > (double)1.0);
 
-  if ((c = curl_easy_init()) == NULL) {
-    fprintf(stderr, "curl_easy_init() failed\n");
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  start_test_timing();
 
-  test_setopt(c, CURLOPT_HEADER, 1L);
-  test_setopt(c, CURLOPT_URL, URL);
+  global_init(CURL_GLOBAL_ALL);
 
-  if ((m = curl_multi_init()) == NULL) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_init(c);
 
-  if ((res = (int)curl_multi_add_handle(m, c)) != CURLM_OK) {
-    fprintf(stderr, "curl_multi_add_handle() failed, "
-            "with code %d\n", res);
-    curl_multi_cleanup(m);
-    curl_easy_cleanup(c);
-    curl_global_cleanup();
-    return TEST_ERR_MAJOR_BAD;
-  }
+  easy_setopt(c, CURLOPT_HEADER, 1L);
+  easy_setopt(c, CURLOPT_URL, URL);
+
+  libtest_debug_config.nohex = 1;
+  libtest_debug_config.tracetime = 1;
+  easy_setopt(c, CURLOPT_DEBUGDATA, &libtest_debug_config);
+  easy_setopt(c, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
+  easy_setopt(c, CURLOPT_VERBOSE, 1L);
+
+  multi_init(m);
 
-  mp_timedout = FALSE;
-  mp_start = tutil_tvnow();
+  multi_add_handle(m, c);
 
   while (running) {
-    res = (int)curl_multi_perform(m, &running);
-    if (tutil_tvdiff(tutil_tvnow(), mp_start) >
-        MULTI_PERFORM_HANG_TIMEOUT) {
-      mp_timedout = TRUE;
-      break;
-    }
-    if (running <= 0) {
-      fprintf(stderr, "nothing left running.\n");
-      break;
-    }
-  }
+    struct timeval timeout;
+    fd_set fdread, fdwrite, fdexcep;
+    int maxfd = -99;
+
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 100000L; /* 100 ms */
+
+    multi_perform(m, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
 
-  if (mp_timedout) {
-    if (mp_timedout) fprintf(stderr, "mp_timedout\n");
-    fprintf(stderr, "ABORTING TEST, since it seems "
-            "that it would have run forever.\n");
-    res = TEST_ERR_RUNS_FOREVER;
+    multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
   }
 
   curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
-  if (connect_time <= 0.0) {
-    fprintf(stderr, "connect time is <=0.0\n");
+  if (connect_time < dbl_epsilon) {
+    fprintf(stderr, "connect time is < epsilon\n");
     res = TEST_ERR_MAJOR_BAD;
   }
 
 test_cleanup:
 
-  if(m) {
-    curl_multi_remove_handle(m, c);
-    curl_multi_cleanup(m);
-  }
+  /* proper cleanup sequence - type PA */
+
+  curl_multi_remove_handle(m, c);
+  curl_multi_cleanup(m);
   curl_easy_cleanup(c);
   curl_global_cleanup();
 
index 69b2979..afb2bce 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 521720e..942df68 100644 (file)
@@ -1,21 +1,34 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 
 #include "testutil.h"
+#include "warnless.h"
 #include "memdebug.h"
 
+#define TEST_HANG_TIMEOUT 60 * 1000
+
 /* 3x download!
  * 1. normal
  * 2. dup handle
 
 int test(char *URL)
 {
-  CURLMcode m;
-  CURL *handle = NULL, *duphandle;
+  CURL *handle = NULL;
+  CURL *duphandle = NULL;
   CURLM *mhandle = NULL;
   int res = 0;
   int still_running = 0;
 
-  if(curl_global_init(CURL_GLOBAL_ALL)) {
-    fprintf(stderr, "curl_global_init() failed\n");
-    goto test_cleanup;
-  }
+  start_test_timing();
 
-  handle = curl_easy_init();
-  if(!handle) {
-    res = CURLE_OUT_OF_MEMORY;
-    goto test_cleanup;
-  }
+  global_init(CURL_GLOBAL_ALL);
+
+  easy_init(handle);
 
-  test_setopt(handle, CURLOPT_URL, URL);
-  test_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
-  test_setopt(handle, CURLOPT_VERBOSE, 1L);
+  easy_setopt(handle, CURLOPT_URL, URL);
+  easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
+  easy_setopt(handle, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(handle);
   if(res)
@@ -59,51 +67,48 @@ int test(char *URL)
   curl_easy_cleanup(handle);
   handle = duphandle;
 
-  mhandle = curl_multi_init();
-  if(!mhandle) {
-    fprintf(stderr, "curl_multi_init() failed\n");
-    goto test_cleanup;
-  }
+  multi_init(mhandle);
+
+  multi_add_handle(mhandle, handle);
 
-  curl_multi_add_handle(mhandle, handle);
+  multi_perform(mhandle, &still_running);
 
-  while(CURLM_CALL_MULTI_PERFORM ==
-        curl_multi_perform(mhandle, &still_running));
+  abort_on_test_timeout();
 
   while(still_running) {
-    static struct timeval timeout = /* 100 ms */ { 0, 100000L };
-    int rc;
+    struct timeval timeout;
     fd_set fdread;
     fd_set fdwrite;
     fd_set fdexcep;
-    int max_fdset = -1;
+    int maxfd = -99;
+
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 100000L; /* 100 ms */
+
     FD_ZERO(&fdread);
     FD_ZERO(&fdwrite);
     FD_ZERO(&fdexcep);
 
-    m = curl_multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &max_fdset);
-    if(m != CURLM_OK) {
-      fprintf(stderr, "curl_multi_fdset() error\n");
-      goto test_cleanup;
-    }
-    /* We call select(max_fdset + 1, ...), specially in case of (maxfd == -1),
-     * we call select(0, ...), which is basically equal to sleep. */
-    rc = select(max_fdset + 1, &fdread, &fdwrite, &fdexcep, &timeout);
-    if(rc == -1) {
-      fprintf(stderr, "select() error\n");
-      goto test_cleanup;
-    }
-    else {
-      while(CURLM_CALL_MULTI_PERFORM ==
-          curl_multi_perform(mhandle, &still_running));
-    }
+    multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    abort_on_test_timeout();
+
+    multi_perform(mhandle, &still_running);
+
+    abort_on_test_timeout();
   }
 
 test_cleanup:
-  if(mhandle)
-    curl_multi_cleanup(mhandle);
-  if(handle)
-    curl_easy_cleanup(handle);
+
+  /* undocumented cleanup sequence - type UA */
+
+  curl_multi_cleanup(mhandle);
+  curl_easy_cleanup(handle);
   curl_global_cleanup();
+
   return res;
 }
index 821eb61..61bb613 100644 (file)
@@ -1,13 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
+
 #include "testutil.h"
 #include "memdebug.h"
 
index 2efb003..a39b317 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2011, 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 "test.h"
 
 #include "memdebug.h"
index 2b80ab0..c5cf603 100644 (file)
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
+ * Copyright (C) 1998 - 2012, 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 "test.h"
 
 #include "memdebug.h"
@@ -125,7 +137,7 @@ int test(char *URL)
   /* enforce chunked transfer by setting the header */
   test_setopt(curl, CURLOPT_HTTPHEADER, slist);
 
-  test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+  test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
   test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
 
   /* we want to use our own progress function */
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c
new file mode 100644 (file)
index 0000000..952efb4
--- /dev/null
@@ -0,0 +1,366 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#include <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+struct Sockets
+{
+  curl_socket_t *sockets;
+  int count;      /* number of sockets actually stored in array */
+  int max_count;  /* max number of sockets that fit in allocated array */
+};
+
+struct ReadWriteSockets
+{
+  struct Sockets read, write;
+};
+
+/**
+ * Remove a file descriptor from a sockets array.
+ */
+static void removeFd(struct Sockets* sockets, curl_socket_t fd, int mention)
+{
+  int i;
+
+  if(mention)
+    fprintf(stderr, "Remove socket fd %d\n", (int) fd);
+
+  for (i = 0; i < sockets->count; ++i) {
+    if (sockets->sockets[i] == fd) {
+      if (i < sockets->count - 1)
+        memmove(&sockets->sockets[i], &sockets->sockets[i + 1],
+              sizeof(curl_socket_t) * (sockets->count - (i + 1)));
+      --sockets->count;
+    }
+  }
+}
+
+/**
+ * Add a file descriptor to a sockets array.
+ */
+static void addFd(struct Sockets* sockets, curl_socket_t fd, const char *what)
+{
+  /**
+   * To ensure we only have each file descriptor once, we remove it then add
+   * it again.
+   */
+  fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what);
+  removeFd(sockets, fd, 0);
+  /*
+   * Allocate array storage when required.
+   */
+  if(!sockets->sockets) {
+    sockets->sockets = malloc(sizeof(curl_socket_t) * 20U);
+    if(!sockets->sockets)
+      return;
+    sockets->max_count = 20;
+  }
+  else if(sockets->count + 1 > sockets->max_count) {
+    curl_socket_t *oldptr = sockets->sockets;
+    sockets->sockets = realloc(oldptr, sizeof(curl_socket_t) *
+                               (sockets->max_count + 20));
+    if(!sockets->sockets) {
+      /* cleanup in test_cleanup */
+      sockets->sockets = oldptr;
+      return;
+    }
+    sockets->max_count += 20;
+  }
+  /*
+   * Add file descriptor to array.
+   */
+  sockets->sockets[sockets->count] = fd;
+  ++sockets->count;
+}
+
+/**
+ * Callback invoked by curl to poll reading / writing of a socket.
+ */
+static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
+                              void *userp, void *socketp)
+{
+  struct ReadWriteSockets* sockets = userp;
+
+  (void)easy; /* unused */
+  (void)socketp; /* unused */
+
+  if (action == CURL_POLL_IN || action == CURL_POLL_INOUT)
+    addFd(&sockets->read, s, "read");
+
+  if (action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
+    addFd(&sockets->write, s, "write");
+
+  if(action == CURL_POLL_REMOVE) {
+    removeFd(&sockets->read, s, 1);
+    removeFd(&sockets->write, s, 0);
+  }
+
+  return 0;
+}
+
+/**
+ * Callback invoked by curl to set a timeout.
+ */
+static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
+{
+  struct timeval* timeout = userp;
+
+  (void)multi; /* unused */
+  if (timeout_ms != -1) {
+    *timeout = tutil_tvnow();
+    timeout->tv_usec += timeout_ms * 1000;
+  }
+  else {
+    timeout->tv_sec = -1;
+  }
+  return 0;
+}
+
+/**
+ * Check for curl completion.
+ */
+static int checkForCompletion(CURLM* curl, int* success)
+{
+  int numMessages;
+  CURLMsg* message;
+  int result = 0;
+  *success = 0;
+  while ((message = curl_multi_info_read(curl, &numMessages)) != NULL) {
+    if (message->msg == CURLMSG_DONE) {
+      result = 1;
+      if (message->data.result == CURLE_OK)
+        *success = 1;
+      else
+        *success = 0;
+    }
+    else {
+      fprintf(stderr, "Got an unexpected message from curl: %i\n",
+              (int)message->msg);
+      result = 1;
+      *success = 0;
+    }
+  }
+  return result;
+}
+
+static int getMicroSecondTimeout(struct timeval* timeout)
+{
+  struct timeval now;
+  ssize_t result;
+  now = tutil_tvnow();
+  result = (timeout->tv_sec - now.tv_sec) * 1000000 +
+    timeout->tv_usec - now.tv_usec;
+  if (result < 0)
+    result = 0;
+
+  return curlx_sztosi(result);
+}
+
+/**
+ * Update a fd_set with all of the sockets in use.
+ */
+static void updateFdSet(struct Sockets* sockets, fd_set* fdset,
+                        curl_socket_t *maxFd)
+{
+  int i;
+  for (i = 0; i < sockets->count; ++i) {
+    FD_SET(sockets->sockets[i], fdset);
+    if (*maxFd < sockets->sockets[i] + 1) {
+      *maxFd = sockets->sockets[i] + 1;
+    }
+  }
+}
+
+static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask,
+                       const char *info)
+{
+  int numhandles = 0;
+  CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles);
+  if (result != CURLM_OK) {
+    fprintf(stderr, "Curl error on %s: %i (%s)\n",
+            info, result, curl_multi_strerror(result));
+  }
+}
+
+/**
+ * Invoke curl when a file descriptor is set.
+ */
+static void checkFdSet(CURLM *curl, struct Sockets *sockets, fd_set *fdset,
+                       int evBitmask, const char *name)
+{
+  int i;
+  for (i = 0; i < sockets->count; ++i) {
+    if (FD_ISSET(sockets->sockets[i], fdset)) {
+      notifyCurl(curl, sockets->sockets[i], evBitmask, name);
+    }
+  }
+}
+
+int test(char *URL)
+{
+  int res = 0;
+  CURL *curl = NULL;
+  FILE *hd_src = NULL;
+  int hd ;
+  int error;
+  struct_stat file_info;
+  CURLM *m = NULL;
+  struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
+  struct timeval timeout = {-1, 0};
+  int success = 0;
+
+  start_test_timing();
+
+  if (!libtest_arg3) {
+    fprintf(stderr, "Usage: lib582 [url] [filename] [username]\n");
+    return TEST_ERR_USAGE;
+  }
+
+  hd_src = fopen(libtest_arg2, "rb");
+  if(NULL == hd_src) {
+    error = ERRNO;
+    fprintf(stderr, "fopen() failed with error: %d (%s)\n",
+            error, strerror(error));
+    fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
+    return TEST_ERR_FOPEN;
+  }
+
+  /* get the file size of the local file */
+  hd = fstat(fileno(hd_src), &file_info);
+  if(hd == -1) {
+    /* can't open file, bail out */
+    error = ERRNO;
+    fprintf(stderr, "fstat() failed with error: %d (%s)\n",
+            error, strerror(error));
+    fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
+    fclose(hd_src);
+    return TEST_ERR_FSTAT;
+  }
+  fprintf(stderr, "Set to upload %d bytes\n", (int)file_info.st_size);
+
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    fclose(hd_src);
+    return res;
+  }
+
+  easy_init(curl);
+
+  /* enable uploading */
+  easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+  /* specify target */
+  easy_setopt(curl,CURLOPT_URL, URL);
+
+  /* go verbose */
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  /* now specify which file to upload */
+  easy_setopt(curl, CURLOPT_READDATA, hd_src);
+
+  easy_setopt(curl, CURLOPT_USERPWD, libtest_arg3);
+  easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, "curl_client_key.pub");
+  easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, "curl_client_key");
+
+  easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
+
+  multi_init(m);
+
+  multi_setopt(m, CURLMOPT_SOCKETFUNCTION, curlSocketCallback);
+  multi_setopt(m, CURLMOPT_SOCKETDATA, &sockets);
+
+  multi_setopt(m, CURLMOPT_TIMERFUNCTION, curlTimerCallback);
+  multi_setopt(m, CURLMOPT_TIMERDATA, &timeout);
+
+  multi_add_handle(m, curl);
+
+  while (!checkForCompletion(m, &success))
+  {
+    fd_set readSet, writeSet;
+    curl_socket_t maxFd = 0;
+    struct timeval tv = {10, 0};
+
+    FD_ZERO(&readSet);
+    FD_ZERO(&writeSet);
+    updateFdSet(&sockets.read, &readSet, &maxFd);
+    updateFdSet(&sockets.write, &writeSet, &maxFd);
+
+    if (timeout.tv_sec != -1)
+    {
+      int usTimeout = getMicroSecondTimeout(&timeout);
+      tv.tv_sec = usTimeout / 1000000;
+      tv.tv_usec = usTimeout % 1000000;
+    }
+    else if (maxFd <= 0)
+    {
+      tv.tv_sec = 0;
+      tv.tv_usec = 100000;
+    }
+
+    select_test(maxFd, &readSet, &writeSet, NULL, &tv);
+
+    /* Check the sockets for reading / writing */
+    checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
+    checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
+
+    if (timeout.tv_sec != -1 && getMicroSecondTimeout(&timeout) == 0)
+    {
+      /* Curl's timer has elapsed. */
+      notifyCurl(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
+    }
+
+    abort_on_test_timeout();
+  }
+
+  if (!success)
+  {
+    fprintf(stderr, "Error uploading file.\n");
+    res = TEST_ERR_MAJOR_BAD;
+  }
+
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
+
+  curl_multi_remove_handle(m, curl);
+  curl_easy_cleanup(curl);
+  curl_multi_cleanup(m);
+  curl_global_cleanup();
+
+  /* close the local file */
+  fclose(hd_src);
+
+  /* free local memory */
+  if(sockets.read.sockets)
+    free(sockets.read.sockets);
+  if(sockets.write.sockets)
+    free(sockets.write.sockets);
+
+  return res;
+}
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
new file mode 100644 (file)
index 0000000..ad5a5ce
--- /dev/null
@@ -0,0 +1,84 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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.
+ *
+ ***************************************************************************/
+/*
+ * This test case is based on the sample code provided by Saqib Ali
+ * http://curl.haxx.se/mail/lib-2011-03/0066.html
+ */
+
+#include "test.h"
+
+#include <sys/stat.h>
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  int stillRunning;
+  CURLM* multiHandle = NULL;
+  CURL* curl = NULL;
+  int res = 0;
+
+  global_init(CURL_GLOBAL_ALL);
+
+  multi_init(multiHandle);
+
+  easy_init(curl);
+
+  easy_setopt(curl, CURLOPT_USERPWD, libtest_arg2);
+  easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, "curl_client_key.pub");
+  easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, "curl_client_key");
+
+  easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+  easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  easy_setopt(curl, CURLOPT_URL, URL);
+  easy_setopt(curl, CURLOPT_INFILESIZE, (long)5);
+
+  multi_add_handle(multiHandle, curl);
+
+  /* this tests if removing an easy handle immediately after multi
+     perform has been called succeeds or not. */
+
+  fprintf(stderr, "curl_multi_perform()...\n");
+
+  multi_perform(multiHandle, &stillRunning);
+
+  fprintf(stderr, "curl_multi_perform() succeeded\n");
+
+  fprintf(stderr, "curl_multi_remove_handle()...\n");
+  res = (int) curl_multi_remove_handle(multiHandle, curl);
+  if(res)
+    fprintf(stderr, "curl_multi_remove_handle() failed, "
+            "with code %d\n", res);
+  else
+    fprintf(stderr, "curl_multi_remove_handle() succeeded\n");
+
+test_cleanup:
+
+  /* undocumented cleanup sequence - type UB */
+
+  curl_easy_cleanup(curl);
+  curl_multi_cleanup(multiHandle);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
new file mode 100644 (file)
index 0000000..4ee0ad3
--- /dev/null
@@ -0,0 +1,246 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "test.h"
+
+#include <curl/mprintf.h>
+
+#include "memdebug.h"
+
+#define THREADS 2
+
+/* struct containing data of a thread */
+struct Tdata {
+  CURLSH *share;
+  char *url;
+};
+
+struct userdata {
+  char *text;
+  int counter;
+};
+
+/* lock callback */
+static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
+          void *useptr )
+{
+  const char *what;
+  struct userdata *user = (struct userdata *)useptr;
+
+  (void)handle;
+  (void)laccess;
+
+  switch ( data ) {
+    case CURL_LOCK_DATA_SHARE:
+      what = "share";
+      break;
+    case CURL_LOCK_DATA_DNS:
+      what = "dns";
+      break;
+    case CURL_LOCK_DATA_COOKIE:
+      what = "cookie";
+      break;
+    case CURL_LOCK_DATA_SSL_SESSION:
+      what = "ssl_session";
+      break;
+    default:
+      fprintf(stderr, "lock: no such data: %d\n", (int)data);
+      return;
+  }
+  printf("lock:   %-6s [%s]: %d\n", what, user->text, user->counter);
+  user->counter++;
+}
+
+/* unlock callback */
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+{
+  const char *what;
+  struct userdata *user = (struct userdata *)useptr;
+  (void)handle;
+  switch ( data ) {
+    case CURL_LOCK_DATA_SHARE:
+      what = "share";
+      break;
+    case CURL_LOCK_DATA_DNS:
+      what = "dns";
+      break;
+    case CURL_LOCK_DATA_COOKIE:
+      what = "cookie";
+      break;
+    case CURL_LOCK_DATA_SSL_SESSION:
+      what = "ssl_session";
+      break;
+    default:
+      fprintf(stderr, "unlock: no such data: %d\n", (int)data);
+      return;
+  }
+  printf("unlock: %-6s [%s]: %d\n", what, user->text, user->counter);
+  user->counter++;
+}
+
+/* the dummy thread function */
+static void *fire(void *ptr)
+{
+  CURLcode code;
+  struct Tdata *tdata = (struct Tdata*)ptr;
+  CURL *curl;
+  int i=0;
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    return NULL;
+  }
+
+  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE,    1L);
+  curl_easy_setopt(curl, CURLOPT_URL,        tdata->url);
+  printf( "CURLOPT_SHARE\n" );
+  curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share);
+
+  printf( "PERFORM\n" );
+  code = curl_easy_perform(curl);
+  if( code != CURLE_OK ) {
+    fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
+            tdata->url, i, (int)code);
+  }
+
+  printf( "CLEANUP\n" );
+  curl_easy_cleanup(curl);
+
+  return NULL;
+}
+
+/* test function */
+int test(char *URL)
+{
+  int res;
+  CURLSHcode scode = CURLSHE_OK;
+  char *url;
+  struct Tdata tdata;
+  CURL *curl;
+  CURLSH *share;
+  int i;
+  struct userdata user;
+
+  user.text = (char *)"Pigs in space";
+  user.counter = 0;
+
+  printf( "GLOBAL_INIT\n" );
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  /* prepare share */
+  printf( "SHARE_INIT\n" );
+  if ((share = curl_share_init()) == NULL) {
+    fprintf(stderr, "curl_share_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ( CURLSHE_OK == scode ) {
+    printf( "CURLSHOPT_LOCKFUNC\n" );
+    scode = curl_share_setopt( share, CURLSHOPT_LOCKFUNC, my_lock);
+  }
+  if ( CURLSHE_OK == scode ) {
+    printf( "CURLSHOPT_UNLOCKFUNC\n" );
+    scode = curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+  }
+  if ( CURLSHE_OK == scode ) {
+    printf( "CURLSHOPT_USERDATA\n" );
+    scode = curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
+  }
+  if ( CURLSHE_OK == scode ) {
+    printf( "CURL_LOCK_DATA_SSL_SESSION\n" );
+    scode = curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
+  }
+
+  if ( CURLSHE_OK != scode ) {
+    fprintf(stderr, "curl_share_setopt() failed\n");
+    curl_share_cleanup(share);
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+
+  res = 0;
+
+  /* start treads */
+  for (i=1; i<=THREADS; i++ ) {
+
+    /* set thread data */
+    tdata.url   = URL;
+    tdata.share = share;
+
+    /* simulate thread, direct call of "thread" function */
+    printf( "*** run %d\n",i );
+    fire( &tdata );
+  }
+
+
+  /* fetch a another one */
+  printf( "*** run %d\n", i );
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_share_cleanup(share);
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  url = URL;
+  test_setopt( curl, CURLOPT_URL,        url );
+  printf( "CURLOPT_SHARE\n" );
+  test_setopt( curl, CURLOPT_SHARE,      share );
+
+  printf( "PERFORM\n" );
+  curl_easy_perform( curl );
+
+  /* try to free share, expect to fail because share is in use*/
+  printf( "try SHARE_CLEANUP...\n" );
+  scode = curl_share_cleanup( share );
+  if ( scode==CURLSHE_OK )
+  {
+    fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
+    share = NULL;
+  } else {
+    printf( "SHARE_CLEANUP failed, correct\n" );
+  }
+
+test_cleanup:
+
+  /* clean up last handle */
+  printf( "CLEANUP\n" );
+  curl_easy_cleanup( curl );
+
+  /* free share */
+  printf( "SHARE_CLEANUP\n" );
+  scode = curl_share_cleanup( share );
+  if ( scode!=CURLSHE_OK )
+    fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
+            (int)scode);
+
+  printf( "GLOBAL_CLEANUP\n" );
+  curl_global_cleanup();
+
+  return res;
+}
+
diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c
new file mode 100644 (file)
index 0000000..68603c6
--- /dev/null
@@ -0,0 +1,71 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+/*
+  Based on a bug report recipe by Rene Bernhardt in
+  http://curl.haxx.se/mail/lib-2011-10/0323.html
+
+  It is reproducible by the following steps:
+
+  - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
+  CURLOPT_PROXYPORT )
+  - Tell libcurl NOT to use Negotiate  CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
+  CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM )
+  - Start the request
+*/
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURLcode res;
+  CURL *curl;
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_URL, URL);
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+  test_setopt(curl, CURLOPT_PROXYAUTH,
+              (long) (CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM));
+  test_setopt(curl, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
+  test_setopt(curl, CURLOPT_PROXYUSERPWD, "me:password");
+
+  res = curl_easy_perform(curl);
+
+  test_cleanup:
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
+
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
new file mode 100644 (file)
index 0000000..5cd4644
--- /dev/null
@@ -0,0 +1,149 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+/* lib591 is used for test cases 591, 592, 593 and 594 */
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <fcntl.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+  CURL *easy = NULL;
+  CURLM *multi = NULL;
+  int res = 0;
+  int running;
+  int msgs_left;
+  CURLMsg *msg;
+  FILE *upload = NULL;
+  int error;
+
+  start_test_timing();
+
+  upload = fopen(libtest_arg3, "rb");
+  if(!upload) {
+    error = ERRNO;
+    fprintf(stderr, "fopen() failed with error: %d (%s)\n",
+            error, strerror(error));
+    fprintf(stderr, "Error opening file: (%s)\n", libtest_arg3);
+    return TEST_ERR_FOPEN;
+  }
+
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    fclose(upload);
+    return res;
+  }
+
+  easy_init(easy);
+
+  /* go verbose */
+  easy_setopt(easy, CURLOPT_VERBOSE, 1L);
+
+  /* specify target */
+  easy_setopt(easy, CURLOPT_URL, URL);
+
+  /* enable uploading */
+  easy_setopt(easy, CURLOPT_UPLOAD, 1L);
+
+  /* data pointer for the file read function */
+  easy_setopt(easy, CURLOPT_READDATA, upload);
+
+  /* use active mode FTP */
+  easy_setopt(easy, CURLOPT_FTPPORT, "-");
+
+  /* server connection timeout */
+  easy_setopt(easy, CURLOPT_ACCEPTTIMEOUT_MS,
+              strtol(libtest_arg2, NULL, 10)*1000);
+
+  multi_init(multi);
+
+  multi_add_handle(multi, easy);
+
+  for(;;) {
+    struct timeval interval;
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    long timeout = -99;
+    int maxfd = -99;
+
+    multi_perform(multi, &running);
+
+    abort_on_test_timeout();
+
+    if(!running)
+      break; /* done */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    multi_timeout(multi, &timeout);
+
+    /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+    if(timeout != -1L) {
+      int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+      interval.tv_sec = itimeout/1000;
+      interval.tv_usec = (itimeout%1000)*1000;
+    }
+    else {
+      interval.tv_sec = 0;
+      interval.tv_usec = 100000L; /* 100 ms */
+    }
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+    abort_on_test_timeout();
+  }
+
+  msg = curl_multi_info_read(multi, &msgs_left);
+  if(msg)
+    res = msg->data.result;
+
+test_cleanup:
+
+  /* undocumented cleanup sequence - type UA */
+
+  curl_multi_cleanup(multi);
+  curl_easy_cleanup(easy);
+  curl_global_cleanup();
+
+  /* close the local file */
+  fclose(upload);
+
+  return res;
+}
diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c
new file mode 100644 (file)
index 0000000..a27cefd
--- /dev/null
@@ -0,0 +1,150 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 5 * 1000
+
+/*
+ * Test case for below scenario:
+ *   - Connect to an FTP server using CONNECT_ONLY option
+ *   - transfer some files with re-using the connection (omitted in test case)
+ *   - Disconnect from FTP server with sending QUIT command
+ *
+ * The test case originated for verifying CONNECT_ONLY option shall not
+ * block after protocol connect is done, but it returns the message
+ * with function curl_multi_info_read().
+ */
+
+enum {
+  CONNECT_ONLY_PHASE = 0,
+  QUIT_PHASE,
+  LAST_PHASE
+};
+
+int test(char *URL)
+{
+  CURL *easy = NULL;
+  CURLM *multi = NULL;
+  int res = 0;
+  int running;
+  int msgs_left;
+  int phase;
+  CURLMsg *msg;
+
+  start_test_timing();
+
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    return res;
+  }
+
+  easy_init(easy);
+
+  multi_init(multi);
+
+  for (phase = CONNECT_ONLY_PHASE; phase < LAST_PHASE; ++phase) {
+    /* go verbose */
+    easy_setopt(easy, CURLOPT_VERBOSE, 1L);
+
+    /* specify target */
+    easy_setopt(easy, CURLOPT_URL, URL);
+
+    /* enable 'CONNECT_ONLY' option when in connect phase */
+    if (phase == CONNECT_ONLY_PHASE)
+      easy_setopt(easy, CURLOPT_CONNECT_ONLY, 1L);
+
+    /* enable 'NOBODY' option to send 'QUIT' command in quit phase */
+    if (phase == QUIT_PHASE) {
+      easy_setopt(easy, CURLOPT_CONNECT_ONLY, 0L);
+      easy_setopt(easy, CURLOPT_NOBODY, 1L);
+      easy_setopt(easy, CURLOPT_FORBID_REUSE, 1L);
+    }
+
+    multi_add_handle(multi, easy);
+
+    for(;;) {
+      struct timeval interval;
+      fd_set fdread;
+      fd_set fdwrite;
+      fd_set fdexcep;
+      long timeout = -99;
+      int maxfd = -99;
+
+      multi_perform(multi, &running);
+
+      abort_on_test_timeout();
+
+      if(!running)
+        break; /* done */
+
+      FD_ZERO(&fdread);
+      FD_ZERO(&fdwrite);
+      FD_ZERO(&fdexcep);
+
+      multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+      /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+      multi_timeout(multi, &timeout);
+
+      /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+      if(timeout != -1L) {
+        int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+        interval.tv_sec = itimeout/1000;
+        interval.tv_usec = (itimeout%1000)*1000;
+      }
+      else {
+        interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+        interval.tv_usec = 0;
+      }
+
+      select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+      abort_on_test_timeout();
+    }
+
+    msg = curl_multi_info_read(multi, &msgs_left);
+    if(msg)
+      res = msg->data.result;
+
+    multi_remove_handle(multi, easy);
+  }
+
+test_cleanup:
+
+  /* undocumented cleanup sequence - type UA */
+
+  curl_multi_cleanup(multi);
+  curl_easy_cleanup(easy);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/lib598.c b/tests/libtest/lib598.c
new file mode 100644 (file)
index 0000000..e9c1ad7
--- /dev/null
@@ -0,0 +1,72 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURLcode res;
+  CURL *curl;
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_URL, URL);
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+  test_setopt(curl, CURLOPT_REFERER, "http://example.com/the-moo");
+  test_setopt(curl, CURLOPT_USERAGENT, "the-moo agent next generation");
+  test_setopt(curl, CURLOPT_COOKIE, "name=moo");
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  res = curl_easy_perform(curl);
+  if(res) {
+    fprintf(stderr, "retrieve 1 failed\n");
+    goto test_cleanup;
+  }
+
+  curl_easy_reset(curl);
+
+  test_setopt(curl, CURLOPT_URL, URL);
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  res = curl_easy_perform(curl);
+  if(res)
+    fprintf(stderr, "retrieve 2 failed\n");
+
+test_cleanup:
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
+
diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c
new file mode 100644 (file)
index 0000000..6b09267
--- /dev/null
@@ -0,0 +1,84 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#include "memdebug.h"
+
+static int progress_callback(void *clientp, double dltotal,
+                             double dlnow, double ultotal, double ulnow)
+{
+  (void)clientp;
+  (void)ulnow;
+  (void)ultotal;
+
+  if((dltotal > 0.0) && (dlnow > dltotal)) {
+    /* this should not happen with test case 599 */
+    printf("%.0f > %.0f !!\n", dltotal, dlnow);
+    return -1;
+  }
+
+  return 0;
+}
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res=CURLE_OK;
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  /* First set the URL that is about to receive our POST. */
+  test_setopt(curl, CURLOPT_URL, URL);
+
+  /* we want to use our own progress function */
+  test_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+  test_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+
+  /* get verbose debug output please */
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+  /* follow redirects */
+  test_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+  /* include headers in the output */
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+
+  /* Perform the request, res will get the return code */
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  /* always cleanup */
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return res;
+}
diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c
new file mode 100644 (file)
index 0000000..9576132
--- /dev/null
@@ -0,0 +1,153 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+/* argv1 = URL
+ * argv2 = main auth type
+ * argv3 = second auth type
+ */
+
+#include "test.h"
+#include "strequal.h"
+#include "memdebug.h"
+
+static CURLcode send_request(CURL *curl, const char *url, int seq,
+                             long auth_scheme, const char *userpwd)
+{
+  CURLcode res;
+  char* full_url = malloc(strlen(url) + 4 + 1);
+  if (!full_url) {
+    fprintf(stderr, "Not enough memory for full url\n");
+    res = CURLE_OUT_OF_MEMORY;
+    goto test_cleanup;
+  }
+
+  sprintf(full_url, "%s%04d", url, seq);
+  fprintf(stderr, "Sending new request %d to %s with credential %s "
+          "(auth %ld)\n", seq, full_url, userpwd, auth_scheme);
+  test_setopt(curl, CURLOPT_URL, full_url);
+  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+  test_setopt(curl, CURLOPT_HEADER, 1L);
+  test_setopt(curl, CURLOPT_HTTPGET, 1L);
+  test_setopt(curl, CURLOPT_USERPWD, userpwd);
+  test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme);
+
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+  free(full_url);
+  return res;
+}
+
+static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
+                                    long auth_scheme)
+{
+    return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
+}
+
+static CURLcode send_right_password(CURL *curl, const char *url, int seq,
+                                    long auth_scheme)
+{
+    return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
+}
+
+static long parse_auth_name(const char *arg)
+{
+  if (!arg)
+    return CURLAUTH_NONE;
+  if (strequal(arg, "basic"))
+    return CURLAUTH_BASIC;
+  if (strequal(arg, "digest"))
+    return CURLAUTH_DIGEST;
+  if (strequal(arg, "ntlm"))
+    return CURLAUTH_NTLM;
+  return CURLAUTH_NONE;
+}
+
+int test(char *url)
+{
+  CURLcode res;
+  CURL *curl = NULL;
+
+  long main_auth_scheme = parse_auth_name(libtest_arg2);
+  long fallback_auth_scheme = parse_auth_name(libtest_arg3);
+
+  if (main_auth_scheme == CURLAUTH_NONE ||
+      fallback_auth_scheme == CURLAUTH_NONE) {
+    fprintf(stderr, "auth schemes not found on commandline\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  /* Send wrong password, then right password */
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  res = send_wrong_password(curl, url, 100, main_auth_scheme);
+  if (res != CURLE_OK)
+      goto test_cleanup;
+  curl_easy_reset(curl);
+
+  res = send_right_password(curl, url, 200, fallback_auth_scheme);
+  if (res != CURLE_OK)
+      goto test_cleanup;
+  curl_easy_reset(curl);
+
+  curl_easy_cleanup(curl);
+
+  /* Send wrong password twice, then right password */
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  res = send_wrong_password(curl, url, 300, main_auth_scheme);
+  if (res != CURLE_OK)
+      goto test_cleanup;
+  curl_easy_reset(curl);
+
+  res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
+  if (res != CURLE_OK)
+      goto test_cleanup;
+  curl_easy_reset(curl);
+
+  res = send_right_password(curl, url, 500, fallback_auth_scheme);
+  if (res != CURLE_OK)
+      goto test_cleanup;
+  curl_easy_reset(curl);
+
+test_cleanup:
+
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
+
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
new file mode 100644 (file)
index 0000000..509b671
--- /dev/null
@@ -0,0 +1,281 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2013, 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 "test.h"
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <assert.h>
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+#define TEST_HANG_TIMEOUT 5 * 1000
+#define MAX_EASY_HANDLES 3
+
+static CURL *easy[MAX_EASY_HANDLES];
+static curl_socket_t sockets[MAX_EASY_HANDLES];
+static int res = 0;
+
+static size_t callback(char* ptr, size_t size, size_t nmemb, void* data)
+{
+  ssize_t idx = ((CURL **) data) - easy;
+  curl_socket_t sock;
+  long longdata;
+  CURLcode code;
+
+  const size_t failure = (size * nmemb) ? 0 : 1;
+
+  char *output = malloc(size * nmemb + 1);
+  if (!output) {
+    fprintf(stderr, "output, malloc() failed\n");
+    res = TEST_ERR_MAJOR_BAD;
+    return failure;
+  }
+
+  memcpy(output, ptr, size * nmemb);
+  output[size * nmemb] = '\0';
+  fprintf(stdout, "%s", output);
+  free(output);
+
+  /* Get socket being used for this easy handle, otherwise CURL_SOCKET_BAD */
+  code = curl_easy_getinfo(easy[idx], CURLINFO_LASTSOCKET, &longdata);
+  if (CURLE_OK != code) {
+    fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
+            "with code %d (%s)\n",
+            __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
+    res = TEST_ERR_MAJOR_BAD;
+    return failure;
+  }
+  if (longdata == -1L)
+    sock = CURL_SOCKET_BAD;
+  else
+    sock = (curl_socket_t)longdata;
+
+  if (sock != CURL_SOCKET_BAD) {
+    /* Track relationship between this easy handle and the socket. */
+    if (sockets[idx] == CURL_SOCKET_BAD) {
+      /* An easy handle without previous socket, record the socket. */
+      sockets[idx] = sock;
+    }
+    else if (sock != sockets[idx]) {
+      /* An easy handle with a socket different to previously
+         tracked one, log and fail right away. Known bug #37. */
+      fprintf(stderr, "Handle %d started on socket %d and moved to %d\n",
+              curlx_sztosi(idx), (int)sockets[idx], (int)sock);
+      res = TEST_ERR_MAJOR_BAD;
+      return failure;
+    }
+  }
+  return size * nmemb;
+}
+
+enum HandleState {
+  ReadyForNewHandle,
+  NeedSocketForNewHandle,
+  NoMoreHandles
+};
+
+int test(char *url)
+{
+  CURLM *multi = NULL;
+  int running;
+  int i, j;
+  int num_handles = 0;
+  enum HandleState state = ReadyForNewHandle;
+  char* full_url = malloc(strlen(url) + 4 + 1);
+
+  start_test_timing();
+
+  if (!full_url) {
+    fprintf(stderr, "Not enough memory for full url\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  for (i = 0; i < MAX_EASY_HANDLES; ++i) {
+    easy[i] = NULL;
+    sockets[i] = CURL_SOCKET_BAD;
+  }
+
+  res_global_init(CURL_GLOBAL_ALL);
+  if(res) {
+    free(full_url);
+    return res;
+  }
+
+  multi_init(multi);
+
+#ifdef USE_PIPELINING
+  multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
+  multi_setopt(multi, CURLMOPT_MAX_HOST_CONNECTIONS, 5L);
+  multi_setopt(multi, CURLMOPT_MAX_TOTAL_CONNECTIONS, 10L);
+#endif
+
+  for(;;) {
+    struct timeval interval;
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    long timeout = -99;
+    int maxfd = -99;
+    bool found_new_socket = FALSE;
+
+    /* Start a new handle if we aren't at the max */
+    if (state == ReadyForNewHandle) {
+      easy_init(easy[num_handles]);
+
+      if (num_handles % 3 == 2) {
+        sprintf(full_url, "%s0200", url);
+        easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
+      } else {
+        sprintf(full_url, "%s0100", url);
+        easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+      }
+      easy_setopt(easy[num_handles], CURLOPT_FRESH_CONNECT, 1L);
+      easy_setopt(easy[num_handles], CURLOPT_URL, full_url);
+      easy_setopt(easy[num_handles], CURLOPT_VERBOSE, 1L);
+      easy_setopt(easy[num_handles], CURLOPT_HTTPGET, 1L);
+      easy_setopt(easy[num_handles], CURLOPT_USERPWD, "testuser:testpass");
+      easy_setopt(easy[num_handles], CURLOPT_WRITEFUNCTION, callback);
+      easy_setopt(easy[num_handles], CURLOPT_WRITEDATA, easy + num_handles);
+      easy_setopt(easy[num_handles], CURLOPT_HEADER, 1L);
+
+      multi_add_handle(multi, easy[num_handles]);
+      num_handles += 1;
+      state = NeedSocketForNewHandle;
+    }
+
+    multi_perform(multi, &running);
+
+    abort_on_test_timeout();
+
+    if(!running && state == NoMoreHandles)
+      break; /* done */
+
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+    /* At this point, maxfd is guaranteed to be greater or equal than -1. */
+
+    /* Any socket which is new in fdread is associated with the new handle */
+    for (i = 0; i <= maxfd; ++i) {
+      bool socket_exists = FALSE;
+      curl_socket_t curfd = (curl_socket_t)i;
+
+      if (!FD_ISSET(curfd, &fdread)) {
+        continue;
+      }
+
+      /* Check if this socket was already detected for an earlier handle (or
+         for this handle, num_handles-1, in the callback */
+      for (j = 0; j < num_handles; ++j) {
+        if (sockets[j] == curfd) {
+          socket_exists = TRUE;
+          break;
+        }
+      }
+      if (socket_exists) {
+        continue;
+      }
+
+      if (found_new_socket || state != NeedSocketForNewHandle) {
+        fprintf(stderr, "Unexpected new socket\n");
+        res = TEST_ERR_MAJOR_BAD;
+        goto test_cleanup;
+      }
+
+      /* Now we know the socket is for the most recent handle, num_handles-1 */
+      if (sockets[num_handles-1] != CURL_SOCKET_BAD) {
+        /* A socket for this handle was already detected in the callback; if it
+           matched socket_exists should be true and we would never get here */
+        assert(curfd != sockets[num_handles-1]);
+        fprintf(stderr, "Handle %d wrote to socket %d then detected on %d\n",
+                num_handles-1, (int)sockets[num_handles-1], (int)curfd);
+        res = TEST_ERR_MAJOR_BAD;
+        goto test_cleanup;
+      }
+      else {
+        sockets[num_handles-1] = curfd;
+        found_new_socket = TRUE;
+        /* continue to make sure there's only one new handle */
+      }
+    }
+
+    if (state == NeedSocketForNewHandle) {
+      if(maxfd != -1 && !found_new_socket) {
+        fprintf(stderr, "Warning: socket did not open immediately for new "
+                "handle (trying again)\n");
+        continue;
+      }
+      state = num_handles < MAX_EASY_HANDLES ? ReadyForNewHandle
+                                             : NoMoreHandles;
+    }
+
+    multi_timeout(multi, &timeout);
+
+    /* At this point, timeout is guaranteed to be greater or equal than -1. */
+
+    fprintf(stderr, "%s:%d num_handles %d timeout %ld\n",
+            __FILE__, __LINE__, num_handles, timeout);
+
+    if(timeout != -1L) {
+      int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
+      interval.tv_sec = itimeout/1000;
+      interval.tv_usec = (itimeout%1000)*1000;
+    }
+    else {
+      interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;
+      interval.tv_usec = 0;
+
+      /* if there's no timeout and we get here on the last handle, we may
+         already have read the last part of the stream so waiting makes no
+         sense */
+      if(!running && num_handles == MAX_EASY_HANDLES) {
+        break;
+      }
+    }
+
+    select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval);
+
+    abort_on_test_timeout();
+  }
+
+test_cleanup:
+
+  /* proper cleanup sequence - type PB */
+
+  for(i = 0; i < MAX_EASY_HANDLES; i++) {
+    curl_multi_remove_handle(multi, easy[i]);
+    curl_easy_cleanup(easy[i]);
+  }
+
+  curl_multi_cleanup(multi);
+  curl_global_cleanup();
+
+  free(full_url);
+
+  return res;
+}
diff --git a/tests/libtest/notexists.pl b/tests/libtest/notexists.pl
new file mode 100755 (executable)
index 0000000..31b9851
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+# Check that given arguments do not exist on filesystem.
+my $code = 0;
+if ($#ARGV < 0) {
+    print "Usage: $0 file1 [fileN]\n";
+    exit 2;
+}
+while (@ARGV) {
+    my $fname = shift @ARGV;
+    if (-e $fname) {
+        print "Found '$fname' when not supposed to exist.\n";
+        $code = 1;
+    }
+}
+exit $code;
index 3dabb82..9da6a67 100644 (file)
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
-#include "setup.h"
+ * Copyright (C) 1998 - 2012, 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_setup.h"
 
 #include "sethostname.h"
 
index 83034a5..192f037 100644 (file)
@@ -1,24 +1,37 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
+ * Copyright (C) 1998 - 2013, 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.
+ *
+ ***************************************************************************/
 
-#if (defined(WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB)
+#ifdef CURL_STATICLIB
+#  define LIBHOSTNAME_EXTERN
+#elif defined(WIN32) || defined(__SYMBIAN32__)
 #  if defined(BUILDING_LIBCURL)
 #    define LIBHOSTNAME_EXTERN  __declspec(dllexport)
 #  else
 #    define LIBHOSTNAME_EXTERN  __declspec(dllimport)
 #  endif
+#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
+#  define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
 #else
-#  ifdef CURL_HIDDEN_SYMBOLS
-#    define LIBHOSTNAME_EXTERN CURL_EXTERN_SYMBOL
-#  else
-#    define LIBHOSTNAME_EXTERN
-#  endif
+#  define LIBHOSTNAME_EXTERN
 #endif
 
 #ifdef USE_WINSOCK
index 2a36711..5de8c7c 100644 (file)
@@ -1,49 +1,51 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
 
-/* Now include the setup.h file from libcurl's private libdir (the source
+/* Now include the curl_setup.h file from libcurl's private libdir (the source
    version, but that might include "curl_config.h" from the build dir so we
    need both of them in the include path), so that we get good in-depth
    knowledge about the system we're building this on */
 
 #define CURL_NO_OLDIES
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <curl/curl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_SELECT_H
 /* since so many tests use select(), we can just as well include it here */
 #include <sys/select.h>
 #endif
-#ifdef HAVE_UNISTD_H
-/* at least somewhat oldish FreeBSD systems need this for select() */
-#include <unistd.h>
-#endif
 
 #ifdef TPF
 #  include "select.h"
 #endif
 
-#define TEST_ERR_MAJOR_BAD     100
-#define TEST_ERR_RUNS_FOREVER   99
-
 #define test_setopt(A,B,C) \
   if((res = curl_easy_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
 
+#define test_multi_setopt(A,B,C) \
+  if((res = curl_multi_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
+
 extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
 extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
 
@@ -51,9 +53,374 @@ extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
 extern int test_argc;
 extern char **test_argv;
 
-extern int select_test(int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
-                       struct timeval *tv);
+extern struct timeval tv_test_start; /* for test timing */
+
+extern int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
+                          struct timeval *tv);
 
 extern int test(char *URL); /* the actual test function provided by each
                                individual libXXX.c file */
 
+#ifdef UNITTESTS
+extern int unitfail;
+#endif
+
+/*
+** TEST_ERR_* values must be greater than CURL_LAST CURLcode in order
+** to avoid confusion with any CURLcode or CURLMcode. These TEST_ERR_*
+** codes are returned to signal test specific situations and should
+** not get mixed with CURLcode or CURLMcode values.
+**
+** For portability reasons TEST_ERR_* values should be less than 127.
+*/
+
+#define TEST_ERR_MAJOR_BAD     126
+#define TEST_ERR_RUNS_FOREVER  125
+#define TEST_ERR_EASY_INIT     124
+#define TEST_ERR_MULTI_INIT    123
+#define TEST_ERR_NUM_HANDLES   122
+#define TEST_ERR_SELECT        121
+#define TEST_ERR_SUCCESS       120
+#define TEST_ERR_FAILURE       119
+#define TEST_ERR_USAGE         118
+#define TEST_ERR_FOPEN         117
+#define TEST_ERR_FSTAT         116
+#define TEST_ERR_BAD_TIMEOUT   115
+
+/*
+** Macros for test source code readability/maintainability.
+**
+** All of the following macros require that an int data type 'res' variable
+** exists in scope where macro is used, and that it has been initialized to
+** zero before the macro is used.
+**
+** exe_* and chk_* macros are helper macros not intended to be used from
+** outside of this header file. Arguments 'Y' and 'Z' of these represent
+** source code file and line number, while Arguments 'A', 'B', etc, are
+** the arguments used to actually call a libcurl function.
+**
+** All easy_* and multi_* macros call a libcurl function and evaluate if
+** the function has succeeded or failed. When the function succeeds 'res'
+** variable is not set nor cleared and program continues normal flow. On
+** the other hand if function fails 'res' variable is set and a jump to
+** label 'test_cleanup' is performed.
+**
+** Every easy_* and multi_* macros have a res_easy_* and res_multi_* macro
+** counterpart that operates in tha same way with the exception that no
+** jump takes place in case of failure. res_easy_* and res_multi_* macros
+** should be immediately followed by checking if 'res' variable has been
+** set.
+**
+** 'res' variable when set will hold a CURLcode, CURLMcode, or any of the
+** TEST_ERR_* values defined above. It is advisable to return this value
+** as test result.
+*/
+
+/* ---------------------------------------------------------------- */
+
+#define exe_easy_init(A,Y,Z) do {                                 \
+  if(((A) = curl_easy_init()) == NULL) {                          \
+    fprintf(stderr, "%s:%d curl_easy_init() failed\n", (Y), (Z)); \
+    res = TEST_ERR_EASY_INIT;                                     \
+  }                                                               \
+} WHILE_FALSE
+
+#define res_easy_init(A) \
+  exe_easy_init((A),(__FILE__),(__LINE__))
+
+#define chk_easy_init(A,Y,Z) do { \
+  exe_easy_init((A),(Y),(Z));     \
+  if(res)                         \
+    goto test_cleanup;            \
+} WHILE_FALSE
+
+#define easy_init(A) \
+  chk_easy_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_init(A,Y,Z) do {                                 \
+  if(((A) = curl_multi_init()) == NULL) {                          \
+    fprintf(stderr, "%s:%d curl_multi_init() failed\n", (Y), (Z)); \
+    res = TEST_ERR_MULTI_INIT;                                     \
+  }                                                                \
+} WHILE_FALSE
+
+#define res_multi_init(A) \
+  exe_multi_init((A),(__FILE__),(__LINE__))
+
+#define chk_multi_init(A,Y,Z) do { \
+  exe_multi_init((A),(Y),(Z));     \
+  if(res)                          \
+    goto test_cleanup;             \
+} WHILE_FALSE
+
+#define multi_init(A) \
+  chk_multi_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_easy_setopt(A,B,C,Y,Z) do {                  \
+  CURLcode ec;                                           \
+  if((ec = curl_easy_setopt((A),(B),(C))) != CURLE_OK) { \
+    fprintf(stderr, "%s:%d curl_easy_setopt() failed, "  \
+            "with code %d (%s)\n",                       \
+            (Y), (Z), (int)ec, curl_easy_strerror(ec));  \
+    res = (int)ec;                                       \
+  }                                                      \
+} WHILE_FALSE
+
+#define res_easy_setopt(A,B,C) \
+  exe_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+#define chk_easy_setopt(A,B,C,Y,Z) do { \
+  exe_easy_setopt((A),(B),(C),(Y),(Z)); \
+  if(res)                               \
+    goto test_cleanup;                  \
+} WHILE_FALSE
+
+#define easy_setopt(A,B,C) \
+  chk_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_setopt(A,B,C,Y,Z) do {                  \
+  CURLMcode ec;                                           \
+  if((ec = curl_multi_setopt((A),(B),(C))) != CURLM_OK) { \
+    fprintf(stderr, "%s:%d curl_multi_setopt() failed, "  \
+            "with code %d (%s)\n",                        \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));  \
+    res = (int)ec;                                        \
+  }                                                       \
+} WHILE_FALSE
+
+#define res_multi_setopt(A,B,C) \
+  exe_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+#define chk_multi_setopt(A,B,C,Y,Z) do { \
+  exe_multi_setopt((A),(B),(C),(Y),(Z)); \
+  if(res)                                \
+    goto test_cleanup;                   \
+} WHILE_FALSE
+
+#define multi_setopt(A,B,C) \
+  chk_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_add_handle(A,B,Y,Z) do {                   \
+  CURLMcode ec;                                              \
+  if((ec = curl_multi_add_handle((A),(B))) != CURLM_OK) {    \
+    fprintf(stderr, "%s:%d curl_multi_add_handle() failed, " \
+            "with code %d (%s)\n",                           \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));     \
+    res = (int)ec;                                           \
+  }                                                          \
+} WHILE_FALSE
+
+#define res_multi_add_handle(A,B) \
+  exe_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_add_handle(A,B,Y,Z) do { \
+  exe_multi_add_handle((A),(B),(Y),(Z));   \
+  if(res)                                  \
+    goto test_cleanup;                     \
+} WHILE_FALSE
+
+#define multi_add_handle(A,B) \
+  chk_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_remove_handle(A,B,Y,Z) do {                   \
+  CURLMcode ec;                                                 \
+  if((ec = curl_multi_remove_handle((A),(B))) != CURLM_OK) {    \
+    fprintf(stderr, "%s:%d curl_multi_remove_handle() failed, " \
+            "with code %d (%s)\n",                              \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));        \
+    res = (int)ec;                                              \
+  }                                                             \
+} WHILE_FALSE
+
+#define res_multi_remove_handle(A,B) \
+  exe_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_remove_handle(A,B,Y,Z) do { \
+  exe_multi_remove_handle((A),(B),(Y),(Z));   \
+  if(res)                                     \
+    goto test_cleanup;                        \
+} WHILE_FALSE
+
+
+#define multi_remove_handle(A,B) \
+  chk_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_perform(A,B,Y,Z) do {                          \
+  CURLMcode ec;                                                  \
+  if((ec = curl_multi_perform((A),(B))) != CURLM_OK) {           \
+    fprintf(stderr, "%s:%d curl_multi_perform() failed, "        \
+            "with code %d (%s)\n",                               \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));         \
+    res = (int)ec;                                               \
+  }                                                              \
+  else if(*((B)) < 0) {                                          \
+    fprintf(stderr, "%s:%d curl_multi_perform() succeeded, "     \
+            "but returned invalid running_handles value (%d)\n", \
+            (Y), (Z), (int)*((B)));                              \
+    res = TEST_ERR_NUM_HANDLES;                                  \
+  }                                                              \
+} WHILE_FALSE
+
+#define res_multi_perform(A,B) \
+  exe_multi_perform((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_perform(A,B,Y,Z) do { \
+  exe_multi_perform((A),(B),(Y),(Z));   \
+  if(res)                               \
+    goto test_cleanup;                  \
+} WHILE_FALSE
+
+#define multi_perform(A,B) \
+  chk_multi_perform((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_fdset(A,B,C,D,E,Y,Z) do {                      \
+  CURLMcode ec;                                                  \
+  if((ec = curl_multi_fdset((A),(B),(C),(D),(E))) != CURLM_OK) { \
+    fprintf(stderr, "%s:%d curl_multi_fdset() failed, "          \
+            "with code %d (%s)\n",                               \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));         \
+    res = (int)ec;                                               \
+  }                                                              \
+  else if(*((E)) < -1) {                                         \
+    fprintf(stderr, "%s:%d curl_multi_fdset() succeeded, "       \
+            "but returned invalid max_fd value (%d)\n",          \
+            (Y), (Z), (int)*((E)));                              \
+    res = TEST_ERR_NUM_HANDLES;                                  \
+  }                                                              \
+} WHILE_FALSE
+
+#define res_multi_fdset(A,B,C,D,E) \
+  exe_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+#define chk_multi_fdset(A,B,C,D,E,Y,Z) do {     \
+  exe_multi_fdset((A),(B),(C),(D),(E),(Y),(Z)); \
+  if(res)                                       \
+    goto test_cleanup;                          \
+} WHILE_FALSE
+
+#define multi_fdset(A,B,C,D,E) \
+  chk_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_multi_timeout(A,B,Y,Z) do {                      \
+  CURLMcode ec;                                              \
+  if((ec = curl_multi_timeout((A),(B))) != CURLM_OK) {       \
+    fprintf(stderr, "%s:%d curl_multi_timeout() failed, "    \
+            "with code %d (%s)\n",                           \
+            (Y), (Z), (int)ec, curl_multi_strerror(ec));     \
+    res = (int)ec;                                           \
+  }                                                          \
+  else if(*((B)) < -1L) {                                    \
+    fprintf(stderr, "%s:%d curl_multi_timeout() succeeded, " \
+            "but returned invalid timeout value (%ld)\n",    \
+            (Y), (Z), (long)*((B)));                         \
+    res = TEST_ERR_BAD_TIMEOUT;                              \
+  }                                                          \
+} WHILE_FALSE
+
+#define res_multi_timeout(A,B) \
+  exe_multi_timeout((A),(B),(__FILE__),(__LINE__))
+
+#define chk_multi_timeout(A,B,Y,Z) do { \
+  exe_multi_timeout((A),(B),(Y),(Z));   \
+  if(res)                               \
+    goto test_cleanup;                  \
+} WHILE_FALSE
+
+#define multi_timeout(A,B) \
+  chk_multi_timeout((A),(B),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_select_test(A,B,C,D,E,Y,Z) do {        \
+  int ec;                                          \
+  if(select_wrapper((A),(B),(C),(D),(E)) == -1 ) { \
+    ec = SOCKERRNO;                                \
+    fprintf(stderr, "%s:%d select() failed, with " \
+            "errno %d (%s)\n",                     \
+            (Y), (Z), ec, strerror(ec));           \
+    res = TEST_ERR_SELECT;                         \
+  }                                                \
+} WHILE_FALSE
+
+#define res_select_test(A,B,C,D,E) \
+  exe_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+#define chk_select_test(A,B,C,D,E,Y,Z) do {     \
+  exe_select_test((A),(B),(C),(D),(E),(Y),(Z)); \
+  if(res)                                       \
+    goto test_cleanup;                          \
+} WHILE_FALSE
+
+#define select_test(A,B,C,D,E) \
+  chk_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define start_test_timing() do { \
+  tv_test_start = tutil_tvnow(); \
+} WHILE_FALSE
+
+#define exe_test_timedout(Y,Z) do {                                    \
+  if(tutil_tvdiff(tutil_tvnow(), tv_test_start) > TEST_HANG_TIMEOUT) { \
+    fprintf(stderr, "%s:%d ABORTING TEST, since it seems "             \
+                    "that it would have run forever.\n", (Y), (Z));    \
+    res = TEST_ERR_RUNS_FOREVER;                                       \
+  }                                                                    \
+} WHILE_FALSE
+
+#define res_test_timedout() \
+  exe_test_timedout((__FILE__),(__LINE__))
+
+#define chk_test_timedout(Y,Z) do { \
+  exe_test_timedout(Y,Z);           \
+  if(res)                           \
+    goto test_cleanup;              \
+} WHILE_FALSE
+
+#define abort_on_test_timeout() \
+  chk_test_timedout((__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
+
+#define exe_global_init(A,Y,Z) do {                     \
+  CURLcode ec;                                          \
+  if((ec = curl_global_init((A))) != CURLE_OK) {        \
+    fprintf(stderr, "%s:%d curl_global_init() failed, " \
+            "with code %d (%s)\n",                      \
+            (Y), (Z), (int)ec, curl_easy_strerror(ec)); \
+    res = (int)ec;                                      \
+  }                                                     \
+} WHILE_FALSE
+
+#define res_global_init(A) \
+  exe_global_init((A),(__FILE__),(__LINE__))
+
+#define chk_global_init(A,Y,Z) do { \
+  exe_global_init((A),(Y),(Z));     \
+  if(res)                           \
+    return res;                     \
+} WHILE_FALSE
+
+/* global_init() is different than other macros. In case of
+   failure it 'return's instead of going to 'test_cleanup'. */
+
+#define global_init(A) \
+  chk_global_init((A),(__FILE__),(__LINE__))
+
+/* ---------------------------------------------------------------- */
index 99ad524..15e1214 100755 (executable)
@@ -18,11 +18,12 @@ while( <CURL> )
 }
 close CURL;
 
+$curl_protocols =~ s/\r//;
 $curl_protocols =~ /\w+: (.*)$/;
 @curl = split / /,$1;
 
 # These features are not supported by curl-config
-@curl = grep(!/^(Debug|TrackMemory|Largefile|CharConv|GSS-Negotiate|SPNEGO)$/i, @curl);
+@curl = grep(!/^(Debug|TrackMemory|Metalink|Largefile|CharConv|GSS-Negotiate|SPNEGO)$/i, @curl);
 @curl = sort @curl;
 
 # Read the output of curl-config
index 60eee38..377808c 100755 (executable)
@@ -12,7 +12,7 @@ my $what=$ARGV[2];
 open(CURL, "$ARGV[1]") || die "Can't open curl --version list in $ARGV[1]\n";
 $_ = <CURL>;
 chomp;
-/libcurl\/([\.\d]+(-DEV)?)/;
+/libcurl\/([\.\d]+((-DEV)|(-\d+))?)/;
 my $version = $1;
 close CURL;
 
@@ -22,17 +22,26 @@ my $curlconfigversion;
 open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config --$what list\n";
 $_ = <CURLCONFIG>;
 chomp;
+my $filever=$_;
 if ( $what eq "version" ) {
-    /^libcurl ([\.\d]+(-DEV)?)$/ ;
-    $curlconfigversion = $1;
+    if($filever =~ /^libcurl ([\.\d]+((-DEV)|(-\d+))?)$/) {
+        $curlconfigversion = $1;
+    }
+    else {
+        $curlconfigversion = "illegal value";
+    }
 }
-else {
+else { # "vernum" case
     # Convert hex version to decimal for comparison's sake
-    /^(..)(..)(..)$/ ;
-    $curlconfigversion = hex($1) . "." . hex($2) . "." . hex($3);
+    if($filever =~ /^(..)(..)(..)$/) {
+        $curlconfigversion = hex($1) . "." . hex($2) . "." . hex($3);
+    }
+    else {
+        $curlconfigversion = "illegal value";
+    }
 
     # Strip off the -DEV from the curl version if it's there
-    $version =~ s/-DEV$//;
+    $version =~ s/-\w*$//;
 }
 close CURLCONFIG;
 
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
new file mode 100644 (file)
index 0000000..c977d21
--- /dev/null
@@ -0,0 +1,146 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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 "test.h"
+
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
+#include "testutil.h"
+#include "testtrace.h"
+#include "memdebug.h"
+
+struct libtest_trace_cfg libtest_debug_config;
+
+static time_t epoch_offset; /* for test time tracing */
+static int    known_offset; /* for test time tracing */
+
+static 
+void libtest_debug_dump(const char *timebuf, const char *text, FILE *stream,
+                        const unsigned char *ptr, size_t size, int nohex)
+{
+  size_t i;
+  size_t c;
+
+  unsigned int width = 0x10;
+
+  if(nohex)
+    /* without the hex output, we can fit more on screen */
+    width = 0x40;
+
+  fprintf(stream, "%s%s, %d bytes (0x%x)\n", timebuf, text,
+          (int)size, (int)size);
+
+  for(i = 0; i < size; i += width) {
+
+    fprintf(stream, "%04x: ", (int)i);
+
+    if(!nohex) {
+      /* hex not disabled, show it */
+      for(c = 0; c < width; c++)
+        if(i+c < size)
+          fprintf(stream, "%02x ", ptr[i+c]);
+        else
+          fputs("   ", stream);
+    }
+
+    for(c = 0; (c < width) && (i+c < size); c++) {
+      /* check for 0D0A; if found, skip past and start a new line of output */
+      if(nohex &&
+         (i+c+1 < size) && (ptr[i+c] == 0x0D) && (ptr[i+c+1] == 0x0A)) {
+        i += (c+2-width);
+        break;
+      }
+      fprintf(stream, "%c", ((ptr[i+c] >= 0x20) && (ptr[i+c] < 0x80)) ?
+              ptr[i+c] : '.');
+      /* check again for 0D0A, to avoid an extra \n if it's at width */
+      if(nohex &&
+         (i+c+2 < size) && (ptr[i+c+1] == 0x0D) && (ptr[i+c+2] == 0x0A)) {
+        i += (c+3-width);
+        break;
+      }
+    }
+    fputc('\n', stream); /* newline */
+  }
+  fflush(stream);
+}
+
+int libtest_debug_cb(CURL *handle, curl_infotype type,
+                     unsigned char *data, size_t size,
+                     void *userp)
+{
+
+  struct libtest_trace_cfg *trace_cfg = userp;
+  const char *text;
+  struct timeval tv;
+  struct tm *now;
+  char timebuf[20];
+  char *timestr;
+  time_t secs;
+
+  (void)handle;
+
+  timebuf[0] = '\0';
+  timestr = &timebuf[0];
+
+  if(trace_cfg->tracetime) {
+    tv = tutil_tvnow();
+    if(!known_offset) {
+      epoch_offset = time(NULL) - tv.tv_sec;
+      known_offset = 1;
+    }
+    secs = epoch_offset + tv.tv_sec;
+    now = localtime(&secs);  /* not thread safe but we don't care */
+    snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld ",
+             now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+  }
+
+  switch (type) {
+  case CURLINFO_TEXT:
+    fprintf(stderr, "%s== Info: %s", timestr, (char *)data);
+  default: /* in case a new one is introduced to shock us */
+    return 0;
+
+  case CURLINFO_HEADER_OUT:
+    text = "=> Send header";
+    break;
+  case CURLINFO_DATA_OUT:
+    text = "=> Send data";
+    break;
+  case CURLINFO_SSL_DATA_OUT:
+    text = "=> Send SSL data";
+    break;
+  case CURLINFO_HEADER_IN:
+    text = "<= Recv header";
+    break;
+  case CURLINFO_DATA_IN:
+    text = "<= Recv data";
+    break;
+  case CURLINFO_SSL_DATA_IN:
+    text = "<= Recv SSL data";
+    break;
+  }
+
+  libtest_debug_dump(timebuf, text, stderr, data, size, trace_cfg->nohex);
+  return 0;
+}
+
diff --git a/tests/libtest/testtrace.h b/tests/libtest/testtrace.h
new file mode 100644 (file)
index 0000000..73d2489
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef HEADER_LIBTEST_TESTTRACE_H
+#define HEADER_LIBTEST_TESTTRACE_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+struct libtest_trace_cfg {
+  int tracetime;  /* 0 represents FALSE, anything else TRUE */
+  int nohex;      /* 0 represents FALSE, anything else TRUE */
+};
+
+extern struct libtest_trace_cfg libtest_debug_config;
+
+int libtest_debug_cb(CURL *handle, curl_infotype type,
+                     unsigned char *data, size_t size,
+                     void *userp);
+
+#endif /* HEADER_LIBTEST_TESTTRACE_H */
+
index 63393c5..b18a607 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -19,8 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include "setup.h"
+#include "curl_setup.h"
 
 #include "testutil.h"
 #include "memdebug.h"
@@ -123,8 +122,11 @@ long tutil_tvdiff(struct timeval newer, struct timeval older)
  */
 double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
 {
-  return (double)(newer.tv_sec-older.tv_sec)+
-    (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  if(newer.tv_sec != older.tv_sec)
+    return (double)(newer.tv_sec-older.tv_sec)+
+      (double)(newer.tv_usec-older.tv_usec)/1000000.0;
+  else
+    return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
 }
 
 /* return the number of seconds in the given input timeval struct */
index 6a322e3..a236970 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __LIBTEST_TESTUTIL_H
-#define __LIBTEST_TESTUTIL_H
+#ifndef HEADER_CURL_LIBTEST_TESTUTIL_H
+#define HEADER_CURL_LIBTEST_TESTUTIL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,9 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#include "setup.h"
-
+#include "curl_setup.h"
 
 struct timeval tutil_tvnow(void);
 
@@ -45,5 +43,5 @@ double tutil_tvdiff_secs(struct timeval t1, struct timeval t2);
 long tutil_tvlong(struct timeval t1);
 
 
-#endif  /* __LIBTEST_TESTUTIL_H */
+#endif  /* HEADER_CURL_LIBTEST_TESTUTIL_H */
 
diff --git a/tests/mem-include-scan.pl b/tests/mem-include-scan.pl
new file mode 100644 (file)
index 0000000..676df25
--- /dev/null
@@ -0,0 +1,96 @@
+#!/usr/bin/env perl
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2010-2012, 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.
+#
+###########################################################################
+#
+# This script scans C source files. If they seem to use memory functions,
+# it also makes sure that it #includes the correct two header files!
+#
+# You can also mark a C source as fine by using 'mem-include-scan' anywhere in
+# it.
+#
+
+use strict;
+use warnings;
+
+my $dir = $ARGV[0] || die "specify directory!";
+
+sub scanfile {
+    my ($file) = @_;
+    my $memfunc;
+    my $memdebug;
+    my $curlmem;
+
+    print STDERR "checking $file...\n";
+
+    open(F, "<$file");
+    while(<F>) {
+        if($_ =~ /(free|alloc|strdup)\(/) {
+            $memfunc++;
+        }
+        elsif($_ =~ /^ *# *include \"memdebug.h\"/) {
+            $memdebug++;
+        }
+        elsif($_ =~ /^ *# *include \"curl_memory.h\"/) {
+            $curlmem++;
+        }
+        elsif($_ =~ /mem-include-scan/) {
+            # free pass
+            close(F);
+            return 0;
+        }
+        if($memfunc && $memdebug && $curlmem) {
+            last;
+        }
+    }
+    close(F);
+
+
+    if($memfunc) {
+        if($memdebug && $curlmem) {
+            return 0;
+        }
+        else {
+            if(!$memdebug) {
+                print STDERR "$file doesn't include \"memdebug.h\"!\n";
+            }
+            if(!$curlmem) {
+                print STDERR "$file doesn't include \"curl_memory.h\"!\n";
+            }
+            return 1;
+        }
+    }
+    return 0;
+}
+
+opendir(my $dh, $dir) || die "can't opendir $dir: $!";
+my @cfiles = grep { /\.c\z/ && -f "$dir/$_" } readdir($dh);
+closedir $dh;
+
+my $errs;
+for(@cfiles) {
+    $errs += scanfile("$dir/$_");
+}
+
+if($errs) {
+    print STDERR "----\n$errs errors detected!\n";
+    exit 2;
+}
index e9f9d22..54117f8 100755 (executable)
@@ -1,4 +1,25 @@
 #!/usr/bin/env perl
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
 #
 # Example input:
 #
@@ -10,6 +31,7 @@ my $mallocs=0;
 my $callocs=0;
 my $reallocs=0;
 my $strdups=0;
+my $wcsdups=0;
 my $showlimit;
 
 while(1) {
@@ -199,6 +221,25 @@ while(<FILE>) {
             newtotal($totalmem);
             $strdups++;
         }
+        elsif($function =~ /wcsdup\(0x([0-9a-f]*)\) \((\d*)\) = 0x([0-9a-f]*)/) {
+            # wcsdup(a5b50) (8) = df7c0
+
+            $dup = $1;
+            $size = $2;
+            $addr = $3;
+            $getmem{$addr}="$source:$linenum";
+            $sizeataddr{$addr}=$size;
+
+            $totalmem += $size;
+
+            if($trace) {
+                printf("WCSDUP: $size bytes at %s, makes totally: %d bytes\n",
+                       $getmem{$addr}, $totalmem);
+            }
+
+            newtotal($totalmem);
+            $wcsdups++;
+        }
         else {
             print "Not recognized input line: $function\n";
         }
@@ -215,6 +256,14 @@ while(<FILE>) {
             $getfile{$1}="$source:$linenum";
             $openfile++;
         }
+        elsif($function =~ /socketpair\(\) = (\d*) (\d*)/) {
+            $filedes{$1}=1;
+            $getfile{$1}="$source:$linenum";
+            $openfile++;
+            $filedes{$2}=1;
+            $getfile{$2}="$source:$linenum";
+            $openfile++;
+        }
         elsif($function =~ /accept\(\) = (\d*)/) {
             $filedes{$1}=1;
             $getfile{$1}="$source:$linenum";
@@ -237,7 +286,7 @@ while(<FILE>) {
         $linenum = $2;
         $function = $3;
 
-        if($function =~ /f[d]*open\(\"([^\"]*)\",\"([^\"]*)\"\) = (\(nil\)|0x([0-9a-f]*))/) {
+        if($function =~ /f[d]*open\(\"(.*)\",\"([^\"]*)\"\) = (\(nil\)|0x([0-9a-f]*))/) {
             if($3 eq "(nil)") {
                 ;
             }
@@ -349,8 +398,9 @@ if($verbose) {
     "Reallocs: $reallocs\n",
     "Callocs: $callocs\n",
     "Strdups:  $strdups\n",
+    "Wcsdups:  $wcsdups\n",
     "Frees: $frees\n",
-    "Allocations: ".($mallocs + $callocs + $reallocs + $strdups)."\n";
+    "Allocations: ".($mallocs + $callocs + $reallocs + $strdups + $wcsdups)."\n";
 
     print "Maximum allocated: $maxmem\n";
 }
index 515128d..07a588e 100755 (executable)
@@ -22,7 +22,8 @@
 #***************************************************************************
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, '.');
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
 }
 
 use strict;
index e308cdb..b8eb475 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>runtests.pl man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
index a8a79e7..df94a5e 100644 (file)
Binary files a/tests/runtests.pdf and b/tests/runtests.pdf differ
index 138c383..96df8d5 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, 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
@@ -56,7 +56,8 @@
 # These should be the only variables that might be needed to get edited:
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, ".");
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
     # run time statistics needs Time::HiRes
     eval {
         no warnings "all";
@@ -100,6 +101,7 @@ use sshhelp qw(
     find_sshd
     find_ssh
     find_sftp
+    find_httptlssrv
     sshversioninfo
     );
 
@@ -114,27 +116,31 @@ my $CLIENT6IP="[::1]";    # address which curl uses for incoming connections
 
 my $base = 8990; # base port number
 
-my $HTTPPORT; # HTTP server port
-my $HTTP6PORT; # HTTP IPv6 server port
-my $HTTPSPORT; # HTTPS server port
-my $FTPPORT; # FTP server port
-my $FTP2PORT; # FTP server 2 port
-my $FTPSPORT; # FTPS server port
-my $FTP6PORT; # FTP IPv6 server port
-my $TFTPPORT; # TFTP
-my $TFTP6PORT; # TFTP
-my $SSHPORT; # SCP/SFTP
-my $SOCKSPORT; # SOCKS4/5 port
-my $POP3PORT; # POP3
-my $POP36PORT; # POP3 IPv6 server port
-my $IMAPPORT; # IMAP
-my $IMAP6PORT; # IMAP IPv6 server port
-my $SMTPPORT; # SMTP
-my $SMTP6PORT; # SMTP IPv6 server port
-my $RTSPPORT; # RTSP
-my $RTSP6PORT; # RTSP IPv6 server port
-my $GOPHERPORT; # Gopher
-my $GOPHER6PORT; # Gopher IPv6 server port
+my $HTTPPORT;            # HTTP server port
+my $HTTP6PORT;           # HTTP IPv6 server port
+my $HTTPSPORT;           # HTTPS (stunnel) server port
+my $FTPPORT;             # FTP server port
+my $FTP2PORT;            # FTP server 2 port
+my $FTPSPORT;            # FTPS (stunnel) server port
+my $FTP6PORT;            # FTP IPv6 server port
+my $TFTPPORT;            # TFTP
+my $TFTP6PORT;           # TFTP
+my $SSHPORT;             # SCP/SFTP
+my $SOCKSPORT;           # SOCKS4/5 port
+my $POP3PORT;            # POP3
+my $POP36PORT;           # POP3 IPv6 server port
+my $IMAPPORT;            # IMAP
+my $IMAP6PORT;           # IMAP IPv6 server port
+my $SMTPPORT;            # SMTP
+my $SMTP6PORT;           # SMTP IPv6 server port
+my $RTSPPORT;            # RTSP
+my $RTSP6PORT;           # RTSP IPv6 server port
+my $GOPHERPORT;          # Gopher
+my $GOPHER6PORT;         # Gopher IPv6 server port
+my $HTTPTLSPORT;         # HTTP TLS (non-stunnel) server port
+my $HTTPTLS6PORT;        # HTTP TLS (non-stunnel) IPv6 server port
+my $HTTPPROXYPORT;       # HTTP proxy port, when using CONNECT
+my $HTTPPIPEPORT;        # HTTP pipelining port
 
 my $srcdir = $ENV{'srcdir'} || '.';
 my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests
@@ -145,8 +151,11 @@ my $DBGCURL=$CURL; #"../src/.libs/curl";  # alternative for debugging
 my $LOGDIR="log";
 my $TESTDIR="$srcdir/data";
 my $LIBDIR="./libtest";
+my $UNITDIR="./unit";
+# TODO: change this to use server_inputfilename()
 my $SERVERIN="$LOGDIR/server.input"; # what curl sent the server
 my $SERVER2IN="$LOGDIR/server2.input"; # what curl sent the second server
+my $PROXYIN="$LOGDIR/proxy.input"; # what curl sent the proxy
 my $CURLLOG="$LOGDIR/curl.log"; # all command lines run
 my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here
 my $SERVERLOGS_LOCK="$LOGDIR/serverlogs.lock"; # server logs advisor read lock
@@ -167,8 +176,8 @@ my $TESTCASES="all";
 my $perl="perl -I$srcdir";
 my $server_response_maxtime=13;
 
-my $debug_build=0; # curl built with --enable-debug
-my $curl_debug=0;  # curl built with --enable-curldebug (memory tracking)
+my $debug_build=0;          # built debug enabled (--enable-debug)
+my $has_memory_tracking=0;  # built with memory tracking (--enable-curldebug)
 my $libtool;
 
 # name of the file that the memory debugging creates:
@@ -180,7 +189,6 @@ my $memanalyze="$perl $srcdir/memanalyze.pl";
 my $pwd = getcwd();          # current working directory
 
 my $start;
-my $forkserver=0;
 my $ftpchecktime=1; # time it took to verify our test FTP server
 
 my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel");
@@ -188,6 +196,7 @@ my $valgrind = checktestcmd("valgrind");
 my $valgrind_logfile="--logfile";
 my $valgrind_tool;
 my $gdb = checktestcmd("gdb");
+my $httptlssrv = find_httptlssrv();
 
 my $ssl_version; # set if libcurl is built with SSL support
 my $large_file;  # set if libcurl is built with large file support
@@ -200,27 +209,35 @@ my $has_ipv6;    # set if libcurl is built with IPv6 support
 my $has_libz;    # set if libcurl is built with libz support
 my $has_getrlimit;  # set if system has getrlimit()
 my $has_ntlm;    # set if libcurl is built with NTLM support
+my $has_ntlm_wb; # set if libcurl is built with NTLM delegation to winbind
 my $has_charconv;# set if libcurl is built with CharConv support
+my $has_tls_srp; # set if libcurl is built with TLS-SRP support
+my $has_metalink;# set if curl is built with Metalink support
 
-my $has_openssl; # built with a lib using an OpenSSL-like API
-my $has_gnutls;  # built with GnuTLS
-my $has_nss;     # built with NSS
-my $has_yassl;   # built with yassl
-my $has_polarssl;# built with polarssl
+my $has_openssl;  # built with a lib using an OpenSSL-like API
+my $has_gnutls;   # built with GnuTLS
+my $has_nss;      # built with NSS
+my $has_yassl;    # built with yassl
+my $has_polarssl; # built with polarssl
+my $has_axtls;    # built with axTLS
+my $has_winssl;   # built with WinSSL (Schannel/SSPI)
+my $has_darwinssl;# build with DarwinSSL (Secure Transport)
 
-my $has_shared;  # built shared
+my $has_shared = "unknown";  # built shared
 
 my $ssllib;      # name of the lib we use (for human presentation)
 my $has_crypto;  # set if libcurl is built with cryptographic support
 my $has_textaware; # set if running on a system that has a text mode concept
   # on files. Windows for example
-my @protocols;   # array of supported protocols
+
+my @protocols;   # array of lowercase supported protocol servers
 
 my $skipped=0;  # number of tests skipped; reported in main loop
 my %skipped;    # skipped{reason}=counter, reasons for skip
 my @teststat;   # teststat[testnum]=reason, reasons for skip
 my %disabled_keywords;  # key words of tests to skip
 my %enabled_keywords;   # key words of tests to run
+my %disabled;           # disabled test cases
 
 my $sshdid;      # for socks server, ssh daemon version id
 my $sshdvernum;  # for socks server, ssh daemon version number
@@ -244,14 +261,16 @@ my $testnumcheck; # test number, set in singletest sub.
 my %oldenv;
 
 #######################################################################
-# variables the command line options may set
+# variables that command line options may set
 #
 
 my $short;
+my $automakestyle;
 my $verbose;
 my $debugprotocol;
 my $anyway;
 my $gdbthis;      # run test case with gdb debugger
+my $gdbxwin;      # use windowed gdb when using gdb
 my $keepoutfiles; # keep stdout and stderr files after tests
 my $listonly;     # only list the tests
 my $postmortem;   # display detailed info about failed tests
@@ -302,7 +321,7 @@ $SIG{TERM} = \&catch_zap;
 # to prevent them to interfere with our testing!
 
 my $protocol;
-foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no')) {
+foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no', 'all')) {
     my $proxy = "${protocol}_proxy";
     # clear lowercase version
     delete $ENV{$proxy} if($ENV{$proxy});
@@ -321,10 +340,10 @@ delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'});
 # Load serverpidfile hash with pidfile names for all possible servers.
 #
 sub init_serverpidfile_hash {
-  for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp')) {
+  for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp', 'http')) {
     for my $ssl (('', 's')) {
       for my $ipvnum ((4, 6)) {
-        for my $idnum ((1, 2)) {
+        for my $idnum ((1, 2, 3)) {
           my $serv = servername_id("$proto$ssl", $ipvnum, $idnum);
           my $pidf = server_pidfilename("$proto$ssl", $ipvnum, $idnum);
           $serverpidfile{$serv} = $pidf;
@@ -332,7 +351,7 @@ sub init_serverpidfile_hash {
       }
     }
   }
-  for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher')) {
+  for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher', 'httptls')) {
     for my $ipvnum ((4, 6)) {
       for my $idnum ((1, 2)) {
         my $serv = servername_id($proto, $ipvnum, $idnum);
@@ -385,7 +404,7 @@ sub startnew {
         die "error: exec() has returned";
     }
 
-    # Ugly hack but ssh client doesn't support pid files
+    # Ugly hack but ssh client and gnutls-serv don't support pid files
     if ($fake) {
         if(open(OUT, ">$pidfile")) {
             print OUT $child . "\n";
@@ -408,7 +427,7 @@ sub startnew {
         if(-f $pidfile && -s $pidfile && open(PID, "<$pidfile")) {
             $pid2 = 0 + <PID>;
             close(PID);
-            if(($pid2 > 0) && kill(0, $pid2)) {
+            if(($pid2 > 0) && pidexists($pid2)) {
                 # if $pid2 is valid, then make sure this pid is alive, as
                 # otherwise it is just likely to be the _previous_ pidfile or
                 # similar!
@@ -475,7 +494,9 @@ sub checktestcmd {
 #
 sub runclient {
     my ($cmd)=@_;
-    return system($cmd);
+    my $ret = system($cmd);
+    print "CMD ($ret): $cmd\n" if($verbose);
+    return $ret;
 
 # This is one way to test curl on a remote machine
 #    my $out = system("ssh $CLIENTIP cd \'$pwd\' \\; \'$cmd\'");
@@ -624,20 +645,20 @@ sub stopserver {
     # All servers relative to the given one must be stopped also
     #
     my @killservers;
-    if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
-        # given an ssl server, also kill non-ssl underlying one
+    if($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)s((\d*)(-ipv6|))$/) {
+        # given a stunnel based ssl server, also kill non-ssl underlying one
         push @killservers, "${1}${2}";
     }
-    elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
-        # given a non-ssl server, also kill ssl piggybacking one
+    elsif($server =~ /^(ftp|http|imap|pop3|smtp|httppipe)((\d*)(-ipv6|))$/) {
+        # given a non-ssl server, also kill stunnel based ssl piggybacking one
         push @killservers, "${1}s${2}";
     }
-    elsif($server =~ /^(socks)(.*)$/) {
-        # given an socks server, also kill ssh underlying one
+    elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
+        # given a socks server, also kill ssh underlying one
         push @killservers, "ssh${2}";
     }
-    elsif($server =~ /^(ssh)(.*)$/) {
-        # given an ssh server, also kill socks piggybacking one
+    elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
+        # given a ssh server, also kill socks piggybacking one
         push @killservers, "socks${2}";
     }
     push @killservers, $server;
@@ -646,7 +667,8 @@ sub stopserver {
     #
     foreach my $server (@killservers) {
         if($run{$server}) {
-            $pidlist .= "$run{$server} ";
+            # we must prepend a space since $pidlist may already contain a pid
+            $pidlist .= " $run{$server}";
             $run{$server} = 0;
         }
         $runcert{$server} = 0 if($runcert{$server});
@@ -670,8 +692,8 @@ sub stopserver {
 # Verify that the server that runs on $ip, $port is our server.  This also
 # implies that we can speak with it, as there might be occasions when the
 # server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
 sub verifyhttp {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -696,6 +718,7 @@ sub verifyhttp {
     $flags .= "--silent ";
     $flags .= "--verbose ";
     $flags .= "--globoff ";
+    $flags .= "-1 "         if($has_axtls);
     $flags .= "--insecure " if($proto eq 'https');
     $flags .= "\"$proto://$ip:$port/${bonus}verifiedserver\"";
 
@@ -749,8 +772,8 @@ sub verifyhttp {
 # Verify that the server that runs on $ip, $port is our server.  This also
 # implies that we can speak with it, as there might be occasions when the
 # server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
 sub verifyftp {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -821,8 +844,8 @@ sub verifyftp {
 # Verify that the server that runs on $ip, $port is our server.  This also
 # implies that we can speak with it, as there might be occasions when the
 # server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
+# assign requested address")
+#
 sub verifyrtsp {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -894,7 +917,7 @@ sub verifyrtsp {
 # Verify that the ssh server has written out its pidfile, recovering
 # the pid from the file and returning it if a process with that pid is
 # actually alive.
-
+#
 sub verifyssh {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -907,7 +930,7 @@ sub verifyssh {
     if($pid > 0) {
         # if we have a pid it is actually our ssh server,
         # since runsshserver() unlinks previous pidfile
-        if(!kill(0, $pid)) {
+        if(!pidexists($pid)) {
             logmsg "RUN: SSH server has died after starting up\n";
             checkdied($pid);
             unlink($pidfile);
@@ -920,7 +943,7 @@ sub verifyssh {
 #######################################################################
 # Verify that we can connect to the sftp server, properly authenticate
 # with generated config and key files and run a simple remote pwd.
-
+#
 sub verifysftp {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -954,10 +977,96 @@ sub verifysftp {
     return $verified;
 }
 
+#######################################################################
+# Verify that the non-stunnel HTTP TLS extensions capable server that runs
+# on $ip, $port is our server.  This also implies that we can speak with it,
+# as there might be occasions when the server runs fine but we cannot talk
+# to it ("Failed to connect to ::1: Can't assign requested address")
+#
+sub verifyhttptls {
+    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+    my $server = servername_id($proto, $ipvnum, $idnum);
+    my $pidfile = server_pidfilename($proto, $ipvnum, $idnum);
+    my $pid = 0;
+
+    my $verifyout = "$LOGDIR/".
+        servername_canon($proto, $ipvnum, $idnum) .'_verify.out';
+    unlink($verifyout) if(-f $verifyout);
+
+    my $verifylog = "$LOGDIR/".
+        servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
+    unlink($verifylog) if(-f $verifylog);
+
+    my $flags = "--max-time $server_response_maxtime ";
+    $flags .= "--output $verifyout ";
+    $flags .= "--verbose ";
+    $flags .= "--globoff ";
+    $flags .= "--insecure ";
+    $flags .= "--tlsauthtype SRP ";
+    $flags .= "--tlsuser jsmith ";
+    $flags .= "--tlspassword abc ";
+    $flags .= "\"https://$ip:$port/verifiedserver\"";
+
+    my $cmd = "$VCURL $flags 2>$verifylog";
+
+    # verify if our/any server is running on this port
+    logmsg "RUN: $cmd\n" if($verbose);
+    my $res = runclient($cmd);
+
+    $res >>= 8; # rotate the result
+    if($res & 128) {
+        logmsg "RUN: curl command died with a coredump\n";
+        return -1;
+    }
+
+    if($res && $verbose) {
+        logmsg "RUN: curl command returned $res\n";
+        if(open(FILE, "<$verifylog")) {
+            while(my $string = <FILE>) {
+                logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
+            }
+            close(FILE);
+        }
+    }
+
+    my $data;
+    if(open(FILE, "<$verifyout")) {
+        while(my $string = <FILE>) {
+            $data .= $string;
+        }
+        close(FILE);
+    }
+
+    if($data && ($data =~ /GNUTLS/) && open(FILE, "<$pidfile")) {
+        $pid=0+<FILE>;
+        close(FILE);
+        if($pid > 0) {
+            # if we have a pid it is actually our httptls server,
+            # since runhttptlsserver() unlinks previous pidfile
+            if(!pidexists($pid)) {
+                logmsg "RUN: $server server has died after starting up\n";
+                checkdied($pid);
+                unlink($pidfile);
+                $pid = -1;
+            }
+        }
+        return $pid;
+    }
+    elsif($res == 6) {
+        # curl: (6) Couldn't resolve host '::1'
+        logmsg "RUN: failed to resolve host (https://$ip:$port/verifiedserver)\n";
+        return -1;
+    }
+    elsif($data || ($res && ($res != 7))) {
+        logmsg "RUN: Unknown server on our $server port: $port ($res)\n";
+        return -1;
+    }
+    return $pid;
+}
 
 #######################################################################
 # STUB for verifying socks
-
+#
 sub verifysocks {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
     my $server = servername_id($proto, $ipvnum, $idnum);
@@ -970,7 +1079,7 @@ sub verifysocks {
     if($pid > 0) {
         # if we have a pid it is actually our socks server,
         # since runsocksserver() unlinks previous pidfile
-        if(!kill(0, $pid)) {
+        if(!pidexists($pid)) {
             logmsg "RUN: SOCKS server has died after starting up\n";
             checkdied($pid);
             unlink($pidfile);
@@ -986,6 +1095,11 @@ sub verifysocks {
 # particular can take a long time to start if it needs to generate
 # keys on a slow or loaded host.
 #
+# Just for convenience, test harness uses 'https' and 'httptls' literals
+# as values for 'proto' variable in order to differentiate different
+# servers. 'https' literal is used for stunnel based https test servers,
+# and 'httptls' is used for non-stunnel https test servers.
+#
 
 my %protofunc = ('http' => \&verifyhttp,
                  'https' => \&verifyhttp,
@@ -994,11 +1108,13 @@ my %protofunc = ('http' => \&verifyhttp,
                  'pop3' => \&verifyftp,
                  'imap' => \&verifyftp,
                  'smtp' => \&verifyftp,
+                 'httppipe' => \&verifyhttp,
                  'ftps' => \&verifyftp,
                  'tftp' => \&verifyftp,
                  'ssh' => \&verifyssh,
                  'socks' => \&verifysocks,
-                 'gopher' => \&verifyhttp);
+                 'gopher' => \&verifyhttp,
+                 'httptls' => \&verifyhttptls);
 
 sub verifyserver {
     my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
@@ -1023,13 +1139,33 @@ sub verifyserver {
     return $pid;
 }
 
+#######################################################################
+# Single shot server responsiveness test. This should only be used
+# to verify that a server present in %run hash is still functional
+#
+sub responsiveserver {
+    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+    my $prev_verbose = $verbose;
+
+    $verbose = 0;
+    my $fun = $protofunc{$proto};
+    my $pid = &$fun($proto, $ipvnum, $idnum, $ip, $port);
+    $verbose = $prev_verbose;
 
+    if($pid > 0) {
+        return 1; # responsive
+    }
+
+    my $srvrname = servername_str($proto, $ipvnum, $idnum);
+    logmsg " server precheck FAILED (unresponsive $srvrname server)\n";
+    return 0;
+}
 
 #######################################################################
 # start the http server
 #
 sub runhttpserver {
-    my ($proto, $verbose, $ipv6, $port) = @_;
+    my ($proto, $verbose, $alt, $port) = @_;
     my $ip = $HOSTIP;
     my $ipvnum = 4;
     my $idnum = 1;
@@ -1038,13 +1174,24 @@ sub runhttpserver {
     my $pidfile;
     my $logfile;
     my $flags = "";
+    my $exe = "$perl $srcdir/httpserver.pl";
+    my $verbose_flag = "--verbose ";
 
-
-    if($ipv6) {
+    if($alt eq "ipv6") {
         # if IPv6, use a different setup
         $ipvnum = 6;
         $ip = $HOST6IP;
     }
+    elsif($alt eq "proxy") {
+        # basically the same, but another ID
+        $idnum = 2;
+    }
+    elsif($alt eq "pipe") {
+        # basically the same, but another ID
+        $idnum = 3;
+        $exe = "python $srcdir/http_pipe.py";
+        $verbose_flag .= "1 ";
+    }
 
     $server = servername_id($proto, $ipvnum, $idnum);
 
@@ -1065,17 +1212,92 @@ sub runhttpserver {
 
     $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
 
-    $flags .= "--fork " if($forkserver);
     $flags .= "--gopher " if($proto eq "gopher");
-    $flags .= "--verbose " if($debugprotocol);
+    $flags .= "--connect $HOSTIP " if($alt eq "proxy");
+    $flags .= $verbose_flag if($debugprotocol);
     $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
     $flags .= "--id $idnum " if($idnum > 1);
     $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
 
-    my $cmd = "$perl $srcdir/httpserver.pl $flags";
+    my $cmd = "$exe $flags";
+    my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
+
+    if($httppid <= 0 || !pidexists($httppid)) {
+        # it is NOT alive
+        logmsg "RUN: failed to start the $srvrname server\n";
+        stopserver($server, "$pid2");
+        displaylogs($testnumcheck);
+        $doesntrun{$pidfile} = 1;
+        return (0,0);
+    }
+
+    # Server is up. Verify that we can speak to it.
+    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
+    if(!$pid3) {
+        logmsg "RUN: $srvrname server failed verification\n";
+        # failed to talk to it properly. Kill the server and return failure
+        stopserver($server, "$httppid $pid2");
+        displaylogs($testnumcheck);
+        $doesntrun{$pidfile} = 1;
+        return (0,0);
+    }
+    $pid2 = $pid3;
+
+    if($verbose) {
+        logmsg "RUN: $srvrname server is now running PID $httppid\n";
+    }
+
+    sleep(1);
+
+    return ($httppid, $pid2);
+}
+
+#######################################################################
+# start the http server
+#
+sub runhttp_pipeserver {
+    my ($proto, $verbose, $alt, $port) = @_;
+    my $ip = $HOSTIP;
+    my $ipvnum = 4;
+    my $idnum = 1;
+    my $server;
+    my $srvrname;
+    my $pidfile;
+    my $logfile;
+    my $flags = "";
+
+    if($alt eq "ipv6") {
+        # No IPv6
+    }
+
+    $server = servername_id($proto, $ipvnum, $idnum);
+
+    $pidfile = $serverpidfile{$server};
+
+    # don't retry if the server doesn't work
+    if ($doesntrun{$pidfile}) {
+        return (0,0);
+    }
+
+    my $pid = processexists($pidfile);
+    if($pid > 0) {
+        stopserver($server, "$pid");
+    }
+    unlink($pidfile) if(-f $pidfile);
+
+    $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+    $flags .= "--verbose 1 " if($debugprotocol);
+    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+    $flags .= "--id $idnum " if($idnum > 1);
+    $flags .= "--port $port --srcdir \"$srcdir\"";
+
+    my $cmd = "$srcdir/http_pipe.py $flags";
     my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($httppid <= 0 || !kill(0, $httppid)) {
+    if($httppid <= 0 || !pidexists($httppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1106,7 +1328,7 @@ sub runhttpserver {
 }
 
 #######################################################################
-# start the https server (or rather, tunnel)
+# start the https stunnel based server
 #
 sub runhttpsserver {
     my ($verbose, $ipv6, $certfile) = @_;
@@ -1156,7 +1378,7 @@ sub runhttpsserver {
     my $cmd = "$perl $srcdir/secureserver.pl $flags";
     my ($httpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($httpspid <= 0 || !kill(0, $httpspid)) {
+    if($httpspid <= 0 || !pidexists($httpspid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1189,6 +1411,84 @@ sub runhttpsserver {
 }
 
 #######################################################################
+# start the non-stunnel HTTP TLS extensions capable server
+#
+sub runhttptlsserver {
+    my ($verbose, $ipv6) = @_;
+    my $proto = "httptls";
+    my $port = ($ipv6 && ($ipv6 =~ /6$/)) ? $HTTPTLS6PORT : $HTTPTLSPORT;
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+    my $idnum = 1;
+    my $server;
+    my $srvrname;
+    my $pidfile;
+    my $logfile;
+    my $flags = "";
+
+    if(!$httptlssrv) {
+        return (0,0);
+    }
+
+    $server = servername_id($proto, $ipvnum, $idnum);
+
+    $pidfile = $serverpidfile{$server};
+
+    # don't retry if the server doesn't work
+    if ($doesntrun{$pidfile}) {
+        return (0,0);
+    }
+
+    my $pid = processexists($pidfile);
+    if($pid > 0) {
+        stopserver($server, "$pid");
+    }
+    unlink($pidfile) if(-f $pidfile);
+
+    $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+    $flags .= "--http ";
+    $flags .= "--debug 1 " if($debugprotocol);
+    $flags .= "--port $port ";
+    $flags .= "--srppasswd $srcdir/certs/srp-verifier-db ";
+    $flags .= "--srppasswdconf $srcdir/certs/srp-verifier-conf";
+
+    my $cmd = "$httptlssrv $flags > $logfile 2>&1";
+    my ($httptlspid, $pid2) = startnew($cmd, $pidfile, 10, 1); # fake pidfile
+
+    if($httptlspid <= 0 || !pidexists($httptlspid)) {
+        # it is NOT alive
+        logmsg "RUN: failed to start the $srvrname server\n";
+        stopserver($server, "$pid2");
+        displaylogs($testnumcheck);
+        $doesntrun{$pidfile} = 1;
+        return (0,0);
+    }
+
+    # Server is up. Verify that we can speak to it. PID is from fake pidfile
+    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
+    if(!$pid3) {
+        logmsg "RUN: $srvrname server failed verification\n";
+        # failed to talk to it properly. Kill the server and return failure
+        stopserver($server, "$httptlspid $pid2");
+        displaylogs($testnumcheck);
+        $doesntrun{$pidfile} = 1;
+        return (0,0);
+    }
+    $pid2 = $pid3;
+
+    if($verbose) {
+        logmsg "RUN: $srvrname server is now running PID $httptlspid\n";
+    }
+
+    sleep(1);
+
+    return ($httptlspid, $pid2);
+}
+
+#######################################################################
 # start the pingpong server (FTP, POP3, IMAP, SMTP)
 #
 sub runpingpongserver {
@@ -1253,7 +1553,7 @@ sub runpingpongserver {
     my $cmd = "$perl $srcdir/ftpserver.pl $flags";
     my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($ftppid <= 0 || !kill(0, $ftppid)) {
+    if($ftppid <= 0 || !pidexists($ftppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1335,7 +1635,7 @@ sub runftpsserver {
     my $cmd = "$perl $srcdir/secureserver.pl $flags";
     my ($ftpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($ftpspid <= 0 || !kill(0, $ftpspid)) {
+    if($ftpspid <= 0 || !pidexists($ftpspid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1417,7 +1717,7 @@ sub runtftpserver {
     my $cmd = "$perl $srcdir/tftpserver.pl $flags";
     my ($tftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($tftppid <= 0 || !kill(0, $tftppid)) {
+    if($tftppid <= 0 || !pidexists($tftppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1498,7 +1798,7 @@ sub runrtspserver {
     my $cmd = "$perl $srcdir/rtspserver.pl $flags";
     my ($rtsppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
 
-    if($rtsppid <= 0 || !kill(0, $rtsppid)) {
+    if($rtsppid <= 0 || !pidexists($rtsppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1580,7 +1880,7 @@ sub runsshserver {
     # passed to startnew, when this happens startnew completes without being
     # able to read the pidfile and consequently returns a zero pid2 above.
 
-    if($sshpid <= 0 || !kill(0, $sshpid)) {
+    if($sshpid <= 0 || !pidexists($sshpid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         stopserver($server, "$pid2");
@@ -1735,9 +2035,9 @@ sub runsocksserver {
 
     # start our socks server
     my $cmd="$ssh -N -F $sshconfig $ip > $sshlog 2>&1";
-    my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1);
+    my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1); # fake pidfile
 
-    if($sshpid <= 0 || !kill(0, $sshpid)) {
+    if($sshpid <= 0 || !pidexists($sshpid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
         display_sshlog();
@@ -1749,7 +2049,7 @@ sub runsocksserver {
         return (0,0);
     }
 
-    # Ugly hack but ssh doesn't support pid files
+    # Ugly hack but ssh doesn't support pid files. PID is from fake pidfile.
     my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
     if(!$pid3) {
         logmsg "RUN: $srvrname server failed verification\n";
@@ -1768,6 +2068,124 @@ sub runsocksserver {
 }
 
 #######################################################################
+# Single shot http and gopher server responsiveness test. This should only
+# be used to verify that a server present in %run hash is still functional
+#
+sub responsive_http_server {
+    my ($proto, $verbose, $alt, $port) = @_;
+    my $ip = $HOSTIP;
+    my $ipvnum = 4;
+    my $idnum = 1;
+
+    if($alt eq "ipv6") {
+        # if IPv6, use a different setup
+        $ipvnum = 6;
+        $ip = $HOST6IP;
+    }
+    elsif($alt eq "proxy") {
+        $idnum = 2;
+    }
+
+    return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot pingpong server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_pingpong_server {
+    my ($proto, $id, $verbose, $ipv6) = @_;
+    my $port;
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
+
+    if($proto eq "ftp") {
+        $port = ($idnum>1)?$FTP2PORT:$FTPPORT;
+
+        if($ipvnum==6) {
+            # if IPv6, use a different setup
+            $port = $FTP6PORT;
+        }
+    }
+    elsif($proto eq "pop3") {
+        $port = ($ipvnum==6) ? $POP36PORT : $POP3PORT;
+    }
+    elsif($proto eq "imap") {
+        $port = ($ipvnum==6) ? $IMAP6PORT : $IMAPPORT;
+    }
+    elsif($proto eq "smtp") {
+        $port = ($ipvnum==6) ? $SMTP6PORT : $SMTPPORT;
+    }
+    else {
+        print STDERR "Unsupported protocol $proto!!\n";
+        return 0;
+    }
+
+    return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot rtsp server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_rtsp_server {
+    my ($verbose, $ipv6) = @_;
+    my $port = $RTSPPORT;
+    my $ip = $HOSTIP;
+    my $proto = 'rtsp';
+    my $ipvnum = 4;
+    my $idnum = 1;
+
+    if($ipv6) {
+        # if IPv6, use a different setup
+        $ipvnum = 6;
+        $port = $RTSP6PORT;
+        $ip = $HOST6IP;
+    }
+
+    return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot tftp server responsiveness test. This should only be
+# used to verify that a server present in %run hash is still functional
+#
+sub responsive_tftp_server {
+    my ($id, $verbose, $ipv6) = @_;
+    my $port = $TFTPPORT;
+    my $ip = $HOSTIP;
+    my $proto = 'tftp';
+    my $ipvnum = 4;
+    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
+
+    if($ipv6) {
+        # if IPv6, use a different setup
+        $ipvnum = 6;
+        $port = $TFTP6PORT;
+        $ip = $HOST6IP;
+    }
+
+    return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
+# Single shot non-stunnel HTTP TLS extensions capable server
+# responsiveness test. This should only be used to verify that a
+# server present in %run hash is still functional
+#
+sub responsive_httptls_server {
+    my ($verbose, $ipv6) = @_;
+    my $proto = "httptls";
+    my $port = ($ipv6 && ($ipv6 =~ /6$/)) ? $HTTPTLS6PORT : $HTTPTLSPORT;
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
+    my $idnum = 1;
+
+    return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
+}
+
+#######################################################################
 # Remove all files in the specified directory
 #
 sub cleardir {
@@ -1818,21 +2236,27 @@ sub filteroff {
 # compare test results with the expected output, we might filter off
 # some pattern that is allowed to differ, output test results
 #
-
 sub compare {
     # filter off patterns _before_ this comparison!
-    my ($subject, $firstref, $secondref)=@_;
+    my ($testnum, $testname, $subject, $firstref, $secondref)=@_;
 
     my $result = compareparts($firstref, $secondref);
 
     if($result) {
+        # timestamp test result verification end
+        $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+
         if(!$short) {
-            logmsg "\n $subject FAILED:\n";
+            logmsg "\n $testnum: $subject FAILED:\n";
             logmsg showdiff($LOGDIR, $firstref, $secondref);
         }
-        else {
+        elsif(!$automakestyle) {
             logmsg "FAILED\n";
         }
+        else {
+            # automakestyle
+            logmsg "FAIL: $testnum - $testname - $subject\n";
+        }
     }
     return $result;
 }
@@ -1875,44 +2299,10 @@ sub checksystem {
             $libcurl = $2;
             if($curl =~ /mingw32/) {
                 # This is a windows minw32 build, we need to translate the
-                # given path to the "actual" windows path.
-
-                my @m = `mount`;
-                my $matchlen;
-                my $bestmatch;
-                my $mount;
-
-# example mount output:
-# C:\DOCUME~1\Temp on /tmp type user (binmode,noumount)
-# c:\ActiveState\perl on /perl type user (binmode)
-# C:\msys\1.0\bin on /usr/bin type user (binmode,cygexec,noumount)
-# C:\msys\1.0\bin on /bin type user (binmode,cygexec,noumount)
-
-                foreach $mount (@m) {
-                    if( $mount =~ /(.*) on ([^ ]*) type /) {
-                        my ($mingw, $real)=($2, $1);
-                        if($pwd =~ /^$mingw/) {
-                            # the path we got from pwd starts with the path
-                            # we found on this line in the mount output
-
-                            my $len = length($real);
-                            if($len > $matchlen) {
-                                # we remember the match that is the longest
-                                $matchlen = $len;
-                                $bestmatch = $real;
-                            }
-                        }
-                    }
-                }
-                if(!$matchlen) {
-                    logmsg "Serious error, can't find our \"real\" path\n";
-                }
-                else {
-                    # now prepend the prefix from the mount command to build
-                    # our "actual path"
-                    $pwd = "$bestmatch$pwd";
-                }
-                $pwd =~ s#\\#/#g;
+                # given path to the "actual" windows path. The MSYS shell
+                # has a builtin 'pwd -W' command which converts the path.
+                $pwd = `sh -c "echo \$(pwd -W)"`;
+                chomp($pwd);
             }
             elsif ($curl =~ /win32/) {
                # Native Windows builds don't understand the
@@ -1928,6 +2318,10 @@ sub checksystem {
                # through a shell.
                chomp($pwd = `cygpath -m $pwd`);
            }
+           if ($libcurl =~ /winssl/i) {
+               $has_winssl=1;
+               $ssllib="WinSSL";
+           }
            elsif ($libcurl =~ /openssl/i) {
                $has_openssl=1;
                $ssllib="OpenSSL";
@@ -1942,38 +2336,48 @@ sub checksystem {
            }
            elsif ($libcurl =~ /yassl/i) {
                $has_yassl=1;
-               $has_openssl=1;
                $ssllib="yassl";
            }
            elsif ($libcurl =~ /polarssl/i) {
                $has_polarssl=1;
-               $has_openssl=1;
                $ssllib="polarssl";
-           } 
+           }
+           elsif ($libcurl =~ /axtls/i) {
+               $has_axtls=1;
+               $ssllib="axTLS";
+           }
+           elsif ($libcurl =~ /securetransport/i) {
+               $has_darwinssl=1;
+               $ssllib="DarwinSSL";
+           }
         }
         elsif($_ =~ /^Protocols: (.*)/i) {
             # these are the protocols compiled in to this libcurl
-            @protocols = split(' ', $1);
+            @protocols = split(' ', lc($1));
 
             # Generate a "proto-ipv6" version of each protocol to match the
             # IPv6 <server> name. This works even if IPv6 support isn't
             # compiled in because the <features> test will fail.
-            push @protocols, map($_ . "-ipv6", @protocols);
+            push @protocols, map($_ . '-ipv6', @protocols);
+
+            # 'http-proxy' is used in test cases to do CONNECT through
+            push @protocols, 'http-proxy';
+
+            # 'http-pipe' is the special server for testing pipelining
+            push @protocols, 'http-pipe';
 
             # 'none' is used in test cases to mean no server
-            push @protocols, ('none');
+            push @protocols, 'none';
         }
         elsif($_ =~ /^Features: (.*)/i) {
             $feat = $1;
             if($feat =~ /TrackMemory/i) {
-                # curl was built with --enable-curldebug (memory tracking)
-                $curl_debug = 1;
+                # built with memory tracking support (--enable-curldebug)
+                $has_memory_tracking = 1;
             }
             if($feat =~ /debug/i) {
                 # curl was built with --enable-debug
                 $debug_build = 1;
-                # set the NETRC debug env
-                $ENV{'CURL_DEBUG_NETRC'} = "$LOGDIR/netrc";
             }
             if($feat =~ /SSL/i) {
                 # ssl enabled
@@ -1997,10 +2401,43 @@ sub checksystem {
                 # NTLM enabled
                 $has_ntlm=1;
             }
+            if($feat =~ /NTLM_WB/i) {
+                # NTLM delegation to winbind daemon ntlm_auth helper enabled
+                $has_ntlm_wb=1;
+            }
             if($feat =~ /CharConv/i) {
                 # CharConv enabled
                 $has_charconv=1;
             }
+            if($feat =~ /TLS-SRP/i) {
+                # TLS-SRP enabled
+                $has_tls_srp=1;
+            }
+            if($feat =~ /Metalink/i) {
+                # Metalink enabled
+                $has_metalink=1;
+            }
+        }
+        #
+        # Test harness currently uses a non-stunnel server in order to
+        # run HTTP TLS-SRP tests required when curl is built with https
+        # protocol support and TLS-SRP feature enabled. For convenience
+        # 'httptls' may be included in the test harness protocols array
+        # to differentiate this from classic stunnel based 'https' test
+        # harness server.
+        #
+        if($has_tls_srp) {
+            my $add_httptls;
+            for(@protocols) {
+                if($_ =~ /^https(-ipv6|)$/) {
+                    $add_httptls=1;
+                    last;
+                }
+            }
+            if($add_httptls && (! grep /^httptls$/, @protocols)) {
+                push @protocols, 'httptls';
+                push @protocols, 'httptls-ipv6';
+            }
         }
     }
     if(!$curl) {
@@ -2054,8 +2491,9 @@ sub checksystem {
         }
     }
 
-    if(!$curl_debug && $torture) {
-        die "can't run torture tests since curl was not built with curldebug";
+    if(!$has_memory_tracking && $torture) {
+        die "can't run torture tests since curl was built without ".
+            "TrackMemory feature (--enable-curldebug)";
     }
 
     $has_shared = `sh $CURLCONFIG --built-shared`;
@@ -2078,7 +2516,7 @@ sub checksystem {
     logmsg sprintf("* Server SSL:   %8s", $stunnel?"ON ":"OFF");
     logmsg sprintf("  libcurl SSL:  %s\n", $ssl_version?"ON ":"OFF");
     logmsg sprintf("* debug build:  %8s", $debug_build?"ON ":"OFF");
-    logmsg sprintf("  track memory: %s\n", $curl_debug?"ON ":"OFF");
+    logmsg sprintf("  track memory: %s\n", $has_memory_tracking?"ON ":"OFF");
     logmsg sprintf("* valgrind:     %8s", $valgrind?"ON ":"OFF");
     logmsg sprintf("  HTTP IPv6     %s\n", $http_ipv6?"ON ":"OFF");
     logmsg sprintf("* FTP IPv6      %8s", $ftp_ipv6?"ON ":"OFF");
@@ -2123,6 +2561,14 @@ sub checksystem {
         logmsg sprintf("IMAP-IPv6/%d ", $IMAP6PORT);
         logmsg sprintf("SMTP-IPv6/%d\n", $SMTP6PORT);
     }
+    if($httptlssrv) {
+        logmsg sprintf("*   HTTPTLS/%d ", $HTTPTLSPORT);
+        if($has_ipv6) {
+            logmsg sprintf("HTTPTLS-IPv6/%d ", $HTTPTLS6PORT);
+        }
+        logmsg "\n";
+    }
+    logmsg sprintf("*   HTTP-PIPE/%d \n", $HTTPPIPEPORT);
 
     $has_textaware = ($^O eq 'MSWin32') || ($^O eq 'msys');
 
@@ -2135,35 +2581,59 @@ sub checksystem {
 #
 sub subVariables {
   my ($thing) = @_;
-  $$thing =~ s/%HOSTIP/$HOSTIP/g;
-  $$thing =~ s/%HTTPPORT/$HTTPPORT/g;
-  $$thing =~ s/%HOST6IP/$HOST6IP/g;
-  $$thing =~ s/%HTTP6PORT/$HTTP6PORT/g;
-  $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
-  $$thing =~ s/%FTPPORT/$FTPPORT/g;
+
+  # ports
+
   $$thing =~ s/%FTP6PORT/$FTP6PORT/g;
   $$thing =~ s/%FTP2PORT/$FTP2PORT/g;
   $$thing =~ s/%FTPSPORT/$FTPSPORT/g;
-  $$thing =~ s/%SRCDIR/$srcdir/g;
-  $$thing =~ s/%PWD/$pwd/g;
-  $$thing =~ s/%TFTPPORT/$TFTPPORT/g;
-  $$thing =~ s/%TFTP6PORT/$TFTP6PORT/g;
-  $$thing =~ s/%SSHPORT/$SSHPORT/g;
-  $$thing =~ s/%SOCKSPORT/$SOCKSPORT/g;
-  $$thing =~ s/%POP3PORT/$POP3PORT/g;
-  $$thing =~ s/%POP36PORT/$POP36PORT/g;
-  $$thing =~ s/%IMAPPORT/$IMAPPORT/g;
+  $$thing =~ s/%FTPPORT/$FTPPORT/g;
+
+  $$thing =~ s/%GOPHER6PORT/$GOPHER6PORT/g;
+  $$thing =~ s/%GOPHERPORT/$GOPHERPORT/g;
+
+  $$thing =~ s/%HTTPTLS6PORT/$HTTPTLS6PORT/g;
+  $$thing =~ s/%HTTPTLSPORT/$HTTPTLSPORT/g;
+  $$thing =~ s/%HTTP6PORT/$HTTP6PORT/g;
+  $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
+  $$thing =~ s/%HTTPPORT/$HTTPPORT/g;
+  $$thing =~ s/%HTTPPIPEPORT/$HTTPPIPEPORT/g;
+  $$thing =~ s/%PROXYPORT/$HTTPPROXYPORT/g;
+
   $$thing =~ s/%IMAP6PORT/$IMAP6PORT/g;
-  $$thing =~ s/%SMTPPORT/$SMTPPORT/g;
+  $$thing =~ s/%IMAPPORT/$IMAPPORT/g;
+
+  $$thing =~ s/%POP36PORT/$POP36PORT/g;
+  $$thing =~ s/%POP3PORT/$POP3PORT/g;
+
+  $$thing =~ s/%RTSP6PORT/$RTSP6PORT/g;
+  $$thing =~ s/%RTSPPORT/$RTSPPORT/g;
+
   $$thing =~ s/%SMTP6PORT/$SMTP6PORT/g;
+  $$thing =~ s/%SMTPPORT/$SMTPPORT/g;
+
+  $$thing =~ s/%SOCKSPORT/$SOCKSPORT/g;
+  $$thing =~ s/%SSHPORT/$SSHPORT/g;
+
+  $$thing =~ s/%TFTP6PORT/$TFTP6PORT/g;
+  $$thing =~ s/%TFTPPORT/$TFTPPORT/g;
+
+  # client IP addresses
+
+  $$thing =~ s/%CLIENT6IP/$CLIENT6IP/g;
+  $$thing =~ s/%CLIENTIP/$CLIENTIP/g;
+
+  # server IP addresses
+
+  $$thing =~ s/%HOST6IP/$HOST6IP/g;
+  $$thing =~ s/%HOSTIP/$HOSTIP/g;
+
+  # misc
+
   $$thing =~ s/%CURL/$CURL/g;
+  $$thing =~ s/%PWD/$pwd/g;
+  $$thing =~ s/%SRCDIR/$srcdir/g;
   $$thing =~ s/%USER/$USER/g;
-  $$thing =~ s/%CLIENTIP/$CLIENTIP/g;
-  $$thing =~ s/%CLIENT6IP/$CLIENT6IP/g;
-  $$thing =~ s/%RTSPPORT/$RTSPPORT/g;
-  $$thing =~ s/%RTSP6PORT/$RTSP6PORT/g;
-  $$thing =~ s/%GOPHERPORT/$GOPHERPORT/g;
-  $$thing =~ s/%GOPHER6PORT/$GOPHER6PORT/g;
 
   # The purpose of FTPTIME2 and FTPTIME3 is to provide times that can be
   # used for time-out tests and that whould work on most hosts as these
@@ -2258,6 +2728,9 @@ sub singletest {
     if($disttests !~ /test$testnum\W/ ) {
         logmsg "Warning: test$testnum not present in tests/data/Makefile.am\n";
     }
+    if($disabled{$testnum}) {
+        logmsg "Warning: test$testnum is explicitly disabled\n";
+    }
 
     # load the test case file definition
     if(loadtest("${TESTDIR}/test${testnum}")) {
@@ -2297,11 +2770,36 @@ sub singletest {
                 next;
             }
         }
-        elsif($f eq "netrc_debug") {
+        elsif($f eq "axTLS") {
+            if($has_axtls) {
+                next;
+            }
+        }
+        elsif($f eq "WinSSL") {
+            if($has_winssl) {
+                next;
+            }
+        }
+        elsif($f eq "DarwinSSL") {
+            if($has_darwinssl) {
+                next;
+            }
+        }
+        elsif($f eq "unittest") {
+            if($debug_build) {
+                next;
+            }
+        }
+        elsif($f eq "debug") {
             if($debug_build) {
                 next;
             }
         }
+        elsif($f eq "TrackMemory") {
+            if($has_memory_tracking) {
+                next;
+            }
+        }
         elsif($f eq "large_file") {
             if($large_file) {
                 next;
@@ -2327,6 +2825,11 @@ sub singletest {
                 next;
             }
         }
+        elsif($f eq "NTLM_WB") {
+            if($has_ntlm_wb) {
+                next;
+            }
+        }
         elsif($f eq "getrlimit") {
             if($has_getrlimit) {
                 next;
@@ -2337,11 +2840,21 @@ sub singletest {
                 next;
             }
         }
+        elsif($f eq "TLS-SRP") {
+            if($has_tls_srp) {
+                next;
+            }
+        }
+        elsif($f eq "Metalink") {
+            if($has_metalink) {
+                next;
+            }
+        }
         elsif($f eq "socks") {
             next;
         }
         # See if this "feature" is in the list of supported protocols
-        elsif (grep /^$f$/, @protocols) {
+        elsif (grep /^\Q$f\E$/i, @protocols) {
             next;
         }
 
@@ -2382,6 +2895,9 @@ sub singletest {
         delete $oldenv{$var};
     }
 
+    # remove test server commands file before servers are started/verified
+    unlink($FTPDCMD) if(-f $FTPDCMD);
+
     # timestamp required servers verification start
     $timesrvrini{$testnum} = Time::HiRes::time() if($timestats);
 
@@ -2406,10 +2922,15 @@ sub singletest {
                     delete $ENV{$var} if($ENV{$var});
                 }
                 else {
-                    if(($var =~ /^LD_PRELOAD/) &&
-                       ($debug_build || ($has_shared ne "yes"))) {
-                        # print "Skipping LD_PRELOAD due to no release shared build\n";
-                        next;
+                    if($var =~ /^LD_PRELOAD/) {
+                        if(exe_ext() && (exe_ext() eq '.exe')) {
+                            # print "Skipping LD_PRELOAD due to lack of OS support\n";
+                            next;
+                        }
+                        if($debug_build || ($has_shared ne "yes")) {
+                            # print "Skipping LD_PRELOAD due to no release shared build\n";
+                            next;
+                        }
                     }
                     $ENV{$var} = "$content";
                 }
@@ -2461,13 +2982,16 @@ sub singletest {
         $teststat[$testnum]=$why; # store reason for this test case
 
         if(!$short) {
-            printf "test %03d SKIPPED: $why\n", $testnum;
+            if($skipped{$why} <= 3) {
+                # show only the first three skips for each reason
+                logmsg sprintf("test %03d SKIPPED: $why\n", $testnum);
+            }
         }
 
         timestampskippedevents($testnum);
         return -1;
     }
-    logmsg sprintf("test %03d...", $testnum);
+    logmsg sprintf("test %03d...", $testnum) if(!$automakestyle);
 
     # extract the reply data
     my @reply = getpart("reply", "data");
@@ -2489,6 +3013,9 @@ sub singletest {
     # this is the valid protocol blurb curl should generate
     my @protocol= fixarray ( getpart("verify", "protocol") );
 
+    # this is the valid protocol blurb curl should generate to a proxy
+    my @proxyprot = fixarray ( getpart("verify", "proxy") );
+
     # redirected stdout/stderr to these files
     $STDOUT="$LOGDIR/stdout$testnum";
     $STDERR="$LOGDIR/stderr$testnum";
@@ -2506,12 +3033,9 @@ sub singletest {
 
     # name of the test
     my @testname= getpart("client", "name");
-
-    if(!$short) {
-        my $name = $testname[0];
-        $name =~ s/\n//g;
-        logmsg "[$name]\n";
-    }
+    my $testname = $testname[0];
+    $testname =~ s/\n//g;
+    logmsg "[$testname]\n" if(!$short);
 
     if($listonly) {
         timestampskippedevents($testnum);
@@ -2526,9 +3050,10 @@ sub singletest {
         chomp $tool;
     }
 
-    # remove server output logfiles
+    # remove server output logfile
     unlink($SERVERIN);
     unlink($SERVER2IN);
+    unlink($PROXYIN);
 
     if(@ftpservercmd) {
         # write the instructions to file
@@ -2545,7 +3070,11 @@ sub singletest {
         # substitute variables in the command line
         subVariables \$cmd;
     }
-    if($curl_debug) {
+    else {
+        # there was no command given, use something silly
+        $cmd="-";
+    }
+    if($has_memory_tracking) {
         unlink($memdump);
     }
 
@@ -2605,17 +3134,37 @@ sub singletest {
         $tool=$CMDLINE;
         $disablevalgrind=1;
     }
+    elsif($cmdtype eq "shell") {
+        # run the command line prepended with "/bin/sh"
+        $cmdargs ="$cmd";
+        $CMDLINE = "/bin/sh ";
+        $tool=$CMDLINE;
+        $disablevalgrind=1;
+    }
     elsif(!$tool) {
         # run curl, add --verbose for debug information output
-        $cmdargs ="$out --include --verbose --trace-time $cmd";
+        $cmd = "-1 ".$cmd if(exists $feature{"SSL"} && ($has_axtls));
+
+        my $inc="";
+        if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) {
+            $inc = "--include ";
+        }
+
+        $cmdargs ="$out $inc--trace-ascii log/trace$testnum --trace-time $cmd";
     }
     else {
         $cmdargs = " $cmd"; # $cmd is the command line for the test file
         $CURLOUT = $STDOUT; # sends received data to stdout
 
-        $CMDLINE="$LIBDIR/$tool";
+        if($tool =~ /^lib/) {
+            $CMDLINE="$LIBDIR/$tool";
+        }
+        elsif($tool =~ /^unit/) {
+            $CMDLINE="$UNITDIR/$tool";
+        }
+
         if(! -f $CMDLINE) {
-            print "The tool set in the test case for this: '$tool' does not exist\n";
+            logmsg "The tool set in the test case for this: '$tool' does not exist\n";
             timestampskippedevents($testnum);
             return -1;
         }
@@ -2626,6 +3175,13 @@ sub singletest {
 
     if(@stdintest) {
         my $stdinfile="$LOGDIR/stdin-for-$testnum";
+
+        my %hash = getpartattr("client", "stdin");
+        if($hash{'nonewline'}) {
+            # cut off the final newline from the final line of the stdin data
+            chomp($stdintest[$#stdintest]);
+        }
+
         writearray($stdinfile, \@stdintest);
 
         $cmdargs .= " <$stdinfile";
@@ -2643,6 +3199,7 @@ sub singletest {
             my $valgrindcmd = "$valgrind ";
             $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
             $valgrindcmd .= "--leak-check=yes ";
+            $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
             $valgrindcmd .= "--num-callers=16 ";
             $valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
             $CMDLINE = "$valgrindcmd $CMDLINE";
@@ -2692,10 +3249,11 @@ sub singletest {
     # run the command line we built
     if ($torture) {
         $cmdres = torture($CMDLINE,
-                       "libtool --mode=execute gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+                       "$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
     }
     elsif($gdbthis) {
-        runclient("libtool --mode=execute gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
+        my $GDBW = ($gdbxwin) ? "-w" : "";
+        runclient("$gdb --directory libtest $DBGCURL $GDBW -x $LOGDIR/gdbcmd");
         $cmdres=0; # makes it always continue after a debugged run
     }
     else {
@@ -2729,7 +3287,7 @@ sub singletest {
             open(GDBCMD, ">$LOGDIR/gdbcmd2");
             print GDBCMD "bt\n";
             close(GDBCMD);
-            runclient("libtool --mode=execute gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
+            runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
      #       unlink("$LOGDIR/gdbcmd2");
         }
     }
@@ -2755,6 +3313,10 @@ sub singletest {
     # Test harness ssh server does not have this synchronization mechanism,
     # this implies that some ssh server based tests might need a small delay
     # once that the client command has run to avoid false test failures.
+    #
+    # gnutls-serv also lacks this synchronization mechanism, so gnutls-serv
+    # based tests might need a small delay once that the client command has
+    # run to avoid false test failures.
 
     sleep($postcommanddelay) if($postcommanddelay);
 
@@ -2772,20 +3334,20 @@ sub singletest {
         my @killservers;
         foreach my $server (@killtestservers) {
             chomp $server;
-            if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
-                # given an ssl server, also kill non-ssl underlying one
+            if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|))$/) {
+                # given a stunnel ssl server, also kill non-ssl underlying one
                 push @killservers, "${1}${2}";
             }
-            elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
-                # given a non-ssl server, also kill ssl piggybacking one
+            elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|))$/) {
+                # given a non-ssl server, also kill stunnel piggybacking one
                 push @killservers, "${1}s${2}";
             }
-            elsif($server =~ /^(socks)(.*)$/) {
-                # given an socks server, also kill ssh underlying one
+            elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
+                # given a socks server, also kill ssh underlying one
                 push @killservers, "ssh${2}";
             }
-            elsif($server =~ /^(ssh)(.*)$/) {
-                # given an ssh server, also kill socks piggybacking one
+            elsif($server =~ /^(ssh)((\d*)(-ipv6|))$/) {
+                # given a ssh server, also kill socks piggybacking one
                 push @killservers, "socks${2}";
             }
             push @killservers, $server;
@@ -2828,7 +3390,7 @@ sub singletest {
     }
 
     # remove the test server commands file after each test
-    unlink($FTPDCMD);
+    unlink($FTPDCMD) if(-f $FTPDCMD);
 
     # run the postcheck command
     my @postcheck= getpart("client", "postcheck");
@@ -2876,6 +3438,7 @@ sub singletest {
     my $errorcode = $err[0] || "0";
     my $ok="";
     my $res;
+    chomp $errorcode;
     if (@validstdout) {
         # verify redirected stdout
         my @actual = loadarray($STDOUT);
@@ -2899,10 +3462,8 @@ sub singletest {
             chomp($validstdout[$#validstdout]);
         }
 
-        $res = compare("stdout", \@actual, \@validstdout);
+        $res = compare($testnum, $testname, "stdout", \@actual, \@validstdout);
         if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
             return 1;
         }
         $ok .= "s";
@@ -2923,10 +3484,8 @@ sub singletest {
             map s/\r\n/\n/g, @out;
         }
 
-        $res = compare("data", \@out, \@reply);
+        $res = compare($testnum, $testname, "data", \@out, \@reply);
         if ($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
             return 1;
         }
         $ok .= "d";
@@ -2938,10 +3497,8 @@ sub singletest {
     if(@upload) {
         # verify uploaded data
         my @out = loadarray("$LOGDIR/upload.$testnum");
-        $res = compare("upload", \@out, \@upload);
+        $res = compare($testnum, $testname, "upload", \@out, \@upload);
         if ($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
             return 1;
         }
         $ok .= "u";
@@ -2985,10 +3542,8 @@ sub singletest {
             }
         }
 
-        $res = compare("protocol", \@out, \@protstrip);
+        $res = compare($testnum, $testname, "protocol", \@out, \@protstrip);
         if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
             return 1;
         }
 
@@ -2999,53 +3554,102 @@ sub singletest {
         $ok .= "-"; # protocol not checked
     }
 
-    my @outfile=getpart("verify", "file");
-    if(@outfile) {
-        # we're supposed to verify a dynamically generated file!
-        my %hash = getpartattr("verify", "file");
+    if(@proxyprot) {
+        # Verify the sent proxy request
+        my @out = loadarray($PROXYIN);
 
-        my $filename=$hash{'name'};
-        if(!$filename) {
-            logmsg "ERROR: section verify=>file has no name attribute\n";
-            stopservers($verbose);
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return -1;
-        }
-        my @generated=loadarray($filename);
+        # what to cut off from the live protocol sent by curl, we use the
+        # same rules as for <protocol>
+        my @strip = getpart("verify", "strip");
 
-        # what parts to cut off from the file
-        my @stripfile = getpart("verify", "stripfile");
+        my @protstrip=@proxyprot;
 
-        my $filemode=$hash{'mode'};
-        if($filemode && ($filemode eq "text") && $has_textaware) {
-            # text mode when running on windows means adding an extra
-            # strip expression
-            push @stripfile, "s/\r\n/\n/";
+        # check if there's any attributes on the verify/protocol section
+        my %hash = getpartattr("verify", "proxy");
+
+        if($hash{'nonewline'}) {
+            # Yes, we must cut off the final newline from the final line
+            # of the protocol data
+            chomp($protstrip[$#protstrip]);
+        }
+
+        for(@strip) {
+            # strip off all lines that match the patterns from both arrays
+            chomp $_;
+            @out = striparray( $_, \@out);
+            @protstrip= striparray( $_, \@protstrip);
         }
 
+        # what parts to cut off from the protocol
+        my @strippart = getpart("verify", "strippart");
         my $strip;
-        for $strip (@stripfile) {
+        for $strip (@strippart) {
             chomp $strip;
-            for(@generated) {
+            for(@out) {
                 eval $strip;
             }
         }
 
-        @outfile = fixarray(@outfile);
-
-        $res = compare("output", \@generated, \@outfile);
+        $res = compare($testnum, $testname, "proxy", \@out, \@protstrip);
         if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
             return 1;
         }
 
-        $ok .= "o";
+        $ok .= "P";
+
     }
     else {
-        $ok .= "-"; # output not checked
+        $ok .= "-"; # protocol not checked
+    }
+
+    my $outputok;
+    for my $partsuffix (('', '1', '2', '3', '4')) {
+        my @outfile=getpart("verify", "file".$partsuffix);
+        if(@outfile || partexists("verify", "file".$partsuffix) ) {
+            # we're supposed to verify a dynamically generated file!
+            my %hash = getpartattr("verify", "file".$partsuffix);
+
+            my $filename=$hash{'name'};
+            if(!$filename) {
+                logmsg "ERROR: section verify=>file$partsuffix ".
+                       "has no name attribute\n";
+                stopservers($verbose);
+                # timestamp test result verification end
+                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
+                return -1;
+            }
+            my @generated=loadarray($filename);
+
+            # what parts to cut off from the file
+            my @stripfile = getpart("verify", "stripfile".$partsuffix);
+
+            my $filemode=$hash{'mode'};
+            if($filemode && ($filemode eq "text") && $has_textaware) {
+                # text mode when running on windows means adding an extra
+                # strip expression
+                push @stripfile, "s/\r\n/\n/";
+            }
+
+            my $strip;
+            for $strip (@stripfile) {
+                chomp $strip;
+                for(@generated) {
+                    eval $strip;
+                }
+            }
+
+            @outfile = fixarray(@outfile);
+
+            $res = compare($testnum, $testname, "output ($filename)",
+                           \@generated, \@outfile);
+            if($res) {
+                return 1;
+            }
+
+            $outputok = 1; # output checked
+        }
     }
+    $ok .= ($outputok) ? "o" : "-"; # output checked or not
 
     # accept multiple comma-separated error codes
     my @splerr = split(/ *, */, $errorcode);
@@ -3063,8 +3667,8 @@ sub singletest {
     }
     else {
         if(!$short) {
-            printf("\n%s returned $cmdres, %d was expected\n",
-                   (!$tool)?"curl":$tool, $errorcode);
+            logmsg sprintf("\n%s returned $cmdres, when expecting %s\n",
+                           (!$tool)?"curl":$tool, $errorcode);
         }
         logmsg " exit FAILED\n";
         # timestamp test result verification end
@@ -3072,9 +3676,9 @@ sub singletest {
         return 1;
     }
 
-    if($curl_debug) {
+    if($has_memory_tracking) {
         if(! -f $memdump) {
-            logmsg "\n** ALERT! memory debugging with no output file?\n"
+            logmsg "\n** ALERT! memory tracking with no output file?\n"
                 if(!$cmdtype eq "perl");
         }
         else {
@@ -3128,8 +3732,13 @@ sub singletest {
             }
             my @e = valgrindparse($srcdir, $feature{'SSL'}, "$LOGDIR/$vgfile");
             if(@e && $e[0]) {
-                logmsg " valgrind ERROR ";
-                logmsg @e;
+                if($automakestyle) {
+                    logmsg "FAIL: $testnum - $testname - valgrind\n";
+                }
+                else {
+                    logmsg " valgrind ERROR ";
+                    logmsg @e;
+                }
                 # timestamp test result verification end
                 $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
                 return 1;
@@ -3155,7 +3764,13 @@ sub singletest {
     my $left=sprintf("remaining: %02d:%02d",
                      $estleft/60,
                      $estleft%60);
-    printf "OK (%-3d out of %-3d, %s)\n", $count, $total, $left;
+
+    if(!$automakestyle) {
+        logmsg sprintf("OK (%-3d out of %-3d, %s)\n", $count, $total, $left);
+    }
+    else {
+        logmsg "PASS: $testnum - $testname\n";
+    }
 
     # the test succeeded, remove all log files
     if(!$keepoutfiles) {
@@ -3170,6 +3785,7 @@ sub singletest {
 
 #######################################################################
 # Stop all running test servers
+#
 sub stopservers {
     my $verbose = $_[0];
     #
@@ -3217,7 +3833,7 @@ sub stopservers {
 # startservers() starts all the named servers
 #
 # Returns: string with error reason or blank for success
-
+#
 sub startservers {
     my @what = @_;
     my ($pid, $pid2);
@@ -3227,7 +3843,7 @@ sub startservers {
         $what =~ s/[^a-z0-9-]//g;
 
         my $certfile;
-        if($what =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
+        if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|))$/) {
             $certfile = ($whatlist[1]) ? $whatlist[1] : 'stunnel.pem';
         }
 
@@ -3235,6 +3851,10 @@ sub startservers {
            ($what eq "ftp") ||
            ($what eq "imap") ||
            ($what eq "smtp")) {
+            if($torture && $run{$what} &&
+               !responsive_pingpong_server($what, "", $verbose)) {
+                stopserver($what);
+            }
             if(!$run{$what}) {
                 ($pid, $pid2) = runpingpongserver($what, "", $verbose);
                 if($pid <= 0) {
@@ -3245,6 +3865,10 @@ sub startservers {
             }
         }
         elsif($what eq "ftp2") {
+            if($torture && $run{'ftp2'} &&
+               !responsive_pingpong_server("ftp", "2", $verbose)) {
+                stopserver('ftp2');
+            }
             if(!$run{'ftp2'}) {
                 ($pid, $pid2) = runpingpongserver("ftp", "2", $verbose);
                 if($pid <= 0) {
@@ -3255,6 +3879,10 @@ sub startservers {
             }
         }
         elsif($what eq "ftp-ipv6") {
+            if($torture && $run{'ftp-ipv6'} &&
+               !responsive_pingpong_server("ftp", "", $verbose, "ipv6")) {
+                stopserver('ftp-ipv6');
+            }
             if(!$run{'ftp-ipv6'}) {
                 ($pid, $pid2) = runpingpongserver("ftp", "", $verbose, "ipv6");
                 if($pid <= 0) {
@@ -3266,17 +3894,27 @@ sub startservers {
             }
         }
         elsif($what eq "gopher") {
+            if($torture && $run{'gopher'} &&
+               !responsive_http_server("gopher", $verbose, 0, $GOPHERPORT)) {
+                stopserver('gopher');
+            }
             if(!$run{'gopher'}) {
                 ($pid, $pid2) = runhttpserver("gopher", $verbose, 0,
                                               $GOPHERPORT);
                 if($pid <= 0) {
                     return "failed starting GOPHER server";
                 }
-                printf ("* pid gopher => %d %d\n", $pid, $pid2) if($verbose);
+                logmsg sprintf ("* pid gopher => %d %d\n", $pid, $pid2)
+                    if($verbose);
                 $run{'gopher'}="$pid $pid2";
             }
         }
         elsif($what eq "gopher-ipv6") {
+            if($torture && $run{'gopher-ipv6'} &&
+               !responsive_http_server("gopher", $verbose, "ipv6",
+                                       $GOPHER6PORT)) {
+                stopserver('gopher-ipv6');
+            }
             if(!$run{'gopher-ipv6'}) {
                 ($pid, $pid2) = runhttpserver("gopher", $verbose, "ipv6",
                                               $GOPHER6PORT);
@@ -3289,19 +3927,45 @@ sub startservers {
             }
         }
         elsif($what eq "http") {
+            if($torture && $run{'http'} &&
+               !responsive_http_server("http", $verbose, 0, $HTTPPORT)) {
+                stopserver('http');
+            }
             if(!$run{'http'}) {
                 ($pid, $pid2) = runhttpserver("http", $verbose, 0,
                                               $HTTPPORT);
                 if($pid <= 0) {
                     return "failed starting HTTP server";
                 }
-                printf ("* pid http => %d %d\n", $pid, $pid2) if($verbose);
+                logmsg sprintf ("* pid http => %d %d\n", $pid, $pid2)
+                    if($verbose);
                 $run{'http'}="$pid $pid2";
             }
         }
+        elsif($what eq "http-proxy") {
+            if($torture && $run{'http-proxy'} &&
+               !responsive_http_server("http", $verbose, "proxy",
+                                       $HTTPPROXYPORT)) {
+                stopserver('http-proxy');
+            }
+            if(!$run{'http-proxy'}) {
+                ($pid, $pid2) = runhttpserver("http", $verbose, "proxy",
+                                              $HTTPPROXYPORT);
+                if($pid <= 0) {
+                    return "failed starting HTTP-proxy server";
+                }
+                logmsg sprintf ("* pid http-proxy => %d %d\n", $pid, $pid2)
+                    if($verbose);
+                $run{'http-proxy'}="$pid $pid2";
+            }
+        }
         elsif($what eq "http-ipv6") {
+            if($torture && $run{'http-ipv6'} &&
+               !responsive_http_server("http", $verbose, "IPv6", $HTTP6PORT)) {
+                stopserver('http-ipv6');
+            }
             if(!$run{'http-ipv6'}) {
-                ($pid, $pid2) = runhttpserver("http", $verbose, "IPv6",
+                ($pid, $pid2) = runhttpserver("http", $verbose, "ipv6",
                                               $HTTP6PORT);
                 if($pid <= 0) {
                     return "failed starting HTTP-IPv6 server";
@@ -3311,7 +3975,28 @@ sub startservers {
                 $run{'http-ipv6'}="$pid $pid2";
             }
         }
+        elsif($what eq "http-pipe") {
+            if($torture && $run{'http-pipe'} &&
+               !responsive_http_server("http", $verbose, "pipe",
+                                       $HTTPPIPEPORT)) {
+                stopserver('http-pipe');
+            }
+            if(!$run{'http-pipe'}) {
+                ($pid, $pid2) = runhttpserver("http", $verbose, "pipe",
+                                              $HTTPPIPEPORT);
+                if($pid <= 0) {
+                    return "failed starting HTTP-pipe server";
+                }
+                logmsg sprintf ("* pid http-pipe => %d %d\n", $pid, $pid2)
+                    if($verbose);
+                $run{'http-pipe'}="$pid $pid2";
+            }
+        }
         elsif($what eq "rtsp") {
+            if($torture && $run{'rtsp'} &&
+               !responsive_rtsp_server($verbose)) {
+                stopserver('rtsp');
+            }
             if(!$run{'rtsp'}) {
                 ($pid, $pid2) = runrtspserver($verbose);
                 if($pid <= 0) {
@@ -3322,6 +4007,10 @@ sub startservers {
             }
         }
         elsif($what eq "rtsp-ipv6") {
+            if($torture && $run{'rtsp-ipv6'} &&
+               !responsive_rtsp_server($verbose, "IPv6")) {
+                stopserver('rtsp-ipv6');
+            }
             if(!$run{'rtsp-ipv6'}) {
                 ($pid, $pid2) = runrtspserver($verbose, "IPv6");
                 if($pid <= 0) {
@@ -3332,7 +4021,6 @@ sub startservers {
                 $run{'rtsp-ipv6'}="$pid $pid2";
             }
         }
-
         elsif($what eq "ftps") {
             if(!$stunnel) {
                 # we can't run ftps tests without stunnel
@@ -3346,6 +4034,10 @@ sub startservers {
                 # stop server when running and using a different cert
                 stopserver('ftps');
             }
+            if($torture && $run{'ftp'} &&
+               !responsive_pingpong_server("ftp", "", $verbose)) {
+                stopserver('ftp');
+            }
             if(!$run{'ftp'}) {
                 ($pid, $pid2) = runpingpongserver("ftp", "", $verbose);
                 if($pid <= 0) {
@@ -3369,17 +4061,21 @@ sub startservers {
         }
         elsif($what eq "https") {
             if(!$stunnel) {
-                # we can't run ftps tests without stunnel
+                # we can't run https tests without stunnel
                 return "no stunnel";
             }
             if(!$ssl_version) {
-                # we can't run ftps tests if libcurl is SSL-less
+                # we can't run https tests if libcurl is SSL-less
                 return "curl lacks SSL support";
             }
             if($runcert{'https'} && ($runcert{'https'} ne $certfile)) {
                 # stop server when running and using a different cert
                 stopserver('https');
             }
+            if($torture && $run{'http'} &&
+               !responsive_http_server("http", $verbose, 0, $HTTPPORT)) {
+                stopserver('http');
+            }
             if(!$run{'http'}) {
                 ($pid, $pid2) = runhttpserver("http", $verbose, 0,
                                               $HTTPPORT);
@@ -3399,7 +4095,49 @@ sub startservers {
                 $run{'https'}="$pid $pid2";
             }
         }
+        elsif($what eq "httptls") {
+            if(!$httptlssrv) {
+                # for now, we can't run http TLS-EXT tests without gnutls-serv
+                return "no gnutls-serv";
+            }
+            if($torture && $run{'httptls'} &&
+               !responsive_httptls_server($verbose, "IPv4")) {
+                stopserver('httptls');
+            }
+            if(!$run{'httptls'}) {
+                ($pid, $pid2) = runhttptlsserver($verbose, "IPv4");
+                if($pid <= 0) {
+                    return "failed starting HTTPTLS server (gnutls-serv)";
+                }
+                logmsg sprintf("* pid httptls => %d %d\n", $pid, $pid2)
+                    if($verbose);
+                $run{'httptls'}="$pid $pid2";
+            }
+        }
+        elsif($what eq "httptls-ipv6") {
+            if(!$httptlssrv) {
+                # for now, we can't run http TLS-EXT tests without gnutls-serv
+                return "no gnutls-serv";
+            }
+            if($torture && $run{'httptls-ipv6'} &&
+               !responsive_httptls_server($verbose, "IPv6")) {
+                stopserver('httptls-ipv6');
+            }
+            if(!$run{'httptls-ipv6'}) {
+                ($pid, $pid2) = runhttptlsserver($verbose, "IPv6");
+                if($pid <= 0) {
+                    return "failed starting HTTPTLS-IPv6 server (gnutls-serv)";
+                }
+                logmsg sprintf("* pid httptls-ipv6 => %d %d\n", $pid, $pid2)
+                    if($verbose);
+                $run{'httptls-ipv6'}="$pid $pid2";
+            }
+        }
         elsif($what eq "tftp") {
+            if($torture && $run{'tftp'} &&
+               !responsive_tftp_server("", $verbose)) {
+                stopserver('tftp');
+            }
             if(!$run{'tftp'}) {
                 ($pid, $pid2) = runtftpserver("", $verbose);
                 if($pid <= 0) {
@@ -3410,6 +4148,10 @@ sub startservers {
             }
         }
         elsif($what eq "tftp-ipv6") {
+            if($torture && $run{'tftp-ipv6'} &&
+               !responsive_tftp_server("", $verbose, "IPv6")) {
+                stopserver('tftp-ipv6');
+            }
             if(!$run{'tftp-ipv6'}) {
                 ($pid, $pid2) = runtftpserver("", $verbose, "IPv6");
                 if($pid <= 0) {
@@ -3474,7 +4216,6 @@ sub startservers {
 #
 # Returns: a string, blank if everything is fine or a reason why it failed
 #
-
 sub serverfortest {
     my ($testnum)=@_;
 
@@ -3485,14 +4226,28 @@ sub serverfortest {
         return "no server specified";
     }
 
-    for (@what) {
-        my $proto = lc($_);
-        chomp $proto;
-        $proto =~ s/\s.*//g;  # take first word
-        if (! grep /^$proto$/, @protocols) {
-            if (substr($proto,0,5) ne "socks") {
-                return "curl lacks $proto support";
+    for(my $i = scalar(@what) - 1; $i >= 0; $i--) {
+        my $srvrline = $what[$i];
+        chomp $srvrline if($srvrline);
+        if($srvrline =~ /^(\S+)((\s*)(.*))/) {
+            my $server = "${1}";
+            my $lnrest = "${2}";
+            my $tlsext;
+            if($server =~ /^(httptls)(\+)(ext|srp)(\d*)(-ipv6|)$/) {
+                $server = "${1}${4}${5}";
+                $tlsext = uc("TLS-${3}");
+            }
+            if(! grep /^\Q$server\E$/, @protocols) {
+                if(substr($server,0,5) ne "socks") {
+                    if($tlsext) {
+                        return "curl lacks $tlsext support";
+                    }
+                    else {
+                        return "curl lacks $server server support";
+                    }
+                }
             }
+            $what[$i] = "$server$lnrest" if($tlsext);
         }
     }
 
@@ -3642,7 +4397,6 @@ sub runtimestats {
 my $number=0;
 my $fromnum=-1;
 my @testthis;
-my %disabled;
 while(@ARGV) {
     if ($ARGV[0] eq "-v") {
         # verbose output
@@ -3663,20 +4417,24 @@ while(@ARGV) {
         # have the servers display protocol output
         $debugprotocol=1;
     }
-    elsif ($ARGV[0] eq "-f") {
-        # run fork-servers, which makes the server fork for all new
-        # connections This is NOT what you wanna do without knowing exactly
-        # why and for what
-        $forkserver=1;
-    }
     elsif ($ARGV[0] eq "-g") {
         # run this test with gdb
         $gdbthis=1;
     }
+    elsif ($ARGV[0] eq "-gw") {
+        # run this test with windowed gdb
+        $gdbthis=1;
+        $gdbxwin=1;
+    }
     elsif($ARGV[0] eq "-s") {
         # short output
         $short=1;
     }
+    elsif($ARGV[0] eq "-am") {
+        # automake-style output
+        $short=1;
+        $automakestyle=1;
+    }
     elsif($ARGV[0] eq "-n") {
         # no valgrind
         undef $valgrind;
@@ -3744,6 +4502,7 @@ Usage: runtests.pl [options] [test selection(s)]
   -c path  use this curl executable
   -d       display server debug info
   -g       run the test case with gdb
+  -gw      run the test case with gdb as a windowed application
   -h       this help text
   -k       keep stdout and stderr files present after tests
   -l       list all test case names/descriptions
@@ -3752,6 +4511,7 @@ Usage: runtests.pl [options] [test selection(s)]
   -r       run time statistics
   -rf      full run time statistics
   -s       short output
+  -am      automake style output PASS/FAIL: [number] [name]
   -t[N]    torture (simulate memory alloc failures); N means fail Nth alloc
   -v       verbose output
   [num]    like "5 6 9" or " 5 to 22 " to run those tests only
@@ -3850,28 +4610,31 @@ if ($gdbthis) {
     }
 }
 
-$HTTPPORT =  $base++; # HTTP server port
-$HTTPSPORT = $base++; # HTTPS server port
-$FTPPORT =   $base++; # FTP server port
-$FTPSPORT =  $base++; # FTPS server port
-$HTTP6PORT = $base++; # HTTP IPv6 server port (different IP protocol
-                        # but we follow the same port scheme anyway)
-$FTP2PORT =  $base++; # FTP server 2 port
-$FTP6PORT =  $base++; # FTP IPv6 port
-$TFTPPORT =  $base++; # TFTP (UDP) port
-$TFTP6PORT = $base++; # TFTP IPv6 (UDP) port
-$SSHPORT =   $base++; # SSH (SCP/SFTP) port
-$SOCKSPORT = $base++; # SOCKS port
-$POP3PORT =  $base++;
-$POP36PORT = $base++;
-$IMAPPORT =  $base++;
-$IMAP6PORT = $base++;
-$SMTPPORT =  $base++;
-$SMTP6PORT = $base++;
-$RTSPPORT =  $base++;
-$RTSP6PORT = $base++;
-$GOPHERPORT =$base++;
-$GOPHER6PORT=$base++;
+$HTTPPORT        = $base++; # HTTP server port
+$HTTPSPORT       = $base++; # HTTPS (stunnel) server port
+$FTPPORT         = $base++; # FTP server port
+$FTPSPORT        = $base++; # FTPS (stunnel) server port
+$HTTP6PORT       = $base++; # HTTP IPv6 server port
+$FTP2PORT        = $base++; # FTP server 2 port
+$FTP6PORT        = $base++; # FTP IPv6 port
+$TFTPPORT        = $base++; # TFTP (UDP) port
+$TFTP6PORT       = $base++; # TFTP IPv6 (UDP) port
+$SSHPORT         = $base++; # SSH (SCP/SFTP) port
+$SOCKSPORT       = $base++; # SOCKS port
+$POP3PORT        = $base++; # POP3 server port
+$POP36PORT       = $base++; # POP3 IPv6 server port
+$IMAPPORT        = $base++; # IMAP server port
+$IMAP6PORT       = $base++; # IMAP IPv6 server port
+$SMTPPORT        = $base++; # SMTP server port
+$SMTP6PORT       = $base++; # SMTP IPv6 server port
+$RTSPPORT        = $base++; # RTSP server port
+$RTSP6PORT       = $base++; # RTSP IPv6 server port
+$GOPHERPORT      = $base++; # Gopher IPv4 server port
+$GOPHER6PORT     = $base++; # Gopher IPv6 server port
+$HTTPTLSPORT     = $base++; # HTTP TLS (non-stunnel) server port
+$HTTPTLS6PORT    = $base++; # HTTP TLS (non-stunnel) IPv6 server port
+$HTTPPROXYPORT   = $base++; # HTTP proxy port, when using CONNECT
+$HTTPPIPEPORT    = $base++; # HTTP pipelining port
 
 #######################################################################
 # clear and create logging directory:
@@ -3896,6 +4659,22 @@ if(!$listonly) {
 }
 
 #######################################################################
+# Fetch all disabled tests
+#
+
+open(D, "<$TESTDIR/DISABLED");
+while(<D>) {
+    if(/^ *\#/) {
+        # allow comments
+        next;
+    }
+    if($_ =~ /(\d+)/) {
+        $disabled{$1}=$1; # disable this test number
+    }
+}
+close(D);
+
+#######################################################################
 # If 'all' tests are requested, find out all test numbers
 #
 
@@ -3905,18 +4684,6 @@ if ( $TESTCASES eq "all") {
     my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
     closedir(DIR);
 
-    open(D, "<$TESTDIR/DISABLED");
-    while(<D>) {
-        if(/^ *\#/) {
-            # allow comments
-            next;
-        }
-        if($_ =~ /(\d+)/) {
-            $disabled{$1}=$1; # disable this test number
-        }
-    }
-    close(D);
-
     $TESTCASES=""; # start with no test cases
 
     # cut off everything but the digits
@@ -4024,6 +4791,12 @@ sub displaylogs {
         if(($log =~ /^file\d+\.txt/) && ($log !~ /^file$testnum\.txt/)) {
             next; # skip fileNnn.txt of other tests
         }
+        if(($log =~ /^netrc\d+/) && ($log !~ /^netrc$testnum/)) {
+            next; # skip netrcNnn of other tests
+        }
+        if(($log =~ /^trace\d+/) && ($log !~ /^trace$testnum/)) {
+            next; # skip traceNnn of other tests
+        }
         if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum(\..*|)$/)) {
             next; # skip valgrindNnn of other tests
         }
@@ -4110,7 +4883,7 @@ if($all) {
         sprintf("%.0f", $sofar) ." seconds.\n";
 }
 
-if($skipped) {
+if($skipped && !$short) {
     my $s=0;
     logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
 
@@ -4121,14 +4894,20 @@ if($skipped) {
         # now show all test case numbers that had this reason for being
         # skipped
         my $c=0;
+        my $max = 9;
         for(0 .. scalar @teststat) {
             my $t = $_;
             if($teststat[$_] && ($teststat[$_] eq $r)) {
-                logmsg ", " if($c);
-                logmsg $_;
+                if($c < $max) {
+                    logmsg ", " if($c);
+                    logmsg $_;
+                }
                 $c++;
             }
         }
+        if($c > $max) {
+            logmsg " and ".($c-$max)." more";
+        }
         logmsg ")\n";
     }
 }
diff --git a/tests/runtests.pl.orig b/tests/runtests.pl.orig
deleted file mode 100755 (executable)
index 2eb65fd..0000000
+++ /dev/null
@@ -1,4138 +0,0 @@
-#!/usr/bin/env perl
-#***************************************************************************
-#                                  _   _ ____  _
-#  Project                     ___| | | |  _ \| |
-#                             / __| | | | |_) | |
-#                            | (__| |_| |  _ <| |___
-#                             \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2010, 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.
-#
-###########################################################################
-
-# Experimental hooks are available to run tests remotely on machines that
-# are able to run curl but are unable to run the test harness.
-# The following sections need to be modified:
-#
-#  $HOSTIP, $HOST6IP - Set to the address of the host running the test suite
-#  $CLIENTIP, $CLIENT6IP - Set to the address of the host running curl
-#  runclient, runclientoutput - Modify to copy all the files in the log/
-#    directory to the system running curl, run the given command remotely
-#    and save the return code or returned stdout (respectively), then
-#    copy all the files from the remote system's log/ directory back to
-#    the host running the test suite.  This can be done a few ways, such
-#    as using scp & ssh, rsync & telnet, or using a NFS shared directory
-#    and ssh.
-#
-# 'make && make test' needs to be done on both machines before making the
-# above changes and running runtests.pl manually.  In the shared NFS case,
-# the contents of the tests/server/ directory must be from the host
-# running the test suite, while the rest must be from the host running curl.
-#
-# Note that even with these changes a number of tests will still fail (mainly
-# to do with cookies, those that set environment variables, or those that
-# do more than touch the file system in a <precheck> or <postcheck>
-# section). These can be added to the $TESTCASES line below,
-# e.g. $TESTCASES="!8 !31 !63 !cookies..."
-#
-# Finally, to properly support -g and -n, checktestcmd needs to change
-# to check the remote system's PATH, and the places in the code where
-# the curl binary is read directly to determine its type also need to be
-# fixed. As long as the -g option is never given, and the -n is always
-# given, this won't be a problem.
-
-
-# These should be the only variables that might be needed to get edited:
-
-BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, ".");
-    # run time statistics needs Time::HiRes
-    eval {
-        no warnings "all";
-        require Time::HiRes;
-        import  Time::HiRes qw( time );
-    }
-}
-
-use strict;
-use warnings;
-use Cwd;
-
-# Subs imported from serverhelp module
-use serverhelp qw(
-    serverfactors
-    servername_id
-    servername_str
-    servername_canon
-    server_pidfilename
-    server_logfilename
-    );
-
-# Variables and subs imported from sshhelp module
-use sshhelp qw(
-    $sshdexe
-    $sshexe
-    $sftpexe
-    $sshconfig
-    $sftpconfig
-    $sshdlog
-    $sshlog
-    $sftplog
-    $sftpcmds
-    display_sshdconfig
-    display_sshconfig
-    display_sftpconfig
-    display_sshdlog
-    display_sshlog
-    display_sftplog
-    exe_ext
-    find_sshd
-    find_ssh
-    find_sftp
-    sshversioninfo
-    );
-
-require "getpart.pm"; # array functions
-require "valgrind.pm"; # valgrind report parser
-require "ftp.pm";
-
-my $HOSTIP="127.0.0.1";   # address on which the test server listens
-my $HOST6IP="[::1]";      # address on which the test server listens
-my $CLIENTIP="127.0.0.1"; # address which curl uses for incoming connections
-my $CLIENT6IP="[::1]";    # address which curl uses for incoming connections
-
-my $base = 8990; # base port number
-
-my $HTTPPORT; # HTTP server port
-my $HTTP6PORT; # HTTP IPv6 server port
-my $HTTPSPORT; # HTTPS server port
-my $FTPPORT; # FTP server port
-my $FTP2PORT; # FTP server 2 port
-my $FTPSPORT; # FTPS server port
-my $FTP6PORT; # FTP IPv6 server port
-my $TFTPPORT; # TFTP
-my $TFTP6PORT; # TFTP
-my $SSHPORT; # SCP/SFTP
-my $SOCKSPORT; # SOCKS4/5 port
-my $POP3PORT; # POP3
-my $POP36PORT; # POP3 IPv6 server port
-my $IMAPPORT; # IMAP
-my $IMAP6PORT; # IMAP IPv6 server port
-my $SMTPPORT; # SMTP
-my $SMTP6PORT; # SMTP IPv6 server port
-my $RTSPPORT; # RTSP
-my $RTSP6PORT; # RTSP IPv6 server port
-my $GOPHERPORT; # Gopher
-my $GOPHER6PORT; # Gopher IPv6 server port
-
-my $srcdir = $ENV{'srcdir'} || '.';
-my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests
-my $VCURL=$CURL;   # what curl binary to use to verify the servers with
-                   # VCURL is handy to set to the system one when the one you
-                   # just built hangs or crashes and thus prevent verification
-my $DBGCURL=$CURL; #"../src/.libs/curl";  # alternative for debugging
-my $LOGDIR="log";
-my $TESTDIR="$srcdir/data";
-my $LIBDIR="./libtest";
-my $SERVERIN="$LOGDIR/server.input"; # what curl sent the server
-my $SERVER2IN="$LOGDIR/server2.input"; # what curl sent the second server
-my $CURLLOG="$LOGDIR/curl.log"; # all command lines run
-my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here
-my $SERVERLOGS_LOCK="$LOGDIR/serverlogs.lock"; # server logs advisor read lock
-my $CURLCONFIG="../curl-config"; # curl-config from current build
-
-# Normally, all test cases should be run, but at times it is handy to
-# simply run a particular one:
-my $TESTCASES="all";
-
-# To run specific test cases, set them like:
-# $TESTCASES="1 2 3 7 8";
-
-#######################################################################
-# No variables below this point should need to be modified
-#
-
-# invoke perl like this:
-my $perl="perl -I$srcdir";
-my $server_response_maxtime=13;
-
-my $debug_build=0; # curl built with --enable-debug
-my $curl_debug=0;  # curl built with --enable-curldebug (memory tracking)
-my $libtool;
-
-# name of the file that the memory debugging creates:
-my $memdump="$LOGDIR/memdump";
-
-# the path to the script that analyzes the memory debug output file:
-my $memanalyze="$perl $srcdir/memanalyze.pl";
-
-my $pwd = getcwd();          # current working directory
-
-my $start;
-my $forkserver=0;
-my $ftpchecktime=1; # time it took to verify our test FTP server
-
-my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel");
-my $valgrind = checktestcmd("valgrind");
-my $valgrind_logfile="--logfile";
-my $valgrind_tool;
-my $gdb = checktestcmd("gdb");
-
-my $ssl_version; # set if libcurl is built with SSL support
-my $large_file;  # set if libcurl is built with large file support
-my $has_idn;     # set if libcurl is built with IDN support
-my $http_ipv6;   # set if HTTP server has IPv6 support
-my $ftp_ipv6;    # set if FTP server has IPv6 support
-my $tftp_ipv6;   # set if TFTP server has IPv6 support
-my $gopher_ipv6; # set if Gopher server has IPv6 support
-my $has_ipv6;    # set if libcurl is built with IPv6 support
-my $has_libz;    # set if libcurl is built with libz support
-my $has_getrlimit;  # set if system has getrlimit()
-my $has_ntlm;    # set if libcurl is built with NTLM support
-my $has_charconv;# set if libcurl is built with CharConv support
-
-my $has_openssl; # built with a lib using an OpenSSL-like API
-my $has_gnutls;  # built with GnuTLS
-my $has_nss;     # built with NSS
-my $has_yassl;   # built with yassl
-my $has_polarssl;# built with polarssl
-
-my $has_shared;  # built shared
-
-my $ssllib;      # name of the lib we use (for human presentation)
-my $has_crypto;  # set if libcurl is built with cryptographic support
-my $has_textaware; # set if running on a system that has a text mode concept
-  # on files. Windows for example
-my @protocols;   # array of supported protocols
-
-my $skipped=0;  # number of tests skipped; reported in main loop
-my %skipped;    # skipped{reason}=counter, reasons for skip
-my @teststat;   # teststat[testnum]=reason, reasons for skip
-my %disabled_keywords;  # key words of tests to skip
-my %enabled_keywords;   # key words of tests to run
-
-my $sshdid;      # for socks server, ssh daemon version id
-my $sshdvernum;  # for socks server, ssh daemon version number
-my $sshdverstr;  # for socks server, ssh daemon version string
-my $sshderror;   # for socks server, ssh daemon version error
-
-my $defserverlogslocktimeout = 20; # timeout to await server logs lock removal
-my $defpostcommanddelay = 0; # delay between command and postcheck sections
-
-my $timestats;   # time stamping and stats generation
-my $fullstats;   # show time stats for every single test
-my %timeprepini; # timestamp for each test preparation start
-my %timesrvrini; # timestamp for each test required servers verification start
-my %timesrvrend; # timestamp for each test required servers verification end
-my %timetoolini; # timestamp for each test command run starting
-my %timetoolend; # timestamp for each test command run stopping
-my %timesrvrlog; # timestamp for each test server logs lock removal
-my %timevrfyend; # timestamp for each test result verification end
-
-my $testnumcheck; # test number, set in singletest sub.
-my %oldenv;
-
-#######################################################################
-# variables the command line options may set
-#
-
-my $short;
-my $verbose;
-my $debugprotocol;
-my $anyway;
-my $gdbthis;      # run test case with gdb debugger
-my $keepoutfiles; # keep stdout and stderr files after tests
-my $listonly;     # only list the tests
-my $postmortem;   # display detailed info about failed tests
-
-my %run;          # running server
-my %doesntrun;    # servers that don't work, identified by pidfile
-my %serverpidfile;# all server pid file names, identified by server id
-my %runcert;      # cert file currently in use by an ssl running server
-
-# torture test variables
-my $torture;
-my $tortnum;
-my $tortalloc;
-
-#######################################################################
-# logmsg is our general message logging subroutine.
-#
-sub logmsg {
-    for(@_) {
-        print "$_";
-    }
-}
-
-# get the name of the current user
-my $USER = $ENV{USER};          # Linux
-if (!$USER) {
-    $USER = $ENV{USERNAME};     # Windows
-    if (!$USER) {
-        $USER = $ENV{LOGNAME};  # Some UNIX (I think)
-    }
-}
-
-# enable memory debugging if curl is compiled with it
-$ENV{'CURL_MEMDEBUG'} = $memdump;
-$ENV{'HOME'}=$pwd;
-
-sub catch_zap {
-    my $signame = shift;
-    logmsg "runtests.pl received SIG$signame, exiting\n";
-    stopservers($verbose);
-    die "Somebody sent me a SIG$signame";
-}
-$SIG{INT} = \&catch_zap;
-$SIG{TERM} = \&catch_zap;
-
-##########################################################################
-# Clear all possible '*_proxy' environment variables for various protocols
-# to prevent them to interfere with our testing!
-
-my $protocol;
-foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no')) {
-    my $proxy = "${protocol}_proxy";
-    # clear lowercase version
-    delete $ENV{$proxy} if($ENV{$proxy});
-    # clear uppercase version
-    delete $ENV{uc($proxy)} if($ENV{uc($proxy)});
-}
-
-# make sure we don't get affected by other variables that control our
-# behaviour
-
-delete $ENV{'SSL_CERT_DIR'} if($ENV{'SSL_CERT_DIR'});
-delete $ENV{'SSL_CERT_PATH'} if($ENV{'SSL_CERT_PATH'});
-delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'});
-
-#######################################################################
-# Load serverpidfile hash with pidfile names for all possible servers.
-#
-sub init_serverpidfile_hash {
-  for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp')) {
-    for my $ssl (('', 's')) {
-      for my $ipvnum ((4, 6)) {
-        for my $idnum ((1, 2)) {
-          my $serv = servername_id("$proto$ssl", $ipvnum, $idnum);
-          my $pidf = server_pidfilename("$proto$ssl", $ipvnum, $idnum);
-          $serverpidfile{$serv} = $pidf;
-        }
-      }
-    }
-  }
-  for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher')) {
-    for my $ipvnum ((4, 6)) {
-      for my $idnum ((1, 2)) {
-        my $serv = servername_id($proto, $ipvnum, $idnum);
-        my $pidf = server_pidfilename($proto, $ipvnum, $idnum);
-        $serverpidfile{$serv} = $pidf;
-      }
-    }
-  }
-}
-
-#######################################################################
-# Check if a given child process has just died. Reaps it if so.
-#
-sub checkdied {
-    use POSIX ":sys_wait_h";
-    my $pid = $_[0];
-    if(not defined $pid || $pid <= 0) {
-        return 0;
-    }
-    my $rc = waitpid($pid, &WNOHANG);
-    return ($rc == $pid)?1:0;
-}
-
-#######################################################################
-# Start a new thread/process and run the given command line in there.
-# Return the pids (yes plural) of the new child process to the parent.
-#
-sub startnew {
-    my ($cmd, $pidfile, $timeout, $fake)=@_;
-
-    logmsg "startnew: $cmd\n" if ($verbose);
-
-    my $child = fork();
-    my $pid2 = 0;
-
-    if(not defined $child) {
-        logmsg "startnew: fork() failure detected\n";
-        return (-1,-1);
-    }
-
-    if(0 == $child) {
-        # Here we are the child. Run the given command.
-
-        # Put an "exec" in front of the command so that the child process
-        # keeps this child's process ID.
-        exec("exec $cmd") || die "Can't exec() $cmd: $!";
-
-        # exec() should never return back here to this process. We protect
-        # ourselves by calling die() just in case something goes really bad.
-        die "error: exec() has returned";
-    }
-
-    # Ugly hack but ssh client doesn't support pid files
-    if ($fake) {
-        if(open(OUT, ">$pidfile")) {
-            print OUT $child . "\n";
-            close(OUT);
-            logmsg "startnew: $pidfile faked with pid=$child\n" if($verbose);
-        }
-        else {
-            logmsg "startnew: failed to write fake $pidfile with pid=$child\n";
-        }
-        # could/should do a while connect fails sleep a bit and loop
-        sleep $timeout;
-        if (checkdied($child)) {
-            logmsg "startnew: child process has failed to start\n" if($verbose);
-            return (-1,-1);
-        }
-    }
-
-    my $count = $timeout;
-    while($count--) {
-        if(-f $pidfile && -s $pidfile && open(PID, "<$pidfile")) {
-            $pid2 = 0 + <PID>;
-            close(PID);
-            if(($pid2 > 0) && kill(0, $pid2)) {
-                # if $pid2 is valid, then make sure this pid is alive, as
-                # otherwise it is just likely to be the _previous_ pidfile or
-                # similar!
-                last;
-            }
-            # invalidate $pid2 if not actually alive
-            $pid2 = 0;
-        }
-        if (checkdied($child)) {
-            logmsg "startnew: child process has died, server might start up\n"
-                if($verbose);
-            # We can't just abort waiting for the server with a
-            # return (-1,-1);
-            # because the server might have forked and could still start
-            # up normally. Instead, just reduce the amount of time we remain
-            # waiting.
-            $count >>= 2;
-        }
-        sleep(1);
-    }
-
-    # Return two PIDs, the one for the child process we spawned and the one
-    # reported by the server itself (in case it forked again on its own).
-    # Both (potentially) need to be killed at the end of the test.
-    return ($child, $pid2);
-}
-
-
-#######################################################################
-# Check for a command in the PATH of the test server.
-#
-sub checkcmd {
-    my ($cmd)=@_;
-    my @paths=(split(":", $ENV{'PATH'}), "/usr/sbin", "/usr/local/sbin",
-               "/sbin", "/usr/bin", "/usr/local/bin",
-               "./libtest/.libs", "./libtest");
-    for(@paths) {
-        if( -x "$_/$cmd" && ! -d "$_/$cmd") {
-            # executable bit but not a directory!
-            return "$_/$cmd";
-        }
-    }
-}
-
-#######################################################################
-# Get the list of tests that the tests/data/Makefile.am knows about!
-#
-my $disttests;
-sub get_disttests {
-    my @dist = `cd data && make show`;
-    $disttests = join("", @dist);
-}
-
-#######################################################################
-# Check for a command in the PATH of the machine running curl.
-#
-sub checktestcmd {
-    my ($cmd)=@_;
-    return checkcmd($cmd);
-}
-
-#######################################################################
-# Run the application under test and return its return code
-#
-sub runclient {
-    my ($cmd)=@_;
-    return system($cmd);
-
-# This is one way to test curl on a remote machine
-#    my $out = system("ssh $CLIENTIP cd \'$pwd\' \\; \'$cmd\'");
-#    sleep 2;    # time to allow the NFS server to be updated
-#    return $out;
-}
-
-#######################################################################
-# Run the application under test and return its stdout
-#
-sub runclientoutput {
-    my ($cmd)=@_;
-    return `$cmd`;
-
-# This is one way to test curl on a remote machine
-#    my @out = `ssh $CLIENTIP cd \'$pwd\' \\; \'$cmd\'`;
-#    sleep 2;    # time to allow the NFS server to be updated
-#    return @out;
- }
-
-#######################################################################
-# Memory allocation test and failure torture testing.
-#
-sub torture {
-    my $testcmd = shift;
-    my $gdbline = shift;
-
-    # remove memdump first to be sure we get a new nice and clean one
-    unlink($memdump);
-
-    # First get URL from test server, ignore the output/result
-    runclient($testcmd);
-
-    logmsg " CMD: $testcmd\n" if($verbose);
-
-    # memanalyze -v is our friend, get the number of allocations made
-    my $count=0;
-    my @out = `$memanalyze -v $memdump`;
-    for(@out) {
-        if(/^Allocations: (\d+)/) {
-            $count = $1;
-            last;
-        }
-    }
-    if(!$count) {
-        logmsg " found no allocs to make fail\n";
-        return 0;
-    }
-
-    logmsg " $count allocations to make fail\n";
-
-    for ( 1 .. $count ) {
-        my $limit = $_;
-        my $fail;
-        my $dumped_core;
-
-        if($tortalloc && ($tortalloc != $limit)) {
-            next;
-        }
-
-        if($verbose) {
-            my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
-                localtime(time());
-            my $now = sprintf("%02d:%02d:%02d ", $hour, $min, $sec);
-            logmsg "Fail alloc no: $limit at $now\r";
-        }
-
-        # make the memory allocation function number $limit return failure
-        $ENV{'CURL_MEMLIMIT'} = $limit;
-
-        # remove memdump first to be sure we get a new nice and clean one
-        unlink($memdump);
-
-        logmsg "*** Alloc number $limit is now set to fail ***\n" if($gdbthis);
-
-        my $ret = 0;
-        if($gdbthis) {
-            runclient($gdbline)
-        }
-        else {
-            $ret = runclient($testcmd);
-        }
-        #logmsg "$_ Returned " . $ret >> 8 . "\n";
-
-        # Now clear the variable again
-        delete $ENV{'CURL_MEMLIMIT'} if($ENV{'CURL_MEMLIMIT'});
-
-        if(-r "core") {
-            # there's core file present now!
-            logmsg " core dumped\n";
-            $dumped_core = 1;
-            $fail = 2;
-        }
-
-        # verify that it returns a proper error code, doesn't leak memory
-        # and doesn't core dump
-        if($ret & 255) {
-            logmsg " system() returned $ret\n";
-            $fail=1;
-        }
-        else {
-            my @memdata=`$memanalyze $memdump`;
-            my $leak=0;
-            for(@memdata) {
-                if($_ ne "") {
-                    # well it could be other memory problems as well, but
-                    # we call it leak for short here
-                    $leak=1;
-                }
-            }
-            if($leak) {
-                logmsg "** MEMORY FAILURE\n";
-                logmsg @memdata;
-                logmsg `$memanalyze -l $memdump`;
-                $fail = 1;
-            }
-        }
-        if($fail) {
-            logmsg " Failed on alloc number $limit in test.\n",
-            " invoke with \"-t$limit\" to repeat this single case.\n";
-            stopservers($verbose);
-            return 1;
-        }
-    }
-
-    logmsg "torture OK\n";
-    return 0;
-}
-
-#######################################################################
-# Stop a test server along with pids which aren't in the %run hash yet.
-# This also stops all servers which are relative to the given one.
-#
-sub stopserver {
-    my ($server, $pidlist) = @_;
-    #
-    # kill sockfilter processes for pingpong relative server
-    #
-    if($server =~ /^(ftp|imap|pop3|smtp)s?(\d*)(-ipv6|)$/) {
-        my $proto  = $1;
-        my $idnum  = ($2 && ($2 > 1)) ? $2 : 1;
-        my $ipvnum = ($3 && ($3 =~ /6$/)) ? 6 : 4;
-        killsockfilters($proto, $ipvnum, $idnum, $verbose);
-    }
-    #
-    # All servers relative to the given one must be stopped also
-    #
-    my @killservers;
-    if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
-        # given an ssl server, also kill non-ssl underlying one
-        push @killservers, "${1}${2}";
-    }
-    elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
-        # given a non-ssl server, also kill ssl piggybacking one
-        push @killservers, "${1}s${2}";
-    }
-    elsif($server =~ /^(socks)(.*)$/) {
-        # given an socks server, also kill ssh underlying one
-        push @killservers, "ssh${2}";
-    }
-    elsif($server =~ /^(ssh)(.*)$/) {
-        # given an ssh server, also kill socks piggybacking one
-        push @killservers, "socks${2}";
-    }
-    push @killservers, $server;
-    #
-    # kill given pids and server relative ones clearing them in %run hash
-    #
-    foreach my $server (@killservers) {
-        if($run{$server}) {
-            $pidlist .= "$run{$server} ";
-            $run{$server} = 0;
-        }
-        $runcert{$server} = 0 if($runcert{$server});
-    }
-    killpid($verbose, $pidlist);
-    #
-    # cleanup server pid files
-    #
-    foreach my $server (@killservers) {
-        my $pidfile = $serverpidfile{$server};
-        my $pid = processexists($pidfile);
-        if($pid > 0) {
-            logmsg "Warning: $server server unexpectedly alive\n";
-            killpid($verbose, $pid);
-        }
-        unlink($pidfile) if(-f $pidfile);
-    }
-}
-
-#######################################################################
-# Verify that the server that runs on $ip, $port is our server.  This also
-# implies that we can speak with it, as there might be occasions when the
-# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
-sub verifyhttp {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $pid = 0;
-    my $bonus="";
-
-    my $verifyout = "$LOGDIR/".
-        servername_canon($proto, $ipvnum, $idnum) .'_verify.out';
-    unlink($verifyout) if(-f $verifyout);
-
-    my $verifylog = "$LOGDIR/".
-        servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
-    unlink($verifylog) if(-f $verifylog);
-
-    if($proto eq "gopher") {
-        # gopher is funny
-        $bonus="1/";
-    }
-
-    my $flags = "--max-time $server_response_maxtime ";
-    $flags .= "--output $verifyout ";
-    $flags .= "--silent ";
-    $flags .= "--verbose ";
-    $flags .= "--globoff ";
-    $flags .= "--insecure " if($proto eq 'https');
-    $flags .= "\"$proto://$ip:$port/${bonus}verifiedserver\"";
-
-    my $cmd = "$VCURL $flags 2>$verifylog";
-
-    # verify if our/any server is running on this port
-    logmsg "RUN: $cmd\n" if($verbose);
-    my $res = runclient($cmd);
-
-    $res >>= 8; # rotate the result
-    if($res & 128) {
-        logmsg "RUN: curl command died with a coredump\n";
-        return -1;
-    }
-
-    if($res && $verbose) {
-        logmsg "RUN: curl command returned $res\n";
-        if(open(FILE, "<$verifylog")) {
-            while(my $string = <FILE>) {
-                logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
-            }
-            close(FILE);
-        }
-    }
-
-    my $data;
-    if(open(FILE, "<$verifyout")) {
-        while(my $string = <FILE>) {
-            $data = $string;
-            last; # only want first line
-        }
-        close(FILE);
-    }
-
-    if($data && ($data =~ /WE ROOLZ: (\d+)/)) {
-        $pid = 0+$1;
-    }
-    elsif($res == 6) {
-        # curl: (6) Couldn't resolve host '::1'
-        logmsg "RUN: failed to resolve host ($proto://$ip:$port/verifiedserver)\n";
-        return -1;
-    }
-    elsif($data || ($res && ($res != 7))) {
-        logmsg "RUN: Unknown server on our $server port: $port ($res)\n";
-        return -1;
-    }
-    return $pid;
-}
-
-#######################################################################
-# Verify that the server that runs on $ip, $port is our server.  This also
-# implies that we can speak with it, as there might be occasions when the
-# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
-sub verifyftp {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $pid = 0;
-    my $time=time();
-    my $extra="";
-
-    my $verifylog = "$LOGDIR/".
-        servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
-    unlink($verifylog) if(-f $verifylog);
-
-    if($proto eq "ftps") {
-        $extra .= "--insecure --ftp-ssl-control ";
-    }
-    elsif($proto eq "smtp") {
-        # SMTP is a bit different since it requires more options and it
-        # has _no_ output!
-        $extra .= "--mail-rcpt verifiedserver ";
-        $extra .= "--mail-from fake ";
-        $extra .= "--upload /dev/null ";
-        $extra .= "--stderr - "; # move stderr to parse the verbose stuff
-    }
-
-    my $flags = "--max-time $server_response_maxtime ";
-    $flags .= "--silent ";
-    $flags .= "--verbose ";
-    $flags .= "--globoff ";
-    $flags .= $extra;
-    $flags .= "\"$proto://$ip:$port/verifiedserver\"";
-
-    my $cmd = "$VCURL $flags 2>$verifylog";
-
-    # check if this is our server running on this port:
-    logmsg "RUN: $cmd\n" if($verbose);
-    my @data = runclientoutput($cmd);
-
-    my $res = $? >> 8; # rotate the result
-    if($res & 128) {
-        logmsg "RUN: curl command died with a coredump\n";
-        return -1;
-    }
-
-    foreach my $line (@data) {
-        if($line =~ /WE ROOLZ: (\d+)/) {
-            # this is our test server with a known pid!
-            $pid = 0+$1;
-            last;
-        }
-    }
-    if($pid <= 0 && @data && $data[0]) {
-        # this is not a known server
-        logmsg "RUN: Unknown server on our $server port: $port\n";
-        return 0;
-    }
-    # we can/should use the time it took to verify the FTP server as a measure
-    # on how fast/slow this host/FTP is.
-    my $took = int(0.5+time()-$time);
-
-    if($verbose) {
-        logmsg "RUN: Verifying our test $server server took $took seconds\n";
-    }
-    $ftpchecktime = $took>=1?$took:1; # make sure it never is below 1
-
-    return $pid;
-}
-
-#######################################################################
-# Verify that the server that runs on $ip, $port is our server.  This also
-# implies that we can speak with it, as there might be occasions when the
-# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
-# assign requested address" #
-
-sub verifyrtsp {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $pid = 0;
-
-    my $verifyout = "$LOGDIR/".
-        servername_canon($proto, $ipvnum, $idnum) .'_verify.out';
-    unlink($verifyout) if(-f $verifyout);
-
-    my $verifylog = "$LOGDIR/".
-        servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
-    unlink($verifylog) if(-f $verifylog);
-
-    my $flags = "--max-time $server_response_maxtime ";
-    $flags .= "--output $verifyout ";
-    $flags .= "--silent ";
-    $flags .= "--verbose ";
-    $flags .= "--globoff ";
-    # currently verification is done using http
-    $flags .= "\"http://$ip:$port/verifiedserver\"";
-
-    my $cmd = "$VCURL $flags 2>$verifylog";
-
-    # verify if our/any server is running on this port
-    logmsg "RUN: $cmd\n" if($verbose);
-    my $res = runclient($cmd);
-
-    $res >>= 8; # rotate the result
-    if($res & 128) {
-        logmsg "RUN: curl command died with a coredump\n";
-        return -1;
-    }
-
-    if($res && $verbose) {
-        logmsg "RUN: curl command returned $res\n";
-        if(open(FILE, "<$verifylog")) {
-            while(my $string = <FILE>) {
-                logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
-            }
-            close(FILE);
-        }
-    }
-
-    my $data;
-    if(open(FILE, "<$verifyout")) {
-        while(my $string = <FILE>) {
-            $data = $string;
-            last; # only want first line
-        }
-        close(FILE);
-    }
-
-    if($data && ($data =~ /RTSP_SERVER WE ROOLZ: (\d+)/)) {
-        $pid = 0+$1;
-    }
-    elsif($res == 6) {
-        # curl: (6) Couldn't resolve host '::1'
-        logmsg "RUN: failed to resolve host ($proto://$ip:$port/verifiedserver)\n";
-        return -1;
-    }
-    elsif($data || ($res != 7)) {
-        logmsg "RUN: Unknown server on our $server port: $port\n";
-        return -1;
-    }
-    return $pid;
-}
-
-#######################################################################
-# Verify that the ssh server has written out its pidfile, recovering
-# the pid from the file and returning it if a process with that pid is
-# actually alive.
-
-sub verifyssh {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $pidfile = server_pidfilename($proto, $ipvnum, $idnum);
-    my $pid = 0;
-    if(open(FILE, "<$pidfile")) {
-        $pid=0+<FILE>;
-        close(FILE);
-    }
-    if($pid > 0) {
-        # if we have a pid it is actually our ssh server,
-        # since runsshserver() unlinks previous pidfile
-        if(!kill(0, $pid)) {
-            logmsg "RUN: SSH server has died after starting up\n";
-            checkdied($pid);
-            unlink($pidfile);
-            $pid = -1;
-        }
-    }
-    return $pid;
-}
-
-#######################################################################
-# Verify that we can connect to the sftp server, properly authenticate
-# with generated config and key files and run a simple remote pwd.
-
-sub verifysftp {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $verified = 0;
-    # Find out sftp client canonical file name
-    my $sftp = find_sftp();
-    if(!$sftp) {
-        logmsg "RUN: SFTP server cannot find $sftpexe\n";
-        return -1;
-    }
-    # Find out ssh client canonical file name
-    my $ssh = find_ssh();
-    if(!$ssh) {
-        logmsg "RUN: SFTP server cannot find $sshexe\n";
-        return -1;
-    }
-    # Connect to sftp server, authenticate and run a remote pwd
-    # command using our generated configuration and key files
-    my $cmd = "$sftp -b $sftpcmds -F $sftpconfig -S $ssh $ip > $sftplog 2>&1";
-    my $res = runclient($cmd);
-    # Search for pwd command response in log file
-    if(open(SFTPLOGFILE, "<$sftplog")) {
-        while(<SFTPLOGFILE>) {
-            if(/^Remote working directory: /) {
-                $verified = 1;
-                last;
-            }
-        }
-        close(SFTPLOGFILE);
-    }
-    return $verified;
-}
-
-
-#######################################################################
-# STUB for verifying socks
-
-sub verifysocks {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-    my $server = servername_id($proto, $ipvnum, $idnum);
-    my $pidfile = server_pidfilename($proto, $ipvnum, $idnum);
-    my $pid = 0;
-    if(open(FILE, "<$pidfile")) {
-        $pid=0+<FILE>;
-        close(FILE);
-    }
-    if($pid > 0) {
-        # if we have a pid it is actually our socks server,
-        # since runsocksserver() unlinks previous pidfile
-        if(!kill(0, $pid)) {
-            logmsg "RUN: SOCKS server has died after starting up\n";
-            checkdied($pid);
-            unlink($pidfile);
-            $pid = -1;
-        }
-    }
-    return $pid;
-}
-
-#######################################################################
-# Verify that the server that runs on $ip, $port is our server.
-# Retry over several seconds before giving up.  The ssh server in
-# particular can take a long time to start if it needs to generate
-# keys on a slow or loaded host.
-#
-
-my %protofunc = ('http' => \&verifyhttp,
-                 'https' => \&verifyhttp,
-                 'rtsp' => \&verifyrtsp,
-                 'ftp' => \&verifyftp,
-                 'pop3' => \&verifyftp,
-                 'imap' => \&verifyftp,
-                 'smtp' => \&verifyftp,
-                 'ftps' => \&verifyftp,
-                 'tftp' => \&verifyftp,
-                 'ssh' => \&verifyssh,
-                 'socks' => \&verifysocks,
-                 'gopher' => \&verifyhttp);
-
-sub verifyserver {
-    my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
-
-    my $count = 30; # try for this many seconds
-    my $pid;
-
-    while($count--) {
-        my $fun = $protofunc{$proto};
-
-        $pid = &$fun($proto, $ipvnum, $idnum, $ip, $port);
-
-        if($pid > 0) {
-            last;
-        }
-        elsif($pid < 0) {
-            # a real failure, stop trying and bail out
-            return 0;
-        }
-        sleep(1);
-    }
-    return $pid;
-}
-
-
-
-#######################################################################
-# start the http server
-#
-sub runhttpserver {
-    my ($proto, $verbose, $ipv6, $port) = @_;
-    my $ip = $HOSTIP;
-    my $ipvnum = 4;
-    my $idnum = 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-
-    if($ipv6) {
-        # if IPv6, use a different setup
-        $ipvnum = 6;
-        $ip = $HOST6IP;
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--fork " if($forkserver);
-    $flags .= "--gopher " if($proto eq "gopher");
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
-
-    my $cmd = "$perl $srcdir/httpserver.pl $flags";
-    my ($httppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($httppid <= 0 || !kill(0, $httppid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$httppid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    $pid2 = $pid3;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $httppid\n";
-    }
-
-    sleep(1);
-
-    return ($httppid, $pid2);
-}
-
-#######################################################################
-# start the https server (or rather, tunnel)
-#
-sub runhttpsserver {
-    my ($verbose, $ipv6, $certfile) = @_;
-    my $proto = 'https';
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
-    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
-    my $idnum = 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    if(!$stunnel) {
-        return (0,0);
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $certfile = 'stunnel.pem' unless($certfile);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --proto $proto ";
-    $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
-    $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
-    $flags .= "--connect $HTTPPORT --accept $HTTPSPORT";
-
-    my $cmd = "$perl $srcdir/secureserver.pl $flags";
-    my ($httpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($httpspid <= 0 || !kill(0, $httpspid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return(0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $HTTPSPORT);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$httpspid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    # Here pid3 is actually the pid returned by the unsecure-http server.
-
-    $runcert{$server} = $certfile;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $httpspid\n";
-    }
-
-    sleep(1);
-
-    return ($httpspid, $pid2);
-}
-
-#######################################################################
-# start the pingpong server (FTP, POP3, IMAP, SMTP)
-#
-sub runpingpongserver {
-    my ($proto, $id, $verbose, $ipv6) = @_;
-    my $port;
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
-    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
-    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    if($proto eq "ftp") {
-        $port = ($idnum>1)?$FTP2PORT:$FTPPORT;
-
-        if($ipvnum==6) {
-            # if IPv6, use a different setup
-            $port = $FTP6PORT;
-        }
-    }
-    elsif($proto eq "pop3") {
-        $port = ($ipvnum==6) ? $POP36PORT : $POP3PORT;
-    }
-    elsif($proto eq "imap") {
-        $port = ($ipvnum==6) ? $IMAP6PORT : $IMAPPORT;
-    }
-    elsif($proto eq "smtp") {
-        $port = ($ipvnum==6) ? $SMTP6PORT : $SMTPPORT;
-    }
-    else {
-        print STDERR "Unsupported protocol $proto!!\n";
-        return 0;
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--srcdir \"$srcdir\" --proto $proto ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --port $port --addr \"$ip\"";
-
-    my $cmd = "$perl $srcdir/ftpserver.pl $flags";
-    my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($ftppid <= 0 || !kill(0, $ftppid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$ftppid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    $pid2 = $pid3;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $ftppid\n";
-    }
-
-    sleep(1);
-
-    return ($pid2, $ftppid);
-}
-
-#######################################################################
-# start the ftps server (or rather, tunnel)
-#
-sub runftpsserver {
-    my ($verbose, $ipv6, $certfile) = @_;
-    my $proto = 'ftps';
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
-    my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
-    my $idnum = 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    if(!$stunnel) {
-        return (0,0);
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $certfile = 'stunnel.pem' unless($certfile);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --proto $proto ";
-    $flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
-    $flags .= "--stunnel \"$stunnel\" --srcdir \"$srcdir\" ";
-    $flags .= "--connect $FTPPORT --accept $FTPSPORT";
-
-    my $cmd = "$perl $srcdir/secureserver.pl $flags";
-    my ($ftpspid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($ftpspid <= 0 || !kill(0, $ftpspid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return(0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $FTPSPORT);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$ftpspid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    # Here pid3 is actually the pid returned by the unsecure-ftp server.
-
-    $runcert{$server} = $certfile;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $ftpspid\n";
-    }
-
-    sleep(1);
-
-    return ($ftpspid, $pid2);
-}
-
-#######################################################################
-# start the tftp server
-#
-sub runtftpserver {
-    my ($id, $verbose, $ipv6) = @_;
-    my $port = $TFTPPORT;
-    my $ip = $HOSTIP;
-    my $proto = 'tftp';
-    my $ipvnum = 4;
-    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    if($ipv6) {
-        # if IPv6, use a different setup
-        $ipvnum = 6;
-        $port = $TFTP6PORT;
-        $ip = $HOST6IP;
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
-
-    my $cmd = "$perl $srcdir/tftpserver.pl $flags";
-    my ($tftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($tftppid <= 0 || !kill(0, $tftppid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$tftppid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    $pid2 = $pid3;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $tftppid\n";
-    }
-
-    sleep(1);
-
-    return ($pid2, $tftppid);
-}
-
-
-#######################################################################
-# start the rtsp server
-#
-sub runrtspserver {
-    my ($verbose, $ipv6) = @_;
-    my $port = $RTSPPORT;
-    my $ip = $HOSTIP;
-    my $proto = 'rtsp';
-    my $ipvnum = 4;
-    my $idnum = 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    if($ipv6) {
-        # if IPv6, use a different setup
-        $ipvnum = 6;
-        $port = $RTSP6PORT;
-        $ip = $HOST6IP;
-    }
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
-
-    my $cmd = "$perl $srcdir/rtspserver.pl $flags";
-    my ($rtsppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
-
-    if($rtsppid <= 0 || !kill(0, $rtsppid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Server is up. Verify that we can speak to it.
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$rtsppid $pid2");
-        displaylogs($testnumcheck);
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    $pid2 = $pid3;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $rtsppid\n";
-    }
-
-    sleep(1);
-
-    return ($rtsppid, $pid2);
-}
-
-
-#######################################################################
-# Start the ssh (scp/sftp) server
-#
-sub runsshserver {
-    my ($id, $verbose, $ipv6) = @_;
-    my $ip=$HOSTIP;
-    my $port = $SSHPORT;
-    my $socksport = $SOCKSPORT;
-    my $proto = 'ssh';
-    my $ipvnum = 4;
-    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    $flags .= "--verbose " if($verbose);
-    $flags .= "--debugprotocol " if($debugprotocol);
-    $flags .= "--pidfile \"$pidfile\" ";
-    $flags .= "--id $idnum " if($idnum > 1);
-    $flags .= "--ipv$ipvnum --addr \"$ip\" ";
-    $flags .= "--sshport $port --socksport $socksport ";
-    $flags .= "--user \"$USER\"";
-
-    my $cmd = "$perl $srcdir/sshserver.pl $flags";
-    my ($sshpid, $pid2) = startnew($cmd, $pidfile, 60, 0);
-
-    # on loaded systems sshserver start up can take longer than the timeout
-    # passed to startnew, when this happens startnew completes without being
-    # able to read the pidfile and consequently returns a zero pid2 above.
-
-    if($sshpid <= 0 || !kill(0, $sshpid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # ssh server verification allows some extra time for the server to start up
-    # and gives us the opportunity of recovering the pid from the pidfile, when
-    # this verification succeeds the recovered pid is assigned to pid2.
-
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to fetch server pid. Kill the server and return failure
-        stopserver($server, "$sshpid $pid2");
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    $pid2 = $pid3;
-
-    # once it is known that the ssh server is alive, sftp server verification
-    # is performed actually connecting to it, authenticating and performing a
-    # very simple remote command.  This verification is tried only one time.
-
-    $sshdlog = server_logfilename($LOGDIR, 'ssh', $ipvnum, $idnum);
-    $sftplog = server_logfilename($LOGDIR, 'sftp', $ipvnum, $idnum);
-
-    if(verifysftp('sftp', $ipvnum, $idnum, $ip, $port) < 1) {
-        logmsg "RUN: SFTP server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        display_sftplog();
-        display_sftpconfig();
-        display_sshdlog();
-        display_sshdconfig();
-        stopserver($server, "$sshpid $pid2");
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $pid2\n";
-    }
-
-    return ($pid2, $sshpid);
-}
-
-#######################################################################
-# Start the socks server
-#
-sub runsocksserver {
-    my ($id, $verbose, $ipv6) = @_;
-    my $ip=$HOSTIP;
-    my $port = $SOCKSPORT;
-    my $proto = 'socks';
-    my $ipvnum = 4;
-    my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
-    my $server;
-    my $srvrname;
-    my $pidfile;
-    my $logfile;
-    my $flags = "";
-
-    $server = servername_id($proto, $ipvnum, $idnum);
-
-    $pidfile = $serverpidfile{$server};
-
-    # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
-        return (0,0);
-    }
-
-    my $pid = processexists($pidfile);
-    if($pid > 0) {
-        stopserver($server, "$pid");
-    }
-    unlink($pidfile) if(-f $pidfile);
-
-    $srvrname = servername_str($proto, $ipvnum, $idnum);
-
-    $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
-
-    # The ssh server must be already running
-    if(!$run{'ssh'}) {
-        logmsg "RUN: SOCKS server cannot find running SSH server\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Find out ssh daemon canonical file name
-    my $sshd = find_sshd();
-    if(!$sshd) {
-        logmsg "RUN: SOCKS server cannot find $sshdexe\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Find out ssh daemon version info
-    ($sshdid, $sshdvernum, $sshdverstr, $sshderror) = sshversioninfo($sshd);
-    if(!$sshdid) {
-        # Not an OpenSSH or SunSSH ssh daemon
-        logmsg "$sshderror\n" if($verbose);
-        logmsg "SCP, SFTP and SOCKS tests require OpenSSH 2.9.9 or later\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    logmsg "ssh server found $sshd is $sshdverstr\n" if($verbose);
-
-    # Find out ssh client canonical file name
-    my $ssh = find_ssh();
-    if(!$ssh) {
-        logmsg "RUN: SOCKS server cannot find $sshexe\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Find out ssh client version info
-    my ($sshid, $sshvernum, $sshverstr, $ssherror) = sshversioninfo($ssh);
-    if(!$sshid) {
-        # Not an OpenSSH or SunSSH ssh client
-        logmsg "$ssherror\n" if($verbose);
-        logmsg "SCP, SFTP and SOCKS tests require OpenSSH 2.9.9 or later\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Verify minimum ssh client version
-    if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) ||
-       (($sshid =~ /SunSSH/)  && ($sshvernum < 100))) {
-        logmsg "ssh client found $ssh is $sshverstr\n";
-        logmsg "SCP, SFTP and SOCKS tests require OpenSSH 2.9.9 or later\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    logmsg "ssh client found $ssh is $sshverstr\n" if($verbose);
-
-    # Verify if ssh client and ssh daemon versions match
-    if(($sshdid ne $sshid) || ($sshdvernum != $sshvernum)) {
-        # Our test harness might work with slightly mismatched versions
-        logmsg "Warning: version mismatch: sshd $sshdverstr - ssh $sshverstr\n"
-            if($verbose);
-    }
-
-    # Config file options for ssh client are previously set from sshserver.pl
-    if(! -e $sshconfig) {
-        logmsg "RUN: SOCKS server cannot find $sshconfig\n";
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    $sshlog  = server_logfilename($LOGDIR, 'socks', $ipvnum, $idnum);
-
-    # start our socks server
-    my $cmd="$ssh -N -F $sshconfig $ip > $sshlog 2>&1";
-    my ($sshpid, $pid2) = startnew($cmd, $pidfile, 30, 1);
-
-    if($sshpid <= 0 || !kill(0, $sshpid)) {
-        # it is NOT alive
-        logmsg "RUN: failed to start the $srvrname server\n";
-        display_sshlog();
-        display_sshconfig();
-        display_sshdlog();
-        display_sshdconfig();
-        stopserver($server, "$pid2");
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-
-    # Ugly hack but ssh doesn't support pid files
-    my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
-    if(!$pid3) {
-        logmsg "RUN: $srvrname server failed verification\n";
-        # failed to talk to it properly. Kill the server and return failure
-        stopserver($server, "$sshpid $pid2");
-        $doesntrun{$pidfile} = 1;
-        return (0,0);
-    }
-    $pid2 = $pid3;
-
-    if($verbose) {
-        logmsg "RUN: $srvrname server is now running PID $pid2\n";
-    }
-
-    return ($pid2, $sshpid);
-}
-
-#######################################################################
-# Remove all files in the specified directory
-#
-sub cleardir {
-    my $dir = $_[0];
-    my $count;
-    my $file;
-
-    # Get all files
-    opendir(DIR, $dir) ||
-        return 0; # can't open dir
-    while($file = readdir(DIR)) {
-        if($file !~ /^\./) {
-            unlink("$dir/$file");
-            $count++;
-        }
-    }
-    closedir DIR;
-    return $count;
-}
-
-#######################################################################
-# filter out the specified pattern from the given input file and store the
-# results in the given output file
-#
-sub filteroff {
-    my $infile=$_[0];
-    my $filter=$_[1];
-    my $ofile=$_[2];
-
-    open(IN, "<$infile")
-        || return 1;
-
-    open(OUT, ">$ofile")
-        || return 1;
-
-    # logmsg "FILTER: off $filter from $infile to $ofile\n";
-
-    while(<IN>) {
-        $_ =~ s/$filter//;
-        print OUT $_;
-    }
-    close(IN);
-    close(OUT);
-    return 0;
-}
-
-#######################################################################
-# compare test results with the expected output, we might filter off
-# some pattern that is allowed to differ, output test results
-#
-
-sub compare {
-    # filter off patterns _before_ this comparison!
-    my ($subject, $firstref, $secondref)=@_;
-
-    my $result = compareparts($firstref, $secondref);
-
-    if($result) {
-        if(!$short) {
-            logmsg "\n $subject FAILED:\n";
-            logmsg showdiff($LOGDIR, $firstref, $secondref);
-        }
-        else {
-            logmsg "FAILED\n";
-        }
-    }
-    return $result;
-}
-
-#######################################################################
-# display information about curl and the host the test suite runs on
-#
-sub checksystem {
-
-    unlink($memdump); # remove this if there was one left
-
-    my $feat;
-    my $curl;
-    my $libcurl;
-    my $versretval;
-    my $versnoexec;
-    my @version=();
-
-    my $curlverout="$LOGDIR/curlverout.log";
-    my $curlvererr="$LOGDIR/curlvererr.log";
-    my $versioncmd="$CURL --version 1>$curlverout 2>$curlvererr";
-
-    unlink($curlverout);
-    unlink($curlvererr);
-
-    $versretval = runclient($versioncmd);
-    $versnoexec = $!;
-
-    open(VERSOUT, "<$curlverout");
-    @version = <VERSOUT>;
-    close(VERSOUT);
-
-    for(@version) {
-        chomp;
-
-        if($_ =~ /^curl/) {
-            $curl = $_;
-            $curl =~ s/^(.*)(libcurl.*)/$1/g;
-
-            $libcurl = $2;
-            if($curl =~ /mingw32/) {
-                # This is a windows minw32 build, we need to translate the
-                # given path to the "actual" windows path.
-
-                my @m = `mount`;
-                my $matchlen;
-                my $bestmatch;
-                my $mount;
-
-# example mount output:
-# C:\DOCUME~1\Temp on /tmp type user (binmode,noumount)
-# c:\ActiveState\perl on /perl type user (binmode)
-# C:\msys\1.0\bin on /usr/bin type user (binmode,cygexec,noumount)
-# C:\msys\1.0\bin on /bin type user (binmode,cygexec,noumount)
-
-                foreach $mount (@m) {
-                    if( $mount =~ /(.*) on ([^ ]*) type /) {
-                        my ($mingw, $real)=($2, $1);
-                        if($pwd =~ /^$mingw/) {
-                            # the path we got from pwd starts with the path
-                            # we found on this line in the mount output
-
-                            my $len = length($real);
-                            if($len > $matchlen) {
-                                # we remember the match that is the longest
-                                $matchlen = $len;
-                                $bestmatch = $real;
-                            }
-                        }
-                    }
-                }
-                if(!$matchlen) {
-                    logmsg "Serious error, can't find our \"real\" path\n";
-                }
-                else {
-                    # now prepend the prefix from the mount command to build
-                    # our "actual path"
-                    $pwd = "$bestmatch$pwd";
-                }
-                $pwd =~ s#\\#/#g;
-            }
-            elsif ($curl =~ /win32/) {
-               # Native Windows builds don't understand the
-               # output of cygwin's pwd.  It will be
-               # something like /cygdrive/c/<some path>.
-               #
-               # Use the cygpath utility to convert the
-               # working directory to a Windows friendly
-               # path.  The -m option converts to use drive
-               # letter:, but it uses / instead \.  Forward
-               # slashes (/) are easier for us.  We don't
-               # have to escape them to get them to curl
-               # through a shell.
-               chomp($pwd = `cygpath -m $pwd`);
-           }
-           elsif ($libcurl =~ /openssl/i) {
-               $has_openssl=1;
-               $ssllib="OpenSSL";
-           }
-           elsif ($libcurl =~ /gnutls/i) {
-               $has_gnutls=1;
-               $ssllib="GnuTLS";
-           }
-           elsif ($libcurl =~ /nss/i) {
-               $has_nss=1;
-               $ssllib="NSS";
-           }
-           elsif ($libcurl =~ /yassl/i) {
-               $has_yassl=1;
-               $has_openssl=1;
-               $ssllib="yassl";
-           }
-           elsif ($libcurl =~ /polarssl/i) {
-               $has_polarssl=1;
-               $has_openssl=1;
-               $ssllib="polarssl";
-           } 
-        }
-        elsif($_ =~ /^Protocols: (.*)/i) {
-            # these are the protocols compiled in to this libcurl
-            @protocols = split(' ', $1);
-
-            # Generate a "proto-ipv6" version of each protocol to match the
-            # IPv6 <server> name. This works even if IPv6 support isn't
-            # compiled in because the <features> test will fail.
-            push @protocols, map($_ . "-ipv6", @protocols);
-
-            # 'none' is used in test cases to mean no server
-            push @protocols, ('none');
-        }
-        elsif($_ =~ /^Features: (.*)/i) {
-            $feat = $1;
-            if($feat =~ /TrackMemory/i) {
-                # curl was built with --enable-curldebug (memory tracking)
-                $curl_debug = 1;
-            }
-            if($feat =~ /debug/i) {
-                # curl was built with --enable-debug
-                $debug_build = 1;
-                # set the NETRC debug env
-                $ENV{'CURL_DEBUG_NETRC'} = "$LOGDIR/netrc";
-            }
-            if($feat =~ /SSL/i) {
-                # ssl enabled
-                $ssl_version=1;
-            }
-            if($feat =~ /Largefile/i) {
-                # large file support
-                $large_file=1;
-            }
-            if($feat =~ /IDN/i) {
-                # IDN support
-                $has_idn=1;
-            }
-            if($feat =~ /IPv6/i) {
-                $has_ipv6 = 1;
-            }
-            if($feat =~ /libz/i) {
-                $has_libz = 1;
-            }
-            if($feat =~ /NTLM/i) {
-                # NTLM enabled
-                $has_ntlm=1;
-            }
-            if($feat =~ /CharConv/i) {
-                # CharConv enabled
-                $has_charconv=1;
-            }
-        }
-    }
-    if(!$curl) {
-        logmsg "unable to get curl's version, further details are:\n";
-        logmsg "issued command: \n";
-        logmsg "$versioncmd \n";
-        if ($versretval == -1) {
-            logmsg "command failed with: \n";
-            logmsg "$versnoexec \n";
-        }
-        elsif ($versretval & 127) {
-            logmsg sprintf("command died with signal %d, and %s coredump.\n",
-                           ($versretval & 127), ($versretval & 128)?"a":"no");
-        }
-        else {
-            logmsg sprintf("command exited with value %d \n", $versretval >> 8);
-        }
-        logmsg "contents of $curlverout: \n";
-        displaylogcontent("$curlverout");
-        logmsg "contents of $curlvererr: \n";
-        displaylogcontent("$curlvererr");
-        die "couldn't get curl's version";
-    }
-
-    if(-r "../lib/curl_config.h") {
-        open(CONF, "<../lib/curl_config.h");
-        while(<CONF>) {
-            if($_ =~ /^\#define HAVE_GETRLIMIT/) {
-                $has_getrlimit = 1;
-            }
-        }
-        close(CONF);
-    }
-
-    if($has_ipv6) {
-        # client has ipv6 support
-
-        # check if the HTTP server has it!
-        my @sws = `server/sws --version`;
-        if($sws[0] =~ /IPv6/) {
-            # HTTP server has ipv6 support!
-            $http_ipv6 = 1;
-            $gopher_ipv6 = 1;
-        }
-
-        # check if the FTP server has it!
-        @sws = `server/sockfilt --version`;
-        if($sws[0] =~ /IPv6/) {
-            # FTP server has ipv6 support!
-            $ftp_ipv6 = 1;
-        }
-    }
-
-    if(!$curl_debug && $torture) {
-        die "can't run torture tests since curl was not built with curldebug";
-    }
-
-    $has_shared = `sh $CURLCONFIG --built-shared`;
-    chomp $has_shared;
-
-    # curl doesn't list cryptographic support separately, so assume it's
-    # always available
-    $has_crypto=1;
-
-    my $hostname=join(' ', runclientoutput("hostname"));
-    my $hosttype=join(' ', runclientoutput("uname -a"));
-
-    logmsg ("********* System characteristics ******** \n",
-    "* $curl\n",
-    "* $libcurl\n",
-    "* Features: $feat\n",
-    "* Host: $hostname",
-    "* System: $hosttype");
-
-    logmsg sprintf("* Server SSL:   %8s", $stunnel?"ON ":"OFF");
-    logmsg sprintf("  libcurl SSL:  %s\n", $ssl_version?"ON ":"OFF");
-    logmsg sprintf("* debug build:  %8s", $debug_build?"ON ":"OFF");
-    logmsg sprintf("  track memory: %s\n", $curl_debug?"ON ":"OFF");
-    logmsg sprintf("* valgrind:     %8s", $valgrind?"ON ":"OFF");
-    logmsg sprintf("  HTTP IPv6     %s\n", $http_ipv6?"ON ":"OFF");
-    logmsg sprintf("* FTP IPv6      %8s", $ftp_ipv6?"ON ":"OFF");
-    logmsg sprintf("  Libtool lib:  %s\n", $libtool?"ON ":"OFF");
-    logmsg sprintf("* Shared build:      %s\n", $has_shared);
-    if($ssl_version) {
-        logmsg sprintf("* SSL library: %13s\n", $ssllib);
-    }
-
-    logmsg "* Ports:\n";
-
-    logmsg sprintf("*   HTTP/%d ", $HTTPPORT);
-    logmsg sprintf("FTP/%d ", $FTPPORT);
-    logmsg sprintf("FTP2/%d ", $FTP2PORT);
-    logmsg sprintf("RTSP/%d ", $RTSPPORT);
-    if($stunnel) {
-        logmsg sprintf("FTPS/%d ", $FTPSPORT);
-        logmsg sprintf("HTTPS/%d ", $HTTPSPORT);
-    }
-    logmsg sprintf("\n*   TFTP/%d ", $TFTPPORT);
-    if($http_ipv6) {
-        logmsg sprintf("HTTP-IPv6/%d ", $HTTP6PORT);
-        logmsg sprintf("RTSP-IPv6/%d ", $RTSP6PORT);
-    }
-    if($ftp_ipv6) {
-        logmsg sprintf("FTP-IPv6/%d ", $FTP6PORT);
-    }
-    if($tftp_ipv6) {
-        logmsg sprintf("TFTP-IPv6/%d ", $TFTP6PORT);
-    }
-    logmsg sprintf("\n*   GOPHER/%d ", $GOPHERPORT);
-    if($gopher_ipv6) {
-        logmsg sprintf("GOPHER-IPv6/%d", $GOPHERPORT);
-    }
-    logmsg sprintf("\n*   SSH/%d ", $SSHPORT);
-    logmsg sprintf("SOCKS/%d ", $SOCKSPORT);
-    logmsg sprintf("POP3/%d ", $POP3PORT);
-    logmsg sprintf("IMAP/%d ", $IMAPPORT);
-    logmsg sprintf("SMTP/%d\n", $SMTPPORT);
-    if($ftp_ipv6) {
-        logmsg sprintf("*   POP3-IPv6/%d ", $POP36PORT);
-        logmsg sprintf("IMAP-IPv6/%d ", $IMAP6PORT);
-        logmsg sprintf("SMTP-IPv6/%d\n", $SMTP6PORT);
-    }
-
-    $has_textaware = ($^O eq 'MSWin32') || ($^O eq 'msys');
-
-    logmsg "***************************************** \n";
-}
-
-#######################################################################
-# substitute the variable stuff into either a joined up file or
-# a command, in either case passed by reference
-#
-sub subVariables {
-  my ($thing) = @_;
-  $$thing =~ s/%HOSTIP/$HOSTIP/g;
-  $$thing =~ s/%HTTPPORT/$HTTPPORT/g;
-  $$thing =~ s/%HOST6IP/$HOST6IP/g;
-  $$thing =~ s/%HTTP6PORT/$HTTP6PORT/g;
-  $$thing =~ s/%HTTPSPORT/$HTTPSPORT/g;
-  $$thing =~ s/%FTPPORT/$FTPPORT/g;
-  $$thing =~ s/%FTP6PORT/$FTP6PORT/g;
-  $$thing =~ s/%FTP2PORT/$FTP2PORT/g;
-  $$thing =~ s/%FTPSPORT/$FTPSPORT/g;
-  $$thing =~ s/%SRCDIR/$srcdir/g;
-  $$thing =~ s/%PWD/$pwd/g;
-  $$thing =~ s/%TFTPPORT/$TFTPPORT/g;
-  $$thing =~ s/%TFTP6PORT/$TFTP6PORT/g;
-  $$thing =~ s/%SSHPORT/$SSHPORT/g;
-  $$thing =~ s/%SOCKSPORT/$SOCKSPORT/g;
-  $$thing =~ s/%POP3PORT/$POP3PORT/g;
-  $$thing =~ s/%POP36PORT/$POP36PORT/g;
-  $$thing =~ s/%IMAPPORT/$IMAPPORT/g;
-  $$thing =~ s/%IMAP6PORT/$IMAP6PORT/g;
-  $$thing =~ s/%SMTPPORT/$SMTPPORT/g;
-  $$thing =~ s/%SMTP6PORT/$SMTP6PORT/g;
-  $$thing =~ s/%CURL/$CURL/g;
-  $$thing =~ s/%USER/$USER/g;
-  $$thing =~ s/%CLIENTIP/$CLIENTIP/g;
-  $$thing =~ s/%CLIENT6IP/$CLIENT6IP/g;
-  $$thing =~ s/%RTSPPORT/$RTSPPORT/g;
-  $$thing =~ s/%RTSP6PORT/$RTSP6PORT/g;
-  $$thing =~ s/%GOPHERPORT/$GOPHERPORT/g;
-  $$thing =~ s/%GOPHER6PORT/$GOPHER6PORT/g;
-
-  # The purpose of FTPTIME2 and FTPTIME3 is to provide times that can be
-  # used for time-out tests and that whould work on most hosts as these
-  # adjust for the startup/check time for this particular host. We needed
-  # to do this to make the test suite run better on very slow hosts.
-
-  my $ftp2 = $ftpchecktime * 2;
-  my $ftp3 = $ftpchecktime * 3;
-
-  $$thing =~ s/%FTPTIME2/$ftp2/g;
-  $$thing =~ s/%FTPTIME3/$ftp3/g;
-}
-
-sub fixarray {
-    my @in = @_;
-
-    for(@in) {
-        subVariables \$_;
-    }
-    return @in;
-}
-
-#######################################################################
-# Provide time stamps for single test skipped events
-#
-sub timestampskippedevents {
-    my $testnum = $_[0];
-
-    return if((not defined($testnum)) || ($testnum < 1));
-
-    if($timestats) {
-
-        if($timevrfyend{$testnum}) {
-            return;
-        }
-        elsif($timesrvrlog{$testnum}) {
-            $timevrfyend{$testnum} = $timesrvrlog{$testnum};
-            return;
-        }
-        elsif($timetoolend{$testnum}) {
-            $timevrfyend{$testnum} = $timetoolend{$testnum};
-            $timesrvrlog{$testnum} = $timetoolend{$testnum};
-        }
-        elsif($timetoolini{$testnum}) {
-            $timevrfyend{$testnum} = $timetoolini{$testnum};
-            $timesrvrlog{$testnum} = $timetoolini{$testnum};
-            $timetoolend{$testnum} = $timetoolini{$testnum};
-        }
-        elsif($timesrvrend{$testnum}) {
-            $timevrfyend{$testnum} = $timesrvrend{$testnum};
-            $timesrvrlog{$testnum} = $timesrvrend{$testnum};
-            $timetoolend{$testnum} = $timesrvrend{$testnum};
-            $timetoolini{$testnum} = $timesrvrend{$testnum};
-        }
-        elsif($timesrvrini{$testnum}) {
-            $timevrfyend{$testnum} = $timesrvrini{$testnum};
-            $timesrvrlog{$testnum} = $timesrvrini{$testnum};
-            $timetoolend{$testnum} = $timesrvrini{$testnum};
-            $timetoolini{$testnum} = $timesrvrini{$testnum};
-            $timesrvrend{$testnum} = $timesrvrini{$testnum};
-        }
-        elsif($timeprepini{$testnum}) {
-            $timevrfyend{$testnum} = $timeprepini{$testnum};
-            $timesrvrlog{$testnum} = $timeprepini{$testnum};
-            $timetoolend{$testnum} = $timeprepini{$testnum};
-            $timetoolini{$testnum} = $timeprepini{$testnum};
-            $timesrvrend{$testnum} = $timeprepini{$testnum};
-            $timesrvrini{$testnum} = $timeprepini{$testnum};
-        }
-    }
-}
-
-#######################################################################
-# Run a single specified test case
-#
-sub singletest {
-    my ($testnum, $count, $total)=@_;
-
-    my @what;
-    my $why;
-    my %feature;
-    my $cmd;
-    my $disablevalgrind;
-
-    # copy test number to a global scope var, this allows
-    # testnum checking when starting test harness servers.
-    $testnumcheck = $testnum;
-
-    # timestamp test preparation start
-    $timeprepini{$testnum} = Time::HiRes::time() if($timestats);
-
-    if($disttests !~ /test$testnum\W/ ) {
-        logmsg "Warning: test$testnum not present in tests/data/Makefile.am\n";
-    }
-
-    # load the test case file definition
-    if(loadtest("${TESTDIR}/test${testnum}")) {
-        if($verbose) {
-            # this is not a test
-            logmsg "RUN: $testnum doesn't look like a test case\n";
-        }
-        $why = "no test";
-    }
-    else {
-        @what = getpart("client", "features");
-    }
-
-    for(@what) {
-        my $f = $_;
-        $f =~ s/\s//g;
-
-        $feature{$f}=$f; # we require this feature
-
-        if($f eq "SSL") {
-            if($ssl_version) {
-                next;
-            }
-        }
-        elsif($f eq "OpenSSL") {
-            if($has_openssl) {
-                next;
-            }
-        }
-        elsif($f eq "GnuTLS") {
-            if($has_gnutls) {
-                next;
-            }
-        }
-        elsif($f eq "NSS") {
-            if($has_nss) {
-                next;
-            }
-        }
-        elsif($f eq "netrc_debug") {
-            if($debug_build) {
-                next;
-            }
-        }
-        elsif($f eq "large_file") {
-            if($large_file) {
-                next;
-            }
-        }
-        elsif($f eq "idn") {
-            if($has_idn) {
-                next;
-            }
-        }
-        elsif($f eq "ipv6") {
-            if($has_ipv6) {
-                next;
-            }
-        }
-        elsif($f eq "libz") {
-            if($has_libz) {
-                next;
-            }
-        }
-        elsif($f eq "NTLM") {
-            if($has_ntlm) {
-                next;
-            }
-        }
-        elsif($f eq "getrlimit") {
-            if($has_getrlimit) {
-                next;
-            }
-        }
-        elsif($f eq "crypto") {
-            if($has_crypto) {
-                next;
-            }
-        }
-        elsif($f eq "socks") {
-            next;
-        }
-        # See if this "feature" is in the list of supported protocols
-        elsif (grep /^$f$/, @protocols) {
-            next;
-        }
-
-        $why = "curl lacks $f support";
-        last;
-    }
-
-    if(!$why) {
-        my @keywords = getpart("info", "keywords");
-        my $match;
-        my $k;
-        for $k (@keywords) {
-            chomp $k;
-            if ($disabled_keywords{$k}) {
-                $why = "disabled by keyword";
-            } elsif ($enabled_keywords{$k}) {
-                $match = 1;
-            }
-        }
-
-        if(!$why && !$match && %enabled_keywords) {
-            $why = "disabled by missing keyword";
-        }
-    }
-
-    # test definition may instruct to (un)set environment vars
-    # this is done this early, so that the precheck can use environment
-    # variables and still bail out fine on errors
-
-    # restore environment variables that were modified in a previous run
-    foreach my $var (keys %oldenv) {
-        if($oldenv{$var} eq 'notset') {
-            delete $ENV{$var} if($ENV{$var});
-        }
-        else {
-            $ENV{$var} = $oldenv{$var};
-        }
-        delete $oldenv{$var};
-    }
-
-    # timestamp required servers verification start
-    $timesrvrini{$testnum} = Time::HiRes::time() if($timestats);
-
-    if(!$why) {
-        $why = serverfortest($testnum);
-    }
-
-    # timestamp required servers verification end
-    $timesrvrend{$testnum} = Time::HiRes::time() if($timestats);
-
-    my @setenv = getpart("client", "setenv");
-    if(@setenv) {
-        foreach my $s (@setenv) {
-            chomp $s;
-            subVariables \$s;
-            if($s =~ /([^=]*)=(.*)/) {
-                my ($var, $content) = ($1, $2);
-                # remember current setting, to restore it once test runs
-                $oldenv{$var} = ($ENV{$var})?"$ENV{$var}":'notset';
-                # set new value
-                if(!$content) {
-                    delete $ENV{$var} if($ENV{$var});
-                }
-                else {
-                    if(($var =~ /^LD_PRELOAD/) &&
-                       ($debug_build || ($has_shared ne "yes"))) {
-                        # print "Skipping LD_PRELOAD due to no release shared build\n";
-                        next;
-                    }
-                    $ENV{$var} = "$content";
-                }
-            }
-        }
-    }
-
-    if(!$why) {
-        # TODO:
-        # Add a precheck cache. If a precheck command was already invoked
-        # exactly like this, then use the previous result to speed up
-        # successive test invokes!
-
-        my @precheck = getpart("client", "precheck");
-        if(@precheck) {
-            $cmd = $precheck[0];
-            chomp $cmd;
-            subVariables \$cmd;
-            if($cmd) {
-                my @p = split(/ /, $cmd);
-                if($p[0] !~ /\//) {
-                    # the first word, the command, does not contain a slash so
-                    # we will scan the "improved" PATH to find the command to
-                    # be able to run it
-                    my $fullp = checktestcmd($p[0]);
-
-                    if($fullp) {
-                        $p[0] = $fullp;
-                    }
-                    $cmd = join(" ", @p);
-                }
-
-                my @o = `$cmd 2>/dev/null`;
-                if($o[0]) {
-                    $why = $o[0];
-                    chomp $why;
-                } elsif($?) {
-                    $why = "precheck command error";
-                }
-                logmsg "prechecked $cmd\n" if($verbose);
-            }
-        }
-    }
-
-    if($why && !$listonly) {
-        # there's a problem, count it as "skipped"
-        $skipped++;
-        $skipped{$why}++;
-        $teststat[$testnum]=$why; # store reason for this test case
-
-        if(!$short) {
-            printf "test %03d SKIPPED: $why\n", $testnum;
-        }
-
-        timestampskippedevents($testnum);
-        return -1;
-    }
-    logmsg sprintf("test %03d...", $testnum);
-
-    # extract the reply data
-    my @reply = getpart("reply", "data");
-    my @replycheck = getpart("reply", "datacheck");
-
-    if (@replycheck) {
-        # we use this file instead to check the final output against
-
-        my %hash = getpartattr("reply", "datacheck");
-        if($hash{'nonewline'}) {
-            # Yes, we must cut off the final newline from the final line
-            # of the datacheck
-            chomp($replycheck[$#replycheck]);
-        }
-
-        @reply=@replycheck;
-    }
-
-    # this is the valid protocol blurb curl should generate
-    my @protocol= fixarray ( getpart("verify", "protocol") );
-
-    # redirected stdout/stderr to these files
-    $STDOUT="$LOGDIR/stdout$testnum";
-    $STDERR="$LOGDIR/stderr$testnum";
-
-    # if this section exists, we verify that the stdout contained this:
-    my @validstdout = fixarray ( getpart("verify", "stdout") );
-
-    # if this section exists, we verify upload
-    my @upload = getpart("verify", "upload");
-
-    # if this section exists, it might be FTP server instructions:
-    my @ftpservercmd = getpart("reply", "servercmd");
-
-    my $CURLOUT="$LOGDIR/curl$testnum.out"; # curl output if not stdout
-
-    # name of the test
-    my @testname= getpart("client", "name");
-
-    if(!$short) {
-        my $name = $testname[0];
-        $name =~ s/\n//g;
-        logmsg "[$name]\n";
-    }
-
-    if($listonly) {
-        timestampskippedevents($testnum);
-        return 0; # look successful
-    }
-
-    my @codepieces = getpart("client", "tool");
-
-    my $tool="";
-    if(@codepieces) {
-        $tool = $codepieces[0];
-        chomp $tool;
-    }
-
-    # remove server output logfiles
-    unlink($SERVERIN);
-    unlink($SERVER2IN);
-
-    if(@ftpservercmd) {
-        # write the instructions to file
-        writearray($FTPDCMD, \@ftpservercmd);
-    }
-
-    # get the command line options to use
-    my @blaha;
-    ($cmd, @blaha)= getpart("client", "command");
-
-    if($cmd) {
-        # make some nice replace operations
-        $cmd =~ s/\n//g; # no newlines please
-        # substitute variables in the command line
-        subVariables \$cmd;
-    }
-    if($curl_debug) {
-        unlink($memdump);
-    }
-
-    # create a (possibly-empty) file before starting the test
-    my @inputfile=getpart("client", "file");
-    my %fileattr = getpartattr("client", "file");
-    my $filename=$fileattr{'name'};
-    if(@inputfile || $filename) {
-        if(!$filename) {
-            logmsg "ERROR: section client=>file has no name attribute\n";
-            timestampskippedevents($testnum);
-            return -1;
-        }
-        my $fileContent = join('', @inputfile);
-        subVariables \$fileContent;
-#        logmsg "DEBUG: writing file " . $filename . "\n";
-        open(OUTFILE, ">$filename");
-        binmode OUTFILE; # for crapage systems, use binary
-        print OUTFILE $fileContent;
-        close(OUTFILE);
-    }
-
-    my %cmdhash = getpartattr("client", "command");
-
-    my $out="";
-
-    if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
-        #We may slap on --output!
-        if (!@validstdout) {
-            $out=" --output $CURLOUT ";
-        }
-    }
-
-    my $serverlogslocktimeout = $defserverlogslocktimeout;
-    if($cmdhash{'timeout'}) {
-        # test is allowed to override default server logs lock timeout
-        if($cmdhash{'timeout'} =~ /(\d+)/) {
-            $serverlogslocktimeout = $1 if($1 >= 0);
-        }
-    }
-
-    my $postcommanddelay = $defpostcommanddelay;
-    if($cmdhash{'delay'}) {
-        # test is allowed to specify a delay after command is executed
-        if($cmdhash{'delay'} =~ /(\d+)/) {
-            $postcommanddelay = $1 if($1 > 0);
-        }
-    }
-
-    my $CMDLINE;
-    my $cmdargs;
-    my $cmdtype = $cmdhash{'type'} || "default";
-    if($cmdtype eq "perl") {
-        # run the command line prepended with "perl"
-        $cmdargs ="$cmd";
-        $CMDLINE = "perl ";
-        $tool=$CMDLINE;
-        $disablevalgrind=1;
-    }
-    elsif(!$tool) {
-        # run curl, add --verbose for debug information output
-        $cmdargs ="$out --include --verbose --trace-time $cmd";
-    }
-    else {
-        $cmdargs = " $cmd"; # $cmd is the command line for the test file
-        $CURLOUT = $STDOUT; # sends received data to stdout
-
-        $CMDLINE="$LIBDIR/$tool";
-        if(! -f $CMDLINE) {
-            print "The tool set in the test case for this: '$tool' does not exist\n";
-            timestampskippedevents($testnum);
-            return -1;
-        }
-        $DBGCURL=$CMDLINE;
-    }
-
-    my @stdintest = getpart("client", "stdin");
-
-    if(@stdintest) {
-        my $stdinfile="$LOGDIR/stdin-for-$testnum";
-        writearray($stdinfile, \@stdintest);
-
-        $cmdargs .= " <$stdinfile";
-    }
-
-    if(!$tool) {
-        $CMDLINE="$CURL";
-    }
-
-    my $usevalgrind;
-    if($valgrind && !$disablevalgrind) {
-        my @valgrindoption = getpart("verify", "valgrind");
-        if((!@valgrindoption) || ($valgrindoption[0] !~ /disable/)) {
-            $usevalgrind = 1;
-            my $valgrindcmd = "$valgrind ";
-            $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
-            $valgrindcmd .= "--leak-check=yes ";
-            $valgrindcmd .= "--num-callers=16 ";
-            $valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
-            $CMDLINE = "$valgrindcmd $CMDLINE";
-        }
-    }
-
-    $CMDLINE .= "$cmdargs >$STDOUT 2>$STDERR";
-
-    if($verbose) {
-        logmsg "$CMDLINE\n";
-    }
-
-    print CMDLOG "$CMDLINE\n";
-
-    unlink("core");
-
-    my $dumped_core;
-    my $cmdres;
-
-    # Apr 2007: precommand isn't being used and could be removed
-    my @precommand= getpart("client", "precommand");
-    if($precommand[0]) {
-        # this is pure perl to eval!
-        my $code = join("", @precommand);
-        eval $code;
-        if($@) {
-            logmsg "perl: $code\n";
-            logmsg "precommand: $@";
-            stopservers($verbose);
-            timestampskippedevents($testnum);
-            return -1;
-        }
-    }
-
-    if($gdbthis) {
-        my $gdbinit = "$TESTDIR/gdbinit$testnum";
-        open(GDBCMD, ">$LOGDIR/gdbcmd");
-        print GDBCMD "set args $cmdargs\n";
-        print GDBCMD "show args\n";
-        print GDBCMD "source $gdbinit\n" if -e $gdbinit;
-        close(GDBCMD);
-    }
-
-    # timestamp starting of test command
-    $timetoolini{$testnum} = Time::HiRes::time() if($timestats);
-
-    # run the command line we built
-    if ($torture) {
-        $cmdres = torture($CMDLINE,
-                       "$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
-    }
-    elsif($gdbthis) {
-        runclient("$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
-        $cmdres=0; # makes it always continue after a debugged run
-    }
-    else {
-        $cmdres = runclient("$CMDLINE");
-        my $signal_num  = $cmdres & 127;
-        $dumped_core = $cmdres & 128;
-
-        if(!$anyway && ($signal_num || $dumped_core)) {
-            $cmdres = 1000;
-        }
-        else {
-            $cmdres >>= 8;
-            $cmdres = (2000 + $signal_num) if($signal_num && !$cmdres);
-        }
-    }
-
-    # timestamp finishing of test command
-    $timetoolend{$testnum} = Time::HiRes::time() if($timestats);
-
-    if(!$dumped_core) {
-        if(-r "core") {
-            # there's core file present now!
-            $dumped_core = 1;
-        }
-    }
-
-    if($dumped_core) {
-        logmsg "core dumped\n";
-        if(0 && $gdb) {
-            logmsg "running gdb for post-mortem analysis:\n";
-            open(GDBCMD, ">$LOGDIR/gdbcmd2");
-            print GDBCMD "bt\n";
-            close(GDBCMD);
-            runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
-     #       unlink("$LOGDIR/gdbcmd2");
-        }
-    }
-
-    # If a server logs advisor read lock file exists, it is an indication
-    # that the server has not yet finished writing out all its log files,
-    # including server request log files used for protocol verification.
-    # So, if the lock file exists the script waits here a certain amount
-    # of time until the server removes it, or the given time expires.
-
-    if($serverlogslocktimeout) {
-        my $lockretry = $serverlogslocktimeout * 20;
-        while((-f $SERVERLOGS_LOCK) && $lockretry--) {
-            select(undef, undef, undef, 0.05);
-        }
-        if(($lockretry < 0) &&
-           ($serverlogslocktimeout >= $defserverlogslocktimeout)) {
-            logmsg "Warning: server logs lock timeout ",
-                   "($serverlogslocktimeout seconds) expired\n";
-        }
-    }
-
-    # Test harness ssh server does not have this synchronization mechanism,
-    # this implies that some ssh server based tests might need a small delay
-    # once that the client command has run to avoid false test failures.
-
-    sleep($postcommanddelay) if($postcommanddelay);
-
-    # timestamp removal of server logs advisor read lock
-    $timesrvrlog{$testnum} = Time::HiRes::time() if($timestats);
-
-    # test definition might instruct to stop some servers
-    # stop also all servers relative to the given one
-
-    my @killtestservers = getpart("client", "killserver");
-    if(@killtestservers) {
-        #
-        # All servers relative to the given one must be stopped also
-        #
-        my @killservers;
-        foreach my $server (@killtestservers) {
-            chomp $server;
-            if($server =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
-                # given an ssl server, also kill non-ssl underlying one
-                push @killservers, "${1}${2}";
-            }
-            elsif($server =~ /^(ftp|http|imap|pop3|smtp)(.*)$/) {
-                # given a non-ssl server, also kill ssl piggybacking one
-                push @killservers, "${1}s${2}";
-            }
-            elsif($server =~ /^(socks)(.*)$/) {
-                # given an socks server, also kill ssh underlying one
-                push @killservers, "ssh${2}";
-            }
-            elsif($server =~ /^(ssh)(.*)$/) {
-                # given an ssh server, also kill socks piggybacking one
-                push @killservers, "socks${2}";
-            }
-            push @killservers, $server;
-        }
-        #
-        # kill sockfilter processes for pingpong relative servers
-        #
-        foreach my $server (@killservers) {
-            if($server =~ /^(ftp|imap|pop3|smtp)s?(\d*)(-ipv6|)$/) {
-                my $proto  = $1;
-                my $idnum  = ($2 && ($2 > 1)) ? $2 : 1;
-                my $ipvnum = ($3 && ($3 =~ /6$/)) ? 6 : 4;
-                killsockfilters($proto, $ipvnum, $idnum, $verbose);
-            }
-        }
-        #
-        # kill server relative pids clearing them in %run hash
-        #
-        my $pidlist;
-        foreach my $server (@killservers) {
-            if($run{$server}) {
-                $pidlist .= "$run{$server} ";
-                $run{$server} = 0;
-            }
-            $runcert{$server} = 0 if($runcert{$server});
-        }
-        killpid($verbose, $pidlist);
-        #
-        # cleanup server pid files
-        #
-        foreach my $server (@killservers) {
-            my $pidfile = $serverpidfile{$server};
-            my $pid = processexists($pidfile);
-            if($pid > 0) {
-                logmsg "Warning: $server server unexpectedly alive\n";
-                killpid($verbose, $pid);
-            }
-            unlink($pidfile) if(-f $pidfile);
-        }
-    }
-
-    # remove the test server commands file after each test
-    unlink($FTPDCMD);
-
-    # run the postcheck command
-    my @postcheck= getpart("client", "postcheck");
-    if(@postcheck) {
-        $cmd = $postcheck[0];
-        chomp $cmd;
-        subVariables \$cmd;
-        if($cmd) {
-            logmsg "postcheck $cmd\n" if($verbose);
-            my $rc = runclient("$cmd");
-            # Must run the postcheck command in torture mode in order
-            # to clean up, but the result can't be relied upon.
-            if($rc != 0 && !$torture) {
-                logmsg " postcheck FAILED\n";
-                # timestamp test result verification end
-                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-                return 1;
-            }
-        }
-    }
-
-    # restore environment variables that were modified
-    if(%oldenv) {
-        foreach my $var (keys %oldenv) {
-            if($oldenv{$var} eq 'notset') {
-                delete $ENV{$var} if($ENV{$var});
-            }
-            else {
-                $ENV{$var} = "$oldenv{$var}";
-            }
-        }
-    }
-
-    # Skip all the verification on torture tests
-    if ($torture) {
-        if(!$cmdres && !$keepoutfiles) {
-            cleardir($LOGDIR);
-        }
-        # timestamp test result verification end
-        $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-        return $cmdres;
-    }
-
-    my @err = getpart("verify", "errorcode");
-    my $errorcode = $err[0] || "0";
-    my $ok="";
-    my $res;
-    if (@validstdout) {
-        # verify redirected stdout
-        my @actual = loadarray($STDOUT);
-
-        # variable-replace in the stdout we have from the test case file
-        @validstdout = fixarray(@validstdout);
-
-        # get all attributes
-        my %hash = getpartattr("verify", "stdout");
-
-        # get the mode attribute
-        my $filemode=$hash{'mode'};
-        if($filemode && ($filemode eq "text") && $has_textaware) {
-            # text mode when running on windows: fix line endings
-            map s/\r\n/\n/g, @actual;
-        }
-
-        if($hash{'nonewline'}) {
-            # Yes, we must cut off the final newline from the final line
-            # of the protocol data
-            chomp($validstdout[$#validstdout]);
-        }
-
-        $res = compare("stdout", \@actual, \@validstdout);
-        if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return 1;
-        }
-        $ok .= "s";
-    }
-    else {
-        $ok .= "-"; # stdout not checked
-    }
-
-    my %replyattr = getpartattr("reply", "data");
-    if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
-        # verify the received data
-        my @out = loadarray($CURLOUT);
-        my %hash = getpartattr("reply", "data");
-        # get the mode attribute
-        my $filemode=$hash{'mode'};
-        if($filemode && ($filemode eq "text") && $has_textaware) {
-            # text mode when running on windows: fix line endings
-            map s/\r\n/\n/g, @out;
-        }
-
-        $res = compare("data", \@out, \@reply);
-        if ($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return 1;
-        }
-        $ok .= "d";
-    }
-    else {
-        $ok .= "-"; # data not checked
-    }
-
-    if(@upload) {
-        # verify uploaded data
-        my @out = loadarray("$LOGDIR/upload.$testnum");
-        $res = compare("upload", \@out, \@upload);
-        if ($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return 1;
-        }
-        $ok .= "u";
-    }
-    else {
-        $ok .= "-"; # upload not checked
-    }
-
-    if(@protocol) {
-        # Verify the sent request
-        my @out = loadarray($SERVERIN);
-
-        # what to cut off from the live protocol sent by curl
-        my @strip = getpart("verify", "strip");
-
-        my @protstrip=@protocol;
-
-        # check if there's any attributes on the verify/protocol section
-        my %hash = getpartattr("verify", "protocol");
-
-        if($hash{'nonewline'}) {
-            # Yes, we must cut off the final newline from the final line
-            # of the protocol data
-            chomp($protstrip[$#protstrip]);
-        }
-
-        for(@strip) {
-            # strip off all lines that match the patterns from both arrays
-            chomp $_;
-            @out = striparray( $_, \@out);
-            @protstrip= striparray( $_, \@protstrip);
-        }
-
-        # what parts to cut off from the protocol
-        my @strippart = getpart("verify", "strippart");
-        my $strip;
-        for $strip (@strippart) {
-            chomp $strip;
-            for(@out) {
-                eval $strip;
-            }
-        }
-
-        $res = compare("protocol", \@out, \@protstrip);
-        if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return 1;
-        }
-
-        $ok .= "p";
-
-    }
-    else {
-        $ok .= "-"; # protocol not checked
-    }
-
-    my @outfile=getpart("verify", "file");
-    if(@outfile) {
-        # we're supposed to verify a dynamically generated file!
-        my %hash = getpartattr("verify", "file");
-
-        my $filename=$hash{'name'};
-        if(!$filename) {
-            logmsg "ERROR: section verify=>file has no name attribute\n";
-            stopservers($verbose);
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return -1;
-        }
-        my @generated=loadarray($filename);
-
-        # what parts to cut off from the file
-        my @stripfile = getpart("verify", "stripfile");
-
-        my $filemode=$hash{'mode'};
-        if($filemode && ($filemode eq "text") && $has_textaware) {
-            # text mode when running on windows means adding an extra
-            # strip expression
-            push @stripfile, "s/\r\n/\n/";
-        }
-
-        my $strip;
-        for $strip (@stripfile) {
-            chomp $strip;
-            for(@generated) {
-                eval $strip;
-            }
-        }
-
-        @outfile = fixarray(@outfile);
-
-        $res = compare("output", \@generated, \@outfile);
-        if($res) {
-            # timestamp test result verification end
-            $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-            return 1;
-        }
-
-        $ok .= "o";
-    }
-    else {
-        $ok .= "-"; # output not checked
-    }
-
-    # accept multiple comma-separated error codes
-    my @splerr = split(/ *, */, $errorcode);
-    my $errok;
-    foreach my $e (@splerr) {
-        if($e == $cmdres) {
-            # a fine error code
-            $errok = 1;
-            last;
-        }
-    }
-
-    if($errok) {
-        $ok .= "e";
-    }
-    else {
-        if(!$short) {
-            printf("\n%s returned $cmdres, %d was expected\n",
-                   (!$tool)?"curl":$tool, $errorcode);
-        }
-        logmsg " exit FAILED\n";
-        # timestamp test result verification end
-        $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-        return 1;
-    }
-
-    if($curl_debug) {
-        if(! -f $memdump) {
-            logmsg "\n** ALERT! memory debugging with no output file?\n"
-                if(!$cmdtype eq "perl");
-        }
-        else {
-            my @memdata=`$memanalyze $memdump`;
-            my $leak=0;
-            for(@memdata) {
-                if($_ ne "") {
-                    # well it could be other memory problems as well, but
-                    # we call it leak for short here
-                    $leak=1;
-                }
-            }
-            if($leak) {
-                logmsg "\n** MEMORY FAILURE\n";
-                logmsg @memdata;
-                # timestamp test result verification end
-                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-                return 1;
-            }
-            else {
-                $ok .= "m";
-            }
-        }
-    }
-    else {
-        $ok .= "-"; # memory not checked
-    }
-
-    if($valgrind) {
-        if($usevalgrind) {
-            unless(opendir(DIR, "$LOGDIR")) {
-                logmsg "ERROR: unable to read $LOGDIR\n";
-                # timestamp test result verification end
-                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-                return 1;
-            }
-            my @files = readdir(DIR);
-            closedir(DIR);
-            my $vgfile;
-            foreach my $file (@files) {
-                if($file =~ /^valgrind$testnum(\..*|)$/) {
-                    $vgfile = $file;
-                    last;
-                }
-            }
-            if(!$vgfile) {
-                logmsg "ERROR: valgrind log file missing for test $testnum\n";
-                # timestamp test result verification end
-                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-                return 1;
-            }
-            my @e = valgrindparse($srcdir, $feature{'SSL'}, "$LOGDIR/$vgfile");
-            if(@e && $e[0]) {
-                logmsg " valgrind ERROR ";
-                logmsg @e;
-                # timestamp test result verification end
-                $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-                return 1;
-            }
-            $ok .= "v";
-        }
-        else {
-            if(!$short && !$disablevalgrind) {
-                logmsg " valgrind SKIPPED\n";
-            }
-            $ok .= "-"; # skipped
-        }
-    }
-    else {
-        $ok .= "-"; # valgrind not checked
-    }
-
-    logmsg "$ok " if(!$short);
-
-    my $sofar= time()-$start;
-    my $esttotal = $sofar/$count * $total;
-    my $estleft = $esttotal - $sofar;
-    my $left=sprintf("remaining: %02d:%02d",
-                     $estleft/60,
-                     $estleft%60);
-    printf "OK (%-3d out of %-3d, %s)\n", $count, $total, $left;
-
-    # the test succeeded, remove all log files
-    if(!$keepoutfiles) {
-        cleardir($LOGDIR);
-    }
-
-    # timestamp test result verification end
-    $timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
-
-    return 0;
-}
-
-#######################################################################
-# Stop all running test servers
-sub stopservers {
-    my $verbose = $_[0];
-    #
-    # kill sockfilter processes for all pingpong servers
-    #
-    killallsockfilters($verbose);
-    #
-    # kill all server pids from %run hash clearing them
-    #
-    my $pidlist;
-    foreach my $server (keys %run) {
-        if($run{$server}) {
-            if($verbose) {
-                my $prev = 0;
-                my $pids = $run{$server};
-                foreach my $pid (split(' ', $pids)) {
-                    if($pid != $prev) {
-                        logmsg sprintf("* kill pid for %s => %d\n",
-                            $server, $pid);
-                        $prev = $pid;
-                    }
-                }
-            }
-            $pidlist .= "$run{$server} ";
-            $run{$server} = 0;
-        }
-        $runcert{$server} = 0 if($runcert{$server});
-    }
-    killpid($verbose, $pidlist);
-    #
-    # cleanup all server pid files
-    #
-    foreach my $server (keys %serverpidfile) {
-        my $pidfile = $serverpidfile{$server};
-        my $pid = processexists($pidfile);
-        if($pid > 0) {
-            logmsg "Warning: $server server unexpectedly alive\n";
-            killpid($verbose, $pid);
-        }
-        unlink($pidfile) if(-f $pidfile);
-    }
-}
-
-#######################################################################
-# startservers() starts all the named servers
-#
-# Returns: string with error reason or blank for success
-
-sub startservers {
-    my @what = @_;
-    my ($pid, $pid2);
-    for(@what) {
-        my (@whatlist) = split(/\s+/,$_);
-        my $what = lc($whatlist[0]);
-        $what =~ s/[^a-z0-9-]//g;
-
-        my $certfile;
-        if($what =~ /^(ftp|http|imap|pop3|smtp)s(.*)$/) {
-            $certfile = ($whatlist[1]) ? $whatlist[1] : 'stunnel.pem';
-        }
-
-        if(($what eq "pop3") ||
-           ($what eq "ftp") ||
-           ($what eq "imap") ||
-           ($what eq "smtp")) {
-            if(!$run{$what}) {
-                ($pid, $pid2) = runpingpongserver($what, "", $verbose);
-                if($pid <= 0) {
-                    return "failed starting ". uc($what) ." server";
-                }
-                printf ("* pid $what => %d %d\n", $pid, $pid2) if($verbose);
-                $run{$what}="$pid $pid2";
-            }
-        }
-        elsif($what eq "ftp2") {
-            if(!$run{'ftp2'}) {
-                ($pid, $pid2) = runpingpongserver("ftp", "2", $verbose);
-                if($pid <= 0) {
-                    return "failed starting FTP2 server";
-                }
-                printf ("* pid ftp2 => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'ftp2'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "ftp-ipv6") {
-            if(!$run{'ftp-ipv6'}) {
-                ($pid, $pid2) = runpingpongserver("ftp", "", $verbose, "ipv6");
-                if($pid <= 0) {
-                    return "failed starting FTP-IPv6 server";
-                }
-                logmsg sprintf("* pid ftp-ipv6 => %d %d\n", $pid,
-                       $pid2) if($verbose);
-                $run{'ftp-ipv6'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "gopher") {
-            if(!$run{'gopher'}) {
-                ($pid, $pid2) = runhttpserver("gopher", $verbose, 0,
-                                              $GOPHERPORT);
-                if($pid <= 0) {
-                    return "failed starting GOPHER server";
-                }
-                printf ("* pid gopher => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'gopher'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "gopher-ipv6") {
-            if(!$run{'gopher-ipv6'}) {
-                ($pid, $pid2) = runhttpserver("gopher", $verbose, "ipv6",
-                                              $GOPHER6PORT);
-                if($pid <= 0) {
-                    return "failed starting GOPHER-IPv6 server";
-                }
-                logmsg sprintf("* pid gopher-ipv6 => %d %d\n", $pid,
-                               $pid2) if($verbose);
-                $run{'gopher-ipv6'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "http") {
-            if(!$run{'http'}) {
-                ($pid, $pid2) = runhttpserver("http", $verbose, 0,
-                                              $HTTPPORT);
-                if($pid <= 0) {
-                    return "failed starting HTTP server";
-                }
-                printf ("* pid http => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'http'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "http-ipv6") {
-            if(!$run{'http-ipv6'}) {
-                ($pid, $pid2) = runhttpserver("http", $verbose, "IPv6",
-                                              $HTTP6PORT);
-                if($pid <= 0) {
-                    return "failed starting HTTP-IPv6 server";
-                }
-                logmsg sprintf("* pid http-ipv6 => %d %d\n", $pid, $pid2)
-                    if($verbose);
-                $run{'http-ipv6'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "rtsp") {
-            if(!$run{'rtsp'}) {
-                ($pid, $pid2) = runrtspserver($verbose);
-                if($pid <= 0) {
-                    return "failed starting RTSP server";
-                }
-                printf ("* pid rtsp => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'rtsp'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "rtsp-ipv6") {
-            if(!$run{'rtsp-ipv6'}) {
-                ($pid, $pid2) = runrtspserver($verbose, "IPv6");
-                if($pid <= 0) {
-                    return "failed starting RTSP-IPv6 server";
-                }
-                logmsg sprintf("* pid rtsp-ipv6 => %d %d\n", $pid, $pid2)
-                    if($verbose);
-                $run{'rtsp-ipv6'}="$pid $pid2";
-            }
-        }
-
-        elsif($what eq "ftps") {
-            if(!$stunnel) {
-                # we can't run ftps tests without stunnel
-                return "no stunnel";
-            }
-            if(!$ssl_version) {
-                # we can't run ftps tests if libcurl is SSL-less
-                return "curl lacks SSL support";
-            }
-            if($runcert{'ftps'} && ($runcert{'ftps'} ne $certfile)) {
-                # stop server when running and using a different cert
-                stopserver('ftps');
-            }
-            if(!$run{'ftp'}) {
-                ($pid, $pid2) = runpingpongserver("ftp", "", $verbose);
-                if($pid <= 0) {
-                    return "failed starting FTP server";
-                }
-                printf ("* pid ftp => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'ftp'}="$pid $pid2";
-            }
-            if(!$run{'ftps'}) {
-                ($pid, $pid2) = runftpsserver($verbose, "", $certfile);
-                if($pid <= 0) {
-                    return "failed starting FTPS server (stunnel)";
-                }
-                logmsg sprintf("* pid ftps => %d %d\n", $pid, $pid2)
-                    if($verbose);
-                $run{'ftps'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "file") {
-            # we support it but have no server!
-        }
-        elsif($what eq "https") {
-            if(!$stunnel) {
-                # we can't run ftps tests without stunnel
-                return "no stunnel";
-            }
-            if(!$ssl_version) {
-                # we can't run ftps tests if libcurl is SSL-less
-                return "curl lacks SSL support";
-            }
-            if($runcert{'https'} && ($runcert{'https'} ne $certfile)) {
-                # stop server when running and using a different cert
-                stopserver('https');
-            }
-            if(!$run{'http'}) {
-                ($pid, $pid2) = runhttpserver("http", $verbose, 0,
-                                              $HTTPPORT);
-                if($pid <= 0) {
-                    return "failed starting HTTP server";
-                }
-                printf ("* pid http => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'http'}="$pid $pid2";
-            }
-            if(!$run{'https'}) {
-                ($pid, $pid2) = runhttpsserver($verbose, "", $certfile);
-                if($pid <= 0) {
-                    return "failed starting HTTPS server (stunnel)";
-                }
-                logmsg sprintf("* pid https => %d %d\n", $pid, $pid2)
-                    if($verbose);
-                $run{'https'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "tftp") {
-            if(!$run{'tftp'}) {
-                ($pid, $pid2) = runtftpserver("", $verbose);
-                if($pid <= 0) {
-                    return "failed starting TFTP server";
-                }
-                printf ("* pid tftp => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'tftp'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "tftp-ipv6") {
-            if(!$run{'tftp-ipv6'}) {
-                ($pid, $pid2) = runtftpserver("", $verbose, "IPv6");
-                if($pid <= 0) {
-                    return "failed starting TFTP-IPv6 server";
-                }
-                printf("* pid tftp-ipv6 => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'tftp-ipv6'}="$pid $pid2";
-            }
-        }
-        elsif($what eq "sftp" || $what eq "scp" || $what eq "socks4" || $what eq "socks5" ) {
-            if(!$run{'ssh'}) {
-                ($pid, $pid2) = runsshserver("", $verbose);
-                if($pid <= 0) {
-                    return "failed starting SSH server";
-                }
-                printf ("* pid ssh => %d %d\n", $pid, $pid2) if($verbose);
-                $run{'ssh'}="$pid $pid2";
-            }
-            if($what eq "socks4" || $what eq "socks5") {
-                if(!$run{'socks'}) {
-                    ($pid, $pid2) = runsocksserver("", $verbose);
-                    if($pid <= 0) {
-                        return "failed starting socks server";
-                    }
-                    printf ("* pid socks => %d %d\n", $pid, $pid2) if($verbose);
-                    $run{'socks'}="$pid $pid2";
-                }
-            }
-            if($what eq "socks5") {
-                if(!$sshdid) {
-                    # Not an OpenSSH or SunSSH ssh daemon
-                    logmsg "Not OpenSSH or SunSSH; socks5 tests need at least OpenSSH 3.7\n";
-                    return "failed starting socks5 server";
-                }
-                elsif(($sshdid =~ /OpenSSH/) && ($sshdvernum < 370)) {
-                    # Need OpenSSH 3.7 for socks5 - http://www.openssh.com/txt/release-3.7
-                    logmsg "$sshdverstr insufficient; socks5 tests need at least OpenSSH 3.7\n";
-                    return "failed starting socks5 server";
-                }
-                elsif(($sshdid =~ /SunSSH/)  && ($sshdvernum < 100)) {
-                    # Need SunSSH 1.0 for socks5
-                    logmsg "$sshdverstr insufficient; socks5 tests need at least SunSSH 1.0\n";
-                    return "failed starting socks5 server";
-                }
-            }
-        }
-        elsif($what eq "none") {
-            logmsg "* starts no server\n" if ($verbose);
-        }
-        else {
-            warn "we don't support a server for $what";
-            return "no server for $what";
-        }
-    }
-    return 0;
-}
-
-##############################################################################
-# This function makes sure the right set of server is running for the
-# specified test case. This is a useful design when we run single tests as not
-# all servers need to run then!
-#
-# Returns: a string, blank if everything is fine or a reason why it failed
-#
-
-sub serverfortest {
-    my ($testnum)=@_;
-
-    my @what = getpart("client", "server");
-
-    if(!$what[0]) {
-        warn "Test case $testnum has no server(s) specified";
-        return "no server specified";
-    }
-
-    for (@what) {
-        my $proto = lc($_);
-        chomp $proto;
-        $proto =~ s/\s.*//g;  # take first word
-        if (! grep /^$proto$/, @protocols) {
-            if (substr($proto,0,5) ne "socks") {
-                return "curl lacks $proto support";
-            }
-        }
-    }
-
-    return &startservers(@what);
-}
-
-#######################################################################
-# runtimestats displays test-suite run time statistics
-#
-sub runtimestats {
-    my $lasttest = $_[0];
-
-    return if(not $timestats);
-
-    logmsg "\nTest suite total running time breakdown per task...\n\n";
-
-    my @timesrvr;
-    my @timeprep;
-    my @timetool;
-    my @timelock;
-    my @timevrfy;
-    my @timetest;
-    my $timesrvrtot = 0.0;
-    my $timepreptot = 0.0;
-    my $timetooltot = 0.0;
-    my $timelocktot = 0.0;
-    my $timevrfytot = 0.0;
-    my $timetesttot = 0.0;
-    my $counter;
-
-    for my $testnum (1 .. $lasttest) {
-        if($timesrvrini{$testnum}) {
-            $timesrvrtot += $timesrvrend{$testnum} - $timesrvrini{$testnum};
-            $timepreptot +=
-                (($timetoolini{$testnum} - $timeprepini{$testnum}) -
-                 ($timesrvrend{$testnum} - $timesrvrini{$testnum}));
-            $timetooltot += $timetoolend{$testnum} - $timetoolini{$testnum};
-            $timelocktot += $timesrvrlog{$testnum} - $timetoolend{$testnum};
-            $timevrfytot += $timevrfyend{$testnum} - $timesrvrlog{$testnum};
-            $timetesttot += $timevrfyend{$testnum} - $timeprepini{$testnum};
-            push @timesrvr, sprintf("%06.3f  %04d",
-                $timesrvrend{$testnum} - $timesrvrini{$testnum}, $testnum);
-            push @timeprep, sprintf("%06.3f  %04d",
-                ($timetoolini{$testnum} - $timeprepini{$testnum}) -
-                ($timesrvrend{$testnum} - $timesrvrini{$testnum}), $testnum);
-            push @timetool, sprintf("%06.3f  %04d",
-                $timetoolend{$testnum} - $timetoolini{$testnum}, $testnum);
-            push @timelock, sprintf("%06.3f  %04d",
-                $timesrvrlog{$testnum} - $timetoolend{$testnum}, $testnum);
-            push @timevrfy, sprintf("%06.3f  %04d",
-                $timevrfyend{$testnum} - $timesrvrlog{$testnum}, $testnum);
-            push @timetest, sprintf("%06.3f  %04d",
-                $timevrfyend{$testnum} - $timeprepini{$testnum}, $testnum);
-        }
-    }
-
-    {
-        no warnings 'numeric';
-        @timesrvr = sort { $b <=> $a } @timesrvr;
-        @timeprep = sort { $b <=> $a } @timeprep;
-        @timetool = sort { $b <=> $a } @timetool;
-        @timelock = sort { $b <=> $a } @timelock;
-        @timevrfy = sort { $b <=> $a } @timevrfy;
-        @timetest = sort { $b <=> $a } @timetest;
-    }
-
-    logmsg "Spent ". sprintf("%08.3f ", $timesrvrtot) .
-           "seconds starting and verifying test harness servers.\n";
-    logmsg "Spent ". sprintf("%08.3f ", $timepreptot) .
-           "seconds reading definitions and doing test preparations.\n";
-    logmsg "Spent ". sprintf("%08.3f ", $timetooltot) .
-           "seconds actually running test tools.\n";
-    logmsg "Spent ". sprintf("%08.3f ", $timelocktot) .
-           "seconds awaiting server logs lock removal.\n";
-    logmsg "Spent ". sprintf("%08.3f ", $timevrfytot) .
-           "seconds verifying test results.\n";
-    logmsg "Spent ". sprintf("%08.3f ", $timetesttot) .
-           "seconds doing all of the above.\n";
-
-    $counter = 25;
-    logmsg "\nTest server starting and verification time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timesrvr) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    $counter = 10;
-    logmsg "\nTest definition reading and preparation time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timeprep) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    $counter = 25;
-    logmsg "\nTest tool execution time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timetool) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    $counter = 15;
-    logmsg "\nTest server logs lock removal time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timelock) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    $counter = 10;
-    logmsg "\nTest results verification time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timevrfy) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    $counter = 50;
-    logmsg "\nTotal time per test ".
-        sprintf("(%s)...\n\n", (not $fullstats)?"top $counter":"full");
-    logmsg "-time-  test\n";
-    logmsg "------  ----\n";
-    foreach my $txt (@timetest) {
-        last if((not $fullstats) && (not $counter--));
-        logmsg "$txt\n";
-    }
-
-    logmsg "\n";
-}
-
-#######################################################################
-# Check options to this test program
-#
-
-my $number=0;
-my $fromnum=-1;
-my @testthis;
-my %disabled;
-while(@ARGV) {
-    if ($ARGV[0] eq "-v") {
-        # verbose output
-        $verbose=1;
-    }
-    elsif($ARGV[0] =~ /^-b(.*)/) {
-        my $portno=$1;
-        if($portno =~ s/(\d+)$//) {
-            $base = int $1;
-        }
-    }
-    elsif ($ARGV[0] eq "-c") {
-        # use this path to curl instead of default
-        $DBGCURL=$CURL=$ARGV[1];
-        shift @ARGV;
-    }
-    elsif ($ARGV[0] eq "-d") {
-        # have the servers display protocol output
-        $debugprotocol=1;
-    }
-    elsif ($ARGV[0] eq "-f") {
-        # run fork-servers, which makes the server fork for all new
-        # connections This is NOT what you wanna do without knowing exactly
-        # why and for what
-        $forkserver=1;
-    }
-    elsif ($ARGV[0] eq "-g") {
-        # run this test with gdb
-        $gdbthis=1;
-    }
-    elsif($ARGV[0] eq "-s") {
-        # short output
-        $short=1;
-    }
-    elsif($ARGV[0] eq "-n") {
-        # no valgrind
-        undef $valgrind;
-    }
-    elsif($ARGV[0] =~ /^-t(.*)/) {
-        # torture
-        $torture=1;
-        my $xtra = $1;
-
-        if($xtra =~ s/(\d+)$//) {
-            $tortalloc = $1;
-        }
-        # we undef valgrind to make this fly in comparison
-        undef $valgrind;
-    }
-    elsif($ARGV[0] eq "-a") {
-        # continue anyway, even if a test fail
-        $anyway=1;
-    }
-    elsif($ARGV[0] eq "-p") {
-        $postmortem=1;
-    }
-    elsif($ARGV[0] eq "-l") {
-        # lists the test case names only
-        $listonly=1;
-    }
-    elsif($ARGV[0] eq "-k") {
-        # keep stdout and stderr files after tests
-        $keepoutfiles=1;
-    }
-    elsif($ARGV[0] eq "-r") {
-        # run time statistics needs Time::HiRes
-        if($Time::HiRes::VERSION) {
-            keys(%timeprepini) = 1000;
-            keys(%timesrvrini) = 1000;
-            keys(%timesrvrend) = 1000;
-            keys(%timetoolini) = 1000;
-            keys(%timetoolend) = 1000;
-            keys(%timesrvrlog) = 1000;
-            keys(%timevrfyend) = 1000;
-            $timestats=1;
-            $fullstats=0;
-        }
-    }
-    elsif($ARGV[0] eq "-rf") {
-        # run time statistics needs Time::HiRes
-        if($Time::HiRes::VERSION) {
-            keys(%timeprepini) = 1000;
-            keys(%timesrvrini) = 1000;
-            keys(%timesrvrend) = 1000;
-            keys(%timetoolini) = 1000;
-            keys(%timetoolend) = 1000;
-            keys(%timesrvrlog) = 1000;
-            keys(%timevrfyend) = 1000;
-            $timestats=1;
-            $fullstats=1;
-        }
-    }
-    elsif(($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) {
-        # show help text
-        print <<EOHELP
-Usage: runtests.pl [options] [test selection(s)]
-  -a       continue even if a test fails
-  -bN      use base port number N for test servers (default $base)
-  -c path  use this curl executable
-  -d       display server debug info
-  -g       run the test case with gdb
-  -h       this help text
-  -k       keep stdout and stderr files present after tests
-  -l       list all test case names/descriptions
-  -n       no valgrind
-  -p       print log file contents when a test fails
-  -r       run time statistics
-  -rf      full run time statistics
-  -s       short output
-  -t[N]    torture (simulate memory alloc failures); N means fail Nth alloc
-  -v       verbose output
-  [num]    like "5 6 9" or " 5 to 22 " to run those tests only
-  [!num]   like "!5 !6 !9" to disable those tests
-  [keyword] like "IPv6" to select only tests containing the key word
-  [!keyword] like "!cookies" to disable any tests containing the key word
-EOHELP
-    ;
-        exit;
-    }
-    elsif($ARGV[0] =~ /^(\d+)/) {
-        $number = $1;
-        if($fromnum >= 0) {
-            for($fromnum .. $number) {
-                push @testthis, $_;
-            }
-            $fromnum = -1;
-        }
-        else {
-            push @testthis, $1;
-        }
-    }
-    elsif($ARGV[0] =~ /^to$/i) {
-        $fromnum = $number+1;
-    }
-    elsif($ARGV[0] =~ /^!(\d+)/) {
-        $fromnum = -1;
-        $disabled{$1}=$1;
-    }
-    elsif($ARGV[0] =~ /^!(.+)/) {
-        $disabled_keywords{$1}=$1;
-    }
-    elsif($ARGV[0] =~ /^([-[{a-zA-Z].*)/) {
-        $enabled_keywords{$1}=$1;
-    }
-    else {
-        print "Unknown option: $ARGV[0]\n";
-        exit;
-    }
-    shift @ARGV;
-}
-
-if(@testthis && ($testthis[0] ne "")) {
-    $TESTCASES=join(" ", @testthis);
-}
-
-if($valgrind) {
-    # we have found valgrind on the host, use it
-
-    # verify that we can invoke it fine
-    my $code = runclient("valgrind >/dev/null 2>&1");
-
-    if(($code>>8) != 1) {
-        #logmsg "Valgrind failure, disable it\n";
-        undef $valgrind;
-    } else {
-
-        # since valgrind 2.1.x, '--tool' option is mandatory
-        # use it, if it is supported by the version installed on the system
-        runclient("valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1");
-        if (($? >> 8)==0) {
-            $valgrind_tool="--tool=memcheck";
-        }
-        open(C, "<$CURL");
-        my $l = <C>;
-        if($l =~ /^\#\!/) {
-            # A shell script. This is typically when built with libtool,
-            $valgrind="../libtool --mode=execute $valgrind";
-        }
-        close(C);
-
-        # valgrind 3 renamed the --logfile option to --log-file!!!
-        my $ver=join(' ', runclientoutput("valgrind --version"));
-        # cut off all but digits and dots
-        $ver =~ s/[^0-9.]//g;
-
-        if($ver =~ /^(\d+)/) {
-            $ver = $1;
-            if($ver >= 3) {
-                $valgrind_logfile="--log-file";
-            }
-        }
-    }
-}
-
-if ($gdbthis) {
-    # open the executable curl and read the first 4 bytes of it
-    open(CHECK, "<$CURL");
-    my $c;
-    sysread CHECK, $c, 4;
-    close(CHECK);
-    if($c eq "#! /") {
-        # A shell script. This is typically when built with libtool,
-        $libtool = 1;
-        $gdb = "libtool --mode=execute gdb";
-    }
-}
-
-$HTTPPORT =  $base++; # HTTP server port
-$HTTPSPORT = $base++; # HTTPS server port
-$FTPPORT =   $base++; # FTP server port
-$FTPSPORT =  $base++; # FTPS server port
-$HTTP6PORT = $base++; # HTTP IPv6 server port (different IP protocol
-                        # but we follow the same port scheme anyway)
-$FTP2PORT =  $base++; # FTP server 2 port
-$FTP6PORT =  $base++; # FTP IPv6 port
-$TFTPPORT =  $base++; # TFTP (UDP) port
-$TFTP6PORT = $base++; # TFTP IPv6 (UDP) port
-$SSHPORT =   $base++; # SSH (SCP/SFTP) port
-$SOCKSPORT = $base++; # SOCKS port
-$POP3PORT =  $base++;
-$POP36PORT = $base++;
-$IMAPPORT =  $base++;
-$IMAP6PORT = $base++;
-$SMTPPORT =  $base++;
-$SMTP6PORT = $base++;
-$RTSPPORT =  $base++;
-$RTSP6PORT = $base++;
-$GOPHERPORT =$base++;
-$GOPHER6PORT=$base++;
-
-#######################################################################
-# clear and create logging directory:
-#
-
-cleardir($LOGDIR);
-mkdir($LOGDIR, 0777);
-
-#######################################################################
-# initialize some variables
-#
-
-get_disttests();
-init_serverpidfile_hash();
-
-#######################################################################
-# Output curl version and host info being tested
-#
-
-if(!$listonly) {
-    checksystem();
-}
-
-#######################################################################
-# If 'all' tests are requested, find out all test numbers
-#
-
-if ( $TESTCASES eq "all") {
-    # Get all commands and find out their test numbers
-    opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
-    my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
-    closedir(DIR);
-
-    open(D, "<$TESTDIR/DISABLED");
-    while(<D>) {
-        if(/^ *\#/) {
-            # allow comments
-            next;
-        }
-        if($_ =~ /(\d+)/) {
-            $disabled{$1}=$1; # disable this test number
-        }
-    }
-    close(D);
-
-    $TESTCASES=""; # start with no test cases
-
-    # cut off everything but the digits
-    for(@cmds) {
-        $_ =~ s/[a-z\/\.]*//g;
-    }
-    # sort the numbers from low to high
-    foreach my $n (sort { $a <=> $b } @cmds) {
-        if($disabled{$n}) {
-            # skip disabled test cases
-            my $why = "configured as DISABLED";
-            $skipped++;
-            $skipped{$why}++;
-            $teststat[$n]=$why; # store reason for this test case
-            next;
-        }
-        $TESTCASES .= " $n";
-    }
-}
-
-#######################################################################
-# Start the command line log
-#
-open(CMDLOG, ">$CURLLOG") ||
-    logmsg "can't log command lines to $CURLLOG\n";
-
-#######################################################################
-
-# Display the contents of the given file.  Line endings are canonicalized
-# and excessively long files are elided
-sub displaylogcontent {
-    my ($file)=@_;
-    if(open(SINGLE, "<$file")) {
-        my $linecount = 0;
-        my $truncate;
-        my @tail;
-        while(my $string = <SINGLE>) {
-            $string =~ s/\r\n/\n/g;
-            $string =~ s/[\r\f\032]/\n/g;
-            $string .= "\n" unless ($string =~ /\n$/);
-            $string =~ tr/\n//;
-            for my $line (split("\n", $string)) {
-                $line =~ s/\s*\!$//;
-                if ($truncate) {
-                    push @tail, " $line\n";
-                } else {
-                    logmsg " $line\n";
-                }
-                $linecount++;
-                $truncate = $linecount > 1000;
-            }
-        }
-        if(@tail) {
-            my $tailshow = 200;
-            my $tailskip = 0;
-            my $tailtotal = scalar @tail;
-            if($tailtotal > $tailshow) {
-                $tailskip = $tailtotal - $tailshow;
-                logmsg "=== File too long: $tailskip lines omitted here\n";
-            }
-            for($tailskip .. $tailtotal-1) {
-                logmsg "$tail[$_]";
-            }
-        }
-        close(SINGLE);
-    }
-}
-
-sub displaylogs {
-    my ($testnum)=@_;
-    opendir(DIR, "$LOGDIR") ||
-        die "can't open dir: $!";
-    my @logs = readdir(DIR);
-    closedir(DIR);
-
-    logmsg "== Contents of files in the $LOGDIR/ dir after test $testnum\n";
-    foreach my $log (sort @logs) {
-        if($log =~ /\.(\.|)$/) {
-            next; # skip "." and ".."
-        }
-        if($log =~ /^\.nfs/) {
-            next; # skip ".nfs"
-        }
-        if(($log eq "memdump") || ($log eq "core")) {
-            next; # skip "memdump" and  "core"
-        }
-        if((-d "$LOGDIR/$log") || (! -s "$LOGDIR/$log")) {
-            next; # skip directory and empty files
-        }
-        if(($log =~ /^stdout\d+/) && ($log !~ /^stdout$testnum/)) {
-            next; # skip stdoutNnn of other tests
-        }
-        if(($log =~ /^stderr\d+/) && ($log !~ /^stderr$testnum/)) {
-            next; # skip stderrNnn of other tests
-        }
-        if(($log =~ /^upload\d+/) && ($log !~ /^upload$testnum/)) {
-            next; # skip uploadNnn of other tests
-        }
-        if(($log =~ /^curl\d+\.out/) && ($log !~ /^curl$testnum\.out/)) {
-            next; # skip curlNnn.out of other tests
-        }
-        if(($log =~ /^test\d+\.txt/) && ($log !~ /^test$testnum\.txt/)) {
-            next; # skip testNnn.txt of other tests
-        }
-        if(($log =~ /^file\d+\.txt/) && ($log !~ /^file$testnum\.txt/)) {
-            next; # skip fileNnn.txt of other tests
-        }
-        if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum(\..*|)$/)) {
-            next; # skip valgrindNnn of other tests
-        }
-        logmsg "=== Start of file $log\n";
-        displaylogcontent("$LOGDIR/$log");
-        logmsg "=== End of file $log\n";
-    }
-}
-
-#######################################################################
-# The main test-loop
-#
-
-my $failed;
-my $testnum;
-my $ok=0;
-my $total=0;
-my $lasttest=0;
-my @at = split(" ", $TESTCASES);
-my $count=0;
-
-$start = time();
-
-foreach $testnum (@at) {
-
-    $lasttest = $testnum if($testnum > $lasttest);
-    $count++;
-
-    my $error = singletest($testnum, $count, scalar(@at));
-    if($error < 0) {
-        # not a test we can run
-        next;
-    }
-
-    $total++; # number of tests we've run
-
-    if($error>0) {
-        $failed.= "$testnum ";
-        if($postmortem) {
-            # display all files in log/ in a nice way
-            displaylogs($testnum);
-        }
-        if(!$anyway) {
-            # a test failed, abort
-            logmsg "\n - abort tests\n";
-            last;
-        }
-    }
-    elsif(!$error) {
-        $ok++; # successful test counter
-    }
-
-    # loop for next test
-}
-
-my $sofar = time() - $start;
-
-#######################################################################
-# Close command log
-#
-close(CMDLOG);
-
-# Tests done, stop the servers
-stopservers($verbose);
-
-my $all = $total + $skipped;
-
-runtimestats($lasttest);
-
-if($total) {
-    logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
-                   $ok/$total*100);
-
-    if($ok != $total) {
-        logmsg "TESTFAIL: These test cases failed: $failed\n";
-    }
-}
-else {
-    logmsg "TESTFAIL: No tests were performed\n";
-}
-
-if($all) {
-    logmsg "TESTDONE: $all tests were considered during ".
-        sprintf("%.0f", $sofar) ." seconds.\n";
-}
-
-if($skipped) {
-    my $s=0;
-    logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
-
-    for(keys %skipped) {
-        my $r = $_;
-        printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$_};
-
-        # now show all test case numbers that had this reason for being
-        # skipped
-        my $c=0;
-        for(0 .. scalar @teststat) {
-            my $t = $_;
-            if($teststat[$_] && ($teststat[$_] eq $r)) {
-                logmsg ", " if($c);
-                logmsg $_;
-                $c++;
-            }
-        }
-        logmsg ")\n";
-    }
-}
-
-if($total && ($ok != $total)) {
-    exit 1;
-}
index 064fa84..36a902e 100755 (executable)
@@ -26,7 +26,8 @@
 # non-secure test harness servers.
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, '.');
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
 }
 
 use strict;
index d4b9cc3..7533a98 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -27,31 +27,38 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
 
 if USE_EMBEDDED_ARES
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib            \
-           -I$(top_builddir)/ares         \
-           -I$(top_srcdir)/ares
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_builddir)/ares         \
+              -I$(top_srcdir)/ares
 else
-INCLUDES = -I$(top_builddir)/include/curl \
-           -I$(top_builddir)/include      \
-           -I$(top_srcdir)/include        \
-           -I$(top_builddir)/lib          \
-           -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib
 endif
 
-# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD)
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if DOING_NATIVE_WINDOWS
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
+# Makefile.inc provides neat definitions
 include Makefile.inc
 
-extra_DIST = base64.pl Makefile.inc
+EXTRA_DIST = base64.pl Makefile.inc
 
index a998155..b30c599 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,131 +78,223 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/Makefile.inc
+@DOING_NATIVE_WINDOWS_TRUE@am__append_1 = -DCURL_STATICLIB
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \
+       $(top_srcdir)/depcomp
 noinst_PROGRAMS = getpart$(EXEEXT) resolve$(EXEEXT) rtspd$(EXEEXT) \
-       sockfilt$(EXEEXT) sws$(EXEEXT) tftpd$(EXEEXT)
+       sockfilt$(EXEEXT) sws$(EXEEXT) tftpd$(EXEEXT) \
+       fake_ntlm$(EXEEXT)
 subdir = tests/server
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
        $(top_srcdir)/m4/curl-confopts.m4 \
        $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
        $(top_srcdir)/m4/curl-override.m4 \
-       $(top_srcdir)/m4/curl-reentrant.m4 \
-       $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
        $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
        $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
-       $(top_builddir)/src/curl_config.h \
        $(top_builddir)/include/curl/curlbuild.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am__objects_1 = getpart-mprintf.$(OBJEXT) getpart-nonblock.$(OBJEXT) \
+am__objects_1 = fake_ntlm-mprintf.$(OBJEXT) \
+       fake_ntlm-nonblock.$(OBJEXT) fake_ntlm-strequal.$(OBJEXT) \
+       fake_ntlm-strtoofft.$(OBJEXT) fake_ntlm-timeval.$(OBJEXT) \
+       fake_ntlm-warnless.$(OBJEXT)
+am__objects_2 =
+am__objects_3 = fake_ntlm-getpart.$(OBJEXT) fake_ntlm-base64.$(OBJEXT) \
+       fake_ntlm-memdebug.$(OBJEXT)
+am__objects_4 = fake_ntlm-util.$(OBJEXT)
+am_fake_ntlm_OBJECTS = $(am__objects_1) $(am__objects_2) \
+       $(am__objects_3) $(am__objects_4) \
+       fake_ntlm-fake_ntlm.$(OBJEXT)
+fake_ntlm_OBJECTS = $(am_fake_ntlm_OBJECTS)
+fake_ntlm_DEPENDENCIES =
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+fake_ntlm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(fake_ntlm_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_5 = getpart-mprintf.$(OBJEXT) getpart-nonblock.$(OBJEXT) \
        getpart-strequal.$(OBJEXT) getpart-strtoofft.$(OBJEXT) \
        getpart-timeval.$(OBJEXT) getpart-warnless.$(OBJEXT)
-am__objects_2 =
-am__objects_3 = getpart-getpart.$(OBJEXT) getpart-base64.$(OBJEXT) \
+am__objects_6 = getpart-getpart.$(OBJEXT) getpart-base64.$(OBJEXT) \
        getpart-memdebug.$(OBJEXT)
-am_getpart_OBJECTS = $(am__objects_1) $(am__objects_2) \
-       $(am__objects_3) getpart-testpart.$(OBJEXT)
+am_getpart_OBJECTS = $(am__objects_5) $(am__objects_2) \
+       $(am__objects_6) getpart-testpart.$(OBJEXT)
 getpart_OBJECTS = $(am_getpart_OBJECTS)
 getpart_DEPENDENCIES =
-am__objects_4 = resolve-mprintf.$(OBJEXT) resolve-nonblock.$(OBJEXT) \
+getpart_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(getpart_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_7 = resolve-mprintf.$(OBJEXT) resolve-nonblock.$(OBJEXT) \
        resolve-strequal.$(OBJEXT) resolve-strtoofft.$(OBJEXT) \
        resolve-timeval.$(OBJEXT) resolve-warnless.$(OBJEXT)
-am__objects_5 = resolve-getpart.$(OBJEXT) resolve-base64.$(OBJEXT) \
+am__objects_8 = resolve-getpart.$(OBJEXT) resolve-base64.$(OBJEXT) \
        resolve-memdebug.$(OBJEXT)
-am__objects_6 = resolve-util.$(OBJEXT)
-am_resolve_OBJECTS = $(am__objects_4) $(am__objects_2) \
-       $(am__objects_5) $(am__objects_6) resolve-resolve.$(OBJEXT)
+am__objects_9 = resolve-util.$(OBJEXT)
+am_resolve_OBJECTS = $(am__objects_7) $(am__objects_2) \
+       $(am__objects_8) $(am__objects_9) resolve-resolve.$(OBJEXT)
 resolve_OBJECTS = $(am_resolve_OBJECTS)
 resolve_DEPENDENCIES =
-am__objects_7 = rtspd-mprintf.$(OBJEXT) rtspd-nonblock.$(OBJEXT) \
+resolve_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(resolve_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_10 = rtspd-mprintf.$(OBJEXT) rtspd-nonblock.$(OBJEXT) \
        rtspd-strequal.$(OBJEXT) rtspd-strtoofft.$(OBJEXT) \
        rtspd-timeval.$(OBJEXT) rtspd-warnless.$(OBJEXT)
-am__objects_8 = rtspd-getpart.$(OBJEXT) rtspd-base64.$(OBJEXT) \
+am__objects_11 = rtspd-getpart.$(OBJEXT) rtspd-base64.$(OBJEXT) \
        rtspd-memdebug.$(OBJEXT)
-am__objects_9 = rtspd-util.$(OBJEXT)
-am_rtspd_OBJECTS = $(am__objects_7) $(am__objects_2) $(am__objects_8) \
-       $(am__objects_9) rtspd-rtspd.$(OBJEXT)
+am__objects_12 = rtspd-util.$(OBJEXT)
+am_rtspd_OBJECTS = $(am__objects_10) $(am__objects_2) \
+       $(am__objects_11) $(am__objects_12) rtspd-rtspd.$(OBJEXT)
 rtspd_OBJECTS = $(am_rtspd_OBJECTS)
 rtspd_DEPENDENCIES =
-am__objects_10 = sockfilt-mprintf.$(OBJEXT) \
+rtspd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rtspd_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_13 = sockfilt-mprintf.$(OBJEXT) \
        sockfilt-nonblock.$(OBJEXT) sockfilt-strequal.$(OBJEXT) \
        sockfilt-strtoofft.$(OBJEXT) sockfilt-timeval.$(OBJEXT) \
        sockfilt-warnless.$(OBJEXT)
-am__objects_11 = sockfilt-getpart.$(OBJEXT) sockfilt-base64.$(OBJEXT) \
+am__objects_14 = sockfilt-getpart.$(OBJEXT) sockfilt-base64.$(OBJEXT) \
        sockfilt-memdebug.$(OBJEXT)
-am__objects_12 = sockfilt-util.$(OBJEXT)
-am_sockfilt_OBJECTS = $(am__objects_10) $(am__objects_2) \
-       $(am__objects_11) $(am__objects_12) \
+am__objects_15 = sockfilt-util.$(OBJEXT)
+am_sockfilt_OBJECTS = $(am__objects_13) $(am__objects_2) \
+       $(am__objects_14) $(am__objects_15) \
        sockfilt-sockfilt.$(OBJEXT) sockfilt-inet_pton.$(OBJEXT)
 sockfilt_OBJECTS = $(am_sockfilt_OBJECTS)
 sockfilt_DEPENDENCIES =
-am__objects_13 = sws-mprintf.$(OBJEXT) sws-nonblock.$(OBJEXT) \
+sockfilt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(sockfilt_CFLAGS) \
+       $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_16 = sws-mprintf.$(OBJEXT) sws-nonblock.$(OBJEXT) \
        sws-strequal.$(OBJEXT) sws-strtoofft.$(OBJEXT) \
        sws-timeval.$(OBJEXT) sws-warnless.$(OBJEXT)
-am__objects_14 = sws-getpart.$(OBJEXT) sws-base64.$(OBJEXT) \
+am__objects_17 = sws-getpart.$(OBJEXT) sws-base64.$(OBJEXT) \
        sws-memdebug.$(OBJEXT)
-am__objects_15 = sws-util.$(OBJEXT)
-am_sws_OBJECTS = $(am__objects_13) $(am__objects_2) $(am__objects_14) \
-       $(am__objects_15) sws-sws.$(OBJEXT)
+am__objects_18 = sws-util.$(OBJEXT)
+am_sws_OBJECTS = $(am__objects_16) $(am__objects_2) $(am__objects_17) \
+       $(am__objects_18) sws-sws.$(OBJEXT) sws-inet_pton.$(OBJEXT)
 sws_OBJECTS = $(am_sws_OBJECTS)
 sws_DEPENDENCIES =
-am__objects_16 = tftpd-mprintf.$(OBJEXT) tftpd-nonblock.$(OBJEXT) \
+sws_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(sws_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_19 = tftpd-mprintf.$(OBJEXT) tftpd-nonblock.$(OBJEXT) \
        tftpd-strequal.$(OBJEXT) tftpd-strtoofft.$(OBJEXT) \
        tftpd-timeval.$(OBJEXT) tftpd-warnless.$(OBJEXT)
-am__objects_17 = tftpd-getpart.$(OBJEXT) tftpd-base64.$(OBJEXT) \
+am__objects_20 = tftpd-getpart.$(OBJEXT) tftpd-base64.$(OBJEXT) \
        tftpd-memdebug.$(OBJEXT)
-am__objects_18 = tftpd-util.$(OBJEXT)
-am_tftpd_OBJECTS = $(am__objects_16) $(am__objects_2) \
-       $(am__objects_17) $(am__objects_18) tftpd-tftpd.$(OBJEXT)
+am__objects_21 = tftpd-util.$(OBJEXT)
+am_tftpd_OBJECTS = $(am__objects_19) $(am__objects_2) \
+       $(am__objects_20) $(am__objects_21) tftpd-tftpd.$(OBJEXT)
 tftpd_OBJECTS = $(am_tftpd_OBJECTS)
 tftpd_DEPENDENCIES =
+tftpd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(tftpd_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \
-       $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES)
-DIST_SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \
-       $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES)
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(fake_ntlm_SOURCES) $(getpart_SOURCES) $(resolve_SOURCES) \
+       $(rtspd_SOURCES) $(sockfilt_SOURCES) $(sws_SOURCES) \
+       $(tftpd_SOURCES)
+DIST_SOURCES = $(fake_ntlm_SOURCES) $(getpart_SOURCES) \
+       $(resolve_SOURCES) $(rtspd_SOURCES) $(sockfilt_SOURCES) \
+       $(sws_SOURCES) $(tftpd_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
 CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
 CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
 CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
@@ -177,7 +311,8 @@ CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
 CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
 CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
 CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
 CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -190,15 +325,17 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
 HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
 HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
 IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -208,23 +345,24 @@ KRB4_ENABLED = @KRB4_ENABLED@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
+MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
 NROFF = @NROFF@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
@@ -237,7 +375,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKGADD_NAME = @PKGADD_NAME@
@@ -250,34 +387,34 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
 SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
 STRIP = @STRIP@
 SUPPORT_FEATURES = @SUPPORT_FEATURES@
 SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
 USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
 USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
 USE_LIBRTMP = @USE_LIBRTMP@
 USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
 USE_NSS = @USE_NSS@
 USE_OPENLDAP = @USE_OPENLDAP@
 USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
 USE_SSLEAY = @USE_SSLEAY@
 USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
 VERSION = @VERSION@
 VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,6 +426,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -308,7 +446,6 @@ libexecdir = @libexecdir@
 libext = @libext@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -318,9 +455,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 #***************************************************************************
 #                                  _   _ ____  _
@@ -329,7 +470,7 @@ target_alias = @target_alias@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, 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
@@ -344,12 +485,11 @@ target_alias = @target_alias@
 #
 ###########################################################################
 AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_FALSE@           -I$(top_srcdir)/lib
-
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/lib $(am__append_1)
 
 # Specify our include paths here, and do it relative to $(top_srcdir) and
 # $(top_builddir), to ensure that these paths which belong to the library
@@ -357,43 +497,43 @@ AUTOMAKE_OPTIONS = foreign nostdinc
 # might possibly already be installed in the system.
 #
 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
 # $(top_srcdir)/include is for libcurl's external include files
 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
 # $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/include      \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/include        \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/lib          \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/lib            \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_builddir)/ares         \
-@USE_EMBEDDED_ARES_TRUE@           -I$(top_srcdir)/ares
-
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/ares \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/ares $(am__append_1)
 CURLX_SRCS = \
$(top_srcdir)/lib/mprintf.c \
$(top_srcdir)/lib/nonblock.c \
$(top_srcdir)/lib/strequal.c \
$(top_srcdir)/lib/strtoofft.c \
$(top_srcdir)/lib/timeval.c \
$(top_srcdir)/lib/warnless.c
../../lib/mprintf.c \
../../lib/nonblock.c \
../../lib/strequal.c \
../../lib/strtoofft.c \
../../lib/timeval.c \
../../lib/warnless.c
 
 CURLX_HDRS = \
$(top_srcdir)/lib/curlx.h \
$(top_srcdir)/lib/nonblock.h \
$(top_srcdir)/lib/strequal.h \
$(top_srcdir)/lib/strtoofft.h \
$(top_srcdir)/lib/timeval.h \
$(top_srcdir)/lib/warnless.h
../../lib/curlx.h \
../../lib/nonblock.h \
../../lib/strequal.h \
../../lib/strtoofft.h \
../../lib/timeval.h \
../../lib/warnless.h
 
 USEFUL = \
  getpart.c \
  getpart.h \
- $(top_srcdir)/lib/base64.c \
- $(top_srcdir)/lib/curl_base64.h \
- $(top_srcdir)/lib/memdebug.c \
- $(top_srcdir)/lib/memdebug.h
+ server_setup.h \
+ ../../lib/base64.c \
+ ../../lib/curl_base64.h \
+ ../../lib/memdebug.c \
+ ../../lib/memdebug.h
 
 UTIL = \
  util.c \
@@ -402,42 +542,48 @@ UTIL = \
 getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
  testpart.c
 
-getpart_LDADD = @TEST_SERVER_LIBS@
+getpart_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 getpart_CFLAGS = $(AM_CFLAGS)
 resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  resolve.c
 
-resolve_LDADD = @TEST_SERVER_LIBS@
+resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 resolve_CFLAGS = $(AM_CFLAGS)
 rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  rtspd.c
 
-rtspd_LDADD = @TEST_SERVER_LIBS@
+rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 rtspd_CFLAGS = $(AM_CFLAGS)
 sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  sockfilt.c \
$(top_srcdir)/lib/inet_pton.c
../../lib/inet_pton.c
 
-sockfilt_LDADD = @TEST_SERVER_LIBS@
+sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 sockfilt_CFLAGS = $(AM_CFLAGS)
 sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
- sws.c
+ sws.c \
+ ../../lib/inet_pton.c
 
-sws_LDADD = @TEST_SERVER_LIBS@
+sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 sws_CFLAGS = $(AM_CFLAGS)
 tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  tftpd.c \
  tftp.h
 
-tftpd_LDADD = @TEST_SERVER_LIBS@
+tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 tftpd_CFLAGS = $(AM_CFLAGS)
+fake_ntlm_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ fake_ntlm.c
+
+fake_ntlm_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+fake_ntlm_CFLAGS = $(AM_CFLAGS)
 
-# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD)
-extra_DIST = base64.pl Makefile.inc
+# Makefile.inc provides neat definitions
+EXTRA_DIST = base64.pl Makefile.inc
 all: all-am
 
 .SUFFIXES:
@@ -446,14 +592,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tests/server/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  tests/server/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/server/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/server/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -463,6 +609,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/Makefile.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -471,31 +618,44 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
-getpart$(EXEEXT): $(getpart_OBJECTS) $(getpart_DEPENDENCIES) 
+       @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+fake_ntlm$(EXEEXT): $(fake_ntlm_OBJECTS) $(fake_ntlm_DEPENDENCIES) $(EXTRA_fake_ntlm_DEPENDENCIES) 
+       @rm -f fake_ntlm$(EXEEXT)
+       $(AM_V_CCLD)$(fake_ntlm_LINK) $(fake_ntlm_OBJECTS) $(fake_ntlm_LDADD) $(LIBS)
+
+getpart$(EXEEXT): $(getpart_OBJECTS) $(getpart_DEPENDENCIES) $(EXTRA_getpart_DEPENDENCIES) 
        @rm -f getpart$(EXEEXT)
-       $(LINK) $(getpart_LDFLAGS) $(getpart_OBJECTS) $(getpart_LDADD) $(LIBS)
-resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) 
+       $(AM_V_CCLD)$(getpart_LINK) $(getpart_OBJECTS) $(getpart_LDADD) $(LIBS)
+
+resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) $(EXTRA_resolve_DEPENDENCIES) 
        @rm -f resolve$(EXEEXT)
-       $(LINK) $(resolve_LDFLAGS) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
-rtspd$(EXEEXT): $(rtspd_OBJECTS) $(rtspd_DEPENDENCIES) 
+       $(AM_V_CCLD)$(resolve_LINK) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
+
+rtspd$(EXEEXT): $(rtspd_OBJECTS) $(rtspd_DEPENDENCIES) $(EXTRA_rtspd_DEPENDENCIES) 
        @rm -f rtspd$(EXEEXT)
-       $(LINK) $(rtspd_LDFLAGS) $(rtspd_OBJECTS) $(rtspd_LDADD) $(LIBS)
-sockfilt$(EXEEXT): $(sockfilt_OBJECTS) $(sockfilt_DEPENDENCIES) 
+       $(AM_V_CCLD)$(rtspd_LINK) $(rtspd_OBJECTS) $(rtspd_LDADD) $(LIBS)
+
+sockfilt$(EXEEXT): $(sockfilt_OBJECTS) $(sockfilt_DEPENDENCIES) $(EXTRA_sockfilt_DEPENDENCIES) 
        @rm -f sockfilt$(EXEEXT)
-       $(LINK) $(sockfilt_LDFLAGS) $(sockfilt_OBJECTS) $(sockfilt_LDADD) $(LIBS)
-sws$(EXEEXT): $(sws_OBJECTS) $(sws_DEPENDENCIES) 
+       $(AM_V_CCLD)$(sockfilt_LINK) $(sockfilt_OBJECTS) $(sockfilt_LDADD) $(LIBS)
+
+sws$(EXEEXT): $(sws_OBJECTS) $(sws_DEPENDENCIES) $(EXTRA_sws_DEPENDENCIES) 
        @rm -f sws$(EXEEXT)
-       $(LINK) $(sws_LDFLAGS) $(sws_OBJECTS) $(sws_LDADD) $(LIBS)
-tftpd$(EXEEXT): $(tftpd_OBJECTS) $(tftpd_DEPENDENCIES) 
+       $(AM_V_CCLD)$(sws_LINK) $(sws_OBJECTS) $(sws_LDADD) $(LIBS)
+
+tftpd$(EXEEXT): $(tftpd_OBJECTS) $(tftpd_DEPENDENCIES) $(EXTRA_tftpd_DEPENDENCIES) 
        @rm -f tftpd$(EXEEXT)
-       $(LINK) $(tftpd_LDFLAGS) $(tftpd_OBJECTS) $(tftpd_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(tftpd_LINK) $(tftpd_OBJECTS) $(tftpd_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -503,6 +663,17 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-fake_ntlm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-strequal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-base64.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-getpart.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-memdebug.Po@am__quote@
@@ -549,6 +720,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-warnless.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-base64.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-inet_pton.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-memdebug.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-mprintf.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-nonblock.Po@am__quote@
@@ -571,949 +743,1117 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-warnless.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-getpart-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.o -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-mprintf.o -MD -MP -MF $(DEPDIR)/fake_ntlm-mprintf.Tpo -c -o fake_ntlm-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-mprintf.Tpo $(DEPDIR)/fake_ntlm-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='fake_ntlm-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-getpart-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.obj -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-mprintf.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-mprintf.Tpo -c -o fake_ntlm-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-mprintf.Tpo $(DEPDIR)/fake_ntlm-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='fake_ntlm-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-getpart-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.o -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-nonblock.o -MD -MP -MF $(DEPDIR)/fake_ntlm-nonblock.Tpo -c -o fake_ntlm-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-nonblock.Tpo $(DEPDIR)/fake_ntlm-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='fake_ntlm-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-getpart-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.obj -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-nonblock.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-nonblock.Tpo -c -o fake_ntlm-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-nonblock.Tpo $(DEPDIR)/fake_ntlm-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='fake_ntlm-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-getpart-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.o -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-strequal.o -MD -MP -MF $(DEPDIR)/fake_ntlm-strequal.Tpo -c -o fake_ntlm-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-strequal.Tpo $(DEPDIR)/fake_ntlm-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='fake_ntlm-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-getpart-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.obj -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-strequal.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-strequal.Tpo -c -o fake_ntlm-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-strequal.Tpo $(DEPDIR)/fake_ntlm-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='fake_ntlm-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-getpart-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.o -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-strtoofft.o -MD -MP -MF $(DEPDIR)/fake_ntlm-strtoofft.Tpo -c -o fake_ntlm-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-strtoofft.Tpo $(DEPDIR)/fake_ntlm-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='fake_ntlm-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-getpart-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.obj -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-strtoofft.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-strtoofft.Tpo -c -o fake_ntlm-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-strtoofft.Tpo $(DEPDIR)/fake_ntlm-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='fake_ntlm-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-getpart-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.o -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-timeval.o -MD -MP -MF $(DEPDIR)/fake_ntlm-timeval.Tpo -c -o fake_ntlm-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-timeval.Tpo $(DEPDIR)/fake_ntlm-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='fake_ntlm-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-getpart-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.obj -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-timeval.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-timeval.Tpo -c -o fake_ntlm-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-timeval.Tpo $(DEPDIR)/fake_ntlm-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='fake_ntlm-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-getpart-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.o -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.o' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-warnless.o -MD -MP -MF $(DEPDIR)/fake_ntlm-warnless.Tpo -c -o fake_ntlm-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-warnless.Tpo $(DEPDIR)/fake_ntlm-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='fake_ntlm-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-getpart-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.obj -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.obj' libtool=no @AMDEPBACKSLASH@
+fake_ntlm-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-warnless.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-warnless.Tpo -c -o fake_ntlm-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-warnless.Tpo $(DEPDIR)/fake_ntlm-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='fake_ntlm-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+fake_ntlm-getpart.o: getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-getpart.o -MD -MP -MF $(DEPDIR)/fake_ntlm-getpart.Tpo -c -o fake_ntlm-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-getpart.Tpo $(DEPDIR)/fake_ntlm-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='fake_ntlm-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+fake_ntlm-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-getpart.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-getpart.Tpo -c -o fake_ntlm-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-getpart.Tpo $(DEPDIR)/fake_ntlm-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='fake_ntlm-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+fake_ntlm-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-base64.o -MD -MP -MF $(DEPDIR)/fake_ntlm-base64.Tpo -c -o fake_ntlm-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-base64.Tpo $(DEPDIR)/fake_ntlm-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='fake_ntlm-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+fake_ntlm-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-base64.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-base64.Tpo -c -o fake_ntlm-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-base64.Tpo $(DEPDIR)/fake_ntlm-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='fake_ntlm-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+fake_ntlm-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-memdebug.o -MD -MP -MF $(DEPDIR)/fake_ntlm-memdebug.Tpo -c -o fake_ntlm-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-memdebug.Tpo $(DEPDIR)/fake_ntlm-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='fake_ntlm-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+fake_ntlm-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-memdebug.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-memdebug.Tpo -c -o fake_ntlm-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-memdebug.Tpo $(DEPDIR)/fake_ntlm-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='fake_ntlm-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+fake_ntlm-util.o: util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-util.o -MD -MP -MF $(DEPDIR)/fake_ntlm-util.Tpo -c -o fake_ntlm-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-util.Tpo $(DEPDIR)/fake_ntlm-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='fake_ntlm-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+fake_ntlm-util.obj: util.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-util.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-util.Tpo -c -o fake_ntlm-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-util.Tpo $(DEPDIR)/fake_ntlm-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='fake_ntlm-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+fake_ntlm-fake_ntlm.o: fake_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-fake_ntlm.o -MD -MP -MF $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo -c -o fake_ntlm-fake_ntlm.o `test -f 'fake_ntlm.c' || echo '$(srcdir)/'`fake_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo $(DEPDIR)/fake_ntlm-fake_ntlm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fake_ntlm.c' object='fake_ntlm-fake_ntlm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-fake_ntlm.o `test -f 'fake_ntlm.c' || echo '$(srcdir)/'`fake_ntlm.c
+
+fake_ntlm-fake_ntlm.obj: fake_ntlm.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-fake_ntlm.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo -c -o fake_ntlm-fake_ntlm.obj `if test -f 'fake_ntlm.c'; then $(CYGPATH_W) 'fake_ntlm.c'; else $(CYGPATH_W) '$(srcdir)/fake_ntlm.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo $(DEPDIR)/fake_ntlm-fake_ntlm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fake_ntlm.c' object='fake_ntlm-fake_ntlm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-fake_ntlm.obj `if test -f 'fake_ntlm.c'; then $(CYGPATH_W) 'fake_ntlm.c'; else $(CYGPATH_W) '$(srcdir)/fake_ntlm.c'; fi`
+
+getpart-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.o -MD -MP -MF $(DEPDIR)/getpart-mprintf.Tpo -c -o getpart-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-mprintf.Tpo $(DEPDIR)/getpart-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='getpart-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+getpart-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.obj -MD -MP -MF $(DEPDIR)/getpart-mprintf.Tpo -c -o getpart-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-mprintf.Tpo $(DEPDIR)/getpart-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='getpart-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+getpart-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.o -MD -MP -MF $(DEPDIR)/getpart-nonblock.Tpo -c -o getpart-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-nonblock.Tpo $(DEPDIR)/getpart-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='getpart-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+getpart-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.obj -MD -MP -MF $(DEPDIR)/getpart-nonblock.Tpo -c -o getpart-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-nonblock.Tpo $(DEPDIR)/getpart-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='getpart-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+getpart-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.o -MD -MP -MF $(DEPDIR)/getpart-strequal.Tpo -c -o getpart-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-strequal.Tpo $(DEPDIR)/getpart-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='getpart-strequal.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+
+getpart-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.obj -MD -MP -MF $(DEPDIR)/getpart-strequal.Tpo -c -o getpart-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-strequal.Tpo $(DEPDIR)/getpart-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='getpart-strequal.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+
+getpart-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.o -MD -MP -MF $(DEPDIR)/getpart-strtoofft.Tpo -c -o getpart-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-strtoofft.Tpo $(DEPDIR)/getpart-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='getpart-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+getpart-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.obj -MD -MP -MF $(DEPDIR)/getpart-strtoofft.Tpo -c -o getpart-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-strtoofft.Tpo $(DEPDIR)/getpart-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='getpart-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+getpart-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.o -MD -MP -MF $(DEPDIR)/getpart-timeval.Tpo -c -o getpart-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-timeval.Tpo $(DEPDIR)/getpart-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='getpart-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+getpart-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.obj -MD -MP -MF $(DEPDIR)/getpart-timeval.Tpo -c -o getpart-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-timeval.Tpo $(DEPDIR)/getpart-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='getpart-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+getpart-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.o -MD -MP -MF $(DEPDIR)/getpart-warnless.Tpo -c -o getpart-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-warnless.Tpo $(DEPDIR)/getpart-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='getpart-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+getpart-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.obj -MD -MP -MF $(DEPDIR)/getpart-warnless.Tpo -c -o getpart-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-warnless.Tpo $(DEPDIR)/getpart-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='getpart-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 getpart-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.o -MD -MP -MF "$(DEPDIR)/getpart-getpart.Tpo" -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='getpart-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.o -MD -MP -MF $(DEPDIR)/getpart-getpart.Tpo -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-getpart.Tpo $(DEPDIR)/getpart-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='getpart-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 getpart-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.obj -MD -MP -MF "$(DEPDIR)/getpart-getpart.Tpo" -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='getpart-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.obj -MD -MP -MF $(DEPDIR)/getpart-getpart.Tpo -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-getpart.Tpo $(DEPDIR)/getpart-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='getpart-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-getpart-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.o -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='getpart-base64.o' libtool=no @AMDEPBACKSLASH@
+getpart-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.o -MD -MP -MF $(DEPDIR)/getpart-base64.Tpo -c -o getpart-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-base64.Tpo $(DEPDIR)/getpart-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='getpart-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-getpart-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.obj -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='getpart-base64.obj' libtool=no @AMDEPBACKSLASH@
+getpart-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.obj -MD -MP -MF $(DEPDIR)/getpart-base64.Tpo -c -o getpart-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-base64.Tpo $(DEPDIR)/getpart-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='getpart-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-getpart-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.o -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.o' libtool=no @AMDEPBACKSLASH@
+getpart-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.o -MD -MP -MF $(DEPDIR)/getpart-memdebug.Tpo -c -o getpart-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-memdebug.Tpo $(DEPDIR)/getpart-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='getpart-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-getpart-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.obj -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+getpart-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.obj -MD -MP -MF $(DEPDIR)/getpart-memdebug.Tpo -c -o getpart-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-memdebug.Tpo $(DEPDIR)/getpart-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='getpart-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 getpart-testpart.o: testpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.o -MD -MP -MF "$(DEPDIR)/getpart-testpart.Tpo" -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testpart.c' object='getpart-testpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.o -MD -MP -MF $(DEPDIR)/getpart-testpart.Tpo -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-testpart.Tpo $(DEPDIR)/getpart-testpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testpart.c' object='getpart-testpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
 
 getpart-testpart.obj: testpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.obj -MD -MP -MF "$(DEPDIR)/getpart-testpart.Tpo" -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='testpart.c' object='getpart-testpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.obj -MD -MP -MF $(DEPDIR)/getpart-testpart.Tpo -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/getpart-testpart.Tpo $(DEPDIR)/getpart-testpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='testpart.c' object='getpart-testpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
 
-resolve-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.o -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.o' libtool=no @AMDEPBACKSLASH@
+resolve-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.o -MD -MP -MF $(DEPDIR)/resolve-mprintf.Tpo -c -o resolve-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-mprintf.Tpo $(DEPDIR)/resolve-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='resolve-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-resolve-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.obj -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+resolve-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.obj -MD -MP -MF $(DEPDIR)/resolve-mprintf.Tpo -c -o resolve-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-mprintf.Tpo $(DEPDIR)/resolve-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='resolve-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-resolve-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.o -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.o' libtool=no @AMDEPBACKSLASH@
+resolve-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.o -MD -MP -MF $(DEPDIR)/resolve-nonblock.Tpo -c -o resolve-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-nonblock.Tpo $(DEPDIR)/resolve-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='resolve-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-resolve-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.obj -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+resolve-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.obj -MD -MP -MF $(DEPDIR)/resolve-nonblock.Tpo -c -o resolve-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-nonblock.Tpo $(DEPDIR)/resolve-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='resolve-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-resolve-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.o -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.o' libtool=no @AMDEPBACKSLASH@
+resolve-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.o -MD -MP -MF $(DEPDIR)/resolve-strequal.Tpo -c -o resolve-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-strequal.Tpo $(DEPDIR)/resolve-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='resolve-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-resolve-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.obj -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.obj' libtool=no @AMDEPBACKSLASH@
+resolve-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.obj -MD -MP -MF $(DEPDIR)/resolve-strequal.Tpo -c -o resolve-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-strequal.Tpo $(DEPDIR)/resolve-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='resolve-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-resolve-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.o -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+resolve-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.o -MD -MP -MF $(DEPDIR)/resolve-strtoofft.Tpo -c -o resolve-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-strtoofft.Tpo $(DEPDIR)/resolve-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='resolve-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-resolve-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.obj -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+resolve-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.obj -MD -MP -MF $(DEPDIR)/resolve-strtoofft.Tpo -c -o resolve-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-strtoofft.Tpo $(DEPDIR)/resolve-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='resolve-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-resolve-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.o -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.o' libtool=no @AMDEPBACKSLASH@
+resolve-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.o -MD -MP -MF $(DEPDIR)/resolve-timeval.Tpo -c -o resolve-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-timeval.Tpo $(DEPDIR)/resolve-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='resolve-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-resolve-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.obj -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.obj' libtool=no @AMDEPBACKSLASH@
+resolve-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.obj -MD -MP -MF $(DEPDIR)/resolve-timeval.Tpo -c -o resolve-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-timeval.Tpo $(DEPDIR)/resolve-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='resolve-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-resolve-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.o -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.o' libtool=no @AMDEPBACKSLASH@
+resolve-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.o -MD -MP -MF $(DEPDIR)/resolve-warnless.Tpo -c -o resolve-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-warnless.Tpo $(DEPDIR)/resolve-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='resolve-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-resolve-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.obj -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.obj' libtool=no @AMDEPBACKSLASH@
+resolve-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.obj -MD -MP -MF $(DEPDIR)/resolve-warnless.Tpo -c -o resolve-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-warnless.Tpo $(DEPDIR)/resolve-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='resolve-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 resolve-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.o -MD -MP -MF "$(DEPDIR)/resolve-getpart.Tpo" -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='resolve-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.o -MD -MP -MF $(DEPDIR)/resolve-getpart.Tpo -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-getpart.Tpo $(DEPDIR)/resolve-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='resolve-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 resolve-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.obj -MD -MP -MF "$(DEPDIR)/resolve-getpart.Tpo" -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='resolve-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.obj -MD -MP -MF $(DEPDIR)/resolve-getpart.Tpo -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-getpart.Tpo $(DEPDIR)/resolve-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='resolve-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-resolve-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.o -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='resolve-base64.o' libtool=no @AMDEPBACKSLASH@
+resolve-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.o -MD -MP -MF $(DEPDIR)/resolve-base64.Tpo -c -o resolve-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-base64.Tpo $(DEPDIR)/resolve-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='resolve-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-resolve-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.obj -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='resolve-base64.obj' libtool=no @AMDEPBACKSLASH@
+resolve-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.obj -MD -MP -MF $(DEPDIR)/resolve-base64.Tpo -c -o resolve-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-base64.Tpo $(DEPDIR)/resolve-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='resolve-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-resolve-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.o -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.o' libtool=no @AMDEPBACKSLASH@
+resolve-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.o -MD -MP -MF $(DEPDIR)/resolve-memdebug.Tpo -c -o resolve-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-memdebug.Tpo $(DEPDIR)/resolve-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='resolve-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-resolve-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.obj -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+resolve-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.obj -MD -MP -MF $(DEPDIR)/resolve-memdebug.Tpo -c -o resolve-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-memdebug.Tpo $(DEPDIR)/resolve-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='resolve-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 resolve-util.o: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.o -MD -MP -MF "$(DEPDIR)/resolve-util.Tpo" -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='resolve-util.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.o -MD -MP -MF $(DEPDIR)/resolve-util.Tpo -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-util.Tpo $(DEPDIR)/resolve-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='resolve-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 resolve-util.obj: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.obj -MD -MP -MF "$(DEPDIR)/resolve-util.Tpo" -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='resolve-util.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.obj -MD -MP -MF $(DEPDIR)/resolve-util.Tpo -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-util.Tpo $(DEPDIR)/resolve-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='resolve-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 resolve-resolve.o: resolve.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.o -MD -MP -MF "$(DEPDIR)/resolve-resolve.Tpo" -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.o -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
 
 resolve-resolve.obj: resolve.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.obj -MD -MP -MF "$(DEPDIR)/resolve-resolve.Tpo" -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.obj -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
 
-rtspd-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.o -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.o' libtool=no @AMDEPBACKSLASH@
+rtspd-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.o -MD -MP -MF $(DEPDIR)/rtspd-mprintf.Tpo -c -o rtspd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-mprintf.Tpo $(DEPDIR)/rtspd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='rtspd-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-rtspd-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.obj -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.obj -MD -MP -MF $(DEPDIR)/rtspd-mprintf.Tpo -c -o rtspd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-mprintf.Tpo $(DEPDIR)/rtspd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='rtspd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-rtspd-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.o -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.o' libtool=no @AMDEPBACKSLASH@
+rtspd-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.o -MD -MP -MF $(DEPDIR)/rtspd-nonblock.Tpo -c -o rtspd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-nonblock.Tpo $(DEPDIR)/rtspd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='rtspd-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-rtspd-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.obj -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.obj -MD -MP -MF $(DEPDIR)/rtspd-nonblock.Tpo -c -o rtspd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-nonblock.Tpo $(DEPDIR)/rtspd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='rtspd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-rtspd-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.o -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.o' libtool=no @AMDEPBACKSLASH@
+rtspd-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.o -MD -MP -MF $(DEPDIR)/rtspd-strequal.Tpo -c -o rtspd-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-strequal.Tpo $(DEPDIR)/rtspd-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='rtspd-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-rtspd-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.obj -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.obj -MD -MP -MF $(DEPDIR)/rtspd-strequal.Tpo -c -o rtspd-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-strequal.Tpo $(DEPDIR)/rtspd-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='rtspd-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-rtspd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.o -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+rtspd-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.o -MD -MP -MF $(DEPDIR)/rtspd-strtoofft.Tpo -c -o rtspd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-strtoofft.Tpo $(DEPDIR)/rtspd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='rtspd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-rtspd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.obj -MD -MP -MF $(DEPDIR)/rtspd-strtoofft.Tpo -c -o rtspd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-strtoofft.Tpo $(DEPDIR)/rtspd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='rtspd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-rtspd-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.o -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.o' libtool=no @AMDEPBACKSLASH@
+rtspd-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.o -MD -MP -MF $(DEPDIR)/rtspd-timeval.Tpo -c -o rtspd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-timeval.Tpo $(DEPDIR)/rtspd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='rtspd-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-rtspd-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.obj -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.obj -MD -MP -MF $(DEPDIR)/rtspd-timeval.Tpo -c -o rtspd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-timeval.Tpo $(DEPDIR)/rtspd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='rtspd-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-rtspd-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.o -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.o' libtool=no @AMDEPBACKSLASH@
+rtspd-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.o -MD -MP -MF $(DEPDIR)/rtspd-warnless.Tpo -c -o rtspd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-warnless.Tpo $(DEPDIR)/rtspd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='rtspd-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-rtspd-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.obj -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.obj -MD -MP -MF $(DEPDIR)/rtspd-warnless.Tpo -c -o rtspd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-warnless.Tpo $(DEPDIR)/rtspd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='rtspd-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 rtspd-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.o -MD -MP -MF "$(DEPDIR)/rtspd-getpart.Tpo" -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='rtspd-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.o -MD -MP -MF $(DEPDIR)/rtspd-getpart.Tpo -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-getpart.Tpo $(DEPDIR)/rtspd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='rtspd-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 rtspd-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.obj -MD -MP -MF "$(DEPDIR)/rtspd-getpart.Tpo" -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='rtspd-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.obj -MD -MP -MF $(DEPDIR)/rtspd-getpart.Tpo -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-getpart.Tpo $(DEPDIR)/rtspd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='rtspd-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-rtspd-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.o -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.o' libtool=no @AMDEPBACKSLASH@
+rtspd-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.o -MD -MP -MF $(DEPDIR)/rtspd-base64.Tpo -c -o rtspd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-base64.Tpo $(DEPDIR)/rtspd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='rtspd-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-rtspd-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.obj -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.obj -MD -MP -MF $(DEPDIR)/rtspd-base64.Tpo -c -o rtspd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-base64.Tpo $(DEPDIR)/rtspd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='rtspd-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-rtspd-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.o -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.o' libtool=no @AMDEPBACKSLASH@
+rtspd-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.o -MD -MP -MF $(DEPDIR)/rtspd-memdebug.Tpo -c -o rtspd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-memdebug.Tpo $(DEPDIR)/rtspd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='rtspd-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-rtspd-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.obj -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+rtspd-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.obj -MD -MP -MF $(DEPDIR)/rtspd-memdebug.Tpo -c -o rtspd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-memdebug.Tpo $(DEPDIR)/rtspd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='rtspd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 rtspd-util.o: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.o -MD -MP -MF "$(DEPDIR)/rtspd-util.Tpo" -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='rtspd-util.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.o -MD -MP -MF $(DEPDIR)/rtspd-util.Tpo -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-util.Tpo $(DEPDIR)/rtspd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='rtspd-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 rtspd-util.obj: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.obj -MD -MP -MF "$(DEPDIR)/rtspd-util.Tpo" -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='rtspd-util.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.obj -MD -MP -MF $(DEPDIR)/rtspd-util.Tpo -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-util.Tpo $(DEPDIR)/rtspd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='rtspd-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 rtspd-rtspd.o: rtspd.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.o -MD -MP -MF "$(DEPDIR)/rtspd-rtspd.Tpo" -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rtspd.c' object='rtspd-rtspd.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.o -MD -MP -MF $(DEPDIR)/rtspd-rtspd.Tpo -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-rtspd.Tpo $(DEPDIR)/rtspd-rtspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rtspd.c' object='rtspd-rtspd.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
 
 rtspd-rtspd.obj: rtspd.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.obj -MD -MP -MF "$(DEPDIR)/rtspd-rtspd.Tpo" -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rtspd.c' object='rtspd-rtspd.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.obj -MD -MP -MF $(DEPDIR)/rtspd-rtspd.Tpo -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-rtspd.Tpo $(DEPDIR)/rtspd-rtspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='rtspd.c' object='rtspd-rtspd.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
 
-sockfilt-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.o -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.o -MD -MP -MF $(DEPDIR)/sockfilt-mprintf.Tpo -c -o sockfilt-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-mprintf.Tpo $(DEPDIR)/sockfilt-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='sockfilt-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-sockfilt-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.obj -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.obj -MD -MP -MF $(DEPDIR)/sockfilt-mprintf.Tpo -c -o sockfilt-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-mprintf.Tpo $(DEPDIR)/sockfilt-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='sockfilt-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-sockfilt-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.o -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.o -MD -MP -MF $(DEPDIR)/sockfilt-nonblock.Tpo -c -o sockfilt-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-nonblock.Tpo $(DEPDIR)/sockfilt-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='sockfilt-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-sockfilt-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.obj -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.obj -MD -MP -MF $(DEPDIR)/sockfilt-nonblock.Tpo -c -o sockfilt-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-nonblock.Tpo $(DEPDIR)/sockfilt-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='sockfilt-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-sockfilt-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.o -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.o -MD -MP -MF $(DEPDIR)/sockfilt-strequal.Tpo -c -o sockfilt-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-strequal.Tpo $(DEPDIR)/sockfilt-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='sockfilt-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-sockfilt-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.obj -MD -MP -MF $(DEPDIR)/sockfilt-strequal.Tpo -c -o sockfilt-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-strequal.Tpo $(DEPDIR)/sockfilt-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='sockfilt-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-sockfilt-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.o -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.o -MD -MP -MF $(DEPDIR)/sockfilt-strtoofft.Tpo -c -o sockfilt-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-strtoofft.Tpo $(DEPDIR)/sockfilt-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='sockfilt-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-sockfilt-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.obj -MD -MP -MF $(DEPDIR)/sockfilt-strtoofft.Tpo -c -o sockfilt-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-strtoofft.Tpo $(DEPDIR)/sockfilt-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='sockfilt-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-sockfilt-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.o -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.o -MD -MP -MF $(DEPDIR)/sockfilt-timeval.Tpo -c -o sockfilt-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-timeval.Tpo $(DEPDIR)/sockfilt-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='sockfilt-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-sockfilt-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.obj -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.obj -MD -MP -MF $(DEPDIR)/sockfilt-timeval.Tpo -c -o sockfilt-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-timeval.Tpo $(DEPDIR)/sockfilt-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='sockfilt-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-sockfilt-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.o -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.o -MD -MP -MF $(DEPDIR)/sockfilt-warnless.Tpo -c -o sockfilt-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-warnless.Tpo $(DEPDIR)/sockfilt-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='sockfilt-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-sockfilt-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.obj -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.obj -MD -MP -MF $(DEPDIR)/sockfilt-warnless.Tpo -c -o sockfilt-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-warnless.Tpo $(DEPDIR)/sockfilt-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='sockfilt-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 sockfilt-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.o -MD -MP -MF "$(DEPDIR)/sockfilt-getpart.Tpo" -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='sockfilt-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.o -MD -MP -MF $(DEPDIR)/sockfilt-getpart.Tpo -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-getpart.Tpo $(DEPDIR)/sockfilt-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='sockfilt-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 sockfilt-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.obj -MD -MP -MF "$(DEPDIR)/sockfilt-getpart.Tpo" -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='sockfilt-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.obj -MD -MP -MF $(DEPDIR)/sockfilt-getpart.Tpo -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-getpart.Tpo $(DEPDIR)/sockfilt-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='sockfilt-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-sockfilt-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.o -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.o -MD -MP -MF $(DEPDIR)/sockfilt-base64.Tpo -c -o sockfilt-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-base64.Tpo $(DEPDIR)/sockfilt-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='sockfilt-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-sockfilt-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.obj -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.obj -MD -MP -MF $(DEPDIR)/sockfilt-base64.Tpo -c -o sockfilt-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-base64.Tpo $(DEPDIR)/sockfilt-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='sockfilt-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-sockfilt-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.o -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.o -MD -MP -MF $(DEPDIR)/sockfilt-memdebug.Tpo -c -o sockfilt-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-memdebug.Tpo $(DEPDIR)/sockfilt-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='sockfilt-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-sockfilt-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.obj -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.obj -MD -MP -MF $(DEPDIR)/sockfilt-memdebug.Tpo -c -o sockfilt-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-memdebug.Tpo $(DEPDIR)/sockfilt-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='sockfilt-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 sockfilt-util.o: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.o -MD -MP -MF "$(DEPDIR)/sockfilt-util.Tpo" -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='sockfilt-util.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.o -MD -MP -MF $(DEPDIR)/sockfilt-util.Tpo -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-util.Tpo $(DEPDIR)/sockfilt-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='sockfilt-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 sockfilt-util.obj: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.obj -MD -MP -MF "$(DEPDIR)/sockfilt-util.Tpo" -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='sockfilt-util.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.obj -MD -MP -MF $(DEPDIR)/sockfilt-util.Tpo -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-util.Tpo $(DEPDIR)/sockfilt-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='sockfilt-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 sockfilt-sockfilt.o: sockfilt.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.o -MD -MP -MF "$(DEPDIR)/sockfilt-sockfilt.Tpo" -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sockfilt.c' object='sockfilt-sockfilt.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.o -MD -MP -MF $(DEPDIR)/sockfilt-sockfilt.Tpo -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-sockfilt.Tpo $(DEPDIR)/sockfilt-sockfilt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sockfilt.c' object='sockfilt-sockfilt.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
 
 sockfilt-sockfilt.obj: sockfilt.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.obj -MD -MP -MF "$(DEPDIR)/sockfilt-sockfilt.Tpo" -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sockfilt.c' object='sockfilt-sockfilt.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.obj -MD -MP -MF $(DEPDIR)/sockfilt-sockfilt.Tpo -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-sockfilt.Tpo $(DEPDIR)/sockfilt-sockfilt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sockfilt.c' object='sockfilt-sockfilt.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
 
-sockfilt-inet_pton.o: $(top_srcdir)/lib/inet_pton.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.o -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.o' libtool=no @AMDEPBACKSLASH@
+sockfilt-inet_pton.o: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.o -MD -MP -MF $(DEPDIR)/sockfilt-inet_pton.Tpo -c -o sockfilt-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-inet_pton.Tpo $(DEPDIR)/sockfilt-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/inet_pton.c' object='sockfilt-inet_pton.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
 
-sockfilt-inet_pton.obj: $(top_srcdir)/lib/inet_pton.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.obj -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
+sockfilt-inet_pton.obj: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.obj -MD -MP -MF $(DEPDIR)/sockfilt-inet_pton.Tpo -c -o sockfilt-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-inet_pton.Tpo $(DEPDIR)/sockfilt-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/inet_pton.c' object='sockfilt-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
 
-sws-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.o -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.o' libtool=no @AMDEPBACKSLASH@
+sws-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.o -MD -MP -MF $(DEPDIR)/sws-mprintf.Tpo -c -o sws-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-mprintf.Tpo $(DEPDIR)/sws-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='sws-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-sws-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.obj -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+sws-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.obj -MD -MP -MF $(DEPDIR)/sws-mprintf.Tpo -c -o sws-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-mprintf.Tpo $(DEPDIR)/sws-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='sws-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-sws-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.o -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.o' libtool=no @AMDEPBACKSLASH@
+sws-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.o -MD -MP -MF $(DEPDIR)/sws-nonblock.Tpo -c -o sws-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-nonblock.Tpo $(DEPDIR)/sws-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='sws-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-sws-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.obj -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+sws-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.obj -MD -MP -MF $(DEPDIR)/sws-nonblock.Tpo -c -o sws-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-nonblock.Tpo $(DEPDIR)/sws-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='sws-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-sws-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.o -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.o' libtool=no @AMDEPBACKSLASH@
+sws-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.o -MD -MP -MF $(DEPDIR)/sws-strequal.Tpo -c -o sws-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-strequal.Tpo $(DEPDIR)/sws-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='sws-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-sws-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.obj -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.obj' libtool=no @AMDEPBACKSLASH@
+sws-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.obj -MD -MP -MF $(DEPDIR)/sws-strequal.Tpo -c -o sws-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-strequal.Tpo $(DEPDIR)/sws-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='sws-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-sws-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.o -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+sws-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.o -MD -MP -MF $(DEPDIR)/sws-strtoofft.Tpo -c -o sws-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-strtoofft.Tpo $(DEPDIR)/sws-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='sws-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-sws-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+sws-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.obj -MD -MP -MF $(DEPDIR)/sws-strtoofft.Tpo -c -o sws-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-strtoofft.Tpo $(DEPDIR)/sws-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='sws-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-sws-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.o -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.o' libtool=no @AMDEPBACKSLASH@
+sws-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.o -MD -MP -MF $(DEPDIR)/sws-timeval.Tpo -c -o sws-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-timeval.Tpo $(DEPDIR)/sws-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='sws-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-sws-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.obj -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.obj' libtool=no @AMDEPBACKSLASH@
+sws-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.obj -MD -MP -MF $(DEPDIR)/sws-timeval.Tpo -c -o sws-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-timeval.Tpo $(DEPDIR)/sws-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='sws-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-sws-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.o -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.o' libtool=no @AMDEPBACKSLASH@
+sws-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.o -MD -MP -MF $(DEPDIR)/sws-warnless.Tpo -c -o sws-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-warnless.Tpo $(DEPDIR)/sws-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='sws-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
 
-sws-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.obj -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.obj' libtool=no @AMDEPBACKSLASH@
+sws-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.obj -MD -MP -MF $(DEPDIR)/sws-warnless.Tpo -c -o sws-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-warnless.Tpo $(DEPDIR)/sws-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='sws-warnless.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 sws-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.o -MD -MP -MF "$(DEPDIR)/sws-getpart.Tpo" -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='sws-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.o -MD -MP -MF $(DEPDIR)/sws-getpart.Tpo -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-getpart.Tpo $(DEPDIR)/sws-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='sws-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 sws-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.obj -MD -MP -MF "$(DEPDIR)/sws-getpart.Tpo" -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='sws-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.obj -MD -MP -MF $(DEPDIR)/sws-getpart.Tpo -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-getpart.Tpo $(DEPDIR)/sws-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='sws-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-sws-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.o -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='sws-base64.o' libtool=no @AMDEPBACKSLASH@
+sws-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.o -MD -MP -MF $(DEPDIR)/sws-base64.Tpo -c -o sws-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-base64.Tpo $(DEPDIR)/sws-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='sws-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-sws-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.obj -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='sws-base64.obj' libtool=no @AMDEPBACKSLASH@
+sws-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.obj -MD -MP -MF $(DEPDIR)/sws-base64.Tpo -c -o sws-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-base64.Tpo $(DEPDIR)/sws-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='sws-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-sws-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.o -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.o' libtool=no @AMDEPBACKSLASH@
+sws-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.o -MD -MP -MF $(DEPDIR)/sws-memdebug.Tpo -c -o sws-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-memdebug.Tpo $(DEPDIR)/sws-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='sws-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-sws-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.obj -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+sws-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.obj -MD -MP -MF $(DEPDIR)/sws-memdebug.Tpo -c -o sws-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-memdebug.Tpo $(DEPDIR)/sws-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='sws-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 sws-util.o: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.o -MD -MP -MF "$(DEPDIR)/sws-util.Tpo" -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='sws-util.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.o -MD -MP -MF $(DEPDIR)/sws-util.Tpo -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-util.Tpo $(DEPDIR)/sws-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='sws-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 sws-util.obj: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.obj -MD -MP -MF "$(DEPDIR)/sws-util.Tpo" -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='sws-util.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.obj -MD -MP -MF $(DEPDIR)/sws-util.Tpo -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-util.Tpo $(DEPDIR)/sws-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='sws-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 sws-sws.o: sws.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.o -MD -MP -MF "$(DEPDIR)/sws-sws.Tpo" -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sws.c' object='sws-sws.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.o -MD -MP -MF $(DEPDIR)/sws-sws.Tpo -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-sws.Tpo $(DEPDIR)/sws-sws.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sws.c' object='sws-sws.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
 
 sws-sws.obj: sws.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.obj -MD -MP -MF "$(DEPDIR)/sws-sws.Tpo" -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sws.c' object='sws-sws.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.obj -MD -MP -MF $(DEPDIR)/sws-sws.Tpo -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-sws.Tpo $(DEPDIR)/sws-sws.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sws.c' object='sws-sws.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
+
+sws-inet_pton.o: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-inet_pton.o -MD -MP -MF $(DEPDIR)/sws-inet_pton.Tpo -c -o sws-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-inet_pton.Tpo $(DEPDIR)/sws-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/inet_pton.c' object='sws-inet_pton.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
 
-tftpd-mprintf.o: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.o -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.o' libtool=no @AMDEPBACKSLASH@
+sws-inet_pton.obj: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-inet_pton.obj -MD -MP -MF $(DEPDIR)/sws-inet_pton.Tpo -c -o sws-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sws-inet_pton.Tpo $(DEPDIR)/sws-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/inet_pton.c' object='sws-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
 
-tftpd-mprintf.obj: $(top_srcdir)/lib/mprintf.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.obj -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.o -MD -MP -MF $(DEPDIR)/tftpd-mprintf.Tpo -c -o tftpd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-mprintf.Tpo $(DEPDIR)/tftpd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='tftpd-mprintf.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
 
-tftpd-nonblock.o: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.o -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.o' libtool=no @AMDEPBACKSLASH@
+tftpd-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.obj -MD -MP -MF $(DEPDIR)/tftpd-mprintf.Tpo -c -o tftpd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-mprintf.Tpo $(DEPDIR)/tftpd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/mprintf.c' object='tftpd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
 
-tftpd-nonblock.obj: $(top_srcdir)/lib/nonblock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.obj -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.o -MD -MP -MF $(DEPDIR)/tftpd-nonblock.Tpo -c -o tftpd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-nonblock.Tpo $(DEPDIR)/tftpd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='tftpd-nonblock.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
 
-tftpd-strequal.o: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.o -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.o' libtool=no @AMDEPBACKSLASH@
+tftpd-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.obj -MD -MP -MF $(DEPDIR)/tftpd-nonblock.Tpo -c -o tftpd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-nonblock.Tpo $(DEPDIR)/tftpd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/nonblock.c' object='tftpd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
 
-tftpd-strequal.obj: $(top_srcdir)/lib/strequal.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.obj -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-strequal.o: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.o -MD -MP -MF $(DEPDIR)/tftpd-strequal.Tpo -c -o tftpd-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-strequal.Tpo $(DEPDIR)/tftpd-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='tftpd-strequal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.o `test -f '../../lib/strequal.c' || echo '$(srcdir)/'`../../lib/strequal.c
 
-tftpd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.o -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+tftpd-strequal.obj: ../../lib/strequal.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.obj -MD -MP -MF $(DEPDIR)/tftpd-strequal.Tpo -c -o tftpd-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-strequal.Tpo $(DEPDIR)/tftpd-strequal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strequal.c' object='tftpd-strequal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.obj `if test -f '../../lib/strequal.c'; then $(CYGPATH_W) '../../lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strequal.c'; fi`
 
-tftpd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.o -MD -MP -MF $(DEPDIR)/tftpd-strtoofft.Tpo -c -o tftpd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-strtoofft.Tpo $(DEPDIR)/tftpd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='tftpd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
 
-tftpd-timeval.o: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.o -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.o' libtool=no @AMDEPBACKSLASH@
+tftpd-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.obj -MD -MP -MF $(DEPDIR)/tftpd-strtoofft.Tpo -c -o tftpd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-strtoofft.Tpo $(DEPDIR)/tftpd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/strtoofft.c' object='tftpd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
 
-tftpd-timeval.obj: $(top_srcdir)/lib/timeval.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.obj -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.o -MD -MP -MF $(DEPDIR)/tftpd-timeval.Tpo -c -o tftpd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-timeval.Tpo $(DEPDIR)/tftpd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='tftpd-timeval.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
 
-tftpd-warnless.o: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.o -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.o' libtool=no @AMDEPBACKSLASH@
+tftpd-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.obj -MD -MP -MF $(DEPDIR)/tftpd-timeval.Tpo -c -o tftpd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-timeval.Tpo $(DEPDIR)/tftpd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/timeval.c' object='tftpd-timeval.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
 
-tftpd-warnless.obj: $(top_srcdir)/lib/warnless.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.obj -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.o -MD -MP -MF $(DEPDIR)/tftpd-warnless.Tpo -c -o tftpd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-warnless.Tpo $(DEPDIR)/tftpd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='tftpd-warnless.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+tftpd-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.obj -MD -MP -MF $(DEPDIR)/tftpd-warnless.Tpo -c -o tftpd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-warnless.Tpo $(DEPDIR)/tftpd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/warnless.c' object='tftpd-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
 
 tftpd-getpart.o: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.o -MD -MP -MF "$(DEPDIR)/tftpd-getpart.Tpo" -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='tftpd-getpart.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.o -MD -MP -MF $(DEPDIR)/tftpd-getpart.Tpo -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-getpart.Tpo $(DEPDIR)/tftpd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='tftpd-getpart.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
 
 tftpd-getpart.obj: getpart.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.obj -MD -MP -MF "$(DEPDIR)/tftpd-getpart.Tpo" -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='getpart.c' object='tftpd-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.obj -MD -MP -MF $(DEPDIR)/tftpd-getpart.Tpo -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-getpart.Tpo $(DEPDIR)/tftpd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='getpart.c' object='tftpd-getpart.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
 
-tftpd-base64.o: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.o -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.o' libtool=no @AMDEPBACKSLASH@
+tftpd-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.o -MD -MP -MF $(DEPDIR)/tftpd-base64.Tpo -c -o tftpd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-base64.Tpo $(DEPDIR)/tftpd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='tftpd-base64.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
 
-tftpd-base64.obj: $(top_srcdir)/lib/base64.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.obj -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.obj -MD -MP -MF $(DEPDIR)/tftpd-base64.Tpo -c -o tftpd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-base64.Tpo $(DEPDIR)/tftpd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/base64.c' object='tftpd-base64.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
 
-tftpd-memdebug.o: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.o -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.o' libtool=no @AMDEPBACKSLASH@
+tftpd-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.o -MD -MP -MF $(DEPDIR)/tftpd-memdebug.Tpo -c -o tftpd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-memdebug.Tpo $(DEPDIR)/tftpd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='tftpd-memdebug.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
 
-tftpd-memdebug.obj: $(top_srcdir)/lib/memdebug.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.obj -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+tftpd-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.obj -MD -MP -MF $(DEPDIR)/tftpd-memdebug.Tpo -c -o tftpd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-memdebug.Tpo $(DEPDIR)/tftpd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../../lib/memdebug.c' object='tftpd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
 
 tftpd-util.o: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.o -MD -MP -MF "$(DEPDIR)/tftpd-util.Tpo" -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='tftpd-util.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.o -MD -MP -MF $(DEPDIR)/tftpd-util.Tpo -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-util.Tpo $(DEPDIR)/tftpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='tftpd-util.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
 
 tftpd-util.obj: util.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.obj -MD -MP -MF "$(DEPDIR)/tftpd-util.Tpo" -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='tftpd-util.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.obj -MD -MP -MF $(DEPDIR)/tftpd-util.Tpo -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-util.Tpo $(DEPDIR)/tftpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='util.c' object='tftpd-util.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
 
 tftpd-tftpd.o: tftpd.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.o -MD -MP -MF "$(DEPDIR)/tftpd-tftpd.Tpo" -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tftpd.c' object='tftpd-tftpd.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.o -MD -MP -MF $(DEPDIR)/tftpd-tftpd.Tpo -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-tftpd.Tpo $(DEPDIR)/tftpd-tftpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tftpd.c' object='tftpd-tftpd.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
 
 tftpd-tftpd.obj: tftpd.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.obj -MD -MP -MF "$(DEPDIR)/tftpd-tftpd.Tpo" -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tftpd.c' object='tftpd-tftpd.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.obj -MD -MP -MF $(DEPDIR)/tftpd-tftpd.Tpo -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-tftpd.Tpo $(DEPDIR)/tftpd-tftpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tftpd.c' object='tftpd-tftpd.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -1521,82 +1861,85 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -1614,16 +1957,22 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -1637,7 +1986,7 @@ distclean: distclean-am
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
 
 dvi: dvi-am
 
@@ -1645,18 +1994,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -1677,19 +2046,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am install-man \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am \
-       uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+       ctags-am distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-am uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index be3f068..6e81dfd 100644 (file)
@@ -1,28 +1,29 @@
-noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd
+noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd fake_ntlm
 
 CURLX_SRCS = \
$(top_srcdir)/lib/mprintf.c \
$(top_srcdir)/lib/nonblock.c \
$(top_srcdir)/lib/strequal.c \
$(top_srcdir)/lib/strtoofft.c \
$(top_srcdir)/lib/timeval.c \
$(top_srcdir)/lib/warnless.c
../../lib/mprintf.c \
../../lib/nonblock.c \
../../lib/strequal.c \
../../lib/strtoofft.c \
../../lib/timeval.c \
../../lib/warnless.c
 
 CURLX_HDRS = \
$(top_srcdir)/lib/curlx.h \
$(top_srcdir)/lib/nonblock.h \
$(top_srcdir)/lib/strequal.h \
$(top_srcdir)/lib/strtoofft.h \
$(top_srcdir)/lib/timeval.h \
$(top_srcdir)/lib/warnless.h
../../lib/curlx.h \
../../lib/nonblock.h \
../../lib/strequal.h \
../../lib/strtoofft.h \
../../lib/timeval.h \
../../lib/warnless.h
 
 USEFUL = \
  getpart.c \
  getpart.h \
- $(top_srcdir)/lib/base64.c \
- $(top_srcdir)/lib/curl_base64.h \
- $(top_srcdir)/lib/memdebug.c \
- $(top_srcdir)/lib/memdebug.h
+ server_setup.h \
+ ../../lib/base64.c \
+ ../../lib/curl_base64.h \
+ ../../lib/memdebug.c \
+ ../../lib/memdebug.h
 
 UTIL = \
  util.c \
@@ -30,36 +31,42 @@ UTIL = \
 
 getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
  testpart.c
-getpart_LDADD = @TEST_SERVER_LIBS@
+getpart_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 getpart_CFLAGS = $(AM_CFLAGS)
 
 resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  resolve.c
-resolve_LDADD = @TEST_SERVER_LIBS@
+resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 resolve_CFLAGS = $(AM_CFLAGS)
 
 rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  rtspd.c
-rtspd_LDADD = @TEST_SERVER_LIBS@
+rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 rtspd_CFLAGS = $(AM_CFLAGS)
 
 sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  sockfilt.c \
$(top_srcdir)/lib/inet_pton.c
-sockfilt_LDADD = @TEST_SERVER_LIBS@
../../lib/inet_pton.c
+sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 sockfilt_CFLAGS = $(AM_CFLAGS)
 
 sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
- sws.c
-sws_LDADD = @TEST_SERVER_LIBS@
+ sws.c \
+ ../../lib/inet_pton.c
+sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 sws_CFLAGS = $(AM_CFLAGS)
 
 tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
  server_sockaddr.h \
  tftpd.c \
  tftp.h
-tftpd_LDADD = @TEST_SERVER_LIBS@
+tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
 tftpd_CFLAGS = $(AM_CFLAGS)
+
+fake_ntlm_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ fake_ntlm.c
+fake_ntlm_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+fake_ntlm_CFLAGS = $(AM_CFLAGS)
diff --git a/tests/server/base64.pl b/tests/server/base64.pl
new file mode 100644 (file)
index 0000000..2eab1fa
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use MIME::Base64 qw(encode_base64);
+
+my $buf;
+while(read(STDIN, $buf, 60*57)) {
+    my $enc = encode_base64($buf);
+    print "$enc";
+}
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
new file mode 100644 (file)
index 0000000..799f573
--- /dev/null
@@ -0,0 +1,277 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Mandy Wu, <mandy.wu@intel.com>
+ * Copyright (C) 2011 - 2013, 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 "server_setup.h"
+
+/*
+ * This is a fake ntlm_auth, which is used for testing NTLM single-sign-on.
+ * When DEBUGBUILD is defined, libcurl invoke this tool instead of real winbind
+ * daemon helper /usr/bin/ntlm_auth. This tool will accept commands and
+ * responses with a pre-written string saved in test case test2005.
+ */
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/fake_ntlm.log"
+#endif
+
+const char *serverlogfile = DEFAULT_LOGFILE;
+
+/*
+ * Returns an allocated buffer with printable representation of input
+ * buffer contents or returns NULL on out of memory condition.
+ */
+static char *printable(char *inbuf, size_t inlength)
+{
+  char *outbuf;
+  char *newbuf;
+  size_t newsize;
+  size_t outsize;
+  size_t outincr = 0;
+  size_t i, o = 0;
+
+#define HEX_FMT_STR  "[0x%02X]"
+#define HEX_STR_LEN  6
+#define NOTHING_STR  "[NOTHING]"
+#define NOTHING_LEN  9
+
+  if(!inlength)
+    inlength = strlen(inbuf);
+
+  if(inlength) {
+    outincr = ((inlength/2) < (HEX_STR_LEN+1)) ? HEX_STR_LEN+1 : inlength/2;
+    outsize = inlength + outincr;
+  }
+  else
+    outsize = NOTHING_LEN + 1;
+
+  outbuf = malloc(outsize);
+  if(!outbuf)
+    return NULL;
+
+  if(!inlength) {
+    sprintf(&outbuf[0], "%s", NOTHING_STR);
+    return outbuf;
+  }
+
+  for(i=0; i<inlength; i++) {
+
+    if(o > outsize - (HEX_STR_LEN + 1)) {
+      newsize = outsize + outincr;
+      newbuf = realloc(outbuf, newsize);
+      if(!newbuf) {
+        free(outbuf);
+        return NULL;
+      }
+      outbuf = newbuf;
+      outsize = newsize;
+    }
+
+    if((inbuf[i] > 0x20) && (inbuf[i] < 0x7F)) {
+      outbuf[o] = inbuf[i];
+      o++;
+    }
+    else {
+      sprintf(&outbuf[o], HEX_FMT_STR, inbuf[i]);
+      o += HEX_STR_LEN;
+    }
+
+  }
+  outbuf[o] = '\0';
+
+  return outbuf;
+}
+
+int main(int argc, char *argv[])
+{
+  char buf[1024];
+  FILE *stream;
+  char *filename;
+  int error;
+  char *type1_input = NULL, *type3_input = NULL;
+  char *type1_output = NULL, *type3_output = NULL;
+  size_t size = 0;
+  long testnum;
+  const char *env;
+  int arg = 1;
+  char *helper_user = (char *)"unknown";
+  char *helper_proto = (char *)"unknown";
+  char *helper_domain = (char *)"unknown";
+  bool use_cached_creds = FALSE;
+  char *msgbuf;
+
+  buf[0] = '\0';
+
+  while(argc > arg) {
+    if(!strcmp("--use-cached-creds", argv[arg])) {
+      use_cached_creds = TRUE;
+      arg++;
+    }
+    else if(!strcmp("--helper-protocol", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_proto = argv[arg++];
+    }
+    else if(!strcmp("--username", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_user = argv[arg++];
+    }
+    else if(!strcmp("--domain", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_domain = argv[arg++];
+    }
+    else {
+      puts("Usage: fake_ntlm [option]\n"
+           " --use-cached-creds\n"
+           " --helper-protocol [protocol]\n"
+           " --username [username]\n"
+           " --domain [domain]");
+      exit(1);
+    }
+  }
+
+  logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)",
+         helper_user, helper_proto, helper_domain,
+         (use_cached_creds) ? "yes" : "no");
+
+  env = getenv("CURL_NTLM_AUTH_TESTNUM");
+  if (env) {
+    char *endptr;
+    long lnum = strtol(env, &endptr, 10);
+    if((endptr != env + strlen(env)) || (lnum < 1L)) {
+      logmsg("Test number not valid in CURL_NTLM_AUTH_TESTNUM");
+      exit(1);
+    }
+    testnum = lnum;
+  } else {
+    logmsg("Test number not specified in CURL_NTLM_AUTH_TESTNUM");
+    exit(1);
+  }
+
+  env = getenv("CURL_NTLM_AUTH_SRCDIR");
+  if (env) {
+    path = env;
+  }
+
+  filename = test2file(testnum);
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", filename);
+    logmsg("Couldn't open test file %ld", testnum);
+    exit(1);
+  }
+  else {
+    /* get the ntlm_auth input/output */
+    error = getpart(&type1_input, &size, "ntlm_auth_type1", "input", stream);
+    fclose(stream);
+    if(error || size == 0) {
+      logmsg("getpart() type 1 input failed with error: %d", error);
+      exit(1);
+    }
+  }
+
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", filename);
+    logmsg("Couldn't open test file %ld", testnum);
+    exit(1);
+  }
+  else {
+    size = 0;
+    error = getpart(&type3_input, &size, "ntlm_auth_type3", "input", stream);
+    fclose(stream);
+    if(error || size == 0) {
+      logmsg("getpart() type 3 input failed with error: %d", error);
+      exit(1);
+    }
+  }
+
+  while(fgets(buf, sizeof(buf), stdin)) {
+    if(strcmp(buf, type1_input) == 0) {
+      stream=fopen(filename, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", filename);
+        logmsg("Couldn't open test file %ld", testnum);
+        exit(1);
+      }
+      else {
+        size = 0;
+        error = getpart(&type1_output, &size, "ntlm_auth_type1", "output", stream);
+        fclose(stream);
+        if(error || size == 0) {
+          logmsg("getpart() type 1 output failed with error: %d", error);
+          exit(1);
+        }
+      }
+      printf("%s", type1_output);
+      fflush(stdout);
+    }
+    else if(strncmp(buf, type3_input, strlen(type3_input)) == 0) {
+      stream=fopen(filename, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", filename);
+        logmsg("Couldn't open test file %ld", testnum);
+        exit(1);
+      }
+      else {
+        size = 0;
+        error = getpart(&type3_output, &size, "ntlm_auth_type3", "output", stream);
+        fclose(stream);
+        if(error || size == 0) {
+          logmsg("getpart() type 3 output failed with error: %d", error);
+          exit(1);
+        }
+      }
+      printf("%s", type3_output);
+      fflush(stdout);
+    }
+    else {
+      printf("Unknown request\n");
+      msgbuf = printable(buf, 0);
+      if(msgbuf) {
+        logmsg("invalid input: '%s'\n", msgbuf);
+        free(msgbuf);
+      }
+      else
+        logmsg("OOM formatting invalid input: '%s'\n", buf);
+      exit(1);
+    }
+  }
+  return 1;
+}
index a3b5f2f..b00e852 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
 
 #include "getpart.h"
 
@@ -31,7 +28,7 @@
    versions instead */
 #include "curlx.h" /* from the private lib dir */
 
-/* just to please base64.h we create a fake struct */
+/* just to please curl_base64.h we create a fake struct */
 struct SessionHandle {
   int fake;
 };
@@ -49,7 +46,7 @@ struct SessionHandle {
 #ifdef DEBUG_GETPART
 #define show(x) printf x
 #else
-#define show(x)
+#define show(x) Curl_nop_stmt
 #endif
 
 #if defined(_MSC_VER) && defined(_DLL)
@@ -61,6 +58,9 @@ curl_free_callback Curl_cfree = (curl_free_callback)free;
 curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
 curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)strdup;
 curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
 
 #if defined(_MSC_VER) && defined(_DLL)
 #  pragma warning(default:4232) /* MSVC extension, dllimport identity */
@@ -166,7 +166,9 @@ static int appenddata(char  **dst_buf,   /* dest buffer */
 
   if(src_b64) {
     /* base64 decode the given buffer */
-    src_len = Curl_base64_decode(src_buf, &buf64.as_uchar);
+    int error = (int) Curl_base64_decode(src_buf, &buf64.as_uchar, &src_len);
+    if(error)
+      return GPE_OUT_OF_MEMORY;
     src_buf = buf64.as_char;
     if(!src_len || !src_buf) {
       /*
index 78a0be2..25320b0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_SERVER_GETPART_H
-#define HEADER_SERVER_GETPART_H
+#ifndef HEADER_CURL_SERVER_GETPART_H
+#define HEADER_CURL_SERVER_GETPART_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 #define GPE_NO_BUFFER_SPACE -2
 #define GPE_OUT_OF_MEMORY   -1
@@ -30,4 +31,4 @@
 int getpart(char **outbuf, size_t *outlen,
             const char *main, const char *sub, FILE *stream);
 
-#endif /* HEADER_SERVER_GETPART_H */
+#endif /* HEADER_CURL_SERVER_GETPART_H */
index 26ad853..d060988 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* Purpose
  *
  *
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 5c06729..72422ec 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /*
  * curl's test suite Real Time Streaming Protocol (RTSP) server.
  * This source file was started based on curl's HTTP test suite server.
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 /* include memdebug.h last */
 #include "memdebug.h"
 
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  ERANGE
+#define ERANGE  34 /* errno.h value */
+#endif
+
 #ifdef ENABLE_IPV6
 static bool use_ipv6 = FALSE;
 #endif
@@ -230,6 +228,10 @@ static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
 static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
 #endif
 
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
 /* var which if set indicates that the program should finish execution */
 
 SIG_ATOMIC_T got_exit_signal = 0;
@@ -245,13 +247,13 @@ static volatile int exit_signal = 0;
 
 static RETSIGTYPE exit_signal_handler(int signum)
 {
-  int old_errno = ERRNO;
+  int old_errno = errno;
   if(got_exit_signal == 0) {
     got_exit_signal = 1;
     exit_signal = signum;
   }
   (void)signal(signum, exit_signal_handler);
-  SET_ERRNO(old_errno);
+  errno = old_errno;
 }
 
 static void install_signal_handlers(void)
@@ -259,32 +261,39 @@ static void install_signal_handlers(void)
 #ifdef SIGHUP
   /* ignore SIGHUP signal */
   if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
 #endif
 #ifdef SIGPIPE
   /* ignore SIGPIPE signal */
   if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
 #endif
 #ifdef SIGALRM
   /* ignore SIGALRM signal */
   if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
 #endif
 #ifdef SIGINT
   /* handle SIGINT signal with our exit_signal_handler */
   if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
   else
     siginterrupt(SIGINT, 1);
 #endif
 #ifdef SIGTERM
   /* handle SIGTERM signal with our exit_signal_handler */
   if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
   else
     siginterrupt(SIGTERM, 1);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
 }
 
 static void restore_signal_handlers(void)
@@ -309,6 +318,10 @@ static void restore_signal_handlers(void)
   if(SIG_ERR != old_sigterm_handler)
     (void)signal(SIGTERM, old_sigterm_handler);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
 }
 
 static int ProcessRequest(struct httprequest *req)
@@ -404,7 +417,7 @@ static int ProcessRequest(struct httprequest *req)
 
       stream=fopen(filename, "rb");
       if(!stream) {
-        error = ERRNO;
+        error = errno;
         logmsg("fopen() failed with error: %d %s", error, strerror(error));
         logmsg("Error opening file: %s", filename);
         logmsg("Couldn't open test file %ld", req->testno);
@@ -584,9 +597,9 @@ static int ProcessRequest(struct httprequest *req)
       while(*ptr && ISSPACE(*ptr))
         ptr++;
       endptr = ptr;
-      SET_ERRNO(0);
+      errno = 0;
       clen = strtoul(ptr, &endptr, 10);
-      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == ERRNO)) {
+      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
         /* this assumes that a zero Content-Length is valid */
         logmsg("Found invalid Content-Length: (%s) in the request", ptr);
         req->open = FALSE; /* closes connection */
@@ -718,7 +731,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
 
   do {
     dump = fopen(REQUEST_DUMP, "ab");
-  } while ((dump == NULL) && ((error = ERRNO) == EINTR));
+  } while ((dump == NULL) && ((error = errno) == EINTR));
   if (dump == NULL) {
     logmsg("Error opening file %s error: %d %s",
            REQUEST_DUMP, error, strerror(error));
@@ -734,7 +747,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
       goto storerequest_cleanup;
     if(written > 0)
       writeleft -= written;
-  } while ((writeleft > 0) && ((error = ERRNO) == EINTR));
+  } while ((writeleft > 0) && ((error = errno) == EINTR));
 
   if(writeleft == 0)
     logmsg("Wrote request (%zu bytes) input to " REQUEST_DUMP, totalsize);
@@ -749,7 +762,7 @@ storerequest_cleanup:
 
   do {
     res = fclose(dump);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error closing file %s error: %d %s",
            REQUEST_DUMP, error, strerror(error));
@@ -963,7 +976,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
 
     stream=fopen(filename, "rb");
     if(!stream) {
-      error = ERRNO;
+      error = errno;
       logmsg("fopen() failed with error: %d %s", error, strerror(error));
       logmsg("Error opening file: %s", filename);
       logmsg("Couldn't open test file");
@@ -988,7 +1001,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
     /* re-open the same file again */
     stream=fopen(filename, "rb");
     if(!stream) {
-      error = ERRNO;
+      error = errno;
       logmsg("fopen() failed with error: %d %s", error, strerror(error));
       logmsg("Error opening file: %s", filename);
       logmsg("Couldn't open test file");
@@ -1033,7 +1046,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
 
   dump = fopen(RESPONSE_DUMP, "ab");
   if(!dump) {
-    error = ERRNO;
+    error = errno;
     logmsg("fopen() failed with error: %d %s", error, strerror(error));
     logmsg("Error opening file: %s", RESPONSE_DUMP);
     logmsg("couldn't create logfile: " RESPONSE_DUMP);
@@ -1091,7 +1104,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
 
   do {
     res = fclose(dump);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error closing file %s error: %d %s",
            RESPONSE_DUMP, error, strerror(error));
@@ -1137,7 +1150,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
               break;
             if(res) {
               /* should not happen */
-              error = SOCKERRNO;
+              error = errno;
               logmsg("wait_ms() failed with error: (%d) %s",
                      error, strerror(error));
               break;
diff --git a/tests/server/server_setup.h b/tests/server/server_setup.h
new file mode 100644 (file)
index 0000000..59e3695
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_SERVER_SETUP_H
+#define HEADER_CURL_SERVER_SETUP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, 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.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+#include "curl_setup.h" /* portability help from the lib directory */
+
+#endif /* HEADER_CURL_SERVER_SETUP_H */
index e2c059a..6a17fe0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_SERVER_SOCKADDR_H
-#define HEADER_SERVER_SOCKADDR_H
+#ifndef HEADER_CURL_SERVER_SOCKADDR_H
+#define HEADER_CURL_SERVER_SOCKADDR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 typedef union {
   struct sockaddr      sa;
@@ -30,4 +31,4 @@ typedef union {
 #endif
 } srvr_sockaddr_union_t;
 
-#endif /* HEADER_SERVER_SOCKADDR_H */
+#endif /* HEADER_CURL_SERVER_SOCKADDR_H */
index 90ce9d9..d924331 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* Purpose
  *
  * if no signal was being ignored or handled at all.  Enjoy it!
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
+#ifdef USE_WINSOCK
+#include <conio.h>  /* for _kbhit() used in select_ws() */
+#endif
 
 #define ENABLE_CURLX_PRINTF
 /* make the curlx header define all printf() functions to use the curlx_*
 #include "inet_pton.h"
 #include "util.h"
 #include "server_sockaddr.h"
+#include "warnless.h"
 
 /* include memdebug.h last */
 #include "memdebug.h"
 
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EAGAIN
+#define EAGAIN  11 /* errno.h value */
+#undef  ENOMEM
+#define ENOMEM  12 /* errno.h value */
+#undef  EINVAL
+#define EINVAL  22 /* errno.h value */
+#endif
+
 #define DEFAULT_PORT 8999
 
 #ifndef DEFAULT_LOGFILE
 const char *serverlogfile = DEFAULT_LOGFILE;
 
 static bool verbose = FALSE;
+static bool bind_only = FALSE;
 #ifdef ENABLE_IPV6
 static bool use_ipv6 = FALSE;
 #endif
@@ -167,6 +174,10 @@ static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
 static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
 #endif
 
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
 /* var which if set indicates that the program should finish execution */
 
 SIG_ATOMIC_T got_exit_signal = 0;
@@ -182,13 +193,13 @@ static volatile int exit_signal = 0;
 
 static RETSIGTYPE exit_signal_handler(int signum)
 {
-  int old_errno = ERRNO;
+  int old_errno = errno;
   if(got_exit_signal == 0) {
     got_exit_signal = 1;
     exit_signal = signum;
   }
   (void)signal(signum, exit_signal_handler);
-  SET_ERRNO(old_errno);
+  errno = old_errno;
 }
 
 static void install_signal_handlers(void)
@@ -196,32 +207,39 @@ static void install_signal_handlers(void)
 #ifdef SIGHUP
   /* ignore SIGHUP signal */
   if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
 #endif
 #ifdef SIGPIPE
   /* ignore SIGPIPE signal */
   if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
 #endif
 #ifdef SIGALRM
   /* ignore SIGALRM signal */
   if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
 #endif
 #ifdef SIGINT
   /* handle SIGINT signal with our exit_signal_handler */
   if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
   else
     siginterrupt(SIGINT, 1);
 #endif
 #ifdef SIGTERM
   /* handle SIGTERM signal with our exit_signal_handler */
   if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
   else
     siginterrupt(SIGTERM, 1);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
 }
 
 static void restore_signal_handlers(void)
@@ -246,7 +264,78 @@ static void restore_signal_handlers(void)
   if(SIG_ERR != old_sigterm_handler)
     (void)signal(SIGTERM, old_sigterm_handler);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+#ifdef WIN32
+/*
+ * read-wrapper to support reading from stdin on Windows.
+ */
+static ssize_t read_wincon(int fd, void *buf, size_t count)
+{
+  HANDLE handle = NULL;
+  DWORD mode, rcount = 0;
+  BOOL success;
+
+  if(fd == fileno(stdin)) {
+    handle = GetStdHandle(STD_INPUT_HANDLE);
+  }
+  else {
+    return read(fd, buf, count);
+  }
+
+  if(GetConsoleMode(handle, &mode)) {
+    success = ReadConsole(handle, buf, count, &rcount, NULL);
+  }
+  else {
+    success = ReadFile(handle, buf, count, &rcount, NULL);
+  }
+  if(success) {
+    return rcount;
+  }
+
+  errno = GetLastError();
+  return -1;
 }
+#define read(a,b,c) read_wincon(a,b,c)
+
+/*
+ * write-wrapper to support writing to stdout and stderr on Windows.
+ */
+static ssize_t write_wincon(int fd, const void *buf, size_t count)
+{
+  HANDLE handle = NULL;
+  DWORD mode, wcount = 0;
+  BOOL success;
+
+  if(fd == fileno(stdout)) {
+    handle = GetStdHandle(STD_OUTPUT_HANDLE);
+  }
+  else if(fd == fileno(stderr)) {
+    handle = GetStdHandle(STD_ERROR_HANDLE);
+  }
+  else {
+    return write(fd, buf, count);
+  }
+
+  if(GetConsoleMode(handle, &mode)) {
+    success = WriteConsole(handle, buf, count, &wcount, NULL);
+  }
+  else {
+    success = WriteFile(handle, buf, count, &wcount, NULL);
+  }
+  if(success) {
+    return wcount;
+  }
+
+  errno = GetLastError();
+  return -1;
+}
+#define write(a,b,c) write_wincon(a,b,c)
+#endif
 
 /*
  * fullread is a wrapper around the read() function. This will repeat the call
@@ -270,10 +359,12 @@ static ssize_t fullread(int filedes, void *buffer, size_t nbytes)
     }
 
     if(rc < 0) {
-      error = ERRNO;
+      error = errno;
       if((error == EINTR) || (error == EAGAIN))
         continue;
-      logmsg("unrecoverable read() failure: %s", strerror(error));
+      logmsg("reading from file descriptor: %d,", filedes);
+      logmsg("unrecoverable read() failure: (%d) %s",
+             error, strerror(error));
       return -1;
     }
 
@@ -314,10 +405,12 @@ static ssize_t fullwrite(int filedes, const void *buffer, size_t nbytes)
     }
 
     if(wc < 0) {
-      error = ERRNO;
+      error = errno;
       if((error == EINTR) || (error == EAGAIN))
         continue;
-      logmsg("unrecoverable write() failure: %s", strerror(error));
+      logmsg("writing to file descriptor: %d,", filedes);
+      logmsg("unrecoverable write() failure: (%d) %s",
+             error, strerror(error));
       return -1;
     }
 
@@ -407,6 +500,245 @@ static void lograw(unsigned char *buffer, ssize_t len)
     logmsg("'%s'", data);
 }
 
+#ifdef USE_WINSOCK
+/*
+ * WinSock select() does not support standard file descriptors,
+ * it can only check SOCKETs. The following function is an attempt
+ * to re-create a select() function with support for other handle types.
+ *
+ * select() function with support for WINSOCK2 sockets and all
+ * other handle types supported by WaitForMultipleObjectsEx().
+ *
+ * TODO: Differentiate between read/write/except for non-SOCKET handles.
+ *
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms687028.aspx
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms741572.aspx
+ */
+static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
+                     fd_set *exceptfds, struct timeval *timeout)
+{
+  long networkevents;
+  DWORD milliseconds, wait, idx, mode, avail, events, inputs;
+  WSAEVENT wsaevent, *wsaevents;
+  WSANETWORKEVENTS wsanetevents;
+  INPUT_RECORD *inputrecords;
+  HANDLE handle, *handles;
+  curl_socket_t sock, *fdarr, *wsasocks;
+  int error, fds;
+  DWORD nfd = 0, wsa = 0;
+  int ret = 0;
+
+  /* check if the input value is valid */
+  if(nfds < 0) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  /* check if we got descriptors, sleep in case we got none */
+  if(!nfds) {
+    Sleep((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+    return 0;
+  }
+
+  /* allocate internal array for the original input handles */
+  fdarr = malloc(nfds * sizeof(curl_socket_t));
+  if(fdarr == NULL) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* allocate internal array for the internal event handles */
+  handles = malloc(nfds * sizeof(HANDLE));
+  if(handles == NULL) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* allocate internal array for the internal socket handles */
+  wsasocks = malloc(nfds * sizeof(curl_socket_t));
+  if(wsasocks == NULL) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* allocate internal array for the internal WINSOCK2 events */
+  wsaevents = malloc(nfds * sizeof(WSAEVENT));
+  if(wsaevents == NULL) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* loop over the handles in the input descriptor sets */
+  for(fds = 0; fds < nfds; fds++) {
+    networkevents = 0;
+    handles[nfd] = 0;
+
+    if(FD_ISSET(fds, readfds))
+      networkevents |= FD_READ|FD_ACCEPT|FD_CLOSE;
+
+    if(FD_ISSET(fds, writefds))
+      networkevents |= FD_WRITE|FD_CONNECT;
+
+    if(FD_ISSET(fds, exceptfds))
+      networkevents |= FD_OOB|FD_CLOSE;
+
+    /* only wait for events for which we actually care */
+    if(networkevents) {
+      fdarr[nfd] = curlx_sitosk(fds);
+      if(fds == fileno(stdin)) {
+        handles[nfd] = GetStdHandle(STD_INPUT_HANDLE);
+      }
+      else if(fds == fileno(stdout)) {
+        handles[nfd] = GetStdHandle(STD_OUTPUT_HANDLE);
+      }
+      else if(fds == fileno(stderr)) {
+        handles[nfd] = GetStdHandle(STD_ERROR_HANDLE);
+      }
+      else {
+        wsaevent = WSACreateEvent();
+        if(wsaevent != WSA_INVALID_EVENT) {
+          error = WSAEventSelect(fds, wsaevent, networkevents);
+          if(error != SOCKET_ERROR) {
+            handles[nfd] = wsaevent;
+            wsasocks[wsa] = curlx_sitosk(fds);
+            wsaevents[wsa] = wsaevent;
+            wsa++;
+          }
+          else {
+            handles[nfd] = (HANDLE) curlx_sitosk(fds);
+            WSACloseEvent(wsaevent);
+          }
+        }
+      }
+      nfd++;
+    }
+  }
+
+  /* convert struct timeval to milliseconds */
+  if(timeout) {
+    milliseconds = ((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+  }
+  else {
+    milliseconds = INFINITE;
+  }
+
+  /* wait for one of the internal handles to trigger */
+  wait = WaitForMultipleObjectsEx(nfd, handles, FALSE, milliseconds, FALSE);
+
+  /* loop over the internal handles returned in the descriptors */
+  for(idx = 0; idx < nfd; idx++) {
+    handle = handles[idx];
+    sock = fdarr[idx];
+    fds = curlx_sktosi(sock);
+
+    /* check if the current internal handle was triggered */
+    if(wait != WAIT_FAILED && (wait - WAIT_OBJECT_0) <= idx &&
+       WaitForSingleObjectEx(handle, 0, FALSE) == WAIT_OBJECT_0) {
+      /* try to handle the event with STD* handle functions */
+      if(fds == fileno(stdin)) {
+        /* check if there is no data in the input buffer */
+        if(!stdin->_cnt) {
+          /* check if we are getting data from a PIPE */
+          if(!GetConsoleMode(handle, &mode)) {
+            /* check if there is no data from PIPE input */
+            if(!PeekNamedPipe(handle, NULL, 0, NULL, &avail, NULL))
+              avail = 0;
+            if(!avail) {
+              FD_CLR(sock, readfds);
+              /* reduce CPU load */
+              Sleep(10);
+            }
+          } /* check if there is no data from keyboard input */
+          else if (!_kbhit()) {
+            /* check if there are INPUT_RECORDs in the input buffer */
+            if(GetNumberOfConsoleInputEvents(handle, &events)) {
+              if(events > 0) {
+                /* remove INPUT_RECORDs from the input buffer */
+                inputrecords = (INPUT_RECORD*)malloc(events *
+                                                     sizeof(INPUT_RECORD));
+                if(inputrecords) {
+                  if(!ReadConsoleInput(handle, inputrecords,
+                                       events, &inputs))
+                    inputs = 0;
+                  free(inputrecords);
+                }
+
+                /* check if we got all inputs, otherwise clear buffer */
+                if(events != inputs)
+                  FlushConsoleInputBuffer(handle);
+              }
+            }
+
+            /* remove from descriptor set since there is no real data */
+            FD_CLR(sock, readfds);
+          }
+        }
+
+        /* stdin is never ready for write or exceptional */
+        FD_CLR(sock, writefds);
+        FD_CLR(sock, exceptfds);
+      }
+      else if(fds == fileno(stdout) || fds == fileno(stderr)) {
+        /* stdout and stderr are never ready for read or exceptional */
+        FD_CLR(sock, readfds);
+        FD_CLR(sock, exceptfds);
+      }
+      else {
+        /* try to handle the event with the WINSOCK2 functions */
+        error = WSAEnumNetworkEvents(fds, handle, &wsanetevents);
+        if(error != SOCKET_ERROR) {
+          /* remove from descriptor set if not ready for read/accept/close */
+          if(!(wsanetevents.lNetworkEvents & (FD_READ|FD_ACCEPT|FD_CLOSE)))
+            FD_CLR(sock, readfds);
+
+          /* remove from descriptor set if not ready for write/connect */
+          if(!(wsanetevents.lNetworkEvents & (FD_WRITE|FD_CONNECT)))
+            FD_CLR(sock, writefds);
+
+          /* HACK:
+           * use exceptfds together with readfds to signal
+           * that the connection was closed by the client.
+           *
+           * Reason: FD_CLOSE is only signaled once, sometimes
+           * at the same time as FD_READ with data being available.
+           * This means that recv/sread is not reliable to detect
+           * that the connection is closed.
+           */
+          /* remove from descriptor set if not exceptional */
+          if(!(wsanetevents.lNetworkEvents & (FD_OOB|FD_CLOSE)))
+            FD_CLR(sock, exceptfds);
+        }
+      }
+
+      /* check if the event has not been filtered using specific tests */
+      if(FD_ISSET(sock, readfds) || FD_ISSET(sock, writefds) ||
+         FD_ISSET(sock, exceptfds)) {
+        ret++;
+      }
+    }
+    else {
+      /* remove from all descriptor sets since this handle did not trigger */
+      FD_CLR(sock, readfds);
+      FD_CLR(sock, writefds);
+      FD_CLR(sock, exceptfds);
+    }
+  }
+
+  for(idx = 0; idx < wsa; idx++) {
+    WSAEventSelect(wsasocks[idx], NULL, 0);
+    WSACloseEvent(wsaevents[idx]);
+  }
+
+  free(wsaevents);
+  free(wsasocks);
+  free(handles);
+  free(fdarr);
+
+  return ret;
+}
+#define select(a,b,c,d,e) select_ws(a,b,c,d,e)
+#endif  /* USE_WINSOCK */
+
 /*
   sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
 
@@ -422,7 +754,7 @@ static bool juggle(curl_socket_t *sockfdp,
   fd_set fds_write;
   fd_set fds_err;
   curl_socket_t sockfd = CURL_SOCKET_BAD;
-  curl_socket_t maxfd = CURL_SOCKET_BAD;
+  int maxfd = -99;
   ssize_t rc;
   ssize_t nread_socket;
   ssize_t bytes_written;
@@ -455,17 +787,7 @@ static bool juggle(curl_socket_t *sockfdp,
   FD_ZERO(&fds_write);
   FD_ZERO(&fds_err);
 
-#ifdef USE_WINSOCK
-  /*
-  ** WinSock select() does not support standard file descriptors,
-  ** it can only check SOCKETs. Since this program in its current
-  ** state will not work on WinSock based systems, next line is
-  ** commented out to allow warning-free compilation awaiting the
-  ** day it will be fixed to also run on WinSock systems.
-  */
-#else
-  FD_SET(fileno(stdin), &fds_read);
-#endif
+  FD_SET((curl_socket_t)fileno(stdin), &fds_read);
 
   switch(*mode) {
 
@@ -475,7 +797,7 @@ static bool juggle(curl_socket_t *sockfdp,
     sockfd = listenfd;
     /* there's always a socket to wait for */
     FD_SET(sockfd, &fds_read);
-    maxfd = sockfd;
+    maxfd = (int)sockfd;
     break;
 
   case PASSIVE_CONNECT:
@@ -489,7 +811,10 @@ static bool juggle(curl_socket_t *sockfdp,
     else {
       /* there's always a socket to wait for */
       FD_SET(sockfd, &fds_read);
-      maxfd = sockfd;
+#ifdef USE_WINSOCK
+      FD_SET(sockfd, &fds_err);
+#endif
+      maxfd = (int)sockfd;
     }
     break;
 
@@ -499,7 +824,10 @@ static bool juggle(curl_socket_t *sockfdp,
     /* sockfd turns CURL_SOCKET_BAD when our connection has been closed */
     if(CURL_SOCKET_BAD != sockfd) {
       FD_SET(sockfd, &fds_read);
-      maxfd = sockfd;
+#ifdef USE_WINSOCK
+      FD_SET(sockfd, &fds_err);
+#endif
+      maxfd = (int)sockfd;
     }
     else {
       logmsg("No socket to read on");
@@ -519,14 +847,16 @@ static bool juggle(curl_socket_t *sockfdp,
 
   do {
 
-    rc = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout);
+    /* select() blocking behavior call on blocking descriptors please */
+
+    rc = select(maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout);
 
     if(got_exit_signal) {
       logmsg("signalled to die, exiting...");
       return FALSE;
     }
 
-  } while((rc == -1) && ((error = SOCKERRNO) == EINTR));
+  } while((rc == -1) && ((error = errno) == EINTR));
 
   if(rc < 0) {
     logmsg("select() failed with error: (%d) %s",
@@ -640,17 +970,22 @@ static bool juggle(curl_socket_t *sockfdp,
 
   if((sockfd != CURL_SOCKET_BAD) && (FD_ISSET(sockfd, &fds_read)) ) {
 
+    curl_socket_t newfd = CURL_SOCKET_BAD; /* newly accepted socket */
+
     if(*mode == PASSIVE_LISTEN) {
       /* there's no stream set up yet, this is an indication that there's a
          client connecting. */
-      sockfd = accept(sockfd, NULL, NULL);
-      if(CURL_SOCKET_BAD == sockfd)
-        logmsg("accept() failed");
+      newfd = accept(sockfd, NULL, NULL);
+      if(CURL_SOCKET_BAD == newfd) {
+        error = SOCKERRNO;
+        logmsg("accept(%d, NULL, NULL) failed with error: (%d) %s",
+               sockfd, error, strerror(error));
+      }
       else {
         logmsg("====> Client connect");
         if(!write_stdout("CNCT\n", 5))
           return FALSE;
-        *sockfdp = sockfd; /* store the new socket */
+        *sockfdp = newfd; /* store the new socket */
         *mode = PASSIVE_CONNECT; /* we have connected */
       }
       return TRUE;
@@ -659,7 +994,22 @@ static bool juggle(curl_socket_t *sockfdp,
     /* read from socket, pass on data to stdout */
     nread_socket = sread(sockfd, buffer, sizeof(buffer));
 
-    if(nread_socket <= 0) {
+    if(nread_socket > 0) {
+      snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket);
+      if(!write_stdout(data, 10))
+        return FALSE;
+      if(!write_stdout(buffer, nread_socket))
+        return FALSE;
+
+      logmsg("< %zd bytes data, client => server", nread_socket);
+      lograw(buffer, nread_socket);
+    }
+
+    if(nread_socket <= 0
+#ifdef USE_WINSOCK
+       || FD_ISSET(sockfd, &fds_err)
+#endif
+       ) {
       logmsg("====> Client disconnect");
       if(!write_stdout("DISC\n", 5))
         return FALSE;
@@ -671,15 +1021,6 @@ static bool juggle(curl_socket_t *sockfdp,
         *mode = ACTIVE_DISCONNECT;
       return TRUE;
     }
-
-    snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket);
-    if(!write_stdout(data, 10))
-      return FALSE;
-    if(!write_stdout(buffer, nread_socket))
-      return FALSE;
-
-    logmsg("< %zd bytes data, client => server", nread_socket);
-    lograw(buffer, nread_socket);
   }
 
   return TRUE;
@@ -711,7 +1052,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
         rc = wait_ms(delay);
         if(rc) {
           /* should not happen */
-          error = SOCKERRNO;
+          error = errno;
           logmsg("wait_ms() failed with error: (%d) %s",
                  error, strerror(error));
           sclose(sock);
@@ -807,12 +1148,18 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
     }
   }
 
+  /* bindonly option forces no listening */
+  if(bind_only) {
+    logmsg("instructed to bind port without listening");
+    return sock;
+  }
+
   /* start accepting connections */
   rc = listen(sock, 5);
   if(0 != rc) {
     error = SOCKERRNO;
-    logmsg("listen() failed with error: (%d) %s",
-           error, strerror(error));
+    logmsg("listen(%d, 5) failed with error: (%d) %s",
+           sock, error, strerror(error));
     sclose(sock);
     return CURL_SOCKET_BAD;
   }
@@ -875,6 +1222,10 @@ int main(int argc, char *argv[])
 #endif
       arg++;
     }
+    else if(!strcmp("--bindonly", argv[arg])) {
+      bind_only = TRUE;
+      arg++;
+    }
     else if(!strcmp("--port", argv[arg])) {
       arg++;
       if(argc>arg) {
@@ -923,6 +1274,7 @@ int main(int argc, char *argv[])
            " --pidfile [file]\n"
            " --ipv4\n"
            " --ipv6\n"
+           " --bindonly\n"
            " --port [port]\n"
            " --connect [port]\n"
            " --addr [address]");
@@ -933,6 +1285,10 @@ int main(int argc, char *argv[])
 #ifdef WIN32
   win32_init();
   atexit(win32_cleanup);
+
+  setmode(fileno(stdin), O_BINARY);
+  setmode(fileno(stdout), O_BINARY);
+  setmode(fileno(stderr), O_BINARY);
 #endif
 
   install_signal_handlers();
@@ -950,6 +1306,7 @@ int main(int argc, char *argv[])
     error = SOCKERRNO;
     logmsg("Error creating socket: (%d) %s",
            error, strerror(error));
+    write_stdout("FAIL\n", 5);
     goto sockfilt_cleanup;
   }
 
@@ -985,6 +1342,7 @@ int main(int argc, char *argv[])
       error = SOCKERRNO;
       logmsg("Error connecting to port %hu: (%d) %s",
              connectport, error, strerror(error));
+      write_stdout("FAIL\n", 5);
       goto sockfilt_cleanup;
     }
     logmsg("====> Client connect");
@@ -993,8 +1351,10 @@ int main(int argc, char *argv[])
   else {
     /* passive daemon style */
     sock = sockdaemon(sock, &port);
-    if(CURL_SOCKET_BAD == sock)
+    if(CURL_SOCKET_BAD == sock) {
+      write_stdout("FAIL\n", 5);
       goto sockfilt_cleanup;
+    }
     msgsock = CURL_SOCKET_BAD; /* no stream socket yet */
   }
 
@@ -1002,12 +1362,16 @@ int main(int argc, char *argv[])
 
   if(connectport)
     logmsg("Connected to port %hu", connectport);
+  else if(bind_only)
+    logmsg("Bound without listening on port %hu", port);
   else
     logmsg("Listening on port %hu", port);
 
   wrotepidfile = write_pidfile(pidname);
-  if(!wrotepidfile)
+  if(!wrotepidfile) {
+    write_stdout("FAIL\n", 5);
     goto sockfilt_cleanup;
+  }
 
   do {
     juggle_again = juggle(&msgsock, sock, &mode);
index 949831d..38658cb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* sws.c: simple (silly?) web server
 
 
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
    versions instead */
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
+#include "inet_pton.h"
 #include "util.h"
 #include "server_sockaddr.h"
 
 /* include memdebug.h last */
 #include "memdebug.h"
 
-#if !defined(CURL_SWS_FORK_ENABLED) && defined(HAVE_FORK)
-/*
- * The normal sws build for the plain standard curl test suite has no use for
- * fork(), but if you feel wild and crazy and want to setup some more exotic
- * tests. Define this and run...
- */
-#define CURL_SWS_FORK_ENABLED
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EAGAIN
+#define EAGAIN  11 /* errno.h value */
+#undef  ERANGE
+#define ERANGE  34 /* errno.h value */
 #endif
 
 #ifdef ENABLE_IPV6
@@ -79,6 +71,7 @@ static bool use_ipv6 = FALSE;
 static bool use_gopher = FALSE;
 static const char *ipv_inuse = "IPv4";
 static int serverlogslocked = 0;
+static bool is_proxy = FALSE;
 
 #define REQBUFSIZ 150000
 #define REQBUFSIZ_TXT "149999"
@@ -95,6 +88,8 @@ static bool prevbounce=FALSE; /* instructs the server to increase the part
 
 struct httprequest {
   char reqbuf[REQBUFSIZ]; /* buffer area for the incoming request */
+  bool connect_request; /* if a CONNECT */
+  unsigned short connect_port; /* the port number CONNECT used */
   size_t checkindex; /* where to start checking of the request */
   size_t offset;     /* size of the incoming request */
   long testno;       /* test number found in the request */
@@ -107,7 +102,7 @@ struct httprequest {
   bool digest;    /* Authorization digest header found */
   bool ntlm;      /* Authorization ntlm header found */
   int writedelay; /* if non-zero, delay this number of seconds between
-                     writes in the response */
+                     writes in the response */
   int pipe;       /* if non-zero, expect this many requests to do a "piped"
                      request/response */
   int skip;       /* if non-zero, the server is instructed to not read this
@@ -117,8 +112,16 @@ struct httprequest {
   int rcmd;       /* doing a special command, see defines above */
   int prot_version;  /* HTTP version * 10 */
   bool pipelining;   /* true if request is pipelined */
+  int callcount;  /* times ProcessRequest() gets called */
+  bool connmon;   /* monitor the state of the connection, log disconnects */
+  int done_processing;
 };
 
+#define MAX_SOCKETS 1024
+
+static curl_socket_t all_sockets[MAX_SOCKETS];
+static size_t num_sockets = 0;
+
 static int ProcessRequest(struct httprequest *req);
 static void storerequest(char *reqbuf, size_t totalsize);
 
@@ -135,6 +138,11 @@ const char *serverlogfile = DEFAULT_LOGFILE;
 #define REQUEST_DUMP  "log/server.input"
 #define RESPONSE_DUMP "log/server.response"
 
+/* when told to run as proxy, we store the logs in different files so that
+   they can co-exist with the same program running as a "server" */
+#define REQUEST_PROXY_DUMP  "log/proxy.input"
+#define RESPONSE_PROXY_DUMP "log/proxy.response"
+
 /* very-big-path support */
 #define MAXDOCNAMELEN 140000
 #define MAXDOCNAMELEN_TXT "139999"
@@ -151,14 +159,16 @@ const char *serverlogfile = DEFAULT_LOGFILE;
 /* 'stream' means to send a never-ending stream of data */
 #define CMD_STREAM "stream"
 
+/* 'connection-monitor' will output when a server/proxy connection gets
+   disconnected as for some cases it is important that it gets done at the
+   proper point - like with NTLM */
+#define CMD_CONNECTIONMONITOR "connection-monitor"
+
 #define END_OF_HEADERS "\r\n\r\n"
 
 enum {
-  DOCNUMBER_NOTHING = -7,
-  DOCNUMBER_QUIT    = -6,
-  DOCNUMBER_BADCONNECT = -5,
-  DOCNUMBER_INTERNAL= -4,
-  DOCNUMBER_CONNECT = -3,
+  DOCNUMBER_NOTHING = -4,
+  DOCNUMBER_QUIT    = -3,
   DOCNUMBER_WERULEZ = -2,
   DOCNUMBER_404     = -1
 };
@@ -169,14 +179,6 @@ static const char *end_of_headers = END_OF_HEADERS;
 static const char *docquit =
 "HTTP/1.1 200 Goodbye" END_OF_HEADERS;
 
-/* sent as reply to a CONNECT */
-static const char *docconnect =
-"HTTP/1.1 200 Mighty fine indeed" END_OF_HEADERS;
-
-/* sent as reply to a "bad" CONNECT */
-static const char *docbadconnect =
-"HTTP/1.1 501 Forbidden you fool" END_OF_HEADERS;
-
 /* send back this on 404 file not found */
 static const char *doc404 = "HTTP/1.1 404 Not Found\r\n"
     "Server: " SWSVERSION "\r\n"
@@ -221,6 +223,10 @@ static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
 static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
 #endif
 
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
 /* var which if set indicates that the program should finish execution */
 
 SIG_ATOMIC_T got_exit_signal = 0;
@@ -236,13 +242,13 @@ static volatile int exit_signal = 0;
 
 static RETSIGTYPE exit_signal_handler(int signum)
 {
-  int old_errno = ERRNO;
+  int old_errno = errno;
   if(got_exit_signal == 0) {
     got_exit_signal = 1;
     exit_signal = signum;
   }
   (void)signal(signum, exit_signal_handler);
-  SET_ERRNO(old_errno);
+  errno = old_errno;
 }
 
 static void install_signal_handlers(void)
@@ -250,32 +256,39 @@ static void install_signal_handlers(void)
 #ifdef SIGHUP
   /* ignore SIGHUP signal */
   if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
 #endif
 #ifdef SIGPIPE
   /* ignore SIGPIPE signal */
   if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
 #endif
 #ifdef SIGALRM
   /* ignore SIGALRM signal */
   if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
 #endif
 #ifdef SIGINT
   /* handle SIGINT signal with our exit_signal_handler */
   if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
   else
     siginterrupt(SIGINT, 1);
 #endif
 #ifdef SIGTERM
   /* handle SIGTERM signal with our exit_signal_handler */
   if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
   else
     siginterrupt(SIGTERM, 1);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
 }
 
 static void restore_signal_handlers(void)
@@ -300,6 +313,111 @@ static void restore_signal_handlers(void)
   if(SIG_ERR != old_sigterm_handler)
     (void)signal(SIGTERM, old_sigterm_handler);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+/* based on the testno, parse the correct server commands */
+static int parse_servercmd(struct httprequest *req)
+{
+  FILE *stream;
+  char *filename;
+  int error;
+
+  filename = test2file(req->testno);
+
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("  [1] Error opening file: %s", filename);
+    logmsg("  Couldn't open test file %ld", req->testno);
+    req->open = FALSE; /* closes connection */
+    return 1; /* done */
+  }
+  else {
+    char *orgcmd = NULL;
+    char *cmd = NULL;
+    size_t cmdsize = 0;
+    int num=0;
+
+    /* get the custom server control "commands" */
+    error = getpart(&orgcmd, &cmdsize, "reply", "servercmd", stream);
+    fclose(stream);
+    if(error) {
+      logmsg("getpart() failed with error: %d", error);
+      req->open = FALSE; /* closes connection */
+      return 1; /* done */
+    }
+
+    req->connmon = FALSE;
+
+    cmd = orgcmd;
+    while(cmd && cmdsize) {
+      char *check;
+
+      if(!strncmp(CMD_AUTH_REQUIRED, cmd, strlen(CMD_AUTH_REQUIRED))) {
+        logmsg("instructed to require authorization header");
+        req->auth_req = TRUE;
+      }
+      else if(!strncmp(CMD_IDLE, cmd, strlen(CMD_IDLE))) {
+        logmsg("instructed to idle");
+        req->rcmd = RCMD_IDLE;
+        req->open = TRUE;
+      }
+      else if(!strncmp(CMD_STREAM, cmd, strlen(CMD_STREAM))) {
+        logmsg("instructed to stream");
+        req->rcmd = RCMD_STREAM;
+      }
+      else if(!strncmp(CMD_CONNECTIONMONITOR, cmd,
+                       strlen(CMD_CONNECTIONMONITOR))) {
+        logmsg("enabled connection monitoring");
+        req->connmon = TRUE;
+      }
+      else if(1 == sscanf(cmd, "pipe: %d", &num)) {
+        logmsg("instructed to allow a pipe size of %d", num);
+        if(num < 0)
+          logmsg("negative pipe size ignored");
+        else if(num > 0)
+          req->pipe = num-1; /* decrease by one since we don't count the
+                                first request in this number */
+      }
+      else if(1 == sscanf(cmd, "skip: %d", &num)) {
+        logmsg("instructed to skip this number of bytes %d", num);
+        req->skip = num;
+      }
+      else if(1 == sscanf(cmd, "writedelay: %d", &num)) {
+        logmsg("instructed to delay %d secs between packets", num);
+        req->writedelay = num;
+      }
+      else {
+        logmsg("Unknown <servercmd> instruction found: %s", cmd);
+      }
+      /* try to deal with CRLF or just LF */
+      check = strchr(cmd, '\r');
+      if(!check)
+        check = strchr(cmd, '\n');
+
+      if(check) {
+        /* get to the letter following the newline */
+        while((*check == '\r') || (*check == '\n'))
+          check++;
+
+        if(!*check)
+          /* if we reached a zero, get out */
+          break;
+        cmd = check;
+      }
+      else
+        break;
+    }
+    if(orgcmd)
+      free(orgcmd);
+  }
+
+  return 0; /* OK! */
 }
 
 static int ProcessRequest(struct httprequest *req)
@@ -308,13 +426,14 @@ static int ProcessRequest(struct httprequest *req)
   bool chunked = FALSE;
   static char request[REQUEST_KEYWORD_SIZE];
   static char doc[MAXDOCNAMELEN];
-  char logbuf[256];
+  char logbuf[456];
   int prot_major, prot_minor;
-  char *end;
-  int error;
-  end = strstr(line, end_of_headers);
+  char *end = strstr(line, end_of_headers);
 
-  logmsg("ProcessRequest() called");
+  req->callcount++;
+
+  logmsg("Process %d bytes request%s", req->offset,
+         req->callcount > 1?" [CONTINUED]":"");
 
   /* try to figure out the request characteristics as soon as possible, but
      only once! */
@@ -343,10 +462,7 @@ static int ProcessRequest(struct httprequest *req)
 
     /* get the number after it */
     if(ptr) {
-      FILE *stream;
-      char *filename;
-
-      if((strlen(doc) + strlen(request)) < 200)
+      if((strlen(doc) + strlen(request)) < 400)
         sprintf(logbuf, "Got request: %s %s HTTP/%d.%d",
                 request, doc, prot_major, prot_minor);
       else
@@ -381,113 +497,124 @@ static int ProcessRequest(struct httprequest *req)
       else
         req->partno = 0;
 
-      sprintf(logbuf, "Requested test number %ld part %ld",
-              req->testno, req->partno);
-      logmsg("%s", logbuf);
+      if(req->testno) {
 
-      filename = test2file(req->testno);
+        sprintf(logbuf, "Requested test number %ld part %ld",
+                req->testno, req->partno);
+        logmsg("%s", logbuf);
 
-      stream=fopen(filename, "rb");
-      if(!stream) {
-        error = ERRNO;
-        logmsg("fopen() failed with error: %d %s", error, strerror(error));
-        logmsg("Error opening file: %s", filename);
-        logmsg("Couldn't open test file %ld", req->testno);
-        req->open = FALSE; /* closes connection */
-        return 1; /* done */
+        /* find and parse <servercmd> for this test */
+        parse_servercmd(req);
       }
-      else {
-        char *cmd = NULL;
-        size_t cmdsize = 0;
-        int num=0;
-
-        /* get the custom server control "commands" */
-        error = getpart(&cmd, &cmdsize, "reply", "servercmd", stream);
-        fclose(stream);
-        if(error) {
-          logmsg("getpart() failed with error: %d", error);
-          req->open = FALSE; /* closes connection */
-          return 1; /* done */
-        }
-
-        if(cmdsize) {
-          logmsg("Found a reply-servercmd section!");
+      else
+        req->testno = DOCNUMBER_NOTHING;
 
-          if(!strncmp(CMD_AUTH_REQUIRED, cmd, strlen(CMD_AUTH_REQUIRED))) {
-            logmsg("instructed to require authorization header");
-            req->auth_req = TRUE;
-          }
-          else if(!strncmp(CMD_IDLE, cmd, strlen(CMD_IDLE))) {
-            logmsg("instructed to idle");
-            req->rcmd = RCMD_IDLE;
-            req->open = TRUE;
-          }
-          else if(!strncmp(CMD_STREAM, cmd, strlen(CMD_STREAM))) {
-            logmsg("instructed to stream");
-            req->rcmd = RCMD_STREAM;
-          }
-          else if(1 == sscanf(cmd, "pipe: %d", &num)) {
-            logmsg("instructed to allow a pipe size of %d", num);
-            if(num < 0)
-              logmsg("negative pipe size ignored");
-            else if(num > 0)
-              req->pipe = num-1; /* decrease by one since we don't count the
-                                    first request in this number */
-          }
-          else if(1 == sscanf(cmd, "skip: %d", &num)) {
-            logmsg("instructed to skip this number of bytes %d", num);
-            req->skip = num;
-          }
-          else if(1 == sscanf(cmd, "writedelay: %d", &num)) {
-            logmsg("instructed to delay %d secs between packets", num);
-            req->writedelay = num;
-          }
-          else {
-            logmsg("funny instruction found: %s", cmd);
-          }
-        }
-        if(cmd)
-          free(cmd);
-      }
     }
-    else {
+
+    if(req->testno == DOCNUMBER_NOTHING) {
+      /* didn't find any in the first scan, try alternative test case
+         number placements */
+
       if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
                 doc, &prot_major, &prot_minor) == 3) {
+        char *portp = NULL;
+        unsigned long part=0;
+
         sprintf(logbuf, "Received a CONNECT %s HTTP/%d.%d request",
                 doc, prot_major, prot_minor);
         logmsg("%s", logbuf);
 
+        req->connect_request = TRUE;
+
         if(req->prot_version == 10)
           req->open = FALSE; /* HTTP 1.0 closes connection by default */
 
-        if(!strncmp(doc, "bad", 3))
-          /* if the host name starts with bad, we fake an error here */
-          req->testno = DOCNUMBER_BADCONNECT;
-        else if(!strncmp(doc, "test", 4)) {
-          /* if the host name starts with test, the port number used in the
-             CONNECT line will be used as test number! */
-          char *portp = strchr(doc, ':');
-          if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
-            req->testno = strtol(portp+1, NULL, 10);
+        if(doc[0] == '[') {
+          char *p = &doc[1];
+          /* scan through the hexgroups and store the value of the last group
+             in the 'part' variable and use as test case number!! */
+          while(*p && (ISXDIGIT(*p) || (*p == ':') || (*p == '.'))) {
+            char *endp;
+            part = strtoul(p, &endp, 16);
+            if(ISXDIGIT(*p))
+              p = endp;
+            else
+              p++;
+          }
+          if(*p != ']')
+            logmsg("Invalid CONNECT IPv6 address format");
+          else if (*(p+1) != ':')
+            logmsg("Invalid CONNECT IPv6 port format");
           else
-            req->testno = DOCNUMBER_CONNECT;
+            portp = p+1;
+
+          req->testno = part;
         }
         else
-          req->testno = DOCNUMBER_CONNECT;
+          portp = strchr(doc, ':');
+
+        if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1))) {
+          unsigned long ulnum = strtoul(portp+1, NULL, 10);
+          if(!ulnum || (ulnum > 65535UL))
+            logmsg("Invalid CONNECT port received");
+          else
+            req->connect_port = curlx_ultous(ulnum);
+
+        }
+        logmsg("Port number: %d, test case number: %ld",
+               req->connect_port, req->testno);
       }
-      else {
+    }
+
+    if(req->testno == DOCNUMBER_NOTHING) {
+      /* Still no test case number. Try to get the the number off the last dot
+         instead, IE we consider the TLD to be the test number. Test 123 can
+         then be written as "example.com.123". */
+
+      /* find the last dot */
+      ptr = strrchr(doc, '.');
+
+      /* get the number after it */
+      if(ptr) {
+        ptr++; /* skip the dot */
+
+        req->testno = strtol(ptr, &ptr, 10);
+
+        if(req->testno > 10000) {
+          req->partno = req->testno % 10000;
+          req->testno /= 10000;
+
+          logmsg("found test %d in requested host name", req->testno);
+
+        }
+        else
+          req->partno = 0;
+
+        sprintf(logbuf, "Requested test number %ld part %ld (from host name)",
+                req->testno, req->partno);
+        logmsg("%s", logbuf);
+
+      }
+
+      if(!req->testno) {
         logmsg("Did not find test number in PATH");
         req->testno = DOCNUMBER_404;
       }
+      else
+        parse_servercmd(req);
     }
   }
+  else if((req->offset >= 3) && (req->testno == DOCNUMBER_NOTHING)) {
+    logmsg("** Unusual request. Starts with %02x %02x %02x",
+           line[0], line[1], line[2]);
+  }
 
   if(!end) {
     /* we don't have a complete request yet! */
-    logmsg("ProcessRequest returned without a complete request");
+    logmsg("request not complete yet");
     return 0; /* not complete yet */
   }
-  logmsg("ProcessRequest found a complete request");
+  logmsg("- request found to be complete");
 
   if(use_gopher) {
     /* when using gopher we cannot check the request until the entire
@@ -550,9 +677,9 @@ static int ProcessRequest(struct httprequest *req)
       while(*ptr && ISSPACE(*ptr))
         ptr++;
       endptr = ptr;
-      SET_ERRNO(0);
+      errno = 0;
       clen = strtoul(ptr, &endptr, 10);
-      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == ERRNO)) {
+      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
         /* this assumes that a zero Content-Length is valid */
         logmsg("Found invalid Content-Length: (%s) in the request", ptr);
         req->open = FALSE; /* closes connection */
@@ -616,10 +743,11 @@ static int ProcessRequest(struct httprequest *req)
     req->ntlm = TRUE; /* NTLM found */
     logmsg("Received NTLM type-1, sending back data %ld", req->partno);
   }
-  else if((req->partno >= 1000) && strstr(req->reqbuf, "Authorization: Basic")) {
-    /* If the client is passing this Basic-header and the part number is already
-       >=1000, we add 1 to the part number.  This allows simple Basic authentication
-       negotiation to work in the test suite. */
+  else if((req->partno >= 1000) &&
+          strstr(req->reqbuf, "Authorization: Basic")) {
+    /* If the client is passing this Basic-header and the part number is
+       already >=1000, we add 1 to the part number.  This allows simple Basic
+       authentication negotiation to work in the test suite. */
     req->partno += 1;
     logmsg("Received Basic request, sending back data %ld", req->partno);
   }
@@ -631,6 +759,7 @@ static int ProcessRequest(struct httprequest *req)
      req->prot_version >= 11 &&
      end &&
      req->reqbuf + req->offset > end + strlen(end_of_headers) &&
+     !req->cl &&
      (!strncmp(req->reqbuf, "GET", strlen("GET")) ||
       !strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) {
     /* If we have a persistent connection, HTTP version >= 1.1
@@ -655,8 +784,10 @@ static int ProcessRequest(struct httprequest *req)
      makes the server NOT wait for PUT/POST data and you can then make the
      test case send a rejection before any such data has been sent. Test case
      154 uses this.*/
-  if(req->auth_req && !req->auth)
+  if(req->auth_req && !req->auth) {
+    logmsg("Return early due to auth requested by none provided");
     return 1; /* done */
+  }
 
   if(req->cl > 0) {
     if(req->cl <= req->offset - (end - req->reqbuf) - strlen(end_of_headers))
@@ -676,6 +807,7 @@ static void storerequest(char *reqbuf, size_t totalsize)
   size_t written;
   size_t writeleft;
   FILE *dump;
+  const char *dumpfile=is_proxy?REQUEST_PROXY_DUMP:REQUEST_DUMP;
 
   if (reqbuf == NULL)
     return;
@@ -683,12 +815,12 @@ static void storerequest(char *reqbuf, size_t totalsize)
     return;
 
   do {
-    dump = fopen(REQUEST_DUMP, "ab");
-  } while ((dump == NULL) && ((error = ERRNO) == EINTR));
+    dump = fopen(dumpfile, "ab");
+  } while ((dump == NULL) && ((error = errno) == EINTR));
   if (dump == NULL) {
-    logmsg("Error opening file %s error: %d %s",
-           REQUEST_DUMP, error, strerror(error));
-    logmsg("Failed to write request input to " REQUEST_DUMP);
+    logmsg("[2] Error opening file %s error: %d %s",
+           dumpfile, error, strerror(error));
+    logmsg("Failed to write request input ");
     return;
   }
 
@@ -700,50 +832,39 @@ static void storerequest(char *reqbuf, size_t totalsize)
       goto storerequest_cleanup;
     if(written > 0)
       writeleft -= written;
-  } while ((writeleft > 0) && ((error = ERRNO) == EINTR));
+  } while ((writeleft > 0) && ((error = errno) == EINTR));
 
   if(writeleft == 0)
-    logmsg("Wrote request (%zu bytes) input to " REQUEST_DUMP, totalsize);
+    logmsg("Wrote request (%zu bytes) input to %s", totalsize, dumpfile);
   else if(writeleft > 0) {
     logmsg("Error writing file %s error: %d %s",
-           REQUEST_DUMP, error, strerror(error));
+           dumpfile, error, strerror(error));
     logmsg("Wrote only (%zu bytes) of (%zu bytes) request input to %s",
-           totalsize-writeleft, totalsize, REQUEST_DUMP);
+           totalsize-writeleft, totalsize, dumpfile);
   }
 
 storerequest_cleanup:
 
   do {
     res = fclose(dump);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error closing file %s error: %d %s",
-           REQUEST_DUMP, error, strerror(error));
+           dumpfile, error, strerror(error));
 }
 
-/* return 0 on success, non-zero on failure */
-static int get_request(curl_socket_t sock, struct httprequest *req)
+static void init_httprequest(struct httprequest *req)
 {
-  int error;
-  int fail = 0;
-  int done_processing = 0;
-  char *reqbuf = req->reqbuf;
-  ssize_t got = 0;
-
-  char *pipereq = NULL;
-  size_t pipereq_length = 0;
-
-  if(req->pipelining) {
-    pipereq = reqbuf + req->checkindex;
-    pipereq_length = req->offset - req->checkindex;
+  /* Pipelining is already set, so do not initialize it here. Only initialize
+     checkindex and offset if pipelining is not set, since in a pipeline they
+     need to be inherited from the previous request. */
+  if(!req->pipelining) {
+    req->checkindex = 0;
+    req->offset = 0;
   }
-
-  /*** Init the httprequest structure properly for the upcoming request ***/
-
-  req->checkindex = 0;
-  req->offset = 0;
   req->testno = DOCNUMBER_NOTHING;
   req->partno = 0;
+  req->connect_request = FALSE;
   req->open = TRUE;
   req->auth_req = FALSE;
   req->auth = FALSE;
@@ -755,11 +876,40 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
   req->writedelay = 0;
   req->rcmd = RCMD_NORMALREQ;
   req->prot_version = 0;
-  req->pipelining = FALSE;
+  req->callcount = 0;
+  req->connect_port = 0;
+  req->done_processing = 0;
+}
+
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+   is no data waiting, or < 0 if it should be closed */
+static int get_request(curl_socket_t sock, struct httprequest *req)
+{
+  int error;
+  int fail = 0;
+  char *reqbuf = req->reqbuf;
+  ssize_t got = 0;
+  int overflow = 0;
+
+  char *pipereq = NULL;
+  size_t pipereq_length = 0;
+
+  if(req->pipelining) {
+    pipereq = reqbuf + req->checkindex;
+    pipereq_length = req->offset - req->checkindex;
 
-  /*** end of httprequest init ***/
+    /* Now that we've got the pipelining info we can reset the
+       pipelining-related vars which were skipped in init_httprequest */
+    req->pipelining = FALSE;
+    req->checkindex = 0;
+    req->offset = 0;
+  }
 
-  while(!done_processing && (req->offset < REQBUFSIZ-1)) {
+  if(req->offset >= REQBUFSIZ-1) {
+    /* buffer is already full; do nothing */
+    overflow = 1;
+  }
+  else {
     if(pipereq_length && pipereq) {
       memmove(reqbuf, pipereq, pipereq_length);
       got = curlx_uztosz(pipereq_length);
@@ -767,21 +917,25 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
     }
     else {
       if(req->skip)
-        /* we are instructed to not read the entire thing, so we make sure to only
-           read what we're supposed to and NOT read the enire thing the client
-           wants to send! */
+        /* we are instructed to not read the entire thing, so we make sure to
+           only read what we're supposed to and NOT read the enire thing the
+           client wants to send! */
         got = sread(sock, reqbuf + req->offset, req->cl);
       else
         got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset);
     }
     if(got_exit_signal)
-      return 1;
+      return -1;
     if(got == 0) {
       logmsg("Connection closed by client");
       fail = 1;
     }
     else if(got < 0) {
       error = SOCKERRNO;
+      if (EAGAIN == error || EWOULDBLOCK == error) {
+        /* nothing to read at the moment */
+        return 0;
+      }
       logmsg("recv() returned error: (%d) %s", error, strerror(error));
       fail = 1;
     }
@@ -789,7 +943,7 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
       /* dump the request received so far to the external file */
       reqbuf[req->offset] = '\0';
       storerequest(reqbuf, req->offset);
-      return 1;
+      return -1;
     }
 
     logmsg("Read %zd bytes", got);
@@ -797,17 +951,17 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
     req->offset += (size_t)got;
     reqbuf[req->offset] = '\0';
 
-    done_processing = ProcessRequest(req);
+    req->done_processing = ProcessRequest(req);
     if(got_exit_signal)
-      return 1;
-    if(done_processing && req->pipe) {
+      return -1;
+    if(req->done_processing && req->pipe) {
       logmsg("Waiting for another piped request");
-      done_processing = 0;
+      req->done_processing = 0;
       req->pipe--;
     }
   }
 
-  if((req->offset == REQBUFSIZ-1) && (got > 0)) {
+  if(overflow || (req->offset == REQBUFSIZ-1 && got > 0)) {
     logmsg("Request would overflow buffer, closing connection");
     /* dump request received so far to external file anyway */
     reqbuf[REQBUFSIZ-1] = '\0';
@@ -822,12 +976,13 @@ static int get_request(curl_socket_t sock, struct httprequest *req)
   else
     reqbuf[req->offset] = '\0';
 
-  /* dump the request to an external file */
-  storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
+  /* at the end of a request dump it to an external file */
+  if (fail || req->done_processing)
+    storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
   if(got_exit_signal)
-    return 1;
+    return -1;
 
-  return fail; /* return 0 on success */
+  return fail ? -1 : 1;
 }
 
 /* returns -1 on failure */
@@ -846,13 +1001,9 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
   size_t responsesize;
   int error = 0;
   int res;
-
+  const char *responsedump = is_proxy?RESPONSE_PROXY_DUMP:RESPONSE_DUMP;
   static char weare[256];
 
-  char partbuf[80]="data";
-
-  logmsg("Send response number %ld part %ld", req->testno, req->partno);
-
   switch(req->rcmd) {
   default:
   case RCMD_NORMALREQ:
@@ -898,17 +1049,6 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
                 msglen, msgbuf);
       buffer = weare;
       break;
-    case DOCNUMBER_INTERNAL:
-      logmsg("Bailing out due to internal error");
-      return -1;
-    case DOCNUMBER_CONNECT:
-      logmsg("Replying to CONNECT");
-      buffer = docconnect;
-      break;
-    case DOCNUMBER_BADCONNECT:
-      logmsg("Replying to a bad CONNECT");
-      buffer = docbadconnect;
-      break;
     case DOCNUMBER_404:
     default:
       logmsg("Replying to with a 404");
@@ -919,17 +1059,25 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
     count = strlen(buffer);
   }
   else {
+    char partbuf[80];
     char *filename = test2file(req->testno);
 
-    if(0 != req->partno)
-      sprintf(partbuf, "data%ld", req->partno);
+    /* select the <data> tag for "normal" requests and the <connect> one
+       for CONNECT requests (within the <reply> section) */
+    const char *section= req->connect_request?"connect":"data";
+
+    if(req->partno)
+      sprintf(partbuf, "%s%ld", section, req->partno);
+    else
+      sprintf(partbuf, "%s", section);
+
+    logmsg("Send response test%ld section <%s>", req->testno, partbuf);
 
     stream=fopen(filename, "rb");
     if(!stream) {
-      error = ERRNO;
+      error = errno;
       logmsg("fopen() failed with error: %d %s", error, strerror(error));
-      logmsg("Error opening file: %s", filename);
-      logmsg("Couldn't open test file");
+      logmsg("  [3] Error opening file: %s", filename);
       return 0;
     }
     else {
@@ -951,10 +1099,9 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
     /* re-open the same file again */
     stream=fopen(filename, "rb");
     if(!stream) {
-      error = ERRNO;
+      error = errno;
       logmsg("fopen() failed with error: %d %s", error, strerror(error));
-      logmsg("Error opening file: %s", filename);
-      logmsg("Couldn't open test file");
+      logmsg("  [4] Error opening file: %s", filename);
       if(ptr)
         free(ptr);
       return 0;
@@ -994,12 +1141,11 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
   else
     prevbounce = FALSE;
 
-  dump = fopen(RESPONSE_DUMP, "ab");
+  dump = fopen(responsedump, "ab");
   if(!dump) {
-    error = ERRNO;
+    error = errno;
     logmsg("fopen() failed with error: %d %s", error, strerror(error));
-    logmsg("Error opening file: %s", RESPONSE_DUMP);
-    logmsg("couldn't create logfile: " RESPONSE_DUMP);
+    logmsg("  [5] Error opening file: %s", responsedump);
     if(ptr)
       free(ptr);
     if(cmd)
@@ -1023,25 +1169,28 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
     else {
       logmsg("Sent off %zd bytes", written);
     }
-    if (req->writedelay) {
-      logmsg("Pausing %d seconds", req->writedelay);
-      sleep(req->writedelay);
-    }
     /* write to file as well */
     fwrite(buffer, 1, (size_t)written, dump);
-    if(got_exit_signal)
-      break;
 
     count -= written;
     buffer += written;
-  } while(count>0);
+
+    if(req->writedelay) {
+      int quarters = req->writedelay * 4;
+      logmsg("Pausing %d seconds", req->writedelay);
+      while((quarters > 0) && !got_exit_signal) {
+        quarters--;
+        wait_ms(250);
+      }
+    }
+  } while((count > 0) && !got_exit_signal);
 
   do {
     res = fclose(dump);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error closing file %s error: %d %s",
-           RESPONSE_DUMP, error, strerror(error));
+           responsedump, error, strerror(error));
 
   if(got_exit_signal) {
     if(ptr)
@@ -1061,8 +1210,8 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
     return -1;
   }
 
-  logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP,
-         responsesize);
+  logmsg("Response sent (%zu bytes) and written to %s",
+         responsesize, responsedump);
 
   if(ptr)
     free(ptr);
@@ -1077,14 +1226,12 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
         if(!strcmp("wait", command)) {
           logmsg("Told to sleep for %d seconds", num);
           quarters = num * 4;
-          while(quarters > 0) {
+          while((quarters > 0) && !got_exit_signal) {
             quarters--;
             res = wait_ms(250);
-            if(got_exit_signal)
-              break;
             if(res) {
               /* should not happen */
-              error = SOCKERRNO;
+              error = errno;
               logmsg("wait_ms() failed with error: (%d) %s",
                      error, strerror(error));
               break;
@@ -1114,12 +1261,648 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
   return 0;
 }
 
+static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
+{
+  srvr_sockaddr_union_t serveraddr;
+  curl_socket_t serverfd;
+  int error;
+  int rc;
+  const char *op_br = "";
+  const char *cl_br = "";
+#ifdef TCP_NODELAY
+  curl_socklen_t flag;
+#endif
+
+#ifdef ENABLE_IPV6
+  if(use_ipv6) {
+    op_br = "[";
+    cl_br = "]";
+  }
+#endif
+
+  if(!ipaddr)
+    return CURL_SOCKET_BAD;
+
+  logmsg("about to connect to %s%s%s:%hu",
+         op_br, ipaddr, cl_br, port);
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6)
+#endif
+    serverfd = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef ENABLE_IPV6
+  else
+    serverfd = socket(AF_INET6, SOCK_STREAM, 0);
+#endif
+  if(CURL_SOCKET_BAD == serverfd) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket for server conection: (%d) %s",
+           error, strerror(error));
+    return CURL_SOCKET_BAD;
+  }
+
+#ifdef TCP_NODELAY
+  /* Disable the Nagle algorithm */
+  flag = 1;
+  if(0 != setsockopt(serverfd, IPPROTO_TCP, TCP_NODELAY,
+                     (void *)&flag, sizeof(flag)))
+    logmsg("====> TCP_NODELAY for server conection failed");
+  else
+    logmsg("TCP_NODELAY set for server conection");
+#endif
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6) {
+#endif
+    memset(&serveraddr.sa4, 0, sizeof(serveraddr.sa4));
+    serveraddr.sa4.sin_family = AF_INET;
+    serveraddr.sa4.sin_port = htons(port);
+    if(Curl_inet_pton(AF_INET, ipaddr, &serveraddr.sa4.sin_addr) < 1) {
+      logmsg("Error inet_pton failed AF_INET conversion of '%s'", ipaddr);
+      sclose(serverfd);
+      return CURL_SOCKET_BAD;
+    }
+
+    rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa4));
+#ifdef ENABLE_IPV6
+  }
+  else {
+    memset(&serveraddr.sa6, 0, sizeof(serveraddr.sa6));
+    serveraddr.sa6.sin6_family = AF_INET6;
+    serveraddr.sa6.sin6_port = htons(port);
+    if(Curl_inet_pton(AF_INET6, ipaddr, &serveraddr.sa6.sin6_addr) < 1) {
+      logmsg("Error inet_pton failed AF_INET6 conversion of '%s'", ipaddr);
+      sclose(serverfd);
+      return CURL_SOCKET_BAD;
+    }
+
+    rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa6));
+  }
+#endif /* ENABLE_IPV6 */
+
+  if(got_exit_signal) {
+    sclose(serverfd);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(rc) {
+    error = SOCKERRNO;
+    logmsg("Error connecting to server port %hu: (%d) %s",
+           port, error, strerror(error));
+    sclose(serverfd);
+    return CURL_SOCKET_BAD;
+  }
+
+  logmsg("connected fine to %s%s%s:%hu, now tunnel",
+         op_br, ipaddr, cl_br, port);
+
+  return serverfd;
+}
+
+/*
+ * A CONNECT has been received, a CONNECT response has been sent.
+ *
+ * This function needs to connect to the server, and then pass data between
+ * the client and the server back and forth until the connection is closed by
+ * either end.
+ *
+ * When doing FTP through a CONNECT proxy, we expect that the data connection
+ * will be setup while the first connect is still being kept up. Therefor we
+ * must accept a new connection and deal with it appropriately.
+ */
+
+#define data_or_ctrl(x) ((x)?"DATA":"CTRL")
+
+#define CTRL  0
+#define DATA  1
+
+static void http_connect(curl_socket_t *infdp,
+                         curl_socket_t rootfd,
+                         const char *ipaddr,
+                         unsigned short ipport)
+{
+  curl_socket_t serverfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+  curl_socket_t clientfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+  ssize_t toc[2] = {0, 0}; /* number of bytes to client */
+  ssize_t tos[2] = {0, 0}; /* number of bytes to server */
+  char readclient[2][256];
+  char readserver[2][256];
+  bool poll_client_rd[2] = { TRUE, TRUE };
+  bool poll_server_rd[2] = { TRUE, TRUE };
+  bool poll_client_wr[2] = { TRUE, TRUE };
+  bool poll_server_wr[2] = { TRUE, TRUE };
+#ifdef TCP_NODELAY
+  curl_socklen_t flag;
+#endif
+  bool primary = FALSE;
+  bool secondary = FALSE;
+  int max_tunnel_idx; /* CTRL or DATA */
+  int loop;
+  int i;
+
+  /* primary tunnel client endpoint already connected */
+  clientfd[CTRL] = *infdp;
+
+  /* Sleep here to make sure the client reads CONNECT response's
+     'end of headers' separate from the server data that follows.
+     This is done to prevent triggering libcurl known bug #39. */
+  for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+    wait_ms(250);
+  if(got_exit_signal)
+    goto http_connect_cleanup;
+
+  serverfd[CTRL] = connect_to(ipaddr, ipport);
+  if(serverfd[CTRL] == CURL_SOCKET_BAD)
+    goto http_connect_cleanup;
+
+  /* Primary tunnel socket endpoints are now connected. Tunnel data back and
+     forth over the primary tunnel until client or server breaks the primary
+     tunnel, simultaneously allowing establishment, operation and teardown of
+     a secondary tunnel that may be used for passive FTP data connection. */
+
+  max_tunnel_idx = CTRL;
+  primary = TRUE;
+
+  while(!got_exit_signal) {
+
+    fd_set input;
+    fd_set output;
+    struct timeval timeout = {0, 250000L}; /* 250 ms */
+    ssize_t rc;
+    curl_socket_t maxfd = (curl_socket_t)-1;
+
+    FD_ZERO(&input);
+    FD_ZERO(&output);
+
+    if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+       (serverfd[DATA] == CURL_SOCKET_BAD) &&
+       poll_client_rd[CTRL] && poll_client_wr[CTRL] &&
+       poll_server_rd[CTRL] && poll_server_wr[CTRL]) {
+      /* listener socket is monitored to allow client to establish
+         secondary tunnel only when this tunnel is not established
+         and primary one is fully operational */
+      FD_SET(rootfd, &input);
+      maxfd = rootfd;
+    }
+
+    /* set tunnel sockets to wait for */
+    for(i = 0; i <= max_tunnel_idx; i++) {
+      /* client side socket monitoring */
+      if(clientfd[i] != CURL_SOCKET_BAD) {
+        if(poll_client_rd[i]) {
+          /* unless told not to do so, monitor readability */
+          FD_SET(clientfd[i], &input);
+          if(clientfd[i] > maxfd)
+            maxfd = clientfd[i];
+        }
+        if(poll_client_wr[i] && toc[i]) {
+          /* unless told not to do so, monitor writeability
+             if there is data ready to be sent to client */
+          FD_SET(clientfd[i], &output);
+          if(clientfd[i] > maxfd)
+            maxfd = clientfd[i];
+        }
+      }
+      /* server side socket monitoring */
+      if(serverfd[i] != CURL_SOCKET_BAD) {
+        if(poll_server_rd[i]) {
+          /* unless told not to do so, monitor readability */
+          FD_SET(serverfd[i], &input);
+          if(serverfd[i] > maxfd)
+            maxfd = serverfd[i];
+        }
+        if(poll_server_wr[i] && tos[i]) {
+          /* unless told not to do so, monitor writeability
+             if there is data ready to be sent to server */
+          FD_SET(serverfd[i], &output);
+          if(serverfd[i] > maxfd)
+            maxfd = serverfd[i];
+        }
+      }
+    }
+    if(got_exit_signal)
+      break;
+
+    rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+
+    if(rc > 0) {
+      /* socket action */
+      bool tcp_fin_wr;
+
+      if(got_exit_signal)
+        break;
+
+      tcp_fin_wr = FALSE;
+
+      /* ---------------------------------------------------------- */
+
+      /* passive mode FTP may establish a secondary tunnel */
+      if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+         (serverfd[DATA] == CURL_SOCKET_BAD) && FD_ISSET(rootfd, &input)) {
+        /* a new connection on listener socket (most likely from client) */
+        curl_socket_t datafd = accept(rootfd, NULL, NULL);
+        if(datafd != CURL_SOCKET_BAD) {
+          struct httprequest req2;
+          int err = 0;
+          memset(&req2, 0, sizeof(req2));
+          logmsg("====> Client connect DATA");
+#ifdef TCP_NODELAY
+          /* Disable the Nagle algorithm */
+          flag = 1;
+          if(0 != setsockopt(datafd, IPPROTO_TCP, TCP_NODELAY,
+                             (void *)&flag, sizeof(flag)))
+            logmsg("====> TCP_NODELAY for client DATA conection failed");
+          else
+            logmsg("TCP_NODELAY set for client DATA conection");
+#endif
+          req2.pipelining = FALSE;
+          init_httprequest(&req2);
+          while(!req2.done_processing) {
+            err = get_request(datafd, &req2);
+            if(err < 0) {
+              /* this socket must be closed, done or not */
+              break;
+            }
+          }
+
+          /* skip this and close the socket if err < 0 */
+          if(err >= 0) {
+            err = send_doc(datafd, &req2);
+            if(!err && req2.connect_request) {
+              /* sleep to prevent triggering libcurl known bug #39. */
+              for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+                wait_ms(250);
+              if(!got_exit_signal) {
+                /* connect to the server */
+                serverfd[DATA] = connect_to(ipaddr, req2.connect_port);
+                if(serverfd[DATA] != CURL_SOCKET_BAD) {
+                  /* secondary tunnel established, now we have two connections */
+                  poll_client_rd[DATA] = TRUE;
+                  poll_client_wr[DATA] = TRUE;
+                  poll_server_rd[DATA] = TRUE;
+                  poll_server_wr[DATA] = TRUE;
+                  max_tunnel_idx = DATA;
+                  secondary = TRUE;
+                  toc[DATA] = 0;
+                  tos[DATA] = 0;
+                  clientfd[DATA] = datafd;
+                  datafd = CURL_SOCKET_BAD;
+                }
+              }
+            }
+          }
+          if(datafd != CURL_SOCKET_BAD) {
+            /* secondary tunnel not established */
+            shutdown(datafd, SHUT_RDWR);
+            sclose(datafd);
+          }
+        }
+        if(got_exit_signal)
+          break;
+      }
+
+      /* ---------------------------------------------------------- */
+
+      /* react to tunnel endpoint readable/writeable notifications */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        size_t len;
+        if(clientfd[i] != CURL_SOCKET_BAD) {
+          len = sizeof(readclient[i]) - tos[i];
+          if(len && FD_ISSET(clientfd[i], &input)) {
+            /* read from client */
+            rc = sread(clientfd[i], &readclient[i][tos[i]], len);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP READING client", data_or_ctrl(i), rc);
+              shutdown(clientfd[i], SHUT_RD);
+              poll_client_rd[i] = FALSE;
+            }
+            else {
+              logmsg("[%s] READ %zd bytes from client", data_or_ctrl(i), rc);
+              logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+                     data_to_hex(&readclient[i][tos[i]], rc));
+              tos[i] += rc;
+            }
+          }
+        }
+        if(serverfd[i] != CURL_SOCKET_BAD) {
+          len = sizeof(readserver[i])-toc[i];
+          if(len && FD_ISSET(serverfd[i], &input)) {
+            /* read from server */
+            rc = sread(serverfd[i], &readserver[i][toc[i]], len);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP READING server", data_or_ctrl(i), rc);
+              shutdown(serverfd[i], SHUT_RD);
+              poll_server_rd[i] = FALSE;
+            }
+            else {
+              logmsg("[%s] READ %zd bytes from server", data_or_ctrl(i), rc);
+              logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+                     data_to_hex(&readserver[i][toc[i]], rc));
+              toc[i] += rc;
+            }
+          }
+        }
+        if(clientfd[i] != CURL_SOCKET_BAD) {
+          if(toc[i] && FD_ISSET(clientfd[i], &output)) {
+            /* write to client */
+            rc = swrite(clientfd[i], readserver[i], toc[i]);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP WRITING client", data_or_ctrl(i), rc);
+              shutdown(clientfd[i], SHUT_WR);
+              poll_client_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+            else {
+              logmsg("[%s] SENT %zd bytes to client", data_or_ctrl(i), rc);
+              logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+                     data_to_hex(readserver[i], rc));
+              if(toc[i] - rc)
+                memmove(&readserver[i][0], &readserver[i][rc], toc[i]-rc);
+              toc[i] -= rc;
+            }
+          }
+        }
+        if(serverfd[i] != CURL_SOCKET_BAD) {
+          if(tos[i] && FD_ISSET(serverfd[i], &output)) {
+            /* write to server */
+            rc = swrite(serverfd[i], readclient[i], tos[i]);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP WRITING server", data_or_ctrl(i), rc);
+              shutdown(serverfd[i], SHUT_WR);
+              poll_server_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+            else {
+              logmsg("[%s] SENT %zd bytes to server", data_or_ctrl(i), rc);
+              logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+                     data_to_hex(readclient[i], rc));
+              if(tos[i] - rc)
+                memmove(&readclient[i][0], &readclient[i][rc], tos[i]-rc);
+              tos[i] -= rc;
+            }
+          }
+        }
+      }
+      if(got_exit_signal)
+        break;
+
+      /* ---------------------------------------------------------- */
+
+      /* endpoint read/write disabling, endpoint closing and tunnel teardown */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        for(loop = 2; loop > 0; loop--) {
+          /* loop twice to satisfy condition interdependencies without
+             having to await select timeout or another socket event */
+          if(clientfd[i] != CURL_SOCKET_BAD) {
+            if(poll_client_rd[i] && !poll_server_wr[i]) {
+              logmsg("[%s] DISABLED READING client", data_or_ctrl(i));
+              shutdown(clientfd[i], SHUT_RD);
+              poll_client_rd[i] = FALSE;
+            }
+            if(poll_client_wr[i] && !poll_server_rd[i] && !toc[i]) {
+              logmsg("[%s] DISABLED WRITING client", data_or_ctrl(i));
+              shutdown(clientfd[i], SHUT_WR);
+              poll_client_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+          }
+          if(serverfd[i] != CURL_SOCKET_BAD) {
+            if(poll_server_rd[i] && !poll_client_wr[i]) {
+              logmsg("[%s] DISABLED READING server", data_or_ctrl(i));
+              shutdown(serverfd[i], SHUT_RD);
+              poll_server_rd[i] = FALSE;
+            }
+            if(poll_server_wr[i] && !poll_client_rd[i] && !tos[i]) {
+              logmsg("[%s] DISABLED WRITING server", data_or_ctrl(i));
+              shutdown(serverfd[i], SHUT_WR);
+              poll_server_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+          }
+        }
+      }
+
+      if(tcp_fin_wr)
+        /* allow kernel to place FIN bit packet on the wire */
+        wait_ms(250);
+
+      /* socket clearing */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        for(loop = 2; loop > 0; loop--) {
+          if(clientfd[i] != CURL_SOCKET_BAD) {
+            if(!poll_client_wr[i] && !poll_client_rd[i]) {
+              logmsg("[%s] CLOSING client socket", data_or_ctrl(i));
+              sclose(clientfd[i]);
+              clientfd[i] = CURL_SOCKET_BAD;
+              if(serverfd[i] == CURL_SOCKET_BAD) {
+                logmsg("[%s] ENDING", data_or_ctrl(i));
+                if(i == DATA)
+                  secondary = FALSE;
+                else
+                  primary = FALSE;
+              }
+            }
+          }
+          if(serverfd[i] != CURL_SOCKET_BAD) {
+            if(!poll_server_wr[i] && !poll_server_rd[i]) {
+              logmsg("[%s] CLOSING server socket", data_or_ctrl(i));
+              sclose(serverfd[i]);
+              serverfd[i] = CURL_SOCKET_BAD;
+              if(clientfd[i] == CURL_SOCKET_BAD) {
+                logmsg("[%s] ENDING", data_or_ctrl(i));
+                if(i == DATA)
+                  secondary = FALSE;
+                else
+                  primary = FALSE;
+              }
+            }
+          }
+        }
+      }
+
+      /* ---------------------------------------------------------- */
+
+      max_tunnel_idx = secondary ? DATA : CTRL;
+
+      if(!primary)
+        /* exit loop upon primary tunnel teardown */
+        break;
+
+    } /* (rc > 0) */
+
+  }
+
+http_connect_cleanup:
+
+  for(i = DATA; i >= CTRL; i--) {
+    if(serverfd[i] != CURL_SOCKET_BAD) {
+      logmsg("[%s] CLOSING server socket (cleanup)", data_or_ctrl(i));
+      shutdown(serverfd[i], SHUT_RDWR);
+      sclose(serverfd[i]);
+    }
+    if(clientfd[i] != CURL_SOCKET_BAD) {
+      logmsg("[%s] CLOSING client socket (cleanup)", data_or_ctrl(i));
+      shutdown(clientfd[i], SHUT_RDWR);
+      sclose(clientfd[i]);
+    }
+    if((serverfd[i] != CURL_SOCKET_BAD) ||
+       (clientfd[i] != CURL_SOCKET_BAD)) {
+      logmsg("[%s] ABORTING", data_or_ctrl(i));
+    }
+  }
+
+  *infdp = CURL_SOCKET_BAD;
+}
+
+/* returns a socket handle, or 0 if there are no more waiting sockets,
+   or < 0 if there was an error */
+static curl_socket_t accept_connection(curl_socket_t sock)
+{
+  curl_socket_t msgsock = CURL_SOCKET_BAD;
+  int error;
+  int flag = 1;
+
+  if(MAX_SOCKETS == num_sockets) {
+    logmsg("Too many open sockets!");
+    return CURL_SOCKET_BAD;
+  }
+
+  msgsock = accept(sock, NULL, NULL);
+
+  if(got_exit_signal) {
+    if(CURL_SOCKET_BAD != msgsock)
+      sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(CURL_SOCKET_BAD == msgsock) {
+    error = SOCKERRNO;
+    if(EAGAIN == error || EWOULDBLOCK == error) {
+      /* nothing to accept */
+      return 0;
+    }
+    logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+           error, strerror(error));
+    return CURL_SOCKET_BAD;
+  }
+
+  if(0 != curlx_nonblock(msgsock, TRUE)) {
+    error = SOCKERRNO;
+    logmsg("curlx_nonblock failed with error: (%d) %s",
+           error, strerror(error));
+    sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(0 != setsockopt(msgsock, SOL_SOCKET, SO_KEEPALIVE,
+                     (void *)&flag, sizeof(flag))) {
+    error = SOCKERRNO;
+    logmsg("setsockopt(SO_KEEPALIVE) failed with error: (%d) %s",
+           error, strerror(error));
+    sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  /*
+  ** As soon as this server accepts a connection from the test harness it
+  ** must set the server logs advisor read lock to indicate that server
+  ** logs should not be read until this lock is removed by this server.
+  */
+
+  if(!serverlogslocked)
+    set_advisor_read_lock(SERVERLOGS_LOCK);
+  serverlogslocked += 1;
+
+  logmsg("====> Client connect");
+
+  all_sockets[num_sockets] = msgsock;
+  num_sockets += 1;
+
+#ifdef TCP_NODELAY
+  /*
+   * Disable the Nagle algorithm to make it easier to send out a large
+   * response in many small segments to torture the clients more.
+   */
+  if(0 != setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY,
+                     (void *)&flag, sizeof(flag)))
+    logmsg("====> TCP_NODELAY failed");
+  else
+    logmsg("TCP_NODELAY set");
+#endif
+
+  return msgsock;
+}
+
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+   is no data waiting, or < 0 if it should be closed */
+static int service_connection(curl_socket_t msgsock, struct httprequest *req,
+                              curl_socket_t listensock,
+                              const char *connecthost)
+{
+  if(got_exit_signal)
+    return -1;
+
+  while(!req->done_processing) {
+    int rc = get_request(msgsock, req);
+    if (rc <= 0) {
+      /* Nothing further to read now (possibly because the socket was closed */
+      return rc;
+    }
+  }
+
+  if(prevbounce) {
+    /* bounce treatment requested */
+    if((req->testno == prevtestno) &&
+       (req->partno == prevpartno)) {
+      req->partno++;
+      logmsg("BOUNCE part number to %ld", req->partno);
+    }
+    else {
+      prevbounce = FALSE;
+      prevtestno = -1;
+      prevpartno = -1;
+    }
+  }
+
+  send_doc(msgsock, req);
+  if(got_exit_signal)
+    return -1;
+
+  if(req->testno < 0) {
+    logmsg("special request received, no persistency");
+    return -1;
+  }
+  if(!req->open) {
+    logmsg("instructed to close connection after server-reply");
+    return -1;
+  }
+
+  if(req->connect_request) {
+    /* a CONNECT request, setup and talk the tunnel */
+    if(!is_proxy) {
+      logmsg("received CONNECT but isn't running as proxy!");
+      return 1;
+    }
+    else {
+      http_connect(&msgsock, listensock, connecthost, req->connect_port);
+      return -1;
+    }
+  }
+
+  /* if we got a CONNECT, loop and get another request as well! */
+
+  if(req->open) {
+    logmsg("=> persistant connection request ended, awaits new request\n");
+    return 1;
+  }
+
+  return -1;
+}
 
 int main(int argc, char *argv[])
 {
   srvr_sockaddr_union_t me;
   curl_socket_t sock = CURL_SOCKET_BAD;
-  curl_socket_t msgsock = CURL_SOCKET_BAD;
   int wrotepidfile = 0;
   int flag;
   unsigned short port = DEFAULT_PORT;
@@ -1129,16 +1912,16 @@ int main(int argc, char *argv[])
   int error;
   int arg=1;
   long pid;
-#ifdef CURL_SWS_FORK_ENABLED
-  bool use_fork = FALSE;
-#endif
+  const char *connecthost = "127.0.0.1";
+
+  /* a default CONNECT port is basically pointless but still ... */
+  size_t socket_idx;
+
+  memset(&req, 0, sizeof(req));
 
   while(argc>arg) {
     if(!strcmp("--version", argv[arg])) {
       printf("sws IPv4%s"
-#ifdef CURL_SWS_FORK_ENABLED
-             " FORK"
-#endif
              "\n"
              ,
 #ifdef ENABLE_IPV6
@@ -1178,12 +1961,6 @@ int main(int argc, char *argv[])
 #endif
       arg++;
     }
-#ifdef CURL_SWS_FORK_ENABLED
-    else if(!strcmp("--fork", argv[arg])) {
-      use_fork=TRUE;
-      arg++;
-    }
-#endif
     else if(!strcmp("--port", argv[arg])) {
       arg++;
       if(argc>arg) {
@@ -1206,6 +1983,18 @@ int main(int argc, char *argv[])
         arg++;
       }
     }
+    else if(!strcmp("--connect", argv[arg])) {
+      /* The connect host IP number that the proxy will connect to no matter
+         what the client asks for, but also use this as a hint that we run as
+         a proxy and do a few different internal choices */
+      arg++;
+      if(argc>arg) {
+        connecthost = argv[arg];
+        arg++;
+        is_proxy = TRUE;
+        logmsg("Run as proxy, CONNECT to host %s", connecthost);
+      }
+    }
     else {
       puts("Usage: sws [option]\n"
            " --version\n"
@@ -1215,8 +2004,8 @@ int main(int argc, char *argv[])
            " --ipv6\n"
            " --port [port]\n"
            " --srcdir [path]\n"
-           " --gopher\n"
-           " --fork");
+           " --connect [ip4-addr]\n"
+           " --gopher");
       return 0;
     }
   }
@@ -1239,6 +2028,9 @@ int main(int argc, char *argv[])
     sock = socket(AF_INET6, SOCK_STREAM, 0);
 #endif
 
+  all_sockets[0] = sock;
+  num_sockets = 1;
+
   if(CURL_SOCKET_BAD == sock) {
     error = SOCKERRNO;
     logmsg("Error creating socket: (%d) %s",
@@ -1247,13 +2039,19 @@ int main(int argc, char *argv[])
   }
 
   flag = 1;
-  if (0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
-            (void *)&flag, sizeof(flag))) {
+  if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+                     (void *)&flag, sizeof(flag))) {
     error = SOCKERRNO;
     logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
            error, strerror(error));
     goto sws_cleanup;
   }
+  if(0 != curlx_nonblock(sock, TRUE)) {
+    error = SOCKERRNO;
+    logmsg("curlx_nonblock failed with error: (%d) %s",
+           error, strerror(error));
+    goto sws_cleanup;
+  }
 
 #ifdef ENABLE_IPV6
   if(!use_ipv6) {
@@ -1301,127 +2099,133 @@ int main(int argc, char *argv[])
   if(!wrotepidfile)
     goto sws_cleanup;
 
-  for (;;) {
-    msgsock = accept(sock, NULL, NULL);
+  /* initialization of httprequest struct is done before get_request(), but
+     the pipelining struct field must be initialized previously to FALSE
+     every time a new connection arrives. */
+
+  req.pipelining = FALSE;
+  init_httprequest(&req);
+
+  for(;;) {
+    fd_set input;
+    fd_set output;
+    struct timeval timeout = {0, 250000L}; /* 250 ms */
+    curl_socket_t maxfd = (curl_socket_t)-1;
+
+    /* Clear out closed sockets */
+    for (socket_idx = num_sockets - 1; socket_idx >= 1; --socket_idx) {
+      if (CURL_SOCKET_BAD == all_sockets[socket_idx]) {
+        char* dst = (char *) (all_sockets + socket_idx);
+        char* src = (char *) (all_sockets + socket_idx + 1);
+        char* end = (char *) (all_sockets + num_sockets);
+        memmove(dst, src, end - src);
+        num_sockets -= 1;
+      }
+    }
+
+    if(got_exit_signal)
+      goto sws_cleanup;
+
+    /* Set up for select*/
+    FD_ZERO(&input);
+    FD_ZERO(&output);
+
+    for (socket_idx = 0; socket_idx < num_sockets; ++socket_idx) {
+      /* Listen on all sockets */
+      FD_SET(all_sockets[socket_idx], &input);
+      if(all_sockets[socket_idx] > maxfd)
+        maxfd = all_sockets[socket_idx];
+    }
 
     if(got_exit_signal)
-      break;
-    if (CURL_SOCKET_BAD == msgsock) {
+      goto sws_cleanup;
+
+    rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+    if (rc < 0) {
       error = SOCKERRNO;
-      logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+      logmsg("select() failed with error: (%d) %s",
              error, strerror(error));
-      break;
+      goto sws_cleanup;
     }
 
-    /*
-    ** As soon as this server acepts a connection from the test harness it
-    ** must set the server logs advisor read lock to indicate that server
-    ** logs should not be read until this lock is removed by this server.
-    */
+    if(got_exit_signal)
+      goto sws_cleanup;
 
-    set_advisor_read_lock(SERVERLOGS_LOCK);
-    serverlogslocked = 1;
-
-#ifdef CURL_SWS_FORK_ENABLED
-    if(use_fork) {
-      /* The fork enabled version just forks off the child and don't care
-         about it anymore, so don't assume otherwise. Beware and don't do
-         this at home. */
-      rc = fork();
-      if(-1 == rc) {
-        printf("MAJOR ERROR: fork() failed!\n");
-        break;
-      }
+    if (rc == 0) {
+      /* Timed out - try again*/
+      continue;
     }
-    else
-      /* not a fork, just set rc so the following proceeds nicely */
-      rc = 0;
-    /* 0 is returned to the child */
-    if(0 == rc) {
-#endif
-    logmsg("====> Client connect");
 
-#ifdef TCP_NODELAY
-    /*
-     * Disable the Nagle algorithm to make it easier to send out a large
-     * response in many small segments to torture the clients more.
-     */
-    flag = 1;
-    if (setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY,
-                   (void *)&flag, sizeof(flag)) == -1) {
-      logmsg("====> TCP_NODELAY failed");
+    /* Check if the listening socket is ready to accept */
+    if (FD_ISSET(all_sockets[0], &input)) {
+      /* Service all queued connections */
+      curl_socket_t msgsock;
+      do {
+        msgsock = accept_connection(sock);
+        logmsg("accept_connection %d returned %d", sock, msgsock);
+        if (CURL_SOCKET_BAD == msgsock)
+          goto sws_cleanup;
+      } while (msgsock > 0);
     }
-#endif
-
-    /* initialization of httprequest struct is done in get_request(), but due
-       to pipelining treatment the pipelining struct field must be initialized
-       previously to FALSE every time a new connection arrives. */
 
-    req.pipelining = FALSE;
+    /* Service all connections that are ready */
+    for (socket_idx = 1; socket_idx < num_sockets; ++socket_idx) {
+      if (FD_ISSET(all_sockets[socket_idx], &input)) {
+        if(got_exit_signal)
+          goto sws_cleanup;
+
+        /* Service this connection until it has nothing available */
+        do {
+          rc = service_connection(all_sockets[socket_idx], &req, sock,
+                                  connecthost);
+          if(got_exit_signal)
+            goto sws_cleanup;
+
+          if (rc < 0) {
+            logmsg("====> Client disconnect %d", req.connmon);
+
+            if(req.connmon) {
+              const char *keepopen="[DISCONNECT]\n";
+              storerequest((char *)keepopen, strlen(keepopen));
+            }
 
-    do {
-      if(got_exit_signal)
-        break;
+            if(!req.open)
+              /* When instructed to close connection after server-reply we
+                 wait a very small amount of time before doing so. If this
+                 is not done client might get an ECONNRESET before reading
+                 a single byte of server-reply. */
+              wait_ms(50);
 
-      if(get_request(msgsock, &req))
-        /* non-zero means error, break out of loop */
-        break;
+            if(all_sockets[socket_idx] != CURL_SOCKET_BAD) {
+              sclose(all_sockets[socket_idx]);
+              all_sockets[socket_idx] = CURL_SOCKET_BAD;
+            }
 
-      if(prevbounce) {
-        /* bounce treatment requested */
-        if((req.testno == prevtestno) &&
-           (req.partno == prevpartno)) {
-          req.partno++;
-          logmsg("BOUNCE part number to %ld", req.partno);
-        }
-        else {
-          prevbounce = FALSE;
-          prevtestno = -1;
-          prevpartno = -1;
-        }
-      }
+            serverlogslocked -= 1;
+            if(!serverlogslocked)
+              clear_advisor_read_lock(SERVERLOGS_LOCK);
 
-      send_doc(msgsock, &req);
-      if(got_exit_signal)
-        break;
+            if (req.testno == DOCNUMBER_QUIT)
+              goto sws_cleanup;
+          }
 
-      if((req.testno < 0) && (req.testno != DOCNUMBER_CONNECT)) {
-        logmsg("special request received, no persistency");
-        break;
+          /* Reset the request, unless we're still in the middle of reading */
+          if (rc != 0)
+            init_httprequest(&req);
+        } while (rc > 0);
       }
-      if(!req.open) {
-        logmsg("instructed to close connection after server-reply");
-        break;
-      }
-
-      if(req.open)
-        logmsg("=> persistant connection request ended, awaits new request");
-      /* if we got a CONNECT, loop and get another request as well! */
-    } while(req.open || (req.testno == DOCNUMBER_CONNECT));
-
-    if(got_exit_signal)
-      break;
-
-    logmsg("====> Client disconnect");
-    sclose(msgsock);
-    msgsock = CURL_SOCKET_BAD;
-
-    if(serverlogslocked) {
-      serverlogslocked = 0;
-      clear_advisor_read_lock(SERVERLOGS_LOCK);
     }
 
-    if (req.testno == DOCNUMBER_QUIT)
-      break;
-#ifdef CURL_SWS_FORK_ENABLED
-    }
-#endif
+    if(got_exit_signal)
+      goto sws_cleanup;
   }
 
 sws_cleanup:
 
-  if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD))
-    sclose(msgsock);
+  for (socket_idx = 1; socket_idx < num_sockets; ++socket_idx)
+    if((all_sockets[socket_idx] != sock) &&
+     (all_sockets[socket_idx] != CURL_SOCKET_BAD))
+      sclose(all_sockets[socket_idx]);
 
   if(sock != CURL_SOCKET_BAD)
     sclose(sock);
index 9409714..912096f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
 
 #include "getpart.h"
 
index f60f122..0650efe 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SERVER_TFTP_H
-#define __SERVER_TFTP_H
+#ifndef HEADER_CURL_SERVER_TFTP_H
+#define HEADER_CURL_SERVER_TFTP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* This file is a rewrite/clone of the arpa/tftp.h file for systems without
    it. */
 
 #define SEGSIZE 512 /* data segment size */
 
-#ifndef __GNUC__
-#define __attribute__(x)
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+  ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+#  define PACKED_STRUCT __attribute__((__packed__))
+#else
+#  define PACKED_STRUCT /*NOTHING*/
 #endif
 
 /* Using a packed struct as binary in a program is begging for problems, but
@@ -39,7 +43,7 @@ struct tftphdr {
   short th_opcode;         /* packet type */
   unsigned short th_block; /* all sorts of things */
   char th_data[1];         /* data or error string */
-} __attribute__ ((__packed__));
+} PACKED_STRUCT;
 
 #define th_stuff th_block
 #define th_code  th_block
@@ -54,4 +58,4 @@ struct tftphdr {
 #define EEXISTS   6
 #define ENOUSER   7
 
-#endif /* __SERVER_TFTP_H */
+#endif /* HEADER_CURL_SERVER_TFTP_H */
index b9a0562..10f88a1 100644 (file)
@@ -47,9 +47,7 @@
  * SUCH DAMAGE.
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
 
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
@@ -60,9 +58,6 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -83,9 +78,7 @@
 #endif
 
 #include <setjmp.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
@@ -259,6 +252,10 @@ static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
 static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
 #endif
 
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
 /* var which if set indicates that the program should finish execution */
 
 SIG_ATOMIC_T got_exit_signal = 0;
@@ -372,13 +369,13 @@ static void justtimeout(int signum)
 
 static RETSIGTYPE exit_signal_handler(int signum)
 {
-  int old_errno = ERRNO;
+  int old_errno = errno;
   if(got_exit_signal == 0) {
     got_exit_signal = 1;
     exit_signal = signum;
   }
   (void)signal(signum, exit_signal_handler);
-  SET_ERRNO(old_errno);
+  errno = old_errno;
 }
 
 static void install_signal_handlers(void)
@@ -386,27 +383,34 @@ static void install_signal_handlers(void)
 #ifdef SIGHUP
   /* ignore SIGHUP signal */
   if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
 #endif
 #ifdef SIGPIPE
   /* ignore SIGPIPE signal */
   if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR)
-    logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
 #endif
 #ifdef SIGINT
   /* handle SIGINT signal with our exit_signal_handler */
   if((old_sigint_handler = signal(SIGINT, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGINT handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
   else
     siginterrupt(SIGINT, 1);
 #endif
 #ifdef SIGTERM
   /* handle SIGTERM signal with our exit_signal_handler */
   if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR)
-    logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO));
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
   else
     siginterrupt(SIGTERM, 1);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  if((old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler)) == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
 }
 
 static void restore_signal_handlers(void)
@@ -427,6 +431,10 @@ static void restore_signal_handlers(void)
   if(SIG_ERR != old_sigterm_handler)
     (void)signal(SIGTERM, old_sigterm_handler);
 #endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
 }
 
 /*
@@ -605,7 +613,8 @@ static ssize_t write_behind(struct testcase *test, int convert)
     }
     /* formerly
        putc(c, file); */
-    write(test->ofile, &c, 1);
+    if(1 != write(test->ofile, &c, 1))
+      break;
     skipit:
     prevchar = c;
   }
@@ -866,7 +875,7 @@ int main(int argc, char **argv)
         result = 2;
         break;
       }
-      if (connect(peer, &from.sa, sizeof(from.sa6)) < 0) {
+      if(connect(peer, &from.sa, sizeof(from.sa6)) < 0) {
         logmsg("connect: fail");
         result = 1;
         break;
@@ -955,11 +964,14 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
   char *filename, *mode = NULL;
   int error;
   FILE *server;
+#ifdef USE_WINSOCK
+  DWORD recvtimeout, recvtimeoutbak;
+#endif
 
   /* Open request dump file. */
   server = fopen(REQUEST_DUMP, "ab");
   if(!server) {
-    error = ERRNO;
+    error = errno;
     logmsg("fopen() failed with error: %d %s", error, strerror(error));
     logmsg("Error opening file: %s", REQUEST_DUMP);
     return -1;
@@ -1009,11 +1021,27 @@ again:
     nak(ecode);
     return 1;
   }
+
+#ifdef USE_WINSOCK
+  recvtimeout = sizeof(recvtimeoutbak);
+  getsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (char*)&recvtimeoutbak, (int*)&recvtimeout);
+  recvtimeout = TIMEOUT*1000;
+  setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (const char*)&recvtimeout, sizeof(recvtimeout));
+#endif
+
   if (tp->th_opcode == opcode_WRQ)
     recvtftp(test, pf);
   else
     sendtftp(test, pf);
 
+#ifdef USE_WINSOCK
+  recvtimeout = recvtimeoutbak;
+  setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (const char*)&recvtimeout, sizeof(recvtimeout));
+#endif
+
   return 0;
 }
 
@@ -1077,7 +1105,7 @@ static int validate_access(struct testcase *test,
     if(file) {
       FILE *stream=fopen(file, "rb");
       if(!stream) {
-        error = ERRNO;
+        error = errno;
         logmsg("fopen() failed with error: %d %s", error, strerror(error));
         logmsg("Error opening file: %s", file);
         logmsg("Couldn't open test file: %s", file);
@@ -1129,11 +1157,11 @@ static void sendtftp(struct testcase *test, struct formats *pf)
   do {
     size = readit(test, &sdp, pf->f_convert);
     if (size < 0) {
-      nak(ERRNO + 100);
+      nak(errno + 100);
       return;
     }
-    sdp->th_opcode = htons((u_short)opcode_DATA);
-    sdp->th_block = htons((u_short)sendblock);
+    sdp->th_opcode = htons((unsigned short)opcode_DATA);
+    sdp->th_block = htons(sendblock);
     timeout = 0;
 #ifdef HAVE_SIGSETJMP
     (void) sigsetjmp(timeoutbuf, 1);
@@ -1158,8 +1186,8 @@ static void sendtftp(struct testcase *test, struct formats *pf)
         logmsg("read: fail");
         return;
       }
-      sap->th_opcode = ntohs((u_short)sap->th_opcode);
-      sap->th_block = ntohs((u_short)sap->th_block);
+      sap->th_opcode = ntohs((unsigned short)sap->th_opcode);
+      sap->th_block = ntohs(sap->th_block);
 
       if (sap->th_opcode == opcode_ERROR) {
         logmsg("got ERROR");
@@ -1196,8 +1224,8 @@ static void recvtftp(struct testcase *test, struct formats *pf)
   rap = &ackbuf.hdr;
   do {
     timeout = 0;
-    rap->th_opcode = htons((u_short)opcode_ACK);
-    rap->th_block = htons((u_short)recvblock);
+    rap->th_opcode = htons((unsigned short)opcode_ACK);
+    rap->th_block = htons(recvblock);
     recvblock++;
 #ifdef HAVE_SIGSETJMP
     (void) sigsetjmp(timeoutbuf, 1);
@@ -1222,8 +1250,8 @@ send_ack:
         logmsg("read: fail\n");
         goto abort;
       }
-      rdp->th_opcode = ntohs((u_short)rdp->th_opcode);
-      rdp->th_block = ntohs((u_short)rdp->th_block);
+      rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);
+      rdp->th_block = ntohs(rdp->th_block);
       if (rdp->th_opcode == opcode_ERROR)
         goto abort;
       if (rdp->th_opcode == opcode_DATA) {
@@ -1240,7 +1268,7 @@ send_ack:
     size = writeit(test, &rdp, (int)(n - 4), pf->f_convert);
     if (size != (n-4)) {                 /* ahem */
       if (size < 0)
-        nak(ERRNO + 100);
+        nak(errno + 100);
       else
         nak(ENOSPACE);
       goto abort;
@@ -1248,8 +1276,8 @@ send_ack:
   } while (size == SEGSIZE);
   write_behind(test, pf->f_convert);
 
-  rap->th_opcode = htons((u_short)opcode_ACK);  /* send the "final" ack */
-  rap->th_block = htons((u_short)recvblock);
+  rap->th_opcode = htons((unsigned short)opcode_ACK);  /* send the "final" ack */
+  rap->th_block = htons(recvblock);
   (void) swrite(peer, &ackbuf.storage[0], 4);
 #if defined(HAVE_ALARM) && defined(SIGALRM)
   mysignal(SIGALRM, justtimeout);        /* just abort read on timeout */
@@ -1282,8 +1310,8 @@ static void nak(int error)
   struct errmsg *pe;
 
   tp = &buf.hdr;
-  tp->th_opcode = htons((u_short)opcode_ERROR);
-  tp->th_code = htons((u_short)error);
+  tp->th_opcode = htons((unsigned short)opcode_ERROR);
+  tp->th_code = htons((unsigned short)error);
   for (pe = errmsgs; pe->e_code >= 0; pe++)
     if (pe->e_code == error)
       break;
@@ -1291,9 +1319,11 @@ static void nak(int error)
     pe->e_msg = strerror(error - 100);
     tp->th_code = EUNDEF;   /* set 'undef' errorcode */
   }
-  strcpy(tp->th_msg, pe->e_msg);
   length = (int)strlen(pe->e_msg);
-  tp->th_msg[length] = '\0';
+
+  /* we use memcpy() instead of strcpy() in order to avoid buffer overflow
+   * report from glibc with FORTIFY_SOURCE */
+  memcpy(tp->th_msg, pe->e_msg, length + 1);
   length += 5;
   if (swrite(peer, &buf.storage[0], length) != length)
     logmsg("nak: fail\n");
index 52802a8..06f3ce1 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
 
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #include "util.h"
 #include "timeval.h"
 
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EINVAL
+#define EINVAL  22 /* errno.h value */
+#endif
+
 #if defined(ENABLE_IPV6) && defined(__MINGW32__)
 const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
 #endif
 
+/* This function returns a pointer to STATIC memory. It converts the given
+ * binary lump to a hex formatted string usable for output in logs or
+ * whatever.
+ */
+char *data_to_hex(char *data, size_t len)
+{
+  static char buf[256*3];
+  size_t i;
+  char *optr = buf;
+  char *iptr = data;
+
+  if(len > 255)
+    len = 255;
+
+  for(i=0; i < len; i++) {
+    if((data[i] >= 0x20) && (data[i] < 0x7f))
+      *optr++ = *iptr++;
+    else {
+      sprintf(optr, "%%%02x", *iptr++);
+      optr+=3;
+    }
+  }
+  *optr=0; /* in case no sprintf() was used */
+
+  return buf;
+}
+
 void logmsg(const char *msg, ...)
 {
   va_list ap;
@@ -100,7 +125,7 @@ void logmsg(const char *msg, ...)
     fclose(logfp);
   }
   else {
-    error = ERRNO;
+    error = errno;
     fprintf(stderr, "fopen() failed with error: %d %s\n",
             error, strerror(error));
     fprintf(stderr, "Error opening file: %s\n", serverlogfile);
@@ -190,7 +215,7 @@ int wait_ms(int timeout_ms)
   if(!timeout_ms)
     return 0;
   if(timeout_ms < 0) {
-    SET_SOCKERRNO(EINVAL);
+    errno = EINVAL;
     return -1;
   }
 #if defined(MSDOS)
@@ -210,7 +235,7 @@ int wait_ms(int timeout_ms)
 #endif /* HAVE_POLL_FINE */
     if(r != -1)
       break;
-    error = SOCKERRNO;
+    error = errno;
     if(error && (error != EINTR))
       break;
     pending_ms = timeout_ms - (int)curlx_tvdiff(curlx_tvnow(), initial_tv);
@@ -231,7 +256,7 @@ int write_pidfile(const char *filename)
   pid = (long)getpid();
   pidfile = fopen(filename, "wb");
   if(!pidfile) {
-    logmsg("Couldn't write pid file: %s %s", filename, strerror(ERRNO));
+    logmsg("Couldn't write pid file: %s %s", filename, strerror(errno));
     return 0; /* fail */
   }
   fprintf(pidfile, "%ld\n", pid);
@@ -248,7 +273,7 @@ void set_advisor_read_lock(const char *filename)
 
   do {
     lockfile = fopen(filename, "wb");
-  } while((lockfile == NULL) && ((error = ERRNO) == EINTR));
+  } while((lockfile == NULL) && ((error = errno) == EINTR));
   if(lockfile == NULL) {
     logmsg("Error creating lock file %s error: %d %s",
            filename, error, strerror(error));
@@ -257,7 +282,7 @@ void set_advisor_read_lock(const char *filename)
 
   do {
     res = fclose(lockfile);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error closing lock file %s error: %d %s",
            filename, error, strerror(error));
@@ -276,7 +301,7 @@ void clear_advisor_read_lock(const char *filename)
 
   do {
     res = unlink(filename);
-  } while(res && ((error = ERRNO) == EINTR));
+  } while(res && ((error = errno) == EINTR));
   if(res)
     logmsg("Error removing lock file %s error: %d %s",
            filename, error, strerror(error));
index 76cd88d..8d2e582 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SERVER_UTIL_H
-#define __SERVER_UTIL_H
+#ifndef HEADER_CURL_SERVER_UTIL_H
+#define HEADER_CURL_SERVER_UTIL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,7 +21,9 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
+char *data_to_hex(char *data, size_t len);
 void logmsg(const char *msg, ...);
 
 #define TEST_DATA_PATH "%s/data/test%ld"
@@ -61,4 +63,4 @@ void set_advisor_read_lock(const char *filename);
 
 void clear_advisor_read_lock(const char *filename);
 
-#endif  /* __SERVER_UTIL_H */
+#endif  /* HEADER_CURL_SERVER_UTIL_H */
index 34b155d..b0b5b74 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -63,6 +63,13 @@ use vars qw(
 
 
 #***************************************************************************
+# Just for convenience, test harness uses 'https' and 'httptls' literals as
+# values for 'proto' variable in order to differentiate different servers.
+# 'https' literal is used for stunnel based https test servers, and 'httptls'
+# is used for non-stunnel https test servers.
+
+
+#***************************************************************************
 # Return server characterization factors given a server id string.
 #
 sub serverfactors {
@@ -71,18 +78,20 @@ sub serverfactors {
     my $ipvnum;
     my $idnum;
 
-    if($server =~ /^((ftp|http|imap|pop3|smtp)s?)(\d*)(-ipv6|)$/) {
+    if($server =~
+        /^((ftp|http|imap|pop3|smtp|http-pipe)s?)(\d*)(-ipv6|)$/) {
         $proto  = $1;
         $idnum  = ($3 && ($3 > 1)) ? $3 : 1;
         $ipvnum = ($4 && ($4 =~ /6$/)) ? 6 : 4;
     }
-    elsif($server =~ /^(tftp|sftp|socks|ssh|rtsp)(\d*)(-ipv6|)$/) {
+    elsif($server =~
+        /^(tftp|sftp|socks|ssh|rtsp|gopher|httptls)(\d*)(-ipv6|)$/) {
         $proto  = $1;
         $idnum  = ($2 && ($2 > 1)) ? $2 : 1;
         $ipvnum = ($3 && ($3 =~ /6$/)) ? 6 : 4;
     }
     else {
-        die "invalid server id: $server"
+        die "invalid server id: '$server'"
     }
     return($proto, $ipvnum, $idnum);
 }
@@ -95,16 +104,16 @@ sub servername_str {
     my ($proto, $ipver, $idnum) = @_;
 
     $proto = uc($proto) if($proto);
-    die "unsupported protocol: $proto" unless($proto &&
-        ($proto =~ /^(((FTP|HTTP|IMAP|POP3|SMTP)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER))$/));
+    die "unsupported protocol: '$proto'" unless($proto &&
+        ($proto =~ /^(((FTP|HTTP|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS))$/));
 
     $ipver = (not $ipver) ? 'ipv4' : lc($ipver);
-    die "unsupported IP version: $ipver" unless($ipver &&
+    die "unsupported IP version: '$ipver'" unless($ipver &&
         ($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6)$/));
     $ipver = ($ipver =~ /6$/) ? '-IPv6' : '';
 
     $idnum = 1 if(not $idnum);
-    die "unsupported ID number: $idnum" unless($idnum &&
+    die "unsupported ID number: '$idnum'" unless($idnum &&
         ($idnum =~ /^(\d+)$/));
     $idnum = '' unless($idnum > 1);
 
@@ -188,7 +197,7 @@ sub server_outputfilename {
 #
 sub mainsockf_pidfilename {
     my ($proto, $ipver, $idnum) = @_;
-    die "unsupported protocol: $proto" unless($proto &&
+    die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
     my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.pid':'_sockfilt.pid';
     return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -200,7 +209,7 @@ sub mainsockf_pidfilename {
 #
 sub mainsockf_logfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
-    die "unsupported protocol: $proto" unless($proto &&
+    die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
     my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.log':'_sockfilt.log';
     return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -212,7 +221,7 @@ sub mainsockf_logfilename {
 #
 sub datasockf_pidfilename {
     my ($proto, $ipver, $idnum) = @_;
-    die "unsupported protocol: $proto" unless($proto &&
+    die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^ftps?$/));
     my $trailer = '_sockdata.pid';
     return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer";
@@ -224,7 +233,7 @@ sub datasockf_pidfilename {
 #
 sub datasockf_logfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
-    die "unsupported protocol: $proto" unless($proto &&
+    die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^ftps?$/));
     my $trailer = '_sockdata.log';
     return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
index 18de9d3..ced9a01 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, 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
@@ -39,6 +39,7 @@ use vars qw(
     $sftpsrvexe
     $sftpexe
     $sshkeygenexe
+    $httptlssrvexe
     $sshdconfig
     $sshconfig
     $sftpconfig
@@ -52,6 +53,7 @@ use vars qw(
     $cliprvkeyf
     $clipubkeyf
     @sftppath
+    @httptlssrvpath
     );
 
 
@@ -95,6 +97,7 @@ use vars qw(
     find_sftpsrv
     find_sftp
     find_sshkeygen
+    find_httptlssrv
     logmsg
     sshversioninfo
     );
@@ -103,27 +106,28 @@ use vars qw(
 #***************************************************************************
 # Global variables initialization
 #
-$sshdexe      = 'sshd'        .exe_ext(); # base name and ext of ssh daemon
-$sshexe       = 'ssh'         .exe_ext(); # base name and ext of ssh client
-$sftpsrvexe   = 'sftp-server' .exe_ext(); # base name and ext of sftp-server
-$sftpexe      = 'sftp'        .exe_ext(); # base name and ext of sftp client
-$sshkeygenexe = 'ssh-keygen'  .exe_ext(); # base name and ext of ssh-keygen
-$sshdconfig   = 'curl_sshd_config';       # ssh daemon config file
-$sshconfig    = 'curl_ssh_config';        # ssh client config file
-$sftpconfig   = 'curl_sftp_config';       # sftp client config file
-$sshdlog      = undef;                    # ssh daemon log file
-$sshlog       = undef;                    # ssh client log file
-$sftplog      = undef;                    # sftp client log file
-$sftpcmds     = 'curl_sftp_cmds';         # sftp client commands batch file
-$knownhosts   = 'curl_client_knownhosts'; # ssh knownhosts file
-$hstprvkeyf   = 'curl_host_dsa_key';      # host private key file
-$hstpubkeyf   = 'curl_host_dsa_key.pub';  # host public key file
-$cliprvkeyf   = 'curl_client_key';        # client private key file
-$clipubkeyf   = 'curl_client_key.pub';    # client public key file
+$sshdexe         = 'sshd'        .exe_ext(); # base name and ext of ssh daemon
+$sshexe          = 'ssh'         .exe_ext(); # base name and ext of ssh client
+$sftpsrvexe      = 'sftp-server' .exe_ext(); # base name and ext of sftp-server
+$sftpexe         = 'sftp'        .exe_ext(); # base name and ext of sftp client
+$sshkeygenexe    = 'ssh-keygen'  .exe_ext(); # base name and ext of ssh-keygen
+$httptlssrvexe   = 'gnutls-serv' .exe_ext(); # base name and ext of gnutls-serv
+$sshdconfig      = 'curl_sshd_config';       # ssh daemon config file
+$sshconfig       = 'curl_ssh_config';        # ssh client config file
+$sftpconfig      = 'curl_sftp_config';       # sftp client config file
+$sshdlog         = undef;                    # ssh daemon log file
+$sshlog          = undef;                    # ssh client log file
+$sftplog         = undef;                    # sftp client log file
+$sftpcmds        = 'curl_sftp_cmds';         # sftp client commands batch file
+$knownhosts      = 'curl_client_knownhosts'; # ssh knownhosts file
+$hstprvkeyf      = 'curl_host_dsa_key';      # host private key file
+$hstpubkeyf      = 'curl_host_dsa_key.pub';  # host public key file
+$cliprvkeyf      = 'curl_client_key';        # client private key file
+$clipubkeyf      = 'curl_client_key.pub';    # client public key file
 
 
 #***************************************************************************
-# Absolute paths where to look for sftp-server plugin
+# Absolute paths where to look for sftp-server plugin, when not in PATH
 #
 @sftppath = qw(
     /usr/lib/openssh
@@ -149,6 +153,30 @@ $clipubkeyf   = 'curl_client_key.pub';    # client public key file
 
 
 #***************************************************************************
+# Absolute paths where to look for httptlssrv (gnutls-serv), when not in PATH
+#
+@httptlssrvpath = qw(
+    /usr/sbin
+    /usr/libexec
+    /usr/lib
+    /usr/lib/misc
+    /usr/lib64/misc
+    /usr/local/bin
+    /usr/local/sbin
+    /usr/local/libexec
+    /opt/local/bin
+    /opt/local/sbin
+    /opt/local/libexec
+    /usr/freeware/bin
+    /usr/freeware/sbin
+    /usr/freeware/libexec
+    /opt/gnutls/bin
+    /opt/gnutls/sbin
+    /opt/gnutls/libexec
+    );
+
+
+#***************************************************************************
 # Return file extension for executable files on this operating system
 #
 sub exe_ext {
@@ -272,7 +300,7 @@ sub find_file {
     my @path = @_;
     foreach (@path) {
         my $file = File::Spec->catfile($_, $fn);
-        if(-e $file) {
+        if(-e $file && ! -d $file) {
             return $file;
         }
     }
@@ -280,9 +308,27 @@ sub find_file {
 
 
 #***************************************************************************
+# Find an executable file somewhere in the given path
+#
+sub find_exe_file {
+    my $fn = $_[0];
+    shift;
+    my @path = @_;
+    my $xext = exe_ext();
+    foreach (@path) {
+        my $file = File::Spec->catfile($_, $fn);
+        if(-e $file && ! -d $file) {
+            return $file if(-x $file);
+            return $file if(($xext) && (lc($file) =~ /\Q$xext\E$/));
+        }
+    }
+}
+
+
+#***************************************************************************
 # Find a file in environment path or in our sftppath
 #
-sub find_sfile {
+sub find_file_spath {
     my $filename = $_[0];
     my @spath;
     push(@spath, File::Spec->path());
@@ -292,10 +338,22 @@ sub find_sfile {
 
 
 #***************************************************************************
+# Find an executable file in environment path or in our httptlssrvpath
+#
+sub find_exe_file_hpath {
+    my $filename = $_[0];
+    my @hpath;
+    push(@hpath, File::Spec->path());
+    push(@hpath, @httptlssrvpath);
+    return find_exe_file($filename, @hpath);
+}
+
+
+#***************************************************************************
 # Find ssh daemon and return canonical filename
 #
 sub find_sshd {
-    return find_sfile($sshdexe);
+    return find_file_spath($sshdexe);
 }
 
 
@@ -303,7 +361,7 @@ sub find_sshd {
 # Find ssh client and return canonical filename
 #
 sub find_ssh {
-    return find_sfile($sshexe);
+    return find_file_spath($sshexe);
 }
 
 
@@ -311,7 +369,7 @@ sub find_ssh {
 # Find sftp-server plugin and return canonical filename
 #
 sub find_sftpsrv {
-    return find_sfile($sftpsrvexe);
+    return find_file_spath($sftpsrvexe);
 }
 
 
@@ -319,7 +377,7 @@ sub find_sftpsrv {
 # Find sftp client and return canonical filename
 #
 sub find_sftp {
-    return find_sfile($sftpexe);
+    return find_file_spath($sftpexe);
 }
 
 
@@ -327,7 +385,15 @@ sub find_sftp {
 # Find ssh-keygen and return canonical filename
 #
 sub find_sshkeygen {
-    return find_sfile($sshkeygenexe);
+    return find_file_spath($sshkeygenexe);
+}
+
+
+#***************************************************************************
+# Find httptlssrv (gnutls-serv) and return canonical filename
+#
+sub find_httptlssrv {
+    return find_exe_file_hpath($httptlssrvexe);
 }
 
 
index b439015..447305f 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, 2013, 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
@@ -362,8 +362,10 @@ if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) ||
 #***************************************************************************
 # Generate host and client key files for curl's tests
 #
-if((! -e $hstprvkeyf) || (! -e $hstpubkeyf) ||
-   (! -e $cliprvkeyf) || (! -e $clipubkeyf)) {
+if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) ||
+   (! -e $hstpubkeyf) || (! -s $hstpubkeyf) ||
+   (! -e $cliprvkeyf) || (! -s $cliprvkeyf) ||
+   (! -e $clipubkeyf) || (! -s $clipubkeyf)) {
     # Make sure all files are gone so ssh-keygen doesn't complain
     unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf);
     logmsg 'generating host keys...' if($verbose);
@@ -706,8 +708,9 @@ if(system "$sshd -t -f $sshdconfig > $sshdlog 2>&1") {
 #***************************************************************************
 # Generate ssh client host key database file for curl's tests
 #
-if(! -e $knownhosts) {
+if((! -e $knownhosts) || (! -s $knownhosts)) {
     logmsg 'generating ssh client known hosts file...' if($verbose);
+    unlink($knownhosts);
     if(open(DSAKEYFILE, "<$hstpubkeyf")) {
         my @dsahostkey = do { local $/ = ' '; <DSAKEYFILE> };
         if(close(DSAKEYFILE)) {
@@ -853,7 +856,10 @@ push @cfgarr, 'PreferredAuthentications publickey';
 push @cfgarr, 'PubkeyAuthentication yes';
 push @cfgarr, 'RhostsRSAAuthentication no';
 push @cfgarr, 'RSAAuthentication no';
-push @cfgarr, 'StrictHostKeyChecking yes';
+
+# Disabled StrictHostKeyChecking since it makes the tests fail on my
+# OpenSSH_6.0p1 on Debian Linux / Daniel
+push @cfgarr, 'StrictHostKeyChecking no';
 push @cfgarr, 'UsePrivilegedPort no';
 push @cfgarr, '#';
 
index 1b4d669..6a3859b 100644 (file)
@@ -137,6 +137,7 @@ Ft896NmH4QFsDAetZcCFf24AM4DbUQo5jtG+dkanI/7IxxNYJ1PQ64/yscdQFvHW
 xhIX3Q6FqABjcN5nc80Rog+b6eS8QRX1BRnQqbGtocuptUgW5mWsSb+DR6pZbA==
 -----END CERTIFICATE-----
 -----BEGIN DH PARAMETERS-----
-MEYCQQD+KCcagSasA1QSo8tRXpbaLJJ1Ezt3FJFEZ3RVplp4qZwXQpSZ+Vly3xWx
-q3YvALe/enMbIq8F3OUmppq3UHwTAgEC
+MIGHAoGBAMq/KFGh2oy16WzkFs1U71Uz7dIEKvSYfc+zo439pYyVzcD8MkcC15Zb
+ayK3jPBYf07eKzc2TvI3/ZSducmECNP8gk2gAndP1P1rmpheN+owZJS7kQVfQmHl
+UmT87U99NPaMHXMNOsFj/3mbAaANndKEnd8PM2r5fg16C4+2e5KzAgEC
 -----END DH PARAMETERS-----
index cda9b73..91b859b 100644 (file)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010-2011, 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
@@ -82,6 +82,11 @@ open S, "<$root/docs/libcurl/symbols-in-versions";
 while(<S>) {
     if(/(^CURL[^ \n]*) *(.*)/) {
         my ($sym, $rest)=($1, $2);
+        if($doc{$sym}) {
+            print "Detected duplicate symbol: $sym\n";
+            $misses++;
+            next;
+        }
         $doc{$sym}=$sym;
         my @a=split(/ +/, $rest);
         if($a[2]) {
@@ -105,7 +110,7 @@ for my $e (sort @syms) {
     # *_LAST and *_LASTENTRY are just prefix for the placeholders used for the
     # last entry in many enum series.
     #
-    
+
     if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) {
         $ignored++;
         next;
@@ -154,7 +159,6 @@ if($summary) {
     scalar(@syms)- $ignored;
     printf "%d symbols are listed in symbols-in-versions\n (out of which %d are listed as removed)\n", scalar(keys %doc), scalar(keys %rem);
     printf "%d symbols in symbols-in-versions should match the ones in headers\n", scalar(keys %doc) - scalar(keys %rem);
-    
 }
 
 if($misses) {
index 39b7039..ecea911 100644 (file)
@@ -72,7 +72,7 @@ by force, and similar.
 File name to read setup from (deprecated). The old style of providing info.
 If info is missing when testcurl.pl is started, it will prompt you and then
 store the info in a 'setup' file, which it will look for on each invoke. Use
-\fI--name\fP, \fI--emacs\fP, \fI--configure\fP and \fI--desc\fP instead.
+\fI--name\fP, \fI--email\fP, \fI--configure\fP and \fI--desc\fP instead.
 .IP "--target=[your os]"
 Specify your target environment. Recognized strings include 'vc', 'mingw32',
 \&'borland' and 'netware'.
index 75c4bcc..4a5853f 100644 (file)
@@ -1,6 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
 <html><head>
 <title>testcurl.pl man page</title>
-<meta name="generator" content="roffit 0.7">
+<meta name="generator" content="roffit">
 <STYLE type="text/css">
 P.level0 {
  padding-left: 2em;
@@ -70,7 +72,7 @@ p.roffit {
 <p class="level0"><a name="--runtestoptsoptions"></a><span class="nroffip">--runtestopts=[options]</span> 
 <p class="level1">Options that is passed to the runtests.pl script. Useful for disabling valgrind by force, and similar. 
 <p class="level0"><a name="--setupfile"></a><span class="nroffip">--setup=[file name]</span> 
-<p class="level1">File name to read setup from (deprecated). The old style of providing info. If info is missing when testcurl.pl is started, it will prompt you and then store the info in a 'setup' file, which it will look for on each invoke. Use <span Class="emphasis">--name</span>, <span Class="emphasis">--emacs</span>, <span Class="emphasis">--configure</span> and <span Class="emphasis">--desc</span> instead. 
+<p class="level1">File name to read setup from (deprecated). The old style of providing info. If info is missing when testcurl.pl is started, it will prompt you and then store the info in a 'setup' file, which it will look for on each invoke. Use <span Class="emphasis">--name</span>, <span Class="emphasis">--email</span>, <span Class="emphasis">--configure</span> and <span Class="emphasis">--desc</span> instead. 
 <p class="level0"><a name="--targetyour"></a><span class="nroffip">--target=[your os]</span> 
 <p class="level1">Specify your target environment. Recognized strings include 'vc', 'mingw32', 'borland' and 'netware'. <a name="INITIAL"></a><h2 class="nroffsh">INITIAL SETUP</h2>
 <p class="level0">First you make a checkout from git (or you write a script that downloads daily snapshots automatically, find inspiration at <a href="http://curl.haxx.se/auto/autocurl.txt">http://curl.haxx.se/auto/autocurl.txt</a>): 
index a15fc99..dafef0e 100644 (file)
Binary files a/tests/testcurl.pdf and b/tests/testcurl.pdf differ
index 27f188f..5cb25f9 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2012, 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
@@ -70,10 +70,10 @@ use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
 
 use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
             $extvercmd $nogitpull $nobuildconf $crosscompile
-            $timestamp);
+            $timestamp $notes);
 
 # version of this script
-$version='2010-08-20';
+$version='2012-11-30';
 $fixed=0;
 
 # Determine if we're running from git or a canned copy of curl,
@@ -108,8 +108,9 @@ while ($ARGV[0]) {
   elsif ($ARGV[0] =~ /--desc=/) {
     $desc = (split(/=/, shift @ARGV))[1];
   }
-  elsif ($ARGV[0] =~ /--configure=/) {
-    $confopts = (split(/=/, shift @ARGV))[1];
+  elsif ($ARGV[0] =~ /--configure=(.*)/) {
+    $confopts = $1;
+    shift @ARGV;
   }
   elsif (($ARGV[0] eq "--nocvsup") || ($ARGV[0] eq "--nogitpull")) {
     $nogitpull=1;
@@ -307,6 +308,7 @@ if ($fixed < 4) {
     print F "email='$email'\n";
     print F "desc='$desc'\n";
     print F "confopts='$confopts'\n";
+    print F "notes='$notes'\n";
     print F "fixed='$fixed'\n";
     close(F);
 }
@@ -329,13 +331,22 @@ logit 'TRANSFER CONTROL ==== 1120 CHAR LINE' . $str1066os . 'LINE_END';
 logit "NAME = $name";
 logit "EMAIL = $email";
 logit "DESC = $desc";
+logit "NOTES = $notes";
 logit "CONFOPTS = $confopts";
 logit "CPPFLAGS = ".$ENV{CPPFLAGS};
 logit "CFLAGS = ".$ENV{CFLAGS};
 logit "LDFLAGS = ".$ENV{LDFLAGS};
+logit "LIBS = ".$ENV{LIBS};
 logit "CC = ".$ENV{CC};
+logit "TMPDIR = ".$ENV{TMPDIR};
 logit "MAKEFLAGS = ".$ENV{MAKEFLAGS};
+logit "ACLOCAL_FLAGS = ".$ENV{ACLOCAL_FLAGS};
 logit "PKG_CONFIG_PATH = ".$ENV{PKG_CONFIG_PATH};
+logit "DYLD_LIBRARY_PATH = ".$ENV{DYLD_LIBRARY_PATH};
+logit "LD_LIBRARY_PATH = ".$ENV{LD_LIBRARY_PATH};
+logit "LIBRARY_PATH = ".$ENV{LIBRARY_PATH};
+logit "SHLIB_PATH = ".$ENV{SHLIB_PATH};
+logit "LIBPATH = ".$ENV{LIBPATH};
 logit "target = ".$targetos;
 logit "version = $version"; # script version
 logit "date = $timestamp";  # When the test build starts
@@ -346,14 +357,20 @@ $str1066os = undef;
 # off that path from all possible logs and error messages etc.
 $pwd = getcwd();
 
+my $have_embedded_ares = 0;
+
 if (-d $CURLDIR) {
   if ($git && -d "$CURLDIR/.git") {
     logit "$CURLDIR is verified to be a fine git source dir";
     # remove the generated sources to force them to be re-generated each
     # time we run this test
-    unlink "$CURLDIR/src/hugehelp.c";
+    unlink "$CURLDIR/src/tool_hugehelp.c";
+    # find out if curl source dir has an in-tree c-ares repo
+    $have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
   } elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
-    logit "$CURLDIR is verified to be a fine daily source dir"
+    logit "$CURLDIR is verified to be a fine daily source dir";
+    # find out if curl source dir has an in-tree c-ares extracted tarball
+    $have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
   } else {
     mydie "$CURLDIR is not a daily source dir or checked out from git!"
   }
@@ -428,13 +445,16 @@ if ($git) {
     unlink "autom4te.cache";
 
     # generate the build files
-    logit "invoke buildconf, but filter off aclocal underquoted definition warnings";
+    logit "invoke buildconf";
     open(F, "./buildconf 2>&1 |") or die;
     open(LOG, ">$buildlog") or die;
     while (<F>) {
-      next if /warning: underquoted definition of/;
-      print;
-      print LOG;
+      my $ll = $_;
+      # ignore messages pertaining to third party m4 files we don't care
+      next if ($ll =~ /aclocal\/gtk\.m4/);
+      next if ($ll =~ /aclocal\/gtkextra\.m4/);
+      print $ll;
+      print LOG $ll;
     }
     close(F);
     close(LOG);
@@ -579,7 +599,8 @@ while (<F>) {
 }
 close(F);
 
-if (grepfile("^#define USE_ARES", "lib/$confheader")) {
+if (($have_embedded_ares) &&
+    (grepfile("^#define USE_ARES", "lib/$confheader"))) {
   print "\n";
   logit "setup to build ares";
 
@@ -681,6 +702,26 @@ if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
 }
 
 if ($configurebuild && !$crosscompile) {
+  my $host_triplet = get_host_triplet();
+  # build example programs for selected build targets
+  if(($host_triplet =~ /([^-]+)-([^-]+)-irix(.*)/) ||
+     ($host_triplet =~ /([^-]+)-([^-]+)-aix(.*)/) ||
+     ($host_triplet =~ /([^-]+)-([^-]+)-osf(.*)/) ||
+     ($host_triplet =~ /([^-]+)-([^-]+)-solaris2(.*)/)) {
+    chdir "$pwd/$build/docs/examples";
+    logit_spaced "build examples";
+    open(F, "$make -i 2>&1 |") or die;
+    open(LOG, ">$buildlog") or die;
+    while (<F>) {
+      s/$pwd//g;
+      print;
+      print LOG;
+    }
+    close(F);
+    close(LOG);
+    chdir "$pwd/$build";
+  }
+  # build and run full test suite
   my $o;
   if($runtestopts) {
       $o = "TEST_F=\"$runtestopts\" ";
@@ -710,8 +751,24 @@ if ($configurebuild && !$crosscompile) {
 }
 else {
   if($crosscompile) {
-    # build test harness programs for selected cross-compiles
     my $host_triplet = get_host_triplet();
+    # build example programs for selected cross-compiles
+    if(($host_triplet =~ /([^-]+)-([^-]+)-mingw(.*)/) ||
+       ($host_triplet =~ /([^-]+)-([^-]+)-android(.*)/)) {
+      chdir "$pwd/$build/docs/examples";
+      logit_spaced "build examples";
+      open(F, "$make -i 2>&1 |") or die;
+      open(LOG, ">$buildlog") or die;
+      while (<F>) {
+        s/$pwd//g;
+        print;
+        print LOG;
+      }
+      close(F);
+      close(LOG);
+      chdir "$pwd/$build";
+    }
+    # build test harness programs for selected cross-compiles
     if($host_triplet =~ /([^-]+)-([^-]+)-mingw(.*)/) {
       chdir "$pwd/$build/tests";
       logit_spaced "build test harness";
index c5382ec..60fc32d 100755 (executable)
@@ -22,7 +22,8 @@
 #***************************************************************************
 
 BEGIN {
-    @INC=(@INC, $ENV{'srcdir'}, '.');
+    push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+    push(@INC, ".");
 }
 
 use strict;
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
new file mode 100644 (file)
index 0000000..4b47f72
--- /dev/null
@@ -0,0 +1,78 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+
+if USE_EMBEDDED_ARES
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_srcdir)/src            \
+              -I$(top_srcdir)/tests/libtest  \
+              -I$(top_builddir)/ares         \
+              -I$(top_srcdir)/ares
+else
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_srcdir)/src            \
+              -I$(top_srcdir)/tests/libtest
+endif
+
+EXTRA_DIST = Makefile.inc
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+LDADD = $(top_builddir)/src/libcurltool.la   \
+        $(top_builddir)/lib/libcurlu.la      \
+        @LDFLAGS@ @LIBCURL_LIBS@
+
+DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+               $(top_builddir)/lib/libcurlu.la
+
+AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
+
+# Makefile.inc provides neat definitions
+include Makefile.inc
+
+if BUILD_UNITTESTS
+noinst_PROGRAMS = $(UNITPROGS)
+else
+noinst_PROGRAMS =
+endif
diff --git a/tests/unit/Makefile.in b/tests/unit/Makefile.in
new file mode 100644 (file)
index 0000000..eb5f964
--- /dev/null
@@ -0,0 +1,1284 @@
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# these files are used in every single unit test program
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.inc $(srcdir)/Makefile.in \
+       $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \
+       $(top_srcdir)/depcomp README
+@BUILD_UNITTESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_1)
+subdir = tests/unit
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+       $(top_srcdir)/m4/curl-confopts.m4 \
+       $(top_srcdir)/m4/curl-functions.m4 \
+       $(top_srcdir)/m4/curl-openssl.m4 \
+       $(top_srcdir)/m4/curl-override.m4 \
+       $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/xc-am-iface.m4 \
+       $(top_srcdir)/m4/xc-cc-check.m4 \
+       $(top_srcdir)/m4/xc-lt-iface.m4 \
+       $(top_srcdir)/m4/xc-translit.m4 \
+       $(top_srcdir)/m4/xc-val-flgs.m4 \
+       $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+       $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
+       $(top_builddir)/include/curl/curlbuild.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = unit1300$(EXEEXT) unit1301$(EXEEXT) unit1302$(EXEEXT) \
+       unit1303$(EXEEXT) unit1304$(EXEEXT) unit1305$(EXEEXT) \
+       unit1307$(EXEEXT) unit1308$(EXEEXT) unit1309$(EXEEXT) \
+       unit1330$(EXEEXT) unit1394$(EXEEXT) unit1395$(EXEEXT) \
+       unit1396$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am__objects_1 = unit1300-first.$(OBJEXT)
+am_unit1300_OBJECTS = unit1300-unit1300.$(OBJEXT) $(am__objects_1)
+unit1300_OBJECTS = $(am_unit1300_OBJECTS)
+unit1300_LDADD = $(LDADD)
+unit1300_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+am__objects_2 = unit1301-first.$(OBJEXT)
+am_unit1301_OBJECTS = unit1301-unit1301.$(OBJEXT) $(am__objects_2)
+unit1301_OBJECTS = $(am_unit1301_OBJECTS)
+unit1301_LDADD = $(LDADD)
+unit1301_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_3 = unit1302-first.$(OBJEXT)
+am_unit1302_OBJECTS = unit1302-unit1302.$(OBJEXT) $(am__objects_3)
+unit1302_OBJECTS = $(am_unit1302_OBJECTS)
+unit1302_LDADD = $(LDADD)
+unit1302_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_4 = unit1303-first.$(OBJEXT)
+am_unit1303_OBJECTS = unit1303-unit1303.$(OBJEXT) $(am__objects_4)
+unit1303_OBJECTS = $(am_unit1303_OBJECTS)
+unit1303_LDADD = $(LDADD)
+unit1303_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_5 = unit1304-first.$(OBJEXT)
+am_unit1304_OBJECTS = unit1304-unit1304.$(OBJEXT) $(am__objects_5)
+unit1304_OBJECTS = $(am_unit1304_OBJECTS)
+unit1304_LDADD = $(LDADD)
+unit1304_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_6 = unit1305-first.$(OBJEXT)
+am_unit1305_OBJECTS = unit1305-unit1305.$(OBJEXT) $(am__objects_6)
+unit1305_OBJECTS = $(am_unit1305_OBJECTS)
+unit1305_LDADD = $(LDADD)
+unit1305_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_7 = unit1307-first.$(OBJEXT)
+am_unit1307_OBJECTS = unit1307-unit1307.$(OBJEXT) $(am__objects_7)
+unit1307_OBJECTS = $(am_unit1307_OBJECTS)
+unit1307_LDADD = $(LDADD)
+unit1307_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_8 = unit1308-first.$(OBJEXT)
+am_unit1308_OBJECTS = unit1308-unit1308.$(OBJEXT) $(am__objects_8)
+unit1308_OBJECTS = $(am_unit1308_OBJECTS)
+unit1308_LDADD = $(LDADD)
+unit1308_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_9 = unit1309-first.$(OBJEXT)
+am_unit1309_OBJECTS = unit1309-unit1309.$(OBJEXT) $(am__objects_9)
+unit1309_OBJECTS = $(am_unit1309_OBJECTS)
+unit1309_LDADD = $(LDADD)
+unit1309_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_10 = unit1330-first.$(OBJEXT)
+am_unit1330_OBJECTS = unit1330-unit1330.$(OBJEXT) $(am__objects_10)
+unit1330_OBJECTS = $(am_unit1330_OBJECTS)
+unit1330_LDADD = $(LDADD)
+unit1330_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_11 = unit1394-first.$(OBJEXT)
+am_unit1394_OBJECTS = unit1394-unit1394.$(OBJEXT) $(am__objects_11)
+unit1394_OBJECTS = $(am_unit1394_OBJECTS)
+unit1394_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+unit1394_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(unit1394_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_12 = unit1395-first.$(OBJEXT)
+am_unit1395_OBJECTS = unit1395-unit1395.$(OBJEXT) $(am__objects_12)
+unit1395_OBJECTS = $(am_unit1395_OBJECTS)
+unit1395_LDADD = $(LDADD)
+unit1395_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+am__objects_13 = unit1396-first.$(OBJEXT)
+am_unit1396_OBJECTS = unit1396-unit1396.$(OBJEXT) $(am__objects_13)
+unit1396_OBJECTS = $(am_unit1396_OBJECTS)
+unit1396_LDADD = $(LDADD)
+unit1396_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+       $(top_builddir)/lib/libcurlu.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = 
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) $(unit1302_SOURCES) \
+       $(unit1303_SOURCES) $(unit1304_SOURCES) $(unit1305_SOURCES) \
+       $(unit1307_SOURCES) $(unit1308_SOURCES) $(unit1309_SOURCES) \
+       $(unit1330_SOURCES) $(unit1394_SOURCES) $(unit1395_SOURCES) \
+       $(unit1396_SOURCES)
+DIST_SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) \
+       $(unit1302_SOURCES) $(unit1303_SOURCES) $(unit1304_SOURCES) \
+       $(unit1305_SOURCES) $(unit1307_SOURCES) $(unit1308_SOURCES) \
+       $(unit1309_SOURCES) $(unit1330_SOURCES) $(unit1394_SOURCES) \
+       $(unit1395_SOURCES) $(unit1396_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_NSS_INITCONTEXT = @HAVE_NSS_INITCONTEXT@
+HAVE_SSLEAY_SRP = @HAVE_SSLEAY_SRP@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+KRB4_ENABLED = @KRB4_ENABLED@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
+LIBOBJS = @LIBOBJS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_ENABLED = @SSL_ENABLED@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_SSLEAY = @USE_SSLEAY@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2013, 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.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/src \
+@USE_EMBEDDED_ARES_FALSE@      -I$(top_srcdir)/tests/libtest \
+@USE_EMBEDDED_ARES_FALSE@      -DCURL_STATICLIB -DUNITTESTS
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/src \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/tests/libtest \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_builddir)/ares \
+@USE_EMBEDDED_ARES_TRUE@       -I$(top_srcdir)/ares -DCURL_STATICLIB \
+@USE_EMBEDDED_ARES_TRUE@       -DUNITTESTS
+EXTRA_DIST = Makefile.inc
+LDADD = $(top_builddir)/src/libcurltool.la   \
+        $(top_builddir)/lib/libcurlu.la      \
+        @LDFLAGS@ @LIBCURL_LIBS@
+
+DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+               $(top_builddir)/lib/libcurlu.la
+
+UNITFILES = curlcheck.h \
+ ../libtest/test.h \
+ ../libtest/first.c
+
+
+# These are all unit test programs
+UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
+ unit1308 unit1309 unit1330 unit1394 unit1395 unit1396
+
+unit1300_SOURCES = unit1300.c $(UNITFILES)
+unit1300_CPPFLAGS = $(AM_CPPFLAGS)
+unit1301_SOURCES = unit1301.c $(UNITFILES)
+unit1301_CPPFLAGS = $(AM_CPPFLAGS)
+unit1302_SOURCES = unit1302.c $(UNITFILES)
+unit1302_CPPFLAGS = $(AM_CPPFLAGS)
+unit1303_SOURCES = unit1303.c $(UNITFILES)
+unit1303_CPPFLAGS = $(AM_CPPFLAGS)
+unit1304_SOURCES = unit1304.c $(UNITFILES)
+unit1304_CPPFLAGS = $(AM_CPPFLAGS)
+unit1305_SOURCES = unit1305.c $(UNITFILES)
+unit1305_CPPFLAGS = $(AM_CPPFLAGS)
+unit1307_SOURCES = unit1307.c $(UNITFILES)
+unit1307_CPPFLAGS = $(AM_CPPFLAGS)
+unit1308_SOURCES = unit1308.c $(UNITFILES)
+unit1308_CPPFLAGS = $(AM_CPPFLAGS)
+unit1309_SOURCES = unit1309.c $(UNITFILES)
+unit1309_CPPFLAGS = $(AM_CPPFLAGS)
+unit1330_SOURCES = unit1330.c $(UNITFILES)
+unit1330_CPPFLAGS = $(AM_CPPFLAGS)
+unit1394_SOURCES = unit1394.c $(UNITFILES)
+unit1394_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+unit1394_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(top_builddir)/src/libcurltool.la
+unit1394_LIBS = 
+unit1395_SOURCES = unit1395.c $(UNITFILES)
+unit1395_CPPFLAGS = $(AM_CPPFLAGS)
+unit1396_SOURCES = unit1396.c $(UNITFILES)
+unit1396_CPPFLAGS = $(AM_CPPFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/unit/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign tests/unit/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+$(srcdir)/Makefile.inc:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+       @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+unit1300$(EXEEXT): $(unit1300_OBJECTS) $(unit1300_DEPENDENCIES) $(EXTRA_unit1300_DEPENDENCIES) 
+       @rm -f unit1300$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1300_OBJECTS) $(unit1300_LDADD) $(LIBS)
+
+unit1301$(EXEEXT): $(unit1301_OBJECTS) $(unit1301_DEPENDENCIES) $(EXTRA_unit1301_DEPENDENCIES) 
+       @rm -f unit1301$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1301_OBJECTS) $(unit1301_LDADD) $(LIBS)
+
+unit1302$(EXEEXT): $(unit1302_OBJECTS) $(unit1302_DEPENDENCIES) $(EXTRA_unit1302_DEPENDENCIES) 
+       @rm -f unit1302$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1302_OBJECTS) $(unit1302_LDADD) $(LIBS)
+
+unit1303$(EXEEXT): $(unit1303_OBJECTS) $(unit1303_DEPENDENCIES) $(EXTRA_unit1303_DEPENDENCIES) 
+       @rm -f unit1303$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1303_OBJECTS) $(unit1303_LDADD) $(LIBS)
+
+unit1304$(EXEEXT): $(unit1304_OBJECTS) $(unit1304_DEPENDENCIES) $(EXTRA_unit1304_DEPENDENCIES) 
+       @rm -f unit1304$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1304_OBJECTS) $(unit1304_LDADD) $(LIBS)
+
+unit1305$(EXEEXT): $(unit1305_OBJECTS) $(unit1305_DEPENDENCIES) $(EXTRA_unit1305_DEPENDENCIES) 
+       @rm -f unit1305$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1305_OBJECTS) $(unit1305_LDADD) $(LIBS)
+
+unit1307$(EXEEXT): $(unit1307_OBJECTS) $(unit1307_DEPENDENCIES) $(EXTRA_unit1307_DEPENDENCIES) 
+       @rm -f unit1307$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1307_OBJECTS) $(unit1307_LDADD) $(LIBS)
+
+unit1308$(EXEEXT): $(unit1308_OBJECTS) $(unit1308_DEPENDENCIES) $(EXTRA_unit1308_DEPENDENCIES) 
+       @rm -f unit1308$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1308_OBJECTS) $(unit1308_LDADD) $(LIBS)
+
+unit1309$(EXEEXT): $(unit1309_OBJECTS) $(unit1309_DEPENDENCIES) $(EXTRA_unit1309_DEPENDENCIES) 
+       @rm -f unit1309$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1309_OBJECTS) $(unit1309_LDADD) $(LIBS)
+
+unit1330$(EXEEXT): $(unit1330_OBJECTS) $(unit1330_DEPENDENCIES) $(EXTRA_unit1330_DEPENDENCIES) 
+       @rm -f unit1330$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1330_OBJECTS) $(unit1330_LDADD) $(LIBS)
+
+unit1394$(EXEEXT): $(unit1394_OBJECTS) $(unit1394_DEPENDENCIES) $(EXTRA_unit1394_DEPENDENCIES) 
+       @rm -f unit1394$(EXEEXT)
+       $(AM_V_CCLD)$(unit1394_LINK) $(unit1394_OBJECTS) $(unit1394_LDADD) $(LIBS)
+
+unit1395$(EXEEXT): $(unit1395_OBJECTS) $(unit1395_DEPENDENCIES) $(EXTRA_unit1395_DEPENDENCIES) 
+       @rm -f unit1395$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1395_OBJECTS) $(unit1395_LDADD) $(LIBS)
+
+unit1396$(EXEEXT): $(unit1396_OBJECTS) $(unit1396_DEPENDENCIES) $(EXTRA_unit1396_DEPENDENCIES) 
+       @rm -f unit1396$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(unit1396_OBJECTS) $(unit1396_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1300-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1300-unit1300.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1301-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1301-unit1301.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1302-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1302-unit1302.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1303-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1303-unit1303.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1304-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1304-unit1304.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1305-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1305-unit1305.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1307-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1307-unit1307.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1308-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1308-unit1308.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1309-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1309-unit1309.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1330-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1330-unit1330.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1394-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1394-unit1394.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1395-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1395-unit1395.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1396-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1396-unit1396.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+unit1300-unit1300.o: unit1300.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1300-unit1300.o -MD -MP -MF $(DEPDIR)/unit1300-unit1300.Tpo -c -o unit1300-unit1300.o `test -f 'unit1300.c' || echo '$(srcdir)/'`unit1300.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1300-unit1300.Tpo $(DEPDIR)/unit1300-unit1300.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1300.c' object='unit1300-unit1300.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1300-unit1300.o `test -f 'unit1300.c' || echo '$(srcdir)/'`unit1300.c
+
+unit1300-unit1300.obj: unit1300.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1300-unit1300.obj -MD -MP -MF $(DEPDIR)/unit1300-unit1300.Tpo -c -o unit1300-unit1300.obj `if test -f 'unit1300.c'; then $(CYGPATH_W) 'unit1300.c'; else $(CYGPATH_W) '$(srcdir)/unit1300.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1300-unit1300.Tpo $(DEPDIR)/unit1300-unit1300.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1300.c' object='unit1300-unit1300.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1300-unit1300.obj `if test -f 'unit1300.c'; then $(CYGPATH_W) 'unit1300.c'; else $(CYGPATH_W) '$(srcdir)/unit1300.c'; fi`
+
+unit1300-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1300-first.o -MD -MP -MF $(DEPDIR)/unit1300-first.Tpo -c -o unit1300-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1300-first.Tpo $(DEPDIR)/unit1300-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1300-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1300-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1300-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1300-first.obj -MD -MP -MF $(DEPDIR)/unit1300-first.Tpo -c -o unit1300-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1300-first.Tpo $(DEPDIR)/unit1300-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1300-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1300_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1300-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1301-unit1301.o: unit1301.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1301-unit1301.o -MD -MP -MF $(DEPDIR)/unit1301-unit1301.Tpo -c -o unit1301-unit1301.o `test -f 'unit1301.c' || echo '$(srcdir)/'`unit1301.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1301-unit1301.Tpo $(DEPDIR)/unit1301-unit1301.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1301.c' object='unit1301-unit1301.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1301-unit1301.o `test -f 'unit1301.c' || echo '$(srcdir)/'`unit1301.c
+
+unit1301-unit1301.obj: unit1301.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1301-unit1301.obj -MD -MP -MF $(DEPDIR)/unit1301-unit1301.Tpo -c -o unit1301-unit1301.obj `if test -f 'unit1301.c'; then $(CYGPATH_W) 'unit1301.c'; else $(CYGPATH_W) '$(srcdir)/unit1301.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1301-unit1301.Tpo $(DEPDIR)/unit1301-unit1301.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1301.c' object='unit1301-unit1301.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1301-unit1301.obj `if test -f 'unit1301.c'; then $(CYGPATH_W) 'unit1301.c'; else $(CYGPATH_W) '$(srcdir)/unit1301.c'; fi`
+
+unit1301-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1301-first.o -MD -MP -MF $(DEPDIR)/unit1301-first.Tpo -c -o unit1301-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1301-first.Tpo $(DEPDIR)/unit1301-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1301-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1301-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1301-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1301-first.obj -MD -MP -MF $(DEPDIR)/unit1301-first.Tpo -c -o unit1301-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1301-first.Tpo $(DEPDIR)/unit1301-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1301-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1301_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1301-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1302-unit1302.o: unit1302.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1302-unit1302.o -MD -MP -MF $(DEPDIR)/unit1302-unit1302.Tpo -c -o unit1302-unit1302.o `test -f 'unit1302.c' || echo '$(srcdir)/'`unit1302.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1302-unit1302.Tpo $(DEPDIR)/unit1302-unit1302.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1302.c' object='unit1302-unit1302.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1302-unit1302.o `test -f 'unit1302.c' || echo '$(srcdir)/'`unit1302.c
+
+unit1302-unit1302.obj: unit1302.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1302-unit1302.obj -MD -MP -MF $(DEPDIR)/unit1302-unit1302.Tpo -c -o unit1302-unit1302.obj `if test -f 'unit1302.c'; then $(CYGPATH_W) 'unit1302.c'; else $(CYGPATH_W) '$(srcdir)/unit1302.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1302-unit1302.Tpo $(DEPDIR)/unit1302-unit1302.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1302.c' object='unit1302-unit1302.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1302-unit1302.obj `if test -f 'unit1302.c'; then $(CYGPATH_W) 'unit1302.c'; else $(CYGPATH_W) '$(srcdir)/unit1302.c'; fi`
+
+unit1302-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1302-first.o -MD -MP -MF $(DEPDIR)/unit1302-first.Tpo -c -o unit1302-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1302-first.Tpo $(DEPDIR)/unit1302-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1302-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1302-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1302-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1302-first.obj -MD -MP -MF $(DEPDIR)/unit1302-first.Tpo -c -o unit1302-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1302-first.Tpo $(DEPDIR)/unit1302-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1302-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1302_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1302-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1303-unit1303.o: unit1303.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1303-unit1303.o -MD -MP -MF $(DEPDIR)/unit1303-unit1303.Tpo -c -o unit1303-unit1303.o `test -f 'unit1303.c' || echo '$(srcdir)/'`unit1303.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1303-unit1303.Tpo $(DEPDIR)/unit1303-unit1303.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1303.c' object='unit1303-unit1303.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1303-unit1303.o `test -f 'unit1303.c' || echo '$(srcdir)/'`unit1303.c
+
+unit1303-unit1303.obj: unit1303.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1303-unit1303.obj -MD -MP -MF $(DEPDIR)/unit1303-unit1303.Tpo -c -o unit1303-unit1303.obj `if test -f 'unit1303.c'; then $(CYGPATH_W) 'unit1303.c'; else $(CYGPATH_W) '$(srcdir)/unit1303.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1303-unit1303.Tpo $(DEPDIR)/unit1303-unit1303.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1303.c' object='unit1303-unit1303.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1303-unit1303.obj `if test -f 'unit1303.c'; then $(CYGPATH_W) 'unit1303.c'; else $(CYGPATH_W) '$(srcdir)/unit1303.c'; fi`
+
+unit1303-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1303-first.o -MD -MP -MF $(DEPDIR)/unit1303-first.Tpo -c -o unit1303-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1303-first.Tpo $(DEPDIR)/unit1303-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1303-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1303-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1303-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1303-first.obj -MD -MP -MF $(DEPDIR)/unit1303-first.Tpo -c -o unit1303-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1303-first.Tpo $(DEPDIR)/unit1303-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1303-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1303_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1303-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1304-unit1304.o: unit1304.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1304-unit1304.o -MD -MP -MF $(DEPDIR)/unit1304-unit1304.Tpo -c -o unit1304-unit1304.o `test -f 'unit1304.c' || echo '$(srcdir)/'`unit1304.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1304-unit1304.Tpo $(DEPDIR)/unit1304-unit1304.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1304.c' object='unit1304-unit1304.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1304-unit1304.o `test -f 'unit1304.c' || echo '$(srcdir)/'`unit1304.c
+
+unit1304-unit1304.obj: unit1304.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1304-unit1304.obj -MD -MP -MF $(DEPDIR)/unit1304-unit1304.Tpo -c -o unit1304-unit1304.obj `if test -f 'unit1304.c'; then $(CYGPATH_W) 'unit1304.c'; else $(CYGPATH_W) '$(srcdir)/unit1304.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1304-unit1304.Tpo $(DEPDIR)/unit1304-unit1304.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1304.c' object='unit1304-unit1304.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1304-unit1304.obj `if test -f 'unit1304.c'; then $(CYGPATH_W) 'unit1304.c'; else $(CYGPATH_W) '$(srcdir)/unit1304.c'; fi`
+
+unit1304-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1304-first.o -MD -MP -MF $(DEPDIR)/unit1304-first.Tpo -c -o unit1304-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1304-first.Tpo $(DEPDIR)/unit1304-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1304-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1304-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1304-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1304-first.obj -MD -MP -MF $(DEPDIR)/unit1304-first.Tpo -c -o unit1304-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1304-first.Tpo $(DEPDIR)/unit1304-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1304-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1304_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1304-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1305-unit1305.o: unit1305.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1305-unit1305.o -MD -MP -MF $(DEPDIR)/unit1305-unit1305.Tpo -c -o unit1305-unit1305.o `test -f 'unit1305.c' || echo '$(srcdir)/'`unit1305.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1305-unit1305.Tpo $(DEPDIR)/unit1305-unit1305.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1305.c' object='unit1305-unit1305.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1305-unit1305.o `test -f 'unit1305.c' || echo '$(srcdir)/'`unit1305.c
+
+unit1305-unit1305.obj: unit1305.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1305-unit1305.obj -MD -MP -MF $(DEPDIR)/unit1305-unit1305.Tpo -c -o unit1305-unit1305.obj `if test -f 'unit1305.c'; then $(CYGPATH_W) 'unit1305.c'; else $(CYGPATH_W) '$(srcdir)/unit1305.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1305-unit1305.Tpo $(DEPDIR)/unit1305-unit1305.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1305.c' object='unit1305-unit1305.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1305-unit1305.obj `if test -f 'unit1305.c'; then $(CYGPATH_W) 'unit1305.c'; else $(CYGPATH_W) '$(srcdir)/unit1305.c'; fi`
+
+unit1305-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1305-first.o -MD -MP -MF $(DEPDIR)/unit1305-first.Tpo -c -o unit1305-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1305-first.Tpo $(DEPDIR)/unit1305-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1305-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1305-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1305-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1305-first.obj -MD -MP -MF $(DEPDIR)/unit1305-first.Tpo -c -o unit1305-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1305-first.Tpo $(DEPDIR)/unit1305-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1305-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1305_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1305-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1307-unit1307.o: unit1307.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1307-unit1307.o -MD -MP -MF $(DEPDIR)/unit1307-unit1307.Tpo -c -o unit1307-unit1307.o `test -f 'unit1307.c' || echo '$(srcdir)/'`unit1307.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1307-unit1307.Tpo $(DEPDIR)/unit1307-unit1307.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1307.c' object='unit1307-unit1307.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1307-unit1307.o `test -f 'unit1307.c' || echo '$(srcdir)/'`unit1307.c
+
+unit1307-unit1307.obj: unit1307.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1307-unit1307.obj -MD -MP -MF $(DEPDIR)/unit1307-unit1307.Tpo -c -o unit1307-unit1307.obj `if test -f 'unit1307.c'; then $(CYGPATH_W) 'unit1307.c'; else $(CYGPATH_W) '$(srcdir)/unit1307.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1307-unit1307.Tpo $(DEPDIR)/unit1307-unit1307.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1307.c' object='unit1307-unit1307.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1307-unit1307.obj `if test -f 'unit1307.c'; then $(CYGPATH_W) 'unit1307.c'; else $(CYGPATH_W) '$(srcdir)/unit1307.c'; fi`
+
+unit1307-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1307-first.o -MD -MP -MF $(DEPDIR)/unit1307-first.Tpo -c -o unit1307-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1307-first.Tpo $(DEPDIR)/unit1307-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1307-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1307-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1307-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1307-first.obj -MD -MP -MF $(DEPDIR)/unit1307-first.Tpo -c -o unit1307-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1307-first.Tpo $(DEPDIR)/unit1307-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1307-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1307_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1307-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1308-unit1308.o: unit1308.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1308-unit1308.o -MD -MP -MF $(DEPDIR)/unit1308-unit1308.Tpo -c -o unit1308-unit1308.o `test -f 'unit1308.c' || echo '$(srcdir)/'`unit1308.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1308-unit1308.Tpo $(DEPDIR)/unit1308-unit1308.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1308.c' object='unit1308-unit1308.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1308-unit1308.o `test -f 'unit1308.c' || echo '$(srcdir)/'`unit1308.c
+
+unit1308-unit1308.obj: unit1308.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1308-unit1308.obj -MD -MP -MF $(DEPDIR)/unit1308-unit1308.Tpo -c -o unit1308-unit1308.obj `if test -f 'unit1308.c'; then $(CYGPATH_W) 'unit1308.c'; else $(CYGPATH_W) '$(srcdir)/unit1308.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1308-unit1308.Tpo $(DEPDIR)/unit1308-unit1308.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1308.c' object='unit1308-unit1308.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1308-unit1308.obj `if test -f 'unit1308.c'; then $(CYGPATH_W) 'unit1308.c'; else $(CYGPATH_W) '$(srcdir)/unit1308.c'; fi`
+
+unit1308-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1308-first.o -MD -MP -MF $(DEPDIR)/unit1308-first.Tpo -c -o unit1308-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1308-first.Tpo $(DEPDIR)/unit1308-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1308-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1308-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1308-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1308-first.obj -MD -MP -MF $(DEPDIR)/unit1308-first.Tpo -c -o unit1308-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1308-first.Tpo $(DEPDIR)/unit1308-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1308-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1308_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1308-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1309-unit1309.o: unit1309.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1309-unit1309.o -MD -MP -MF $(DEPDIR)/unit1309-unit1309.Tpo -c -o unit1309-unit1309.o `test -f 'unit1309.c' || echo '$(srcdir)/'`unit1309.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1309-unit1309.Tpo $(DEPDIR)/unit1309-unit1309.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1309.c' object='unit1309-unit1309.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1309-unit1309.o `test -f 'unit1309.c' || echo '$(srcdir)/'`unit1309.c
+
+unit1309-unit1309.obj: unit1309.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1309-unit1309.obj -MD -MP -MF $(DEPDIR)/unit1309-unit1309.Tpo -c -o unit1309-unit1309.obj `if test -f 'unit1309.c'; then $(CYGPATH_W) 'unit1309.c'; else $(CYGPATH_W) '$(srcdir)/unit1309.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1309-unit1309.Tpo $(DEPDIR)/unit1309-unit1309.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1309.c' object='unit1309-unit1309.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1309-unit1309.obj `if test -f 'unit1309.c'; then $(CYGPATH_W) 'unit1309.c'; else $(CYGPATH_W) '$(srcdir)/unit1309.c'; fi`
+
+unit1309-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1309-first.o -MD -MP -MF $(DEPDIR)/unit1309-first.Tpo -c -o unit1309-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1309-first.Tpo $(DEPDIR)/unit1309-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1309-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1309-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1309-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1309-first.obj -MD -MP -MF $(DEPDIR)/unit1309-first.Tpo -c -o unit1309-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1309-first.Tpo $(DEPDIR)/unit1309-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1309-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1309-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1330-unit1330.o: unit1330.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1330-unit1330.o -MD -MP -MF $(DEPDIR)/unit1330-unit1330.Tpo -c -o unit1330-unit1330.o `test -f 'unit1330.c' || echo '$(srcdir)/'`unit1330.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1330-unit1330.Tpo $(DEPDIR)/unit1330-unit1330.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1330.c' object='unit1330-unit1330.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1330-unit1330.o `test -f 'unit1330.c' || echo '$(srcdir)/'`unit1330.c
+
+unit1330-unit1330.obj: unit1330.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1330-unit1330.obj -MD -MP -MF $(DEPDIR)/unit1330-unit1330.Tpo -c -o unit1330-unit1330.obj `if test -f 'unit1330.c'; then $(CYGPATH_W) 'unit1330.c'; else $(CYGPATH_W) '$(srcdir)/unit1330.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1330-unit1330.Tpo $(DEPDIR)/unit1330-unit1330.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1330.c' object='unit1330-unit1330.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1330-unit1330.obj `if test -f 'unit1330.c'; then $(CYGPATH_W) 'unit1330.c'; else $(CYGPATH_W) '$(srcdir)/unit1330.c'; fi`
+
+unit1330-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1330-first.o -MD -MP -MF $(DEPDIR)/unit1330-first.Tpo -c -o unit1330-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1330-first.Tpo $(DEPDIR)/unit1330-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1330-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1330-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1330-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1330-first.obj -MD -MP -MF $(DEPDIR)/unit1330-first.Tpo -c -o unit1330-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1330-first.Tpo $(DEPDIR)/unit1330-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1330-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1330-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1394-unit1394.o: unit1394.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1394-unit1394.o -MD -MP -MF $(DEPDIR)/unit1394-unit1394.Tpo -c -o unit1394-unit1394.o `test -f 'unit1394.c' || echo '$(srcdir)/'`unit1394.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1394-unit1394.Tpo $(DEPDIR)/unit1394-unit1394.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1394.c' object='unit1394-unit1394.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1394-unit1394.o `test -f 'unit1394.c' || echo '$(srcdir)/'`unit1394.c
+
+unit1394-unit1394.obj: unit1394.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1394-unit1394.obj -MD -MP -MF $(DEPDIR)/unit1394-unit1394.Tpo -c -o unit1394-unit1394.obj `if test -f 'unit1394.c'; then $(CYGPATH_W) 'unit1394.c'; else $(CYGPATH_W) '$(srcdir)/unit1394.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1394-unit1394.Tpo $(DEPDIR)/unit1394-unit1394.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1394.c' object='unit1394-unit1394.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1394-unit1394.obj `if test -f 'unit1394.c'; then $(CYGPATH_W) 'unit1394.c'; else $(CYGPATH_W) '$(srcdir)/unit1394.c'; fi`
+
+unit1394-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1394-first.o -MD -MP -MF $(DEPDIR)/unit1394-first.Tpo -c -o unit1394-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1394-first.Tpo $(DEPDIR)/unit1394-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1394-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1394-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1394-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1394-first.obj -MD -MP -MF $(DEPDIR)/unit1394-first.Tpo -c -o unit1394-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1394-first.Tpo $(DEPDIR)/unit1394-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1394-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1394_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1394-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1395-unit1395.o: unit1395.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1395-unit1395.o -MD -MP -MF $(DEPDIR)/unit1395-unit1395.Tpo -c -o unit1395-unit1395.o `test -f 'unit1395.c' || echo '$(srcdir)/'`unit1395.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1395-unit1395.Tpo $(DEPDIR)/unit1395-unit1395.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1395.c' object='unit1395-unit1395.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1395-unit1395.o `test -f 'unit1395.c' || echo '$(srcdir)/'`unit1395.c
+
+unit1395-unit1395.obj: unit1395.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1395-unit1395.obj -MD -MP -MF $(DEPDIR)/unit1395-unit1395.Tpo -c -o unit1395-unit1395.obj `if test -f 'unit1395.c'; then $(CYGPATH_W) 'unit1395.c'; else $(CYGPATH_W) '$(srcdir)/unit1395.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1395-unit1395.Tpo $(DEPDIR)/unit1395-unit1395.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1395.c' object='unit1395-unit1395.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1395-unit1395.obj `if test -f 'unit1395.c'; then $(CYGPATH_W) 'unit1395.c'; else $(CYGPATH_W) '$(srcdir)/unit1395.c'; fi`
+
+unit1395-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1395-first.o -MD -MP -MF $(DEPDIR)/unit1395-first.Tpo -c -o unit1395-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1395-first.Tpo $(DEPDIR)/unit1395-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1395-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1395-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1395-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1395-first.obj -MD -MP -MF $(DEPDIR)/unit1395-first.Tpo -c -o unit1395-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1395-first.Tpo $(DEPDIR)/unit1395-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1395-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1395_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1395-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+unit1396-unit1396.o: unit1396.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1396-unit1396.o -MD -MP -MF $(DEPDIR)/unit1396-unit1396.Tpo -c -o unit1396-unit1396.o `test -f 'unit1396.c' || echo '$(srcdir)/'`unit1396.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1396-unit1396.Tpo $(DEPDIR)/unit1396-unit1396.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1396.c' object='unit1396-unit1396.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1396-unit1396.o `test -f 'unit1396.c' || echo '$(srcdir)/'`unit1396.c
+
+unit1396-unit1396.obj: unit1396.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1396-unit1396.obj -MD -MP -MF $(DEPDIR)/unit1396-unit1396.Tpo -c -o unit1396-unit1396.obj `if test -f 'unit1396.c'; then $(CYGPATH_W) 'unit1396.c'; else $(CYGPATH_W) '$(srcdir)/unit1396.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1396-unit1396.Tpo $(DEPDIR)/unit1396-unit1396.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='unit1396.c' object='unit1396-unit1396.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1396-unit1396.obj `if test -f 'unit1396.c'; then $(CYGPATH_W) 'unit1396.c'; else $(CYGPATH_W) '$(srcdir)/unit1396.c'; fi`
+
+unit1396-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1396-first.o -MD -MP -MF $(DEPDIR)/unit1396-first.Tpo -c -o unit1396-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1396-first.Tpo $(DEPDIR)/unit1396-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1396-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1396-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+unit1396-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1396-first.obj -MD -MP -MF $(DEPDIR)/unit1396-first.Tpo -c -o unit1396-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/unit1396-first.Tpo $(DEPDIR)/unit1396-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='../libtest/first.c' object='unit1396-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1396_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1396-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
+       here=`pwd`; \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+       ctags-am distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
new file mode 100644 (file)
index 0000000..4c06fcf
--- /dev/null
@@ -0,0 +1,51 @@
+# these files are used in every single unit test program
+
+UNITFILES = curlcheck.h \
+ ../libtest/test.h \
+ ../libtest/first.c
+
+# These are all unit test programs
+UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
+ unit1308 unit1309 unit1330 unit1394 unit1395 unit1396
+
+unit1300_SOURCES = unit1300.c $(UNITFILES)
+unit1300_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1301_SOURCES = unit1301.c $(UNITFILES)
+unit1301_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1302_SOURCES = unit1302.c $(UNITFILES)
+unit1302_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1303_SOURCES = unit1303.c $(UNITFILES)
+unit1303_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1304_SOURCES = unit1304.c $(UNITFILES)
+unit1304_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1305_SOURCES = unit1305.c $(UNITFILES)
+unit1305_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1307_SOURCES = unit1307.c $(UNITFILES)
+unit1307_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1308_SOURCES = unit1308.c $(UNITFILES)
+unit1308_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1309_SOURCES = unit1309.c $(UNITFILES)
+unit1309_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1330_SOURCES = unit1330.c $(UNITFILES)
+unit1330_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1394_SOURCES = unit1394.c $(UNITFILES)
+unit1394_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
+unit1394_LDADD = @LIBMETALINK_LIBS@ $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
+unit1394_LDFLAGS = @LIBMETALINK_LDFLAGS@ $(top_builddir)/src/libcurltool.la
+unit1394_LIBS =
+
+unit1395_SOURCES = unit1395.c $(UNITFILES)
+unit1395_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1396_SOURCES = unit1396.c $(UNITFILES)
+unit1396_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/unit/README b/tests/unit/README
new file mode 100644 (file)
index 0000000..301cd17
--- /dev/null
@@ -0,0 +1,70 @@
+Unit tests
+==========
+
+The goal is to add tests for *ALL* functions in libcurl. If functions are too
+big and complicated, we should split them into smaller and testable ones.
+
+Build Unit Tests
+================
+
+'./configure --enable-debug' is required for the unit tests to build. To
+enable unit tests, there will be a separate static libcurl built that will be
+used exclusively for linking unit test programs. Just build everything as
+normal, and then you can run the unit test cases as well.
+
+Run Unit Tests
+==============
+
+Unit tests are run as part of the regular test suite. If you have built
+everything to run unit tests, to can do 'make test' at the root level. Or you
+can 'cd tests' and then invoke individual unit tests with ./runtests.pl NNNN
+where NNNN is the specific test number.
+
+Debug Unit Tests
+================
+
+If a specific test fails you will get told. The test case then has output left
+in the log/ subdirectory, but most importantly you can re-run the test again
+using gdb by doing ./runtests.pl -g NNNN. That is, add a -g to make it start
+up gdb and run the same case using that.
+
+Write Unit Tests
+================
+
+We put tests that focus on an area or a specific function into a single C
+source file. The source file should be named 'unitNNNN.c' where NNNN is a
+number that starts with 1300 and you can pick the next free number.
+
+You also need a separate file called tests/data/testNNNN (using the same
+number) that describes your test case. See the test1300 file for inspiration
+and the tests/FILEFORMAT documentation.
+
+For the actual C file, here's a very simple example:
+
+----------------------- start -------------------------------
+#include "curlcheck.h"
+
+#include "a libcurl header.h" /* from the lib dir */
+
+static void unit_setup( void )
+{
+  /* whatever you want done first */
+}
+
+static void unit_stop( void )
+{
+  /* done before shutting down and exiting */
+}
+
+UNITTEST_START
+
+  /* here you start doing things and checking that the results are good */
+
+  fail_unless( size == 0 , "initial size should be zero" );
+  fail_if( head == NULL , "head should not be initiated to NULL" );
+
+  /* you end the test code like this: */
+
+UNITTEST_STOP
+
+----------------------- end -------------------------------
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h
new file mode 100644 (file)
index 0000000..96203e0
--- /dev/null
@@ -0,0 +1,98 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "test.h"
+
+/* The fail macros mark the current test step as failed, and continue */
+#define fail_if(expr, msg)                              \
+  if(expr) {                                            \
+    fprintf(stderr, "%s:%d Assertion '%s' met: %s\n" ,  \
+            __FILE__, __LINE__, #expr, msg);            \
+    unitfail++;                                         \
+  }
+
+#define fail_unless(expr, msg)                           \
+  if(!(expr)) {                                          \
+    fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
+            __FILE__, __LINE__, #expr, msg);             \
+    unitfail++;                                          \
+  }
+
+#define verify_memory(dynamic, check, len)                              \
+  if(dynamic && memcmp(dynamic, check, len)) {                          \
+    fprintf(stderr, "%s:%d The dynamic string didn't match '%s'\n",     \
+            __FILE__, __LINE__, check);                                 \
+    unitfail++;                                                         \
+  }
+
+/* fail() is for when the test case figured out by itself that a check
+   proved a failure */
+#define fail(msg) do {                                                 \
+    fprintf(stderr, "%s:%d test failed: '%s'\n",                       \
+            __FILE__, __LINE__, msg);                                  \
+    unitfail++;                                                        \
+  } WHILE_FALSE
+
+
+/* The abort macros mark the current test step as failed, and exit the test */
+#define abort_if(expr, msg)                                   \
+  if(expr) {                                                  \
+    fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n" ,  \
+            __FILE__, __LINE__, #expr, msg);                  \
+    unitfail++;                                               \
+    goto unit_test_abort;                                     \
+  }
+
+#define abort_unless(expr, msg)                                \
+  if(!(expr)) {                                                \
+    fprintf(stderr, "%s:%d Abort assertion '%s' failed: %s\n", \
+            __FILE__, __LINE__, #expr, msg);                   \
+    unitfail++;                                                \
+    goto unit_test_abort;                                      \
+  }
+
+#define abort_test(msg) do {                                  \
+    fprintf(stderr, "%s:%d test aborted: '%s'\n",             \
+            __FILE__, __LINE__, msg);                         \
+    unitfail++;                                               \
+    goto unit_test_abort;                                     \
+  } WHILE_FALSE
+
+
+
+extern int unitfail;
+
+#define UNITTEST_START                          \
+  int test(char *arg)                           \
+  {                                             \
+  (void)arg;                                    \
+  if (unit_setup()) {                           \
+    fail("unit_setup() failure");               \
+  } else {
+
+#define UNITTEST_STOP                           \
+    goto unit_test_abort; /* avoid warning */   \
+unit_test_abort:                                \
+    unit_stop();                                \
+  }                                             \
+  return unitfail;                              \
+  }
+
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
new file mode 100644 (file)
index 0000000..2b83416
--- /dev/null
@@ -0,0 +1,292 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "llist.h"
+
+static struct curl_llist *llist;
+
+static struct curl_llist *llist_destination;
+
+static void test_curl_llist_dtor(void *key, void *value)
+{
+  /* used by the llist API, does nothing here */
+  (void)key;
+  (void)value;
+}
+
+static CURLcode unit_setup(void)
+{
+  llist = Curl_llist_alloc(test_curl_llist_dtor);
+  if(!llist)
+    return CURLE_OUT_OF_MEMORY;
+  llist_destination = Curl_llist_alloc(test_curl_llist_dtor);
+  if(!llist_destination) {
+      Curl_llist_destroy(llist, NULL);
+      return CURLE_OUT_OF_MEMORY;
+  }
+
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+  Curl_llist_destroy(llist, NULL);
+  Curl_llist_destroy(llist_destination, NULL);
+}
+
+UNITTEST_START
+  int unusedData_case1 = 1;
+  int unusedData_case2 = 2;
+  int unusedData_case3 = 3;
+  struct curl_llist_element *head;
+  struct curl_llist_element *element_next;
+  struct curl_llist_element *element_prev;
+  struct curl_llist_element *to_remove;
+  size_t llist_size = Curl_llist_count(llist);
+  int curlErrCode = 0;
+
+  /**
+   * testing llist_init
+   * case 1:
+   * list initiation
+   * @assumptions:
+   * 1: list size will be 0
+   * 2: list head will be NULL
+   * 3: list tail will be NULL
+   * 4: list dtor will be NULL
+  */
+
+  fail_unless(llist->size == 0, "list initial size should be zero");
+  fail_unless(llist->head == NULL, "list head should initiate to NULL");
+  fail_unless(llist->tail == NULL, "list tail should intiate to NULL");
+  fail_unless(llist->dtor == test_curl_llist_dtor,
+               "list dtor shold initiate to test_curl_llist_dtor");
+
+  /**
+   * testing Curl_llist_insert_next
+   * case 1:
+   * list is empty
+   * @assumptions:
+   * 1: list size will be 1
+   * 2: list head will hold the data "unusedData_case1"
+   * 3: list tail will be the same as list head
+   */
+
+  curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
+  if(curlErrCode == 1) {
+    fail_unless(Curl_llist_count(llist) == 1,
+                 "List size should be 1 after adding a new element");
+    /*test that the list head data holds my unusedData */
+    fail_unless(llist->head->ptr == &unusedData_case1,
+                 "List size should be 1 after adding a new element");
+    /*same goes for the list tail */
+    fail_unless(llist->tail == llist->head,
+                 "List size should be 1 after adding a new element");
+
+    /**
+     * testing Curl_llist_insert_next
+     * case 2:
+     * list has 1 element, adding one element after the head
+     * @assumptions:
+     * 1: the element next to head should be our newly created element
+     * 2: the list tail should be our newly created element
+     */
+
+    curlErrCode = Curl_llist_insert_next(llist, llist->head,
+                                         &unusedData_case3);
+    if(curlErrCode == 1) {
+      fail_unless(llist->head->next->ptr == &unusedData_case3,
+                  "the node next to head is not getting set correctly");
+      fail_unless(llist->tail->ptr == &unusedData_case3,
+                  "the list tail is not getting set correctly");
+    }
+    else {
+      printf("skipping Curl_llist_insert_next as a non "
+             "success error code was returned\n");
+    }
+
+    /**
+     * testing Curl_llist_insert_next
+     * case 3:
+     * list has >1 element, adding one element after "NULL"
+     * @assumptions:
+     * 1: the element next to head should be our newly created element
+     * 2: the list tail should different from newly created element
+     */
+
+    curlErrCode = Curl_llist_insert_next(llist, llist->head,
+                                         &unusedData_case2);
+    if(curlErrCode == 1) {
+      fail_unless(llist->head->next->ptr == &unusedData_case2,
+                  "the node next to head is not getting set correctly");
+      /* better safe than sorry, check that the tail isn't corrupted */
+      fail_unless(llist->tail->ptr != &unusedData_case2,
+                  "the list tail is not getting set correctly");
+    }
+    else {
+      printf("skipping Curl_llist_insert_next as a non "
+             "success error code was returned\n");
+    }
+
+  }
+  else {
+    printf("skipping Curl_llist_insert_next as a non "
+           "success error code was returned\n");
+  }
+
+  /* unit tests for Curl_llist_remove */
+
+  /**
+   * case 1:
+   * list has >1 element, removing head
+   * @assumptions:
+   * 1: list size will be decremented by one
+   * 2: head will be the head->next
+   * 3: "new" head's previous will be NULL
+   */
+
+  head=llist->head;
+  abort_unless(head, "llist->head is NULL");
+  element_next = head->next;
+  llist_size = Curl_llist_count(llist);
+
+  Curl_llist_remove(llist, llist->head, NULL);
+
+  fail_unless(Curl_llist_count(llist) ==  (llist_size-1),
+               "llist size not decremented as expected");
+  fail_unless(llist->head == element_next,
+               "llist new head not modified properly");
+  abort_unless(llist->head, "llist->head is NULL");
+  fail_unless(llist->head->prev == NULL,
+              "new head previous not set to null");
+
+  /**
+   * case 2:
+   * removing non head element, with list having >=2 elements
+   * @setup:
+   * 1: insert another element to the list to make element >=2
+   * @assumptions:
+   * 1: list size will be decremented by one ; tested
+   * 2: element->previous->next will be element->next
+   * 3: element->next->previous will be element->previous
+   */
+  Curl_llist_insert_next(llist, llist->head, &unusedData_case3);
+  llist_size = Curl_llist_count(llist);
+  to_remove = llist->head->next;
+  abort_unless(to_remove, "to_remove is NULL");
+  element_next = to_remove->next;
+  element_prev = to_remove->prev;
+  Curl_llist_remove(llist, to_remove, NULL);
+  fail_unless(element_prev->next == element_next,
+              "element previous->next is not being adjusted");
+  abort_unless(element_next, "element_next is NULL");
+  fail_unless(element_next->prev == element_prev,
+              "element next->previous is not being adjusted");
+
+  /**
+   * case 3:
+   * removing the tail with list having >=1 element
+   * @assumptions
+   * 1: list size will be decremented by one ;tested
+   * 2: element->previous->next will be element->next ;tested
+   * 3: element->next->previous will be element->previous ;tested
+   * 4: list->tail will be tail->previous
+   */
+
+  to_remove = llist->tail;
+  element_prev = to_remove->prev;
+  Curl_llist_remove(llist, to_remove, NULL);
+  fail_unless(llist->tail == element_prev,
+              "llist tail is not being adjusted when removing tail");
+
+  /**
+   * case 4:
+   * removing head with list having 1 element
+   * @assumptions:
+   * 1: list size will be decremented by one ;tested
+   * 2: list head will be null
+   * 3: list tail will be null
+   */
+
+  to_remove = llist->head;
+  Curl_llist_remove(llist, to_remove, NULL);
+  fail_unless(llist->head == NULL,
+              "llist head is not NULL while the llist is empty");
+  fail_unless(llist->tail == NULL,
+              "llist tail is not NULL while the llist is empty");
+
+  /* @testing Curl_llist_move(struct curl_llist *,
+   * struct curl_llist_element *, struct curl_llist *,
+   * struct curl_llist_element *);
+  */
+
+  /**
+   * @case 1:
+   * moving head from an llist containg one element to an empty llist
+   * @assumptions:
+   * 1: llist size will be 0
+   * 2: llist_destination size will be 1
+   * 3: llist head will be NULL
+   * 4: llist_destination head == llist_destination tail != NULL
+   */
+
+  /*
+  * @setup
+  * add one element to the list
+  */
+
+  curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
+  /* necessary assertions */
+
+  abort_unless(curlErrCode == 1,
+  "Curl_llist_insert_next returned an error, Can't move on with test");
+  abort_unless(Curl_llist_count(llist) == 1,
+  "Number of list elements is not as expected, Aborting");
+  abort_unless(Curl_llist_count(llist_destination) == 0,
+  "Number of list elements is not as expected, Aborting");
+
+  /*actual testing code*/
+  curlErrCode = Curl_llist_move(llist, llist->head, llist_destination, NULL);
+  abort_unless(curlErrCode == 1,
+  "Curl_llist_move returned an error, Can't move on with test");
+  fail_unless(Curl_llist_count(llist) == 0,
+      "moving element from llist didn't decrement the size");
+
+  fail_unless(Curl_llist_count(llist_destination) == 1,
+        "moving element to llist_destination didn't increment the size");
+
+  fail_unless(llist->head == NULL,
+      "llist head not set to null after moving the head");
+
+  fail_unless(llist_destination->head != NULL,
+        "llist_destination head set to null after moving an element");
+
+  fail_unless(llist_destination->tail != NULL,
+          "llist_destination tail set to null after moving an element");
+
+  fail_unless(llist_destination->tail == llist_destination->tail,
+            "llist_destination tail doesn't equal llist_destination head");
+
+
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1301.c b/tests/unit/unit1301.c
new file mode 100644 (file)
index 0000000..47df481
--- /dev/null
@@ -0,0 +1,54 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "strequal.h"
+
+static CURLcode unit_setup( void ) {return CURLE_OK;}
+static void unit_stop( void ) {}
+
+UNITTEST_START
+
+int rc;
+
+rc = curl_strequal("iii", "III");
+fail_unless( rc != 0 , "return code should be zero" );
+
+rc = curl_strequal("iiia", "III");
+fail_unless( rc == 0 , "return code should be zero" );
+
+rc = curl_strequal("iii", "IIIa");
+fail_unless( rc == 0 , "return code should be zero" );
+
+rc = curl_strequal("iiiA", "IIIa");
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("iii", "III", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("iiiABC", "IIIcba", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+rc = curl_strnequal("ii", "II", 3);
+fail_unless( rc != 0 , "return code should be non-zero" );
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c
new file mode 100644 (file)
index 0000000..fc50c88
--- /dev/null
@@ -0,0 +1,124 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "urldata.h"
+#include "url.h" /* for Curl_safefree */
+#include "curl_base64.h"
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+
+static CURLcode unit_setup( void )
+{
+  data = curl_easy_init();
+  if (!data)
+    return CURLE_OUT_OF_MEMORY;
+  return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+  curl_easy_cleanup(data);
+}
+
+UNITTEST_START
+
+char *output;
+unsigned char *decoded;
+size_t size = 0;
+unsigned char anychar = 'x';
+CURLcode rc;
+
+rc = Curl_base64_encode(data, "i", 1, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aQ==", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_encode(data, "ii", 2, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aWk=", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_encode(data, "iii", 3, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory( output, "aWlp", 4);
+Curl_safefree(output);
+
+rc = Curl_base64_encode(data, "iiii", 4, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 8, "size should be 8");
+verify_memory( output, "aWlpaQ==", 8);
+Curl_safefree(output);
+
+/* 0 length makes it do strlen() */
+rc = Curl_base64_encode(data, "iiii", 0, &output, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 8, "size should be 8");
+verify_memory( output, "aWlpaQ==", 8);
+Curl_safefree(output);
+
+rc = Curl_base64_decode("aWlpaQ==", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 4, "size should be 4");
+verify_memory(decoded, "iiii", 4);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aWlp", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 3, "size should be 3");
+verify_memory(decoded, "iii", 3);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aWk=", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 2, "size should be 2");
+verify_memory(decoded, "ii", 2);
+Curl_safefree(decoded);
+
+rc = Curl_base64_decode("aQ==", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 1, "size should be 1");
+verify_memory(decoded, "i", 2);
+Curl_safefree(decoded);
+
+/* this is an illegal input */
+size = 1; /* not zero */
+decoded = &anychar; /* not NULL */
+rc = Curl_base64_decode("aQ", &decoded, &size);
+/* return code indiferent, but output shall be as follows */
+fail_unless(size == 0, "size should be 0");
+fail_if(decoded, "returned pointer should be NULL");
+
+/* this is garbage input that libcurl decodes as far as possible */
+size = 0;
+decoded = NULL;
+rc = Curl_base64_decode("a\x1f==", &decoded, &size);
+fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
+fail_unless(size == 1, "size should be 1");
+fail_if(!decoded, "returned pointer should not be NULL");
+Curl_safefree(decoded);
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
new file mode 100644 (file)
index 0000000..2e4f230
--- /dev/null
@@ -0,0 +1,144 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "urldata.h"
+#include "connect.h"
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+
+static CURLcode unit_setup( void )
+{
+  data = curl_easy_init();
+  if (!data)
+    return CURLE_OUT_OF_MEMORY;
+  return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+  curl_easy_cleanup(data);
+}
+
+/* BASE is just a define to make us fool around with decently large number so
+   that we aren't zero-based */
+#define BASE 1000000
+
+/* macro to set the pretended current time */
+#define NOW(x,y) now.tv_sec = x; now.tv_usec = y
+/* macro to set the millisecond based timeouts to use */
+#define TIMEOUTS(x,y) data->set.timeout = x; data->set.connecttimeout = y
+
+/*
+ * To test:
+ *
+ * 00/10/01/11 timeouts set
+ * 0/1         during connect
+ * T           various values on the timeouts
+ * N           various values of now
+ */
+
+struct timetest {
+  int now_s;
+  int now_us;
+  int timeout_ms;
+  int connecttimeout_ms;
+  bool connecting;
+  long result;
+  const char *comment;
+};
+
+UNITTEST_START
+
+struct timeval now;
+long timeout;
+unsigned int i;
+
+const struct timetest run[] = {
+  /* both timeouts set, not connecting */
+  {BASE + 4, 0,      10000, 8000, FALSE, 6000, "6 seconds should be left"},
+  {BASE + 4, 990000, 10000, 8000, FALSE, 5010, "5010 ms should be left"},
+  {BASE + 10, 0,     10000, 8000, FALSE, -1,   "timeout is -1, expired"},
+  {BASE + 12, 0,     10000, 8000, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+  /* both timeouts set, connecting */
+  {BASE + 4, 0,      10000, 8000, TRUE, 4000, "4 seconds should be left"},
+  {BASE + 4, 990000, 10000, 8000, TRUE, 3010, "3010 ms should be left"},
+  {BASE + 8, 0,      10000, 8000, TRUE, -1,   "timeout is -1, expired"},
+  {BASE + 10, 0,     10000, 8000, TRUE, -2000, "-2000, overdue 2 seconds"},
+
+  /* no connect timeout set, not connecting */
+  {BASE + 4, 0,      10000, 0, FALSE, 6000, "6 seconds should be left"},
+  {BASE + 4, 990000, 10000, 0, FALSE, 5010, "5010 ms should be left"},
+  {BASE + 10, 0,     10000, 0, FALSE, -1,   "timeout is -1, expired"},
+  {BASE + 12, 0,     10000, 0, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+  /* no connect timeout set, connecting */
+  {BASE + 4, 0,      10000, 0, FALSE, 6000, "6 seconds should be left"},
+  {BASE + 4, 990000, 10000, 0, FALSE, 5010, "5010 ms should be left"},
+  {BASE + 10, 0,     10000, 0, FALSE, -1,   "timeout is -1, expired"},
+  {BASE + 12, 0,     10000, 0, FALSE, -2000, "-2000, overdue 2 seconds"},
+
+  /* only connect timeout set, not connecting */
+  {BASE + 4, 0,      0, 10000, FALSE, 0, "no timeout active"},
+  {BASE + 4, 990000, 0, 10000, FALSE, 0, "no timeout active"},
+  {BASE + 10, 0,     0, 10000, FALSE, 0, "no timeout active"},
+  {BASE + 12, 0,     0, 10000, FALSE, 0, "no timeout active"},
+
+  /* only connect timeout set, connecting */
+  {BASE + 4, 0,      0, 10000, TRUE, 6000, "6 seconds should be left"},
+  {BASE + 4, 990000, 0, 10000, TRUE, 5010, "5010 ms should be left"},
+  {BASE + 10, 0,     0, 10000, TRUE, -1,   "timeout is -1, expired"},
+  {BASE + 12, 0,     0, 10000, TRUE, -2000, "-2000, overdue 2 seconds"},
+
+  /* no timeout set, not connecting */
+  {BASE + 4, 0,      0, 0, FALSE, 0, "no timeout active"},
+  {BASE + 4, 990000, 0, 0, FALSE, 0, "no timeout active"},
+  {BASE + 10, 0,     0, 0, FALSE, 0, "no timeout active"},
+  {BASE + 12, 0,     0, 0, FALSE, 0, "no timeout active"},
+
+  /* no timeout set, connecting */
+  {BASE + 4, 0,      0, 0, TRUE, 296000, "no timeout active"},
+  {BASE + 4, 990000, 0, 0, TRUE, 295010, "no timeout active"},
+  {BASE + 10, 0,     0, 0, TRUE, 290000, "no timeout active"},
+  {BASE + 12, 0,     0, 0, TRUE, 288000, "no timeout active"},
+
+  /* both timeouts set, connecting, connect timeout the longer one */
+  {BASE + 4, 0,      10000, 12000, TRUE, 6000, "6 seconds should be left"},
+
+};
+
+/* this is the pretended start time of the transfer */
+data->progress.t_startsingle.tv_sec = BASE;
+data->progress.t_startsingle.tv_usec = 0;
+
+for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
+  NOW(run[i].now_s, run[i].now_us);
+  TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms);
+  timeout =  Curl_timeleft(data, &now, run[i].connecting);
+  if(timeout != run[i].result)
+    fail(run[i].comment);
+}
+
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c
new file mode 100644 (file)
index 0000000..8ddd8ca
--- /dev/null
@@ -0,0 +1,142 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "netrc.h"
+
+static char login[LOGINSIZE];
+static char password[PASSWORDSIZE];
+static char filename[64];
+
+static CURLcode unit_setup(void)
+{
+  password[0] = 0;
+  login[0] = 0;
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+UNITTEST_START
+  int result;
+
+  static const char* filename1 = "log/netrc1304";
+  memcpy(filename, filename1, strlen(filename1));
+
+  /*
+   * Test a non existent host in our netrc file.
+   */
+  result = Curl_parsenetrc("test.example.com", login, password, filename);
+  fail_unless(result == 1, "Host not found should return 1");
+  fail_unless(password[0] == 0, "password should not have been changed");
+  fail_unless(login[0] == 0, "login should not have been changed");
+
+  /*
+   * Test a non existent login in our netrc file.
+   */
+  memcpy(login, "me", 2);
+  result = Curl_parsenetrc("example.com", login, password, filename);
+  fail_unless(result == 0, "Host should be found");
+  fail_unless(password[0] == 0, "password should not have been changed");
+  fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+
+  /*
+   * Test a non existent login and host in our netrc file.
+   */
+  memcpy(login, "me", 2);
+  result = Curl_parsenetrc("test.example.com", login, password, filename);
+  fail_unless(result == 1, "Host should be found");
+  fail_unless(password[0] == 0, "password should not have been changed");
+  fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+
+  /*
+   * Test a non existent login (substring of an existing one) in our
+   * netrc file.
+   */
+  memcpy(login, "admi", 4);
+  result = Curl_parsenetrc("example.com", login, password, filename);
+  fail_unless(result == 0, "Host should be found");
+  fail_unless(password[0] == 0, "password should not have been changed");
+  fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed");
+
+  /*
+   * Test a non existent login (superstring of an existing one)
+   * in our netrc file.
+   */
+  memcpy(login, "adminn", 6);
+  result = Curl_parsenetrc("example.com", login, password, filename);
+  fail_unless(result == 0, "Host should be found");
+  fail_unless(password[0] == 0, "password should not have been changed");
+  fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed");
+
+  /*
+   * Test for the first existing host in our netrc file
+   * with login[0] = 0.
+   */
+  login[0] = 0;
+  result = Curl_parsenetrc("example.com", login, password, filename);
+  fail_unless(result == 0, "Host should have been found");
+  fail_unless(strncmp(password, "passwd", 6) == 0,
+              "password should be 'passwd'");
+  fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'");
+
+  /*
+   * Test for the first existing host in our netrc file
+   * with login[0] != 0.
+   */
+  password[0] = 0;
+  result = Curl_parsenetrc("example.com", login, password, filename);
+  fail_unless(result == 0, "Host should have been found");
+  fail_unless(strncmp(password, "passwd", 6) == 0,
+              "password should be 'passwd'");
+  fail_unless(strncmp(login, "admin", 5) == 0, "login should be 'admin'");
+
+  /*
+   * Test for the second existing host in our netrc file
+   * with login[0] = 0.
+   */
+  password[0] = 0;
+  login[0] = 0;
+  result = Curl_parsenetrc("curl.example.com", login, password, filename);
+  fail_unless(result == 0, "Host should have been found");
+  fail_unless(strncmp(password, "none", 4) == 0,
+              "password should be 'none'");
+  fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'");
+
+  /*
+   * Test for the second existing host in our netrc file
+   * with login[0] != 0.
+   */
+  password[0] = 0;
+  result = Curl_parsenetrc("curl.example.com", login, password, filename);
+  fail_unless(result == 0, "Host should have been found");
+  fail_unless(strncmp(password, "none", 4) == 0,
+              "password should be 'none'");
+  fail_unless(strncmp(login, "none", 4) == 0, "login should be 'none'");
+
+  /* TODO:
+   * Test over the size limit password / login!
+   * Test files with a bad format
+   */
+UNITTEST_STOP
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
new file mode 100644 (file)
index 0000000..5900c6d
--- /dev/null
@@ -0,0 +1,142 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
+#  include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#  include <arpa/inet.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h"
+
+#include "hash.h"
+#include "hostip.h"
+
+#include "curl_memory.h"
+#include "memdebug.h" /* LAST include file */
+
+static struct SessionHandle *data;
+static struct curl_hash *hp;
+static char *data_key;
+static struct Curl_dns_entry *data_node;
+
+static CURLcode unit_setup( void )
+{
+  data = curl_easy_init();
+  if (!data)
+    return CURLE_OUT_OF_MEMORY;
+
+  hp = Curl_mk_dnscache();
+  if(!hp) {
+    curl_easy_cleanup(data);
+    curl_global_cleanup();
+    return CURLE_OUT_OF_MEMORY;
+  }
+  return CURLE_OK;
+}
+
+static void unit_stop( void )
+{
+  if (data_node) {
+    Curl_freeaddrinfo(data_node->addr);
+    free(data_node);
+  }
+  if (data_key)
+    free(data_key);
+
+  Curl_hash_destroy(hp);
+
+  curl_easy_cleanup(data);
+  curl_global_cleanup();
+}
+
+static Curl_addrinfo *fake_ai(void)
+{
+  static Curl_addrinfo *ai;
+  int ss_size;
+
+  ss_size = sizeof (struct sockaddr_in);
+
+  if((ai = calloc(1, sizeof(Curl_addrinfo))) == NULL)
+    return NULL;
+
+  if((ai->ai_canonname = strdup("dummy")) == NULL) {
+    free(ai);
+    return NULL;
+  }
+
+  if((ai->ai_addr = calloc(1, ss_size)) == NULL) {
+    free(ai->ai_canonname);
+    free(ai);
+    return NULL;
+  }
+
+  ai->ai_family = AF_INET;
+  ai->ai_addrlen = ss_size;
+
+  return ai;
+}
+
+static CURLcode create_node(void)
+{
+  data_key = aprintf("%s:%d", "dummy", 0);
+  if (!data_key)
+    return CURLE_OUT_OF_MEMORY;
+
+  data_node = calloc(1, sizeof(struct Curl_dns_entry));
+  if (!data_node)
+    return CURLE_OUT_OF_MEMORY;
+
+  data_node->addr = fake_ai();
+  if (!data_node->addr)
+    return CURLE_OUT_OF_MEMORY;
+
+  return CURLE_OK;
+}
+
+
+UNITTEST_START
+
+  struct Curl_dns_entry *nodep;
+  size_t key_len;
+
+  /* Test 1305 exits without adding anything to the hash */
+  if (strcmp(arg, "1305") != 0) {
+    CURLcode rc = create_node();
+    abort_unless(rc == CURLE_OK, "data node creation failed");
+    key_len = strlen(data_key);
+
+    nodep = Curl_hash_add(hp, data_key, key_len+1, data_node);
+    abort_unless(nodep, "insertion into hash failed");
+    /* Freeing will now be done by Curl_hash_destroy */
+    data_node = NULL;
+
+    /* To do: test retrieval, deletion, edge conditions */
+  }
+
+UNITTEST_STOP
similarity index 92%
rename from tests/libtest/lib577.c
rename to tests/unit/unit1307.c
index bd52c62..c26e80c 100644 (file)
@@ -1,34 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
  *                             / __| | | | |_) | |
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- */
-
-#include "test.h"
-
-/*
- * This hacky test bypasses the library external API,
- * using internal only libcurl functions. So don't be
- * surprised if we cannot run it when the library has
- * been built with hidden symbols, exporting only the
- * ones in the public API.
- */
-
-#if defined(CURL_HIDDEN_SYMBOLS)
-#  define SKIP_TEST 1
-#elif defined(WIN32) && !defined(CURL_STATICLIB)
-#  define SKIP_TEST 1
-#else
-#  undef  SKIP_TEST
-#endif
-
-
-#if !defined(SKIP_TEST)
-
-#include "memdebug.h"
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
 
 #include "curl_fnmatch.h"
 
@@ -217,39 +208,27 @@ static const struct testcase tests[] = {
   { "",                         "",                       MATCH }
 };
 
+static CURLcode unit_setup( void )
+{
+  return CURLE_OK;
+}
 
-int test(char *URL)
+static void unit_stop( void )
 {
+}
+
+UNITTEST_START
+
   int testnum = sizeof(tests) / sizeof(struct testcase);
   int i, rc;
-  (void)URL; /* not used */
 
-  if(!strcmp(URL, "check")) {
-    /* test harness script verifying if this test can run */
-    return 0; /* sure, run this! */
-  }
-
-  printf("===========================\n");
   for(i = 0; i < testnum; i++) {
     rc = Curl_fnmatch(NULL, tests[i].pattern, tests[i].string);
     if(rc != tests[i].result) {
       printf("Curl_fnmatch(\"%s\", \"%s\") should return %d (returns %d)\n",
              tests[i].pattern, tests[i].string, tests[i].result, rc);
+      fail("pattern mismatch");
     }
   }
-  printf("===========================\n");
-  return 0;
-}
-
-#else /* !defined(SKIP_TEST) */
-
-
-int test(char *URL)
-{
-  (void)URL;
-  fprintf(stdout, "libcurl built with hidden symbols");
-  return 1; /* skip test */
-}
-
 
-#endif /* !defined(SKIP_TEST) */
+UNITTEST_STOP
diff --git a/tests/unit/unit1308.c b/tests/unit/unit1308.c
new file mode 100644 (file)
index 0000000..80e6c57
--- /dev/null
@@ -0,0 +1,95 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include <curl/curl.h>
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
+{
+  fwrite(buf, len, 1, stdout);
+  (*(size_t *) arg) += len;
+  return len;
+}
+
+UNITTEST_START
+  int rc;
+  struct curl_httppost* post = NULL;
+  struct curl_httppost* last = NULL;
+  size_t total_size = 0;
+  char buffer[] = "test buffer";
+
+  rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+                    CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
+
+  fail_unless(rc == 0, "curl_formadd returned error");
+
+  /* after the first curl_formadd when there's a single entry, both pointers
+     should point to the same struct */
+  fail_unless(post == last, "post and last weren't the same");
+
+  rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
+                    CURLFORM_COPYCONTENTS, "<HTML></HTML>",
+                    CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
+
+  fail_unless(rc == 0, "curl_formadd returned error");
+
+  rc = curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
+                   CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
+
+  fail_unless(rc == 0, "curl_formadd returned error");
+
+  rc = curl_formget(post, &total_size, print_httppost_callback);
+
+  fail_unless(rc == 0, "curl_formget returned error");
+
+  fail_unless(total_size == 486, "curl_formget got wrong size back");
+
+  curl_formfree(post);
+
+  /* start a new formpost with a file upload and formget */
+  post = last = NULL;
+
+  rc = curl_formadd(&post, &last,
+                    CURLFORM_PTRNAME, "name of file field",
+                    CURLFORM_FILE, "log/test-1308",
+                    CURLFORM_FILENAME, "custom named file",
+                    CURLFORM_END);
+
+  fail_unless(rc == 0, "curl_formadd returned error");
+
+  rc = curl_formget(post, &total_size, print_httppost_callback);
+  fail_unless(rc == 0, "curl_formget returned error");
+  fail_unless(total_size == 847, "curl_formget got wrong size back");
+
+  curl_formfree(post);
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
new file mode 100644 (file)
index 0000000..1304ba1
--- /dev/null
@@ -0,0 +1,110 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, 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 "curlcheck.h"
+
+#include "splay.h"
+
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static void splayprint(struct Curl_tree * t, int d, char output)
+{
+  struct Curl_tree *node;
+  int i;
+  int count;
+  if(t == NULL)
+    return;
+
+  splayprint(t->larger, d+1, output);
+  for(i=0; i<d; i++)
+    if(output)
+      printf("  ");
+
+  if(output) {
+    printf("%ld.%ld[%d]", (long)t->key.tv_sec,
+           (long)t->key.tv_usec, i);
+  }
+
+  for(count=0, node = t->same; node; node = node->same, count++)
+    ;
+
+  if(output) {
+    if(count)
+      printf(" [%d more]\n", count);
+    else
+      printf("\n");
+  }
+
+  splayprint(t->smaller, d+1, output);
+}
+
+UNITTEST_START
+
+/* number of nodes to add to the splay tree */
+#define NUM_NODES 50
+
+  struct Curl_tree *root;
+  struct Curl_tree nodes[NUM_NODES];
+  int rc;
+  int i;
+  root = NULL;              /* the empty tree */
+
+  for(i = 0; i < NUM_NODES; i++) {
+    struct timeval key;
+
+    key.tv_sec = 0;
+    key.tv_usec = (541*i)%1023;
+
+    nodes[i].payload = (void *)key.tv_usec; /* for simplicity */
+    root = Curl_splayinsert(key, root, &nodes[i]);
+  }
+
+  puts("Result:");
+  splayprint(root, 0, 1);
+
+  for(i = 0; i < NUM_NODES; i++) {
+    int rem = (i+7)%NUM_NODES;
+    printf("Tree look:\n");
+    splayprint(root, 0, 1);
+    printf("remove pointer %d, payload %ld\n", rem,
+           (long)(nodes[rem].payload));
+    rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
+    if(rc) {
+      /* failed! */
+      printf("remove %d failed!\n", rem);
+      fail("remove");
+    }
+  }
+
+UNITTEST_STOP
+
+
+
+
diff --git a/tests/unit/unit1330.c b/tests/unit/unit1330.c
new file mode 100644 (file)
index 0000000..31caf30
--- /dev/null
@@ -0,0 +1,41 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "curlcheck.h"
+
+#include "memdebug.h"
+
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+UNITTEST_START
+
+char *ptr = malloc(1330);
+Curl_safefree(ptr);
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
new file mode 100644 (file)
index 0000000..d25e4f5
--- /dev/null
@@ -0,0 +1,123 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "curlcheck.h"
+
+#include "tool_getparam.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "curl_memory.h"
+#include "memdebug.h" /* LAST include file */
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+UNITTEST_START
+
+  const char *values[] = {
+    /* -E parameter */        /* exp. cert name */  /* exp. passphrase */
+    "foo:bar:baz",            "foo",                "bar:baz",
+    "foo\\:bar:baz",          "foo:bar",            "baz",
+    "foo\\\\:bar:baz",        "foo\\",              "bar:baz",
+    "foo:bar\\:baz",          "foo",                "bar\\:baz",
+    "foo:bar\\\\:baz",        "foo",                "bar\\\\:baz",
+    "foo\\bar\\baz",          "foo\\bar\\baz",      NULL,
+    "foo\\\\bar\\\\baz",      "foo\\bar\\baz",      NULL,
+    "foo\\",                  "foo\\",              NULL,
+    "foo\\\\",                "foo\\",              NULL,
+    "foo:bar\\",              "foo",                "bar\\",
+    "foo:bar\\\\",            "foo",                "bar\\\\",
+    "foo:bar:",               "foo",                "bar:",
+    "foo\\::bar\\:",          "foo:",               "bar\\:",
+#ifdef WIN32
+    "c:\\foo:bar:baz",        "c:\\foo",            "bar:baz",
+    "c:\\foo\\:bar:baz",      "c:\\foo:bar",        "baz",
+    "c:\\foo\\\\:bar:baz",    "c:\\foo\\",          "bar:baz",
+    "c:\\foo:bar\\:baz",      "c:\\foo",            "bar\\:baz",
+    "c:\\foo:bar\\\\:baz",    "c:\\foo",            "bar\\\\:baz",
+    "c:\\foo\\bar\\baz",      "c:\\foo\\bar\\baz",  NULL,
+    "c:\\foo\\\\bar\\\\baz",  "c:\\foo\\bar\\baz",  NULL,
+    "c:\\foo\\",              "c:\\foo\\",          NULL,
+    "c:\\foo\\\\",            "c:\\foo\\",          NULL,
+    "c:\\foo:bar\\",          "c:\\foo",            "bar\\",
+    "c:\\foo:bar\\\\",        "c:\\foo",            "bar\\\\",
+    "c:\\foo:bar:",           "c:\\foo",            "bar:",
+    "c:\\foo\\::bar\\:",      "c:\\foo:",           "bar\\:",
+#endif
+    NULL,                     NULL,                 NULL,
+  };
+  const char **p;
+  char *certname, *passphrase;
+  for(p = values; *p; p += 3) {
+    parse_cert_parameter(p[0], &certname, &passphrase);
+    if(p[1]) {
+      if(certname) {
+        if(strcmp(p[1], certname)) {
+          printf("expected certname '%s' but got '%s' "
+              "for -E param '%s'\n", p[1], certname, p[0]);
+          fail("assertion failure");
+        }
+      } else {
+        printf("expected certname '%s' but got NULL "
+            "for -E param '%s'\n", p[1], p[0]);
+        fail("assertion failure");
+      }
+    } else {
+      if(certname) {
+        printf("expected certname NULL but got '%s' "
+            "for -E param '%s'\n", certname, p[0]);
+        fail("assertion failure");
+      }
+    }
+    if(p[2]) {
+      if(passphrase) {
+        if(strcmp(p[2], passphrase)) {
+          printf("expected passphrase '%s' but got '%s'"
+              "for -E param '%s'\n", p[2], passphrase, p[0]);
+          fail("assertion failure");
+        }
+      } else {
+        printf("expected passphrase '%s' but got NULL "
+            "for -E param '%s'\n", p[2], p[0]);
+        fail("assertion failure");
+      }
+    } else {
+      if(passphrase) {
+        printf("expected passphrase NULL but got '%s' "
+            "for -E param '%s'\n", passphrase, p[0]);
+        fail("assertion failure");
+      }
+    }
+    if(certname) free(certname);
+    if(passphrase) free(passphrase);
+  }
+
+UNITTEST_STOP
diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c
new file mode 100644 (file)
index 0000000..8b0b0a0
--- /dev/null
@@ -0,0 +1,87 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "curlcheck.h"
+
+#include "dotdot.h"
+
+#include "memdebug.h"
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+struct dotdot {
+  const char *input;
+  const char *output;
+};
+
+UNITTEST_START
+
+  unsigned int i;
+  int fails=0;
+  struct dotdot pairs[] = {
+    { "/a/b/c/./../../g", "/a/g" },
+    { "mid/content=5/../6", "mid/6" },
+    { "/hello/../moo", "/moo" },
+    { "/1/../1", "/1" },
+    { "/1/./1", "/1/1" },
+    { "/1/..", "/" },
+    { "/1/.", "/1/" },
+    { "/1/./..", "/" },
+    { "/1/./../2", "/2" },
+    { "/hello/1/./../2", "/hello/2" },
+    { "test/this", "test/this" },
+    { "test/this/../now", "test/now" },
+    { "/1../moo../foo", "/1../moo../foo"},
+    { "/../../moo", "/moo"},
+    { "/../../moo?andnot/../yay", "/moo?andnot/../yay"},
+    { "/123?foo=/./&bar=/../", "/123?foo=/./&bar=/../"},
+    { "/../moo/..?what", "/?what" },
+  };
+
+  for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
+    char *out = Curl_dedotdotify((char *)pairs[i].input);
+
+    if(strcmp(out, pairs[i].output)) {
+      fprintf(stderr, "Test %d: '%s' gave '%s' instead of '%s'\n",
+              i, pairs[i].input, out, pairs[i].output);
+      fail("Test case output mismatched");
+      fails++;
+    }
+    else
+      fprintf(stderr, "Test %d: OK\n", i);
+    free(out);
+  }
+
+  return fails;
+
+UNITTEST_STOP
+
+
+
+
diff --git a/tests/unit/unit1396.c b/tests/unit/unit1396.c
new file mode 100644 (file)
index 0000000..797443d
--- /dev/null
@@ -0,0 +1,109 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, 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 "curlcheck.h"
+
+static CURLcode unit_setup(void)
+{
+  return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+}
+
+struct test {
+  const char *in;
+  int inlen;
+  const char *out;
+  int outlen;
+};
+
+UNITTEST_START
+{
+  /* unescape, this => that */
+  struct test list1[]={
+    {"%61", 3, "a", 1},
+    {"%61a", 4, "aa", 2},
+    {"%61b", 4, "ab", 2},
+    {"%6 1", 4, "%6 1", 4},
+    {"%61", 1, "%", 1},
+    {"%61", 2, "%6", 2},
+    {"%6%a", 4, "%6%a", 4},
+    {"%6a", 0, "j", 1},
+    {"%FF", 0, "\xff", 1},
+    {"%FF%00%ff", 9, "\xff\x00\xff", 3},
+    {"%-2", 0, "%-2", 3},
+    {"%FG", 0, "%FG", 3},
+    {NULL, 0, NULL, 0} /* end of list marker */
+  };
+  /* escape, this => that */
+  struct test list2[]={
+    {"a", 1, "a", 1},
+    {"/", 1, "%2F", 3},
+    {"a=b", 3, "a%3Db", 5},
+    {"a=b", 0, "a%3Db", 5},
+    {"a=b", 1, "a", 1},
+    {"a=b", 2, "a%3D", 4},
+    {"1/./0", 5, "1%2F.%2F0", 9},
+    {"-._~!#%&", 0, "-._~%21%23%25%26", 16},
+    {"a", 2, "a%00", 4},
+    {"a\xff\x01g", 4, "a%FF%01g", 8},
+    {NULL, 0, NULL, 0} /* end of list marker */
+  };
+  int i;
+  CURL *hnd;
+
+  hnd = curl_easy_init();
+  for(i=0; list1[i].in; i++) {
+    int outlen;
+    char *out = curl_easy_unescape(hnd,
+                                   list1[i].in, list1[i].inlen,
+                                   &outlen);
+
+    fail_unless(out != NULL, "returned NULL!");
+    fail_unless(outlen == list1[i].outlen, "wrong output length returned");
+    fail_unless(!memcmp(out, list1[i].out, list1[i].outlen),
+                "bad output data returned");
+
+    printf("curl_easy_unescape test %d DONE\n", i);
+
+    curl_free(out);
+  }
+
+  for(i=0; list2[i].in; i++) {
+    char *out = curl_easy_escape(hnd, list2[i].in, list2[i].inlen);
+    int outlen = (int)strlen(out);
+
+    fail_unless(out != NULL, "returned NULL!");
+    fail_unless(outlen == list2[i].outlen, "wrong output length returned");
+    fail_unless(!memcmp(out, list2[i].out, list2[i].outlen),
+                "bad output data returned");
+
+    printf("curl_easy_escape test %d DONE (%s)\n", i, out);
+
+    curl_free(out);
+  }
+
+  curl_easy_cleanup(hnd);
+
+}
+UNITTEST_STOP
index 78523ea..f811993 100644 (file)
@@ -36,6 +36,7 @@ sub valgrindparse {
     my @o;
 
     my $bt=0;
+    my $nssinit=0;
 
     open(VAL, "<$file");
     while(<VAL>) {
@@ -53,9 +54,14 @@ sub valgrindparse {
                         $us++;
                     } #else {print "Not our source: $func, $source, $line\n";}
                 }
+
+                # the memory leakage within NSS_InitContext is not a bug of curl
+                if($w =~ /NSS_InitContext/) {
+                    $nssinit++;
+                }
             }
             else {
-                if($us) {
+                if($us and not $nssinit) {
                     # the stack trace included source details about us
 
                     $error++;
@@ -71,6 +77,7 @@ sub valgrindparse {
                 }
                 $bt = 0; # no more backtrace
                 $us = 0;
+                $nssinit = 0;
             }
         }
         else {
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
new file mode 100644 (file)
index 0000000..6fb9ce8
--- /dev/null
@@ -0,0 +1,16 @@
+{
+   libidn-idna_to_ascii-error
+   Memcheck:Addr4
+   fun:idna_to_ascii_4z
+   fun:idna_to_ascii_8z
+   fun:idna_to_ascii_lz
+   fun:fix_hostname
+   fun:resolve_server
+   fun:create_conn
+   fun:Curl_connect
+   fun:multi_runsingle
+   fun:curl_multi_perform
+   fun:curl_easy_perform
+   fun:operate
+   fun:main
+}
diff --git a/vs/t/README b/vs/t/README
new file mode 100644 (file)
index 0000000..69ebd27
--- /dev/null
@@ -0,0 +1,8 @@
+Note:\r
+\r
+Files located in subdirectory 'vs/t' and below are 'templates' used for\r
+the generation of msvc IDE workspace and project files, distributed in\r
+subdirectories 'vs/vc6' and 'vs/vc8'.\r
+\r
+All these template files use UNIX line endings intentionally, in order\r
+to allow proper file generation. Don't convert these to crlf line-ends.\r
similarity index 81%
rename from lib/msvcproj.foot
rename to vs/t/lib/vc6_libcurl_dsp.foot
index 8ce4ca0..fd10e8e 100644 (file)
@@ -1,10 +1,9 @@
-
 # Begin Group "Resource Files"
 
 # PROP Default_Filter ""
 # Begin Source File
 
-SOURCE=.\libcurl.rc
+SOURCE=..\..\..\lib\libcurl.rc
 # End Source File
 # End Group
 # End Target
diff --git a/vs/t/lib/vc6_libcurl_dsp.head b/vs/t/lib/vc6_libcurl_dsp.head
new file mode 100644 (file)
index 0000000..06fb88d
--- /dev/null
@@ -0,0 +1,147 @@
+# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libcurl - Win32 LIB Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "vc6libcurl.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "vc6libcurl.mak" CFG="libcurl - Win32 LIB Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF  "$(CFG)" == "libcurl - Win32 DLL Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "dll-debug"
+# PROP BASE Intermediate_Dir "dll-debug/obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "dll-debug"
+# PROP Intermediate_Dir "dll-debug/obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /GZ /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /win32
+# ADD MTL /nologo /D "_DEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"dll-debug/libcurld.dll" /implib:"dll-debug/libcurld_imp.lib" /pdbtype:con /fixed:no
+# ADD LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"dll-debug/libcurld.dll" /implib:"dll-debug/libcurld_imp.lib" /pdbtype:con /fixed:no
+
+!ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "dll-release"
+# PROP BASE Intermediate_Dir "dll-release/obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "dll-release"
+# PROP Intermediate_Dir "dll-release/obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /c
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /win32
+# ADD MTL /nologo /D "NDEBUG" /win32
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /pdb:none /machine:I386 /out:"dll-release/libcurl.dll" /implib:"dll-release/libcurl_imp.lib" /fixed:no /release /incremental:no
+# ADD LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /pdb:none /machine:I386 /out:"dll-release/libcurl.dll" /implib:"dll-release/libcurl_imp.lib" /fixed:no /release /incremental:no
+
+!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "lib-debug"
+# PROP BASE Intermediate_Dir "lib-debug/obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "lib-debug"
+# PROP Intermediate_Dir "lib-debug/obj"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib-debug/libcurld.lib" /machine:I386
+# ADD LIB32 /nologo /out:"lib-debug/libcurld.lib" /machine:I386
+
+!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "lib-release"
+# PROP BASE Intermediate_Dir "lib-release/obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "lib-release"
+# PROP Intermediate_Dir "lib-release/obj"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib-release/libcurl.lib" /machine:I386
+# ADD LIB32 /nologo /out:"lib-release/libcurl.lib" /machine:I386
+
+!ENDIF 
+
+# Begin Target
+
+# Name "libcurl - Win32 DLL Debug"
+# Name "libcurl - Win32 DLL Release"
+# Name "libcurl - Win32 LIB Debug"
+# Name "libcurl - Win32 LIB Release"
diff --git a/vs/t/lib/vc8_libcurl_prj.foot b/vs/t/lib/vc8_libcurl_prj.foot
new file mode 100644 (file)
index 0000000..862ef42
--- /dev/null
@@ -0,0 +1,7 @@
+               <Filter Name="Resource Files">
+                       <File RelativePath="..\..\..\lib\libcurl.rc"></File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/vs/t/lib/vc8_libcurl_prj.head b/vs/t/lib/vc8_libcurl_prj.head
new file mode 100644 (file)
index 0000000..7614688
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="libcurl"
+       ProjectGUID="{87EE9DA4-DE1E-4448-8324-183C98DCA588}"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory=".\Release"
+                       IntermediateDirectory=".\Release"
+                       ConfigurationType="4"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool Name="VCPreBuildEventTool"
+                       />
+                       <Tool Name="VCCustomBuildTool"
+                       />
+                       <Tool Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Release/libcurl.tlb" HeaderFileName=""
+                       />
+                       <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" PrecompiledHeaderFile=".\Release/libcurl.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"
+                       />
+                       <Tool Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033"
+                       />
+                       <Tool Name="VCPreLinkEventTool"
+                       />
+                       <Tool Name="VCLibrarianTool"
+                       />
+                       <Tool Name="VCALinkTool"
+                       />
+                       <Tool Name="VCXDCMakeTool"
+                       />
+                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Release/libcurl.bsc"
+                       />
+                       <Tool Name="VCFxCopTool"
+                       />
+                       <Tool Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory=".\Debug"
+                       IntermediateDirectory=".\Debug"
+                       ConfigurationType="4"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool Name="VCPreBuildEventTool"
+                       />
+                       <Tool Name="VCCustomBuildTool"
+                       />
+                       <Tool Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Debug/libcurl.tlb" HeaderFileName=""
+                       />
+                       <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" PrecompiledHeaderFile=".\Debug/libcurl.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"
+                       />
+                       <Tool Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033"
+                       />
+                       <Tool Name="VCPreLinkEventTool"
+                       />
+                       <Tool Name="VCLibrarianTool"
+                       />
+                       <Tool Name="VCALinkTool"
+                       />
+                       <Tool Name="VCXDCMakeTool"
+                       />
+                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Debug/libcurl.bsc"
+                       />
+                       <Tool Name="VCFxCopTool"
+                       />
+                       <Tool Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
diff --git a/vs/vc6/lib/vc6libcurl.dsp b/vs/vc6/lib/vc6libcurl.dsp
new file mode 100644 (file)
index 0000000..71c9fac
--- /dev/null
@@ -0,0 +1,1041 @@
+# Microsoft Developer Studio Project File - Name="libcurl" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
+# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
+\r
+CFG=libcurl - Win32 LIB Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "vc6libcurl.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "vc6libcurl.mak" CFG="libcurl - Win32 LIB Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "libcurl - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "libcurl - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "libcurl - Win32 LIB Debug" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "libcurl - Win32 LIB Release" (based on "Win32 (x86) Static Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+\r
+!IF  "$(CFG)" == "libcurl - Win32 DLL Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "dll-debug"\r
+# PROP BASE Intermediate_Dir "dll-debug/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "dll-debug"\r
+# PROP Intermediate_Dir "dll-debug/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /FD /GZ /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "_DEBUG" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /win32\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"dll-debug/libcurld.dll" /implib:"dll-debug/libcurld_imp.lib" /pdbtype:con /fixed:no\r
+# ADD LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /incremental:no /debug /machine:I386 /out:"dll-debug/libcurld.dll" /implib:"dll-debug/libcurld_imp.lib" /pdbtype:con /fixed:no\r
+\r
+!ELSEIF  "$(CFG)" == "libcurl - Win32 DLL Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "dll-release"\r
+# PROP BASE Intermediate_Dir "dll-release/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "dll-release"\r
+# PROP Intermediate_Dir "dll-release/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /c\r
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /FD /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "NDEBUG" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /win32\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /pdb:none /machine:I386 /out:"dll-release/libcurl.dll" /implib:"dll-release/libcurl_imp.lib" /fixed:no /release /incremental:no\r
+# ADD LINK32 wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /dll /pdb:none /machine:I386 /out:"dll-release/libcurl.dll" /implib:"dll-release/libcurl_imp.lib" /fixed:no /release /incremental:no\r
+\r
+!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "lib-debug"\r
+# PROP BASE Intermediate_Dir "lib-debug/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "lib-debug"\r
+# PROP Intermediate_Dir "lib-debug/obj"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /GZ /c\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo /out:"lib-debug/libcurld.lib" /machine:I386\r
+# ADD LIB32 /nologo /out:"lib-debug/libcurld.lib" /machine:I386\r
+\r
+!ELSEIF  "$(CFG)" == "libcurl - Win32 LIB Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "lib-release"\r
+# PROP BASE Intermediate_Dir "lib-release/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "lib-release"\r
+# PROP Intermediate_Dir "lib-release/obj"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "BUILDING_LIBCURL" /D "CURL_STATICLIB" /FD /c\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo /out:"lib-release/libcurl.lib" /machine:I386\r
+# ADD LIB32 /nologo /out:"lib-release/libcurl.lib" /machine:I386\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "libcurl - Win32 DLL Debug"\r
+# Name "libcurl - Win32 DLL Release"\r
+# Name "libcurl - Win32 LIB Debug"\r
+# Name "libcurl - Win32 LIB Release"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\amigaos.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\asyn-ares.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\asyn-thread.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\axtls.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\base64.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\bundles.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\conncache.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\connect.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\content_encoding.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\cookie.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_addrinfo.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_darwinssl.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_fnmatch.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_gethostname.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_gssapi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_memrchr.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_multibyte.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_core.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_msgs.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_wb.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_rtmp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_sasl.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_schannel.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_sspi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_threads.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\cyassl.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\dict.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\dotdot.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\easy.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\escape.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\file.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\fileinfo.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\formdata.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ftp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ftplistparser.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\getenv.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\getinfo.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gopher.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gskit.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gtls.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hash.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hmac.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostasyn.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostcheck.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostip4.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostip6.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostip.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostsyn.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_chunks.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_digest.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_negotiate.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_negotiate_sspi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_proxy.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\idn_win32.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\if2ip.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\imap.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\inet_ntop.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\inet_pton.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\krb4.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\krb5.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ldap.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\llist.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\md4.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\md5.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\memdebug.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\mprintf.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\multi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\netrc.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\non-ascii.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nonblock.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nss.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\openldap.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\parsedate.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pingpong.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pipeline.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\polarssl.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\polarssl_threadlock.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pop3.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\progress.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\qssl.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rawstr.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rtsp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\security.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\select.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\sendf.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\share.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\slist.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\smtp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\socks.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\socks_gssapi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\socks_sspi.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\speedcheck.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\splay.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ssh.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\sslgen.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ssluse.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strdup.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strequal.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strerror.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtok.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtoofft.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\telnet.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\tftp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\timeval.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\transfer.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\url.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\version.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\warnless.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\wildcard.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\x509asn1.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\amigaos.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\arpa_telnet.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\asyn.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\axtls.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\bundles.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\config-win32.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\conncache.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\connect.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\content_encoding.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\cookie.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_addrinfo.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_base64.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_darwinssl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_fnmatch.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_gethostname.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_gssapi.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_hmac.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ldap.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_md4.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_md5.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_memory.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_memrchr.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_multibyte.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_core.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_msgs.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_ntlm_wb.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_rtmp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_sasl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_schannel.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_setup.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_setup_once.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_sspi.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curl_threads.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\curlx.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\cyassl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\dict.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\dotdot.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\easyif.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\escape.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\file.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\fileinfo.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\formdata.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ftp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ftplistparser.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\getinfo.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gopher.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gskit.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\gtls.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hash.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostcheck.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\hostip.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_chunks.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_digest.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_negotiate.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\http_proxy.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\if2ip.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\imap.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\inet_ntop.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\inet_pton.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\krb4.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\llist.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\memdebug.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\multihandle.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\multiif.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\netrc.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\non-ascii.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nonblock.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nssg.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\parsedate.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pingpong.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pipeline.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\polarssl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\polarssl_threadlock.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\pop3.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\progress.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\qssl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rawstr.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rtsp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\select.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\sendf.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\setup-vms.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\share.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\slist.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\smtp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\sockaddr.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\socks.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\speedcheck.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\splay.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ssh.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\sslgen.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\ssluse.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strdup.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strequal.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strerror.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtok.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtoofft.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\telnet.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\tftp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\timeval.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\transfer.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\urldata.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\url.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\warnless.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\wildcard.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\x509asn1.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\libcurl.rc\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
similarity index 100%
rename from lib/vc6libcurl.dsw
rename to vs/vc6/lib/vc6libcurl.dsw
diff --git a/vs/vc6/src/vc6curltool.dsp b/vs/vc6/src/vc6curltool.dsp
new file mode 100644 (file)
index 0000000..131b716
--- /dev/null
@@ -0,0 +1,498 @@
+# Microsoft Developer Studio Project File - Name="curltool" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=curltool - Win32 using libcurl LIB Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "vc6curltool.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "vc6curltool.mak" CFG="curltool - Win32 using libcurl LIB Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "curltool - Win32 using libcurl DLL Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "curltool - Win32 using libcurl DLL Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "curltool - Win32 using libcurl LIB Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "curltool - Win32 using libcurl LIB Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF  "$(CFG)" == "curltool - Win32 using libcurl DLL Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "dll-debug"\r
+# PROP BASE Intermediate_Dir "dll-debug/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "dll-debug"\r
+# PROP Intermediate_Dir "dll-debug/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /FD /GZ /c\r
+# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG"\r
+# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 libcurld_imp.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"dll-debug/curl.exe" /pdbtype:con /libpath:"..\lib\dll-debug" /fixed:no\r
+# ADD LINK32 libcurld_imp.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"dll-debug/curl.exe" /pdbtype:con /libpath:"..\lib\dll-debug" /fixed:no\r
+\r
+!ELSEIF  "$(CFG)" == "curltool - Win32 using libcurl DLL Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "dll-release"\r
+# PROP BASE Intermediate_Dir "dll-release/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "dll-release"\r
+# PROP Intermediate_Dir "dll-release/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /FD /c\r
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /FD /c\r
+# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG"\r
+# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 libcurl_imp.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"dll-release/curl.exe" /libpath:"..\lib\dll-release" /fixed:no\r
+# ADD LINK32 libcurl_imp.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"dll-release/curl.exe" /libpath:"..\lib\dll-release" /fixed:no\r
+\r
+!ELSEIF  "$(CFG)" == "curltool - Win32 using libcurl LIB Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "lib-debug"\r
+# PROP BASE Intermediate_Dir "lib-debug/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "lib-debug"\r
+# PROP Intermediate_Dir "lib-debug/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "CURL_STATICLIB" /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "CURL_STATICLIB" /FD /GZ /c\r
+# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG"\r
+# ADD RSC /l 0x409 /i "..\..\..\include" /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 libcurld.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"lib-debug/curl.exe" /pdbtype:con /libpath:"..\lib\lib-debug" /fixed:no\r
+# ADD LINK32 libcurld.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"lib-debug/curl.exe" /pdbtype:con /libpath:"..\lib\lib-debug" /fixed:no\r
+\r
+!ELSEIF  "$(CFG)" == "curltool - Win32 using libcurl LIB Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "lib-release"\r
+# PROP BASE Intermediate_Dir "lib-release/obj"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "lib-release"\r
+# PROP Intermediate_Dir "lib-release/obj"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "CURL_STATICLIB" /FD /c\r
+# ADD CPP /nologo /MD /W3 /EHsc /O2 /I "..\..\..\lib" /I "..\..\..\include" /I "..\..\..\src" /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "CURL_STATICLIB" /FD /c\r
+# ADD BASE RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG"\r
+# ADD RSC /l 0x409 /i "..\..\..\include" /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 libcurl.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"lib-release/curl.exe" /libpath:"..\lib\lib-release" /fixed:no\r
+# ADD LINK32 libcurl.lib wldap32.lib ws2_32.lib advapi32.lib kernel32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"lib-release/curl.exe" /libpath:"..\lib\lib-release" /fixed:no\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "curltool - Win32 using libcurl DLL Debug"\r
+# Name "curltool - Win32 using libcurl DLL Release"\r
+# Name "curltool - Win32 using libcurl LIB Debug"\r
+# Name "curltool - Win32 using libcurl LIB Release"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nonblock.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rawstr.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtoofft.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_binmode.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_bname.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_dbg.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_hdr.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_prg.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_rea.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_see.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_wrt.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cfgable.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_convert.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_dirhie.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_doswin.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_easysrc.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_formparse.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_getparam.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_getpass.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_help.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_helpers.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_homedir.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_hugehelp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_libinfo.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_main.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_metalink.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_mfiles.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_msgs.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_operate.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_operhlp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_panykey.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_paramhlp.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_parsecfg.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_setopt.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_sleep.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_urlglob.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_util.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_vms.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_writeenv.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_writeout.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_xattr.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE="..\..\..\lib\config-win32.h"\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\nonblock.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\rawstr.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\lib\strtoofft.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_binmode.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_bname.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_dbg.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_hdr.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_prg.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_rea.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_see.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cb_wrt.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_cfgable.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_convert.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_dirhie.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_doswin.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_easysrc.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_formparse.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_getparam.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_getpass.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_help.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_helpers.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_homedir.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_hugehelp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_libinfo.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_main.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_metalink.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_mfiles.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_msgs.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_operate.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_operhlp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_panykey.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_paramhlp.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_parsecfg.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_sdecls.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_setopt.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_setup.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_sleep.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_urlglob.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_util.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_version.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_vms.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_writeenv.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_writeout.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\tool_xattr.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\src\curl.rc\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
similarity index 83%
rename from src/vc6curlsrc.dsw
rename to vs/vc6/src/vc6curltool.dsw
index 6b2db6f..b92638a 100644 (file)
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 \r
 ###############################################################################\r
 \r
-Project: "curlsrc"=".\vc6curlsrc.dsp" - Package Owner=<4>\r
+Project: "curltool"=".\vc6curltool.dsp" - Package Owner=<4>\r
 \r
 Package=<5>\r
 {{{\r
similarity index 87%
rename from vc6curl.dsw
rename to vs/vc6/vc6curl.dsw
index 499bc10..859edd5 100644 (file)
@@ -15,7 +15,7 @@ Package=<4>
 \r
 ###############################################################################\r
 \r
-Project: "curlsrc"=".\src\vc6curlsrc.dsp" - Package Owner=<4>\r
+Project: "curltool"=".\src\vc6curltool.dsp" - Package Owner=<4>\r
 \r
 Package=<5>\r
 {{{\r
diff --git a/vs/vc8/lib/vc8libcurl.vcproj b/vs/vc8/lib/vc8libcurl.vcproj
new file mode 100644 (file)
index 0000000..1c9600e
--- /dev/null
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="libcurl"\r
+       ProjectGUID="{87EE9DA4-DE1E-4448-8324-183C98DCA588}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory=".\Release"\r
+                       IntermediateDirectory=".\Release"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Release/libcurl.tlb" HeaderFileName=""\r
+                       />\r
+                       <Tool Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" PrecompiledHeaderFile=".\Release/libcurl.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"\r
+                       />\r
+                       <Tool Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033"\r
+                       />\r
+                       <Tool Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool Name="VCLibrarianTool"\r
+                       />\r
+                       <Tool Name="VCALinkTool"\r
+                       />\r
+                       <Tool Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Release/libcurl.bsc"\r
+                       />\r
+                       <Tool Name="VCFxCopTool"\r
+                       />\r
+                       <Tool Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory=".\Debug"\r
+                       IntermediateDirectory=".\Debug"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" TargetEnvironment="1" TypeLibraryName=".\Debug/libcurl.tlb" HeaderFileName=""\r
+                       />\r
+                       <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".,..\include" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BUILDING_LIBCURL" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" PrecompiledHeaderFile=".\Debug/libcurl.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" BrowseInformation="1" WarningLevel="0" SuppressStartupBanner="true" DebugInformationFormat="3"\r
+                       />\r
+                       <Tool Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033"\r
+                       />\r
+                       <Tool Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool Name="VCLibrarianTool"\r
+                       />\r
+                       <Tool Name="VCALinkTool"\r
+                       />\r
+                       <Tool Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool Name="VCBscMakeTool" SuppressStartupBanner="true" OutputFile=".\Debug/libcurl.bsc"\r
+                       />\r
+                       <Tool Name="VCFxCopTool"\r
+                       />\r
+                       <Tool Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter Name="Source Files">\r
+                       <File RelativePath="..\..\..\lib\amigaos.c"></File>\r
+                       <File RelativePath="..\..\..\lib\asyn-ares.c"></File>\r
+                       <File RelativePath="..\..\..\lib\asyn-thread.c"></File>\r
+                       <File RelativePath="..\..\..\lib\axtls.c"></File>\r
+                       <File RelativePath="..\..\..\lib\base64.c"></File>\r
+                       <File RelativePath="..\..\..\lib\bundles.c"></File>\r
+                       <File RelativePath="..\..\..\lib\conncache.c"></File>\r
+                       <File RelativePath="..\..\..\lib\connect.c"></File>\r
+                       <File RelativePath="..\..\..\lib\content_encoding.c"></File>\r
+                       <File RelativePath="..\..\..\lib\cookie.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_addrinfo.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_darwinssl.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_fnmatch.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_gethostname.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_gssapi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_memrchr.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_multibyte.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_core.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_msgs.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_wb.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_rtmp.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_sasl.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_schannel.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_sspi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_threads.c"></File>\r
+                       <File RelativePath="..\..\..\lib\cyassl.c"></File>\r
+                       <File RelativePath="..\..\..\lib\dict.c"></File>\r
+                       <File RelativePath="..\..\..\lib\dotdot.c"></File>\r
+                       <File RelativePath="..\..\..\lib\easy.c"></File>\r
+                       <File RelativePath="..\..\..\lib\escape.c"></File>\r
+                       <File RelativePath="..\..\..\lib\file.c"></File>\r
+                       <File RelativePath="..\..\..\lib\fileinfo.c"></File>\r
+                       <File RelativePath="..\..\..\lib\formdata.c"></File>\r
+                       <File RelativePath="..\..\..\lib\ftp.c"></File>\r
+                       <File RelativePath="..\..\..\lib\ftplistparser.c"></File>\r
+                       <File RelativePath="..\..\..\lib\getenv.c"></File>\r
+                       <File RelativePath="..\..\..\lib\getinfo.c"></File>\r
+                       <File RelativePath="..\..\..\lib\gopher.c"></File>\r
+                       <File RelativePath="..\..\..\lib\gskit.c"></File>\r
+                       <File RelativePath="..\..\..\lib\gtls.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hash.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hmac.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostasyn.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostcheck.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostip4.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostip6.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostip.c"></File>\r
+                       <File RelativePath="..\..\..\lib\hostsyn.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http_chunks.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http_digest.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http_negotiate.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http_negotiate_sspi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\http_proxy.c"></File>\r
+                       <File RelativePath="..\..\..\lib\idn_win32.c"></File>\r
+                       <File RelativePath="..\..\..\lib\if2ip.c"></File>\r
+                       <File RelativePath="..\..\..\lib\imap.c"></File>\r
+                       <File RelativePath="..\..\..\lib\inet_ntop.c"></File>\r
+                       <File RelativePath="..\..\..\lib\inet_pton.c"></File>\r
+                       <File RelativePath="..\..\..\lib\krb4.c"></File>\r
+                       <File RelativePath="..\..\..\lib\krb5.c"></File>\r
+                       <File RelativePath="..\..\..\lib\ldap.c"></File>\r
+                       <File RelativePath="..\..\..\lib\llist.c"></File>\r
+                       <File RelativePath="..\..\..\lib\md4.c"></File>\r
+                       <File RelativePath="..\..\..\lib\md5.c"></File>\r
+                       <File RelativePath="..\..\..\lib\memdebug.c"></File>\r
+                       <File RelativePath="..\..\..\lib\mprintf.c"></File>\r
+                       <File RelativePath="..\..\..\lib\multi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\netrc.c"></File>\r
+                       <File RelativePath="..\..\..\lib\non-ascii.c"></File>\r
+                       <File RelativePath="..\..\..\lib\nonblock.c"></File>\r
+                       <File RelativePath="..\..\..\lib\nss.c"></File>\r
+                       <File RelativePath="..\..\..\lib\openldap.c"></File>\r
+                       <File RelativePath="..\..\..\lib\parsedate.c"></File>\r
+                       <File RelativePath="..\..\..\lib\pingpong.c"></File>\r
+                       <File RelativePath="..\..\..\lib\pipeline.c"></File>\r
+                       <File RelativePath="..\..\..\lib\polarssl.c"></File>\r
+                       <File RelativePath="..\..\..\lib\polarssl_threadlock.c"></File>\r
+                       <File RelativePath="..\..\..\lib\pop3.c"></File>\r
+                       <File RelativePath="..\..\..\lib\progress.c"></File>\r
+                       <File RelativePath="..\..\..\lib\qssl.c"></File>\r
+                       <File RelativePath="..\..\..\lib\rawstr.c"></File>\r
+                       <File RelativePath="..\..\..\lib\rtsp.c"></File>\r
+                       <File RelativePath="..\..\..\lib\security.c"></File>\r
+                       <File RelativePath="..\..\..\lib\select.c"></File>\r
+                       <File RelativePath="..\..\..\lib\sendf.c"></File>\r
+                       <File RelativePath="..\..\..\lib\share.c"></File>\r
+                       <File RelativePath="..\..\..\lib\slist.c"></File>\r
+                       <File RelativePath="..\..\..\lib\smtp.c"></File>\r
+                       <File RelativePath="..\..\..\lib\socks.c"></File>\r
+                       <File RelativePath="..\..\..\lib\socks_gssapi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\socks_sspi.c"></File>\r
+                       <File RelativePath="..\..\..\lib\speedcheck.c"></File>\r
+                       <File RelativePath="..\..\..\lib\splay.c"></File>\r
+                       <File RelativePath="..\..\..\lib\ssh.c"></File>\r
+                       <File RelativePath="..\..\..\lib\sslgen.c"></File>\r
+                       <File RelativePath="..\..\..\lib\ssluse.c"></File>\r
+                       <File RelativePath="..\..\..\lib\strdup.c"></File>\r
+                       <File RelativePath="..\..\..\lib\strequal.c"></File>\r
+                       <File RelativePath="..\..\..\lib\strerror.c"></File>\r
+                       <File RelativePath="..\..\..\lib\strtok.c"></File>\r
+                       <File RelativePath="..\..\..\lib\strtoofft.c"></File>\r
+                       <File RelativePath="..\..\..\lib\telnet.c"></File>\r
+                       <File RelativePath="..\..\..\lib\tftp.c"></File>\r
+                       <File RelativePath="..\..\..\lib\timeval.c"></File>\r
+                       <File RelativePath="..\..\..\lib\transfer.c"></File>\r
+                       <File RelativePath="..\..\..\lib\url.c"></File>\r
+                       <File RelativePath="..\..\..\lib\version.c"></File>\r
+                       <File RelativePath="..\..\..\lib\warnless.c"></File>\r
+                       <File RelativePath="..\..\..\lib\wildcard.c"></File>\r
+                       <File RelativePath="..\..\..\lib\x509asn1.c"></File>\r
+               </Filter>\r
+               <Filter Name="Header Files">\r
+                       <File RelativePath="..\..\..\lib\amigaos.h"></File>\r
+                       <File RelativePath="..\..\..\lib\arpa_telnet.h"></File>\r
+                       <File RelativePath="..\..\..\lib\asyn.h"></File>\r
+                       <File RelativePath="..\..\..\lib\axtls.h"></File>\r
+                       <File RelativePath="..\..\..\lib\bundles.h"></File>\r
+                       <File RelativePath="..\..\..\lib\config-win32.h"></File>\r
+                       <File RelativePath="..\..\..\lib\conncache.h"></File>\r
+                       <File RelativePath="..\..\..\lib\connect.h"></File>\r
+                       <File RelativePath="..\..\..\lib\content_encoding.h"></File>\r
+                       <File RelativePath="..\..\..\lib\cookie.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_addrinfo.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_base64.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_darwinssl.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_fnmatch.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_gethostname.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_gssapi.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_hmac.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ldap.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_md4.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_md5.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_memory.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_memrchr.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_multibyte.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_core.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_msgs.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_ntlm_wb.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_rtmp.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_sasl.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_schannel.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_setup.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_setup_once.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_sspi.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curl_threads.h"></File>\r
+                       <File RelativePath="..\..\..\lib\curlx.h"></File>\r
+                       <File RelativePath="..\..\..\lib\cyassl.h"></File>\r
+                       <File RelativePath="..\..\..\lib\dict.h"></File>\r
+                       <File RelativePath="..\..\..\lib\dotdot.h"></File>\r
+                       <File RelativePath="..\..\..\lib\easyif.h"></File>\r
+                       <File RelativePath="..\..\..\lib\escape.h"></File>\r
+                       <File RelativePath="..\..\..\lib\file.h"></File>\r
+                       <File RelativePath="..\..\..\lib\fileinfo.h"></File>\r
+                       <File RelativePath="..\..\..\lib\formdata.h"></File>\r
+                       <File RelativePath="..\..\..\lib\ftp.h"></File>\r
+                       <File RelativePath="..\..\..\lib\ftplistparser.h"></File>\r
+                       <File RelativePath="..\..\..\lib\getinfo.h"></File>\r
+                       <File RelativePath="..\..\..\lib\gopher.h"></File>\r
+                       <File RelativePath="..\..\..\lib\gskit.h"></File>\r
+                       <File RelativePath="..\..\..\lib\gtls.h"></File>\r
+                       <File RelativePath="..\..\..\lib\hash.h"></File>\r
+                       <File RelativePath="..\..\..\lib\hostcheck.h"></File>\r
+                       <File RelativePath="..\..\..\lib\hostip.h"></File>\r
+                       <File RelativePath="..\..\..\lib\http_chunks.h"></File>\r
+                       <File RelativePath="..\..\..\lib\http_digest.h"></File>\r
+                       <File RelativePath="..\..\..\lib\http.h"></File>\r
+                       <File RelativePath="..\..\..\lib\http_negotiate.h"></File>\r
+                       <File RelativePath="..\..\..\lib\http_proxy.h"></File>\r
+                       <File RelativePath="..\..\..\lib\if2ip.h"></File>\r
+                       <File RelativePath="..\..\..\lib\imap.h"></File>\r
+                       <File RelativePath="..\..\..\lib\inet_ntop.h"></File>\r
+                       <File RelativePath="..\..\..\lib\inet_pton.h"></File>\r
+                       <File RelativePath="..\..\..\lib\krb4.h"></File>\r
+                       <File RelativePath="..\..\..\lib\llist.h"></File>\r
+                       <File RelativePath="..\..\..\lib\memdebug.h"></File>\r
+                       <File RelativePath="..\..\..\lib\multihandle.h"></File>\r
+                       <File RelativePath="..\..\..\lib\multiif.h"></File>\r
+                       <File RelativePath="..\..\..\lib\netrc.h"></File>\r
+                       <File RelativePath="..\..\..\lib\non-ascii.h"></File>\r
+                       <File RelativePath="..\..\..\lib\nonblock.h"></File>\r
+                       <File RelativePath="..\..\..\lib\nssg.h"></File>\r
+                       <File RelativePath="..\..\..\lib\parsedate.h"></File>\r
+                       <File RelativePath="..\..\..\lib\pingpong.h"></File>\r
+                       <File RelativePath="..\..\..\lib\pipeline.h"></File>\r
+                       <File RelativePath="..\..\..\lib\polarssl.h"></File>\r
+                       <File RelativePath="..\..\..\lib\polarssl_threadlock.h"></File>\r
+                       <File RelativePath="..\..\..\lib\pop3.h"></File>\r
+                       <File RelativePath="..\..\..\lib\progress.h"></File>\r
+                       <File RelativePath="..\..\..\lib\qssl.h"></File>\r
+                       <File RelativePath="..\..\..\lib\rawstr.h"></File>\r
+                       <File RelativePath="..\..\..\lib\rtsp.h"></File>\r
+                       <File RelativePath="..\..\..\lib\select.h"></File>\r
+                       <File RelativePath="..\..\..\lib\sendf.h"></File>\r
+                       <File RelativePath="..\..\..\lib\setup-vms.h"></File>\r
+                       <File RelativePath="..\..\..\lib\share.h"></File>\r
+                       <File RelativePath="..\..\..\lib\slist.h"></File>\r
+                       <File RelativePath="..\..\..\lib\smtp.h"></File>\r
+                       <File RelativePath="..\..\..\lib\sockaddr.h"></File>\r
+                       <File RelativePath="..\..\..\lib\socks.h"></File>\r
+                       <File RelativePath="..\..\..\lib\speedcheck.h"></File>\r
+                       <File RelativePath="..\..\..\lib\splay.h"></File>\r
+                       <File RelativePath="..\..\..\lib\ssh.h"></File>\r
+                       <File RelativePath="..\..\..\lib\sslgen.h"></File>\r
+                       <File RelativePath="..\..\..\lib\ssluse.h"></File>\r
+                       <File RelativePath="..\..\..\lib\strdup.h"></File>\r
+                       <File RelativePath="..\..\..\lib\strequal.h"></File>\r
+                       <File RelativePath="..\..\..\lib\strerror.h"></File>\r
+                       <File RelativePath="..\..\..\lib\strtok.h"></File>\r
+                       <File RelativePath="..\..\..\lib\strtoofft.h"></File>\r
+                       <File RelativePath="..\..\..\lib\telnet.h"></File>\r
+                       <File RelativePath="..\..\..\lib\tftp.h"></File>\r
+                       <File RelativePath="..\..\..\lib\timeval.h"></File>\r
+                       <File RelativePath="..\..\..\lib\transfer.h"></File>\r
+                       <File RelativePath="..\..\..\lib\urldata.h"></File>\r
+                       <File RelativePath="..\..\..\lib\url.h"></File>\r
+                       <File RelativePath="..\..\..\lib\warnless.h"></File>\r
+                       <File RelativePath="..\..\..\lib\wildcard.h"></File>\r
+                       <File RelativePath="..\..\..\lib\x509asn1.h"></File>\r
+               </Filter>\r
+               <Filter Name="Resource Files">\r
+                       <File RelativePath="..\..\..\lib\libcurl.rc"></File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt
new file mode 100644 (file)
index 0000000..5eac382
--- /dev/null
@@ -0,0 +1,71 @@
+Building with Visual C++, prerequises\r
+=====================================\r
+   This document describes how to compile, build and install curl and libcurl\r
+   from sources using the Visual C++ build tool. To build with VC++, you will\r
+   of course have to first install VC++. The minimum required version of\r
+   VC is 6 (part of Visual Studio 6). However using a more recent version like\r
+   2008 (vc9) is strongly recommended.\r
+\r
+   VC++ is also part of the Windows Platform SDK. You do not have to install\r
+   the full Visual Studio or Visual C++ if all you want is to build curl.\r
+\r
+   The Platform SDK can be fetched here, freely:\r
+\r
+    http://msdn.microsoft.com/en-us/windows/bb980924\r
+\r
+   If you wish to support zlib, openssl, ssh2, you will have to download\r
+   them separately and copy them to the deps directory as shown below:\r
+   \r
+   somedirectory\\r
+    |_curl-src\r
+    | |_winbuild\r
+    |\r
+    |_deps\r
+      |_ lib\r
+      |_ include\r
+      |_ bin\r
+\r
+   It is also possible to create the deps directory in some other random\r
+   places and tell the Makefile its location using the WITH_DEVEL option.\r
+\r
+Building with Visual C++\r
+========================\r
+\r
+Open a Visual Studio Command prompt or the SDK CMD shell.\r
+\r
+    Using the CMD Shell:\r
+     choose the right environment via the setenv command (see setenv /?)\r
+     for the full list of options. setenv /xp /x86 /release for example.\r
+\r
+    Using the Visual Studio command prompt Shell:\r
+     Everything is already pre-configured by calling one of the command\r
+     prompt.\r
+\r
+Once you are in the console, go to the winbuild directory in the Curl \r
+sources:\r
+    cd curl-src\winbuild\r
+\r
+Then you can call nmake /f Makefile.vc with the desired options (see below).\r
+The builds will be in the top src directory, builds\ directory, in \r
+a directory named using the options given to the nmake call.\r
+\r
+nmake /f Makefile.vc mode=<static or dll> <options>\r
+\r
+where <options> is one or many of:\r
+  VC=<6,7,8,9,10>              - VC versions\r
+  WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)\r
+                                 Defaults to sibbling directory deps: ../deps\r
+                                 Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/\r
+                                 Uncompress them into the deps folder.\r
+  WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static\r
+  WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static\r
+  WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static\r
+  ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes\r
+  ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes\r
+  ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes\r
+                                 Requires Windows Vista or later, or installation from:\r
+                                 http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815\r
+  ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes\r
+  GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)\r
+  DEBUG=<yes or no>            - Debug builds\r
+  MACHINE=<x86 or x64>         - Target architecture (default is x86)
\ No newline at end of file
diff --git a/winbuild/Makefile.msvc.names b/winbuild/Makefile.msvc.names
new file mode 100644 (file)
index 0000000..56c81ad
--- /dev/null
@@ -0,0 +1,81 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+#\r
+# This file is included from MSVC makefiles located in lib and src,\r
+# providing libcurl common file names required by these makefiles.\r
+#\r
+\r
+# ------------------\r
+# libcurl base name\r
+# ------------------\r
+\r
+!IF !DEFINED(LIB_NAME) || "$(LIB_NAME)" == ""\r
+LIB_NAME = libcurl\r
+!ENDIF\r
+\r
+# -------------------------------------------------\r
+# libcurl static and dynamic libraries common base\r
+# file names for release and debug configurations\r
+# -------------------------------------------------\r
+\r
+!IF !DEFINED(LIB_NAME_STA_REL) || "$(LIB_NAME_STA_REL)" == ""\r
+LIB_NAME_STA_REL = $(LIB_NAME)\r
+!ENDIF\r
+\r
+!IF !DEFINED(LIB_NAME_STA_DBG) || "$(LIB_NAME_STA_DBG)" == ""\r
+LIB_NAME_STA_DBG = $(LIB_NAME_STA_REL)d\r
+!ENDIF\r
+\r
+!IF !DEFINED(LIB_NAME_DYN_REL) || "$(LIB_NAME_DYN_REL)" == ""\r
+LIB_NAME_DYN_REL = $(LIB_NAME)\r
+!ENDIF\r
+\r
+!IF !DEFINED(LIB_NAME_DYN_DBG) || "$(LIB_NAME_DYN_DBG)" == ""\r
+LIB_NAME_DYN_DBG = $(LIB_NAME_DYN_REL)d\r
+!ENDIF\r
+\r
+# --------------------------------------------\r
+# Base names for libcurl DLL import libraries\r
+# --------------------------------------------\r
+\r
+!IF !DEFINED(LIB_NAME_IMP_REL) || "$(LIB_NAME_IMP_REL)" == ""\r
+LIB_NAME_IMP_REL = $(LIB_NAME_DYN_REL)_imp\r
+!ENDIF\r
+\r
+!IF !DEFINED(LIB_NAME_IMP_DBG) || "$(LIB_NAME_IMP_DBG)" == ""\r
+LIB_NAME_IMP_DBG = $(LIB_NAME_DYN_DBG)_imp\r
+!ENDIF\r
+\r
+# --------------------------------------\r
+# File names with extension and no path\r
+# --------------------------------------\r
+\r
+LIBCURL_STA_LIB_REL = $(LIB_NAME_STA_REL).lib\r
+LIBCURL_STA_LIB_DBG = $(LIB_NAME_STA_DBG).lib\r
+LIBCURL_DYN_LIB_REL = $(LIB_NAME_DYN_REL).dll\r
+LIBCURL_DYN_LIB_DBG = $(LIB_NAME_DYN_DBG).dll\r
+LIBCURL_IMP_LIB_REL = $(LIB_NAME_IMP_REL).lib\r
+LIBCURL_IMP_LIB_DBG = $(LIB_NAME_IMP_DBG).lib\r
+LIBCURL_DYN_LIB_PDB = $(LIB_NAME_IMP_DBG).pdb\r
+\r
+# End of Makefile.msvc.names\r
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
new file mode 100644 (file)
index 0000000..bc42832
--- /dev/null
@@ -0,0 +1,202 @@
+!IF "$(MODE)"=="static"\r
+TARGET = $(LIB_NAME_STATIC)\r
+AS_DLL = false\r
+CFGSET=true\r
+!ELSEIF "$(MODE)"=="dll"\r
+TARGET = $(LIB_NAME_DLL)\r
+AS_DLL = true\r
+CFGSET=true\r
+!ELSE\r
+!MESSAGE Invalid mode: $(MODE)\r
+\r
+#######################\r
+# Usage\r
+#\r
+\r
+!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>\r
+!MESSAGE where <options> is one or many of:\r
+!MESSAGE   VC=<6,7,8,9,10>              - VC versions\r
+!MESSAGE   WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)\r
+!MESSAGE                                  Defaults to sibbling directory deps: ../deps\r
+!MESSAGE                                  Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/\r
+!MESSAGE                                  Uncompress them into the deps folder.\r
+!MESSAGE   WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static\r
+!MESSAGE   WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static\r
+!MESSAGE   WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static\r
+!MESSAGE   ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes\r
+!MESSAGE                                  Requires Windows Vista or later, or installation from:\r
+!MESSAGE                                  http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815\r
+!MESSAGE   ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes\r
+!MESSAGE   ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes\r
+!MESSAGE   ENABLE_SPNEGO=<yes or no>    - Enable Simple and Protected GSSAPI Negotiation Mechanism, defaults to yes\r
+!MESSAGE   ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes\r
+!MESSAGE   GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)\r
+!MESSAGE   DEBUG=<yes or no>            - Debug builds\r
+!MESSAGE   MACHINE=<x86 or x64>         - Target architecture (default x64 on AMD64, x86 on others)\r
+!ERROR please choose a valid mode\r
+\r
+!ENDIF\r
+\r
+!INCLUDE "../lib/Makefile.inc"\r
+LIBCURL_OBJS=$(CSOURCES:.c=.obj)\r
+\r
+!INCLUDE "../src/Makefile.inc"\r
+\r
+# tool_hugehelp has a special rule\r
+CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=)\r
+\r
+CURL_OBJS=$(CURL_OBJS:.c=.obj)\r
+\r
+\r
+# backwards compatible check for USE_SSPI\r
+!IFDEF USE_SSPI\r
+ENABLE_SSPI = $(USE_SSPI)\r
+!ENDIF\r
+\r
+# default options\r
+!IFNDEF MACHINE\r
+!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"\r
+MACHINE = x64\r
+!ELSE\r
+MACHINE = x86\r
+!ENDIF\r
+!ENDIF\r
+\r
+!IFNDEF ENABLE_IDN\r
+USE_IDN = true\r
+!ELSEIF "$(ENABLE_IDN)"=="yes"\r
+USE_IDN = true\r
+!ELSEIF "$(ENABLE_IDN)"=="no"\r
+USE_IDN = false\r
+!ENDIF\r
+\r
+!IFNDEF ENABLE_IPV6\r
+USE_IPV6 = true\r
+!ELSEIF "$(ENABLE_IPV6)"=="yes"\r
+USE_IPV6 = true\r
+!ELSEIF "$(ENABLE_IPV6)"=="no"\r
+USE_IPV6 = false\r
+!ENDIF\r
+\r
+!IFNDEF ENABLE_SSPI\r
+USE_SSPI = true\r
+!ELSEIF "$(ENABLE_SSPI)"=="yes"\r
+USE_SSPI = true\r
+!ELSEIF "$(ENABLE_SSPI)"=="no"\r
+USE_SSPI = false\r
+!ENDIF\r
+\r
+!IFNDEF ENABLE_SPNEGO\r
+USE_SPNEGO = true\r
+!ELSEIF "$(ENABLE_SPNEGO)"=="yes"\r
+USE_SPNEGO = true\r
+!ELSEIF "$(ENABLE_SPNEGO)"=="no"\r
+USE_SPNEGO = false\r
+!ENDIF\r
+\r
+!IFNDEF ENABLE_WINSSL\r
+USE_WINSSL = $(USE_SSPI)\r
+!ELSEIF "$(ENABLE_WINSSL)"=="yes"\r
+USE_WINSSL = true\r
+!ELSEIF "$(ENABLE_WINSSL)"=="no"\r
+USE_WINSSL = false\r
+!ENDIF\r
+\r
+CONFIG_NAME_LIB = libcurl\r
+\r
+!IF "$(WITH_SSL)"=="dll"\r
+USE_SSL = true\r
+SSL     = dll\r
+!ELSEIF "$(WITH_SSL)"=="static"\r
+USE_SSL = true\r
+SSL     = static\r
+!ENDIF\r
+\r
+!IF "$(WITH_ZLIB)"=="dll"\r
+USE_ZLIB = true\r
+ZLIB     = dll\r
+!ELSEIF "$(WITH_ZLIB)"=="static"\r
+USE_ZLIB = true\r
+ZLIB     = static\r
+!ENDIF\r
+\r
+!IF "$(WITH_SSH2)"=="dll"\r
+USE_SSH2 = true\r
+SSH2     = dll\r
+!ELSEIF "$(WITH_SSH2)"=="static"\r
+USE_SSH2 = true\r
+SSH2     = static\r
+!ENDIF\r
+\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)\r
+\r
+!IF "$(DEBUG)"=="yes"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug\r
+!ELSE\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release\r
+!ENDIF\r
+\r
+!IF "$(AS_DLL)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll\r
+!ELSE\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static\r
+!ENDIF\r
+\r
+!IF "$(USE_SSL)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)\r
+!ENDIF\r
+\r
+!IF "$(USE_ZLIB)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)\r
+!ENDIF\r
+\r
+!IF "$(USE_SSH2)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)\r
+!ENDIF\r
+\r
+!IF "$(USE_IPV6)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6\r
+!ENDIF\r
+\r
+!IF "$(USE_SSPI)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi\r
+!ENDIF\r
+\r
+!IF "$(USE_SPNEGO)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-spnego\r
+!ENDIF\r
+\r
+!IF "$(USE_WINSSL)"=="true"\r
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl\r
+!ENDIF\r
+\r
+!MESSAGE configuration name: $(CONFIG_NAME_LIB)\r
+\r
+BUILD_DIR=../builds/$(CONFIG_NAME_LIB)\r
+LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib\r
+CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl\r
+DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\\r
+\r
+$(MODE):\r
+       @SET DIROBJ=$(LIBCURL_DIROBJ)\r
+       @SET MACRO_NAME=LIBCURL_OBJS\r
+       @SET OUTFILE=LIBCURL_OBJS.inc\r
+       @gen_resp_file.bat $(LIBCURL_OBJS)\r
+\r
+       @SET DIROBJ=$(CURL_DIROBJ)\r
+       @SET MACRO_NAME=CURL_OBJS\r
+       @SET OUTFILE=CURL_OBJS.inc\r
+       @gen_resp_file.bat $(CURL_OBJS)\r
+\r
+       @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)\r
+       @SET MACHINE=$(MACHINE)\r
+       @SET USE_IDN=$(USE_IDN)\r
+       @SET USE_IPV6=$(USE_IPV6)\r
+       @SET USE_SSPI=$(USE_SSPI)\r
+       @SET USE_SPNEGO=$(USE_SPNEGO)\r
+       @SET USE_WINSSL=$(USE_WINSSL)\r
+       @$(MAKE) /NOLOGO /F MakefileBuild.vc\r
+\r
+copy_from_lib:\r
+       echo copying .c...\r
+       FOR %%i IN ($(CURLX_ONES:/=\)) DO copy %%i ..\src\\r
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
new file mode 100644 (file)
index 0000000..1f67010
--- /dev/null
@@ -0,0 +1,485 @@
+#***************************************************************************\r
+#                                  _   _ ____  _\r
+#  Project                     ___| | | |  _ \| |\r
+#                             / __| | | | |_) | |\r
+#                            | (__| |_| |  _ <| |___\r
+#                             \___|\___/|_| \_\_____|\r
+#\r
+# Copyright (C) 1999 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.\r
+#\r
+# This software is licensed as described in the file COPYING, which\r
+# you should have received as part of this distribution. The terms\r
+# are also available at http://curl.haxx.se/docs/copyright.html.\r
+#\r
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell\r
+# copies of the Software, and permit persons to whom the Software is\r
+# furnished to do so, under the terms of the COPYING file.\r
+#\r
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY\r
+# KIND, either express or implied.\r
+#\r
+#***************************************************************************\r
+\r
+###########################################################################\r
+#\r
+# Makefile for building libcurl with MSVC 6, 7, 8, 9 and 10\r
+#\r
+# Usage: see usage message below\r
+#        Should be invoked from winbuild directory\r
+#        Edit the paths and desired library name\r
+#        SSL path is only required if you intend compiling\r
+#        with SSL.\r
+#\r
+# This make file leaves the result either a .lib or .dll file\r
+# in the \lib directory. It should be called from the \lib\r
+# directory.\r
+#\r
+# An option would have been to allow the source directory to\r
+# be specified, but I saw no requirement.\r
+#\r
+# Another option would have been to leave the .lib and .dll\r
+# files in the "cfg" directory, but then the make file\r
+# in \src would need to be changed.\r
+#\r
+##############################################################\r
+\r
+CFGSET=FALSE\r
+WINBUILD_DIR=`cd`\r
+ZIP        = zip.exe\r
+\r
+!IF "$(VC)"=="6"\r
+CC_NODEBUG  = cl.exe /O2 /DNDEBUG\r
+CC_DEBUG    = cl.exe /Od /Gm /Zi /D_DEBUG /GZ\r
+CFLAGS     = /I. /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL\r
+!ELSE\r
+CC_NODEBUG  = cl.exe /O2 /DNDEBUG\r
+CC_DEBUG    = cl.exe /Od /D_DEBUG /RTC1 /Z7 /LDd /W3\r
+CFLAGS      = /I. /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL\r
+!ENDIF\r
+\r
+LFLAGS     = /nologo /machine:$(MACHINE)\r
+LNKDLL     = link.exe /DLL\r
+LNKLIB     = link.exe /lib\r
+\r
+CFLAGS_PDB = /Zi\r
+LFLAGS_PDB = /incremental:no /opt:ref,icf\r
+\r
+CFLAGS_LIBCURL_STATIC  = /DCURL_STATICLIB\r
+\r
+WIN_LIBS    = ws2_32.lib wldap32.lib advapi32.lib\r
+\r
+BASE_NAME              = libcurl\r
+BASE_NAME_DEBUG        = $(BASE_NAME)_debug\r
+BASE_NAME_STATIC       = $(BASE_NAME)_a\r
+BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug\r
+\r
+LIB_NAME_STATIC        = $(BASE_NAME_STATIC).lib\r
+LIB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).lib\r
+LIB_NAME_DLL           = $(BASE_NAME).dll\r
+LIB_NAME_IMP           = $(BASE_NAME).lib\r
+LIB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).dll\r
+LIB_NAME_IMP_DEBUG     = $(BASE_NAME_DEBUG).lib\r
+\r
+PDB_NAME_STATIC        = $(BASE_NAME_STATIC).pdb\r
+PDB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).pdb\r
+PDB_NAME_DLL           = $(BASE_NAME).pdb\r
+PDB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).pdb\r
+\r
+# CURL Command section\r
+PROGRAM_NAME = curl.exe\r
+CURL_CFLAGS   =  /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c\r
+CURL_LFLAGS   = /nologo /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)\r
+CURL_RESFLAGS = /i../include\r
+\r
+#############################################################\r
+## Nothing more to do below this line!\r
+LIBCURL_SRC_DIR = ..\lib\r
+CURL_SRC_DIR = ..\src\r
+\r
+!IFNDEF WITH_DEVEL\r
+WITH_DEVEL          = ../../deps\r
+!ENDIF\r
+DEVEL_INCLUDE  = $(WITH_DEVEL)/include\r
+DEVEL_LIB      = $(WITH_DEVEL)/lib\r
+DEVEL_BIN      = $(WITH_DEVEL)/bin\r
+\r
+CFLAGS         = $(CFLAGS) /I"$(DEVEL_INCLUDE)"\r
+LFLAGS         = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"\r
+\r
+\r
+!IF "$(WITH_SSL)"=="dll"\r
+SSL_LIBS     = libeay32.lib ssleay32.lib\r
+USE_SSL      = true\r
+SSL          = dll\r
+!ELSEIF "$(WITH_SSL)"=="static"\r
+SSL_LIBS     = libeay32.lib ssleay32.lib gdi32.lib user32.lib\r
+USE_SSL      = true\r
+SSL          = static\r
+!ENDIF\r
+\r
+!IFDEF USE_SSL\r
+SSL_CFLAGS   = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"\r
+!ENDIF\r
+\r
+\r
+!IF "$(WITH_ZLIB)"=="dll"\r
+ZLIB_LIBS   = zlib.lib\r
+USE_ZLIB    = true\r
+ZLIB        = dll\r
+!ELSEIF "$(WITH_ZLIB)"=="static"\r
+ZLIB_LIBS   = zlib_a.lib\r
+USE_ZLIB    = true\r
+ZLIB        = static\r
+!ENDIF\r
+\r
+!IFDEF USE_ZLIB\r
+ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ\r
+!ENDIF\r
+\r
+\r
+!IF "$(WITH_SSH2)"=="dll"\r
+SSH2_LIBS   = libssh2.lib\r
+USE_SSH2    = true\r
+SSH2        = dll\r
+!ELSEIF "$(WITH_SSH2)"=="static"\r
+SSH2_LIBS   = libssh2_a.lib user32.lib\r
+USE_SSH2    = true\r
+SSH2        = static\r
+!ENDIF\r
+\r
+!IFDEF USE_SSH2\r
+SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2\r
+SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(WITH_DEVEL)/include/libssh2\r
+!ENDIF\r
+\r
+\r
+!IFNDEF USE_IDN\r
+USE_IDN   = true\r
+!ELSEIF "$(USE_IDN)"=="yes"\r
+USE_IDN   = true\r
+!ENDIF\r
+\r
+!IF "$(USE_IDN)"=="true"\r
+IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES\r
+WIN_LIBS   = $(WIN_LIBS) Normaliz.lib\r
+!ENDIF\r
+\r
+\r
+!IFNDEF USE_IPV6\r
+USE_IPV6  = true\r
+!ELSEIF "$(USE_IPV6)"=="yes"\r
+USE_IPV6  = true\r
+!ENDIF\r
+\r
+!IF "$(USE_IPV6)"=="true"\r
+IPV6_CFLAGS = $(IPV6_CFLAGS) /DUSE_IPV6\r
+!ENDIF\r
+\r
+\r
+!IFNDEF USE_SSPI\r
+USE_SSPI  = true\r
+!ELSEIF "$(USE_SSPI)"=="yes"\r
+USE_SSPI  = true\r
+!ENDIF\r
+\r
+!IF "$(USE_SSPI)"=="true"\r
+SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_WINDOWS_SSPI\r
+!ENDIF\r
+\r
+\r
+!IFNDEF USE_SPNEGO\r
+USE_SPNEGO  = true\r
+!ELSEIF "$(USE_SPNEGO)"=="yes"\r
+USE_SPNEGO  = true\r
+!ENDIF\r
+\r
+!IF "$(USE_SPNEGO)"=="true"\r
+SPNEGO_CFLAGS = $(SPNEGO_CFLAGS) /DHAVE_SPNEGO\r
+!ENDIF\r
+\r
+\r
+!IFNDEF USE_WINSSL\r
+!IF "$(USE_SSL)"=="true"\r
+USE_WINSSL  = false\r
+!ELSE\r
+USE_WINSSL  = $(USE_SSPI)\r
+!ENDIF\r
+!ELSEIF "$(USE_WINSSL)"=="yes"\r
+USE_WINSSL  = true\r
+!ENDIF\r
+\r
+\r
+!IF "$(USE_WINSSL)"=="true"\r
+!IF "$(USE_SSPI)"!="true"\r
+!ERROR cannot build with WinSSL without SSPI\r
+!ENDIF\r
+SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL\r
+!ENDIF\r
+\r
+\r
+!IF "$(GEN_PDB)"=="yes"\r
+GEN_PDB = true\r
+!ENDIF\r
+\r
+\r
+!IFDEF EMBEND_MANIFEST\r
+MANIFESTTOOL = mt -manifest $(DIRDIST)\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\$(PROGRAM_NAME);1\r
+!ENDIF\r
+\r
+# Runtime library configuration\r
+!IF "$(RTLIBCFG)"=="static"\r
+RTLIB = /MT\r
+RTLIB_DEBUG = /MTd\r
+!ELSE\r
+RTLIB = /MD\r
+RTLIB_DEBUG  = /MDd\r
+!ENDIF\r
+\r
+!IF "$(MODE)"=="static"\r
+TARGET = $(LIB_NAME_STATIC)\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)\r
+AS_DLL = false\r
+CFGSET = true\r
+!ELSEIF "$(MODE)"=="dll"\r
+TARGET = $(LIB_NAME_DLL)\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)\r
+AS_DLL = true\r
+CFGSET = true\r
+!ENDIF\r
+\r
+!IF "$(CFGSET)" == "FALSE"\r
+!ERROR please choose a valid mode\r
+!ENDIF\r
+\r
+\r
+\r
+# CURL_XX macros are for the curl.exe command\r
+\r
+!IF "$(DEBUG)"=="yes"\r
+RC_FLAGS = /dDEBUGBUILD=1 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
+CC              = $(CC_DEBUG) $(RTLIB_DEBUG)\r
+\r
+CURL_CC         = $(CC)\r
+CURL_RC_FLAGS = /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
+!ELSE\r
+RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
+CC              = $(CC_NODEBUG) $(RTLIB)\r
+\r
+CURL_CC         = $(CC)\r
+CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
+!ENDIF\r
+\r
+CURL_CC = $(CURL_CC) $(CURL_CFLAGS)\r
+\r
+!IF "$(AS_DLL)" == "true"\r
+\r
+LNK       = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)\r
+!IF "$(DEBUG)"=="yes"\r
+TARGET    = $(LIB_NAME_DLL_DEBUG)\r
+LNK       = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)\r
+PDB       = $(PDB_NAME_DLL_DEBUG)\r
+CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)\r
+!ELSE\r
+TARGET    = $(LIB_NAME_DLL)\r
+LNK       = $(LNK)  /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)\r
+PDB       = $(PDB_NAME_DLL)\r
+CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)\r
+!ENDIF\r
+RESOURCE  = $(LIB_DIROBJ)\libcurl.res\r
+\r
+# AS_DLL\r
+!ELSE\r
+\r
+!IF "$(DEBUG)"=="yes"\r
+TARGET   = $(LIB_NAME_STATIC_DEBUG)\r
+PDB      = $(PDB_NAME_STATIC_DEBUG)\r
+!ELSE\r
+TARGET   = $(LIB_NAME_STATIC)\r
+PDB      = $(PDB_NAME_STATIC)\r
+!ENDIF\r
+LNK      = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)\r
+CC       = $(CC) $(CFLAGS_LIBCURL_STATIC)\r
+\r
+# AS_DLL\r
+!ENDIF\r
+\r
+!IF "$(USE_SSL)"=="true"\r
+CFLAGS = $(CFLAGS) $(SSL_CFLAGS)\r
+LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)\r
+!ENDIF\r
+\r
+!IF "$(USE_ZLIB)"=="true"\r
+CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)\r
+LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)\r
+!ENDIF\r
+\r
+!IF "$(USE_SSH2)"=="true"\r
+CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)\r
+LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)\r
+!ENDIF\r
+\r
+!IF "$(USE_IDN)"=="true"\r
+CFLAGS = $(CFLAGS) $(IDN_CFLAGS)\r
+!ENDIF\r
+\r
+!IF "$(USE_IPV6)"=="true"\r
+CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)\r
+!ENDIF\r
+\r
+!IF "$(USE_SSPI)"=="true"\r
+CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)\r
+!ENDIF\r
+\r
+!IF "$(USE_SPNEGO)"=="true"\r
+CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS)\r
+!ENDIF\r
+\r
+!IF "$(GEN_PDB)"=="true"\r
+CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"\r
+LFLAGS = $(LFLAGS) $(LFLAGS_PDB)\r
+!ENDIF\r
+\r
+LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib\r
+CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl\r
+DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\\r
+\r
+#\r
+# curl.exe\r
+#\r
+CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"\r
+\r
+#!IF "$(CFG)" == "release-ssh2-ssl-dll-zlib"\r
+#TARGET   = $(LIB_NAME_STATIC)\r
+#LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBS)  $(SSH2LIBS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) $(LFLAGSSSH) /out:$(LIB_DIROBJ)\$(TARGET)\r
+#CC       = $(CCNODBG) $(RTLIB) $(SSL_CFLAGS) $(ZLIB_CFLAGS) $(CFLAGSLIB)  $(SSH2_CFLAGS)\r
+#CFGSET   = TRUE\r
+#!ENDIF\r
+\r
+#######################\r
+# Only the clean target can be used if a config was not provided.\r
+#\r
+!IF "$(CFGSET)" == "FALSE"\r
+clean:\r
+       @-erase /s *.dll 2> NUL\r
+       @-erase /s *.exp 2> NUL\r
+       @-erase /s *.idb 2> NUL\r
+       @-erase /s *.lib 2> NUL\r
+       @-erase /s *.obj 2> NUL\r
+       @-erase /s *.pch 2> NUL\r
+       @-erase /s *.pdb 2> NUL\r
+       @-erase /s *.res 2> NUL\r
+!ELSE\r
+# A mode was provided, so the library can be built.\r
+#\r
+!include CURL_OBJS.inc\r
+!include LIBCURL_OBJS.inc\r
+\r
+!IF "$(AS_DLL)" == "true"\r
+LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)\r
+!ELSE\r
+LIB_OBJS = $(LIBCURL_OBJS)\r
+!ENDIF\r
+\r
+EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res\r
+\r
+all : $(TARGET) $(PROGRAM_NAME)\r
+\r
+package: $(TARGET)\r
+       @cd $(DIRDIST)\r
+       @-$(ZIP) -9 -q -r ..\$(CONFIG_NAME_LIB).zip .>nul 2<&1\r
+       @cd $(MAKEDIR)\r
+\r
+$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)\r
+       @echo Using SSL: $(USE_SSL)\r
+       @echo Using SSH2: $(USE_SSH2)\r
+       @echo Using ZLIB: $(USE_ZLIB)\r
+       @echo Using IDN:  $(USE_IDN)\r
+       @echo Using IPv6: $(USE_IPV6)\r
+       @echo Using SSPI: $(USE_SSPI)\r
+       @echo Using SPNEGO: $(USE_SPNEGO)\r
+       @echo Using WinSSL: $(USE_WINSSL)\r
+       @echo CFLAGS:     $(CFLAGS)\r
+       @echo LFLAGS:     $(LFLAGS)\r
+       @echo GenPDB:     $(GEN_PDB)\r
+       @echo Debug:      $(DEBUG)\r
+       @echo Machine:    $(MACHINE)\r
+       $(LNK) $(LFLAGS) $(LIB_OBJS)\r
+       @echo Copying libs...\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL)       $(DIRDIST)\bin\ /y >nul 2<&1\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC)    $(DIRDIST)\lib\ /y >nul 2<&1\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP)       $(DIRDIST)\lib\ /y >nul 2<&1\r
+       @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1\r
+       @-copy $(LIB_DIROBJ)\*.exp                 $(DIRDIST)\lib /y >nul 2<&1\r
+       @-copy $(LIB_DIROBJ)\*.pdb                 $(DIRDIST)\lib /y >nul 2<&1\r
+       @-copy ..\include\curl\*.h   $(DIRDIST)\include\curl\ /y  >nul 2<&1\r
+\r
+$(LIB_OBJS): $(LIB_DIROBJ) $(DIRDIST)\r
+\r
+$(DIRDIST):\r
+       @if not exist "$(DIRDIST)\bin" mkdir $(DIRDIST)\bin\r
+       @if not exist "$(DIRDIST)\include" mkdir $(DIRDIST)\include\r
+       @if not exist "$(DIRDIST)\include\curl" mkdir $(DIRDIST)\include\curl\r
+       @if not exist "$(DIRDIST)\lib" mkdir $(DIRDIST)\lib\r
+\r
+$(LIB_DIROBJ):\r
+       @if not exist "$(LIB_DIROBJ)" mkdir $(LIB_DIROBJ)\r
+\r
+$(CURL_DIROBJ):\r
+       @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)\r
+# we need a lib dir for the portability functions from libcurl\r
+# we use the .c directly here\r
+       @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)\lib\r
+\r
+.SUFFIXES: .c .obj .res\r
+\r
+{$(LIBCURL_SRC_DIR)\}.c{$(LIB_DIROBJ)\}.obj:\r
+       $(CC) $(CFLAGS) /Fo"$@"  $<\r
+\r
+$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc\r
+       rc $(RC_FLAGS)\r
+\r
+#\r
+# curl.exe\r
+#\r
+\r
+\r
+!IF "$(MODE)"=="static"\r
+!IF "$(DEBUG)"=="yes"\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC_DEBUG)\r
+!ELSE\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)\r
+!ENDIF\r
+!ELSEIF "$(MODE)"=="dll"\r
+!IF "$(DEBUG)"=="yes"\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP_DEBUG)\r
+!ELSE\r
+CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)\r
+!ENDIF\r
+!ENDIF\r
+\r
+CURL_FROM_LIBCURL=$(CURL_DIROBJ)\tool_hugehelp.obj \\r
+ $(CURL_DIROBJ)\nonblock.obj \\r
+ $(CURL_DIROBJ)\rawstr.obj \\r
+ $(CURL_DIROBJ)\strtoofft.obj\r
\r
+$(PROGRAM_NAME): $(CURL_DIROBJ) $(CURL_FROM_LIBCURL) $(EXE_OBJS)\r
+       $(CURL_LINK) $(CURL_LFLAGS) $(CURL_LIBCURL_LIBNAME) $(WIN_LIBS) $(CURL_FROM_LIBCURL) $(EXE_OBJS)\r
+       $(MANIFESTTOOL)\r
+\r
+{$(CURL_SRC_DIR)\}.c{$(CURL_DIROBJ)\}.obj:\r
+       $(CC) $(CURL_CFLAGS) /Fo"$@"  $<\r
+\r
+$(CURL_DIROBJ)\tool_hugehelp.obj: $(CURL_SRC_DIR)\tool_hugehelp.c\r
+       $(CURL_CC) $(CURL_CFLAGS) /Zm200 /Fo"$@" $(CURL_SRC_DIR)\tool_hugehelp.c\r
+$(CURL_DIROBJ)\nonblock.obj: ../lib/nonblock.c\r
+       $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/nonblock.c\r
+$(CURL_DIROBJ)\rawstr.obj: ../lib/rawstr.c\r
+       $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/rawstr.c\r
+$(CURL_DIROBJ)\strtoofft.obj: ../lib/strtoofft.c\r
+       $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/strtoofft.c\r
+$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc\r
+       rc $(CURL_RC_FLAGS)\r
+\r
+!ENDIF  # End of case where a config was provided.\r
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
new file mode 100755 (executable)
index 0000000..d08b01e
--- /dev/null
@@ -0,0 +1,6 @@
+@echo OFF\r
+@del %OUTFILE%\r
+@echo %MACRO_NAME% = \> %OUTFILE%\r
+@for %%i in (%*) do @echo              %DIROBJ%/%%i \>>  %OUTFILE%
+@echo. >>  %OUTFILE%\r
+:END\r